File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -271,7 +271,7 @@ static void loongarch_pmu_enable_event(struct hw_perf_event *evt, int idx)
271
271
WARN_ON (idx < 0 || idx >= loongarch_pmu .num_counters );
272
272
273
273
/* Make sure interrupt enabled. */
274
- cpuc -> saved_ctrl [idx ] = M_PERFCTL_EVENT (evt -> event_base & 0xff ) |
274
+ cpuc -> saved_ctrl [idx ] = M_PERFCTL_EVENT (evt -> event_base ) |
275
275
(evt -> config_base & M_PERFCTL_CONFIG_MASK ) | CSR_PERFCTRL_IE ;
276
276
277
277
cpu = (event -> cpu >= 0 ) ? event -> cpu : smp_processor_id ();
@@ -594,7 +594,7 @@ static struct pmu pmu = {
594
594
595
595
static unsigned int loongarch_pmu_perf_event_encode (const struct loongarch_perf_event * pev )
596
596
{
597
- return (pev -> event_id & 0xff );
597
+ return M_PERFCTL_EVENT (pev -> event_id );
598
598
}
599
599
600
600
static const struct loongarch_perf_event * loongarch_pmu_map_general_event (int idx )
@@ -849,7 +849,7 @@ static void resume_local_counters(void)
849
849
850
850
static const struct loongarch_perf_event * loongarch_pmu_map_raw_event (u64 config )
851
851
{
852
- raw_event .event_id = config & 0xff ;
852
+ raw_event .event_id = M_PERFCTL_EVENT ( config ) ;
853
853
854
854
return & raw_event ;
855
855
}
You can’t perform that action at this time.
0 commit comments