The opal sensor mutex protects the opal_sensor_read call which
can return a OPAL_BUSY code on IBM Power systems if a previous 
request is in progress.

This can be handled at user level with a retry.

Signed-off-by: Cédric Le Goater <c...@fr.ibm.com>
---
 arch/powerpc/platforms/powernv/opal-sensor.c |    5 -----
 1 file changed, 5 deletions(-)

Index: linux.git/arch/powerpc/platforms/powernv/opal-sensor.c
===================================================================
--- linux.git.orig/arch/powerpc/platforms/powernv/opal-sensor.c
+++ linux.git/arch/powerpc/platforms/powernv/opal-sensor.c
@@ -24,9 +24,6 @@
 #include <asm/opal.h>
 #include <asm/machdep.h>
 
-static DEFINE_MUTEX(opal_sensor_mutex);
-
-
 /*
  * opal_sensor_read() return codes
  *
@@ -76,7 +73,6 @@ int opal_get_sensor_data(u32 sensor_hndl
                goto out;
        }
 
-       mutex_lock(&opal_sensor_mutex);
        ret = opal_sensor_read(sensor_hndl, token, &data);
        switch (ret) {
        case OPAL_ASYNC_COMPLETION:
@@ -102,7 +98,6 @@ int opal_get_sensor_data(u32 sensor_hndl
        }
 
 out_token:
-       mutex_unlock(&opal_sensor_mutex);
        opal_async_release_token(token);
 out:
        return ret;

_______________________________________________
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev

Reply via email to