Revert "android: binder: Change binder mutex to rtmutex."
authorRiley Andrews <riandrews@google.com>
Wed, 14 Oct 2015 18:54:15 +0000 (11:54 -0700)
committerHuang, Tao <huangtao@rock-chips.com>
Tue, 27 Oct 2015 09:14:39 +0000 (17:14 +0800)
This reverts commit ebce7cd30b3e00232c8be23d0f04d7c0599089b5.

This ends up doing more damage than good on most devices. Go back to
using a standard mutex.

(cherry picked from commit ea93186577de4fae3a2273c296bfcf1839048df0)

drivers/android/binder.c

index 383aa21a0e2a6a4380ccfe9bc2eff3496ceafd92..83af691b5840ce4e8aa9c8c526aec69d9bcdecdc 100644 (file)
@@ -26,7 +26,6 @@
 #include <linux/miscdevice.h>
 #include <linux/mm.h>
 #include <linux/module.h>
-#include <linux/rtmutex.h>
 #include <linux/mutex.h>
 #include <linux/nsproxy.h>
 #include <linux/poll.h>
@@ -47,7 +46,7 @@
 #include <uapi/linux/android/binder.h>
 #include "binder_trace.h"
 
-static DEFINE_RT_MUTEX(binder_main_lock);
+static DEFINE_MUTEX(binder_main_lock);
 static DEFINE_MUTEX(binder_deferred_lock);
 static DEFINE_MUTEX(binder_mmap_lock);
 
@@ -427,14 +426,14 @@ static long task_close_fd(struct binder_proc *proc, unsigned int fd)
 static inline void binder_lock(const char *tag)
 {
        trace_binder_lock(tag);
-       rt_mutex_lock(&binder_main_lock);
+       mutex_lock(&binder_main_lock);
        trace_binder_locked(tag);
 }
 
 static inline void binder_unlock(const char *tag)
 {
        trace_binder_unlock(tag);
-       rt_mutex_unlock(&binder_main_lock);
+       mutex_unlock(&binder_main_lock);
 }
 
 static void binder_set_nice(long nice)