From: Benjamin Herrenschmidt Date: Thu, 15 Feb 2007 07:29:32 +0000 (+1100) Subject: [POWERPC] Fix bug with early ioremap and 64k pages X-Git-Url: http://drtracing.org/?a=commitdiff_plain;h=a32525449b30dfbae804f6b05cde041f35f5a811;p=deliverable%2Flinux.git [POWERPC] Fix bug with early ioremap and 64k pages The code for bolting hash entries for ioremap done before proper mm initialization has a grown a bug when using 64K pages on a machine where non-cacheable mappings are demoted to 4K HW pages. The wrong page size index is being passed to the hash table mapping functions causing a crash at boot on some pSeries machines using bare metal linux. This fixes it. Signed-off-by: Benjamin Herrenschmidt Signed-off-by: Paul Mackerras --- diff --git a/arch/powerpc/mm/pgtable_64.c b/arch/powerpc/mm/pgtable_64.c index 16e4ee1c2318..1d443407423c 100644 --- a/arch/powerpc/mm/pgtable_64.c +++ b/arch/powerpc/mm/pgtable_64.c @@ -103,7 +103,7 @@ static int map_io_page(unsigned long ea, unsigned long pa, int flags) * */ if (htab_bolt_mapping(ea, ea + PAGE_SIZE, pa, flags, - mmu_virtual_psize)) { + mmu_io_psize)) { printk(KERN_ERR "Failed to do bolted mapping IO " "memory at %016lx !\n", pa); return -ENOMEM;