diff options
author | Michael Neuling <mikey@neuling.org> | 2014-06-11 01:59:28 -0400 |
---|---|---|
committer | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2014-06-11 03:05:12 -0400 |
commit | d4e58e5928f8c6c49228451dd03e0714cbab299a (patch) | |
tree | 34add9a16b4dbe03da04191f51588f3f6a6bdbf9 /arch/powerpc/sysdev | |
parent | 9b6a68d94333cf19d4ec0f2aaf9f9eb68866630e (diff) |
powerpc/powernv: Enable POWER8 doorbell IPIs
This patch enables POWER8 doorbell IPIs on powernv.
Since doorbells can only IPI within a core, we test to see when we can use
doorbells and if not we fall back to XICS. This also enables hypervisor
doorbells to wakeup us up from nap/sleep via the LPCR PECEDH bit.
Based on tests by Anton, the best case IPI latency between two threads dropped
from 894ns to 512ns.
Signed-off-by: Michael Neuling <mikey@neuling.org>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'arch/powerpc/sysdev')
-rw-r--r-- | arch/powerpc/sysdev/xics/icp-native.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/arch/powerpc/sysdev/xics/icp-native.c b/arch/powerpc/sysdev/xics/icp-native.c index 9dee47071af8..de8d9483bbe8 100644 --- a/arch/powerpc/sysdev/xics/icp-native.c +++ b/arch/powerpc/sysdev/xics/icp-native.c | |||
@@ -26,6 +26,7 @@ | |||
26 | #include <asm/errno.h> | 26 | #include <asm/errno.h> |
27 | #include <asm/xics.h> | 27 | #include <asm/xics.h> |
28 | #include <asm/kvm_ppc.h> | 28 | #include <asm/kvm_ppc.h> |
29 | #include <asm/dbell.h> | ||
29 | 30 | ||
30 | struct icp_ipl { | 31 | struct icp_ipl { |
31 | union { | 32 | union { |
@@ -145,7 +146,13 @@ static unsigned int icp_native_get_irq(void) | |||
145 | static void icp_native_cause_ipi(int cpu, unsigned long data) | 146 | static void icp_native_cause_ipi(int cpu, unsigned long data) |
146 | { | 147 | { |
147 | kvmppc_set_host_ipi(cpu, 1); | 148 | kvmppc_set_host_ipi(cpu, 1); |
148 | icp_native_set_qirr(cpu, IPI_PRIORITY); | 149 | #ifdef CONFIG_PPC_DOORBELL |
150 | if (cpu_has_feature(CPU_FTR_DBELL) && | ||
151 | (cpumask_test_cpu(cpu, cpu_sibling_mask(smp_processor_id())))) | ||
152 | doorbell_cause_ipi(cpu, data); | ||
153 | else | ||
154 | #endif | ||
155 | icp_native_set_qirr(cpu, IPI_PRIORITY); | ||
149 | } | 156 | } |
150 | 157 | ||
151 | void xics_wake_cpu(int cpu) | 158 | void xics_wake_cpu(int cpu) |