Skip to content

Commit

Permalink
MIPS: BMIPS: Fix missing cbr address
Browse files Browse the repository at this point in the history
Fix NULL pointer access in BMIPS3300 RAC flush.

Fixes: 738a3f7 ("MIPS: BMIPS: Add early CPU initialization code")
Signed-off-by: Jaedon Shin <[email protected]>
Reviewed-by: Florian Fainelli <[email protected]>
Cc: Kevin Cernekee <[email protected]>
Cc: [email protected]
Cc: <[email protected]> # 4.7+
Patchwork: https://patchwork.linux-mips.org/patch/16423/
Signed-off-by: James Hogan <[email protected]>
  • Loading branch information
jaedon authored and amalon committed Nov 7, 2017
1 parent 39dae59 commit ea4b3af
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions arch/mips/kernel/smp-bmips.c
Original file line number Diff line number Diff line change
Expand Up @@ -591,11 +591,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);
Expand Down

0 comments on commit ea4b3af

Please sign in to comment.