2
0
mirror of https://github.com/edk2-porting/linux-next.git synced 2024-12-15 08:44:14 +08:00

Fix to avoid crash on BCM6358 platforms

-----BEGIN PGP SIGNATURE-----
 
 iQJOBAABCAA4FiEEbt46xwy6kEcDOXoUeZbBVTGwZHAFAmQmmcQaHHRzYm9nZW5k
 QGFscGhhLmZyYW5rZW4uZGUACgkQeZbBVTGwZHCQyA//YQvtXmEvmxPE5u1+hd5N
 AhBJl8tXp9ciOonMdBOaTGXS58lfkqIR15w3jbVslvh7kzOHSSq6CEyzDramNYsT
 8ZxgM/H4Z8Z/jCq+YTJ3AKG8io5VEaIUJNtGHDzwA9e5QYlJeOM/rMZSMXSM5Cvh
 aV3X5O2X+6cyKHIzrYhvHgvD2X6ANgc3aAzno/pmI/+hPJ1i7dXrKp/53uYGynpy
 xFmZh35DJPxFnyJBCEV2evjjqsZPwdPX63R9jNKeg9Bu16FjQpWD+/LdtIdJyFhs
 hwR1TsYM3Z02dJZJoe6LOAvAfkaOVvyZY9mJJ8pBwdEBDKFD0HoIHY1tfVxReyIc
 SAEaOG6lKnfNMa2SBz9yNN02AJmQTw1aLhKNtnM6Wg84WDCR1vzIdAWwetoxaWsX
 7/lvs90fPgvYkc1ACHSKzq1Xg+qLZWej1yJrOi611IvTbI5ut6esbQ1NKBpBqe5Y
 D6FRv90XOVttqeXyW63xFVKg2JiEd/L6iaJBBf5zamRt1wdcQJjEy8/0su3jF9wa
 px4wuBb0ez+B/29c/Gtqe+C/XtwJo9Utg174Vgx8FzrczLlvdJlXkW7rMRRuBqZf
 OlotzWrgFyvmPUzcBXo8HeyzdPvEH9OGACA73lMQzI4qGVyoPozfrBE/ytqKk/+G
 qyP8EBjtr62pdS9xLCEK23Y=
 =SHs/
 -----END PGP SIGNATURE-----

Merge tag 'mips-fixes_6.3_1' of git://git.kernel.org/pub/scm/linux/kernel/git/mips/linux

Pull MIPS fix from Thomas Bogendoerfer:
 "Fix to avoid crash on BCM6358 platforms"

* tag 'mips-fixes_6.3_1' of git://git.kernel.org/pub/scm/linux/kernel/git/mips/linux:
  mips: bmips: BCM6358: disable RAC flush for TP1
This commit is contained in:
Linus Torvalds 2023-03-31 10:12:07 -07:00
commit 52f1959502
2 changed files with 13 additions and 0 deletions

View File

@ -5,6 +5,8 @@
#include <asm/bmips.h>
#include <asm/io.h>
bool bmips_rac_flush_disable;
void arch_sync_dma_for_cpu_all(void)
{
void __iomem *cbr = BMIPS_GET_CBR();
@ -15,6 +17,9 @@ void arch_sync_dma_for_cpu_all(void)
boot_cpu_type() != CPU_BMIPS4380)
return;
if (unlikely(bmips_rac_flush_disable))
return;
/* Flush stale data out of the readahead cache */
cfg = __raw_readl(cbr + BMIPS_RAC_CONFIG);
__raw_writel(cfg | 0x100, cbr + BMIPS_RAC_CONFIG);

View File

@ -35,6 +35,8 @@
#define REG_BCM6328_OTP ((void __iomem *)CKSEG1ADDR(0x1000062c))
#define BCM6328_TP1_DISABLED BIT(9)
extern bool bmips_rac_flush_disable;
static const unsigned long kbase = VMLINUX_LOAD_ADDRESS & 0xfff00000;
struct bmips_quirk {
@ -104,6 +106,12 @@ static void bcm6358_quirks(void)
* disable SMP for now
*/
bmips_smp_enabled = 0;
/*
* RAC flush causes kernel panics on BCM6358 when booting from TP1
* because the bootloader is not initializing it properly.
*/
bmips_rac_flush_disable = !!(read_c0_brcm_cmt_local() & (1 << 31));
}
static void bcm6368_quirks(void)