kernel-fxtec-pro1x/arch
Athira Rajeev bcaa460435 powerpc/perf: Fix soft lockups due to missed interrupt accounting
[ Upstream commit 17899eaf88d689529b866371344c8f269ba79b5f ]

Performance monitor interrupt handler checks if any counter has
overflown and calls record_and_restart() in core-book3s which invokes
perf_event_overflow() to record the sample information. Apart from
creating sample, perf_event_overflow() also does the interrupt and
period checks via perf_event_account_interrupt().

Currently we record information only if the SIAR (Sampled Instruction
Address Register) valid bit is set (using siar_valid() check) and
hence the interrupt check.

But it is possible that we do sampling for some events that are not
generating valid SIAR, and hence there is no chance to disable the
event if interrupts are more than max_samples_per_tick. This leads to
soft lockup.

Fix this by adding perf_event_account_interrupt() in the invalid SIAR
code path for a sampling event. ie if SIAR is invalid, just do
interrupt check and don't record the sample information.

Reported-by: Alexey Kardashevskiy <aik@ozlabs.ru>
Signed-off-by: Athira Rajeev <atrajeev@linux.vnet.ibm.com>
Tested-by: Alexey Kardashevskiy <aik@ozlabs.ru>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/1596717992-7321-1-git-send-email-atrajeev@linux.vnet.ibm.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
2020-09-03 11:24:26 +02:00
..
alpha alpha: fix annotation of io{read,write}{16,32}be() 2020-08-26 10:31:02 +02:00
arc ARC: elf: use right ELF_ARCH 2020-07-16 08:17:27 +02:00
arm ARM: dts: ls1021a: output PPS signal on FIPER2 2020-09-03 11:24:20 +02:00
arm64 KVM: arm64: Fix symbol dependency in __hyp_call_panic_nvhe 2020-09-03 11:24:22 +02:00
c6x kbuild: rename LDFLAGS to KBUILD_LDFLAGS 2018-08-24 08:22:08 +09:00
h8300 h8300: use cc-cross-prefix instead of hardcoding h8300-unknown-linux- 2019-04-05 22:32:55 +02:00
hexagon hexagon: define ioremap_uc 2020-05-10 10:30:11 +02:00
ia64 scsi: sr: remove references to BLK_DEV_SR_VENDOR, leave it enabled 2020-07-22 09:32:04 +02:00
m68k m68knommu: fix overwriting of bits in ColdFire V3 cache control 2020-08-26 10:31:01 +02:00
microblaze microblaze: Prevent the overflow of the start 2020-02-24 08:34:53 +01:00
mips mips/vdso: Fix resource leaks in genvdso.c 2020-09-03 11:24:21 +02:00
nds32 nds32: Fix the items of hwcap_str ordering issue. 2019-12-13 08:51:35 +01:00
nios2 nios2: ksyms: Add missing symbol exports 2020-01-27 14:50:30 +01:00
openrisc openrisc: Fix oops caused when dumping stack 2020-08-21 11:05:37 +02:00
parisc parisc: Implement __smp_store_release and __smp_load_acquire barriers 2020-08-19 08:15:07 +02:00
powerpc powerpc/perf: Fix soft lockups due to missed interrupt accounting 2020-09-03 11:24:26 +02:00
riscv RISC-V: Upgrade smp_mb__after_spinlock() to iorw,iorw 2020-07-29 10:16:54 +02:00
s390 s390/ptrace: fix storage key handling 2020-08-26 10:31:03 +02:00
sh sh: landisk: Add missing initialization of sh_io_port_base 2020-08-21 11:05:39 +02:00
sparc scsi: sr: remove references to BLK_DEV_SR_VENDOR, leave it enabled 2020-07-22 09:32:04 +02:00
um um: ubd: Prevent buffer overrun on command completion 2020-04-23 10:30:19 +02:00
unicore32
x86 KVM: Pass MMU notifier range flags to kvm_unmap_hva_range() 2020-08-26 10:31:07 +02:00
xtensa xtensa: fix xtensa_pmu_setup prototype 2020-08-21 11:05:31 +02:00
.gitignore
Kconfig jump_label: move 'asm goto' support test to Kconfig 2019-06-04 08:02:34 +02:00