Thread (82 messages) 82 messages, 12 authors, 2012-10-08
STALE4990d

[PATCH 05/15] ARM: Expose PMNC bitfields for KVM use

From: Will Deacon <hidden>
Date: 2012-09-18 13:08:21
Also in: kvm

On Sat, Sep 15, 2012 at 04:35:02PM +0100, Christoffer Dall wrote:
From: Rusty Russell <redacted>

We want some of these for use in KVM, so pull them out of
arch/arm/kernel/perf_event_v7.c into their own asm/perf_bits.h.

Signed-off-by: Rusty Russell <redacted>
Signed-off-by: Christoffer Dall <redacted>
---
 arch/arm/include/asm/perf_bits.h |   56 ++++++++++++++++++++++++++++++++++++++
 arch/arm/kernel/perf_event_v7.c  |   51 +----------------------------------
 2 files changed, 57 insertions(+), 50 deletions(-)
 create mode 100644 arch/arm/include/asm/perf_bits.h
I don't like this I'm afraid. These bit definitions, although useful for
kvm, are only applicable to ARMv7 PMUs. Perf does a reasonable job of
separating the low-level CPU-specific code and adding the v7 definitions
into their own global header feels like a step backwards. I also want to
move a load of this into drivers/ at some point and this won't help with
that effort.

Is KVM just using this for world switch? If so, why does it care about the
bit definitions (and what do you do for things like debug regs)? Is there
anything I could add to perf that you could call instead?

Will
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help