aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/platforms/powernv
diff options
context:
space:
mode:
authorMichael Neuling <mikey@neuling.org>2014-06-11 01:59:28 -0400
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>2014-06-11 03:05:12 -0400
commitd4e58e5928f8c6c49228451dd03e0714cbab299a (patch)
tree34add9a16b4dbe03da04191f51588f3f6a6bdbf9 /arch/powerpc/platforms/powernv
parent9b6a68d94333cf19d4ec0f2aaf9f9eb68866630e (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/platforms/powernv')
-rw-r--r--arch/powerpc/platforms/powernv/Kconfig1
-rw-r--r--arch/powerpc/platforms/powernv/smp.c6
2 files changed, 7 insertions, 0 deletions
diff --git a/arch/powerpc/platforms/powernv/Kconfig b/arch/powerpc/platforms/powernv/Kconfig
index c252ee95bddf..45a8ed0585cd 100644
--- a/arch/powerpc/platforms/powernv/Kconfig
+++ b/arch/powerpc/platforms/powernv/Kconfig
@@ -17,6 +17,7 @@ config PPC_POWERNV
17 select CPU_FREQ_GOV_USERSPACE 17 select CPU_FREQ_GOV_USERSPACE
18 select CPU_FREQ_GOV_ONDEMAND 18 select CPU_FREQ_GOV_ONDEMAND
19 select CPU_FREQ_GOV_CONSERVATIVE 19 select CPU_FREQ_GOV_CONSERVATIVE
20 select PPC_DOORBELL
20 default y 21 default y
21 22
22config PPC_POWERNV_RTAS 23config PPC_POWERNV_RTAS
diff --git a/arch/powerpc/platforms/powernv/smp.c b/arch/powerpc/platforms/powernv/smp.c
index 0062a43a2e0d..5fcfcf44e3a9 100644
--- a/arch/powerpc/platforms/powernv/smp.c
+++ b/arch/powerpc/platforms/powernv/smp.c
@@ -32,6 +32,7 @@
32#include <asm/opal.h> 32#include <asm/opal.h>
33#include <asm/runlatch.h> 33#include <asm/runlatch.h>
34#include <asm/code-patching.h> 34#include <asm/code-patching.h>
35#include <asm/dbell.h>
35 36
36#include "powernv.h" 37#include "powernv.h"
37 38
@@ -46,6 +47,11 @@ static void pnv_smp_setup_cpu(int cpu)
46{ 47{
47 if (cpu != boot_cpuid) 48 if (cpu != boot_cpuid)
48 xics_setup_cpu(); 49 xics_setup_cpu();
50
51#ifdef CONFIG_PPC_DOORBELL
52 if (cpu_has_feature(CPU_FTR_DBELL))
53 doorbell_setup_this_cpu();
54#endif
49} 55}
50 56
51int pnv_smp_kick_cpu(int nr) 57int pnv_smp_kick_cpu(int nr)