projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
cb4a6cc
)
perf/x86/amd: Reject branch stack for IBS events
author
Namhyung Kim
<namhyung@kernel.org>
Thu, 30 Nov 2023 06:22:46 +0000
(11:52 +0530)
committer
Ingo Molnar
<mingo@kernel.org>
Thu, 30 Nov 2023 08:34:40 +0000
(09:34 +0100)
The AMD IBS PMU doesn't handle branch stacks, so it should not accept
events with brstack.
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
Signed-off-by: Ravi Bangoria <ravi.bangoria@amd.com>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Link:
https://lore.kernel.org/r/20231130062246.290-1-ravi.bangoria@amd.com
arch/x86/events/amd/ibs.c
patch
|
blob
|
history
diff --git
a/arch/x86/events/amd/ibs.c
b/arch/x86/events/amd/ibs.c
index 6911c5399d02f359bac08f545f54b0e35b59752f..e91970b01d6243e44d14e7e7e732aa44a59d2188 100644
(file)
--- a/
arch/x86/events/amd/ibs.c
+++ b/
arch/x86/events/amd/ibs.c
@@
-287,6
+287,9
@@
static int perf_ibs_init(struct perf_event *event)
if (config & ~perf_ibs->config_mask)
return -EINVAL;
+ if (has_branch_stack(event))
+ return -EOPNOTSUPP;
+
ret = validate_group(event);
if (ret)
return ret;