summaryrefslogtreecommitdiffstats
path: root/arch/powerpc/include/asm/dbell.h
diff options
context:
space:
mode:
authorIan Munsie <imunsie@au1.ibm.com>2012-11-14 18:49:44 +0000
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>2013-01-10 15:09:05 +1100
commit42d02b81f265b77be39262666c888d50cb488fc5 (patch)
tree057869a84883845ac91f536a683a0b9e9829e45c /arch/powerpc/include/asm/dbell.h
parent41c7b401b9c131a53823673a788d73e340ce4d2a (diff)
downloadop-kernel-dev-42d02b81f265b77be39262666c888d50cb488fc5.zip
op-kernel-dev-42d02b81f265b77be39262666c888d50cb488fc5.tar.gz
powerpc: Define differences between doorbells on book3e and book3s
There are a few key differences between doorbells on server compared with embedded that we care about on Linux, namely: - We have a new msgsndp instruction for directed privileged doorbells. msgsnd is used for directed hypervisor doorbells. - The tag we use in the instruction is the Thread Identification Register of the recipient thread (since server doorbells can only occur between threads within a single core), and is only 7 bits wide. - A new message type is introduced for server doorbells (none of the existing book3e message types are currently supported on book3s). Signed-off-by: Ian Munsie <imunsie@au1.ibm.com> Tested-by: Michael Neuling <mikey@neuling.org> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'arch/powerpc/include/asm/dbell.h')
-rw-r--r--arch/powerpc/include/asm/dbell.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/arch/powerpc/include/asm/dbell.h b/arch/powerpc/include/asm/dbell.h
index 607e4ee..3b33856 100644
--- a/arch/powerpc/include/asm/dbell.h
+++ b/arch/powerpc/include/asm/dbell.h
@@ -28,8 +28,23 @@ enum ppc_dbell {
PPC_G_DBELL = 2, /* guest doorbell */
PPC_G_DBELL_CRIT = 3, /* guest critical doorbell */
PPC_G_DBELL_MC = 4, /* guest mcheck doorbell */
+ PPC_DBELL_SERVER = 5, /* doorbell on server */
};
+#ifdef CONFIG_PPC_BOOK3S
+
+#define PPC_DBELL_MSGTYPE PPC_DBELL_SERVER
+#define SPRN_DOORBELL_CPUTAG SPRN_TIR
+#define PPC_DBELL_TAG_MASK 0x7f
+
+#else /* CONFIG_PPC_BOOK3S */
+
+#define PPC_DBELL_MSGTYPE PPC_DBELL
+#define SPRN_DOORBELL_CPUTAG SPRN_PIR
+#define PPC_DBELL_TAG_MASK 0x3fff
+
+#endif /* CONFIG_PPC_BOOK3S */
+
extern void doorbell_cause_ipi(int cpu, unsigned long data);
extern void doorbell_exception(struct pt_regs *regs);
extern void doorbell_setup_this_cpu(void);
OpenPOWER on IntegriCloud