Jul 28 2020
Jul 24 2020
Jul 23 2020
Grammar correction suggestions in code comments.
Jul 22 2020
Minor grammar suggestions but otherwise looks good to me. Thanks!
'if _BYTE_ORDER' removed, making the code more generic, as suggested in the comments of this revision. Comments were also added explaining why endian conversion is necessary.
Jul 20 2020
@arichardson Which freebsd .img revision are you using?
Jul 14 2020
I can confirm that this makes virtio-rng work again for MIPS64. LGTM if you apply @alfredo's suggestions.
Jul 8 2020
In this way the specificity of the mips is removed, the adjustments of the bus_space in the vtpci_* defines makes the code more generic.
Jul 6 2020
Jul 2 2020
Jun 24 2020
I stepped through MIPS init in QEMU and it turns out MALTA ends up with
p sc->vtpci_res->r_bustag $7 = (bus_space_tag_t) 0xffffffff809aefc0 <gt_pci_space>
Apr 24 2020
More respose to markj feedback
Note that for instance x86 has similar issue, because hardware is free to speculatively walk page tables and load any valid PTE or intermediate paging structure. There all page table entries clearing functions take the free list pointer, where the freed page table is put. Only after the caller did IPI to invalidate TLB for cleared PTE, the pages from the list can be freed.
Apr 23 2020
This looks reasonable to me aside from the style nits.
Revised version as per markj's feedback
Apr 22 2020
Apr 21 2020
Now without D24523 included
Apr 20 2020
I believe it is better to split the review into two. The pmap_emulate_modified() looks good to me, and I do not see why the other part should block this one.
Apr 18 2020
Sep 4 2019
Mar 16 2019
Feb 12 2019
Dec 22 2017
Remove mips 32bit atomic_load/store_64.
Yes, let's kill these and fix DDB instead.
BTW, I looked and the only place atomic_load_64 and atomic_store_64 are used in sys/mips is for DDB (db_read_bytes and db_write_bytes in sys/mips/mips/db_interface.c). It is not clear to me that this actually needs to be near this fancy. Most architectures just do a simple byte loop. Only 32-bit arm, mips, and powerpc attempt to handle accesses for exact word-size specially. arm doesn't try to handle 64-bit accesses with this kind of magic. powerpc just uses a 'uint64_t' load and store via C the same as it does for other word sizes. I suspect the db_read/write_bytes can just be simplified to match what powerpc does and and use simple C load/store and then these functions can be removed.