diff options
Diffstat (limited to 'arch/powerpc/include/asm/lppaca.h')
-rw-r--r-- | arch/powerpc/include/asm/lppaca.h | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/arch/powerpc/include/asm/lppaca.h b/arch/powerpc/include/asm/lppaca.h index 14b592dfb4e..7f5e0fefebb 100644 --- a/arch/powerpc/include/asm/lppaca.h +++ b/arch/powerpc/include/asm/lppaca.h | |||
@@ -153,6 +153,8 @@ struct lppaca { | |||
153 | 153 | ||
154 | extern struct lppaca lppaca[]; | 154 | extern struct lppaca lppaca[]; |
155 | 155 | ||
156 | #define lppaca_of(cpu) (*paca[cpu].lppaca_ptr) | ||
157 | |||
156 | /* | 158 | /* |
157 | * SLB shadow buffer structure as defined in the PAPR. The save_area | 159 | * SLB shadow buffer structure as defined in the PAPR. The save_area |
158 | * contains adjacent ESID and VSID pairs for each shadowed SLB. The | 160 | * contains adjacent ESID and VSID pairs for each shadowed SLB. The |
@@ -170,6 +172,33 @@ struct slb_shadow { | |||
170 | 172 | ||
171 | extern struct slb_shadow slb_shadow[]; | 173 | extern struct slb_shadow slb_shadow[]; |
172 | 174 | ||
175 | /* | ||
176 | * Layout of entries in the hypervisor's dispatch trace log buffer. | ||
177 | */ | ||
178 | struct dtl_entry { | ||
179 | u8 dispatch_reason; | ||
180 | u8 preempt_reason; | ||
181 | u16 processor_id; | ||
182 | u32 enqueue_to_dispatch_time; | ||
183 | u32 ready_to_enqueue_time; | ||
184 | u32 waiting_to_ready_time; | ||
185 | u64 timebase; | ||
186 | u64 fault_addr; | ||
187 | u64 srr0; | ||
188 | u64 srr1; | ||
189 | }; | ||
190 | |||
191 | #define DISPATCH_LOG_BYTES 4096 /* bytes per cpu */ | ||
192 | #define N_DISPATCH_LOG (DISPATCH_LOG_BYTES / sizeof(struct dtl_entry)) | ||
193 | |||
194 | /* | ||
195 | * When CONFIG_VIRT_CPU_ACCOUNTING = y, the cpu accounting code controls | ||
196 | * reading from the dispatch trace log. If other code wants to consume | ||
197 | * DTL entries, it can set this pointer to a function that will get | ||
198 | * called once for each DTL entry that gets processed. | ||
199 | */ | ||
200 | extern void (*dtl_consumer)(struct dtl_entry *entry, u64 index); | ||
201 | |||
173 | #endif /* CONFIG_PPC_BOOK3S */ | 202 | #endif /* CONFIG_PPC_BOOK3S */ |
174 | #endif /* __KERNEL__ */ | 203 | #endif /* __KERNEL__ */ |
175 | #endif /* _ASM_POWERPC_LPPACA_H */ | 204 | #endif /* _ASM_POWERPC_LPPACA_H */ |