ACPICA: 20160422 Release
Subsystems (3)
cover ACPICA: 20160422 Release
The 20160422 ACPICA kernel-resident subsystem updates are linuxized based on the linux-pm/linux-next branch.
NOTE:
1. Indentation improvement
The [PATCH 02] is a result of an ACPICA release process fix. It requires much of human intervention, and many linuxized patches in my hand that are not upstreamed to the ACPICA are burnt by this commit, which takes weeks or months to recover. So hope we can do it only once. The [PATCH 01] can reduce the painful manual work when we have to re-do it.
2. AcessWidth/BitOffset support
The old way of hardware access code has been working for many years. The commits in this release cycle enables AccessWidth/BitOffset support. Though the commits of AccessWidth/BitOffset support are written in the regression safer way, it may still break users because of unknown cases. But we need to have it in the upstream so that it can be used by as many as possible users in order to obtain the feedback to reveal the unknown cases.
The patchset has passed the following build/boot tests. Build tests are performed as follows:
1. i386 + allyes
2. i386 + allno
3. i386 + default + ACPI_DEBUGGER=y
4. i386 + default + ACPI_DEBUGGER=n + ACPI_DEBUG=y
5. i386 + default + ACPI_DEBUG=n + ACPI=y
6. i386 + default + ACPI=n
7. x86_64 + allyes
8. x86_64 + allno
9. x86_64 + default + ACPI_DEBUGGER=y
10.x86_64 + default + ACPI_DEBUGGER=n + ACPI_DEBUG=y 11.x86_64 + default + ACPI_DEBUG=n + ACPI=y
12.x86_64 + default + ACPI=n
Boot tests are performed as follows:
1. i386 + default + ACPI_DEBUGGER=y
2. x86_64 + default + ACPI_DEBUGGER=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 "drivers/platform" drivers
All other drivers that link the APIs provided by ACPICA subsystem
The divergences checking result:
Before applying (20160318 Release):
494 lines
After applying (20160422 Release):
485 lines
The reduction is caused by recently merged module level improvement.
Bob Moore (7):
ACPICA: Refactor evaluate_object to reduce nesting
ACPICA: ACPI 6.1: Support for new PCCT subtable
ACPICA: ACPI 6.0: Update _BIX support for new package element
ACPICA: ACPI 6.0, tools/iasl: Add support for new resource
descriptors
ACPICA: Renamed some #defined flag constants for clarity
ACPICA: Move all ASCII utilities to a common file
ACPICA: Update version to 20160422
Lv Zheng (7):
ACPICA: Linuxize: reduce divergences for 20160422 release
ACPICA: Divergence: remove unwanted spaces for typedef
ACPICA: Utilities: Add ACPI_IS_ALIGNED() macro
ACPICA: Hardware: Add optimized access bit width support
ACPICA: Executer: Introduce a set of macros to handle bit width mask
generation
ACPICA: Hardware: Add access_width/bit_offset support in
acpi_hw_read()
ACPICA: Hardware: Add access_width/bit_offset support for
acpi_hw_write()Prarit Bhargava (1):
ACPICA: Dispatcher: Update thread ID for recursive method calls
drivers/acpi/acpica/Makefile | 1 + drivers/acpi/acpica/acdebug.h | 6 +- drivers/acpi/acpica/acevents.h | 1 + drivers/acpi/acpica/acinterp.h | 2 +- drivers/acpi/acpica/aclocal.h | 61 ++--- drivers/acpi/acpica/acmacros.h | 15 +- drivers/acpi/acpica/acpredef.h | 5 +- drivers/acpi/acpica/acresrc.h | 8 +- drivers/acpi/acpica/actables.h | 2 - drivers/acpi/acpica/acutils.h | 35 +-- drivers/acpi/acpica/dbcmds.c | 4 +- drivers/acpi/acpica/dbconvert.c | 4 +- drivers/acpi/acpica/dbexec.c | 2 +- drivers/acpi/acpica/dbinput.c | 6 +- drivers/acpi/acpica/dbnames.c | 4 +- drivers/acpi/acpica/dbxface.c | 4 +- drivers/acpi/acpica/dscontrol.c | 4 +- drivers/acpi/acpica/dsinit.c | 2 +- drivers/acpi/acpica/dsmethod.c | 5 +- drivers/acpi/acpica/dsutils.c | 2 +- drivers/acpi/acpica/dswload.c | 4 +- drivers/acpi/acpica/dswload2.c | 4 +- drivers/acpi/acpica/dswstate.c | 10 +- drivers/acpi/acpica/evgpe.c | 4 +- drivers/acpi/acpica/evgpeblk.c | 4 +- drivers/acpi/acpica/evgpeutil.c | 4 +- drivers/acpi/acpica/evhandler.c | 2 +- drivers/acpi/acpica/evmisc.c | 3 +- drivers/acpi/acpica/evrgnini.c | 2 +- drivers/acpi/acpica/evxfgpe.c | 2 +- drivers/acpi/acpica/exconcat.c | 4 +- drivers/acpi/acpica/exconvrt.c | 4 +- drivers/acpi/acpica/excreate.c | 2 +- drivers/acpi/acpica/exfield.c | 4 +- drivers/acpi/acpica/exfldio.c | 14 +- drivers/acpi/acpica/exnames.c | 2 +- drivers/acpi/acpica/exoparg3.c | 8 +- drivers/acpi/acpica/exoparg6.c | 2 +- drivers/acpi/acpica/exregion.c | 6 +- drivers/acpi/acpica/exresnte.c | 4 +- drivers/acpi/acpica/exresolv.c | 2 +- drivers/acpi/acpica/exresop.c | 4 +- drivers/acpi/acpica/exstorob.c | 4 +- drivers/acpi/acpica/hwgpe.c | 6 +- drivers/acpi/acpica/hwregs.c | 270 ++++++++++++++++++-- drivers/acpi/acpica/hwxface.c | 7 +- drivers/acpi/acpica/nsconvert.c | 6 +- drivers/acpi/acpica/nsnames.c | 2 +- drivers/acpi/acpica/nsobject.c | 4 +- drivers/acpi/acpica/nsprepkg.c | 86 +++++++ drivers/acpi/acpica/nsrepair.c | 2 +- drivers/acpi/acpica/nsrepair2.c | 6 +- drivers/acpi/acpica/nsutils.c | 8 +- drivers/acpi/acpica/nsxfeval.c | 113 ++++---- drivers/acpi/acpica/nsxfname.c | 6 +- drivers/acpi/acpica/nsxfobj.c | 6 +- drivers/acpi/acpica/psargs.c | 2 +- drivers/acpi/acpica/psparse.c | 4 +- drivers/acpi/acpica/psutils.c | 2 +- drivers/acpi/acpica/psxface.c | 2 +- drivers/acpi/acpica/rscalc.c | 90 +++---- drivers/acpi/acpica/rscreate.c | 2 +- drivers/acpi/acpica/rsdumpinfo.c | 9 +- drivers/acpi/acpica/rsmisc.c | 2 +- drivers/acpi/acpica/rsserial.c | 21 +- drivers/acpi/acpica/rsutils.c | 12 +- drivers/acpi/acpica/rsxface.c | 6 +- drivers/acpi/acpica/tbdata.c | 15 +- drivers/acpi/acpica/tbfadt.c | 2 +- drivers/acpi/acpica/tbfind.c | 2 +- drivers/acpi/acpica/tbinstal.c | 6 +- drivers/acpi/acpica/tbutils.c | 33 +-- drivers/acpi/acpica/tbxface.c | 6 +- drivers/acpi/acpica/tbxfroot.c | 8 +- drivers/acpi/acpica/utalloc.c | 5 +- drivers/acpi/acpica/utascii.c | 140 ++++++++++ drivers/acpi/acpica/utbuffer.c | 24 +- drivers/acpi/acpica/utcache.c | 7 +- drivers/acpi/acpica/utcopy.c | 16 +- drivers/acpi/acpica/utids.c | 8 +- drivers/acpi/acpica/utmath.c | 4 +- drivers/acpi/acpica/utobject.c | 18 +- drivers/acpi/acpica/utosi.c | 4 +- drivers/acpi/acpica/utownerid.c | 6 +- drivers/acpi/acpica/utprint.c | 14 +- drivers/acpi/acpica/utstring.c | 71 +---- drivers/acpi/acpica/utxface.c | 4 +- include/acpi/acpiosxf.h | 8 +- include/acpi/acpixf.h | 23 +- include/acpi/acrestyp.h | 1 + include/acpi/actbl3.h | 23 +- include/acpi/actypes.h | 41 +-- .../acpi/os_specific/service_layers/oslinuxtbl.c | 47 ++-- .../acpi/os_specific/service_layers/osunixxf.c | 24 +- tools/power/acpi/tools/acpidump/Makefile | 1 + tools/power/acpi/tools/acpidump/apdump.c | 10 +- 96 files changed, 964 insertions(+), 553 deletions(-) create mode 100644 drivers/acpi/acpica/utascii.c
Signature · 1 line
1.7.10
PATCH 1/15 ACPICA: Linuxize: reduce divergences for 20160422 release
The patch reduces source code differences between the Linux kernel and the ACPICA upstream so that the linuxized ACPICA 20160422 release can be applied with reduced human intervention.
--- drivers/acpi/acpica/aclocal.h | 2 +- drivers/acpi/acpica/acresrc.h | 2 +- drivers/acpi/acpica/actables.h | 2 +- drivers/acpi/acpica/dsfield.c | 4 ++-- drivers/acpi/acpica/dswstate.c | 2 +- drivers/acpi/acpica/exconfig.c | 2 +- drivers/acpi/acpica/exregion.c | 2 +- drivers/acpi/acpica/exresop.c | 2 +- drivers/acpi/acpica/hwgpe.c | 10 +++++----- drivers/acpi/acpica/hwregs.c | 4 ++-- drivers/acpi/acpica/hwxface.c | 2 +- drivers/acpi/acpica/nspredef.c | 2 +- drivers/acpi/acpica/nsxfname.c | 2 +- drivers/acpi/acpica/rscalc.c | 2 +- drivers/acpi/acpica/tbxface.c | 2 +- drivers/acpi/acpica/utcopy.c | 8 ++++---- drivers/acpi/acpica/utlock.c | 4 ++-- drivers/acpi/acpica/utmath.c | 4 ++-- include/acpi/acpiosxf.h | 2 +- 19 files changed, 30 insertions(+), 30 deletions(-)
drivers/acpi/acpica/aclocal.h +1 -1
@@ -541,7 +541,7 @@ struct acpi_gpe_device_info {typedef acpi_status (*acpi_gpe_callback ) (struct acpi_gpe_xrupt_info * gpe_xrupt_info, -struct acpi_gpe_block_info *gpe_block, +struct acpi_gpe_block_info * gpe_block,void *context);/* Information about each particular fixed event */
drivers/acpi/acpica/acresrc.h +1 -1
@@ -223,7 +223,7 @@ acpi_rs_get_aei_method_data(struct acpi_namespace_node *node,* rscalc */ acpi_status -acpi_rs_get_list_length (u8 * aml_buffer, +acpi_rs_get_list_length (u8 *aml_buffer,u32 aml_buffer_length,acpi_size * size_needed); acpi_status
drivers/acpi/acpica/actables.h +1 -1
@@ -131,7 +131,7 @@ acpi_status acpi_tb_allocate_owner_id(u32 table_index);acpi_status acpi_tb_release_owner_id (u32 table_index); -acpi_status acpi_tb_get_owner_id (u32 table_index,acpi_owner_id *owner_id); +acpi_status acpi_tb_get_owner_id (u32 table_index,acpi_owner_id * owner_id);/* * tbutils - table manager utilities
drivers/acpi/acpica/dsfield.c +2 -2
@@ -147,8 +147,8 @@ acpi_ds_create_external_region(acpi_status lookup_status,******************************************************************************/ acpi_status -acpi_ds_create_buffer_field (union acpi_parse_object *op, -struct acpi_walk_state *walk_state) +acpi_ds_create_buffer_field (union acpi_parse_object * op, +struct acpi_walk_state * walk_state) {union acpi_parse_object *arg;struct acpi_namespace_node *node;
drivers/acpi/acpica/dswstate.c +1 -1
@@ -143,7 +143,7 @@ acpi_ds_result_pop(union acpi_operand_object **object,******************************************************************************/ acpi_status -acpi_ds_result_push (union acpi_operand_object * object, +acpi_ds_result_push (union acpi_operand_object *object,struct acpi_walk_state * walk_state) {union acpi_generic_state *state;
drivers/acpi/acpica/exconfig.c +1 -1
@@ -334,7 +334,7 @@ acpi_ex_region_read(union acpi_operand_object *obj_desc, u32 length, u8 *buffer)acpi_status acpi_ex_load_op (union acpi_operand_object *obj_desc,union acpi_operand_object *target, -struct acpi_walk_state *walk_state) +struct acpi_walk_state * walk_state) {union acpi_operand_object *ddb_handle;struct acpi_table_header *table_header;
drivers/acpi/acpica/exregion.c +1 -1
@@ -333,7 +333,7 @@ acpi_ex_system_io_space_handler(u32 function,case ACPI_WRITE : status =acpi_hw_write_port ((acpi_io_address ) address, - (u32) * value, bit_width); + (u32)*value, bit_width);break ;default :
drivers/acpi/acpica/exresop.c +1 -1
@@ -131,7 +131,7 @@ acpi_ex_check_object_type(acpi_object_type type_needed,acpi_status acpi_ex_resolve_operands (u16 opcode, -union acpi_operand_object ** stack_ptr, +union acpi_operand_object **stack_ptr,struct acpi_walk_state * walk_state) {union acpi_operand_object *obj_desc;
drivers/acpi/acpica/hwgpe.c +5 -5
@@ -315,8 +315,8 @@ acpi_hw_gpe_enable_write(u8 enable_mask,******************************************************************************/ acpi_status -acpi_hw_disable_gpe_block (struct acpi_gpe_xrupt_info *gpe_xrupt_info, -struct acpi_gpe_block_info *gpe_block,void *context) +acpi_hw_disable_gpe_block (struct acpi_gpe_xrupt_info * gpe_xrupt_info, +struct acpi_gpe_block_info * gpe_block,void *context) {u32 i;acpi_status status;
@@ -352,8 +352,8 @@ acpi_hw_disable_gpe_block(struct acpi_gpe_xrupt_info *gpe_xrupt_info,******************************************************************************/ acpi_status -acpi_hw_clear_gpe_block (struct acpi_gpe_xrupt_info *gpe_xrupt_info, -struct acpi_gpe_block_info *gpe_block,void *context) +acpi_hw_clear_gpe_block (struct acpi_gpe_xrupt_info * gpe_xrupt_info, +struct acpi_gpe_block_info * gpe_block,void *context) {u32 i;acpi_status status;
@@ -390,7 +390,7 @@ acpi_hw_clear_gpe_block(struct acpi_gpe_xrupt_info *gpe_xrupt_info,******************************************************************************/ acpi_status -acpi_hw_enable_runtime_gpe_block (struct acpi_gpe_xrupt_info *gpe_xrupt_info, +acpi_hw_enable_runtime_gpe_block (struct acpi_gpe_xrupt_info * gpe_xrupt_info,struct acpi_gpe_block_info * gpe_block,void *context) {
drivers/acpi/acpica/hwregs.c +2 -2
@@ -157,7 +157,7 @@ acpi_hw_validate_register(struct acpi_generic_address *reg,* ******************************************************************************/ -acpi_status acpi_hw_read (u32 *value,struct acpi_generic_address *reg) +acpi_status acpi_hw_read (u32 *value,struct acpi_generic_address * reg) {u64 address;u64 value64;
@@ -214,7 +214,7 @@ acpi_status acpi_hw_read(u32 *value, struct acpi_generic_address *reg)* ******************************************************************************/ -acpi_status acpi_hw_write (u32 value,struct acpi_generic_address *reg) +acpi_status acpi_hw_write (u32 value,struct acpi_generic_address * reg) {u64 address;acpi_status status;
drivers/acpi/acpica/hwxface.c +1 -1
@@ -212,7 +212,7 @@ ACPI_EXPORT_SYMBOL(acpi_read)* DESCRIPTION: Write to either memory or IO space. * ******************************************************************************/ -acpi_status acpi_write (u64 value,struct acpi_generic_address *reg) +acpi_status acpi_write (u64 value,struct acpi_generic_address * reg) {u32 width;u64 address;
drivers/acpi/acpica/nspredef.c +1 -1
@@ -220,7 +220,7 @@ exit:******************************************************************************/ acpi_status -acpi_ns_check_object_type (struct acpi_evaluate_info *info, +acpi_ns_check_object_type (struct acpi_evaluate_info * info,union acpi_operand_object **return_object_ptr,u32 expected_btypes,u32 package_index) {
drivers/acpi/acpica/nsxfname.c +1 -1
@@ -278,7 +278,7 @@ static char *acpi_ns_copy_device_id(struct acpi_pnp_device_id *dest,acpi_status acpi_get_object_info (acpi_handle handle, -struct acpi_device_info **return_buffer) +struct acpi_device_info ** return_buffer) {struct acpi_namespace_node *node;struct acpi_device_info *info;
drivers/acpi/acpica/rscalc.c +1 -1
@@ -397,7 +397,7 @@ acpi_rs_get_aml_length(struct acpi_resource *resource,******************************************************************************/ acpi_status -acpi_rs_get_list_length (u8 * aml_buffer, +acpi_rs_get_list_length (u8 *aml_buffer,u32 aml_buffer_length,acpi_size * size_needed) {acpi_status status;
drivers/acpi/acpica/tbxface.c +1 -1
@@ -328,7 +328,7 @@ ACPI_EXPORT_SYMBOL(acpi_get_table_with_size)acpi_status acpi_get_table (char *signature, -u32 instance,struct acpi_table_header **out_table) +u32 instance,struct acpi_table_header ** out_table) {acpi_size tbl_size;
drivers/acpi/acpica/utcopy.c +4 -4
@@ -53,7 +53,7 @@ ACPI_MODULE_NAME("utcopy")static acpi_status acpi_ut_copy_isimple_to_esimple (union acpi_operand_object *internal_object,union acpi_object *external_object, -u8 * data_space,acpi_size * buffer_space_used); +u8 *data_space,acpi_size * buffer_space_used); static acpi_status acpi_ut_copy_ielement_to_ielement(u8 object_type,
@@ -63,7 +63,7 @@ acpi_ut_copy_ielement_to_ielement(u8 object_type,static acpi_status acpi_ut_copy_ipackage_to_epackage (union acpi_operand_object *internal_object, -u8 * buffer,acpi_size * space_used); +u8 *buffer,acpi_size * space_used); static acpi_status acpi_ut_copy_esimple_to_isimple(union acpi_object *user_obj,
@@ -111,7 +111,7 @@ acpi_ut_copy_ipackage_to_ipackage(union acpi_operand_object *source_obj,static acpi_status acpi_ut_copy_isimple_to_esimple (union acpi_operand_object *internal_object,union acpi_object *external_object, -u8 * data_space,acpi_size * buffer_space_used) +u8 *data_space,acpi_size * buffer_space_used) {acpi_status status =AE_OK ;
@@ -331,7 +331,7 @@ acpi_ut_copy_ielement_to_eelement(u8 object_type,static acpi_status acpi_ut_copy_ipackage_to_epackage (union acpi_operand_object *internal_object, -u8 * buffer,acpi_size * space_used) +u8 *buffer,acpi_size * space_used) {union acpi_object *external_object;acpi_status status;
drivers/acpi/acpica/utlock.c +2 -2
@@ -124,7 +124,7 @@ acpi_status acpi_ut_acquire_read_lock(struct acpi_rw_lock *lock)return (status); } -acpi_status acpi_ut_release_read_lock (struct acpi_rw_lock *lock) +acpi_status acpi_ut_release_read_lock (struct acpi_rw_lock * lock) {acpi_status status;
@@ -160,7 +160,7 @@ acpi_status acpi_ut_release_read_lock(struct acpi_rw_lock *lock)* ******************************************************************************/ -acpi_status acpi_ut_acquire_write_lock (struct acpi_rw_lock *lock) +acpi_status acpi_ut_acquire_write_lock (struct acpi_rw_lock * lock) {acpi_status status;
drivers/acpi/acpica/utmath.c +2 -2
@@ -236,8 +236,8 @@ acpi_ut_divide(u64 in_dividend, } remainder.full = remainder.full - dividend.full; - remainder.part.hi = (u32) - ((s32 ) remainder.part.hi); - remainder.part.lo = (u32) - ((s32 ) remainder.part.lo); + remainder.part.hi = (u32)-((s32 ) remainder.part.hi); + remainder.part.lo = (u32)-((s32 ) remainder.part.lo);if (remainder.part.lo) { remainder.part.hi--;
include/acpi/acpiosxf.h +1 -1
@@ -96,7 +96,7 @@ acpi_physical_address acpi_os_get_root_pointer(void);#ifndef ACPI_USE_ALTERNATE_PROTOTYPE_acpi_os_predefined_overrideacpi_status acpi_os_predefined_override (const struct acpi_predefined_names *init_val, -acpi_string *new_val); +acpi_string * new_val);#endif #ifndef ACPI_USE_ALTERNATE_PROTOTYPE_acpi_os_table_override
Signature · 1 line
1.7.10
Re: [PATCH 01/15] ACPICA: Linuxize: reduce divergences for 20160422 release
Quoted 5 lines · Lv Zheng
The patch reduces source code differences between the Linux kernel and the ACPICA upstream so that the linuxized ACPICA 20160422 release can be applied with reduced human intervention.
Signed-off-by Lv Zheng <[email protected]>
Like previously, this adds white space where it shouldn't.
Quoted 27 lines
--- drivers/acpi/acpica/aclocal.h | 2 +- drivers/acpi/acpica/acresrc.h | 2 +- drivers/acpi/acpica/actables.h | 2 +- drivers/acpi/acpica/dsfield.c | 4 ++-- drivers/acpi/acpica/dswstate.c | 2 +- drivers/acpi/acpica/exconfig.c | 2 +- drivers/acpi/acpica/exregion.c | 2 +- drivers/acpi/acpica/exresop.c | 2 +- drivers/acpi/acpica/hwgpe.c | 10 +++++----- drivers/acpi/acpica/hwregs.c | 4 ++-- drivers/acpi/acpica/hwxface.c | 2 +- drivers/acpi/acpica/nspredef.c | 2 +- drivers/acpi/acpica/nsxfname.c | 2 +- drivers/acpi/acpica/rscalc.c | 2 +- drivers/acpi/acpica/tbxface.c | 2 +- drivers/acpi/acpica/utcopy.c | 8 ++++---- drivers/acpi/acpica/utlock.c | 4 ++-- drivers/acpi/acpica/utmath.c | 4 ++-- include/acpi/acpiosxf.h | 2 +- 19 files changed, 30 insertions(+), 30 deletions(-)drivers/acpi/acpica/aclocal.h +0
-0
drivers/acpi/acpica/aclocal.h struct acpi_gpe_device_info { · line 545
Quoted 6 lines
drivers/acpi/acpica/aclocal.h +1
-1@@ -541,7 +541,7 @@ struct acpi_gpe_device_info {typedef acpi_status (*acpi_gpe_callback ) (struct acpi_gpe_xrupt_info * gpe_xrupt_info, -struct acpi_gpe_block_info *gpe_block, +struct acpi_gpe_block_info * gpe_block,void *context);
No, please don't add that white space.
drivers/acpi/acpica/acresrc.h acpi_rs_get_aei_method_data(struct acpi_namespace_node *node, · line 227
Quoted 12 lines
drivers/acpi/acpica/aclocal.h +0
-0/* Information about each particular fixed event */ drivers/acpi/acpica/acresrc.h +1
-1@@ -223,7 +223,7 @@ acpi_rs_get_aei_method_data(struct acpi_namespace_node *node,* rscalc */ acpi_status -acpi_rs_get_list_length (u8 * aml_buffer, +acpi_rs_get_list_length (u8 *aml_buffer,u32 aml_buffer_length,acpi_size * size_needed);
Why do you fix one and not the other?
drivers/acpi/acpica/actables.h acpi_status acpi_tb_allocate_owner_id(u32 table_index); · line 134
Quoted 12 lines
drivers/acpi/acpica/acresrc.h +0
-0acpi_statusdrivers/acpi/acpica/actables.h +1
-1@@ -131,7 +131,7 @@ acpi_status acpi_tb_allocate_owner_id(u32 table_index);acpi_status acpi_tb_release_owner_id (u32 table_index); -acpi_status acpi_tb_get_owner_id (u32 table_index,acpi_owner_id *owner_id); +acpi_status acpi_tb_get_owner_id (u32 table_index,acpi_owner_id * owner_id);
The added white space does not adhere to the kernel coding style.
Quoted 7 lines
drivers/acpi/acpica/actables.h +0
-0/* * tbutils - table manager utilities drivers/acpi/acpica/dsfield.c +0
-0
drivers/acpi/acpica/dsfield.c acpi_ds_create_external_region(acpi_status lookup_status, · line 151
Quoted 7 lines
drivers/acpi/acpica/dsfield.c +2
-2@@ -147,8 +147,8 @@ acpi_ds_create_external_region(acpi_status lookup_status,******************************************************************************/ acpi_status -acpi_ds_create_buffer_field (union acpi_parse_object *op, -struct acpi_walk_state *walk_state) +acpi_ds_create_buffer_field (union acpi_parse_object * op, +struct acpi_walk_state * walk_state)
Same here.
Quoted 8 lines
drivers/acpi/acpica/dsfield.c +0
-0{union acpi_parse_object *arg;struct acpi_namespace_node *node;drivers/acpi/acpica/dswstate.c +0
-0
drivers/acpi/acpica/dswstate.c acpi_ds_result_pop(union acpi_operand_object **object, · line 147
Quoted 6 lines
drivers/acpi/acpica/dswstate.c +1
-1@@ -143,7 +143,7 @@ acpi_ds_result_pop(union acpi_operand_object **object,******************************************************************************/ acpi_status -acpi_ds_result_push (union acpi_operand_object * object, +acpi_ds_result_push (union acpi_operand_object *object,struct acpi_walk_state * walk_state)
Why do you fix one and not the other?
drivers/acpi/acpica/exconfig.c acpi_ex_region_read(union acpi_operand_object *obj_desc, u32 length, u8 *buffer) · line 337
Quoted 12 lines
drivers/acpi/acpica/dswstate.c +0
-0{union acpi_generic_state *state;drivers/acpi/acpica/exconfig.c +1
-1@@ -334,7 +334,7 @@ acpi_ex_region_read(union acpi_operand_object *obj_desc, u32 length, u8 *buffer)acpi_status acpi_ex_load_op (union acpi_operand_object *obj_desc,union acpi_operand_object *target, -struct acpi_walk_state *walk_state) +struct acpi_walk_state * walk_state)
More damaged white space.
Quoted 21 lines
drivers/acpi/acpica/exconfig.c +0
-0{union acpi_operand_object *ddb_handle;struct acpi_table_header *table_header;drivers/acpi/acpica/exregion.c +1
-1@@ -333,7 +333,7 @@ acpi_ex_system_io_space_handler(u32 function,case ACPI_WRITE : status =acpi_hw_write_port ((acpi_io_address ) address, - (u32) * value, bit_width); + (u32)*value, bit_width);break ;default :drivers/acpi/acpica/exresop.c +0
-0
drivers/acpi/acpica/exresop.c acpi_ex_check_object_type(acpi_object_type type_needed, · line 135
Quoted 6 lines
drivers/acpi/acpica/exresop.c +1
-1@@ -131,7 +131,7 @@ acpi_ex_check_object_type(acpi_object_type type_needed,acpi_status acpi_ex_resolve_operands (u16 opcode, -union acpi_operand_object ** stack_ptr, +union acpi_operand_object **stack_ptr,struct acpi_walk_state * walk_state)
Why do you fix one and not the other?
Quoted 7 lines
drivers/acpi/acpica/exresop.c +0
-0{union acpi_operand_object *obj_desc;drivers/acpi/acpica/hwgpe.c +0
-0
drivers/acpi/acpica/hwgpe.c acpi_hw_gpe_enable_write(u8 enable_mask, · line 319
Quoted 7 lines
drivers/acpi/acpica/hwgpe.c +2
-2@@ -315,8 +315,8 @@ acpi_hw_gpe_enable_write(u8 enable_mask,******************************************************************************/ acpi_status -acpi_hw_disable_gpe_block (struct acpi_gpe_xrupt_info *gpe_xrupt_info, -struct acpi_gpe_block_info *gpe_block,void *context) +acpi_hw_disable_gpe_block (struct acpi_gpe_xrupt_info * gpe_xrupt_info, +struct acpi_gpe_block_info * gpe_block,void *context)
More damaged white space.
And analogously below.
I'm assuming that the rest of the series won't apply without this patch, so I'm not going to try to apply it.
Please revise and resend.
Thanks,
Rafael
Quoted 201 lines
drivers/acpi/acpica/hwgpe.c +3
-3{u32 i;acpi_status status;@@ -352,8 +352,8 @@ acpi_hw_disable_gpe_block(struct acpi_gpe_xrupt_info *gpe_xrupt_info,******************************************************************************/ acpi_status -acpi_hw_clear_gpe_block (struct acpi_gpe_xrupt_info *gpe_xrupt_info, -struct acpi_gpe_block_info *gpe_block,void *context) +acpi_hw_clear_gpe_block (struct acpi_gpe_xrupt_info * gpe_xrupt_info, +struct acpi_gpe_block_info * gpe_block,void *context) {u32 i;acpi_status status;@@ -390,7 +390,7 @@ acpi_hw_clear_gpe_block(struct acpi_gpe_xrupt_info *gpe_xrupt_info,******************************************************************************/ acpi_status -acpi_hw_enable_runtime_gpe_block (struct acpi_gpe_xrupt_info *gpe_xrupt_info, +acpi_hw_enable_runtime_gpe_block (struct acpi_gpe_xrupt_info * gpe_xrupt_info,struct acpi_gpe_block_info * gpe_block,void *context) {drivers/acpi/acpica/hwregs.c +2
-2@@ -157,7 +157,7 @@ acpi_hw_validate_register(struct acpi_generic_address *reg,* ******************************************************************************/ -acpi_status acpi_hw_read (u32 *value,struct acpi_generic_address *reg) +acpi_status acpi_hw_read (u32 *value,struct acpi_generic_address * reg) {u64 address;u64 value64;@@ -214,7 +214,7 @@ acpi_status acpi_hw_read(u32 *value, struct acpi_generic_address *reg)* ******************************************************************************/ -acpi_status acpi_hw_write (u32 value,struct acpi_generic_address *reg) +acpi_status acpi_hw_write (u32 value,struct acpi_generic_address * reg) {u64 address;acpi_status status;drivers/acpi/acpica/hwxface.c +1
-1@@ -212,7 +212,7 @@ ACPI_EXPORT_SYMBOL(acpi_read)* DESCRIPTION: Write to either memory or IO space. * ******************************************************************************/ -acpi_status acpi_write (u64 value,struct acpi_generic_address *reg) +acpi_status acpi_write (u64 value,struct acpi_generic_address * reg) {u32 width;u64 address;drivers/acpi/acpica/nspredef.c +1
-1@@ -220,7 +220,7 @@ exit:******************************************************************************/ acpi_status -acpi_ns_check_object_type (struct acpi_evaluate_info *info, +acpi_ns_check_object_type (struct acpi_evaluate_info * info,union acpi_operand_object **return_object_ptr,u32 expected_btypes,u32 package_index) {drivers/acpi/acpica/nsxfname.c +1
-1@@ -278,7 +278,7 @@ static char *acpi_ns_copy_device_id(struct acpi_pnp_device_id *dest,acpi_status acpi_get_object_info (acpi_handle handle, -struct acpi_device_info **return_buffer) +struct acpi_device_info ** return_buffer) {struct acpi_namespace_node *node;struct acpi_device_info *info;drivers/acpi/acpica/rscalc.c +1
-1@@ -397,7 +397,7 @@ acpi_rs_get_aml_length(struct acpi_resource *resource,******************************************************************************/ acpi_status -acpi_rs_get_list_length (u8 * aml_buffer, +acpi_rs_get_list_length (u8 *aml_buffer,u32 aml_buffer_length,acpi_size * size_needed) {acpi_status status;drivers/acpi/acpica/tbxface.c +1
-1@@ -328,7 +328,7 @@ ACPI_EXPORT_SYMBOL(acpi_get_table_with_size)acpi_status acpi_get_table (char *signature, -u32 instance,struct acpi_table_header **out_table) +u32 instance,struct acpi_table_header ** out_table) {acpi_size tbl_size;drivers/acpi/acpica/utcopy.c +4
-4@@ -53,7 +53,7 @@ ACPI_MODULE_NAME("utcopy")static acpi_status acpi_ut_copy_isimple_to_esimple (union acpi_operand_object *internal_object,union acpi_object *external_object, -u8 * data_space,acpi_size * buffer_space_used); +u8 *data_space,acpi_size * buffer_space_used); static acpi_status acpi_ut_copy_ielement_to_ielement(u8 object_type,@@ -63,7 +63,7 @@ acpi_ut_copy_ielement_to_ielement(u8 object_type,static acpi_status acpi_ut_copy_ipackage_to_epackage (union acpi_operand_object *internal_object, -u8 * buffer,acpi_size * space_used); +u8 *buffer,acpi_size * space_used); static acpi_status acpi_ut_copy_esimple_to_isimple(union acpi_object *user_obj,@@ -111,7 +111,7 @@ acpi_ut_copy_ipackage_to_ipackage(union acpi_operand_object *source_obj,static acpi_status acpi_ut_copy_isimple_to_esimple (union acpi_operand_object *internal_object,union acpi_object *external_object, -u8 * data_space,acpi_size * buffer_space_used) +u8 *data_space,acpi_size * buffer_space_used) {acpi_status status =AE_OK ;@@ -331,7 +331,7 @@ acpi_ut_copy_ielement_to_eelement(u8 object_type,static acpi_status acpi_ut_copy_ipackage_to_epackage (union acpi_operand_object *internal_object, -u8 * buffer,acpi_size * space_used) +u8 *buffer,acpi_size * space_used) {union acpi_object *external_object;acpi_status status;drivers/acpi/acpica/utlock.c +2
-2@@ -124,7 +124,7 @@ acpi_status acpi_ut_acquire_read_lock(struct acpi_rw_lock *lock)return (status); } -acpi_status acpi_ut_release_read_lock (struct acpi_rw_lock *lock) +acpi_status acpi_ut_release_read_lock (struct acpi_rw_lock * lock) {acpi_status status;@@ -160,7 +160,7 @@ acpi_status acpi_ut_release_read_lock(struct acpi_rw_lock *lock)* ******************************************************************************/ -acpi_status acpi_ut_acquire_write_lock (struct acpi_rw_lock *lock) +acpi_status acpi_ut_acquire_write_lock (struct acpi_rw_lock * lock) {acpi_status status;drivers/acpi/acpica/utmath.c +2
-2@@ -236,8 +236,8 @@ acpi_ut_divide(u64 in_dividend, } remainder.full = remainder.full - dividend.full; - remainder.part.hi = (u32) - ((s32 ) remainder.part.hi); - remainder.part.lo = (u32) - ((s32 ) remainder.part.lo); + remainder.part.hi = (u32)-((s32 ) remainder.part.hi); + remainder.part.lo = (u32)-((s32 ) remainder.part.lo);if (remainder.part.lo) { remainder.part.hi--;include/acpi/acpiosxf.h +1
-1@@ -96,7 +96,7 @@ acpi_physical_address acpi_os_get_root_pointer(void);#ifndef ACPI_USE_ALTERNATE_PROTOTYPE_acpi_os_predefined_overrideacpi_status acpi_os_predefined_override (const struct acpi_predefined_names *init_val, -acpi_string *new_val); +acpi_string * new_val);#endif #ifndef ACPI_USE_ALTERNATE_PROTOTYPE_acpi_os_table_override
Re: [PATCH 01/15] ACPICA: Linuxize: reduce divergences for 20160422 release
Quoted 171 lines · Rafael J. Wysocki
Quoted 5 lines · Lv Zheng
The patch reduces source code differences between the Linux kernel and the ACPICA upstream so that the linuxized ACPICA 20160422 release can be applied with reduced human intervention.
Signed-off-by Lv Zheng <[email protected]>Like previously, this adds white space where it shouldn't.
Quoted 27 lines
--- drivers/acpi/acpica/aclocal.h | 2 +- drivers/acpi/acpica/acresrc.h | 2 +- drivers/acpi/acpica/actables.h | 2 +- drivers/acpi/acpica/dsfield.c | 4 ++-- drivers/acpi/acpica/dswstate.c | 2 +- drivers/acpi/acpica/exconfig.c | 2 +- drivers/acpi/acpica/exregion.c | 2 +- drivers/acpi/acpica/exresop.c | 2 +- drivers/acpi/acpica/hwgpe.c | 10 +++++----- drivers/acpi/acpica/hwregs.c | 4 ++-- drivers/acpi/acpica/hwxface.c | 2 +- drivers/acpi/acpica/nspredef.c | 2 +- drivers/acpi/acpica/nsxfname.c | 2 +- drivers/acpi/acpica/rscalc.c | 2 +- drivers/acpi/acpica/tbxface.c | 2 +- drivers/acpi/acpica/utcopy.c | 8 ++++---- drivers/acpi/acpica/utlock.c | 4 ++-- drivers/acpi/acpica/utmath.c | 4 ++-- include/acpi/acpiosxf.h | 2 +- 19 files changed, 30 insertions(+), 30 deletions(-)drivers/acpi/acpica/aclocal.h +0
-0drivers/acpi/acpica/aclocal.h struct acpi_gpe_device_info { · line 545
Quoted 6 lines
drivers/acpi/acpica/aclocal.h +1
-1@@ -541,7 +541,7 @@ struct acpi_gpe_device_info {typedef acpi_status (*acpi_gpe_callback ) (struct acpi_gpe_xrupt_info * gpe_xrupt_info, -struct acpi_gpe_block_info *gpe_block, +struct acpi_gpe_block_info * gpe_block,void *context);No, please don't add that white space.
drivers/acpi/acpica/acresrc.h acpi_rs_get_aei_method_data(struct acpi_namespace_node *node, · line 227
Quoted 12 lines
drivers/acpi/acpica/aclocal.h +0
-0/* Information about each particular fixed event */ drivers/acpi/acpica/acresrc.h +1
-1@@ -223,7 +223,7 @@ acpi_rs_get_aei_method_data(struct acpi_namespace_node *node,* rscalc */ acpi_status -acpi_rs_get_list_length (u8 * aml_buffer, +acpi_rs_get_list_length (u8 *aml_buffer,u32 aml_buffer_length,acpi_size * size_needed);Why do you fix one and not the other?
drivers/acpi/acpica/actables.h acpi_status acpi_tb_allocate_owner_id(u32 table_index); · line 134
Quoted 12 lines
drivers/acpi/acpica/acresrc.h +0
-0acpi_statusdrivers/acpi/acpica/actables.h +1
-1@@ -131,7 +131,7 @@ acpi_status acpi_tb_allocate_owner_id(u32 table_index);acpi_status acpi_tb_release_owner_id (u32 table_index); -acpi_status acpi_tb_get_owner_id (u32 table_index,acpi_owner_id *owner_id); +acpi_status acpi_tb_get_owner_id (u32 table_index,acpi_owner_id * owner_id);The added white space does not adhere to the kernel coding style.
Quoted 7 lines
drivers/acpi/acpica/actables.h +0
-0/* * tbutils - table manager utilities drivers/acpi/acpica/dsfield.c +0
-0drivers/acpi/acpica/dsfield.c acpi_ds_create_external_region(acpi_status lookup_status, · line 151
Quoted 7 lines
drivers/acpi/acpica/dsfield.c +2
-2@@ -147,8 +147,8 @@ acpi_ds_create_external_region(acpi_status lookup_status,******************************************************************************/ acpi_status -acpi_ds_create_buffer_field (union acpi_parse_object *op, -struct acpi_walk_state *walk_state) +acpi_ds_create_buffer_field (union acpi_parse_object * op, +struct acpi_walk_state * walk_state)Same here.
Quoted 8 lines
drivers/acpi/acpica/dsfield.c +0
-0{union acpi_parse_object *arg;struct acpi_namespace_node *node;drivers/acpi/acpica/dswstate.c +0
-0drivers/acpi/acpica/dswstate.c acpi_ds_result_pop(union acpi_operand_object **object, · line 147
Quoted 6 lines
drivers/acpi/acpica/dswstate.c +1
-1@@ -143,7 +143,7 @@ acpi_ds_result_pop(union acpi_operand_object **object,******************************************************************************/ acpi_status -acpi_ds_result_push (union acpi_operand_object * object, +acpi_ds_result_push (union acpi_operand_object *object,struct acpi_walk_state * walk_state)Why do you fix one and not the other?
drivers/acpi/acpica/exconfig.c acpi_ex_region_read(union acpi_operand_object *obj_desc, u32 length, u8 *buffer) · line 337
Quoted 12 lines
drivers/acpi/acpica/dswstate.c +0
-0{union acpi_generic_state *state;drivers/acpi/acpica/exconfig.c +1
-1@@ -334,7 +334,7 @@ acpi_ex_region_read(union acpi_operand_object *obj_desc, u32 length, u8 *buffer)acpi_status acpi_ex_load_op (union acpi_operand_object *obj_desc,union acpi_operand_object *target, -struct acpi_walk_state *walk_state) +struct acpi_walk_state * walk_state)More damaged white space.
Quoted 21 lines
drivers/acpi/acpica/exconfig.c +0
-0{union acpi_operand_object *ddb_handle;struct acpi_table_header *table_header;drivers/acpi/acpica/exregion.c +1
-1@@ -333,7 +333,7 @@ acpi_ex_system_io_space_handler(u32 function,case ACPI_WRITE : status =acpi_hw_write_port ((acpi_io_address ) address, - (u32) * value, bit_width); + (u32)*value, bit_width);break ;default :drivers/acpi/acpica/exresop.c +0
-0drivers/acpi/acpica/exresop.c acpi_ex_check_object_type(acpi_object_type type_needed, · line 135
Quoted 6 lines
drivers/acpi/acpica/exresop.c +1
-1@@ -131,7 +131,7 @@ acpi_ex_check_object_type(acpi_object_type type_needed,acpi_status acpi_ex_resolve_operands (u16 opcode, -union acpi_operand_object ** stack_ptr, +union acpi_operand_object **stack_ptr,struct acpi_walk_state * walk_state)Why do you fix one and not the other?
Quoted 7 lines
drivers/acpi/acpica/exresop.c +0
-0{union acpi_operand_object *obj_desc;drivers/acpi/acpica/hwgpe.c +0
-0drivers/acpi/acpica/hwgpe.c acpi_hw_gpe_enable_write(u8 enable_mask, · line 319
Quoted 7 lines
drivers/acpi/acpica/hwgpe.c +2
-2@@ -315,8 +315,8 @@ acpi_hw_gpe_enable_write(u8 enable_mask,******************************************************************************/ acpi_status -acpi_hw_disable_gpe_block (struct acpi_gpe_xrupt_info *gpe_xrupt_info, -struct acpi_gpe_block_info *gpe_block,void *context) +acpi_hw_disable_gpe_block (struct acpi_gpe_xrupt_info * gpe_xrupt_info, +struct acpi_gpe_block_info * gpe_block,void *context)More damaged white space.
Quoted 6 lines
And analogously below.
I'm assuming that the rest of the series won't apply without this patch, so I'm not going to try to apply it.
Please revise and resend.
Of course, patch [8/15] has been applied already, so no need to resend it.
Thanks,
Rafael
RE: [PATCH 01/15] ACPICA: Linuxize: reduce divergences for 20160422 release
Hi,
Quoted 196 lines
From: [email protected] [mailto:linux-acpi- [email protected]] On Behalf Of Rafael J. Wysocki
Subject: Re: [PATCH 01/15] ACPICA: Linuxize: reduce divergences for 20160422 releaseQuoted 2 lines · Rafael J. Wysocki
Quoted 1 line · Lv Zheng
The patch reduces source code differences between the Linux kernel and
the
Quoted 35 lines
Quoted 4 lines
ACPICA upstream so that the linuxized ACPICA 20160422 release can be applied with reduced human intervention.
Signed-off-by Lv Zheng <[email protected]>Like previously, this adds white space where it shouldn't.
Quoted 28 lines
--- drivers/acpi/acpica/aclocal.h | 2 +- drivers/acpi/acpica/acresrc.h | 2 +- drivers/acpi/acpica/actables.h | 2 +- drivers/acpi/acpica/dsfield.c | 4 ++-- drivers/acpi/acpica/dswstate.c | 2 +- drivers/acpi/acpica/exconfig.c | 2 +- drivers/acpi/acpica/exregion.c | 2 +- drivers/acpi/acpica/exresop.c | 2 +- drivers/acpi/acpica/hwgpe.c | 10 +++++----- drivers/acpi/acpica/hwregs.c | 4 ++-- drivers/acpi/acpica/hwxface.c | 2 +- drivers/acpi/acpica/nspredef.c | 2 +- drivers/acpi/acpica/nsxfname.c | 2 +- drivers/acpi/acpica/rscalc.c | 2 +- drivers/acpi/acpica/tbxface.c | 2 +- drivers/acpi/acpica/utcopy.c | 8 ++++---- drivers/acpi/acpica/utlock.c | 4 ++-- drivers/acpi/acpica/utmath.c | 4 ++-- include/acpi/acpiosxf.h | 2 +- 19 files changed, 30 insertions(+), 30 deletions(-)drivers/acpi/acpica/aclocal.h +0
-0@@ -541,7 +541,7 @@ struct acpi_gpe_device_info {Quoted 3 lines
drivers/acpi/acpica/aclocal.h struct acpi_gpe_device_info {
Quoted 3 lines
drivers/acpi/acpica/aclocal.h +0
-1typedef acpi_status(*acpi_gpe_callback) (struct acpi_gpe_xrupt_info * gpe_xrupt_info, - struct acpi_gpe_block_info
*gpe_block,Quoted 1 line
drivers/acpi/acpica/aclocal.h struct acpi_gpe_device_info { · line 544
Quoted 1 line
drivers/acpi/acpica/aclocal.h +1
-0+ struct acpi_gpe_block_info *
gpe_block,Quoted 10 lines
drivers/acpi/acpica/aclocal.h struct acpi_gpe_device_info { · line 545
Quoted 1 line
drivers/acpi/acpica/aclocal.h +0
-0void *context);No, please don't add that white space.
drivers/acpi/acpica/acresrc.h acpi_rs_get_aei_method_data(struct
Quoted 6 lines
drivers/acpi/acpica/aclocal.h +0
-0/* Information about each particular fixed event */ drivers/acpi/acpica/acresrc.h +0
-0@@ -223,7 +223,7 @@ acpi_rs_get_aei_method_data(struct
acpi_namespace_node*node,Quoted 10 lines
drivers/acpi/acpica/acresrc.h acpi_rs_get_aei_method_data(struct acpi_namespace_node *node, · line 227
Quoted 6 lines
drivers/acpi/acpica/acresrc.h +1
-1* rscalc */ acpi_status -acpi_rs_get_list_length (u8 * aml_buffer, +acpi_rs_get_list_length (u8 *aml_buffer,u32 aml_buffer_length,acpi_size * size_needed);Why do you fix one and not the other?
Quoted 1 line
Quoted 6 lines
drivers/acpi/acpica/actables.h acpi_status acpi_tb_allocate_owner_id(u32
Quoted 6 lines
acpi_statusdrivers/acpi/acpica/actables.h +0
-0@@ -131,7 +131,7 @@ acpi_status acpi_tb_allocate_owner_id(u32
table_index);Quoted 4 lines
drivers/acpi/acpica/actables.h acpi_status acpi_tb_allocate_owner_id(u32 table_index);
Quoted 4 lines
drivers/acpi/acpica/actables.h +0
-1acpi_status acpi_tb_release_owner_id (u32 table_index); -acpi_status acpi_tb_get_owner_id(u32 table_index, acpi_owner_id
*owner_id);Quoted 1 line
drivers/acpi/acpica/actables.h acpi_status acpi_tb_allocate_owner_id(u32 · line 133
Quoted 1 line
drivers/acpi/acpica/actables.h +1
-0+acpi_status acpi_tb_get_owner_id(u32 table_index, acpi_owner_id *
owner_id);Quoted 10 lines
The added white space does not adhere to the kernel coding style.
drivers/acpi/acpica/dsfield.c acpi_ds_create_external_region(acpi_status
Quoted 7 lines
drivers/acpi/acpica/actables.h +0
-0/* * tbutils - table manager utilities drivers/acpi/acpica/dsfield.c +0
-0@@ -147,8 +147,8 @@ acpi_ds_create_external_region(acpi_status
lookup_status,Quoted 1 line
Quoted 1 line
****************************************************************
**************/Quoted 9 lines
drivers/acpi/acpica/dsfield.c acpi_ds_create_external_region(acpi_status lookup_status, · line 151
Quoted 6 lines
acpi_statusdrivers/acpi/acpica/dsfield.c +2
-2-acpi_ds_create_buffer_field(union acpi_parse_object *op, - struct acpi_walk_state *walk_state) +acpi_ds_create_buffer_field(union acpi_parse_object * op, + struct acpi_walk_state * walk_state)Same here.
Quoted 8 lines
drivers/acpi/acpica/dswstate.c acpi_ds_result_pop(union acpi_operand_object
Quoted 8 lines
{
drivers/acpi/acpica/dsfield.c +0
-0union acpi_parse_object *arg;struct acpi_namespace_node *node;drivers/acpi/acpica/dswstate.c +0
-0@@ -143,7 +143,7 @@ acpi_ds_result_pop(union acpi_operand_object**object,
Quoted 1 line
Quoted 1 line
****************************************************************
**************/Quoted 8 lines
drivers/acpi/acpica/dswstate.c acpi_ds_result_pop(union acpi_operand_object **object, · line 147
Quoted 5 lines
acpi_statusdrivers/acpi/acpica/dswstate.c +1
-1-acpi_ds_result_push(union acpi_operand_object * object, +acpi_ds_result_push(union acpi_operand_object *object, struct acpi_walk_state * walk_state)Why do you fix one and not the other?
Quoted 7 lines
drivers/acpi/acpica/exconfig.c acpi_ex_region_read(union acpi_operand_object
Quoted 7 lines
{
drivers/acpi/acpica/dswstate.c +0
-0union acpi_generic_state *state;drivers/acpi/acpica/exconfig.c +0
-0@@ -334,7 +334,7 @@ acpi_ex_region_read(union acpi_operand_object
*obj_desc, u32 length, u8 *buffer)Quoted 23 lines
drivers/acpi/acpica/exconfig.c acpi_ex_region_read(union acpi_operand_object *obj_desc, u32 length, u8 *buffer) · line 337
Quoted 5 lines
drivers/acpi/acpica/exconfig.c +1
-1acpi_status acpi_ex_load_op (union acpi_operand_object *obj_desc,union acpi_operand_object *target, -struct acpi_walk_state *walk_state) +struct acpi_walk_state * walk_state)More damaged white space.
Quoted 15 lines
drivers/acpi/acpica/exconfig.c +0
-0{union acpi_operand_object *ddb_handle;struct acpi_table_header *table_header;drivers/acpi/acpica/exregion.c +1
-1@@ -333,7 +333,7 @@ acpi_ex_system_io_space_handler(u32 function,case ACPI_WRITE : status =acpi_hw_write_port ((acpi_io_address ) address, - (u32) * value, bit_width); + (u32)*value, bit_width);break ;Quoted 6 lines
drivers/acpi/acpica/exresop.c acpi_ex_check_object_type(acpi_object_type
Quoted 6 lines
drivers/acpi/acpica/exregion.c +0
-0default :drivers/acpi/acpica/exresop.c +0
-0@@ -131,7 +131,7 @@ acpi_ex_check_object_type(acpi_object_type
type_needed,Quoted 9 lines
drivers/acpi/acpica/exresop.c acpi_ex_check_object_type(acpi_object_type type_needed, · line 135
Quoted 6 lines
drivers/acpi/acpica/exresop.c +1
-1acpi_status acpi_ex_resolve_operands (u16 opcode, -union acpi_operand_object ** stack_ptr, +union acpi_operand_object **stack_ptr,struct acpi_walk_state * walk_state)Why do you fix one and not the other?
Quoted 8 lines
drivers/acpi/acpica/hwgpe.c acpi_hw_gpe_enable_write(u8 enable_mask, · line 315
Quoted 8 lines
drivers/acpi/acpica/exresop.c +0
-0{union acpi_operand_object *obj_desc;drivers/acpi/acpica/hwgpe.c +0
-0@@ -315,8 +315,8 @@ acpi_hw_gpe_enable_write(u8 enable_mask,****************************************************************
**************/Quoted 4 lines
drivers/acpi/acpica/hwgpe.c acpi_hw_gpe_enable_write(u8 enable_mask,
Quoted 4 lines
drivers/acpi/acpica/hwgpe.c +0
-2acpi_status -acpi_hw_disable_gpe_block (struct acpi_gpe_xrupt_info *gpe_xrupt_info, - struct acpi_gpe_block_info *gpe_block, void*context)
Quoted 2 lines
drivers/acpi/acpica/hwgpe.c acpi_hw_gpe_enable_write(u8 enable_mask, · line 318
Quoted 2 lines
drivers/acpi/acpica/hwgpe.c +2
-0+acpi_hw_disable_gpe_block(struct acpi_gpe_xrupt_info * gpe_xrupt_info, + struct acpi_gpe_block_info * gpe_block, void*context)
Quoted 3 lines
More damaged white space.
Quoted 8 lines
Quoted 6 lines
And analogously below.
I'm assuming that the rest of the series won't apply without this patch, so I'm not going to try to apply it.
Please revise and resend.
Of course, patch [8/15] has been applied already, so no need to resend it.
[Lv Zheng]
OK, I'll drop PATCH 08 from v2.
Thanks and best regards
-Lv
Quoted 8 lines
Thanks,
Rafael--
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
RE: [PATCH 01/15] ACPICA: Linuxize: reduce divergences for 20160422 release
In reply to Rafael J. WysockiHi,
Quoted 45 lines
From: Rafael J. Wysocki [mailto:[email protected]]
Subject: Re: [PATCH 01/15] ACPICA: Linuxize: reduce divergences for 20160422 releaseQuoted 5 lines · Lv Zheng
The patch reduces source code differences between the Linux kernel and the ACPICA upstream so that the linuxized ACPICA 20160422 release can be applied with reduced human intervention.
Signed-off-by Lv Zheng <[email protected]>Like previously, this adds white space where it shouldn't.
Quoted 27 lines
--- drivers/acpi/acpica/aclocal.h | 2 +- drivers/acpi/acpica/acresrc.h | 2 +- drivers/acpi/acpica/actables.h | 2 +- drivers/acpi/acpica/dsfield.c | 4 ++-- drivers/acpi/acpica/dswstate.c | 2 +- drivers/acpi/acpica/exconfig.c | 2 +- drivers/acpi/acpica/exregion.c | 2 +- drivers/acpi/acpica/exresop.c | 2 +- drivers/acpi/acpica/hwgpe.c | 10 +++++----- drivers/acpi/acpica/hwregs.c | 4 ++-- drivers/acpi/acpica/hwxface.c | 2 +- drivers/acpi/acpica/nspredef.c | 2 +- drivers/acpi/acpica/nsxfname.c | 2 +- drivers/acpi/acpica/rscalc.c | 2 +- drivers/acpi/acpica/tbxface.c | 2 +- drivers/acpi/acpica/utcopy.c | 8 ++++---- drivers/acpi/acpica/utlock.c | 4 ++-- drivers/acpi/acpica/utmath.c | 4 ++-- include/acpi/acpiosxf.h | 2 +- 19 files changed, 30 insertions(+), 30 deletions(-)drivers/acpi/acpica/aclocal.h +0
-0drivers/acpi/acpica/aclocal.h struct acpi_gpe_device_info { · line 544
Quoted 4 lines
drivers/acpi/acpica/aclocal.h +0
-1@@ -541,7 +541,7 @@ struct acpi_gpe_device_info { typedef acpi_status(*acpi_gpe_callback) (struct acpi_gpe_xrupt_info * gpe_xrupt_info, - struct acpi_gpe_block_info
*gpe_block,
Quoted 5 lines
drivers/acpi/acpica/aclocal.h struct acpi_gpe_device_info { · line 544
Quoted 1 line
drivers/acpi/acpica/aclocal.h +1
-0+ struct acpi_gpe_block_info *
gpe_block,drivers/acpi/acpica/aclocal.h struct acpi_gpe_device_info { · line 545
Quoted 1 line
drivers/acpi/acpica/aclocal.h +0
-0void *context);No, please don't add that white space.
[Lv Zheng]
This is the result after running ACPICA release automation tool from the following point:
https://github.com/acpica/acpica/commit/e714615f
The command to confirm the result is:
# generate/linux/gen-repo e714615f
The spaces added by this patch are fixed by this ACPICA commit:
https://github.com/acpica/acpica/commit/b2294cae
This commit is released in this ACPICA release cycle as [PATCH 02].
So what have been made wrong here will be made correct by PATCH 02.
Quoted 8 lines
drivers/acpi/acpica/acresrc.h acpi_rs_get_aei_method_data(struct
Quoted 7 lines
drivers/acpi/acpica/aclocal.h +0
-0/* Information about each particular fixed event */ drivers/acpi/acpica/acresrc.h +0
-0@@ -223,7 +223,7 @@ acpi_rs_get_aei_method_data(struct
acpi_namespace_node*node,
Quoted 8 lines
drivers/acpi/acpica/acresrc.h acpi_rs_get_aei_method_data(struct acpi_namespace_node *node, · line 227
Quoted 6 lines
drivers/acpi/acpica/acresrc.h +1
-1* rscalc */ acpi_status -acpi_rs_get_list_length (u8 * aml_buffer, +acpi_rs_get_list_length (u8 *aml_buffer,u32 aml_buffer_length,acpi_size * size_needed);Why do you fix one and not the other?
[Lv Zheng]
ACPICA release scripts have already been aware of u8 as a type, so the indentation is not wrong after running ACPICA release scripts. While acpi_size is not, acpi_size is fixed by the above mentioned commit:
https://github.com/acpica/acpica/commit/b2294cae
This commit is released in this ACPICA release cycle as [PATCH 02].
So what haven't been fixed here will be fixed by [PATCH 02].
Quoted 10 lines
drivers/acpi/acpica/actables.h acpi_status acpi_tb_allocate_owner_id(u32
Quoted 8 lines
drivers/acpi/acpica/acresrc.h +0
-0acpi_statusdrivers/acpi/acpica/actables.h +0
-0@@ -131,7 +131,7 @@ acpi_status acpi_tb_allocate_owner_id(u32
table_index);Quoted 1 line
Quoted 8 lines
Quoted 3 lines
acpi_statusacpi_tb_release_owner_id(u32 table_index);-acpi_status acpi_tb_get_owner_id(u32
table_index,acpi_owner_id
*owner_id);Quoted 1 line
+acpi_status acpi_tb_get_owner_id(u32
table_index,acpi_owner_id*
owner_id);The added white space does not adhere to the kernel coding style.
[Lv Zheng]
As acpi_gpe_block_info, ACPICA release scripts wasn't aware of acpi_owner_id as a type.
Quoted 13 lines
drivers/acpi/acpica/dsfield.c acpi_ds_create_external_region(acpi_status
Quoted 8 lines
/*
* tbutils - table manager utilitiesdrivers/acpi/acpica/dsfield.c +0
-0@@ -147,8 +147,8 @@ acpi_ds_create_external_region(acpi_status
lookup_status,Quoted 1 line
****************************************************************
**************/Quoted 1 line
Quoted 7 lines
drivers/acpi/acpica/dsfield.c acpi_ds_create_external_region(acpi_status lookup_status, · line 151
Quoted 5 lines
acpi_statusdrivers/acpi/acpica/dsfield.c +2
-2-acpi_ds_create_buffer_field(union acpi_parse_object *op, - struct acpi_walk_state *walk_state) +acpi_ds_create_buffer_field(union acpi_parse_object * op, + struct acpi_walk_state * walk_state)Same here.
[Lv Zheng]
As acpi_gpe_block_info, ACPICA release scripts wasn't aware of acpi_walk_state as a type.
Quoted 14 lines
drivers/acpi/acpica/dswstate.c acpi_ds_result_pop(union acpi_operand_object
Quoted 9 lines
{
drivers/acpi/acpica/dsfield.c +0
-0union acpi_parse_object *arg;struct acpi_namespace_node *node;drivers/acpi/acpica/dswstate.c +0
-0@@ -143,7 +143,7 @@ acpi_ds_result_pop(union acpi_operand_object**object,
Quoted 1 line
****************************************************************
**************/Quoted 1 line
Quoted 6 lines
drivers/acpi/acpica/dswstate.c acpi_ds_result_pop(union acpi_operand_object **object, · line 147
Quoted 4 lines
acpi_statusdrivers/acpi/acpica/dswstate.c +1
-1-acpi_ds_result_push(union acpi_operand_object * object, +acpi_ds_result_push(union acpi_operand_object *object, struct acpi_walk_state * walk_state)Why do you fix one and not the other?
[Lv Zheng]
As u8, ACPICA release scripts have been aware of acpi_opearnd_object as a type. As acpi_gpe_block_info, ACPICA release scripts wasn't aware of acpi_walk_state as a type.
Quoted 9 lines
drivers/acpi/acpica/exconfig.c acpi_ex_region_read(union acpi_operand_object
Quoted 8 lines
{
drivers/acpi/acpica/dswstate.c +0
-0union acpi_generic_state *state;drivers/acpi/acpica/exconfig.c +0
-0@@ -334,7 +334,7 @@ acpi_ex_region_read(union acpi_operand_object
*obj_desc, u32 length, u8 *buffer)
Quoted 7 lines
drivers/acpi/acpica/exconfig.c acpi_ex_region_read(union acpi_operand_object *obj_desc, u32 length, u8 *buffer) · line 337
Quoted 5 lines
drivers/acpi/acpica/exconfig.c +1
-1acpi_status acpi_ex_load_op (union acpi_operand_object *obj_desc,union acpi_operand_object *target, -struct acpi_walk_state *walk_state) +struct acpi_walk_state * walk_state)More damaged white space.
[Lv Zheng]
Ditto.
Quoted 24 lines
drivers/acpi/acpica/exresop.c acpi_ex_check_object_type(acpi_object_type
Quoted 22 lines
drivers/acpi/acpica/exconfig.c +0
-0{union acpi_operand_object *ddb_handle;struct acpi_table_header *table_header;drivers/acpi/acpica/exregion.c +1
-1@@ -333,7 +333,7 @@ acpi_ex_system_io_space_handler(u32 function,case ACPI_WRITE : status =acpi_hw_write_port ((acpi_io_address ) address, - (u32) * value, bit_width); + (u32)*value, bit_width);break ;default :drivers/acpi/acpica/exresop.c +0
-0@@ -131,7 +131,7 @@ acpi_ex_check_object_type(acpi_object_type
type_needed,Quoted 1 line
Quoted 7 lines
drivers/acpi/acpica/exresop.c acpi_ex_check_object_type(acpi_object_type type_needed, · line 135
Quoted 5 lines
acpi_status
acpi_ex_resolve_operands(u16 opcode,drivers/acpi/acpica/exresop.c +1
-1-union acpi_operand_object ** stack_ptr, +union acpi_operand_object **stack_ptr, struct acpi_walk_state * walk_state)Why do you fix one and not the other?
[Lv Zheng]
Ditto.
Quoted 20 lines
drivers/acpi/acpica/hwgpe.c acpi_hw_gpe_enable_write(u8 enable_mask, · line 315
Quoted 9 lines
{
drivers/acpi/acpica/exresop.c +0
-0union acpi_operand_object *obj_desc;drivers/acpi/acpica/hwgpe.c +0
-0@@ -315,8 +315,8 @@ acpi_hw_gpe_enable_write(u8 enable_mask,****************************************************************
**************/drivers/acpi/acpica/hwgpe.c acpi_hw_gpe_enable_write(u8 enable_mask,
Quoted 4 lines
drivers/acpi/acpica/hwgpe.c +0
-2acpi_status -acpi_hw_disable_gpe_block (struct acpi_gpe_xrupt_info *gpe_xrupt_info, - struct acpi_gpe_block_info *gpe_block, void*context)
drivers/acpi/acpica/hwgpe.c acpi_hw_gpe_enable_write(u8 enable_mask, · line 318
Quoted 2 lines
drivers/acpi/acpica/hwgpe.c +2
-0+acpi_hw_disable_gpe_block(struct acpi_gpe_xrupt_info * gpe_xrupt_info, + struct acpi_gpe_block_info * gpe_block, void*context)
Quoted 8 lines
More damaged white space.
And analogously below.
I'm assuming that the rest of the series won't apply without this patch, so I'm not going to try to apply it.
Please revise and resend.
[Lv Zheng]
The only way to make it looking correct is to merge PATCH 01 into PATCH 02. But I need to make sure that I won't have to make this release cycle more than twice... Otherwise I need to keep them separated in order to reduce human interventions.
Thanks and best regards
-Lv
Quoted 241 lines
Thanks,
Rafaeldrivers/acpi/acpica/hwgpe.c acpi_hw_disable_gpe_block(struct
Quoted 4 lines
drivers/acpi/acpica/hwgpe.c +0
-0{u32 i;acpi_status status;@@ -352,8 +352,8 @@ acpi_hw_disable_gpe_block(struct
acpi_gpe_xrupt_info*gpe_xrupt_info,Quoted 1 line
****************************************************************
**************/drivers/acpi/acpica/hwgpe.c acpi_hw_clear_gpe_block(struct
Quoted 10 lines
acpi_statusdrivers/acpi/acpica/hwgpe.c +2
-2-acpi_hw_clear_gpe_block(struct acpi_gpe_xrupt_info *gpe_xrupt_info, - struct acpi_gpe_block_info *gpe_block, void *context) +acpi_hw_clear_gpe_block(struct acpi_gpe_xrupt_info * gpe_xrupt_info, + struct acpi_gpe_block_info * gpe_block, void *context) { u32 i;acpi_status status;@@ -390,7 +390,7 @@ acpi_hw_clear_gpe_block(struct
acpi_gpe_xrupt_info*gpe_xrupt_info,Quoted 1 line
****************************************************************
**************/Quoted 3 lines
acpi_status
-acpi_hw_enable_runtime_gpe_block(structacpi_gpe_xrupt_info
*gpe_xrupt_info,Quoted 1 line
+acpi_hw_enable_runtime_gpe_block(struct
acpi_gpe_xrupt_info*
gpe_xrupt_info,drivers/acpi/acpica/hwregs.c acpi_hw_validate_register(struct
Quoted 8 lines
drivers/acpi/acpica/hwgpe.c +0
-0struct acpi_gpe_block_info * gpe_block, void *context) {drivers/acpi/acpica/hwregs.c +0
-0@@ -157,7 +157,7 @@ acpi_hw_validate_register(struct
acpi_generic_address*reg,drivers/acpi/acpica/hwregs.c acpi_hw_validate_register(struct · line 158
Quoted 2 lines
drivers/acpi/acpica/hwregs.c +0
-0* ****************************************************************
**************/drivers/acpi/acpica/hwregs.c acpi_status acpi_hw_read(u32 *value, struct
Quoted 7 lines
drivers/acpi/acpica/hwregs.c +1
-1-acpi_status acpi_hw_read (u32 *value,struct acpi_generic_address *reg) +acpi_status acpi_hw_read (u32 *value,struct acpi_generic_address * reg) {u64 address;u64 value64;@@ -214,7 +214,7 @@ acpi_status acpi_hw_read(u32 *value, struct
acpi_generic_address*reg)drivers/acpi/acpica/hwregs.c acpi_status acpi_hw_read(u32 *value, struct · line 215
Quoted 2 lines
drivers/acpi/acpica/hwregs.c +0
-0* ****************************************************************
**************/Quoted 11 lines
drivers/acpi/acpica/hwregs.c +1
-1-acpi_status acpi_hw_write (u32 value,struct acpi_generic_address *reg) +acpi_status acpi_hw_write (u32 value,struct acpi_generic_address * reg) {u64 address;acpi_status status;drivers/acpi/acpica/hwxface.c +0
-0drivers/acpi/acpica/hwxface.c ACPI_EXPORT_SYMBOL(acpi_read) · line 214
Quoted 3 lines
drivers/acpi/acpica/hwxface.c +0
-0@@ -212,7 +212,7 @@ ACPI_EXPORT_SYMBOL(acpi_read)* DESCRIPTION: Write to either memory or IO space. * ****************************************************************
**************/drivers/acpi/acpica/nspredef.c exit: · line 220
Quoted 11 lines
drivers/acpi/acpica/hwxface.c +1
-1-acpi_status acpi_write (u64 value,struct acpi_generic_address *reg) +acpi_status acpi_write (u64 value,struct acpi_generic_address * reg) {u32 width;u64 address;drivers/acpi/acpica/nspredef.c +0
-0@@ -220,7 +220,7 @@ exit:****************************************************************
**************/drivers/acpi/acpica/nsxfname.c static char *acpi_ns_copy_device_id(struct
Quoted 12 lines
drivers/acpi/acpica/nspredef.c +1
-1acpi_status -acpi_ns_check_object_type (struct acpi_evaluate_info *info, +acpi_ns_check_object_type (struct acpi_evaluate_info * info,union acpi_operand_object **return_object_ptr,u32 expected_btypes,u32 package_index) {drivers/acpi/acpica/nsxfname.c +0
-0@@ -278,7 +278,7 @@ static char *acpi_ns_copy_device_id(struct
acpi_pnp_device_id*dest,drivers/acpi/acpica/rscalc.c acpi_rs_get_aml_length(struct acpi_resource
Quoted 13 lines
drivers/acpi/acpica/nsxfname.c +1
-1acpi_status acpi_get_object_info (acpi_handle handle, -struct acpi_device_info **return_buffer) +struct acpi_device_info ** return_buffer) {struct acpi_namespace_node *node;struct acpi_device_info *info;drivers/acpi/acpica/rscalc.c +0
-0@@ -397,7 +397,7 @@ acpi_rs_get_aml_length(struct acpi_resource*resource,
Quoted 1 line
****************************************************************
**************/Quoted 25 lines
acpi_statusdrivers/acpi/acpica/rscalc.c +1
-1-acpi_rs_get_list_length (u8 * aml_buffer, +acpi_rs_get_list_length (u8 *aml_buffer, u32 aml_buffer_length, acpi_size * size_needed) {acpi_status status;drivers/acpi/acpica/tbxface.c +1
-1@@ -328,7 +328,7 @@ ACPI_EXPORT_SYMBOL(acpi_get_table_with_size)acpi_status acpi_get_table (char *signature, -u32 instance,struct acpi_table_header **out_table) +u32 instance,struct acpi_table_header ** out_table) {acpi_size tbl_size;drivers/acpi/acpica/utcopy.c +0
-0drivers/acpi/acpica/utcopy.c ACPI_MODULE_NAME("utcopy") · line 54
Quoted 2 lines
drivers/acpi/acpica/utcopy.c +0
-0@@ -53,7 +53,7 @@ ACPI_MODULE_NAME("utcopy")static acpi_status acpi_ut_copy_isimple_to_esimple(union acpi_operand_object
*internal_object,drivers/acpi/acpica/utcopy.c ACPI_MODULE_NAME("utcopy") · line 56
Quoted 2 lines
drivers/acpi/acpica/utcopy.c +0
-1union acpi_object *external_object, - u8 * data_space, acpi_size *
buffer_space_used);drivers/acpi/acpica/utcopy.c ACPI_MODULE_NAME("utcopy") · line 56
Quoted 1 line
drivers/acpi/acpica/utcopy.c +1
-0+ u8 *data_space, acpi_size *
buffer_space_used);drivers/acpi/acpica/utcopy.c acpi_ut_copy_ielement_to_ielement(u8 object_type, · line 65
Quoted 7 lines
drivers/acpi/acpica/utcopy.c +0
-0static acpi_status acpi_ut_copy_ielement_to_ielement(u8 object_type,@@ -63,7 +63,7 @@ acpi_ut_copy_ielement_to_ielement(u8 object_type,static acpi_status acpi_ut_copy_ipackage_to_epackage(union acpi_operand_object
*internal_object,drivers/acpi/acpica/utcopy.c acpi_ut_copy_ipackage_to_ipackage(union
Quoted 6 lines
drivers/acpi/acpica/utcopy.c +1
-1- u8 * buffer, acpi_size * space_used); + u8 *buffer, acpi_size * space_used); static acpi_status acpi_ut_copy_esimple_to_isimple(union acpi_object *user_obj,@@ -111,7 +111,7 @@ acpi_ut_copy_ipackage_to_ipackage(union
acpi_operand_object*source_obj,drivers/acpi/acpica/utcopy.c acpi_ut_copy_ipackage_to_ipackage(union · line 112
Quoted 2 lines
drivers/acpi/acpica/utcopy.c +0
-0static acpi_status acpi_ut_copy_isimple_to_esimple(union acpi_operand_object
*internal_object,drivers/acpi/acpica/utcopy.c acpi_ut_copy_ipackage_to_ipackage(union · line 114
Quoted 2 lines
drivers/acpi/acpica/utcopy.c +0
-1union acpi_object *external_object, - u8 * data_space, acpi_size *
buffer_space_used)drivers/acpi/acpica/utcopy.c acpi_ut_copy_ipackage_to_ipackage(union · line 114
Quoted 1 line
drivers/acpi/acpica/utcopy.c +1
-0+ u8 *data_space, acpi_size *
buffer_space_used)drivers/acpi/acpica/utcopy.c acpi_ut_copy_ielement_to_eelement(u8 object_type, · line 333
Quoted 7 lines
drivers/acpi/acpica/utcopy.c +0
-0{acpi_status status =AE_OK ;@@ -331,7 +331,7 @@ acpi_ut_copy_ielement_to_eelement(u8 object_type,static acpi_status acpi_ut_copy_ipackage_to_epackage(union acpi_operand_object
*internal_object,drivers/acpi/acpica/utlock.c acpi_status acpi_ut_acquire_read_lock(struct
Quoted 10 lines
drivers/acpi/acpica/utcopy.c +1
-1- u8 * buffer, acpi_size * space_used) + u8 *buffer, acpi_size * space_used) {union acpi_object *external_object;acpi_status status;drivers/acpi/acpica/utlock.c +0
-0@@ -124,7 +124,7 @@ acpi_status acpi_ut_acquire_read_lock(struct
acpi_rw_lock*lock)drivers/acpi/acpica/utlock.c acpi_status acpi_ut_release_read_lock(struct
Quoted 9 lines
drivers/acpi/acpica/utlock.c +1
-1return (status); } -acpi_status acpi_ut_release_read_lock (struct acpi_rw_lock *lock) +acpi_status acpi_ut_release_read_lock (struct acpi_rw_lock * lock) {acpi_status status;@@ -160,7 +160,7 @@ acpi_status acpi_ut_release_read_lock(struct
acpi_rw_lock*lock)drivers/acpi/acpica/utlock.c acpi_status acpi_ut_release_read_lock(struct · line 161
Quoted 2 lines
drivers/acpi/acpica/utlock.c +0
-0* ****************************************************************
**************/Quoted 35 lines
drivers/acpi/acpica/utlock.c +1
-1-acpi_status acpi_ut_acquire_write_lock (struct acpi_rw_lock *lock) +acpi_status acpi_ut_acquire_write_lock (struct acpi_rw_lock * lock) {acpi_status status;drivers/acpi/acpica/utmath.c +2
-2@@ -236,8 +236,8 @@ acpi_ut_divide(u64 in_dividend, } remainder.full = remainder.full - dividend.full; - remainder.part.hi = (u32) - ((s32 ) remainder.part.hi); - remainder.part.lo = (u32) - ((s32 ) remainder.part.lo); + remainder.part.hi = (u32)-((s32 ) remainder.part.hi); + remainder.part.lo = (u32)-((s32 ) remainder.part.lo);if (remainder.part.lo) { remainder.part.hi--;include/acpi/acpiosxf.h +1
-1@@ -96,7 +96,7 @@ acpi_physical_address acpi_os_get_root_pointer(void);#ifndef ACPI_USE_ALTERNATE_PROTOTYPE_acpi_os_predefined_overrideacpi_status acpi_os_predefined_override (const struct acpi_predefined_names *init_val, -acpi_string *new_val); +acpi_string * new_val);#endif #ifndef ACPI_USE_ALTERNATE_PROTOTYPE_acpi_os_table_override
PATCH 2/15 ACPICA: Divergence: remove unwanted spaces for typedef
In reply to Lv ZhengACPICA commit b2294cae776f5a66a7697414b21949d307e6856f
This patch removes unwanted spaces for typedef. This solution doesn't cover function types.
Note that the linuxize result of this commit is very giant and should have many conflicts against the current Linux upstream. Thus it is required to modify the linuxize result of this commit and the commits around it manually in order to have them merged to the Linux upstream. Since this is very costy, we should do this only once, and if we can't ensure to do this only once, we need to revert the Linux code to the wrong indentation result before merging the linuxize result of this commit. Lv Zheng.
--- drivers/acpi/acpica/acdebug.h | 6 +- drivers/acpi/acpica/acevents.h | 1 + drivers/acpi/acpica/acinterp.h | 2 +- drivers/acpi/acpica/aclocal.h | 31 +++---- drivers/acpi/acpica/acresrc.h | 6 +- drivers/acpi/acpica/actables.h | 2 +- drivers/acpi/acpica/acutils.h | 22 ++--- drivers/acpi/acpica/dbcmds.c | 4 +- drivers/acpi/acpica/dbconvert.c | 4 +- drivers/acpi/acpica/dbexec.c | 2 +- drivers/acpi/acpica/dbinput.c | 6 +- drivers/acpi/acpica/dbnames.c | 2 +- drivers/acpi/acpica/dbxface.c | 4 +- drivers/acpi/acpica/dscontrol.c | 4 +- drivers/acpi/acpica/dsfield.c | 4 +- drivers/acpi/acpica/dsinit.c | 2 +- drivers/acpi/acpica/dsmethod.c | 2 +- drivers/acpi/acpica/dsutils.c | 2 +- drivers/acpi/acpica/dswload.c | 4 +- drivers/acpi/acpica/dswload2.c | 4 +- drivers/acpi/acpica/dswstate.c | 8 +- drivers/acpi/acpica/evgpe.c | 4 +- drivers/acpi/acpica/evgpeblk.c | 4 +- drivers/acpi/acpica/evgpeutil.c | 4 +- drivers/acpi/acpica/evhandler.c | 2 +- drivers/acpi/acpica/evmisc.c | 3 +- drivers/acpi/acpica/evrgnini.c | 2 +- drivers/acpi/acpica/evxfgpe.c | 2 +- drivers/acpi/acpica/exconcat.c | 4 +- drivers/acpi/acpica/exconfig.c | 2 +- drivers/acpi/acpica/exconvrt.c | 4 +- drivers/acpi/acpica/excreate.c | 2 +- drivers/acpi/acpica/exfield.c | 4 +- drivers/acpi/acpica/exfldio.c | 2 +- drivers/acpi/acpica/exoparg3.c | 8 +- drivers/acpi/acpica/exoparg6.c | 2 +- drivers/acpi/acpica/exregion.c | 4 +- drivers/acpi/acpica/exresnte.c | 4 +- drivers/acpi/acpica/exresolv.c | 2 +- drivers/acpi/acpica/exresop.c | 2 +- drivers/acpi/acpica/exstorob.c | 4 +- drivers/acpi/acpica/hwgpe.c | 16 ++-- drivers/acpi/acpica/hwregs.c | 4 +- drivers/acpi/acpica/hwxface.c | 9 +- drivers/acpi/acpica/nsconvert.c | 6 +- drivers/acpi/acpica/nsnames.c | 2 +- drivers/acpi/acpica/nsobject.c | 4 +- drivers/acpi/acpica/nspredef.c | 2 +- drivers/acpi/acpica/nsrepair.c | 2 +- drivers/acpi/acpica/nsrepair2.c | 6 +- drivers/acpi/acpica/nsutils.c | 8 +- drivers/acpi/acpica/nsxfeval.c | 2 +- drivers/acpi/acpica/nsxfname.c | 8 +- drivers/acpi/acpica/nsxfobj.c | 6 +- drivers/acpi/acpica/psargs.c | 2 +- drivers/acpi/acpica/psparse.c | 4 +- drivers/acpi/acpica/psxface.c | 2 +- drivers/acpi/acpica/rscalc.c | 88 ++++++++++---------- drivers/acpi/acpica/rscreate.c | 2 +- drivers/acpi/acpica/rsmisc.c | 2 +- drivers/acpi/acpica/rsutils.c | 12 +-- drivers/acpi/acpica/rsxface.c | 6 +- drivers/acpi/acpica/tbdata.c | 9 +- drivers/acpi/acpica/tbfadt.c | 2 +- drivers/acpi/acpica/tbutils.c | 6 +- drivers/acpi/acpica/tbxface.c | 8 +- drivers/acpi/acpica/tbxfroot.c | 8 +- drivers/acpi/acpica/utalloc.c | 5 +- drivers/acpi/acpica/utbuffer.c | 24 +++--- drivers/acpi/acpica/utcache.c | 7 +- drivers/acpi/acpica/utcopy.c | 16 ++-- drivers/acpi/acpica/utids.c | 8 +- drivers/acpi/acpica/utlock.c | 4 +- drivers/acpi/acpica/utmath.c | 4 +- drivers/acpi/acpica/utobject.c | 18 ++-- drivers/acpi/acpica/utosi.c | 4 +- drivers/acpi/acpica/utownerid.c | 6 +- drivers/acpi/acpica/utprint.c | 14 ++-- drivers/acpi/acpica/utstring.c | 2 +- drivers/acpi/acpica/utxface.c | 4 +- include/acpi/acpiosxf.h | 10 +-- include/acpi/acpixf.h | 21 ++--- include/acpi/actypes.h | 41 ++++----- .../acpi/os_specific/service_layers/oslinuxtbl.c | 47 +++++------ .../acpi/os_specific/service_layers/osunixxf.c | 24 +++--- tools/power/acpi/tools/acpidump/apdump.c | 2 +- 86 files changed, 337 insertions(+), 337 deletions(-)
drivers/acpi/acpica/acdebug.h +3 -3
@@ -196,7 +196,7 @@ ACPI_DBR_DEPENDENT_RETURN_VOID(voidacpi_walk_state *walk_state)) - acpi_status acpi_db_display_all_methods(char *display_count_arg); +acpi_status acpi_db_display_all_methods(char *display_count_arg);void acpi_db_display_arguments (void );
@@ -220,7 +220,7 @@ ACPI_DBR_DEPENDENT_RETURN_VOID(void* dbexec - debugger control method execution */ void -acpi_db_execute (char *name,char **args,acpi_object_type * types,u32 flags); +acpi_db_execute (char *name,char **args,acpi_object_type *types,u32 flags); void acpi_db_create_execution_threads(char *num_threads_arg,
@@ -271,7 +271,7 @@ void ACPI_SYSTEM_XFACE acpi_db_execute_thread(void *context);acpi_status acpi_db_user_commands (void );char *acpi_db_get_next_token (char *string, -char **next,acpi_object_type * return_type); +char **next,acpi_object_type *return_type);/* * dbobject
drivers/acpi/acpica/acevents.h +1 -0
@@ -72,6 +72,7 @@ acpi_status acpi_ev_init_global_lock_handler(void); ACPI_HW_DEPENDENT_RETURN_OK(acpi_status acpi_ev_acquire_global_lock(u16 timeout)) ACPI_HW_DEPENDENT_RETURN_OK(acpi_status acpi_ev_release_global_lock(void)) + acpi_status acpi_ev_remove_global_lock_handler(void);/*
drivers/acpi/acpica/acinterp.h +1 -1
@@ -370,7 +370,7 @@ acpi_ex_resolve_to_value(union acpi_operand_object **stack_ptr,acpi_status acpi_ex_resolve_multiple (struct acpi_walk_state *walk_state,union acpi_operand_object *operand, -acpi_object_type * return_type, +acpi_object_type *return_type,union acpi_operand_object **return_desc);/*
drivers/acpi/acpica/aclocal.h +17 -14
@@ -278,7 +278,7 @@ struct acpi_create_field_info { };typedef -acpi_status (*acpi_internal_method ) (struct acpi_walk_state * walk_state); +acpi_status (*acpi_internal_method ) (struct acpi_walk_state * walk_state);/* * Bitmapped ACPI types. Used internally only
@@ -395,11 +395,12 @@ union acpi_predefined_info {/* Return object auto-repair info */ -typedef acpi_status (*acpi_object_converter ) (struct acpi_namespace_node * scope, -union acpi_operand_object - *original_object, -union acpi_operand_object - **converted_object); +typedef acpi_status (*acpi_object_converter ) (struct acpi_namespace_node * + scope, +union acpi_operand_object * + original_object, +union acpi_operand_object ** + converted_object);struct acpi_simple_repair_info {char name[ACPI_NAME_SIZE ];
@@ -539,10 +540,10 @@ struct acpi_gpe_device_info {struct acpi_namespace_node *gpe_device; }; -typedef acpi_status (*acpi_gpe_callback ) (struct acpi_gpe_xrupt_info * - gpe_xrupt_info, -struct acpi_gpe_block_info * gpe_block, -void *context); +typedef acpi_status (*acpi_gpe_callback ) (struct acpi_gpe_xrupt_info * + gpe_xrupt_info, +struct acpi_gpe_block_info * + gpe_block,void *context);/* Information about each particular fixed event */
@@ -657,10 +658,11 @@ struct acpi_result_values { };typedef -acpi_status (*acpi_parse_downwards ) (struct acpi_walk_state * walk_state, -union acpi_parse_object ** out_op); +acpi_status (*acpi_parse_downwards ) (struct acpi_walk_state * walk_state, +union acpi_parse_object ** out_op); -typedef acpi_status (*acpi_parse_upwards ) (struct acpi_walk_state * walk_state); +typedef +acpi_status (*acpi_parse_upwards ) (struct acpi_walk_state * walk_state);/* Global handlers for AML Notifies */
@@ -700,7 +702,8 @@ union acpi_generic_state {* ****************************************************************************/ -typedef acpi_status (*acpi_execute_op ) (struct acpi_walk_state * walk_state); +typedef +acpi_status (*acpi_execute_op ) (struct acpi_walk_state * walk_state);/* Address Range info block */
drivers/acpi/acpica/acresrc.h +3 -3
@@ -224,15 +224,15 @@ acpi_rs_get_aei_method_data(struct acpi_namespace_node *node,*/ acpi_status acpi_rs_get_list_length (u8 *aml_buffer, -u32 aml_buffer_length,acpi_size * size_needed); +u32 aml_buffer_length,acpi_size *size_needed);acpi_status acpi_rs_get_aml_length (struct acpi_resource *resource_list, -acpi_size resource_list_size,acpi_size * size_needed); +acpi_size resource_list_size,acpi_size *size_needed);acpi_status acpi_rs_get_pci_routing_table_length (union acpi_operand_object *package_object, -acpi_size * buffer_size_needed); +acpi_size *buffer_size_needed); acpi_status acpi_rs_convert_aml_to_resources(u8 * aml,
drivers/acpi/acpica/actables.h +1 -1
@@ -131,7 +131,7 @@ acpi_status acpi_tb_allocate_owner_id(u32 table_index);acpi_status acpi_tb_release_owner_id (u32 table_index); -acpi_status acpi_tb_get_owner_id (u32 table_index,acpi_owner_id * owner_id); +acpi_status acpi_tb_get_owner_id (u32 table_index,acpi_owner_id *owner_id);/* * tbutils - table manager utilities
drivers/acpi/acpica/acutils.h +11 -11
@@ -136,16 +136,16 @@ extern const char *acpi_gbl_pt_decode[];#define ACPI_SMALL_VARIABLE_LENGTH 3typedef -acpi_status (*acpi_walk_aml_callback ) (u8 *aml, -u32 length, -u32 offset, -u8 resource_index,void **context); +acpi_status (*acpi_walk_aml_callback ) (u8 *aml, +u32 length, +u32 offset, +u8 resource_index,void **context);typedef -acpi_status (*acpi_pkg_callback ) (u8 object_type, -union acpi_operand_object *source_object, -union acpi_generic_state * state, -void *context); +acpi_status (*acpi_pkg_callback ) (u8 object_type, +union acpi_operand_object * source_object, +union acpi_generic_state * state, +void *context);struct acpi_pkg_info {u8 *free_space;
@@ -424,7 +424,7 @@ union acpi_operand_object *acpi_ut_create_buffer_object(acpi_size buffer_size);union acpi_operand_object *acpi_ut_create_string_object (acpi_size string_size);acpi_status -acpi_ut_get_object_size (union acpi_operand_object *obj,acpi_size * obj_length); +acpi_ut_get_object_size (union acpi_operand_object *obj,acpi_size *obj_length);/* * utosi - Support for the _OSI predefined control method
@@ -541,9 +541,9 @@ acpi_ut_display_init_pathname(u8 type,/* * utownerid - Support for Table/Method Owner IDs */ -acpi_status acpi_ut_allocate_owner_id (acpi_owner_id * owner_id); +acpi_status acpi_ut_allocate_owner_id (acpi_owner_id *owner_id); -void acpi_ut_release_owner_id (acpi_owner_id * owner_id); +void acpi_ut_release_owner_id (acpi_owner_id *owner_id);/* * utresrc
drivers/acpi/acpica/dbcmds.c +2 -2
@@ -738,9 +738,9 @@ acpi_dm_test_resource_conversion(struct acpi_namespace_node *node, char *name) original_aml = return_buffer.pointer;acpi_dm_compare_aml_resources (original_aml->buffer.pointer, - (acpi_rsdesc_size ) original_aml->buffer. + (acpi_rsdesc_size )original_aml->buffer. length, new_aml.pointer, - (acpi_rsdesc_size ) new_aml.length); + (acpi_rsdesc_size )new_aml.length);/* Cleanup and exit */
drivers/acpi/acpica/dbconvert.c +2 -2
@@ -194,7 +194,7 @@ acpi_db_convert_to_buffer(char *string, union acpi_object *object)* ******************************************************************************/ -acpi_status acpi_db_convert_to_package (char *string,union acpi_object * object) +acpi_status acpi_db_convert_to_package (char *string,union acpi_object *object) {char *this;char *next;
@@ -252,7 +252,7 @@ acpi_status acpi_db_convert_to_package(char *string, union acpi_object * object)acpi_status acpi_db_convert_to_object (acpi_object_type type, -char *string,union acpi_object * object) +char *string,union acpi_object *object) {acpi_status status =AE_OK ;
drivers/acpi/acpica/dbexec.c +1 -1
@@ -361,7 +361,7 @@ acpi_db_execution_walk(acpi_handle obj_handle,******************************************************************************/ void -acpi_db_execute (char *name,char **args,acpi_object_type * types,u32 flags) +acpi_db_execute (char *name,char **args,acpi_object_type *types,u32 flags) {acpi_status status;struct acpi_buffer return_obj;
drivers/acpi/acpica/dbinput.c +3 -3
@@ -466,7 +466,7 @@ static void acpi_db_display_help(char *command)******************************************************************************/ char *acpi_db_get_next_token (char *string, -char **next,acpi_object_type * return_type) +char **next,acpi_object_type *return_type) {char *start;u32 depth;
@@ -684,8 +684,8 @@ static u32 acpi_db_match_command(char *user_command)acpi_status acpi_db_command_dispatch (char *input_buffer, -struct acpi_walk_state * walk_state, -union acpi_parse_object * op) +struct acpi_walk_state *walk_state, +union acpi_parse_object *op) {u32 temp;u32 command_index;
drivers/acpi/acpica/dbnames.c +1 -1
@@ -285,7 +285,7 @@ void acpi_db_dump_namespace_by_owner(char *owner_arg, char *depth_arg)u32 max_depth =ACPI_UINT32_MAX ;acpi_owner_id owner_id; - owner_id = (acpi_owner_id )strtoul (owner_arg,NULL ,0 ); + owner_id = (acpi_owner_id )strtoul (owner_arg,NULL ,0 );/* Now we can check for the depth argument */
drivers/acpi/acpica/dbxface.c +2 -2
@@ -162,8 +162,8 @@ void acpi_db_signal_break_point(struct acpi_walk_state *walk_state)******************************************************************************/ acpi_status -acpi_db_single_step (struct acpi_walk_state * walk_state, -union acpi_parse_object * op,u32 opcode_class) +acpi_db_single_step (struct acpi_walk_state *walk_state, +union acpi_parse_object *op,u32 opcode_class) {union acpi_parse_object *next;acpi_status status =AE_OK ;
drivers/acpi/acpica/dscontrol.c +2 -2
@@ -163,8 +163,8 @@ acpi_ds_exec_begin_control_op(struct acpi_walk_state *walk_state,******************************************************************************/ acpi_status -acpi_ds_exec_end_control_op (struct acpi_walk_state * walk_state, -union acpi_parse_object * op) +acpi_ds_exec_end_control_op (struct acpi_walk_state *walk_state, +union acpi_parse_object *op) {acpi_status status =AE_OK ;union acpi_generic_state *control_state;
drivers/acpi/acpica/dsfield.c +2 -2
@@ -147,8 +147,8 @@ acpi_ds_create_external_region(acpi_status lookup_status,******************************************************************************/ acpi_status -acpi_ds_create_buffer_field (union acpi_parse_object * op, -struct acpi_walk_state * walk_state) +acpi_ds_create_buffer_field (union acpi_parse_object *op, +struct acpi_walk_state *walk_state) {union acpi_parse_object *arg;struct acpi_namespace_node *node;
drivers/acpi/acpica/dsinit.c +1 -1
@@ -188,7 +188,7 @@ acpi_ds_init_one_object(acpi_handle obj_handle,acpi_status acpi_ds_initialize_objects (u32 table_index, -struct acpi_namespace_node * start_node) +struct acpi_namespace_node *start_node) {acpi_status status;struct acpi_init_walk_info info;
drivers/acpi/acpica/dsmethod.c +1 -1
@@ -209,7 +209,7 @@ acpi_ds_detect_named_opcodes(struct acpi_walk_state *walk_state,******************************************************************************/ acpi_status -acpi_ds_method_error (acpi_status status,struct acpi_walk_state * walk_state) +acpi_ds_method_error (acpi_status status,struct acpi_walk_state *walk_state) {u32 aml_offset;
drivers/acpi/acpica/dsutils.c +1 -1
@@ -569,7 +569,7 @@ acpi_ds_create_operand(struct acpi_walk_state *walk_state,/* TBD: May only be temporary */ obj_desc = -acpi_ut_create_string_object ((acpi_size ) name_length); +acpi_ut_create_string_object ((acpi_size )name_length);strncpy (obj_desc->string.pointer, name_string, name_length);
drivers/acpi/acpica/dswload.c +2 -2
@@ -137,8 +137,8 @@ acpi_ds_init_callbacks(struct acpi_walk_state *walk_state, u32 pass_number)******************************************************************************/ acpi_status -acpi_ds_load1_begin_op (struct acpi_walk_state * walk_state, -union acpi_parse_object ** out_op) +acpi_ds_load1_begin_op (struct acpi_walk_state *walk_state, +union acpi_parse_object **out_op) {union acpi_parse_object *op;struct acpi_namespace_node *node;
drivers/acpi/acpica/dswload2.c +2 -2
@@ -490,8 +490,8 @@ acpi_status acpi_ds_load2_end_op(struct acpi_walk_state *walk_state) status =acpi_ds_create_index_field (op, - (acpi_handle ) arg-> - common.node, walk_state); + (acpi_handle )arg->common. + node, walk_state);break ;case AML_BANK_FIELD_OP :
drivers/acpi/acpica/dswstate.c +4 -4
@@ -144,7 +144,7 @@ acpi_ds_result_pop(union acpi_operand_object **object,acpi_status acpi_ds_result_push (union acpi_operand_object *object, -struct acpi_walk_state * walk_state) +struct acpi_walk_state *walk_state) {union acpi_generic_state *state;acpi_status status;
@@ -307,7 +307,7 @@ static acpi_status acpi_ds_result_stack_pop(struct acpi_walk_state *walk_state)******************************************************************************/ acpi_status -acpi_ds_obj_stack_push (void *object,struct acpi_walk_state * walk_state) +acpi_ds_obj_stack_push (void *object,struct acpi_walk_state *walk_state) {ACPI_FUNCTION_NAME (ds_obj_stack_push);
@@ -354,7 +354,7 @@ acpi_ds_obj_stack_push(void *object, struct acpi_walk_state * walk_state)******************************************************************************/ acpi_status -acpi_ds_obj_stack_pop (u32 pop_count,struct acpi_walk_state * walk_state) +acpi_ds_obj_stack_pop (u32 pop_count,struct acpi_walk_state *walk_state) {u32 i;
@@ -411,7 +411,7 @@ acpi_ds_obj_stack_pop_and_delete(u32 pop_count,return ; } -for (i = (s32 ) pop_count -1 ; i >=0 ; i--) { +for (i = (s32 )pop_count -1 ; i >=0 ; i--) {if (walk_state->num_operands ==0 ) {return ; }
drivers/acpi/acpica/evgpe.c +2 -2
@@ -440,7 +440,7 @@ u32 acpi_ev_gpe_detect(struct acpi_gpe_xrupt_info *gpe_xrupt_list) gpe_event_info = &gpe_block-> - event_info[((acpi_size ) i * + event_info[((acpi_size )i *ACPI_GPE_REGISTER_WIDTH ) + j]; gpe_number = j + gpe_register_info->base_gpe_number;
@@ -652,7 +652,7 @@ static void ACPI_SYSTEM_XFACE acpi_ev_asynch_enable_gpe(void *context)* ******************************************************************************/ -acpi_status acpi_ev_finish_gpe (struct acpi_gpe_event_info * gpe_event_info) +acpi_status acpi_ev_finish_gpe (struct acpi_gpe_event_info *gpe_event_info) {acpi_status status;
drivers/acpi/acpica/evgpeblk.c +2 -2
@@ -211,7 +211,7 @@ acpi_ev_create_gpe_info_blocks(struct acpi_gpe_block_info *gpe_block)/* Allocate the GPE register information block */ - gpe_register_info =ACPI_ALLOCATE_ZEROED ((acpi_size ) gpe_block-> + gpe_register_info =ACPI_ALLOCATE_ZEROED ((acpi_size )gpe_block-> register_count *sizeof (struct acpi_gpe_register_info ));
@@ -225,7 +225,7 @@ acpi_ev_create_gpe_info_blocks(struct acpi_gpe_block_info *gpe_block)* Allocate the GPE event_info block. There are eight distinct GPEs * per register. Initialization to zeros is sufficient. */ - gpe_event_info =ACPI_ALLOCATE_ZEROED ((acpi_size ) gpe_block->gpe_count * + gpe_event_info =ACPI_ALLOCATE_ZEROED ((acpi_size )gpe_block->gpe_count *sizeof (struct acpi_gpe_event_info ));if (!gpe_event_info) {
drivers/acpi/acpica/evgpeutil.c +2 -2
@@ -163,7 +163,7 @@ acpi_ev_get_gpe_device(struct acpi_gpe_xrupt_info *gpe_xrupt_info,acpi_status acpi_ev_get_gpe_xrupt_block (u32 interrupt_number, -struct acpi_gpe_xrupt_info ** gpe_xrupt_block) +struct acpi_gpe_xrupt_info **gpe_xrupt_block) {struct acpi_gpe_xrupt_info *next_gpe_xrupt;struct acpi_gpe_xrupt_info *gpe_xrupt;
@@ -320,7 +320,7 @@ acpi_ev_delete_gpe_handlers(struct acpi_gpe_xrupt_info *gpe_xrupt_info,/* Now look at the individual GPEs in this byte register */ for (j =0 ; j <ACPI_GPE_REGISTER_WIDTH ; j++) { - gpe_event_info = &gpe_block->event_info[((acpi_size ) i * + gpe_event_info = &gpe_block->event_info[((acpi_size )i *ACPI_GPE_REGISTER_WIDTH ) + j];
drivers/acpi/acpica/evhandler.c +1 -1
@@ -359,7 +359,7 @@ union acpi_operand_object *acpi_ev_find_region_handler(acpi_adr_space_type******************************************************************************/ acpi_status -acpi_ev_install_space_handler (struct acpi_namespace_node * node, +acpi_ev_install_space_handler (struct acpi_namespace_node *node,acpi_adr_space_type space_id,acpi_adr_space_handler handler,acpi_adr_space_setup setup,void *context)
drivers/acpi/acpica/evmisc.c +1 -2
@@ -99,8 +99,7 @@ u8 acpi_ev_is_notify_object(struct acpi_namespace_node *node)******************************************************************************/ acpi_status -acpi_ev_queue_notify_request (struct acpi_namespace_node * node, -u32 notify_value) +acpi_ev_queue_notify_request (struct acpi_namespace_node *node,u32 notify_value) {union acpi_operand_object *obj_desc;union acpi_operand_object *handler_list_head =NULL ;
drivers/acpi/acpica/evrgnini.c +1 -1
@@ -227,7 +227,7 @@ acpi_ev_pci_config_region_setup(acpi_handle handle,/* Install a handler for this PCI root bridge */ - status =acpi_install_address_space_handler ((acpi_handle ) pci_root_node,ACPI_ADR_SPACE_PCI_CONFIG ,ACPI_DEFAULT_HANDLER ,NULL ,NULL ); + status =acpi_install_address_space_handler ((acpi_handle )pci_root_node,ACPI_ADR_SPACE_PCI_CONFIG ,ACPI_DEFAULT_HANDLER ,NULL ,NULL );if (ACPI_FAILURE (status)) {if (status ==AE_SAME_HANDLER ) {/*
drivers/acpi/acpica/evxfgpe.c +1 -1
@@ -917,7 +917,7 @@ ACPI_EXPORT_SYMBOL(acpi_remove_gpe_block)* the FADT-defined gpe blocks. Otherwise, the GPE block device. * ******************************************************************************/ -acpi_status acpi_get_gpe_device (u32 index,acpi_handle * gpe_device) +acpi_status acpi_get_gpe_device (u32 index,acpi_handle *gpe_device) {struct acpi_gpe_device_info info;acpi_status status;
drivers/acpi/acpica/exconcat.c +2 -2
@@ -340,7 +340,7 @@ acpi_ex_convert_to_object_type_string(union acpi_operand_object *obj_desc, type_string =acpi_ut_get_type_name (obj_desc->common.type); - return_desc =acpi_ut_create_string_object (((acpi_size )strlen (type_string) +9 ));/* 9 For "[ Object]" */ + return_desc =acpi_ut_create_string_object (((acpi_size )strlen (type_string) +9 ));/* 9 For "[ Object]" */ if (!return_desc) {return (AE_NO_MEMORY ); }
@@ -372,7 +372,7 @@ acpi_status acpi_ex_concat_template(union acpi_operand_object *operand0, union acpi_operand_object *operand1, union acpi_operand_object **actual_return_desc, - struct acpi_walk_state * walk_state) + struct acpi_walk_state *walk_state) { acpi_status status;union acpi_operand_object *return_desc;
drivers/acpi/acpica/exconfig.c +1 -1
@@ -334,7 +334,7 @@ acpi_ex_region_read(union acpi_operand_object *obj_desc, u32 length, u8 *buffer)acpi_status acpi_ex_load_op (union acpi_operand_object *obj_desc,union acpi_operand_object *target, -struct acpi_walk_state * walk_state) +struct acpi_walk_state *walk_state) {union acpi_operand_object *ddb_handle;struct acpi_table_header *table_header;
drivers/acpi/acpica/exconvrt.c +2 -2
@@ -441,7 +441,7 @@ acpi_ex_convert_to_string(union acpi_operand_object * obj_desc,* Need enough space for one ASCII integer (plus null terminator) */ return_desc = -acpi_ut_create_string_object ((acpi_size ) string_length); +acpi_ut_create_string_object ((acpi_size )string_length);if (!return_desc) {return_ACPI_STATUS (AE_NO_MEMORY ); }
@@ -520,7 +520,7 @@ acpi_ex_convert_to_string(union acpi_operand_object * obj_desc, } return_desc = -acpi_ut_create_string_object ((acpi_size ) string_length); +acpi_ut_create_string_object ((acpi_size )string_length);if (!return_desc) {return_ACPI_STATUS (AE_NO_MEMORY ); }
drivers/acpi/acpica/excreate.c +1 -1
@@ -394,7 +394,7 @@ acpi_status acpi_ex_create_processor(struct acpi_walk_state *walk_state) obj_desc->processor.proc_id = (u8 ) operand[1 ]->integer.value; obj_desc->processor.length = (u8 ) operand[3 ]->integer.value; obj_desc->processor.address = - (acpi_io_address ) operand[2 ]->integer.value; + (acpi_io_address )operand[2 ]->integer.value;/* Install the processor object in the parent Node */
drivers/acpi/acpica/exfield.c +2 -2
@@ -126,7 +126,7 @@ acpi_ex_get_serial_access_length(u32 accessor_type, u32 access_length)******************************************************************************/ acpi_status -acpi_ex_read_data_from_field (struct acpi_walk_state * walk_state, +acpi_ex_read_data_from_field (struct acpi_walk_state *walk_state,union acpi_operand_object *obj_desc,union acpi_operand_object **ret_buffer_desc) {
@@ -233,7 +233,7 @@ acpi_ex_read_data_from_field(struct acpi_walk_state * walk_state,* Note: Field.length is in bits. */ length = - (acpi_size )ACPI_ROUND_BITS_UP_TO_BYTES (obj_desc->field.bit_length); + (acpi_size )ACPI_ROUND_BITS_UP_TO_BYTES (obj_desc->field.bit_length);if (length > acpi_gbl_integer_byte_width) {
drivers/acpi/acpica/exfldio.c +1 -1
@@ -164,7 +164,7 @@ acpi_ex_setup_region(union acpi_operand_object *obj_desc,if (ACPI_ROUND_UP (rgn_desc->region.length, obj_desc->common_field. access_byte_width) >= - ((acpi_size ) obj_desc->common_field. + ((acpi_size )obj_desc->common_field. base_byte_offset + obj_desc->common_field.access_byte_width + field_datum_byte_offset)) {
drivers/acpi/acpica/exoparg3.c +4 -4
@@ -184,7 +184,7 @@ acpi_status acpi_ex_opcode_3A_1T_1R(struct acpi_walk_state *walk_state)/* Get the Integer values from the objects */ index = operand[1 ]->integer.value; - length = (acpi_size ) operand[2 ]->integer.value; + length = (acpi_size )operand[2 ]->integer.value;/* * If the index is beyond the length of the String/Buffer, or if the
@@ -198,8 +198,8 @@ acpi_status acpi_ex_opcode_3A_1T_1R(struct acpi_walk_state *walk_state)else if ((index + length) > operand[0 ]->string.length) { length = - (acpi_size ) operand[0 ]->string.length - - (acpi_size ) index; + (acpi_size )operand[0 ]->string.length - + (acpi_size )index; }/* Strings always have a sub-pointer, not so for buffers */
@@ -209,7 +209,7 @@ acpi_status acpi_ex_opcode_3A_1T_1R(struct acpi_walk_state *walk_state)/* Always allocate a new buffer for the String */ - buffer =ACPI_ALLOCATE_ZEROED ((acpi_size ) length +1 ); + buffer =ACPI_ALLOCATE_ZEROED ((acpi_size )length +1 );if (!buffer) { status =AE_NO_MEMORY ; goto cleanup;
drivers/acpi/acpica/exoparg6.c +1 -1
@@ -207,7 +207,7 @@ acpi_ex_do_match(u32 match_op,* ******************************************************************************/ -acpi_status acpi_ex_opcode_6A_0T_1R (struct acpi_walk_state * walk_state) +acpi_status acpi_ex_opcode_6A_0T_1R (struct acpi_walk_state *walk_state) {union acpi_operand_object **operand = &walk_state->operands[0 ];union acpi_operand_object *return_desc =NULL ;
drivers/acpi/acpica/exregion.c +2 -2
@@ -325,14 +325,14 @@ acpi_ex_system_io_space_handler(u32 function,switch (function) {case ACPI_READ : - status =acpi_hw_read_port ((acpi_io_address ) address, + status =acpi_hw_read_port ((acpi_io_address )address, &value32, bit_width); *value = value32;break ;case ACPI_WRITE : - status =acpi_hw_write_port ((acpi_io_address ) address, + status =acpi_hw_write_port ((acpi_io_address )address, (u32)*value, bit_width);break ;
drivers/acpi/acpica/exresnte.c +2 -2
@@ -93,7 +93,7 @@ acpi_ex_resolve_node_to_value(struct acpi_namespace_node **object_ptr,*/ node = *object_ptr; source_desc =acpi_ns_get_attached_object (node); - entry_type =acpi_ns_get_type ((acpi_handle ) node); + entry_type =acpi_ns_get_type ((acpi_handle )node); ACPI_DEBUG_PRINT((ACPI_DB_EXEC, "Entry=%p SourceDesc=%p [%s]\n", node, source_desc,
@@ -106,7 +106,7 @@ acpi_ex_resolve_node_to_value(struct acpi_namespace_node **object_ptr, node = ACPI_CAST_PTR(struct acpi_namespace_node, node->object); source_desc =acpi_ns_get_attached_object (node); - entry_type =acpi_ns_get_type ((acpi_handle ) node); + entry_type =acpi_ns_get_type ((acpi_handle )node); *object_ptr = node; }
drivers/acpi/acpica/exresolv.c +1 -1
@@ -334,7 +334,7 @@ acpi_ex_resolve_object_to_value(union acpi_operand_object **stack_ptr,acpi_status acpi_ex_resolve_multiple (struct acpi_walk_state *walk_state,union acpi_operand_object *operand, -acpi_object_type * return_type, +acpi_object_type *return_type,union acpi_operand_object **return_desc) {union acpi_operand_object *obj_desc =ACPI_CAST_PTR (void, operand);
drivers/acpi/acpica/exresop.c +1 -1
@@ -132,7 +132,7 @@ acpi_ex_check_object_type(acpi_object_type type_needed,acpi_status acpi_ex_resolve_operands (u16 opcode,union acpi_operand_object **stack_ptr, -struct acpi_walk_state * walk_state) +struct acpi_walk_state *walk_state) {union acpi_operand_object *obj_desc;acpi_status status =AE_OK ;
drivers/acpi/acpica/exstorob.c +2 -2
@@ -188,7 +188,7 @@ acpi_ex_store_string_to_string(union acpi_operand_object *source_desc,* Clear old string and copy in the new one */ memset (target_desc->string.pointer,0 , - (acpi_size ) target_desc->string.length +1 ); + (acpi_size )target_desc->string.length +1 );memcpy (target_desc->string.pointer, buffer, length); }else {/*
@@ -204,7 +204,7 @@ acpi_ex_store_string_to_string(union acpi_operand_object *source_desc, } target_desc->string.pointer = -ACPI_ALLOCATE_ZEROED ((acpi_size ) length +1 ); +ACPI_ALLOCATE_ZEROED ((acpi_size )length +1 );if (!target_desc->string.pointer) {return_ACPI_STATUS (AE_NO_MEMORY );
drivers/acpi/acpica/hwgpe.c +8 -8
@@ -166,7 +166,7 @@ acpi_hw_low_set_gpe(struct acpi_gpe_event_info *gpe_event_info, u32 action)* ******************************************************************************/ -acpi_status acpi_hw_clear_gpe (struct acpi_gpe_event_info * gpe_event_info) +acpi_status acpi_hw_clear_gpe (struct acpi_gpe_event_info *gpe_event_info) {struct acpi_gpe_register_info *gpe_register_info;acpi_status status;
@@ -206,7 +206,7 @@ acpi_status acpi_hw_clear_gpe(struct acpi_gpe_event_info * gpe_event_info)******************************************************************************/ acpi_status -acpi_hw_get_gpe_status (struct acpi_gpe_event_info * gpe_event_info, +acpi_hw_get_gpe_status (struct acpi_gpe_event_info *gpe_event_info,acpi_event_status *event_status) {u32 in_byte;
@@ -315,8 +315,8 @@ acpi_hw_gpe_enable_write(u8 enable_mask,******************************************************************************/ acpi_status -acpi_hw_disable_gpe_block (struct acpi_gpe_xrupt_info * gpe_xrupt_info, -struct acpi_gpe_block_info * gpe_block,void *context) +acpi_hw_disable_gpe_block (struct acpi_gpe_xrupt_info *gpe_xrupt_info, +struct acpi_gpe_block_info *gpe_block,void *context) {u32 i;acpi_status status;
@@ -352,8 +352,8 @@ acpi_hw_disable_gpe_block(struct acpi_gpe_xrupt_info * gpe_xrupt_info,******************************************************************************/ acpi_status -acpi_hw_clear_gpe_block (struct acpi_gpe_xrupt_info * gpe_xrupt_info, -struct acpi_gpe_block_info * gpe_block,void *context) +acpi_hw_clear_gpe_block (struct acpi_gpe_xrupt_info *gpe_xrupt_info, +struct acpi_gpe_block_info *gpe_block,void *context) {u32 i;acpi_status status;
@@ -390,8 +390,8 @@ acpi_hw_clear_gpe_block(struct acpi_gpe_xrupt_info * gpe_xrupt_info,******************************************************************************/ acpi_status -acpi_hw_enable_runtime_gpe_block (struct acpi_gpe_xrupt_info * gpe_xrupt_info, -struct acpi_gpe_block_info * gpe_block, +acpi_hw_enable_runtime_gpe_block (struct acpi_gpe_xrupt_info *gpe_xrupt_info, +struct acpi_gpe_block_info *gpe_block,void *context) {u32 i;
drivers/acpi/acpica/hwregs.c +2 -2
@@ -157,7 +157,7 @@ acpi_hw_validate_register(struct acpi_generic_address *reg,* ******************************************************************************/ -acpi_status acpi_hw_read (u32 *value,struct acpi_generic_address * reg) +acpi_status acpi_hw_read (u32 *value,struct acpi_generic_address *reg) {u64 address;u64 value64;
@@ -214,7 +214,7 @@ acpi_status acpi_hw_read(u32 *value, struct acpi_generic_address * reg)* ******************************************************************************/ -acpi_status acpi_hw_write (u32 value,struct acpi_generic_address * reg) +acpi_status acpi_hw_write (u32 value,struct acpi_generic_address *reg) {u64 address;acpi_status status;
drivers/acpi/acpica/hwxface.c +4 -5
@@ -91,10 +91,9 @@ acpi_status acpi_reset(void)* compatibility with other ACPI implementations that have allowed * BIOS code with bad register width values to go unnoticed. */ - status = -acpi_os_write_port ((acpi_io_address ) reset_reg->address, - acpi_gbl_FADT.reset_value, -ACPI_RESET_REGISTER_WIDTH ); + status =acpi_os_write_port ((acpi_io_address )reset_reg->address, + acpi_gbl_FADT.reset_value, +ACPI_RESET_REGISTER_WIDTH ); }else {/* Write the reset value to the reset register */
@@ -212,7 +211,7 @@ ACPI_EXPORT_SYMBOL(acpi_read)* DESCRIPTION: Write to either memory or IO space. * ******************************************************************************/ -acpi_status acpi_write (u64 value,struct acpi_generic_address * reg) +acpi_status acpi_write (u64 value,struct acpi_generic_address *reg) {u32 width;u64 address;
drivers/acpi/acpica/nsconvert.c +3 -3
@@ -318,7 +318,7 @@ acpi_ns_convert_to_buffer(union acpi_operand_object *original_object,******************************************************************************/ acpi_status -acpi_ns_convert_to_unicode (struct acpi_namespace_node * scope, +acpi_ns_convert_to_unicode (struct acpi_namespace_node *scope,union acpi_operand_object *original_object,union acpi_operand_object **return_object) {
@@ -385,7 +385,7 @@ acpi_ns_convert_to_unicode(struct acpi_namespace_node * scope,******************************************************************************/ acpi_status -acpi_ns_convert_to_resource (struct acpi_namespace_node * scope, +acpi_ns_convert_to_resource (struct acpi_namespace_node *scope,union acpi_operand_object *original_object,union acpi_operand_object **return_object) {
@@ -464,7 +464,7 @@ acpi_ns_convert_to_resource(struct acpi_namespace_node * scope,******************************************************************************/ acpi_status -acpi_ns_convert_to_reference (struct acpi_namespace_node * scope, +acpi_ns_convert_to_reference (struct acpi_namespace_node *scope,union acpi_operand_object *original_object,union acpi_operand_object **return_object) {
drivers/acpi/acpica/nsnames.c +1 -1
@@ -113,7 +113,7 @@ acpi_size acpi_ns_get_pathname_length(struct acpi_namespace_node *node)acpi_status acpi_ns_handle_to_pathname (acpi_handle target_handle, -struct acpi_buffer * buffer,u8 no_trailing) +struct acpi_buffer *buffer,u8 no_trailing) {acpi_status status;struct acpi_namespace_node *node;
drivers/acpi/acpica/nsobject.c +2 -2
@@ -399,7 +399,7 @@ acpi_ns_attach_data(struct acpi_namespace_node *node,******************************************************************************/ acpi_status -acpi_ns_detach_data (struct acpi_namespace_node * node, +acpi_ns_detach_data (struct acpi_namespace_node *node,acpi_object_handler handler) {union acpi_operand_object *obj_desc;
@@ -444,7 +444,7 @@ acpi_ns_detach_data(struct acpi_namespace_node * node,******************************************************************************/ acpi_status -acpi_ns_get_attached_data (struct acpi_namespace_node * node, +acpi_ns_get_attached_data (struct acpi_namespace_node *node,acpi_object_handler handler,void **data) {union acpi_operand_object *obj_desc;
drivers/acpi/acpica/nspredef.c +1 -1
@@ -220,7 +220,7 @@ exit:******************************************************************************/ acpi_status -acpi_ns_check_object_type (struct acpi_evaluate_info * info, +acpi_ns_check_object_type (struct acpi_evaluate_info *info,union acpi_operand_object **return_object_ptr,u32 expected_btypes,u32 package_index) {
drivers/acpi/acpica/nsrepair.c +1 -1
@@ -399,7 +399,7 @@ static const struct acpi_simple_repair_info *acpi_ns_match_simple_repair(struct******************************************************************************/ acpi_status -acpi_ns_repair_null_element (struct acpi_evaluate_info * info, +acpi_ns_repair_null_element (struct acpi_evaluate_info *info,u32 expected_btypes,u32 package_index,union acpi_operand_object **return_object_ptr)
drivers/acpi/acpica/nsrepair2.c +3 -3
@@ -54,9 +54,9 @@ ACPI_MODULE_NAME("nsrepair2")* be repaired on a per-name basis. */ typedef -acpi_status (*acpi_repair_function ) (struct acpi_evaluate_info * info, -union acpi_operand_object - **return_object_ptr); +acpi_status (*acpi_repair_function ) (struct acpi_evaluate_info * info, +union acpi_operand_object ** + return_object_ptr); typedef struct acpi_repair_info { char name[ACPI_NAME_SIZE];
drivers/acpi/acpica/nsutils.c +4 -4
@@ -272,11 +272,11 @@ acpi_status acpi_ns_build_internal_name(struct acpi_namestring_info *info) result = &internal_name[i]; }else if (num_segments ==2 ) { internal_name[i] =AML_DUAL_NAME_PREFIX ; - result = &internal_name[(acpi_size ) i +1 ]; + result = &internal_name[(acpi_size )i +1 ]; }else { internal_name[i] =AML_MULTI_NAME_PREFIX_OP ; - internal_name[(acpi_size ) i +1 ] = (char )num_segments; - result = &internal_name[(acpi_size ) i +2 ]; + internal_name[(acpi_size )i +1 ] = (char )num_segments; + result = &internal_name[(acpi_size )i +2 ]; } }
@@ -456,7 +456,7 @@ acpi_ns_externalize_name(u32 internal_name_length, names_index = prefix_length +2 ; num_segments = (u8 ) - internal_name[(acpi_size ) prefix_length +1 ]; + internal_name[(acpi_size )prefix_length +1 ];break ;case AML_DUAL_NAME_PREFIX :
drivers/acpi/acpica/nsxfeval.c +1 -1
@@ -256,7 +256,7 @@ acpi_evaluate_object(acpi_handle handle,* Allocate a new parameter block for the internal objects * Add 1 to count to allow for null terminated internal list */ - info->parameters =ACPI_ALLOCATE_ZEROED (((acpi_size ) info-> + info->parameters =ACPI_ALLOCATE_ZEROED (((acpi_size )info-> param_count +1 ) *sizeof (void *));if (!info->parameters) {
drivers/acpi/acpica/nsxfname.c +4 -4
@@ -78,7 +78,7 @@ static char *acpi_ns_copy_device_id(struct acpi_pnp_device_id *dest,acpi_status acpi_get_handle (acpi_handle parent, -acpi_string pathname,acpi_handle * ret_handle) +acpi_string pathname,acpi_handle *ret_handle) {acpi_status status;struct acpi_namespace_node *node =NULL ;
@@ -155,7 +155,7 @@ ACPI_EXPORT_SYMBOL(acpi_get_handle)* ******************************************************************************/ acpi_status -acpi_get_name (acpi_handle handle,u32 name_type,struct acpi_buffer * buffer) +acpi_get_name (acpi_handle handle,u32 name_type,struct acpi_buffer *buffer) {acpi_status status;struct acpi_namespace_node *node;
@@ -278,7 +278,7 @@ static char *acpi_ns_copy_device_id(struct acpi_pnp_device_id *dest,acpi_status acpi_get_object_info (acpi_handle handle, -struct acpi_device_info ** return_buffer) +struct acpi_device_info **return_buffer) {struct acpi_namespace_node *node;struct acpi_device_info *info;
@@ -448,7 +448,7 @@ acpi_get_object_info(acpi_handle handle,/* Point past the CID PNP_DEVICE_ID array */ next_id_string += - ((acpi_size ) cid_list->count * + ((acpi_size )cid_list->count *sizeof (struct acpi_pnp_device_id )); }
drivers/acpi/acpica/nsxfobj.c +3 -3
@@ -63,7 +63,7 @@ ACPI_MODULE_NAME("nsxfobj")* DESCRIPTION: This routine returns the type associatd with a particular handle * ******************************************************************************/ -acpi_status acpi_get_type (acpi_handle handle,acpi_object_type * ret_type) +acpi_status acpi_get_type (acpi_handle handle,acpi_object_type *ret_type) {struct acpi_namespace_node *node;acpi_status status;
@@ -115,7 +115,7 @@ ACPI_EXPORT_SYMBOL(acpi_get_type)* Handle. * ******************************************************************************/ -acpi_status acpi_get_parent (acpi_handle handle,acpi_handle * ret_handle) +acpi_status acpi_get_parent (acpi_handle handle,acpi_handle *ret_handle) {struct acpi_namespace_node *node;struct acpi_namespace_node *parent_node;
@@ -183,7 +183,7 @@ ACPI_EXPORT_SYMBOL(acpi_get_parent)acpi_status acpi_get_next_object (acpi_object_type type,acpi_handle parent, -acpi_handle child,acpi_handle * ret_handle) +acpi_handle child,acpi_handle *ret_handle) {acpi_status status;struct acpi_namespace_node *node;
drivers/acpi/acpica/psargs.c +1 -1
@@ -87,7 +87,7 @@ acpi_ps_get_next_package_length(struct acpi_parse_state *parser_state)* used to encode the package length, either 0,1,2, or 3 */ byte_count = (aml[0 ] >>6 ); - parser_state->aml += ((acpi_size ) byte_count +1 ); + parser_state->aml += ((acpi_size )byte_count +1 );/* Get bytes 3, 2, 1 as needed */
drivers/acpi/acpica/psparse.c +2 -2
@@ -130,8 +130,8 @@ u16 acpi_ps_peek_opcode(struct acpi_parse_state * parser_state)******************************************************************************/ acpi_status -acpi_ps_complete_this_op (struct acpi_walk_state * walk_state, -union acpi_parse_object * op) +acpi_ps_complete_this_op (struct acpi_walk_state *walk_state, +union acpi_parse_object *op) {union acpi_parse_object *prev;union acpi_parse_object *next;
drivers/acpi/acpica/psxface.c +1 -1
@@ -115,7 +115,7 @@ acpi_debug_trace(const char *name, u32 debug_level, u32 debug_layer, u32 flags)* ******************************************************************************/ -acpi_status acpi_ps_execute_method (struct acpi_evaluate_info * info) +acpi_status acpi_ps_execute_method (struct acpi_evaluate_info *info) {acpi_status status;union acpi_parse_object *op;
drivers/acpi/acpica/rscalc.c +44 -44
147 lines not on this page · raw message
drivers/acpi/acpica/rscreate.c +1 -1
@@ -347,7 +347,7 @@ acpi_rs_create_pci_routing_table(union acpi_operand_object *package_object, (u8 *) output_buffer->pointer); path_buffer.pointer = user_prt->source; - status =acpi_ns_handle_to_pathname ((acpi_handle ) node, &path_buffer, FALSE); + status =acpi_ns_handle_to_pathname ((acpi_handle )node, &path_buffer, FALSE);/* +1 to include null terminator */
drivers/acpi/acpica/rsmisc.c +1 -1
@@ -87,7 +87,7 @@ acpi_rs_convert_aml_to_resource(struct acpi_resource *resource,return_ACPI_STATUS (AE_BAD_PARAMETER ); } -if (((acpi_size ) resource) &0x3 ) { +if (((acpi_size )resource) &0x3 ) {/* Each internal resource struct is expected to be 32-bit aligned */
drivers/acpi/acpica/rsutils.c +6 -6
@@ -338,7 +338,7 @@ acpi_rs_get_resource_source(acpi_rs_length resource_length,* Note: Some resource descriptors will have an additional null, so * we add 1 to the minimum length. */ -if (total_length > (acpi_rsdesc_size) (minimum_length +1 )) { +if (total_length > (acpi_rsdesc_size)(minimum_length +1 )) {/* Get the resource_source_index */
@@ -377,7 +377,7 @@ acpi_rs_get_resource_source(acpi_rs_length resource_length,ACPI_CAST_PTR (char, &aml_resource_source[1])); -return ((acpi_rs_length ) total_length); +return ((acpi_rs_length )total_length); }/* resource_source is not present */
@@ -406,9 +406,9 @@ acpi_rs_get_resource_source(acpi_rs_length resource_length,******************************************************************************/ acpi_rsdesc_size -acpi_rs_set_resource_source (union aml_resource * aml, +acpi_rs_set_resource_source (union aml_resource *aml,acpi_rs_length minimum_length, -struct acpi_resource_source * resource_source) +struct acpi_resource_source *resource_source) {u8 *aml_resource_source;acpi_rsdesc_size descriptor_length;
@@ -466,8 +466,8 @@ acpi_rs_set_resource_source(union aml_resource * aml,******************************************************************************/ acpi_status -acpi_rs_get_prt_method_data (struct acpi_namespace_node * node, -struct acpi_buffer * ret_buffer) +acpi_rs_get_prt_method_data (struct acpi_namespace_node *node, +struct acpi_buffer *ret_buffer) {union acpi_operand_object *obj_desc;acpi_status status;
drivers/acpi/acpica/rsxface.c +3 -3
@@ -433,8 +433,8 @@ ACPI_EXPORT_SYMBOL(acpi_resource_to_address64)acpi_status acpi_get_vendor_resource (acpi_handle device_handle,char *name, -struct acpi_vendor_uuid * uuid, -struct acpi_buffer * ret_buffer) +struct acpi_vendor_uuid *uuid, +struct acpi_buffer *ret_buffer) {struct acpi_vendor_walk_info info;acpi_status status;
@@ -539,7 +539,7 @@ acpi_rs_match_vendor_resource(struct acpi_resource *resource, void *context)******************************************************************************/ acpi_status -acpi_walk_resource_buffer (struct acpi_buffer * buffer, +acpi_walk_resource_buffer (struct acpi_buffer *buffer,acpi_walk_resource_callback user_function,void *context) {
drivers/acpi/acpica/tbdata.c +4 -5
@@ -368,7 +368,7 @@ acpi_status acpi_tb_validate_temp_table(struct acpi_table_desc *table_desc)*****************************************************************************/ acpi_status -acpi_tb_verify_temp_table (struct acpi_table_desc * table_desc,char *signature) +acpi_tb_verify_temp_table (struct acpi_table_desc *table_desc,char *signature) {acpi_status status =AE_OK ;
@@ -454,7 +454,7 @@ acpi_status acpi_tb_resize_root_table_list(void) table_count = acpi_gbl_root_table_list.current_table_count; } - tables =ACPI_ALLOCATE_ZEROED (((acpi_size ) table_count + + tables =ACPI_ALLOCATE_ZEROED (((acpi_size )table_count +ACPI_ROOT_TABLE_SIZE_INCREMENT ) *sizeof (struct acpi_table_desc ));if (!tables) {
@@ -467,8 +467,7 @@ acpi_status acpi_tb_resize_root_table_list(void)if (acpi_gbl_root_table_list.tables) {memcpy (tables, acpi_gbl_root_table_list.tables, - (acpi_size ) table_count * -sizeof (struct acpi_table_desc )); + (acpi_size )table_count *sizeof (struct acpi_table_desc ));if (acpi_gbl_root_table_list.flags &ACPI_ROOT_ORIGIN_ALLOCATED ) {ACPI_FREE (acpi_gbl_root_table_list.tables);
@@ -701,7 +700,7 @@ acpi_status acpi_tb_release_owner_id(u32 table_index)* ******************************************************************************/ -acpi_status acpi_tb_get_owner_id (u32 table_index,acpi_owner_id * owner_id) +acpi_status acpi_tb_get_owner_id (u32 table_index,acpi_owner_id *owner_id) {acpi_status status =AE_BAD_PARAMETER ;
drivers/acpi/acpica/tbfadt.c +1 -1
@@ -344,7 +344,7 @@ void acpi_tb_parse_fadt(void)/* Obtain the DSDT and FACS tables via their addresses within the FADT */ -acpi_tb_install_fixed_table ((acpi_physical_address ) acpi_gbl_FADT.Xdsdt, +acpi_tb_install_fixed_table ((acpi_physical_address )acpi_gbl_FADT.Xdsdt,ACPI_SIG_DSDT , &acpi_gbl_dsdt_index);/* If Hardware Reduced flag is set, there is no FACS */
drivers/acpi/acpica/tbutils.c +3 -3
@@ -231,7 +231,7 @@ acpi_tb_get_root_table_entry(u8 *table_entry, u32 table_entry_size) ACPI_FORMAT_UINT64(address64))); }#endif -return ((acpi_physical_address) (address64)); +return ((acpi_physical_address)(address64)); } }
@@ -287,12 +287,12 @@ acpi_status __init acpi_tb_parse_root_table(acpi_physical_address rsdp_address)* the XSDT if the revision is > 1 and the XSDT pointer is present, * as per the ACPI specification. */ - address = (acpi_physical_address ) rsdp->xsdt_physical_address; + address = (acpi_physical_address )rsdp->xsdt_physical_address; table_entry_size =ACPI_XSDT_ENTRY_SIZE ; }else {/* Root table is an RSDT (32-bit physical addresses) */ - address = (acpi_physical_address ) rsdp->rsdt_physical_address; + address = (acpi_physical_address )rsdp->rsdt_physical_address; table_entry_size =ACPI_RSDT_ENTRY_SIZE ; }
drivers/acpi/acpica/tbxface.c +4 -4
@@ -99,7 +99,7 @@ acpi_status acpi_allocate_root_table(u32 initial_table_count)******************************************************************************/ acpi_status __init -acpi_initialize_tables (struct acpi_table_desc * initial_table_array, +acpi_initialize_tables (struct acpi_table_desc *initial_table_array,u32 initial_table_count,u8 allow_resize) {acpi_physical_address rsdp_address;
@@ -120,7 +120,7 @@ acpi_initialize_tables(struct acpi_table_desc * initial_table_array,/* Root Table Array has been statically allocated by the host */ memset (initial_table_array,0 , - (acpi_size ) initial_table_count * + (acpi_size )initial_table_count *sizeof (struct acpi_table_desc )); acpi_gbl_root_table_list.tables = initial_table_array;
@@ -328,7 +328,7 @@ ACPI_EXPORT_SYMBOL(acpi_get_table_with_size)acpi_status acpi_get_table (char *signature, -u32 instance,struct acpi_table_header ** out_table) +u32 instance,struct acpi_table_header **out_table) {acpi_size tbl_size;
@@ -352,7 +352,7 @@ ACPI_EXPORT_SYMBOL(acpi_get_table)* ******************************************************************************/ acpi_status -acpi_get_table_by_index (u32 table_index,struct acpi_table_header ** table) +acpi_get_table_by_index (u32 table_index,struct acpi_table_header **table) {acpi_status status;
drivers/acpi/acpica/tbxfroot.c +4 -4
@@ -90,7 +90,7 @@ u32 acpi_tb_get_rsdp_length(struct acpi_table_rsdp *rsdp)* ******************************************************************************/ -acpi_status acpi_tb_validate_rsdp (struct acpi_table_rsdp * rsdp) +acpi_status acpi_tb_validate_rsdp (struct acpi_table_rsdp *rsdp) {/*
@@ -142,7 +142,7 @@ acpi_status acpi_tb_validate_rsdp(struct acpi_table_rsdp * rsdp)* ******************************************************************************/ -acpi_status __init acpi_find_root_pointer (acpi_physical_address * table_address) +acpi_status __init acpi_find_root_pointer (acpi_physical_address *table_address) {u8 *table_ptr;u8 *mem_rover;
@@ -201,7 +201,7 @@ acpi_status __init acpi_find_root_pointer(acpi_physical_address * table_address) (u32 )ACPI_PTR_DIFF (mem_rover, table_ptr); *table_address = - (acpi_physical_address ) physical_address; + (acpi_physical_address )physical_address;return_ACPI_STATUS (AE_OK ); } }
@@ -234,7 +234,7 @@ acpi_status __init acpi_find_root_pointer(acpi_physical_address * table_address) (ACPI_HI_RSDP_WINDOW_BASE +ACPI_PTR_DIFF (mem_rover, table_ptr)); - *table_address = (acpi_physical_address ) physical_address; + *table_address = (acpi_physical_address )physical_address;return_ACPI_STATUS (AE_OK ); }
drivers/acpi/acpica/utalloc.c +2 -3
@@ -231,7 +231,7 @@ acpi_status acpi_ut_delete_caches(void)* ******************************************************************************/ -acpi_status acpi_ut_validate_buffer (struct acpi_buffer * buffer) +acpi_status acpi_ut_validate_buffer (struct acpi_buffer *buffer) {/* Obviously, the structure pointer must be valid */
@@ -272,8 +272,7 @@ acpi_status acpi_ut_validate_buffer(struct acpi_buffer * buffer)******************************************************************************/ acpi_status -acpi_ut_initialize_buffer (struct acpi_buffer * buffer, -acpi_size required_length) +acpi_ut_initialize_buffer (struct acpi_buffer *buffer,acpi_size required_length) {acpi_size input_buffer_length;
drivers/acpi/acpica/utbuffer.c +12 -12
@@ -106,31 +106,31 @@ void acpi_ut_dump_buffer(u8 *buffer, u32 count, u32 display, u32 base_offset)default :/* Default is BYTE display */ acpi_os_printf ("%02X " , - buffer[(acpi_size ) i + j]); + buffer[(acpi_size )i + j]);break ;case DB_WORD_DISPLAY :ACPI_MOVE_16_TO_32 (&temp32, - &buffer[(acpi_size ) i + j]); + &buffer[(acpi_size )i + j]);acpi_os_printf ("%04X " , temp32);break ;case DB_DWORD_DISPLAY :ACPI_MOVE_32_TO_32 (&temp32, - &buffer[(acpi_size ) i + j]); + &buffer[(acpi_size )i + j]);acpi_os_printf ("%08X " , temp32);break ;case DB_QWORD_DISPLAY :ACPI_MOVE_32_TO_32 (&temp32, - &buffer[(acpi_size ) i + j]); + &buffer[(acpi_size )i + j]);acpi_os_printf ("%08X" , temp32);ACPI_MOVE_32_TO_32 (&temp32, - &buffer[(acpi_size ) i + j + + &buffer[(acpi_size )i + j +4 ]);acpi_os_printf ("%08X " , temp32);break ;
@@ -158,7 +158,7 @@ void acpi_ut_dump_buffer(u8 *buffer, u32 count, u32 display, u32 base_offset)acpi_os_printf ("// " ); } - buf_char = buffer[(acpi_size ) i + j]; + buf_char = buffer[(acpi_size )i + j];if (isprint (buf_char)) {acpi_os_printf ("%c" , buf_char); }else {
@@ -274,31 +274,31 @@ acpi_ut_dump_buffer_to_file(ACPI_FILE file,default :/* Default is BYTE display */ acpi_ut_file_printf (file,"%02X " , - buffer[(acpi_size ) i + j]); + buffer[(acpi_size )i + j]);break ;case DB_WORD_DISPLAY :ACPI_MOVE_16_TO_32 (&temp32, - &buffer[(acpi_size ) i + j]); + &buffer[(acpi_size )i + j]);acpi_ut_file_printf (file,"%04X " , temp32);break ;case DB_DWORD_DISPLAY :ACPI_MOVE_32_TO_32 (&temp32, - &buffer[(acpi_size ) i + j]); + &buffer[(acpi_size )i + j]);acpi_ut_file_printf (file,"%08X " , temp32);break ;case DB_QWORD_DISPLAY :ACPI_MOVE_32_TO_32 (&temp32, - &buffer[(acpi_size ) i + j]); + &buffer[(acpi_size )i + j]);acpi_ut_file_printf (file,"%08X" , temp32);ACPI_MOVE_32_TO_32 (&temp32, - &buffer[(acpi_size ) i + j + + &buffer[(acpi_size )i + j +4 ]);acpi_ut_file_printf (file,"%08X " , temp32);break ;
@@ -318,7 +318,7 @@ acpi_ut_dump_buffer_to_file(ACPI_FILE file,return ; } - buf_char = buffer[(acpi_size ) i + j]; + buf_char = buffer[(acpi_size )i + j];if (isprint (buf_char)) {acpi_ut_file_printf (file,"%c" , buf_char); }else {
drivers/acpi/acpica/utcache.c +3 -4
@@ -105,7 +105,7 @@ acpi_os_create_cache(char *cache_name,* ******************************************************************************/ -acpi_status acpi_os_purge_cache (struct acpi_memory_list * cache) +acpi_status acpi_os_purge_cache (struct acpi_memory_list *cache) {void *next;acpi_status status;
@@ -151,7 +151,7 @@ acpi_status acpi_os_purge_cache(struct acpi_memory_list * cache)* ******************************************************************************/ -acpi_status acpi_os_delete_cache (struct acpi_memory_list * cache) +acpi_status acpi_os_delete_cache (struct acpi_memory_list *cache) {acpi_status status;
@@ -184,8 +184,7 @@ acpi_status acpi_os_delete_cache(struct acpi_memory_list * cache)* ******************************************************************************/ -acpi_status -acpi_os_release_object (struct acpi_memory_list * cache,void *object) +acpi_status acpi_os_release_object (struct acpi_memory_list *cache,void *object) {acpi_status status;
drivers/acpi/acpica/utcopy.c +8 -8
@@ -53,7 +53,7 @@ ACPI_MODULE_NAME("utcopy")static acpi_status acpi_ut_copy_isimple_to_esimple (union acpi_operand_object *internal_object,union acpi_object *external_object, -u8 *data_space,acpi_size * buffer_space_used); +u8 *data_space,acpi_size *buffer_space_used); static acpi_status acpi_ut_copy_ielement_to_ielement(u8 object_type,
@@ -63,7 +63,7 @@ acpi_ut_copy_ielement_to_ielement(u8 object_type,static acpi_status acpi_ut_copy_ipackage_to_epackage (union acpi_operand_object *internal_object, -u8 *buffer,acpi_size * space_used); +u8 *buffer,acpi_size *space_used); static acpi_status acpi_ut_copy_esimple_to_isimple(union acpi_object *user_obj,
@@ -111,7 +111,7 @@ acpi_ut_copy_ipackage_to_ipackage(union acpi_operand_object *source_obj,static acpi_status acpi_ut_copy_isimple_to_esimple (union acpi_operand_object *internal_object,union acpi_object *external_object, -u8 *data_space,acpi_size * buffer_space_used) +u8 *data_space,acpi_size *buffer_space_used) {acpi_status status =AE_OK ;
@@ -151,7 +151,7 @@ acpi_ut_copy_isimple_to_esimple(union acpi_operand_object *internal_object,memcpy ((void *)data_space, (void *)internal_object->string.pointer, - (acpi_size ) internal_object->string.length +1 ); + (acpi_size )internal_object->string.length +1 );break ;case ACPI_TYPE_BUFFER :
@@ -331,7 +331,7 @@ acpi_ut_copy_ielement_to_eelement(u8 object_type,static acpi_status acpi_ut_copy_ipackage_to_epackage (union acpi_operand_object *internal_object, -u8 *buffer,acpi_size * space_used) +u8 *buffer,acpi_size *space_used) {union acpi_object *external_object;acpi_status status;
@@ -362,7 +362,7 @@ acpi_ut_copy_ipackage_to_epackage(union acpi_operand_object *internal_object,* Leave room for an array of ACPI_OBJECTS in the buffer * and move the free space past it */ - info.length += (acpi_size ) external_object->package.count * + info.length += (acpi_size )external_object->package.count *ACPI_ROUND_UP_TO_NATIVE_WORD (sizeof (union acpi_object )); info.free_space += external_object->package.count *ACPI_ROUND_UP_TO_NATIVE_WORD (sizeof (union acpi_object ));
@@ -738,7 +738,7 @@ acpi_ut_copy_simple_object(union acpi_operand_object *source_desc,*/ if (source_desc->string.pointer) { dest_desc->string.pointer = -ACPI_ALLOCATE ((acpi_size ) source_desc->string. +ACPI_ALLOCATE ((acpi_size )source_desc->string. length +1 );if (!dest_desc->string.pointer) {return (AE_NO_MEMORY );
@@ -748,7 +748,7 @@ acpi_ut_copy_simple_object(union acpi_operand_object *source_desc,memcpy (dest_desc->string.pointer, source_desc->string.pointer, - (acpi_size ) source_desc->string.length +1 ); + (acpi_size )source_desc->string.length +1 ); }break ;
drivers/acpi/acpica/utids.c +4 -4
@@ -95,7 +95,7 @@ acpi_ut_execute_HID(struct acpi_namespace_node *device_node, hid =ACPI_ALLOCATE_ZEROED (sizeof (struct acpi_pnp_device_id ) + - (acpi_size ) length); + (acpi_size )length);if (!hid) { status =AE_NO_MEMORY ; goto cleanup;
@@ -173,7 +173,7 @@ acpi_ut_execute_UID(struct acpi_namespace_node *device_node, uid =ACPI_ALLOCATE_ZEROED (sizeof (struct acpi_pnp_device_id ) + - (acpi_size ) length); + (acpi_size )length);if (!uid) { status =AE_NO_MEMORY ; goto cleanup;
@@ -309,7 +309,7 @@ acpi_ut_execute_CID(struct acpi_namespace_node *device_node,/* Area for CID strings starts after the CID PNP_DEVICE_ID array */ next_id_string =ACPI_CAST_PTR (char, cid_list->ids) + - ((acpi_size ) count *sizeof (struct acpi_pnp_device_id )); + ((acpi_size )count *sizeof (struct acpi_pnp_device_id ));/* Copy/convert the CIDs to the return buffer */
@@ -413,7 +413,7 @@ acpi_ut_execute_CLS(struct acpi_namespace_node *device_node, cls =ACPI_ALLOCATE_ZEROED (sizeof (struct acpi_pnp_device_id ) + - (acpi_size ) length); + (acpi_size )length);if (!cls) { status =AE_NO_MEMORY ; goto cleanup;
drivers/acpi/acpica/utlock.c +2 -2
@@ -124,7 +124,7 @@ acpi_status acpi_ut_acquire_read_lock(struct acpi_rw_lock *lock)return (status); } -acpi_status acpi_ut_release_read_lock (struct acpi_rw_lock * lock) +acpi_status acpi_ut_release_read_lock (struct acpi_rw_lock *lock) {acpi_status status;
@@ -160,7 +160,7 @@ acpi_status acpi_ut_release_read_lock(struct acpi_rw_lock * lock)* ******************************************************************************/ -acpi_status acpi_ut_acquire_write_lock (struct acpi_rw_lock * lock) +acpi_status acpi_ut_acquire_write_lock (struct acpi_rw_lock *lock) {acpi_status status;
drivers/acpi/acpica/utmath.c +2 -2
@@ -236,8 +236,8 @@ acpi_ut_divide(u64 in_dividend, } remainder.full = remainder.full - dividend.full; - remainder.part.hi = (u32)-((s32 ) remainder.part.hi); - remainder.part.lo = (u32)-((s32 ) remainder.part.lo); + remainder.part.hi = (u32)-((s32 )remainder.part.hi); + remainder.part.lo = (u32)-((s32 )remainder.part.lo);if (remainder.part.lo) { remainder.part.hi--;
drivers/acpi/acpica/utobject.c +9 -9
@@ -51,11 +51,11 @@ ACPI_MODULE_NAME("utobject")/* Local prototypes */ static acpi_status acpi_ut_get_simple_object_size (union acpi_operand_object *obj, -acpi_size * obj_length); +acpi_size *obj_length);static acpi_status acpi_ut_get_package_object_size (union acpi_operand_object *obj, -acpi_size * obj_length); +acpi_size *obj_length); static acpi_status acpi_ut_get_element_length(u8 object_type,
@@ -177,7 +177,7 @@ union acpi_operand_object *acpi_ut_create_package_object(u32 count)* Create the element array. Count+1 allows the array to be null * terminated. */ - package_elements =ACPI_ALLOCATE_ZEROED (((acpi_size ) count + + package_elements =ACPI_ALLOCATE_ZEROED (((acpi_size )count +1 ) *sizeof (void *));if (!package_elements) {ACPI_FREE (package_desc);
@@ -454,7 +454,7 @@ void acpi_ut_delete_object_desc(union acpi_operand_object *object)static acpi_status acpi_ut_get_simple_object_size (union acpi_operand_object *internal_object, -acpi_size * obj_length) +acpi_size *obj_length) {acpi_size length;acpi_size size;
@@ -495,12 +495,12 @@ acpi_ut_get_simple_object_size(union acpi_operand_object *internal_object,switch (internal_object->common.type) {case ACPI_TYPE_STRING : - length += (acpi_size ) internal_object->string.length +1 ; + length += (acpi_size )internal_object->string.length +1 ;break ;case ACPI_TYPE_BUFFER : - length += (acpi_size ) internal_object->buffer.length; + length += (acpi_size )internal_object->buffer.length;break ;case ACPI_TYPE_INTEGER :
@@ -640,7 +640,7 @@ acpi_ut_get_element_length(u8 object_type,static acpi_status acpi_ut_get_package_object_size (union acpi_operand_object *internal_object, -acpi_size * obj_length) +acpi_size *obj_length) {acpi_status status;struct acpi_pkg_info info;
@@ -665,7 +665,7 @@ acpi_ut_get_package_object_size(union acpi_operand_object *internal_object,*/ info.length +=ACPI_ROUND_UP_TO_NATIVE_WORD (sizeof (union acpi_object )) * - (acpi_size ) info.num_packages; + (acpi_size )info.num_packages;/* Return the total package length */
@@ -689,7 +689,7 @@ acpi_ut_get_package_object_size(union acpi_operand_object *internal_object,acpi_status acpi_ut_get_object_size (union acpi_operand_object *internal_object, -acpi_size * obj_length) +acpi_size *obj_length) {acpi_status status;
drivers/acpi/acpica/utosi.c +2 -2
@@ -150,7 +150,7 @@ acpi_status acpi_ut_initialize_interfaces(void) i < (ACPI_ARRAY_LENGTH (acpi_default_supported_interfaces) -1 ); i++) { acpi_default_supported_interfaces[i].next = - &acpi_default_supported_interfaces[(acpi_size ) i +1 ]; + &acpi_default_supported_interfaces[(acpi_size )i +1 ]; }acpi_os_release_mutex (acpi_gbl_osi_mutex);
@@ -397,7 +397,7 @@ struct acpi_interface_info *acpi_ut_get_interface(acpi_string interface_name)* ******************************************************************************/ -acpi_status acpi_ut_osi_implementation (struct acpi_walk_state * walk_state) +acpi_status acpi_ut_osi_implementation (struct acpi_walk_state *walk_state) {union acpi_operand_object *string_desc;union acpi_operand_object *return_desc;
drivers/acpi/acpica/utownerid.c +3 -3
@@ -61,7 +61,7 @@ ACPI_MODULE_NAME("utownerid")* when the method exits or the table is unloaded. * ******************************************************************************/ -acpi_status acpi_ut_allocate_owner_id (acpi_owner_id * owner_id) +acpi_status acpi_ut_allocate_owner_id (acpi_owner_id *owner_id) {u32 i;u32 j;
@@ -122,7 +122,7 @@ acpi_status acpi_ut_allocate_owner_id(acpi_owner_id * owner_id)* permanently allocated (prevents +1 overflow) */ *owner_id = - (acpi_owner_id) ((k +1 ) +ACPI_MUL_32 (j)); + (acpi_owner_id)((k +1 ) +ACPI_MUL_32 (j)); ACPI_DEBUG_PRINT((ACPI_DB_VALUES, "Allocated OwnerId: %2.2X\n",
@@ -167,7 +167,7 @@ exit:* ******************************************************************************/ -void acpi_ut_release_owner_id (acpi_owner_id * owner_id_ptr) +void acpi_ut_release_owner_id (acpi_owner_id *owner_id_ptr) {acpi_owner_id owner_id = *owner_id_ptr;acpi_status status;
drivers/acpi/acpica/utprint.c +7 -7
@@ -264,9 +264,9 @@ static char *acpi_ut_format_number(char *string, sign ='\0' ;if (type &ACPI_FORMAT_SIGN ) { -if ((s64 ) number <0 ) { +if ((s64 )number <0 ) { sign ='-' ; - number = -(s64 ) number; + number = -(s64 )number; width--; }else if (type &ACPI_FORMAT_SIGN_PLUS ) { sign ='+' ;
@@ -404,7 +404,7 @@ acpi_ut_vsnprintf(char *string, width =-1 ;if (isdigit ((int )*format)) { format =acpi_ut_scan_number (format, &number); - width = (s32 ) number; + width = (s32 )number; }else if (*format =='*' ) { ++format; width =va_arg (args, int);
@@ -421,7 +421,7 @@ acpi_ut_vsnprintf(char *string, ++format;if (isdigit ((int )*format)) { format =acpi_ut_scan_number (format, &number); - precision = (s32 ) number; + precision = (s32 )number; }else if (*format =='*' ) { ++format; precision =va_arg (args, int);
@@ -550,17 +550,17 @@ acpi_ut_vsnprintf(char *string,if (qualifier =='L' ) { number =va_arg (args, u64);if (type &ACPI_FORMAT_SIGN ) { - number = (s64 ) number; + number = (s64 )number; } }else if (qualifier =='l' ) { number = va_arg(args, unsigned long);if (type &ACPI_FORMAT_SIGN ) { - number = (s32 ) number; + number = (s32 )number; } }else if (qualifier =='h' ) { number = (u16 )va_arg (args, int);if (type &ACPI_FORMAT_SIGN ) { - number = (s16 ) number; + number = (s16 )number; } }else { number = va_arg(args, unsigned int);
drivers/acpi/acpica/utstring.c +1 -1
@@ -130,7 +130,7 @@ void acpi_ut_print_string(char *string, u16 max_length) }else {/* All others will be Hex escapes */ -acpi_os_printf ("\\x%2.2X" , (s32 ) string[i]); +acpi_os_printf ("\\x%2.2X" , (s32 )string[i]); }break ; }
drivers/acpi/acpica/utxface.c +2 -2
@@ -127,7 +127,7 @@ ACPI_EXPORT_SYMBOL(acpi_subsystem_status)* and the value of out_buffer is undefined. * ******************************************************************************/ -acpi_status acpi_get_system_info (struct acpi_buffer * out_buffer) +acpi_status acpi_get_system_info (struct acpi_buffer *out_buffer) {struct acpi_system_info *info_ptr;acpi_status status;
@@ -483,7 +483,7 @@ ACPI_EXPORT_SYMBOL(acpi_check_address_range)******************************************************************************/ acpi_status acpi_decode_pld_buffer (u8 *in_buffer, -acpi_size length,struct acpi_pld_info ** return_buffer) +acpi_size length,struct acpi_pld_info **return_buffer) {struct acpi_pld_info *pld_info;u32 *buffer =ACPI_CAST_PTR (u32, in_buffer);
include/acpi/acpiosxf.h +5 -5
@@ -96,7 +96,7 @@ acpi_physical_address acpi_os_get_root_pointer(void);#ifndef ACPI_USE_ALTERNATE_PROTOTYPE_acpi_os_predefined_overrideacpi_status acpi_os_predefined_override (const struct acpi_predefined_names *init_val, -acpi_string * new_val); +acpi_string *new_val);#endif #ifndef ACPI_USE_ALTERNATE_PROTOTYPE_acpi_os_table_override
@@ -108,7 +108,7 @@ acpi_os_table_override(struct acpi_table_header *existing_table,#ifndef ACPI_USE_ALTERNATE_PROTOTYPE_acpi_os_physical_table_overrideacpi_status acpi_os_physical_table_override (struct acpi_table_header *existing_table, -acpi_physical_address * new_address, +acpi_physical_address *new_address,u32 *new_table_length);#endif
@@ -203,7 +203,7 @@ void acpi_os_unmap_memory(void *logical_address, acpi_size size);#ifndef ACPI_USE_ALTERNATE_PROTOTYPE_acpi_os_get_physical_addressacpi_status acpi_os_get_physical_address (void *logical_address, -acpi_physical_address * physical_address); +acpi_physical_address *physical_address);#endif /*
@@ -379,14 +379,14 @@ acpi_statusacpi_os_get_table_by_name (char *signature, u32 instance, struct acpi_table_header **table, - acpi_physical_address * address); + acpi_physical_address *address);#endif #ifndef ACPI_USE_ALTERNATE_PROTOTYPE_acpi_os_get_table_by_indexacpi_status acpi_os_get_table_by_index (u32 index,struct acpi_table_header **table, -u32 *instance,acpi_physical_address * address); +u32 *instance,acpi_physical_address *address);#endif #ifndef ACPI_USE_ALTERNATE_PROTOTYPE_acpi_os_get_table_by_address
include/acpi/acpixf.h +11 -10
@@ -484,8 +484,8 @@ ACPI_EXTERNAL_RETURN_STATUS(acpi_status __init acpi_load_tables(void)) ACPI_EXTERNAL_RETURN_STATUS(acpi_status __init acpi_reallocate_root_table(void)) ACPI_EXTERNAL_RETURN_STATUS(acpi_status __init - acpi_find_root_pointer(acpi_physical_address * - rsdp_address)) + acpi_find_root_pointer(acpi_physical_address + *rsdp_address)) ACPI_EXTERNAL_RETURN_STATUS(acpi_status acpi_get_table_header(acpi_string signature, u32 instance,
@@ -530,7 +530,7 @@ ACPI_EXTERNAL_RETURN_STATUS(acpi_status ACPI_EXTERNAL_RETURN_STATUS(acpi_status acpi_get_handle(acpi_handle parent, acpi_string pathname, - acpi_handle * ret_handle)) + acpi_handle *ret_handle)) ACPI_EXTERNAL_RETURN_STATUS(acpi_status acpi_attach_data(acpi_handle object, acpi_object_handler handler,
@@ -575,15 +575,15 @@ ACPI_EXTERNAL_RETURN_STATUS(acpi_status acpi_get_next_object(acpi_object_type type, acpi_handle parent, acpi_handle child, - acpi_handle * out_handle)) + acpi_handle *out_handle)) ACPI_EXTERNAL_RETURN_STATUS(acpi_status acpi_get_type(acpi_handle object, - acpi_object_type * out_type)) + acpi_object_type *out_type)) ACPI_EXTERNAL_RETURN_STATUS(acpi_status acpi_get_parent(acpi_handle object, - acpi_handle * out_handle)) + acpi_handle *out_handle))/* * Handler interfaces
@@ -755,7 +755,7 @@ ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status acpi_enable_all_wakeup_gpes(void)) ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status acpi_get_gpe_device(u32 gpe_index, - acpi_handle * gpe_device)) + acpi_handle *gpe_device)) ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status acpi_install_gpe_block(acpi_handle gpe_device,
@@ -771,8 +771,8 @@ ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status* Resource interfaces */ typedef -acpi_status (*acpi_walk_resource_callback ) (struct acpi_resource * resource, -void *context); +acpi_status (*acpi_walk_resource_callback ) (struct acpi_resource * resource, +void *context); ACPI_EXTERNAL_RETURN_STATUS(acpi_status acpi_get_vendor_resource(acpi_handle device,
@@ -938,7 +938,8 @@ ACPI_DBG_DEPENDENT_RETURN_VOID(void ACPI_APP_DEPENDENT_RETURN_VOID(ACPI_PRINTF_LIKE(1) void ACPI_INTERNAL_VAR_XFACE acpi_log_error(const char *format, ...)) -acpi_status acpi_initialize_debugger (void ); + +acpi_status acpi_initialize_debugger (void );void acpi_terminate_debugger (void );
include/acpi/actypes.h +21 -20
78 lines not on this page · raw message
tools/power/acpi/os_specific/service_layers/oslinuxtbl.c +23 -24
141 lines not on this page · raw message
tools/power/acpi/os_specific/service_layers/osunixxf.c +12 -12
@@ -246,8 +246,8 @@ acpi_physical_address acpi_os_get_root_pointer(void)*****************************************************************************/ acpi_status -acpi_os_predefined_override (const struct acpi_predefined_names * init_val, -acpi_string * new_val) +acpi_os_predefined_override (const struct acpi_predefined_names *init_val, +acpi_string *new_val) {if (!init_val || !new_val) {
@@ -274,8 +274,8 @@ acpi_os_predefined_override(const struct acpi_predefined_names * init_val,*****************************************************************************/ acpi_status -acpi_os_table_override (struct acpi_table_header * existing_table, -struct acpi_table_header ** new_table) +acpi_os_table_override (struct acpi_table_header *existing_table, +struct acpi_table_header **new_table) {if (!existing_table || !new_table) {
@@ -311,8 +311,8 @@ acpi_os_table_override(struct acpi_table_header * existing_table,*****************************************************************************/ acpi_status -acpi_os_physical_table_override (struct acpi_table_header * existing_table, -acpi_physical_address * new_address, +acpi_os_physical_table_override (struct acpi_table_header *existing_table, +acpi_physical_address *new_address,u32 *new_table_length) {
@@ -506,7 +506,7 @@ acpi_status acpi_os_get_line(char *buffer, u32 buffer_length, u32 *bytes_read)void *acpi_os_map_memory (acpi_physical_address where,acpi_size length) { -return (ACPI_TO_POINTER ((acpi_size ) where)); +return (ACPI_TO_POINTER ((acpi_size )where)); }/******************************************************************************
@@ -603,9 +603,9 @@ void acpi_os_free(void *mem)acpi_status acpi_os_create_semaphore (u32 max_units, -u32 initial_units,acpi_handle * out_handle) +u32 initial_units,acpi_handle *out_handle) { - *out_handle = (acpi_handle )1 ; + *out_handle = (acpi_handle )1 ;return (AE_OK ); }
@@ -640,7 +640,7 @@ acpi_status acpi_os_signal_semaphore(acpi_handle handle, u32 units)acpi_status acpi_os_create_semaphore (u32 max_units, -u32 initial_units,acpi_handle * out_handle) +u32 initial_units,acpi_handle *out_handle) {sem_t *sem;
@@ -672,7 +672,7 @@ acpi_os_create_semaphore(u32 max_units, }#endif - *out_handle = (acpi_handle ) sem; + *out_handle = (acpi_handle )sem;return (AE_OK ); }
@@ -1035,7 +1035,7 @@ acpi_os_read_pci_configuration(struct acpi_pci_id *pci_id,*****************************************************************************/ acpi_status -acpi_os_write_pci_configuration (struct acpi_pci_id * pci_id, +acpi_os_write_pci_configuration (struct acpi_pci_id *pci_id,u32 pci_register,u64 value,u32 width) {
tools/power/acpi/tools/acpidump/apdump.c +1 -1
@@ -294,7 +294,7 @@ int ap_dump_table_by_address(char *ascii_address)return (-1 ); } - address = (acpi_physical_address ) long_address; + address = (acpi_physical_address )long_address; status =acpi_os_get_table_by_address (address, &table);if (ACPI_FAILURE (status)) { acpi_log_error("Could not get table at 0x%8.8X%8.8X, %s\n",
Signature · 1 line
1.7.10
PATCH 3/15 ACPICA: Refactor evaluate_object to reduce nesting
In reply to Lv ZhengFrom: Bob Moore <[email protected]>
ACPICA commit 599e9159f53565e4a3f3e67f6a03f81fcb10a4cf
Original patch from [email protected]
ACPICA BZ 1072.
--- drivers/acpi/acpica/nsxfeval.c | 111 ++++++++++++++++++++-------------------- 1 file changed, 55 insertions(+), 56 deletions(-)
drivers/acpi/acpica/nsxfeval.c +55 -56
@@ -280,13 +280,12 @@ acpi_evaluate_object(acpi_handle handle, info->parameters[info->param_count] =NULL ; } -#if 0 +#ifdef _FUTURE_FEATURE/* * Begin incoming argument count analysis. Check for too few args * and too many args. */ -switch (acpi_ns_get_type (info->node)) {case ACPI_TYPE_METHOD :
@@ -370,68 +369,68 @@ acpi_evaluate_object(acpi_handle handle,* If we are expecting a return value, and all went well above, * copy the return value to an external object. */ -if (return_buffer) { -if (!info->return_object) { - return_buffer->length =0 ; - }else { -if (ACPI_GET_DESCRIPTOR_TYPE (info->return_object) == -ACPI_DESC_TYPE_NAMED ) { -/* -* If we received a NS Node as a return object, this means that -* the object we are evaluating has nothing interesting to -* return (such as a mutex, etc.) We return an error because -* these types are essentially unsupported by this interface. -* We don't check up front because this makes it easier to add -* support for various types at a later date if necessary. -*/ - status =AE_TYPE ; - info->return_object =NULL ;/* No need to delete a NS Node */ - return_buffer->length =0 ; - } +if (!return_buffer) { + goto cleanup_return_object; + } -if (ACPI_SUCCESS (status)) { +if (!info->return_object) { + return_buffer->length =0 ; + goto cleanup; + } -/* Dereference Index and ref_of references */ +if (ACPI_GET_DESCRIPTOR_TYPE (info->return_object) == +ACPI_DESC_TYPE_NAMED ) { +/* +* If we received a NS Node as a return object, this means that +* the object we are evaluating has nothing interesting to +* return (such as a mutex, etc.) We return an error because +* these types are essentially unsupported by this interface. +* We don't check up front because this makes it easier to add +* support for various types at a later date if necessary. +*/ + status =AE_TYPE ; + info->return_object =NULL ;/* No need to delete a NS Node */ + return_buffer->length =0 ; + } -acpi_ns_resolve_references (info); +if (ACPI_FAILURE (status)) { + goto cleanup_return_object; + } -/* Get the size of the returned object */ +/* Dereference Index and ref_of references */ - status = -acpi_ut_get_object_size (info->return_object, - &buffer_space_needed); -if (ACPI_SUCCESS (status)) { - -/* Validate/Allocate/Clear caller buffer */ - - status = -acpi_ut_initialize_buffer - (return_buffer, - buffer_space_needed); -if (ACPI_FAILURE (status)) { -/* -* Caller's buffer is too small or a new one can't -* be allocated -*/ -ACPI_DEBUG_PRINT ((ACPI_DB_INFO , -"Needed buffer size %X, %s\n" , - (u32 ) - buffer_space_needed, -acpi_format_exception - (status))); - }else { -/* We have enough space for the object, build it */ - - status = -acpi_ut_copy_iobject_to_eobject - (info->return_object, - return_buffer); - } - } - } +acpi_ns_resolve_references (info); + +/* Get the size of the returned object */ + + status =acpi_ut_get_object_size (info->return_object, + &buffer_space_needed); +if (ACPI_SUCCESS (status)) { + +/* Validate/Allocate/Clear caller buffer */ + + status =acpi_ut_initialize_buffer (return_buffer, + buffer_space_needed); +if (ACPI_FAILURE (status)) { +/* +* Caller's buffer is too small or a new one can't +* be allocated +*/ +ACPI_DEBUG_PRINT ((ACPI_DB_INFO , +"Needed buffer size %X, %s\n" , + (u32 )buffer_space_needed, +acpi_format_exception (status))); + }else { +/* We have enough space for the object, build it */ + + status = +acpi_ut_copy_iobject_to_eobject (info->return_object, + return_buffer); } } +cleanup_return_object: +if (info->return_object) {/* * Delete the internal return object. NOTE: Interpreter must be
Signature · 1 line
1.7.10
PATCH 4/15 ACPICA: ACPI 6.1: Support for new PCCT subtable
In reply to Lv ZhengFrom: Bob Moore <[email protected]>
ACPICA commit de3ea7c322b9b6bdb09aa90c2e1d420cd4dce47c
Additional subspace structure was added.
--- include/acpi/actbl3.h | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-)
include/acpi/actbl3.h +22 -1
@@ -481,7 +481,8 @@ struct acpi_table_pcct {enum acpi_pcct_type {ACPI_PCCT_TYPE_GENERIC_SUBSPACE =0 ,ACPI_PCCT_TYPE_HW_REDUCED_SUBSPACE =1 , -ACPI_PCCT_TYPE_RESERVED =2 /* 2 and greater are reserved */ +ACPI_PCCT_TYPE_HW_REDUCED_SUBSPACE_TYPE2 =2 ,/* ACPI 6.1 */ +ACPI_PCCT_TYPE_RESERVED =3 /* 3 and greater are reserved */ };/*
@@ -520,6 +521,26 @@ struct acpi_pcct_hw_reduced {u16 min_turnaround_time; }; +/* 2: HW-reduced Communications Subspace Type 2 (ACPI 6.1) */ + +struct acpi_pcct_hw_reduced_type2 { +struct acpi_subtable_header header; +u32 doorbell_interrupt; +u8 flags; +u8 reserved; +u64 base_address; +u64 length; +struct acpi_generic_address doorbell_register; +u64 preserve_mask; +u64 write_mask; +u32 latency; +u32 max_access_rate; +u16 min_turnaround_time; +struct acpi_generic_address doorbell_ack_register; +u64 ack_preserve_mask; +u64 ack_write_mask; +}; +/* Values for doorbell flags above */ #define ACPI_PCCT_INTERRUPT_POLARITY (1)
Signature · 1 line
1.7.10
PATCH 5/15 ACPICA: ACPI 6.0: Update _BIX support for new package element
In reply to Lv ZhengFrom: Bob Moore <[email protected]>
ACPICA commit 3451e6d49d37919c13ec2c0019a31534b0dfc0c0
One integer was added at the end of the _BIX method, and the version number was incremented.
--- drivers/acpi/acpica/acpredef.h | 5 ++- drivers/acpi/acpica/nsprepkg.c | 86 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 89 insertions(+), 2 deletions(-)
drivers/acpi/acpica/acpredef.h +3 -2
@@ -129,7 +129,8 @@ enum acpi_return_package_types {ACPI_PTYPE2_REV_FIXED =9 ,ACPI_PTYPE2_FIX_VAR =10 ,ACPI_PTYPE2_VAR_VAR =11 , - ACPI_PTYPE2_UUID_PAIR = 12 +ACPI_PTYPE2_UUID_PAIR =12 , + ACPI_PTYPE_CUSTOM = 13 };/* Support macros for users of the predefined info table */
@@ -340,7 +341,7 @@ const union acpi_predefined_info acpi_gbl_predefined_methods[] = { {{"_BIX" ,METHOD_0ARGS , METHOD_RETURNS(ACPI_RTYPE_PACKAGE)}}, /* Fixed-length (16 Int),(4 Str) */ -PACKAGE_INFO (ACPI_PTYPE1_FIXED ,ACPI_RTYPE_INTEGER ,16 , +PACKAGE_INFO (ACPI_PTYPE_CUSTOM ,ACPI_RTYPE_INTEGER ,16 ,ACPI_RTYPE_STRING ,4 ,0 ), {{"_BLT",
drivers/acpi/acpica/nsprepkg.c +86 -0
104 lines not on this page · raw message
Signature · 1 line
1.7.10
PATCH 6/15 ACPICA: ACPI 6.0, tools/iasl: Add support for new resource descriptors
In reply to Lv ZhengFrom: Bob Moore <[email protected]>
ACPICA commit 5a0555ece4ba9917e5842b21d88469ae06b4e815
Adds full support for:i2c_serial_bus_v2spi_serial_bus_v2uart_serial_bus_v2
Compiler, Disassembler, Resource Manager, acpi_help.
--- drivers/acpi/acpica/rsdumpinfo.c | 9 +++++---- drivers/acpi/acpica/rsserial.c | 21 ++++++++++++++++++--- include/acpi/acrestyp.h | 1 + 3 files changed, 24 insertions(+), 7 deletions(-)
drivers/acpi/acpica/rsdumpinfo.c +5 -4
@@ -330,19 +330,20 @@ struct acpi_rsdump_info acpi_rs_dump_fixed_dma[4] = { {ACPI_RSD_UINT8, ACPI_RSD_OFFSET (common_serial_bus.type), "Type", acpi_gbl_sbt_decode}, \ {ACPI_RSD_1BITFLAG, ACPI_RSD_OFFSET (common_serial_bus.producer_consumer), "ProducerConsumer", acpi_gbl_consume_decode}, \ {ACPI_RSD_1BITFLAG, ACPI_RSD_OFFSET (common_serial_bus.slave_mode), "SlaveMode", acpi_gbl_sm_decode}, \ + {ACPI_RSD_1BITFLAG, ACPI_RSD_OFFSET (common_serial_bus.connection_sharing),"ConnectionSharing", acpi_gbl_shr_decode}, \ {ACPI_RSD_UINT8, ACPI_RSD_OFFSET (common_serial_bus.type_revision_id), "TypeRevisionId", NULL}, \ {ACPI_RSD_UINT16, ACPI_RSD_OFFSET (common_serial_bus.type_data_length), "TypeDataLength", NULL}, \ {ACPI_RSD_SOURCE, ACPI_RSD_OFFSET (common_serial_bus.resource_source), "ResourceSource", NULL}, \ {ACPI_RSD_UINT16, ACPI_RSD_OFFSET (common_serial_bus.vendor_length), "VendorLength", NULL}, \ {ACPI_RSD_SHORTLISTX,ACPI_RSD_OFFSET (common_serial_bus.vendor_data), "VendorData", NULL}, -struct acpi_rsdump_info acpi_rs_dump_common_serial_bus[10] = { +struct acpi_rsdump_info acpi_rs_dump_common_serial_bus[11] = { {ACPI_RSD_TITLE, ACPI_RSD_TABLE_SIZE(acpi_rs_dump_common_serial_bus), "Common Serial Bus", NULL},ACPI_RS_DUMP_COMMON_SERIAL_BUS }; -struct acpi_rsdump_info acpi_rs_dump_i2c_serial_bus[13 ] = { +struct acpi_rsdump_info acpi_rs_dump_i2c_serial_bus[14 ] = { {ACPI_RSD_TITLE ,ACPI_RSD_TABLE_SIZE (acpi_rs_dump_i2c_serial_bus),"I2C Serial Bus" ,NULL }, ACPI_RS_DUMP_COMMON_SERIAL_BUS {ACPI_RSD_1BITFLAG,
@@ -355,7 +356,7 @@ struct acpi_rsdump_info acpi_rs_dump_i2c_serial_bus[13] = { "SlaveAddress", NULL}, }; -struct acpi_rsdump_info acpi_rs_dump_spi_serial_bus[17 ] = { +struct acpi_rsdump_info acpi_rs_dump_spi_serial_bus[18 ] = { {ACPI_RSD_TITLE ,ACPI_RSD_TABLE_SIZE (acpi_rs_dump_spi_serial_bus),"Spi Serial Bus" ,NULL }, ACPI_RS_DUMP_COMMON_SERIAL_BUS {ACPI_RSD_1BITFLAG,
@@ -376,7 +377,7 @@ struct acpi_rsdump_info acpi_rs_dump_spi_serial_bus[17] = { "ConnectionSpeed", NULL}, }; -struct acpi_rsdump_info acpi_rs_dump_uart_serial_bus[19 ] = { +struct acpi_rsdump_info acpi_rs_dump_uart_serial_bus[20 ] = { {ACPI_RSD_TITLE ,ACPI_RSD_TABLE_SIZE (acpi_rs_dump_uart_serial_bus),"Uart Serial Bus" ,NULL }, ACPI_RS_DUMP_COMMON_SERIAL_BUS {ACPI_RSD_2BITFLAG,
drivers/acpi/acpica/rsserial.c +18 -3
@@ -151,7 +151,7 @@ struct acpi_rsconvert_info acpi_rs_convert_gpio[18] = {* ******************************************************************************/ -struct acpi_rsconvert_info acpi_rs_convert_i2c_serial_bus[16 ] = { +struct acpi_rsconvert_info acpi_rs_convert_i2c_serial_bus[17 ] = { {ACPI_RSC_INITGET ,ACPI_RESOURCE_TYPE_SERIAL_BUS , ACPI_RS_SIZE(struct acpi_resource_i2c_serialbus),ACPI_RSC_TABLE_SIZE (acpi_rs_convert_i2c_serial_bus)},
@@ -177,6 +177,11 @@ struct acpi_rsconvert_info acpi_rs_convert_i2c_serial_bus[16] = {AML_OFFSET (common_serial_bus.flags), 1}, + {ACPI_RSC_1BITFLAG, +ACPI_RS_OFFSET (data.common_serial_bus.connection_sharing), +AML_OFFSET (common_serial_bus.flags), + 2}, + {ACPI_RSC_MOVE8,ACPI_RS_OFFSET (data.common_serial_bus.type_revision_id), AML_OFFSET(common_serial_bus.type_revision_id),
@@ -237,7 +242,7 @@ struct acpi_rsconvert_info acpi_rs_convert_i2c_serial_bus[16] = {* ******************************************************************************/ -struct acpi_rsconvert_info acpi_rs_convert_spi_serial_bus[20 ] = { +struct acpi_rsconvert_info acpi_rs_convert_spi_serial_bus[21 ] = { {ACPI_RSC_INITGET ,ACPI_RESOURCE_TYPE_SERIAL_BUS , ACPI_RS_SIZE(struct acpi_resource_spi_serialbus),ACPI_RSC_TABLE_SIZE (acpi_rs_convert_spi_serial_bus)},
@@ -263,6 +268,11 @@ struct acpi_rsconvert_info acpi_rs_convert_spi_serial_bus[20] = {AML_OFFSET (common_serial_bus.flags), 1}, + {ACPI_RSC_1BITFLAG, +ACPI_RS_OFFSET (data.common_serial_bus.connection_sharing), +AML_OFFSET (common_serial_bus.flags), + 2}, + {ACPI_RSC_MOVE8,ACPI_RS_OFFSET (data.common_serial_bus.type_revision_id), AML_OFFSET(common_serial_bus.type_revision_id),
@@ -339,7 +349,7 @@ struct acpi_rsconvert_info acpi_rs_convert_spi_serial_bus[20] = {* ******************************************************************************/ -struct acpi_rsconvert_info acpi_rs_convert_uart_serial_bus[22 ] = { +struct acpi_rsconvert_info acpi_rs_convert_uart_serial_bus[23 ] = { {ACPI_RSC_INITGET ,ACPI_RESOURCE_TYPE_SERIAL_BUS , ACPI_RS_SIZE(struct acpi_resource_uart_serialbus),ACPI_RSC_TABLE_SIZE (acpi_rs_convert_uart_serial_bus)},
@@ -365,6 +375,11 @@ struct acpi_rsconvert_info acpi_rs_convert_uart_serial_bus[22] = {AML_OFFSET (common_serial_bus.flags), 1}, + {ACPI_RSC_1BITFLAG, +ACPI_RS_OFFSET (data.common_serial_bus.connection_sharing), +AML_OFFSET (common_serial_bus.flags), + 2}, + {ACPI_RSC_MOVE8,ACPI_RS_OFFSET (data.common_serial_bus.type_revision_id), AML_OFFSET(common_serial_bus.type_revision_id),
include/acpi/acrestyp.h +1 -0
@@ -417,6 +417,7 @@ struct acpi_resource_gpio {u8 type; \u8 producer_consumer;/* For values, see Producer/Consumer above */ \u8 slave_mode; \ +u8 connection_sharing; \u8 type_revision_id; \u16 type_data_length; \u16 vendor_length; \
Signature · 1 line
1.7.10
PATCH 7/15 ACPICA: Renamed some #defined flag constants for clarity
In reply to Lv ZhengFrom: Bob Moore <[email protected]>
ACPICA commit 438905b205e64e742f9670a0970419c426264831
Expanded a couple of cryptic names.
--- drivers/acpi/acpica/aclocal.h | 30 +++++++++++++++--------------- drivers/acpi/acpica/psutils.c | 2 +- 2 files changed, 16 insertions(+), 16 deletions(-)
drivers/acpi/acpica/aclocal.h +15 -15
@@ -856,24 +856,24 @@ struct acpi_parse_state {/* Parse object flags */ -#define ACPI_PARSEOP_GENERIC 0x01 -#define ACPI_PARSEOP_NAMED 0x02 -#define ACPI_PARSEOP_DEFERRED 0x04 -#define ACPI_PARSEOP_BYTELIST 0x08 -#define ACPI_PARSEOP_IN_STACK 0x10 -#define ACPI_PARSEOP_TARGET 0x20 -#define ACPI_PARSEOP_IN_CACHE 0x80 +#define ACPI_PARSEOP_GENERIC 0x01 +#define ACPI_PARSEOP_NAMED_OBJECT 0x02 +#define ACPI_PARSEOP_DEFERRED 0x04 +#define ACPI_PARSEOP_BYTELIST 0x08 +#define ACPI_PARSEOP_IN_STACK 0x10 +#define ACPI_PARSEOP_TARGET 0x20 +#define ACPI_PARSEOP_IN_CACHE 0x80/* Parse object disasm_flags */ -#define ACPI_PARSEOP_IGNORE 0x01 -#define ACPI_PARSEOP_PARAMLIST 0x02 -#define ACPI_PARSEOP_EMPTY_TERMLIST 0x04 -#define ACPI_PARSEOP_PREDEF_CHECKED 0x08 -#define ACPI_PARSEOP_CLOSING_PAREN 0x10 -#define ACPI_PARSEOP_COMPOUND 0x20 -#define ACPI_PARSEOP_ASSIGNMENT 0x40 -#define ACPI_PARSEOP_ELSEIF 0x80 +#define ACPI_PARSEOP_IGNORE 0x01 +#define ACPI_PARSEOP_PARAMETER_LIST 0x02 +#define ACPI_PARSEOP_EMPTY_TERMLIST 0x04 +#define ACPI_PARSEOP_PREDEFINED_CHECKED 0x08 +#define ACPI_PARSEOP_CLOSING_PAREN 0x10 +#define ACPI_PARSEOP_COMPOUND_ASSIGNMENT 0x20 +#define ACPI_PARSEOP_ASSIGNMENT 0x40 +#define ACPI_PARSEOP_ELSEIF 0x80/***************************************************************************** *
drivers/acpi/acpica/psutils.c +1 -1
@@ -128,7 +128,7 @@ union acpi_parse_object *acpi_ps_alloc_op(u16 opcode, u8 *aml)if (op_info->flags &AML_DEFER ) { flags =ACPI_PARSEOP_DEFERRED ; }else if (op_info->flags &AML_NAMED ) { - flags =ACPI_PARSEOP_NAMED ; + flags =ACPI_PARSEOP_NAMED_OBJECT ; }else if (opcode ==AML_INT_BYTELIST_OP ) { flags =ACPI_PARSEOP_BYTELIST ; }
Signature · 1 line
1.7.10
PATCH 8/15 ACPICA: Dispatcher: Update thread ID for recursive method calls
In reply to Lv ZhengFrom: Prarit Bhargava <[email protected]>
ACPICA commit 7a3bd2d962f221809f25ddb826c9e551b916eb25
Set the mutex owner thread ID.
Original patch from: Prarit Bhargava <[email protected]>
--- drivers/acpi/acpica/dsmethod.c | 3 +++ 1 file changed, 3 insertions(+)
drivers/acpi/acpica/dsmethod.c +3 -0
@@ -428,6 +428,9 @@ acpi_ds_begin_method_execution(struct acpi_namespace_node *method_node, obj_desc->method.mutex->mutex. original_sync_level = obj_desc->method.mutex->mutex.sync_level; + + obj_desc->method.mutex->mutex.thread_id = +acpi_os_get_thread_id (); } }
Signature · 1 line
1.7.10
Re: [PATCH 08/15] ACPICA: Dispatcher: Update thread ID for recursive method calls
Quoted 11 lines · Lv Zheng
From: Prarit Bhargava <[email protected]>
ACPICA commit
7a3bd2d962f221809f25ddb826c9e551b916eb25Set the mutex owner thread ID.
Original patch from: Prarit Bhargava <[email protected]>Signed-off-by Prarit Bhargava <[email protected]>Signed-off-by Bob Moore <[email protected]>Signed-off-by Lv Zheng <[email protected]>
cc'ing Mario @ Dell and stable.
P.
Quoted 19 lines
--- drivers/acpi/acpica/dsmethod.c | 3 +++ 1 file changed, 3 insertions(+)drivers/acpi/acpica/dsmethod.c +3
-0@@ -428,6 +428,9 @@ acpi_ds_begin_method_execution(struct acpi_namespace_node *method_node, obj_desc->method.mutex->mutex. original_sync_level = obj_desc->method.mutex->mutex.sync_level; + + obj_desc->method.mutex->mutex.thread_id = +acpi_os_get_thread_id (); } }
Rafael J. Wysocki
maintainerRe: [PATCH 08/15] ACPICA: Dispatcher: Update thread ID for recursive method calls
Quoted 10 lines · Prarit Bhargava
Quoted 7 lines · Lv Zheng
From: Prarit Bhargava <[email protected]>
ACPICA commit
7a3bd2d962f221809f25ddb826c9e551b916eb25Set the mutex owner thread ID.
Original patch from: Prarit Bhargava <[email protected]>
Quoted 6 lines
Quoted 4 lines
Signed-off-by Prarit Bhargava <[email protected]>Signed-off-by Bob Moore <[email protected]>Signed-off-by Lv Zheng <[email protected]>cc'ing Mario @ Dell and stable.
It won't help if you CC stable at this point.
What stable series should this go into?
RE: [PATCH 08/15] ACPICA: Dispatcher: Update thread ID for recursive method calls
Quoted 32 lines
-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Rafael J. Wysocki
Sent: Wednesday, May 4, 2016 2:23 PM
To: Prarit Bhargava <[email protected]>
Cc: Lv Zheng <[email protected]>; Rafael J. Wysocki <[email protected]>; Rafael J. Wysocki <[email protected]>; Len Brown <[email protected]>; Lv Zheng <[email protected]>; Linux Kernel Mailing List <[email protected]>; ACPI Devel Maling List <[email protected]>; Bob Moore <[email protected]>; Limonciello, Mario <[email protected]>; stable <[email protected]>
Subject: Re: [PATCH 08/15] ACPICA: Dispatcher: Update thread ID for recursive method callsQuoted 15 lines · Prarit Bhargava
Quoted 11 lines · Lv Zheng
From: Prarit Bhargava <[email protected]>
ACPICA commit
7a3bd2d962f221809f25ddb826c9e551b916eb25Set the mutex owner thread ID.
Original patch from: Prarit Bhargava <[email protected]>Signed-off-by Prarit Bhargava <[email protected]>Signed-off-by Bob Moore <[email protected]>Signed-off-by Lv Zheng <[email protected]>
Quoted 5 lines
Quoted 1 line
cc'ing Mario @ Dell and stable.
It won't help if you CC stable at this point.
What stable series should this go into?
At least I was really hoping to see this land in kernels that are in the common distros today: 4.4, 4.2 and 3.19.
Rafael J. Wysocki
maintainerRe: [PATCH 08/15] ACPICA: Dispatcher: Update thread ID for recursive method calls
Quoted 32 lines · On Wed, May 4, 2016 at 10:30 PM, <[email protected]> wrote:
Quoted 32 lines
-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Rafael J. Wysocki
Sent: Wednesday, May 4, 2016 2:23 PM
To: Prarit Bhargava <[email protected]>
Cc: Lv Zheng <[email protected]>; Rafael J. Wysocki <[email protected]>; Rafael J. Wysocki <[email protected]>; Len Brown <[email protected]>; Lv Zheng <[email protected]>; Linux Kernel Mailing List <[email protected]>; ACPI Devel Maling List <[email protected]>; Bob Moore <[email protected]>; Limonciello, Mario <[email protected]>; stable <[email protected]>
Subject: Re: [PATCH 08/15] ACPICA: Dispatcher: Update thread ID for recursive method callsQuoted 15 lines · Prarit Bhargava
Quoted 11 lines · Lv Zheng
From: Prarit Bhargava <[email protected]>
ACPICA commit
7a3bd2d962f221809f25ddb826c9e551b916eb25Set the mutex owner thread ID.
Original patch from: Prarit Bhargava <[email protected]>Signed-off-by Prarit Bhargava <[email protected]>Signed-off-by Bob Moore <[email protected]>Signed-off-by Lv Zheng <[email protected]>
Quoted 8 lines
Quoted 5 lines
Quoted 1 line
cc'ing Mario @ Dell and stable.
It won't help if you CC stable at this point.
What stable series should this go into?
At least I was really hoping to see this land in kernels that are in the common distros today: 4.4, 4.2 and 3.19.
OK, let's make it "all applicable", then.
Applied and queued up as a fix for v4.6, thanks everybody!
PATCH 9/15 ACPICA: Utilities: Add ACPI_IS_ALIGNED() macro
In reply to Lv ZhengThis patch introduces ACPI_IS_ALIGNED() macro. Lv Zheng.
--- drivers/acpi/acpica/acmacros.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/acpi/acpica/acmacros.h +2 -1
@@ -262,7 +262,8 @@/* Generic (power-of-two) rounding */ -#define ACPI_IS_POWER_OF_TWO (a) (((a) & ((a) - 1)) == 0) +#define ACPI_IS_ALIGNED (a, s) (((a) & ((s) - 1)) == 0) +#define ACPI_IS_POWER_OF_TWO (a) ACPI_IS_ALIGNED(a, a)/* * Bitmask creation
Signature · 1 line
1.7.10
PATCH 10/15 ACPICA: Hardware: Add optimized access bit width support
In reply to Lv ZhengACPICA commit c49a751b4dae7baec1790748a2b4b6e8ab599f51
For Access Size = 0, it actually can use user expected access bit width. This patch implements this.
Besides of the ACPICA upstream commit, this patch also includes a fix fixing the issue reported by the FreeBSD community.
The old register descriptors are translated in acpi_tb_init_generic_address() with access_width being filled with 0. This breaks code in acpi_hw_get_access_bit_width() when the registers are 16-bit IO ports and their bit_width fields are filled with 16. The rapid fix is meant to make code written for acpi_hw_get_access_bit_width() regression safer before the issue is correctly fixed from acpi_tb_init_generic_address(). Reported by John Baldwin <[email protected]>, fixed by Lv Zheng <[email protected]>, tested by Jung-uk Kim <[email protected]>.
Tested-by Jung-uk Kim <[email protected]>.
--- drivers/acpi/acpica/hwregs.c | 49 ++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 47 insertions(+), 2 deletions(-)
drivers/acpi/acpica/hwregs.c +47 -2
@@ -51,6 +51,10 @@ ACPI_MODULE_NAME("hwregs")#if (!ACPI_REDUCED_HARDWARE )/* Local Prototypes */ +static u8 +acpi_hw_get_access_bit_width (struct acpi_generic_address *reg, +u8 max_bit_width); + static acpi_status acpi_hw_read_multiple(u32 *value, struct acpi_generic_address *register_a,
@@ -65,6 +69,48 @@ acpi_hw_write_multiple(u32 value,/****************************************************************************** * +* FUNCTION: acpi_hw_get_access_bit_width +* +* PARAMETERS: reg - GAS register structure +* max_bit_width - Max bit_width supported (32 or 64) +* +* RETURN: Status +* +* DESCRIPTION: Obtain optimal access bit width +* +******************************************************************************/ + +static u8 +acpi_hw_get_access_bit_width (struct acpi_generic_address *reg,u8 max_bit_width) +{ +u64 address; + +if (!reg->access_width) { +/* +* Detect old register descriptors where only the bit_width field +* makes senses. The target address is copied to handle possible +* alignment issues. +*/ +ACPI_MOVE_64_TO_64 (&address, ®->address); +if (!reg->bit_offset && reg->bit_width && +ACPI_IS_POWER_OF_TWO (reg->bit_width) && +ACPI_IS_ALIGNED (reg->bit_width,8 ) && +ACPI_IS_ALIGNED (address, reg->bit_width)) { +return (reg->bit_width); + }else { +if (reg->space_id ==ACPI_ADR_SPACE_SYSTEM_IO ) { +return (32 ); + }else { +return (max_bit_width); + } + } + }else { +return (1 << (reg->access_width +2 )); + } +} + +/****************************************************************************** +* * FUNCTION: acpi_hw_validate_register * * PARAMETERS: reg - GAS register structure
@@ -122,8 +168,7 @@ acpi_hw_validate_register(struct acpi_generic_address *reg,/* Validate the bit_width, convert access_width into number of bits */ - access_width = reg->access_width ? reg->access_width :1 ; - access_width =1 << (access_width +2 ); + access_width =acpi_hw_get_access_bit_width (reg, max_bit_width); bit_width =ACPI_ROUND_UP (reg->bit_offset + reg->bit_width, access_width);if (max_bit_width < bit_width) {
Signature · 1 line
1.7.10
PATCH 11/15 ACPICA: Executer: Introduce a set of macros to handle bit width mask generation
In reply to Lv ZhengACPICA commit c23034a3a09d5ed79f1827d51f43cfbccf68ab64
A regression was reported to the shift offset >= width of type. This patch fixes this issue. BZ 1270.
This is a part of the fix because the order of the patches are modified for Linux upstream, containing the cleanups for the old code. Lv Zheng.
--- drivers/acpi/acpica/acmacros.h | 12 ++++++++++++ drivers/acpi/acpica/exfldio.c | 12 ++---------- 2 files changed, 14 insertions(+), 10 deletions(-)
drivers/acpi/acpica/acmacros.h +12 -0
@@ -270,9 +270,21 @@* Bit positions start at zero. * MASK_BITS_ABOVE creates a mask starting AT the position and above * MASK_BITS_BELOW creates a mask starting one bit BELOW the position +* MASK_BITS_ABOVE/BELOW accpets a bit offset to create a mask +* MASK_BITS_ABOVE/BELOW_32/64 accpets a bit width to create a mask +* Note: The ACPI_INTEGER_BIT_SIZE check is used to bypass compiler +* differences with the shift operator */ #define ACPI_MASK_BITS_ABOVE (position) (~((ACPI_UINT64_MAX) << ((u32) (position))))#define ACPI_MASK_BITS_BELOW (position) ((ACPI_UINT64_MAX) << ((u32) (position))) +#define ACPI_MASK_BITS_ABOVE_32 (width) ((u32) ACPI_MASK_BITS_ABOVE(width)) +#define ACPI_MASK_BITS_BELOW_32 (width) ((u32) ACPI_MASK_BITS_BELOW(width)) +#define ACPI_MASK_BITS_ABOVE_64 (width) ((width) == ACPI_INTEGER_BIT_SIZE ? \ + ACPI_UINT64_MAX : \ + ACPI_MASK_BITS_ABOVE(width)) +#define ACPI_MASK_BITS_BELOW_64 (width) ((width) == ACPI_INTEGER_BIT_SIZE ? \ + (u64) 0 : \ + ACPI_MASK_BITS_BELOW(width))/* Bitfields within ACPI registers */
drivers/acpi/acpica/exfldio.c +2 -10
@@ -897,17 +897,9 @@ acpi_ex_insert_into_field(union acpi_operand_object *obj_desc, access_bit_width =ACPI_MUL_8 (obj_desc->common_field.access_byte_width); -/* -* Create the bitmasks used for bit insertion. -* Note: This if/else is used to bypass compiler differences with the -* shift operator -*/ -if (access_bit_width ==ACPI_INTEGER_BIT_SIZE ) { - width_mask =ACPI_UINT64_MAX ; - }else { - width_mask =ACPI_MASK_BITS_ABOVE (access_bit_width); - } +/* Create the bitmasks used for bit insertion */ + width_mask =ACPI_MASK_BITS_ABOVE_64 (access_bit_width); mask = width_mask &ACPI_MASK_BITS_BELOW (obj_desc->common_field.start_field_bit_offset);
Signature · 1 line
1.7.10
PATCH 12/15 ACPICA: Hardware: Add access_width/bit_offset support in acpi_hw_read()
In reply to Lv ZhengACPICA commit 96ece052d4d073aae4f935f0ff0746646aea1174 ACPICA commit 3d8583a054e410f2ea4d73b48986facad9cfc0d4
This patch adds access_width/bit_offset support in acpi_hw_read(). This also enables GAS definition where bit_width is not a power of two. Lv Zheng.
--- drivers/acpi/acpica/hwregs.c | 75 ++++++++++++++++++++++++++++++++++-------- 1 file changed, 62 insertions(+), 13 deletions(-)
drivers/acpi/acpica/hwregs.c +62 -13
@@ -195,17 +195,19 @@ acpi_hw_validate_register(struct acpi_generic_address *reg,* 64-bit values is not needed. * * LIMITATIONS: <These limitations also apply to acpi_hw_write> -* bit_width must be exactly 8, 16, or 32. * space_ID must be system_memory or system_IO. -* bit_offset and access_width are currently ignored, as there has -* not been a need to implement these. * ******************************************************************************/ acpi_status acpi_hw_read (u32 *value,struct acpi_generic_address *reg) {u64 address; +u8 access_width; +u32 bit_width; +u8 bit_offset;u64 value64; +u32 value32; +u8 index;acpi_status status;ACPI_FUNCTION_NAME (hw_read);
@@ -217,28 +219,75 @@ acpi_status acpi_hw_read(u32 *value, struct acpi_generic_address *reg)return (status); } -/* Initialize entire 32-bit return value to zero */ - +/* +* Initialize entire 32-bit return value to zero, convert access_width +* into number of bits based +*/ *value =0 ; + access_width =acpi_hw_get_access_bit_width (reg,32 ); + bit_width = reg->bit_offset + reg->bit_width; + bit_offset = reg->bit_offset;/* * Two address spaces supported: Memory or IO. PCI_Config is * not supported here because the GAS structure is insufficient */ -if (reg->space_id ==ACPI_ADR_SPACE_SYSTEM_MEMORY ) { - status =acpi_os_read_memory ((acpi_physical_address ) - address, &value64, reg->bit_width); + index =0 ; +while (bit_width) { +if (bit_offset >= access_width) { + value32 =0 ; + bit_offset -= access_width; + }else { +if (reg->space_id ==ACPI_ADR_SPACE_SYSTEM_MEMORY ) { + status = +acpi_os_read_memory ((acpi_physical_address ) + address + + index * +ACPI_DIV_8 + (access_width), + &value64, access_width); + value32 = (u32 )value64; + }else {/* ACPI_ADR_SPACE_SYSTEM_IO, validated earlier */ + + status =acpi_hw_read_port ((acpi_io_address ) + address + + index * +ACPI_DIV_8 + (access_width), + &value32, + access_width); + } - *value = (u32 )value64; - }else {/* ACPI_ADR_SPACE_SYSTEM_IO, validated earlier */ +/* +* Use offset style bit masks because: +* bit_offset < access_width/bit_width < access_width, and +* access_width is ensured to be less than 32-bits by +* acpi_hw_validate_register(). +*/ +if (bit_offset) { + value32 &=ACPI_MASK_BITS_BELOW (bit_offset); + bit_offset =0 ; + } +if (bit_width < access_width) { + value32 &=ACPI_MASK_BITS_ABOVE (bit_width); + } + } + +/* +* Use offset style bit writes because "Index * AccessWidth" is +* ensured to be less than 32-bits by acpi_hw_validate_register(). +*/ +ACPI_SET_BITS (value, index * access_width, +ACPI_MASK_BITS_ABOVE_32 (access_width), value32); - status =acpi_hw_read_port ((acpi_io_address ) - address, value, reg->bit_width); + bit_width -= + bit_width > access_width ? access_width : bit_width; + index++; }ACPI_DEBUG_PRINT ((ACPI_DB_IO ,"Read: %8.8X width %2d from %8.8X%8.8X (%s)\n" , - *value, reg->bit_width,ACPI_FORMAT_UINT64 (address), + *value, access_width,ACPI_FORMAT_UINT64 (address),acpi_ut_get_region_name (reg->space_id)));return (status);
Signature · 1 line
1.7.10
PATCH 13/15 ACPICA: Hardware: Add access_width/bit_offset support for acpi_hw_write()
In reply to Lv ZhengACPICA commit 48eea5e7993ccb7189bd63cd726e02adafee6057
This patch adds access_width/bit_offset support in acpi_hw_write(). Lv Zheng.
--- drivers/acpi/acpica/hwregs.c | 146 +++++++++++++++++++++++++++++++++++++++--- 1 file changed, 137 insertions(+), 9 deletions(-)
drivers/acpi/acpica/hwregs.c +137 -9
@@ -311,6 +311,12 @@ acpi_status acpi_hw_read(u32 *value, struct acpi_generic_address *reg)acpi_status acpi_hw_write (u32 value,struct acpi_generic_address *reg) {u64 address; +u8 access_width; +u32 bit_width; +u8 bit_offset; +u64 value64; +u32 new_value32, old_value32; +u8 index;acpi_status status;ACPI_FUNCTION_NAME (hw_write);
@@ -322,23 +328,145 @@ acpi_status acpi_hw_write(u32 value, struct acpi_generic_address *reg)return (status); } +/* Convert access_width into number of bits based */ + + access_width =acpi_hw_get_access_bit_width (reg,32 ); + bit_width = reg->bit_offset + reg->bit_width; + bit_offset = reg->bit_offset; +/* * Two address spaces supported: Memory or IO. PCI_Config is * not supported here because the GAS structure is insufficient */ -if (reg->space_id ==ACPI_ADR_SPACE_SYSTEM_MEMORY ) { - status =acpi_os_write_memory ((acpi_physical_address ) - address, (u64 )value, - reg->bit_width); - }else {/* ACPI_ADR_SPACE_SYSTEM_IO, validated earlier */ - - status =acpi_hw_write_port ((acpi_io_address ) - address, value, reg->bit_width); + index =0 ; +while (bit_width) { +/* +* Use offset style bit reads because "Index * AccessWidth" is +* ensured to be less than 32-bits by acpi_hw_validate_register(). +*/ + new_value32 =ACPI_GET_BITS (&value, index * access_width, +ACPI_MASK_BITS_ABOVE_32 + (access_width)); + +if (bit_offset >= access_width) { + bit_offset -= access_width; + }else { +/* +* Use offset style bit masks because access_width is ensured +* to be less than 32-bits by acpi_hw_validate_register() and +* bit_offset/bit_width is less than access_width here. +*/ +if (bit_offset) { + new_value32 &=ACPI_MASK_BITS_BELOW (bit_offset); + } +if (bit_width < access_width) { + new_value32 &=ACPI_MASK_BITS_ABOVE (bit_width); + } + +if (reg->space_id ==ACPI_ADR_SPACE_SYSTEM_MEMORY ) { +if (bit_offset || bit_width < access_width) { +/* +* Read old values in order not to modify the bits that +* are beyond the register bit_width/bit_offset setting. +*/ + status = +acpi_os_read_memory ((acpi_physical_address ) + address + + index * +ACPI_DIV_8 + (access_width), + &value64, + access_width); + old_value32 = (u32 )value64; + +/* +* Use offset style bit masks because access_width is +* ensured to be less than 32-bits by +* acpi_hw_validate_register() and bit_offset/bit_width is +* less than access_width here. +*/ +if (bit_offset) { + old_value32 &= +ACPI_MASK_BITS_ABOVE + (bit_offset); + bit_offset =0 ; + } +if (bit_width < access_width) { + old_value32 &= +ACPI_MASK_BITS_BELOW + (bit_width); + } + + new_value32 |= old_value32; + } + + value64 = (u64 )new_value32; + status = +acpi_os_write_memory ((acpi_physical_address ) + address + + index * +ACPI_DIV_8 + (access_width), + value64, access_width); + }else {/* ACPI_ADR_SPACE_SYSTEM_IO, validated earlier */ + +if (bit_offset || bit_width < access_width) { +/* +* Read old values in order not to modify the bits that +* are beyond the register bit_width/bit_offset setting. +*/ + status = +acpi_hw_read_port ((acpi_io_address ) + address + + index * +ACPI_DIV_8 + (access_width), + &old_value32, + access_width); + +/* +* Use offset style bit masks because access_width is +* ensured to be less than 32-bits by +* acpi_hw_validate_register() and bit_offset/bit_width is +* less than access_width here. +*/ +if (bit_offset) { + old_value32 &= +ACPI_MASK_BITS_ABOVE + (bit_offset); + bit_offset =0 ; + } +if (bit_width < access_width) { + old_value32 &= +ACPI_MASK_BITS_BELOW + (bit_width); + } + + new_value32 |= old_value32; + } + + status =acpi_hw_write_port ((acpi_io_address ) + address + + index * +ACPI_DIV_8 + (access_width), + new_value32, + access_width); + } + } + +/* +* Index * access_width is ensured to be less than 32-bits by +* acpi_hw_validate_register(). +*/ + bit_width -= + bit_width > access_width ? access_width : bit_width; + index++; }ACPI_DEBUG_PRINT ((ACPI_DB_IO ,"Wrote: %8.8X width %2d to %8.8X%8.8X (%s)\n" , - value, reg->bit_width,ACPI_FORMAT_UINT64 (address), + value, access_width,ACPI_FORMAT_UINT64 (address),acpi_ut_get_region_name (reg->space_id)));return (status);
Signature · 1 line
1.7.10
PATCH 14/15 ACPICA: Move all ASCII utilities to a common file
In reply to Lv ZhengFrom: Bob Moore <[email protected]>
ACPICA commit ba60e4500053010bf775d58f6f61febbdb94d817
New file is utascii.c
--- drivers/acpi/acpica/Makefile | 1 + drivers/acpi/acpica/actables.h | 2 - drivers/acpi/acpica/acutils.h | 13 ++- drivers/acpi/acpica/dbnames.c | 2 +- drivers/acpi/acpica/exnames.c | 2 +- drivers/acpi/acpica/tbdata.c | 6 +- drivers/acpi/acpica/tbfind.c | 2 +- drivers/acpi/acpica/tbinstal.c | 6 +- drivers/acpi/acpica/tbutils.c | 27 ------ drivers/acpi/acpica/utascii.c | 140 ++++++++++++++++++++++++++++++ drivers/acpi/acpica/utstring.c | 69 +-------------- tools/power/acpi/tools/acpidump/Makefile | 1 + tools/power/acpi/tools/acpidump/apdump.c | 8 +- 13 files changed, 168 insertions(+), 111 deletions(-) create mode 100644 drivers/acpi/acpica/utascii.c
drivers/acpi/acpica/Makefile +1 -0
@@ -150,6 +150,7 @@ acpi-y += \ acpi-y += \ utaddress.o \ utalloc.o \ + utascii.o \ utbuffer.o \ utcopy.o \ utexcep.o \
drivers/acpi/acpica/actables.h +0 -2
@@ -161,8 +161,6 @@ acpi_tb_install_fixed_table(acpi_physical_address address,acpi_status acpi_tb_parse_root_table (acpi_physical_address rsdp_address); -u8 acpi_is_valid_signature (char *signature); -/* * tbxfload */
drivers/acpi/acpica/acutils.h +9 -4
@@ -167,6 +167,15 @@ struct acpi_pkg_info {#define DB_QWORD_DISPLAY 8/* +* utascii - ASCII utilities +*/ +u8 acpi_ut_valid_nameseg (char *signature); + +u8 acpi_ut_valid_name_char (char character,u32 position); + +void acpi_ut_check_and_repair_ascii (u8 *name,char *repaired_name,u32 count); + +/* * utnonansi - Non-ANSI C library functions */ void acpi_ut_strupr (char *src_string);
@@ -579,10 +588,6 @@ void acpi_ut_print_string(char *string, u16 max_length);void ut_convert_backslashes (char *pathname);#endif -u8 acpi_ut_valid_acpi_name (char *name); - -u8 acpi_ut_valid_acpi_char (char character,u32 position); -void acpi_ut_repair_name (char *name);#if defined (ACPI_DEBUGGER ) || defined (ACPI_APPLICATION )
drivers/acpi/acpica/dbnames.c +1 -1
@@ -709,7 +709,7 @@ acpi_db_integrity_walk(acpi_handle obj_handle,return (AE_OK ); } -if (!acpi_ut_valid_acpi_name (node->name.ascii)) { +if (!acpi_ut_valid_nameseg (node->name.ascii)) {acpi_os_printf ("Invalid AcpiName for Node %p\n" , node);return (AE_OK ); }
drivers/acpi/acpica/exnames.c +1 -1
@@ -178,7 +178,7 @@ static acpi_status acpi_ex_name_segment(u8 ** in_aml_address, char *name_string)for (index =0 ; (index <ACPI_NAME_SIZE ) - && (acpi_ut_valid_acpi_char (*aml_address,0 )); index++) { + && (acpi_ut_valid_name_char (*aml_address,0 )); index++) { char_buf[index] = *aml_address++;ACPI_DEBUG_PRINT ((ACPI_DB_LOAD ,"%c\n" , char_buf[index])); }
drivers/acpi/acpica/tbdata.c +3 -3
@@ -401,9 +401,9 @@ acpi_tb_verify_temp_table(struct acpi_table_desc *table_desc, char *signature)ACPI_EXCEPTION ((AE_INFO ,AE_NO_MEMORY ,"%4.4s 0x%8.8X%8.8X" " Attempted table install failed" , -acpi_ut_valid_acpi_name (table_desc-> - signature. - ascii) ? +acpi_ut_valid_nameseg (table_desc-> + signature. + ascii) ? table_desc->signature.ascii :"????" ,ACPI_FORMAT_UINT64 (table_desc-> address)));
drivers/acpi/acpica/tbfind.c +1 -1
@@ -76,7 +76,7 @@ acpi_tb_find_table(char *signature,/* Validate the input table signature */ -if (!acpi_is_valid_signature (signature)) { +if (!acpi_ut_valid_nameseg (signature)) {return_ACPI_STATUS (AE_BAD_SIGNATURE ); }
drivers/acpi/acpica/tbinstal.c +3 -3
@@ -299,9 +299,9 @@ acpi_tb_install_standard_table(acpi_physical_address address,ACPI_BIOS_ERROR ((AE_INFO ,"Table has invalid signature [%4.4s] (0x%8.8X), " "must be SSDT or OEMx" , -acpi_ut_valid_acpi_name (new_table_desc. - signature. - ascii) ? +acpi_ut_valid_nameseg (new_table_desc. + signature. + ascii) ? new_table_desc.signature. ascii :"????" , new_table_desc.signature.integer));
drivers/acpi/acpica/tbutils.c +0 -27
@@ -380,30 +380,3 @@ next_table:acpi_os_unmap_memory (table, length);return_ACPI_STATUS (AE_OK ); } - -/******************************************************************************* -* -* FUNCTION: acpi_is_valid_signature -* -* PARAMETERS: signature - Sig string to be validated -* -* RETURN: TRUE if signature is has 4 valid ACPI characters -* -* DESCRIPTION: Validate an ACPI table signature. -* -******************************************************************************/ - -u8 acpi_is_valid_signature (char *signature) -{ -u32 i; - -/* Validate each character in the signature */ - -for (i =0 ; i <ACPI_NAME_SIZE ; i++) { -if (!acpi_ut_valid_acpi_char (signature[i], i)) { -return (FALSE); - } - } - -return (TRUE); -}
drivers/acpi/acpica/utascii.c new file +140 -0
140 lines not on this page · raw message
drivers/acpi/acpica/utstring.c +1 -68
81 lines not on this page · raw message
tools/power/acpi/tools/acpidump/Makefile +1 -0
@@ -31,6 +31,7 @@ TOOL_OBJS = \ osunixxf.o\ tbprint.o\ tbxfroot.o\ + utascii.o\ utbuffer.o\ utdebug.o\ utexcep.o\
tools/power/acpi/tools/acpidump/apdump.c +7 -1
@@ -68,7 +68,7 @@ u8 ap_is_valid_header(struct acpi_table_header *table)/* Make sure signature is all ASCII and a valid ACPI name */ -if (!acpi_ut_valid_acpi_name (table->signature)) { +if (!acpi_ut_valid_nameseg (table->signature)) {acpi_log_error ("Table signature (0x%8.8X) is invalid\n" , *(u32 *)table->signature);return (FALSE);
@@ -407,6 +407,12 @@ int ap_dump_table_from_file(char *pathname)return (-1 ); } +if (!acpi_ut_valid_nameseg (table->signature)) { +acpi_log_error + ("No valid ACPI signature was found in input file %s\n" , + pathname); + } +/* File must be at least as long as the table length */ if (table->length > file_size) {
Signature · 1 line
1.7.10
PATCH 15/15 ACPICA: Update version to 20160422
In reply to Lv ZhengFrom: Bob Moore <[email protected]>
ACPICA commit a2327ba410e19c2aabaf34b711dbadf7d1dcf346
Version 20160422.
--- 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 0x20160318 +#define ACPI_CA_VERSION 0x20160422#include <acpi/acconfig.h> #include <acpi/actypes.h>
Signature · 1 line
1.7.10
v2 cover ACPICA: 20160422 Release
In reply to Lv ZhengThe 20160422 ACPICA kernel-resident subsystem updates are linuxized based on the linux-pm/linux-next branch.
NOTE:
1. Indentation improvement
The [PATCH 01] is a result of an ACPICA release process fix. It requires much of human intervention, and many linuxized patches in the developers' local working repositories that are not upstreamed to the ACPICA will be burnt by this commit, and may take weeks or months for the developers to recover. So hope we can do it correctly and rapidly.
2. AcessSize/BitOffset support
ACPICA implements ACPI hardware register accesses using ACPI 1.0 style, which contains only BLK/LEN fields. ACPI 2.0 starts to use Generic Address Structure to define hardware registers, the ACPI 1.0 fields can be translated into Address/BitWidth fields and ACPI 2.0 defines new AccessSize/BitOffset fields as an extension. While the ACPICA code of the GAS support is still Address/BitWidth aware only. This becomes one of the significant ACPI 2.0 gaps in ACPICA.
But as we have already switched the address favor to 64-bit (aka., favor GAS descriptors) and there is almost no regression report, enabling AccessSize/BitOffset awareness seems to be just a theoretical issue because there is no existing users requiring this, and enabling it might just be an ecosystem enabling work for the future users.
So the most important thing of this improvement is to ensure regression safer by keeping old behavior working. [PATCH 08] is thus generated for this purpose. After ensuring this, we need this improvement to appear in the upstream to have more users to test it so that we can learn unknown cases from the feedback.
The patchset has passed the following build/boot tests. Build tests are performed as follows:
1. i386 + allyes
2. i386 + allno
3. i386 + default + ACPI_DEBUGGER=y
4. i386 + default + ACPI_DEBUGGER=n + ACPI_DEBUG=y
5. i386 + default + ACPI_DEBUG=n + ACPI=y
6. i386 + default + ACPI=n
7. x86_64 + allyes
8. x86_64 + allno
9. x86_64 + default + ACPI_DEBUGGER=y
10.x86_64 + default + ACPI_DEBUGGER=n + ACPI_DEBUG=y 11.x86_64 + default + ACPI_DEBUG=n + ACPI=y
12.x86_64 + default + ACPI=n
Boot tests are performed as follows:
1. i386 + default + ACPI_DEBUGGER=y
2. x86_64 + default + ACPI_DEBUGGER=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 "drivers/platform" drivers
All other drivers that link the APIs provided by ACPICA subsystem
The divergences checking result:
Before applying (20160318 Release):
494 lines
After applying (20160422 Release):
485 lines
The reduction is caused by recently merged module level improvement.
Bob Moore (7):
ACPICA: Refactor evaluate_object to reduce nesting
ACPICA: ACPI 6.1: Support for new PCCT subtable
ACPICA: ACPI 6.0: Update _BIX support for new package element
ACPICA: ACPI 6.0, tools/iasl: Add support for new resource
descriptors
ACPICA: Renamed some #defined flag constants for clarity
ACPICA: Move all ASCII utilities to a common file
ACPICA: Update version to 20160422
Lv Zheng (6):
ACPICA: Divergence: remove unwanted spaces for typedef
ACPICA: Utilities: Add ACPI_IS_ALIGNED() macro
ACPICA: Hardware: Add optimized access bit width support
ACPICA: Executer: Introduce a set of macros to handle bit width mask
generation
ACPICA: ACPI 2.0, Hardware: Add access_width/bit_offset support in
acpi_hw_read()
ACPICA: ACPI 2.0, Hardware: Add access_width/bit_offset support for
acpi_hw_write()drivers/acpi/acpica/Makefile | 1 + drivers/acpi/acpica/acdebug.h | 6 +- drivers/acpi/acpica/acevents.h | 1 + drivers/acpi/acpica/acinterp.h | 2 +- drivers/acpi/acpica/aclocal.h | 61 ++--- drivers/acpi/acpica/acmacros.h | 15 +- drivers/acpi/acpica/acpredef.h | 5 +- drivers/acpi/acpica/acresrc.h | 8 +- drivers/acpi/acpica/actables.h | 2 - drivers/acpi/acpica/acutils.h | 35 +-- drivers/acpi/acpica/dbcmds.c | 4 +- drivers/acpi/acpica/dbconvert.c | 4 +- drivers/acpi/acpica/dbexec.c | 2 +- drivers/acpi/acpica/dbinput.c | 6 +- drivers/acpi/acpica/dbnames.c | 4 +- drivers/acpi/acpica/dbxface.c | 4 +- drivers/acpi/acpica/dscontrol.c | 4 +- drivers/acpi/acpica/dsinit.c | 2 +- drivers/acpi/acpica/dsmethod.c | 2 +- drivers/acpi/acpica/dsutils.c | 2 +- drivers/acpi/acpica/dswload.c | 4 +- drivers/acpi/acpica/dswload2.c | 4 +- drivers/acpi/acpica/dswstate.c | 10 +- drivers/acpi/acpica/evgpe.c | 4 +- drivers/acpi/acpica/evgpeblk.c | 4 +- drivers/acpi/acpica/evgpeutil.c | 4 +- drivers/acpi/acpica/evhandler.c | 2 +- drivers/acpi/acpica/evmisc.c | 3 +- drivers/acpi/acpica/evrgnini.c | 2 +- drivers/acpi/acpica/evxfgpe.c | 2 +- drivers/acpi/acpica/exconcat.c | 4 +- drivers/acpi/acpica/exconvrt.c | 4 +- drivers/acpi/acpica/excreate.c | 2 +- drivers/acpi/acpica/exfield.c | 4 +- drivers/acpi/acpica/exfldio.c | 14 +- drivers/acpi/acpica/exnames.c | 2 +- drivers/acpi/acpica/exoparg3.c | 8 +- drivers/acpi/acpica/exoparg6.c | 2 +- drivers/acpi/acpica/exregion.c | 6 +- drivers/acpi/acpica/exresnte.c | 4 +- drivers/acpi/acpica/exresolv.c | 2 +- drivers/acpi/acpica/exresop.c | 4 +- drivers/acpi/acpica/exstorob.c | 4 +- drivers/acpi/acpica/hwgpe.c | 6 +- drivers/acpi/acpica/hwregs.c | 270 ++++++++++++++++++-- drivers/acpi/acpica/hwxface.c | 7 +- drivers/acpi/acpica/nsconvert.c | 6 +- drivers/acpi/acpica/nsnames.c | 2 +- drivers/acpi/acpica/nsobject.c | 4 +- drivers/acpi/acpica/nsprepkg.c | 86 +++++++ drivers/acpi/acpica/nsrepair.c | 2 +- drivers/acpi/acpica/nsrepair2.c | 6 +- drivers/acpi/acpica/nsutils.c | 8 +- drivers/acpi/acpica/nsxfeval.c | 113 ++++---- drivers/acpi/acpica/nsxfname.c | 6 +- drivers/acpi/acpica/nsxfobj.c | 6 +- drivers/acpi/acpica/psargs.c | 2 +- drivers/acpi/acpica/psparse.c | 4 +- drivers/acpi/acpica/psutils.c | 2 +- drivers/acpi/acpica/psxface.c | 2 +- drivers/acpi/acpica/rscalc.c | 90 +++---- drivers/acpi/acpica/rscreate.c | 2 +- drivers/acpi/acpica/rsdumpinfo.c | 9 +- drivers/acpi/acpica/rsmisc.c | 2 +- drivers/acpi/acpica/rsserial.c | 21 +- drivers/acpi/acpica/rsutils.c | 12 +- drivers/acpi/acpica/rsxface.c | 6 +- drivers/acpi/acpica/tbdata.c | 15 +- drivers/acpi/acpica/tbfadt.c | 2 +- drivers/acpi/acpica/tbfind.c | 2 +- drivers/acpi/acpica/tbinstal.c | 6 +- drivers/acpi/acpica/tbutils.c | 33 +-- drivers/acpi/acpica/tbxface.c | 6 +- drivers/acpi/acpica/tbxfroot.c | 8 +- drivers/acpi/acpica/utalloc.c | 5 +- drivers/acpi/acpica/utascii.c | 140 ++++++++++ drivers/acpi/acpica/utbuffer.c | 24 +- drivers/acpi/acpica/utcache.c | 7 +- drivers/acpi/acpica/utcopy.c | 16 +- drivers/acpi/acpica/utids.c | 8 +- drivers/acpi/acpica/utmath.c | 4 +- drivers/acpi/acpica/utobject.c | 18 +- drivers/acpi/acpica/utosi.c | 4 +- drivers/acpi/acpica/utownerid.c | 6 +- drivers/acpi/acpica/utprint.c | 14 +- drivers/acpi/acpica/utstring.c | 71 +---- drivers/acpi/acpica/utxface.c | 4 +- include/acpi/acpiosxf.h | 8 +- include/acpi/acpixf.h | 23 +- include/acpi/acrestyp.h | 1 + include/acpi/actbl3.h | 23 +- include/acpi/actypes.h | 41 +-- .../acpi/os_specific/service_layers/oslinuxtbl.c | 47 ++-- .../acpi/os_specific/service_layers/osunixxf.c | 24 +- tools/power/acpi/tools/acpidump/Makefile | 1 + tools/power/acpi/tools/acpidump/apdump.c | 10 +- 96 files changed, 961 insertions(+), 553 deletions(-) create mode 100644 drivers/acpi/acpica/utascii.c
Signature · 1 line
1.7.10
PATCH v2 1/13 ACPICA: Divergence: remove unwanted spaces for typedef
ACPICA commit b2294cae776f5a66a7697414b21949d307e6856f
This patch removes unwanted spaces for typedef. This solution doesn't cover function types.
Note that the linuxize result of this commit is very giant and should have many conflicts against the current Linux upstream. Thus it is required to modify the linuxize result of this commit and the commits around it manually in order to have them merged to the Linux upstream. Since this is very costy, we should do this only once, and if we can't ensure to do this only once, we need to revert the Linux code to the wrong indentation result before merging the linuxize result of this commit. Lv Zheng.
--- drivers/acpi/acpica/acdebug.h | 6 +- drivers/acpi/acpica/acevents.h | 1 + drivers/acpi/acpica/acinterp.h | 2 +- drivers/acpi/acpica/aclocal.h | 31 ++++--- drivers/acpi/acpica/acresrc.h | 8 +- drivers/acpi/acpica/acutils.h | 22 ++--- drivers/acpi/acpica/dbcmds.c | 4 +- drivers/acpi/acpica/dbconvert.c | 4 +- drivers/acpi/acpica/dbexec.c | 2 +- drivers/acpi/acpica/dbinput.c | 6 +- drivers/acpi/acpica/dbnames.c | 2 +- drivers/acpi/acpica/dbxface.c | 4 +- drivers/acpi/acpica/dscontrol.c | 4 +- drivers/acpi/acpica/dsinit.c | 2 +- drivers/acpi/acpica/dsmethod.c | 2 +- drivers/acpi/acpica/dsutils.c | 2 +- drivers/acpi/acpica/dswload.c | 4 +- drivers/acpi/acpica/dswload2.c | 4 +- drivers/acpi/acpica/dswstate.c | 10 +-- drivers/acpi/acpica/evgpe.c | 4 +- drivers/acpi/acpica/evgpeblk.c | 4 +- drivers/acpi/acpica/evgpeutil.c | 4 +- drivers/acpi/acpica/evhandler.c | 2 +- drivers/acpi/acpica/evmisc.c | 3 +- drivers/acpi/acpica/evrgnini.c | 2 +- drivers/acpi/acpica/evxfgpe.c | 2 +- drivers/acpi/acpica/exconcat.c | 4 +- drivers/acpi/acpica/exconvrt.c | 4 +- drivers/acpi/acpica/excreate.c | 2 +- drivers/acpi/acpica/exfield.c | 4 +- drivers/acpi/acpica/exfldio.c | 2 +- drivers/acpi/acpica/exoparg3.c | 8 +- drivers/acpi/acpica/exoparg6.c | 2 +- drivers/acpi/acpica/exregion.c | 6 +- drivers/acpi/acpica/exresnte.c | 4 +- drivers/acpi/acpica/exresolv.c | 2 +- drivers/acpi/acpica/exresop.c | 4 +- drivers/acpi/acpica/exstorob.c | 4 +- drivers/acpi/acpica/hwgpe.c | 6 +- drivers/acpi/acpica/hwxface.c | 7 +- drivers/acpi/acpica/nsconvert.c | 6 +- drivers/acpi/acpica/nsnames.c | 2 +- drivers/acpi/acpica/nsobject.c | 4 +- drivers/acpi/acpica/nsrepair.c | 2 +- drivers/acpi/acpica/nsrepair2.c | 6 +- drivers/acpi/acpica/nsutils.c | 8 +- drivers/acpi/acpica/nsxfeval.c | 2 +- drivers/acpi/acpica/nsxfname.c | 6 +- drivers/acpi/acpica/nsxfobj.c | 6 +- drivers/acpi/acpica/psargs.c | 2 +- drivers/acpi/acpica/psparse.c | 4 +- drivers/acpi/acpica/psxface.c | 2 +- drivers/acpi/acpica/rscalc.c | 90 ++++++++++---------- drivers/acpi/acpica/rscreate.c | 2 +- drivers/acpi/acpica/rsmisc.c | 2 +- drivers/acpi/acpica/rsutils.c | 12 +-- drivers/acpi/acpica/rsxface.c | 6 +- drivers/acpi/acpica/tbdata.c | 9 +- drivers/acpi/acpica/tbfadt.c | 2 +- drivers/acpi/acpica/tbutils.c | 6 +- drivers/acpi/acpica/tbxface.c | 6 +- drivers/acpi/acpica/tbxfroot.c | 8 +- drivers/acpi/acpica/utalloc.c | 5 +- drivers/acpi/acpica/utbuffer.c | 24 +++--- drivers/acpi/acpica/utcache.c | 7 +- drivers/acpi/acpica/utcopy.c | 16 ++-- drivers/acpi/acpica/utids.c | 8 +- drivers/acpi/acpica/utmath.c | 4 +- drivers/acpi/acpica/utobject.c | 18 ++-- drivers/acpi/acpica/utosi.c | 4 +- drivers/acpi/acpica/utownerid.c | 6 +- drivers/acpi/acpica/utprint.c | 14 +-- drivers/acpi/acpica/utstring.c | 2 +- drivers/acpi/acpica/utxface.c | 4 +- include/acpi/acpiosxf.h | 8 +- include/acpi/acpixf.h | 21 ++--- include/acpi/actypes.h | 41 ++++----- .../acpi/os_specific/service_layers/oslinuxtbl.c | 47 +++++----- .../acpi/os_specific/service_layers/osunixxf.c | 24 +++--- tools/power/acpi/tools/acpidump/apdump.c | 2 +- 80 files changed, 324 insertions(+), 324 deletions(-)
drivers/acpi/acpica/acdebug.h +3 -3
@@ -196,7 +196,7 @@ ACPI_DBR_DEPENDENT_RETURN_VOID(voidacpi_walk_state *walk_state)) - acpi_status acpi_db_display_all_methods(char *display_count_arg); +acpi_status acpi_db_display_all_methods(char *display_count_arg);void acpi_db_display_arguments (void );
@@ -220,7 +220,7 @@ ACPI_DBR_DEPENDENT_RETURN_VOID(void* dbexec - debugger control method execution */ void -acpi_db_execute (char *name,char **args,acpi_object_type * types,u32 flags); +acpi_db_execute (char *name,char **args,acpi_object_type *types,u32 flags); void acpi_db_create_execution_threads(char *num_threads_arg,
@@ -271,7 +271,7 @@ void ACPI_SYSTEM_XFACE acpi_db_execute_thread(void *context);acpi_status acpi_db_user_commands (void );char *acpi_db_get_next_token (char *string, -char **next,acpi_object_type * return_type); +char **next,acpi_object_type *return_type);/* * dbobject
drivers/acpi/acpica/acevents.h +1 -0
@@ -72,6 +72,7 @@ acpi_status acpi_ev_init_global_lock_handler(void); ACPI_HW_DEPENDENT_RETURN_OK(acpi_status acpi_ev_acquire_global_lock(u16 timeout)) ACPI_HW_DEPENDENT_RETURN_OK(acpi_status acpi_ev_release_global_lock(void)) + acpi_status acpi_ev_remove_global_lock_handler(void);/*
drivers/acpi/acpica/acinterp.h +1 -1
@@ -370,7 +370,7 @@ acpi_ex_resolve_to_value(union acpi_operand_object **stack_ptr,acpi_status acpi_ex_resolve_multiple (struct acpi_walk_state *walk_state,union acpi_operand_object *operand, -acpi_object_type * return_type, +acpi_object_type *return_type,union acpi_operand_object **return_desc);/*
drivers/acpi/acpica/aclocal.h +17 -14
@@ -278,7 +278,7 @@ struct acpi_create_field_info { };typedef -acpi_status (*acpi_internal_method ) (struct acpi_walk_state * walk_state); +acpi_status (*acpi_internal_method ) (struct acpi_walk_state * walk_state);/* * Bitmapped ACPI types. Used internally only
@@ -395,11 +395,12 @@ union acpi_predefined_info {/* Return object auto-repair info */ -typedef acpi_status (*acpi_object_converter ) (struct acpi_namespace_node * scope, -union acpi_operand_object - *original_object, -union acpi_operand_object - **converted_object); +typedef acpi_status (*acpi_object_converter ) (struct acpi_namespace_node * + scope, +union acpi_operand_object * + original_object, +union acpi_operand_object ** + converted_object);struct acpi_simple_repair_info {char name[ACPI_NAME_SIZE ];
@@ -539,10 +540,10 @@ struct acpi_gpe_device_info {struct acpi_namespace_node *gpe_device; }; -typedef acpi_status (*acpi_gpe_callback ) (struct acpi_gpe_xrupt_info * - gpe_xrupt_info, -struct acpi_gpe_block_info *gpe_block, -void *context); +typedef acpi_status (*acpi_gpe_callback ) (struct acpi_gpe_xrupt_info * + gpe_xrupt_info, +struct acpi_gpe_block_info * + gpe_block,void *context);/* Information about each particular fixed event */
@@ -657,10 +658,11 @@ struct acpi_result_values { };typedef -acpi_status (*acpi_parse_downwards ) (struct acpi_walk_state * walk_state, -union acpi_parse_object ** out_op); +acpi_status (*acpi_parse_downwards ) (struct acpi_walk_state * walk_state, +union acpi_parse_object ** out_op); -typedef acpi_status (*acpi_parse_upwards ) (struct acpi_walk_state * walk_state); +typedef +acpi_status (*acpi_parse_upwards ) (struct acpi_walk_state * walk_state);/* Global handlers for AML Notifies */
@@ -700,7 +702,8 @@ union acpi_generic_state {* ****************************************************************************/ -typedef acpi_status (*acpi_execute_op ) (struct acpi_walk_state * walk_state); +typedef +acpi_status (*acpi_execute_op ) (struct acpi_walk_state * walk_state);/* Address Range info block */
drivers/acpi/acpica/acresrc.h +4 -4
@@ -223,16 +223,16 @@ acpi_rs_get_aei_method_data(struct acpi_namespace_node *node,* rscalc */ acpi_status -acpi_rs_get_list_length (u8 * aml_buffer, -u32 aml_buffer_length,acpi_size * size_needed); +acpi_rs_get_list_length (u8 *aml_buffer, +u32 aml_buffer_length,acpi_size *size_needed);acpi_status acpi_rs_get_aml_length (struct acpi_resource *resource_list, -acpi_size resource_list_size,acpi_size * size_needed); +acpi_size resource_list_size,acpi_size *size_needed);acpi_status acpi_rs_get_pci_routing_table_length (union acpi_operand_object *package_object, -acpi_size * buffer_size_needed); +acpi_size *buffer_size_needed); acpi_status acpi_rs_convert_aml_to_resources(u8 * aml,
drivers/acpi/acpica/acutils.h +11 -11
@@ -136,16 +136,16 @@ extern const char *acpi_gbl_pt_decode[];#define ACPI_SMALL_VARIABLE_LENGTH 3typedef -acpi_status (*acpi_walk_aml_callback ) (u8 *aml, -u32 length, -u32 offset, -u8 resource_index,void **context); +acpi_status (*acpi_walk_aml_callback ) (u8 *aml, +u32 length, +u32 offset, +u8 resource_index,void **context);typedef -acpi_status (*acpi_pkg_callback ) (u8 object_type, -union acpi_operand_object *source_object, -union acpi_generic_state * state, -void *context); +acpi_status (*acpi_pkg_callback ) (u8 object_type, +union acpi_operand_object * source_object, +union acpi_generic_state * state, +void *context);struct acpi_pkg_info {u8 *free_space;
@@ -424,7 +424,7 @@ union acpi_operand_object *acpi_ut_create_buffer_object(acpi_size buffer_size);union acpi_operand_object *acpi_ut_create_string_object (acpi_size string_size);acpi_status -acpi_ut_get_object_size (union acpi_operand_object *obj,acpi_size * obj_length); +acpi_ut_get_object_size (union acpi_operand_object *obj,acpi_size *obj_length);/* * utosi - Support for the _OSI predefined control method
@@ -541,9 +541,9 @@ acpi_ut_display_init_pathname(u8 type,/* * utownerid - Support for Table/Method Owner IDs */ -acpi_status acpi_ut_allocate_owner_id (acpi_owner_id * owner_id); +acpi_status acpi_ut_allocate_owner_id (acpi_owner_id *owner_id); -void acpi_ut_release_owner_id (acpi_owner_id * owner_id); +void acpi_ut_release_owner_id (acpi_owner_id *owner_id);/* * utresrc
drivers/acpi/acpica/dbcmds.c +2 -2
@@ -738,9 +738,9 @@ acpi_dm_test_resource_conversion(struct acpi_namespace_node *node, char *name) original_aml = return_buffer.pointer;acpi_dm_compare_aml_resources (original_aml->buffer.pointer, - (acpi_rsdesc_size ) original_aml->buffer. + (acpi_rsdesc_size )original_aml->buffer. length, new_aml.pointer, - (acpi_rsdesc_size ) new_aml.length); + (acpi_rsdesc_size )new_aml.length);/* Cleanup and exit */
drivers/acpi/acpica/dbconvert.c +2 -2
@@ -194,7 +194,7 @@ acpi_db_convert_to_buffer(char *string, union acpi_object *object)* ******************************************************************************/ -acpi_status acpi_db_convert_to_package (char *string,union acpi_object * object) +acpi_status acpi_db_convert_to_package (char *string,union acpi_object *object) {char *this;char *next;
@@ -252,7 +252,7 @@ acpi_status acpi_db_convert_to_package(char *string, union acpi_object * object)acpi_status acpi_db_convert_to_object (acpi_object_type type, -char *string,union acpi_object * object) +char *string,union acpi_object *object) {acpi_status status =AE_OK ;
drivers/acpi/acpica/dbexec.c +1 -1
@@ -361,7 +361,7 @@ acpi_db_execution_walk(acpi_handle obj_handle,******************************************************************************/ void -acpi_db_execute (char *name,char **args,acpi_object_type * types,u32 flags) +acpi_db_execute (char *name,char **args,acpi_object_type *types,u32 flags) {acpi_status status;struct acpi_buffer return_obj;
drivers/acpi/acpica/dbinput.c +3 -3
@@ -466,7 +466,7 @@ static void acpi_db_display_help(char *command)******************************************************************************/ char *acpi_db_get_next_token (char *string, -char **next,acpi_object_type * return_type) +char **next,acpi_object_type *return_type) {char *start;u32 depth;
@@ -684,8 +684,8 @@ static u32 acpi_db_match_command(char *user_command)acpi_status acpi_db_command_dispatch (char *input_buffer, -struct acpi_walk_state * walk_state, -union acpi_parse_object * op) +struct acpi_walk_state *walk_state, +union acpi_parse_object *op) {u32 temp;u32 command_index;
drivers/acpi/acpica/dbnames.c +1 -1
@@ -285,7 +285,7 @@ void acpi_db_dump_namespace_by_owner(char *owner_arg, char *depth_arg)u32 max_depth =ACPI_UINT32_MAX ;acpi_owner_id owner_id; - owner_id = (acpi_owner_id )strtoul (owner_arg,NULL ,0 ); + owner_id = (acpi_owner_id )strtoul (owner_arg,NULL ,0 );/* Now we can check for the depth argument */
drivers/acpi/acpica/dbxface.c +2 -2
@@ -162,8 +162,8 @@ void acpi_db_signal_break_point(struct acpi_walk_state *walk_state)******************************************************************************/ acpi_status -acpi_db_single_step (struct acpi_walk_state * walk_state, -union acpi_parse_object * op,u32 opcode_class) +acpi_db_single_step (struct acpi_walk_state *walk_state, +union acpi_parse_object *op,u32 opcode_class) {union acpi_parse_object *next;acpi_status status =AE_OK ;
drivers/acpi/acpica/dscontrol.c +2 -2
@@ -163,8 +163,8 @@ acpi_ds_exec_begin_control_op(struct acpi_walk_state *walk_state,******************************************************************************/ acpi_status -acpi_ds_exec_end_control_op (struct acpi_walk_state * walk_state, -union acpi_parse_object * op) +acpi_ds_exec_end_control_op (struct acpi_walk_state *walk_state, +union acpi_parse_object *op) {acpi_status status =AE_OK ;union acpi_generic_state *control_state;
drivers/acpi/acpica/dsinit.c +1 -1
@@ -188,7 +188,7 @@ acpi_ds_init_one_object(acpi_handle obj_handle,acpi_status acpi_ds_initialize_objects (u32 table_index, -struct acpi_namespace_node * start_node) +struct acpi_namespace_node *start_node) {acpi_status status;struct acpi_init_walk_info info;
drivers/acpi/acpica/dsmethod.c +1 -1
@@ -209,7 +209,7 @@ acpi_ds_detect_named_opcodes(struct acpi_walk_state *walk_state,******************************************************************************/ acpi_status -acpi_ds_method_error (acpi_status status,struct acpi_walk_state * walk_state) +acpi_ds_method_error (acpi_status status,struct acpi_walk_state *walk_state) {u32 aml_offset;
drivers/acpi/acpica/dsutils.c +1 -1
@@ -569,7 +569,7 @@ acpi_ds_create_operand(struct acpi_walk_state *walk_state,/* TBD: May only be temporary */ obj_desc = -acpi_ut_create_string_object ((acpi_size ) name_length); +acpi_ut_create_string_object ((acpi_size )name_length);strncpy (obj_desc->string.pointer, name_string, name_length);
drivers/acpi/acpica/dswload.c +2 -2
@@ -137,8 +137,8 @@ acpi_ds_init_callbacks(struct acpi_walk_state *walk_state, u32 pass_number)******************************************************************************/ acpi_status -acpi_ds_load1_begin_op (struct acpi_walk_state * walk_state, -union acpi_parse_object ** out_op) +acpi_ds_load1_begin_op (struct acpi_walk_state *walk_state, +union acpi_parse_object **out_op) {union acpi_parse_object *op;struct acpi_namespace_node *node;
drivers/acpi/acpica/dswload2.c +2 -2
@@ -490,8 +490,8 @@ acpi_status acpi_ds_load2_end_op(struct acpi_walk_state *walk_state) status =acpi_ds_create_index_field (op, - (acpi_handle ) arg-> - common.node, walk_state); + (acpi_handle )arg->common. + node, walk_state);break ;case AML_BANK_FIELD_OP :
drivers/acpi/acpica/dswstate.c +5 -5
@@ -143,8 +143,8 @@ acpi_ds_result_pop(union acpi_operand_object **object,******************************************************************************/ acpi_status -acpi_ds_result_push (union acpi_operand_object * object, -struct acpi_walk_state * walk_state) +acpi_ds_result_push (union acpi_operand_object *object, +struct acpi_walk_state *walk_state) {union acpi_generic_state *state;acpi_status status;
@@ -307,7 +307,7 @@ static acpi_status acpi_ds_result_stack_pop(struct acpi_walk_state *walk_state)******************************************************************************/ acpi_status -acpi_ds_obj_stack_push (void *object,struct acpi_walk_state * walk_state) +acpi_ds_obj_stack_push (void *object,struct acpi_walk_state *walk_state) {ACPI_FUNCTION_NAME (ds_obj_stack_push);
@@ -354,7 +354,7 @@ acpi_ds_obj_stack_push(void *object, struct acpi_walk_state * walk_state)******************************************************************************/ acpi_status -acpi_ds_obj_stack_pop (u32 pop_count,struct acpi_walk_state * walk_state) +acpi_ds_obj_stack_pop (u32 pop_count,struct acpi_walk_state *walk_state) {u32 i;
@@ -411,7 +411,7 @@ acpi_ds_obj_stack_pop_and_delete(u32 pop_count,return ; } -for (i = (s32 ) pop_count -1 ; i >=0 ; i--) { +for (i = (s32 )pop_count -1 ; i >=0 ; i--) {if (walk_state->num_operands ==0 ) {return ; }
drivers/acpi/acpica/evgpe.c +2 -2
@@ -440,7 +440,7 @@ u32 acpi_ev_gpe_detect(struct acpi_gpe_xrupt_info *gpe_xrupt_list) gpe_event_info = &gpe_block-> - event_info[((acpi_size ) i * + event_info[((acpi_size )i *ACPI_GPE_REGISTER_WIDTH ) + j]; gpe_number = j + gpe_register_info->base_gpe_number;
@@ -652,7 +652,7 @@ static void ACPI_SYSTEM_XFACE acpi_ev_asynch_enable_gpe(void *context)* ******************************************************************************/ -acpi_status acpi_ev_finish_gpe (struct acpi_gpe_event_info * gpe_event_info) +acpi_status acpi_ev_finish_gpe (struct acpi_gpe_event_info *gpe_event_info) {acpi_status status;
drivers/acpi/acpica/evgpeblk.c +2 -2
@@ -211,7 +211,7 @@ acpi_ev_create_gpe_info_blocks(struct acpi_gpe_block_info *gpe_block)/* Allocate the GPE register information block */ - gpe_register_info =ACPI_ALLOCATE_ZEROED ((acpi_size ) gpe_block-> + gpe_register_info =ACPI_ALLOCATE_ZEROED ((acpi_size )gpe_block-> register_count *sizeof (struct acpi_gpe_register_info ));
@@ -225,7 +225,7 @@ acpi_ev_create_gpe_info_blocks(struct acpi_gpe_block_info *gpe_block)* Allocate the GPE event_info block. There are eight distinct GPEs * per register. Initialization to zeros is sufficient. */ - gpe_event_info =ACPI_ALLOCATE_ZEROED ((acpi_size ) gpe_block->gpe_count * + gpe_event_info =ACPI_ALLOCATE_ZEROED ((acpi_size )gpe_block->gpe_count *sizeof (struct acpi_gpe_event_info ));if (!gpe_event_info) {
drivers/acpi/acpica/evgpeutil.c +2 -2
@@ -163,7 +163,7 @@ acpi_ev_get_gpe_device(struct acpi_gpe_xrupt_info *gpe_xrupt_info,acpi_status acpi_ev_get_gpe_xrupt_block (u32 interrupt_number, -struct acpi_gpe_xrupt_info ** gpe_xrupt_block) +struct acpi_gpe_xrupt_info **gpe_xrupt_block) {struct acpi_gpe_xrupt_info *next_gpe_xrupt;struct acpi_gpe_xrupt_info *gpe_xrupt;
@@ -320,7 +320,7 @@ acpi_ev_delete_gpe_handlers(struct acpi_gpe_xrupt_info *gpe_xrupt_info,/* Now look at the individual GPEs in this byte register */ for (j =0 ; j <ACPI_GPE_REGISTER_WIDTH ; j++) { - gpe_event_info = &gpe_block->event_info[((acpi_size ) i * + gpe_event_info = &gpe_block->event_info[((acpi_size )i *ACPI_GPE_REGISTER_WIDTH ) + j];
drivers/acpi/acpica/evhandler.c +1 -1
@@ -359,7 +359,7 @@ union acpi_operand_object *acpi_ev_find_region_handler(acpi_adr_space_type******************************************************************************/ acpi_status -acpi_ev_install_space_handler (struct acpi_namespace_node * node, +acpi_ev_install_space_handler (struct acpi_namespace_node *node,acpi_adr_space_type space_id,acpi_adr_space_handler handler,acpi_adr_space_setup setup,void *context)
drivers/acpi/acpica/evmisc.c +1 -2
@@ -99,8 +99,7 @@ u8 acpi_ev_is_notify_object(struct acpi_namespace_node *node)******************************************************************************/ acpi_status -acpi_ev_queue_notify_request (struct acpi_namespace_node * node, -u32 notify_value) +acpi_ev_queue_notify_request (struct acpi_namespace_node *node,u32 notify_value) {union acpi_operand_object *obj_desc;union acpi_operand_object *handler_list_head =NULL ;
drivers/acpi/acpica/evrgnini.c +1 -1
@@ -227,7 +227,7 @@ acpi_ev_pci_config_region_setup(acpi_handle handle,/* Install a handler for this PCI root bridge */ - status =acpi_install_address_space_handler ((acpi_handle ) pci_root_node,ACPI_ADR_SPACE_PCI_CONFIG ,ACPI_DEFAULT_HANDLER ,NULL ,NULL ); + status =acpi_install_address_space_handler ((acpi_handle )pci_root_node,ACPI_ADR_SPACE_PCI_CONFIG ,ACPI_DEFAULT_HANDLER ,NULL ,NULL );if (ACPI_FAILURE (status)) {if (status ==AE_SAME_HANDLER ) {/*
drivers/acpi/acpica/evxfgpe.c +1 -1
@@ -917,7 +917,7 @@ ACPI_EXPORT_SYMBOL(acpi_remove_gpe_block)* the FADT-defined gpe blocks. Otherwise, the GPE block device. * ******************************************************************************/ -acpi_status acpi_get_gpe_device (u32 index,acpi_handle * gpe_device) +acpi_status acpi_get_gpe_device (u32 index,acpi_handle *gpe_device) {struct acpi_gpe_device_info info;acpi_status status;
drivers/acpi/acpica/exconcat.c +2 -2
@@ -340,7 +340,7 @@ acpi_ex_convert_to_object_type_string(union acpi_operand_object *obj_desc, type_string =acpi_ut_get_type_name (obj_desc->common.type); - return_desc =acpi_ut_create_string_object (((acpi_size )strlen (type_string) +9 ));/* 9 For "[ Object]" */ + return_desc =acpi_ut_create_string_object (((acpi_size )strlen (type_string) +9 ));/* 9 For "[ Object]" */ if (!return_desc) {return (AE_NO_MEMORY ); }
@@ -372,7 +372,7 @@ acpi_status acpi_ex_concat_template(union acpi_operand_object *operand0, union acpi_operand_object *operand1, union acpi_operand_object **actual_return_desc, - struct acpi_walk_state * walk_state) + struct acpi_walk_state *walk_state) { acpi_status status;union acpi_operand_object *return_desc;
drivers/acpi/acpica/exconvrt.c +2 -2
@@ -441,7 +441,7 @@ acpi_ex_convert_to_string(union acpi_operand_object * obj_desc,* Need enough space for one ASCII integer (plus null terminator) */ return_desc = -acpi_ut_create_string_object ((acpi_size ) string_length); +acpi_ut_create_string_object ((acpi_size )string_length);if (!return_desc) {return_ACPI_STATUS (AE_NO_MEMORY ); }
@@ -520,7 +520,7 @@ acpi_ex_convert_to_string(union acpi_operand_object * obj_desc, } return_desc = -acpi_ut_create_string_object ((acpi_size ) string_length); +acpi_ut_create_string_object ((acpi_size )string_length);if (!return_desc) {return_ACPI_STATUS (AE_NO_MEMORY ); }
drivers/acpi/acpica/excreate.c +1 -1
@@ -394,7 +394,7 @@ acpi_status acpi_ex_create_processor(struct acpi_walk_state *walk_state) obj_desc->processor.proc_id = (u8 ) operand[1 ]->integer.value; obj_desc->processor.length = (u8 ) operand[3 ]->integer.value; obj_desc->processor.address = - (acpi_io_address ) operand[2 ]->integer.value; + (acpi_io_address )operand[2 ]->integer.value;/* Install the processor object in the parent Node */
drivers/acpi/acpica/exfield.c +2 -2
@@ -126,7 +126,7 @@ acpi_ex_get_serial_access_length(u32 accessor_type, u32 access_length)******************************************************************************/ acpi_status -acpi_ex_read_data_from_field (struct acpi_walk_state * walk_state, +acpi_ex_read_data_from_field (struct acpi_walk_state *walk_state,union acpi_operand_object *obj_desc,union acpi_operand_object **ret_buffer_desc) {
@@ -233,7 +233,7 @@ acpi_ex_read_data_from_field(struct acpi_walk_state * walk_state,* Note: Field.length is in bits. */ length = - (acpi_size )ACPI_ROUND_BITS_UP_TO_BYTES (obj_desc->field.bit_length); + (acpi_size )ACPI_ROUND_BITS_UP_TO_BYTES (obj_desc->field.bit_length);if (length > acpi_gbl_integer_byte_width) {
drivers/acpi/acpica/exfldio.c +1 -1
@@ -164,7 +164,7 @@ acpi_ex_setup_region(union acpi_operand_object *obj_desc,if (ACPI_ROUND_UP (rgn_desc->region.length, obj_desc->common_field. access_byte_width) >= - ((acpi_size ) obj_desc->common_field. + ((acpi_size )obj_desc->common_field. base_byte_offset + obj_desc->common_field.access_byte_width + field_datum_byte_offset)) {
drivers/acpi/acpica/exoparg3.c +4 -4
@@ -184,7 +184,7 @@ acpi_status acpi_ex_opcode_3A_1T_1R(struct acpi_walk_state *walk_state)/* Get the Integer values from the objects */ index = operand[1 ]->integer.value; - length = (acpi_size ) operand[2 ]->integer.value; + length = (acpi_size )operand[2 ]->integer.value;/* * If the index is beyond the length of the String/Buffer, or if the
@@ -198,8 +198,8 @@ acpi_status acpi_ex_opcode_3A_1T_1R(struct acpi_walk_state *walk_state)else if ((index + length) > operand[0 ]->string.length) { length = - (acpi_size ) operand[0 ]->string.length - - (acpi_size ) index; + (acpi_size )operand[0 ]->string.length - + (acpi_size )index; }/* Strings always have a sub-pointer, not so for buffers */
@@ -209,7 +209,7 @@ acpi_status acpi_ex_opcode_3A_1T_1R(struct acpi_walk_state *walk_state)/* Always allocate a new buffer for the String */ - buffer =ACPI_ALLOCATE_ZEROED ((acpi_size ) length +1 ); + buffer =ACPI_ALLOCATE_ZEROED ((acpi_size )length +1 );if (!buffer) { status =AE_NO_MEMORY ; goto cleanup;
drivers/acpi/acpica/exoparg6.c +1 -1
@@ -207,7 +207,7 @@ acpi_ex_do_match(u32 match_op,* ******************************************************************************/ -acpi_status acpi_ex_opcode_6A_0T_1R (struct acpi_walk_state * walk_state) +acpi_status acpi_ex_opcode_6A_0T_1R (struct acpi_walk_state *walk_state) {union acpi_operand_object **operand = &walk_state->operands[0 ];union acpi_operand_object *return_desc =NULL ;
drivers/acpi/acpica/exregion.c +3 -3
@@ -325,15 +325,15 @@ acpi_ex_system_io_space_handler(u32 function,switch (function) {case ACPI_READ : - status =acpi_hw_read_port ((acpi_io_address ) address, + status =acpi_hw_read_port ((acpi_io_address )address, &value32, bit_width); *value = value32;break ;case ACPI_WRITE : - status =acpi_hw_write_port ((acpi_io_address ) address, - (u32) * value, bit_width); + status =acpi_hw_write_port ((acpi_io_address )address, + (u32)*value, bit_width);break ;default :
drivers/acpi/acpica/exresnte.c +2 -2
@@ -93,7 +93,7 @@ acpi_ex_resolve_node_to_value(struct acpi_namespace_node **object_ptr,*/ node = *object_ptr; source_desc =acpi_ns_get_attached_object (node); - entry_type =acpi_ns_get_type ((acpi_handle ) node); + entry_type =acpi_ns_get_type ((acpi_handle )node); ACPI_DEBUG_PRINT((ACPI_DB_EXEC, "Entry=%p SourceDesc=%p [%s]\n", node, source_desc,
@@ -106,7 +106,7 @@ acpi_ex_resolve_node_to_value(struct acpi_namespace_node **object_ptr, node = ACPI_CAST_PTR(struct acpi_namespace_node, node->object); source_desc =acpi_ns_get_attached_object (node); - entry_type =acpi_ns_get_type ((acpi_handle ) node); + entry_type =acpi_ns_get_type ((acpi_handle )node); *object_ptr = node; }
drivers/acpi/acpica/exresolv.c +1 -1
@@ -334,7 +334,7 @@ acpi_ex_resolve_object_to_value(union acpi_operand_object **stack_ptr,acpi_status acpi_ex_resolve_multiple (struct acpi_walk_state *walk_state,union acpi_operand_object *operand, -acpi_object_type * return_type, +acpi_object_type *return_type,union acpi_operand_object **return_desc) {union acpi_operand_object *obj_desc =ACPI_CAST_PTR (void, operand);
drivers/acpi/acpica/exresop.c +2 -2
@@ -131,8 +131,8 @@ acpi_ex_check_object_type(acpi_object_type type_needed,acpi_status acpi_ex_resolve_operands (u16 opcode, -union acpi_operand_object ** stack_ptr, -struct acpi_walk_state * walk_state) +union acpi_operand_object **stack_ptr, +struct acpi_walk_state *walk_state) {union acpi_operand_object *obj_desc;acpi_status status =AE_OK ;
drivers/acpi/acpica/exstorob.c +2 -2
@@ -188,7 +188,7 @@ acpi_ex_store_string_to_string(union acpi_operand_object *source_desc,* Clear old string and copy in the new one */ memset (target_desc->string.pointer,0 , - (acpi_size ) target_desc->string.length +1 ); + (acpi_size )target_desc->string.length +1 );memcpy (target_desc->string.pointer, buffer, length); }else {/*
@@ -204,7 +204,7 @@ acpi_ex_store_string_to_string(union acpi_operand_object *source_desc, } target_desc->string.pointer = -ACPI_ALLOCATE_ZEROED ((acpi_size ) length +1 ); +ACPI_ALLOCATE_ZEROED ((acpi_size )length +1 );if (!target_desc->string.pointer) {return_ACPI_STATUS (AE_NO_MEMORY );
drivers/acpi/acpica/hwgpe.c +3 -3
@@ -166,7 +166,7 @@ acpi_hw_low_set_gpe(struct acpi_gpe_event_info *gpe_event_info, u32 action)* ******************************************************************************/ -acpi_status acpi_hw_clear_gpe (struct acpi_gpe_event_info * gpe_event_info) +acpi_status acpi_hw_clear_gpe (struct acpi_gpe_event_info *gpe_event_info) {struct acpi_gpe_register_info *gpe_register_info;acpi_status status;
@@ -206,7 +206,7 @@ acpi_status acpi_hw_clear_gpe(struct acpi_gpe_event_info * gpe_event_info)******************************************************************************/ acpi_status -acpi_hw_get_gpe_status (struct acpi_gpe_event_info * gpe_event_info, +acpi_hw_get_gpe_status (struct acpi_gpe_event_info *gpe_event_info,acpi_event_status *event_status) {u32 in_byte;
@@ -391,7 +391,7 @@ acpi_hw_clear_gpe_block(struct acpi_gpe_xrupt_info *gpe_xrupt_info,acpi_status acpi_hw_enable_runtime_gpe_block (struct acpi_gpe_xrupt_info *gpe_xrupt_info, -struct acpi_gpe_block_info * gpe_block, +struct acpi_gpe_block_info *gpe_block,void *context) {u32 i;
drivers/acpi/acpica/hwxface.c +3 -4
@@ -91,10 +91,9 @@ acpi_status acpi_reset(void)* compatibility with other ACPI implementations that have allowed * BIOS code with bad register width values to go unnoticed. */ - status = -acpi_os_write_port ((acpi_io_address ) reset_reg->address, - acpi_gbl_FADT.reset_value, -ACPI_RESET_REGISTER_WIDTH ); + status =acpi_os_write_port ((acpi_io_address )reset_reg->address, + acpi_gbl_FADT.reset_value, +ACPI_RESET_REGISTER_WIDTH ); }else {/* Write the reset value to the reset register */
drivers/acpi/acpica/nsconvert.c +3 -3
@@ -318,7 +318,7 @@ acpi_ns_convert_to_buffer(union acpi_operand_object *original_object,******************************************************************************/ acpi_status -acpi_ns_convert_to_unicode (struct acpi_namespace_node * scope, +acpi_ns_convert_to_unicode (struct acpi_namespace_node *scope,union acpi_operand_object *original_object,union acpi_operand_object **return_object) {
@@ -385,7 +385,7 @@ acpi_ns_convert_to_unicode(struct acpi_namespace_node * scope,******************************************************************************/ acpi_status -acpi_ns_convert_to_resource (struct acpi_namespace_node * scope, +acpi_ns_convert_to_resource (struct acpi_namespace_node *scope,union acpi_operand_object *original_object,union acpi_operand_object **return_object) {
@@ -464,7 +464,7 @@ acpi_ns_convert_to_resource(struct acpi_namespace_node * scope,******************************************************************************/ acpi_status -acpi_ns_convert_to_reference (struct acpi_namespace_node * scope, +acpi_ns_convert_to_reference (struct acpi_namespace_node *scope,union acpi_operand_object *original_object,union acpi_operand_object **return_object) {
drivers/acpi/acpica/nsnames.c +1 -1
@@ -113,7 +113,7 @@ acpi_size acpi_ns_get_pathname_length(struct acpi_namespace_node *node)acpi_status acpi_ns_handle_to_pathname (acpi_handle target_handle, -struct acpi_buffer * buffer,u8 no_trailing) +struct acpi_buffer *buffer,u8 no_trailing) {acpi_status status;struct acpi_namespace_node *node;
drivers/acpi/acpica/nsobject.c +2 -2
@@ -399,7 +399,7 @@ acpi_ns_attach_data(struct acpi_namespace_node *node,******************************************************************************/ acpi_status -acpi_ns_detach_data (struct acpi_namespace_node * node, +acpi_ns_detach_data (struct acpi_namespace_node *node,acpi_object_handler handler) {union acpi_operand_object *obj_desc;
@@ -444,7 +444,7 @@ acpi_ns_detach_data(struct acpi_namespace_node * node,******************************************************************************/ acpi_status -acpi_ns_get_attached_data (struct acpi_namespace_node * node, +acpi_ns_get_attached_data (struct acpi_namespace_node *node,acpi_object_handler handler,void **data) {union acpi_operand_object *obj_desc;
drivers/acpi/acpica/nsrepair.c +1 -1
@@ -399,7 +399,7 @@ static const struct acpi_simple_repair_info *acpi_ns_match_simple_repair(struct******************************************************************************/ acpi_status -acpi_ns_repair_null_element (struct acpi_evaluate_info * info, +acpi_ns_repair_null_element (struct acpi_evaluate_info *info,u32 expected_btypes,u32 package_index,union acpi_operand_object **return_object_ptr)
drivers/acpi/acpica/nsrepair2.c +3 -3
@@ -54,9 +54,9 @@ ACPI_MODULE_NAME("nsrepair2")* be repaired on a per-name basis. */ typedef -acpi_status (*acpi_repair_function ) (struct acpi_evaluate_info * info, -union acpi_operand_object - **return_object_ptr); +acpi_status (*acpi_repair_function ) (struct acpi_evaluate_info * info, +union acpi_operand_object ** + return_object_ptr); typedef struct acpi_repair_info { char name[ACPI_NAME_SIZE];
drivers/acpi/acpica/nsutils.c +4 -4
@@ -272,11 +272,11 @@ acpi_status acpi_ns_build_internal_name(struct acpi_namestring_info *info) result = &internal_name[i]; }else if (num_segments ==2 ) { internal_name[i] =AML_DUAL_NAME_PREFIX ; - result = &internal_name[(acpi_size ) i +1 ]; + result = &internal_name[(acpi_size )i +1 ]; }else { internal_name[i] =AML_MULTI_NAME_PREFIX_OP ; - internal_name[(acpi_size ) i +1 ] = (char )num_segments; - result = &internal_name[(acpi_size ) i +2 ]; + internal_name[(acpi_size )i +1 ] = (char )num_segments; + result = &internal_name[(acpi_size )i +2 ]; } }
@@ -456,7 +456,7 @@ acpi_ns_externalize_name(u32 internal_name_length, names_index = prefix_length +2 ; num_segments = (u8 ) - internal_name[(acpi_size ) prefix_length +1 ]; + internal_name[(acpi_size )prefix_length +1 ];break ;case AML_DUAL_NAME_PREFIX :
drivers/acpi/acpica/nsxfeval.c +1 -1
@@ -256,7 +256,7 @@ acpi_evaluate_object(acpi_handle handle,* Allocate a new parameter block for the internal objects * Add 1 to count to allow for null terminated internal list */ - info->parameters =ACPI_ALLOCATE_ZEROED (((acpi_size ) info-> + info->parameters =ACPI_ALLOCATE_ZEROED (((acpi_size )info-> param_count +1 ) *sizeof (void *));if (!info->parameters) {
drivers/acpi/acpica/nsxfname.c +3 -3
@@ -78,7 +78,7 @@ static char *acpi_ns_copy_device_id(struct acpi_pnp_device_id *dest,acpi_status acpi_get_handle (acpi_handle parent, -acpi_string pathname,acpi_handle * ret_handle) +acpi_string pathname,acpi_handle *ret_handle) {acpi_status status;struct acpi_namespace_node *node =NULL ;
@@ -155,7 +155,7 @@ ACPI_EXPORT_SYMBOL(acpi_get_handle)* ******************************************************************************/ acpi_status -acpi_get_name (acpi_handle handle,u32 name_type,struct acpi_buffer * buffer) +acpi_get_name (acpi_handle handle,u32 name_type,struct acpi_buffer *buffer) {acpi_status status;struct acpi_namespace_node *node;
@@ -448,7 +448,7 @@ acpi_get_object_info(acpi_handle handle,/* Point past the CID PNP_DEVICE_ID array */ next_id_string += - ((acpi_size ) cid_list->count * + ((acpi_size )cid_list->count *sizeof (struct acpi_pnp_device_id )); }
drivers/acpi/acpica/nsxfobj.c +3 -3
@@ -63,7 +63,7 @@ ACPI_MODULE_NAME("nsxfobj")* DESCRIPTION: This routine returns the type associatd with a particular handle * ******************************************************************************/ -acpi_status acpi_get_type (acpi_handle handle,acpi_object_type * ret_type) +acpi_status acpi_get_type (acpi_handle handle,acpi_object_type *ret_type) {struct acpi_namespace_node *node;acpi_status status;
@@ -115,7 +115,7 @@ ACPI_EXPORT_SYMBOL(acpi_get_type)* Handle. * ******************************************************************************/ -acpi_status acpi_get_parent (acpi_handle handle,acpi_handle * ret_handle) +acpi_status acpi_get_parent (acpi_handle handle,acpi_handle *ret_handle) {struct acpi_namespace_node *node;struct acpi_namespace_node *parent_node;
@@ -183,7 +183,7 @@ ACPI_EXPORT_SYMBOL(acpi_get_parent)acpi_status acpi_get_next_object (acpi_object_type type,acpi_handle parent, -acpi_handle child,acpi_handle * ret_handle) +acpi_handle child,acpi_handle *ret_handle) {acpi_status status;struct acpi_namespace_node *node;
drivers/acpi/acpica/psargs.c +1 -1
@@ -87,7 +87,7 @@ acpi_ps_get_next_package_length(struct acpi_parse_state *parser_state)* used to encode the package length, either 0,1,2, or 3 */ byte_count = (aml[0 ] >>6 ); - parser_state->aml += ((acpi_size ) byte_count +1 ); + parser_state->aml += ((acpi_size )byte_count +1 );/* Get bytes 3, 2, 1 as needed */
drivers/acpi/acpica/psparse.c +2 -2
@@ -130,8 +130,8 @@ u16 acpi_ps_peek_opcode(struct acpi_parse_state * parser_state)******************************************************************************/ acpi_status -acpi_ps_complete_this_op (struct acpi_walk_state * walk_state, -union acpi_parse_object * op) +acpi_ps_complete_this_op (struct acpi_walk_state *walk_state, +union acpi_parse_object *op) {union acpi_parse_object *prev;union acpi_parse_object *next;
drivers/acpi/acpica/psxface.c +1 -1
@@ -115,7 +115,7 @@ acpi_debug_trace(const char *name, u32 debug_level, u32 debug_layer, u32 flags)* ******************************************************************************/ -acpi_status acpi_ps_execute_method (struct acpi_evaluate_info * info) +acpi_status acpi_ps_execute_method (struct acpi_evaluate_info *info) {acpi_status status;union acpi_parse_object *op;
drivers/acpi/acpica/rscalc.c +45 -45
149 lines not on this page · raw message
drivers/acpi/acpica/rscreate.c +1 -1
@@ -347,7 +347,7 @@ acpi_rs_create_pci_routing_table(union acpi_operand_object *package_object, (u8 *) output_buffer->pointer); path_buffer.pointer = user_prt->source; - status =acpi_ns_handle_to_pathname ((acpi_handle ) node, &path_buffer, FALSE); + status =acpi_ns_handle_to_pathname ((acpi_handle )node, &path_buffer, FALSE);/* +1 to include null terminator */
drivers/acpi/acpica/rsmisc.c +1 -1
@@ -87,7 +87,7 @@ acpi_rs_convert_aml_to_resource(struct acpi_resource *resource,return_ACPI_STATUS (AE_BAD_PARAMETER ); } -if (((acpi_size ) resource) &0x3 ) { +if (((acpi_size )resource) &0x3 ) {/* Each internal resource struct is expected to be 32-bit aligned */
drivers/acpi/acpica/rsutils.c +6 -6
@@ -338,7 +338,7 @@ acpi_rs_get_resource_source(acpi_rs_length resource_length,* Note: Some resource descriptors will have an additional null, so * we add 1 to the minimum length. */ -if (total_length > (acpi_rsdesc_size) (minimum_length +1 )) { +if (total_length > (acpi_rsdesc_size)(minimum_length +1 )) {/* Get the resource_source_index */
@@ -377,7 +377,7 @@ acpi_rs_get_resource_source(acpi_rs_length resource_length,ACPI_CAST_PTR (char, &aml_resource_source[1])); -return ((acpi_rs_length ) total_length); +return ((acpi_rs_length )total_length); }/* resource_source is not present */
@@ -406,9 +406,9 @@ acpi_rs_get_resource_source(acpi_rs_length resource_length,******************************************************************************/ acpi_rsdesc_size -acpi_rs_set_resource_source (union aml_resource * aml, +acpi_rs_set_resource_source (union aml_resource *aml,acpi_rs_length minimum_length, -struct acpi_resource_source * resource_source) +struct acpi_resource_source *resource_source) {u8 *aml_resource_source;acpi_rsdesc_size descriptor_length;
@@ -466,8 +466,8 @@ acpi_rs_set_resource_source(union aml_resource * aml,******************************************************************************/ acpi_status -acpi_rs_get_prt_method_data (struct acpi_namespace_node * node, -struct acpi_buffer * ret_buffer) +acpi_rs_get_prt_method_data (struct acpi_namespace_node *node, +struct acpi_buffer *ret_buffer) {union acpi_operand_object *obj_desc;acpi_status status;
drivers/acpi/acpica/rsxface.c +3 -3
@@ -433,8 +433,8 @@ ACPI_EXPORT_SYMBOL(acpi_resource_to_address64)acpi_status acpi_get_vendor_resource (acpi_handle device_handle,char *name, -struct acpi_vendor_uuid * uuid, -struct acpi_buffer * ret_buffer) +struct acpi_vendor_uuid *uuid, +struct acpi_buffer *ret_buffer) {struct acpi_vendor_walk_info info;acpi_status status;
@@ -539,7 +539,7 @@ acpi_rs_match_vendor_resource(struct acpi_resource *resource, void *context)******************************************************************************/ acpi_status -acpi_walk_resource_buffer (struct acpi_buffer * buffer, +acpi_walk_resource_buffer (struct acpi_buffer *buffer,acpi_walk_resource_callback user_function,void *context) {
drivers/acpi/acpica/tbdata.c +4 -5
@@ -368,7 +368,7 @@ acpi_status acpi_tb_validate_temp_table(struct acpi_table_desc *table_desc)*****************************************************************************/ acpi_status -acpi_tb_verify_temp_table (struct acpi_table_desc * table_desc,char *signature) +acpi_tb_verify_temp_table (struct acpi_table_desc *table_desc,char *signature) {acpi_status status =AE_OK ;
@@ -454,7 +454,7 @@ acpi_status acpi_tb_resize_root_table_list(void) table_count = acpi_gbl_root_table_list.current_table_count; } - tables =ACPI_ALLOCATE_ZEROED (((acpi_size ) table_count + + tables =ACPI_ALLOCATE_ZEROED (((acpi_size )table_count +ACPI_ROOT_TABLE_SIZE_INCREMENT ) *sizeof (struct acpi_table_desc ));if (!tables) {
@@ -467,8 +467,7 @@ acpi_status acpi_tb_resize_root_table_list(void)if (acpi_gbl_root_table_list.tables) {memcpy (tables, acpi_gbl_root_table_list.tables, - (acpi_size ) table_count * -sizeof (struct acpi_table_desc )); + (acpi_size )table_count *sizeof (struct acpi_table_desc ));if (acpi_gbl_root_table_list.flags &ACPI_ROOT_ORIGIN_ALLOCATED ) {ACPI_FREE (acpi_gbl_root_table_list.tables);
@@ -701,7 +700,7 @@ acpi_status acpi_tb_release_owner_id(u32 table_index)* ******************************************************************************/ -acpi_status acpi_tb_get_owner_id (u32 table_index,acpi_owner_id * owner_id) +acpi_status acpi_tb_get_owner_id (u32 table_index,acpi_owner_id *owner_id) {acpi_status status =AE_BAD_PARAMETER ;
drivers/acpi/acpica/tbfadt.c +1 -1
@@ -344,7 +344,7 @@ void acpi_tb_parse_fadt(void)/* Obtain the DSDT and FACS tables via their addresses within the FADT */ -acpi_tb_install_fixed_table ((acpi_physical_address ) acpi_gbl_FADT.Xdsdt, +acpi_tb_install_fixed_table ((acpi_physical_address )acpi_gbl_FADT.Xdsdt,ACPI_SIG_DSDT , &acpi_gbl_dsdt_index);/* If Hardware Reduced flag is set, there is no FACS */
drivers/acpi/acpica/tbutils.c +3 -3
@@ -231,7 +231,7 @@ acpi_tb_get_root_table_entry(u8 *table_entry, u32 table_entry_size) ACPI_FORMAT_UINT64(address64))); }#endif -return ((acpi_physical_address) (address64)); +return ((acpi_physical_address)(address64)); } }
@@ -287,12 +287,12 @@ acpi_status __init acpi_tb_parse_root_table(acpi_physical_address rsdp_address)* the XSDT if the revision is > 1 and the XSDT pointer is present, * as per the ACPI specification. */ - address = (acpi_physical_address ) rsdp->xsdt_physical_address; + address = (acpi_physical_address )rsdp->xsdt_physical_address; table_entry_size =ACPI_XSDT_ENTRY_SIZE ; }else {/* Root table is an RSDT (32-bit physical addresses) */ - address = (acpi_physical_address ) rsdp->rsdt_physical_address; + address = (acpi_physical_address )rsdp->rsdt_physical_address; table_entry_size =ACPI_RSDT_ENTRY_SIZE ; }
drivers/acpi/acpica/tbxface.c +3 -3
@@ -99,7 +99,7 @@ acpi_status acpi_allocate_root_table(u32 initial_table_count)******************************************************************************/ acpi_status __init -acpi_initialize_tables (struct acpi_table_desc * initial_table_array, +acpi_initialize_tables (struct acpi_table_desc *initial_table_array,u32 initial_table_count,u8 allow_resize) {acpi_physical_address rsdp_address;
@@ -120,7 +120,7 @@ acpi_initialize_tables(struct acpi_table_desc * initial_table_array,/* Root Table Array has been statically allocated by the host */ memset (initial_table_array,0 , - (acpi_size ) initial_table_count * + (acpi_size )initial_table_count *sizeof (struct acpi_table_desc )); acpi_gbl_root_table_list.tables = initial_table_array;
@@ -352,7 +352,7 @@ ACPI_EXPORT_SYMBOL(acpi_get_table)* ******************************************************************************/ acpi_status -acpi_get_table_by_index (u32 table_index,struct acpi_table_header ** table) +acpi_get_table_by_index (u32 table_index,struct acpi_table_header **table) {acpi_status status;
drivers/acpi/acpica/tbxfroot.c +4 -4
@@ -90,7 +90,7 @@ u32 acpi_tb_get_rsdp_length(struct acpi_table_rsdp *rsdp)* ******************************************************************************/ -acpi_status acpi_tb_validate_rsdp (struct acpi_table_rsdp * rsdp) +acpi_status acpi_tb_validate_rsdp (struct acpi_table_rsdp *rsdp) {/*
@@ -142,7 +142,7 @@ acpi_status acpi_tb_validate_rsdp(struct acpi_table_rsdp * rsdp)* ******************************************************************************/ -acpi_status __init acpi_find_root_pointer (acpi_physical_address * table_address) +acpi_status __init acpi_find_root_pointer (acpi_physical_address *table_address) {u8 *table_ptr;u8 *mem_rover;
@@ -201,7 +201,7 @@ acpi_status __init acpi_find_root_pointer(acpi_physical_address * table_address) (u32 )ACPI_PTR_DIFF (mem_rover, table_ptr); *table_address = - (acpi_physical_address ) physical_address; + (acpi_physical_address )physical_address;return_ACPI_STATUS (AE_OK ); } }
@@ -234,7 +234,7 @@ acpi_status __init acpi_find_root_pointer(acpi_physical_address * table_address) (ACPI_HI_RSDP_WINDOW_BASE +ACPI_PTR_DIFF (mem_rover, table_ptr)); - *table_address = (acpi_physical_address ) physical_address; + *table_address = (acpi_physical_address )physical_address;return_ACPI_STATUS (AE_OK ); }
drivers/acpi/acpica/utalloc.c +2 -3
@@ -231,7 +231,7 @@ acpi_status acpi_ut_delete_caches(void)* ******************************************************************************/ -acpi_status acpi_ut_validate_buffer (struct acpi_buffer * buffer) +acpi_status acpi_ut_validate_buffer (struct acpi_buffer *buffer) {/* Obviously, the structure pointer must be valid */
@@ -272,8 +272,7 @@ acpi_status acpi_ut_validate_buffer(struct acpi_buffer * buffer)******************************************************************************/ acpi_status -acpi_ut_initialize_buffer (struct acpi_buffer * buffer, -acpi_size required_length) +acpi_ut_initialize_buffer (struct acpi_buffer *buffer,acpi_size required_length) {acpi_size input_buffer_length;
drivers/acpi/acpica/utbuffer.c +12 -12
@@ -106,31 +106,31 @@ void acpi_ut_dump_buffer(u8 *buffer, u32 count, u32 display, u32 base_offset)default :/* Default is BYTE display */ acpi_os_printf ("%02X " , - buffer[(acpi_size ) i + j]); + buffer[(acpi_size )i + j]);break ;case DB_WORD_DISPLAY :ACPI_MOVE_16_TO_32 (&temp32, - &buffer[(acpi_size ) i + j]); + &buffer[(acpi_size )i + j]);acpi_os_printf ("%04X " , temp32);break ;case DB_DWORD_DISPLAY :ACPI_MOVE_32_TO_32 (&temp32, - &buffer[(acpi_size ) i + j]); + &buffer[(acpi_size )i + j]);acpi_os_printf ("%08X " , temp32);break ;case DB_QWORD_DISPLAY :ACPI_MOVE_32_TO_32 (&temp32, - &buffer[(acpi_size ) i + j]); + &buffer[(acpi_size )i + j]);acpi_os_printf ("%08X" , temp32);ACPI_MOVE_32_TO_32 (&temp32, - &buffer[(acpi_size ) i + j + + &buffer[(acpi_size )i + j +4 ]);acpi_os_printf ("%08X " , temp32);break ;
@@ -158,7 +158,7 @@ void acpi_ut_dump_buffer(u8 *buffer, u32 count, u32 display, u32 base_offset)acpi_os_printf ("// " ); } - buf_char = buffer[(acpi_size ) i + j]; + buf_char = buffer[(acpi_size )i + j];if (isprint (buf_char)) {acpi_os_printf ("%c" , buf_char); }else {
@@ -274,31 +274,31 @@ acpi_ut_dump_buffer_to_file(ACPI_FILE file,default :/* Default is BYTE display */ acpi_ut_file_printf (file,"%02X " , - buffer[(acpi_size ) i + j]); + buffer[(acpi_size )i + j]);break ;case DB_WORD_DISPLAY :ACPI_MOVE_16_TO_32 (&temp32, - &buffer[(acpi_size ) i + j]); + &buffer[(acpi_size )i + j]);acpi_ut_file_printf (file,"%04X " , temp32);break ;case DB_DWORD_DISPLAY :ACPI_MOVE_32_TO_32 (&temp32, - &buffer[(acpi_size ) i + j]); + &buffer[(acpi_size )i + j]);acpi_ut_file_printf (file,"%08X " , temp32);break ;case DB_QWORD_DISPLAY :ACPI_MOVE_32_TO_32 (&temp32, - &buffer[(acpi_size ) i + j]); + &buffer[(acpi_size )i + j]);acpi_ut_file_printf (file,"%08X" , temp32);ACPI_MOVE_32_TO_32 (&temp32, - &buffer[(acpi_size ) i + j + + &buffer[(acpi_size )i + j +4 ]);acpi_ut_file_printf (file,"%08X " , temp32);break ;
@@ -318,7 +318,7 @@ acpi_ut_dump_buffer_to_file(ACPI_FILE file,return ; } - buf_char = buffer[(acpi_size ) i + j]; + buf_char = buffer[(acpi_size )i + j];if (isprint (buf_char)) {acpi_ut_file_printf (file,"%c" , buf_char); }else {
drivers/acpi/acpica/utcache.c +3 -4
@@ -105,7 +105,7 @@ acpi_os_create_cache(char *cache_name,* ******************************************************************************/ -acpi_status acpi_os_purge_cache (struct acpi_memory_list * cache) +acpi_status acpi_os_purge_cache (struct acpi_memory_list *cache) {void *next;acpi_status status;
@@ -151,7 +151,7 @@ acpi_status acpi_os_purge_cache(struct acpi_memory_list * cache)* ******************************************************************************/ -acpi_status acpi_os_delete_cache (struct acpi_memory_list * cache) +acpi_status acpi_os_delete_cache (struct acpi_memory_list *cache) {acpi_status status;
@@ -184,8 +184,7 @@ acpi_status acpi_os_delete_cache(struct acpi_memory_list * cache)* ******************************************************************************/ -acpi_status -acpi_os_release_object (struct acpi_memory_list * cache,void *object) +acpi_status acpi_os_release_object (struct acpi_memory_list *cache,void *object) {acpi_status status;
drivers/acpi/acpica/utcopy.c +8 -8
@@ -53,7 +53,7 @@ ACPI_MODULE_NAME("utcopy")static acpi_status acpi_ut_copy_isimple_to_esimple (union acpi_operand_object *internal_object,union acpi_object *external_object, -u8 * data_space,acpi_size * buffer_space_used); +u8 *data_space,acpi_size *buffer_space_used); static acpi_status acpi_ut_copy_ielement_to_ielement(u8 object_type,
@@ -63,7 +63,7 @@ acpi_ut_copy_ielement_to_ielement(u8 object_type,static acpi_status acpi_ut_copy_ipackage_to_epackage (union acpi_operand_object *internal_object, -u8 * buffer,acpi_size * space_used); +u8 *buffer,acpi_size *space_used); static acpi_status acpi_ut_copy_esimple_to_isimple(union acpi_object *user_obj,
@@ -111,7 +111,7 @@ acpi_ut_copy_ipackage_to_ipackage(union acpi_operand_object *source_obj,static acpi_status acpi_ut_copy_isimple_to_esimple (union acpi_operand_object *internal_object,union acpi_object *external_object, -u8 * data_space,acpi_size * buffer_space_used) +u8 *data_space,acpi_size *buffer_space_used) {acpi_status status =AE_OK ;
@@ -151,7 +151,7 @@ acpi_ut_copy_isimple_to_esimple(union acpi_operand_object *internal_object,memcpy ((void *)data_space, (void *)internal_object->string.pointer, - (acpi_size ) internal_object->string.length +1 ); + (acpi_size )internal_object->string.length +1 );break ;case ACPI_TYPE_BUFFER :
@@ -331,7 +331,7 @@ acpi_ut_copy_ielement_to_eelement(u8 object_type,static acpi_status acpi_ut_copy_ipackage_to_epackage (union acpi_operand_object *internal_object, -u8 * buffer,acpi_size * space_used) +u8 *buffer,acpi_size *space_used) {union acpi_object *external_object;acpi_status status;
@@ -362,7 +362,7 @@ acpi_ut_copy_ipackage_to_epackage(union acpi_operand_object *internal_object,* Leave room for an array of ACPI_OBJECTS in the buffer * and move the free space past it */ - info.length += (acpi_size ) external_object->package.count * + info.length += (acpi_size )external_object->package.count *ACPI_ROUND_UP_TO_NATIVE_WORD (sizeof (union acpi_object )); info.free_space += external_object->package.count *ACPI_ROUND_UP_TO_NATIVE_WORD (sizeof (union acpi_object ));
@@ -738,7 +738,7 @@ acpi_ut_copy_simple_object(union acpi_operand_object *source_desc,*/ if (source_desc->string.pointer) { dest_desc->string.pointer = -ACPI_ALLOCATE ((acpi_size ) source_desc->string. +ACPI_ALLOCATE ((acpi_size )source_desc->string. length +1 );if (!dest_desc->string.pointer) {return (AE_NO_MEMORY );
@@ -748,7 +748,7 @@ acpi_ut_copy_simple_object(union acpi_operand_object *source_desc,memcpy (dest_desc->string.pointer, source_desc->string.pointer, - (acpi_size ) source_desc->string.length +1 ); + (acpi_size )source_desc->string.length +1 ); }break ;
drivers/acpi/acpica/utids.c +4 -4
@@ -95,7 +95,7 @@ acpi_ut_execute_HID(struct acpi_namespace_node *device_node, hid =ACPI_ALLOCATE_ZEROED (sizeof (struct acpi_pnp_device_id ) + - (acpi_size ) length); + (acpi_size )length);if (!hid) { status =AE_NO_MEMORY ; goto cleanup;
@@ -173,7 +173,7 @@ acpi_ut_execute_UID(struct acpi_namespace_node *device_node, uid =ACPI_ALLOCATE_ZEROED (sizeof (struct acpi_pnp_device_id ) + - (acpi_size ) length); + (acpi_size )length);if (!uid) { status =AE_NO_MEMORY ; goto cleanup;
@@ -309,7 +309,7 @@ acpi_ut_execute_CID(struct acpi_namespace_node *device_node,/* Area for CID strings starts after the CID PNP_DEVICE_ID array */ next_id_string =ACPI_CAST_PTR (char, cid_list->ids) + - ((acpi_size ) count *sizeof (struct acpi_pnp_device_id )); + ((acpi_size )count *sizeof (struct acpi_pnp_device_id ));/* Copy/convert the CIDs to the return buffer */
@@ -413,7 +413,7 @@ acpi_ut_execute_CLS(struct acpi_namespace_node *device_node, cls =ACPI_ALLOCATE_ZEROED (sizeof (struct acpi_pnp_device_id ) + - (acpi_size ) length); + (acpi_size )length);if (!cls) { status =AE_NO_MEMORY ; goto cleanup;
drivers/acpi/acpica/utmath.c +2 -2
@@ -236,8 +236,8 @@ acpi_ut_divide(u64 in_dividend, } remainder.full = remainder.full - dividend.full; - remainder.part.hi = (u32) - ((s32 ) remainder.part.hi); - remainder.part.lo = (u32) - ((s32 ) remainder.part.lo); + remainder.part.hi = (u32)-((s32 )remainder.part.hi); + remainder.part.lo = (u32)-((s32 )remainder.part.lo);if (remainder.part.lo) { remainder.part.hi--;
drivers/acpi/acpica/utobject.c +9 -9
@@ -51,11 +51,11 @@ ACPI_MODULE_NAME("utobject")/* Local prototypes */ static acpi_status acpi_ut_get_simple_object_size (union acpi_operand_object *obj, -acpi_size * obj_length); +acpi_size *obj_length);static acpi_status acpi_ut_get_package_object_size (union acpi_operand_object *obj, -acpi_size * obj_length); +acpi_size *obj_length); static acpi_status acpi_ut_get_element_length(u8 object_type,
@@ -177,7 +177,7 @@ union acpi_operand_object *acpi_ut_create_package_object(u32 count)* Create the element array. Count+1 allows the array to be null * terminated. */ - package_elements =ACPI_ALLOCATE_ZEROED (((acpi_size ) count + + package_elements =ACPI_ALLOCATE_ZEROED (((acpi_size )count +1 ) *sizeof (void *));if (!package_elements) {ACPI_FREE (package_desc);
@@ -454,7 +454,7 @@ void acpi_ut_delete_object_desc(union acpi_operand_object *object)static acpi_status acpi_ut_get_simple_object_size (union acpi_operand_object *internal_object, -acpi_size * obj_length) +acpi_size *obj_length) {acpi_size length;acpi_size size;
@@ -495,12 +495,12 @@ acpi_ut_get_simple_object_size(union acpi_operand_object *internal_object,switch (internal_object->common.type) {case ACPI_TYPE_STRING : - length += (acpi_size ) internal_object->string.length +1 ; + length += (acpi_size )internal_object->string.length +1 ;break ;case ACPI_TYPE_BUFFER : - length += (acpi_size ) internal_object->buffer.length; + length += (acpi_size )internal_object->buffer.length;break ;case ACPI_TYPE_INTEGER :
@@ -640,7 +640,7 @@ acpi_ut_get_element_length(u8 object_type,static acpi_status acpi_ut_get_package_object_size (union acpi_operand_object *internal_object, -acpi_size * obj_length) +acpi_size *obj_length) {acpi_status status;struct acpi_pkg_info info;
@@ -665,7 +665,7 @@ acpi_ut_get_package_object_size(union acpi_operand_object *internal_object,*/ info.length +=ACPI_ROUND_UP_TO_NATIVE_WORD (sizeof (union acpi_object )) * - (acpi_size ) info.num_packages; + (acpi_size )info.num_packages;/* Return the total package length */
@@ -689,7 +689,7 @@ acpi_ut_get_package_object_size(union acpi_operand_object *internal_object,acpi_status acpi_ut_get_object_size (union acpi_operand_object *internal_object, -acpi_size * obj_length) +acpi_size *obj_length) {acpi_status status;
drivers/acpi/acpica/utosi.c +2 -2
@@ -150,7 +150,7 @@ acpi_status acpi_ut_initialize_interfaces(void) i < (ACPI_ARRAY_LENGTH (acpi_default_supported_interfaces) -1 ); i++) { acpi_default_supported_interfaces[i].next = - &acpi_default_supported_interfaces[(acpi_size ) i +1 ]; + &acpi_default_supported_interfaces[(acpi_size )i +1 ]; }acpi_os_release_mutex (acpi_gbl_osi_mutex);
@@ -397,7 +397,7 @@ struct acpi_interface_info *acpi_ut_get_interface(acpi_string interface_name)* ******************************************************************************/ -acpi_status acpi_ut_osi_implementation (struct acpi_walk_state * walk_state) +acpi_status acpi_ut_osi_implementation (struct acpi_walk_state *walk_state) {union acpi_operand_object *string_desc;union acpi_operand_object *return_desc;
drivers/acpi/acpica/utownerid.c +3 -3
@@ -61,7 +61,7 @@ ACPI_MODULE_NAME("utownerid")* when the method exits or the table is unloaded. * ******************************************************************************/ -acpi_status acpi_ut_allocate_owner_id (acpi_owner_id * owner_id) +acpi_status acpi_ut_allocate_owner_id (acpi_owner_id *owner_id) {u32 i;u32 j;
@@ -122,7 +122,7 @@ acpi_status acpi_ut_allocate_owner_id(acpi_owner_id * owner_id)* permanently allocated (prevents +1 overflow) */ *owner_id = - (acpi_owner_id) ((k +1 ) +ACPI_MUL_32 (j)); + (acpi_owner_id)((k +1 ) +ACPI_MUL_32 (j)); ACPI_DEBUG_PRINT((ACPI_DB_VALUES, "Allocated OwnerId: %2.2X\n",
@@ -167,7 +167,7 @@ exit:* ******************************************************************************/ -void acpi_ut_release_owner_id (acpi_owner_id * owner_id_ptr) +void acpi_ut_release_owner_id (acpi_owner_id *owner_id_ptr) {acpi_owner_id owner_id = *owner_id_ptr;acpi_status status;
drivers/acpi/acpica/utprint.c +7 -7
@@ -264,9 +264,9 @@ static char *acpi_ut_format_number(char *string, sign ='\0' ;if (type &ACPI_FORMAT_SIGN ) { -if ((s64 ) number <0 ) { +if ((s64 )number <0 ) { sign ='-' ; - number = -(s64 ) number; + number = -(s64 )number; width--; }else if (type &ACPI_FORMAT_SIGN_PLUS ) { sign ='+' ;
@@ -404,7 +404,7 @@ acpi_ut_vsnprintf(char *string, width =-1 ;if (isdigit ((int )*format)) { format =acpi_ut_scan_number (format, &number); - width = (s32 ) number; + width = (s32 )number; }else if (*format =='*' ) { ++format; width =va_arg (args, int);
@@ -421,7 +421,7 @@ acpi_ut_vsnprintf(char *string, ++format;if (isdigit ((int )*format)) { format =acpi_ut_scan_number (format, &number); - precision = (s32 ) number; + precision = (s32 )number; }else if (*format =='*' ) { ++format; precision =va_arg (args, int);
@@ -550,17 +550,17 @@ acpi_ut_vsnprintf(char *string,if (qualifier =='L' ) { number =va_arg (args, u64);if (type &ACPI_FORMAT_SIGN ) { - number = (s64 ) number; + number = (s64 )number; } }else if (qualifier =='l' ) { number = va_arg(args, unsigned long);if (type &ACPI_FORMAT_SIGN ) { - number = (s32 ) number; + number = (s32 )number; } }else if (qualifier =='h' ) { number = (u16 )va_arg (args, int);if (type &ACPI_FORMAT_SIGN ) { - number = (s16 ) number; + number = (s16 )number; } }else { number = va_arg(args, unsigned int);
drivers/acpi/acpica/utstring.c +1 -1
@@ -130,7 +130,7 @@ void acpi_ut_print_string(char *string, u16 max_length) }else {/* All others will be Hex escapes */ -acpi_os_printf ("\\x%2.2X" , (s32 ) string[i]); +acpi_os_printf ("\\x%2.2X" , (s32 )string[i]); }break ; }
drivers/acpi/acpica/utxface.c +2 -2
@@ -127,7 +127,7 @@ ACPI_EXPORT_SYMBOL(acpi_subsystem_status)* and the value of out_buffer is undefined. * ******************************************************************************/ -acpi_status acpi_get_system_info (struct acpi_buffer * out_buffer) +acpi_status acpi_get_system_info (struct acpi_buffer *out_buffer) {struct acpi_system_info *info_ptr;acpi_status status;
@@ -483,7 +483,7 @@ ACPI_EXPORT_SYMBOL(acpi_check_address_range)******************************************************************************/ acpi_status acpi_decode_pld_buffer (u8 *in_buffer, -acpi_size length,struct acpi_pld_info ** return_buffer) +acpi_size length,struct acpi_pld_info **return_buffer) {struct acpi_pld_info *pld_info;u32 *buffer =ACPI_CAST_PTR (u32, in_buffer);
include/acpi/acpiosxf.h +4 -4
@@ -108,7 +108,7 @@ acpi_os_table_override(struct acpi_table_header *existing_table,#ifndef ACPI_USE_ALTERNATE_PROTOTYPE_acpi_os_physical_table_overrideacpi_status acpi_os_physical_table_override (struct acpi_table_header *existing_table, -acpi_physical_address * new_address, +acpi_physical_address *new_address,u32 *new_table_length);#endif
@@ -203,7 +203,7 @@ void acpi_os_unmap_memory(void *logical_address, acpi_size size);#ifndef ACPI_USE_ALTERNATE_PROTOTYPE_acpi_os_get_physical_addressacpi_status acpi_os_get_physical_address (void *logical_address, -acpi_physical_address * physical_address); +acpi_physical_address *physical_address);#endif /*
@@ -379,14 +379,14 @@ acpi_statusacpi_os_get_table_by_name (char *signature, u32 instance, struct acpi_table_header **table, - acpi_physical_address * address); + acpi_physical_address *address);#endif #ifndef ACPI_USE_ALTERNATE_PROTOTYPE_acpi_os_get_table_by_indexacpi_status acpi_os_get_table_by_index (u32 index,struct acpi_table_header **table, -u32 *instance,acpi_physical_address * address); +u32 *instance,acpi_physical_address *address);#endif #ifndef ACPI_USE_ALTERNATE_PROTOTYPE_acpi_os_get_table_by_address
include/acpi/acpixf.h +11 -10
@@ -484,8 +484,8 @@ ACPI_EXTERNAL_RETURN_STATUS(acpi_status __init acpi_load_tables(void)) ACPI_EXTERNAL_RETURN_STATUS(acpi_status __init acpi_reallocate_root_table(void)) ACPI_EXTERNAL_RETURN_STATUS(acpi_status __init - acpi_find_root_pointer(acpi_physical_address * - rsdp_address)) + acpi_find_root_pointer(acpi_physical_address + *rsdp_address)) ACPI_EXTERNAL_RETURN_STATUS(acpi_status acpi_get_table_header(acpi_string signature, u32 instance,
@@ -530,7 +530,7 @@ ACPI_EXTERNAL_RETURN_STATUS(acpi_status ACPI_EXTERNAL_RETURN_STATUS(acpi_status acpi_get_handle(acpi_handle parent, acpi_string pathname, - acpi_handle * ret_handle)) + acpi_handle *ret_handle)) ACPI_EXTERNAL_RETURN_STATUS(acpi_status acpi_attach_data(acpi_handle object, acpi_object_handler handler,
@@ -575,15 +575,15 @@ ACPI_EXTERNAL_RETURN_STATUS(acpi_status acpi_get_next_object(acpi_object_type type, acpi_handle parent, acpi_handle child, - acpi_handle * out_handle)) + acpi_handle *out_handle)) ACPI_EXTERNAL_RETURN_STATUS(acpi_status acpi_get_type(acpi_handle object, - acpi_object_type * out_type)) + acpi_object_type *out_type)) ACPI_EXTERNAL_RETURN_STATUS(acpi_status acpi_get_parent(acpi_handle object, - acpi_handle * out_handle)) + acpi_handle *out_handle))/* * Handler interfaces
@@ -755,7 +755,7 @@ ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status acpi_enable_all_wakeup_gpes(void)) ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status acpi_get_gpe_device(u32 gpe_index, - acpi_handle * gpe_device)) + acpi_handle *gpe_device)) ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status acpi_install_gpe_block(acpi_handle gpe_device,
@@ -771,8 +771,8 @@ ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status* Resource interfaces */ typedef -acpi_status (*acpi_walk_resource_callback ) (struct acpi_resource * resource, -void *context); +acpi_status (*acpi_walk_resource_callback ) (struct acpi_resource * resource, +void *context); ACPI_EXTERNAL_RETURN_STATUS(acpi_status acpi_get_vendor_resource(acpi_handle device,
@@ -938,7 +938,8 @@ ACPI_DBG_DEPENDENT_RETURN_VOID(void ACPI_APP_DEPENDENT_RETURN_VOID(ACPI_PRINTF_LIKE(1) void ACPI_INTERNAL_VAR_XFACE acpi_log_error(const char *format, ...)) -acpi_status acpi_initialize_debugger (void ); + +acpi_status acpi_initialize_debugger (void );void acpi_terminate_debugger (void );
include/acpi/actypes.h +21 -20
78 lines not on this page · raw message
tools/power/acpi/os_specific/service_layers/oslinuxtbl.c +23 -24
141 lines not on this page · raw message
tools/power/acpi/os_specific/service_layers/osunixxf.c +12 -12
@@ -246,8 +246,8 @@ acpi_physical_address acpi_os_get_root_pointer(void)*****************************************************************************/ acpi_status -acpi_os_predefined_override (const struct acpi_predefined_names * init_val, -acpi_string * new_val) +acpi_os_predefined_override (const struct acpi_predefined_names *init_val, +acpi_string *new_val) {if (!init_val || !new_val) {
@@ -274,8 +274,8 @@ acpi_os_predefined_override(const struct acpi_predefined_names * init_val,*****************************************************************************/ acpi_status -acpi_os_table_override (struct acpi_table_header * existing_table, -struct acpi_table_header ** new_table) +acpi_os_table_override (struct acpi_table_header *existing_table, +struct acpi_table_header **new_table) {if (!existing_table || !new_table) {
@@ -311,8 +311,8 @@ acpi_os_table_override(struct acpi_table_header * existing_table,*****************************************************************************/ acpi_status -acpi_os_physical_table_override (struct acpi_table_header * existing_table, -acpi_physical_address * new_address, +acpi_os_physical_table_override (struct acpi_table_header *existing_table, +acpi_physical_address *new_address,u32 *new_table_length) {
@@ -506,7 +506,7 @@ acpi_status acpi_os_get_line(char *buffer, u32 buffer_length, u32 *bytes_read)void *acpi_os_map_memory (acpi_physical_address where,acpi_size length) { -return (ACPI_TO_POINTER ((acpi_size ) where)); +return (ACPI_TO_POINTER ((acpi_size )where)); }/******************************************************************************
@@ -603,9 +603,9 @@ void acpi_os_free(void *mem)acpi_status acpi_os_create_semaphore (u32 max_units, -u32 initial_units,acpi_handle * out_handle) +u32 initial_units,acpi_handle *out_handle) { - *out_handle = (acpi_handle )1 ; + *out_handle = (acpi_handle )1 ;return (AE_OK ); }
@@ -640,7 +640,7 @@ acpi_status acpi_os_signal_semaphore(acpi_handle handle, u32 units)acpi_status acpi_os_create_semaphore (u32 max_units, -u32 initial_units,acpi_handle * out_handle) +u32 initial_units,acpi_handle *out_handle) {sem_t *sem;
@@ -672,7 +672,7 @@ acpi_os_create_semaphore(u32 max_units, }#endif - *out_handle = (acpi_handle ) sem; + *out_handle = (acpi_handle )sem;return (AE_OK ); }
@@ -1035,7 +1035,7 @@ acpi_os_read_pci_configuration(struct acpi_pci_id *pci_id,*****************************************************************************/ acpi_status -acpi_os_write_pci_configuration (struct acpi_pci_id * pci_id, +acpi_os_write_pci_configuration (struct acpi_pci_id *pci_id,u32 pci_register,u64 value,u32 width) {
tools/power/acpi/tools/acpidump/apdump.c +1 -1
@@ -294,7 +294,7 @@ int ap_dump_table_by_address(char *ascii_address)return (-1 ); } - address = (acpi_physical_address ) long_address; + address = (acpi_physical_address )long_address; status =acpi_os_get_table_by_address (address, &table);if (ACPI_FAILURE (status)) { acpi_log_error("Could not get table at 0x%8.8X%8.8X, %s\n",
Signature · 1 line
1.7.10
PATCH v2 2/13 ACPICA: Refactor evaluate_object to reduce nesting
In reply to Lv ZhengFrom: Bob Moore <[email protected]>
ACPICA commit 599e9159f53565e4a3f3e67f6a03f81fcb10a4cf
Original patch from [email protected]
ACPICA BZ 1072.
--- drivers/acpi/acpica/nsxfeval.c | 111 ++++++++++++++++++++-------------------- 1 file changed, 55 insertions(+), 56 deletions(-)
drivers/acpi/acpica/nsxfeval.c +55 -56
@@ -280,13 +280,12 @@ acpi_evaluate_object(acpi_handle handle, info->parameters[info->param_count] =NULL ; } -#if 0 +#ifdef _FUTURE_FEATURE/* * Begin incoming argument count analysis. Check for too few args * and too many args. */ -switch (acpi_ns_get_type (info->node)) {case ACPI_TYPE_METHOD :
@@ -370,68 +369,68 @@ acpi_evaluate_object(acpi_handle handle,* If we are expecting a return value, and all went well above, * copy the return value to an external object. */ -if (return_buffer) { -if (!info->return_object) { - return_buffer->length =0 ; - }else { -if (ACPI_GET_DESCRIPTOR_TYPE (info->return_object) == -ACPI_DESC_TYPE_NAMED ) { -/* -* If we received a NS Node as a return object, this means that -* the object we are evaluating has nothing interesting to -* return (such as a mutex, etc.) We return an error because -* these types are essentially unsupported by this interface. -* We don't check up front because this makes it easier to add -* support for various types at a later date if necessary. -*/ - status =AE_TYPE ; - info->return_object =NULL ;/* No need to delete a NS Node */ - return_buffer->length =0 ; - } +if (!return_buffer) { + goto cleanup_return_object; + } -if (ACPI_SUCCESS (status)) { +if (!info->return_object) { + return_buffer->length =0 ; + goto cleanup; + } -/* Dereference Index and ref_of references */ +if (ACPI_GET_DESCRIPTOR_TYPE (info->return_object) == +ACPI_DESC_TYPE_NAMED ) { +/* +* If we received a NS Node as a return object, this means that +* the object we are evaluating has nothing interesting to +* return (such as a mutex, etc.) We return an error because +* these types are essentially unsupported by this interface. +* We don't check up front because this makes it easier to add +* support for various types at a later date if necessary. +*/ + status =AE_TYPE ; + info->return_object =NULL ;/* No need to delete a NS Node */ + return_buffer->length =0 ; + } -acpi_ns_resolve_references (info); +if (ACPI_FAILURE (status)) { + goto cleanup_return_object; + } -/* Get the size of the returned object */ +/* Dereference Index and ref_of references */ - status = -acpi_ut_get_object_size (info->return_object, - &buffer_space_needed); -if (ACPI_SUCCESS (status)) { - -/* Validate/Allocate/Clear caller buffer */ - - status = -acpi_ut_initialize_buffer - (return_buffer, - buffer_space_needed); -if (ACPI_FAILURE (status)) { -/* -* Caller's buffer is too small or a new one can't -* be allocated -*/ -ACPI_DEBUG_PRINT ((ACPI_DB_INFO , -"Needed buffer size %X, %s\n" , - (u32 ) - buffer_space_needed, -acpi_format_exception - (status))); - }else { -/* We have enough space for the object, build it */ - - status = -acpi_ut_copy_iobject_to_eobject - (info->return_object, - return_buffer); - } - } - } +acpi_ns_resolve_references (info); + +/* Get the size of the returned object */ + + status =acpi_ut_get_object_size (info->return_object, + &buffer_space_needed); +if (ACPI_SUCCESS (status)) { + +/* Validate/Allocate/Clear caller buffer */ + + status =acpi_ut_initialize_buffer (return_buffer, + buffer_space_needed); +if (ACPI_FAILURE (status)) { +/* +* Caller's buffer is too small or a new one can't +* be allocated +*/ +ACPI_DEBUG_PRINT ((ACPI_DB_INFO , +"Needed buffer size %X, %s\n" , + (u32 )buffer_space_needed, +acpi_format_exception (status))); + }else { +/* We have enough space for the object, build it */ + + status = +acpi_ut_copy_iobject_to_eobject (info->return_object, + return_buffer); } } +cleanup_return_object: +if (info->return_object) {/* * Delete the internal return object. NOTE: Interpreter must be
Signature · 1 line
1.7.10
PATCH v2 3/13 ACPICA: ACPI 6.1: Support for new PCCT subtable
In reply to Lv ZhengFrom: Bob Moore <[email protected]>
ACPICA commit de3ea7c322b9b6bdb09aa90c2e1d420cd4dce47c
Additional subspace structure was added.
--- include/acpi/actbl3.h | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-)
include/acpi/actbl3.h +22 -1
@@ -481,7 +481,8 @@ struct acpi_table_pcct {enum acpi_pcct_type {ACPI_PCCT_TYPE_GENERIC_SUBSPACE =0 ,ACPI_PCCT_TYPE_HW_REDUCED_SUBSPACE =1 , -ACPI_PCCT_TYPE_RESERVED =2 /* 2 and greater are reserved */ +ACPI_PCCT_TYPE_HW_REDUCED_SUBSPACE_TYPE2 =2 ,/* ACPI 6.1 */ +ACPI_PCCT_TYPE_RESERVED =3 /* 3 and greater are reserved */ };/*
@@ -520,6 +521,26 @@ struct acpi_pcct_hw_reduced {u16 min_turnaround_time; }; +/* 2: HW-reduced Communications Subspace Type 2 (ACPI 6.1) */ + +struct acpi_pcct_hw_reduced_type2 { +struct acpi_subtable_header header; +u32 doorbell_interrupt; +u8 flags; +u8 reserved; +u64 base_address; +u64 length; +struct acpi_generic_address doorbell_register; +u64 preserve_mask; +u64 write_mask; +u32 latency; +u32 max_access_rate; +u16 min_turnaround_time; +struct acpi_generic_address doorbell_ack_register; +u64 ack_preserve_mask; +u64 ack_write_mask; +}; +/* Values for doorbell flags above */ #define ACPI_PCCT_INTERRUPT_POLARITY (1)
Signature · 1 line
1.7.10
PATCH v2 4/13 ACPICA: ACPI 6.0: Update _BIX support for new package element
In reply to Lv ZhengFrom: Bob Moore <[email protected]>
ACPICA commit 3451e6d49d37919c13ec2c0019a31534b0dfc0c0
One integer was added at the end of the _BIX method, and the version number was incremented.
--- drivers/acpi/acpica/acpredef.h | 5 ++- drivers/acpi/acpica/nsprepkg.c | 86 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 89 insertions(+), 2 deletions(-)
drivers/acpi/acpica/acpredef.h +3 -2
@@ -129,7 +129,8 @@ enum acpi_return_package_types {ACPI_PTYPE2_REV_FIXED =9 ,ACPI_PTYPE2_FIX_VAR =10 ,ACPI_PTYPE2_VAR_VAR =11 , - ACPI_PTYPE2_UUID_PAIR = 12 +ACPI_PTYPE2_UUID_PAIR =12 , + ACPI_PTYPE_CUSTOM = 13 };/* Support macros for users of the predefined info table */
@@ -340,7 +341,7 @@ const union acpi_predefined_info acpi_gbl_predefined_methods[] = { {{"_BIX" ,METHOD_0ARGS , METHOD_RETURNS(ACPI_RTYPE_PACKAGE)}}, /* Fixed-length (16 Int),(4 Str) */ -PACKAGE_INFO (ACPI_PTYPE1_FIXED ,ACPI_RTYPE_INTEGER ,16 , +PACKAGE_INFO (ACPI_PTYPE_CUSTOM ,ACPI_RTYPE_INTEGER ,16 ,ACPI_RTYPE_STRING ,4 ,0 ), {{"_BLT",
drivers/acpi/acpica/nsprepkg.c +86 -0
104 lines not on this page · raw message
Signature · 1 line
1.7.10
PATCH v2 5/13 ACPICA: ACPI 6.0, tools/iasl: Add support for new resource descriptors
In reply to Lv ZhengFrom: Bob Moore <[email protected]>
ACPICA commit 5a0555ece4ba9917e5842b21d88469ae06b4e815
Adds full support for:i2c_serial_bus_v2spi_serial_bus_v2uart_serial_bus_v2
Compiler, Disassembler, Resource Manager, acpi_help.
--- drivers/acpi/acpica/rsdumpinfo.c | 9 +++++---- drivers/acpi/acpica/rsserial.c | 21 ++++++++++++++++++--- include/acpi/acrestyp.h | 1 + 3 files changed, 24 insertions(+), 7 deletions(-)
drivers/acpi/acpica/rsdumpinfo.c +5 -4
@@ -330,19 +330,20 @@ struct acpi_rsdump_info acpi_rs_dump_fixed_dma[4] = { {ACPI_RSD_UINT8, ACPI_RSD_OFFSET (common_serial_bus.type), "Type", acpi_gbl_sbt_decode}, \ {ACPI_RSD_1BITFLAG, ACPI_RSD_OFFSET (common_serial_bus.producer_consumer), "ProducerConsumer", acpi_gbl_consume_decode}, \ {ACPI_RSD_1BITFLAG, ACPI_RSD_OFFSET (common_serial_bus.slave_mode), "SlaveMode", acpi_gbl_sm_decode}, \ + {ACPI_RSD_1BITFLAG, ACPI_RSD_OFFSET (common_serial_bus.connection_sharing),"ConnectionSharing", acpi_gbl_shr_decode}, \ {ACPI_RSD_UINT8, ACPI_RSD_OFFSET (common_serial_bus.type_revision_id), "TypeRevisionId", NULL}, \ {ACPI_RSD_UINT16, ACPI_RSD_OFFSET (common_serial_bus.type_data_length), "TypeDataLength", NULL}, \ {ACPI_RSD_SOURCE, ACPI_RSD_OFFSET (common_serial_bus.resource_source), "ResourceSource", NULL}, \ {ACPI_RSD_UINT16, ACPI_RSD_OFFSET (common_serial_bus.vendor_length), "VendorLength", NULL}, \ {ACPI_RSD_SHORTLISTX,ACPI_RSD_OFFSET (common_serial_bus.vendor_data), "VendorData", NULL}, -struct acpi_rsdump_info acpi_rs_dump_common_serial_bus[10] = { +struct acpi_rsdump_info acpi_rs_dump_common_serial_bus[11] = { {ACPI_RSD_TITLE, ACPI_RSD_TABLE_SIZE(acpi_rs_dump_common_serial_bus), "Common Serial Bus", NULL},ACPI_RS_DUMP_COMMON_SERIAL_BUS }; -struct acpi_rsdump_info acpi_rs_dump_i2c_serial_bus[13 ] = { +struct acpi_rsdump_info acpi_rs_dump_i2c_serial_bus[14 ] = { {ACPI_RSD_TITLE ,ACPI_RSD_TABLE_SIZE (acpi_rs_dump_i2c_serial_bus),"I2C Serial Bus" ,NULL }, ACPI_RS_DUMP_COMMON_SERIAL_BUS {ACPI_RSD_1BITFLAG,
@@ -355,7 +356,7 @@ struct acpi_rsdump_info acpi_rs_dump_i2c_serial_bus[13] = { "SlaveAddress", NULL}, }; -struct acpi_rsdump_info acpi_rs_dump_spi_serial_bus[17 ] = { +struct acpi_rsdump_info acpi_rs_dump_spi_serial_bus[18 ] = { {ACPI_RSD_TITLE ,ACPI_RSD_TABLE_SIZE (acpi_rs_dump_spi_serial_bus),"Spi Serial Bus" ,NULL }, ACPI_RS_DUMP_COMMON_SERIAL_BUS {ACPI_RSD_1BITFLAG,
@@ -376,7 +377,7 @@ struct acpi_rsdump_info acpi_rs_dump_spi_serial_bus[17] = { "ConnectionSpeed", NULL}, }; -struct acpi_rsdump_info acpi_rs_dump_uart_serial_bus[19 ] = { +struct acpi_rsdump_info acpi_rs_dump_uart_serial_bus[20 ] = { {ACPI_RSD_TITLE ,ACPI_RSD_TABLE_SIZE (acpi_rs_dump_uart_serial_bus),"Uart Serial Bus" ,NULL }, ACPI_RS_DUMP_COMMON_SERIAL_BUS {ACPI_RSD_2BITFLAG,
drivers/acpi/acpica/rsserial.c +18 -3
@@ -151,7 +151,7 @@ struct acpi_rsconvert_info acpi_rs_convert_gpio[18] = {* ******************************************************************************/ -struct acpi_rsconvert_info acpi_rs_convert_i2c_serial_bus[16 ] = { +struct acpi_rsconvert_info acpi_rs_convert_i2c_serial_bus[17 ] = { {ACPI_RSC_INITGET ,ACPI_RESOURCE_TYPE_SERIAL_BUS , ACPI_RS_SIZE(struct acpi_resource_i2c_serialbus),ACPI_RSC_TABLE_SIZE (acpi_rs_convert_i2c_serial_bus)},
@@ -177,6 +177,11 @@ struct acpi_rsconvert_info acpi_rs_convert_i2c_serial_bus[16] = {AML_OFFSET (common_serial_bus.flags), 1}, + {ACPI_RSC_1BITFLAG, +ACPI_RS_OFFSET (data.common_serial_bus.connection_sharing), +AML_OFFSET (common_serial_bus.flags), + 2}, + {ACPI_RSC_MOVE8,ACPI_RS_OFFSET (data.common_serial_bus.type_revision_id), AML_OFFSET(common_serial_bus.type_revision_id),
@@ -237,7 +242,7 @@ struct acpi_rsconvert_info acpi_rs_convert_i2c_serial_bus[16] = {* ******************************************************************************/ -struct acpi_rsconvert_info acpi_rs_convert_spi_serial_bus[20 ] = { +struct acpi_rsconvert_info acpi_rs_convert_spi_serial_bus[21 ] = { {ACPI_RSC_INITGET ,ACPI_RESOURCE_TYPE_SERIAL_BUS , ACPI_RS_SIZE(struct acpi_resource_spi_serialbus),ACPI_RSC_TABLE_SIZE (acpi_rs_convert_spi_serial_bus)},
@@ -263,6 +268,11 @@ struct acpi_rsconvert_info acpi_rs_convert_spi_serial_bus[20] = {AML_OFFSET (common_serial_bus.flags), 1}, + {ACPI_RSC_1BITFLAG, +ACPI_RS_OFFSET (data.common_serial_bus.connection_sharing), +AML_OFFSET (common_serial_bus.flags), + 2}, + {ACPI_RSC_MOVE8,ACPI_RS_OFFSET (data.common_serial_bus.type_revision_id), AML_OFFSET(common_serial_bus.type_revision_id),
@@ -339,7 +349,7 @@ struct acpi_rsconvert_info acpi_rs_convert_spi_serial_bus[20] = {* ******************************************************************************/ -struct acpi_rsconvert_info acpi_rs_convert_uart_serial_bus[22 ] = { +struct acpi_rsconvert_info acpi_rs_convert_uart_serial_bus[23 ] = { {ACPI_RSC_INITGET ,ACPI_RESOURCE_TYPE_SERIAL_BUS , ACPI_RS_SIZE(struct acpi_resource_uart_serialbus),ACPI_RSC_TABLE_SIZE (acpi_rs_convert_uart_serial_bus)},
@@ -365,6 +375,11 @@ struct acpi_rsconvert_info acpi_rs_convert_uart_serial_bus[22] = {AML_OFFSET (common_serial_bus.flags), 1}, + {ACPI_RSC_1BITFLAG, +ACPI_RS_OFFSET (data.common_serial_bus.connection_sharing), +AML_OFFSET (common_serial_bus.flags), + 2}, + {ACPI_RSC_MOVE8,ACPI_RS_OFFSET (data.common_serial_bus.type_revision_id), AML_OFFSET(common_serial_bus.type_revision_id),
include/acpi/acrestyp.h +1 -0
@@ -417,6 +417,7 @@ struct acpi_resource_gpio {u8 type; \u8 producer_consumer;/* For values, see Producer/Consumer above */ \u8 slave_mode; \ +u8 connection_sharing; \u8 type_revision_id; \u16 type_data_length; \u16 vendor_length; \
Signature · 1 line
1.7.10
PATCH v2 6/13 ACPICA: Renamed some #defined flag constants for clarity
In reply to Lv ZhengFrom: Bob Moore <[email protected]>
ACPICA commit 438905b205e64e742f9670a0970419c426264831
Expanded a couple of cryptic names.
--- drivers/acpi/acpica/aclocal.h | 30 +++++++++++++++--------------- drivers/acpi/acpica/psutils.c | 2 +- 2 files changed, 16 insertions(+), 16 deletions(-)
drivers/acpi/acpica/aclocal.h +15 -15
@@ -856,24 +856,24 @@ struct acpi_parse_state {/* Parse object flags */ -#define ACPI_PARSEOP_GENERIC 0x01 -#define ACPI_PARSEOP_NAMED 0x02 -#define ACPI_PARSEOP_DEFERRED 0x04 -#define ACPI_PARSEOP_BYTELIST 0x08 -#define ACPI_PARSEOP_IN_STACK 0x10 -#define ACPI_PARSEOP_TARGET 0x20 -#define ACPI_PARSEOP_IN_CACHE 0x80 +#define ACPI_PARSEOP_GENERIC 0x01 +#define ACPI_PARSEOP_NAMED_OBJECT 0x02 +#define ACPI_PARSEOP_DEFERRED 0x04 +#define ACPI_PARSEOP_BYTELIST 0x08 +#define ACPI_PARSEOP_IN_STACK 0x10 +#define ACPI_PARSEOP_TARGET 0x20 +#define ACPI_PARSEOP_IN_CACHE 0x80/* Parse object disasm_flags */ -#define ACPI_PARSEOP_IGNORE 0x01 -#define ACPI_PARSEOP_PARAMLIST 0x02 -#define ACPI_PARSEOP_EMPTY_TERMLIST 0x04 -#define ACPI_PARSEOP_PREDEF_CHECKED 0x08 -#define ACPI_PARSEOP_CLOSING_PAREN 0x10 -#define ACPI_PARSEOP_COMPOUND 0x20 -#define ACPI_PARSEOP_ASSIGNMENT 0x40 -#define ACPI_PARSEOP_ELSEIF 0x80 +#define ACPI_PARSEOP_IGNORE 0x01 +#define ACPI_PARSEOP_PARAMETER_LIST 0x02 +#define ACPI_PARSEOP_EMPTY_TERMLIST 0x04 +#define ACPI_PARSEOP_PREDEFINED_CHECKED 0x08 +#define ACPI_PARSEOP_CLOSING_PAREN 0x10 +#define ACPI_PARSEOP_COMPOUND_ASSIGNMENT 0x20 +#define ACPI_PARSEOP_ASSIGNMENT 0x40 +#define ACPI_PARSEOP_ELSEIF 0x80/***************************************************************************** *
drivers/acpi/acpica/psutils.c +1 -1
@@ -128,7 +128,7 @@ union acpi_parse_object *acpi_ps_alloc_op(u16 opcode, u8 *aml)if (op_info->flags &AML_DEFER ) { flags =ACPI_PARSEOP_DEFERRED ; }else if (op_info->flags &AML_NAMED ) { - flags =ACPI_PARSEOP_NAMED ; + flags =ACPI_PARSEOP_NAMED_OBJECT ; }else if (opcode ==AML_INT_BYTELIST_OP ) { flags =ACPI_PARSEOP_BYTELIST ; }
Signature · 1 line
1.7.10
PATCH v2 7/13 ACPICA: Utilities: Add ACPI_IS_ALIGNED() macro
In reply to Lv ZhengThis patch introduces ACPI_IS_ALIGNED() macro. Lv Zheng.
--- drivers/acpi/acpica/acmacros.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/acpi/acpica/acmacros.h +2 -1
@@ -262,7 +262,8 @@/* Generic (power-of-two) rounding */ -#define ACPI_IS_POWER_OF_TWO (a) (((a) & ((a) - 1)) == 0) +#define ACPI_IS_ALIGNED (a, s) (((a) & ((s) - 1)) == 0) +#define ACPI_IS_POWER_OF_TWO (a) ACPI_IS_ALIGNED(a, a)/* * Bitmask creation
Signature · 1 line
1.7.10
PATCH v2 8/13 ACPICA: Hardware: Add optimized access bit width support
In reply to Lv ZhengACPICA commit c49a751b4dae7baec1790748a2b4b6e8ab599f51
For Access Size = 0, it actually can use user expected access bit width. This patch implements this.
Besides of the ACPICA upstream commit, this patch also includes a fix fixing the issue reported by the FreeBSD community.
The old register descriptors are translated in acpi_tb_init_generic_address() with access_width being filled with 0. This breaks code in acpi_hw_get_access_bit_width() when the registers are 16-bit IO ports and their bit_width fields are filled with 16. The rapid fix is meant to make code written for acpi_hw_get_access_bit_width() regression safer before the issue is correctly fixed from acpi_tb_init_generic_address(). Reported by John Baldwin <[email protected]>, fixed by Lv Zheng <[email protected]>, tested by Jung-uk Kim <[email protected]>.
Tested-by Jung-uk Kim <[email protected]>.
--- drivers/acpi/acpica/hwregs.c | 49 ++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 47 insertions(+), 2 deletions(-)
drivers/acpi/acpica/hwregs.c +47 -2
@@ -51,6 +51,10 @@ ACPI_MODULE_NAME("hwregs")#if (!ACPI_REDUCED_HARDWARE )/* Local Prototypes */ +static u8 +acpi_hw_get_access_bit_width (struct acpi_generic_address *reg, +u8 max_bit_width); + static acpi_status acpi_hw_read_multiple(u32 *value, struct acpi_generic_address *register_a,
@@ -65,6 +69,48 @@ acpi_hw_write_multiple(u32 value,/****************************************************************************** * +* FUNCTION: acpi_hw_get_access_bit_width +* +* PARAMETERS: reg - GAS register structure +* max_bit_width - Max bit_width supported (32 or 64) +* +* RETURN: Status +* +* DESCRIPTION: Obtain optimal access bit width +* +******************************************************************************/ + +static u8 +acpi_hw_get_access_bit_width (struct acpi_generic_address *reg,u8 max_bit_width) +{ +u64 address; + +if (!reg->access_width) { +/* +* Detect old register descriptors where only the bit_width field +* makes senses. The target address is copied to handle possible +* alignment issues. +*/ +ACPI_MOVE_64_TO_64 (&address, ®->address); +if (!reg->bit_offset && reg->bit_width && +ACPI_IS_POWER_OF_TWO (reg->bit_width) && +ACPI_IS_ALIGNED (reg->bit_width,8 ) && +ACPI_IS_ALIGNED (address, reg->bit_width)) { +return (reg->bit_width); + }else { +if (reg->space_id ==ACPI_ADR_SPACE_SYSTEM_IO ) { +return (32 ); + }else { +return (max_bit_width); + } + } + }else { +return (1 << (reg->access_width +2 )); + } +} + +/****************************************************************************** +* * FUNCTION: acpi_hw_validate_register * * PARAMETERS: reg - GAS register structure
@@ -122,8 +168,7 @@ acpi_hw_validate_register(struct acpi_generic_address *reg,/* Validate the bit_width, convert access_width into number of bits */ - access_width = reg->access_width ? reg->access_width :1 ; - access_width =1 << (access_width +2 ); + access_width =acpi_hw_get_access_bit_width (reg, max_bit_width); bit_width =ACPI_ROUND_UP (reg->bit_offset + reg->bit_width, access_width);if (max_bit_width < bit_width) {
Signature · 1 line
1.7.10
Re: [PATCH v2 08/13] ACPICA: Hardware: Add optimized access bit width support
Quoted 65 lines · Lv Zheng
ACPICA commit
c49a751b4dae7baec1790748a2b4b6e8ab599f51For Access Size = 0, it actually can use user expected access bit width. This patch implements this.
Besides of the ACPICA upstream commit, this patch also includes a fix fixing the issue reported by the FreeBSD community.
The old register descriptors are translated inacpi_tb_init_generic_address()withaccess_widthbeing filled with 0. This breaks code inacpi_hw_get_access_bit_width()when the registers are 16-bit IO ports and theirbit_widthfields are filled with 16. The rapid fix is meant to make code written foracpi_hw_get_access_bit_width()regression safer before the issue is correctly fixed fromacpi_tb_init_generic_address(). Reported by John Baldwin <[email protected]>, fixed by Lv Zheng <[email protected]>, tested by Jung-uk Kim <[email protected]>.Tested-by Jung-uk Kim <[email protected]>.
Signed-off-by Lv Zheng <[email protected]>Signed-off-by Bob Moore <[email protected]>--- drivers/acpi/acpica/hwregs.c | 49 ++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 47 insertions(+), 2 deletions(-)drivers/acpi/acpica/hwregs.c +25
-0@@ -51,6 +51,10 @@ ACPI_MODULE_NAME("hwregs")#if (!ACPI_REDUCED_HARDWARE )/* Local Prototypes */ +static u8 +acpi_hw_get_access_bit_width (struct acpi_generic_address *reg, +u8 max_bit_width); + static acpi_status acpi_hw_read_multiple(u32 *value, struct acpi_generic_address *register_a,@@ -65,6 +69,48 @@ acpi_hw_write_multiple(u32 value,/****************************************************************************** * +* FUNCTION: acpi_hw_get_access_bit_width +* +* PARAMETERS: reg - GAS register structure +* max_bit_width - Max bit_width supported (32 or 64) +* +* RETURN: Status +* +* DESCRIPTION: Obtain optimal access bit width +* +******************************************************************************/ + +static u8 +acpi_hw_get_access_bit_width (struct acpi_generic_address *reg,u8 max_bit_width) +{ +u64 address; + +if (!reg->access_width) { +/* +* Detect old register descriptors where only the bit_width field +* makes senses. The target address is copied to handle possible +* alignment issues.
drivers/acpi/acpica/hwregs.c acpi_hw_write_multiple(u32 value, · line 102
Quoted 10 lines
drivers/acpi/acpica/hwregs.c +10
-0+*/ +ACPI_MOVE_64_TO_64 (&address, ®->address); +if (!reg->bit_offset && reg->bit_width && +ACPI_IS_POWER_OF_TWO (reg->bit_width) && +ACPI_IS_ALIGNED (reg->bit_width,8 ) && +ACPI_IS_ALIGNED (address, reg->bit_width)) { +return (reg->bit_width); + }else { +if (reg->space_id ==ACPI_ADR_SPACE_SYSTEM_IO ) { +return (32 );
This (together with "... Add access_width/bit_offset support in acpi_hw_write") breaks Xen guests using older QEMU which doesn't support 4-byte IO accesses.
Why not return "reg->bit_width?:max_bit_width" ? This will preserve original behavior.
-boris
Quoted 15 lines
drivers/acpi/acpica/hwregs.c +11
-0+ }else { +return (max_bit_width); + } + } + }else { +return (1 << (reg->access_width +2 )); + } +} + +/****************************************************************************** +* * FUNCTION: acpi_hw_validate_register * * PARAMETERS: reg - GAS register structure
drivers/acpi/acpica/hwregs.c acpi_hw_validate_register(struct acpi_generic_address *reg, · line 174
Quoted 9 lines
drivers/acpi/acpica/hwregs.c +1
-2@@ -122,8 +168,7 @@ acpi_hw_validate_register(struct acpi_generic_address *reg,/* Validate the bit_width, convert access_width into number of bits */ - access_width = reg->access_width ? reg->access_width :1 ; - access_width =1 << (access_width +2 ); + access_width =acpi_hw_get_access_bit_width (reg, max_bit_width); bit_width =ACPI_ROUND_UP (reg->bit_offset + reg->bit_width, access_width);if (max_bit_width < bit_width) {
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel
Re: [PATCH v2 08/13] ACPICA: Hardware: Add optimized access bit width support
In reply to Lv ZhengQuoted 65 lines · Lv Zheng
ACPICA commit
c49a751b4dae7baec1790748a2b4b6e8ab599f51For Access Size = 0, it actually can use user expected access bit width. This patch implements this.
Besides of the ACPICA upstream commit, this patch also includes a fix fixing the issue reported by the FreeBSD community.
The old register descriptors are translated inacpi_tb_init_generic_address()withaccess_widthbeing filled with 0. This breaks code inacpi_hw_get_access_bit_width()when the registers are 16-bit IO ports and theirbit_widthfields are filled with 16. The rapid fix is meant to make code written foracpi_hw_get_access_bit_width()regression safer before the issue is correctly fixed fromacpi_tb_init_generic_address(). Reported by John Baldwin <[email protected]>, fixed by Lv Zheng <[email protected]>, tested by Jung-uk Kim <[email protected]>.Tested-by Jung-uk Kim <[email protected]>.
Signed-off-by Lv Zheng <[email protected]>Signed-off-by Bob Moore <[email protected]>--- drivers/acpi/acpica/hwregs.c | 49 ++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 47 insertions(+), 2 deletions(-)drivers/acpi/acpica/hwregs.c +25
-0@@ -51,6 +51,10 @@ ACPI_MODULE_NAME("hwregs")#if (!ACPI_REDUCED_HARDWARE )/* Local Prototypes */ +static u8 +acpi_hw_get_access_bit_width (struct acpi_generic_address *reg, +u8 max_bit_width); + static acpi_status acpi_hw_read_multiple(u32 *value, struct acpi_generic_address *register_a,@@ -65,6 +69,48 @@ acpi_hw_write_multiple(u32 value,/****************************************************************************** * +* FUNCTION: acpi_hw_get_access_bit_width +* +* PARAMETERS: reg - GAS register structure +* max_bit_width - Max bit_width supported (32 or 64) +* +* RETURN: Status +* +* DESCRIPTION: Obtain optimal access bit width +* +******************************************************************************/ + +static u8 +acpi_hw_get_access_bit_width (struct acpi_generic_address *reg,u8 max_bit_width) +{ +u64 address; + +if (!reg->access_width) { +/* +* Detect old register descriptors where only the bit_width field +* makes senses. The target address is copied to handle possible +* alignment issues.
drivers/acpi/acpica/hwregs.c acpi_hw_write_multiple(u32 value, · line 102
Quoted 10 lines
drivers/acpi/acpica/hwregs.c +10
-0+*/ +ACPI_MOVE_64_TO_64 (&address, ®->address); +if (!reg->bit_offset && reg->bit_width && +ACPI_IS_POWER_OF_TWO (reg->bit_width) && +ACPI_IS_ALIGNED (reg->bit_width,8 ) && +ACPI_IS_ALIGNED (address, reg->bit_width)) { +return (reg->bit_width); + }else { +if (reg->space_id ==ACPI_ADR_SPACE_SYSTEM_IO ) { +return (32 );
This (together with "... Add access_width/bit_offset support in acpi_hw_write") breaks Xen guests using older QEMU which doesn't support 4-byte IO accesses.
Why not return "reg->bit_width?:max_bit_width" ? This will preserve original behavior.
-boris
Quoted 24 lines
drivers/acpi/acpica/hwregs.c +12
-2+ }else { +return (max_bit_width); + } + } + }else { +return (1 << (reg->access_width +2 )); + } +} + +/****************************************************************************** +* * FUNCTION: acpi_hw_validate_register * * PARAMETERS: reg - GAS register structure @@ -122,8 +168,7 @@ acpi_hw_validate_register(struct acpi_generic_address *reg,/* Validate the bit_width, convert access_width into number of bits */ - access_width = reg->access_width ? reg->access_width :1 ; - access_width =1 << (access_width +2 ); + access_width =acpi_hw_get_access_bit_width (reg, max_bit_width); bit_width =ACPI_ROUND_UP (reg->bit_offset + reg->bit_width, access_width);if (max_bit_width < bit_width) {
Re: [PATCH v2 08/13] ACPICA: Hardware: Add optimized access bit width support
Quoted 27 lines
Quoted 1 line
Quoted 1 line
Boris Ostrovsky <[email protected]> 05/25/16 9:17 PM >>>
Quoted 10 lines · Lv Zheng
drivers/acpi/acpica/hwregs.c +10
-0+static u8 +acpi_hw_get_access_bit_width (struct acpi_generic_address *reg,u8 max_bit_width) +{ +u64 address; + +if (!reg->access_width) { +/* +* Detect old register descriptors where only the bit_width field +* makes senses. The target address is copied to handle possible +* alignment issues. drivers/acpi/acpica/hwregs.c acpi_hw_write_multiple(u32 value, · line 102
Quoted 10 lines
drivers/acpi/acpica/hwregs.c +10
-0+*/ +ACPI_MOVE_64_TO_64 (&address, ®->address); +if (!reg->bit_offset && reg->bit_width && +ACPI_IS_POWER_OF_TWO (reg->bit_width) && +ACPI_IS_ALIGNED (reg->bit_width,8 ) && +ACPI_IS_ALIGNED (address, reg->bit_width)) { +return (reg->bit_width); + }else { +if (reg->space_id ==ACPI_ADR_SPACE_SYSTEM_IO ) { +return (32 );This (together with "... Add access_width/bit_offset support in
acpi_hw_write") breaks Xen guests using older QEMU which doesn't support 4-byte IO accesses.
Quoted 2 lines
Why not return "reg->bit_width?:max_bit_width" ? This will preserve original behavior.
Did you figure out why we get here in the first place, instead of taking the first "return"? I.e. isn't the issue the apparently wrong use of the second ACPI_IS_ALIGNED() above? Afaict it ought to be ACPI_IS_ALIGNED(address, reg->bit_width / 8)...
Jan
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel
Re: [PATCH v2 08/13] ACPICA: Hardware: Add optimized access bit width support
In reply to Boris OstrovskyQuoted 27 lines
Quoted 1 line
Quoted 1 line
Boris Ostrovsky <[email protected]> 05/25/16 9:17 PM >>>
Quoted 10 lines · Lv Zheng
drivers/acpi/acpica/hwregs.c +10
-0+static u8 +acpi_hw_get_access_bit_width (struct acpi_generic_address *reg,u8 max_bit_width) +{ +u64 address; + +if (!reg->access_width) { +/* +* Detect old register descriptors where only the bit_width field +* makes senses. The target address is copied to handle possible +* alignment issues. drivers/acpi/acpica/hwregs.c acpi_hw_write_multiple(u32 value, · line 102
Quoted 10 lines
drivers/acpi/acpica/hwregs.c +10
-0+*/ +ACPI_MOVE_64_TO_64 (&address, ®->address); +if (!reg->bit_offset && reg->bit_width && +ACPI_IS_POWER_OF_TWO (reg->bit_width) && +ACPI_IS_ALIGNED (reg->bit_width,8 ) && +ACPI_IS_ALIGNED (address, reg->bit_width)) { +return (reg->bit_width); + }else { +if (reg->space_id ==ACPI_ADR_SPACE_SYSTEM_IO ) { +return (32 );This (together with "... Add access_width/bit_offset support in
acpi_hw_write") breaks Xen guests using older QEMU which doesn't support 4-byte IO accesses.
Quoted 2 lines
Why not return "reg->bit_width?:max_bit_width" ? This will preserve original behavior.
Did you figure out why we get here in the first place, instead of taking the first "return"? I.e. isn't the issue the apparently wrong use of the second ACPI_IS_ALIGNED() above? Afaict it ought to be ACPI_IS_ALIGNED(address, reg->bit_width / 8)...
Jan
Re: [PATCH v2 08/13] ACPICA: Hardware: Add optimized access bit width support
Quoted 26 lines · Jan Beulich
Quoted 26 lines
Quoted 1 line
Quoted 1 line
Boris Ostrovsky <[email protected]> 05/25/16 9:17 PM >>>
Quoted 10 lines · Lv Zheng
drivers/acpi/acpica/hwregs.c +10
-0+static u8 +acpi_hw_get_access_bit_width (struct acpi_generic_address *reg,u8 max_bit_width) +{ +u64 address; + +if (!reg->access_width) { +/* +* Detect old register descriptors where only the bit_width field +* makes senses. The target address is copied to handle possible +* alignment issues. drivers/acpi/acpica/hwregs.c acpi_hw_write_multiple(u32 value, · line 102
Quoted 10 lines
drivers/acpi/acpica/hwregs.c +10
-0+*/ +ACPI_MOVE_64_TO_64 (&address, ®->address); +if (!reg->bit_offset && reg->bit_width && +ACPI_IS_POWER_OF_TWO (reg->bit_width) && +ACPI_IS_ALIGNED (reg->bit_width,8 ) && +ACPI_IS_ALIGNED (address, reg->bit_width)) { +return (reg->bit_width); + }else { +if (reg->space_id ==ACPI_ADR_SPACE_SYSTEM_IO ) { +return (32 );This (together with "... Add access_width/bit_offset support in
acpi_hw_write") breaks Xen guests using older QEMU which doesn't support 4-byte IO accesses.
Quoted 6 lines
Quoted 2 lines
Why not return "reg->bit_width?:max_bit_width" ? This will preserve original behavior.
Did you figure out why we get here in the first place, instead of taking the first "return"? I.e. isn't the issue the apparently wrong use of the second
ACPI_IS_ALIGNED()above? Afaict it ought to beACPI_IS_ALIGNED(address, reg->bit_width / 8)...
We are trying to access address 0x...b004 (PM1a control) so yes, fixing alignment check would probably resolve the problem that we are seeing now.
However, for compatibility purposes we may consider not doing any checks and simply return bit_width if access_width is not available.
-boris
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel
Re: [PATCH v2 08/13] ACPICA: Hardware: Add optimized access bit width support
In reply to Jan BeulichQuoted 26 lines · Jan Beulich
Quoted 26 lines
Quoted 1 line
Quoted 1 line
Boris Ostrovsky <[email protected]> 05/25/16 9:17 PM >>>
Quoted 10 lines · Lv Zheng
drivers/acpi/acpica/hwregs.c +10
-0+static u8 +acpi_hw_get_access_bit_width (struct acpi_generic_address *reg,u8 max_bit_width) +{ +u64 address; + +if (!reg->access_width) { +/* +* Detect old register descriptors where only the bit_width field +* makes senses. The target address is copied to handle possible +* alignment issues. drivers/acpi/acpica/hwregs.c acpi_hw_write_multiple(u32 value, · line 102
Quoted 10 lines
drivers/acpi/acpica/hwregs.c +10
-0+*/ +ACPI_MOVE_64_TO_64 (&address, ®->address); +if (!reg->bit_offset && reg->bit_width && +ACPI_IS_POWER_OF_TWO (reg->bit_width) && +ACPI_IS_ALIGNED (reg->bit_width,8 ) && +ACPI_IS_ALIGNED (address, reg->bit_width)) { +return (reg->bit_width); + }else { +if (reg->space_id ==ACPI_ADR_SPACE_SYSTEM_IO ) { +return (32 );This (together with "... Add access_width/bit_offset support in
acpi_hw_write") breaks Xen guests using older QEMU which doesn't support 4-byte IO accesses.
Quoted 6 lines
Quoted 2 lines
Why not return "reg->bit_width?:max_bit_width" ? This will preserve original behavior.
Did you figure out why we get here in the first place, instead of taking the first "return"? I.e. isn't the issue the apparently wrong use of the second
ACPI_IS_ALIGNED()above? Afaict it ought to beACPI_IS_ALIGNED(address, reg->bit_width / 8)...
We are trying to access address 0x...b004 (PM1a control) so yes, fixing alignment check would probably resolve the problem that we are seeing now.
However, for compatibility purposes we may consider not doing any checks and simply return bit_width if access_width is not available.
-boris
Re: [PATCH v2 08/13] ACPICA: Hardware: Add optimized access bit width support
Quoted 33 lines · Boris Ostrovsky
Quoted 26 lines · Jan Beulich
Quoted 26 lines
Quoted 1 line
Quoted 1 line
Boris Ostrovsky <[email protected]> 05/25/16 9:17 PM >>>
Quoted 10 lines · Lv Zheng
drivers/acpi/acpica/hwregs.c +10
-0+static u8 +acpi_hw_get_access_bit_width (struct acpi_generic_address *reg,u8 max_bit_width) +{ +u64 address; + +if (!reg->access_width) { +/* +* Detect old register descriptors where only the bit_width field +* makes senses. The target address is copied to handle possible +* alignment issues. drivers/acpi/acpica/hwregs.c acpi_hw_write_multiple(u32 value, · line 102
Quoted 10 lines
drivers/acpi/acpica/hwregs.c +10
-0+*/ +ACPI_MOVE_64_TO_64 (&address, ®->address); +if (!reg->bit_offset && reg->bit_width && +ACPI_IS_POWER_OF_TWO (reg->bit_width) && +ACPI_IS_ALIGNED (reg->bit_width,8 ) && +ACPI_IS_ALIGNED (address, reg->bit_width)) { +return (reg->bit_width); + }else { +if (reg->space_id ==ACPI_ADR_SPACE_SYSTEM_IO ) { +return (32 );This (together with "... Add access_width/bit_offset support in
acpi_hw_write") breaks Xen guests using older QEMU which doesn't support 4-byte IO accesses.Quoted 6 lines
Quoted 2 lines
Why not return "reg->bit_width?:max_bit_width" ? This will preserve original behavior.
Did you figure out why we get here in the first place, instead of taking the first "return"? I.e. isn't the issue the apparently wrong use of the second
ACPI_IS_ALIGNED()above? Afaict it ought to beACPI_IS_ALIGNED(address, reg->bit_width / 8)...
Quoted 5 lines
We are trying to access address 0x...b004 (PM1a control) so yes, fixing alignment check would probably resolve the problem that we are seeing now.
However, for compatibility purposes we may consider not doing any checks and simply return
bit_widthifaccess_widthis not available.
Interestingly enough I bisected what I thought was a completely different problem to this patch as well.
Something is messed up with 32-bit dom0 booting (so no QEMU) on one machine in my pool. First error that I see is
pcieport 0000:00:02.0: can't find IRQ for PCI INT A; probably buggy
MP table
I'll look at this tomorrow, hopefully.
-boris
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel
Re: [PATCH v2 08/13] ACPICA: Hardware: Add optimized access bit width support
In reply to Boris OstrovskyQuoted 33 lines · Boris Ostrovsky
Quoted 26 lines · Jan Beulich
Quoted 26 lines
Quoted 1 line
Quoted 1 line
Boris Ostrovsky <[email protected]> 05/25/16 9:17 PM >>>
Quoted 10 lines · Lv Zheng
drivers/acpi/acpica/hwregs.c +10
-0+static u8 +acpi_hw_get_access_bit_width (struct acpi_generic_address *reg,u8 max_bit_width) +{ +u64 address; + +if (!reg->access_width) { +/* +* Detect old register descriptors where only the bit_width field +* makes senses. The target address is copied to handle possible +* alignment issues. drivers/acpi/acpica/hwregs.c acpi_hw_write_multiple(u32 value, · line 102
Quoted 10 lines
drivers/acpi/acpica/hwregs.c +10
-0+*/ +ACPI_MOVE_64_TO_64 (&address, ®->address); +if (!reg->bit_offset && reg->bit_width && +ACPI_IS_POWER_OF_TWO (reg->bit_width) && +ACPI_IS_ALIGNED (reg->bit_width,8 ) && +ACPI_IS_ALIGNED (address, reg->bit_width)) { +return (reg->bit_width); + }else { +if (reg->space_id ==ACPI_ADR_SPACE_SYSTEM_IO ) { +return (32 );This (together with "... Add access_width/bit_offset support in
acpi_hw_write") breaks Xen guests using older QEMU which doesn't support 4-byte IO accesses.Quoted 6 lines
Quoted 2 lines
Why not return "reg->bit_width?:max_bit_width" ? This will preserve original behavior.
Did you figure out why we get here in the first place, instead of taking the first "return"? I.e. isn't the issue the apparently wrong use of the second
ACPI_IS_ALIGNED()above? Afaict it ought to beACPI_IS_ALIGNED(address, reg->bit_width / 8)...
Quoted 5 lines
We are trying to access address 0x...b004 (PM1a control) so yes, fixing alignment check would probably resolve the problem that we are seeing now.
However, for compatibility purposes we may consider not doing any checks and simply return
bit_widthifaccess_widthis not available.
Interestingly enough I bisected what I thought was a completely different problem to this patch as well.
Something is messed up with 32-bit dom0 booting (so no QEMU) on one machine in my pool. First error that I see is
pcieport 0000:00:02.0: can't find IRQ for PCI INT A; probably buggy
MP table
I'll look at this tomorrow, hopefully.
-boris
Re: [PATCH v2 08/13] ACPICA: Hardware: Add optimized access bit width support
In reply to Boris OstrovskyHi,
Quoted 43 lines
From: Boris Ostrovsky [mailto:[email protected]]
Sent: Friday, May 27, 2016 12:56 AM
Subject: Re: [PATCH v2 08/13] ACPICA: Hardware: Add optimized access bit width supportQuoted 1 line · Jan Beulich
Quoted 1 line
Quoted 1 line
Quoted 1 line
Boris Ostrovsky <[email protected]> 05/25/16 9:17
PM >>>
Quoted 3 lines
Quoted 3 lines · Lv Zheng
Review
Quoted 2 lines
(quoted diff) +2
-0+static u8 +acpi_hw_get_access_bit_width(struct acpi_generic_address *reg, u8
max_bit_width)Quoted 12 lines
Quoted 12 lines
Quoted 12 lines
drivers/acpi/acpica/hwregs.c +12
-0+{ +u64 address; + +if (!reg->access_width) { +/* +* Detect old register descriptors where only the bit_width field +* makes senses. The target address is copied to handle possible +* alignment issues. +*/ +ACPI_MOVE_64_TO_64 (&address, ®->address); + if (!reg->bit_offset && reg->bit_width && + ACPI_IS_POWER_OF_TWO(reg->bit_width) &&Quoted 8 lines
Quoted 8 lines
drivers/acpi/acpica/hwregs.c acpi_hw_write_multiple(u32 value, · line 102
Quoted 6 lines
drivers/acpi/acpica/hwregs.c +6
-0+ ACPI_IS_ALIGNED(reg->bit_width, 8) && + ACPI_IS_ALIGNED(address, reg->bit_width)) { + return (reg->bit_width); + } else { +if (reg->space_id ==ACPI_ADR_SPACE_SYSTEM_IO ) { +return (32 );This (together with "... Add access_width/bit_offset support in
acpi_hw_write") breaks Xen guests using older QEMU which doesn'tsupport
Quoted 5 lines
Quoted 4 lines
4-byte IO accesses.
Why not return "reg->bit_width?:max_bit_width" ? This will preserve original behavior.
Did you figure out why we get here in the first place, instead of taking
the
Quoted 3 lines
first "return"? I.e. isn't the issue the apparently wrong use of the second
ACPI_IS_ALIGNED()above? Afaict it ought to beACPI_IS_ALIGNED(address, reg->bit_width / 8)...
Quoted 7 lines
We are trying to access address 0x...b004 (PM1a control) so yes, fixing alignment check would probably resolve the problem that we are seeing now.
However, for compatibility purposes we may consider not doing any checks
and simply returnbit_widthifaccess_widthis not available.
[Lv Zheng]
There might be GAS defined with AccessWidth = 0.
And its BitOffset can still make senses.
That's why I put the check here, making it a tuning rather than a regression safe check.
Thanks for the information, I'll submit the fix of the address check. To convert it to:ACPI_IS_ALIGNED(address, reg->bit_width / 8)
This is my fault.
Thanks
-Lv
Quoted 3 lines
-boris
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel
RE: [PATCH v2 08/13] ACPICA: Hardware: Add optimized access bit width support
In reply to Boris OstrovskyHi,
Quoted 43 lines
From: Boris Ostrovsky [mailto:[email protected]]
Sent: Friday, May 27, 2016 12:56 AM
Subject: Re: [PATCH v2 08/13] ACPICA: Hardware: Add optimized access bit width supportQuoted 1 line · Jan Beulich
Quoted 1 line
Quoted 1 line
Quoted 1 line
Boris Ostrovsky <[email protected]> 05/25/16 9:17
PM >>>
Quoted 3 lines
Quoted 3 lines · Lv Zheng
Review
Quoted 2 lines
(quoted diff) +2
-0+static u8 +acpi_hw_get_access_bit_width(struct acpi_generic_address *reg, u8
max_bit_width)Quoted 12 lines
Quoted 12 lines
Quoted 12 lines
drivers/acpi/acpica/hwregs.c +12
-0+{ +u64 address; + +if (!reg->access_width) { +/* +* Detect old register descriptors where only the bit_width field +* makes senses. The target address is copied to handle possible +* alignment issues. +*/ +ACPI_MOVE_64_TO_64 (&address, ®->address); + if (!reg->bit_offset && reg->bit_width && + ACPI_IS_POWER_OF_TWO(reg->bit_width) &&Quoted 8 lines
Quoted 8 lines
drivers/acpi/acpica/hwregs.c acpi_hw_write_multiple(u32 value, · line 102
Quoted 6 lines
drivers/acpi/acpica/hwregs.c +6
-0+ ACPI_IS_ALIGNED(reg->bit_width, 8) && + ACPI_IS_ALIGNED(address, reg->bit_width)) { + return (reg->bit_width); + } else { +if (reg->space_id ==ACPI_ADR_SPACE_SYSTEM_IO ) { +return (32 );This (together with "... Add access_width/bit_offset support in
acpi_hw_write") breaks Xen guests using older QEMU which doesn'tsupport
Quoted 5 lines
Quoted 4 lines
4-byte IO accesses.
Why not return "reg->bit_width?:max_bit_width" ? This will preserve original behavior.
Did you figure out why we get here in the first place, instead of taking
the
Quoted 3 lines
first "return"? I.e. isn't the issue the apparently wrong use of the second
ACPI_IS_ALIGNED()above? Afaict it ought to beACPI_IS_ALIGNED(address, reg->bit_width / 8)...
Quoted 7 lines
We are trying to access address 0x...b004 (PM1a control) so yes, fixing alignment check would probably resolve the problem that we are seeing now.
However, for compatibility purposes we may consider not doing any checks
and simply returnbit_widthifaccess_widthis not available.
[Lv Zheng]
There might be GAS defined with AccessWidth = 0.
And its BitOffset can still make senses.
That's why I put the check here, making it a tuning rather than a regression safe check.
Thanks for the information, I'll submit the fix of the address check. To convert it to:ACPI_IS_ALIGNED(address, reg->bit_width / 8)
This is my fault.
Thanks
-Lv
Quoted 3 lines
-boris
Re: [PATCH v2 08/13] ACPICA: Hardware: Add optimized access bit width support
In reply to Boris OstrovskyHi,
Quoted 42 lines
From: Boris Ostrovsky [mailto:[email protected]]
Subject: Re: [PATCH v2 08/13] ACPICA: Hardware: Add optimized access bit width supportQuoted 1 line · Jan Beulich
Quoted 1 line
Quoted 1 line
Quoted 1 line
Boris Ostrovsky <[email protected]> 05/25/16 9:17
PM >>>
Quoted 3 lines
Quoted 3 lines · Lv Zheng
Review
Quoted 2 lines
(quoted diff) +2
-0+static u8 +acpi_hw_get_access_bit_width(struct acpi_generic_address *reg, u8
max_bit_width)Quoted 12 lines
Quoted 12 lines
Quoted 12 lines
drivers/acpi/acpica/hwregs.c +12
-0+{ +u64 address; + +if (!reg->access_width) { +/* +* Detect old register descriptors where only the bit_width field +* makes senses. The target address is copied to handle possible +* alignment issues. +*/ +ACPI_MOVE_64_TO_64 (&address, ®->address); + if (!reg->bit_offset && reg->bit_width && + ACPI_IS_POWER_OF_TWO(reg->bit_width) &&Quoted 8 lines
Quoted 8 lines
drivers/acpi/acpica/hwregs.c acpi_hw_write_multiple(u32 value, · line 102
Quoted 6 lines
drivers/acpi/acpica/hwregs.c +6
-0+ ACPI_IS_ALIGNED(reg->bit_width, 8) && + ACPI_IS_ALIGNED(address, reg->bit_width)) { + return (reg->bit_width); + } else { +if (reg->space_id ==ACPI_ADR_SPACE_SYSTEM_IO ) { +return (32 );This (together with "... Add access_width/bit_offset support in
acpi_hw_write") breaks Xen guests using older QEMU which doesn'tsupport
Quoted 5 lines
Quoted 4 lines
4-byte IO accesses.
Why not return "reg->bit_width?:max_bit_width" ? This will preserve original behavior.
Did you figure out why we get here in the first place, instead of taking
the
Quoted 3 lines
first "return"? I.e. isn't the issue the apparently wrong use of the second
ACPI_IS_ALIGNED()above? Afaict it ought to beACPI_IS_ALIGNED(address, reg->bit_width / 8)...
Quoted 7 lines
We are trying to access address 0x...b004 (PM1a control) so yes, fixing alignment check would probably resolve the problem that we are seeing now.
However, for compatibility purposes we may consider not doing any checks
and simply returnbit_widthifaccess_widthis not available.
[Lv Zheng]
Your solution could result in problems like:
If a GAS is defined with bit_width not a power of 2, and access_width is any (0).
So the correct fix here is to make sure if bit_width is exactly 8,16,32,64, which matches old register descriptors. I added address check here because I want to limit this regression safe check to old register descriptors.
As since the old bit_width can actually reflect the register's access width, the address of the register should always be aligned.
There might be cases that using the new GAS register descriptor format, it is possible to define a GAS that is not aligned, and it's bit_width is exactly 8,16,32,64. We shouldn't make a default access_width decision using bit_width here.
The address check here can help to avoid applying this workaround on such cases.
Thanks and best regards
-Lv
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel
RE: [PATCH v2 08/13] ACPICA: Hardware: Add optimized access bit width support
In reply to Boris OstrovskyHi,
Quoted 42 lines
From: Boris Ostrovsky [mailto:[email protected]]
Subject: Re: [PATCH v2 08/13] ACPICA: Hardware: Add optimized access bit width supportQuoted 1 line · Jan Beulich
Quoted 1 line
Quoted 1 line
Quoted 1 line
Boris Ostrovsky <[email protected]> 05/25/16 9:17
PM >>>
Quoted 3 lines
Quoted 3 lines · Lv Zheng
Review
Quoted 2 lines
(quoted diff) +2
-0+static u8 +acpi_hw_get_access_bit_width(struct acpi_generic_address *reg, u8
max_bit_width)Quoted 12 lines
Quoted 12 lines
Quoted 12 lines
drivers/acpi/acpica/hwregs.c +12
-0+{ +u64 address; + +if (!reg->access_width) { +/* +* Detect old register descriptors where only the bit_width field +* makes senses. The target address is copied to handle possible +* alignment issues. +*/ +ACPI_MOVE_64_TO_64 (&address, ®->address); + if (!reg->bit_offset && reg->bit_width && + ACPI_IS_POWER_OF_TWO(reg->bit_width) &&Quoted 8 lines
Quoted 8 lines
drivers/acpi/acpica/hwregs.c acpi_hw_write_multiple(u32 value, · line 102
Quoted 6 lines
drivers/acpi/acpica/hwregs.c +6
-0+ ACPI_IS_ALIGNED(reg->bit_width, 8) && + ACPI_IS_ALIGNED(address, reg->bit_width)) { + return (reg->bit_width); + } else { +if (reg->space_id ==ACPI_ADR_SPACE_SYSTEM_IO ) { +return (32 );This (together with "... Add access_width/bit_offset support in
acpi_hw_write") breaks Xen guests using older QEMU which doesn'tsupport
Quoted 5 lines
Quoted 4 lines
4-byte IO accesses.
Why not return "reg->bit_width?:max_bit_width" ? This will preserve original behavior.
Did you figure out why we get here in the first place, instead of taking
the
Quoted 3 lines
first "return"? I.e. isn't the issue the apparently wrong use of the second
ACPI_IS_ALIGNED()above? Afaict it ought to beACPI_IS_ALIGNED(address, reg->bit_width / 8)...
Quoted 7 lines
We are trying to access address 0x...b004 (PM1a control) so yes, fixing alignment check would probably resolve the problem that we are seeing now.
However, for compatibility purposes we may consider not doing any checks
and simply returnbit_widthifaccess_widthis not available.
[Lv Zheng]
Your solution could result in problems like:
If a GAS is defined with bit_width not a power of 2, and access_width is any (0).
So the correct fix here is to make sure if bit_width is exactly 8,16,32,64, which matches old register descriptors. I added address check here because I want to limit this regression safe check to old register descriptors.
As since the old bit_width can actually reflect the register's access width, the address of the register should always be aligned.
There might be cases that using the new GAS register descriptor format, it is possible to define a GAS that is not aligned, and it's bit_width is exactly 8,16,32,64. We shouldn't make a default access_width decision using bit_width here.
The address check here can help to avoid applying this workaround on such cases.
Thanks and best regards
-Lv
Re: [PATCH v2 08/13] ACPICA: Hardware: Add optimized access bit width support
Quoted 43 lines · Lv
Hi,
Quoted 41 lines
From: Boris Ostrovsky [mailto:[email protected]]
Subject: Re: [PATCH v2 08/13] ACPICA: Hardware: Add optimized access bit width supportQuoted 1 line · Jan Beulich
Quoted 1 line
Quoted 1 line
Quoted 1 line
Boris Ostrovsky <[email protected]> 05/25/16 9:17
PM >>>
Quoted 3 lines
Quoted 3 lines · Lv Zheng
Review
Quoted 2 lines
(quoted diff) +2
-0+static u8 +acpi_hw_get_access_bit_width(struct acpi_generic_address *reg, u8
max_bit_width)Quoted 12 lines
Quoted 12 lines
Quoted 12 lines
drivers/acpi/acpica/hwregs.c +12
-0+{ +u64 address; + +if (!reg->access_width) { +/* +* Detect old register descriptors where only the bit_width field +* makes senses. The target address is copied to handle possible +* alignment issues. +*/ +ACPI_MOVE_64_TO_64 (&address, ®->address); + if (!reg->bit_offset && reg->bit_width && + ACPI_IS_POWER_OF_TWO(reg->bit_width) &&Quoted 8 lines
Quoted 8 lines
drivers/acpi/acpica/hwregs.c acpi_hw_write_multiple(u32 value, · line 102
Quoted 6 lines
drivers/acpi/acpica/hwregs.c +6
-0+ ACPI_IS_ALIGNED(reg->bit_width, 8) && + ACPI_IS_ALIGNED(address, reg->bit_width)) { + return (reg->bit_width); + } else { +if (reg->space_id ==ACPI_ADR_SPACE_SYSTEM_IO ) { +return (32 );This (together with "... Add access_width/bit_offset support in
acpi_hw_write") breaks Xen guests using older QEMU which doesn'tsupport
Quoted 5 lines
Quoted 4 lines
4-byte IO accesses.
Why not return "reg->bit_width?:max_bit_width" ? This will preserve original behavior.
Did you figure out why we get here in the first place, instead of taking
the
Quoted 3 lines
first "return"? I.e. isn't the issue the apparently wrong use of the second
ACPI_IS_ALIGNED()above? Afaict it ought to beACPI_IS_ALIGNED(address, reg->bit_width / 8)...
Quoted 8 lines
Quoted 7 lines
We are trying to access address 0x...b004 (PM1a control) so yes, fixing alignment check would probably resolve the problem that we are seeing now.
However, for compatibility purposes we may consider not doing any checks
and simply returnbit_widthifaccess_widthis not available.[Lv Zheng]
Your patch from earlier does resolve both issues, thanks.
Quoted 9 lines
Your solution could result in problems like:
If a GAS is defined withbit_widthnot a power of 2, andaccess_widthis any (0).So the correct fix here is to make sure if
bit_widthis exactly 8,16,32,64, which matches old register descriptors. I added address check here because I want to limit this regression safe check to old register descriptors.
As since the oldbit_widthcan actually reflect the register's access width, the address of the register should always be aligned.There might be cases that using the new GAS register descriptor format, it is possible to define a GAS that is not aligned, and it's
bit_widthis exactly 8,16,32,64. We shouldn't make a defaultaccess_widthdecision usingbit_widthhere.
True. But OTOH switching to 32-bit accesses may result in us suddenly trying to touch bytes we haven't accessed before.
-boris
Quoted 4 lines
The address check here can help to avoid applying this workaround on such cases.
Thanks and best regards
-Lv
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel
Re: [PATCH v2 08/13] ACPICA: Hardware: Add optimized access bit width support
In reply to Zheng, LvQuoted 43 lines · Lv
Hi,
Quoted 41 lines
From: Boris Ostrovsky [mailto:[email protected]]
Subject: Re: [PATCH v2 08/13] ACPICA: Hardware: Add optimized access bit width supportQuoted 1 line · Jan Beulich
Quoted 1 line
Quoted 1 line
Quoted 1 line
Boris Ostrovsky <[email protected]> 05/25/16 9:17
PM >>>
Quoted 3 lines
Quoted 3 lines · Lv Zheng
Review
Quoted 2 lines
(quoted diff) +2
-0+static u8 +acpi_hw_get_access_bit_width(struct acpi_generic_address *reg, u8
max_bit_width)Quoted 12 lines
Quoted 12 lines
Quoted 12 lines
drivers/acpi/acpica/hwregs.c +12
-0+{ +u64 address; + +if (!reg->access_width) { +/* +* Detect old register descriptors where only the bit_width field +* makes senses. The target address is copied to handle possible +* alignment issues. +*/ +ACPI_MOVE_64_TO_64 (&address, ®->address); + if (!reg->bit_offset && reg->bit_width && + ACPI_IS_POWER_OF_TWO(reg->bit_width) &&Quoted 8 lines
Quoted 8 lines
drivers/acpi/acpica/hwregs.c acpi_hw_write_multiple(u32 value, · line 102
Quoted 6 lines
drivers/acpi/acpica/hwregs.c +6
-0+ ACPI_IS_ALIGNED(reg->bit_width, 8) && + ACPI_IS_ALIGNED(address, reg->bit_width)) { + return (reg->bit_width); + } else { +if (reg->space_id ==ACPI_ADR_SPACE_SYSTEM_IO ) { +return (32 );This (together with "... Add access_width/bit_offset support in
acpi_hw_write") breaks Xen guests using older QEMU which doesn'tsupport
Quoted 5 lines
Quoted 4 lines
4-byte IO accesses.
Why not return "reg->bit_width?:max_bit_width" ? This will preserve original behavior.
Did you figure out why we get here in the first place, instead of taking
the
Quoted 3 lines
first "return"? I.e. isn't the issue the apparently wrong use of the second
ACPI_IS_ALIGNED()above? Afaict it ought to beACPI_IS_ALIGNED(address, reg->bit_width / 8)...
Quoted 8 lines
Quoted 7 lines
We are trying to access address 0x...b004 (PM1a control) so yes, fixing alignment check would probably resolve the problem that we are seeing now.
However, for compatibility purposes we may consider not doing any checks
and simply returnbit_widthifaccess_widthis not available.[Lv Zheng]
Your patch from earlier does resolve both issues, thanks.
Quoted 9 lines
Your solution could result in problems like:
If a GAS is defined withbit_widthnot a power of 2, andaccess_widthis any (0).So the correct fix here is to make sure if
bit_widthis exactly 8,16,32,64, which matches old register descriptors. I added address check here because I want to limit this regression safe check to old register descriptors.
As since the oldbit_widthcan actually reflect the register's access width, the address of the register should always be aligned.There might be cases that using the new GAS register descriptor format, it is possible to define a GAS that is not aligned, and it's
bit_widthis exactly 8,16,32,64. We shouldn't make a defaultaccess_widthdecision usingbit_widthhere.
True. But OTOH switching to 32-bit accesses may result in us suddenly trying to touch bytes we haven't accessed before.
-boris
Quoted 4 lines
The address check here can help to avoid applying this workaround on such cases.
Thanks and best regards
-Lv
RE: [PATCH v2 08/13] ACPICA: Hardware: Add optimized access bit width support
In reply to Boris OstrovskyHi,
Quoted 97 lines
From: [email protected] [mailto:linux-acpi- [email protected]] On Behalf Of Boris Ostrovsky
Sent: Thursday, May 26, 2016 3:17 AM
Subject: Re: [PATCH v2 08/13] ACPICA: Hardware: Add optimized access bit width supportQuoted 10 lines · Lv Zheng
ACPICA commit
c49a751b4dae7baec1790748a2b4b6e8ab599f51For Access Size = 0, it actually can use user expected access bit width. This patch implements this.
Besides of the ACPICA upstream commit, this patch also includes a fix fixing the issue reported by the FreeBSD community.
The old register descriptors are translated inacpi_tb_init_generic_address()withaccess_widthbeing filled with 0. This breaks code inacpi_hw_get_access_bit_width()when the registers are 16-bit IO ports andtheir
Quoted 2 lines
bit_widthfields are filled with 16. The rapid fix is meant to make code written foracpi_hw_get_access_bit_width()regression safer before the issueis
Quoted 2 lines
correctly fixed from
acpi_tb_init_generic_address(). Reported by John Baldwin <[email protected]>, fixed by Lv Zheng <[email protected]>,tested
Quoted 9 lines
by Jung-uk Kim <[email protected]>.
Tested-by Jung-uk Kim <[email protected]>.
Signed-off-by Lv Zheng <[email protected]>Signed-off-by Bob Moore <[email protected]>--- drivers/acpi/acpica/hwregs.c | 49++++++++++++++++++++++++++++++++++++++++--
Quoted 18 lines
1 file changed, 47 insertions(+), 2 deletions(-)drivers/acpi/acpica/hwregs.c +4
-0@@ -51,6 +51,10 @@ ACPI_MODULE_NAME("hwregs")#if (!ACPI_REDUCED_HARDWARE )/* Local Prototypes */ +static u8 +acpi_hw_get_access_bit_width (struct acpi_generic_address *reg, +u8 max_bit_width); + static acpi_status acpi_hw_read_multiple(u32 *value, struct acpi_generic_address *register_a,drivers/acpi/acpica/hwregs.c acpi_hw_write_multiple(u32 value, · line 70
Quoted 2 lines
drivers/acpi/acpica/hwregs.c +0
-0@@ -65,6 +69,48 @@ acpi_hw_write_multiple(u32 value,/***************************************************************
***************drivers/acpi/acpica/hwregs.c acpi_hw_write_multiple(u32 value, · line 82
Quoted 11 lines
drivers/acpi/acpica/hwregs.c +10
-0* +* FUNCTION: acpi_hw_get_access_bit_width +* +* PARAMETERS: reg - GAS register structure +* max_bit_width - Max bit_width supported (32 or 64) +* +* RETURN: Status +* +* DESCRIPTION: Obtain optimal access bit width +* +****************************************************************
**************/drivers/acpi/acpica/hwregs.c acpi_hw_write_multiple(u32 value,
Quoted 3 lines
drivers/acpi/acpica/hwregs.c +3
-0+ +static u8 +acpi_hw_get_access_bit_width(struct acpi_generic_address *reg, u8
max_bit_width)drivers/acpi/acpica/hwregs.c acpi_hw_write_multiple(u32 value,
Quoted 7 lines
drivers/acpi/acpica/hwregs.c +7
-0+{ +u64 address; + +if (!reg->access_width) { +/* +* Detect old register descriptors where only the bit_width field +* makes senses. The target address is copied to handle possible
drivers/acpi/acpica/hwregs.c acpi_hw_write_multiple(u32 value, · line 102
Quoted 11 lines
drivers/acpi/acpica/hwregs.c +11
-0+* alignment issues. +*/ +ACPI_MOVE_64_TO_64 (&address, ®->address); +if (!reg->bit_offset && reg->bit_width && +ACPI_IS_POWER_OF_TWO (reg->bit_width) && +ACPI_IS_ALIGNED (reg->bit_width,8 ) && +ACPI_IS_ALIGNED (address, reg->bit_width)) { +return (reg->bit_width); + }else { +if (reg->space_id ==ACPI_ADR_SPACE_SYSTEM_IO ) { +return (32 );This (together with "... Add access_width/bit_offset support in
acpi_hw_write") breaks Xen guests using older QEMU which doesn't support 4-byte IO accesses.
Quoted 2 lines
Why not return "reg->bit_width?:max_bit_width" ? This will preserve original behavior.
[Lv Zheng]
Let me ask 2 questions:
A. Was this a bug of the older qemu?
If so, you only need a quirk mechanism for old qemu to work. And it would be better to provide the quirk inside of the older qemu.
B. Could you provide the detailed register description?
The case I saw from the freebsd community around the qemu is a bit_width = 16 case. Which is a conversion result of acpi_tb_init_generic_address().
Thus:
1. reg->access_width is always 0
2. reg->bit_offset is always 0
3. reg->bit_width is either 8 or 16
So they can be covered by this check:
if (reg->access_width) {
if (!reg->bit_offset && reg->bit_width &&
ACPI_IS_POWER_OF_TWO(reg->bit_width) &&
ACPI_IS_ALIGNED(reg->bit_width, 8))I just enhanced it with the address check: ACPI_IS_ALIGNED(address, reg->bit_width)
For your case, what the values of "address/access_width" are? Can it be fixed by:
1. Either removing ACPI_IS_ALIGNED(address, reg->bit_width), or
2. moving the entire check out of if (!reg->access_width) to form:
if (!reg->bit_offset && reg->bit_width &&
ACPI_IS_POWER_OF_TWO(reg->bit_width) &&
ACPI_IS_ALIGNED(reg->bit_width, 8) &&
ACPI_IS_ALIGNED(address, reg->bit_width)) {
return (reg->bit_width);
} else if (reg->access_width) {
return (1 << (reg->access_width + 2));
} else {
if (reg->space_id == ACPI_ADR_SPACE_SYSTEM_IO) {
return (32);
} else {
return (max_bit_width);
}
}Thanks
-Lv
Quoted 36 lines
-boris
drivers/acpi/acpica/hwregs.c acpi_hw_write_multiple(u32 value,
Quoted 10 lines
drivers/acpi/acpica/hwregs.c +9
-0+ }else { +return (max_bit_width); + } + } + }else { +return (1 << (reg->access_width +2 )); + } +} ++/**************************************************************
****************drivers/acpi/acpica/hwregs.c acpi_hw_validate_register(struct
Quoted 5 lines
drivers/acpi/acpica/hwregs.c +1
-0+* * FUNCTION: acpi_hw_validate_register * * PARAMETERS: reg - GAS register structure @@ -122,8 +168,7 @@ acpi_hw_validate_register(struct
acpi_generic_address*reg,drivers/acpi/acpica/hwregs.c acpi_hw_validate_register(struct acpi_generic_address *reg, · line 174
Quoted 9 lines
drivers/acpi/acpica/hwregs.c +1
-2/* Validate the bit_width, convert access_width into number of bits */ - access_width = reg->access_width ? reg->access_width :1 ; - access_width =1 << (access_width +2 ); + access_width =acpi_hw_get_access_bit_width (reg, max_bit_width); bit_width =ACPI_ROUND_UP (reg->bit_offset + reg->bit_width, access_width);if (max_bit_width < bit_width) {--
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH v2 08/13] ACPICA: Hardware: Add optimized access bit width support
In reply to Boris OstrovskyHi,
Quoted 97 lines
From: [email protected] [mailto:linux-acpi- [email protected]] On Behalf Of Boris Ostrovsky
Sent: Thursday, May 26, 2016 3:17 AM
Subject: Re: [PATCH v2 08/13] ACPICA: Hardware: Add optimized access bit width supportQuoted 10 lines · Lv Zheng
ACPICA commit
c49a751b4dae7baec1790748a2b4b6e8ab599f51For Access Size = 0, it actually can use user expected access bit width. This patch implements this.
Besides of the ACPICA upstream commit, this patch also includes a fix fixing the issue reported by the FreeBSD community.
The old register descriptors are translated inacpi_tb_init_generic_address()withaccess_widthbeing filled with 0. This breaks code inacpi_hw_get_access_bit_width()when the registers are 16-bit IO ports andtheir
Quoted 2 lines
bit_widthfields are filled with 16. The rapid fix is meant to make code written foracpi_hw_get_access_bit_width()regression safer before the issueis
Quoted 2 lines
correctly fixed from
acpi_tb_init_generic_address(). Reported by John Baldwin <[email protected]>, fixed by Lv Zheng <[email protected]>,tested
Quoted 9 lines
by Jung-uk Kim <[email protected]>.
Tested-by Jung-uk Kim <[email protected]>.
Signed-off-by Lv Zheng <[email protected]>Signed-off-by Bob Moore <[email protected]>--- drivers/acpi/acpica/hwregs.c | 49++++++++++++++++++++++++++++++++++++++++--
Quoted 18 lines
1 file changed, 47 insertions(+), 2 deletions(-)drivers/acpi/acpica/hwregs.c +4
-0@@ -51,6 +51,10 @@ ACPI_MODULE_NAME("hwregs")#if (!ACPI_REDUCED_HARDWARE )/* Local Prototypes */ +static u8 +acpi_hw_get_access_bit_width (struct acpi_generic_address *reg, +u8 max_bit_width); + static acpi_status acpi_hw_read_multiple(u32 *value, struct acpi_generic_address *register_a,drivers/acpi/acpica/hwregs.c acpi_hw_write_multiple(u32 value, · line 70
Quoted 2 lines
drivers/acpi/acpica/hwregs.c +0
-0@@ -65,6 +69,48 @@ acpi_hw_write_multiple(u32 value,/***************************************************************
***************drivers/acpi/acpica/hwregs.c acpi_hw_write_multiple(u32 value, · line 82
Quoted 11 lines
drivers/acpi/acpica/hwregs.c +10
-0* +* FUNCTION: acpi_hw_get_access_bit_width +* +* PARAMETERS: reg - GAS register structure +* max_bit_width - Max bit_width supported (32 or 64) +* +* RETURN: Status +* +* DESCRIPTION: Obtain optimal access bit width +* +****************************************************************
**************/drivers/acpi/acpica/hwregs.c acpi_hw_write_multiple(u32 value,
Quoted 3 lines
drivers/acpi/acpica/hwregs.c +3
-0+ +static u8 +acpi_hw_get_access_bit_width(struct acpi_generic_address *reg, u8
max_bit_width)drivers/acpi/acpica/hwregs.c acpi_hw_write_multiple(u32 value,
Quoted 7 lines
drivers/acpi/acpica/hwregs.c +7
-0+{ +u64 address; + +if (!reg->access_width) { +/* +* Detect old register descriptors where only the bit_width field +* makes senses. The target address is copied to handle possible
drivers/acpi/acpica/hwregs.c acpi_hw_write_multiple(u32 value, · line 102
Quoted 11 lines
drivers/acpi/acpica/hwregs.c +11
-0+* alignment issues. +*/ +ACPI_MOVE_64_TO_64 (&address, ®->address); +if (!reg->bit_offset && reg->bit_width && +ACPI_IS_POWER_OF_TWO (reg->bit_width) && +ACPI_IS_ALIGNED (reg->bit_width,8 ) && +ACPI_IS_ALIGNED (address, reg->bit_width)) { +return (reg->bit_width); + }else { +if (reg->space_id ==ACPI_ADR_SPACE_SYSTEM_IO ) { +return (32 );This (together with "... Add access_width/bit_offset support in
acpi_hw_write") breaks Xen guests using older QEMU which doesn't support 4-byte IO accesses.
Quoted 2 lines
Why not return "reg->bit_width?:max_bit_width" ? This will preserve original behavior.
[Lv Zheng]
Let me ask 2 questions:
A. Was this a bug of the older qemu?
If so, you only need a quirk mechanism for old qemu to work. And it would be better to provide the quirk inside of the older qemu.
B. Could you provide the detailed register description?
The case I saw from the freebsd community around the qemu is a bit_width = 16 case. Which is a conversion result of acpi_tb_init_generic_address().
Thus:
1. reg->access_width is always 0
2. reg->bit_offset is always 0
3. reg->bit_width is either 8 or 16
So they can be covered by this check:
if (reg->access_width) {
if (!reg->bit_offset && reg->bit_width &&
ACPI_IS_POWER_OF_TWO(reg->bit_width) &&
ACPI_IS_ALIGNED(reg->bit_width, 8))I just enhanced it with the address check: ACPI_IS_ALIGNED(address, reg->bit_width)
For your case, what the values of "address/access_width" are? Can it be fixed by:
1. Either removing ACPI_IS_ALIGNED(address, reg->bit_width), or
2. moving the entire check out of if (!reg->access_width) to form:
if (!reg->bit_offset && reg->bit_width &&
ACPI_IS_POWER_OF_TWO(reg->bit_width) &&
ACPI_IS_ALIGNED(reg->bit_width, 8) &&
ACPI_IS_ALIGNED(address, reg->bit_width)) {
return (reg->bit_width);
} else if (reg->access_width) {
return (1 << (reg->access_width + 2));
} else {
if (reg->space_id == ACPI_ADR_SPACE_SYSTEM_IO) {
return (32);
} else {
return (max_bit_width);
}
}Thanks
-Lv
Quoted 24 lines
-boris
drivers/acpi/acpica/hwregs.c acpi_hw_write_multiple(u32 value,
Quoted 10 lines
drivers/acpi/acpica/hwregs.c +9
-0+ }else { +return (max_bit_width); + } + } + }else { +return (1 << (reg->access_width +2 )); + } +} ++/**************************************************************
****************drivers/acpi/acpica/hwregs.c acpi_hw_validate_register(struct
Quoted 5 lines
drivers/acpi/acpica/hwregs.c +1
-0+* * FUNCTION: acpi_hw_validate_register * * PARAMETERS: reg - GAS register structure @@ -122,8 +168,7 @@ acpi_hw_validate_register(struct
acpi_generic_address*reg,Quoted 3 lines
drivers/acpi/acpica/hwregs.c +0
-0/* Validate the bit_width, convert access_width into number of bits */
Quoted 12 lines
drivers/acpi/acpica/hwregs.c acpi_hw_validate_register(struct acpi_generic_address *reg, · line 174
Quoted 6 lines
drivers/acpi/acpica/hwregs.c +1
-2- access_width = reg->access_width ? reg->access_width :1 ; - access_width =1 << (access_width +2 ); + access_width =acpi_hw_get_access_bit_width (reg, max_bit_width); bit_width =ACPI_ROUND_UP (reg->bit_offset + reg->bit_width, access_width);if (max_bit_width < bit_width) {--
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel
PATCH v2 9/13 ACPICA: Executer: Introduce a set of macros to handle bit width mask generation
In reply to Lv ZhengACPICA commit c23034a3a09d5ed79f1827d51f43cfbccf68ab64
A regression was reported to the shift offset >= width of type. This patch fixes this issue. BZ 1270.
This is a part of the fix because the order of the patches are modified for Linux upstream, containing the cleanups for the old code. Lv Zheng.
--- drivers/acpi/acpica/acmacros.h | 12 ++++++++++++ drivers/acpi/acpica/exfldio.c | 12 ++---------- 2 files changed, 14 insertions(+), 10 deletions(-)
drivers/acpi/acpica/acmacros.h +12 -0
@@ -270,9 +270,21 @@* Bit positions start at zero. * MASK_BITS_ABOVE creates a mask starting AT the position and above * MASK_BITS_BELOW creates a mask starting one bit BELOW the position +* MASK_BITS_ABOVE/BELOW accpets a bit offset to create a mask +* MASK_BITS_ABOVE/BELOW_32/64 accpets a bit width to create a mask +* Note: The ACPI_INTEGER_BIT_SIZE check is used to bypass compiler +* differences with the shift operator */ #define ACPI_MASK_BITS_ABOVE (position) (~((ACPI_UINT64_MAX) << ((u32) (position))))#define ACPI_MASK_BITS_BELOW (position) ((ACPI_UINT64_MAX) << ((u32) (position))) +#define ACPI_MASK_BITS_ABOVE_32 (width) ((u32) ACPI_MASK_BITS_ABOVE(width)) +#define ACPI_MASK_BITS_BELOW_32 (width) ((u32) ACPI_MASK_BITS_BELOW(width)) +#define ACPI_MASK_BITS_ABOVE_64 (width) ((width) == ACPI_INTEGER_BIT_SIZE ? \ + ACPI_UINT64_MAX : \ + ACPI_MASK_BITS_ABOVE(width)) +#define ACPI_MASK_BITS_BELOW_64 (width) ((width) == ACPI_INTEGER_BIT_SIZE ? \ + (u64) 0 : \ + ACPI_MASK_BITS_BELOW(width))/* Bitfields within ACPI registers */
drivers/acpi/acpica/exfldio.c +2 -10
@@ -897,17 +897,9 @@ acpi_ex_insert_into_field(union acpi_operand_object *obj_desc, access_bit_width =ACPI_MUL_8 (obj_desc->common_field.access_byte_width); -/* -* Create the bitmasks used for bit insertion. -* Note: This if/else is used to bypass compiler differences with the -* shift operator -*/ -if (access_bit_width ==ACPI_INTEGER_BIT_SIZE ) { - width_mask =ACPI_UINT64_MAX ; - }else { - width_mask =ACPI_MASK_BITS_ABOVE (access_bit_width); - } +/* Create the bitmasks used for bit insertion */ + width_mask =ACPI_MASK_BITS_ABOVE_64 (access_bit_width); mask = width_mask &ACPI_MASK_BITS_BELOW (obj_desc->common_field.start_field_bit_offset);
Signature · 1 line
1.7.10
PATCH v2 10/13 ACPICA: ACPI 2.0, Hardware: Add access_width/bit_offset support in acpi_hw_read()
In reply to Lv ZhengACPICA commit 96ece052d4d073aae4f935f0ff0746646aea1174 ACPICA commit 3d8583a054e410f2ea4d73b48986facad9cfc0d4
This patch adds access_width/bit_offset support in acpi_hw_read(). This also enables GAS definition where bit_width is not a power of two. Lv Zheng.
--- drivers/acpi/acpica/hwregs.c | 75 ++++++++++++++++++++++++++++++++++-------- 1 file changed, 62 insertions(+), 13 deletions(-)
drivers/acpi/acpica/hwregs.c +62 -13
@@ -195,17 +195,19 @@ acpi_hw_validate_register(struct acpi_generic_address *reg,* 64-bit values is not needed. * * LIMITATIONS: <These limitations also apply to acpi_hw_write> -* bit_width must be exactly 8, 16, or 32. * space_ID must be system_memory or system_IO. -* bit_offset and access_width are currently ignored, as there has -* not been a need to implement these. * ******************************************************************************/ acpi_status acpi_hw_read (u32 *value,struct acpi_generic_address *reg) {u64 address; +u8 access_width; +u32 bit_width; +u8 bit_offset;u64 value64; +u32 value32; +u8 index;acpi_status status;ACPI_FUNCTION_NAME (hw_read);
@@ -217,28 +219,75 @@ acpi_status acpi_hw_read(u32 *value, struct acpi_generic_address *reg)return (status); } -/* Initialize entire 32-bit return value to zero */ - +/* +* Initialize entire 32-bit return value to zero, convert access_width +* into number of bits based +*/ *value =0 ; + access_width =acpi_hw_get_access_bit_width (reg,32 ); + bit_width = reg->bit_offset + reg->bit_width; + bit_offset = reg->bit_offset;/* * Two address spaces supported: Memory or IO. PCI_Config is * not supported here because the GAS structure is insufficient */ -if (reg->space_id ==ACPI_ADR_SPACE_SYSTEM_MEMORY ) { - status =acpi_os_read_memory ((acpi_physical_address ) - address, &value64, reg->bit_width); + index =0 ; +while (bit_width) { +if (bit_offset >= access_width) { + value32 =0 ; + bit_offset -= access_width; + }else { +if (reg->space_id ==ACPI_ADR_SPACE_SYSTEM_MEMORY ) { + status = +acpi_os_read_memory ((acpi_physical_address ) + address + + index * +ACPI_DIV_8 + (access_width), + &value64, access_width); + value32 = (u32 )value64; + }else {/* ACPI_ADR_SPACE_SYSTEM_IO, validated earlier */ + + status =acpi_hw_read_port ((acpi_io_address ) + address + + index * +ACPI_DIV_8 + (access_width), + &value32, + access_width); + } - *value = (u32 )value64; - }else {/* ACPI_ADR_SPACE_SYSTEM_IO, validated earlier */ +/* +* Use offset style bit masks because: +* bit_offset < access_width/bit_width < access_width, and +* access_width is ensured to be less than 32-bits by +* acpi_hw_validate_register(). +*/ +if (bit_offset) { + value32 &=ACPI_MASK_BITS_BELOW (bit_offset); + bit_offset =0 ; + } +if (bit_width < access_width) { + value32 &=ACPI_MASK_BITS_ABOVE (bit_width); + } + } + +/* +* Use offset style bit writes because "Index * AccessWidth" is +* ensured to be less than 32-bits by acpi_hw_validate_register(). +*/ +ACPI_SET_BITS (value, index * access_width, +ACPI_MASK_BITS_ABOVE_32 (access_width), value32); - status =acpi_hw_read_port ((acpi_io_address ) - address, value, reg->bit_width); + bit_width -= + bit_width > access_width ? access_width : bit_width; + index++; }ACPI_DEBUG_PRINT ((ACPI_DB_IO ,"Read: %8.8X width %2d from %8.8X%8.8X (%s)\n" , - *value, reg->bit_width,ACPI_FORMAT_UINT64 (address), + *value, access_width,ACPI_FORMAT_UINT64 (address),acpi_ut_get_region_name (reg->space_id)));return (status);
Signature · 1 line
1.7.10
PATCH v2 11/13 ACPICA: ACPI 2.0, Hardware: Add access_width/bit_offset support for acpi_hw_write()
In reply to Lv ZhengACPICA commit 48eea5e7993ccb7189bd63cd726e02adafee6057
This patch adds access_width/bit_offset support in acpi_hw_write(). Lv Zheng.
--- drivers/acpi/acpica/hwregs.c | 146 +++++++++++++++++++++++++++++++++++++++--- 1 file changed, 137 insertions(+), 9 deletions(-)
drivers/acpi/acpica/hwregs.c +137 -9
@@ -311,6 +311,12 @@ acpi_status acpi_hw_read(u32 *value, struct acpi_generic_address *reg)acpi_status acpi_hw_write (u32 value,struct acpi_generic_address *reg) {u64 address; +u8 access_width; +u32 bit_width; +u8 bit_offset; +u64 value64; +u32 new_value32, old_value32; +u8 index;acpi_status status;ACPI_FUNCTION_NAME (hw_write);
@@ -322,23 +328,145 @@ acpi_status acpi_hw_write(u32 value, struct acpi_generic_address *reg)return (status); } +/* Convert access_width into number of bits based */ + + access_width =acpi_hw_get_access_bit_width (reg,32 ); + bit_width = reg->bit_offset + reg->bit_width; + bit_offset = reg->bit_offset; +/* * Two address spaces supported: Memory or IO. PCI_Config is * not supported here because the GAS structure is insufficient */ -if (reg->space_id ==ACPI_ADR_SPACE_SYSTEM_MEMORY ) { - status =acpi_os_write_memory ((acpi_physical_address ) - address, (u64 )value, - reg->bit_width); - }else {/* ACPI_ADR_SPACE_SYSTEM_IO, validated earlier */ - - status =acpi_hw_write_port ((acpi_io_address ) - address, value, reg->bit_width); + index =0 ; +while (bit_width) { +/* +* Use offset style bit reads because "Index * AccessWidth" is +* ensured to be less than 32-bits by acpi_hw_validate_register(). +*/ + new_value32 =ACPI_GET_BITS (&value, index * access_width, +ACPI_MASK_BITS_ABOVE_32 + (access_width)); + +if (bit_offset >= access_width) { + bit_offset -= access_width; + }else { +/* +* Use offset style bit masks because access_width is ensured +* to be less than 32-bits by acpi_hw_validate_register() and +* bit_offset/bit_width is less than access_width here. +*/ +if (bit_offset) { + new_value32 &=ACPI_MASK_BITS_BELOW (bit_offset); + } +if (bit_width < access_width) { + new_value32 &=ACPI_MASK_BITS_ABOVE (bit_width); + } + +if (reg->space_id ==ACPI_ADR_SPACE_SYSTEM_MEMORY ) { +if (bit_offset || bit_width < access_width) { +/* +* Read old values in order not to modify the bits that +* are beyond the register bit_width/bit_offset setting. +*/ + status = +acpi_os_read_memory ((acpi_physical_address ) + address + + index * +ACPI_DIV_8 + (access_width), + &value64, + access_width); + old_value32 = (u32 )value64; + +/* +* Use offset style bit masks because access_width is +* ensured to be less than 32-bits by +* acpi_hw_validate_register() and bit_offset/bit_width is +* less than access_width here. +*/ +if (bit_offset) { + old_value32 &= +ACPI_MASK_BITS_ABOVE + (bit_offset); + bit_offset =0 ; + } +if (bit_width < access_width) { + old_value32 &= +ACPI_MASK_BITS_BELOW + (bit_width); + } + + new_value32 |= old_value32; + } + + value64 = (u64 )new_value32; + status = +acpi_os_write_memory ((acpi_physical_address ) + address + + index * +ACPI_DIV_8 + (access_width), + value64, access_width); + }else {/* ACPI_ADR_SPACE_SYSTEM_IO, validated earlier */ + +if (bit_offset || bit_width < access_width) { +/* +* Read old values in order not to modify the bits that +* are beyond the register bit_width/bit_offset setting. +*/ + status = +acpi_hw_read_port ((acpi_io_address ) + address + + index * +ACPI_DIV_8 + (access_width), + &old_value32, + access_width); + +/* +* Use offset style bit masks because access_width is +* ensured to be less than 32-bits by +* acpi_hw_validate_register() and bit_offset/bit_width is +* less than access_width here. +*/ +if (bit_offset) { + old_value32 &= +ACPI_MASK_BITS_ABOVE + (bit_offset); + bit_offset =0 ; + } +if (bit_width < access_width) { + old_value32 &= +ACPI_MASK_BITS_BELOW + (bit_width); + } + + new_value32 |= old_value32; + } + + status =acpi_hw_write_port ((acpi_io_address ) + address + + index * +ACPI_DIV_8 + (access_width), + new_value32, + access_width); + } + } + +/* +* Index * access_width is ensured to be less than 32-bits by +* acpi_hw_validate_register(). +*/ + bit_width -= + bit_width > access_width ? access_width : bit_width; + index++; }ACPI_DEBUG_PRINT ((ACPI_DB_IO ,"Wrote: %8.8X width %2d to %8.8X%8.8X (%s)\n" , - value, reg->bit_width,ACPI_FORMAT_UINT64 (address), + value, access_width,ACPI_FORMAT_UINT64 (address),acpi_ut_get_region_name (reg->space_id)));return (status);
Signature · 1 line
1.7.10
PATCH v2 12/13 ACPICA: Move all ASCII utilities to a common file
In reply to Lv ZhengFrom: Bob Moore <[email protected]>
ACPICA commit ba60e4500053010bf775d58f6f61febbdb94d817
New file is utascii.c
--- drivers/acpi/acpica/Makefile | 1 + drivers/acpi/acpica/actables.h | 2 - drivers/acpi/acpica/acutils.h | 13 ++- drivers/acpi/acpica/dbnames.c | 2 +- drivers/acpi/acpica/exnames.c | 2 +- drivers/acpi/acpica/tbdata.c | 6 +- drivers/acpi/acpica/tbfind.c | 2 +- drivers/acpi/acpica/tbinstal.c | 6 +- drivers/acpi/acpica/tbutils.c | 27 ------ drivers/acpi/acpica/utascii.c | 140 ++++++++++++++++++++++++++++++ drivers/acpi/acpica/utstring.c | 69 +-------------- tools/power/acpi/tools/acpidump/Makefile | 1 + tools/power/acpi/tools/acpidump/apdump.c | 8 +- 13 files changed, 168 insertions(+), 111 deletions(-) create mode 100644 drivers/acpi/acpica/utascii.c
drivers/acpi/acpica/Makefile +1 -0
@@ -150,6 +150,7 @@ acpi-y += \ acpi-y += \ utaddress.o \ utalloc.o \ + utascii.o \ utbuffer.o \ utcopy.o \ utexcep.o \
drivers/acpi/acpica/actables.h +0 -2
@@ -161,8 +161,6 @@ acpi_tb_install_fixed_table(acpi_physical_address address,acpi_status acpi_tb_parse_root_table (acpi_physical_address rsdp_address); -u8 acpi_is_valid_signature (char *signature); -/* * tbxfload */
drivers/acpi/acpica/acutils.h +9 -4
@@ -167,6 +167,15 @@ struct acpi_pkg_info {#define DB_QWORD_DISPLAY 8/* +* utascii - ASCII utilities +*/ +u8 acpi_ut_valid_nameseg (char *signature); + +u8 acpi_ut_valid_name_char (char character,u32 position); + +void acpi_ut_check_and_repair_ascii (u8 *name,char *repaired_name,u32 count); + +/* * utnonansi - Non-ANSI C library functions */ void acpi_ut_strupr (char *src_string);
@@ -579,10 +588,6 @@ void acpi_ut_print_string(char *string, u16 max_length);void ut_convert_backslashes (char *pathname);#endif -u8 acpi_ut_valid_acpi_name (char *name); - -u8 acpi_ut_valid_acpi_char (char character,u32 position); -void acpi_ut_repair_name (char *name);#if defined (ACPI_DEBUGGER ) || defined (ACPI_APPLICATION )
drivers/acpi/acpica/dbnames.c +1 -1
@@ -709,7 +709,7 @@ acpi_db_integrity_walk(acpi_handle obj_handle,return (AE_OK ); } -if (!acpi_ut_valid_acpi_name (node->name.ascii)) { +if (!acpi_ut_valid_nameseg (node->name.ascii)) {acpi_os_printf ("Invalid AcpiName for Node %p\n" , node);return (AE_OK ); }
drivers/acpi/acpica/exnames.c +1 -1
@@ -178,7 +178,7 @@ static acpi_status acpi_ex_name_segment(u8 ** in_aml_address, char *name_string)for (index =0 ; (index <ACPI_NAME_SIZE ) - && (acpi_ut_valid_acpi_char (*aml_address,0 )); index++) { + && (acpi_ut_valid_name_char (*aml_address,0 )); index++) { char_buf[index] = *aml_address++;ACPI_DEBUG_PRINT ((ACPI_DB_LOAD ,"%c\n" , char_buf[index])); }
drivers/acpi/acpica/tbdata.c +3 -3
@@ -401,9 +401,9 @@ acpi_tb_verify_temp_table(struct acpi_table_desc *table_desc, char *signature)ACPI_EXCEPTION ((AE_INFO ,AE_NO_MEMORY ,"%4.4s 0x%8.8X%8.8X" " Attempted table install failed" , -acpi_ut_valid_acpi_name (table_desc-> - signature. - ascii) ? +acpi_ut_valid_nameseg (table_desc-> + signature. + ascii) ? table_desc->signature.ascii :"????" ,ACPI_FORMAT_UINT64 (table_desc-> address)));
drivers/acpi/acpica/tbfind.c +1 -1
@@ -76,7 +76,7 @@ acpi_tb_find_table(char *signature,/* Validate the input table signature */ -if (!acpi_is_valid_signature (signature)) { +if (!acpi_ut_valid_nameseg (signature)) {return_ACPI_STATUS (AE_BAD_SIGNATURE ); }
drivers/acpi/acpica/tbinstal.c +3 -3
@@ -299,9 +299,9 @@ acpi_tb_install_standard_table(acpi_physical_address address,ACPI_BIOS_ERROR ((AE_INFO ,"Table has invalid signature [%4.4s] (0x%8.8X), " "must be SSDT or OEMx" , -acpi_ut_valid_acpi_name (new_table_desc. - signature. - ascii) ? +acpi_ut_valid_nameseg (new_table_desc. + signature. + ascii) ? new_table_desc.signature. ascii :"????" , new_table_desc.signature.integer));
drivers/acpi/acpica/tbutils.c +0 -27
@@ -380,30 +380,3 @@ next_table:acpi_os_unmap_memory (table, length);return_ACPI_STATUS (AE_OK ); } - -/******************************************************************************* -* -* FUNCTION: acpi_is_valid_signature -* -* PARAMETERS: signature - Sig string to be validated -* -* RETURN: TRUE if signature is has 4 valid ACPI characters -* -* DESCRIPTION: Validate an ACPI table signature. -* -******************************************************************************/ - -u8 acpi_is_valid_signature (char *signature) -{ -u32 i; - -/* Validate each character in the signature */ - -for (i =0 ; i <ACPI_NAME_SIZE ; i++) { -if (!acpi_ut_valid_acpi_char (signature[i], i)) { -return (FALSE); - } - } - -return (TRUE); -}
drivers/acpi/acpica/utascii.c new file +140 -0
140 lines not on this page · raw message
drivers/acpi/acpica/utstring.c +1 -68
81 lines not on this page · raw message
tools/power/acpi/tools/acpidump/Makefile +1 -0
@@ -31,6 +31,7 @@ TOOL_OBJS = \ osunixxf.o\ tbprint.o\ tbxfroot.o\ + utascii.o\ utbuffer.o\ utdebug.o\ utexcep.o\
tools/power/acpi/tools/acpidump/apdump.c +7 -1
@@ -68,7 +68,7 @@ u8 ap_is_valid_header(struct acpi_table_header *table)/* Make sure signature is all ASCII and a valid ACPI name */ -if (!acpi_ut_valid_acpi_name (table->signature)) { +if (!acpi_ut_valid_nameseg (table->signature)) {acpi_log_error ("Table signature (0x%8.8X) is invalid\n" , *(u32 *)table->signature);return (FALSE);
@@ -407,6 +407,12 @@ int ap_dump_table_from_file(char *pathname)return (-1 ); } +if (!acpi_ut_valid_nameseg (table->signature)) { +acpi_log_error + ("No valid ACPI signature was found in input file %s\n" , + pathname); + } +/* File must be at least as long as the table length */ if (table->length > file_size) {
Signature · 1 line
1.7.10
PATCH v2 13/13 ACPICA: Update version to 20160422
In reply to Lv ZhengFrom: Bob Moore <[email protected]>
ACPICA commit a2327ba410e19c2aabaf34b711dbadf7d1dcf346
Version 20160422.
--- 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 0x20160318 +#define ACPI_CA_VERSION 0x20160422#include <acpi/acconfig.h> #include <acpi/actypes.h>
Signature · 1 line
1.7.10
Quoted 80 lines · Lv Zheng
The 20160422 ACPICA kernel-resident subsystem updates are linuxized based on the linux-pm/linux-next branch.
NOTE:
1. Indentation improvement
The [PATCH 01] is a result of an ACPICA release process fix. It requires much of human intervention, and many linuxized patches in the developers' local working repositories that are not upstreamed to the ACPICA will be burnt by this commit, and may take weeks or months for the developers to recover. So hope we can do it correctly and rapidly.2. AcessSize/BitOffset support
ACPICA implements ACPI hardware register accesses using ACPI 1.0 style, which contains only BLK/LEN fields. ACPI 2.0 starts to use Generic Address Structure to define hardware registers, the ACPI 1.0 fields can be translated into Address/BitWidth fields and ACPI 2.0 defines new AccessSize/BitOffset fields as an extension. While the ACPICA code of the GAS support is still Address/BitWidth aware only. This becomes one of the significant ACPI 2.0 gaps in ACPICA.
But as we have already switched the address favor to 64-bit (aka., favor GAS descriptors) and there is almost no regression report, enabling AccessSize/BitOffset awareness seems to be just a theoretical issue because there is no existing users requiring this, and enabling it might just be an ecosystem enabling work for the future users.
So the most important thing of this improvement is to ensure regression safer by keeping old behavior working. [PATCH 08] is thus generated for this purpose. After ensuring this, we need this improvement to appear in the upstream to have more users to test it so that we can learn unknown cases from the feedback.The patchset has passed the following build/boot tests. Build tests are performed as follows:
1. i386 + allyes
2. i386 + allno
3. i386 + default + ACPI_DEBUGGER=y
4. i386 + default + ACPI_DEBUGGER=n + ACPI_DEBUG=y
5. i386 + default + ACPI_DEBUG=n + ACPI=y
6. i386 + default + ACPI=n
7.x86_64+ allyes
8.x86_64+ allno
9.x86_64+ default + ACPI_DEBUGGER=y
10.x86_64 + default + ACPI_DEBUGGER=n + ACPI_DEBUG=y 11.x86_64 + default + ACPI_DEBUG=n + ACPI=y
12.x86_64 + default + ACPI=n
Boot tests are performed as follows:
1. i386 + default + ACPI_DEBUGGER=y
2.x86_64+ default + ACPI_DEBUGGER=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 "drivers/platform" drivers
All other drivers that link the APIs provided by ACPICA subsystemThe divergences checking result:
Before applying (20160318 Release):
494 lines
After applying (20160422 Release):
485 lines
The reduction is caused by recently merged module level improvement.Bob Moore (7):
ACPICA: Refactorevaluate_objectto reduce nesting
ACPICA: ACPI 6.1: Support for new PCCT subtable
ACPICA: ACPI 6.0: Update_BIXsupport for new package element
ACPICA: ACPI 6.0,tools/iasl: Add support for new resource
descriptors
ACPICA: Renamed some #defined flag constants for clarity
ACPICA: Move all ASCII utilities to a common file
ACPICA: Update version to 20160422Lv Zheng (6):
ACPICA: Divergence: remove unwanted spaces for typedef
ACPICA: Utilities: AddACPI_IS_ALIGNED()macro
ACPICA: Hardware: Add optimized access bit width support
ACPICA: Executer: Introduce a set of macros to handle bit width mask
generation
ACPICA: ACPI 2.0, Hardware: Add access_width/bit_offset support in
Quoted 3 lines
acpi_hw_read()
ACPICA: ACPI 2.0, Hardware: Add access_width/bit_offset support for
acpi_hw_write()All [1-13/13] applied, thanks!