[06/10] alpha: perf/core: generalise event exclusion checking with perf macro
diff mbox series

Message ID 1542363853-13849-7-git-send-email-andrew.murray@arm.com
State Not Applicable
Headers show
Series
  • perf/core: Generalise event exclusion checking
Related show

Checks

Context Check Description
snowpatch_ozlabs/checkpatch success total: 0 errors, 0 warnings, 0 checks, 11 lines checked
snowpatch_ozlabs/apply_patch success next/apply_patch Successfully applied

Commit Message

Andrew Murray Nov. 16, 2018, 10:24 a.m. UTC
Replace checking of perf event exclusion flags with perf macro.

This is a functional change as __hw_perf_event_init will now indicate
that it doesn't support exclude_host and exclude_guest event flags.

Signed-off-by: Andrew Murray <andrew.murray@arm.com>
---
 arch/alpha/kernel/perf_event.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

Patch
diff mbox series

diff --git a/arch/alpha/kernel/perf_event.c b/arch/alpha/kernel/perf_event.c
index 5613aa37..36f98ee 100644
--- a/arch/alpha/kernel/perf_event.c
+++ b/arch/alpha/kernel/perf_event.c
@@ -631,10 +631,8 @@  static int __hw_perf_event_init(struct perf_event *event)
 	}
 
 	/* The EV67 does not support mode exclusion */
-	if (attr->exclude_kernel || attr->exclude_user
-			|| attr->exclude_hv || attr->exclude_idle) {
+	if (event_has_exclude_flags(event))
 		return -EPERM;
-	}
 
 	/*
 	 * We place the event type in event_base here and leave calculation