Skip to contentSkip to conversation

Fix doorbell type shift

PATCH In review Michael Neuling 2 participants 2 messages Jun 6, 2011 – Jun 7, 2011 PowerPC

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Fix doorbell type shift

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.

---
 arch/powerpc/include/asm/dbell.h |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/powerpc/include/asm/dbell.h +1 -1
Index: 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 */
Acked-by on v1 1/1
#1 lore raw
Quoted 9 lines · Michael Neuling

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.

---
arch/powerpc/include/asm/dbell.h | 2 +-

1 file changed, 1 insertion(+), 1 deletion(-)
Quoted 14 lines

Index: linux-ozlabs/arch/powerpc/include/asm/dbell.h
===================================================================

arch/powerpc/include/asm/dbell.h +1 -1
@@ -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 */