Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b7d45c3f authored by David S. Miller's avatar David S. Miller
Browse files

sparc64: Fix maybe_change_configuration() PCR setting.



Need to mask out the existing event bits before OR'ing in
the new ones.

Noticed by Peter Zijlstra.

Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 0d0659c7
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -655,6 +655,7 @@ static u64 maybe_change_configuration(struct cpu_hw_events *cpuc, u64 pcr)
		cpuc->current_idx[i] = idx;

		enc = perf_event_get_enc(cpuc->events[i]);
		pcr &= ~mask_for_index(idx);
		pcr |= event_encoding(enc, idx);
	}
out: