# Re: \[PATCH\] powerpc/perf: Invoke per-CPU variable access with disabled interrupts

- From: Michael Ellerman \<hidden\>
- Date: 2020-12-10 12:00:33 
- List: linuxppc-dev
- Page: https://ratatoskr.run/linuxppc-dev/2020/12/9520015
- Thread: https://ratatoskr.run/linuxppc-dev/2020/12/9519848/t.md

```text
On Tue, 1 Dec 2020 04:28:00 -0500, Athira Rajeev wrote:
> The power_pmu_event_init() callback access per-cpu variable
> (cpu_hw_events) to check for event constraints and Branch Stack
> (BHRB). Current usage is to disable preemption when accessing the
> per-cpu variable, but this does not prevent timer callback from
> interrupting event_init. Fix this by using 'local_irq_save/restore'
> to make sure the code path is invoked with disabled interrupts.
> 
> [...]

Applied to powerpc/next.

[1/1] powerpc/perf: Invoke per-CPU variable access with disabled interrupts
      https://git.kernel.org/powerpc/c/f66de7ac4849eb42a7b18e26b8ee49e08130fd27

cheers
```
