hc
2024-05-10 37f49e37ab4cb5d0bc4c60eb5c6d4dd57db767bb
kernel/arch/powerpc/include/asm/lppaca.h
....@@ -45,6 +45,7 @@
4545 #include <asm/types.h>
4646 #include <asm/mmu.h>
4747 #include <asm/firmware.h>
48
+#include <asm/paca.h>
4849
4950 /*
5051 * The lppaca is the "virtual processor area" registered with the hypervisor,
....@@ -123,13 +124,23 @@
123124 */
124125 #define LPPACA_OLD_SHARED_PROC 2
125126
126
-static inline bool lppaca_shared_proc(struct lppaca *l)
127
+#ifdef CONFIG_PPC_PSERIES
128
+/*
129
+ * All CPUs should have the same shared proc value, so directly access the PACA
130
+ * to avoid false positives from DEBUG_PREEMPT.
131
+ */
132
+static inline bool lppaca_shared_proc(void)
127133 {
134
+ struct lppaca *l = local_paca->lppaca_ptr;
135
+
128136 if (!firmware_has_feature(FW_FEATURE_SPLPAR))
129137 return false;
130138 return !!(l->__old_status & LPPACA_OLD_SHARED_PROC);
131139 }
132140
141
+#define get_lppaca() (get_paca()->lppaca_ptr)
142
+#endif
143
+
133144 /*
134145 * SLB shadow buffer structure as defined in the PAPR. The save_area
135146 * contains adjacent ESID and VSID pairs for each shadowed SLB. The