diff options
author | Lv Zheng <lv.zheng@intel.com> | 2014-04-30 10:04:35 +0800 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2014-05-07 00:55:00 +0200 |
commit | 3a2f3a3383f87412fa11b89290d592a24f618487 (patch) | |
tree | c51acbd870ed59859f21eba9ad1a012bbfdaa1cd /include/acpi | |
parent | 1a49b72c4e0c7097b9d3cf8650ff17f87e07d8bd (diff) |
ACPICA: OSL: Move external globals from utglobal.c to acpixf.h using ACPI_INIT_GLOBAL/ACPI_GLOBAL.
OSPMs like Linux trend to include all header files but leave empty stub
macros for a feature that is not configured during build.
This patch cleans up global variables that are defined in utglobal.c using
ACPI_INIT_GLOBAL mechanism. In Linux, such global variables are used by
the subsystems external to ACPICA.
This patch also cleans up global variables that are defined in utglobal.c
using ACPI_GLOBAL mechanism. In Linux, such global variables are not used
or should not be used by the subsystems external to ACPICA.
External global variables can be redefined by OSPMs using
ACPI_INIT_GLOBAL/ACPI_GLOBAL macros. Thus the ACPI_GLOBAL/ACPI_INIT_GLOBAL
mechanisms can be used by OSPM to implement stubs for such external
globals.
This patch doesn't include code for Linux to use this new mechanism, thus
no functional changes. 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>
Diffstat (limited to 'include/acpi')
-rw-r--r-- | include/acpi/acpixf.h | 35 |
1 files changed, 23 insertions, 12 deletions
diff --git a/include/acpi/acpixf.h b/include/acpi/acpixf.h index 010816e24f5e..8255689c864b 100644 --- a/include/acpi/acpixf.h +++ b/include/acpi/acpixf.h @@ -185,22 +185,33 @@ ACPI_INIT_GLOBAL(u8, acpi_gbl_disable_ssdt_table_install, FALSE); ACPI_INIT_GLOBAL(u8, acpi_gbl_osi_data, 0); /* - * Other miscellaneous public globals + * ACPI 5.0 introduces the concept of a "reduced hardware platform", meaning + * that the ACPI hardware is no longer required. A flag in the FADT indicates + * a reduced HW machine, and that flag is duplicated here for convenience. */ -extern u32 acpi_current_gpe_count; -extern struct acpi_table_fadt acpi_gbl_FADT; -extern u8 acpi_gbl_system_awake_and_running; -extern u8 acpi_gbl_reduced_hardware; /* ACPI 5.0 */ +ACPI_INIT_GLOBAL(u8, acpi_gbl_reduced_hardware, FALSE); -/* Runtime configuration of debug print levels */ - -extern u32 acpi_dbg_level; -extern u32 acpi_dbg_layer; +/* + * This mechanism is used to trace a specified AML method. The method is + * traced each time it is executed. + */ +ACPI_INIT_GLOBAL(u32, acpi_gbl_trace_flags, 0); +ACPI_INIT_GLOBAL(acpi_name, acpi_gbl_trace_method_name, 0); -/* ACPICA runtime options */ +/* + * Runtime configuration of debug output control masks. We want the debug + * switches statically initialized so they are already set when the debugger + * is entered. + */ +ACPI_INIT_GLOBAL(u32, acpi_dbg_level, ACPI_DEBUG_DEFAULT); +ACPI_INIT_GLOBAL(u32, acpi_dbg_layer, 0); -extern u32 acpi_gbl_trace_flags; -extern acpi_name acpi_gbl_trace_method_name; +/* + * Globals that are publically available + */ +ACPI_GLOBAL(u32, acpi_current_gpe_count); +ACPI_GLOBAL(struct acpi_table_fadt, acpi_gbl_FADT); +ACPI_GLOBAL(u8, acpi_gbl_system_awake_and_running); /* * Hardware-reduced prototypes. All interfaces that use these macros will |