9
0
Fork 0
barebox/arch
Andre Heider 0fdd91d92b ARM: cache: do not crash when the MMU isn't yet setup
Drivers currently cannot implement explicit cache handling and rely on
running the same code before and after mmu_initcall() without crashing.

Depending on the chosen config options, the cache functions are not yet
setup and using them early on ends in a null pointer dereference.

The RPi's mailbox driver is such a case; it requires cache handling once
the MMU is fully set up and yet the RPi setup needs to use the driver to
get the memory size before mem_initcall() and hence mmu_initcall().

Fix this by checking the cache_fns pointer before dereferencing it.

Signed-off-by: Andre Heider <a.heider@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-10-22 15:28:58 +02:00
..
arm ARM: cache: do not crash when the MMU isn't yet setup 2013-10-22 15:28:58 +02:00
blackfin Set model and hostname at boardlevel 2013-08-16 08:40:55 +02:00
mips Merge branch 'for-next/mips' 2013-10-07 08:00:16 +02:00
nios2 Set model and hostname at boardlevel 2013-08-16 08:40:55 +02:00
openrisc Set model and hostname at boardlevel 2013-08-16 08:40:55 +02:00
ppc console: factorise function to get the first enabled console 2013-10-06 13:19:46 +02:00
sandbox console: drop f_caps and check the function pointer getc/putc instead 2013-09-21 09:59:16 +02:00
x86 x86: Fix compiler warnings 2013-10-14 14:04:46 +02:00
architecture.dox MIPS: add documentation 2011-08-05 18:20:17 +02:00