Searched hist:"95 e1bc1daaeee4d598b235dc85b64b7a0bcc3060" (Results 1 – 1 of 1) sorted by relevance
/linux/arch/powerpc/platforms/powernv/ |
H A D | opal-sensor.c | diff 95e1bc1daaeee4d598b235dc85b64b7a0bcc3060 Fri Nov 03 03:41:43 CET 2017 Stewart Smith <stewart@linux.vnet.ibm.com> powernv/opal-sensor: remove not needed lock
Parallel sensor reads could run out of async tokens due to opal_get_sensor_data grabbing tokens but then doing the sensor read behind a mutex, essentially serializing the (possibly asynchronous and relatively slow) sensor read.
It turns out that the mutex isn't needed at all, not only should the OPAL interface allow concurrent reads, the implementation is certainly safe for that, and if any sensor we were reading from somewhere isn't, doing the mutual exclusion in the kernel is the wrong place to do it, OPAL should be doing it for the kernel.
So, remove the mutex.
Additionally, we shouldn't be printing out an error when we don't get a token as the only way this should happen is if we've been interrupted in down_interruptible() on the semaphore.
Reported-by: Robert Lippert <rlippert@google.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com> Signed-off-by: Cyril Bur <cyrilbur@gmail.com> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
|