aboutsummaryrefslogtreecommitdiffstats
path: root/arch/mips/kernel/traps.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/mips/kernel/traps.c')
-rw-r--r--arch/mips/kernel/traps.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/arch/mips/kernel/traps.c b/arch/mips/kernel/traps.c
index 3d033e1cd4f0..d96f8218a91e 100644
--- a/arch/mips/kernel/traps.c
+++ b/arch/mips/kernel/traps.c
@@ -1435,6 +1435,9 @@ void __init set_handler (unsigned long offset, void *addr, unsigned long size)
1435 flush_icache_range(ebase + offset, ebase + offset + size); 1435 flush_icache_range(ebase + offset, ebase + offset + size);
1436} 1436}
1437 1437
1438static char panic_null_cerr[] __initdata =
1439 "Trying to set NULL cache error exception handler";
1440
1438/* Install uncached CPU exception handler */ 1441/* Install uncached CPU exception handler */
1439void __init set_uncached_handler (unsigned long offset, void *addr, unsigned long size) 1442void __init set_uncached_handler (unsigned long offset, void *addr, unsigned long size)
1440{ 1443{
@@ -1445,6 +1448,9 @@ void __init set_uncached_handler (unsigned long offset, void *addr, unsigned lon
1445 unsigned long uncached_ebase = TO_UNCAC(ebase); 1448 unsigned long uncached_ebase = TO_UNCAC(ebase);
1446#endif 1449#endif
1447 1450
1451 if (!addr)
1452 panic(panic_null_cerr);
1453
1448 memcpy((void *)(uncached_ebase + offset), addr, size); 1454 memcpy((void *)(uncached_ebase + offset), addr, size);
1449} 1455}
1450 1456