Messages in this thread | | | Date | Sun, 09 Mar 2008 19:45:11 -0700 | From | Jeremy Fitzhardinge <> | Subject | Re: bisected boot regression post 2.6.25-rc3.. please revert |
| |
Linus Torvalds wrote: > So I would *very* strongly instead argue: > > - "unsigned long" is the native kernel type for all address manipulation, > and thus "PAGE_SIZE" and "PAGE_MASK" should continue to have that type. > > - anything that uses any other type without explicitly making sure it's > safe is mis-using those macros. IOW, PAGE_MASk was *never* a type that > had anything what-so-ever to do with page table entry bits, and this is > purely a page table entry issue! >
Yes. PTE_MASK already exists for masking the address bits out of a pte. It should have the type pteval_t, which will deal with the PAE case cleanly. It should also only have the middle pfn bits set, so that _PAGE_NX is also not included.
It's currently defined in terms of PHYSICAL_PAGE_MASK, which 1) is only used to define PTE_MASK, and 2) defined (wrongly) in terms of PAGE_MASK (though __PHYSICAL_MASK is correctly defined).
J
| |