linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] powerpc/fsl: Fix the flush of branch predictor.
@ 2019-02-26 18:18 Christophe Leroy
  2019-02-27  3:37 ` Daniel Axtens
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Christophe Leroy @ 2019-02-26 18:18 UTC (permalink / raw)
  To: Benjamin Herrenschmidt, Paul Mackerras, Michael Ellerman, Diana Craciun
  Cc: linux-kernel, linuxppc-dev

The commit identified below adds MC_BTB_FLUSH macro only when
CONFIG_PPC_FSL_BOOK3E is defined. This results in the following error
on some configs (seen several times with kisskb randconfig_defconfig)

arch/powerpc/kernel/exceptions-64e.S:576: Error: Unrecognized opcode: `mc_btb_flush'
make[3]: *** [scripts/Makefile.build:367: arch/powerpc/kernel/exceptions-64e.o] Error 1
make[2]: *** [scripts/Makefile.build:492: arch/powerpc/kernel] Error 2
make[1]: *** [Makefile:1043: arch/powerpc] Error 2
make: *** [Makefile:152: sub-make] Error 2

This patch adds a blank definition of MC_BTB_FLUSH for other cases.

Fixes: 10c5e83afd4a ("powerpc/fsl: Flush the branch predictor at each kernel entry (64bit)")
Cc: Diana Craciun <diana.craciun@nxp.com>
Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr>
---
 arch/powerpc/kernel/exceptions-64e.S | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/powerpc/kernel/exceptions-64e.S b/arch/powerpc/kernel/exceptions-64e.S
index 4549ce8d4637..49381f32b374 100644
--- a/arch/powerpc/kernel/exceptions-64e.S
+++ b/arch/powerpc/kernel/exceptions-64e.S
@@ -338,6 +338,7 @@ ret_from_mc_except:
 #define GEN_BTB_FLUSH
 #define CRIT_BTB_FLUSH
 #define DBG_BTB_FLUSH
+#define MC_BTB_FLUSH
 #define GDBELL_BTB_FLUSH
 #endif
 
-- 
2.13.3


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

* Re: [PATCH] powerpc/fsl: Fix the flush of branch predictor.
  2019-02-26 18:18 [PATCH] powerpc/fsl: Fix the flush of branch predictor Christophe Leroy
@ 2019-02-27  3:37 ` Daniel Axtens
  2019-02-27  6:47 ` Diana Madalina Craciun
  2019-02-28  9:21 ` Michael Ellerman
  2 siblings, 0 replies; 4+ messages in thread
From: Daniel Axtens @ 2019-02-27  3:37 UTC (permalink / raw)
  To: Christophe Leroy, Benjamin Herrenschmidt, Paul Mackerras,
	Michael Ellerman, Diana Craciun
  Cc: linux-kernel, linuxppc-dev

Christophe Leroy <christophe.leroy@c-s.fr> writes:

> The commit identified below adds MC_BTB_FLUSH macro only when
> CONFIG_PPC_FSL_BOOK3E is defined. This results in the following error
> on some configs (seen several times with kisskb randconfig_defconfig)
>
> arch/powerpc/kernel/exceptions-64e.S:576: Error: Unrecognized opcode: `mc_btb_flush'
> make[3]: *** [scripts/Makefile.build:367: arch/powerpc/kernel/exceptions-64e.o] Error 1
> make[2]: *** [scripts/Makefile.build:492: arch/powerpc/kernel] Error 2
> make[1]: *** [Makefile:1043: arch/powerpc] Error 2
> make: *** [Makefile:152: sub-make] Error 2
>
> This patch adds a blank definition of MC_BTB_FLUSH for other cases.
>
> Fixes: 10c5e83afd4a ("powerpc/fsl: Flush the branch predictor at each kernel entry (64bit)")
> Cc: Diana Craciun <diana.craciun@nxp.com>
> Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr>
> ---
>  arch/powerpc/kernel/exceptions-64e.S | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/arch/powerpc/kernel/exceptions-64e.S b/arch/powerpc/kernel/exceptions-64e.S
> index 4549ce8d4637..49381f32b374 100644
> --- a/arch/powerpc/kernel/exceptions-64e.S
> +++ b/arch/powerpc/kernel/exceptions-64e.S
> @@ -338,6 +338,7 @@ ret_from_mc_except:
>  #define GEN_BTB_FLUSH
>  #define CRIT_BTB_FLUSH
>  #define DBG_BTB_FLUSH
> +#define MC_BTB_FLUSH
>  #define GDBELL_BTB_FLUSH

This seems correct to me:

 - MC_BTB_FLUSH gets a definition in the CONFIG_PPC_FSL_BOOK3E case.

 - other things that are defined in the FSL_BOOK3E case get empty
   definitions in the #else branch, but MC_BTB_FLUSH doesn't.

 - this patch just adds that empty definition.

 - there are no other definitions of MC_BTB_FLUSH that should be used
   instead.

Reviewed-by: Daniel Axtens <dja@axtens.net>

Regards,
Daniel

