[PATCH v2 0/3] MIPS: SiByte: Add HW PMU support
From: Florian Fainelli
Date: Fri Nov 13 2026 - 18:34:31 EST
This patch series resurrects the SiByte HW PMU support which used to be
supported with oprofile but was later removed.
Changes in v2:
• Preserve usercopy fault state during callchain unwinding. Save and
restore current->thread.cp0_baduaddr so faulting unwinder reads cannot
corrupt an interrupted usercopy’s recovery
• Balance PMU event initialization cleanup. Release resources exactly
once on initialization failure and install the destroy callback only on
success. Also check event type before rejecting unsupported attributes,
allowing unrelated events to fall back to another PMU
• Keep disabled PMU interrupts masked after EOI. Add an SB1 IRQ flow
wrapper that reapplies the mask when interrupt work disables the last
event; the generic CPU IRQ EOI would otherwise unmask IP7 again
• Fix a documentation heading underline in sb1-pmu.rst (Randy, sashiko)
Florian Fainelli (3):
MIPS: SiByte: Wire up the CPU interrupt controller
MIPS: perf: Add SB1 userspace callchain unwinding
MIPS: perf: Add SB1 and SB1A performance counter support
Documentation/arch/mips/index.rst | 1 +
Documentation/arch/mips/sb1-pmu.rst | 162 ++++++++++
arch/mips/include/asm/mach-sibyte/irq.h | 10 +
arch/mips/kernel/perf_event.c | 110 ++++++-
arch/mips/kernel/perf_event_mipsxx.c | 397 ++++++++++++++++++++++--
arch/mips/sibyte/bcm1480/irq.c | 7 +-
arch/mips/sibyte/sb1250/irq.c | 3 +
include/linux/cpuhotplug.h | 1 +
8 files changed, 666 insertions(+), 25 deletions(-)
create mode 100644 Documentation/arch/mips/sb1-pmu.rst
create mode 100644 arch/mips/include/asm/mach-sibyte/irq.h
--
2.53.0