linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Fix doorbell type shift
@ 2011-06-06  2:48 Michael Neuling
  2011-06-07 12:59 ` Kumar Gala
  0 siblings, 1 reply; 2+ messages in thread
From: Michael Neuling @ 2011-06-06  2:48 UTC (permalink / raw)
  To: Benjamin Herrenschmidt, Kumar Gala; +Cc: linuxppc-dev, Milton Miller

doorbell type is defined as bits 32:36 so should be shifted by 63-36 =
27 rather than 28.

We never noticed this bug as we've only every used type PPC_DBELL = 0.

Signed-off-by: Michael Neuling <mikey@neuling.org>
---
 arch/powerpc/include/asm/dbell.h |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Index: linux-ozlabs/arch/powerpc/include/asm/dbell.h
===================================================================
--- linux-ozlabs.orig/arch/powerpc/include/asm/dbell.h
+++ linux-ozlabs/arch/powerpc/include/asm/dbell.h
@@ -18,7 +18,7 @@
 #include <asm/ppc-opcode.h>
 
 #define PPC_DBELL_MSG_BRDCAST	(0x04000000)
-#define PPC_DBELL_TYPE(x)	(((x) & 0xf) << 28)
+#define PPC_DBELL_TYPE(x)	(((x) & 0xf) << (63-36))
 enum ppc_dbell {
 	PPC_DBELL = 0,		/* doorbell */
 	PPC_DBELL_CRIT = 1,	/* critical doorbell */

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

* Re: [PATCH] Fix doorbell type shift
  2011-06-06  2:48 [PATCH] Fix doorbell type shift Michael Neuling
@ 2011-06-07 12:59 ` Kumar Gala
  0 siblings, 0 replies; 2+ messages in thread
From: Kumar Gala @ 2011-06-07 12:59 UTC (permalink / raw)
  To: Michael Neuling; +Cc: Milton Miller, linuxppc-dev


On Jun 5, 2011, at 9:48 PM, Michael Neuling wrote:

> doorbell type is defined as bits 32:36 so should be shifted by 63-36 =
> 27 rather than 28.
> 
> We never noticed this bug as we've only every used type PPC_DBELL = 0.
> 
> Signed-off-by: Michael Neuling <mikey@neuling.org>
> ---
> arch/powerpc/include/asm/dbell.h |    2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)

Acked-by: Kumar Gala <galak@kernel.crashing.org>

> 
> Index: linux-ozlabs/arch/powerpc/include/asm/dbell.h
> ===================================================================
> --- linux-ozlabs.orig/arch/powerpc/include/asm/dbell.h
> +++ linux-ozlabs/arch/powerpc/include/asm/dbell.h
> @@ -18,7 +18,7 @@
> #include <asm/ppc-opcode.h>
> 
> #define PPC_DBELL_MSG_BRDCAST	(0x04000000)
> -#define PPC_DBELL_TYPE(x)	(((x) & 0xf) << 28)
> +#define PPC_DBELL_TYPE(x)	(((x) & 0xf) << (63-36))
> enum ppc_dbell {
> 	PPC_DBELL = 0,		/* doorbell */
> 	PPC_DBELL_CRIT = 1,	/* critical doorbell */

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

end of thread, other threads:[~2011-06-07 13:59 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-06-06  2:48 [PATCH] Fix doorbell type shift Michael Neuling
2011-06-07 12:59 ` Kumar Gala

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