From 28eb3fcf8762a3b52f4fef5af29dce50d23c7151 Mon Sep 17 00:00:00 2001 From: Lin Ming Date: Wed, 15 Sep 2010 13:55:13 +0800 Subject: ACPICA: Make acpi_thread_id no longer configurable, always u64 Change definition of acpi_thread_id to always be a u64. This simplifies the code, especially any printf output. u64 is the only common data type for all thread_id types across all operating systems. We now force the OSL to cast the native thread_id type to u64 before returning the value to ACPICA (via acpi_os_get_thread_id). Signed-off-by: Lin Ming Signed-off-by: Len Brown --- include/acpi/platform/aclinux.h | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'include/acpi/platform/aclinux.h') diff --git a/include/acpi/platform/aclinux.h b/include/acpi/platform/aclinux.h index 103f08aca76..572189e3713 100644 --- a/include/acpi/platform/aclinux.h +++ b/include/acpi/platform/aclinux.h @@ -75,7 +75,6 @@ #define acpi_cache_t struct kmem_cache #define acpi_spinlock spinlock_t * #define acpi_cpu_flags unsigned long -#define acpi_thread_id struct task_struct * #else /* !__KERNEL__ */ @@ -88,7 +87,7 @@ /* Host-dependent types and defines for user-space ACPICA */ #define ACPI_FLUSH_CPU_CACHE() -#define acpi_thread_id pthread_t +#define ACPI_CAST_PTHREAD_T(pthread) ((acpi_thread_id) (pthread)) #if defined(__ia64__) || defined(__x86_64__) #define ACPI_MACHINE_WIDTH 64 @@ -113,12 +112,13 @@ #ifdef __KERNEL__ +#include /* * Overrides for in-kernel ACPICA */ static inline acpi_thread_id acpi_os_get_thread_id(void) { - return current; + return (acpi_thread_id)(unsigned long)current; } /* @@ -127,7 +127,6 @@ static inline acpi_thread_id acpi_os_get_thread_id(void) * However, boot has (system_state != SYSTEM_RUNNING) * to quiet __might_sleep() in kmalloc() and resume does not. */ -#include static inline void *acpi_os_allocate(acpi_size size) { return kmalloc(size, irqs_disabled() ? GFP_ATOMIC : GFP_KERNEL); -- cgit v1.2.3-70-g09d2