diff options
author | Michael Ellerman <michael@ellerman.id.au> | 2013-08-15 01:22:15 -0400 |
---|---|---|
committer | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2013-08-27 00:44:28 -0400 |
commit | b89bdfb8deb0cac5141f54806e406e5888175c80 (patch) | |
tree | cdd1cb4874fb8661e44c8479a1fc591fe1fa6e63 /arch/powerpc | |
parent | 380a0b3535b09ea6fe580f9cb6f28ca168f14abc (diff) |
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>
Diffstat (limited to 'arch/powerpc')
-rw-r--r-- | arch/powerpc/platforms/pseries/lpar.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/arch/powerpc/platforms/pseries/lpar.c b/arch/powerpc/platforms/pseries/lpar.c index 6d5e932b615a..356bc75ca74f 100644 --- a/arch/powerpc/platforms/pseries/lpar.c +++ b/arch/powerpc/platforms/pseries/lpar.c | |||
@@ -68,6 +68,12 @@ void vpa_init(int cpu) | |||
68 | struct paca_struct *pp; | 68 | struct paca_struct *pp; |
69 | struct dtl_entry *dtl; | 69 | struct dtl_entry *dtl; |
70 | 70 | ||
71 | /* | ||
72 | * The spec says it "may be problematic" if CPU x registers the VPA of | ||
73 | * CPU y. We should never do that, but wail if we ever do. | ||
74 | */ | ||
75 | WARN_ON(cpu != smp_processor_id()); | ||
76 | |||
71 | if (cpu_has_feature(CPU_FTR_ALTIVEC)) | 77 | if (cpu_has_feature(CPU_FTR_ALTIVEC)) |
72 | lppaca_of(cpu).vmxregs_in_use = 1; | 78 | lppaca_of(cpu).vmxregs_in_use = 1; |
73 | 79 | ||