.. | .. |
---|
45 | 45 | #include <asm/types.h> |
---|
46 | 46 | #include <asm/mmu.h> |
---|
47 | 47 | #include <asm/firmware.h> |
---|
| 48 | +#include <asm/paca.h> |
---|
48 | 49 | |
---|
49 | 50 | /* |
---|
50 | 51 | * The lppaca is the "virtual processor area" registered with the hypervisor, |
---|
.. | .. |
---|
123 | 124 | */ |
---|
124 | 125 | #define LPPACA_OLD_SHARED_PROC 2 |
---|
125 | 126 | |
---|
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) |
---|
127 | 133 | { |
---|
| 134 | + struct lppaca *l = local_paca->lppaca_ptr; |
---|
| 135 | + |
---|
128 | 136 | if (!firmware_has_feature(FW_FEATURE_SPLPAR)) |
---|
129 | 137 | return false; |
---|
130 | 138 | return !!(l->__old_status & LPPACA_OLD_SHARED_PROC); |
---|
131 | 139 | } |
---|
132 | 140 | |
---|
| 141 | +#define get_lppaca() (get_paca()->lppaca_ptr) |
---|
| 142 | +#endif |
---|
| 143 | + |
---|
133 | 144 | /* |
---|
134 | 145 | * SLB shadow buffer structure as defined in the PAPR. The save_area |
---|
135 | 146 | * contains adjacent ESID and VSID pairs for each shadowed SLB. The |
---|