ACPICA: 20140214 Release
Subsystems (3)
cover ACPICA: 20140214 Release
The 20140214 ACPICA kernel resident system updates are linuxized based on the pm/linux-next branch.
The patch set has passed the following build/boot tests. Build tests are performed as follows:
1. i386 + default + COFNIG_ACPI=y
2. i386 + allyes + CONFIG_ACPI=y
3. i386 + default + COFNIG_ACPI=n
4. i386 + allyes + CONFIG_ACPI=n
5. x86_64 + default + COFNIG_ACPI=y
6. x86_64 + allyes + CONFIG_ACPI=y
7. x86_64 + default + COFNIG_ACPI=n
8. x86_64 + allyes + CONFIG_ACPI=n
Boot tests are performed as follows:
1. i386 + default + COFNIG_ACPI=y
2. x86_64 + default + COFNIG_ACPI=y
Where:
1. i386: machine named as "Dell Inspiron Mini 1010"
2. x86_64: machine named as "HP Compaq 8200 Elite SFF PC"
3. default: kernel configuration with following items enabled:
All hardware drivers related to the machines of i386/x86_64 All drivers/acpi configurations
All platform drivers
All ACPI drivers
4 DRM drivers that implement ACPI opregion
All buses with ACPI bindings
All cpufreq configurations
All xen configurations
All ACPI tabln drivers
4. allyes: kernel configuration generated by allyesconfig.
Excluded the divergence reductions that are managed, after applying this series, the divergence result is 889 Lines, 31.3 Kbytes.
Bob Moore (12):
ACPICA: Headers: Deploy #pragma pack (push) and (pop).
ACPICA: Predefined names: Add support for the _PRP method.
ACPICA: Harden _PRT repair code; check for minimum package length.
ACPICA: Do not abort _PRT repair on a single subpackage failure.
ACPICA: Add auto-serialization support for ill-behaved control
methods.
ACPICA: Comment update - no functional change.
ACPICA: Add global option to disable method auto-serialization.
ACPICA: Update for _PRP predefined name.
ACPICA: Add text: ACPICA policy for new _OSI strings. No functional
change.
ACPICA: Debugger: Add missing objects; Traverse linked lists
ACPICA: Prevent infinite loops when traversing corrupted lists.
ACPICA: Update version to 20140214.
Bob Moore (12):
ACPICA: Headers: Deploy #pragma pack (push) and (pop).
ACPICA: Predefined names: Add support for the _PRP method.
ACPICA: Harden _PRT repair code; check for minimum package length.
ACPICA: Do not abort _PRT repair on a single subpackage failure.
ACPICA: Add auto-serialization support for ill-behaved control
methods.
ACPICA: Comment update - no functional change.
ACPICA: Add global option to disable method auto-serialization.
ACPICA: Update for _PRP predefined name.
ACPICA: Add text: ACPICA policy for new _OSI strings. No functional
change.
ACPICA: Debugger: Add missing objects; Traverse linked lists
ACPICA: Prevent infinite loops when traversing corrupted lists.
ACPICA: Update version to 20140214.
Lv Zheng (6):
ACPICA: Update conditional compilation flags for resource dump
functions.
ACPICA: Properly handle NULL entries in _PRT return packages.
ACPICA: Restore code that repairs NULL package elements in return
values.
ACPICA: Add additional named objects for the auto-serialize method
scan.
ACPICA: Remove global option to serialize all control methods.
ACPICA: Cleanup/improve global variable declarations.
Documentation/kernel-parameters.txt | 10 +- drivers/acpi/acpica/acdebug.h | 4 + drivers/acpi/acpica/acdispat.h | 17 +- drivers/acpi/acpica/acevents.h | 3 + drivers/acpi/acpica/acglobal.h | 366 +++++++++++++++++------------------ drivers/acpi/acpica/achware.h | 4 + drivers/acpi/acpica/acinterp.h | 12 +- drivers/acpi/acpica/aclocal.h | 4 + drivers/acpi/acpica/acmacros.h | 4 + drivers/acpi/acpica/acnamesp.h | 4 + drivers/acpi/acpica/acobject.h | 4 +- drivers/acpi/acpica/acparser.h | 4 + drivers/acpi/acpica/acpredef.h | 18 +- drivers/acpi/acpica/acresrc.h | 4 + drivers/acpi/acpica/acstruct.h | 7 + drivers/acpi/acpica/actables.h | 4 + drivers/acpi/acpica/acutils.h | 4 + drivers/acpi/acpica/amlcode.h | 4 + drivers/acpi/acpica/amlresrc.h | 4 + drivers/acpi/acpica/dsinit.c | 59 ++++-- drivers/acpi/acpica/dsmethod.c | 134 ++++++++++++- drivers/acpi/acpica/dswload.c | 16 ++ drivers/acpi/acpica/evregion.c | 11 ++ drivers/acpi/acpica/exdump.c | 229 ++++++++++++++++++---- drivers/acpi/acpica/exsystem.c | 12 +- drivers/acpi/acpica/exutils.c | 80 +------- drivers/acpi/acpica/nsinit.c | 5 +- drivers/acpi/acpica/nsload.c | 4 +- drivers/acpi/acpica/nsobject.c | 10 +- drivers/acpi/acpica/nsprepkg.c | 40 ++-- drivers/acpi/acpica/nsrepair.c | 29 ++- drivers/acpi/acpica/nsrepair2.c | 37 ++-- drivers/acpi/acpica/psloop.c | 4 + drivers/acpi/acpica/psobject.c | 7 +- drivers/acpi/acpica/rscalc.c | 2 +- drivers/acpi/acpica/rscreate.c | 10 +- drivers/acpi/acpica/rsdump.c | 2 +- drivers/acpi/acpica/utdelete.c | 15 +- drivers/acpi/acpica/utglobal.c | 37 ++-- drivers/acpi/acpica/utosi.c | 25 +++ drivers/acpi/osl.c | 18 +- include/acpi/acbuffer.h | 4 + include/acpi/acconfig.h | 4 + include/acpi/acexcep.h | 4 + include/acpi/acoutput.h | 4 + include/acpi/acpiosxf.h | 4 + include/acpi/acpixf.h | 8 +- include/acpi/acrestyp.h | 4 + include/acpi/actbl.h | 4 + include/acpi/actbl1.h | 6 +- include/acpi/actbl2.h | 6 +- include/acpi/actbl3.h | 6 +- include/acpi/actypes.h | 4 + 53 files changed, 908 insertions(+), 417 deletions(-)
Signature · 1 line
1.7.10
PATCH 1/18 ACPICA: Headers: Deploy #pragma pack (push) and (pop).
From: Bob Moore <[email protected]>
Use push and pop to both guarantee that the correct alignment is used, and to restore the alignment to whatever it was before the header was included.
It is reported that the #pragma pack(push/pop) directives are not supported by the specific GCCs. While this patch still doesn't affect kernel build as there are already #pragma pack([1]) directives used in the old ACPICA headers, which means there shouldn't be GCCs that are currently used to compile the ACPI kernels do not support #pragma pack() directives.
--- drivers/acpi/acpica/acdebug.h | 4 ++++ drivers/acpi/acpica/acdispat.h | 4 ++++ drivers/acpi/acpica/acevents.h | 3 +++ drivers/acpi/acpica/acglobal.h | 4 ++++ drivers/acpi/acpica/achware.h | 4 ++++ drivers/acpi/acpica/acinterp.h | 4 ++++ drivers/acpi/acpica/aclocal.h | 4 ++++ drivers/acpi/acpica/acmacros.h | 4 ++++ drivers/acpi/acpica/acnamesp.h | 4 ++++ drivers/acpi/acpica/acobject.h | 4 +++- drivers/acpi/acpica/acparser.h | 4 ++++ drivers/acpi/acpica/acpredef.h | 4 ++++ drivers/acpi/acpica/acresrc.h | 4 ++++ drivers/acpi/acpica/acstruct.h | 4 ++++ drivers/acpi/acpica/actables.h | 4 ++++ drivers/acpi/acpica/acutils.h | 4 ++++ drivers/acpi/acpica/amlcode.h | 4 ++++ drivers/acpi/acpica/amlresrc.h | 4 ++++ include/acpi/acbuffer.h | 4 ++++ include/acpi/acconfig.h | 4 ++++ include/acpi/acexcep.h | 4 ++++ include/acpi/acoutput.h | 4 ++++ include/acpi/acpiosxf.h | 4 ++++ include/acpi/acpixf.h | 4 ++++ include/acpi/acrestyp.h | 4 ++++ include/acpi/actbl.h | 4 ++++ include/acpi/actbl1.h | 6 +++--- include/acpi/actbl2.h | 6 +++--- include/acpi/actbl3.h | 6 +++--- include/acpi/actypes.h | 4 ++++ 30 files changed, 115 insertions(+), 10 deletions(-)
drivers/acpi/acpica/acdebug.h +4 -0
@@ -44,6 +44,8 @@#ifndef __ACDEBUG_H__#define __ACDEBUG_H__ +#pragma pack(push)/* Set default struct packing */ +#define ACPI_DEBUG_BUFFER_SIZE 0x4000/* 16K buffer for return objects */ struct acpi_db_command_info {
@@ -282,4 +284,6 @@ struct acpi_namespace_node *acpi_db_local_ns_lookup(char *name);void acpi_db_uint32_to_hex_string (u32 value,char *buffer); +#pragma pack(pop)/* Restore original struct packing */ +#endif /* __ACDEBUG_H__ */
drivers/acpi/acpica/acdispat.h +4 -0
@@ -44,6 +44,8 @@#ifndef _ACDISPAT_H_#define _ACDISPAT_H_ +#pragma pack(push)/* Set default struct packing */ +#define NAMEOF_LOCAL_NTE "__L0"#define NAMEOF_ARG_NTE "__A0"
@@ -351,4 +353,6 @@ acpi_status acpi_ds_result_push(union acpi_operand_object *object, struct acpi_walk_state *walk_state); +#pragma pack(pop)/* Restore original struct packing */ +#endif /* _ACDISPAT_H_ */
drivers/acpi/acpica/acevents.h +3 -0
@@ -44,6 +44,8 @@#ifndef __ACEVENTS_H__#define __ACEVENTS_H__ +#pragma pack(push)/* Set default struct packing */ +/* * evevent */
@@ -251,4 +253,5 @@ u32 acpi_ev_install_sci_handler(void);acpi_status acpi_ev_remove_all_sci_handlers (void ); ACPI_HW_DEPENDENT_RETURN_VOID(void acpi_ev_terminate(void)) +#pragma pack(pop)/* Restore original struct packing */ #endif /* __ACEVENTS_H__ */
drivers/acpi/acpica/acglobal.h +4 -0
@@ -44,6 +44,8 @@#ifndef __ACGLOBAL_H__#define __ACGLOBAL_H__ +#pragma pack(push)/* Set default struct packing */ +/* * Ensure that the globals are actually defined and initialized only once. *
@@ -520,4 +522,6 @@ ACPI_FILE ACPI_INIT_GLOBAL(acpi_gbl_debug_file, NULL);extern const struct ah_predefined_name asl_predefined_info[]; +#pragma pack(pop)/* Restore original struct packing */ +#endif /* __ACGLOBAL_H__ */
drivers/acpi/acpica/achware.h +4 -0
@@ -44,6 +44,8 @@#ifndef __ACHWARE_H__#define __ACHWARE_H__ +#pragma pack(push)/* Set default struct packing */ +/* Values for the _SST predefined method */ #define ACPI_SST_INDICATOR_OFF 0
@@ -147,4 +149,6 @@ acpi_status acpi_hw_derive_pci_id(struct acpi_pci_id *pci_id, acpi_handle root_pci_device, acpi_handle pci_region); +#pragma pack(pop)/* Restore original struct packing */ +#endif /* __ACHWARE_H__ */
drivers/acpi/acpica/acinterp.h +4 -0
@@ -44,6 +44,8 @@#ifndef __ACINTERP_H__#define __ACINTERP_H__ +#pragma pack(push)/* Set default struct packing */ +#define ACPI_WALK_OPERANDS (&(walk_state->operands [walk_state->num_operands -1]))/* Macros for tables used for debug output */
@@ -531,4 +533,6 @@ acpi_ex_data_table_space_handler(u32 function, u64 *value, void *handler_context, void *region_context); +#pragma pack(pop)/* Restore original struct packing */ +#endif /* __INTERP_H__ */
drivers/acpi/acpica/aclocal.h +4 -0
@@ -44,6 +44,8 @@#ifndef __ACLOCAL_H__#define __ACLOCAL_H__ +#pragma pack(push)/* Set default struct packing */ +/* acpisrc:struct_defs -- for acpisrc conversion */ #define ACPI_SERIALIZED 0xFF
@@ -1147,4 +1149,6 @@ struct ah_predefined_name { #endif }; +#pragma pack(pop)/* Restore original struct packing */ +#endif /* __ACLOCAL_H__ */
drivers/acpi/acpica/acmacros.h +4 -0
@@ -44,6 +44,8 @@#ifndef __ACMACROS_H__#define __ACMACROS_H__ +#pragma pack(push)/* Set default struct packing */ +/* * Extract data using a pointer. Any more than a byte and we * get into potential aligment issues -- see the STORE macros below.
@@ -427,4 +429,6 @@#define ACPI_IS_OCTAL_DIGIT (d) (((char)(d) >= '0') && ((char)(d) <= '7')) +#pragma pack(pop)/* Restore original struct packing */ +#endif /* ACMACROS_H */
drivers/acpi/acpica/acnamesp.h +4 -0
@@ -44,6 +44,8 @@#ifndef __ACNAMESP_H__#define __ACNAMESP_H__ +#pragma pack(push)/* Set default struct packing */ +/* To search the entire name space, pass this as search_base */ #define ACPI_NS_ALL ((acpi_handle)0)
@@ -404,4 +406,6 @@ struct acpi_namespace_node *acpi_ns_validate_handle(acpi_handle handle);void acpi_ns_terminate (void ); +#pragma pack(pop)/* Restore original struct packing */ +#endif /* __ACNAMESP_H__ */
drivers/acpi/acpica/acobject.h +3 -1
@@ -44,6 +44,8 @@#ifndef _ACOBJECT_H#define _ACOBJECT_H +#pragma pack(push)/* Set default struct packing */ +/* acpisrc:struct_defs -- for acpisrc conversion */ /*
@@ -456,6 +458,6 @@ union acpi_descriptor { union acpi_parse_object op; }; -#pragma pack() +#pragma pack(pop)/* Restore original struct packing */ #endif /* _ACOBJECT_H */
drivers/acpi/acpica/acparser.h +4 -0
@@ -44,6 +44,8 @@#ifndef __ACPARSER_H__#define __ACPARSER_H__ +#pragma pack(push)/* Set default struct packing */ +#define OP_HAS_RETURN_VALUE 1/* Variable number of arguments. This field must be 32 bits */
@@ -251,4 +253,6 @@ acpi_ps_sprint_op(char *buffer_start,void acpi_ps_show (union acpi_parse_object *op); +#pragma pack(pop)/* Restore original struct packing */ +#endif /* __ACPARSER_H__ */
drivers/acpi/acpica/acpredef.h +4 -0
@@ -44,6 +44,8 @@#ifndef __ACPREDEF_H__#define __ACPREDEF_H__ +#pragma pack(push)/* Set default struct packing */ +/****************************************************************************** * * Return Package types
@@ -1080,4 +1082,6 @@ static const union acpi_predefined_info acpi_gbl_scope_names[] = {extern const union acpi_predefined_info acpi_gbl_resource_names[];#endif +#pragma pack(pop)/* Restore original struct packing */ +#endif
drivers/acpi/acpica/acresrc.h +4 -0
@@ -48,6 +48,8 @@#include "amlresrc.h" +#pragma pack(push)/* Set default struct packing */ +/* * If possible, pack the following structures to byte alignment, since we * don't care about performance for debug output. Two cases where we cannot
@@ -378,4 +380,6 @@ extern struct acpi_rsdump_info acpi_rs_dump_uart_serial_bus[];extern struct acpi_rsdump_info acpi_rs_dump_general_flags[];#endif +#pragma pack(pop)/* Restore original struct packing */ +#endif /* __ACRESRC_H__ */
drivers/acpi/acpica/acstruct.h +4 -0
@@ -44,6 +44,8 @@#ifndef __ACSTRUCT_H__#define __ACSTRUCT_H__ +#pragma pack(push)/* Set default struct packing */ +/* acpisrc:struct_defs -- for acpisrc conversion */ /*****************************************************************************
@@ -241,4 +243,6 @@ struct acpi_walk_info {#define ACPI_DISPLAY_SHORT (u8) 2 +#pragma pack(pop)/* Restore original struct packing */ +#endif
drivers/acpi/acpica/actables.h +4 -0
@@ -44,6 +44,8 @@#ifndef __ACTABLES_H__#define __ACTABLES_H__ +#pragma pack(push)/* Set default struct packing */ +acpi_status acpi_allocate_root_table (u32 initial_table_count);/*
@@ -129,4 +131,6 @@ acpi_tb_install_table(acpi_physical_address address,acpi_status acpi_tb_parse_root_table (acpi_physical_address rsdp_address); +#pragma pack(pop)/* Restore original struct packing */ +#endif /* __ACTABLES_H__ */
drivers/acpi/acpica/acutils.h +4 -0
@@ -44,6 +44,8 @@#ifndef _ACUTILS_H#define _ACUTILS_H +#pragma pack(push)/* Set default struct packing */ +extern const u8 acpi_gbl_resource_aml_sizes[];extern const u8 acpi_gbl_resource_aml_serial_bus_sizes[];
@@ -737,4 +739,6 @@ acpi_ut_method_error(const char *module_name,struct acpi_namespace_node *node, const char *path, acpi_status lookup_status); +#pragma pack(pop)/* Restore original struct packing */ +#endif /* _ACUTILS_H */
drivers/acpi/acpica/amlcode.h +4 -0
@@ -46,6 +46,8 @@#ifndef __AMLCODE_H__#define __AMLCODE_H__ +#pragma pack(push)/* Set default struct packing */ +/* primary opcodes */ #define AML_NULL_CHAR (u16) 0x00
@@ -484,4 +486,6 @@ typedef enum {#define AML_METHOD_SERIALIZED 0x08#define AML_METHOD_SYNC_LEVEL 0xF0 +#pragma pack(pop)/* Restore original struct packing */ +#endif /* __AMLCODE_H__ */
drivers/acpi/acpica/amlresrc.h +4 -0
@@ -46,6 +46,8 @@#ifndef __AMLRESRC_H#define __AMLRESRC_H +#pragma pack(push)/* Set default struct packing */ +/* * Resource descriptor tags, as defined in the ACPI specification. * Used to symbolically reference fields within a descriptor.
@@ -449,4 +451,6 @@ union aml_resource { u8 byte_item; }; +#pragma pack(pop)/* Restore original struct packing */ +#endif
include/acpi/acbuffer.h +4 -0
@@ -44,6 +44,8 @@#ifndef __ACBUFFER_H__#define __ACBUFFER_H__ +#pragma pack(push)/* Set default struct packing */ +/* * Contains buffer structures for these predefined names: * _FDE, _GRT, _GTM, _PLD, _SRT
@@ -232,4 +234,6 @@ struct acpi_pld_info {#define ACPI_PLD_GET_HORIZ_OFFSET (dword) ACPI_GET_BITS (dword, 16, ACPI_16BIT_MASK)#define ACPI_PLD_SET_HORIZ_OFFSET (dword,value) ACPI_SET_BITS (dword, 16, ACPI_16BIT_MASK, value)/* Offset 128+16=144, Len 16 */ +#pragma pack(pop)/* Restore original struct packing */ +#endif /* ACBUFFER_H */
include/acpi/acconfig.h +4 -0
@@ -44,6 +44,8 @@#ifndef _ACCONFIG_H#define _ACCONFIG_H +#pragma pack(push)/* Set default struct packing */ +/****************************************************************************** * * Configuration options
@@ -229,4 +231,6 @@#define ACPI_DEBUGGER_COMMAND_PROMPT '-'#define ACPI_DEBUGGER_EXECUTE_PROMPT '%' +#pragma pack(pop)/* Restore original struct packing */ +#endif /* _ACCONFIG_H */
include/acpi/acexcep.h +4 -0
@@ -44,6 +44,8 @@#ifndef __ACEXCEP_H__#define __ACEXCEP_H__ +#pragma pack(push)/* Set default struct packing */ +/* This module contains all possible exception codes for acpi_status */ /*
@@ -377,4 +379,6 @@ static const struct acpi_exception_info acpi_gbl_exception_names_ctrl[] = {#endif /* EXCEPTION_TABLE */ +#pragma pack(pop)/* Restore original struct packing */ +#endif /* __ACEXCEP_H__ */
include/acpi/acoutput.h +4 -0
@@ -44,6 +44,8 @@#ifndef __ACOUTPUT_H__#define __ACOUTPUT_H__ +#pragma pack(push)/* Set default struct packing */ +/* * Debug levels and component IDs. These are used to control the * granularity of the output of the ACPI_DEBUG_PRINT macro -- on a
@@ -456,4 +458,6 @@#endif /* ACPI_DEBUG_OUTPUT */ +#pragma pack(pop)/* Restore original struct packing */ +#endif /* __ACOUTPUT_H__ */
include/acpi/acpiosxf.h +4 -0
@@ -49,6 +49,8 @@#include <acpi/platform/acenv.h> #include <acpi/actypes.h> +#pragma pack(push)/* Set default struct packing */ +/* Types for acpi_os_execute */ typedef enum {
@@ -399,4 +401,6 @@ char *acpi_os_get_next_filename(void *dir_handle);void acpi_os_close_directory (void *dir_handle);#endif +#pragma pack(pop)/* Restore original struct packing */ +#endif /* __ACPIOSXF_H__ */
include/acpi/acpixf.h +4 -0
@@ -55,6 +55,8 @@extern u8 acpi_gbl_permanent_mmap; +#pragma pack(push)/* Set default struct packing */ +/* * Globals that are publically available */
@@ -584,4 +586,6 @@ acpi_debug_print_raw(u32 requested_debug_level, u32 component_id, const char *format, ...);#endif +#pragma pack(pop)/* Restore original struct packing */ +#endif /* __ACXFACE_H__ */
include/acpi/acrestyp.h +4 -0
@@ -44,6 +44,8 @@#ifndef __ACRESTYP_H__#define __ACRESTYP_H__ +#pragma pack(push)/* Set default struct packing */ +/* * Definitions for Resource Attributes */
@@ -610,4 +612,6 @@ struct acpi_pci_routing_table { char source[4]; /* pad to 64 bits so sizeof() works in all cases */ }; +#pragma pack(pop)/* Restore original struct packing */ +#endif /* __ACRESTYP_H__ */
include/acpi/actbl.h +4 -0
@@ -44,6 +44,8 @@#ifndef __ACTBL_H__#define __ACTBL_H__ +#pragma pack(push)/* Set default struct packing */ +/******************************************************************************* * * Fundamental ACPI tables
@@ -404,4 +406,6 @@ struct acpi_table_desc {#define ACPI_FADT_V3_SIZE (u32) (ACPI_FADT_OFFSET (sleep_control))#define ACPI_FADT_V5_SIZE (u32) (sizeof (struct acpi_table_fadt)) +#pragma pack(pop)/* Restore original struct packing */ +#endif /* __ACTBL_H__ */
include/acpi/actbl1.h +3 -3
@@ -44,6 +44,8 @@#ifndef __ACTBL1_H__#define __ACTBL1_H__ +#pragma pack(push)/* Set default struct packing */ +/******************************************************************************* * * Additional ACPI Tables (1)
@@ -972,8 +974,6 @@ struct acpi_srat_x2apic_cpu_affinity {#define ACPI_SRAT_CPU_ENABLED (1)/* 00: Use affinity structure */ -/* Reset to default packing */ - -#pragma pack() +#pragma pack(pop)/* Restore original struct packing */ #endif /* __ACTBL1_H__ */
include/acpi/actbl2.h +3 -3
@@ -44,6 +44,8 @@#ifndef __ACTBL2_H__#define __ACTBL2_H__ +#pragma pack(push)/* Set default struct packing */ +/******************************************************************************* * * Additional ACPI Tables (2)
@@ -1229,8 +1231,6 @@ struct acpi_table_wdrt { u8 units; }; -/* Reset to default packing */ - -#pragma pack() +#pragma pack(pop)/* Restore original struct packing */ #endif /* __ACTBL2_H__ */
include/acpi/actbl3.h +3 -3
@@ -44,6 +44,8 @@#ifndef __ACTBL3_H__#define __ACTBL3_H__ +#pragma pack(push)/* Set default struct packing */ +/******************************************************************************* * * Additional ACPI Tables (3)
@@ -622,8 +624,6 @@ struct acpi_tpm2_control { u64 response_address; }; -/* Reset to default packing */ - -#pragma pack() +#pragma pack(pop)/* Restore original struct packing */ #endif /* __ACTBL3_H__ */
include/acpi/actypes.h +4 -0
@@ -44,6 +44,8 @@#ifndef __ACTYPES_H__#define __ACTYPES_H__ +#pragma pack(push)/* Set default struct packing */ +/* acpisrc:struct_defs -- for acpisrc conversion */ /*
@@ -1223,4 +1225,6 @@ struct acpi_memory_list {#define ACPI_OSI_WIN_7 0x0B#define ACPI_OSI_WIN_8 0x0C +#pragma pack(pop)/* Restore original struct packing */ +#endif /* __ACTYPES_H__ */
Signature · 1 line
1.7.10
PATCH 2/18 ACPICA: Predefined names: Add support for the _PRP method.
In reply to Lv ZhengFrom: Bob Moore <[email protected]>
This is not an official predefined name yet, but we add it to assist with development.
--- drivers/acpi/acpica/acpredef.h | 6 ++++++ 1 file changed, 6 insertions(+)
drivers/acpi/acpica/acpredef.h +6 -0
@@ -700,6 +700,12 @@ const union acpi_predefined_info acpi_gbl_predefined_methods[] = { METHOD_RETURNS(ACPI_RTYPE_PACKAGE)}}, /* Variable-length (Refs) */PACKAGE_INFO (ACPI_PTYPE1_VAR ,ACPI_RTYPE_REFERENCE ,0 ,0 ,0 ,0 ), + {{"_PRP", METHOD_0ARGS, + METHOD_RETURNS(ACPI_RTYPE_PACKAGE)}}, /* Variable-length (Pkgs) each: 1 Str, 1 Int/Str/Pkg */ +PACKAGE_INFO (ACPI_PTYPE2 ,ACPI_RTYPE_STRING ,1 , +ACPI_RTYPE_INTEGER |ACPI_RTYPE_STRING | +ACPI_RTYPE_PACKAGE ,1 ,0 ), + {{"_PRS", METHOD_0ARGS, METHOD_RETURNS(ACPI_RTYPE_BUFFER)}},
Signature · 1 line
1.7.10
PATCH 3/18 ACPICA: Update conditional compilation flags for resource dump functions.
In reply to Lv ZhengCorrects ACPI_DISASSEMBLER to the compile conditions. The wrong condition was introduced by this commit:
Commit: 3334861b1e9947631230b573eba27bcd778b93c8
Subject: ACPICA: Update the conditions to enable the utility resource dump strings.
This was detected in the ACPICA upstream. Linux is not affected by the wrong commit as the disassembler is not shipped in the Linux.
--- drivers/acpi/acpica/rsdump.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/acpi/acpica/rsdump.c +1 -1
@@ -48,7 +48,7 @@#define _COMPONENT ACPI_RESOURCES ACPI_MODULE_NAME("rsdump") -#if defined(ACPI_DEBUG_OUTPUT ) || defined(ACPI_DISASSEMBER ) || defined(ACPI_DEBUGGER ) +#if defined(ACPI_DEBUG_OUTPUT ) || defined(ACPI_DISASSEMBLER ) || defined(ACPI_DEBUGGER )/* Local prototypes */ static void acpi_rs_out_string (char *title,char *value);
Signature · 1 line
1.7.10
PATCH 4/18 ACPICA: Properly handle NULL entries in _PRT return packages.
In reply to Lv ZhengThis change enables proper handling of NULL package entries in a _PRT return value, during construction of the PCI routing table. Lv Zheng.
--- drivers/acpi/acpica/rscreate.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/acpi/acpica/rscreate.c +3 -3
@@ -292,7 +292,7 @@ acpi_rs_create_pci_routing_table(union acpi_operand_object *package_object,/* 1) First subobject: Dereference the PRT.Address */ obj_desc = sub_object_list[0 ]; -if (obj_desc->common.type !=ACPI_TYPE_INTEGER ) { +if (!obj_desc || obj_desc->common.type !=ACPI_TYPE_INTEGER ) { ACPI_ERROR((AE_INFO, "(PRT[%u].Address) Need Integer, found %s", index,
@@ -305,7 +305,7 @@ acpi_rs_create_pci_routing_table(union acpi_operand_object *package_object,/* 2) Second subobject: Dereference the PRT.Pin */ obj_desc = sub_object_list[1 ]; -if (obj_desc->common.type !=ACPI_TYPE_INTEGER ) { +if (!obj_desc || obj_desc->common.type !=ACPI_TYPE_INTEGER ) { ACPI_ERROR((AE_INFO, "(PRT[%u].Pin) Need Integer, found %s", index,
@@ -394,7 +394,7 @@ acpi_rs_create_pci_routing_table(union acpi_operand_object *package_object,/* 4) Fourth subobject: Dereference the PRT.source_index */ obj_desc = sub_object_list[3 ]; -if (obj_desc->common.type !=ACPI_TYPE_INTEGER ) { +if (!obj_desc || obj_desc->common.type !=ACPI_TYPE_INTEGER ) { ACPI_ERROR((AE_INFO, "(PRT[%u].SourceIndex) Need Integer, found %s", index,
Signature · 1 line
1.7.10
PATCH 5/18 ACPICA: Restore code that repairs NULL package elements in return values.
In reply to Lv ZhengThe original code was lost accidently, it was not generated along with the following commit of mechanism improvements and thus not get merged:
Commit: d5a36100f62fa6db5541344e08b361b34e9114c5
Subject: ACPICA: Add mechanism for early object repairs on a per-name basis
Adds the framework to allow object repairs very early in the return object analysis. Enables repairs like string->unicode, etc.
This patch restores the implementation of the NULL element repair code for ACPI_RTYPE_NONE. In the original design, ACPI_RTYPE_NONE is defined to collect simple NULL object repairs.
Lv Zheng.
--- drivers/acpi/acpica/nsrepair.c | 25 +++++++++++++++++++++---- 1 file changed, 21 insertions(+), 4 deletions(-)
drivers/acpi/acpica/nsrepair.c +21 -4
@@ -207,13 +207,30 @@ acpi_ns_simple_repair(struct acpi_evaluate_info *info,* this predefined name. Either one return value is expected, or none, * for both methods and other objects. * -* Exit now if there is no return object. Warning if one was expected. +* Try to fix if there was no return object. Warning if failed to fix. */ if (!return_object) {if (expected_btypes && (!(expected_btypes &ACPI_RTYPE_NONE ))) { -ACPI_WARN_PREDEFINED ((AE_INFO , info->full_pathname, -ACPI_WARN_ALWAYS , -"Missing expected return value" )); +if (package_index !=ACPI_NOT_PACKAGE_ELEMENT ) { +ACPI_WARN_PREDEFINED ((AE_INFO , + info->full_pathname, +ACPI_WARN_ALWAYS , +"Found unexpected NULL package element" )); + + status = +acpi_ns_repair_null_element (info, + expected_btypes, + package_index, + return_object_ptr); +if (ACPI_SUCCESS (status)) { +return (AE_OK );/* Repair was successful */ + } + }else { +ACPI_WARN_PREDEFINED ((AE_INFO , + info->full_pathname, +ACPI_WARN_ALWAYS , +"Missing expected return value" )); + }return (AE_AML_NO_RETURN_VALUE ); }
Signature · 1 line
1.7.10
PATCH 6/18 ACPICA: Harden _PRT repair code; check for minimum package length.
In reply to Lv ZhengFrom: Bob Moore <[email protected]>
This change prevents a fault during the repair by checking up front if the _PRT subpackage contains the minimum number of elements (4).
--- drivers/acpi/acpica/nsrepair2.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-)
drivers/acpi/acpica/nsrepair2.c +7 -1
@@ -611,6 +611,7 @@ acpi_ns_repair_PRT(struct acpi_evaluate_info *info,union acpi_operand_object **top_object_list;union acpi_operand_object **sub_object_list;union acpi_operand_object *obj_desc; +union acpi_operand_object *sub_package;u32 element_count;u32 index;
@@ -620,7 +621,12 @@ acpi_ns_repair_PRT(struct acpi_evaluate_info *info, element_count = package_object->package.count;for (index =0 ; index < element_count; index++) { - sub_object_list = (*top_object_list)->package.elements; + sub_package = *top_object_list; + sub_object_list = sub_package->package.elements; + +if (sub_package->package.count <4 ) {/* Minimum required element count */ +return (AE_OK ); + }/* * If the BIOS has erroneously reversed the _PRT source_name (index 2)
Signature · 1 line
1.7.10
PATCH 7/18 ACPICA: Do not abort _PRT repair on a single subpackage failure.
In reply to Lv ZhengFrom: Bob Moore <[email protected]>
Always examine all subpackages for reversed entries.
--- drivers/acpi/acpica/nsrepair2.c | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-)
drivers/acpi/acpica/nsrepair2.c +9 -8
@@ -620,12 +620,16 @@ acpi_ns_repair_PRT(struct acpi_evaluate_info *info, top_object_list = package_object->package.elements; element_count = package_object->package.count; -for (index =0 ; index < element_count; index++) { +/* Examine each subpackage */ + +for (index =0 ; index < element_count; index++, top_object_list++) { sub_package = *top_object_list; sub_object_list = sub_package->package.elements; -if (sub_package->package.count <4 ) {/* Minimum required element count */ -return (AE_OK ); +/* Check for minimum required element count */ + +if (sub_package->package.count <4 ) { +continue ; }/*
@@ -640,15 +644,12 @@ acpi_ns_repair_PRT(struct acpi_evaluate_info *info, sub_object_list[2 ] = obj_desc; info->return_flags |=ACPI_OBJECT_REPAIRED ; -ACPI_WARN_PREDEFINED ((AE_INFO , info->full_pathname, +ACPI_WARN_PREDEFINED ((AE_INFO , + info->full_pathname, info->node_flags,"PRT[%X]: Fixed reversed SourceName and SourceIndex" , index)); } - -/* Point to the next union acpi_operand_object in the top level package */ - - top_object_list++; }return (AE_OK );
Signature · 1 line
1.7.10
PATCH 8/18 ACPICA: Add auto-serialization support for ill-behaved control methods.
In reply to Lv ZhengFrom: Bob Moore <[email protected]>
This change adds support to automatically mark a control method as "serialized" if the method creates any named objects. This will positively prevent the method from being entered by more than one thread and thus preventing a possible abort when an attempt is made to create an object twice.
Implemented by parsing all non-serialize control methods at table load time.
--- drivers/acpi/acpica/acdispat.h | 13 ++-- drivers/acpi/acpica/acstruct.h | 3 + drivers/acpi/acpica/dsinit.c | 55 +++++++++++++---- drivers/acpi/acpica/dsmethod.c | 132 +++++++++++++++++++++++++++++++++++++++- drivers/acpi/acpica/dswload.c | 16 +++++ drivers/acpi/acpica/nsinit.c | 5 +- drivers/acpi/acpica/nsload.c | 4 +- drivers/acpi/acpica/psloop.c | 4 ++ drivers/acpi/acpica/psobject.c | 7 ++- 9 files changed, 214 insertions(+), 25 deletions(-)
drivers/acpi/acpica/acdispat.h +8 -5
@@ -141,20 +141,21 @@ acpi_ds_init_field_objects(union acpi_parse_object *op, struct acpi_walk_state *walk_state);/* -* dsload - Parser/Interpreter interface, pass 1 namespace load callbacks +* dsload - Parser/Interpreter interface */ acpi_status acpi_ds_init_callbacks (struct acpi_walk_state *walk_state,u32 pass_number); +/* dsload - pass 1 namespace load callbacks */ +acpi_status acpi_ds_load1_begin_op (struct acpi_walk_state *walk_state,union acpi_parse_object **out_op);acpi_status acpi_ds_load1_end_op (struct acpi_walk_state *walk_state); -/* -* dsload - Parser/Interpreter interface, pass 2 namespace load callbacks -*/ +/* dsload - pass 2 namespace load callbacks */ +acpi_status acpi_ds_load2_begin_op (struct acpi_walk_state *walk_state,union acpi_parse_object **out_op);
@@ -202,7 +203,9 @@ void acpi_ds_method_data_init(struct acpi_walk_state *walk_state);/* * dsmethod - Parser/Interpreter interface - control method parsing */ -acpi_status acpi_ds_parse_method (struct acpi_namespace_node *node); +acpi_status +acpi_ds_auto_serialize_method (struct acpi_namespace_node *node, +union acpi_operand_object *obj_desc); acpi_status acpi_ds_call_control_method(struct acpi_thread_state *thread,
drivers/acpi/acpica/acstruct.h +3 -0
@@ -135,6 +135,9 @@ struct acpi_init_walk_info {u32 table_index;u32 object_count;u32 method_count; +u32 serial_method_count; +u32 non_serial_method_count; +u32 serialized_method_count;u32 device_count;u32 op_region_count;u32 field_count;
drivers/acpi/acpica/dsinit.c +43 -12
89 lines not on this page · raw message
drivers/acpi/acpica/dsmethod.c +131 -1
154 lines not on this page · raw message
drivers/acpi/acpica/dswload.c +16 -0
@@ -73,8 +73,20 @@ acpi_ds_init_callbacks(struct acpi_walk_state *walk_state, u32 pass_number) {switch (pass_number) { +case 0 : + +/* Parse only - caller will setup callbacks */ + + walk_state->parse_flags =ACPI_PARSE_LOAD_PASS1 | +ACPI_PARSE_DELETE_TREE |ACPI_PARSE_DISASSEMBLE ; + walk_state->descending_callback =NULL ; + walk_state->ascending_callback =NULL ; +break ; +case 1 : +/* Load pass 1 */ + walk_state->parse_flags =ACPI_PARSE_LOAD_PASS1 |ACPI_PARSE_DELETE_TREE ; walk_state->descending_callback = acpi_ds_load1_begin_op;
@@ -83,6 +95,8 @@ acpi_ds_init_callbacks(struct acpi_walk_state *walk_state, u32 pass_number)case 2 : +/* Load pass 2 */ + walk_state->parse_flags =ACPI_PARSE_LOAD_PASS1 |ACPI_PARSE_DELETE_TREE ; walk_state->descending_callback = acpi_ds_load2_begin_op;
@@ -91,6 +105,8 @@ acpi_ds_init_callbacks(struct acpi_walk_state *walk_state, u32 pass_number)case 3 : +/* Execution pass */ +#ifndef ACPI_NO_METHOD_EXECUTION walk_state->parse_flags |=ACPI_PARSE_EXECUTE |ACPI_PARSE_DELETE_TREE ;
drivers/acpi/acpica/nsinit.c +2 -3
@@ -111,9 +111,8 @@ acpi_status acpi_ns_initialize_objects(void) info.object_count));ACPI_DEBUG_PRINT ((ACPI_DB_DISPATCH , -"%u Control Methods found\n" , info.method_count)); -ACPI_DEBUG_PRINT ((ACPI_DB_DISPATCH , -"%u Op Regions found\n" , info.op_region_count)); +"%u Control Methods found\n%u Op Regions found\n" , + info.method_count, info.op_region_count));return_ACPI_STATUS (AE_OK ); }
drivers/acpi/acpica/nsload.c +2 -2
@@ -128,12 +128,12 @@ unlock:* parse trees. */ ACPI_DEBUG_PRINT ((ACPI_DB_INFO , -"**** Begin Table Method Parsing and Object Initialization\n" )); +"**** Begin Table Object Initialization\n" )); status =acpi_ds_initialize_objects (table_index, node);ACPI_DEBUG_PRINT ((ACPI_DB_INFO , -"**** Completed Table Method Parsing and Object Initialization\n" )); +"**** Completed Table Object Initialization\n" ));return_ACPI_STATUS (status); }
drivers/acpi/acpica/psloop.c +4 -0
@@ -480,6 +480,10 @@ acpi_status acpi_ps_parse_loop(struct acpi_walk_state *walk_state) status =AE_OK ; } +if (status ==AE_CTRL_TERMINATE ) { +return_ACPI_STATUS (status); + } + status =acpi_ps_complete_op (walk_state, &op, status);
drivers/acpi/acpica/psobject.c +5 -2
@@ -219,7 +219,10 @@ acpi_ps_build_named_op(struct acpi_walk_state *walk_state, status = walk_state->descending_callback (walk_state, op);if (ACPI_FAILURE (status)) { -ACPI_EXCEPTION ((AE_INFO , status,"During name lookup/catalog" )); +if (status !=AE_CTRL_TERMINATE ) { +ACPI_EXCEPTION ((AE_INFO , status, +"During name lookup/catalog" )); + }return_ACPI_STATUS (status); }
@@ -230,7 +233,7 @@ acpi_ps_build_named_op(struct acpi_walk_state *walk_state, status =acpi_ps_next_parse_state (walk_state, *op, status);if (ACPI_FAILURE (status)) {if (status ==AE_CTRL_PENDING ) { -return_ACPI_STATUS (AE_CTRL_PARSE_PENDING ); + status =AE_CTRL_PARSE_PENDING ; }return_ACPI_STATUS (status); }
Signature · 1 line
1.7.10
PATCH 9/18 ACPICA: Comment update - no functional change.
In reply to Lv ZhengFrom: Bob Moore <[email protected]>
Change all instances of "sub-package" to "subpackage" for consistency.
--- drivers/acpi/acpica/acpredef.h | 8 ++++---- drivers/acpi/acpica/nsprepkg.c | 40 +++++++++++++++++++-------------------- drivers/acpi/acpica/nsrepair.c | 4 ++-- drivers/acpi/acpica/nsrepair2.c | 16 ++++++++-------- drivers/acpi/acpica/rscalc.c | 2 +- drivers/acpi/acpica/rscreate.c | 4 ++-- 6 files changed, 37 insertions(+), 37 deletions(-)
drivers/acpi/acpica/acpredef.h +4 -4
@@ -50,7 +50,7 @@* * Return Package types * -* 1) PTYPE1 packages do not contain sub-packages. +* 1) PTYPE1 packages do not contain subpackages. * * ACPI_PTYPE1_FIXED: Fixed-length length, 1 or 2 object types: * object type
@@ -65,8 +65,8 @@* (Used for _PRW) * * -* 2) PTYPE2 packages contain a Variable-length number of sub-packages. Each -* of the different types describe the contents of each of the sub-packages. +* 2) PTYPE2 packages contain a Variable-length number of subpackages. Each +* of the different types describe the contents of each of the subpackages. * * ACPI_PTYPE2: Each subpackage contains 1 or 2 object types. Zero-length * parent package is allowed:
@@ -562,7 +562,7 @@ const union acpi_predefined_info acpi_gbl_predefined_methods[] = {/* * For _HPX, a single package is returned, containing a variable-length number -* of sub-packages. Each sub-package contains a PCI record setting. +* of subpackages. Each subpackage contains a PCI record setting. * There are several different type of record settings, of different * lengths, but all elements of all settings are Integers. */
drivers/acpi/acpica/nsprepkg.c +20 -20
@@ -132,12 +132,12 @@ acpi_ns_check_package(struct acpi_evaluate_info *info,* Decode the type of the expected package contents * * PTYPE1 packages contain no subpackages -* PTYPE2 packages contain sub-packages +* PTYPE2 packages contain subpackages */ switch (package->ret_info.type) {case ACPI_PTYPE1_FIXED :/* -* The package count is fixed and there are no sub-packages +* The package count is fixed and there are no subpackages * * If package is too small, exit. * If package is larger than expected, issue warning but continue
@@ -169,7 +169,7 @@ acpi_ns_check_package(struct acpi_evaluate_info *info,case ACPI_PTYPE1_VAR :/* -* The package count is variable, there are no sub-packages, and all +* The package count is variable, there are no subpackages, and all * elements must be of the same type */ for (i =0 ; i < count; i++) {
@@ -185,7 +185,7 @@ acpi_ns_check_package(struct acpi_evaluate_info *info,case ACPI_PTYPE1_OPTION :/* -* The package count is variable, there are no sub-packages. There are +* The package count is variable, there are no subpackages. There are * a fixed number of required elements, and a variable number of * optional elements. *
@@ -242,7 +242,7 @@ acpi_ns_check_package(struct acpi_evaluate_info *info, elements++; count--; -/* Examine the sub-packages */ +/* Examine the subpackages */ status =acpi_ns_check_package_list (info, package, elements, count);
@@ -250,7 +250,7 @@ acpi_ns_check_package(struct acpi_evaluate_info *info,case ACPI_PTYPE2_PKG_COUNT : -/* First element is the (Integer) count of sub-packages to follow */ +/* First element is the (Integer) count of subpackages to follow */ status =acpi_ns_check_object_type (info, elements,ACPI_RTYPE_INTEGER ,0 );
@@ -270,7 +270,7 @@ acpi_ns_check_package(struct acpi_evaluate_info *info, count = expected_count; elements++; -/* Examine the sub-packages */ +/* Examine the subpackages */ status =acpi_ns_check_package_list (info, package, elements, count);
@@ -283,9 +283,9 @@ acpi_ns_check_package(struct acpi_evaluate_info *info,case ACPI_PTYPE2_FIX_VAR :/* * These types all return a single Package that consists of a -* variable number of sub-Packages. +* variable number of subpackages. * -* First, ensure that the first element is a sub-Package. If not, +* First, ensure that the first element is a subpackage. If not, * the BIOS may have incorrectly returned the object as a single * package instead of a Package of Packages (a common error if * there is only one entry). We may be able to repair this by
@@ -310,7 +310,7 @@ acpi_ns_check_package(struct acpi_evaluate_info *info, count =1 ; } -/* Examine the sub-packages */ +/* Examine the subpackages */ status =acpi_ns_check_package_list (info, package, elements, count);
@@ -370,9 +370,9 @@ acpi_ns_check_package_list(struct acpi_evaluate_info *info,u32 j;/* -* Validate each sub-Package in the parent Package +* Validate each subpackage in the parent Package * -* NOTE: assumes list of sub-packages contains no NULL elements. +* NOTE: assumes list of subpackages contains no NULL elements. * Any NULL elements should have been removed by earlier call * to acpi_ns_remove_null_elements. */
@@ -389,7 +389,7 @@ acpi_ns_check_package_list(struct acpi_evaluate_info *info,return (status); } -/* Examine the different types of expected sub-packages */ +/* Examine the different types of expected subpackages */ info->parent_package = sub_package;switch (package->ret_info.type) {
@@ -450,14 +450,14 @@ acpi_ns_check_package_list(struct acpi_evaluate_info *info,case ACPI_PTYPE2_FIXED : -/* Each sub-package has a fixed length */ +/* Each subpackage has a fixed length */ expected_count = package->ret_info2.count;if (sub_package->package.count < expected_count) { goto package_too_small; } -/* Check the type of each sub-package element */ +/* Check the type of each subpackage element */ for (j =0 ; j < expected_count; j++) { status =
@@ -475,14 +475,14 @@ acpi_ns_check_package_list(struct acpi_evaluate_info *info,case ACPI_PTYPE2_MIN : -/* Each sub-package has a variable but minimum length */ +/* Each subpackage has a variable but minimum length */ expected_count = package->ret_info.count1;if (sub_package->package.count < expected_count) { goto package_too_small; } -/* Check the type of each sub-package element */ +/* Check the type of each subpackage element */ status = acpi_ns_check_package_elements(info, sub_elements,
@@ -531,7 +531,7 @@ acpi_ns_check_package_list(struct acpi_evaluate_info *info, (*sub_elements)->integer.value = expected_count; } -/* Check the type of each sub-package element */ +/* Check the type of each subpackage element */ status = acpi_ns_check_package_elements(info,
@@ -557,10 +557,10 @@ acpi_ns_check_package_list(struct acpi_evaluate_info *info, package_too_small: -/* The sub-package count was smaller than required */ +/* The subpackage count was smaller than required */ ACPI_WARN_PREDEFINED ((AE_INFO , info->full_pathname, info->node_flags, -"Return Sub-Package[%u] is too small - found %u elements, expected %u" , +"Return SubPackage[%u] is too small - found %u elements, expected %u" , i, sub_package->package.count, expected_count));return (AE_AML_OPERAND_VALUE );
drivers/acpi/acpica/nsrepair.c +2 -2
@@ -465,7 +465,7 @@ acpi_ns_repair_null_element(struct acpi_evaluate_info * info,* RETURN: None. * * DESCRIPTION: Remove all NULL package elements from packages that contain -* a variable number of sub-packages. For these types of +* a variable number of subpackages. For these types of * packages, NULL elements can be safely removed. * *****************************************************************************/
@@ -486,7 +486,7 @@ acpi_ns_remove_null_elements(struct acpi_evaluate_info *info,/* * We can safely remove all NULL elements from these package types: * PTYPE1_VAR packages contain a variable number of simple data types. -* PTYPE2 packages contain a variable number of sub-packages. +* PTYPE2 packages contain a variable number of subpackages. */ switch (package_type) {case ACPI_PTYPE1_VAR :
drivers/acpi/acpica/nsrepair2.c +8 -8
@@ -432,8 +432,8 @@ acpi_ns_repair_CID(struct acpi_evaluate_info *info,* DESCRIPTION: Repair for the _CST object: * 1. Sort the list ascending by C state type * 2. Ensure type cannot be zero -* 3. A sub-package count of zero means _CST is meaningless -* 4. Count must match the number of C state sub-packages +* 3. A subpackage count of zero means _CST is meaningless +* 4. Count must match the number of C state subpackages * *****************************************************************************/
@@ -686,7 +686,7 @@ acpi_ns_repair_PSS(struct acpi_evaluate_info *info,u32 i;/* -* Entries (sub-packages) in the _PSS Package must be sorted by power +* Entries (subpackages) in the _PSS Package must be sorted by power * dissipation, in descending order. If it appears that the list is * incorrectly sorted, sort it. We sort by cpu_frequency, since this * should be proportional to the power.
@@ -774,9 +774,9 @@ acpi_ns_repair_TSS(struct acpi_evaluate_info *info,* * PARAMETERS: info - Method execution information block * return_object - Pointer to the top-level returned object -* start_index - Index of the first sub-package -* expected_count - Minimum length of each sub-package -* sort_index - Sub-package entry to sort on +* start_index - Index of the first subpackage +* expected_count - Minimum length of each subpackage +* sort_index - Subpackage entry to sort on * sort_direction - Ascending or descending * sort_key_name - Name of the sort_index field *
@@ -812,7 +812,7 @@ acpi_ns_check_sorted_list(struct acpi_evaluate_info *info, }/* -* NOTE: assumes list of sub-packages contains no NULL elements. +* NOTE: assumes list of subpackages contains no NULL elements. * Any NULL elements should have been removed by earlier call * to acpi_ns_remove_null_elements. */
@@ -839,7 +839,7 @@ acpi_ns_check_sorted_list(struct acpi_evaluate_info *info,return (AE_AML_OPERAND_TYPE ); } -/* Each sub-package must have the minimum length */ +/* Each subpackage must have the minimum length */ if ((*outer_elements)->package.count < expected_count) {return (AE_AML_PACKAGE_LIMIT );
drivers/acpi/acpica/rscalc.c +1 -1
@@ -636,7 +636,7 @@ acpi_rs_get_pci_routing_table_length(union acpi_operand_object *package_object,for (index =0 ; index < number_of_elements; index++) { -/* Dereference the sub-package */ +/* Dereference the subpackage */ package_element = *top_object_list;
drivers/acpi/acpica/rscreate.c +2 -2
@@ -273,7 +273,7 @@ acpi_rs_create_pci_routing_table(union acpi_operand_object *package_object,*/ user_prt->length = (sizeof (struct acpi_pci_routing_table ) -4 ); -/* Each sub-package must be of length 4 */ +/* Each subpackage must be of length 4 */ if ((*top_object_list)->package.count !=4 ) { ACPI_ERROR((AE_INFO,
@@ -283,7 +283,7 @@ acpi_rs_create_pci_routing_table(union acpi_operand_object *package_object, }/* -* Dereference the sub-package. +* Dereference the subpackage. * The sub_object_list will now point to an array of the four IRQ * elements: [Address, Pin, Source, source_index] */
Signature · 1 line
1.7.10
PATCH 10/18 ACPICA: Add additional named objects for the auto-serialize method scan.
In reply to Lv ZhengThis change adds some additional opcodes that are detected and will cause a method to be auto-serialized. These opcodes are the various CreateXField and the FieldUnit opcodes. Lv Zheng.
--- drivers/acpi/acpica/dsmethod.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-)
drivers/acpi/acpica/dsmethod.c +5 -3
@@ -163,9 +163,11 @@ acpi_ds_detect_named_opcodes(struct acpi_walk_state *walk_state,ACPI_FUNCTION_NAME (acpi_ds_detect_named_opcodes); -/* We are only interested in opcodes that have an associated name */ +/* We are only interested in opcodes that create a new name */ -if (!(walk_state->op_info->flags &AML_NAMED )) { +if (! + (walk_state->op_info-> + flags & (AML_NAMED |AML_CREATE |AML_FIELD ))) {return (AE_OK ); }
@@ -184,7 +186,7 @@ acpi_ds_detect_named_opcodes(struct acpi_walk_state *walk_state,/* Abort the parse, no need to examine this method any further */ -return_ACPI_STATUS (AE_CTRL_TERMINATE ); +return (AE_CTRL_TERMINATE ); }/*******************************************************************************
Signature · 1 line
1.7.10
PATCH 11/18 ACPICA: Add global option to disable method auto-serialization.
In reply to Lv ZhengFrom: Bob Moore <[email protected]>
This change adds an option to disable the auto-serialization of methods that create named objects.
--- drivers/acpi/acpica/acglobal.h | 9 +++++++++ drivers/acpi/acpica/dsinit.c | 18 +++++++++++------- include/acpi/acpixf.h | 1 + 3 files changed, 21 insertions(+), 7 deletions(-)
drivers/acpi/acpica/acglobal.h +9 -0
@@ -87,6 +87,15 @@u8 ACPI_INIT_GLOBAL (acpi_gbl_enable_interpreter_slack ,FALSE );/* +* Automatically serialize all methods that create named objects? Default +* is TRUE, meaning that all non_serialized methods are scanned once at +* table load time to determine those that create named objects. Methods +* that create named objects are marked Serialized in order to prevent +* possible run-time problems if they are entered by more than one thread. +*/ +u8 ACPI_INIT_GLOBAL (acpi_gbl_auto_serialize_methods ,TRUE ); + +/* * Automatically serialize ALL control methods? Default is FALSE, meaning * to use the Serialized/not_serialized method flags on a per method basis. * Only change this if the ASL code is poorly written and cannot handle
drivers/acpi/acpica/dsinit.c +11 -7
@@ -136,16 +136,20 @@ acpi_ds_init_one_object(acpi_handle obj_handle,break ; } -/* Parse/scan method and serialize it if necessary */ +if (acpi_gbl_auto_serialize_methods) { -acpi_ds_auto_serialize_method (node, obj_desc); -if (obj_desc->method.info_flags &ACPI_METHOD_SERIALIZED ) { +/* Parse/scan method and serialize it if necessary */ -/* Method was just converted to Serialized */ +acpi_ds_auto_serialize_method (node, obj_desc); +if (obj_desc->method. + info_flags &ACPI_METHOD_SERIALIZED ) { - info->serial_method_count++; - info->serialized_method_count++; -break ; +/* Method was just converted to Serialized */ + + info->serial_method_count++; + info->serialized_method_count++; +break ; + } } info->non_serial_method_count++;
include/acpi/acpixf.h +1 -0
@@ -73,6 +73,7 @@ extern u32 acpi_dbg_layer;/* ACPICA runtime options */ +extern u8 acpi_gbl_auto_serialize_methods;extern u8 acpi_gbl_all_methods_serialized;extern u8 acpi_gbl_copy_dsdt_locally;extern u8 acpi_gbl_create_osi_method;
Signature · 1 line
1.7.10
PATCH 12/18 ACPICA: Remove global option to serialize all control methods.
In reply to Lv ZhengWith the addition of the auto-serialization feature, this option is obsolete and is completely removed. Lv Zheng.
This patch also updates acpi_serialize kernel parameter using the new auto-serialization feature - acpi_gbl_auto_serialize_methods.
Signed-off: Lv Zheng <[email protected]>
--- Documentation/kernel-parameters.txt | 10 ++++- drivers/acpi/acpica/acglobal.h | 8 ---- drivers/acpi/acpica/acinterp.h | 4 -- drivers/acpi/acpica/exsystem.c | 12 +++--- drivers/acpi/acpica/exutils.c | 80 +++++------------------------------ drivers/acpi/osl.c | 18 ++++++-- include/acpi/acpixf.h | 1 - 7 files changed, 39 insertions(+), 94 deletions(-)
Documentation/kernel-parameters.txt +9 -1
@@ -306,7 +306,15 @@ bytes respectively. Such letter suffixes can also be entirely omitted. acpi_sci= [HW,ACPI] ACPI System Control Interrupt trigger mode Format: { level | edge | high | low } - acpi_serialize [HW,ACPI] force serialization of AML methods + acpi_serialize= [HW,ACPI] configure auto-serialization of AML methods + Format: { on | off } + on -- enable auto-serialization of AML methods + off -- disable auto-serialization of AML methods + AML control methods that contain the opcodes to create + named objects will be marked as "Serialized" by the + auto-serialization feature. + This feature is enabled by default. + This option allows to turn on/off the feature. acpi_skip_timer_override [HW,ACPI] Recognize and ignore IRQ0/pin2 Interrupt Override.
drivers/acpi/acpica/acglobal.h +0 -8
@@ -96,14 +96,6 @@ u8 ACPI_INIT_GLOBAL(acpi_gbl_enable_interpreter_slack, FALSE);u8 ACPI_INIT_GLOBAL (acpi_gbl_auto_serialize_methods ,TRUE );/* -* Automatically serialize ALL control methods? Default is FALSE, meaning -* to use the Serialized/not_serialized method flags on a per method basis. -* Only change this if the ASL code is poorly written and cannot handle -* reentrancy even though methods are marked "NotSerialized". -*/ -u8 ACPI_INIT_GLOBAL (acpi_gbl_all_methods_serialized ,FALSE ); - -/* * Create the predefined _OSI method in the namespace? Default is TRUE * because ACPI CA is fully compatible with other ACPI implementations. * Changing this will revert ACPI CA (and machine ASL) to pre-OSI behavior.
drivers/acpi/acpica/acinterp.h +0 -4
@@ -456,10 +456,6 @@ void acpi_ex_enter_interpreter(void);void acpi_ex_exit_interpreter (void ); -void acpi_ex_reacquire_interpreter (void ); - -void acpi_ex_relinquish_interpreter (void ); -u8 acpi_ex_truncate_for32bit_table (union acpi_operand_object *obj_desc);void acpi_ex_acquire_global_lock (u32 rule);
drivers/acpi/acpica/exsystem.c +6 -6
@@ -77,7 +77,7 @@ acpi_status acpi_ex_system_wait_semaphore(acpi_semaphore semaphore, u16 timeout)/* We must wait, so unlock the interpreter */ -acpi_ex_relinquish_interpreter (); +acpi_ex_exit_interpreter (); status =acpi_os_wait_semaphore (semaphore,1 , timeout);
@@ -87,7 +87,7 @@ acpi_status acpi_ex_system_wait_semaphore(acpi_semaphore semaphore, u16 timeout)/* Reacquire the interpreter */ -acpi_ex_reacquire_interpreter (); +acpi_ex_enter_interpreter (); }return_ACPI_STATUS (status);
@@ -123,7 +123,7 @@ acpi_status acpi_ex_system_wait_mutex(acpi_mutex mutex, u16 timeout)/* We must wait, so unlock the interpreter */ -acpi_ex_relinquish_interpreter (); +acpi_ex_exit_interpreter (); status =acpi_os_acquire_mutex (mutex, timeout);
@@ -133,7 +133,7 @@ acpi_status acpi_ex_system_wait_mutex(acpi_mutex mutex, u16 timeout)/* Reacquire the interpreter */ -acpi_ex_reacquire_interpreter (); +acpi_ex_enter_interpreter (); }return_ACPI_STATUS (status);
@@ -198,7 +198,7 @@ acpi_status acpi_ex_system_do_sleep(u64 how_long)/* Since this thread will sleep, we must release the interpreter */ -acpi_ex_relinquish_interpreter (); +acpi_ex_exit_interpreter ();/* * For compatibility with other ACPI implementations and to prevent
@@ -212,7 +212,7 @@ acpi_status acpi_ex_system_do_sleep(u64 how_long)/* And now we must get the interpreter again */ -acpi_ex_reacquire_interpreter (); +acpi_ex_enter_interpreter ();return (AE_OK ); }
drivers/acpi/acpica/exutils.c +10 -70
98 lines not on this page · raw message
drivers/acpi/osl.c +14 -4
@@ -1539,17 +1539,27 @@ static int __init osi_setup(char *str)__setup ("acpi_osi=" , osi_setup); -/* enable serialization to combat AE_ALREADY_EXISTS errors */ +/* +* Configure the auto-serialization of named objects creation methods. +* +* This feature is enabled by default. It marks the AML control methods +* that contain the opcodes to create named objects as "Serialized". +*/ static int __init acpi_serialize_setup (char *str) { - printk(KERN_INFO PREFIX "serialize enabled\n"); - acpi_gbl_all_methods_serialized = TRUE; +if (str && !strcmp ("on" , str)) { + acpi_gbl_auto_serialize_methods = TRUE; +pr_info ("ACPI: auto-serialization enabled\n" ); + }else if (str && !strcmp ("off" , str)) { + acpi_gbl_auto_serialize_methods = FALSE; +pr_info ("ACPI: auto-serialization disabled\n" ); + }return 1 ; } -__setup ("acpi_serialize" , acpi_serialize_setup); +__setup ("acpi_serialize=" , acpi_serialize_setup);/* Check of resource interference between native drivers and ACPI * OperationRegions (SystemIO and System Memory only).
include/acpi/acpixf.h +0 -1
@@ -74,7 +74,6 @@ extern u32 acpi_dbg_layer;/* ACPICA runtime options */ extern u8 acpi_gbl_auto_serialize_methods; -extern u8 acpi_gbl_all_methods_serialized;extern u8 acpi_gbl_copy_dsdt_locally;extern u8 acpi_gbl_create_osi_method;extern u8 acpi_gbl_disable_auto_repair;
Signature · 1 line
1.7.10
PATCH 13/18 ACPICA: Cleanup/improve global variable declarations.
In reply to Lv ZhengThis change cleans up the entire global variable mechaninism including the related macros. Also reduces warnings from the "sparse" utility in the Linux environment. Lv Zheng.
--- drivers/acpi/acpica/acglobal.h | 353 +++++++++++++++++++--------------------- drivers/acpi/acpica/utglobal.c | 37 ++--- 2 files changed, 189 insertions(+), 201 deletions(-)
drivers/acpi/acpica/acglobal.h +171 -182
@@ -53,11 +53,19 @@* to simplify maintenance of the code. */ #ifdef DEFINE_ACPI_GLOBALS -#define ACPI_EXTERN -#define ACPI_INIT_GLOBAL (a,b) a=b +#define ACPI_GLOBAL (type,name) \ + extern type name; \ + type name + +#define ACPI_INIT_GLOBAL (type,name,value) \ + type name=value +#else -#define ACPI_EXTERN extern -#define ACPI_INIT_GLOBAL (a,b) a +#define ACPI_GLOBAL (type,name) \ + extern type name + +#define ACPI_INIT_GLOBAL (type,name,value) \ + extern type name#endif #ifdef DEFINE_ACPI_GLOBALS
@@ -84,7 +92,7 @@* 5) Allow unresolved references (invalid target name) in package objects * 6) Enable warning messages for behavior that is not ACPI spec compliant */ -u8 ACPI_INIT_GLOBAL (acpi_gbl_enable_interpreter_slack ,FALSE ); +ACPI_INIT_GLOBAL (u8, acpi_gbl_enable_interpreter_slack, FALSE);/* * Automatically serialize all methods that create named objects? Default
@@ -93,25 +101,25 @@ u8 ACPI_INIT_GLOBAL(acpi_gbl_enable_interpreter_slack, FALSE);* that create named objects are marked Serialized in order to prevent * possible run-time problems if they are entered by more than one thread. */ -u8 ACPI_INIT_GLOBAL (acpi_gbl_auto_serialize_methods ,TRUE ); +ACPI_INIT_GLOBAL (u8, acpi_gbl_auto_serialize_methods, TRUE);/* * Create the predefined _OSI method in the namespace? Default is TRUE * because ACPI CA is fully compatible with other ACPI implementations. * Changing this will revert ACPI CA (and machine ASL) to pre-OSI behavior. */ -u8 ACPI_INIT_GLOBAL (acpi_gbl_create_osi_method ,TRUE ); +ACPI_INIT_GLOBAL (u8, acpi_gbl_create_osi_method, TRUE);/* * Optionally use default values for the ACPI register widths. Set this to * TRUE to use the defaults, if an FADT contains incorrect widths/lengths. */ -u8 ACPI_INIT_GLOBAL (acpi_gbl_use_default_register_widths ,TRUE ); +ACPI_INIT_GLOBAL (u8, acpi_gbl_use_default_register_widths, TRUE);/* * Optionally enable output from the AML Debug Object. */ -u8 ACPI_INIT_GLOBAL (acpi_gbl_enable_aml_debug_object ,FALSE ); +ACPI_INIT_GLOBAL (u8, acpi_gbl_enable_aml_debug_object, FALSE);/* * Optionally copy the entire DSDT to local memory (instead of simply
@@ -119,7 +127,7 @@ u8 ACPI_INIT_GLOBAL(acpi_gbl_enable_aml_debug_object, FALSE);* DSDT, creating the need for this option. Default is FALSE, do not copy * the DSDT. */ -u8 ACPI_INIT_GLOBAL (acpi_gbl_copy_dsdt_locally ,FALSE ); +ACPI_INIT_GLOBAL (u8, acpi_gbl_copy_dsdt_locally, FALSE);/* * Optionally ignore an XSDT if present and use the RSDT instead.
@@ -127,7 +135,7 @@ u8 ACPI_INIT_GLOBAL(acpi_gbl_copy_dsdt_locally, FALSE);* of the RSDT, the XSDT has been found to be corrupt or ill-formed on * some machines. Default behavior is to use the XSDT if present. */ -u8 ACPI_INIT_GLOBAL (acpi_gbl_do_not_use_xsdt ,FALSE ); +ACPI_INIT_GLOBAL (u8, acpi_gbl_do_not_use_xsdt, FALSE);/* * Optionally use 32-bit FADT addresses if and when there is a conflict
@@ -137,7 +145,7 @@ u8 ACPI_INIT_GLOBAL(acpi_gbl_do_not_use_xsdt, FALSE);* some machines have been found to have a corrupted non-zero 64-bit * address. Default is FALSE, do not favor the 32-bit addresses. */ -u8 ACPI_INIT_GLOBAL (acpi_gbl_use32_bit_fadt_addresses ,FALSE ); +ACPI_INIT_GLOBAL (u8, acpi_gbl_use32_bit_fadt_addresses, FALSE);/* * Optionally truncate I/O addresses to 16 bits. Provides compatibility
@@ -145,47 +153,28 @@ u8 ACPI_INIT_GLOBAL(acpi_gbl_use32_bit_fadt_addresses, FALSE);* this value is set to TRUE if any Windows OSI strings have been * requested by the BIOS. */ -u8 ACPI_INIT_GLOBAL (acpi_gbl_truncate_io_addresses ,FALSE ); +ACPI_INIT_GLOBAL (u8, acpi_gbl_truncate_io_addresses, FALSE);/* * Disable runtime checking and repair of values returned by control methods. * Use only if the repair is causing a problem on a particular machine. */ -u8 ACPI_INIT_GLOBAL (acpi_gbl_disable_auto_repair ,FALSE ); +ACPI_INIT_GLOBAL (u8, acpi_gbl_disable_auto_repair, FALSE);/* * Optionally do not load any SSDTs from the RSDT/XSDT during initialization. * This can be useful for debugging ACPI problems on some machines. */ -u8 ACPI_INIT_GLOBAL (acpi_gbl_disable_ssdt_table_load ,FALSE ); +ACPI_INIT_GLOBAL (u8, acpi_gbl_disable_ssdt_table_load, FALSE);/* * We keep track of the latest version of Windows that has been requested by * the BIOS. */ -u8 ACPI_INIT_GLOBAL(acpi_gbl_osi_data, 0); - -/* acpi_gbl_FADT is a local copy of the FADT, converted to a common format. */ - -struct acpi_table_fadt acpi_gbl_FADT; -u32 acpi_current_gpe_count; -u32 acpi_gbl_trace_flags; -acpi_name acpi_gbl_trace_method_name; -u8 acpi_gbl_system_awake_and_running; - -/* -* 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. -*/ -u8 acpi_gbl_reduced_hardware; +ACPI_INIT_GLOBAL (u8, acpi_gbl_osi_data,0 );#endif /* DEFINE_ACPI_GLOBALS */ -/* Do not disassemble buffers to resource descriptors */ - -ACPI_EXTERN u8 ACPI_INIT_GLOBAL(acpi_gbl_no_resource_disassembly, FALSE); -/***************************************************************************** * * ACPI Table globals
@@ -193,37 +182,36 @@ ACPI_EXTERN u8 ACPI_INIT_GLOBAL(acpi_gbl_no_resource_disassembly, FALSE);****************************************************************************/ /* -* acpi_gbl_root_table_list is the master list of ACPI tables that were -* found in the RSDT/XSDT. +* Master list of all ACPI tables that were found in the RSDT/XSDT. */ -ACPI_EXTERN struct acpi_table_list acpi_gbl_root_table_list; +ACPI_GLOBAL(struct acpi_table_list, acpi_gbl_root_table_list); + +/* DSDT information. Used to check for DSDT corruption */ + +ACPI_GLOBAL(struct acpi_table_header *, acpi_gbl_DSDT); +ACPI_GLOBAL(struct acpi_table_header, acpi_gbl_original_dsdt_header);#if (!ACPI_REDUCED_HARDWARE ) -ACPI_EXTERN struct acpi_table_facs *acpi_gbl_FACS; +ACPI_GLOBAL(struct acpi_table_facs *, acpi_gbl_FACS);#endif /* !ACPI_REDUCED_HARDWARE */ /* These addresses are calculated from the FADT Event Block addresses */ -ACPI_EXTERN struct acpi_generic_address acpi_gbl_xpm1a_status; -ACPI_EXTERN struct acpi_generic_address acpi_gbl_xpm1a_enable; - -ACPI_EXTERN struct acpi_generic_address acpi_gbl_xpm1b_status; -ACPI_EXTERN struct acpi_generic_address acpi_gbl_xpm1b_enable; +ACPI_GLOBAL(struct acpi_generic_address, acpi_gbl_xpm1a_status); +ACPI_GLOBAL(struct acpi_generic_address, acpi_gbl_xpm1a_enable); -/* DSDT information. Used to check for DSDT corruption */ - -ACPI_EXTERN struct acpi_table_header *acpi_gbl_DSDT; -ACPI_EXTERN struct acpi_table_header acpi_gbl_original_dsdt_header; +ACPI_GLOBAL(struct acpi_generic_address, acpi_gbl_xpm1b_status); +ACPI_GLOBAL(struct acpi_generic_address, acpi_gbl_xpm1b_enable);/* -* Handle both ACPI 1.0 and ACPI 2.0 Integer widths. The integer width is +* Handle both ACPI 1.0 and ACPI 2.0+ Integer widths. The integer width is * determined by the revision of the DSDT: If the DSDT revision is less than * 2, use only the lower 32 bits of the internal 64-bit Integer. */ -ACPI_EXTERN u8 acpi_gbl_integer_bit_width; -ACPI_EXTERN u8 acpi_gbl_integer_byte_width; -ACPI_EXTERN u8 acpi_gbl_integer_nybble_width; +ACPI_GLOBAL (u8, acpi_gbl_integer_bit_width); +ACPI_GLOBAL (u8, acpi_gbl_integer_byte_width); +ACPI_GLOBAL (u8, acpi_gbl_integer_nybble_width);/***************************************************************************** *
@@ -236,36 +224,36 @@ ACPI_EXTERN u8 acpi_gbl_integer_nybble_width;* actual OS mutex handles, indexed by the local ACPI_MUTEX_HANDLEs. * (The table maps local handles to the real OS handles) */ -ACPI_EXTERN struct acpi_mutex_info acpi_gbl_mutex_info[ACPI_NUM_MUTEX]; +ACPI_GLOBAL(struct acpi_mutex_info, acpi_gbl_mutex_info[ACPI_NUM_MUTEX]);/* * Global lock mutex is an actual AML mutex object * Global lock semaphore works in conjunction with the actual global lock * Global lock spinlock is used for "pending" handshake */ -ACPI_EXTERN union acpi_operand_object *acpi_gbl_global_lock_mutex; -ACPI_EXTERN acpi_semaphore acpi_gbl_global_lock_semaphore; -ACPI_EXTERN acpi_spinlock acpi_gbl_global_lock_pending_lock; -ACPI_EXTERN u16 acpi_gbl_global_lock_handle; -ACPI_EXTERN u8 acpi_gbl_global_lock_acquired; -ACPI_EXTERN u8 acpi_gbl_global_lock_present; -ACPI_EXTERN u8 acpi_gbl_global_lock_pending; +ACPI_GLOBAL(union acpi_operand_object *, acpi_gbl_global_lock_mutex); +ACPI_GLOBAL (acpi_semaphore, acpi_gbl_global_lock_semaphore); +ACPI_GLOBAL (acpi_spinlock, acpi_gbl_global_lock_pending_lock); +ACPI_GLOBAL (u16, acpi_gbl_global_lock_handle); +ACPI_GLOBAL (u8, acpi_gbl_global_lock_acquired); +ACPI_GLOBAL (u8, acpi_gbl_global_lock_present); +ACPI_GLOBAL (u8, acpi_gbl_global_lock_pending);/* * Spinlocks are used for interfaces that can be possibly called at * interrupt level */ -ACPI_EXTERN acpi_spinlock acpi_gbl_gpe_lock; /* For GPE data structs and registers */ -ACPI_EXTERN acpi_spinlock acpi_gbl_hardware_lock; /* For ACPI H/W except GPE registers */ -ACPI_EXTERN acpi_spinlock acpi_gbl_reference_count_lock; +ACPI_GLOBAL (acpi_spinlock, acpi_gbl_gpe_lock);/* For GPE data structs and registers */ +ACPI_GLOBAL (acpi_spinlock, acpi_gbl_hardware_lock);/* For ACPI H/W except GPE registers */ +ACPI_GLOBAL (acpi_spinlock, acpi_gbl_reference_count_lock);/* Mutex for _OSI support */ -ACPI_EXTERN acpi_mutex acpi_gbl_osi_mutex; +ACPI_GLOBAL (acpi_mutex, acpi_gbl_osi_mutex);/* Reader/Writer lock is used for namespace walk and dynamic table unload */ -ACPI_EXTERN struct acpi_rw_lock acpi_gbl_namespace_rw_lock; +ACPI_GLOBAL(struct acpi_rw_lock, acpi_gbl_namespace_rw_lock);/***************************************************************************** *
@@ -275,70 +263,69 @@ ACPI_EXTERN struct acpi_rw_lock acpi_gbl_namespace_rw_lock;/* Object caches */ -ACPI_EXTERN acpi_cache_t *acpi_gbl_namespace_cache; -ACPI_EXTERN acpi_cache_t *acpi_gbl_state_cache; -ACPI_EXTERN acpi_cache_t *acpi_gbl_ps_node_cache; -ACPI_EXTERN acpi_cache_t *acpi_gbl_ps_node_ext_cache; -ACPI_EXTERN acpi_cache_t *acpi_gbl_operand_cache; +ACPI_GLOBAL(acpi_cache_t *, acpi_gbl_namespace_cache); +ACPI_GLOBAL(acpi_cache_t *, acpi_gbl_state_cache); +ACPI_GLOBAL(acpi_cache_t *, acpi_gbl_ps_node_cache); +ACPI_GLOBAL(acpi_cache_t *, acpi_gbl_ps_node_ext_cache); +ACPI_GLOBAL(acpi_cache_t *, acpi_gbl_operand_cache); + +/* System */ + +ACPI_INIT_GLOBAL (u32, acpi_gbl_startup_flags,0 ); +ACPI_INIT_GLOBAL (u8, acpi_gbl_shutdown, TRUE);/* Global handlers */ -ACPI_EXTERN struct acpi_global_notify_handler acpi_gbl_global_notify[2]; -ACPI_EXTERN acpi_exception_handler acpi_gbl_exception_handler; -ACPI_EXTERN acpi_init_handler acpi_gbl_init_handler; -ACPI_EXTERN acpi_table_handler acpi_gbl_table_handler; -ACPI_EXTERN void *acpi_gbl_table_handler_context; -ACPI_EXTERN struct acpi_walk_state *acpi_gbl_breakpoint_walk; -ACPI_EXTERN acpi_interface_handler acpi_gbl_interface_handler; -ACPI_EXTERN struct acpi_sci_handler_info *acpi_gbl_sci_handler_list; +ACPI_GLOBAL(struct acpi_global_notify_handler, acpi_gbl_global_notify[2]); +ACPI_GLOBAL (acpi_exception_handler, acpi_gbl_exception_handler); +ACPI_GLOBAL (acpi_init_handler, acpi_gbl_init_handler); +ACPI_GLOBAL (acpi_table_handler, acpi_gbl_table_handler); +ACPI_GLOBAL(void *, acpi_gbl_table_handler_context); +ACPI_GLOBAL(struct acpi_walk_state *, acpi_gbl_breakpoint_walk); +ACPI_GLOBAL (acpi_interface_handler, acpi_gbl_interface_handler); +ACPI_GLOBAL(struct acpi_sci_handler_info *, acpi_gbl_sci_handler_list);/* Owner ID support */ -ACPI_EXTERN u32 acpi_gbl_owner_id_mask[ACPI_NUM_OWNERID_MASKS]; -ACPI_EXTERN u8 acpi_gbl_last_owner_id_index; -ACPI_EXTERN u8 acpi_gbl_next_owner_id_offset; +ACPI_GLOBAL (u32, acpi_gbl_owner_id_mask[ACPI_NUM_OWNERID_MASKS ]); +ACPI_GLOBAL (u8, acpi_gbl_last_owner_id_index); +ACPI_GLOBAL (u8, acpi_gbl_next_owner_id_offset);/* Initialization sequencing */ -ACPI_EXTERN u8 acpi_gbl_reg_methods_executed; +ACPI_GLOBAL (u8, acpi_gbl_reg_methods_executed);/* Misc */ -ACPI_EXTERN u32 acpi_gbl_original_mode; -ACPI_EXTERN u32 acpi_gbl_rsdp_original_location; -ACPI_EXTERN u32 acpi_gbl_ns_lookup_count; -ACPI_EXTERN u32 acpi_gbl_ps_find_count; -ACPI_EXTERN u16 acpi_gbl_pm1_enable_register_save; -ACPI_EXTERN u8 acpi_gbl_debugger_configuration; -ACPI_EXTERN u8 acpi_gbl_step_to_next_call; -ACPI_EXTERN u8 acpi_gbl_acpi_hardware_present; -ACPI_EXTERN u8 acpi_gbl_events_initialized; -ACPI_EXTERN struct acpi_interface_info *acpi_gbl_supported_interfaces; -ACPI_EXTERN struct acpi_address_range - *acpi_gbl_address_range_list[ACPI_ADDRESS_RANGE_MAX ]; - -#ifndef DEFINE_ACPI_GLOBALS - -/* Other miscellaneous */ - -extern u8 acpi_gbl_shutdown; -extern u32 acpi_gbl_startup_flags; +ACPI_GLOBAL (u32, acpi_gbl_original_mode); +ACPI_GLOBAL (u32, acpi_gbl_rsdp_original_location); +ACPI_GLOBAL (u32, acpi_gbl_ns_lookup_count); +ACPI_GLOBAL (u32, acpi_gbl_ps_find_count); +ACPI_GLOBAL (u16, acpi_gbl_pm1_enable_register_save); +ACPI_GLOBAL (u8, acpi_gbl_debugger_configuration); +ACPI_GLOBAL (u8, acpi_gbl_step_to_next_call); +ACPI_GLOBAL (u8, acpi_gbl_acpi_hardware_present); +ACPI_GLOBAL (u8, acpi_gbl_events_initialized); +ACPI_GLOBAL(struct acpi_interface_info *, acpi_gbl_supported_interfaces); +ACPI_GLOBAL(struct acpi_address_range *, + acpi_gbl_address_range_list[ACPI_ADDRESS_RANGE_MAX ]); + +/* Other miscellaneous, declared and initialized in utglobal */ +extern const char *acpi_gbl_sleep_state_names[ACPI_S_STATE_COUNT ];extern const char *acpi_gbl_lowest_dstate_names[ACPI_NUM_sx_w_METHODS];extern const char *acpi_gbl_highest_dstate_names[ACPI_NUM_sx_d_METHODS]; -extern const struct acpi_opcode_info acpi_gbl_aml_op_info[AML_NUM_OPCODES ];extern const char *acpi_gbl_region_types[ACPI_NUM_PREDEFINED_REGIONS ]; - -#endif +extern const struct acpi_opcode_info acpi_gbl_aml_op_info[AML_NUM_OPCODES ];#ifdef ACPI_DBG_TRACK_ALLOCATIONS -/* Lists for tracking memory allocations */ +/* Lists for tracking memory allocations (debug only) */ -ACPI_EXTERN struct acpi_memory_list *acpi_gbl_global_list; -ACPI_EXTERN struct acpi_memory_list *acpi_gbl_ns_node_list; -ACPI_EXTERN u8 acpi_gbl_display_final_mem_stats; -ACPI_EXTERN u8 acpi_gbl_disable_mem_tracking; +ACPI_GLOBAL(struct acpi_memory_list *, acpi_gbl_global_list); +ACPI_GLOBAL(struct acpi_memory_list *, acpi_gbl_ns_node_list); +ACPI_GLOBAL (u8, acpi_gbl_display_final_mem_stats); +ACPI_GLOBAL (u8, acpi_gbl_disable_mem_tracking);#endif /*****************************************************************************
@@ -353,22 +340,23 @@ ACPI_EXTERN u8 acpi_gbl_disable_mem_tracking;#define NUM_PREDEFINED_NAMES 9#endif -ACPI_EXTERN struct acpi_namespace_node acpi_gbl_root_node_struct; -ACPI_EXTERN struct acpi_namespace_node *acpi_gbl_root_node; -ACPI_EXTERN struct acpi_namespace_node *acpi_gbl_fadt_gpe_device; -ACPI_EXTERN union acpi_operand_object *acpi_gbl_module_code_list; +ACPI_GLOBAL(struct acpi_namespace_node, acpi_gbl_root_node_struct); +ACPI_GLOBAL(struct acpi_namespace_node *, acpi_gbl_root_node); +ACPI_GLOBAL(struct acpi_namespace_node *, acpi_gbl_fadt_gpe_device); +ACPI_GLOBAL(union acpi_operand_object *, acpi_gbl_module_code_list);extern const u8 acpi_gbl_ns_properties[ACPI_NUM_NS_TYPES ];extern const struct acpi_predefined_names acpi_gbl_pre_defined_names[NUM_PREDEFINED_NAMES ];#ifdef ACPI_DEBUG_OUTPUT -ACPI_EXTERN u32 acpi_gbl_current_node_count; -ACPI_EXTERN u32 acpi_gbl_current_node_size; -ACPI_EXTERN u32 acpi_gbl_max_concurrent_node_count; -ACPI_EXTERN acpi_size *acpi_gbl_entry_stack_pointer; -ACPI_EXTERN acpi_size *acpi_gbl_lowest_stack_pointer; -ACPI_EXTERN u32 acpi_gbl_deepest_nesting; +ACPI_GLOBAL (u32, acpi_gbl_current_node_count); +ACPI_GLOBAL (u32, acpi_gbl_current_node_size); +ACPI_GLOBAL (u32, acpi_gbl_max_concurrent_node_count); +ACPI_GLOBAL(acpi_size *, acpi_gbl_entry_stack_pointer); +ACPI_GLOBAL(acpi_size *, acpi_gbl_lowest_stack_pointer); +ACPI_GLOBAL (u32, acpi_gbl_deepest_nesting); +ACPI_INIT_GLOBAL (u32, acpi_gbl_nesting_level,0 );#endif /*****************************************************************************
@@ -377,11 +365,11 @@ ACPI_EXTERN u32 acpi_gbl_deepest_nesting;* ****************************************************************************/ -ACPI_EXTERN struct acpi_thread_state *acpi_gbl_current_walk_list; +ACPI_GLOBAL(struct acpi_thread_state *, acpi_gbl_current_walk_list);/* Control method single step flag */ -ACPI_EXTERN u8 acpi_gbl_cm_single_step; +ACPI_GLOBAL (u8, acpi_gbl_cm_single_step);/***************************************************************************** *
@@ -391,8 +379,9 @@ ACPI_EXTERN u8 acpi_gbl_cm_single_step;extern struct acpi_bit_register_info acpi_gbl_bit_register_info[ACPI_NUM_BITREG ]; -ACPI_EXTERN u8 acpi_gbl_sleep_type_a; -ACPI_EXTERN u8 acpi_gbl_sleep_type_b; + +ACPI_GLOBAL (u8, acpi_gbl_sleep_type_a); +ACPI_GLOBAL (u8, acpi_gbl_sleep_type_b);/***************************************************************************** *
@@ -402,14 +391,15 @@ ACPI_EXTERN u8 acpi_gbl_sleep_type_b;#if (!ACPI_REDUCED_HARDWARE ) -ACPI_EXTERN u8 acpi_gbl_all_gpes_initialized; -ACPI_EXTERN struct acpi_gpe_xrupt_info *acpi_gbl_gpe_xrupt_list_head; -ACPI_EXTERN struct acpi_gpe_block_info - *acpi_gbl_gpe_fadt_blocks[ACPI_MAX_GPE_BLOCKS ]; -ACPI_EXTERN acpi_gbl_event_handler acpi_gbl_global_event_handler; -ACPI_EXTERN void *acpi_gbl_global_event_handler_context; -ACPI_EXTERN struct acpi_fixed_event_handler - acpi_gbl_fixed_event_handlers[ACPI_NUM_FIXED_EVENTS ]; +ACPI_GLOBAL (u8, acpi_gbl_all_gpes_initialized); +ACPI_GLOBAL(struct acpi_gpe_xrupt_info *, acpi_gbl_gpe_xrupt_list_head); +ACPI_GLOBAL(struct acpi_gpe_block_info *, + acpi_gbl_gpe_fadt_blocks[ACPI_MAX_GPE_BLOCKS ]); +ACPI_GLOBAL (acpi_gbl_event_handler, acpi_gbl_global_event_handler); +ACPI_GLOBAL(void *, acpi_gbl_global_event_handler_context); +ACPI_GLOBAL(struct acpi_fixed_event_handler, + acpi_gbl_fixed_event_handlers[ACPI_NUM_FIXED_EVENTS ]); +extern struct acpi_fixed_event_info acpi_gbl_fixed_event_info[ACPI_NUM_FIXED_EVENTS ];
@@ -421,23 +411,19 @@ extern struct acpi_fixed_event_info* ****************************************************************************/ -/* Procedure nesting level for debug output */ - -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]; +ACPI_GLOBAL (u32, acpi_method_count); +ACPI_GLOBAL (u32, acpi_gpe_count); +ACPI_GLOBAL (u32, acpi_sci_count); +ACPI_GLOBAL (u32, acpi_fixed_event_count[ACPI_NUM_FIXED_EVENTS ]);/* Support for dynamic control method tracing mechanism */ -ACPI_EXTERN u32 acpi_gbl_original_dbg_level; -ACPI_EXTERN u32 acpi_gbl_original_dbg_layer; -ACPI_EXTERN u32 acpi_gbl_trace_dbg_level; -ACPI_EXTERN u32 acpi_gbl_trace_dbg_layer; +ACPI_GLOBAL (u32, acpi_gbl_original_dbg_level); +ACPI_GLOBAL (u32, acpi_gbl_original_dbg_layer); +ACPI_GLOBAL (u32, acpi_gbl_trace_dbg_level); +ACPI_GLOBAL (u32, acpi_gbl_trace_dbg_layer);/***************************************************************************** *
@@ -445,61 +431,64 @@ ACPI_EXTERN u32 acpi_gbl_trace_dbg_layer;* ****************************************************************************/ -ACPI_EXTERN u8 acpi_gbl_db_output_flags; +ACPI_GLOBAL (u8, acpi_gbl_db_output_flags);#ifdef ACPI_DISASSEMBLER -ACPI_EXTERN u8 ACPI_INIT_GLOBAL(acpi_gbl_ignore_noop_operator, FALSE); +/* Do not disassemble buffers to resource descriptors */ + +ACPI_INIT_GLOBAL (u8, acpi_gbl_no_resource_disassembly, FALSE); +ACPI_INIT_GLOBAL (u8, acpi_gbl_ignore_noop_operator, FALSE); -ACPI_EXTERN u8 acpi_gbl_db_opt_disasm; -ACPI_EXTERN u8 acpi_gbl_db_opt_verbose; -ACPI_EXTERN u8 acpi_gbl_num_external_methods; -ACPI_EXTERN u32 acpi_gbl_resolved_external_methods; -ACPI_EXTERN struct acpi_external_list *acpi_gbl_external_list; -ACPI_EXTERN struct acpi_external_file *acpi_gbl_external_file_list; +ACPI_GLOBAL (u8, acpi_gbl_db_opt_disasm); +ACPI_GLOBAL (u8, acpi_gbl_db_opt_verbose); +ACPI_GLOBAL (u8, acpi_gbl_num_external_methods); +ACPI_GLOBAL (u32, acpi_gbl_resolved_external_methods); +ACPI_GLOBAL(struct acpi_external_list *, acpi_gbl_external_list); +ACPI_GLOBAL(struct acpi_external_file *, acpi_gbl_external_file_list);#endif #ifdef ACPI_DEBUGGER -extern u8 acpi_gbl_method_executing; -extern u8 acpi_gbl_abort_method; -extern u8 acpi_gbl_db_terminate_threads; +ACPI_INIT_GLOBAL (u8, acpi_gbl_db_terminate_threads, FALSE); +ACPI_INIT_GLOBAL (u8, acpi_gbl_abort_method, FALSE); +ACPI_INIT_GLOBAL (u8, acpi_gbl_method_executing, FALSE); -ACPI_EXTERN u8 acpi_gbl_db_opt_tables; -ACPI_EXTERN u8 acpi_gbl_db_opt_stats; -ACPI_EXTERN u8 acpi_gbl_db_opt_ini_methods; -ACPI_EXTERN u8 acpi_gbl_db_opt_no_region_support; -ACPI_EXTERN u8 acpi_gbl_db_output_to_file; -ACPI_EXTERN char *acpi_gbl_db_buffer; -ACPI_EXTERN char *acpi_gbl_db_filename; -ACPI_EXTERN u32 acpi_gbl_db_debug_level; -ACPI_EXTERN u32 acpi_gbl_db_console_debug_level; -ACPI_EXTERN struct acpi_namespace_node *acpi_gbl_db_scope_node; +ACPI_GLOBAL (u8, acpi_gbl_db_opt_tables); +ACPI_GLOBAL (u8, acpi_gbl_db_opt_stats); +ACPI_GLOBAL (u8, acpi_gbl_db_opt_ini_methods); +ACPI_GLOBAL (u8, acpi_gbl_db_opt_no_region_support); +ACPI_GLOBAL (u8, acpi_gbl_db_output_to_file); +ACPI_GLOBAL(char *, acpi_gbl_db_buffer); +ACPI_GLOBAL(char *, acpi_gbl_db_filename); +ACPI_GLOBAL (u32, acpi_gbl_db_debug_level); +ACPI_GLOBAL (u32, acpi_gbl_db_console_debug_level); +ACPI_GLOBAL(struct acpi_namespace_node *, acpi_gbl_db_scope_node); -ACPI_EXTERN char *acpi_gbl_db_args[ACPI_DEBUGGER_MAX_ARGS]; -ACPI_EXTERN acpi_object_type acpi_gbl_db_arg_types[ACPI_DEBUGGER_MAX_ARGS]; +ACPI_GLOBAL(char *, acpi_gbl_db_args[ACPI_DEBUGGER_MAX_ARGS]); +ACPI_GLOBAL (acpi_object_type, acpi_gbl_db_arg_types[ACPI_DEBUGGER_MAX_ARGS ]);/* These buffers should all be the same size */ -ACPI_EXTERN char acpi_gbl_db_line_buf[ACPI_DB_LINE_BUFFER_SIZE]; -ACPI_EXTERN char acpi_gbl_db_parsed_buf[ACPI_DB_LINE_BUFFER_SIZE]; -ACPI_EXTERN char acpi_gbl_db_scope_buf[ACPI_DB_LINE_BUFFER_SIZE]; -ACPI_EXTERN char acpi_gbl_db_debug_filename[ACPI_DB_LINE_BUFFER_SIZE]; +ACPI_GLOBAL (char, acpi_gbl_db_line_buf[ACPI_DB_LINE_BUFFER_SIZE ]); +ACPI_GLOBAL (char, acpi_gbl_db_parsed_buf[ACPI_DB_LINE_BUFFER_SIZE ]); +ACPI_GLOBAL (char, acpi_gbl_db_scope_buf[ACPI_DB_LINE_BUFFER_SIZE ]); +ACPI_GLOBAL (char, acpi_gbl_db_debug_filename[ACPI_DB_LINE_BUFFER_SIZE ]);/* * Statistic globals */ -ACPI_EXTERN u16 acpi_gbl_obj_type_count[ACPI_TYPE_NS_NODE_MAX + 1]; -ACPI_EXTERN u16 acpi_gbl_node_type_count[ACPI_TYPE_NS_NODE_MAX + 1]; -ACPI_EXTERN u16 acpi_gbl_obj_type_count_misc; -ACPI_EXTERN u16 acpi_gbl_node_type_count_misc; -ACPI_EXTERN u32 acpi_gbl_num_nodes; -ACPI_EXTERN u32 acpi_gbl_num_objects; - -ACPI_EXTERN u32 acpi_gbl_size_of_parse_tree; -ACPI_EXTERN u32 acpi_gbl_size_of_method_trees; -ACPI_EXTERN u32 acpi_gbl_size_of_node_entries; -ACPI_EXTERN u32 acpi_gbl_size_of_acpi_objects; +ACPI_GLOBAL (u16, acpi_gbl_obj_type_count[ACPI_TYPE_NS_NODE_MAX +1 ]); +ACPI_GLOBAL (u16, acpi_gbl_node_type_count[ACPI_TYPE_NS_NODE_MAX +1 ]); +ACPI_GLOBAL (u16, acpi_gbl_obj_type_count_misc); +ACPI_GLOBAL (u16, acpi_gbl_node_type_count_misc); +ACPI_GLOBAL (u32, acpi_gbl_num_nodes); +ACPI_GLOBAL (u32, acpi_gbl_num_objects); + +ACPI_GLOBAL (u32, acpi_gbl_size_of_parse_tree); +ACPI_GLOBAL (u32, acpi_gbl_size_of_method_trees); +ACPI_GLOBAL (u32, acpi_gbl_size_of_node_entries); +ACPI_GLOBAL (u32, acpi_gbl_size_of_acpi_objects);#endif /* ACPI_DEBUGGER */
@@ -511,7 +500,7 @@ ACPI_EXTERN u32 acpi_gbl_size_of_acpi_objects;#ifdef ACPI_APPLICATION -ACPI_FILE ACPI_INIT_GLOBAL (acpi_gbl_debug_file ,NULL ); +ACPI_INIT_GLOBAL (ACPI_FILE , acpi_gbl_debug_file,NULL );#endif /* ACPI_APPLICATION */
drivers/acpi/acpica/utglobal.c +18 -19
@@ -55,31 +55,27 @@ ACPI_MODULE_NAME("utglobal")* Static global variable initialization. * ******************************************************************************/ -/* -* We want the debug switches statically initialized so they -* are already set when the debugger is entered. -*/ -/* Debug switch - level and trace mask */ +/* Debug output control masks */ u32 acpi_dbg_level =ACPI_DEBUG_DEFAULT ; -/* Debug switch - layer (component) mask */ -u32 acpi_dbg_layer =0 ; -u32 acpi_gbl_nesting_level =0 ; -/* Debugger globals */ +/* acpi_gbl_FADT is a local copy of the FADT, converted to a common format. */ -u8 acpi_gbl_db_terminate_threads = FALSE; -u8 acpi_gbl_abort_method = FALSE; -u8 acpi_gbl_method_executing = FALSE; +struct acpi_table_fadt acpi_gbl_FADT; +u32 acpi_gbl_trace_flags; +acpi_name acpi_gbl_trace_method_name; +u8 acpi_gbl_system_awake_and_running; +u32 acpi_current_gpe_count; -/* System flags */ - -u32 acpi_gbl_startup_flags =0 ; - -/* System starts uninitialized */ +/* +* 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. +*/ +u8 acpi_gbl_reduced_hardware; -u8 acpi_gbl_shutdown = TRUE; +/* Various state name strings */ const char *acpi_gbl_sleep_state_names[ACPI_S_STATE_COUNT ] = {"\\_S0_" ,
@@ -335,7 +331,6 @@ acpi_status acpi_ut_init_globals(void) acpi_gbl_DSDT =NULL ; acpi_gbl_cm_single_step = FALSE; - acpi_gbl_db_terminate_threads = FALSE; acpi_gbl_shutdown = FALSE; acpi_gbl_ns_lookup_count =0 ; acpi_gbl_ps_find_count =0 ;
@@ -382,6 +377,10 @@ acpi_status acpi_ut_init_globals(void) acpi_gbl_disable_mem_tracking = FALSE;#endif +#ifdef ACPI_DEBUGGER + acpi_gbl_db_terminate_threads = FALSE; +#endif +return_ACPI_STATUS (AE_OK ); }
Signature · 1 line
1.7.10
PATCH 14/18 ACPICA: Update for _PRP predefined name.
In reply to Lv ZhengFrom: Bob Moore <[email protected]>
Allow objects of type "reference" in the second subpackage element.
--- drivers/acpi/acpica/acpredef.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/acpi/acpica/acpredef.h +1 -1
@@ -704,7 +704,7 @@ const union acpi_predefined_info acpi_gbl_predefined_methods[] = { METHOD_RETURNS(ACPI_RTYPE_PACKAGE)}}, /* Variable-length (Pkgs) each: 1 Str, 1 Int/Str/Pkg */PACKAGE_INFO (ACPI_PTYPE2 ,ACPI_RTYPE_STRING ,1 ,ACPI_RTYPE_INTEGER |ACPI_RTYPE_STRING | -ACPI_RTYPE_PACKAGE ,1 ,0 ), +ACPI_RTYPE_PACKAGE |ACPI_RTYPE_REFERENCE ,1 ,0 ), {{"_PRS", METHOD_0ARGS, METHOD_RETURNS(ACPI_RTYPE_BUFFER)}},
Signature · 1 line
1.7.10
PATCH 15/18 ACPICA: Add text: ACPICA policy for new _OSI strings. No functional change.
In reply to Lv ZhengFrom: Bob Moore <[email protected]>
Adds further information about why new _OSI strings should be adopted by all hosts as soon as possible.
--- drivers/acpi/acpica/utosi.c | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+)
drivers/acpi/acpica/utosi.c +25 -0
@@ -47,6 +47,31 @@#define _COMPONENT ACPI_UTILITIESACPI_MODULE_NAME ("utosi" ) +/****************************************************************************** +* +* ACPICA policy for new _OSI strings: +* +* It is the stated policy of ACPICA that new _OSI strings will be integrated +* into this module as soon as possible after they are defined. It is strongly +* recommended that all ACPICA hosts mirror this policy and integrate any +* changes to this module as soon as possible. There are several historical +* reasons behind this policy: +* +* 1) New BIOSs tend to test only the case where the host responds TRUE to +* the latest version of Windows, which would respond to the latest/newest +* _OSI string. Not responding TRUE to the latest version of Windows will +* risk executing untested code paths throughout the DSDT and SSDTs. +* +* 2) If a new _OSI string is recognized only after a significant delay, this +* has the potential to cause problems on existing working machines because +* of the possibility that a new and different path through the ASL code +* will be executed. +* +* 3) New _OSI strings are tending to come out about once per year. A delay +* in recognizing a new string for a significant amount of time risks the +* release of another string which only compounds the initial problem. +* +*****************************************************************************/ /* * Strings supported by the _OSI predefined control method (which is * implemented internally within this module.)
Signature · 1 line
1.7.10
PATCH 16/18 ACPICA: Debugger: Add missing objects; Traverse linked lists
In reply to Lv ZhengFrom: Bob Moore <[email protected]>
This change adds support for two missing objects, the "extra" and "data" secondary objects, as well as adding support to traverse and display linked lists related to ACPICA objects.
--- drivers/acpi/acpica/acinterp.h | 4 + drivers/acpi/acpica/exdump.c | 229 ++++++++++++++++++++++++++++++++++------ 2 files changed, 199 insertions(+), 34 deletions(-)
drivers/acpi/acpica/acinterp.h +4 -0
@@ -89,6 +89,10 @@ typedef const struct acpi_exdump_info {#define ACPI_EXD_PACKAGE 11#define ACPI_EXD_FIELD 12#define ACPI_EXD_REFERENCE 13 +#define ACPI_EXD_LIST 14/* Operand object list */ +#define ACPI_EXD_HDLR_LIST 15/* Address Handler list */ +#define ACPI_EXD_RGN_LIST 16/* Region list */ +#define ACPI_EXD_NODE 17/* Namespace Node */ /* restore default alignment */
drivers/acpi/acpica/exdump.c +195 -34
360 lines not on this page · raw message
Signature · 1 line
1.7.10
PATCH 17/18 ACPICA: Prevent infinite loops when traversing corrupted lists.
In reply to Lv ZhengFrom: Bob Moore <[email protected]>
This change hardens the ACPICA code to detect circular linked object lists and prevent an infinite loop if such corruption exists.
--- drivers/acpi/acpica/evregion.c | 11 +++++++++++ drivers/acpi/acpica/nsobject.c | 10 ++++++++-- drivers/acpi/acpica/utdelete.c | 15 +++++++++++++-- 3 files changed, 32 insertions(+), 4 deletions(-)
drivers/acpi/acpica/evregion.c +11 -0
@@ -314,6 +314,7 @@ acpi_ev_detach_region(union acpi_operand_object *region_obj, {union acpi_operand_object *handler_obj;union acpi_operand_object *obj_desc; +union acpi_operand_object *start_desc;union acpi_operand_object **last_obj_ptr;acpi_adr_space_setup region_setup;void **region_context;
@@ -341,6 +342,7 @@ acpi_ev_detach_region(union acpi_operand_object *region_obj,/* Find this region in the handler's list */ obj_desc = handler_obj->address_space.region_list; + start_desc = obj_desc; last_obj_ptr = &handler_obj->address_space.region_list;while (obj_desc) {
@@ -438,6 +440,15 @@ acpi_ev_detach_region(union acpi_operand_object *region_obj, last_obj_ptr = &obj_desc->region.next; obj_desc = obj_desc->region.next; + +/* Prevent infinite loop if list is corrupted */ + +if (obj_desc == start_desc) { +ACPI_ERROR ((AE_INFO , +"Circular handler list in region object %p" , + region_obj)); + return_VOID; + } }/* If we get here, the region was not in the handler's region list */
drivers/acpi/acpica/nsobject.c +8 -2
@@ -222,13 +222,19 @@ void acpi_ns_detach_object(struct acpi_namespace_node *node) } } -/* Clear the entry in all cases */ +/* Clear the Node entry in all cases */ node->object =NULL ;if (ACPI_GET_DESCRIPTOR_TYPE (obj_desc) ==ACPI_DESC_TYPE_OPERAND ) { + +/* Unlink object from front of possible object list */ + node->object = obj_desc->common.next_object; + +/* Handle possible 2-descriptor object */ +if (node->object && - ((node->object)->common.type !=ACPI_TYPE_LOCAL_DATA )) { + (node->object->common.type !=ACPI_TYPE_LOCAL_DATA )) { node->object = node->object->common.next_object; } }
drivers/acpi/acpica/utdelete.c +13 -2
@@ -75,6 +75,7 @@ static void acpi_ut_delete_internal_obj(union acpi_operand_object *object)union acpi_operand_object *handler_desc;union acpi_operand_object *second_desc;union acpi_operand_object *next_desc; +union acpi_operand_object *start_desc;union acpi_operand_object **last_obj_ptr;ACPI_FUNCTION_TRACE_PTR (ut_delete_internal_obj, object);
@@ -235,10 +236,11 @@ static void acpi_ut_delete_internal_obj(union acpi_operand_object *object)if (handler_desc) { next_desc = handler_desc->address_space.region_list; + start_desc = next_desc; last_obj_ptr = &handler_desc->address_space.region_list; -/* Remove the region object from the handler's list */ +/* Remove the region object from the handler list */ while (next_desc) {if (next_desc == object) {
@@ -247,10 +249,19 @@ static void acpi_ut_delete_internal_obj(union acpi_operand_object *object)break ; } -/* Walk the linked list of handler */ +/* Walk the linked list of handlers */ last_obj_ptr = &next_desc->region.next; next_desc = next_desc->region.next; + +/* Prevent infinite loop if list is corrupted */ + +if (next_desc == start_desc) { +ACPI_ERROR ((AE_INFO , +"Circular region list in address handler object %p" , + handler_desc)); + return_VOID; + } } if (handler_desc->address_space.handler_flags &
Signature · 1 line
1.7.10
PATCH 18/18 ACPICA: Update version to 20140214.
In reply to Lv ZhengFrom: Bob Moore <[email protected]>
Version 20140214.
--- include/acpi/acpixf.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
include/acpi/acpixf.h +1 -1
@@ -46,7 +46,7 @@/* Current ACPICA subsystem version in YYYYMMDD format */ -#define ACPI_CA_VERSION 0x20140114 +#define ACPI_CA_VERSION 0x20140214#include <acpi/acconfig.h> #include <acpi/actypes.h>
Signature · 1 line
1.7.10
PATCH 1/1 ACPICA: Revert "Headers: Deploy #pragma pack (push) and (pop)."
In reply to Lv ZhengFrom: Robert Moore <[email protected]>
This reverts commit aae576e5faefa8ba70647efa320d4747b6375f1e. Push and Pop are not portable "enough", and caused problems for some ACPICA customers.
Conflicts:
source/include/aclocal.h
source/include/acutils.h
--- drivers/acpi/acpica/acdebug.h | 4 ---- drivers/acpi/acpica/acdispat.h | 4 ---- drivers/acpi/acpica/acevents.h | 3 --- drivers/acpi/acpica/acglobal.h | 4 ---- drivers/acpi/acpica/achware.h | 4 ---- drivers/acpi/acpica/acinterp.h | 4 ---- drivers/acpi/acpica/aclocal.h | 4 ---- drivers/acpi/acpica/acmacros.h | 4 ---- drivers/acpi/acpica/acnamesp.h | 4 ---- drivers/acpi/acpica/acobject.h | 4 +--- drivers/acpi/acpica/acparser.h | 4 ---- drivers/acpi/acpica/acpredef.h | 4 ---- drivers/acpi/acpica/acresrc.h | 4 ---- drivers/acpi/acpica/acstruct.h | 4 ---- drivers/acpi/acpica/actables.h | 4 ---- drivers/acpi/acpica/acutils.h | 4 ---- drivers/acpi/acpica/amlcode.h | 4 ---- drivers/acpi/acpica/amlresrc.h | 4 ---- include/acpi/acbuffer.h | 4 ---- include/acpi/acconfig.h | 4 ---- include/acpi/acexcep.h | 4 ---- include/acpi/acoutput.h | 4 ---- include/acpi/acpiosxf.h | 4 ---- include/acpi/acpixf.h | 4 ---- include/acpi/acrestyp.h | 4 ---- include/acpi/actbl.h | 4 ---- include/acpi/actbl1.h | 6 +++--- include/acpi/actbl2.h | 6 +++--- include/acpi/actbl3.h | 6 +++--- include/acpi/actypes.h | 4 ---- 30 files changed, 10 insertions(+), 115 deletions(-)
drivers/acpi/acpica/acdebug.h +0 -4
@@ -44,8 +44,6 @@#ifndef __ACDEBUG_H__#define __ACDEBUG_H__ -#pragma pack(push)/* Set default struct packing */ -#define ACPI_DEBUG_BUFFER_SIZE 0x4000/* 16K buffer for return objects */ struct acpi_db_command_info {
@@ -284,6 +282,4 @@ struct acpi_namespace_node *acpi_db_local_ns_lookup(char *name);void acpi_db_uint32_to_hex_string (u32 value,char *buffer); -#pragma pack(pop)/* Restore original struct packing */ -#endif /* __ACDEBUG_H__ */
drivers/acpi/acpica/acdispat.h +0 -4
@@ -44,8 +44,6 @@#ifndef _ACDISPAT_H_#define _ACDISPAT_H_ -#pragma pack(push)/* Set default struct packing */ -#define NAMEOF_LOCAL_NTE "__L0"#define NAMEOF_ARG_NTE "__A0"
@@ -356,6 +354,4 @@ acpi_status acpi_ds_result_push(union acpi_operand_object *object, struct acpi_walk_state *walk_state); -#pragma pack(pop)/* Restore original struct packing */ -#endif /* _ACDISPAT_H_ */
drivers/acpi/acpica/acevents.h +0 -3
@@ -44,8 +44,6 @@#ifndef __ACEVENTS_H__#define __ACEVENTS_H__ -#pragma pack(push)/* Set default struct packing */ -/* * evevent */
@@ -253,5 +251,4 @@ u32 acpi_ev_install_sci_handler(void);acpi_status acpi_ev_remove_all_sci_handlers (void ); ACPI_HW_DEPENDENT_RETURN_VOID(void acpi_ev_terminate(void)) -#pragma pack(pop)/* Restore original struct packing */ #endif /* __ACEVENTS_H__ */
drivers/acpi/acpica/acglobal.h +0 -4
@@ -44,8 +44,6 @@#ifndef __ACGLOBAL_H__#define __ACGLOBAL_H__ -#pragma pack(push)/* Set default struct packing */ -/* * Ensure that the globals are actually defined and initialized only once. *
@@ -512,6 +510,4 @@ ACPI_INIT_GLOBAL(ACPI_FILE, acpi_gbl_debug_file, NULL);extern const struct ah_predefined_name asl_predefined_info[]; -#pragma pack(pop)/* Restore original struct packing */ -#endif /* __ACGLOBAL_H__ */
drivers/acpi/acpica/achware.h +0 -4
@@ -44,8 +44,6 @@#ifndef __ACHWARE_H__#define __ACHWARE_H__ -#pragma pack(push)/* Set default struct packing */ -/* Values for the _SST predefined method */ #define ACPI_SST_INDICATOR_OFF 0
@@ -149,6 +147,4 @@ acpi_status acpi_hw_derive_pci_id(struct acpi_pci_id *pci_id, acpi_handle root_pci_device, acpi_handle pci_region); -#pragma pack(pop)/* Restore original struct packing */ -#endif /* __ACHWARE_H__ */
drivers/acpi/acpica/acinterp.h +0 -4
@@ -44,8 +44,6 @@#ifndef __ACINTERP_H__#define __ACINTERP_H__ -#pragma pack(push)/* Set default struct packing */ -#define ACPI_WALK_OPERANDS (&(walk_state->operands [walk_state->num_operands -1]))/* Macros for tables used for debug output */
@@ -533,6 +531,4 @@ acpi_ex_data_table_space_handler(u32 function, u64 *value, void *handler_context, void *region_context); -#pragma pack(pop)/* Restore original struct packing */ -#endif /* __INTERP_H__ */
drivers/acpi/acpica/aclocal.h +0 -4
@@ -44,8 +44,6 @@#ifndef __ACLOCAL_H__#define __ACLOCAL_H__ -#pragma pack(push)/* Set default struct packing */ -/* acpisrc:struct_defs -- for acpisrc conversion */ #define ACPI_SERIALIZED 0xFF
@@ -1149,6 +1147,4 @@ struct ah_predefined_name { #endif }; -#pragma pack(pop)/* Restore original struct packing */ -#endif /* __ACLOCAL_H__ */
drivers/acpi/acpica/acmacros.h +0 -4
@@ -44,8 +44,6 @@#ifndef __ACMACROS_H__#define __ACMACROS_H__ -#pragma pack(push)/* Set default struct packing */ -/* * Extract data using a pointer. Any more than a byte and we * get into potential aligment issues -- see the STORE macros below.
@@ -429,6 +427,4 @@#define ACPI_IS_OCTAL_DIGIT (d) (((char)(d) >= '0') && ((char)(d) <= '7')) -#pragma pack(pop)/* Restore original struct packing */ -#endif /* ACMACROS_H */
drivers/acpi/acpica/acnamesp.h +0 -4
@@ -44,8 +44,6 @@#ifndef __ACNAMESP_H__#define __ACNAMESP_H__ -#pragma pack(push)/* Set default struct packing */ -/* To search the entire name space, pass this as search_base */ #define ACPI_NS_ALL ((acpi_handle)0)
@@ -406,6 +404,4 @@ struct acpi_namespace_node *acpi_ns_validate_handle(acpi_handle handle);void acpi_ns_terminate (void ); -#pragma pack(pop)/* Restore original struct packing */ -#endif /* __ACNAMESP_H__ */
drivers/acpi/acpica/acobject.h +1 -3
@@ -44,8 +44,6 @@#ifndef _ACOBJECT_H#define _ACOBJECT_H -#pragma pack(push)/* Set default struct packing */ -/* acpisrc:struct_defs -- for acpisrc conversion */ /*
@@ -458,6 +456,6 @@ union acpi_descriptor { union acpi_parse_object op; }; -#pragma pack(pop)/* Restore original struct packing */ +#pragma pack()#endif /* _ACOBJECT_H */
drivers/acpi/acpica/acparser.h +0 -4
@@ -44,8 +44,6 @@#ifndef __ACPARSER_H__#define __ACPARSER_H__ -#pragma pack(push)/* Set default struct packing */ -#define OP_HAS_RETURN_VALUE 1/* Variable number of arguments. This field must be 32 bits */
@@ -253,6 +251,4 @@ acpi_ps_sprint_op(char *buffer_start,void acpi_ps_show (union acpi_parse_object *op); -#pragma pack(pop)/* Restore original struct packing */ -#endif /* __ACPARSER_H__ */
drivers/acpi/acpica/acpredef.h +0 -4
@@ -44,8 +44,6 @@#ifndef __ACPREDEF_H__#define __ACPREDEF_H__ -#pragma pack(push)/* Set default struct packing */ -/****************************************************************************** * * Return Package types
@@ -1088,6 +1086,4 @@ static const union acpi_predefined_info acpi_gbl_scope_names[] = {extern const union acpi_predefined_info acpi_gbl_resource_names[];#endif -#pragma pack(pop)/* Restore original struct packing */ -#endif
drivers/acpi/acpica/acresrc.h +0 -4
@@ -48,8 +48,6 @@#include "amlresrc.h" -#pragma pack(push)/* Set default struct packing */ -/* * If possible, pack the following structures to byte alignment, since we * don't care about performance for debug output. Two cases where we cannot
@@ -380,6 +378,4 @@ extern struct acpi_rsdump_info acpi_rs_dump_uart_serial_bus[];extern struct acpi_rsdump_info acpi_rs_dump_general_flags[];#endif -#pragma pack(pop)/* Restore original struct packing */ -#endif /* __ACRESRC_H__ */
drivers/acpi/acpica/acstruct.h +0 -4
@@ -44,8 +44,6 @@#ifndef __ACSTRUCT_H__#define __ACSTRUCT_H__ -#pragma pack(push)/* Set default struct packing */ -/* acpisrc:struct_defs -- for acpisrc conversion */ /*****************************************************************************
@@ -246,6 +244,4 @@ struct acpi_walk_info {#define ACPI_DISPLAY_SHORT (u8) 2 -#pragma pack(pop)/* Restore original struct packing */ -#endif
drivers/acpi/acpica/actables.h +0 -4
@@ -44,8 +44,6 @@#ifndef __ACTABLES_H__#define __ACTABLES_H__ -#pragma pack(push)/* Set default struct packing */ -acpi_status acpi_allocate_root_table (u32 initial_table_count);/*
@@ -131,6 +129,4 @@ acpi_tb_install_table(acpi_physical_address address,acpi_status acpi_tb_parse_root_table (acpi_physical_address rsdp_address); -#pragma pack(pop)/* Restore original struct packing */ -#endif /* __ACTABLES_H__ */
drivers/acpi/acpica/acutils.h +0 -4
@@ -44,8 +44,6 @@#ifndef _ACUTILS_H#define _ACUTILS_H -#pragma pack(push)/* Set default struct packing */ -extern const u8 acpi_gbl_resource_aml_sizes[];extern const u8 acpi_gbl_resource_aml_serial_bus_sizes[];
@@ -739,6 +737,4 @@ acpi_ut_method_error(const char *module_name,struct acpi_namespace_node *node, const char *path, acpi_status lookup_status); -#pragma pack(pop)/* Restore original struct packing */ -#endif /* _ACUTILS_H */
drivers/acpi/acpica/amlcode.h +0 -4
@@ -46,8 +46,6 @@#ifndef __AMLCODE_H__#define __AMLCODE_H__ -#pragma pack(push)/* Set default struct packing */ -/* primary opcodes */ #define AML_NULL_CHAR (u16) 0x00
@@ -486,6 +484,4 @@ typedef enum {#define AML_METHOD_SERIALIZED 0x08#define AML_METHOD_SYNC_LEVEL 0xF0 -#pragma pack(pop)/* Restore original struct packing */ -#endif /* __AMLCODE_H__ */
drivers/acpi/acpica/amlresrc.h +0 -4
@@ -46,8 +46,6 @@#ifndef __AMLRESRC_H#define __AMLRESRC_H -#pragma pack(push)/* Set default struct packing */ -/* * Resource descriptor tags, as defined in the ACPI specification. * Used to symbolically reference fields within a descriptor.
@@ -451,6 +449,4 @@ union aml_resource { u8 byte_item; }; -#pragma pack(pop)/* Restore original struct packing */ -#endif
include/acpi/acbuffer.h +0 -4
@@ -44,8 +44,6 @@#ifndef __ACBUFFER_H__#define __ACBUFFER_H__ -#pragma pack(push)/* Set default struct packing */ -/* * Contains buffer structures for these predefined names: * _FDE, _GRT, _GTM, _PLD, _SRT
@@ -234,6 +232,4 @@ struct acpi_pld_info {#define ACPI_PLD_GET_HORIZ_OFFSET (dword) ACPI_GET_BITS (dword, 16, ACPI_16BIT_MASK)#define ACPI_PLD_SET_HORIZ_OFFSET (dword,value) ACPI_SET_BITS (dword, 16, ACPI_16BIT_MASK, value)/* Offset 128+16=144, Len 16 */ -#pragma pack(pop)/* Restore original struct packing */ -#endif /* ACBUFFER_H */
include/acpi/acconfig.h +0 -4
@@ -44,8 +44,6 @@#ifndef _ACCONFIG_H#define _ACCONFIG_H -#pragma pack(push)/* Set default struct packing */ -/****************************************************************************** * * Configuration options
@@ -231,6 +229,4 @@#define ACPI_DEBUGGER_COMMAND_PROMPT '-'#define ACPI_DEBUGGER_EXECUTE_PROMPT '%' -#pragma pack(pop)/* Restore original struct packing */ -#endif /* _ACCONFIG_H */
include/acpi/acexcep.h +0 -4
@@ -44,8 +44,6 @@#ifndef __ACEXCEP_H__#define __ACEXCEP_H__ -#pragma pack(push)/* Set default struct packing */ -/* This module contains all possible exception codes for acpi_status */ /*
@@ -379,6 +377,4 @@ static const struct acpi_exception_info acpi_gbl_exception_names_ctrl[] = {#endif /* EXCEPTION_TABLE */ -#pragma pack(pop)/* Restore original struct packing */ -#endif /* __ACEXCEP_H__ */
include/acpi/acoutput.h +0 -4
@@ -44,8 +44,6 @@#ifndef __ACOUTPUT_H__#define __ACOUTPUT_H__ -#pragma pack(push)/* Set default struct packing */ -/* * Debug levels and component IDs. These are used to control the * granularity of the output of the ACPI_DEBUG_PRINT macro -- on a
@@ -458,6 +456,4 @@#endif /* ACPI_DEBUG_OUTPUT */ -#pragma pack(pop)/* Restore original struct packing */ -#endif /* __ACOUTPUT_H__ */
include/acpi/acpiosxf.h +0 -4
@@ -49,8 +49,6 @@#include <acpi/platform/acenv.h> #include <acpi/actypes.h> -#pragma pack(push)/* Set default struct packing */ -/* Types for acpi_os_execute */ typedef enum {
@@ -401,6 +399,4 @@ char *acpi_os_get_next_filename(void *dir_handle);void acpi_os_close_directory (void *dir_handle);#endif -#pragma pack(pop)/* Restore original struct packing */ -#endif /* __ACPIOSXF_H__ */
include/acpi/acpixf.h +0 -4
@@ -55,8 +55,6 @@extern u8 acpi_gbl_permanent_mmap; -#pragma pack(push)/* Set default struct packing */ -/* * Globals that are publically available */
@@ -586,6 +584,4 @@ acpi_debug_print_raw(u32 requested_debug_level, u32 component_id, const char *format, ...);#endif -#pragma pack(pop)/* Restore original struct packing */ -#endif /* __ACXFACE_H__ */
include/acpi/acrestyp.h +0 -4
@@ -44,8 +44,6 @@#ifndef __ACRESTYP_H__#define __ACRESTYP_H__ -#pragma pack(push)/* Set default struct packing */ -/* * Definitions for Resource Attributes */
@@ -612,6 +610,4 @@ struct acpi_pci_routing_table { char source[4]; /* pad to 64 bits so sizeof() works in all cases */ }; -#pragma pack(pop)/* Restore original struct packing */ -#endif /* __ACRESTYP_H__ */
include/acpi/actbl.h +0 -4
@@ -44,8 +44,6 @@#ifndef __ACTBL_H__#define __ACTBL_H__ -#pragma pack(push)/* Set default struct packing */ -/******************************************************************************* * * Fundamental ACPI tables
@@ -406,6 +404,4 @@ struct acpi_table_desc {#define ACPI_FADT_V3_SIZE (u32) (ACPI_FADT_OFFSET (sleep_control))#define ACPI_FADT_V5_SIZE (u32) (sizeof (struct acpi_table_fadt)) -#pragma pack(pop)/* Restore original struct packing */ -#endif /* __ACTBL_H__ */
include/acpi/actbl1.h +3 -3
@@ -44,8 +44,6 @@#ifndef __ACTBL1_H__#define __ACTBL1_H__ -#pragma pack(push)/* Set default struct packing */ -/******************************************************************************* * * Additional ACPI Tables (1)
@@ -974,6 +972,8 @@ struct acpi_srat_x2apic_cpu_affinity {#define ACPI_SRAT_CPU_ENABLED (1)/* 00: Use affinity structure */ -#pragma pack(pop)/* Restore original struct packing */ +/* Reset to default packing */ + +#pragma pack()#endif /* __ACTBL1_H__ */
include/acpi/actbl2.h +3 -3
@@ -44,8 +44,6 @@#ifndef __ACTBL2_H__#define __ACTBL2_H__ -#pragma pack(push)/* Set default struct packing */ -/******************************************************************************* * * Additional ACPI Tables (2)
@@ -1231,6 +1229,8 @@ struct acpi_table_wdrt { u8 units; }; -#pragma pack(pop)/* Restore original struct packing */ +/* Reset to default packing */ + +#pragma pack()#endif /* __ACTBL2_H__ */
include/acpi/actbl3.h +3 -3
@@ -44,8 +44,6 @@#ifndef __ACTBL3_H__#define __ACTBL3_H__ -#pragma pack(push)/* Set default struct packing */ -/******************************************************************************* * * Additional ACPI Tables (3)
@@ -624,6 +622,8 @@ struct acpi_tpm2_control { u64 response_address; }; -#pragma pack(pop)/* Restore original struct packing */ +/* Reset to default packing */ + +#pragma pack()#endif /* __ACTBL3_H__ */
include/acpi/actypes.h +0 -4
@@ -44,8 +44,6 @@#ifndef __ACTYPES_H__#define __ACTYPES_H__ -#pragma pack(push)/* Set default struct packing */ -/* acpisrc:struct_defs -- for acpisrc conversion */ /*
@@ -1225,6 +1223,4 @@ struct acpi_memory_list {#define ACPI_OSI_WIN_7 0x0B#define ACPI_OSI_WIN_8 0x0C -#pragma pack(pop)/* Restore original struct packing */ -#endif /* __ACTYPES_H__ */
Signature · 1 line
1.7.10