@@ -5398,6 +5398,9 @@ static void perf_sample_regs_user(struct perf_regs *regs_user,
regs_user->abi = PERF_SAMPLE_REGS_ABI_NONE;
regs_user->regs = NULL;
}
+
+ /* Init arch_regs_mask to zero */
+ regs_user->arch_regs_mask = 0;
}
static void perf_sample_regs_intr(struct perf_regs *regs_intr,
@@ -5405,6 +5408,8 @@ static void perf_sample_regs_intr(struct perf_regs *regs_intr,
{
regs_intr->regs = regs;
regs_intr->abi = perf_reg_abi(current);
+ regs_intr->arch_regs_mask = perf_get_arch_regs_mask();
+ regs_intr->arch_regs = perf_get_arch_reg();
}
Extend perf_sample_regs_intr() to support the updates needed for perf_arch_reg structure and perf_arch_regs_mask. Also add code to init the arch_regs_mask to zero incase of regs_user in perf_sample_regs_user(). Ideally this should be done in perf_sample_data_init, but due to commit 2565711fb7d7 ("perf: Improve the perf_sample_data struct layout") moving it to this function. Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Ingo Molnar <mingo@kernel.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Arnaldo Carvalho de Melo <acme@kernel.org> Cc: Stephane Eranian <eranian@gmail.com> Cc: Russell King <linux@arm.linux.org.uk> Cc: Catalin Marinas <catalin.marinas@arm.com> Cc: Will Deacon <will.deacon@arm.com> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Cc: Michael Ellerman <mpe@ellerman.id.au> Cc: Sukadev Bhattiprolu <sukadev@linux.vnet.ibm.com> Signed-off-by: Madhavan Srinivasan <maddy@linux.vnet.ibm.com> --- kernel/events/core.c | 5 +++++ 1 file changed, 5 insertions(+)