Skip to contentSkip to conversation

MIPS: BMIPS: Fix missing cbr address

PATCH In review Jaedon Shin 3 participants 3 messages Jun 16, 2017 – Nov 7, 2017

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 MIPS: BMIPS: Fix missing cbr address

Fixes NULL pointer access in BMIPS3300 RAC flush.

Fixes 738a3f79027b ("MIPS: BMIPS: Add early CPU initialization code")
---
 arch/mips/kernel/smp-bmips.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
arch/mips/kernel/smp-bmips.c +2 -2
index 1b070a76fcdd..5e0d87f4958f 100644
@@ -589,11 +589,11 @@ void __init bmips_cpu_setup(void)
 
 		/* Flush and enable RAC */
 		cfg = __raw_readl(cbr + BMIPS_RAC_CONFIG);
-		__raw_writel(cfg | 0x100, BMIPS_RAC_CONFIG);
+		__raw_writel(cfg | 0x100, cbr + BMIPS_RAC_CONFIG);
 		__raw_readl(cbr + BMIPS_RAC_CONFIG);
 
 		cfg = __raw_readl(cbr + BMIPS_RAC_CONFIG);
-		__raw_writel(cfg | 0xf, BMIPS_RAC_CONFIG);
+		__raw_writel(cfg | 0xf, cbr + BMIPS_RAC_CONFIG);
 		__raw_readl(cbr + BMIPS_RAC_CONFIG);
 
 		cfg = __raw_readl(cbr + BMIPS_RAC_ADDRESS_RANGE);
Signature · 1 line
2.13.1
#2 lore raw
In reply to Jaedon Shin
Quoted 4 lines · Jaedon Shin

Fixes NULL pointer access in BMIPS3300 RAC flush.

Fixes 738a3f79027b ("MIPS: BMIPS: Add early CPU initialization code")

Thanks. Applied for 4.14.

Cheers
James

Quoted 26 lines
---
 arch/mips/kernel/smp-bmips.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
arch/mips/kernel/smp-bmips.c +2 -2
index 1b070a76fcdd..5e0d87f4958f 100644
@@ -589,11 +589,11 @@ void __init bmips_cpu_setup(void)
 
 		/* Flush and enable RAC */
 		cfg = __raw_readl(cbr + BMIPS_RAC_CONFIG);
-		__raw_writel(cfg | 0x100, BMIPS_RAC_CONFIG);
+		__raw_writel(cfg | 0x100, cbr + BMIPS_RAC_CONFIG);
 		__raw_readl(cbr + BMIPS_RAC_CONFIG);
 
 		cfg = __raw_readl(cbr + BMIPS_RAC_CONFIG);
-		__raw_writel(cfg | 0xf, BMIPS_RAC_CONFIG);
+		__raw_writel(cfg | 0xf, cbr + BMIPS_RAC_CONFIG);
 		__raw_readl(cbr + BMIPS_RAC_CONFIG);
 
 		cfg = __raw_readl(cbr + BMIPS_RAC_ADDRESS_RANGE);
Signature · 1 line
2.13.1