And can we agree to never EVER use that PAGE_MASK thing (which was only ever meant to work on *addresses*) for any pte operations (including the definition of PTE_MASK)? Because PAGE_MASK is very much the word-size, and in 32-bit PAE, the page table entry is bigger.
IOE, PTE_MASK should be a "pteval_t". And it should have absolutely *nothing* to do with PAGE_MASK. EVER.
Yes, Jeremy makes it a pteval_t. (My builds and Ingo's builds succeed,
but I've not worked out how that goes down in assembly: there was an
_AT macro in there before, which you've kept too - Jeremy?)
Yes, I'm highly resistant to taking untested patches here. The two-liner
I sent last night was about my fifth attempt to get it working, and I did
start off from a small PTE_MASK correction which didn't work at all. It
looked rather like yours, I guess I missed the __PHYSICAL_LOW_BITS part.
Jeremy's goes a lot further, he'll know the gotchas better.