linux-stable/arch/mips/bmips
Christian Marangi 6c0f6ccd93 mips: bmips: BCM6358: make sure CBR is correctly set
[ Upstream commit ce5cdd3b05 ]

It was discovered that some device have CBR address set to 0 causing
kernel panic when arch_sync_dma_for_cpu_all is called.

This was notice in situation where the system is booted from TP1 and
BMIPS_GET_CBR() returns 0 instead of a valid address and
!!(read_c0_brcm_cmt_local() & (1 << 31)); not failing.

The current check whether RAC flush should be disabled or not are not
enough hence lets check if CBR is a valid address or not.

Fixes: ab327f8acd ("mips: bmips: BCM6358: disable RAC flush for TP1")
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
Acked-by: Florian Fainelli <florian.fainelli@broadcom.com>
Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-06-27 13:46:18 +02:00
..
dma.c mips: bmips: BCM6358: disable RAC flush for TP1 2023-04-06 12:10:42 +02:00
irq.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
Kconfig
Makefile
Platform MIPS: Only include the platform file needed 2020-05-13 00:17:18 +02:00
setup.c mips: bmips: BCM6358: make sure CBR is correctly set 2024-06-27 13:46:18 +02:00