Re: [Bug 10732] REGRESSION: 2.6.26-rc2-git4: X server failed startonX61s laptop

From: Jeremy Fitzhardinge
Date: Tue May 20 2008 - 02:33:19 EST


Hugh Dickins wrote:
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?)

I got rid of a bunch of _AT() uses because the constants aren't used in .S files anywhere. Also, I couldn't see how to represent a 64-bit constant in assembler, so I wasn't sure of their correctness (the as manual is irritatingly vague on the matter).

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.

__PHYSICAL_LOW_BITS is a bit more elegant than what I did there (the problem is getting a physaddr_t-width PAGE_MASK). But the formulation in my patch certainly works.

J
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/