X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=arch%2Fi386%2Fmm%2Fboot_ioremap.c;h=5cf739a445b48060ae94c6c8d4d6bbb61dbf3339;hb=16c70f8c1b54b61c3b951b6fb220df250fe09b32;hp=d879c1aa90a2defcf8f44b59587d20e86dfbba63;hpb=5273a3df6485dc2ad6aa7ddd441b9a21970f003b;p=linux-2.6.git diff --git a/arch/i386/mm/boot_ioremap.c b/arch/i386/mm/boot_ioremap.c index d879c1aa9..5cf739a44 100644 --- a/arch/i386/mm/boot_ioremap.c +++ b/arch/i386/mm/boot_ioremap.c @@ -15,7 +15,6 @@ * boot_pte_t is defined only if this all works correctly */ -#include #undef CONFIG_X86_PAE #include #include @@ -30,8 +29,11 @@ */ #define BOOT_PTE_PTRS (PTRS_PER_PTE*2) -#define boot_pte_index(address) \ - (((address) >> PAGE_SHIFT) & (BOOT_PTE_PTRS - 1)) + +static unsigned long boot_pte_index(unsigned long vaddr) +{ + return __pa(vaddr) >> PAGE_SHIFT; +} static inline boot_pte_t* boot_vaddr_to_pte(void *address) { @@ -61,8 +63,8 @@ static void __boot_ioremap(unsigned long phys_addr, unsigned long nrpages, /* the virtual space we're going to remap comes from this array */ #define BOOT_IOREMAP_PAGES 4 #define BOOT_IOREMAP_SIZE (BOOT_IOREMAP_PAGES*PAGE_SIZE) -__initdata char boot_ioremap_space[BOOT_IOREMAP_SIZE] - __attribute__ ((aligned (PAGE_SIZE))); +static __initdata char boot_ioremap_space[BOOT_IOREMAP_SIZE] + __attribute__ ((aligned (PAGE_SIZE))); /* * This only applies to things which need to ioremap before paging_init()