OpenCloudOS-Kernel/drivers/acpi/acpica
Lv Zheng 62eb935b77 ACPICA: Dispatcher: Cleanup union acpi_operand_object's AML address assignments
ACPICA commit afb52611dbe7403551f93504d3798534f5c343f4

This patch cleans up the code of assigning the AML address to the
union acpi_operand_object.

The idea behind this cleanup is:
The AML address of the union acpi_operand_object should always be determined at
the point where the object is encountered. It should be started from the
first byte of the object. For example, the opcode of the object, the name
string of the user_term object, or the first byte of the packaged object
(where a pkg_length is prefixed). So it's not cleaner to have it assigned
here and there in the entire ACPICA source tree.

There are some special cases for the internal opcodes, before cleaning up
the internal opcodes, we should also determine the rules for the AML
addresses of the internal opcodes:
1. INT_NAMEPATH_OP: the address of the first byte for the name_string.
2. INT_METHODCALL_OP: the address of the first byte for the name_string.
3. INT_BYTELIST_OP: the address of the first byte for the byte_data list.
4. INT_EVAL_SUBTREE_OP: the address of the first byte for the
                        Region/Package/Buffer/bank_field/Field arguments.
5. INT_NAMEDFIELD_OP: the address to the name_seg.
6. INT_RESERVEDFIELD_OP: the address to the 0x00 prefix.
7. INT_ACCESSFIELD_OP: the address to the 0x01 prefix.
8. INT_CONNECTION_OP: the address to the 0x02 prefix.
9: INT_EXTACCESSFIELD_OP: the address to the 0x03 prefix.
10.INT_RETURN_VALUE_OP: the address of the replaced operand.
11.computational_data: the address to the
                      Byte/Word/Dword/Qword/string_prefix.

Before cleaning up the internal root scope of the aml_walk, turning it into
the term_list, we need to remember the aml_start address as the "Aml"
attribute for the union acpi_operand_object created by acpi_ps_create_scope_op().

Finally, we can delete some redundant AML address assignment in psloop.c.

