All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] powerpc: Add POWER8 features to CPU_FTRS_POSSIBLE/ALWAYS
@ 2014-08-06  5:42 Michael Ellerman
  2014-08-06 23:21 ` Michael Neuling
  2014-08-07  1:59 ` Joel Stanley
  0 siblings, 2 replies; 3+ messages in thread
From: Michael Ellerman @ 2014-08-06  5:42 UTC (permalink / raw)
  To: linuxppc-dev; +Cc: Michael Neuling

We have been a bit slack about updating the CPU_FTRS_POSSIBLE and
CPU_FTRS_ALWAYS masks. When we added POWER8, and also POWER8E we forgot
to update the ALWAYS mask. And when we added POWER8_DD1 we forgot to
update both the POSSIBLE and ALWAYS masks.

Luckily this hasn't caused any actual bugs AFAICS. Failing to update the
ALWAYS mask just forgoes a potential optimisation opportunity. Failing
to update the POSSIBLE mask for POWER8_DD1 is also OK because it only
removes a bit rather than adding any.

Regardless they should all be in both masks so as to avoid any future
bugs when the set of ALWAYS/POSSIBLE bits changes, or the masks
themselves change.

Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
---
 arch/powerpc/include/asm/cputable.h | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/arch/powerpc/include/asm/cputable.h b/arch/powerpc/include/asm/cputable.h
