X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=arch%2Fi386%2Fmm%2Fboot_ioremap.c;h=523b30634e0a87c76a32ca57f0977593b3364108;hb=9464c7cf61b9433057924c36e6e02f303a00e768;hp=5cf739a445b48060ae94c6c8d4d6bbb61dbf3339;hpb=41689045f6a3cbe0550e1d34e9cc20d2e8c432ba;p=linux-2.6.git diff --git a/arch/i386/mm/boot_ioremap.c b/arch/i386/mm/boot_ioremap.c index 5cf739a44..523b30634 100644 --- a/arch/i386/mm/boot_ioremap.c +++ b/arch/i386/mm/boot_ioremap.c @@ -15,6 +15,7 @@ * boot_pte_t is defined only if this all works correctly */ +#include #undef CONFIG_X86_PAE #include #include @@ -29,11 +30,8 @@ */ #define BOOT_PTE_PTRS (PTRS_PER_PTE*2) - -static unsigned long boot_pte_index(unsigned long vaddr) -{ - return __pa(vaddr) >> PAGE_SHIFT; -} +#define boot_pte_index(address) \ + (((address) >> PAGE_SHIFT) & (BOOT_PTE_PTRS - 1)) static inline boot_pte_t* boot_vaddr_to_pte(void *address) {