summaryrefslogtreecommitdiffstats
path: root/arch/powerpc/mm/pgtable_64.c
diff options
context:
space:
mode:
authorBenjamin Herrenschmidt <benh@kernel.crashing.org>2005-11-10 01:12:11 +0100
committerPaul Mackerras <paulus@samba.org>2005-11-10 01:26:06 +0100
commit77ac166fba909d520b9a21dcc28cb49081e31033 (patch)
treed167696a56a4acd32dba3b875996cebcdba1cedd /arch/powerpc/mm/pgtable_64.c
parent[PATCH] ppc64 boot: fix compile warnings (diff)
downloadlinux-77ac166fba909d520b9a21dcc28cb49081e31033.tar.xz
linux-77ac166fba909d520b9a21dcc28cb49081e31033.zip
[PATCH] ppc64: Don't panic when early __ioremap fails
Early calls to __ioremap() will panic if the hash insertion fails. This patch makes them return NULL instead. It happens with some pSeries users who enabled CONFIG_BOOTX_TEXT. The later is getting an incorrect address for the fame buffer and the hash insertion fails. With this patch, it will display an error instead of crashing at boot. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'arch/powerpc/mm/pgtable_64.c')
-rw-r--r--arch/powerpc/mm/pgtable_64.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/arch/powerpc/mm/pgtable_64.c b/arch/powerpc/mm/pgtable_64.c
index 900842451bd3..c7f7bb6f30b3 100644
--- a/arch/powerpc/mm/pgtable_64.c
+++ b/arch/powerpc/mm/pgtable_64.c
@@ -122,8 +122,11 @@ 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))
- panic("Can't map bolted IO mapping");
+ mmu_virtual_psize)) {
+ printk(KERN_ERR "Failed to do bolted mapping IO "
+ "memory at %016lx !\n", pa);
+ return -ENOMEM;
+ }
}
return 0;
}