| Message ID | - |
|---|---|
| State | Accepted |
| Delegated to: | James Hogan |
| Headers | show |
On 06/16/2017 04:03 AM, Jaedon Shin wrote: > Fixes NULL pointer access in BMIPS3300 RAC flush. > > Fixes: 738a3f79027b ("MIPS: BMIPS: Add early CPU initialization code") > Signed-off-by: Jaedon Shin <> Reviewed-by: Florian Fainelli <> Good catch, sorry about that!
On Fri, Jun 16, 2017 at 08:03:01PM +0900, Jaedon Shin wrote: > Fixes NULL pointer access in BMIPS3300 RAC flush. > > Fixes: 738a3f79027b ("MIPS: BMIPS: Add early CPU initialization code") > Signed-off-by: Jaedon Shin <> Thanks. Applied for 4.14. Cheers James > --- > arch/mips/kernel/smp-bmips.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/arch/mips/kernel/smp-bmips.c b/arch/mips/kernel/smp-bmips.c > index 1b070a76fcdd..5e0d87f4958f 100644 > --- a/arch/mips/kernel/smp-bmips.c > +++ b/arch/mips/kernel/smp-bmips.c > @@ -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); > -- > 2.13.1 > >
diff --git a/arch/mips/kernel/smp-bmips.c b/arch/mips/kernel/smp-bmips.c index 1b070a76fcdd..5e0d87f4958f 100644 --- a/arch/mips/kernel/smp-bmips.c +++ b/arch/mips/kernel/smp-bmips.c @@ -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);
Fixes NULL pointer access in BMIPS3300 RAC flush. Fixes: 738a3f79027b ("MIPS: BMIPS: Add early CPU initialization code") Signed-off-by: Jaedon Shin <> --- arch/mips/kernel/smp-bmips.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)