From: Pawel Moll Date: Thu, 11 Aug 2016 11:00:36 +0000 (+0100) Subject: bus: arm-ccn: Add missing event attribute exclusions for host/guest X-Git-Tag: v4.9.8~1351^2~12^2~3 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=3249bce459ff0bb7c1621b00a8e2d6afe24c53bb;p=platform%2Fkernel%2Flinux-rpi3.git 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 --- diff --git a/drivers/bus/arm-ccn.c b/drivers/bus/arm-ccn.c index ddb65c1..02f81e3 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) if (has_branch_stack(event) || event->attr.exclude_user || event->attr.exclude_kernel || event->attr.exclude_hv || - event->attr.exclude_idle) { + event->attr.exclude_idle || event->attr.exclude_host || + event->attr.exclude_guest) { dev_warn(ccn->dev, "Can't exclude execution levels!\n"); - return -EOPNOTSUPP; + return -EINVAL; } if (event->cpu < 0) {