Skip to content

MIPS: SiByte: Add HW PMU support

Florian Fainelli linux-doc linux-mips linux-perf-users lkml 3 versions – New

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest3 patches 0 repliesNew
  2. v23 patches 0 repliesSuperseded
  3. v13 patches 1 replySuperseded

Changes in v3 from the cover letter

- Use boot_cpu_type() when identifying the SB1/SB1A PMU instead of current_cpu_type(), avoiding a preemptible-context processor ID lookup.

Patches in v3 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3MIPS: SiByte: Wire up the CPU interrupt controllerarch/mips/include/asm/mach-sibyte/irq.h arch/mips/sibyte/bcm1480/irq.c arch/mips/sibyte/sb1250/irq.c+19 -10 replies
2/3MIPS: perf: Add SB1 userspace callchain unwindingarch/mips/kernel/perf_event.c+106 -40 replies
3/3MIPS: perf: Add SB1 and SB1A performance counter supportDocumentation/arch/mips/index.rst Documentation/arch/mips/sb1-pmu.rst arch/mips/kernel/perf_event_mipsxx.c +1 more+541 -200 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v3 yet.

Read the v3 thread

Cover letter [PATCH v3 0/3] MIPS: SiByte: Add HW PMU support

This patch series resurrects the SiByte HW PMU support which used to be supported with oprofile but was later removed.

Changes in v3:

- Use boot_cpu_type() when identifying the SB1/SB1A PMU instead of current_cpu_type(), avoiding a preemptible-context processor ID lookup.

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
Signature · 1 line
2.53.0