Linux MIPS Architecture development
 help / color / mirror / Atom feed
* [PATCH] MIPS: BMIPS: Fix missing cbr address
@ 2017-06-16 11:03 Jaedon Shin
  2017-06-16 17:40 ` Florian Fainelli
  2017-11-07 21:39 ` James Hogan
  0 siblings, 2 replies; 4+ messages in thread
From: Jaedon Shin @ 2017-06-16 11:03 UTC (permalink / raw)
  To: Ralf Baechle, Florian Fainelli; +Cc: Kevin Cernekee, linux-mips, Jaedon Shin

Fixes 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>
---
 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

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] MIPS: BMIPS: Fix missing cbr address
  2017-06-16 11:03 [PATCH] MIPS: BMIPS: Fix missing cbr address Jaedon Shin
@ 2017-06-16 17:40 ` Florian Fainelli
  2017-11-07 21:39 ` James Hogan
  1 sibling, 0 replies; 4+ messages in thread
From: Florian Fainelli @ 2017-06-16 17:40 UTC (permalink / raw)
  To: Jaedon Shin, Ralf Baechle; +Cc: Kevin Cernekee, linux-mips

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 <jaedon.shin@gmail.com>

Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>

Good catch, sorry about that!
-- 
Florian

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] MIPS: BMIPS: Fix missing cbr address
  2017-06-16 11:03 [PATCH] MIPS: BMIPS: Fix missing cbr address Jaedon Shin
  2017-06-16 17:40 ` Florian Fainelli
@ 2017-11-07 21:39 ` James Hogan
  2017-11-07 21:39   ` James Hogan
  1 sibling, 1 reply; 4+ messages in thread
From: James Hogan @ 2017-11-07 21:39 UTC (permalink / raw)
  To: Jaedon Shin; +Cc: Ralf Baechle, Florian Fainelli, Kevin Cernekee, linux-mips

[-- Attachment #1: Type: text/plain, Size: 1179 bytes --]

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 <jaedon.shin@gmail.com>

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
> 
> 

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] MIPS: BMIPS: Fix missing cbr address
  2017-11-07 21:39 ` James Hogan
@ 2017-11-07 21:39   ` James Hogan
  0 siblings, 0 replies; 4+ messages in thread
From: James Hogan @ 2017-11-07 21:39 UTC (permalink / raw)
  To: Jaedon Shin; +Cc: Ralf Baechle, Florian Fainelli, Kevin Cernekee, linux-mips

[-- Attachment #1: Type: text/plain, Size: 1179 bytes --]

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 <jaedon.shin@gmail.com>

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
> 
> 

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2017-11-07 21:40 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-06-16 11:03 [PATCH] MIPS: BMIPS: Fix missing cbr address Jaedon Shin
2017-06-16 17:40 ` Florian Fainelli
2017-11-07 21:39 ` James Hogan
2017-11-07 21:39   ` James Hogan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox