* [PATCH 01/20] ACPICA: Ensure that debug output is immediately disabled on termination.
2013-10-29 1:28 [PATCH 00/20] ACPICA: 20130927 Release Lv Zheng
@ 2013-10-29 1:28 ` Lv Zheng
2013-10-29 1:28 ` [PATCH 02/20] ACPICA: Table print header function: Increase default width for table length Lv Zheng
` (20 subsequent siblings)
21 siblings, 0 replies; 41+ messages in thread
From: Lv Zheng @ 2013-10-29 1:28 UTC (permalink / raw)
To: Rafael J. Wysocki, Robert Moore, Len Brown
Cc: Lv Zheng, linux-acpi, Tomasz Nowicki
From: Tomasz Nowicki <tomasz.nowicki@linaro.org>
Since the debugger is not shipped in the Linux kernel upstream, this
change doesn't affect Linux kernel's behaviors.
Set the global debug flag to "no output" when the debugger is shutdown.
ACPICA BZ 1011. Tomasz Nowicki.
Buglink: https://bugs.acpica.org/show_bug.cgi?id=1011
Signed-off-by: Tomasz Nowicki <tomasz.nowicki@linaro.org>
Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Lv Zheng <lv.zheng@intel.com>
---
drivers/acpi/acpica/aclocal.h | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/acpi/acpica/aclocal.h b/drivers/acpi/acpica/aclocal.h
index be9e30e..dafa0f6 100644
--- a/drivers/acpi/acpica/aclocal.h
+++ b/drivers/acpi/acpica/aclocal.h
@@ -1094,6 +1094,7 @@ struct acpi_integrity_info {
u32 objects;
};
+#define ACPI_DB_DISABLE_OUTPUT 0x00
#define ACPI_DB_REDIRECTABLE_OUTPUT 0x01
#define ACPI_DB_CONSOLE_OUTPUT 0x02
#define ACPI_DB_DUPLICATE_OUTPUT 0x03
--
1.7.10
^ permalink raw reply related [flat|nested] 41+ messages in thread* [PATCH 02/20] ACPICA: Table print header function: Increase default width for table length.
2013-10-29 1:28 [PATCH 00/20] ACPICA: 20130927 Release Lv Zheng
2013-10-29 1:28 ` [PATCH 01/20] ACPICA: Ensure that debug output is immediately disabled on termination Lv Zheng
@ 2013-10-29 1:28 ` Lv Zheng
2013-10-29 1:29 ` [PATCH 03/20] ACPICA: Add a check for a null node during namespace walk Lv Zheng
` (19 subsequent siblings)
21 siblings, 0 replies; 41+ messages in thread
From: Lv Zheng @ 2013-10-29 1:28 UTC (permalink / raw)
To: Rafael J. Wysocki, Robert Moore, Len Brown; +Cc: Lv Zheng, linux-acpi
From: Bob Moore <robert.moore@intel.com>
This change increases the default width for the length from 5 to 6,
to improve alignment/readability on systems with large tables. These
are being seen more frequently, especially large DSDTs (greater than
1 MB).
Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Lv Zheng <lv.zheng@intel.com>
---
drivers/acpi/acpica/tbprint.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/acpi/acpica/tbprint.c b/drivers/acpi/acpica/tbprint.c
index 9a47715..6866e76 100644
--- a/drivers/acpi/acpica/tbprint.c
+++ b/drivers/acpi/acpica/tbprint.c
@@ -135,7 +135,7 @@ acpi_tb_print_table_header(acpi_physical_address address,
/* FACS only has signature and length fields */
- ACPI_INFO((AE_INFO, "%4.4s %p %05X",
+ ACPI_INFO((AE_INFO, "%4.4s %p %06X",
header->signature, ACPI_CAST_PTR(void, address),
header->length));
} else if (ACPI_VALIDATE_RSDP_SIG(header->signature)) {
@@ -147,7 +147,7 @@ acpi_tb_print_table_header(acpi_physical_address address,
header)->oem_id, ACPI_OEM_ID_SIZE);
acpi_tb_fix_string(local_header.oem_id, ACPI_OEM_ID_SIZE);
- ACPI_INFO((AE_INFO, "RSDP %p %05X (v%.2d %6.6s)",
+ ACPI_INFO((AE_INFO, "RSDP %p %06X (v%.2d %6.6s)",
ACPI_CAST_PTR(void, address),
(ACPI_CAST_PTR(struct acpi_table_rsdp, header)->
revision >
@@ -162,7 +162,7 @@ acpi_tb_print_table_header(acpi_physical_address address,
acpi_tb_cleanup_table_header(&local_header, header);
ACPI_INFO((AE_INFO,
- "%4.4s %p %05X (v%.2d %6.6s %8.8s %08X %4.4s %08X)",
+ "%4.4s %p %06X (v%.2d %6.6s %8.8s %08X %4.4s %08X)",
local_header.signature, ACPI_CAST_PTR(void, address),
local_header.length, local_header.revision,
local_header.oem_id, local_header.oem_table_id,
--
1.7.10
^ permalink raw reply related [flat|nested] 41+ messages in thread* [PATCH 03/20] ACPICA: Add a check for a null node during namespace walk.
2013-10-29 1:28 [PATCH 00/20] ACPICA: 20130927 Release Lv Zheng
2013-10-29 1:28 ` [PATCH 01/20] ACPICA: Ensure that debug output is immediately disabled on termination Lv Zheng
2013-10-29 1:28 ` [PATCH 02/20] ACPICA: Table print header function: Increase default width for table length Lv Zheng
@ 2013-10-29 1:29 ` Lv Zheng
2013-10-29 1:29 ` [PATCH 04/20] ACPICA: Add history/line-editing for Unix/Linux systems Lv Zheng
` (18 subsequent siblings)
21 siblings, 0 replies; 41+ messages in thread
From: Lv Zheng @ 2013-10-29 1:29 UTC (permalink / raw)
To: Rafael J. Wysocki, Robert Moore, Len Brown; +Cc: Lv Zheng, linux-acpi
From: Bob Moore <robert.moore@intel.com>
Mostly for consistency. ACPICA BZ 1042.
Actually, currently no one is experiencing problem without this check as
the obj_handle is guaranteed to be valid.
Buglink: https://bugs.acpica.org/show_bug.cgi?id=1042
Reported-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Lv Zheng <lv.zheng@intel.com>
---
drivers/acpi/acpica/nsdump.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/drivers/acpi/acpica/nsdump.c b/drivers/acpi/acpica/nsdump.c
index 8063385..c634854 100644
--- a/drivers/acpi/acpica/nsdump.c
+++ b/drivers/acpi/acpica/nsdump.c
@@ -715,6 +715,13 @@ acpi_ns_dump_one_object_path(acpi_handle obj_handle,
}
node = acpi_ns_validate_handle(obj_handle);
+ if (!node) {
+
+ /* Ignore bad node during namespace walk */
+
+ return (AE_OK);
+ }
+
pathname = acpi_ns_get_external_pathname(node);
path_indent = 1;
--
1.7.10
^ permalink raw reply related [flat|nested] 41+ messages in thread* [PATCH 04/20] ACPICA: Add history/line-editing for Unix/Linux systems.
2013-10-29 1:28 [PATCH 00/20] ACPICA: 20130927 Release Lv Zheng
` (2 preceding siblings ...)
2013-10-29 1:29 ` [PATCH 03/20] ACPICA: Add a check for a null node during namespace walk Lv Zheng
@ 2013-10-29 1:29 ` Lv Zheng
2013-10-29 1:29 ` [PATCH 05/20] ACPICA: Fix a macro for the hardware-reduced case Lv Zheng
` (17 subsequent siblings)
21 siblings, 0 replies; 41+ messages in thread
From: Lv Zheng @ 2013-10-29 1:29 UTC (permalink / raw)
To: Rafael J. Wysocki, Robert Moore, Len Brown; +Cc: Lv Zheng, linux-acpi
From: Bob Moore <robert.moore@intel.com>
Since the debugger is not shipped in the kernel, this patch doesn't
change any kernel behavior.
This change adds full history and limited line editing for Unix and
Linux systems. It does not use readline() because of portability issues.
Instead it uses the POSIX termio interface to put the terminal in raw
input mode so that the various special keys can be trapped (such as
up-arrow and down-arrow for history support).
Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Lv Zheng <lv.zheng@intel.com>
---
drivers/acpi/acpica/acdebug.h | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/acpi/acpica/acdebug.h b/drivers/acpi/acpica/acdebug.h
index 27c36a5..57cdc77 100644
--- a/drivers/acpi/acpica/acdebug.h
+++ b/drivers/acpi/acpica/acdebug.h
@@ -243,6 +243,8 @@ void acpi_db_display_history(void);
char *acpi_db_get_from_history(char *command_num_arg);
+char *acpi_db_get_history_by_index(u32 commandd_num);
+
/*
* dbinput - user front-end to the AML debugger
*/
--
1.7.10
^ permalink raw reply related [flat|nested] 41+ messages in thread* [PATCH 05/20] ACPICA: Fix a macro for the hardware-reduced case
2013-10-29 1:28 [PATCH 00/20] ACPICA: 20130927 Release Lv Zheng
` (3 preceding siblings ...)
2013-10-29 1:29 ` [PATCH 04/20] ACPICA: Add history/line-editing for Unix/Linux systems Lv Zheng
@ 2013-10-29 1:29 ` Lv Zheng
2013-10-29 1:29 ` [PATCH 06/20] ACPICA: Add safe versions of common string functions Lv Zheng
` (16 subsequent siblings)
21 siblings, 0 replies; 41+ messages in thread
From: Lv Zheng @ 2013-10-29 1:29 UTC (permalink / raw)
To: Rafael J. Wysocki, Robert Moore, Len Brown; +Cc: Lv Zheng, linux-acpi
From: Bob Moore <robert.moore@intel.com>
This fix repairs a version of a macro that is used for the hardware
reduced case only. It adds a return statement to the macro definition
so that the AcpiSrc translation will not completely delete the second
line of the macro because it thinks that it is an empty block. It actually
clarifies the use of the macro anyway.
Reported-by: Lv Zheng <lv.zheng@intel.com>
Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Lv Zheng <lv.zheng@intel.com>
---
include/acpi/acpixf.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/acpi/acpixf.h b/include/acpi/acpixf.h
index c7b1475..ebab0d8 100644
--- a/include/acpi/acpixf.h
+++ b/include/acpi/acpixf.h
@@ -106,7 +106,7 @@ extern u8 acpi_gbl_disable_ssdt_table_load;
static ACPI_INLINE prototype {return(AE_OK);}
#define ACPI_HW_DEPENDENT_RETURN_VOID(prototype) \
- static ACPI_INLINE prototype {}
+ static ACPI_INLINE prototype {return;}
#endif /* !ACPI_REDUCED_HARDWARE */
--
1.7.10
^ permalink raw reply related [flat|nested] 41+ messages in thread* [PATCH 06/20] ACPICA: Add safe versions of common string functions.
2013-10-29 1:28 [PATCH 00/20] ACPICA: 20130927 Release Lv Zheng
` (4 preceding siblings ...)
2013-10-29 1:29 ` [PATCH 05/20] ACPICA: Fix a macro for the hardware-reduced case Lv Zheng
@ 2013-10-29 1:29 ` Lv Zheng
2013-10-29 1:29 ` [PATCH 07/20] ACPICA: Cleanup memory allocation macros and configurability Lv Zheng
` (15 subsequent siblings)
21 siblings, 0 replies; 41+ messages in thread
From: Lv Zheng @ 2013-10-29 1:29 UTC (permalink / raw)
To: Rafael J. Wysocki, Robert Moore, Len Brown; +Cc: Lv Zheng, linux-acpi
From: Bob Moore <robert.moore@intel.com>
This change adds and deploys "safe" versions of strcpy and strcat that
ensure that the target buffer does not overflow. These safe functions
are only helpful for processing user input and command lines. For most
ACPICA code however, the required buffer length is precisely calculated
before buffer allocation, so the use of these functions is unnecessary.
ACPICA BZ 1043.
This change only applies to the ACPICA utilities and the debugger
implementation, both of them are not shipped in the kernel yet. So no
kernel behavior is changed by this commit.
Buglink: https://bugs.acpica.org/show_bug.cgi?id=1043
Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Lv Zheng <lv.zheng@intel.com>
---
drivers/acpi/acpica/aclocal.h | 2 +-
drivers/acpi/acpica/acutils.h | 11 +++++++
drivers/acpi/acpica/utstring.c | 62 ++++++++++++++++++++++++++++++++++++++++
3 files changed, 74 insertions(+), 1 deletion(-)
diff --git a/drivers/acpi/acpica/aclocal.h b/drivers/acpi/acpica/aclocal.h
index dafa0f6..53ed1a8 100644
--- a/drivers/acpi/acpica/aclocal.h
+++ b/drivers/acpi/acpica/aclocal.h
@@ -1072,7 +1072,7 @@ struct acpi_db_method_info {
char *name;
u32 flags;
u32 num_loops;
- char pathname[128];
+ char pathname[ACPI_DB_LINE_BUFFER_SIZE];
char **args;
acpi_object_type *types;
diff --git a/drivers/acpi/acpica/acutils.h b/drivers/acpi/acpica/acutils.h
index d5a62a6..4f25e8f 100644
--- a/drivers/acpi/acpica/acutils.h
+++ b/drivers/acpi/acpica/acutils.h
@@ -628,6 +628,17 @@ u8 acpi_ut_valid_acpi_char(char character, u32 position);
void acpi_ut_repair_name(char *name);
+#if defined (ACPI_DEBUGGER) || defined (ACPI_APPLICATION)
+u8 acpi_ut_safe_strcpy(char *dest, acpi_size dest_size, char *source);
+
+u8 acpi_ut_safe_strcat(char *dest, acpi_size dest_size, char *source);
+
+u8
+acpi_ut_safe_strncat(char *dest,
+ acpi_size dest_size,
+ char *source, acpi_size max_transfer_length);
+#endif
+
/*
* utmutex - mutex support
*/
diff --git a/drivers/acpi/acpica/utstring.c b/drivers/acpi/acpica/utstring.c
index cb1e9cc..5ef41ff 100644
--- a/drivers/acpi/acpica/utstring.c
+++ b/drivers/acpi/acpica/utstring.c
@@ -584,3 +584,65 @@ void ut_convert_backslashes(char *pathname)
}
}
#endif
+
+#if defined (ACPI_DEBUGGER) || defined (ACPI_APPLICATION)
+/*******************************************************************************
+ *
+ * FUNCTION: acpi_ut_safe_strcpy, acpi_ut_safe_strcat, acpi_ut_safe_strncat
+ *
+ * PARAMETERS: Adds a "DestSize" parameter to each of the standard string
+ * functions. This is the size of the Destination buffer.
+ *
+ * RETURN: TRUE if the operation would overflow the destination buffer.
+ *
+ * DESCRIPTION: Safe versions of standard Clib string functions. Ensure that
+ * the result of the operation will not overflow the output string
+ * buffer.
+ *
+ * NOTE: These functions are typically only helpful for processing
+ * user input and command lines. For most ACPICA code, the
+ * required buffer length is precisely calculated before buffer
+ * allocation, so the use of these functions is unnecessary.
+ *
+ ******************************************************************************/
+
+u8 acpi_ut_safe_strcpy(char *dest, acpi_size dest_size, char *source)
+{
+
+ if (ACPI_STRLEN(source) >= dest_size) {
+ return (TRUE);
+ }
+
+ ACPI_STRCPY(dest, source);
+ return (FALSE);
+}
+
+u8 acpi_ut_safe_strcat(char *dest, acpi_size dest_size, char *source)
+{
+
+ if ((ACPI_STRLEN(dest) + ACPI_STRLEN(source)) >= dest_size) {
+ return (TRUE);
+ }
+
+ ACPI_STRCAT(dest, source);
+ return (FALSE);
+}
+
+u8
+acpi_ut_safe_strncat(char *dest,
+ acpi_size dest_size,
+ char *source, acpi_size max_transfer_length)
+{
+ acpi_size actual_transfer_length;
+
+ actual_transfer_length =
+ ACPI_MIN(max_transfer_length, ACPI_STRLEN(source));
+
+ if ((ACPI_STRLEN(dest) + actual_transfer_length) >= dest_size) {
+ return (TRUE);
+ }
+
+ ACPI_STRNCAT(dest, source, max_transfer_length);
+ return (FALSE);
+}
+#endif
--
1.7.10
^ permalink raw reply related [flat|nested] 41+ messages in thread* [PATCH 07/20] ACPICA: Cleanup memory allocation macros and configurability.
2013-10-29 1:28 [PATCH 00/20] ACPICA: 20130927 Release Lv Zheng
` (5 preceding siblings ...)
2013-10-29 1:29 ` [PATCH 06/20] ACPICA: Add safe versions of common string functions Lv Zheng
@ 2013-10-29 1:29 ` Lv Zheng
2013-10-29 1:29 ` [PATCH 08/20] ACPICA: Predefine name macros: Sort list Lv Zheng
` (14 subsequent siblings)
21 siblings, 0 replies; 41+ messages in thread
From: Lv Zheng @ 2013-10-29 1:29 UTC (permalink / raw)
To: Rafael J. Wysocki, Robert Moore, Len Brown; +Cc: Lv Zheng, linux-acpi
In the common case, the ACPI_ALLOCATE and related macros now resolve
directly to their respective acpi_os* OSL interfaces. Two options:
1) The ACPI_ALLOCATE_ZEROED macro defaults to a simple local implementation
by default, unless overridden by the USE_NATIVE_ALLOCATE_ZEROED define.
2) For ACPI execution simulation environment (AcpiExec) which is not
shipped in the kernel, the macros can optionally be resolved to the
local interfaces that track each allocation (used to immediately detect
memory leaks).
Signed-off-by: Lv Zheng <lv.zheng@intel.com>
Signed-off-by: Bob Moore <robert.moore@intel.com>
---
drivers/acpi/acpica/acmacros.h | 31 -----------
drivers/acpi/acpica/acutils.h | 6 ---
drivers/acpi/acpica/utalloc.c | 113 ++++++++++++---------------------------
drivers/acpi/acpica/uttrack.c | 29 ++++++++--
include/acpi/acpiosxf.h | 2 +
include/acpi/acpixf.h | 9 ----
include/acpi/actypes.h | 27 ++++++++++
include/acpi/platform/aclinux.h | 15 ++++--
8 files changed, 100 insertions(+), 132 deletions(-)
diff --git a/drivers/acpi/acpica/acmacros.h b/drivers/acpi/acpica/acmacros.h
index 530a2f8..2a86c65 100644
--- a/drivers/acpi/acpica/acmacros.h
+++ b/drivers/acpi/acpica/acmacros.h
@@ -410,37 +410,6 @@
#endif
/*
- * Memory allocation tracking (DEBUG ONLY)
- */
-#define ACPI_MEM_PARAMETERS _COMPONENT, _acpi_module_name, __LINE__
-
-#ifndef ACPI_DBG_TRACK_ALLOCATIONS
-
-/* Memory allocation */
-
-#ifndef ACPI_ALLOCATE
-#define ACPI_ALLOCATE(a) acpi_ut_allocate((acpi_size) (a), ACPI_MEM_PARAMETERS)
-#endif
-#ifndef ACPI_ALLOCATE_ZEROED
-#define ACPI_ALLOCATE_ZEROED(a) acpi_ut_allocate_zeroed((acpi_size) (a), ACPI_MEM_PARAMETERS)
-#endif
-#ifndef ACPI_FREE
-#define ACPI_FREE(a) acpi_os_free(a)
-#endif
-#define ACPI_MEM_TRACKING(a)
-
-#else
-
-/* Memory allocation */
-
-#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_FREE(a) acpi_ut_free_and_track(a, ACPI_MEM_PARAMETERS)
-#define ACPI_MEM_TRACKING(a) a
-
-#endif /* ACPI_DBG_TRACK_ALLOCATIONS */
-
-/*
* Macros used for ACPICA utilities only
*/
diff --git a/drivers/acpi/acpica/acutils.h b/drivers/acpi/acpica/acutils.h
index 4f25e8f..be8180c 100644
--- a/drivers/acpi/acpica/acutils.h
+++ b/drivers/acpi/acpica/acutils.h
@@ -663,12 +663,6 @@ acpi_status
acpi_ut_initialize_buffer(struct acpi_buffer *buffer,
acpi_size required_length);
-void *acpi_ut_allocate(acpi_size size,
- u32 component, const char *module, u32 line);
-
-void *acpi_ut_allocate_zeroed(acpi_size size,
- u32 component, const char *module, u32 line);
-
#ifdef ACPI_DBG_TRACK_ALLOCATIONS
void *acpi_ut_allocate_and_track(acpi_size size,
u32 component, const char *module, u32 line);
diff --git a/drivers/acpi/acpica/utalloc.c b/drivers/acpi/acpica/utalloc.c
index e0ffb58..d844796 100644
--- a/drivers/acpi/acpica/utalloc.c
+++ b/drivers/acpi/acpica/utalloc.c
@@ -48,6 +48,39 @@
#define _COMPONENT ACPI_UTILITIES
ACPI_MODULE_NAME("utalloc")
+#if !defined (USE_NATIVE_ALLOCATE_ZEROED)
+/*******************************************************************************
+ *
+ * FUNCTION: acpi_os_allocate_zeroed
+ *
+ * PARAMETERS: size - Size of the allocation
+ *
+ * RETURN: Address of the allocated memory on success, NULL on failure.
+ *
+ * DESCRIPTION: Subsystem equivalent of calloc. Allocate and zero memory.
+ * This is the default implementation. Can be overridden via the
+ * USE_NATIVE_ALLOCATE_ZEROED flag.
+ *
+ ******************************************************************************/
+void *acpi_os_allocate_zeroed(acpi_size size)
+{
+ void *allocation;
+
+ ACPI_FUNCTION_ENTRY();
+
+ allocation = acpi_os_allocate(size);
+ if (allocation) {
+
+ /* Clear the memory block */
+
+ ACPI_MEMSET(allocation, 0, size);
+ }
+
+ return (allocation);
+}
+
+#endif /* !USE_NATIVE_ALLOCATE_ZEROED */
+
/*******************************************************************************
*
* FUNCTION: acpi_ut_create_caches
@@ -59,6 +92,7 @@ ACPI_MODULE_NAME("utalloc")
* DESCRIPTION: Create all local caches
*
******************************************************************************/
+
acpi_status acpi_ut_create_caches(void)
{
acpi_status status;
@@ -302,82 +336,3 @@ acpi_ut_initialize_buffer(struct acpi_buffer * buffer,
ACPI_MEMSET(buffer->pointer, 0, required_length);
return (AE_OK);
}
-
-#ifdef NOT_USED_BY_LINUX
-/*******************************************************************************
- *
- * FUNCTION: acpi_ut_allocate
- *
- * PARAMETERS: size - Size of the allocation
- * component - Component type of caller
- * module - Source file name of caller
- * line - Line number of caller
- *
- * RETURN: Address of the allocated memory on success, NULL on failure.
- *
- * DESCRIPTION: Subsystem equivalent of malloc.
- *
- ******************************************************************************/
-
-void *acpi_ut_allocate(acpi_size size,
- u32 component, const char *module, u32 line)
-{
- void *allocation;
-
- ACPI_FUNCTION_TRACE_U32(ut_allocate, size);
-
- /* Check for an inadvertent size of zero bytes */
-
- if (!size) {
- ACPI_WARNING((module, line,
- "Attempt to allocate zero bytes, allocating 1 byte"));
- size = 1;
- }
-
- allocation = acpi_os_allocate(size);
- if (!allocation) {
-
- /* Report allocation error */
-
- ACPI_WARNING((module, line,
- "Could not allocate size %u", (u32) size));
-
- return_PTR(NULL);
- }
-
- return_PTR(allocation);
-}
-
-/*******************************************************************************
- *
- * FUNCTION: acpi_ut_allocate_zeroed
- *
- * PARAMETERS: size - Size of the allocation
- * component - Component type of caller
- * module - Source file name of caller
- * line - Line number of caller
- *
- * RETURN: Address of the allocated memory on success, NULL on failure.
- *
- * DESCRIPTION: Subsystem equivalent of calloc. Allocate and zero memory.
- *
- ******************************************************************************/
-
-void *acpi_ut_allocate_zeroed(acpi_size size,
- u32 component, const char *module, u32 line)
-{
- void *allocation;
-
- ACPI_FUNCTION_ENTRY();
-
- allocation = acpi_ut_allocate(size, component, module, line);
- if (allocation) {
-
- /* Clear the memory block */
-
- ACPI_MEMSET(allocation, 0, size);
- }
-
- return (allocation);
-}
-#endif
diff --git a/drivers/acpi/acpica/uttrack.c b/drivers/acpi/acpica/uttrack.c
index 160f13f..77e3eb7 100644
--- a/drivers/acpi/acpica/uttrack.c
+++ b/drivers/acpi/acpica/uttrack.c
@@ -130,10 +130,23 @@ void *acpi_ut_allocate_and_track(acpi_size size,
struct acpi_debug_mem_block *allocation;
acpi_status status;
+ /* Check for an inadvertent size of zero bytes */
+
+ if (!size) {
+ ACPI_WARNING((module, line,
+ "Attempt to allocate zero bytes, allocating 1 byte"));
+ size = 1;
+ }
+
allocation =
- acpi_ut_allocate(size + sizeof(struct acpi_debug_mem_header),
- component, module, line);
+ acpi_os_allocate(size + sizeof(struct acpi_debug_mem_header));
if (!allocation) {
+
+ /* Report allocation error */
+
+ ACPI_WARNING((module, line,
+ "Could not allocate size %u", (u32)size));
+
return (NULL);
}
@@ -179,9 +192,17 @@ void *acpi_ut_allocate_zeroed_and_track(acpi_size size,
struct acpi_debug_mem_block *allocation;
acpi_status status;
+ /* Check for an inadvertent size of zero bytes */
+
+ if (!size) {
+ ACPI_WARNING((module, line,
+ "Attempt to allocate zero bytes, allocating 1 byte"));
+ size = 1;
+ }
+
allocation =
- acpi_ut_allocate_zeroed(size + sizeof(struct acpi_debug_mem_header),
- component, module, line);
+ acpi_os_allocate_zeroed(size +
+ sizeof(struct acpi_debug_mem_header));
if (!allocation) {
/* Report allocation error */
diff --git a/include/acpi/acpiosxf.h b/include/acpi/acpiosxf.h
index 64b8c76..7f95215 100644
--- a/include/acpi/acpiosxf.h
+++ b/include/acpi/acpiosxf.h
@@ -146,6 +146,8 @@ void acpi_os_release_mutex(acpi_mutex handle);
*/
void *acpi_os_allocate(acpi_size size);
+void *acpi_os_allocate_zeroed(acpi_size size);
+
void acpi_os_free(void *memory);
void __iomem *acpi_os_map_memory(acpi_physical_address where,
diff --git a/include/acpi/acpixf.h b/include/acpi/acpixf.h
index ebab0d8..ddde61b 100644
--- a/include/acpi/acpixf.h
+++ b/include/acpi/acpixf.h
@@ -159,15 +159,6 @@ acpi_decode_pld_buffer(u8 *in_buffer,
acpi_size length, struct acpi_pld_info **return_buffer);
/*
- * ACPI Memory management
- */
-void *acpi_allocate(u32 size);
-
-void *acpi_callocate(u32 size);
-
-void acpi_free(void *address);
-
-/*
* ACPI table load/unload interfaces
*/
acpi_status acpi_load_table(struct acpi_table_header *table);
diff --git a/include/acpi/actypes.h b/include/acpi/actypes.h
index f6abf23..fed5af2 100644
--- a/include/acpi/actypes.h
+++ b/include/acpi/actypes.h
@@ -306,6 +306,33 @@ typedef u32 acpi_physical_address;
#define ACPI_EXPORT_SYMBOL(symbol)
#endif
+/*******************************************************************************
+ *
+ * Configuration
+ *
+ ******************************************************************************/
+
+#ifdef ACPI_DBG_TRACK_ALLOCATIONS
+/*
+ * Memory allocation tracking (used by acpi_exec to detect memory leaks)
+ */
+#define ACPI_MEM_PARAMETERS _COMPONENT, _acpi_module_name, __LINE__
+#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_FREE(a) acpi_ut_free_and_track (a, ACPI_MEM_PARAMETERS)
+#define ACPI_MEM_TRACKING(a) a
+
+#else
+/*
+ * Normal memory allocation directly via the OS services layer
+ */
+#define ACPI_ALLOCATE(a) acpi_os_allocate ((acpi_size) (a))
+#define ACPI_ALLOCATE_ZEROED(a) acpi_os_allocate_zeroed ((acpi_size) (a))
+#define ACPI_FREE(a) acpi_os_free (a)
+#define ACPI_MEM_TRACKING(a)
+
+#endif /* ACPI_DBG_TRACK_ALLOCATIONS */
+
/******************************************************************************
*
* ACPI Specification constants (Do not change unless the specification changes)
diff --git a/include/acpi/platform/aclinux.h b/include/acpi/platform/aclinux.h
index fda0f3e..7346a92 100644
--- a/include/acpi/platform/aclinux.h
+++ b/include/acpi/platform/aclinux.h
@@ -119,6 +119,14 @@ static inline acpi_thread_id acpi_os_get_thread_id(void)
}
/*
+ * Memory allocation/deallocation
+ */
+
+/* Use native linux version of acpi_os_allocate_zeroed */
+
+#define USE_NATIVE_ALLOCATE_ZEROED
+
+/*
* The irqs_disabled() check is for resume from RAM.
* Interrupts are off during resume, just like they are for boot.
* However, boot has (system_state != SYSTEM_RUNNING)
@@ -140,9 +148,10 @@ static inline void *acpi_os_acquire_object(acpi_cache_t * cache)
irqs_disabled() ? GFP_ATOMIC : GFP_KERNEL);
}
-#define ACPI_ALLOCATE(a) acpi_os_allocate(a)
-#define ACPI_ALLOCATE_ZEROED(a) acpi_os_allocate_zeroed(a)
-#define ACPI_FREE(a) kfree(a)
+static inline void acpi_os_free(void *a)
+{
+ kfree(a);
+}
#ifndef CONFIG_PREEMPT
/*
--
1.7.10
^ permalink raw reply related [flat|nested] 41+ messages in thread* [PATCH 08/20] ACPICA: Predefine name macros: Sort list.
2013-10-29 1:28 [PATCH 00/20] ACPICA: 20130927 Release Lv Zheng
` (6 preceding siblings ...)
2013-10-29 1:29 ` [PATCH 07/20] ACPICA: Cleanup memory allocation macros and configurability Lv Zheng
@ 2013-10-29 1:29 ` Lv Zheng
2013-10-29 1:29 ` [PATCH 09/20] ACPICA: Fix possible memory leaks in the GPE handling Lv Zheng
` (13 subsequent siblings)
21 siblings, 0 replies; 41+ messages in thread
From: Lv Zheng @ 2013-10-29 1:29 UTC (permalink / raw)
To: Rafael J. Wysocki, Robert Moore, Len Brown; +Cc: Lv Zheng, linux-acpi
From: Bob Moore <robert.moore@intel.com>
Sort the method names.
Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Lv Zheng <lv.zheng@intel.com>
---
include/acpi/acnames.h | 26 +++++++++++++-------------
1 file changed, 13 insertions(+), 13 deletions(-)
diff --git a/include/acpi/acnames.h b/include/acpi/acnames.h
index ce08ef7..1f36777 100644
--- a/include/acpi/acnames.h
+++ b/include/acpi/acnames.h
@@ -46,25 +46,25 @@
/* Method names - these methods can appear anywhere in the namespace */
-#define METHOD_NAME__SB_ "_SB_"
-#define METHOD_NAME__HID "_HID"
-#define METHOD_NAME__CID "_CID"
-#define METHOD_NAME__UID "_UID"
-#define METHOD_NAME__SUB "_SUB"
#define METHOD_NAME__ADR "_ADR"
-#define METHOD_NAME__INI "_INI"
-#define METHOD_NAME__STA "_STA"
-#define METHOD_NAME__REG "_REG"
-#define METHOD_NAME__SEG "_SEG"
+#define METHOD_NAME__AEI "_AEI"
#define METHOD_NAME__BBN "_BBN"
-#define METHOD_NAME__PRT "_PRT"
+#define METHOD_NAME__CBA "_CBA"
+#define METHOD_NAME__CID "_CID"
#define METHOD_NAME__CRS "_CRS"
+#define METHOD_NAME__HID "_HID"
+#define METHOD_NAME__INI "_INI"
+#define METHOD_NAME__PLD "_PLD"
#define METHOD_NAME__PRS "_PRS"
-#define METHOD_NAME__AEI "_AEI"
+#define METHOD_NAME__PRT "_PRT"
#define METHOD_NAME__PRW "_PRW"
+#define METHOD_NAME__REG "_REG"
+#define METHOD_NAME__SB_ "_SB_"
+#define METHOD_NAME__SEG "_SEG"
#define METHOD_NAME__SRS "_SRS"
-#define METHOD_NAME__CBA "_CBA"
-#define METHOD_NAME__PLD "_PLD"
+#define METHOD_NAME__STA "_STA"
+#define METHOD_NAME__SUB "_SUB"
+#define METHOD_NAME__UID "_UID"
/* Method names - these methods must appear at the namespace root */
--
1.7.10
^ permalink raw reply related [flat|nested] 41+ messages in thread* [PATCH 09/20] ACPICA: Fix possible memory leaks in the GPE handling.
2013-10-29 1:28 [PATCH 00/20] ACPICA: 20130927 Release Lv Zheng
` (7 preceding siblings ...)
2013-10-29 1:29 ` [PATCH 08/20] ACPICA: Predefine name macros: Sort list Lv Zheng
@ 2013-10-29 1:29 ` Lv Zheng
2013-10-29 1:29 ` [PATCH 10/20] ACPICA: Hardcode access width for the reset register Lv Zheng
` (12 subsequent siblings)
21 siblings, 0 replies; 41+ messages in thread
From: Lv Zheng @ 2013-10-29 1:29 UTC (permalink / raw)
To: Rafael J. Wysocki, Robert Moore, Len Brown; +Cc: Lv Zheng, linux-acpi
This change fixes potential memory leaks in the error paths of the GPE
handling code. Lv Zheng.
Signed-off-by: Lv Zheng <lv.zheng@intel.com>
Signed-off-by: Bob Moore <robert.moore@intel.com>
---
drivers/acpi/acpica/evgpe.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/acpi/acpica/evgpe.c b/drivers/acpi/acpica/evgpe.c
index c8a1f7d..1979a25 100644
--- a/drivers/acpi/acpica/evgpe.c
+++ b/drivers/acpi/acpica/evgpe.c
@@ -522,6 +522,7 @@ static void ACPI_SYSTEM_XFACE acpi_ev_asynch_execute_gpe_method(void *context)
status = acpi_ut_release_mutex(ACPI_MTX_EVENTS);
if (ACPI_FAILURE(status)) {
+ ACPI_FREE(local_gpe_event_info);
return_VOID;
}
--
1.7.10
^ permalink raw reply related [flat|nested] 41+ messages in thread* [PATCH 10/20] ACPICA: Hardcode access width for the reset register.
2013-10-29 1:28 [PATCH 00/20] ACPICA: 20130927 Release Lv Zheng
` (8 preceding siblings ...)
2013-10-29 1:29 ` [PATCH 09/20] ACPICA: Fix possible memory leaks in the GPE handling Lv Zheng
@ 2013-10-29 1:29 ` Lv Zheng
2013-10-29 1:29 ` [PATCH 11/20] ACPICA: Add EXPORT_ACPI_INTERFACES macro to external interface modules Lv Zheng
` (11 subsequent siblings)
21 siblings, 0 replies; 41+ messages in thread
From: Lv Zheng @ 2013-10-29 1:29 UTC (permalink / raw)
To: Rafael J. Wysocki, Robert Moore, Len Brown; +Cc: Lv Zheng, linux-acpi
From: Bob Moore <robert.moore@intel.com>
The ACPI spec requires the reset register width to be 8, so we
now hardcode it and ignore the FADT value. This provides/maintains
compatibility with other ACPI implementations that have allowed
BIOS code with bad register width values to go unnoticed.
Matthew Garett, Bob Moore, Lv Zheng.
Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Lv Zheng <lv.zheng@intel.com>
---
drivers/acpi/acpica/hwxface.c | 10 ++++++++--
include/acpi/actypes.h | 1 +
2 files changed, 9 insertions(+), 2 deletions(-)
diff --git a/drivers/acpi/acpica/hwxface.c b/drivers/acpi/acpica/hwxface.c
index f81fb06..d3682c2 100644
--- a/drivers/acpi/acpica/hwxface.c
+++ b/drivers/acpi/acpica/hwxface.c
@@ -83,11 +83,17 @@ acpi_status acpi_reset(void)
* For I/O space, write directly to the OSL. This bypasses the port
* validation mechanism, which may block a valid write to the reset
* register.
- * Spec section 4.7.3.6 requires register width to be 8.
+ *
+ * NOTE:
+ * The ACPI spec requires the reset register width to be 8, so we
+ * hardcode it here and ignore the FADT value. This maintains
+ * compatibility with other ACPI implementations that have allowed
+ * BIOS code with bad register width values to go unnoticed.
*/
status =
acpi_os_write_port((acpi_io_address) reset_reg->address,
- acpi_gbl_FADT.reset_value, 8);
+ acpi_gbl_FADT.reset_value,
+ ACPI_RESET_REGISTER_WIDTH);
} else {
/* Write the reset value to the reset register */
diff --git a/include/acpi/actypes.h b/include/acpi/actypes.h
index fed5af2..63909d9 100644
--- a/include/acpi/actypes.h
+++ b/include/acpi/actypes.h
@@ -349,6 +349,7 @@ typedef u32 acpi_physical_address;
#define ACPI_PM1_REGISTER_WIDTH 16
#define ACPI_PM2_REGISTER_WIDTH 8
#define ACPI_PM_TIMER_WIDTH 32
+#define ACPI_RESET_REGISTER_WIDTH 8
/* Names within the namespace are 4 bytes long */
--
1.7.10
^ permalink raw reply related [flat|nested] 41+ messages in thread* [PATCH 11/20] ACPICA: Add EXPORT_ACPI_INTERFACES macro to external interface modules.
2013-10-29 1:28 [PATCH 00/20] ACPICA: 20130927 Release Lv Zheng
` (9 preceding siblings ...)
2013-10-29 1:29 ` [PATCH 10/20] ACPICA: Hardcode access width for the reset register Lv Zheng
@ 2013-10-29 1:29 ` Lv Zheng
2013-10-29 1:29 ` [PATCH 12/20] ACPICA: Update comment: no functional change Lv Zheng
` (10 subsequent siblings)
21 siblings, 0 replies; 41+ messages in thread
From: Lv Zheng @ 2013-10-29 1:29 UTC (permalink / raw)
To: Rafael J. Wysocki, Robert Moore, Len Brown; +Cc: Lv Zheng, linux-acpi
For Linux, there is no functional changes /binary generation differences
introduced by this patch.
This change adds this new macro to all files that contain external ACPICA
interfaces. It can be detected and used by the host (via the host-specific
header) for any special processing required for such modules. Lv Zheng.
Signed-off-by: Lv Zheng <lv.zheng@intel.com>
Signed-off-by: Bob Moore <robert.moore@intel.com>
---
drivers/acpi/acpica/evxface.c | 3 ++-
drivers/acpi/acpica/evxfevnt.c | 3 ++-
drivers/acpi/acpica/evxfgpe.c | 3 ++-
drivers/acpi/acpica/evxfregn.c | 3 ++-
drivers/acpi/acpica/hwtimer.c | 3 ++-
drivers/acpi/acpica/hwxface.c | 3 ++-
drivers/acpi/acpica/hwxfsleep.c | 3 ++-
drivers/acpi/acpica/nsxfeval.c | 3 ++-
drivers/acpi/acpica/nsxfname.c | 3 ++-
drivers/acpi/acpica/nsxfobj.c | 3 ++-
drivers/acpi/acpica/rsxface.c | 3 ++-
drivers/acpi/acpica/tbxface.c | 3 ++-
drivers/acpi/acpica/tbxfload.c | 3 ++-
drivers/acpi/acpica/utdebug.c | 3 ++-
drivers/acpi/acpica/utdecode.c | 1 -
drivers/acpi/acpica/utexcep.c | 3 ++-
drivers/acpi/acpica/utglobal.c | 2 +-
drivers/acpi/acpica/utxface.c | 3 ++-
drivers/acpi/acpica/utxferror.c | 3 ++-
drivers/acpi/acpica/utxfinit.c | 3 ++-
include/acpi/platform/aclinux.h | 12 ++++++++----
21 files changed, 45 insertions(+), 24 deletions(-)
diff --git a/drivers/acpi/acpica/evxface.c b/drivers/acpi/acpica/evxface.c
index 6f56146..6d88b13 100644
--- a/drivers/acpi/acpica/evxface.c
+++ b/drivers/acpi/acpica/evxface.c
@@ -41,7 +41,8 @@
* POSSIBILITY OF SUCH DAMAGES.
*/
-#include <linux/export.h>
+#define EXPORT_ACPI_INTERFACES
+
#include <acpi/acpi.h>
#include "accommon.h"
#include "acnamesp.h"
diff --git a/drivers/acpi/acpica/evxfevnt.c b/drivers/acpi/acpica/evxfevnt.c
index 7039606..39d06af 100644
--- a/drivers/acpi/acpica/evxfevnt.c
+++ b/drivers/acpi/acpica/evxfevnt.c
@@ -41,7 +41,8 @@
* POSSIBILITY OF SUCH DAMAGES.
*/
-#include <linux/export.h>
+#define EXPORT_ACPI_INTERFACES
+
#include <acpi/acpi.h>
#include "accommon.h"
#include "actables.h"
diff --git a/drivers/acpi/acpica/evxfgpe.c b/drivers/acpi/acpica/evxfgpe.c
index 7662f1a..fab40d9 100644
--- a/drivers/acpi/acpica/evxfgpe.c
+++ b/drivers/acpi/acpica/evxfgpe.c
@@ -41,7 +41,8 @@
* POSSIBILITY OF SUCH DAMAGES.
*/
-#include <linux/export.h>
+#define EXPORT_ACPI_INTERFACES
+
#include <acpi/acpi.h>
#include "accommon.h"
#include "acevents.h"
diff --git a/drivers/acpi/acpica/evxfregn.c b/drivers/acpi/acpica/evxfregn.c
index 80cecf8..1bd3225 100644
--- a/drivers/acpi/acpica/evxfregn.c
+++ b/drivers/acpi/acpica/evxfregn.c
@@ -42,7 +42,8 @@
* POSSIBILITY OF SUCH DAMAGES.
*/
-#include <linux/export.h>
+#define EXPORT_ACPI_INTERFACES
+
#include <acpi/acpi.h>
#include "accommon.h"
#include "acnamesp.h"
diff --git a/drivers/acpi/acpica/hwtimer.c b/drivers/acpi/acpica/hwtimer.c
index 2d7d22e..3c498dc 100644
--- a/drivers/acpi/acpica/hwtimer.c
+++ b/drivers/acpi/acpica/hwtimer.c
@@ -41,7 +41,8 @@
* POSSIBILITY OF SUCH DAMAGES.
*/
-#include <linux/export.h>
+#define EXPORT_ACPI_INTERFACES
+
#include <acpi/acpi.h>
#include "accommon.h"
diff --git a/drivers/acpi/acpica/hwxface.c b/drivers/acpi/acpica/hwxface.c
index d3682c2..b156848 100644
--- a/drivers/acpi/acpica/hwxface.c
+++ b/drivers/acpi/acpica/hwxface.c
@@ -41,7 +41,8 @@
* POSSIBILITY OF SUCH DAMAGES.
*/
-#include <linux/export.h>
+#define EXPORT_ACPI_INTERFACES
+
#include <acpi/acpi.h>
#include "accommon.h"
#include "acnamesp.h"
diff --git a/drivers/acpi/acpica/hwxfsleep.c b/drivers/acpi/acpica/hwxfsleep.c
index f2e669d..4895fca 100644
--- a/drivers/acpi/acpica/hwxfsleep.c
+++ b/drivers/acpi/acpica/hwxfsleep.c
@@ -41,7 +41,8 @@
* POSSIBILITY OF SUCH DAMAGES.
*/
-#include <linux/export.h>
+#define EXPORT_ACPI_INTERFACES
+
#include <acpi/acpi.h>
#include "accommon.h"
diff --git a/drivers/acpi/acpica/nsxfeval.c b/drivers/acpi/acpica/nsxfeval.c
index 481a6b4..a6e3bca 100644
--- a/drivers/acpi/acpica/nsxfeval.c
+++ b/drivers/acpi/acpica/nsxfeval.c
@@ -42,7 +42,8 @@
* POSSIBILITY OF SUCH DAMAGES.
*/
-#include <linux/export.h>
+#define EXPORT_ACPI_INTERFACES
+
#include <acpi/acpi.h>
#include "accommon.h"
#include "acnamesp.h"
diff --git a/drivers/acpi/acpica/nsxfname.c b/drivers/acpi/acpica/nsxfname.c
index 83c1644..3a6d78a 100644
--- a/drivers/acpi/acpica/nsxfname.c
+++ b/drivers/acpi/acpica/nsxfname.c
@@ -42,7 +42,8 @@
* POSSIBILITY OF SUCH DAMAGES.
*/
-#include <linux/export.h>
+#define EXPORT_ACPI_INTERFACES
+
#include <acpi/acpi.h>
#include "accommon.h"
#include "acnamesp.h"
diff --git a/drivers/acpi/acpica/nsxfobj.c b/drivers/acpi/acpica/nsxfobj.c
index c0853ef..94e961c 100644
--- a/drivers/acpi/acpica/nsxfobj.c
+++ b/drivers/acpi/acpica/nsxfobj.c
@@ -42,7 +42,8 @@
* POSSIBILITY OF SUCH DAMAGES.
*/
-#include <linux/export.h>
+#define EXPORT_ACPI_INTERFACES
+
#include <acpi/acpi.h>
#include "accommon.h"
#include "acnamesp.h"
diff --git a/drivers/acpi/acpica/rsxface.c b/drivers/acpi/acpica/rsxface.c
index 94e3517..01e4769 100644
--- a/drivers/acpi/acpica/rsxface.c
+++ b/drivers/acpi/acpica/rsxface.c
@@ -41,7 +41,8 @@
* POSSIBILITY OF SUCH DAMAGES.
*/
-#include <linux/export.h>
+#define EXPORT_ACPI_INTERFACES
+
#include <acpi/acpi.h>
#include "accommon.h"
#include "acresrc.h"
diff --git a/drivers/acpi/acpica/tbxface.c b/drivers/acpi/acpica/tbxface.c
index ad11162..2ad8532 100644
--- a/drivers/acpi/acpica/tbxface.c
+++ b/drivers/acpi/acpica/tbxface.c
@@ -41,7 +41,8 @@
* POSSIBILITY OF SUCH DAMAGES.
*/
-#include <linux/export.h>
+#define EXPORT_ACPI_INTERFACES
+
#include <acpi/acpi.h>
#include "accommon.h"
#include "actables.h"
diff --git a/drivers/acpi/acpica/tbxfload.c b/drivers/acpi/acpica/tbxfload.c
index 0ba9e32..2620dbe 100644
--- a/drivers/acpi/acpica/tbxfload.c
+++ b/drivers/acpi/acpica/tbxfload.c
@@ -41,7 +41,8 @@
* POSSIBILITY OF SUCH DAMAGES.
*/
-#include <linux/export.h>
+#define EXPORT_ACPI_INTERFACES
+
#include <acpi/acpi.h>
#include "accommon.h"
#include "acnamesp.h"
diff --git a/drivers/acpi/acpica/utdebug.c b/drivers/acpi/acpica/utdebug.c
index ffd0db5..1a67b39 100644
--- a/drivers/acpi/acpica/utdebug.c
+++ b/drivers/acpi/acpica/utdebug.c
@@ -41,7 +41,8 @@
* POSSIBILITY OF SUCH DAMAGES.
*/
-#include <linux/export.h>
+#define EXPORT_ACPI_INTERFACES
+
#include <acpi/acpi.h>
#include "accommon.h"
diff --git a/drivers/acpi/acpica/utdecode.c b/drivers/acpi/acpica/utdecode.c
index 11e2e02..b3f31dd 100644
--- a/drivers/acpi/acpica/utdecode.c
+++ b/drivers/acpi/acpica/utdecode.c
@@ -41,7 +41,6 @@
* POSSIBILITY OF SUCH DAMAGES.
*/
-#include <linux/export.h>
#include <acpi/acpi.h>
#include "accommon.h"
#include "acnamesp.h"
diff --git a/drivers/acpi/acpica/utexcep.c b/drivers/acpi/acpica/utexcep.c
index ff6d9e8..3cf7b59 100644
--- a/drivers/acpi/acpica/utexcep.c
+++ b/drivers/acpi/acpica/utexcep.c
@@ -41,8 +41,9 @@
* POSSIBILITY OF SUCH DAMAGES.
*/
+#define EXPORT_ACPI_INTERFACES
+
#define ACPI_DEFINE_EXCEPTION_TABLE
-#include <linux/export.h>
#include <acpi/acpi.h>
#include "accommon.h"
diff --git a/drivers/acpi/acpica/utglobal.c b/drivers/acpi/acpica/utglobal.c
index 046d5b0..4f59784 100644
--- a/drivers/acpi/acpica/utglobal.c
+++ b/drivers/acpi/acpica/utglobal.c
@@ -41,9 +41,9 @@
* POSSIBILITY OF SUCH DAMAGES.
*/
+#define EXPORT_ACPI_INTERFACES
#define DEFINE_ACPI_GLOBALS
-#include <linux/export.h>
#include <acpi/acpi.h>
#include "accommon.h"
diff --git a/drivers/acpi/acpica/utxface.c b/drivers/acpi/acpica/utxface.c
index 03a211e..2178da8 100644
--- a/drivers/acpi/acpica/utxface.c
+++ b/drivers/acpi/acpica/utxface.c
@@ -41,7 +41,8 @@
* POSSIBILITY OF SUCH DAMAGES.
*/
-#include <linux/export.h>
+#define EXPORT_ACPI_INTERFACES
+
#include <acpi/acpi.h>
#include "accommon.h"
#include "acdebug.h"
diff --git a/drivers/acpi/acpica/utxferror.c b/drivers/acpi/acpica/utxferror.c
index e966a2e..f7edb88 100644
--- a/drivers/acpi/acpica/utxferror.c
+++ b/drivers/acpi/acpica/utxferror.c
@@ -41,7 +41,8 @@
* POSSIBILITY OF SUCH DAMAGES.
*/
-#include <linux/export.h>
+#define EXPORT_ACPI_INTERFACES
+
#include <acpi/acpi.h>
#include "accommon.h"
diff --git a/drivers/acpi/acpica/utxfinit.c b/drivers/acpi/acpica/utxfinit.c
index 41ebaaf..dda18e6 100644
--- a/drivers/acpi/acpica/utxfinit.c
+++ b/drivers/acpi/acpica/utxfinit.c
@@ -41,7 +41,8 @@
* POSSIBILITY OF SUCH DAMAGES.
*/
-#include <linux/export.h>
+#define EXPORT_ACPI_INTERFACES
+
#include <acpi/acpi.h>
#include "accommon.h"
#include "acevents.h"
diff --git a/include/acpi/platform/aclinux.h b/include/acpi/platform/aclinux.h
index 7346a92..0e6e73c 100644
--- a/include/acpi/platform/aclinux.h
+++ b/include/acpi/platform/aclinux.h
@@ -74,7 +74,7 @@
#define acpi_spinlock spinlock_t *
#define acpi_cpu_flags unsigned long
-#else /* !__KERNEL__ */
+#else /* !__KERNEL__ */
#include <stdarg.h>
#include <string.h>
@@ -102,7 +102,7 @@
#define __cdecl
#endif
-#endif /* __KERNEL__ */
+#endif /* __KERNEL__ */
/* Linux uses GCC */
@@ -183,6 +183,10 @@ static inline void acpi_os_free(void *a)
lock ? AE_OK : AE_NO_MEMORY; \
})
-#endif /* __KERNEL__ */
+#ifdef EXPORT_ACPI_INTERFACES
+#include <linux/export.h>
+#endif
+
+#endif /* __KERNEL__ */
-#endif /* __ACLINUX_H__ */
+#endif /* __ACLINUX_H__ */
--
1.7.10
^ permalink raw reply related [flat|nested] 41+ messages in thread* [PATCH 12/20] ACPICA: Update comment: no functional change.
2013-10-29 1:28 [PATCH 00/20] ACPICA: 20130927 Release Lv Zheng
` (10 preceding siblings ...)
2013-10-29 1:29 ` [PATCH 11/20] ACPICA: Add EXPORT_ACPI_INTERFACES macro to external interface modules Lv Zheng
@ 2013-10-29 1:29 ` Lv Zheng
2013-10-29 1:30 ` [PATCH 13/20] ACPICA: Linuxize: Change indentation of C labels Lv Zheng
` (9 subsequent siblings)
21 siblings, 0 replies; 41+ messages in thread
From: Lv Zheng @ 2013-10-29 1:29 UTC (permalink / raw)
To: Rafael J. Wysocki, Robert Moore, Len Brown; +Cc: Lv Zheng, linux-acpi
From: Bob Moore <robert.moore@intel.com>
Adds a comment to clarify reason for using ACPI_FREE_BUFFER directly
instead of ACPI_FREE.
Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Lv Zheng <lv.zheng@intel.com>
---
drivers/acpi/acpica/nsxfeval.c | 2 +-
include/acpi/actypes.h | 10 +++++++---
2 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/drivers/acpi/acpica/nsxfeval.c b/drivers/acpi/acpica/nsxfeval.c
index a6e3bca..ce2a845 100644
--- a/drivers/acpi/acpica/nsxfeval.c
+++ b/drivers/acpi/acpica/nsxfeval.c
@@ -139,7 +139,7 @@ acpi_evaluate_object_typed(acpi_handle handle,
/* Caller used ACPI_ALLOCATE_BUFFER, free the return buffer */
- ACPI_FREE(return_buffer->pointer);
+ ACPI_FREE_BUFFER(*return_buffer);
return_buffer->pointer = NULL;
}
diff --git a/include/acpi/actypes.h b/include/acpi/actypes.h
index 63909d9..0bb23e6 100644
--- a/include/acpi/actypes.h
+++ b/include/acpi/actypes.h
@@ -919,9 +919,13 @@ struct acpi_buffer {
void *pointer; /* pointer to buffer */
};
-/* Free a buffer created in an struct acpi_buffer via ACPI_ALLOCATE_LOCAL_BUFFER */
-
-#define ACPI_FREE_BUFFER(b) ACPI_FREE(b.pointer)
+/*
+ * Free a buffer created in an struct acpi_buffer via ACPI_ALLOCATE_BUFFER.
+ * Note: We use acpi_os_free here because acpi_os_allocate was used to allocate
+ * the buffer. This purposefully bypasses the internal allocation tracking
+ * mechanism (if it is enabled).
+ */
+#define ACPI_FREE_BUFFER(b) acpi_os_free((b).pointer)
/*
* name_type for acpi_get_name
--
1.7.10
^ permalink raw reply related [flat|nested] 41+ messages in thread* [PATCH 13/20] ACPICA: Linuxize: Change indentation of C labels.
2013-10-29 1:28 [PATCH 00/20] ACPICA: 20130927 Release Lv Zheng
` (11 preceding siblings ...)
2013-10-29 1:29 ` [PATCH 12/20] ACPICA: Update comment: no functional change Lv Zheng
@ 2013-10-29 1:30 ` Lv Zheng
2013-10-29 1:30 ` [PATCH 14/20] ACPICA: Deploy ACPI_EXPORT_SYMBOL_INIT for main ACPICA initialization interfaces Lv Zheng
` (8 subsequent siblings)
21 siblings, 0 replies; 41+ messages in thread
From: Lv Zheng @ 2013-10-29 1:30 UTC (permalink / raw)
To: Rafael J. Wysocki, Robert Moore, Len Brown; +Cc: Lv Zheng, linux-acpi
It is reported by kernel build test systems that all ACPICA linuxized
files have incorrect label indentation. This patch changes default indent
option used in the release process to fix this bug. Lv Zheng.
Signed-off-by: Lv Zheng <lv.zheng@intel.com>
Signed-off-by: Bob Moore <robert.moore@intel.com>
---
drivers/acpi/acpica/dsargs.c | 2 +-
drivers/acpi/acpica/dsfield.c | 2 +-
drivers/acpi/acpica/dsmethod.c | 4 ++--
drivers/acpi/acpica/dsobject.c | 2 +-
drivers/acpi/acpica/dsopcode.c | 2 +-
drivers/acpi/acpica/dsutils.c | 10 +++++-----
drivers/acpi/acpica/dswexec.c | 6 +++---
drivers/acpi/acpica/dswload2.c | 2 +-
drivers/acpi/acpica/evglock.c | 2 +-
drivers/acpi/acpica/evgpe.c | 2 +-
drivers/acpi/acpica/evgpeblk.c | 6 +++---
drivers/acpi/acpica/evgpeinit.c | 2 +-
drivers/acpi/acpica/evgpeutil.c | 2 +-
drivers/acpi/acpica/evhandler.c | 4 ++--
drivers/acpi/acpica/evregion.c | 6 +++---
drivers/acpi/acpica/evxface.c | 12 ++++++------
drivers/acpi/acpica/evxfgpe.c | 6 +++---
drivers/acpi/acpica/evxfregn.c | 4 ++--
drivers/acpi/acpica/excreate.c | 8 ++++----
drivers/acpi/acpica/exfield.c | 2 +-
drivers/acpi/acpica/exfldio.c | 2 +-
drivers/acpi/acpica/exmisc.c | 4 ++--
drivers/acpi/acpica/exoparg1.c | 8 ++++----
drivers/acpi/acpica/exoparg2.c | 10 +++++-----
drivers/acpi/acpica/exoparg3.c | 4 ++--
drivers/acpi/acpica/exoparg6.c | 2 +-
drivers/acpi/acpica/exresolv.c | 2 +-
drivers/acpi/acpica/exresop.c | 2 +-
drivers/acpi/acpica/hwregs.c | 2 +-
drivers/acpi/acpica/hwxface.c | 4 ++--
drivers/acpi/acpica/nsaccess.c | 2 +-
drivers/acpi/acpica/nsdump.c | 2 +-
drivers/acpi/acpica/nseval.c | 4 ++--
drivers/acpi/acpica/nsinit.c | 2 +-
drivers/acpi/acpica/nsload.c | 2 +-
drivers/acpi/acpica/nsparse.c | 2 +-
drivers/acpi/acpica/nspredef.c | 2 +-
drivers/acpi/acpica/nsprepkg.c | 4 ++--
drivers/acpi/acpica/nsrepair.c | 2 +-
drivers/acpi/acpica/nsrepair2.c | 2 +-
drivers/acpi/acpica/nsutils.c | 2 +-
drivers/acpi/acpica/nsxfeval.c | 12 ++++++------
drivers/acpi/acpica/nsxfname.c | 4 ++--
drivers/acpi/acpica/nsxfobj.c | 4 ++--
drivers/acpi/acpica/psparse.c | 2 +-
drivers/acpi/acpica/psxface.c | 6 +++---
drivers/acpi/acpica/rsmisc.c | 4 ++--
drivers/acpi/acpica/rsutils.c | 2 +-
drivers/acpi/acpica/tbinstal.c | 6 +++---
drivers/acpi/acpica/tbutils.c | 2 +-
drivers/acpi/acpica/tbxface.c | 4 ++--
drivers/acpi/acpica/tbxfload.c | 4 ++--
drivers/acpi/acpica/utcopy.c | 4 ++--
drivers/acpi/acpica/utdelete.c | 2 +-
drivers/acpi/acpica/uteval.c | 2 +-
drivers/acpi/acpica/utids.c | 2 +-
drivers/acpi/acpica/utownerid.c | 2 +-
drivers/acpi/acpica/utresrc.c | 4 ++--
drivers/acpi/acpica/utstring.c | 4 ++--
drivers/acpi/acpica/uttrack.c | 2 +-
60 files changed, 112 insertions(+), 112 deletions(-)
diff --git a/drivers/acpi/acpica/dsargs.c b/drivers/acpi/acpica/dsargs.c
index fb09b08..afdc6df 100644
--- a/drivers/acpi/acpica/dsargs.c
+++ b/drivers/acpi/acpica/dsargs.c
@@ -158,7 +158,7 @@ acpi_ds_execute_arguments(struct acpi_namespace_node *node,
walk_state->deferred_node = node;
status = acpi_ps_parse_aml(walk_state);
- cleanup:
+cleanup:
acpi_ps_delete_parse_tree(op);
return_ACPI_STATUS(status);
}
diff --git a/drivers/acpi/acpica/dsfield.c b/drivers/acpi/acpica/dsfield.c
index d4bfe7b..2d4c073 100644
--- a/drivers/acpi/acpica/dsfield.c
+++ b/drivers/acpi/acpica/dsfield.c
@@ -259,7 +259,7 @@ acpi_ds_create_buffer_field(union acpi_parse_object *op,
goto cleanup;
}
- cleanup:
+cleanup:
/* Remove local reference to the object */
diff --git a/drivers/acpi/acpica/dsmethod.c b/drivers/acpi/acpica/dsmethod.c
index a9ffd44..df3ea12 100644
--- a/drivers/acpi/acpica/dsmethod.c
+++ b/drivers/acpi/acpica/dsmethod.c
@@ -294,7 +294,7 @@ acpi_ds_begin_method_execution(struct acpi_namespace_node *method_node,
obj_desc->method.thread_count++;
return_ACPI_STATUS(status);
- cleanup:
+cleanup:
/* On error, must release the method mutex (if present) */
if (obj_desc->method.mutex) {
@@ -424,7 +424,7 @@ acpi_ds_call_control_method(struct acpi_thread_state *thread,
return_ACPI_STATUS(status);
- cleanup:
+cleanup:
/* On error, we must terminate the method properly */
diff --git a/drivers/acpi/acpica/dsobject.c b/drivers/acpi/acpica/dsobject.c
index 63f0d22..b1746a6 100644
--- a/drivers/acpi/acpica/dsobject.c
+++ b/drivers/acpi/acpica/dsobject.c
@@ -240,7 +240,7 @@ acpi_ds_build_internal_object(struct acpi_walk_state *walk_state,
return_ACPI_STATUS(status);
}
- exit:
+exit:
*obj_desc_ptr = obj_desc;
return_ACPI_STATUS(status);
}
diff --git a/drivers/acpi/acpica/dsopcode.c b/drivers/acpi/acpica/dsopcode.c
index 1fc1ff1..5205edc 100644
--- a/drivers/acpi/acpica/dsopcode.c
+++ b/drivers/acpi/acpica/dsopcode.c
@@ -257,7 +257,7 @@ acpi_ds_init_buffer_field(u16 aml_opcode,
(buffer_desc->common.reference_count +
obj_desc->common.reference_count);
- cleanup:
+cleanup:
/* Always delete the operands */
diff --git a/drivers/acpi/acpica/dsutils.c b/drivers/acpi/acpica/dsutils.c
index c666fc0..ade44e4 100644
--- a/drivers/acpi/acpica/dsutils.c
+++ b/drivers/acpi/acpica/dsutils.c
@@ -299,7 +299,7 @@ acpi_ds_is_result_used(union acpi_parse_object * op,
goto result_used;
}
- result_used:
+result_used:
ACPI_DEBUG_PRINT((ACPI_DB_DISPATCH,
"Result of [%s] used by Parent [%s] Op=%p\n",
acpi_ps_get_opcode_name(op->common.aml_opcode),
@@ -308,7 +308,7 @@ acpi_ds_is_result_used(union acpi_parse_object * op,
return_UINT8(TRUE);
- result_not_used:
+result_not_used:
ACPI_DEBUG_PRINT((ACPI_DB_DISPATCH,
"Result of [%s] not used by Parent [%s] Op=%p\n",
acpi_ps_get_opcode_name(op->common.aml_opcode),
@@ -752,7 +752,7 @@ acpi_ds_create_operands(struct acpi_walk_state *walk_state,
return_ACPI_STATUS(status);
- cleanup:
+cleanup:
/*
* We must undo everything done above; meaning that we must
* pop everything off of the operand stack and delete those
@@ -851,7 +851,7 @@ acpi_status acpi_ds_evaluate_name_path(struct acpi_walk_state *walk_state)
goto exit;
}
- push_result:
+push_result:
walk_state->result_obj = new_obj_desc;
@@ -863,7 +863,7 @@ acpi_status acpi_ds_evaluate_name_path(struct acpi_walk_state *walk_state)
op->common.flags |= ACPI_PARSEOP_IN_STACK;
}
- exit:
+exit:
return_ACPI_STATUS(status);
}
diff --git a/drivers/acpi/acpica/dswexec.c b/drivers/acpi/acpica/dswexec.c
index 151d924..1bbb22f 100644
--- a/drivers/acpi/acpica/dswexec.c
+++ b/drivers/acpi/acpica/dswexec.c
@@ -170,7 +170,7 @@ acpi_ds_get_predicate_value(struct acpi_walk_state *walk_state,
(void)acpi_ds_do_implicit_return(local_obj_desc, walk_state, TRUE);
- cleanup:
+cleanup:
ACPI_DEBUG_PRINT((ACPI_DB_EXEC, "Completed a predicate eval=%X Op=%p\n",
walk_state->control_state->common.value,
@@ -335,7 +335,7 @@ acpi_ds_exec_begin_op(struct acpi_walk_state *walk_state,
return_ACPI_STATUS(status);
- error_exit:
+error_exit:
status = acpi_ds_method_error(status, walk_state);
return_ACPI_STATUS(status);
}
@@ -722,7 +722,7 @@ acpi_status acpi_ds_exec_end_op(struct acpi_walk_state *walk_state)
walk_state->result_obj = NULL;
}
- cleanup:
+cleanup:
if (walk_state->result_obj) {
diff --git a/drivers/acpi/acpica/dswload2.c b/drivers/acpi/acpica/dswload2.c
index b1f8f47..7f569d5 100644
--- a/drivers/acpi/acpica/dswload2.c
+++ b/drivers/acpi/acpica/dswload2.c
@@ -728,7 +728,7 @@ acpi_status acpi_ds_load2_end_op(struct acpi_walk_state *walk_state)
break;
}
- cleanup:
+cleanup:
/* Remove the Node pushed at the very beginning */
diff --git a/drivers/acpi/acpica/evglock.c b/drivers/acpi/acpica/evglock.c
index fdb0a76..4c67193 100644
--- a/drivers/acpi/acpica/evglock.c
+++ b/drivers/acpi/acpica/evglock.c
@@ -173,7 +173,7 @@ static u32 acpi_ev_global_lock_handler(void *context)
acpi_gbl_global_lock_pending = FALSE;
- cleanup_and_exit:
+cleanup_and_exit:
acpi_os_release_lock(acpi_gbl_global_lock_pending_lock, flags);
return (ACPI_INTERRUPT_HANDLED);
diff --git a/drivers/acpi/acpica/evgpe.c b/drivers/acpi/acpica/evgpe.c
index 1979a25..a9cb4a1 100644
--- a/drivers/acpi/acpica/evgpe.c
+++ b/drivers/acpi/acpica/evgpe.c
@@ -458,7 +458,7 @@ u32 acpi_ev_gpe_detect(struct acpi_gpe_xrupt_info * gpe_xrupt_list)
gpe_block = gpe_block->next;
}
- unlock_and_exit:
+unlock_and_exit:
acpi_os_release_lock(acpi_gbl_gpe_lock, flags);
return (int_status);
diff --git a/drivers/acpi/acpica/evgpeblk.c b/drivers/acpi/acpica/evgpeblk.c
index c1aa1ed..a9e76bc 100644
--- a/drivers/acpi/acpica/evgpeblk.c
+++ b/drivers/acpi/acpica/evgpeblk.c
@@ -111,7 +111,7 @@ acpi_ev_install_gpe_block(struct acpi_gpe_block_info *gpe_block,
gpe_block->xrupt_block = gpe_xrupt_block;
acpi_os_release_lock(acpi_gbl_gpe_lock, flags);
- unlock_and_exit:
+unlock_and_exit:
status = acpi_ut_release_mutex(ACPI_MTX_EVENTS);
return_ACPI_STATUS(status);
}
@@ -178,7 +178,7 @@ acpi_status acpi_ev_delete_gpe_block(struct acpi_gpe_block_info *gpe_block)
ACPI_FREE(gpe_block->event_info);
ACPI_FREE(gpe_block);
- unlock_and_exit:
+unlock_and_exit:
status = acpi_ut_release_mutex(ACPI_MTX_EVENTS);
return_ACPI_STATUS(status);
}
@@ -302,7 +302,7 @@ acpi_ev_create_gpe_info_blocks(struct acpi_gpe_block_info *gpe_block)
return_ACPI_STATUS(AE_OK);
- error_exit:
+error_exit:
if (gpe_register_info) {
ACPI_FREE(gpe_register_info);
}
diff --git a/drivers/acpi/acpica/evgpeinit.c b/drivers/acpi/acpica/evgpeinit.c
index 7842700..a3e2f38 100644
--- a/drivers/acpi/acpica/evgpeinit.c
+++ b/drivers/acpi/acpica/evgpeinit.c
@@ -203,7 +203,7 @@ acpi_status acpi_ev_gpe_initialize(void)
goto cleanup;
}
- cleanup:
+cleanup:
(void)acpi_ut_release_mutex(ACPI_MTX_NAMESPACE);
return_ACPI_STATUS(AE_OK);
}
diff --git a/drivers/acpi/acpica/evgpeutil.c b/drivers/acpi/acpica/evgpeutil.c
index d523390..d3f5e1e 100644
--- a/drivers/acpi/acpica/evgpeutil.c
+++ b/drivers/acpi/acpica/evgpeutil.c
@@ -101,7 +101,7 @@ acpi_ev_walk_gpe_list(acpi_gpe_callback gpe_walk_callback, void *context)
gpe_xrupt_info = gpe_xrupt_info->next;
}
- unlock_and_exit:
+unlock_and_exit:
acpi_os_release_lock(acpi_gbl_gpe_lock, flags);
return_ACPI_STATUS(status);
}
diff --git a/drivers/acpi/acpica/evhandler.c b/drivers/acpi/acpica/evhandler.c
index 068af96..e315731 100644
--- a/drivers/acpi/acpica/evhandler.c
+++ b/drivers/acpi/acpica/evhandler.c
@@ -129,7 +129,7 @@ acpi_status acpi_ev_install_region_handlers(void)
}
}
- unlock_and_exit:
+unlock_and_exit:
(void)acpi_ut_release_mutex(ACPI_MTX_NAMESPACE);
return_ACPI_STATUS(status);
}
@@ -531,6 +531,6 @@ acpi_ev_install_space_handler(struct acpi_namespace_node * node,
acpi_ev_install_handler, NULL,
handler_obj, NULL);
- unlock_and_exit:
+unlock_and_exit:
return_ACPI_STATUS(status);
}
diff --git a/drivers/acpi/acpica/evregion.c b/drivers/acpi/acpica/evregion.c
index 6293d6b..144cbb9 100644
--- a/drivers/acpi/acpica/evregion.c
+++ b/drivers/acpi/acpica/evregion.c
@@ -573,10 +573,10 @@ acpi_ev_execute_reg_method(union acpi_operand_object *region_obj, u32 function)
status = acpi_ns_evaluate(info);
acpi_ut_remove_reference(args[1]);
- cleanup2:
+cleanup2:
acpi_ut_remove_reference(args[0]);
- cleanup1:
+cleanup1:
ACPI_FREE(info);
return_ACPI_STATUS(status);
}
@@ -761,7 +761,7 @@ acpi_ev_orphan_ec_reg_method(struct acpi_namespace_node *ec_device_node)
status = acpi_evaluate_object(reg_method, NULL, &args, NULL);
- exit:
+exit:
/* We ignore all errors from above, don't care */
status = acpi_ut_acquire_mutex(ACPI_MTX_NAMESPACE);
diff --git a/drivers/acpi/acpica/evxface.c b/drivers/acpi/acpica/evxface.c
index 6d88b13..23a7fad 100644
--- a/drivers/acpi/acpica/evxface.c
+++ b/drivers/acpi/acpica/evxface.c
@@ -375,7 +375,7 @@ acpi_status acpi_install_exception_handler(acpi_exception_handler handler)
acpi_gbl_exception_handler = handler;
- cleanup:
+cleanup:
(void)acpi_ut_release_mutex(ACPI_MTX_EVENTS);
return_ACPI_STATUS(status);
}
@@ -445,12 +445,12 @@ acpi_status acpi_install_sci_handler(acpi_sci_handler address, void *context)
new_sci_handler->next = acpi_gbl_sci_handler_list;
acpi_gbl_sci_handler_list = new_sci_handler;
- unlock_and_exit:
+unlock_and_exit:
acpi_os_release_lock(acpi_gbl_gpe_lock, flags);
(void)acpi_ut_release_mutex(ACPI_MTX_EVENTS);
- exit:
+exit:
if (ACPI_FAILURE(status)) {
ACPI_FREE(new_sci_handler);
}
@@ -517,7 +517,7 @@ acpi_status acpi_remove_sci_handler(acpi_sci_handler address)
acpi_os_release_lock(acpi_gbl_gpe_lock, flags);
status = AE_NOT_EXIST;
- unlock_and_exit:
+unlock_and_exit:
(void)acpi_ut_release_mutex(ACPI_MTX_EVENTS);
return_ACPI_STATUS(status);
}
@@ -566,7 +566,7 @@ acpi_install_global_event_handler(acpi_gbl_event_handler handler, void *context)
acpi_gbl_global_event_handler = handler;
acpi_gbl_global_event_handler_context = context;
- cleanup:
+cleanup:
(void)acpi_ut_release_mutex(ACPI_MTX_EVENTS);
return_ACPI_STATUS(status);
}
@@ -638,7 +638,7 @@ acpi_install_fixed_event_handler(u32 event,
handler));
}
- cleanup:
+cleanup:
(void)acpi_ut_release_mutex(ACPI_MTX_EVENTS);
return_ACPI_STATUS(status);
}
diff --git a/drivers/acpi/acpica/evxfgpe.c b/drivers/acpi/acpica/evxfgpe.c
index fab40d9..5713da7 100644
--- a/drivers/acpi/acpica/evxfgpe.c
+++ b/drivers/acpi/acpica/evxfgpe.c
@@ -472,7 +472,7 @@ acpi_get_gpe_status(acpi_handle gpe_device,
if (gpe_event_info->flags & ACPI_GPE_DISPATCH_MASK)
*event_status |= ACPI_EVENT_FLAG_HANDLE;
- unlock_and_exit:
+unlock_and_exit:
acpi_os_release_lock(acpi_gbl_gpe_lock, flags);
return_ACPI_STATUS(status);
}
@@ -625,7 +625,7 @@ acpi_install_gpe_block(acpi_handle gpe_device,
obj_desc->device.gpe_block = gpe_block;
- unlock_and_exit:
+unlock_and_exit:
(void)acpi_ut_release_mutex(ACPI_MTX_NAMESPACE);
return_ACPI_STATUS(status);
}
@@ -680,7 +680,7 @@ acpi_status acpi_remove_gpe_block(acpi_handle gpe_device)
obj_desc->device.gpe_block = NULL;
}
- unlock_and_exit:
+unlock_and_exit:
(void)acpi_ut_release_mutex(ACPI_MTX_NAMESPACE);
return_ACPI_STATUS(status);
}
diff --git a/drivers/acpi/acpica/evxfregn.c b/drivers/acpi/acpica/evxfregn.c
index 1bd3225..02ed75a 100644
--- a/drivers/acpi/acpica/evxfregn.c
+++ b/drivers/acpi/acpica/evxfregn.c
@@ -148,7 +148,7 @@ acpi_install_address_space_handler(acpi_handle device,
status = acpi_ev_execute_reg_methods(node, space_id);
- unlock_and_exit:
+unlock_and_exit:
(void)acpi_ut_release_mutex(ACPI_MTX_NAMESPACE);
return_ACPI_STATUS(status);
}
@@ -287,7 +287,7 @@ acpi_remove_address_space_handler(acpi_handle device,
status = AE_NOT_EXIST;
- unlock_and_exit:
+unlock_and_exit:
(void)acpi_ut_release_mutex(ACPI_MTX_NAMESPACE);
return_ACPI_STATUS(status);
}
diff --git a/drivers/acpi/acpica/excreate.c b/drivers/acpi/acpica/excreate.c
index 269e81d..3c2e6dc 100644
--- a/drivers/acpi/acpica/excreate.c
+++ b/drivers/acpi/acpica/excreate.c
@@ -193,7 +193,7 @@ acpi_status acpi_ex_create_event(struct acpi_walk_state *walk_state)
acpi_ns_attach_object((struct acpi_namespace_node *)walk_state->
operands[0], obj_desc, ACPI_TYPE_EVENT);
- cleanup:
+cleanup:
/*
* Remove local reference to the object (on error, will cause deletion
* of both object and semaphore if present.)
@@ -248,7 +248,7 @@ acpi_status acpi_ex_create_mutex(struct acpi_walk_state *walk_state)
acpi_ns_attach_object(obj_desc->mutex.node, obj_desc,
ACPI_TYPE_MUTEX);
- cleanup:
+cleanup:
/*
* Remove local reference to the object (on error, will cause deletion
* of both object and semaphore if present.)
@@ -347,7 +347,7 @@ acpi_ex_create_region(u8 * aml_start,
status = acpi_ns_attach_object(node, obj_desc, ACPI_TYPE_REGION);
- cleanup:
+cleanup:
/* Remove local reference to the object */
@@ -520,7 +520,7 @@ acpi_ex_create_method(u8 * aml_start,
acpi_ut_remove_reference(obj_desc);
- exit:
+exit:
/* Remove a reference to the operand */
acpi_ut_remove_reference(operand[1]);
diff --git a/drivers/acpi/acpica/exfield.c b/drivers/acpi/acpica/exfield.c
index c2a65aa..cfd8752 100644
--- a/drivers/acpi/acpica/exfield.c
+++ b/drivers/acpi/acpica/exfield.c
@@ -197,7 +197,7 @@ acpi_ex_read_data_from_field(struct acpi_walk_state *walk_state,
status = acpi_ex_extract_from_field(obj_desc, buffer, (u32) length);
acpi_ex_release_global_lock(obj_desc->common_field.field_flags);
- exit:
+exit:
if (ACPI_FAILURE(status)) {
acpi_ut_remove_reference(buffer_desc);
} else {
diff --git a/drivers/acpi/acpica/exfldio.c b/drivers/acpi/acpica/exfldio.c
index 7e0afe7..8ab01b6 100644
--- a/drivers/acpi/acpica/exfldio.c
+++ b/drivers/acpi/acpica/exfldio.c
@@ -1002,7 +1002,7 @@ acpi_ex_insert_into_field(union acpi_operand_object *obj_desc,
mask, merged_datum,
field_offset);
- exit:
+exit:
/* Free temporary buffer if we used one */
if (new_buffer) {
diff --git a/drivers/acpi/acpica/exmisc.c b/drivers/acpi/acpica/exmisc.c
index 00bf298..65d9360 100644
--- a/drivers/acpi/acpica/exmisc.c
+++ b/drivers/acpi/acpica/exmisc.c
@@ -388,7 +388,7 @@ acpi_ex_do_concatenate(union acpi_operand_object *operand0,
*actual_return_desc = return_desc;
- cleanup:
+cleanup:
if (local_operand1 != operand1) {
acpi_ut_remove_reference(local_operand1);
}
@@ -718,7 +718,7 @@ acpi_ex_do_logical_op(u16 opcode,
}
}
- cleanup:
+cleanup:
/* New object was created if implicit conversion performed - delete */
diff --git a/drivers/acpi/acpica/exoparg1.c b/drivers/acpi/acpica/exoparg1.c
index 2cdd41d..d74cea4 100644
--- a/drivers/acpi/acpica/exoparg1.c
+++ b/drivers/acpi/acpica/exoparg1.c
@@ -115,7 +115,7 @@ acpi_status acpi_ex_opcode_0A_0T_1R(struct acpi_walk_state *walk_state)
break;
}
- cleanup:
+cleanup:
/* Delete return object on error */
@@ -234,7 +234,7 @@ acpi_status acpi_ex_opcode_1A_1T_0R(struct acpi_walk_state *walk_state)
goto cleanup;
}
- cleanup:
+cleanup:
return_ACPI_STATUS(status);
}
@@ -551,7 +551,7 @@ acpi_status acpi_ex_opcode_1A_1T_1R(struct acpi_walk_state *walk_state)
status = acpi_ex_store(return_desc, operand[1], walk_state);
}
- cleanup:
+cleanup:
/* Delete return object on error */
@@ -1054,7 +1054,7 @@ acpi_status acpi_ex_opcode_1A_0T_1R(struct acpi_walk_state *walk_state)
goto cleanup;
}
- cleanup:
+cleanup:
/* Delete return object on error */
diff --git a/drivers/acpi/acpica/exoparg2.c b/drivers/acpi/acpica/exoparg2.c
index d5088f7..d6fa0fc 100644
--- a/drivers/acpi/acpica/exoparg2.c
+++ b/drivers/acpi/acpica/exoparg2.c
@@ -215,7 +215,7 @@ acpi_status acpi_ex_opcode_2A_2T_1R(struct acpi_walk_state *walk_state)
goto cleanup;
}
- cleanup:
+cleanup:
/*
* Since the remainder is not returned indirectly, remove a reference to
* it. Only the quotient is returned indirectly.
@@ -445,7 +445,7 @@ acpi_status acpi_ex_opcode_2A_1T_1R(struct acpi_walk_state *walk_state)
break;
}
- store_result_to_target:
+store_result_to_target:
if (ACPI_SUCCESS(status)) {
/*
@@ -462,7 +462,7 @@ acpi_status acpi_ex_opcode_2A_1T_1R(struct acpi_walk_state *walk_state)
}
}
- cleanup:
+cleanup:
/* Delete return object on error */
@@ -553,7 +553,7 @@ acpi_status acpi_ex_opcode_2A_0T_1R(struct acpi_walk_state *walk_state)
goto cleanup;
}
- store_logical_result:
+store_logical_result:
/*
* Set return value to according to logical_result. logical TRUE (all ones)
* Default is FALSE (zero)
@@ -562,7 +562,7 @@ acpi_status acpi_ex_opcode_2A_0T_1R(struct acpi_walk_state *walk_state)
return_desc->integer.value = ACPI_UINT64_MAX;
}
- cleanup:
+cleanup:
/* Delete return object on error */
diff --git a/drivers/acpi/acpica/exoparg3.c b/drivers/acpi/acpica/exoparg3.c
index 37656f1..bc042ad 100644
--- a/drivers/acpi/acpica/exoparg3.c
+++ b/drivers/acpi/acpica/exoparg3.c
@@ -124,7 +124,7 @@ acpi_status acpi_ex_opcode_3A_0T_0R(struct acpi_walk_state *walk_state)
goto cleanup;
}
- cleanup:
+cleanup:
return_ACPI_STATUS(status);
}
@@ -252,7 +252,7 @@ acpi_status acpi_ex_opcode_3A_1T_1R(struct acpi_walk_state *walk_state)
status = acpi_ex_store(return_desc, operand[3], walk_state);
- cleanup:
+cleanup:
/* Delete return object on error */
diff --git a/drivers/acpi/acpica/exoparg6.c b/drivers/acpi/acpica/exoparg6.c
index 879b6cd..4459e32 100644
--- a/drivers/acpi/acpica/exoparg6.c
+++ b/drivers/acpi/acpica/exoparg6.c
@@ -314,7 +314,7 @@ acpi_status acpi_ex_opcode_6A_0T_1R(struct acpi_walk_state * walk_state)
goto cleanup;
}
- cleanup:
+cleanup:
/* Delete return object on error */
diff --git a/drivers/acpi/acpica/exresolv.c b/drivers/acpi/acpica/exresolv.c
index ac04278..1606524 100644
--- a/drivers/acpi/acpica/exresolv.c
+++ b/drivers/acpi/acpica/exresolv.c
@@ -521,7 +521,7 @@ acpi_ex_resolve_multiple(struct acpi_walk_state *walk_state,
*/
type = obj_desc->common.type;
- exit:
+exit:
/* Convert internal types to external types */
switch (type) {
diff --git a/drivers/acpi/acpica/exresop.c b/drivers/acpi/acpica/exresop.c
index 00e5af7..be3f669 100644
--- a/drivers/acpi/acpica/exresop.c
+++ b/drivers/acpi/acpica/exresop.c
@@ -683,7 +683,7 @@ acpi_ex_resolve_operands(u16 opcode,
return_ACPI_STATUS(status);
}
- next_operand:
+next_operand:
/*
* If more operands needed, decrement stack_ptr to point
* to next operand on stack
diff --git a/drivers/acpi/acpica/hwregs.c b/drivers/acpi/acpica/hwregs.c
index 8d2e866..12e6cff 100644
--- a/drivers/acpi/acpica/hwregs.c
+++ b/drivers/acpi/acpica/hwregs.c
@@ -560,7 +560,7 @@ acpi_status acpi_hw_register_write(u32 register_id, u32 value)
break;
}
- exit:
+exit:
return_ACPI_STATUS(status);
}
diff --git a/drivers/acpi/acpica/hwxface.c b/drivers/acpi/acpica/hwxface.c
index b156848..b4b47db 100644
--- a/drivers/acpi/acpica/hwxface.c
+++ b/drivers/acpi/acpica/hwxface.c
@@ -570,10 +570,10 @@ acpi_get_sleep_type_data(u8 sleep_state, u8 *sleep_type_a, u8 *sleep_type_b)
break;
}
- cleanup1:
+cleanup1:
acpi_ut_remove_reference(info->return_object);
- cleanup:
+cleanup:
if (ACPI_FAILURE(status)) {
ACPI_EXCEPTION((AE_INFO, status,
"While evaluating Sleep State [%s]",
diff --git a/drivers/acpi/acpica/nsaccess.c b/drivers/acpi/acpica/nsaccess.c
index aff79c7..14f65f6 100644
--- a/drivers/acpi/acpica/nsaccess.c
+++ b/drivers/acpi/acpica/nsaccess.c
@@ -240,7 +240,7 @@ acpi_status acpi_ns_root_initialize(void)
}
}
- unlock_and_exit:
+unlock_and_exit:
(void)acpi_ut_release_mutex(ACPI_MTX_NAMESPACE);
/* Save a handle to "_GPE", it is always present */
diff --git a/drivers/acpi/acpica/nsdump.c b/drivers/acpi/acpica/nsdump.c
index c634854..48b9c6f 100644
--- a/drivers/acpi/acpica/nsdump.c
+++ b/drivers/acpi/acpica/nsdump.c
@@ -620,7 +620,7 @@ acpi_ns_dump_one_object(acpi_handle obj_handle,
obj_type = ACPI_TYPE_INVALID; /* Terminate loop after next pass */
}
- cleanup:
+cleanup:
acpi_os_printf("\n");
return (AE_OK);
}
diff --git a/drivers/acpi/acpica/nseval.c b/drivers/acpi/acpica/nseval.c
index 18108bc..963ceef 100644
--- a/drivers/acpi/acpica/nseval.c
+++ b/drivers/acpi/acpica/nseval.c
@@ -314,7 +314,7 @@ acpi_status acpi_ns_evaluate(struct acpi_evaluate_info *info)
"*** Completed evaluation of object %s ***\n",
info->relative_pathname));
- cleanup:
+cleanup:
/*
* Namespace was unlocked by the handling acpi_ns* function, so we
* just free the pathname and return
@@ -486,7 +486,7 @@ acpi_ns_exec_module_code(union acpi_operand_object *method_obj,
parent_node->type = (u8)type;
}
- exit:
+exit:
if (parent_obj) {
acpi_ut_remove_reference(parent_obj);
}
diff --git a/drivers/acpi/acpica/nsinit.c b/drivers/acpi/acpica/nsinit.c
index dd2ceae..3a0423a 100644
--- a/drivers/acpi/acpica/nsinit.c
+++ b/drivers/acpi/acpica/nsinit.c
@@ -213,7 +213,7 @@ acpi_status acpi_ns_initialize_devices(void)
return_ACPI_STATUS(status);
- error_exit:
+error_exit:
ACPI_EXCEPTION((AE_INFO, status, "During device initialization"));
return_ACPI_STATUS(status);
}
diff --git a/drivers/acpi/acpica/nsload.c b/drivers/acpi/acpica/nsload.c
index 0a7badc..89ec645 100644
--- a/drivers/acpi/acpica/nsload.c
+++ b/drivers/acpi/acpica/nsload.c
@@ -114,7 +114,7 @@ acpi_ns_load_table(u32 table_index, struct acpi_namespace_node *node)
(void)acpi_tb_release_owner_id(table_index);
}
- unlock:
+unlock:
(void)acpi_ut_release_mutex(ACPI_MTX_NAMESPACE);
if (ACPI_FAILURE(status)) {
diff --git a/drivers/acpi/acpica/nsparse.c b/drivers/acpi/acpica/nsparse.c
index 35dde81..1778573 100644
--- a/drivers/acpi/acpica/nsparse.c
+++ b/drivers/acpi/acpica/nsparse.c
@@ -140,7 +140,7 @@ acpi_ns_one_complete_parse(u32 pass_number,
pass_number));
status = acpi_ps_parse_aml(walk_state);
- cleanup:
+cleanup:
acpi_ps_delete_parse_tree(parse_root);
return_ACPI_STATUS(status);
}
diff --git a/drivers/acpi/acpica/nspredef.c b/drivers/acpi/acpica/nspredef.c
index 098e766..d2855d9 100644
--- a/drivers/acpi/acpica/nspredef.c
+++ b/drivers/acpi/acpica/nspredef.c
@@ -271,7 +271,7 @@ acpi_ns_check_object_type(struct acpi_evaluate_info *info,
return (AE_OK); /* Successful repair */
}
- type_error_exit:
+type_error_exit:
/* Create a string with all expected types for this predefined object */
diff --git a/drivers/acpi/acpica/nsprepkg.c b/drivers/acpi/acpica/nsprepkg.c
index 6d55cef..3d5391f 100644
--- a/drivers/acpi/acpica/nsprepkg.c
+++ b/drivers/acpi/acpica/nsprepkg.c
@@ -330,7 +330,7 @@ acpi_ns_check_package(struct acpi_evaluate_info *info,
return (status);
- package_too_small:
+package_too_small:
/* Error exit for the case with an incorrect package count */
@@ -555,7 +555,7 @@ acpi_ns_check_package_list(struct acpi_evaluate_info *info,
return (AE_OK);
- package_too_small:
+package_too_small:
/* The sub-package count was smaller than required */
diff --git a/drivers/acpi/acpica/nsrepair.c b/drivers/acpi/acpica/nsrepair.c
index f8e71ea..a05afff 100644
--- a/drivers/acpi/acpica/nsrepair.c
+++ b/drivers/acpi/acpica/nsrepair.c
@@ -263,7 +263,7 @@ acpi_ns_simple_repair(struct acpi_evaluate_info *info,
return (AE_AML_OPERAND_TYPE);
- object_repaired:
+object_repaired:
/* Object was successfully repaired */
diff --git a/drivers/acpi/acpica/nsrepair2.c b/drivers/acpi/acpica/nsrepair2.c
index c84603e..6a25d32 100644
--- a/drivers/acpi/acpica/nsrepair2.c
+++ b/drivers/acpi/acpica/nsrepair2.c
@@ -478,7 +478,7 @@ acpi_ns_repair_CST(struct acpi_evaluate_info *info,
removing = TRUE;
}
- remove_element:
+remove_element:
if (removing) {
acpi_ns_remove_element(return_object, i + 1);
outer_element_count--;
diff --git a/drivers/acpi/acpica/nsutils.c b/drivers/acpi/acpica/nsutils.c
index 08c0b5b..cc2fea9 100644
--- a/drivers/acpi/acpica/nsutils.c
+++ b/drivers/acpi/acpica/nsutils.c
@@ -722,7 +722,7 @@ acpi_ns_get_node(struct acpi_namespace_node *prefix_node,
(void)acpi_ut_release_mutex(ACPI_MTX_NAMESPACE);
- cleanup:
+cleanup:
ACPI_FREE(internal_path);
return_ACPI_STATUS(status);
}
diff --git a/drivers/acpi/acpica/nsxfeval.c b/drivers/acpi/acpica/nsxfeval.c
index ce2a845..e973e31 100644
--- a/drivers/acpi/acpica/nsxfeval.c
+++ b/drivers/acpi/acpica/nsxfeval.c
@@ -442,7 +442,7 @@ acpi_evaluate_object(acpi_handle handle,
acpi_ex_exit_interpreter();
}
- cleanup:
+cleanup:
/* Free the input parameter list (if we created one) */
@@ -618,10 +618,10 @@ acpi_walk_namespace(acpi_object_type type,
descending_callback, ascending_callback,
context, return_value);
- unlock_and_exit2:
+unlock_and_exit2:
(void)acpi_ut_release_mutex(ACPI_MTX_NAMESPACE);
- unlock_and_exit:
+unlock_and_exit:
(void)acpi_ut_release_read_lock(&acpi_gbl_namespace_rw_lock);
return_ACPI_STATUS(status);
}
@@ -865,7 +865,7 @@ acpi_attach_data(acpi_handle obj_handle,
status = acpi_ns_attach_data(node, handler, data);
- unlock_and_exit:
+unlock_and_exit:
(void)acpi_ut_release_mutex(ACPI_MTX_NAMESPACE);
return (status);
}
@@ -911,7 +911,7 @@ acpi_detach_data(acpi_handle obj_handle, acpi_object_handler handler)
status = acpi_ns_detach_data(node, handler);
- unlock_and_exit:
+unlock_and_exit:
(void)acpi_ut_release_mutex(ACPI_MTX_NAMESPACE);
return (status);
}
@@ -958,7 +958,7 @@ acpi_get_data(acpi_handle obj_handle, acpi_object_handler handler, void **data)
status = acpi_ns_get_attached_data(node, handler, data);
- unlock_and_exit:
+unlock_and_exit:
(void)acpi_ut_release_mutex(ACPI_MTX_NAMESPACE);
return (status);
}
diff --git a/drivers/acpi/acpica/nsxfname.c b/drivers/acpi/acpica/nsxfname.c
index 3a6d78a..3a4bd3f 100644
--- a/drivers/acpi/acpica/nsxfname.c
+++ b/drivers/acpi/acpica/nsxfname.c
@@ -209,7 +209,7 @@ acpi_get_name(acpi_handle handle, u32 name_type, struct acpi_buffer * buffer)
((char *)buffer->pointer)[ACPI_NAME_SIZE] = 0;
status = AE_OK;
- unlock_and_exit:
+unlock_and_exit:
(void)acpi_ut_release_mutex(ACPI_MTX_NAMESPACE);
return (status);
@@ -497,7 +497,7 @@ acpi_get_object_info(acpi_handle handle,
*return_buffer = info;
status = AE_OK;
- cleanup:
+cleanup:
if (hid) {
ACPI_FREE(hid);
}
diff --git a/drivers/acpi/acpica/nsxfobj.c b/drivers/acpi/acpica/nsxfobj.c
index 94e961c..0e6d79e 100644
--- a/drivers/acpi/acpica/nsxfobj.c
+++ b/drivers/acpi/acpica/nsxfobj.c
@@ -201,7 +201,7 @@ acpi_status acpi_get_parent(acpi_handle handle, acpi_handle * ret_handle)
status = AE_NULL_ENTRY;
}
- unlock_and_exit:
+unlock_and_exit:
(void)acpi_ut_release_mutex(ACPI_MTX_NAMESPACE);
return (status);
@@ -281,7 +281,7 @@ acpi_get_next_object(acpi_object_type type,
*ret_handle = ACPI_CAST_PTR(acpi_handle, node);
}
- unlock_and_exit:
+unlock_and_exit:
(void)acpi_ut_release_mutex(ACPI_MTX_NAMESPACE);
return (status);
diff --git a/drivers/acpi/acpica/psparse.c b/drivers/acpi/acpica/psparse.c
index 86198a9..79d9a28 100644
--- a/drivers/acpi/acpica/psparse.c
+++ b/drivers/acpi/acpica/psparse.c
@@ -297,7 +297,7 @@ acpi_ps_complete_this_op(struct acpi_walk_state * walk_state,
}
}
- cleanup:
+cleanup:
/* Now we can actually delete the subtree rooted at Op */
diff --git a/drivers/acpi/acpica/psxface.c b/drivers/acpi/acpica/psxface.c
index 11b99ab..fcb7a84 100644
--- a/drivers/acpi/acpica/psxface.c
+++ b/drivers/acpi/acpica/psxface.c
@@ -142,7 +142,7 @@ static void acpi_ps_start_trace(struct acpi_evaluate_info *info)
acpi_dbg_layer = acpi_gbl_trace_dbg_layer;
}
- exit:
+exit:
(void)acpi_ut_release_mutex(ACPI_MTX_NAMESPACE);
}
@@ -185,7 +185,7 @@ static void acpi_ps_stop_trace(struct acpi_evaluate_info *info)
acpi_dbg_level = acpi_gbl_original_dbg_level;
acpi_dbg_layer = acpi_gbl_original_dbg_layer;
- exit:
+exit:
(void)acpi_ut_release_mutex(ACPI_MTX_NAMESPACE);
}
@@ -323,7 +323,7 @@ acpi_status acpi_ps_execute_method(struct acpi_evaluate_info *info)
/* walk_state was deleted by parse_aml */
- cleanup:
+cleanup:
acpi_ps_delete_parse_tree(op);
/* End optional tracing */
diff --git a/drivers/acpi/acpica/rsmisc.c b/drivers/acpi/acpica/rsmisc.c
index 80d1299..c99cec9 100644
--- a/drivers/acpi/acpica/rsmisc.c
+++ b/drivers/acpi/acpica/rsmisc.c
@@ -440,7 +440,7 @@ acpi_rs_convert_aml_to_resource(struct acpi_resource *resource,
info++;
}
- exit:
+exit:
if (!flags_mode) {
/* Round the resource struct length up to the next boundary (32 or 64) */
@@ -783,7 +783,7 @@ acpi_rs_convert_resource_to_aml(struct acpi_resource *resource,
info++;
}
- exit:
+exit:
return_ACPI_STATUS(AE_OK);
}
diff --git a/drivers/acpi/acpica/rsutils.c b/drivers/acpi/acpica/rsutils.c
index 480b6b4..aef303d 100644
--- a/drivers/acpi/acpica/rsutils.c
+++ b/drivers/acpi/acpica/rsutils.c
@@ -784,7 +784,7 @@ acpi_rs_set_srs_method_data(struct acpi_namespace_node *node,
acpi_ut_remove_reference(args[0]);
- cleanup:
+cleanup:
ACPI_FREE(info);
return_ACPI_STATUS(status);
}
diff --git a/drivers/acpi/acpica/tbinstal.c b/drivers/acpi/acpica/tbinstal.c
index 9e6788f..634357d 100644
--- a/drivers/acpi/acpica/tbinstal.c
+++ b/drivers/acpi/acpica/tbinstal.c
@@ -231,10 +231,10 @@ acpi_tb_add_table(struct acpi_table_desc *table_desc, u32 *table_index)
goto release;
}
- print_header:
+print_header:
acpi_tb_print_table_header(table_desc->address, table_desc->pointer);
- release:
+release:
(void)acpi_ut_release_mutex(ACPI_MTX_TABLES);
return_ACPI_STATUS(status);
}
@@ -306,7 +306,7 @@ struct acpi_table_header *acpi_tb_table_override(struct acpi_table_header
return (NULL); /* There was no override */
- finish_override:
+finish_override:
ACPI_INFO((AE_INFO,
"%4.4s %p %s table override, new table: %p",
diff --git a/drivers/acpi/acpica/tbutils.c b/drivers/acpi/acpica/tbutils.c
index bffdfc7..43ffe21 100644
--- a/drivers/acpi/acpica/tbutils.c
+++ b/drivers/acpi/acpica/tbutils.c
@@ -350,7 +350,7 @@ acpi_tb_install_table(acpi_physical_address address,
acpi_tb_delete_table(table_desc);
}
- unmap_and_exit:
+unmap_and_exit:
/* Always unmap the table header that we mapped above */
diff --git a/drivers/acpi/acpica/tbxface.c b/drivers/acpi/acpica/tbxface.c
index 2ad8532..bbaad5c 100644
--- a/drivers/acpi/acpica/tbxface.c
+++ b/drivers/acpi/acpica/tbxface.c
@@ -466,7 +466,7 @@ acpi_install_table_handler(acpi_table_handler handler, void *context)
acpi_gbl_table_handler = handler;
acpi_gbl_table_handler_context = context;
- cleanup:
+cleanup:
(void)acpi_ut_release_mutex(ACPI_MTX_EVENTS);
return_ACPI_STATUS(status);
}
@@ -507,7 +507,7 @@ acpi_status acpi_remove_table_handler(acpi_table_handler handler)
acpi_gbl_table_handler = NULL;
- cleanup:
+cleanup:
(void)acpi_ut_release_mutex(ACPI_MTX_EVENTS);
return_ACPI_STATUS(status);
}
diff --git a/drivers/acpi/acpica/tbxfload.c b/drivers/acpi/acpica/tbxfload.c
index 2620dbe..5a22024 100644
--- a/drivers/acpi/acpica/tbxfload.c
+++ b/drivers/acpi/acpica/tbxfload.c
@@ -201,7 +201,7 @@ static acpi_status acpi_tb_load_namespace(void)
ACPI_INFO((AE_INFO, "All ACPI Tables successfully acquired"));
- unlock_and_exit:
+unlock_and_exit:
(void)acpi_ut_release_mutex(ACPI_MTX_TABLES);
return_ACPI_STATUS(status);
}
@@ -269,7 +269,7 @@ acpi_status acpi_load_table(struct acpi_table_header *table)
acpi_gbl_table_handler_context);
}
- unlock_and_exit:
+unlock_and_exit:
(void)acpi_ut_release_mutex(ACPI_MTX_INTERPRETER);
return_ACPI_STATUS(status);
}
diff --git a/drivers/acpi/acpica/utcopy.c b/drivers/acpi/acpica/utcopy.c
index 1731c27..edff4e6 100644
--- a/drivers/acpi/acpica/utcopy.c
+++ b/drivers/acpi/acpica/utcopy.c
@@ -552,7 +552,7 @@ acpi_ut_copy_esimple_to_isimple(union acpi_object *external_object,
*ret_internal_object = internal_object;
return_ACPI_STATUS(AE_OK);
- error_exit:
+error_exit:
acpi_ut_remove_reference(internal_object);
return_ACPI_STATUS(AE_NO_MEMORY);
}
@@ -899,7 +899,7 @@ acpi_ut_copy_ielement_to_ielement(u8 object_type,
return (status);
- error_exit:
+error_exit:
acpi_ut_remove_reference(target_object);
return (status);
}
diff --git a/drivers/acpi/acpica/utdelete.c b/drivers/acpi/acpica/utdelete.c
index d6b33f2..c07d222 100644
--- a/drivers/acpi/acpica/utdelete.c
+++ b/drivers/acpi/acpica/utdelete.c
@@ -649,7 +649,7 @@ acpi_ut_update_object_reference(union acpi_operand_object *object, u16 action)
return (AE_OK);
- error_exit:
+error_exit:
ACPI_EXCEPTION((AE_INFO, status,
"Could not update object reference count"));
diff --git a/drivers/acpi/acpica/uteval.c b/drivers/acpi/acpica/uteval.c
index 4fd6897..16fb905 100644
--- a/drivers/acpi/acpica/uteval.c
+++ b/drivers/acpi/acpica/uteval.c
@@ -181,7 +181,7 @@ acpi_ut_evaluate_object(struct acpi_namespace_node *prefix_node,
*return_desc = info->return_object;
- cleanup:
+cleanup:
ACPI_FREE(info);
return_ACPI_STATUS(status);
}
diff --git a/drivers/acpi/acpica/utids.c b/drivers/acpi/acpica/utids.c
index fa69071..bfca7b4 100644
--- a/drivers/acpi/acpica/utids.c
+++ b/drivers/acpi/acpica/utids.c
@@ -184,7 +184,7 @@ acpi_ut_execute_SUB(struct acpi_namespace_node *device_node,
sub->length = length;
*return_id = sub;
- cleanup:
+cleanup:
/* On exit, we must delete the return object */
diff --git a/drivers/acpi/acpica/utownerid.c b/drivers/acpi/acpica/utownerid.c
index 835340b..eb3aca7 100644
--- a/drivers/acpi/acpica/utownerid.c
+++ b/drivers/acpi/acpica/utownerid.c
@@ -148,7 +148,7 @@ acpi_status acpi_ut_allocate_owner_id(acpi_owner_id * owner_id)
ACPI_ERROR((AE_INFO,
"Could not allocate new OwnerId (255 max), AE_OWNER_ID_LIMIT"));
- exit:
+exit:
(void)acpi_ut_release_mutex(ACPI_MTX_CACHES);
return_ACPI_STATUS(status);
}
diff --git a/drivers/acpi/acpica/utresrc.c b/drivers/acpi/acpica/utresrc.c
index cb7fa49..2c2accb 100644
--- a/drivers/acpi/acpica/utresrc.c
+++ b/drivers/acpi/acpica/utresrc.c
@@ -643,7 +643,7 @@ acpi_ut_validate_resource(struct acpi_walk_state *walk_state,
return (AE_OK);
- invalid_resource:
+invalid_resource:
if (walk_state) {
ACPI_ERROR((AE_INFO,
@@ -652,7 +652,7 @@ acpi_ut_validate_resource(struct acpi_walk_state *walk_state,
}
return (AE_AML_INVALID_RESOURCE_TYPE);
- bad_resource_length:
+bad_resource_length:
if (walk_state) {
ACPI_ERROR((AE_INFO,
diff --git a/drivers/acpi/acpica/utstring.c b/drivers/acpi/acpica/utstring.c
index 5ef41ff..45c0eb2 100644
--- a/drivers/acpi/acpica/utstring.c
+++ b/drivers/acpi/acpica/utstring.c
@@ -310,7 +310,7 @@ acpi_status acpi_ut_strtoul64(char *string, u32 base, u64 *ret_integer)
/* All done, normal exit */
- all_done:
+all_done:
ACPI_DEBUG_PRINT((ACPI_DB_EXEC, "Converted value: %8.8X%8.8X\n",
ACPI_FORMAT_UINT64(return_value)));
@@ -318,7 +318,7 @@ acpi_status acpi_ut_strtoul64(char *string, u32 base, u64 *ret_integer)
*ret_integer = return_value;
return_ACPI_STATUS(AE_OK);
- error_exit:
+error_exit:
/* Base was set/validated above */
if (base == 10) {
diff --git a/drivers/acpi/acpica/uttrack.c b/drivers/acpi/acpica/uttrack.c
index 77e3eb7..c002777 100644
--- a/drivers/acpi/acpica/uttrack.c
+++ b/drivers/acpi/acpica/uttrack.c
@@ -430,7 +430,7 @@ acpi_ut_track_allocation(struct acpi_debug_mem_block *allocation,
element->next = allocation;
}
- unlock_and_exit:
+unlock_and_exit:
status = acpi_ut_release_mutex(ACPI_MTX_MEMORY);
return_ACPI_STATUS(status);
}
--
1.7.10
^ permalink raw reply related [flat|nested] 41+ messages in thread* [PATCH 14/20] ACPICA: Deploy ACPI_EXPORT_SYMBOL_INIT for main ACPICA initialization interfaces.
2013-10-29 1:28 [PATCH 00/20] ACPICA: 20130927 Release Lv Zheng
` (12 preceding siblings ...)
2013-10-29 1:30 ` [PATCH 13/20] ACPICA: Linuxize: Change indentation of C labels Lv Zheng
@ 2013-10-29 1:30 ` Lv Zheng
2013-10-29 1:30 ` [PATCH 15/20] ACPICA: Prevent possible build issues for use of ACPI_PRINTF_LIKE macro Lv Zheng
` (7 subsequent siblings)
21 siblings, 0 replies; 41+ messages in thread
From: Lv Zheng @ 2013-10-29 1:30 UTC (permalink / raw)
To: Rafael J. Wysocki, Robert Moore, Len Brown; +Cc: Lv Zheng, linux-acpi
This changes can reduce source code differences between Linux and ACPICA
upstream to help improving the release automation.
The side effect of applying this patch in Linux is:
1. Some ACPICA initialization/termination APIs are no longer exported in
Linux, these include:
acpi_load_tables
acpi_initialize_subsystem
acpi_enable_subsystem
acpi_initialize_objects
acpi_terminate
2. This patch does not affect the following APIs as they are currently not
marked with ACPI_EXPORT_SYMBOL in Linux:
acpi_reallocate_root_table
acpi_initialize_tables
Such functions should not be exported as they are internal to ACPI
subsystem in Linux, and will only be invoked inside of ACPI subsystem's
initialization routines marked with __init and termination routines marked
with __exit. While on other OSPMs, such functions may still need to be
exported.
Thus this patch adds the configurability for ACPICA, so that it leaves
OSPMs to determine if the __init/__exit marked functions should be exported
or not. Lv Zheng.
Signed-off-by: Lv Zheng <lv.zheng@intel.com>
Signed-off-by: Bob Moore <robert.moore@intel.com>
---
drivers/acpi/acpica/tbxface.c | 7 ++++++-
drivers/acpi/acpica/tbxfload.c | 2 +-
drivers/acpi/acpica/utxface.c | 2 +-
drivers/acpi/acpica/utxfinit.c | 9 ++++++---
include/acpi/actypes.h | 13 +++++++++++--
5 files changed, 25 insertions(+), 8 deletions(-)
diff --git a/drivers/acpi/acpica/tbxface.c b/drivers/acpi/acpica/tbxface.c
index bbaad5c..7e63090 100644
--- a/drivers/acpi/acpica/tbxface.c
+++ b/drivers/acpi/acpica/tbxface.c
@@ -148,6 +148,8 @@ acpi_initialize_tables(struct acpi_table_desc * initial_table_array,
return_ACPI_STATUS(status);
}
+ACPI_EXPORT_SYMBOL_INIT(acpi_initialize_tables)
+
/*******************************************************************************
*
* FUNCTION: acpi_reallocate_root_table
@@ -182,6 +184,8 @@ acpi_status acpi_reallocate_root_table(void)
return_ACPI_STATUS(status);
}
+ACPI_EXPORT_SYMBOL_INIT(acpi_reallocate_root_table)
+
/*******************************************************************************
*
* FUNCTION: acpi_get_table_header
@@ -357,6 +361,7 @@ acpi_get_table_with_size(char *signature,
return (AE_NOT_FOUND);
}
+
ACPI_EXPORT_SYMBOL(acpi_get_table_with_size)
acpi_status
@@ -368,6 +373,7 @@ acpi_get_table(char *signature,
return acpi_get_table_with_size(signature,
instance, out_table, &tbl_size);
}
+
ACPI_EXPORT_SYMBOL(acpi_get_table)
/*******************************************************************************
@@ -425,7 +431,6 @@ acpi_get_table_by_index(u32 table_index, struct acpi_table_header **table)
ACPI_EXPORT_SYMBOL(acpi_get_table_by_index)
-
/*******************************************************************************
*
* FUNCTION: acpi_install_table_handler
diff --git a/drivers/acpi/acpica/tbxfload.c b/drivers/acpi/acpica/tbxfload.c
index 5a22024..b1e1edd 100644
--- a/drivers/acpi/acpica/tbxfload.c
+++ b/drivers/acpi/acpica/tbxfload.c
@@ -83,7 +83,7 @@ acpi_status acpi_load_tables(void)
return_ACPI_STATUS(status);
}
-ACPI_EXPORT_SYMBOL(acpi_load_tables)
+ACPI_EXPORT_SYMBOL_INIT(acpi_load_tables)
/*******************************************************************************
*
diff --git a/drivers/acpi/acpica/utxface.c b/drivers/acpi/acpica/utxface.c
index 2178da8..891a37b 100644
--- a/drivers/acpi/acpica/utxface.c
+++ b/drivers/acpi/acpica/utxface.c
@@ -105,7 +105,7 @@ acpi_status acpi_terminate(void)
return_ACPI_STATUS(status);
}
-ACPI_EXPORT_SYMBOL(acpi_terminate)
+ACPI_EXPORT_SYMBOL_INIT(acpi_terminate)
#ifndef ACPI_ASL_COMPILER
#ifdef ACPI_FUTURE_USAGE
diff --git a/drivers/acpi/acpica/utxfinit.c b/drivers/acpi/acpica/utxfinit.c
index dda18e6..ff6f4d1 100644
--- a/drivers/acpi/acpica/utxfinit.c
+++ b/drivers/acpi/acpica/utxfinit.c
@@ -125,7 +125,8 @@ acpi_status acpi_initialize_subsystem(void)
ACPI_DEBUGGER_EXEC(status = acpi_db_initialize());
return_ACPI_STATUS(status);
}
-ACPI_EXPORT_SYMBOL(acpi_initialize_subsystem)
+
+ACPI_EXPORT_SYMBOL_INIT(acpi_initialize_subsystem)
/*******************************************************************************
*
@@ -229,7 +230,8 @@ acpi_status acpi_enable_subsystem(u32 flags)
return_ACPI_STATUS(status);
}
-ACPI_EXPORT_SYMBOL(acpi_enable_subsystem)
+
+ACPI_EXPORT_SYMBOL_INIT(acpi_enable_subsystem)
/*******************************************************************************
*
@@ -315,4 +317,5 @@ acpi_status acpi_initialize_objects(u32 flags)
acpi_gbl_startup_flags |= ACPI_INITIALIZED_OK;
return_ACPI_STATUS(status);
}
-ACPI_EXPORT_SYMBOL(acpi_initialize_objects)
+
+ACPI_EXPORT_SYMBOL_INIT(acpi_initialize_objects)
diff --git a/include/acpi/actypes.h b/include/acpi/actypes.h
index 0bb23e6..8614bc1 100644
--- a/include/acpi/actypes.h
+++ b/include/acpi/actypes.h
@@ -299,9 +299,18 @@ typedef u32 acpi_physical_address;
#endif
/*
- * All ACPICA functions that are available to the rest of the kernel are
- * tagged with this macro which can be defined as appropriate for the host.
+ * All ACPICA external functions that are available to the rest of the kernel
+ * are tagged with thes macros which can be defined as appropriate for the host.
+ *
+ * Notes:
+ * ACPI_EXPORT_SYMBOL_INIT is used for initialization and termination
+ * interfaces that may need special processing.
+ * ACPI_EXPORT_SYMBOL is used for all other public external functions.
*/
+#ifndef ACPI_EXPORT_SYMBOL_INIT
+#define ACPI_EXPORT_SYMBOL_INIT(symbol)
+#endif
+
#ifndef ACPI_EXPORT_SYMBOL
#define ACPI_EXPORT_SYMBOL(symbol)
#endif
--
1.7.10
^ permalink raw reply related [flat|nested] 41+ messages in thread* [PATCH 15/20] ACPICA: Prevent possible build issues for use of ACPI_PRINTF_LIKE macro
2013-10-29 1:28 [PATCH 00/20] ACPICA: 20130927 Release Lv Zheng
` (13 preceding siblings ...)
2013-10-29 1:30 ` [PATCH 14/20] ACPICA: Deploy ACPI_EXPORT_SYMBOL_INIT for main ACPICA initialization interfaces Lv Zheng
@ 2013-10-29 1:30 ` Lv Zheng
2013-10-29 1:30 ` [PATCH 16/20] ACPICA: AcpiSrc: Fix indentation issues for macro invocations Lv Zheng
` (6 subsequent siblings)
21 siblings, 0 replies; 41+ messages in thread
From: Lv Zheng @ 2013-10-29 1:30 UTC (permalink / raw)
To: Rafael J. Wysocki, Robert Moore, Len Brown; +Cc: Lv Zheng, linux-acpi
The following build error:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
CC arch/x86/kernel/setup.o
In file included from include/acpi/acpi.h:64:0,
from include/linux/iscsi_ibft.h:24,
from arch/x86/kernel/setup.c:43:
include/acpi/acpixf.h:543:1: error: expected ',' or ';' before '{' token
include/acpi/acpixf.h:540:1: warning: 'acpi_error' declared 'static' but never defined [-Wunused-function]
make[2]: *** [arch/x86/kernel/setup.o] Error 1
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
can be triggerred by the following stub function (if implemented):
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
static inline void ACPI_INTERNAL_VAR_XFACE
acpi_error(const char *module_name,
u32 line_number, const char *format, ...) ACPI_PRINTF_LIKE(3)
{
}
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
This patch changes the position of ACPI_PRINTF_LIKE(x) to follow the
style of __printf(x, x+1) used in Linux to prevent such issues from
happening. Lv Zheng.
Signed-off-by: Lv Zheng <lv.zheng@intel.com>
Signed-off-by: Bob Moore <robert.moore@intel.com>
---
include/acpi/acpixf.h | 29 ++++++++++++++++-------------
1 file changed, 16 insertions(+), 13 deletions(-)
diff --git a/include/acpi/acpixf.h b/include/acpi/acpixf.h
index ddde61b..9759bd5 100644
--- a/include/acpi/acpixf.h
+++ b/include/acpi/acpixf.h
@@ -530,50 +530,53 @@ ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status
/*
* Error/Warning output
*/
+ACPI_PRINTF_LIKE(3)
void ACPI_INTERNAL_VAR_XFACE
-acpi_error(const char *module_name,
- u32 line_number, const char *format, ...) ACPI_PRINTF_LIKE(3);
+acpi_error(const char *module_name, u32 line_number, const char *format, ...);
+ACPI_PRINTF_LIKE(4)
void ACPI_INTERNAL_VAR_XFACE
acpi_exception(const char *module_name,
- u32 line_number,
- acpi_status status, const char *format, ...) ACPI_PRINTF_LIKE(4);
+ u32 line_number, acpi_status status, const char *format, ...);
+ACPI_PRINTF_LIKE(3)
void ACPI_INTERNAL_VAR_XFACE
-acpi_warning(const char *module_name,
- u32 line_number, const char *format, ...) ACPI_PRINTF_LIKE(3);
+acpi_warning(const char *module_name, u32 line_number, const char *format, ...);
+ACPI_PRINTF_LIKE(3)
void ACPI_INTERNAL_VAR_XFACE
-acpi_info(const char *module_name,
- u32 line_number, const char *format, ...) ACPI_PRINTF_LIKE(3);
+acpi_info(const char *module_name, u32 line_number, const char *format, ...);
+ACPI_PRINTF_LIKE(3)
void ACPI_INTERNAL_VAR_XFACE
acpi_bios_error(const char *module_name,
- u32 line_number, const char *format, ...) ACPI_PRINTF_LIKE(3);
+ u32 line_number, const char *format, ...);
+ACPI_PRINTF_LIKE(3)
void ACPI_INTERNAL_VAR_XFACE
acpi_bios_warning(const char *module_name,
- u32 line_number, const char *format, ...) ACPI_PRINTF_LIKE(3);
+ u32 line_number, const char *format, ...);
/*
* Debug output
*/
#ifdef ACPI_DEBUG_OUTPUT
+ACPI_PRINTF_LIKE(6)
void ACPI_INTERNAL_VAR_XFACE
acpi_debug_print(u32 requested_debug_level,
u32 line_number,
const char *function_name,
const char *module_name,
- u32 component_id, const char *format, ...) ACPI_PRINTF_LIKE(6);
+ u32 component_id, const char *format, ...);
+ACPI_PRINTF_LIKE(6)
void ACPI_INTERNAL_VAR_XFACE
acpi_debug_print_raw(u32 requested_debug_level,
u32 line_number,
const char *function_name,
const char *module_name,
- u32 component_id,
- const char *format, ...) ACPI_PRINTF_LIKE(6);
+ u32 component_id, const char *format, ...);
#endif
#endif /* __ACXFACE_H__ */
--
1.7.10
^ permalink raw reply related [flat|nested] 41+ messages in thread* [PATCH 16/20] ACPICA: AcpiSrc: Fix indentation issues for macro invocations.
2013-10-29 1:28 [PATCH 00/20] ACPICA: 20130927 Release Lv Zheng
` (14 preceding siblings ...)
2013-10-29 1:30 ` [PATCH 15/20] ACPICA: Prevent possible build issues for use of ACPI_PRINTF_LIKE macro Lv Zheng
@ 2013-10-29 1:30 ` Lv Zheng
2013-10-29 1:30 ` [PATCH 17/20] ACPICA: Simplify configuration of global ACPI_REDUCED_HARDWARE macro Lv Zheng
` (5 subsequent siblings)
21 siblings, 0 replies; 41+ messages in thread
From: Lv Zheng @ 2013-10-29 1:30 UTC (permalink / raw)
To: Rafael J. Wysocki, Robert Moore, Len Brown; +Cc: Lv Zheng, linux-acpi
During the linuxizing process, some extra white spaces are added by the
"indent" program at the beginning of the line which is an invocation of a
macro and there is no ";" at the end of the line.
This patch adds new mode to AcpiSrc to remove extra spaces inserted before
invoking such macros and add an empty line between the invocations of such
macros (like the other function declarations). This new mode is executed
after executing "indent" during the Linux release process.
The affected macros and files are:
1. ACPI_HW_DEPENDENT_RETURN (acpixf.h/acdebug.h/acevents.h):
This macro is used as a wrapper for hardware dependent APIs to offer a
stub when the reduced hardware is configured during compilation.
2. ACPI_EXPORT_SYMBOL (utglobal.c):
This macro is used by Linux to export symbols to be found by Linux
modules. All such invocations are well formatted except those exported
as global variables.
This can help to reduce the source code differences between Linux and
ACPICA, and also help to automate the release process. Lv Zheng.
Signed-off-by: Lv Zheng <lv.zheng@intel.com>
Signed-off-by: Bob Moore <robert.moore@intel.com>
---
drivers/acpi/acpica/acdebug.h | 3 ++-
drivers/acpi/acpica/acevents.h | 3 ++-
drivers/acpi/acpica/utcache.c | 2 +-
drivers/acpi/acpica/utglobal.c | 3 +++
include/acpi/acpixf.h | 22 +++++++++++++++++-----
5 files changed, 25 insertions(+), 8 deletions(-)
diff --git a/drivers/acpi/acpica/acdebug.h b/drivers/acpi/acpica/acdebug.h
index 57cdc77..a9fd0b8 100644
--- a/drivers/acpi/acpica/acdebug.h
+++ b/drivers/acpi/acpica/acdebug.h
@@ -113,7 +113,8 @@ void acpi_db_display_handlers(void);
ACPI_HW_DEPENDENT_RETURN_VOID(void
acpi_db_generate_gpe(char *gpe_arg,
char *block_arg))
- ACPI_HW_DEPENDENT_RETURN_VOID(void acpi_db_generate_sci(void))
+
+ACPI_HW_DEPENDENT_RETURN_VOID(void acpi_db_generate_sci(void))
/*
* dbconvert - miscellaneous conversion routines
diff --git a/drivers/acpi/acpica/acevents.h b/drivers/acpi/acpica/acevents.h
index 3ae5fd0..41abe55 100644
--- a/drivers/acpi/acpica/acevents.h
+++ b/drivers/acpi/acpica/acevents.h
@@ -71,7 +71,8 @@ acpi_status acpi_ev_init_global_lock_handler(void);
ACPI_HW_DEPENDENT_RETURN_OK(acpi_status
acpi_ev_acquire_global_lock(u16 timeout))
- ACPI_HW_DEPENDENT_RETURN_OK(acpi_status acpi_ev_release_global_lock(void))
+
+ACPI_HW_DEPENDENT_RETURN_OK(acpi_status acpi_ev_release_global_lock(void))
acpi_status acpi_ev_remove_global_lock_handler(void);
/*
diff --git a/drivers/acpi/acpica/utcache.c b/drivers/acpi/acpica/utcache.c
index a877a96..366bfec 100644
--- a/drivers/acpi/acpica/utcache.c
+++ b/drivers/acpi/acpica/utcache.c
@@ -65,7 +65,7 @@ ACPI_MODULE_NAME("utcache")
acpi_status
acpi_os_create_cache(char *cache_name,
u16 object_size,
- u16 max_depth, struct acpi_memory_list ** return_cache)
+ u16 max_depth, struct acpi_memory_list **return_cache)
{
struct acpi_memory_list *cache;
diff --git a/drivers/acpi/acpica/utglobal.c b/drivers/acpi/acpica/utglobal.c
index 4f59784..77caa4f 100644
--- a/drivers/acpi/acpica/utglobal.c
+++ b/drivers/acpi/acpica/utglobal.c
@@ -378,6 +378,9 @@ acpi_status acpi_ut_init_globals(void)
/* Public globals */
ACPI_EXPORT_SYMBOL(acpi_gbl_FADT)
+
ACPI_EXPORT_SYMBOL(acpi_dbg_level)
+
ACPI_EXPORT_SYMBOL(acpi_dbg_layer)
+
ACPI_EXPORT_SYMBOL(acpi_current_gpe_count)
diff --git a/include/acpi/acpixf.h b/include/acpi/acpixf.h
index 9759bd5..cb2e744 100644
--- a/include/acpi/acpixf.h
+++ b/include/acpi/acpixf.h
@@ -54,6 +54,7 @@
#include <acpi/acbuffer.h>
extern u8 acpi_gbl_permanent_mmap;
+extern u32 acpi_rsdt_forced;
/*
* Globals that are publically available
@@ -110,7 +111,6 @@ extern u8 acpi_gbl_disable_ssdt_table_load;
#endif /* !ACPI_REDUCED_HARDWARE */
-extern u32 acpi_rsdt_forced;
/*
* Initialization
*/
@@ -130,9 +130,10 @@ acpi_status acpi_terminate(void);
* Miscellaneous global interfaces
*/
ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status acpi_enable(void))
+
ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status acpi_disable(void))
#ifdef ACPI_FUTURE_USAGE
-acpi_status acpi_subsystem_status(void);
+ acpi_status acpi_subsystem_status(void);
#endif
#ifdef ACPI_FUTURE_USAGE
@@ -172,7 +173,7 @@ acpi_status acpi_load_tables(void);
*/
acpi_status acpi_reallocate_root_table(void);
-acpi_status acpi_find_root_pointer(acpi_size *rsdp_address);
+acpi_status acpi_find_root_pointer(acpi_size * rsdp_address);
acpi_status acpi_unload_table_id(acpi_owner_id id);
@@ -184,6 +185,7 @@ acpi_status
acpi_get_table_with_size(acpi_string signature,
u32 instance, struct acpi_table_header **out_table,
acpi_size *tbl_size);
+
acpi_status
acpi_get_table(acpi_string signature,
u32 instance, struct acpi_table_header **out_table);
@@ -274,13 +276,16 @@ ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status
acpi_install_sci_handler(acpi_sci_handler
address,
void *context))
+
ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status
acpi_remove_sci_handler(acpi_sci_handler
address))
+
ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status
acpi_install_global_event_handler
(acpi_gbl_event_handler handler,
void *context))
+
ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status
acpi_install_fixed_event_handler(u32
acpi_event,
@@ -288,10 +293,12 @@ ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status
handler,
void
*context))
+
ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status
acpi_remove_fixed_event_handler(u32 acpi_event,
acpi_event_handler
handler))
+
ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status
acpi_install_gpe_handler(acpi_handle
gpe_device,
@@ -300,6 +307,7 @@ ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status
acpi_gpe_handler
address,
void *context))
+
ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status
acpi_remove_gpe_handler(acpi_handle gpe_device,
u32 gpe_number,
@@ -336,6 +344,7 @@ acpi_status acpi_install_interface_handler(acpi_interface_handler handler);
ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status
acpi_acquire_global_lock(u16 timeout,
u32 *handle))
+
ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status
acpi_release_global_lock(u32 handle))
@@ -362,6 +371,7 @@ ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status
acpi_get_event_status(u32 event,
acpi_event_status
*event_status))
+
/*
* General Purpose Event (GPE) Interfaces
*/
@@ -392,10 +402,12 @@ ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status
parent_device,
acpi_handle gpe_device,
u32 gpe_number))
+
ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status
acpi_set_gpe_wake_mask(acpi_handle gpe_device,
u32 gpe_number,
u8 action))
+
ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status
acpi_get_gpe_status(acpi_handle gpe_device,
u32 gpe_number,
@@ -417,6 +429,7 @@ ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status
*gpe_block_address,
u32 register_count,
u32 interrupt_number))
+
ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status
acpi_remove_gpe_block(acpi_handle gpe_device))
@@ -491,7 +504,7 @@ ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status
* Sleep/Wake interfaces
*/
acpi_status
-acpi_get_sleep_type_data(u8 sleep_state, u8 * slp_typ_a, u8 * slp_typ_b);
+acpi_get_sleep_type_data(u8 sleep_state, u8 *slp_typ_a, u8 *slp_typ_b);
acpi_status acpi_enter_sleep_state_prep(u8 sleep_state);
@@ -506,7 +519,6 @@ acpi_status acpi_leave_sleep_state(u8 sleep_state);
ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status
acpi_set_firmware_waking_vector(u32
physical_address))
-
#if ACPI_MACHINE_WIDTH == 64
ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status
acpi_set_firmware_waking_vector64(u64
--
1.7.10
^ permalink raw reply related [flat|nested] 41+ messages in thread* [PATCH 17/20] ACPICA: Simplify configuration of global ACPI_REDUCED_HARDWARE macro.
2013-10-29 1:28 [PATCH 00/20] ACPICA: 20130927 Release Lv Zheng
` (15 preceding siblings ...)
2013-10-29 1:30 ` [PATCH 16/20] ACPICA: AcpiSrc: Fix indentation issues for macro invocations Lv Zheng
@ 2013-10-29 1:30 ` Lv Zheng
2013-10-29 1:30 ` [PATCH 18/20] ACPICA: Add support to allow host to redefine individual OSL prototypes Lv Zheng
` (4 subsequent siblings)
21 siblings, 0 replies; 41+ messages in thread
From: Lv Zheng @ 2013-10-29 1:30 UTC (permalink / raw)
To: Rafael J. Wysocki, Robert Moore, Len Brown; +Cc: Lv Zheng, linux-acpi
From: Bob Moore <robert.moore@intel.com>
Surround definition of this with a #ifndef so that the kernel
can define it elsewhere if desired.
Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Lv Zheng <lv.zheng@intel.com>
---
include/acpi/acconfig.h | 2 ++
1 file changed, 2 insertions(+)
diff --git a/include/acpi/acconfig.h b/include/acpi/acconfig.h
index 1c16f82..d98c670 100644
--- a/include/acpi/acconfig.h
+++ b/include/acpi/acconfig.h
@@ -100,7 +100,9 @@
* ACPI PM timer
* FACS table (Waking vectors and Global Lock)
*/
+#ifndef ACPI_REDUCED_HARDWARE
#define ACPI_REDUCED_HARDWARE FALSE
+#endif
/******************************************************************************
*
--
1.7.10
^ permalink raw reply related [flat|nested] 41+ messages in thread* [PATCH 18/20] ACPICA: Add support to allow host to redefine individual OSL prototypes.
2013-10-29 1:28 [PATCH 00/20] ACPICA: 20130927 Release Lv Zheng
` (16 preceding siblings ...)
2013-10-29 1:30 ` [PATCH 17/20] ACPICA: Simplify configuration of global ACPI_REDUCED_HARDWARE macro Lv Zheng
@ 2013-10-29 1:30 ` Lv Zheng
2013-10-29 1:30 ` [PATCH 19/20] ACPICA: Update aclinux.h for new OSL override mechanism Lv Zheng
` (3 subsequent siblings)
21 siblings, 0 replies; 41+ messages in thread
From: Lv Zheng @ 2013-10-29 1:30 UTC (permalink / raw)
To: Rafael J. Wysocki, Robert Moore, Len Brown; +Cc: Lv Zheng, linux-acpi
This change enables the host to redefine OSL prototypes found in the
acpiosxf.h file. This allows the host to implement OSL interfaces with
a macro or inlined function. Further, it allows the host to add any
additional required modifiers such as __iomem, __init, __exit, etc.,
as necessary on a per-interface basis. Enables maximum flexibility
for the OSL interfaces. Lv Zheng.
Signed-off-by: Lv Zheng <lv.zheng@intel.com>
Signed-off-by: Bob Moore <robert.moore@intel.com>
---
include/acpi/acpiosxf.h | 139 ++++++++++++++++++++++++++++++++++++++-
include/acpi/platform/aclinux.h | 1 +
2 files changed, 137 insertions(+), 3 deletions(-)
diff --git a/include/acpi/acpiosxf.h b/include/acpi/acpiosxf.h
index 7f95215..55165fc 100644
--- a/include/acpi/acpiosxf.h
+++ b/include/acpi/acpiosxf.h
@@ -77,54 +77,80 @@ struct acpi_signal_fatal_info {
/*
* OSL Initialization and shutdown primitives
*/
+#ifndef ACPI_USE_ALTERNATE_PROTOTYPE_acpi_os_initialize
acpi_status __init acpi_os_initialize(void);
+#endif
+#ifndef ACPI_USE_ALTERNATE_PROTOTYPE_acpi_os_terminate
acpi_status acpi_os_terminate(void);
+#endif
/*
* ACPI Table interfaces
*/
+#ifndef ACPI_USE_ALTERNATE_PROTOTYPE_acpi_os_get_root_pointer
acpi_physical_address acpi_os_get_root_pointer(void);
+#endif
+#ifndef ACPI_USE_ALTERNATE_PROTOTYPE_acpi_os_predefined_override
acpi_status
acpi_os_predefined_override(const struct acpi_predefined_names *init_val,
acpi_string * new_val);
+#endif
+#ifndef ACPI_USE_ALTERNATE_PROTOTYPE_acpi_os_table_override
acpi_status
acpi_os_table_override(struct acpi_table_header *existing_table,
struct acpi_table_header **new_table);
+#endif
+#ifndef ACPI_USE_ALTERNATE_PROTOTYPE_acpi_os_physical_table_override
acpi_status
acpi_os_physical_table_override(struct acpi_table_header *existing_table,
acpi_physical_address * new_address,
u32 *new_table_length);
+#endif
/*
* Spinlock primitives
*/
-#ifndef acpi_os_create_lock
+#ifndef ACPI_USE_ALTERNATE_PROTOTYPE_acpi_os_create_lock
acpi_status acpi_os_create_lock(acpi_spinlock * out_handle);
#endif
+#ifndef ACPI_USE_ALTERNATE_PROTOTYPE_acpi_os_delete_lock
void acpi_os_delete_lock(acpi_spinlock handle);
+#endif
+#ifndef ACPI_USE_ALTERNATE_PROTOTYPE_acpi_os_acquire_lock
acpi_cpu_flags acpi_os_acquire_lock(acpi_spinlock handle);
+#endif
+#ifndef ACPI_USE_ALTERNATE_PROTOTYPE_acpi_os_release_lock
void acpi_os_release_lock(acpi_spinlock handle, acpi_cpu_flags flags);
+#endif
/*
* Semaphore primitives
*/
+#ifndef ACPI_USE_ALTERNATE_PROTOTYPE_acpi_os_create_semaphore
acpi_status
acpi_os_create_semaphore(u32 max_units,
u32 initial_units, acpi_semaphore * out_handle);
+#endif
+#ifndef ACPI_USE_ALTERNATE_PROTOTYPE_acpi_os_delete_semaphore
acpi_status acpi_os_delete_semaphore(acpi_semaphore handle);
+#endif
+#ifndef ACPI_USE_ALTERNATE_PROTOTYPE_acpi_os_wait_semaphore
acpi_status
acpi_os_wait_semaphore(acpi_semaphore handle, u32 units, u16 timeout);
+#endif
+#ifndef ACPI_USE_ALTERNATE_PROTOTYPE_acpi_os_signal_semaphore
acpi_status acpi_os_signal_semaphore(acpi_semaphore handle, u32 units);
+#endif
/*
* Mutex primitives. May be configured to use semaphores instead via
@@ -132,63 +158,98 @@ acpi_status acpi_os_signal_semaphore(acpi_semaphore handle, u32 units);
*/
#if (ACPI_MUTEX_TYPE != ACPI_BINARY_SEMAPHORE)
+#ifndef ACPI_USE_ALTERNATE_PROTOTYPE_acpi_os_create_mutex
acpi_status acpi_os_create_mutex(acpi_mutex * out_handle);
+#endif
+#ifndef ACPI_USE_ALTERNATE_PROTOTYPE_acpi_os_delete_mutex
void acpi_os_delete_mutex(acpi_mutex handle);
+#endif
+#ifndef ACPI_USE_ALTERNATE_PROTOTYPE_acpi_os_acquire_mutex
acpi_status acpi_os_acquire_mutex(acpi_mutex handle, u16 timeout);
+#endif
+#ifndef ACPI_USE_ALTERNATE_PROTOTYPE_acpi_os_release_mutex
void acpi_os_release_mutex(acpi_mutex handle);
#endif
+#endif
+
/*
* Memory allocation and mapping
*/
+#ifndef ACPI_USE_ALTERNATE_PROTOTYPE_acpi_os_allocate
void *acpi_os_allocate(acpi_size size);
+#endif
+#ifndef ACPI_USE_ALTERNATE_PROTOTYPE_acpi_os_allocate_zeroed
void *acpi_os_allocate_zeroed(acpi_size size);
+#endif
+#ifndef ACPI_USE_ALTERNATE_PROTOTYPE_acpi_os_free
void acpi_os_free(void *memory);
+#endif
+#ifndef ACPI_USE_ALTERNATE_PROTOTYPE_acpi_os_map_memory
void __iomem *acpi_os_map_memory(acpi_physical_address where,
acpi_size length);
+#endif
+#ifndef ACPI_USE_ALTERNATE_PROTOTYPE_acpi_os_unmap_memory
void acpi_os_unmap_memory(void __iomem * logical_address, acpi_size size);
+#endif
void early_acpi_os_unmap_memory(void __iomem * virt, acpi_size size);
#ifdef ACPI_FUTURE_USAGE
+#ifndef ACPI_USE_ALTERNATE_PROTOTYPE_acpi_os_get_physical_address
acpi_status
acpi_os_get_physical_address(void *logical_address,
acpi_physical_address * physical_address);
#endif
+#endif
/*
* Memory/Object Cache
*/
+#ifndef ACPI_USE_ALTERNATE_PROTOTYPE_acpi_os_create_cache
acpi_status
acpi_os_create_cache(char *cache_name,
u16 object_size,
u16 max_depth, acpi_cache_t ** return_cache);
+#endif
+#ifndef ACPI_USE_ALTERNATE_PROTOTYPE_acpi_os_delete_cache
acpi_status acpi_os_delete_cache(acpi_cache_t * cache);
+#endif
+#ifndef ACPI_USE_ALTERNATE_PROTOTYPE_acpi_os_purge_cache
acpi_status acpi_os_purge_cache(acpi_cache_t * cache);
+#endif
+#ifndef ACPI_USE_ALTERNATE_PROTOTYPE_acpi_os_acquire_object
void *acpi_os_acquire_object(acpi_cache_t * cache);
+#endif
+#ifndef ACPI_USE_ALTERNATE_PROTOTYPE_acpi_os_release_object
acpi_status acpi_os_release_object(acpi_cache_t * cache, void *object);
+#endif
/*
* Interrupt handlers
*/
+#ifndef ACPI_USE_ALTERNATE_PROTOTYPE_acpi_os_install_interrupt_handler
acpi_status
acpi_os_install_interrupt_handler(u32 interrupt_number,
acpi_osd_handler service_routine,
void *context);
+#endif
+#ifndef ACPI_USE_ALTERNATE_PROTOTYPE_acpi_os_remove_interrupt_handler
acpi_status
acpi_os_remove_interrupt_handler(u32 interrupt_number,
acpi_osd_handler service_routine);
+#endif
void acpi_os_gpe_count(u32 gpe_number);
void acpi_os_fixed_event_count(u32 fixed_event_number);
@@ -196,86 +257,158 @@ void acpi_os_fixed_event_count(u32 fixed_event_number);
/*
* Threads and Scheduling
*/
+#ifndef ACPI_USE_ALTERNATE_PROTOTYPE_acpi_os_get_thread_id
acpi_thread_id acpi_os_get_thread_id(void);
+#endif
+#ifndef ACPI_USE_ALTERNATE_PROTOTYPE_acpi_os_execute
acpi_status
acpi_os_execute(acpi_execute_type type,
acpi_osd_exec_callback function, void *context);
+#endif
acpi_status
acpi_os_hotplug_execute(acpi_osd_exec_callback function, void *context);
+#ifndef ACPI_USE_ALTERNATE_PROTOTYPE_acpi_os_wait_events_complete
void acpi_os_wait_events_complete(void);
+#endif
+#ifndef ACPI_USE_ALTERNATE_PROTOTYPE_acpi_os_sleep
void acpi_os_sleep(u64 milliseconds);
+#endif
+#ifndef ACPI_USE_ALTERNATE_PROTOTYPE_acpi_os_stall
void acpi_os_stall(u32 microseconds);
+#endif
/*
* Platform and hardware-independent I/O interfaces
*/
-acpi_status acpi_os_read_port(acpi_io_address address, u32 * value, u32 width);
+#ifndef ACPI_USE_ALTERNATE_PROTOTYPE_acpi_os_read_port
+acpi_status acpi_os_read_port(acpi_io_address address, u32 *value, u32 width);
+#endif
+#ifndef ACPI_USE_ALTERNATE_PROTOTYPE_acpi_os_write_port
acpi_status acpi_os_write_port(acpi_io_address address, u32 value, u32 width);
+#endif
/*
* Platform and hardware-independent physical memory interfaces
*/
+#ifndef ACPI_USE_ALTERNATE_PROTOTYPE_acpi_os_read_memory
acpi_status
acpi_os_read_memory(acpi_physical_address address, u64 *value, u32 width);
+#endif
+#ifndef ACPI_USE_ALTERNATE_PROTOTYPE_acpi_os_write_memory
acpi_status
acpi_os_write_memory(acpi_physical_address address, u64 value, u32 width);
+#endif
/*
* Platform and hardware-independent PCI configuration space access
* Note: Can't use "Register" as a parameter, changed to "Reg" --
* certain compilers complain.
*/
+#ifndef ACPI_USE_ALTERNATE_PROTOTYPE_acpi_os_read_pci_configuration
acpi_status
acpi_os_read_pci_configuration(struct acpi_pci_id *pci_id,
u32 reg, u64 *value, u32 width);
+#endif
+#ifndef ACPI_USE_ALTERNATE_PROTOTYPE_acpi_os_write_pci_configuration
acpi_status
acpi_os_write_pci_configuration(struct acpi_pci_id *pci_id,
u32 reg, u64 value, u32 width);
+#endif
/*
* Miscellaneous
*/
+#ifndef ACPI_USE_ALTERNATE_PROTOTYPE_acpi_os_readable
+u8 acpi_os_readable(void *pointer, acpi_size length);
+#endif
+
+#ifndef ACPI_USE_ALTERNATE_PROTOTYPE_acpi_os_writable
+u8 acpi_os_writable(void *pointer, acpi_size length);
+#endif
+
+#ifndef ACPI_USE_ALTERNATE_PROTOTYPE_acpi_os_get_timer
u64 acpi_os_get_timer(void);
+#endif
+#ifndef ACPI_USE_ALTERNATE_PROTOTYPE_acpi_os_signal
acpi_status acpi_os_signal(u32 function, void *info);
+#endif
/*
* Debug print routines
*/
+#ifndef ACPI_USE_ALTERNATE_PROTOTYPE_acpi_os_printf
void ACPI_INTERNAL_VAR_XFACE acpi_os_printf(const char *format, ...);
+#endif
+#ifndef ACPI_USE_ALTERNATE_PROTOTYPE_acpi_os_vprintf
void acpi_os_vprintf(const char *format, va_list args);
+#endif
+#ifndef ACPI_USE_ALTERNATE_PROTOTYPE_acpi_os_redirect_output
void acpi_os_redirect_output(void *destination);
+#endif
#ifdef ACPI_FUTURE_USAGE
/*
* Debug input
*/
-u32 acpi_os_get_line(char *buffer);
+#ifndef ACPI_USE_ALTERNATE_PROTOTYPE_acpi_os_get_line
+acpi_status acpi_os_get_line(char *buffer, u32 buffer_length, u32 *bytes_read);
+#endif
+#endif
+
+/*
+ * Obtain ACPI table(s)
+ */
+#ifndef ACPI_USE_ALTERNATE_PROTOTYPE_acpi_os_get_table_by_name
+acpi_status
+acpi_os_get_table_by_name(char *signature,
+ u32 instance,
+ struct acpi_table_header **table,
+ acpi_physical_address * address);
+#endif
+
+#ifndef ACPI_USE_ALTERNATE_PROTOTYPE_acpi_os_get_table_by_index
+acpi_status
+acpi_os_get_table_by_index(u32 index,
+ struct acpi_table_header **table,
+ u32 *instance, acpi_physical_address * address);
+#endif
+
+#ifndef ACPI_USE_ALTERNATE_PROTOTYPE_acpi_os_get_table_by_address
+acpi_status
+acpi_os_get_table_by_address(acpi_physical_address address,
+ struct acpi_table_header **table);
#endif
/*
* Directory manipulation
*/
+#ifndef ACPI_USE_ALTERNATE_PROTOTYPE_acpi_os_open_directory
void *acpi_os_open_directory(char *pathname,
char *wildcard_spec, char requested_file_type);
+#endif
/* requeste_file_type values */
#define REQUEST_FILE_ONLY 0
#define REQUEST_DIR_ONLY 1
+#ifndef ACPI_USE_ALTERNATE_PROTOTYPE_acpi_os_get_next_filename
char *acpi_os_get_next_filename(void *dir_handle);
+#endif
+#ifndef ACPI_USE_ALTERNATE_PROTOTYPE_acpi_os_close_directory
void acpi_os_close_directory(void *dir_handle);
+#endif
#endif /* __ACPIOSXF_H__ */
diff --git a/include/acpi/platform/aclinux.h b/include/acpi/platform/aclinux.h
index 0e6e73c..04e87a3 100644
--- a/include/acpi/platform/aclinux.h
+++ b/include/acpi/platform/aclinux.h
@@ -182,6 +182,7 @@ static inline void acpi_os_free(void *a)
} \
lock ? AE_OK : AE_NO_MEMORY; \
})
+#define ACPI_USE_ALTERNATE_PROTOTYPE_acpi_os_create_lock
#ifdef EXPORT_ACPI_INTERFACES
#include <linux/export.h>
--
1.7.10
^ permalink raw reply related [flat|nested] 41+ messages in thread* [PATCH 19/20] ACPICA: Update aclinux.h for new OSL override mechanism.
2013-10-29 1:28 [PATCH 00/20] ACPICA: 20130927 Release Lv Zheng
` (17 preceding siblings ...)
2013-10-29 1:30 ` [PATCH 18/20] ACPICA: Add support to allow host to redefine individual OSL prototypes Lv Zheng
@ 2013-10-29 1:30 ` Lv Zheng
2013-10-29 1:30 ` [PATCH 20/20] ACPICA: Update version to 20130927 Lv Zheng
` (2 subsequent siblings)
21 siblings, 0 replies; 41+ messages in thread
From: Lv Zheng @ 2013-10-29 1:30 UTC (permalink / raw)
To: Rafael J. Wysocki, Robert Moore, Len Brown; +Cc: Lv Zheng, linux-acpi
The new ACPICA OSL override mechanism is used to solve these issues
for the Linux OSL:
1. Linux can implement OSL using macro.
2. Linux can implement OSL using inlined function.
3. Linux can leave OSL not implemented for __KERNEL__ undefined code
fragments.
4. Linux can add sparse declarators (__iomem) to OSL.
5. Linux can add memory tuning declarators (__init/__exit) to OSL.
This patch also moves Linux specific OSL to aclinux.h which has not been
maintained in the ACPICA code base. Lv Zheng.
Known issue:
1. Inclusion of actypes.h
From ACPICA's perspective, actypes.h should be included after inclusion
of acenv.h. But currently in Linux, aclinux.h included by acenv.h has
included actypes.h to find ACPICA types for inline functions. This is a
known and existing issue and currently there is no real problem caused
by this issue for Linux kernel build. Thus this issue is not covered by
this cleanup commit.
Signed-off-by: Lv Zheng <lv.zheng@intel.com>
Signed-off-by: Bob Moore <robert.moore@intel.com>
---
include/acpi/acpiosxf.h | 18 +-----
include/acpi/platform/aclinux.h | 118 +++++++++++++++++++++++++++++----------
2 files changed, 91 insertions(+), 45 deletions(-)
diff --git a/include/acpi/acpiosxf.h b/include/acpi/acpiosxf.h
index 55165fc..01e6c6d 100644
--- a/include/acpi/acpiosxf.h
+++ b/include/acpi/acpiosxf.h
@@ -78,7 +78,7 @@ struct acpi_signal_fatal_info {
* OSL Initialization and shutdown primitives
*/
#ifndef ACPI_USE_ALTERNATE_PROTOTYPE_acpi_os_initialize
-acpi_status __init acpi_os_initialize(void);
+acpi_status acpi_os_initialize(void);
#endif
#ifndef ACPI_USE_ALTERNATE_PROTOTYPE_acpi_os_terminate
@@ -192,22 +192,18 @@ void acpi_os_free(void *memory);
#endif
#ifndef ACPI_USE_ALTERNATE_PROTOTYPE_acpi_os_map_memory
-void __iomem *acpi_os_map_memory(acpi_physical_address where,
- acpi_size length);
+void *acpi_os_map_memory(acpi_physical_address where, acpi_size length);
#endif
#ifndef ACPI_USE_ALTERNATE_PROTOTYPE_acpi_os_unmap_memory
-void acpi_os_unmap_memory(void __iomem * logical_address, acpi_size size);
+void acpi_os_unmap_memory(void *logical_address, acpi_size size);
#endif
-void early_acpi_os_unmap_memory(void __iomem * virt, acpi_size size);
-#ifdef ACPI_FUTURE_USAGE
#ifndef ACPI_USE_ALTERNATE_PROTOTYPE_acpi_os_get_physical_address
acpi_status
acpi_os_get_physical_address(void *logical_address,
acpi_physical_address * physical_address);
#endif
-#endif
/*
* Memory/Object Cache
@@ -251,9 +247,6 @@ acpi_os_remove_interrupt_handler(u32 interrupt_number,
acpi_osd_handler service_routine);
#endif
-void acpi_os_gpe_count(u32 gpe_number);
-void acpi_os_fixed_event_count(u32 fixed_event_number);
-
/*
* Threads and Scheduling
*/
@@ -267,9 +260,6 @@ acpi_os_execute(acpi_execute_type type,
acpi_osd_exec_callback function, void *context);
#endif
-acpi_status
-acpi_os_hotplug_execute(acpi_osd_exec_callback function, void *context);
-
#ifndef ACPI_USE_ALTERNATE_PROTOTYPE_acpi_os_wait_events_complete
void acpi_os_wait_events_complete(void);
#endif
@@ -357,14 +347,12 @@ void acpi_os_vprintf(const char *format, va_list args);
void acpi_os_redirect_output(void *destination);
#endif
-#ifdef ACPI_FUTURE_USAGE
/*
* Debug input
*/
#ifndef ACPI_USE_ALTERNATE_PROTOTYPE_acpi_os_get_line
acpi_status acpi_os_get_line(char *buffer, u32 buffer_length, u32 *bytes_read);
#endif
-#endif
/*
* Obtain ACPI table(s)
diff --git a/include/acpi/platform/aclinux.h b/include/acpi/platform/aclinux.h
index 04e87a3..ab57930 100644
--- a/include/acpi/platform/aclinux.h
+++ b/include/acpi/platform/aclinux.h
@@ -50,7 +50,6 @@
#define ACPI_USE_DO_WHILE_0
#define ACPI_MUTEX_TYPE ACPI_BINARY_SEMAPHORE
-
#ifdef __KERNEL__
#include <linux/string.h>
@@ -58,11 +57,13 @@
#include <linux/ctype.h>
#include <linux/sched.h>
#include <linux/atomic.h>
-#include <asm/div64.h>
-#include <asm/acpi.h>
+#include <linux/math64.h>
#include <linux/slab.h>
#include <linux/spinlock_types.h>
-#include <asm/current.h>
+#ifdef EXPORT_ACPI_INTERFACES
+#include <linux/export.h>
+#endif
+#include <asm/acpi.h>
/* Host-dependent types and defines for in-kernel ACPICA */
@@ -109,23 +110,29 @@
#include <acpi/platform/acgcc.h>
#ifdef __KERNEL__
+
+/*
+ * FIXME: Inclusion of actypes.h
+ * Linux kernel need this before defining inline OSL interfaces as
+ * actypes.h need to be included to find ACPICA type definitions.
+ * Since from ACPICA's perspective, the actypes.h should be included after
+ * acenv.h (aclinux.h), this leads to a inclusion mis-ordering issue.
+ */
#include <acpi/actypes.h>
+
/*
* Overrides for in-kernel ACPICA
*/
-static inline acpi_thread_id acpi_os_get_thread_id(void)
-{
- return (acpi_thread_id)(unsigned long)current;
-}
+acpi_status __init acpi_os_initialize(void);
+#define ACPI_USE_ALTERNATE_PROTOTYPE_acpi_os_initialize
+
+acpi_status acpi_os_terminate(void);
+#define ACPI_USE_ALTERNATE_PROTOTYPE_acpi_os_terminate
/*
* Memory allocation/deallocation
*/
-/* Use native linux version of acpi_os_allocate_zeroed */
-
-#define USE_NATIVE_ALLOCATE_ZEROED
-
/*
* The irqs_disabled() check is for resume from RAM.
* Interrupts are off during resume, just like they are for boot.
@@ -134,26 +141,45 @@ static inline acpi_thread_id acpi_os_get_thread_id(void)
*/
static inline void *acpi_os_allocate(acpi_size size)
{
- return kmalloc(size, irqs_disabled() ? GFP_ATOMIC : GFP_KERNEL);
+ return kmalloc(size, irqs_disabled()? GFP_ATOMIC : GFP_KERNEL);
}
+#define ACPI_USE_ALTERNATE_PROTOTYPE_acpi_os_allocate
+
+/* Use native linux version of acpi_os_allocate_zeroed */
+
static inline void *acpi_os_allocate_zeroed(acpi_size size)
{
- return kzalloc(size, irqs_disabled() ? GFP_ATOMIC : GFP_KERNEL);
+ return kzalloc(size, irqs_disabled()? GFP_ATOMIC : GFP_KERNEL);
+}
+
+#define ACPI_USE_ALTERNATE_PROTOTYPE_acpi_os_allocate_zeroed
+#define USE_NATIVE_ALLOCATE_ZEROED
+
+static inline void acpi_os_free(void *memory)
+{
+ kfree(memory);
}
+#define ACPI_USE_ALTERNATE_PROTOTYPE_acpi_os_free
+
static inline void *acpi_os_acquire_object(acpi_cache_t * cache)
{
return kmem_cache_zalloc(cache,
- irqs_disabled() ? GFP_ATOMIC : GFP_KERNEL);
+ irqs_disabled()? GFP_ATOMIC : GFP_KERNEL);
}
-static inline void acpi_os_free(void *a)
+#define ACPI_USE_ALTERNATE_PROTOTYPE_acpi_os_acquire_object
+
+static inline acpi_thread_id acpi_os_get_thread_id(void)
{
- kfree(a);
+ return (acpi_thread_id) (unsigned long)current;
}
+#define ACPI_USE_ALTERNATE_PROTOTYPE_acpi_os_get_thread_id
+
#ifndef CONFIG_PREEMPT
+
/*
* Used within ACPICA to show where it is safe to preempt execution
* when CONFIG_PREEMPT=n
@@ -163,6 +189,7 @@ static inline void acpi_os_free(void *a)
if (!irqs_disabled()) \
cond_resched(); \
} while (0)
+
#endif
/*
@@ -172,21 +199,52 @@ static inline void acpi_os_free(void *a)
* all locks to the name of the argument of acpi_os_create_lock(), which
* prevents lockdep from reporting false positives for ACPICA locks.
*/
-#define acpi_os_create_lock(__handle) \
-({ \
- spinlock_t *lock = ACPI_ALLOCATE(sizeof(*lock)); \
- \
- if (lock) { \
- *(__handle) = lock; \
- spin_lock_init(*(__handle)); \
- } \
- lock ? AE_OK : AE_NO_MEMORY; \
-})
+#define acpi_os_create_lock(__handle) \
+ ({ \
+ spinlock_t *lock = ACPI_ALLOCATE(sizeof(*lock)); \
+ if (lock) { \
+ *(__handle) = lock; \
+ spin_lock_init(*(__handle)); \
+ } \
+ lock ? AE_OK : AE_NO_MEMORY; \
+ })
#define ACPI_USE_ALTERNATE_PROTOTYPE_acpi_os_create_lock
-#ifdef EXPORT_ACPI_INTERFACES
-#include <linux/export.h>
-#endif
+void __iomem *acpi_os_map_memory(acpi_physical_address where, acpi_size length);
+#define ACPI_USE_ALTERNATE_PROTOTYPE_acpi_os_map_memory
+
+void acpi_os_unmap_memory(void __iomem * logical_address, acpi_size size);
+#define ACPI_USE_ALTERNATE_PROTOTYPE_acpi_os_unmap_memory
+
+/*
+ * OSL interfaces used by debugger/disassembler
+ */
+#define ACPI_USE_ALTERNATE_PROTOTYPE_acpi_os_readable
+#define ACPI_USE_ALTERNATE_PROTOTYPE_acpi_os_writable
+
+/*
+ * OSL interfaces used by utilities
+ */
+#define ACPI_USE_ALTERNATE_PROTOTYPE_acpi_os_redirect_output
+#define ACPI_USE_ALTERNATE_PROTOTYPE_acpi_os_get_line
+#define ACPI_USE_ALTERNATE_PROTOTYPE_acpi_os_get_table_by_name
+#define ACPI_USE_ALTERNATE_PROTOTYPE_acpi_os_get_table_by_index
+#define ACPI_USE_ALTERNATE_PROTOTYPE_acpi_os_get_table_by_address
+#define ACPI_USE_ALTERNATE_PROTOTYPE_acpi_os_open_directory
+#define ACPI_USE_ALTERNATE_PROTOTYPE_acpi_os_get_next_filename
+#define ACPI_USE_ALTERNATE_PROTOTYPE_acpi_os_close_directory
+
+/*
+ * OSL interfaces added by Linux
+ */
+void early_acpi_os_unmap_memory(void __iomem * virt, acpi_size size);
+
+void acpi_os_gpe_count(u32 gpe_number);
+
+void acpi_os_fixed_event_count(u32 fixed_event_number);
+
+acpi_status
+acpi_os_hotplug_execute(acpi_osd_exec_callback function, void *context);
#endif /* __KERNEL__ */
--
1.7.10
^ permalink raw reply related [flat|nested] 41+ messages in thread* [PATCH 20/20] ACPICA: Update version to 20130927.
2013-10-29 1:28 [PATCH 00/20] ACPICA: 20130927 Release Lv Zheng
` (18 preceding siblings ...)
2013-10-29 1:30 ` [PATCH 19/20] ACPICA: Update aclinux.h for new OSL override mechanism Lv Zheng
@ 2013-10-29 1:30 ` Lv Zheng
2013-10-31 1:29 ` [PATCH 00/15] ACPICA: Update ACPICA files to reduce source code differences between Linux and ACPICA Lv Zheng
2013-10-31 13:53 ` [PATCH 00/20] ACPICA: 20130927 Release Rafael J. Wysocki
21 siblings, 0 replies; 41+ messages in thread
From: Lv Zheng @ 2013-10-29 1:30 UTC (permalink / raw)
To: Rafael J. Wysocki, Robert Moore, Len Brown; +Cc: Lv Zheng, linux-acpi
From: Bob Moore <robert.moore@intel.com>
Version 20130927.
Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Lv Zheng <lv.zheng@intel.com>
---
include/acpi/acpixf.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/acpi/acpixf.h b/include/acpi/acpixf.h
index cb2e744..b2dcab0 100644
--- a/include/acpi/acpixf.h
+++ b/include/acpi/acpixf.h
@@ -46,7 +46,7 @@
/* Current ACPICA subsystem version in YYYYMMDD format */
-#define ACPI_CA_VERSION 0x20130823
+#define ACPI_CA_VERSION 0x20130927
#include <acpi/acconfig.h>
#include <acpi/actypes.h>
--
1.7.10
^ permalink raw reply related [flat|nested] 41+ messages in thread* [PATCH 00/15] ACPICA: Update ACPICA files to reduce source code differences between Linux and ACPICA.
2013-10-29 1:28 [PATCH 00/20] ACPICA: 20130927 Release Lv Zheng
` (19 preceding siblings ...)
2013-10-29 1:30 ` [PATCH 20/20] ACPICA: Update version to 20130927 Lv Zheng
@ 2013-10-31 1:29 ` Lv Zheng
2013-10-31 1:29 ` [PATCH 01/15] ACPICA: Update default space handlers Lv Zheng
` (15 more replies)
2013-10-31 13:53 ` [PATCH 00/20] ACPICA: 20130927 Release Rafael J. Wysocki
21 siblings, 16 replies; 41+ messages in thread
From: Lv Zheng @ 2013-10-31 1:29 UTC (permalink / raw)
To: Rafael J. Wysocki, Robert Moore, Len Brown; +Cc: Lv Zheng, linux-acpi
This series is based on ACPICA 20130927 release.
This series is to reduce the source code differences between Linux and
ACPICA so that the release process can be easier with less human
intervention and the known bugs can also be prevented.
This series includes only Linux part patches.
Please also find another companion ACPICA patchset for references.
The source code differences between Linux and ACPICA can be summarized as
follows:
1. 1516 Lines (53.2 Kbytes) before applying the patch set;
2. 1001 Lines (35.3 Kbytes) after applying the patch set.
The rest of the divergences are now accountable:
1. (Internal) ACPI_FUTURE_USAGE
2. (Internal) Linux compiler.h related
3. (Internal) Bug report message
4. AcpiSrc bug
5. Some events related divergences
6. FADT 64bit/32bit favor
7. Boolean -> bool conversion
8. GPE masking mechanism
9. D3_cold implicity
10. XSDT - introduced by table override and sgi-hotplug
11. Xen sleep register hook
12. Slow hardware support
Where:
Internal: divergences are committed and would not be fixed.
A QA process is executed to compare resulting binary files. Those patches
which were not expected to change any text section indeed, changed no text.
Sometimes line numbers changed due to line deletions and insertions, but
that is expected.
The patch set has passed a build/boot test on the following machines:
Dell Inspiron Mini 1010 (i386)
HP Compaq 8200 Elite SFF PC (x86-64)
With the following kernel configuration items enabled:
CONFIG_ACPI_AC
CONFIG_ACPI_BATTERY
CONFIG_ACPI_NUMA
CONFIG_ACPI_PROCESSOR
CONFIG_ACPI_THERMAL
CONFIG_ACPI_VIDEO
CONFIG_CPU_FREQ
CONFIG_I2C_SCMI
CONFIG_SENSORS_ACPI_POWER
CONFIG_PANASONIC_LAPTOP
CONFIG_XO15_EBOOK
CONFIG_DMAR_TABLE
CONFIG_INTEL_IOMMU
CONFIG_IRQ_REMAP
Please review.
Lv Zheng (15):
ACPICA: Update default space handlers.
ACPICA: Update ANOBJ_IS_EXTERNAL flag.
ACPICA: Update namespace dump code.
ACPICA: Update RSDP table definitions.
ACPICA: Update DMAR table definitions.
ACPICA: Add new statistics interface.
ACPICA: Fix wrong object length returned by
acpi_ut_get_simple_object_size().
ACPICA: Fix an ACPI_ALLOCATE_ZEROED() reversal.
ACPICA: Cleanup useless memset invocations.
ACPICA: Remove dead AOPOBJ_INVALID check.
ACPICA: Fix cached object deletion code.
ACPICA: Update compilation environment settings.
ACPICA: Update acpidump related header file changes.
ACPICA: Cleanup asmlinkage for ACPICA APIs.
ACPICA: Add __init for ACPICA initializers/finalizers.
arch/x86/kernel/acpi/sleep.c | 10 +++++++++
arch/x86/kernel/acpi/sleep.h | 2 ++
arch/x86/kernel/acpi/wakeup_32.S | 2 +-
arch/x86/kernel/acpi/wakeup_64.S | 2 +-
drivers/acpi/acpica/acglobal.h | 2 ++
drivers/acpi/acpica/dsmethod.c | 1 +
drivers/acpi/acpica/evsci.c | 1 +
drivers/acpi/acpica/exfldio.c | 6 ------
drivers/acpi/acpica/exregion.c | 1 +
drivers/acpi/acpica/hwxfsleep.c | 4 ++--
drivers/acpi/acpica/nsdumpdv.c | 7 ++++--
drivers/acpi/acpica/nssearch.c | 3 ++-
drivers/acpi/acpica/tbutils.c | 3 +--
drivers/acpi/acpica/tbxface.c | 2 +-
drivers/acpi/acpica/tbxfload.c | 2 +-
drivers/acpi/acpica/tbxfroot.c | 2 +-
drivers/acpi/acpica/utalloc.c | 4 ++--
drivers/acpi/acpica/utglobal.c | 12 +++++++++++
drivers/acpi/acpica/utobject.c | 26 ++++++++++++-----------
drivers/acpi/acpica/utstate.c | 1 -
drivers/acpi/acpica/utxface.c | 40 ++++++++++++++++++++++++++++++++++-
drivers/acpi/acpica/utxfinit.c | 6 +++---
drivers/iommu/dmar.c | 4 ++--
drivers/iommu/intel_irq_remapping.c | 8 +++----
include/acpi/acpixf.h | 20 ++++++++++--------
include/acpi/actbl.h | 19 ++++++++++++++++-
include/acpi/actbl2.h | 4 ++--
include/acpi/actypes.h | 18 ++++++++++++++++
include/acpi/platform/acenv.h | 8 +++++--
29 files changed, 163 insertions(+), 57 deletions(-)
--
1.7.10
^ permalink raw reply [flat|nested] 41+ messages in thread* [PATCH 01/15] ACPICA: Update default space handlers.
2013-10-31 1:29 ` [PATCH 00/15] ACPICA: Update ACPICA files to reduce source code differences between Linux and ACPICA Lv Zheng
@ 2013-10-31 1:29 ` Lv Zheng
2013-10-31 1:30 ` [PATCH 02/15] ACPICA: Update ANOBJ_IS_EXTERNAL flag Lv Zheng
` (14 subsequent siblings)
15 siblings, 0 replies; 41+ messages in thread
From: Lv Zheng @ 2013-10-31 1:29 UTC (permalink / raw)
To: Rafael J. Wysocki, Robert Moore, Len Brown; +Cc: Lv Zheng, linux-acpi
This patch decreases 11 lines of divergences.
This patch includes code fragment that is already in ACPICA upstream.
Thus applying this patch can help to reduce the source code differences
between Linux and ACPICA upstream.
This code fragment is only useful to ACPICA utilities that might occur in
tools/power/acpi folder and there is no functional changes can be caused to
the Linux kernel by applying this patch.
Signed-off-by: Lv Zheng <lv.zheng@intel.com>
---
drivers/acpi/acpica/exregion.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/acpi/acpica/exregion.c b/drivers/acpi/acpica/exregion.c
index 303429bb..9d28867e 100644
--- a/drivers/acpi/acpica/exregion.c
+++ b/drivers/acpi/acpica/exregion.c
@@ -400,6 +400,7 @@ acpi_ex_pci_config_space_handler(u32 function,
switch (function) {
case ACPI_READ:
+ *value = 0;
status = acpi_os_read_pci_configuration(pci_id, pci_register,
value, bit_width);
break;
--
1.7.10
^ permalink raw reply related [flat|nested] 41+ messages in thread* [PATCH 02/15] ACPICA: Update ANOBJ_IS_EXTERNAL flag.
2013-10-31 1:29 ` [PATCH 00/15] ACPICA: Update ACPICA files to reduce source code differences between Linux and ACPICA Lv Zheng
2013-10-31 1:29 ` [PATCH 01/15] ACPICA: Update default space handlers Lv Zheng
@ 2013-10-31 1:30 ` Lv Zheng
2013-10-31 1:30 ` [PATCH 03/15] ACPICA: Update namespace dump code Lv Zheng
` (13 subsequent siblings)
15 siblings, 0 replies; 41+ messages in thread
From: Lv Zheng @ 2013-10-31 1:30 UTC (permalink / raw)
To: Rafael J. Wysocki, Robert Moore, Len Brown; +Cc: Lv Zheng, linux-acpi
This patch decreases 13 lines of divergences.
The ANOBJ_IS_EXTERNAL flag is only used by an ACPICA utilities - iASL.
There is no functional change for Linux kernel by applying this commit
except the above mentioned divergences reduction.
Signed-off-by: Lv Zheng <lv.zheng@intel.com>
---
drivers/acpi/acpica/nssearch.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/acpi/acpica/nssearch.c b/drivers/acpi/acpica/nssearch.c
index 5d43efc..47420fa 100644
--- a/drivers/acpi/acpica/nssearch.c
+++ b/drivers/acpi/acpica/nssearch.c
@@ -381,7 +381,8 @@ acpi_ns_search_and_enter(u32 target_name,
/* Node is an object defined by an External() statement */
- if (flags & ACPI_NS_EXTERNAL) {
+ if (flags & ACPI_NS_EXTERNAL ||
+ (walk_state && walk_state->opcode == AML_SCOPE_OP)) {
new_node->flags |= ANOBJ_IS_EXTERNAL;
}
#endif
--
1.7.10
^ permalink raw reply related [flat|nested] 41+ messages in thread* [PATCH 03/15] ACPICA: Update namespace dump code.
2013-10-31 1:29 ` [PATCH 00/15] ACPICA: Update ACPICA files to reduce source code differences between Linux and ACPICA Lv Zheng
2013-10-31 1:29 ` [PATCH 01/15] ACPICA: Update default space handlers Lv Zheng
2013-10-31 1:30 ` [PATCH 02/15] ACPICA: Update ANOBJ_IS_EXTERNAL flag Lv Zheng
@ 2013-10-31 1:30 ` Lv Zheng
2013-10-31 1:30 ` [PATCH 04/15] ACPICA: Update RSDP table definitions Lv Zheng
` (12 subsequent siblings)
15 siblings, 0 replies; 41+ messages in thread
From: Lv Zheng @ 2013-10-31 1:30 UTC (permalink / raw)
To: Rafael J. Wysocki, Robert Moore, Len Brown; +Cc: Lv Zheng, linux-acpi
This patch does not affect the generation of the Linux binary.
This patch decreases 31 lines of divergences.
This patch merges namespace dump code updates from ACPICA upstream to
reduce the source code differences between Linux and ACPICA upstream. No
functional changes as currently nsdumpdv.c is not used by Linux.
Signed-off-by: Lv Zheng <lv.zheng@intel.com>
---
drivers/acpi/acpica/nsdumpdv.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/drivers/acpi/acpica/nsdumpdv.c b/drivers/acpi/acpica/nsdumpdv.c
index 409ae80..2837625 100644
--- a/drivers/acpi/acpica/nsdumpdv.c
+++ b/drivers/acpi/acpica/nsdumpdv.c
@@ -69,6 +69,7 @@ static acpi_status
acpi_ns_dump_one_device(acpi_handle obj_handle,
u32 level, void *context, void **return_value)
{
+ struct acpi_buffer buffer;
struct acpi_device_info *info;
acpi_status status;
u32 i;
@@ -78,15 +79,17 @@ acpi_ns_dump_one_device(acpi_handle obj_handle,
status =
acpi_ns_dump_one_object(obj_handle, level, context, return_value);
- status = acpi_get_object_info(obj_handle, &info);
+ buffer.length = ACPI_ALLOCATE_LOCAL_BUFFER;
+ status = acpi_get_object_info(obj_handle, &buffer);
if (ACPI_SUCCESS(status)) {
+ info = buffer.pointer;
for (i = 0; i < level; i++) {
ACPI_DEBUG_PRINT_RAW((ACPI_DB_TABLES, " "));
}
ACPI_DEBUG_PRINT_RAW((ACPI_DB_TABLES,
" HID: %s, ADR: %8.8X%8.8X, Status: %X\n",
- info->hardware_id.string,
+ info->hardware_id.value,
ACPI_FORMAT_UINT64(info->address),
info->current_status));
ACPI_FREE(info);
--
1.7.10
^ permalink raw reply related [flat|nested] 41+ messages in thread* [PATCH 04/15] ACPICA: Update RSDP table definitions.
2013-10-31 1:29 ` [PATCH 00/15] ACPICA: Update ACPICA files to reduce source code differences between Linux and ACPICA Lv Zheng
` (2 preceding siblings ...)
2013-10-31 1:30 ` [PATCH 03/15] ACPICA: Update namespace dump code Lv Zheng
@ 2013-10-31 1:30 ` Lv Zheng
2013-10-31 1:30 ` [PATCH 05/15] ACPICA: Update DMAR " Lv Zheng
` (11 subsequent siblings)
15 siblings, 0 replies; 41+ messages in thread
From: Lv Zheng @ 2013-10-31 1:30 UTC (permalink / raw)
To: Rafael J. Wysocki, Robert Moore, Len Brown; +Cc: Lv Zheng, linux-acpi
This patch does not affect the generation of the Linux binary.
This patch decreases 26 lines of divergences.
This patch updates RSDP table header definitions as such enhancement
already has been done in ACPICA. This patch merges such changes into Linux
to reduce the source code differences between Linux and ACPICA upstream.
Signed-off-by: Lv Zheng <lv.zheng@intel.com>
---
include/acpi/actbl.h | 19 ++++++++++++++++++-
1 file changed, 18 insertions(+), 1 deletion(-)
diff --git a/include/acpi/actbl.h b/include/acpi/actbl.h
index 9b58a8f..9497088 100644
--- a/include/acpi/actbl.h
+++ b/include/acpi/actbl.h
@@ -146,7 +146,24 @@ struct acpi_table_rsdp {
u8 reserved[3]; /* Reserved, must be zero */
};
-#define ACPI_RSDP_REV0_SIZE 20 /* Size of original ACPI 1.0 RSDP */
+/* Standalone struct for the ACPI 1.0 RSDP */
+
+struct acpi_rsdp_common {
+ char signature[8];
+ u8 checksum;
+ char oem_id[ACPI_OEM_ID_SIZE];
+ u8 revision;
+ u32 rsdt_physical_address;
+};
+
+/* Standalone struct for the extended part of the RSDP (ACPI 2.0+) */
+
+struct acpi_rsdp_extension {
+ u32 length;
+ u64 xsdt_physical_address;
+ u8 extended_checksum;
+ u8 reserved[3];
+};
/*******************************************************************************
*
--
1.7.10
^ permalink raw reply related [flat|nested] 41+ messages in thread* [PATCH 05/15] ACPICA: Update DMAR table definitions.
2013-10-31 1:29 ` [PATCH 00/15] ACPICA: Update ACPICA files to reduce source code differences between Linux and ACPICA Lv Zheng
` (3 preceding siblings ...)
2013-10-31 1:30 ` [PATCH 04/15] ACPICA: Update RSDP table definitions Lv Zheng
@ 2013-10-31 1:30 ` Lv Zheng
2013-10-31 1:30 ` [PATCH 06/15] ACPICA: Add new statistics interface Lv Zheng
` (10 subsequent siblings)
15 siblings, 0 replies; 41+ messages in thread
From: Lv Zheng @ 2013-10-31 1:30 UTC (permalink / raw)
To: Rafael J. Wysocki, Robert Moore, Len Brown; +Cc: Lv Zheng, linux-acpi
This patch does not affect the generation of the Linux binary.
This patch decreases 14 lines of divergences.
This patch updates DMAR table header definitions as such modification
already has been done in ACPICA. This patch merges such changes into Linux
to reduce the source code differences between Linux and ACPICA upstream.
Build test is done on x86-64 machine with following configs enabled:
CONFIG_DMAR_TABLE
CONFIG_IRQ_REMAP
CONFIG_INTEL_IOMMU
Signed-off-by: Lv Zheng <lv.zheng@intel.com>
---
drivers/iommu/dmar.c | 4 ++--
drivers/iommu/intel_irq_remapping.c | 8 ++++----
include/acpi/actbl2.h | 4 ++--
3 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/drivers/iommu/dmar.c b/drivers/iommu/dmar.c
index 785675a..9009469 100644
--- a/drivers/iommu/dmar.c
+++ b/drivers/iommu/dmar.c
@@ -88,7 +88,7 @@ static int __init dmar_parse_one_dev_scope(struct acpi_dmar_device_scope *scope,
pr_warn("Device scope bus [%d] not found\n", scope->bus);
break;
}
- pdev = pci_get_slot(bus, PCI_DEVFN(path->dev, path->fn));
+ pdev = pci_get_slot(bus, PCI_DEVFN(path->device, path->function));
if (!pdev) {
/* warning will be printed below */
break;
@@ -99,7 +99,7 @@ static int __init dmar_parse_one_dev_scope(struct acpi_dmar_device_scope *scope,
}
if (!pdev) {
pr_warn("Device scope device [%04x:%02x:%02x.%02x] not found\n",
- segment, scope->bus, path->dev, path->fn);
+ segment, scope->bus, path->device, path->function);
*dev = NULL;
return 0;
}
diff --git a/drivers/iommu/intel_irq_remapping.c b/drivers/iommu/intel_irq_remapping.c
index f71673d..ab86902 100644
--- a/drivers/iommu/intel_irq_remapping.c
+++ b/drivers/iommu/intel_irq_remapping.c
@@ -686,12 +686,12 @@ static void ir_parse_one_hpet_scope(struct acpi_dmar_device_scope *scope,
* Access PCI directly due to the PCI
* subsystem isn't initialized yet.
*/
- bus = read_pci_config_byte(bus, path->dev, path->fn,
+ bus = read_pci_config_byte(bus, path->device, path->function,
PCI_SECONDARY_BUS);
path++;
}
ir_hpet[ir_hpet_num].bus = bus;
- ir_hpet[ir_hpet_num].devfn = PCI_DEVFN(path->dev, path->fn);
+ ir_hpet[ir_hpet_num].devfn = PCI_DEVFN(path->device, path->function);
ir_hpet[ir_hpet_num].iommu = iommu;
ir_hpet[ir_hpet_num].id = scope->enumeration_id;
ir_hpet_num++;
@@ -714,13 +714,13 @@ static void ir_parse_one_ioapic_scope(struct acpi_dmar_device_scope *scope,
* Access PCI directly due to the PCI
* subsystem isn't initialized yet.
*/
- bus = read_pci_config_byte(bus, path->dev, path->fn,
+ bus = read_pci_config_byte(bus, path->device, path->function,
PCI_SECONDARY_BUS);
path++;
}
ir_ioapic[ir_ioapic_num].bus = bus;
- ir_ioapic[ir_ioapic_num].devfn = PCI_DEVFN(path->dev, path->fn);
+ ir_ioapic[ir_ioapic_num].devfn = PCI_DEVFN(path->device, path->function);
ir_ioapic[ir_ioapic_num].iommu = iommu;
ir_ioapic[ir_ioapic_num].id = scope->enumeration_id;
ir_ioapic_num++;
diff --git a/include/acpi/actbl2.h b/include/acpi/actbl2.h
index ffaac0e..40f7ed1 100644
--- a/include/acpi/actbl2.h
+++ b/include/acpi/actbl2.h
@@ -444,8 +444,8 @@ enum acpi_dmar_scope_type {
};
struct acpi_dmar_pci_path {
- u8 dev;
- u8 fn;
+ u8 device;
+ u8 function;
};
/*
--
1.7.10
^ permalink raw reply related [flat|nested] 41+ messages in thread* [PATCH 06/15] ACPICA: Add new statistics interface.
2013-10-31 1:29 ` [PATCH 00/15] ACPICA: Update ACPICA files to reduce source code differences between Linux and ACPICA Lv Zheng
` (4 preceding siblings ...)
2013-10-31 1:30 ` [PATCH 05/15] ACPICA: Update DMAR " Lv Zheng
@ 2013-10-31 1:30 ` Lv Zheng
2013-10-31 1:30 ` [PATCH 07/15] ACPICA: Fix wrong object length returned by acpi_ut_get_simple_object_size() Lv Zheng
` (9 subsequent siblings)
15 siblings, 0 replies; 41+ messages in thread
From: Lv Zheng @ 2013-10-31 1:30 UTC (permalink / raw)
To: Rafael J. Wysocki, Robert Moore, Len Brown; +Cc: Lv Zheng, linux-acpi
This patch decreases 133 lines of divergences.
This patch ports new counters and statistics interface to Linux as such
enhancement has already been implemented in ACPICA. This patch can also
reduce the source code differences between Linux and ACPICA upstream.
Signed-off-by: Lv Zheng <lv.zheng@intel.com>
---
drivers/acpi/acpica/acglobal.h | 2 ++
drivers/acpi/acpica/dsmethod.c | 1 +
drivers/acpi/acpica/evsci.c | 1 +
drivers/acpi/acpica/utglobal.c | 12 ++++++++++++
drivers/acpi/acpica/utxface.c | 38 ++++++++++++++++++++++++++++++++++++++
include/acpi/acpixf.h | 2 ++
include/acpi/actypes.h | 10 ++++++++++
7 files changed, 66 insertions(+)
diff --git a/drivers/acpi/acpica/acglobal.h b/drivers/acpi/acpica/acglobal.h
index 0fba431..e9f1fc7 100644
--- a/drivers/acpi/acpica/acglobal.h
+++ b/drivers/acpi/acpica/acglobal.h
@@ -406,7 +406,9 @@ extern u32 acpi_gbl_nesting_level;
/* Event counters */
+ACPI_EXTERN u32 acpi_method_count;
ACPI_EXTERN u32 acpi_gpe_count;
+ACPI_EXTERN u32 acpi_sci_count;
ACPI_EXTERN u32 acpi_fixed_event_count[ACPI_NUM_FIXED_EVENTS];
/* Support for dynamic control method tracing mechanism */
diff --git a/drivers/acpi/acpica/dsmethod.c b/drivers/acpi/acpica/dsmethod.c
index df3ea12..81a78ba 100644
--- a/drivers/acpi/acpica/dsmethod.c
+++ b/drivers/acpi/acpica/dsmethod.c
@@ -292,6 +292,7 @@ acpi_ds_begin_method_execution(struct acpi_namespace_node *method_node,
* reentered one more time (even if it is the same thread)
*/
obj_desc->method.thread_count++;
+ acpi_method_count++;
return_ACPI_STATUS(status);
cleanup:
diff --git a/drivers/acpi/acpica/evsci.c b/drivers/acpi/acpica/evsci.c
index 94d9ebd..9e9e345 100644
--- a/drivers/acpi/acpica/evsci.c
+++ b/drivers/acpi/acpica/evsci.c
@@ -137,6 +137,7 @@ static u32 ACPI_SYSTEM_XFACE acpi_ev_sci_xrupt_handler(void *context)
interrupt_handled |= acpi_ev_sci_dispatch();
+ acpi_sci_count++;
return_UINT32(interrupt_handled);
}
diff --git a/drivers/acpi/acpica/utglobal.c b/drivers/acpi/acpica/utglobal.c
index 77caa4f..81f9a95 100644
--- a/drivers/acpi/acpica/utglobal.c
+++ b/drivers/acpi/acpica/utglobal.c
@@ -289,6 +289,16 @@ acpi_status acpi_ut_init_globals(void)
acpi_gbl_owner_id_mask[ACPI_NUM_OWNERID_MASKS - 1] = 0x80000000;
+ /* Event counters */
+
+ acpi_method_count = 0;
+ acpi_sci_count = 0;
+ acpi_gpe_count = 0;
+
+ for (i = 0; i < ACPI_NUM_FIXED_EVENTS; i++) {
+ acpi_fixed_event_count[i] = 0;
+ }
+
#if (!ACPI_REDUCED_HARDWARE)
/* GPE/SCI support */
@@ -383,4 +393,6 @@ ACPI_EXPORT_SYMBOL(acpi_dbg_level)
ACPI_EXPORT_SYMBOL(acpi_dbg_layer)
+ACPI_EXPORT_SYMBOL(acpi_gpe_count)
+
ACPI_EXPORT_SYMBOL(acpi_current_gpe_count)
diff --git a/drivers/acpi/acpica/utxface.c b/drivers/acpi/acpica/utxface.c
index 891a37b..3986902 100644
--- a/drivers/acpi/acpica/utxface.c
+++ b/drivers/acpi/acpica/utxface.c
@@ -208,6 +208,44 @@ acpi_status acpi_get_system_info(struct acpi_buffer * out_buffer)
ACPI_EXPORT_SYMBOL(acpi_get_system_info)
+/*******************************************************************************
+ *
+ * FUNCTION: acpi_get_statistics
+ *
+ * PARAMETERS: stats - Where the statistics are returned
+ *
+ * RETURN: status - the status of the call
+ *
+ * DESCRIPTION: Get the contents of the various system counters
+ *
+ ******************************************************************************/
+acpi_status acpi_get_statistics(struct acpi_statistics *stats)
+{
+ ACPI_FUNCTION_TRACE(acpi_get_statistics);
+
+ /* Parameter validation */
+
+ if (!stats) {
+ return_ACPI_STATUS(AE_BAD_PARAMETER);
+ }
+
+ /* Various interrupt-based event counters */
+
+ stats->sci_count = acpi_sci_count;
+ stats->gpe_count = acpi_gpe_count;
+
+ ACPI_MEMCPY(stats->fixed_event_count, acpi_fixed_event_count,
+ sizeof(acpi_fixed_event_count));
+
+ /* Other counters */
+
+ stats->method_count = acpi_method_count;
+
+ return_ACPI_STATUS(AE_OK);
+}
+
+ACPI_EXPORT_SYMBOL(acpi_get_statistics)
+
/*****************************************************************************
*
* FUNCTION: acpi_install_initialization_handler
diff --git a/include/acpi/acpixf.h b/include/acpi/acpixf.h
index b2dcab0..7def8ca 100644
--- a/include/acpi/acpixf.h
+++ b/include/acpi/acpixf.h
@@ -140,6 +140,8 @@ ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status acpi_disable(void))
acpi_status acpi_get_system_info(struct acpi_buffer *ret_buffer);
#endif
+acpi_status acpi_get_statistics(struct acpi_statistics *stats);
+
const char *acpi_format_exception(acpi_status exception);
acpi_status acpi_purge_cached_objects(void);
diff --git a/include/acpi/actypes.h b/include/acpi/actypes.h
index 8614bc1..0e32b6c 100644
--- a/include/acpi/actypes.h
+++ b/include/acpi/actypes.h
@@ -973,6 +973,16 @@ struct acpi_system_info {
u32 debug_layer;
};
+/*
+ * System statistics returned by acpi_get_statistics()
+ */
+struct acpi_statistics {
+ u32 sci_count;
+ u32 gpe_count;
+ u32 fixed_event_count[ACPI_NUM_FIXED_EVENTS];
+ u32 method_count;
+};
+
/* Table Event Types */
#define ACPI_TABLE_EVENT_LOAD 0x0
--
1.7.10
^ permalink raw reply related [flat|nested] 41+ messages in thread* [PATCH 07/15] ACPICA: Fix wrong object length returned by acpi_ut_get_simple_object_size().
2013-10-31 1:29 ` [PATCH 00/15] ACPICA: Update ACPICA files to reduce source code differences between Linux and ACPICA Lv Zheng
` (5 preceding siblings ...)
2013-10-31 1:30 ` [PATCH 06/15] ACPICA: Add new statistics interface Lv Zheng
@ 2013-10-31 1:30 ` Lv Zheng
2013-10-31 1:30 ` [PATCH 08/15] ACPICA: Fix an ACPI_ALLOCATE_ZEROED() reversal Lv Zheng
` (8 subsequent siblings)
15 siblings, 0 replies; 41+ messages in thread
From: Lv Zheng @ 2013-10-31 1:30 UTC (permalink / raw)
To: Rafael J. Wysocki, Robert Moore, Len Brown; +Cc: Lv Zheng, linux-acpi
This patch decreases 39 lines of divergences.
There is object length returned by acpi_ut_get_simple_object_size() hasn't
been rounded up to the word boundary.
This patch merges fix from ACPICA upstream as such enhacement already has
been done in ACPICA upstream.
Signed-off-by: Lv Zheng <lv.zheng@intel.com>
---
drivers/acpi/acpica/utobject.c | 23 +++++++++++++----------
1 file changed, 13 insertions(+), 10 deletions(-)
diff --git a/drivers/acpi/acpica/utobject.c b/drivers/acpi/acpica/utobject.c
index aa61f66..cddb0ef 100644
--- a/drivers/acpi/acpica/utobject.c
+++ b/drivers/acpi/acpica/utobject.c
@@ -461,25 +461,28 @@ acpi_ut_get_simple_object_size(union acpi_operand_object *internal_object,
ACPI_FUNCTION_TRACE_PTR(ut_get_simple_object_size, internal_object);
+ /* Start with the length of the (external) Acpi object */
+
+ length = sizeof(union acpi_object);
+
+ /* A NULL object is allowed, can be a legal uninitialized package element */
+
+ if (!internal_object) {
/*
- * Handle a null object (Could be a uninitialized package
- * element -- which is legal)
+ * Object is NULL, just return the length of union acpi_object
+ * (A NULL union acpi_object is an object of all zeroes.)
*/
- if (!internal_object) {
- *obj_length = sizeof(union acpi_object);
+ *obj_length = ACPI_ROUND_UP_TO_NATIVE_WORD(length);
return_ACPI_STATUS(AE_OK);
}
- /* Start with the length of the Acpi object */
-
- length = sizeof(union acpi_object);
+ /* A Namespace Node should never appear here */
if (ACPI_GET_DESCRIPTOR_TYPE(internal_object) == ACPI_DESC_TYPE_NAMED) {
- /* Object is a named object (reference), just return the length */
+ /* A namespace node should never get here */
- *obj_length = ACPI_ROUND_UP_TO_NATIVE_WORD(length);
- return_ACPI_STATUS(status);
+ return_ACPI_STATUS(AE_AML_INTERNAL);
}
/*
--
1.7.10
^ permalink raw reply related [flat|nested] 41+ messages in thread* [PATCH 08/15] ACPICA: Fix an ACPI_ALLOCATE_ZEROED() reversal.
2013-10-31 1:29 ` [PATCH 00/15] ACPICA: Update ACPICA files to reduce source code differences between Linux and ACPICA Lv Zheng
` (6 preceding siblings ...)
2013-10-31 1:30 ` [PATCH 07/15] ACPICA: Fix wrong object length returned by acpi_ut_get_simple_object_size() Lv Zheng
@ 2013-10-31 1:30 ` Lv Zheng
2013-10-31 1:30 ` [PATCH 09/15] ACPICA: Cleanup useless memset invocations Lv Zheng
` (7 subsequent siblings)
15 siblings, 0 replies; 41+ messages in thread
From: Lv Zheng @ 2013-10-31 1:30 UTC (permalink / raw)
To: Rafael J. Wysocki, Robert Moore, Len Brown; +Cc: Lv Zheng, linux-acpi
This patch decreases 9 lines of divergences as this enhancement is already
in the ACPICA upstream.
This patch cleans up the code as ACPI_FREE() should be the reversal of
ACPI_ALLOCATE_ZEROED().
Signed-off-by: Lv Zheng <lv.zheng@intel.com>
---
drivers/acpi/acpica/utobject.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/acpi/acpica/utobject.c b/drivers/acpi/acpica/utobject.c
index cddb0ef..d2a7b61 100644
--- a/drivers/acpi/acpica/utobject.c
+++ b/drivers/acpi/acpica/utobject.c
@@ -180,7 +180,7 @@ union acpi_operand_object *acpi_ut_create_package_object(u32 count)
package_elements = ACPI_ALLOCATE_ZEROED(((acpi_size) count +
1) * sizeof(void *));
if (!package_elements) {
- acpi_ut_remove_reference(package_desc);
+ ACPI_FREE(package_desc);
return_PTR(NULL);
}
--
1.7.10
^ permalink raw reply related [flat|nested] 41+ messages in thread* [PATCH 09/15] ACPICA: Cleanup useless memset invocations.
2013-10-31 1:29 ` [PATCH 00/15] ACPICA: Update ACPICA files to reduce source code differences between Linux and ACPICA Lv Zheng
` (7 preceding siblings ...)
2013-10-31 1:30 ` [PATCH 08/15] ACPICA: Fix an ACPI_ALLOCATE_ZEROED() reversal Lv Zheng
@ 2013-10-31 1:30 ` Lv Zheng
2013-10-31 1:30 ` [PATCH 10/15] ACPICA: Remove dead AOPOBJ_INVALID check Lv Zheng
` (6 subsequent siblings)
15 siblings, 0 replies; 41+ messages in thread
From: Lv Zheng @ 2013-10-31 1:30 UTC (permalink / raw)
To: Rafael J. Wysocki, Robert Moore, Len Brown; +Cc: Lv Zheng, linux-acpi
This patch decreases 22 lines of divergences.
This patch cleans up some memset() invocations where kmem_cache_zalloc()
is just invoked.
Signed-off-by: Lv Zheng <lv.zheng@intel.com>
---
drivers/acpi/acpica/utobject.c | 1 -
drivers/acpi/acpica/utstate.c | 1 -
2 files changed, 2 deletions(-)
diff --git a/drivers/acpi/acpica/utobject.c b/drivers/acpi/acpica/utobject.c
index d2a7b61..13e0450 100644
--- a/drivers/acpi/acpica/utobject.c
+++ b/drivers/acpi/acpica/utobject.c
@@ -396,7 +396,6 @@ void *acpi_ut_allocate_object_desc_dbg(const char *module_name,
/* Mark the descriptor type */
- memset(object, 0, sizeof(union acpi_operand_object));
ACPI_SET_DESCRIPTOR_TYPE(object, ACPI_DESC_TYPE_OPERAND);
ACPI_DEBUG_PRINT((ACPI_DB_ALLOCATIONS, "%p Size %X\n",
diff --git a/drivers/acpi/acpica/utstate.c b/drivers/acpi/acpica/utstate.c
index a6b729d..03c4c2f 100644
--- a/drivers/acpi/acpica/utstate.c
+++ b/drivers/acpi/acpica/utstate.c
@@ -161,7 +161,6 @@ union acpi_generic_state *acpi_ut_create_generic_state(void)
if (state) {
/* Initialize */
- memset(state, 0, sizeof(union acpi_generic_state));
state->common.descriptor_type = ACPI_DESC_TYPE_STATE;
}
--
1.7.10
^ permalink raw reply related [flat|nested] 41+ messages in thread* [PATCH 10/15] ACPICA: Remove dead AOPOBJ_INVALID check.
2013-10-31 1:29 ` [PATCH 00/15] ACPICA: Update ACPICA files to reduce source code differences between Linux and ACPICA Lv Zheng
` (8 preceding siblings ...)
2013-10-31 1:30 ` [PATCH 09/15] ACPICA: Cleanup useless memset invocations Lv Zheng
@ 2013-10-31 1:30 ` Lv Zheng
2013-10-31 1:31 ` [PATCH 11/15] ACPICA: Fix cached object deletion code Lv Zheng
` (5 subsequent siblings)
15 siblings, 0 replies; 41+ messages in thread
From: Lv Zheng @ 2013-10-31 1:30 UTC (permalink / raw)
To: Rafael J. Wysocki, Robert Moore, Len Brown; +Cc: Lv Zheng, linux-acpi
This patch decreases 16 lines of divergences.
The following reversion commit restored a piece of dead code related to an
obselete AOPOBJ_INVALID flag.
Commit: 7cb7f45c7feef43c8f71f5cfedfc0b19be2142f7
Subject: Revert "ACPICA: Remove obsolete acpi_os_validate_address
interface"
This patch fixes wrong release commit to reduce the source code differences
between Linux and ACPICA upstream.
Signed-off-by: Lv Zheng <lv.zheng@intel.com>
---
drivers/acpi/acpica/exfldio.c | 6 ------
1 file changed, 6 deletions(-)
diff --git a/drivers/acpi/acpica/exfldio.c b/drivers/acpi/acpica/exfldio.c
index 8ab01b6..49fb742 100644
--- a/drivers/acpi/acpica/exfldio.c
+++ b/drivers/acpi/acpica/exfldio.c
@@ -123,12 +123,6 @@ acpi_ex_setup_region(union acpi_operand_object *obj_desc,
}
}
- /* Exit if Address/Length have been disallowed by the host OS */
-
- if (rgn_desc->common.flags & AOPOBJ_INVALID) {
- return_ACPI_STATUS(AE_AML_ILLEGAL_ADDRESS);
- }
-
/*
* Exit now for SMBus, GSBus or IPMI address space, it has a non-linear
* address space and the request cannot be directly validated
--
1.7.10
^ permalink raw reply related [flat|nested] 41+ messages in thread* [PATCH 11/15] ACPICA: Fix cached object deletion code.
2013-10-31 1:29 ` [PATCH 00/15] ACPICA: Update ACPICA files to reduce source code differences between Linux and ACPICA Lv Zheng
` (9 preceding siblings ...)
2013-10-31 1:30 ` [PATCH 10/15] ACPICA: Remove dead AOPOBJ_INVALID check Lv Zheng
@ 2013-10-31 1:31 ` Lv Zheng
2013-10-31 1:31 ` [PATCH 12/15] ACPICA: Update compilation environment settings Lv Zheng
` (4 subsequent siblings)
15 siblings, 0 replies; 41+ messages in thread
From: Lv Zheng @ 2013-10-31 1:31 UTC (permalink / raw)
To: Rafael J. Wysocki, Robert Moore, Len Brown; +Cc: Lv Zheng, linux-acpi
This patch decreases 16 lines of divergences.
The function acpi_ut_delete_caches() is meant to be used to implement
ACPI_ALLOCATE()/ACPI_FREE() mechanisms in ACPICA, thus it should call
acpi_os_free() rather than ACPI_FREE(). Linux is not affected by this
issue as Linux is using kmem_cache instead of the ACPICA local cache.
Signed-off-by: Lv Zheng <lv.zheng@intel.com>
---
drivers/acpi/acpica/utalloc.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/acpi/acpica/utalloc.c b/drivers/acpi/acpica/utalloc.c
index d844796..814267f 100644
--- a/drivers/acpi/acpica/utalloc.c
+++ b/drivers/acpi/acpica/utalloc.c
@@ -209,10 +209,10 @@ acpi_status acpi_ut_delete_caches(void)
/* Free memory lists */
- ACPI_FREE(acpi_gbl_global_list);
+ acpi_os_free(acpi_gbl_global_list);
acpi_gbl_global_list = NULL;
- ACPI_FREE(acpi_gbl_ns_node_list);
+ acpi_os_free(acpi_gbl_ns_node_list);
acpi_gbl_ns_node_list = NULL;
#endif
--
1.7.10
^ permalink raw reply related [flat|nested] 41+ messages in thread* [PATCH 12/15] ACPICA: Update compilation environment settings.
2013-10-31 1:29 ` [PATCH 00/15] ACPICA: Update ACPICA files to reduce source code differences between Linux and ACPICA Lv Zheng
` (10 preceding siblings ...)
2013-10-31 1:31 ` [PATCH 11/15] ACPICA: Fix cached object deletion code Lv Zheng
@ 2013-10-31 1:31 ` Lv Zheng
2013-10-31 1:31 ` [PATCH 13/15] ACPICA: Update acpidump related header file changes Lv Zheng
` (3 subsequent siblings)
15 siblings, 0 replies; 41+ messages in thread
From: Lv Zheng @ 2013-10-31 1:31 UTC (permalink / raw)
To: Rafael J. Wysocki, Robert Moore, Len Brown; +Cc: Lv Zheng, linux-acpi
This patch does not affect the generation of the Linux binary.
This patch decreases 3 lines of divergences.
This patch updates architecture specific environment settings to reduce
source differences between Linux and ACPICA upstream.
Signed-off-by: Lv Zheng <lv.zheng@intel.com>
---
include/acpi/platform/acenv.h | 3 +++
1 file changed, 3 insertions(+)
diff --git a/include/acpi/platform/acenv.h b/include/acpi/platform/acenv.h
index ef04b36..9b3966c 100644
--- a/include/acpi/platform/acenv.h
+++ b/include/acpi/platform/acenv.h
@@ -147,6 +147,9 @@
#if defined(_LINUX) || defined(__linux__)
#include <acpi/platform/aclinux.h>
+#elif defined(_APPLE) || defined(__APPLE__)
+#include "acmacosx.h"
+
#elif defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
#include "acfreebsd.h"
--
1.7.10
^ permalink raw reply related [flat|nested] 41+ messages in thread* [PATCH 13/15] ACPICA: Update acpidump related header file changes.
2013-10-31 1:29 ` [PATCH 00/15] ACPICA: Update ACPICA files to reduce source code differences between Linux and ACPICA Lv Zheng
` (11 preceding siblings ...)
2013-10-31 1:31 ` [PATCH 12/15] ACPICA: Update compilation environment settings Lv Zheng
@ 2013-10-31 1:31 ` Lv Zheng
2013-10-31 1:31 ` [PATCH 14/15] ACPICA: Cleanup asmlinkage for ACPICA APIs Lv Zheng
` (2 subsequent siblings)
15 siblings, 0 replies; 41+ messages in thread
From: Lv Zheng @ 2013-10-31 1:31 UTC (permalink / raw)
To: Rafael J. Wysocki, Robert Moore, Len Brown; +Cc: Lv Zheng, linux-acpi
This patch does not affect the generation of the Linux binary.
This patch decreases 70 lines of divergences.
This patch updates header files that are used by the acpidump to reduce the
source code differences between Linux and ACPICA upstream.
Signed-off-by: Lv Zheng <lv.zheng@intel.com>
---
include/acpi/actypes.h | 8 ++++++++
include/acpi/platform/acenv.h | 5 +++--
2 files changed, 11 insertions(+), 2 deletions(-)
diff --git a/include/acpi/actypes.h b/include/acpi/actypes.h
index 0e32b6c..809b1a0 100644
--- a/include/acpi/actypes.h
+++ b/include/acpi/actypes.h
@@ -315,6 +315,14 @@ typedef u32 acpi_physical_address;
#define ACPI_EXPORT_SYMBOL(symbol)
#endif
+/*
+ * Compiler/Clibrary-dependent debug initialization. Used for ACPICA
+ * utilities only.
+ */
+#ifndef ACPI_DEBUG_INITIALIZE
+#define ACPI_DEBUG_INITIALIZE()
+#endif
+
/*******************************************************************************
*
* Configuration
diff --git a/include/acpi/platform/acenv.h b/include/acpi/platform/acenv.h
index 9b3966c..974d3ef 100644
--- a/include/acpi/platform/acenv.h
+++ b/include/acpi/platform/acenv.h
@@ -96,10 +96,11 @@
#endif
/*
- * acpi_bin/acpi_help/acpi_src configuration. All single threaded, with
- * no debug output.
+ * acpi_bin/acpi_dump/acpi_src/acpi_xtract configuration. All single
+ * threaded, with no debug output.
*/
#if (defined ACPI_BIN_APP) || \
+ (defined ACPI_DUMP_APP) || \
(defined ACPI_SRC_APP) || \
(defined ACPI_XTRACT_APP)
#define ACPI_APPLICATION
--
1.7.10
^ permalink raw reply related [flat|nested] 41+ messages in thread* [PATCH 14/15] ACPICA: Cleanup asmlinkage for ACPICA APIs.
2013-10-31 1:29 ` [PATCH 00/15] ACPICA: Update ACPICA files to reduce source code differences between Linux and ACPICA Lv Zheng
` (12 preceding siblings ...)
2013-10-31 1:31 ` [PATCH 13/15] ACPICA: Update acpidump related header file changes Lv Zheng
@ 2013-10-31 1:31 ` Lv Zheng
2013-10-31 1:31 ` [PATCH 15/15] ACPICA: Add __init for ACPICA initializers/finalizers Lv Zheng
2013-10-31 13:54 ` [PATCH 00/15] ACPICA: Update ACPICA files to reduce source code differences between Linux and ACPICA Rafael J. Wysocki
15 siblings, 0 replies; 41+ messages in thread
From: Lv Zheng @ 2013-10-31 1:31 UTC (permalink / raw)
To: Rafael J. Wysocki, Robert Moore, Len Brown; +Cc: Lv Zheng, linux-acpi
In order to ensure an asmlinkage function is called by assembly code rather
than calling an ACPICA API that is likely be converted to a stub function
when ACPI_REDUCED_HARDWARE is enabled, this patch cleans up asmlinkage
invocations by introducing an asmlinkage wrapper.
As arch/x86/kernel/acpi/wakeup_xx.S is only compiled when CONFIG_ACPI=y and
there is no users for ACPI_HARDWARE_REDUCED, currently this is in fact not
an issue but a cleanup commit to reduce source code differences between
Linux and ACPICA.
Signed-off-by: Lv Zheng <lv.zheng@intel.com>
---
arch/x86/kernel/acpi/sleep.c | 10 ++++++++++
arch/x86/kernel/acpi/sleep.h | 2 ++
arch/x86/kernel/acpi/wakeup_32.S | 2 +-
arch/x86/kernel/acpi/wakeup_64.S | 2 +-
drivers/acpi/acpica/hwxfsleep.c | 4 ++--
include/acpi/acpixf.h | 4 ++--
6 files changed, 18 insertions(+), 6 deletions(-)
diff --git a/arch/x86/kernel/acpi/sleep.c b/arch/x86/kernel/acpi/sleep.c
index 3312010..f5b142e 100644
--- a/arch/x86/kernel/acpi/sleep.c
+++ b/arch/x86/kernel/acpi/sleep.c
@@ -26,6 +26,16 @@ static char temp_stack[4096];
#endif
/**
+ * x86_acpi_enter_sleep_state - enter sleep state
+ *
+ * Wrapper of acpi_enter_sleep_state() to be called by assmebly.
+ */
+acpi_status asmlinkage x86_acpi_enter_sleep_state(u8 state)
+{
+ return acpi_enter_sleep_state(state);
+}
+
+/**
* x86_acpi_suspend_lowlevel - save kernel state
*
* Create an identity mapped page table and copy the wakeup routine to
diff --git a/arch/x86/kernel/acpi/sleep.h b/arch/x86/kernel/acpi/sleep.h
index c9c2c98..65c7b60 100644
--- a/arch/x86/kernel/acpi/sleep.h
+++ b/arch/x86/kernel/acpi/sleep.h
@@ -17,3 +17,5 @@ extern void wakeup_long64(void);
extern void do_suspend_lowlevel(void);
extern int x86_acpi_suspend_lowlevel(void);
+
+acpi_status asmlinkage x86_acpi_enter_sleep_state(u8 state);
diff --git a/arch/x86/kernel/acpi/wakeup_32.S b/arch/x86/kernel/acpi/wakeup_32.S
index d1daa66..665c6b7 100644
--- a/arch/x86/kernel/acpi/wakeup_32.S
+++ b/arch/x86/kernel/acpi/wakeup_32.S
@@ -73,7 +73,7 @@ ENTRY(do_suspend_lowlevel)
call save_processor_state
call save_registers
pushl $3
- call acpi_enter_sleep_state
+ call x86_acpi_enter_sleep_state
addl $4, %esp
# In case of S3 failure, we'll emerge here. Jump
diff --git a/arch/x86/kernel/acpi/wakeup_64.S b/arch/x86/kernel/acpi/wakeup_64.S
index 8ea5164..ae693b5 100644
--- a/arch/x86/kernel/acpi/wakeup_64.S
+++ b/arch/x86/kernel/acpi/wakeup_64.S
@@ -73,7 +73,7 @@ ENTRY(do_suspend_lowlevel)
addq $8, %rsp
movl $3, %edi
xorl %eax, %eax
- call acpi_enter_sleep_state
+ call x86_acpi_enter_sleep_state
/* in case something went wrong, restore the machine status and go on */
jmp resume_point
diff --git a/drivers/acpi/acpica/hwxfsleep.c b/drivers/acpi/acpica/hwxfsleep.c
index 4895fca..15dddc1 100644
--- a/drivers/acpi/acpica/hwxfsleep.c
+++ b/drivers/acpi/acpica/hwxfsleep.c
@@ -167,7 +167,7 @@ ACPI_EXPORT_SYMBOL(acpi_set_firmware_waking_vector64)
* THIS FUNCTION MUST BE CALLED WITH INTERRUPTS DISABLED
*
******************************************************************************/
-acpi_status asmlinkage acpi_enter_sleep_state_s4bios(void)
+acpi_status acpi_enter_sleep_state_s4bios(void)
{
u32 in_value;
acpi_status status;
@@ -361,7 +361,7 @@ ACPI_EXPORT_SYMBOL(acpi_enter_sleep_state_prep)
* THIS FUNCTION MUST BE CALLED WITH INTERRUPTS DISABLED
*
******************************************************************************/
-acpi_status asmlinkage acpi_enter_sleep_state(u8 sleep_state)
+acpi_status acpi_enter_sleep_state(u8 sleep_state)
{
acpi_status status;
diff --git a/include/acpi/acpixf.h b/include/acpi/acpixf.h
index 7def8ca..00725f4 100644
--- a/include/acpi/acpixf.h
+++ b/include/acpi/acpixf.h
@@ -510,9 +510,9 @@ acpi_get_sleep_type_data(u8 sleep_state, u8 *slp_typ_a, u8 *slp_typ_b);
acpi_status acpi_enter_sleep_state_prep(u8 sleep_state);
-acpi_status asmlinkage acpi_enter_sleep_state(u8 sleep_state);
+acpi_status acpi_enter_sleep_state(u8 sleep_state);
-ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status asmlinkage acpi_enter_sleep_state_s4bios(void))
+ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status acpi_enter_sleep_state_s4bios(void))
acpi_status acpi_leave_sleep_state_prep(u8 sleep_state);
--
1.7.10
^ permalink raw reply related [flat|nested] 41+ messages in thread* [PATCH 15/15] ACPICA: Add __init for ACPICA initializers/finalizers.
2013-10-31 1:29 ` [PATCH 00/15] ACPICA: Update ACPICA files to reduce source code differences between Linux and ACPICA Lv Zheng
` (13 preceding siblings ...)
2013-10-31 1:31 ` [PATCH 14/15] ACPICA: Cleanup asmlinkage for ACPICA APIs Lv Zheng
@ 2013-10-31 1:31 ` Lv Zheng
2013-10-31 13:54 ` [PATCH 00/15] ACPICA: Update ACPICA files to reduce source code differences between Linux and ACPICA Rafael J. Wysocki
15 siblings, 0 replies; 41+ messages in thread
From: Lv Zheng @ 2013-10-31 1:31 UTC (permalink / raw)
To: Rafael J. Wysocki, Robert Moore, Len Brown; +Cc: Lv Zheng, linux-acpi
This patch decreases 196 lines of divergences.
This patch adds __init for the ACPICA documented initializers:
acpi_initialize_tables()
acpi_initialize_subsystem()
acpi_load_tables()
acpi_enable_subsystem()
acpi_initialize_objects()
and acpi_reallocate_root_table(), acpi_find_root_pointer() APIs which are
also meant to be called during initialization.
This patch adds __init for the ACPICA documented finalizers:
acpi_terminate()
as this finalizer is only called in __init function now.
Signed-off-by: Lv Zheng <lv.zheng@intel.com>
---
drivers/acpi/acpica/tbutils.c | 3 +--
drivers/acpi/acpica/tbxface.c | 2 +-
drivers/acpi/acpica/tbxfload.c | 2 +-
drivers/acpi/acpica/tbxfroot.c | 2 +-
drivers/acpi/acpica/utxface.c | 2 +-
drivers/acpi/acpica/utxfinit.c | 6 +++---
include/acpi/acpixf.h | 14 +++++++-------
7 files changed, 15 insertions(+), 16 deletions(-)
diff --git a/drivers/acpi/acpica/tbutils.c b/drivers/acpi/acpica/tbutils.c
index 43ffe21..3d6bb83 100644
--- a/drivers/acpi/acpica/tbutils.c
+++ b/drivers/acpi/acpica/tbutils.c
@@ -430,8 +430,7 @@ acpi_tb_get_root_table_entry(u8 *table_entry, u32 table_entry_size)
*
******************************************************************************/
-acpi_status __init
-acpi_tb_parse_root_table(acpi_physical_address rsdp_address)
+acpi_status __init acpi_tb_parse_root_table(acpi_physical_address rsdp_address)
{
struct acpi_table_rsdp *rsdp;
u32 table_entry_size;
diff --git a/drivers/acpi/acpica/tbxface.c b/drivers/acpi/acpica/tbxface.c
index 7e63090..db826ea 100644
--- a/drivers/acpi/acpica/tbxface.c
+++ b/drivers/acpi/acpica/tbxface.c
@@ -164,7 +164,7 @@ ACPI_EXPORT_SYMBOL_INIT(acpi_initialize_tables)
* kernel.
*
******************************************************************************/
-acpi_status acpi_reallocate_root_table(void)
+acpi_status __init acpi_reallocate_root_table(void)
{
acpi_status status;
diff --git a/drivers/acpi/acpica/tbxfload.c b/drivers/acpi/acpica/tbxfload.c
index b1e1edd..60b5a87 100644
--- a/drivers/acpi/acpica/tbxfload.c
+++ b/drivers/acpi/acpica/tbxfload.c
@@ -66,7 +66,7 @@ static acpi_status acpi_tb_load_namespace(void);
*
******************************************************************************/
-acpi_status acpi_load_tables(void)
+acpi_status __init acpi_load_tables(void)
{
acpi_status status;
diff --git a/drivers/acpi/acpica/tbxfroot.c b/drivers/acpi/acpica/tbxfroot.c
index 1c95fab..e4e1468 100644
--- a/drivers/acpi/acpica/tbxfroot.c
+++ b/drivers/acpi/acpica/tbxfroot.c
@@ -111,7 +111,7 @@ acpi_status acpi_tb_validate_rsdp(struct acpi_table_rsdp *rsdp)
*
******************************************************************************/
-acpi_status acpi_find_root_pointer(acpi_size *table_address)
+acpi_status __init acpi_find_root_pointer(acpi_size *table_address)
{
u8 *table_ptr;
u8 *mem_rover;
diff --git a/drivers/acpi/acpica/utxface.c b/drivers/acpi/acpica/utxface.c
index 3986902..be322c8 100644
--- a/drivers/acpi/acpica/utxface.c
+++ b/drivers/acpi/acpica/utxface.c
@@ -61,7 +61,7 @@ ACPI_MODULE_NAME("utxface")
* DESCRIPTION: Shutdown the ACPICA subsystem and release all resources.
*
******************************************************************************/
-acpi_status acpi_terminate(void)
+acpi_status __init acpi_terminate(void)
{
acpi_status status;
diff --git a/drivers/acpi/acpica/utxfinit.c b/drivers/acpi/acpica/utxfinit.c
index ff6f4d1..75efea0 100644
--- a/drivers/acpi/acpica/utxfinit.c
+++ b/drivers/acpi/acpica/utxfinit.c
@@ -65,7 +65,7 @@ ACPI_MODULE_NAME("utxfinit")
* called, so any early initialization belongs here.
*
******************************************************************************/
-acpi_status acpi_initialize_subsystem(void)
+acpi_status __init acpi_initialize_subsystem(void)
{
acpi_status status;
@@ -140,7 +140,7 @@ ACPI_EXPORT_SYMBOL_INIT(acpi_initialize_subsystem)
* Puts system into ACPI mode if it isn't already.
*
******************************************************************************/
-acpi_status acpi_enable_subsystem(u32 flags)
+acpi_status __init acpi_enable_subsystem(u32 flags)
{
acpi_status status = AE_OK;
@@ -245,7 +245,7 @@ ACPI_EXPORT_SYMBOL_INIT(acpi_enable_subsystem)
* objects and executing AML code for Regions, buffers, etc.
*
******************************************************************************/
-acpi_status acpi_initialize_objects(u32 flags)
+acpi_status __init acpi_initialize_objects(u32 flags)
{
acpi_status status = AE_OK;
diff --git a/include/acpi/acpixf.h b/include/acpi/acpixf.h
index 00725f4..d8f9457 100644
--- a/include/acpi/acpixf.h
+++ b/include/acpi/acpixf.h
@@ -114,17 +114,17 @@ extern u8 acpi_gbl_disable_ssdt_table_load;
/*
* Initialization
*/
-acpi_status
+acpi_status __init
acpi_initialize_tables(struct acpi_table_desc *initial_storage,
u32 initial_table_count, u8 allow_resize);
acpi_status __init acpi_initialize_subsystem(void);
-acpi_status acpi_enable_subsystem(u32 flags);
+acpi_status __init acpi_enable_subsystem(u32 flags);
-acpi_status acpi_initialize_objects(u32 flags);
+acpi_status __init acpi_initialize_objects(u32 flags);
-acpi_status acpi_terminate(void);
+acpi_status __init acpi_terminate(void);
/*
* Miscellaneous global interfaces
@@ -168,14 +168,14 @@ acpi_status acpi_load_table(struct acpi_table_header *table);
acpi_status acpi_unload_parent_table(acpi_handle object);
-acpi_status acpi_load_tables(void);
+acpi_status __init acpi_load_tables(void);
/*
* ACPI table manipulation interfaces
*/
-acpi_status acpi_reallocate_root_table(void);
+acpi_status __init acpi_reallocate_root_table(void);
-acpi_status acpi_find_root_pointer(acpi_size * rsdp_address);
+acpi_status __init acpi_find_root_pointer(acpi_size *rsdp_address);
acpi_status acpi_unload_table_id(acpi_owner_id id);
--
1.7.10
^ permalink raw reply related [flat|nested] 41+ messages in thread* Re: [PATCH 00/15] ACPICA: Update ACPICA files to reduce source code differences between Linux and ACPICA.
2013-10-31 1:29 ` [PATCH 00/15] ACPICA: Update ACPICA files to reduce source code differences between Linux and ACPICA Lv Zheng
` (14 preceding siblings ...)
2013-10-31 1:31 ` [PATCH 15/15] ACPICA: Add __init for ACPICA initializers/finalizers Lv Zheng
@ 2013-10-31 13:54 ` Rafael J. Wysocki
2013-11-01 0:39 ` Zheng, Lv
15 siblings, 1 reply; 41+ messages in thread
From: Rafael J. Wysocki @ 2013-10-31 13:54 UTC (permalink / raw)
To: Lv Zheng; +Cc: Robert Moore, Len Brown, linux-acpi
On Thursday, October 31, 2013 09:29:23 AM Lv Zheng wrote:
> This series is based on ACPICA 20130927 release.
>
> This series is to reduce the source code differences between Linux and
> ACPICA so that the release process can be easier with less human
> intervention and the known bugs can also be prevented.
>
> This series includes only Linux part patches.
> Please also find another companion ACPICA patchset for references.
>
> The source code differences between Linux and ACPICA can be summarized as
> follows:
> 1. 1516 Lines (53.2 Kbytes) before applying the patch set;
> 2. 1001 Lines (35.3 Kbytes) after applying the patch set.
>
> The rest of the divergences are now accountable:
> 1. (Internal) ACPI_FUTURE_USAGE
> 2. (Internal) Linux compiler.h related
> 3. (Internal) Bug report message
> 4. AcpiSrc bug
> 5. Some events related divergences
> 6. FADT 64bit/32bit favor
> 7. Boolean -> bool conversion
> 8. GPE masking mechanism
> 9. D3_cold implicity
> 10. XSDT - introduced by table override and sgi-hotplug
> 11. Xen sleep register hook
> 12. Slow hardware support
> Where:
> Internal: divergences are committed and would not be fixed.
>
> A QA process is executed to compare resulting binary files. Those patches
> which were not expected to change any text section indeed, changed no text.
> Sometimes line numbers changed due to line deletions and insertions, but
> that is expected.
>
> The patch set has passed a build/boot test on the following machines:
> Dell Inspiron Mini 1010 (i386)
> HP Compaq 8200 Elite SFF PC (x86-64)
> With the following kernel configuration items enabled:
> CONFIG_ACPI_AC
> CONFIG_ACPI_BATTERY
> CONFIG_ACPI_NUMA
> CONFIG_ACPI_PROCESSOR
> CONFIG_ACPI_THERMAL
> CONFIG_ACPI_VIDEO
> CONFIG_CPU_FREQ
> CONFIG_I2C_SCMI
> CONFIG_SENSORS_ACPI_POWER
> CONFIG_PANASONIC_LAPTOP
> CONFIG_XO15_EBOOK
> CONFIG_DMAR_TABLE
> CONFIG_INTEL_IOMMU
> CONFIG_IRQ_REMAP
>
> Please review.
>
> Lv Zheng (15):
> ACPICA: Update default space handlers.
> ACPICA: Update ANOBJ_IS_EXTERNAL flag.
> ACPICA: Update namespace dump code.
> ACPICA: Update RSDP table definitions.
> ACPICA: Update DMAR table definitions.
> ACPICA: Add new statistics interface.
> ACPICA: Fix wrong object length returned by
> acpi_ut_get_simple_object_size().
> ACPICA: Fix an ACPI_ALLOCATE_ZEROED() reversal.
> ACPICA: Cleanup useless memset invocations.
> ACPICA: Remove dead AOPOBJ_INVALID check.
> ACPICA: Fix cached object deletion code.
> ACPICA: Update compilation environment settings.
> ACPICA: Update acpidump related header file changes.
> ACPICA: Cleanup asmlinkage for ACPICA APIs.
> ACPICA: Add __init for ACPICA initializers/finalizers.
Queued up for 3.13 (with some changelog/subject modifications), thanks Lv!
--
I speak only for myself.
Rafael J. Wysocki, Intel Open Source Technology Center.
^ permalink raw reply [flat|nested] 41+ messages in thread* RE: [PATCH 00/15] ACPICA: Update ACPICA files to reduce source code differences between Linux and ACPICA.
2013-10-31 13:54 ` [PATCH 00/15] ACPICA: Update ACPICA files to reduce source code differences between Linux and ACPICA Rafael J. Wysocki
@ 2013-11-01 0:39 ` Zheng, Lv
0 siblings, 0 replies; 41+ messages in thread
From: Zheng, Lv @ 2013-11-01 0:39 UTC (permalink / raw)
To: Rafael J. Wysocki; +Cc: Moore, Robert, Brown, Len, linux-acpi@vger.kernel.org
Hi, Rafael
> From: Rafael J. Wysocki [mailto:rjw@rjwysocki.net]
> Sent: Thursday, October 31, 2013 9:55 PM
>
> On Thursday, October 31, 2013 09:29:23 AM Lv Zheng wrote:
> > This series is based on ACPICA 20130927 release.
> >
> > This series is to reduce the source code differences between Linux and
> > ACPICA so that the release process can be easier with less human
> > intervention and the known bugs can also be prevented.
> >
> > This series includes only Linux part patches.
> > Please also find another companion ACPICA patchset for references.
> >
> > The source code differences between Linux and ACPICA can be summarized as
> > follows:
> > 1. 1516 Lines (53.2 Kbytes) before applying the patch set;
> > 2. 1001 Lines (35.3 Kbytes) after applying the patch set.
> >
> > The rest of the divergences are now accountable:
> > 1. (Internal) ACPI_FUTURE_USAGE
> > 2. (Internal) Linux compiler.h related
> > 3. (Internal) Bug report message
> > 4. AcpiSrc bug
> > 5. Some events related divergences
> > 6. FADT 64bit/32bit favor
> > 7. Boolean -> bool conversion
> > 8. GPE masking mechanism
> > 9. D3_cold implicity
> > 10. XSDT - introduced by table override and sgi-hotplug
> > 11. Xen sleep register hook
> > 12. Slow hardware support
> > Where:
> > Internal: divergences are committed and would not be fixed.
> >
> > A QA process is executed to compare resulting binary files. Those patches
> > which were not expected to change any text section indeed, changed no text.
> > Sometimes line numbers changed due to line deletions and insertions, but
> > that is expected.
> >
> > The patch set has passed a build/boot test on the following machines:
> > Dell Inspiron Mini 1010 (i386)
> > HP Compaq 8200 Elite SFF PC (x86-64)
> > With the following kernel configuration items enabled:
> > CONFIG_ACPI_AC
> > CONFIG_ACPI_BATTERY
> > CONFIG_ACPI_NUMA
> > CONFIG_ACPI_PROCESSOR
> > CONFIG_ACPI_THERMAL
> > CONFIG_ACPI_VIDEO
> > CONFIG_CPU_FREQ
> > CONFIG_I2C_SCMI
> > CONFIG_SENSORS_ACPI_POWER
> > CONFIG_PANASONIC_LAPTOP
> > CONFIG_XO15_EBOOK
> > CONFIG_DMAR_TABLE
> > CONFIG_INTEL_IOMMU
> > CONFIG_IRQ_REMAP
> >
> > Please review.
> >
> > Lv Zheng (15):
> > ACPICA: Update default space handlers.
> > ACPICA: Update ANOBJ_IS_EXTERNAL flag.
> > ACPICA: Update namespace dump code.
> > ACPICA: Update RSDP table definitions.
> > ACPICA: Update DMAR table definitions.
> > ACPICA: Add new statistics interface.
> > ACPICA: Fix wrong object length returned by
> > acpi_ut_get_simple_object_size().
> > ACPICA: Fix an ACPI_ALLOCATE_ZEROED() reversal.
> > ACPICA: Cleanup useless memset invocations.
> > ACPICA: Remove dead AOPOBJ_INVALID check.
> > ACPICA: Fix cached object deletion code.
> > ACPICA: Update compilation environment settings.
> > ACPICA: Update acpidump related header file changes.
> > ACPICA: Cleanup asmlinkage for ACPICA APIs.
> > ACPICA: Add __init for ACPICA initializers/finalizers.
>
> Queued up for 3.13 (with some changelog/subject modifications), thanks Lv!
You are welcome!
Thanks
-Lv
>
> --
> I speak only for myself.
> Rafael J. Wysocki, Intel Open Source Technology Center.
^ permalink raw reply [flat|nested] 41+ messages in thread
* Re: [PATCH 00/20] ACPICA: 20130927 Release
2013-10-29 1:28 [PATCH 00/20] ACPICA: 20130927 Release Lv Zheng
` (20 preceding siblings ...)
2013-10-31 1:29 ` [PATCH 00/15] ACPICA: Update ACPICA files to reduce source code differences between Linux and ACPICA Lv Zheng
@ 2013-10-31 13:53 ` Rafael J. Wysocki
2013-11-01 0:39 ` Zheng, Lv
21 siblings, 1 reply; 41+ messages in thread
From: Rafael J. Wysocki @ 2013-10-31 13:53 UTC (permalink / raw)
To: Lv Zheng; +Cc: Robert Moore, Len Brown, linux-acpi
On Tuesday, October 29, 2013 09:28:41 AM Lv Zheng wrote:
> The 20130927 ACPICA kernel resident system updates is linuxized based on
> the pm/linux-next branch.
>
> The patch set has passed a build/boot test on the following machines:
> Dell Inspiron Mini 1010 (i386)
> HP Compaq 8200 Elite SFF PC (x86-64)
> With the following kernel configuration items enabled:
> CONFIG_ACPI_AC
> CONFIG_ACPI_BATTERY
> CONFIG_ACPI_NUMA
> CONFIG_ACPI_PROCESSOR
> CONFIG_ACPI_THERMAL
> CONFIG_ACPI_VIDEO
> CONFIG_CPU_FREQ
> CONFIG_I2C_SCMI
> CONFIG_SENSORS_ACPI_POWER
> CONFIG_PANASONIC_LAPTOP
> CONFIG_XO15_EBOOK
> CONFIG_DMAR_TABLE
> CONFIG_INTEL_IOMMU
> CONFIG_IRQ_REMAP
>
> Some divergences are reduced by the new software mechanisms introduced in
> this release cycle. The divergences result is as follows:
> Before applying: 68.8 Kbytes, 1984 Lines
> After applying: 54.1 Kbytes, 1558 Lines
>
> Please review.
>
> Bob Moore (10):
> ACPICA: Table print header function: Increase default width for table
> length.
> ACPICA: Add a check for a null node during namespace walk.
> ACPICA: Add history/line-editing for Unix/Linux systems.
> ACPICA: Fix a macro for the hardware-reduced case
> ACPICA: Add safe versions of common string functions.
> ACPICA: Predefine name macros: Sort list.
> ACPICA: Hardcode access width for the reset register.
> ACPICA: Update comment: no functional change.
> ACPICA: Simplify configuration of global ACPI_REDUCED_HARDWARE macro.
> ACPICA: Update version to 20130927.
>
> Lv Zheng (9):
> ACPICA: Cleanup memory allocation macros and configurability.
> ACPICA: Fix possible memory leaks in the GPE handling.
> ACPICA: Add EXPORT_ACPI_INTERFACES macro to external interface
> modules.
> ACPICA: Linuxize: Change indentation of C labels.
> ACPICA: Deploy ACPI_EXPORT_SYMBOL_INIT for main ACPICA initialization
> interfaces.
> ACPICA: Prevent possible build issues for use of ACPI_PRINTF_LIKE
> macro
> ACPICA: AcpiSrc: Fix indentation issues for macro invocations.
> ACPICA: Add support to allow host to redefine individual OSL
> prototypes.
> ACPICA: Update aclinux.h for new OSL override mechanism.
>
> Tomasz Nowicki (1):
> ACPICA: Ensure that debug output is immediately disabled on
> termination.
I've queued up the series for 3.13, thanks Lv!
--
I speak only for myself.
Rafael J. Wysocki, Intel Open Source Technology Center.
^ permalink raw reply [flat|nested] 41+ messages in thread* RE: [PATCH 00/20] ACPICA: 20130927 Release
2013-10-31 13:53 ` [PATCH 00/20] ACPICA: 20130927 Release Rafael J. Wysocki
@ 2013-11-01 0:39 ` Zheng, Lv
0 siblings, 0 replies; 41+ messages in thread
From: Zheng, Lv @ 2013-11-01 0:39 UTC (permalink / raw)
To: Rafael J. Wysocki; +Cc: Moore, Robert, Brown, Len, linux-acpi@vger.kernel.org
Hi, Rafael
> From: Rafael J. Wysocki [mailto:rjw@rjwysocki.net]
> Sent: Thursday, October 31, 2013 9:53 PM
>
> On Tuesday, October 29, 2013 09:28:41 AM Lv Zheng wrote:
> > The 20130927 ACPICA kernel resident system updates is linuxized based on
> > the pm/linux-next branch.
> >
> > The patch set has passed a build/boot test on the following machines:
> > Dell Inspiron Mini 1010 (i386)
> > HP Compaq 8200 Elite SFF PC (x86-64)
> > With the following kernel configuration items enabled:
> > CONFIG_ACPI_AC
> > CONFIG_ACPI_BATTERY
> > CONFIG_ACPI_NUMA
> > CONFIG_ACPI_PROCESSOR
> > CONFIG_ACPI_THERMAL
> > CONFIG_ACPI_VIDEO
> > CONFIG_CPU_FREQ
> > CONFIG_I2C_SCMI
> > CONFIG_SENSORS_ACPI_POWER
> > CONFIG_PANASONIC_LAPTOP
> > CONFIG_XO15_EBOOK
> > CONFIG_DMAR_TABLE
> > CONFIG_INTEL_IOMMU
> > CONFIG_IRQ_REMAP
> >
> > Some divergences are reduced by the new software mechanisms introduced in
> > this release cycle. The divergences result is as follows:
> > Before applying: 68.8 Kbytes, 1984 Lines
> > After applying: 54.1 Kbytes, 1558 Lines
> >
> > Please review.
> >
> > Bob Moore (10):
> > ACPICA: Table print header function: Increase default width for table
> > length.
> > ACPICA: Add a check for a null node during namespace walk.
> > ACPICA: Add history/line-editing for Unix/Linux systems.
> > ACPICA: Fix a macro for the hardware-reduced case
> > ACPICA: Add safe versions of common string functions.
> > ACPICA: Predefine name macros: Sort list.
> > ACPICA: Hardcode access width for the reset register.
> > ACPICA: Update comment: no functional change.
> > ACPICA: Simplify configuration of global ACPI_REDUCED_HARDWARE macro.
> > ACPICA: Update version to 20130927.
> >
> > Lv Zheng (9):
> > ACPICA: Cleanup memory allocation macros and configurability.
> > ACPICA: Fix possible memory leaks in the GPE handling.
> > ACPICA: Add EXPORT_ACPI_INTERFACES macro to external interface
> > modules.
> > ACPICA: Linuxize: Change indentation of C labels.
> > ACPICA: Deploy ACPI_EXPORT_SYMBOL_INIT for main ACPICA initialization
> > interfaces.
> > ACPICA: Prevent possible build issues for use of ACPI_PRINTF_LIKE
> > macro
> > ACPICA: AcpiSrc: Fix indentation issues for macro invocations.
> > ACPICA: Add support to allow host to redefine individual OSL
> > prototypes.
> > ACPICA: Update aclinux.h for new OSL override mechanism.
> >
> > Tomasz Nowicki (1):
> > ACPICA: Ensure that debug output is immediately disabled on
> > termination.
>
> I've queued up the series for 3.13, thanks Lv!
You are welcome!
Thanks,
-Lv
>
> --
> I speak only for myself.
> Rafael J. Wysocki, Intel Open Source Technology Center.
^ permalink raw reply [flat|nested] 41+ messages in thread