Re: [PATCH] Fix left over EFI cache mapping problems

From: Ingo Molnar
Date: Fri Feb 15 2008 - 02:30:51 EST



* Linus Torvalds <torvalds@xxxxxxxxxxxxxxxxxxxx> wrote:

> 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
> }

yeah, this is even cleaner - i guess EFI_PAGE_SHIFT will be around in
the future too because it's also used on ia64.

Ingo
--
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/