linux-stable/arch/mips/bmips
Christian Marangi 10afe5f7d3 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-07-05 09:08:22 +02:00
..
dma.c mips: bmips: BCM6358: disable RAC flush for TP1 2023-04-05 11:16:43 +02:00
irq.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
Kconfig License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
Makefile treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
Platform MIPS: bcm3384: Rename "bcm3384" target to "bmips" 2015-04-01 17:21:35 +02:00
setup.c mips: bmips: BCM6358: make sure CBR is correctly set 2024-07-05 09:08:22 +02:00