Commit a3252544 authored by Benjamin Herrenschmidt's avatar Benjamin Herrenschmidt Committed by Paul Mackerras

[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: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: default avatarPaul Mackerras <paulus@samba.org>
parent 41806ef4
...@@ -103,7 +103,7 @@ static int map_io_page(unsigned long ea, unsigned long pa, int flags) ...@@ -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, 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 " printk(KERN_ERR "Failed to do bolted mapping IO "
"memory at %016lx !\n", pa); "memory at %016lx !\n", pa);
return -ENOMEM; return -ENOMEM;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment