• Lv Zheng's avatar
    ACPICA: Parser: Cleanup aml_offset in struct acpi_walk_state · 83482f75
    Lv Zheng authored
    ACPICA commit d254405814495058276c0c2f9d96794d15a6c91c
    
    This patch converts aml_offset in struct acpi_walk_state to AML address.
    
    AML offset is actually only used by the debugger, using AML address is more
    direct and efficient during the parsing stage so that we don't need to
    calculate it during the parsing stage.
    
    On the other hand, we can see several issues in the current parser logic
    around the aml_offset:
    1. union acpi_operand_object.Common.aml_offset is redundantly assigned in
       acpi_ps_parse_loop().
    2. aml_offset is not an indication of the offset from the table header but
       the offset from the entry of a list of objects. Sometimes, it indicates
       an entry for a Method/Package/Buffer, which makes it difficult to be
       reversely calculated to a table header offset.
    3. When being used with method tracers (for example, Linux function trace),
       it's better to have AML address logged instead of the AML offset because
       the address is the only attribute that can uniquely identify the opcode.
    This patch is required to solve the above issues. Lv Zheng.
    
    Link: https://github.com/acpica/acpica/commit/d2544058Signed-off-by: default avatarLv Zheng <lv.zheng@intel.com>
    Signed-off-by: default avatarBob Moore <robert.moore@intel.com>
    Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
    83482f75
dsmethod.c 25.3 KB