Messages in this thread | | | Subject | Re: [PATCH v5 3/7] arm64: perf: Remove PMU locking | From | Stephen Boyd <> | Date | Wed, 17 Jun 2020 13:17:12 -0700 |
| |
Quoting Alexandru Elisei (2020-06-17 04:38:47) > From: Julien Thierry <julien.thierry@arm.com> > > The PMU is disabled and enabled, and the counters are programmed from > contexts where interrupts or preemption is disabled. > > The functions to toggle the PMU and to program the PMU counters access the > registers directly and don't access data modified by the interrupt handler. > That, and the fact that they're always called from non-preemptible > contexts, means that we don't need to disable interrupts or use a spinlock.
Maybe we should add a lockdep assertion that the code isn't preemptible? I.e. add a cant_sleep() call? Or is it more that we don't need locking because we're just doing register accesses and don't need to protect those accesses from each other?
| |