summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Ellerman <michael@ellerman.id.au>2013-08-15 15:22:15 +1000
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>2013-08-27 14:44:28 +1000
commitb89bdfb8deb0cac5141f54806e406e5888175c80 (patch)
treecdd1cb4874fb8661e44c8479a1fc591fe1fa6e63
parent380a0b3535b09ea6fe580f9cb6f28ca168f14abc (diff)
downloadop-kernel-dev-b89bdfb8deb0cac5141f54806e406e5888175c80.zip
op-kernel-dev-b89bdfb8deb0cac5141f54806e406e5888175c80.tar.gz
powerpc/pseries: Add a warning in the case of cross-cpu VPA registration
The spec says it "may be problematic" if CPU x registers the VPA of CPU y. Add a warning in case we ever do that. Signed-off-by: Michael Ellerman <michael@ellerman.id.au> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
-rw-r--r--arch/powerpc/platforms/pseries/lpar.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/arch/powerpc/platforms/pseries/lpar.c b/arch/powerpc/platforms/pseries/lpar.c
index 6d5e932..356bc75 100644
--- a/arch/powerpc/platforms/pseries/lpar.c
+++ b/arch/powerpc/platforms/pseries/lpar.c
@@ -68,6 +68,12 @@ void vpa_init(int cpu)
struct paca_struct *pp;
struct dtl_entry *dtl;
+ /*
+ * The spec says it "may be problematic" if CPU x registers the VPA of
+ * CPU y. We should never do that, but wail if we ever do.
+ */
+ WARN_ON(cpu != smp_processor_id());
+
if (cpu_has_feature(CPU_FTR_ALTIVEC))
lppaca_of(cpu).vmxregs_in_use = 1;
OpenPOWER on IntegriCloud