All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v3 0/5]
@ 2018-05-18 14:39 ` Marc Zyngier
  0 siblings, 0 replies; 26+ messages in thread
From: Marc Zyngier @ 2018-05-18 14:39 UTC (permalink / raw)
  To: linux-arm-kernel, linux-kernel
  Cc: Will Deacon, Mark Rutland, Russell King, Vladimir Murzin,
	Vince Weaver, Peter Zijlstra, Stefan Wahren, Eric Anholt,
	Florian Fainelli

PMUv3 has been introduced with ARMv8 and, while it has only been used
on 64bit systems so far, it would definitely be useful for 32bit
guests running under KVM/arm64, for example.

There is also the case of people natively running 32bit kernels on
64bit HW and trying to upstream unspeakable hacks, hoping that the
stars will align and that they'll win the lottery (see [1]).

So let's try again, and make the PMUv3 driver usable for everyone.

This is done in three steps:
(1) Move the driver from arch/arm64 to drivers/perf
(2) Add a handful of system register accessors so that we can reuse
    the driver on 32bit
(3) Provide the same accessors on 32bit, enable compilation, and
    make it the default selection for mach-virt.

Tested on a Seattle box with 32bit guests.

* From v1:
  - Fixed encodings for some CP15 accessors
  - Added a terse note saying that CPU_V7 also covers ARMv8
  - Rebased on v4.12-rc5

* From v2:
  - SPDX tags on new and moved files. Yeah!
  - Annual rebase on 4.17-rc5

[1] https://patchwork.kernel.org/patch/10406793/

Marc Zyngier (5):
  arm64: perf: Move PMUv3 driver to drivers/perf
  arm64: perf: Abstract system register accesses away
  ARM: Make CONFIG_CPU_V7 valid for 32bit ARMv8 implementations
  ARM: perf: Allow the use of the PMUv3 driver on 32bit ARM
  ARM: mach-virt: Select PMUv3 driver by default

 arch/arm/Kconfig                                   |   1 +
 arch/arm/include/asm/arm_pmuv3.h                   | 125 +++++++++++++++++++++
 arch/arm/mm/Kconfig                                |   2 +-
 arch/arm64/include/asm/arm_pmuv3.h                 | 111 ++++++++++++++++++
 arch/arm64/include/asm/perf_event.h                |  55 ---------
 arch/arm64/kernel/Makefile                         |   1 -
 drivers/perf/Kconfig                               |   8 ++
 drivers/perf/Makefile                              |   1 +
 .../perf_event.c => drivers/perf/arm_pmuv3.c       |  42 ++++---
 include/kvm/arm_pmu.h                              |   2 +-
 include/linux/perf/arm_pmuv3.h                     |  78 +++++++++++++
 11 files changed, 346 insertions(+), 80 deletions(-)
 create mode 100644 arch/arm/include/asm/arm_pmuv3.h
 create mode 100644 arch/arm64/include/asm/arm_pmuv3.h
 rename arch/arm64/kernel/perf_event.c => drivers/perf/arm_pmuv3.c (97%)
 create mode 100644 include/linux/perf/arm_pmuv3.h

-- 
2.14.2

^ permalink raw reply	[flat|nested] 26+ messages in thread

end of thread, other threads:[~2021-12-20  9:00 UTC | newest]

Thread overview: 26+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-05-18 14:39 [PATCH v3 0/5] Marc Zyngier
2018-05-18 14:39 ` Marc Zyngier
2018-05-18 14:39 ` [PATCH v3 1/5] arm64: perf: Move PMUv3 driver to drivers/perf Marc Zyngier
2018-05-18 14:39   ` Marc Zyngier
2018-05-18 14:39 ` [PATCH v3 2/5] arm64: perf: Abstract system register accesses away Marc Zyngier
2018-05-18 14:39   ` Marc Zyngier
2018-05-18 14:39 ` [PATCH v3 3/5] ARM: Make CONFIG_CPU_V7 valid for 32bit ARMv8 implementations Marc Zyngier
2018-05-18 14:39   ` Marc Zyngier
2018-05-18 14:39 ` [PATCH v3 4/5] ARM: perf: Allow the use of the PMUv3 driver on 32bit ARM Marc Zyngier
2018-05-18 14:39   ` Marc Zyngier
2018-05-21  9:34   ` Vladimir Murzin
2018-05-21  9:34     ` Vladimir Murzin
2018-05-21  9:52     ` Marc Zyngier
2018-05-21  9:52       ` Marc Zyngier
2018-05-18 14:39 ` [PATCH v3 5/5] ARM: mach-virt: Select PMUv3 driver by default Marc Zyngier
2018-05-18 14:39   ` Marc Zyngier
2018-05-18 16:29 ` [PATCH v3 0/5] Vince Weaver
2018-05-18 16:29   ` Vince Weaver
2018-05-18 16:41   ` Marc Zyngier
2018-05-18 16:41     ` Marc Zyngier
2018-05-18 17:39     ` Stefan Wahren
2018-05-18 17:39       ` Stefan Wahren
2018-05-21 18:19 ` Will Deacon
2018-05-21 18:19   ` Will Deacon
2021-12-19 23:46   ` Florian Fainelli
2021-12-20  8:59     ` Marc Zyngier

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.