From: Marc Zyngier <marc.zyngier@arm.com> To: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Cc: Will Deacon <will.deacon@arm.com>, Mark Rutland <mark.rutland@arm.com>, Russell King <linux@arm.linux.org.uk>, Vladimir Murzin <vladimir.murzin@arm.com>, Vince Weaver <vincent.weaver@maine.edu>, Peter Zijlstra <peterz@infradead.org>, Stefan Wahren <stefan.wahren@i2se.com>, Eric Anholt <eric@anholt.net>, Florian Fainelli <f.fainelli@gmail.com> Subject: [PATCH v3 0/5] Date: Fri, 18 May 2018 15:39:08 +0100 [thread overview] Message-ID: <20180518143913.26306-1-marc.zyngier@arm.com> (raw) 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
WARNING: multiple messages have this Message-ID (diff)
From: marc.zyngier@arm.com (Marc Zyngier) To: linux-arm-kernel@lists.infradead.org Subject: [PATCH v3 0/5] Date: Fri, 18 May 2018 15:39:08 +0100 [thread overview] Message-ID: <20180518143913.26306-1-marc.zyngier@arm.com> (raw) 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
next reply other threads:[~2018-05-18 14:39 UTC|newest] Thread overview: 41+ messages / expand[flat|nested] mbox.gz Atom feed top 2018-05-18 14:39 Marc Zyngier [this message] 2018-05-18 14:39 ` [PATCH v3 0/5] 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 -- strict thread matches above, loose matches on Subject: below -- 2023-05-29 15:35 Bernhard Rosenkränzer 2023-05-29 15:35 ` Bernhard Rosenkränzer 2023-05-29 16:30 ` Matthias Brugger 2023-05-29 16:30 ` Matthias Brugger 2022-04-21 13:26 [PATCH v2 0/5] trace2 output for bitmap decision path Teng Long 2022-06-12 7:44 ` [PATCH v3 0/5] Teng Long 2022-06-12 7:44 ` Teng Long 2019-02-08 16:11 Federico Vaga 2019-02-08 16:11 ` Federico Vaga 2019-02-09 21:41 ` Andrew Lunn 2015-07-12 5:10 Taeung Song 2014-12-08 9:46 Yunzhi Li 2014-12-08 9:46 ` Yunzhi Li 2014-06-05 13:25 Maxime Ripard 2014-06-09 13:56 ` Linus Walleij 2009-11-10 22:36 Alex Chiang 2009-11-10 22:36 ` Alex Chiang
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20180518143913.26306-1-marc.zyngier@arm.com \ --to=marc.zyngier@arm.com \ --cc=eric@anholt.net \ --cc=f.fainelli@gmail.com \ --cc=linux-arm-kernel@lists.infradead.org \ --cc=linux-kernel@vger.kernel.org \ --cc=linux@arm.linux.org.uk \ --cc=mark.rutland@arm.com \ --cc=peterz@infradead.org \ --cc=stefan.wahren@i2se.com \ --cc=vincent.weaver@maine.edu \ --cc=vladimir.murzin@arm.com \ --cc=will.deacon@arm.com \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
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.