Commit 86ff0e50 authored by Lv Zheng's avatar Lv Zheng Committed by Rafael J. Wysocki

ACPICA: Fix unmerged acmacros.h divergences.

The 20121018 release depends on some unmerged acmaros.h fixes.
This patch includes the fixes made on acmaros.h that will not affect
the generated vmlinux binary.

This patch will not affect the generated vmlinux binary.
This will decrease 157 lines of 20120913 divergence.diff.
Signed-off-by: default avatarLv Zheng <lv.zheng@intel.com>
Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
parent 1f86e8c1
...@@ -196,18 +196,6 @@ ...@@ -196,18 +196,6 @@
#endif #endif
#endif #endif
/* Macros based on machine integer width */
#if ACPI_MACHINE_WIDTH == 32
#define ACPI_MOVE_SIZE_TO_16(d, s) ACPI_MOVE_32_TO_16(d, s)
#elif ACPI_MACHINE_WIDTH == 64
#define ACPI_MOVE_SIZE_TO_16(d, s) ACPI_MOVE_64_TO_16(d, s)
#else
#error unknown ACPI_MACHINE_WIDTH
#endif
/* /*
* Fast power-of-two math macros for non-optimized compilers * Fast power-of-two math macros for non-optimized compilers
*/ */
...@@ -355,7 +343,6 @@ ...@@ -355,7 +343,6 @@
* Ascii error messages can be configured out * Ascii error messages can be configured out
*/ */
#ifndef ACPI_NO_ERROR_MESSAGES #ifndef ACPI_NO_ERROR_MESSAGES
/* /*
* Error reporting. Callers module and line number are inserted by AE_INFO, * Error reporting. Callers module and line number are inserted by AE_INFO,
* the plist contains a set of parens to allow variable-length lists. * the plist contains a set of parens to allow variable-length lists.
...@@ -381,12 +368,9 @@ ...@@ -381,12 +368,9 @@
* Debug macros that are conditionally compiled * Debug macros that are conditionally compiled
*/ */
#ifdef ACPI_DEBUG_OUTPUT #ifdef ACPI_DEBUG_OUTPUT
/* /*
* Function entry tracing * Function entry tracing
*/ */
#ifdef CONFIG_ACPI_DEBUG_FUNC_TRACE
#define ACPI_FUNCTION_TRACE(a) ACPI_FUNCTION_NAME(a) \ #define ACPI_FUNCTION_TRACE(a) ACPI_FUNCTION_NAME(a) \
acpi_ut_trace(ACPI_DEBUG_PARAMETERS) acpi_ut_trace(ACPI_DEBUG_PARAMETERS)
#define ACPI_FUNCTION_TRACE_PTR(a, b) ACPI_FUNCTION_NAME(a) \ #define ACPI_FUNCTION_TRACE_PTR(a, b) ACPI_FUNCTION_NAME(a) \
...@@ -464,44 +448,18 @@ ...@@ -464,44 +448,18 @@
#endif /* ACPI_SIMPLE_RETURN_MACROS */ #endif /* ACPI_SIMPLE_RETURN_MACROS */
#else /* !CONFIG_ACPI_DEBUG_FUNC_TRACE */
#define ACPI_FUNCTION_TRACE(a)
#define ACPI_FUNCTION_TRACE_PTR(a,b)
#define ACPI_FUNCTION_TRACE_U32(a,b)
#define ACPI_FUNCTION_TRACE_STR(a,b)
#define ACPI_FUNCTION_EXIT
#define ACPI_FUNCTION_STATUS_EXIT(s)
#define ACPI_FUNCTION_VALUE_EXIT(s)
#define ACPI_FUNCTION_TRACE(a)
#define ACPI_FUNCTION_ENTRY()
#define return_VOID return
#define return_ACPI_STATUS(s) return(s)
#define return_VALUE(s) return(s)
#define return_UINT8(s) return(s)
#define return_UINT32(s) return(s)
#define return_PTR(s) return(s)
#endif /* CONFIG_ACPI_DEBUG_FUNC_TRACE */
/* Conditional execution */ /* Conditional execution */
#define ACPI_DEBUG_EXEC(a) a #define ACPI_DEBUG_EXEC(a) a
#define ACPI_NORMAL_EXEC(a)
#define ACPI_DEBUG_DEFINE(a) a;
#define ACPI_DEBUG_ONLY_MEMBERS(a) a; #define ACPI_DEBUG_ONLY_MEMBERS(a) a;
#define _VERBOSE_STRUCTURES #define _VERBOSE_STRUCTURES
/* Stack and buffer dumping */ /* Various object display routines for debug */
#define ACPI_DUMP_STACK_ENTRY(a) acpi_ex_dump_operand((a), 0) #define ACPI_DUMP_STACK_ENTRY(a) acpi_ex_dump_operand((a), 0)
#define ACPI_DUMP_OPERANDS(a, b, c) acpi_ex_dump_operands(a, b, c) #define ACPI_DUMP_OPERANDS(a, b ,c) acpi_ex_dump_operands(a, b, c)
#define ACPI_DUMP_ENTRY(a, b) acpi_ns_dump_entry (a, b) #define ACPI_DUMP_ENTRY(a, b) acpi_ns_dump_entry (a, b)
#define ACPI_DUMP_PATHNAME(a, b, c, d) acpi_ns_dump_pathname(a, b, c, d) #define ACPI_DUMP_PATHNAME(a, b, c, d) acpi_ns_dump_pathname(a, b, c, d)
#define ACPI_DUMP_RESOURCE_LIST(a) acpi_rs_dump_resource_list(a)
#define ACPI_DUMP_BUFFER(a, b) acpi_ut_dump_buffer((u8 *) a, b, DB_BYTE_DISPLAY, _COMPONENT) #define ACPI_DUMP_BUFFER(a, b) acpi_ut_dump_buffer((u8 *) a, b, DB_BYTE_DISPLAY, _COMPONENT)
#else #else
...@@ -510,25 +468,23 @@ ...@@ -510,25 +468,23 @@
* leaving no executable debug code! * leaving no executable debug code!
*/ */
#define ACPI_DEBUG_EXEC(a) #define ACPI_DEBUG_EXEC(a)
#define ACPI_NORMAL_EXEC(a) a; #define ACPI_DEBUG_ONLY_MEMBERS(a)
#define ACPI_FUNCTION_TRACE(a)
#define ACPI_DEBUG_DEFINE(a) do { } while(0) #define ACPI_FUNCTION_TRACE_PTR(a, b)
#define ACPI_DEBUG_ONLY_MEMBERS(a) do { } while(0) #define ACPI_FUNCTION_TRACE_U32(a, b)
#define ACPI_FUNCTION_TRACE(a) do { } while(0) #define ACPI_FUNCTION_TRACE_STR(a, b)
#define ACPI_FUNCTION_TRACE_PTR(a, b) do { } while(0) #define ACPI_FUNCTION_EXIT
#define ACPI_FUNCTION_TRACE_U32(a, b) do { } while(0) #define ACPI_FUNCTION_STATUS_EXIT(s)
#define ACPI_FUNCTION_TRACE_STR(a, b) do { } while(0) #define ACPI_FUNCTION_VALUE_EXIT(s)
#define ACPI_FUNCTION_EXIT do { } while(0) #define ACPI_FUNCTION_ENTRY()
#define ACPI_FUNCTION_STATUS_EXIT(s) do { } while(0) #define ACPI_DUMP_STACK_ENTRY(a)
#define ACPI_FUNCTION_VALUE_EXIT(s) do { } while(0) #define ACPI_DUMP_OPERANDS(a, b, c)
#define ACPI_FUNCTION_ENTRY() do { } while(0) #define ACPI_DUMP_ENTRY(a, b)
#define ACPI_DUMP_STACK_ENTRY(a) do { } while(0) #define ACPI_DUMP_TABLES(a, b)
#define ACPI_DUMP_OPERANDS(a, b, c) do { } while(0) #define ACPI_DUMP_PATHNAME(a, b, c, d)
#define ACPI_DUMP_ENTRY(a, b) do { } while(0) #define ACPI_DUMP_BUFFER(a, b)
#define ACPI_DUMP_TABLES(a, b) do { } while(0) #define ACPI_DEBUG_PRINT(pl)
#define ACPI_DUMP_PATHNAME(a, b, c, d) do { } while(0) #define ACPI_DEBUG_PRINT_RAW(pl)
#define ACPI_DUMP_RESOURCE_LIST(a) do { } while(0)
#define ACPI_DUMP_BUFFER(a, b) do { } while(0)
#define return_VOID return #define return_VOID return
#define return_ACPI_STATUS(s) return(s) #define return_ACPI_STATUS(s) return(s)
...@@ -556,18 +512,6 @@ ...@@ -556,18 +512,6 @@
#define ACPI_DEBUGGER_EXEC(a) #define ACPI_DEBUGGER_EXEC(a)
#endif #endif
#ifdef ACPI_DEBUG_OUTPUT
/*
* 1) Set name to blanks
* 2) Copy the object name
*/
#define ACPI_ADD_OBJECT_NAME(a,b) ACPI_MEMSET (a->common.name, ' ', sizeof (a->common.name));\
ACPI_STRNCPY (a->common.name, acpi_gbl_ns_type_names[b], sizeof (a->common.name))
#else
#define ACPI_ADD_OBJECT_NAME(a,b)
#endif
/* /*
* Memory allocation tracking (DEBUG ONLY) * Memory allocation tracking (DEBUG ONLY)
*/ */
...@@ -578,13 +522,13 @@ ...@@ -578,13 +522,13 @@
/* Memory allocation */ /* Memory allocation */
#ifndef ACPI_ALLOCATE #ifndef ACPI_ALLOCATE
#define ACPI_ALLOCATE(a) acpi_ut_allocate((acpi_size)(a), ACPI_MEM_PARAMETERS) #define ACPI_ALLOCATE(a) acpi_ut_allocate((acpi_size) (a), ACPI_MEM_PARAMETERS)
#endif #endif
#ifndef ACPI_ALLOCATE_ZEROED #ifndef ACPI_ALLOCATE_ZEROED
#define ACPI_ALLOCATE_ZEROED(a) acpi_ut_allocate_zeroed((acpi_size)(a), ACPI_MEM_PARAMETERS) #define ACPI_ALLOCATE_ZEROED(a) acpi_ut_allocate_zeroed((acpi_size) (a), ACPI_MEM_PARAMETERS)
#endif #endif
#ifndef ACPI_FREE #ifndef ACPI_FREE
#define ACPI_FREE(a) acpio_os_free(a) #define ACPI_FREE(a) acpi_os_free(a)
#endif #endif
#define ACPI_MEM_TRACKING(a) #define ACPI_MEM_TRACKING(a)
...@@ -592,16 +536,25 @@ ...@@ -592,16 +536,25 @@
/* Memory allocation */ /* Memory allocation */
#define ACPI_ALLOCATE(a) acpi_ut_allocate_and_track((acpi_size)(a), ACPI_MEM_PARAMETERS) #define ACPI_ALLOCATE(a) acpi_ut_allocate_and_track((acpi_size) (a), ACPI_MEM_PARAMETERS)
#define ACPI_ALLOCATE_ZEROED(a) acpi_ut_allocate_zeroed_and_track((acpi_size)(a), ACPI_MEM_PARAMETERS) #define ACPI_ALLOCATE_ZEROED(a) acpi_ut_allocate_zeroed_and_track((acpi_size) (a), ACPI_MEM_PARAMETERS)
#define ACPI_FREE(a) acpi_ut_free_and_track(a, ACPI_MEM_PARAMETERS) #define ACPI_FREE(a) acpi_ut_free_and_track(a, ACPI_MEM_PARAMETERS)
#define ACPI_MEM_TRACKING(a) a #define ACPI_MEM_TRACKING(a) a
#endif /* ACPI_DBG_TRACK_ALLOCATIONS */ #endif /* ACPI_DBG_TRACK_ALLOCATIONS */
/* Preemption point */ /*
#ifndef ACPI_PREEMPTION_POINT * Macros used for ACPICA utilities only
#define ACPI_PREEMPTION_POINT() /* no preemption */ */
#endif
/* Generate a UUID */
#define ACPI_INIT_UUID(a, b, c, d0, d1, d2, d3, d4, d5, d6, d7) \
(a) & 0xFF, ((a) >> 8) & 0xFF, ((a) >> 16) & 0xFF, ((a) >> 24) & 0xFF, \
(b) & 0xFF, ((b) >> 8) & 0xFF, \
(c) & 0xFF, ((c) >> 8) & 0xFF, \
(d0), (d1), (d2), (d3), (d4), (d5), (d6), (d7)
#define ACPI_IS_OCTAL_DIGIT(d) (((char)(d) >= '0') && ((char)(d) <= '7'))
#endif /* ACMACROS_H */ #endif /* ACMACROS_H */
...@@ -843,8 +843,6 @@ acpi_ps_complete_op(struct acpi_walk_state *walk_state, ...@@ -843,8 +843,6 @@ acpi_ps_complete_op(struct acpi_walk_state *walk_state,
*op = NULL; *op = NULL;
} }
ACPI_PREEMPTION_POINT();
return_ACPI_STATUS(AE_OK); return_ACPI_STATUS(AE_OK);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment