@@ -19,6 +19,7 @@
#define ASI_MAP_CPU_PTR 0x02 /* for get_cpu_var()/this_cpu_ptr() */
#define ASI_MAP_CURRENT_TASK 0x04 /* map the current task */
#define ASI_MAP_RCU_DATA 0x08 /* map rcu data */
+#define ASI_MAP_CPU_HW_EVENTS 0x10 /* map cpu hw events */
enum page_table_level {
PGT_LEVEL_PTE,
@@ -8,6 +8,7 @@
#include <linux/export.h>
#include <linux/gfp.h>
#include <linux/irq_work.h>
+#include <linux/kernel.h>
#include <linux/mm.h>
#include <linux/printk.h>
#include <linux/sched/debug.h>
@@ -17,6 +18,7 @@
#include <asm/bug.h>
#include <asm/mmu_context.h>
+#include "../events/perf_event.h"
#include "../../../kernel/rcu/tree.h"
/* ASI sessions, one per cpu */
@@ -33,6 +35,7 @@ struct asi_map_option asi_map_percpu_options[] = {
{ ASI_MAP_CPU_PTR, &this_cpu_off, sizeof(this_cpu_off) },
{ ASI_MAP_CURRENT_TASK, ¤t_task, sizeof(current_task) },
{ ASI_MAP_RCU_DATA, &rcu_data, sizeof(rcu_data) },
+ { ASI_MAP_CPU_HW_EVENTS, &cpu_hw_events, sizeof(cpu_hw_events) },
};
static void asi_log_fault(struct asi *asi, struct pt_regs *regs,
Add option to map cpu_hw_events in ASI pagetable. Also restructure to select ptions for percpu optional mapping. Signed-off-by: Alexandre Chartre <alexandre.chartre@oracle.com> --- arch/x86/include/asm/asi.h | 1 + arch/x86/mm/asi.c | 3 +++ 2 files changed, 4 insertions(+), 0 deletions(-)