linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] powerpc/85xx: Make sure lwarx hint isn't set on ppc32
@ 2010-03-11  5:39 Kumar Gala
  2010-03-13 22:49 ` Anton Blanchard
  0 siblings, 1 reply; 2+ messages in thread
From: Kumar Gala @ 2010-03-11  5:39 UTC (permalink / raw)
  To: linuxppc-dev

e500v1/v2 based chips will treat any reserved field being set in an
opcode as illegal.  Thus always setting the hint in the opcode is
a bad idea.

Anton should be kept away from the powerpc opcode map.

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
---
 arch/powerpc/include/asm/ppc-opcode.h |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/arch/powerpc/include/asm/ppc-opcode.h b/arch/powerpc/include/asm/ppc-opcode.h
index aea7147..d553bbe 100644
--- a/arch/powerpc/include/asm/ppc-opcode.h
+++ b/arch/powerpc/include/asm/ppc-opcode.h
@@ -25,7 +25,7 @@
 #define PPC_INST_LDARX			0x7c0000a8
 #define PPC_INST_LSWI			0x7c0004aa
 #define PPC_INST_LSWX			0x7c00042a
-#define PPC_INST_LWARX			0x7c000029
+#define PPC_INST_LWARX			0x7c000028
 #define PPC_INST_LWSYNC			0x7c2004ac
 #define PPC_INST_LXVD2X			0x7c000698
 #define PPC_INST_MCRXR			0x7c000400
@@ -62,8 +62,8 @@
 #define __PPC_T_TLB(t)	(((t) & 0x3) << 21)
 #define __PPC_WC(w)	(((w) & 0x3) << 21)
 /*
- * Only use the larx hint bit on 64bit CPUs. Once we verify it doesn't have
- * any side effects on all 32bit processors, we can do this all the time.
+ * Only use the larx hint bit on 64bit CPUs. e500v1/v2 based CPUs will treat a
+ * larx with EH set as an illegal instruction.
  */
 #ifdef CONFIG_PPC64
 #define __PPC_EH(eh)	(((eh) & 0x1) << 0)
-- 
1.6.0.6

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

* Re: [PATCH] powerpc/85xx: Make sure lwarx hint isn't set on ppc32
  2010-03-11  5:39 [PATCH] powerpc/85xx: Make sure lwarx hint isn't set on ppc32 Kumar Gala
@ 2010-03-13 22:49 ` Anton Blanchard
  0 siblings, 0 replies; 2+ messages in thread
From: Anton Blanchard @ 2010-03-13 22:49 UTC (permalink / raw)
  To: Kumar Gala; +Cc: linuxppc-dev


Hi,

> e500v1/v2 based chips will treat any reserved field being set in an
> opcode as illegal.  Thus always setting the hint in the opcode is
> a bad idea.
> 
> Anton should be kept away from the powerpc opcode map.

Nasty bug! I promise never to touch the opcode map again :)

Acked-by: Anton Blanchard <anton@samba.org>

Anton

> Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
> ---
>  arch/powerpc/include/asm/ppc-opcode.h |    6 +++---
>  1 files changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/arch/powerpc/include/asm/ppc-opcode.h b/arch/powerpc/include/asm/ppc-opcode.h
> index aea7147..d553bbe 100644
> --- a/arch/powerpc/include/asm/ppc-opcode.h
> +++ b/arch/powerpc/include/asm/ppc-opcode.h
> @@ -25,7 +25,7 @@
>  #define PPC_INST_LDARX			0x7c0000a8
>  #define PPC_INST_LSWI			0x7c0004aa
>  #define PPC_INST_LSWX			0x7c00042a
> -#define PPC_INST_LWARX			0x7c000029
> +#define PPC_INST_LWARX			0x7c000028
>  #define PPC_INST_LWSYNC			0x7c2004ac
>  #define PPC_INST_LXVD2X			0x7c000698
>  #define PPC_INST_MCRXR			0x7c000400
> @@ -62,8 +62,8 @@
>  #define __PPC_T_TLB(t)	(((t) & 0x3) << 21)
>  #define __PPC_WC(w)	(((w) & 0x3) << 21)
>  /*
> - * Only use the larx hint bit on 64bit CPUs. Once we verify it doesn't have
> - * any side effects on all 32bit processors, we can do this all the time.
> + * Only use the larx hint bit on 64bit CPUs. e500v1/v2 based CPUs will treat a
> + * larx with EH set as an illegal instruction.
>   */
>  #ifdef CONFIG_PPC64
>  #define __PPC_EH(eh)	(((eh) & 0x1) << 0)
> -- 
> 1.6.0.6
> 
> _______________________________________________
> Linuxppc-dev mailing list
> Linuxppc-dev@lists.ozlabs.org
> https://lists.ozlabs.org/listinfo/linuxppc-dev

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

end of thread, other threads:[~2010-03-13 22:49 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-03-11  5:39 [PATCH] powerpc/85xx: Make sure lwarx hint isn't set on ppc32 Kumar Gala
2010-03-13 22:49 ` Anton Blanchard

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