summaryrefslogtreecommitdiffstats
path: root/arch/mips/kernel/smp-bmips.c
diff options
context:
space:
mode:
authorJaedon Shin <jaedon.shin@gmail.com>2017-06-16 20:03:01 +0900
committerJames Hogan <jhogan@kernel.org>2017-11-07 21:28:19 +0000
commitea4b3afe1eac8f88bb453798a084fba47a1f155a (patch)
tree2a60f2dd86a21d54a8f01b2bbb78d5cf28ec6b6e /arch/mips/kernel/smp-bmips.c
parent39dae59d66acd86d1de24294bd2f343fd5e7a625 (diff)
downloadop-kernel-dev-ea4b3afe1eac8f88bb453798a084fba47a1f155a.zip
op-kernel-dev-ea4b3afe1eac8f88bb453798a084fba47a1f155a.tar.gz
MIPS: BMIPS: Fix missing cbr address
Fix NULL pointer access in BMIPS3300 RAC flush. Fixes: 738a3f79027b ("MIPS: BMIPS: Add early CPU initialization code") Signed-off-by: Jaedon Shin <jaedon.shin@gmail.com> Reviewed-by: Florian Fainelli <f.fainelli@gmail.com> Cc: Kevin Cernekee <cernekee@gmail.com> Cc: linux-mips@linux-mips.org Cc: <stable@vger.kernel.org> # 4.7+ Patchwork: https://patchwork.linux-mips.org/patch/16423/ Signed-off-by: James Hogan <jhogan@kernel.org>
Diffstat (limited to 'arch/mips/kernel/smp-bmips.c')
-rw-r--r--arch/mips/kernel/smp-bmips.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/mips/kernel/smp-bmips.c b/arch/mips/kernel/smp-bmips.c
index 406072e..87dcac2 100644
--- a/arch/mips/kernel/smp-bmips.c
+++ b/arch/mips/kernel/smp-bmips.c
@@ -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);
OpenPOWER on IntegriCloud