Skip to content

Commit 912b9fd

Browse files
committed
parisc: Report software alignment faults via perf
Signed-off-by: Helge Deller <deller@gmx.de>
1 parent 6fb2e09 commit 912b9fd

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

arch/parisc/kernel/unaligned.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
#include <linux/uaccess.h>
1414
#include <linux/sysctl.h>
1515
#include <linux/unaligned.h>
16+
#include <linux/perf_event.h>
1617
#include <asm/hardirq.h>
1718
#include <asm/traps.h>
1819
#include "unaligned.h"
@@ -378,6 +379,7 @@ void handle_unaligned(struct pt_regs *regs)
378379
int ret = ERR_NOTHANDLED;
379380

380381
__inc_irq_stat(irq_unaligned_count);
382+
perf_sw_event(PERF_COUNT_SW_ALIGNMENT_FAULTS, 1, regs, regs->ior);
381383

382384
/* log a message with pacing */
383385
if (user_mode(regs)) {

0 commit comments

Comments
 (0)