18c2ecf20Sopenharmony_ci#ifndef _ASM_INTEL_DS_H 28c2ecf20Sopenharmony_ci#define _ASM_INTEL_DS_H 38c2ecf20Sopenharmony_ci 48c2ecf20Sopenharmony_ci#include <linux/percpu-defs.h> 58c2ecf20Sopenharmony_ci 68c2ecf20Sopenharmony_ci#define BTS_BUFFER_SIZE (PAGE_SIZE << 4) 78c2ecf20Sopenharmony_ci#define PEBS_BUFFER_SIZE (PAGE_SIZE << 4) 88c2ecf20Sopenharmony_ci 98c2ecf20Sopenharmony_ci/* The maximal number of PEBS events: */ 108c2ecf20Sopenharmony_ci#define MAX_PEBS_EVENTS 8 118c2ecf20Sopenharmony_ci#define MAX_FIXED_PEBS_EVENTS 4 128c2ecf20Sopenharmony_ci 138c2ecf20Sopenharmony_ci/* 148c2ecf20Sopenharmony_ci * A debug store configuration. 158c2ecf20Sopenharmony_ci * 168c2ecf20Sopenharmony_ci * We only support architectures that use 64bit fields. 178c2ecf20Sopenharmony_ci */ 188c2ecf20Sopenharmony_cistruct debug_store { 198c2ecf20Sopenharmony_ci u64 bts_buffer_base; 208c2ecf20Sopenharmony_ci u64 bts_index; 218c2ecf20Sopenharmony_ci u64 bts_absolute_maximum; 228c2ecf20Sopenharmony_ci u64 bts_interrupt_threshold; 238c2ecf20Sopenharmony_ci u64 pebs_buffer_base; 248c2ecf20Sopenharmony_ci u64 pebs_index; 258c2ecf20Sopenharmony_ci u64 pebs_absolute_maximum; 268c2ecf20Sopenharmony_ci u64 pebs_interrupt_threshold; 278c2ecf20Sopenharmony_ci u64 pebs_event_reset[MAX_PEBS_EVENTS + MAX_FIXED_PEBS_EVENTS]; 288c2ecf20Sopenharmony_ci} __aligned(PAGE_SIZE); 298c2ecf20Sopenharmony_ci 308c2ecf20Sopenharmony_ciDECLARE_PER_CPU_PAGE_ALIGNED(struct debug_store, cpu_debug_store); 318c2ecf20Sopenharmony_ci 328c2ecf20Sopenharmony_cistruct debug_store_buffers { 338c2ecf20Sopenharmony_ci char bts_buffer[BTS_BUFFER_SIZE]; 348c2ecf20Sopenharmony_ci char pebs_buffer[PEBS_BUFFER_SIZE]; 358c2ecf20Sopenharmony_ci}; 368c2ecf20Sopenharmony_ci 378c2ecf20Sopenharmony_ci#endif 38