mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 10:41:38 -04:00
ACPI: acpi_os_get_thread_id() returns current
Linux mutexes and the debug code that that reference acpi_os_get_thread_id() are happy with 0. But the AML mutexes in exmutex.c expect a unique non-zero number for each thread - as they track this thread_id to permit the mutex re-entrancy defined by the ACPI spec. http://bugzilla.kernel.org/show_bug.cgi?id=6687 Signed-off-by: Len Brown <[email protected]>
This commit is contained in:
parent
120bda20c6
commit
ab8aa06a5c
5 changed files with 12 additions and 11 deletions
|
|
@ -127,7 +127,7 @@ typedef u8 acpi_owner_id;
|
|||
|
||||
/* This Thread ID means that the mutex is not in use (unlocked) */
|
||||
|
||||
#define ACPI_MUTEX_NOT_ACQUIRED (u32) -1
|
||||
#define ACPI_MUTEX_NOT_ACQUIRED (acpi_thread_id) 0
|
||||
|
||||
/* Table for the global mutexes */
|
||||
|
||||
|
|
|
|||
|
|
@ -59,6 +59,7 @@
|
|||
#include <asm/acpi.h>
|
||||
#include <linux/slab.h>
|
||||
#include <linux/spinlock_types.h>
|
||||
#include <asm/current.h>
|
||||
|
||||
/* Host-dependent types and defines */
|
||||
|
||||
|
|
@ -100,8 +101,8 @@
|
|||
|
||||
#define acpi_cpu_flags unsigned long
|
||||
|
||||
#define acpi_thread_id u32
|
||||
#define acpi_thread_id struct task_struct *
|
||||
|
||||
static inline acpi_thread_id acpi_os_get_thread_id(void) { return 0; }
|
||||
static inline acpi_thread_id acpi_os_get_thread_id(void) { return current; }
|
||||
|
||||
#endif /* __ACLINUX_H__ */
|
||||
|
|
|
|||
Loading…
Reference in a new issue