aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLv Zheng <lv.zheng@intel.com>2013-10-28 21:30:10 -0400
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2013-10-31 09:35:39 -0400
commitd21f600b0e4d5a694a338688e61d95f08dbf0afb (patch)
treee325cc68175ce05be0cf21708669159eec43d5ec
parent10622bf8ce432e6a53fd3c37163e99e99c9e43ee (diff)
ACPICA: Deploy ACPI_EXPORT_SYMBOL_INIT for main ACPICA initialization interfaces.
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> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
-rw-r--r--drivers/acpi/acpica/tbxface.c7
-rw-r--r--drivers/acpi/acpica/tbxfload.c2
-rw-r--r--drivers/acpi/acpica/utxface.c2
-rw-r--r--drivers/acpi/acpica/utxfinit.c9
-rw-r--r--include/acpi/actypes.h13
5 files changed, 25 insertions, 8 deletions
diff --git a/drivers/acpi/acpica/tbxface.c b/drivers/acpi/acpica/tbxface.c
index bbaad5c4e2cd..7e63090742dc 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,
148 return_ACPI_STATUS(status); 148 return_ACPI_STATUS(status);
149} 149}
150 150
151ACPI_EXPORT_SYMBOL_INIT(acpi_initialize_tables)
152
151/******************************************************************************* 153/*******************************************************************************
152 * 154 *
153 * FUNCTION: acpi_reallocate_root_table 155 * FUNCTION: acpi_reallocate_root_table
@@ -182,6 +184,8 @@ acpi_status acpi_reallocate_root_table(void)
182 return_ACPI_STATUS(status); 184 return_ACPI_STATUS(status);
183} 185}
184 186
187ACPI_EXPORT_SYMBOL_INIT(acpi_reallocate_root_table)
188
185/******************************************************************************* 189/*******************************************************************************
186 * 190 *
187 * FUNCTION: acpi_get_table_header 191 * FUNCTION: acpi_get_table_header
@@ -357,6 +361,7 @@ acpi_get_table_with_size(char *signature,
357 361
358 return (AE_NOT_FOUND); 362 return (AE_NOT_FOUND);
359} 363}
364
360ACPI_EXPORT_SYMBOL(acpi_get_table_with_size) 365ACPI_EXPORT_SYMBOL(acpi_get_table_with_size)
361 366
362acpi_status 367acpi_status
@@ -368,6 +373,7 @@ acpi_get_table(char *signature,
368 return acpi_get_table_with_size(signature, 373 return acpi_get_table_with_size(signature,
369 instance, out_table, &tbl_size); 374 instance, out_table, &tbl_size);
370} 375}
376
371ACPI_EXPORT_SYMBOL(acpi_get_table) 377ACPI_EXPORT_SYMBOL(acpi_get_table)
372 378
373/******************************************************************************* 379/*******************************************************************************
@@ -425,7 +431,6 @@ acpi_get_table_by_index(u32 table_index, struct acpi_table_header **table)
425 431
426ACPI_EXPORT_SYMBOL(acpi_get_table_by_index) 432ACPI_EXPORT_SYMBOL(acpi_get_table_by_index)
427 433
428
429/******************************************************************************* 434/*******************************************************************************
430 * 435 *
431 * FUNCTION: acpi_install_table_handler 436 * FUNCTION: acpi_install_table_handler
diff --git a/drivers/acpi/acpica/tbxfload.c b/drivers/acpi/acpica/tbxfload.c
index 5a2202495b0f..b1e1edd5703a 100644
--- a/drivers/acpi/acpica/tbxfload.c
+++ b/drivers/acpi/acpica/tbxfload.c
@@ -83,7 +83,7 @@ acpi_status acpi_load_tables(void)
83 return_ACPI_STATUS(status); 83 return_ACPI_STATUS(status);
84} 84}
85 85
86ACPI_EXPORT_SYMBOL(acpi_load_tables) 86ACPI_EXPORT_SYMBOL_INIT(acpi_load_tables)
87 87
88/******************************************************************************* 88/*******************************************************************************
89 * 89 *
diff --git a/drivers/acpi/acpica/utxface.c b/drivers/acpi/acpica/utxface.c
index 2178da8af1a7..891a37b69d3c 100644
--- a/drivers/acpi/acpica/utxface.c
+++ b/drivers/acpi/acpica/utxface.c
@@ -105,7 +105,7 @@ acpi_status acpi_terminate(void)
105 return_ACPI_STATUS(status); 105 return_ACPI_STATUS(status);
106} 106}
107 107
108ACPI_EXPORT_SYMBOL(acpi_terminate) 108ACPI_EXPORT_SYMBOL_INIT(acpi_terminate)
109 109
110#ifndef ACPI_ASL_COMPILER 110#ifndef ACPI_ASL_COMPILER
111#ifdef ACPI_FUTURE_USAGE 111#ifdef ACPI_FUTURE_USAGE
diff --git a/drivers/acpi/acpica/utxfinit.c b/drivers/acpi/acpica/utxfinit.c
index dda18e622a93..ff6f4d194136 100644
--- a/drivers/acpi/acpica/utxfinit.c
+++ b/drivers/acpi/acpica/utxfinit.c
@@ -125,7 +125,8 @@ acpi_status acpi_initialize_subsystem(void)
125 ACPI_DEBUGGER_EXEC(status = acpi_db_initialize()); 125 ACPI_DEBUGGER_EXEC(status = acpi_db_initialize());
126 return_ACPI_STATUS(status); 126 return_ACPI_STATUS(status);
127} 127}
128ACPI_EXPORT_SYMBOL(acpi_initialize_subsystem) 128
129ACPI_EXPORT_SYMBOL_INIT(acpi_initialize_subsystem)
129 130
130/******************************************************************************* 131/*******************************************************************************
131 * 132 *
@@ -229,7 +230,8 @@ acpi_status acpi_enable_subsystem(u32 flags)
229 230
230 return_ACPI_STATUS(status); 231 return_ACPI_STATUS(status);
231} 232}
232ACPI_EXPORT_SYMBOL(acpi_enable_subsystem) 233
234ACPI_EXPORT_SYMBOL_INIT(acpi_enable_subsystem)
233 235
234/******************************************************************************* 236/*******************************************************************************
235 * 237 *
@@ -315,4 +317,5 @@ acpi_status acpi_initialize_objects(u32 flags)
315 acpi_gbl_startup_flags |= ACPI_INITIALIZED_OK; 317 acpi_gbl_startup_flags |= ACPI_INITIALIZED_OK;
316 return_ACPI_STATUS(status); 318 return_ACPI_STATUS(status);
317} 319}
318ACPI_EXPORT_SYMBOL(acpi_initialize_objects) 320
321ACPI_EXPORT_SYMBOL_INIT(acpi_initialize_objects)
diff --git a/include/acpi/actypes.h b/include/acpi/actypes.h
index 0bb23e6bce43..8614bc139113 100644
--- a/include/acpi/actypes.h
+++ b/include/acpi/actypes.h
@@ -299,9 +299,18 @@ typedef u32 acpi_physical_address;
299#endif 299#endif
300 300
301/* 301/*
302 * All ACPICA functions that are available to the rest of the kernel are 302 * All ACPICA external functions that are available to the rest of the kernel
303 * tagged with this macro which can be defined as appropriate for the host. 303 * are tagged with thes macros which can be defined as appropriate for the host.
304 *
305 * Notes:
306 * ACPI_EXPORT_SYMBOL_INIT is used for initialization and termination
307 * interfaces that may need special processing.
308 * ACPI_EXPORT_SYMBOL is used for all other public external functions.
304 */ 309 */
310#ifndef ACPI_EXPORT_SYMBOL_INIT
311#define ACPI_EXPORT_SYMBOL_INIT(symbol)
312#endif
313
305#ifndef ACPI_EXPORT_SYMBOL 314#ifndef ACPI_EXPORT_SYMBOL
306#define ACPI_EXPORT_SYMBOL(symbol) 315#define ACPI_EXPORT_SYMBOL(symbol)
307#endif 316#endif