Link: https://github.com/acpica/acpica/commit/afb52611
Signed-off-by: Lv Zheng <lv.zheng@intel.com>
Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2015-07-23 23:09:06 +02:00
..
Makefile Merge branch 'acpica' 2014-08-05 22:50:12 +02:00
acapps.h ACPICA: Applications: Remove use of __DATE__ macro. 2015-04-14 14:51:52 +02:00
accommon.h ACPICA: Split C library prototypes to new header 2015-07-01 23:17:56 +02:00
acdebug.h ACPICA: iASL/disassembler - fix possible fault for -e option. 2015-05-22 03:22:21 +02:00
acdispat.h ACPICA: Update Copyright headers to 2015 2015-02-05 15:31:43 +01:00
acevents.h ACPICA: Update Copyright headers to 2015 2015-02-05 15:31:43 +01:00
acglobal.h ACPICA: Hardware: Enable firmware waking vector for both 32-bit and 64-bit FACS 2015-07-01 23:17:52 +02:00
achware.h ACPICA: Update Copyright headers to 2015 2015-02-05 15:31:43 +01:00
acinterp.h ACPICA: Utilities: Add _CLS processing 2015-07-01 23:17:53 +02:00
aclocal.h ACPICA: Parser: Cleanup aml_offset in union acpi_operand_object 2015-07-23 23:09:06 +02:00
acmacros.h ACPICA: Utilities: Cleanup to remove useless ACPI_PRINTF/FORMAT_xxx helpers. 2015-04-14 14:51:51 +02:00
acnamesp.h ACPICA: Namespace: Add support to allow overriding objects 2015-07-01 23:17:54 +02:00
acobject.h ACPICA: Cleanup output for the ASL Debug object 2015-07-01 23:17:55 +02:00
acopcode.h ACPICA: Add infrastructure for External() opcode. 2015-04-14 14:51:54 +02:00
acparser.h ACPICA: Dispatcher: Cleanup union acpi_operand_object's AML address assignments 2015-07-23 23:09:06 +02:00
acpredef.h ACPICA: ACPI 6.0: Add support for new predefined names. 2015-05-22 03:22:19 +02:00
acresrc.h ACPICA: Update Resource descriptor dump module. 2015-04-14 14:51:53 +02:00
acstruct.h ACPICA: Parser: Cleanup aml_offset in struct acpi_walk_state 2015-07-23 23:09:06 +02:00
actables.h ACPICA: Tables: Move an iasl specific table function to iasl source file. 2015-04-14 14:51:52 +02:00
acutils.h ACPICA: Split C library prototypes to new header 2015-07-01 23:17:56 +02:00
amlcode.h ACPICA: Remove unused internal AML opcode. 2015-04-14 14:51:55 +02:00
amlresrc.h ACPICA: Update Copyright headers to 2015 2015-02-05 15:31:43 +01:00
dsargs.c ACPICA: Dispatcher: Cleanup union acpi_operand_object's AML address assignments 2015-07-23 23:09:06 +02:00
dscontrol.c ACPICA: Update Copyright headers to 2015 2015-02-05 15:31:43 +01:00
dsfield.c ACPICA: De-macroize calls to standard C library functions 2015-07-01 23:17:55 +02:00
dsinit.c ACPICA: De-macroize calls to standard C library functions 2015-07-01 23:17:55 +02:00
dsmethod.c ACPICA: Dispatcher: Cleanup union acpi_operand_object's AML address assignments 2015-07-23 23:09:06 +02:00
dsmthdat.c ACPICA: Update Copyright headers to 2015 2015-02-05 15:31:43 +01:00
dsobject.c ACPICA: De-macroize calls to standard C library functions 2015-07-01 23:17:55 +02:00
dsopcode.c ACPICA: Utilities: Cleanup to remove useless ACPI_PRINTF/FORMAT_xxx helpers. 2015-04-14 14:51:51 +02:00
dsutils.c ACPICA: De-macroize calls to standard C library functions 2015-07-01 23:17:55 +02:00
dswexec.c ACPICA: Update Copyright headers to 2015 2015-02-05 15:31:43 +01:00
dswload.c ACPICA: Dispatcher: Cleanup union acpi_operand_object's AML address assignments 2015-07-23 23:09:06 +02:00
dswload2.c ACPICA: Dispatcher: Cleanup union acpi_operand_object's AML address assignments 2015-07-23 23:09:06 +02:00
dswscope.c ACPICA: Update Copyright headers to 2015 2015-02-05 15:31:43 +01:00
dswstate.c ACPICA: Update Copyright headers to 2015 2015-02-05 15:31:43 +01:00
evevent.c ACPICA: Update Copyright headers to 2015 2015-02-05 15:31:43 +01:00
evglock.c ACPICA: Update Copyright headers to 2015 2015-02-05 15:31:43 +01:00
evgpe.c ACPICA: Store GPE register enable masks upfront 2015-04-15 04:00:27 +02:00
evgpeblk.c ACPICA: Events: Introduce ACPI_GPE_DISPATCH_RAW_HANDLER to fix 2 issues for the current GPE APIs 2015-02-05 15:34:51 +01:00
evgpeinit.c ACPICA: De-macroize calls to standard C library functions 2015-07-01 23:17:55 +02:00
evgpeutil.c ACPICA: Events: Introduce ACPI_GPE_DISPATCH_RAW_HANDLER to fix 2 issues for the current GPE APIs 2015-02-05 15:34:51 +01:00
evhandler.c ACPICA: Update Copyright headers to 2015 2015-02-05 15:31:43 +01:00
evmisc.c ACPICA: Update Copyright headers to 2015 2015-02-05 15:31:43 +01:00
evregion.c ACPICA: Utilities: Cleanup to remove useless ACPI_PRINTF/FORMAT_xxx helpers. 2015-04-14 14:51:51 +02:00
evrgnini.c ACPICA: Update Copyright headers to 2015 2015-02-05 15:31:43 +01:00
evsci.c ACPICA: Update Copyright headers to 2015 2015-02-05 15:31:43 +01:00
evxface.c ACPICA: Events: Introduce ACPI_GPE_DISPATCH_RAW_HANDLER to fix 2 issues for the current GPE APIs 2015-02-05 15:34:51 +01:00
evxfevnt.c ACPICA: Events: Add support to return both enable/status register values for GPE and fixed event. 2015-04-14 14:51:52 +02:00
evxfgpe.c ACPICA: Events: Enable APIs to allow interrupt/polling adaptive request based GPE handling model 2015-02-05 15:34:51 +01:00
evxfregn.c ACPICA: Update Copyright headers to 2015 2015-02-05 15:31:43 +01:00
exconfig.c ACPICA: De-macroize calls to standard C library functions 2015-07-01 23:17:55 +02:00
exconvrt.c ACPICA: De-macroize calls to standard C library functions 2015-07-01 23:17:55 +02:00
excreate.c ACPICA: Update Copyright headers to 2015 2015-02-05 15:31:43 +01:00
exdebug.c ACPICA: Cleanup output for the ASL Debug object 2015-07-01 23:17:55 +02:00
exdump.c ACPICA: Cleanup output for the ASL Debug object 2015-07-01 23:17:55 +02:00
exfield.c ACPICA: De-macroize calls to standard C library functions 2015-07-01 23:17:55 +02:00
exfldio.c ACPICA: De-macroize calls to standard C library functions 2015-07-01 23:17:55 +02:00
exmisc.c ACPICA: De-macroize calls to standard C library functions 2015-07-01 23:17:55 +02:00
exmutex.c ACPICA: Update Copyright headers to 2015 2015-02-05 15:31:43 +01:00
exnames.c ACPICA: De-macroize calls to standard C library functions 2015-07-01 23:17:55 +02:00
exoparg1.c ACPICA: Update Copyright headers to 2015 2015-02-05 15:31:43 +01:00
exoparg2.c ACPICA: De-macroize calls to standard C library functions 2015-07-01 23:17:55 +02:00
exoparg3.c ACPICA: De-macroize calls to standard C library functions 2015-07-01 23:17:55 +02:00
exoparg6.c ACPICA: Update Copyright headers to 2015 2015-02-05 15:31:43 +01:00
exprep.c ACPICA: Update Copyright headers to 2015 2015-02-05 15:31:43 +01:00
exregion.c ACPICA: De-macroize calls to standard C library functions 2015-07-01 23:17:55 +02:00
exresnte.c ACPICA: Update Copyright headers to 2015 2015-02-05 15:31:43 +01:00
exresolv.c ACPICA: Update Copyright headers to 2015 2015-02-05 15:31:43 +01:00
exresop.c ACPICA: Update Copyright headers to 2015 2015-02-05 15:31:43 +01:00
exstore.c ACPICA: Update Copyright headers to 2015 2015-02-05 15:31:43 +01:00
exstoren.c ACPICA: Update Copyright headers to 2015 2015-02-05 15:31:43 +01:00
exstorob.c ACPICA: De-macroize calls to standard C library functions 2015-07-01 23:17:55 +02:00
exsystem.c ACPICA: Update Copyright headers to 2015 2015-02-05 15:31:43 +01:00
exutils.c ACPICA: Utilities: Add _CLS processing 2015-07-01 23:17:53 +02:00
hwacpi.c ACPICA: Update Copyright headers to 2015 2015-02-05 15:31:43 +01:00
hwesleep.c ACPICA: Update Copyright headers to 2015 2015-02-05 15:31:43 +01:00
hwgpe.c ACPICA: Store GPE register enable masks upfront 2015-04-15 04:00:27 +02:00
hwpci.c ACPICA: Hardware: Fix a resource leak issue in acpi_hw_build_pci_list(). 2015-05-22 03:22:20 +02:00
hwregs.c ACPICA: Update Copyright headers to 2015 2015-02-05 15:31:43 +01:00
hwsleep.c ACPICA: Update Copyright headers to 2015 2015-02-05 15:31:43 +01:00
hwtimer.c ACPICA: Update Copyright headers to 2015 2015-02-05 15:31:43 +01:00
hwvalid.c ACPICA: Utilities: Cleanup to convert physical address printing formats. 2015-04-14 14:51:51 +02:00
hwxface.c ACPICA: Update Copyright headers to 2015 2015-02-05 15:31:43 +01:00
hwxfsleep.c ACPICA: Hardware: Enable firmware waking vector for both 32-bit and 64-bit FACS 2015-07-01 23:17:52 +02:00
nsaccess.c ACPICA: De-macroize calls to standard C library functions 2015-07-01 23:17:55 +02:00
nsalloc.c ACPICA: Update Copyright headers to 2015 2015-02-05 15:31:43 +01:00
nsarguments.c ACPICA: Update Copyright headers to 2015 2015-02-05 15:31:43 +01:00
nsconvert.c ACPICA: De-macroize calls to standard C library functions 2015-07-01 23:17:55 +02:00
nsdump.c ACPICA: De-macroize calls to standard C library functions 2015-07-01 23:17:55 +02:00
nsdumpdv.c ACPICA: Update Copyright headers to 2015 2015-02-05 15:31:43 +01:00
nseval.c ACPICA: Comment update, no functional change 2015-07-01 23:17:56 +02:00
nsinit.c ACPICA: De-macroize calls to standard C library functions 2015-07-01 23:17:55 +02:00
nsload.c ACPICA: Update Copyright headers to 2015 2015-02-05 15:31:43 +01:00
nsnames.c ACPICA: Parser: Reduce parser/namespace divergences for tracer support 2015-07-23 23:09:05 +02:00
nsobject.c ACPICA: Update Copyright headers to 2015 2015-02-05 15:31:43 +01:00
nsparse.c ACPICA: Dispatcher: Cleanup union acpi_operand_object's AML address assignments 2015-07-23 23:09:06 +02:00
nspredef.c ACPICA: Update Copyright headers to 2015 2015-02-05 15:31:43 +01:00
nsprepkg.c ACPICA: ACPI 6.0: Add support for new predefined names. 2015-05-22 03:22:19 +02:00
nsrepair.c ACPICA: ACPI 6.0: Add support for new predefined names. 2015-05-22 03:22:19 +02:00
nsrepair2.c ACPICA: De-macroize calls to standard C library functions 2015-07-01 23:17:55 +02:00
nssearch.c ACPICA: Namespace: Change namespace override to avoid node deletion 2015-07-01 23:17:54 +02:00
nsutils.c ACPICA: De-macroize calls to standard C library functions 2015-07-01 23:17:55 +02:00
nswalk.c ACPICA: Update Copyright headers to 2015 2015-02-05 15:31:43 +01:00
nsxfeval.c ACPICA: De-macroize calls to standard C library functions 2015-07-01 23:17:55 +02:00
nsxfname.c ACPICA: De-macroize calls to standard C library functions 2015-07-01 23:17:55 +02:00
nsxfobj.c ACPICA: Update Copyright headers to 2015 2015-02-05 15:31:43 +01:00
psargs.c ACPICA: Dispatcher: Cleanup union acpi_operand_object's AML address assignments 2015-07-23 23:09:06 +02:00
psloop.c ACPICA: Dispatcher: Cleanup union acpi_operand_object's AML address assignments 2015-07-23 23:09:06 +02:00
psobject.c ACPICA: Dispatcher: Cleanup union acpi_operand_object's AML address assignments 2015-07-23 23:09:06 +02:00
psopcode.c ACPICA: Add infrastructure for External() opcode. 2015-04-14 14:51:54 +02:00
psopinfo.c ACPICA: Parser: Move a couple externals to the proper header. 2015-05-22 03:22:19 +02:00
psparse.c ACPICA: Dispatcher: Cleanup union acpi_operand_object's AML address assignments 2015-07-23 23:09:06 +02:00
psscope.c ACPICA: Update Copyright headers to 2015 2015-02-05 15:31:43 +01:00
pstree.c ACPICA: Update Copyright headers to 2015 2015-02-05 15:31:43 +01:00
psutils.c ACPICA: Dispatcher: Cleanup union acpi_operand_object's AML address assignments 2015-07-23 23:09:06 +02:00
pswalk.c ACPICA: Update Copyright headers to 2015 2015-02-05 15:31:43 +01:00
psxface.c ACPICA: Dispatcher: Cleanup union acpi_operand_object's AML address assignments 2015-07-23 23:09:06 +02:00
rsaddr.c ACPICA: Update Copyright headers to 2015 2015-02-05 15:31:43 +01:00
rscalc.c ACPICA: Update Copyright headers to 2015 2015-02-05 15:31:43 +01:00
rscreate.c ACPICA: De-macroize calls to standard C library functions 2015-07-01 23:17:55 +02:00
rsdump.c ACPICA: Update Resource descriptor dump module. 2015-04-14 14:51:53 +02:00
rsdumpinfo.c ACPICA: Update Copyright headers to 2015 2015-02-05 15:31:43 +01:00
rsinfo.c ACPICA: Update Copyright headers to 2015 2015-02-05 15:31:43 +01:00
rsio.c ACPICA: Update Copyright headers to 2015 2015-02-05 15:31:43 +01:00
rsirq.c ACPICA: Update Copyright headers to 2015 2015-02-05 15:31:43 +01:00
rslist.c ACPICA: Update Copyright headers to 2015 2015-02-05 15:31:43 +01:00
rsmemory.c ACPICA: Update Copyright headers to 2015 2015-02-05 15:31:43 +01:00
rsmisc.c ACPICA: De-macroize calls to standard C library functions 2015-07-01 23:17:55 +02:00
rsserial.c ACPICA: Update Copyright headers to 2015 2015-02-05 15:31:43 +01:00
rsutils.c ACPICA: De-macroize calls to standard C library functions 2015-07-01 23:17:55 +02:00
rsxface.c ACPICA: De-macroize calls to standard C library functions 2015-07-01 23:17:55 +02:00
tbdata.c ACPICA: De-macroize calls to standard C library functions 2015-07-01 23:17:55 +02:00
tbfadt.c ACPICA: De-macroize calls to standard C library functions 2015-07-01 23:17:55 +02:00
tbfind.c ACPICA: De-macroize calls to standard C library functions 2015-07-01 23:17:55 +02:00
tbinstal.c ACPICA: De-macroize calls to standard C library functions 2015-07-01 23:17:55 +02:00
tbprint.c ACPICA: De-macroize calls to standard C library functions 2015-07-01 23:17:55 +02:00
tbutils.c ACPICA: De-macroize calls to standard C library functions 2015-07-01 23:17:55 +02:00
tbxface.c ACPICA: De-macroize calls to standard C library functions 2015-07-01 23:17:55 +02:00
tbxfload.c ACPICA: De-macroize calls to standard C library functions 2015-07-01 23:17:55 +02:00
tbxfroot.c ACPICA: Tables: Change acpi_find_root_pointer() to use acpi_physical_address. 2015-04-14 14:51:50 +02:00
utaddress.c ACPICA: Utilities: Cleanup to convert physical address printing formats. 2015-04-14 14:51:51 +02:00
utalloc.c ACPICA: De-macroize calls to standard C library functions 2015-07-01 23:17:55 +02:00
utbuffer.c ACPICA: De-macroize calls to standard C library functions 2015-07-01 23:17:55 +02:00
utcache.c ACPICA: De-macroize calls to standard C library functions 2015-07-01 23:17:55 +02:00
utcopy.c ACPICA: De-macroize calls to standard C library functions 2015-07-01 23:17:55 +02:00
utdebug.c ACPICA: Linuxize: Replace __FUNCTION__ with __func__ 2015-06-24 19:54:15 +02:00
utdecode.c ACPICA: Update Copyright headers to 2015 2015-02-05 15:31:43 +01:00
utdelete.c ACPICA: Update Copyright headers to 2015 2015-02-05 15:31:43 +01:00
uterror.c ACPICA: Update Copyright headers to 2015 2015-02-05 15:31:43 +01:00
uteval.c ACPICA: Update Copyright headers to 2015 2015-02-05 15:31:43 +01:00
utexcep.c ACPICA: Update Copyright headers to 2015 2015-02-05 15:31:43 +01:00
utfileio.c ACPICA: iASL/disassembler - fix possible fault for -e option. 2015-05-22 03:22:21 +02:00
utglobal.c Revert 'Revert "ACPICA: Permanently set _REV to the value '2'."' 2015-07-03 01:06:04 +02:00
uthex.c ACPICA: ACPI 6.0: Add support for NFIT table. 2015-05-22 03:22:21 +02:00
utids.c ACPICA: De-macroize calls to standard C library functions 2015-07-01 23:17:55 +02:00
utinit.c ACPICA: Update Copyright headers to 2015 2015-02-05 15:31:43 +01:00
utlock.c ACPICA: Update Copyright headers to 2015 2015-02-05 15:31:43 +01:00
utmath.c ACPICA: Update Copyright headers to 2015 2015-02-05 15:31:43 +01:00
utmisc.c ACPICA: De-macroize calls to standard C library functions 2015-07-01 23:17:55 +02:00
utmutex.c ACPICA: Update Copyright headers to 2015 2015-02-05 15:31:43 +01:00
utobject.c ACPICA: Update Copyright headers to 2015 2015-02-05 15:31:43 +01:00
utosi.c ACPICA: De-macroize calls to standard C library functions 2015-07-01 23:17:55 +02:00
utownerid.c ACPICA: Update Copyright headers to 2015 2015-02-05 15:31:43 +01:00
utpredef.c ACPICA: De-macroize calls to standard C library functions 2015-07-01 23:17:55 +02:00
utprint.c ACPICA: De-macroize calls to standard C library functions 2015-07-01 23:17:55 +02:00
utresrc.c ACPICA: Update Copyright headers to 2015 2015-02-05 15:31:43 +01:00
utstate.c ACPICA: Utilities: Remove unused acpi_ut_create_pkg_state_and_push(). 2015-04-14 14:51:52 +02:00
utstring.c ACPICA: De-macroize calls to standard C library functions 2015-07-01 23:17:55 +02:00
uttrack.c ACPICA: De-macroize calls to standard C library functions 2015-07-01 23:17:55 +02:00
utuuid.c ACPICA: Utilities: Correct conditional compilation definitions. 2015-04-14 14:51:52 +02:00
utxface.c ACPICA: De-macroize calls to standard C library functions 2015-07-01 23:17:55 +02:00
utxferror.c ACPICA: iASL/disassembler - fix possible fault for -e option. 2015-05-22 03:22:21 +02:00
utxfinit.c ACPICA: Tables: Fix an issue that FACS initialization is performed twice 2015-07-01 23:17:52 +02:00
utxfmutex.c ACPICA: Update Copyright headers to 2015 2015-02-05 15:31:43 +01:00