On Fri, 15 Feb 2008, Huang, Ying wrote:If this is a problem in practice, we'd be better off having a helper function to do it, to avoid overflows. Right now, doing overflows at 4GB on x86-32. And maybe you never have areas that big, and people are moving over to 64-bit anyway, it still sounds like a bug waiting to happen. So *if* we care (I doubt we do, since EFI_PAGE_SHIFT at least right now matches PAGE_SHIFT on x86), you'd probably want to do something like static inline unsigned long efi_pages_to_native_pages(unsigned long efi_pages) { #if EFI_PAGE_SHIFT > PAGE_SHIFT return efi_pages << (EFI_PAGE_SHIFT - PAGE_SHIFT); #else return efi_pages >> (PAGE_SHIFT - EFI_PAGE_SHIFT); #endif } or whatever. Otherwise, trying to avoid a bug with different page sizes is actually more likely to *introduce* one rather than fix one.. Linus --
| Greg Kroah-Hartman | [PATCH 004/196] Chinese: add translation of SubmittingPatches |
| Tarkan Erimer | Re: Dual-Licensing Linux Kernel with GPL V2 and GPL V3 |
| Matt Mackall | Re: [PATCH] x86: fix unconditional arch/x86/kernel/pcspeaker.c compiling |
| James Bottomley | Re: Integration of SCST in the mainstream Linux kernel |
| Gerrit Renker | [PATCH 27/37] dccp: Integration of dynamic feature activation - part 2 (server side) |
| David Miller | [GIT]: Networking |
| Jarek Poplawski | [PATCH] pkt_sched: Destroy gen estimators under rtnl_lock(). |
| Natalie Protasevich | [BUG] New Kernel Bugs |
git: | |