index af5598688daf..d696eeb2def0 100644
--- a/arch/powerpc/include/asm/cputable.h
+++ b/arch/powerpc/include/asm/cputable.h
@@ -458,7 +458,8 @@ extern const char *powerpc_base_platform;
 #define CPU_FTRS_POSSIBLE	\
 	    (CPU_FTRS_POWER4 | CPU_FTRS_PPC970 | CPU_FTRS_POWER5 | \
 	     CPU_FTRS_POWER6 | CPU_FTRS_POWER7 | CPU_FTRS_POWER8E | \
-	     CPU_FTRS_POWER8 | CPU_FTRS_CELL | CPU_FTRS_PA6T | CPU_FTR_VSX)
+	     CPU_FTRS_POWER8 | CPU_FTRS_POWER8_DD1 | CPU_FTRS_CELL | \
+	     CPU_FTRS_PA6T | CPU_FTR_VSX)
 #endif
 #else
 enum {
@@ -508,7 +509,8 @@ enum {
 #define CPU_FTRS_ALWAYS		\
 	    (CPU_FTRS_POWER4 & CPU_FTRS_PPC970 & CPU_FTRS_POWER5 & \
 	     CPU_FTRS_POWER6 & CPU_FTRS_POWER7 & CPU_FTRS_CELL & \
-	     CPU_FTRS_PA6T & CPU_FTRS_POSSIBLE)
+	     CPU_FTRS_PA6T & CPU_FTRS_POWER8 & CPU_FTRS_POWER8E & \
+	     CPU_FTRS_POWER8_DD1 & CPU_FTRS_POSSIBLE)
 #endif
 #else
 enum {
-- 
1.9.1

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

* Re: [PATCH] powerpc: Add POWER8 features to CPU_FTRS_POSSIBLE/ALWAYS
  2014-08-06  5:42 [PATCH] powerpc: Add POWER8 features to CPU_FTRS_POSSIBLE/ALWAYS Michael Ellerman
@ 2014-08-06 23:21 ` Michael Neuling
  2014-08-07  1:59 ` Joel Stanley
  1 sibling, 0 replies; 3+ messages in thread
From: Michael Neuling @ 2014-08-06 23:21 UTC (permalink / raw)
  To: Michael Ellerman; +Cc: linuxppc-dev, Joel Stanley

On Wed, 2014-08-06 at 15:42 +1000, Michael Ellerman wrote:
> We have been a bit slack about updating the CPU_FTRS_POSSIBLE and
> CPU_FTRS_ALWAYS masks. When we added POWER8, and also POWER8E we forgot
> to update the ALWAYS mask. And when we added POWER8_DD1 we forgot to
> update both the POSSIBLE and ALWAYS masks.
>=20
> Luckily this hasn't caused any actual bugs AFAICS. Failing to update the
> ALWAYS mask just forgoes a potential optimisation opportunity. Failing
> to update the POSSIBLE mask for POWER8_DD1 is also OK because it only
> removes a bit rather than adding any.
>=20
> Regardless they should all be in both masks so as to avoid any future
> bugs when the set of ALWAYS/POSSIBLE bits changes, or the masks
> themselves change.
>=20
> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>

CCing Joel but FWIW

Acked-by: Michael Neuling <mikey@neuling.org>

> ---
>  arch/powerpc/include/asm/cputable.h | 6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)
>=20
> diff --git a/arch/powerpc/include/asm/cputable.h b/arch/powerpc/include/a=
sm/cputable.h
> index af5598688daf..d696eeb2def0 100644
> --- a/arch/powerpc/include/asm/cputable.h
> +++ b/arch/powerpc/include/asm/cputable.h
> @@ -458,7 +458,8 @@ extern const char *powerpc_base_platform;
>  #define CPU_FTRS_POSSIBLE	\
>  	    (CPU_FTRS_POWER4 | CPU_FTRS_PPC970 | CPU_FTRS_POWER5 | \
>  	     CPU_FTRS_POWER6 | CPU_FTRS_POWER7 | CPU_FTRS_POWER8E | \
> -	     CPU_FTRS_POWER8 | CPU_FTRS_CELL | CPU_FTRS_PA6T | CPU_FTR_VSX)
> +	     CPU_FTRS_POWER8 | CPU_FTRS_POWER8_DD1 | CPU_FTRS_CELL | \
> +	     CPU_FTRS_PA6T | CPU_FTR_VSX)
>  #endif
>  #else
>  enum {
> @@ -508,7 +509,8 @@ enum {
>  #define CPU_FTRS_ALWAYS		\
>  	    (CPU_FTRS_POWER4 & CPU_FTRS_PPC970 & CPU_FTRS_POWER5 & \
>  	     CPU_FTRS_POWER6 & CPU_FTRS_POWER7 & CPU_FTRS_CELL & \
> -	     CPU_FTRS_PA6T & CPU_FTRS_POSSIBLE)
> +	     CPU_FTRS_PA6T & CPU_FTRS_POWER8 & CPU_FTRS_POWER8E & \
> +	     CPU_FTRS_POWER8_DD1 & CPU_FTRS_POSSIBLE)
>  #endif
>  #else
>  enum {

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

* Re: [PATCH] powerpc: Add POWER8 features to CPU_FTRS_POSSIBLE/ALWAYS
  2014-08-06  5:42 [PATCH] powerpc: Add POWER8 features to CPU_FTRS_POSSIBLE/ALWAYS Michael Ellerman
  2014-08-06 23:21 ` Michael Neuling
@ 2014-08-07  1:59 ` Joel Stanley
  1 sibling, 0 replies; 3+ messages in thread
From: Joel Stanley @ 2014-08-07  1:59 UTC (permalink / raw)
  To: Michael Ellerman; +Cc: linuxppc-dev, Michael Neuling

On Wed, Aug 6, 2014 at 3:12 PM, Michael Ellerman <mpe@ellerman.id.au> wrote:
> We have been a bit slack about updating the CPU_FTRS_POSSIBLE and
> CPU_FTRS_ALWAYS masks. When we added POWER8, and also POWER8E we forgot
> to update the ALWAYS mask. And when we added POWER8_DD1 we forgot to
> update both the POSSIBLE and ALWAYS masks.
>
> Luckily this hasn't caused any actual bugs AFAICS. Failing to update the
> ALWAYS mask just forgoes a potential optimisation opportunity. Failing
> to update the POSSIBLE mask for POWER8_DD1 is also OK because it only
> removes a bit rather than adding any.
>
> Regardless they should all be in both masks so as to avoid any future
> bugs when the set of ALWAYS/POSSIBLE bits changes, or the masks
> themselves change.
>
> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>

Thanks for catching that.

Acked-by: Joel Stanley <joel@jms.id.au>

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

end of thread, other threads:[~2014-08-07  1:59 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-08-06  5:42 [PATCH] powerpc: Add POWER8 features to CPU_FTRS_POSSIBLE/ALWAYS Michael Ellerman
2014-08-06 23:21 ` Michael Neuling
2014-08-07  1:59 ` Joel Stanley

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.