>  #endif
>  
> -- 
> 2.13.3

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

* Re: [PATCH] powerpc/fsl: Fix the flush of branch predictor.
  2019-02-26 18:18 [PATCH] powerpc/fsl: Fix the flush of branch predictor Christophe Leroy
  2019-02-27  3:37 ` Daniel Axtens
@ 2019-02-27  6:47 ` Diana Madalina Craciun
  2019-02-28  9:21 ` Michael Ellerman
  2 siblings, 0 replies; 4+ messages in thread
From: Diana Madalina Craciun @ 2019-02-27  6:47 UTC (permalink / raw)
  To: Christophe Leroy, Benjamin Herrenschmidt, Paul Mackerras,
	Michael Ellerman
  Cc: linux-kernel, linuxppc-dev

Reviewed-by: Diana Craciun <diana.craciun@nxp.com>

Thanks for fixing it!

On 2/26/2019 8:18 PM, Christophe Leroy wrote:
> The commit identified below adds MC_BTB_FLUSH macro only when
> CONFIG_PPC_FSL_BOOK3E is defined. This results in the following error
> on some configs (seen several times with kisskb randconfig_defconfig)
>
> arch/powerpc/kernel/exceptions-64e.S:576: Error: Unrecognized opcode: `mc_btb_flush'
> make[3]: *** [scripts/Makefile.build:367: arch/powerpc/kernel/exceptions-64e.o] Error 1
> make[2]: *** [scripts/Makefile.build:492: arch/powerpc/kernel] Error 2
> make[1]: *** [Makefile:1043: arch/powerpc] Error 2
> make: *** [Makefile:152: sub-make] Error 2
>
> This patch adds a blank definition of MC_BTB_FLUSH for other cases.
>
> Fixes: 10c5e83afd4a ("powerpc/fsl: Flush the branch predictor at each kernel entry (64bit)")
> Cc: Diana Craciun <diana.craciun@nxp.com>
> Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr>
> ---
>  arch/powerpc/kernel/exceptions-64e.S | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/arch/powerpc/kernel/exceptions-64e.S b/arch/powerpc/kernel/exceptions-64e.S
> index 4549ce8d4637..49381f32b374 100644
> --- a/arch/powerpc/kernel/exceptions-64e.S
> +++ b/arch/powerpc/kernel/exceptions-64e.S
> @@ -338,6 +338,7 @@ ret_from_mc_except:
>  #define GEN_BTB_FLUSH
>  #define CRIT_BTB_FLUSH
>  #define DBG_BTB_FLUSH
> +#define MC_BTB_FLUSH
>  #define GDBELL_BTB_FLUSH
>  #endif
>  



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

* Re: powerpc/fsl: Fix the flush of branch predictor.
  2019-02-26 18:18 [PATCH] powerpc/fsl: Fix the flush of branch predictor Christophe Leroy
  2019-02-27  3:37 ` Daniel Axtens
  2019-02-27  6:47 ` Diana Madalina Craciun
@ 2019-02-28  9:21 ` Michael Ellerman
  2 siblings, 0 replies; 4+ messages in thread
From: Michael Ellerman @ 2019-02-28  9:21 UTC (permalink / raw)
  To: Christophe Leroy, Benjamin Herrenschmidt, Paul Mackerras, Diana Craciun
  Cc: linuxppc-dev, linux-kernel

On Tue, 2019-02-26 at 18:18:48 UTC, Christophe Leroy wrote:
> The commit identified below adds MC_BTB_FLUSH macro only when
> CONFIG_PPC_FSL_BOOK3E is defined. This results in the following error
> on some configs (seen several times with kisskb randconfig_defconfig)
> 
> arch/powerpc/kernel/exceptions-64e.S:576: Error: Unrecognized opcode: `mc_btb_flush'
> make[3]: *** [scripts/Makefile.build:367: arch/powerpc/kernel/exceptions-64e.o] Error 1
> make[2]: *** [scripts/Makefile.build:492: arch/powerpc/kernel] Error 2
> make[1]: *** [Makefile:1043: arch/powerpc] Error 2
> make: *** [Makefile:152: sub-make] Error 2
> 
> This patch adds a blank definition of MC_BTB_FLUSH for other cases.
> 
> Fixes: 10c5e83afd4a ("powerpc/fsl: Flush the branch predictor at each kernel entry (64bit)")
> Cc: Diana Craciun <diana.craciun@nxp.com>
> Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr>
> Reviewed-by: Daniel Axtens <dja@axtens.net>
> Reviewed-by: Diana Craciun <diana.craciun@nxp.com>

Applied to powerpc next, thanks.

https://git.kernel.org/powerpc/c/27da80719ef132cf8c80eb406d5aeb37

cheers

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

end of thread, other threads:[~2019-02-28  9:21 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-02-26 18:18 [PATCH] powerpc/fsl: Fix the flush of branch predictor Christophe Leroy
2019-02-27  3:37 ` Daniel Axtens
2019-02-27  6:47 ` Diana Madalina Craciun
2019-02-28  9:21 ` Michael Ellerman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).