diff options
author | Pawel Moll <pawel.moll@arm.com> | 2016-08-11 07:00:36 -0400 |
---|---|---|
committer | Pawel Moll <pawel.moll@arm.com> | 2016-08-17 06:42:46 -0400 |
commit | 3249bce459ff0bb7c1621b00a8e2d6afe24c53bb (patch) | |
tree | 9d06a1f8662533874eadd2a79469bf0f9d8f4a36 /drivers/bus | |
parent | 90d11e267a32a25d2cb69127174a96b9e518395e (diff) |
bus: arm-ccn: Add missing event attribute exclusions for host/guest
CCN PMUs have no knowledge into VM-related origins of the memory
traffic, therefore can't handle requests for host-only or guest-only
events.
Added appropriate exclusions (they should have been there from the
beginning). This required changing the error code returned, as the
userspace tool only re-negotiates the options (exclude_guest is true by
default) only for EINVAL.
Signed-off-by: Pawel Moll <pawel.moll@arm.com>
Diffstat (limited to 'drivers/bus')
-rw-r--r-- | drivers/bus/arm-ccn.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/bus/arm-ccn.c b/drivers/bus/arm-ccn.c index ddb65c117012..02f81e308dff 100644 --- a/drivers/bus/arm-ccn.c +++ b/drivers/bus/arm-ccn.c | |||
@@ -745,9 +745,10 @@ static int arm_ccn_pmu_event_init(struct perf_event *event) | |||
745 | 745 | ||
746 | if (has_branch_stack(event) || event->attr.exclude_user || | 746 | if (has_branch_stack(event) || event->attr.exclude_user || |
747 | event->attr.exclude_kernel || event->attr.exclude_hv || | 747 | event->attr.exclude_kernel || event->attr.exclude_hv || |
748 | event->attr.exclude_idle) { | 748 | event->attr.exclude_idle || event->attr.exclude_host || |
749 | event->attr.exclude_guest) { | ||
749 | dev_warn(ccn->dev, "Can't exclude execution levels!\n"); | 750 | dev_warn(ccn->dev, "Can't exclude execution levels!\n"); |
750 | return -EOPNOTSUPP; | 751 | return -EINVAL; |
751 | } | 752 | } |
752 | 753 | ||
753 | if (event->cpu < 0) { | 754 | if (event->cpu < 0) { |