summaryrefslogtreecommitdiff
path: root/drivers/perf/riscv_pmu.c
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2023-10-16 18:36:12 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2023-10-16 18:36:12 +0300
commitd0d27ef87e1ca974ed93ed4f7d3c123cbd392ba6 (patch)
treef7c3e3259579973c896c634e2bdabed31a171395 /drivers/perf/riscv_pmu.c
parent1034cc423f1b4a7a9a56d310ca980fcd2753e11d (diff)
parent58720809f52779dc0f08e53e54b014209d13eebb (diff)
downloadlinux-d0d27ef87e1ca974ed93ed4f7d3c123cbd392ba6.tar.xz
Merge 6.6-rc6 into usb-next
We need the USB and Thunderbolt fixes in here as well. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/perf/riscv_pmu.c')
-rw-r--r--drivers/perf/riscv_pmu.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/perf/riscv_pmu.c b/drivers/perf/riscv_pmu.c
index 1f9a35f724f5..0dda70e1ef90 100644
--- a/drivers/perf/riscv_pmu.c
+++ b/drivers/perf/riscv_pmu.c
@@ -23,7 +23,8 @@ static bool riscv_perf_user_access(struct perf_event *event)
return ((event->attr.type == PERF_TYPE_HARDWARE) ||
(event->attr.type == PERF_TYPE_HW_CACHE) ||
(event->attr.type == PERF_TYPE_RAW)) &&
- !!(event->hw.flags & PERF_EVENT_FLAG_USER_READ_CNT);
+ !!(event->hw.flags & PERF_EVENT_FLAG_USER_READ_CNT) &&
+ (event->hw.idx != -1);
}
void arch_perf_update_userpage(struct perf_event *event,