summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLv Zheng <lv.zheng@intel.com>2012-12-19 20:07:26 -0500
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2013-01-10 06:36:17 -0500
commit739dcbb90a347a66f25cc0c3ef4eef3d4558f409 (patch)
treee71b91e0ac7195bbf201d06f41748e717ee8a968
parent56324c1090ecf057c89a4d470a23a8ca61061b61 (diff)
ACPICA: Cleanup source to reduce differences between Linux and ACPICA.
This is a cosmetic patch only. Comparison of the resulting binary showed only line number differences. This patch does not affect the generation of the Linux binary. This patch decreases 389 lines of 20121018 divergence.diff. This patch reduces source code diff caused by the simple code maintenance work: 1. Deletion of the unused include files. 2. Deletion of the deprecated codes blocks. 3. Repositioning of the code blocks. 4. Replacing the values with the well defined macros. 5. Replacing the types with the equivalent types. Signed-off-by: Lv Zheng <lv.zheng@intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
-rw-r--r--drivers/acpi/acpica/accommon.h1
-rw-r--r--drivers/acpi/acpica/acglobal.h33
-rw-r--r--drivers/acpi/acpica/aclocal.h5
-rw-r--r--drivers/acpi/acpica/amlresrc.h6
-rw-r--r--drivers/acpi/acpica/dsobject.c2
-rw-r--r--drivers/acpi/acpica/exregion.c2
-rw-r--r--drivers/acpi/acpica/hwregs.c1
-rw-r--r--drivers/acpi/acpica/hwsleep.c4
-rw-r--r--drivers/acpi/acpica/hwxfsleep.c2
-rw-r--r--drivers/acpi/acpica/nsdumpdv.c1
-rw-r--r--drivers/acpi/acpica/nsinit.c1
-rw-r--r--drivers/acpi/acpica/nsutils.c1
-rw-r--r--drivers/acpi/acpica/nsxfeval.c8
-rw-r--r--drivers/acpi/acpica/tbxface.c1
-rw-r--r--drivers/acpi/acpica/utxface.c4
-rw-r--r--include/acpi/acconfig.h22
-rw-r--r--include/acpi/acpiosxf.h7
-rw-r--r--include/acpi/acpixf.h43
-rw-r--r--include/acpi/actbl.h6
-rw-r--r--include/acpi/actypes.h5
-rw-r--r--include/acpi/platform/acenv.h2
21 files changed, 68 insertions, 89 deletions
diff --git a/drivers/acpi/acpica/accommon.h b/drivers/acpi/acpica/accommon.h
index 8a7d51bfb3b3..8632d7136730 100644
--- a/drivers/acpi/acpica/accommon.h
+++ b/drivers/acpi/acpica/accommon.h
@@ -51,6 +51,7 @@
51 * 51 *
52 * Note: The order of these include files is important. 52 * Note: The order of these include files is important.
53 */ 53 */
54#include <acpi/acconfig.h> /* Global configuration constants */
54#include "acmacros.h" /* C macros */ 55#include "acmacros.h" /* C macros */
55#include "aclocal.h" /* Internal data types */ 56#include "aclocal.h" /* Internal data types */
56#include "acobject.h" /* ACPI internal object */ 57#include "acobject.h" /* ACPI internal object */
diff --git a/drivers/acpi/acpica/acglobal.h b/drivers/acpi/acpica/acglobal.h
index 1ef7ca486a28..864806e1ac54 100644
--- a/drivers/acpi/acpica/acglobal.h
+++ b/drivers/acpi/acpica/acglobal.h
@@ -192,14 +192,6 @@ ACPI_EXTERN u8 acpi_gbl_integer_bit_width;
192ACPI_EXTERN u8 acpi_gbl_integer_byte_width; 192ACPI_EXTERN u8 acpi_gbl_integer_byte_width;
193ACPI_EXTERN u8 acpi_gbl_integer_nybble_width; 193ACPI_EXTERN u8 acpi_gbl_integer_nybble_width;
194 194
195/* Mutex for _OSI support */
196
197ACPI_EXTERN acpi_mutex acpi_gbl_osi_mutex;
198
199/* Reader/Writer lock is used for namespace walk and dynamic table unload */
200
201ACPI_EXTERN struct acpi_rw_lock acpi_gbl_namespace_rw_lock;
202
203/***************************************************************************** 195/*****************************************************************************
204 * 196 *
205 * Mutual exclusion within ACPICA subsystem 197 * Mutual exclusion within ACPICA subsystem
@@ -233,6 +225,14 @@ ACPI_EXTERN u8 acpi_gbl_global_lock_pending;
233ACPI_EXTERN acpi_spinlock acpi_gbl_gpe_lock; /* For GPE data structs and registers */ 225ACPI_EXTERN acpi_spinlock acpi_gbl_gpe_lock; /* For GPE data structs and registers */
234ACPI_EXTERN acpi_spinlock acpi_gbl_hardware_lock; /* For ACPI H/W except GPE registers */ 226ACPI_EXTERN acpi_spinlock acpi_gbl_hardware_lock; /* For ACPI H/W except GPE registers */
235 227
228/* Mutex for _OSI support */
229
230ACPI_EXTERN acpi_mutex acpi_gbl_osi_mutex;
231
232/* Reader/Writer lock is used for namespace walk and dynamic table unload */
233
234ACPI_EXTERN struct acpi_rw_lock acpi_gbl_namespace_rw_lock;
235
236/***************************************************************************** 236/*****************************************************************************
237 * 237 *
238 * Miscellaneous globals 238 * Miscellaneous globals
@@ -304,6 +304,7 @@ extern const char *acpi_gbl_region_types[ACPI_NUM_PREDEFINED_REGIONS];
304ACPI_EXTERN struct acpi_memory_list *acpi_gbl_global_list; 304ACPI_EXTERN struct acpi_memory_list *acpi_gbl_global_list;
305ACPI_EXTERN struct acpi_memory_list *acpi_gbl_ns_node_list; 305ACPI_EXTERN struct acpi_memory_list *acpi_gbl_ns_node_list;
306ACPI_EXTERN u8 acpi_gbl_display_final_mem_stats; 306ACPI_EXTERN u8 acpi_gbl_display_final_mem_stats;
307ACPI_EXTERN u8 acpi_gbl_disable_mem_tracking;
307#endif 308#endif
308 309
309/***************************************************************************** 310/*****************************************************************************
@@ -365,19 +366,18 @@ ACPI_EXTERN u8 acpi_gbl_sleep_type_b;
365 * 366 *
366 ****************************************************************************/ 367 ****************************************************************************/
367 368
368extern struct acpi_fixed_event_info
369 acpi_gbl_fixed_event_info[ACPI_NUM_FIXED_EVENTS];
370ACPI_EXTERN struct acpi_fixed_event_handler
371 acpi_gbl_fixed_event_handlers[ACPI_NUM_FIXED_EVENTS];
372ACPI_EXTERN struct acpi_gpe_xrupt_info *acpi_gbl_gpe_xrupt_list_head;
373ACPI_EXTERN struct acpi_gpe_block_info
374*acpi_gbl_gpe_fadt_blocks[ACPI_MAX_GPE_BLOCKS];
375
376#if (!ACPI_REDUCED_HARDWARE) 369#if (!ACPI_REDUCED_HARDWARE)
377 370
378ACPI_EXTERN u8 acpi_gbl_all_gpes_initialized; 371ACPI_EXTERN u8 acpi_gbl_all_gpes_initialized;
372ACPI_EXTERN struct acpi_gpe_xrupt_info *acpi_gbl_gpe_xrupt_list_head;
373ACPI_EXTERN struct acpi_gpe_block_info
374 *acpi_gbl_gpe_fadt_blocks[ACPI_MAX_GPE_BLOCKS];
379ACPI_EXTERN acpi_gbl_event_handler acpi_gbl_global_event_handler; 375ACPI_EXTERN acpi_gbl_event_handler acpi_gbl_global_event_handler;
380ACPI_EXTERN void *acpi_gbl_global_event_handler_context; 376ACPI_EXTERN void *acpi_gbl_global_event_handler_context;
377ACPI_EXTERN struct acpi_fixed_event_handler
378 acpi_gbl_fixed_event_handlers[ACPI_NUM_FIXED_EVENTS];
379extern struct acpi_fixed_event_info
380 acpi_gbl_fixed_event_info[ACPI_NUM_FIXED_EVENTS];
381 381
382#endif /* !ACPI_REDUCED_HARDWARE */ 382#endif /* !ACPI_REDUCED_HARDWARE */
383 383
@@ -428,6 +428,7 @@ extern u8 acpi_gbl_db_terminate_threads;
428ACPI_EXTERN u8 acpi_gbl_db_opt_tables; 428ACPI_EXTERN u8 acpi_gbl_db_opt_tables;
429ACPI_EXTERN u8 acpi_gbl_db_opt_stats; 429ACPI_EXTERN u8 acpi_gbl_db_opt_stats;
430ACPI_EXTERN u8 acpi_gbl_db_opt_ini_methods; 430ACPI_EXTERN u8 acpi_gbl_db_opt_ini_methods;
431ACPI_EXTERN u8 acpi_gbl_db_opt_no_region_support;
431 432
432ACPI_EXTERN char *acpi_gbl_db_args[ACPI_DEBUGGER_MAX_ARGS]; 433ACPI_EXTERN char *acpi_gbl_db_args[ACPI_DEBUGGER_MAX_ARGS];
433ACPI_EXTERN acpi_object_type acpi_gbl_db_arg_types[ACPI_DEBUGGER_MAX_ARGS]; 434ACPI_EXTERN acpi_object_type acpi_gbl_db_arg_types[ACPI_DEBUGGER_MAX_ARGS];
diff --git a/drivers/acpi/acpica/aclocal.h b/drivers/acpi/acpica/aclocal.h
index 50f8b97e799b..421b048f6640 100644
--- a/drivers/acpi/acpica/aclocal.h
+++ b/drivers/acpi/acpica/aclocal.h
@@ -410,11 +410,6 @@ struct acpi_gpe_notify_info {
410 struct acpi_gpe_notify_info *next; 410 struct acpi_gpe_notify_info *next;
411}; 411};
412 412
413struct acpi_gpe_notify_object {
414 struct acpi_namespace_node *node;
415 struct acpi_gpe_notify_object *next;
416};
417
418/* 413/*
419 * GPE dispatch info. At any time, the GPE can have at most one type 414 * GPE dispatch info. At any time, the GPE can have at most one type
420 * of dispatch - Method, Handler, or Implicit Notify. 415 * of dispatch - Method, Handler, or Implicit Notify.
diff --git a/drivers/acpi/acpica/amlresrc.h b/drivers/acpi/acpica/amlresrc.h
index 968449685e06..bdbb7d057085 100644
--- a/drivers/acpi/acpica/amlresrc.h
+++ b/drivers/acpi/acpica/amlresrc.h
@@ -199,6 +199,12 @@ struct aml_resource_fixed_dma {
199struct aml_resource_large_header { 199struct aml_resource_large_header {
200AML_RESOURCE_LARGE_HEADER_COMMON}; 200AML_RESOURCE_LARGE_HEADER_COMMON};
201 201
202/* General Flags for address space resource descriptors */
203
204#define ACPI_RESOURCE_FLAG_DEC 2
205#define ACPI_RESOURCE_FLAG_MIF 4
206#define ACPI_RESOURCE_FLAG_MAF 8
207
202struct aml_resource_memory24 { 208struct aml_resource_memory24 {
203 AML_RESOURCE_LARGE_HEADER_COMMON u8 flags; 209 AML_RESOURCE_LARGE_HEADER_COMMON u8 flags;
204 u16 minimum; 210 u16 minimum;
diff --git a/drivers/acpi/acpica/dsobject.c b/drivers/acpi/acpica/dsobject.c
index c9f15d3a3686..13844a115d97 100644
--- a/drivers/acpi/acpica/dsobject.c
+++ b/drivers/acpi/acpica/dsobject.c
@@ -388,7 +388,7 @@ acpi_ds_build_internal_package_obj(struct acpi_walk_state *walk_state,
388 union acpi_parse_object *parent; 388 union acpi_parse_object *parent;
389 union acpi_operand_object *obj_desc = NULL; 389 union acpi_operand_object *obj_desc = NULL;
390 acpi_status status = AE_OK; 390 acpi_status status = AE_OK;
391 unsigned i; 391 u32 i;
392 u16 index; 392 u16 index;
393 u16 reference_count; 393 u16 reference_count;
394 394
diff --git a/drivers/acpi/acpica/exregion.c b/drivers/acpi/acpica/exregion.c
index 0a01e19c3190..044d44141be6 100644
--- a/drivers/acpi/acpica/exregion.c
+++ b/drivers/acpi/acpica/exregion.c
@@ -163,7 +163,7 @@ acpi_ex_system_memory_space_handler(u32 function,
163 page_boundary_map_length = 163 page_boundary_map_length =
164 ACPI_ROUND_UP(address, ACPI_DEFAULT_PAGE_SIZE) - address; 164 ACPI_ROUND_UP(address, ACPI_DEFAULT_PAGE_SIZE) - address;
165 165
166 if (!page_boundary_map_length) { 166 if (page_boundary_map_length == 0) {
167 page_boundary_map_length = ACPI_DEFAULT_PAGE_SIZE; 167 page_boundary_map_length = ACPI_DEFAULT_PAGE_SIZE;
168 } 168 }
169 169
diff --git a/drivers/acpi/acpica/hwregs.c b/drivers/acpi/acpica/hwregs.c
index 165395f1f715..e782b5a22fe5 100644
--- a/drivers/acpi/acpica/hwregs.c
+++ b/drivers/acpi/acpica/hwregs.c
@@ -44,7 +44,6 @@
44 44
45#include <acpi/acpi.h> 45#include <acpi/acpi.h>
46#include "accommon.h" 46#include "accommon.h"
47#include "acnamesp.h"
48#include "acevents.h" 47#include "acevents.h"
49 48
50#define _COMPONENT ACPI_HARDWARE 49#define _COMPONENT ACPI_HARDWARE
diff --git a/drivers/acpi/acpica/hwsleep.c b/drivers/acpi/acpica/hwsleep.c
index 3fddde056a5e..691a5fb10d4d 100644
--- a/drivers/acpi/acpica/hwsleep.c
+++ b/drivers/acpi/acpica/hwsleep.c
@@ -45,7 +45,6 @@
45#include <acpi/acpi.h> 45#include <acpi/acpi.h>
46#include <linux/acpi.h> 46#include <linux/acpi.h>
47#include "accommon.h" 47#include "accommon.h"
48#include <linux/module.h>
49 48
50#define _COMPONENT ACPI_HARDWARE 49#define _COMPONENT ACPI_HARDWARE
51ACPI_MODULE_NAME("hwsleep") 50ACPI_MODULE_NAME("hwsleep")
@@ -323,7 +322,8 @@ acpi_status acpi_hw_legacy_wake(u8 sleep_state)
323 * and use it to determine whether the system is rebooting or 322 * and use it to determine whether the system is rebooting or
324 * resuming. Clear WAK_STS for compatibility. 323 * resuming. Clear WAK_STS for compatibility.
325 */ 324 */
326 acpi_write_bit_register(ACPI_BITREG_WAKE_STATUS, 1); 325 (void)acpi_write_bit_register(ACPI_BITREG_WAKE_STATUS,
326 ACPI_CLEAR_STATUS);
327 acpi_gbl_system_awake_and_running = TRUE; 327 acpi_gbl_system_awake_and_running = TRUE;
328 328
329 /* Enable power button */ 329 /* Enable power button */
diff --git a/drivers/acpi/acpica/hwxfsleep.c b/drivers/acpi/acpica/hwxfsleep.c
index 2898011ef12b..6fcee00cb34b 100644
--- a/drivers/acpi/acpica/hwxfsleep.c
+++ b/drivers/acpi/acpica/hwxfsleep.c
@@ -41,9 +41,9 @@
41 * POSSIBILITY OF SUCH DAMAGES. 41 * POSSIBILITY OF SUCH DAMAGES.
42 */ 42 */
43 43
44#include <linux/export.h>
44#include <acpi/acpi.h> 45#include <acpi/acpi.h>
45#include "accommon.h" 46#include "accommon.h"
46#include <linux/module.h>
47 47
48#define _COMPONENT ACPI_HARDWARE 48#define _COMPONENT ACPI_HARDWARE
49ACPI_MODULE_NAME("hwxfsleep") 49ACPI_MODULE_NAME("hwxfsleep")
diff --git a/drivers/acpi/acpica/nsdumpdv.c b/drivers/acpi/acpica/nsdumpdv.c
index 944d4c8d9438..4ae93602b0ff 100644
--- a/drivers/acpi/acpica/nsdumpdv.c
+++ b/drivers/acpi/acpica/nsdumpdv.c
@@ -42,7 +42,6 @@
42 */ 42 */
43 43
44#include <acpi/acpi.h> 44#include <acpi/acpi.h>
45#include "accommon.h"
46 45
47/* TBD: This entire module is apparently obsolete and should be removed */ 46/* TBD: This entire module is apparently obsolete and should be removed */
48 47
diff --git a/drivers/acpi/acpica/nsinit.c b/drivers/acpi/acpica/nsinit.c
index bb6888f5c262..94c1500074c4 100644
--- a/drivers/acpi/acpica/nsinit.c
+++ b/drivers/acpi/acpica/nsinit.c
@@ -46,7 +46,6 @@
46#include "acnamesp.h" 46#include "acnamesp.h"
47#include "acdispat.h" 47#include "acdispat.h"
48#include "acinterp.h" 48#include "acinterp.h"
49#include <linux/nmi.h>
50 49
51#define _COMPONENT ACPI_NAMESPACE 50#define _COMPONENT ACPI_NAMESPACE
52ACPI_MODULE_NAME("nsinit") 51ACPI_MODULE_NAME("nsinit")
diff --git a/drivers/acpi/acpica/nsutils.c b/drivers/acpi/acpica/nsutils.c
index b5b4cb72a8a8..479aad0dbf41 100644
--- a/drivers/acpi/acpica/nsutils.c
+++ b/drivers/acpi/acpica/nsutils.c
@@ -46,7 +46,6 @@
46#include "accommon.h" 46#include "accommon.h"
47#include "acnamesp.h" 47#include "acnamesp.h"
48#include "amlcode.h" 48#include "amlcode.h"
49#include "actables.h"
50 49
51#define _COMPONENT ACPI_NAMESPACE 50#define _COMPONENT ACPI_NAMESPACE
52ACPI_MODULE_NAME("nsutils") 51ACPI_MODULE_NAME("nsutils")
diff --git a/drivers/acpi/acpica/nsxfeval.c b/drivers/acpi/acpica/nsxfeval.c
index 70bbc1f9de0d..5c05ba3bc0d5 100644
--- a/drivers/acpi/acpica/nsxfeval.c
+++ b/drivers/acpi/acpica/nsxfeval.c
@@ -602,18 +602,20 @@ acpi_ns_get_device_callback(acpi_handle obj_handle,
602 602
603 /* Walk the CID list */ 603 /* Walk the CID list */
604 604
605 found = 0; 605 found = FALSE;
606 for (i = 0; i < cid->count; i++) { 606 for (i = 0; i < cid->count; i++) {
607 if (ACPI_STRCMP(cid->ids[i].string, info->hid) 607 if (ACPI_STRCMP(cid->ids[i].string, info->hid)
608 == 0) { 608 == 0) {
609 /* Found a matching CID */ 609 /* Found a matching CID */
610 found = 1; 610 found = TRUE;
611 break; 611 break;
612 } 612 }
613 } 613 }
614
614 ACPI_FREE(cid); 615 ACPI_FREE(cid);
615 if (!found) 616 if (!found) {
616 return (AE_OK); 617 return (AE_OK);
618 }
617 } 619 }
618 } 620 }
619 621
diff --git a/drivers/acpi/acpica/tbxface.c b/drivers/acpi/acpica/tbxface.c
index f5632780421d..d102fe7f709b 100644
--- a/drivers/acpi/acpica/tbxface.c
+++ b/drivers/acpi/acpica/tbxface.c
@@ -44,7 +44,6 @@
44#include <linux/export.h> 44#include <linux/export.h>
45#include <acpi/acpi.h> 45#include <acpi/acpi.h>
46#include "accommon.h" 46#include "accommon.h"
47#include "acnamesp.h"
48#include "actables.h" 47#include "actables.h"
49 48
50#define _COMPONENT ACPI_TABLES 49#define _COMPONENT ACPI_TABLES
diff --git a/drivers/acpi/acpica/utxface.c b/drivers/acpi/acpica/utxface.c
index 390db0ca5e2e..cb85a7b313da 100644
--- a/drivers/acpi/acpica/utxface.c
+++ b/drivers/acpi/acpica/utxface.c
@@ -44,11 +44,7 @@
44#include <linux/export.h> 44#include <linux/export.h>
45#include <acpi/acpi.h> 45#include <acpi/acpi.h>
46#include "accommon.h" 46#include "accommon.h"
47#include "acevents.h"
48#include "acnamesp.h"
49#include "acdebug.h" 47#include "acdebug.h"
50#include "actables.h"
51#include "acinterp.h"
52 48
53#define _COMPONENT ACPI_UTILITIES 49#define _COMPONENT ACPI_UTILITIES
54ACPI_MODULE_NAME("utxface") 50ACPI_MODULE_NAME("utxface")
diff --git a/include/acpi/acconfig.h b/include/acpi/acconfig.h
index 358258ad09f8..12a5996da67c 100644
--- a/include/acpi/acconfig.h
+++ b/include/acpi/acconfig.h
@@ -150,11 +150,6 @@
150 * 150 *
151 *****************************************************************************/ 151 *****************************************************************************/
152 152
153/* Number of distinct GPE register blocks and register width */
154
155#define ACPI_MAX_GPE_BLOCKS 2
156#define ACPI_GPE_REGISTER_WIDTH 8
157
158/* Method info (in WALK_STATE), containing local variables and argumetns */ 153/* Method info (in WALK_STATE), containing local variables and argumetns */
159 154
160#define ACPI_METHOD_NUM_LOCALS 8 155#define ACPI_METHOD_NUM_LOCALS 8
@@ -163,12 +158,6 @@
163#define ACPI_METHOD_NUM_ARGS 7 158#define ACPI_METHOD_NUM_ARGS 7
164#define ACPI_METHOD_MAX_ARG 6 159#define ACPI_METHOD_MAX_ARG 6
165 160
166/* Length of _HID, _UID, _CID, and UUID values */
167
168#define ACPI_DEVICE_ID_LENGTH 0x09
169#define ACPI_MAX_CID_LENGTH 48
170#define ACPI_UUID_LENGTH 16
171
172/* 161/*
173 * Operand Stack (in WALK_STATE), Must be large enough to contain METHOD_MAX_ARG 162 * Operand Stack (in WALK_STATE), Must be large enough to contain METHOD_MAX_ARG
174 */ 163 */
@@ -186,17 +175,6 @@
186 */ 175 */
187#define ACPI_RESULTS_OBJ_NUM_MAX 255 176#define ACPI_RESULTS_OBJ_NUM_MAX 255
188 177
189/* Names within the namespace are 4 bytes long */
190
191#define ACPI_NAME_SIZE 4
192#define ACPI_PATH_SEGMENT_LENGTH 5 /* 4 chars for name + 1 char for separator */
193#define ACPI_PATH_SEPARATOR '.'
194
195/* Sizes for ACPI table headers */
196
197#define ACPI_OEM_ID_SIZE 6
198#define ACPI_OEM_TABLE_ID_SIZE 8
199
200/* Constants used in searching for the RSDP in low memory */ 178/* Constants used in searching for the RSDP in low memory */
201 179
202#define ACPI_EBDA_PTR_LOCATION 0x0000040E /* Physical Address */ 180#define ACPI_EBDA_PTR_LOCATION 0x0000040E /* Physical Address */
diff --git a/include/acpi/acpiosxf.h b/include/acpi/acpiosxf.h
index 43152742b46f..33a3e17da362 100644
--- a/include/acpi/acpiosxf.h
+++ b/include/acpi/acpiosxf.h
@@ -148,6 +148,8 @@ void acpi_os_release_mutex(acpi_mutex handle);
148 */ 148 */
149void *acpi_os_allocate(acpi_size size); 149void *acpi_os_allocate(acpi_size size);
150 150
151void acpi_os_free(void *memory);
152
151void __iomem *acpi_os_map_memory(acpi_physical_address where, 153void __iomem *acpi_os_map_memory(acpi_physical_address where,
152 acpi_size length); 154 acpi_size length);
153 155
@@ -180,12 +182,13 @@ acpi_status acpi_os_release_object(acpi_cache_t * cache, void *object);
180 * Interrupt handlers 182 * Interrupt handlers
181 */ 183 */
182acpi_status 184acpi_status
183acpi_os_install_interrupt_handler(u32 gsi, 185acpi_os_install_interrupt_handler(u32 interrupt_number,
184 acpi_osd_handler service_routine, 186 acpi_osd_handler service_routine,
185 void *context); 187 void *context);
186 188
187acpi_status 189acpi_status
188acpi_os_remove_interrupt_handler(u32 gsi, acpi_osd_handler service_routine); 190acpi_os_remove_interrupt_handler(u32 interrupt_number,
191 acpi_osd_handler service_routine);
189 192
190void acpi_os_gpe_count(u32 gpe_number); 193void acpi_os_gpe_count(u32 gpe_number);
191void acpi_os_fixed_event_count(u32 fixed_event_number); 194void acpi_os_fixed_event_count(u32 fixed_event_number);
diff --git a/include/acpi/acpixf.h b/include/acpi/acpixf.h
index defbcaa90f40..b409406d3ccf 100644
--- a/include/acpi/acpixf.h
+++ b/include/acpi/acpixf.h
@@ -58,6 +58,10 @@ extern u8 acpi_gbl_permanent_mmap;
58/* 58/*
59 * Globals that are publically available 59 * Globals that are publically available
60 */ 60 */
61extern u32 acpi_current_gpe_count;
62extern struct acpi_table_fadt acpi_gbl_FADT;
63extern u8 acpi_gbl_system_awake_and_running;
64extern u8 acpi_gbl_reduced_hardware; /* ACPI 5.0 */
61/* Runtime configuration of debug print levels */ 65/* Runtime configuration of debug print levels */
62extern u32 acpi_dbg_level; 66extern u32 acpi_dbg_level;
63extern u32 acpi_dbg_layer; 67extern u32 acpi_dbg_layer;
@@ -100,11 +104,6 @@ extern u8 acpi_gbl_disable_auto_repair;
100 104
101#endif /* !ACPI_REDUCED_HARDWARE */ 105#endif /* !ACPI_REDUCED_HARDWARE */
102 106
103extern u32 acpi_current_gpe_count;
104extern struct acpi_table_fadt acpi_gbl_FADT;
105extern u8 acpi_gbl_system_awake_and_running;
106extern u8 acpi_gbl_reduced_hardware; /* ACPI 5.0 */
107
108extern u32 acpi_rsdt_forced; 107extern u32 acpi_rsdt_forced;
109/* 108/*
110 * Initialization 109 * Initialization
@@ -121,15 +120,14 @@ acpi_status acpi_initialize_objects(u32 flags);
121 120
122acpi_status acpi_terminate(void); 121acpi_status acpi_terminate(void);
123 122
124#ifdef ACPI_FUTURE_USAGE
125acpi_status acpi_subsystem_status(void);
126#endif
127
128/* 123/*
129 * Miscellaneous global interfaces 124 * Miscellaneous global interfaces
130 */ 125 */
131ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status acpi_enable(void)) 126ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status acpi_enable(void))
132ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status acpi_disable(void)) 127ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status acpi_disable(void))
128#ifdef ACPI_FUTURE_USAGE
129acpi_status acpi_subsystem_status(void);
130#endif
133 131
134#ifdef ACPI_FUTURE_USAGE 132#ifdef ACPI_FUTURE_USAGE
135acpi_status acpi_get_system_info(struct acpi_buffer *ret_buffer); 133acpi_status acpi_get_system_info(struct acpi_buffer *ret_buffer);
@@ -466,6 +464,10 @@ acpi_buffer_to_resource(u8 *aml_buffer,
466 */ 464 */
467acpi_status acpi_reset(void); 465acpi_status acpi_reset(void);
468 466
467acpi_status acpi_read(u64 *value, struct acpi_generic_address *reg);
468
469acpi_status acpi_write(u64 value, struct acpi_generic_address *reg);
470
469ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status 471ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status
470 acpi_read_bit_register(u32 register_id, 472 acpi_read_bit_register(u32 register_id,
471 u32 *return_value)) 473 u32 *return_value))
@@ -474,20 +476,6 @@ ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status
474 acpi_write_bit_register(u32 register_id, 476 acpi_write_bit_register(u32 register_id,
475 u32 value)) 477 u32 value))
476 478
477ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status
478 acpi_set_firmware_waking_vector(u32
479 physical_address))
480
481#if ACPI_MACHINE_WIDTH == 64
482ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status
483 acpi_set_firmware_waking_vector64(u64
484 physical_address))
485#endif
486
487acpi_status acpi_read(u64 *value, struct acpi_generic_address *reg);
488
489acpi_status acpi_write(u64 value, struct acpi_generic_address *reg);
490
491/* 479/*
492 * Sleep/Wake interfaces 480 * Sleep/Wake interfaces
493 */ 481 */
@@ -504,6 +492,15 @@ acpi_status acpi_leave_sleep_state_prep(u8 sleep_state);
504 492
505acpi_status acpi_leave_sleep_state(u8 sleep_state); 493acpi_status acpi_leave_sleep_state(u8 sleep_state);
506 494
495ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status
496 acpi_set_firmware_waking_vector(u32
497 physical_address))
498
499#if ACPI_MACHINE_WIDTH == 64
500ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status
501 acpi_set_firmware_waking_vector64(u64
502 physical_address))
503#endif
507/* 504/*
508 * ACPI Timer interfaces 505 * ACPI Timer interfaces
509 */ 506 */
diff --git a/include/acpi/actbl.h b/include/acpi/actbl.h
index 4f94b1d812d5..c0e6c32353ed 100644
--- a/include/acpi/actbl.h
+++ b/include/acpi/actbl.h
@@ -326,8 +326,6 @@ enum acpi_preferred_pm_profiles {
326 326
327#pragma pack() 327#pragma pack()
328 328
329#define ACPI_FADT_OFFSET(f) (u16) ACPI_OFFSET (struct acpi_table_fadt, f)
330
331/* 329/*
332 * Internal table-related structures 330 * Internal table-related structures
333 */ 331 */
@@ -364,6 +362,10 @@ struct acpi_table_desc {
364#include <acpi/actbl2.h> 362#include <acpi/actbl2.h>
365#include <acpi/actbl3.h> 363#include <acpi/actbl3.h>
366 364
365/* Macros used to generate offsets to specific table fields */
366
367#define ACPI_FADT_OFFSET(f) (u16) ACPI_OFFSET (struct acpi_table_fadt, f)
368
367/* 369/*
368 * Sizes of the various flavors of FADT. We need to look closely 370 * Sizes of the various flavors of FADT. We need to look closely
369 * at the FADT length because the version number essentially tells 371 * at the FADT length because the version number essentially tells
diff --git a/include/acpi/actypes.h b/include/acpi/actypes.h
index 35d4dea0bd37..6882227d1706 100644
--- a/include/acpi/actypes.h
+++ b/include/acpi/actypes.h
@@ -474,6 +474,7 @@ typedef u64 acpi_integer;
474 */ 474 */
475#define ACPI_FULL_INITIALIZATION 0x00 475#define ACPI_FULL_INITIALIZATION 0x00
476#define ACPI_NO_ADDRESS_SPACE_INIT 0x01 476#define ACPI_NO_ADDRESS_SPACE_INIT 0x01
477#define ACPI_NO_HARDWARE_INIT 0x02
477#define ACPI_NO_EVENT_INIT 0x04 478#define ACPI_NO_EVENT_INIT 0x04
478#define ACPI_NO_HANDLER_INIT 0x08 479#define ACPI_NO_HANDLER_INIT 0x08
479#define ACPI_NO_ACPI_ENABLE 0x10 480#define ACPI_NO_ACPI_ENABLE 0x10
@@ -970,6 +971,10 @@ acpi_status(*acpi_exception_handler) (acpi_status aml_status,
970typedef 971typedef
971acpi_status(*acpi_tbl_handler) (u32 event, void *table, void *context); 972acpi_status(*acpi_tbl_handler) (u32 event, void *table, void *context);
972 973
974#define ACPI_TABLE_LOAD 0x0
975#define ACPI_TABLE_UNLOAD 0x1
976#define ACPI_NUM_TABLE_EVENTS 2
977
973/* Address Spaces (For Operation Regions) */ 978/* Address Spaces (For Operation Regions) */
974 979
975typedef 980typedef
diff --git a/include/acpi/platform/acenv.h b/include/acpi/platform/acenv.h
index 13ac538f7892..cec6cd3e850d 100644
--- a/include/acpi/platform/acenv.h
+++ b/include/acpi/platform/acenv.h
@@ -277,8 +277,6 @@
277 * 277 *
278 *****************************************************************************/ 278 *****************************************************************************/
279 279
280#define ACPI_IS_ASCII(c) ((c) < 0x80)
281
282/* 280/*
283 * ACPI_USE_SYSTEM_CLIBRARY - Define this if linking to an actual C library. 281 * ACPI_USE_SYSTEM_CLIBRARY - Define this if linking to an actual C library.
284 * Otherwise, local versions of string/memory functions will be used. 282 * Otherwise, local versions of string/memory functions will be used.