Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Merge tag 'acpi-extra-4.12-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm

Pull more ACPI updates from Rafael Wysocki:
"These update the ACPICA code in the kernel to upstream revision
20170303 which adds a few minor fixes and improvements, update ACPI
SoC drivers with new device IDs, platform-related information and
similar, fix the register information in the xpower PMIC driver,
introduce a concept of "always present" devices to the ACPI device
enumeration code and use it to fix a problem with one platform, and
fix a system resume issue related to power resources.

Specifics:

- Update the ACPICA code in the kernel to upstream revision 20170303
which includes:
* Minor fixes and improvements in the core code (Bob Moore,
Seunghun Han).
* Debugger fixes (Colin Ian King, Lv Zheng).
* Compiler/disassembler improvements (Bob Moore, David Box, Lv
Zheng).
* Build-related update (Lv Zheng).

- Add new device IDs and platform-related information to the ACPI
drivers for Intel (LPSS) and AMD (APD) SoCs (Hanjun Guo, Hans de
Goede).

- Make it possible to quirk ACPI-enumerated devices as "always
present" on platforms where they are incorrectly reported as not
present by the AML and add the INT0002 device ID to the list of
"always present" devices (Hans de Goede).

- Fix the register information in the xpower PMIC driver and add
comments to map the registers to symbols used by AML to it (Hans de
Goede).

- Move the code turning off unused ACPI power resources during system
resume to a point after all devices have been resumed to avoid
issues with power resources that do not behave as expected (Hans de
Goede)"

* tag 'acpi-extra-4.12-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: (22 commits)
ACPI / power: Delay turning off unused power resources after suspend
ACPI / PMIC: xpower: Fix power_table addresses
ACPI / LPSS: Call pwm_add_table() for Bay Trail PWM device
ACPICA: Update version to 20170303
ACPICA: iasl: add ASL conversion tool
ACPICA: Local cache support: Allow small cache objects
ACPICA: Disassembler: Do not unconditionally remove temporary names
ACPICA: iasl: Fix IORT SMMU GSI disassembling
ACPICA: Cleanup AML opcode definitions, no functional change
ACPICA: Debugger: Add interpreter blocking mark for single-step mode
ACPICA: debugger: fix memory leak on Pathname
ACPICA: Update for automatic repair code for objects returned by evaluate_object
ACPICA: Namespace: fix operand cache leak
ACPICA: Fix several incorrect invocations of ACPICA return macro
ACPICA: Fix a module for excessive debug output
ACPICA: Update some function headers, no funtional change
ACPICA: Disassembler: Enhance resource descriptor detection
i2c: designware: Add ACPI HID for Hisilicon Hip07/08 I2C controller
ACPI / APD: Add clock frequency for Hisilicon Hip07/08 I2C controller
ACPI / bus: Add INT0002 to list of always-present devices
...

+835 -223
+1
drivers/acpi/Makefile
··· 50 50 acpi-y += sysfs.o 51 51 acpi-y += property.o 52 52 acpi-$(CONFIG_X86) += acpi_cmos_rtc.o 53 + acpi-$(CONFIG_X86) += x86/utils.o 53 54 acpi-$(CONFIG_DEBUG_FS) += debugfs.o 54 55 acpi-$(CONFIG_ACPI_NUMA) += numa.o 55 56 acpi-$(CONFIG_ACPI_PROCFS_POWER) += cm_sbs.o
+12
drivers/acpi/acpi_apd.c
··· 106 106 .setup = acpi_apd_setup, 107 107 .fixed_clk_rate = 133000000, 108 108 }; 109 + 110 + static const struct apd_device_desc hip07_i2c_desc = { 111 + .setup = acpi_apd_setup, 112 + .fixed_clk_rate = 200000000, 113 + }; 114 + 115 + static const struct apd_device_desc hip08_i2c_desc = { 116 + .setup = acpi_apd_setup, 117 + .fixed_clk_rate = 250000000, 118 + }; 109 119 #endif 110 120 111 121 #else ··· 180 170 { "APMC0D0F", APD_ADDR(xgene_i2c_desc) }, 181 171 { "BRCM900D", APD_ADDR(vulcan_spi_desc) }, 182 172 { "CAV900D", APD_ADDR(vulcan_spi_desc) }, 173 + { "HISI0A21", APD_ADDR(hip07_i2c_desc) }, 174 + { "HISI0A22", APD_ADDR(hip08_i2c_desc) }, 183 175 #endif 184 176 { } 185 177 };
+17
drivers/acpi/acpi_lpss.c
··· 143 143 writel(val, pdata->mmio_base + offset); 144 144 } 145 145 146 + /* 147 + * BYT PWM used for backlight control by the i915 driver on systems without 148 + * the Crystal Cove PMIC. 149 + */ 150 + static struct pwm_lookup byt_pwm_lookup[] = { 151 + PWM_LOOKUP_WITH_MODULE("80860F09:00", 0, "0000:00:02.0", 152 + "pwm_backlight", 0, PWM_POLARITY_NORMAL, 153 + "pwm-lpss-platform"), 154 + }; 155 + 156 + static void byt_pwm_setup(struct lpss_private_data *pdata) 157 + { 158 + if (!acpi_dev_present("INT33FD", NULL, -1)) 159 + pwm_add_table(byt_pwm_lookup, ARRAY_SIZE(byt_pwm_lookup)); 160 + } 161 + 146 162 #define LPSS_I2C_ENABLE 0x6c 147 163 148 164 static void byt_i2c_setup(struct lpss_private_data *pdata) ··· 216 200 217 201 static const struct lpss_device_desc byt_pwm_dev_desc = { 218 202 .flags = LPSS_SAVE_CTX, 203 + .setup = byt_pwm_setup, 219 204 }; 220 205 221 206 static const struct lpss_device_desc bsw_pwm_dev_desc = {
+1 -1
drivers/acpi/acpica/Makefile
··· 2 2 # Makefile for ACPICA Core interpreter 3 3 # 4 4 5 - ccflags-y := -Os -DBUILDING_ACPICA 5 + ccflags-y := -Os -D_LINUX -DBUILDING_ACPICA 6 6 ccflags-$(CONFIG_ACPI_DEBUG) += -DACPI_DEBUG_OUTPUT 7 7 8 8 # use acpi.o to put all files here into acpi.o modparam namespace
+144
drivers/acpi/acpica/acconvert.h
··· 1 + /****************************************************************************** 2 + * 3 + * Module Name: acapps - common include for ACPI applications/tools 4 + * 5 + *****************************************************************************/ 6 + 7 + /* 8 + * Copyright (C) 2000 - 2017, Intel Corp. 9 + * All rights reserved. 10 + * 11 + * Redistribution and use in source and binary forms, with or without 12 + * modification, are permitted provided that the following conditions 13 + * are met: 14 + * 1. Redistributions of source code must retain the above copyright 15 + * notice, this list of conditions, and the following disclaimer, 16 + * without modification. 17 + * 2. Redistributions in binary form must reproduce at minimum a disclaimer 18 + * substantially similar to the "NO WARRANTY" disclaimer below 19 + * ("Disclaimer") and any redistribution must be conditioned upon 20 + * including a substantially similar Disclaimer requirement for further 21 + * binary redistribution. 22 + * 3. Neither the names of the above-listed copyright holders nor the names 23 + * of any contributors may be used to endorse or promote products derived 24 + * from this software without specific prior written permission. 25 + * 26 + * Alternatively, this software may be distributed under the terms of the 27 + * GNU General Public License ("GPL") version 2 as published by the Free 28 + * Software Foundation. 29 + * 30 + * NO WARRANTY 31 + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 32 + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 33 + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR 34 + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 35 + * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 36 + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 37 + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 38 + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 39 + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING 40 + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 41 + * POSSIBILITY OF SUCH DAMAGES. 42 + */ 43 + 44 + #ifndef _ACCONVERT 45 + #define _ACCONVERT 46 + 47 + /* Definitions for comment state */ 48 + 49 + #define ASL_COMMENT_STANDARD 1 50 + #define ASLCOMMENT_INLINE 2 51 + #define ASL_COMMENT_OPEN_PAREN 3 52 + #define ASL_COMMENT_CLOSE_PAREN 4 53 + #define ASL_COMMENT_CLOSE_BRACE 5 54 + 55 + /* Definitions for comment print function*/ 56 + 57 + #define AML_COMMENT_STANDARD 1 58 + #define AMLCOMMENT_INLINE 2 59 + #define AML_COMMENT_END_NODE 3 60 + #define AML_NAMECOMMENT 4 61 + #define AML_COMMENT_CLOSE_BRACE 5 62 + #define AML_COMMENT_ENDBLK 6 63 + #define AML_COMMENT_INCLUDE 7 64 + 65 + #ifdef ACPI_ASL_COMPILER 66 + /* 67 + * cvcompiler 68 + */ 69 + void 70 + cv_process_comment(struct asl_comment_state current_state, 71 + char *string_buffer, int c1); 72 + 73 + void 74 + cv_process_comment_type2(struct asl_comment_state current_state, 75 + char *string_buffer); 76 + 77 + u32 cv_calculate_comment_lengths(union acpi_parse_object *op); 78 + 79 + void cv_process_comment_state(char input); 80 + 81 + char *cv_append_inline_comment(char *inline_comment, char *to_add); 82 + 83 + void cv_add_to_comment_list(char *to_add); 84 + 85 + void cv_place_comment(u8 type, char *comment_string); 86 + 87 + u32 cv_parse_op_block_type(union acpi_parse_object *op); 88 + 89 + struct acpi_comment_node *cv_comment_node_calloc(void); 90 + 91 + void cg_write_aml_def_block_comment(union acpi_parse_object *op); 92 + 93 + void 94 + cg_write_one_aml_comment(union acpi_parse_object *op, 95 + char *comment_to_print, u8 input_option); 96 + 97 + void cg_write_aml_comment(union acpi_parse_object *op); 98 + 99 + /* 100 + * cvparser 101 + */ 102 + void 103 + cv_init_file_tree(struct acpi_table_header *table, 104 + u8 *aml_start, u32 aml_length); 105 + 106 + void cv_clear_op_comments(union acpi_parse_object *op); 107 + 108 + struct acpi_file_node *cv_filename_exists(char *filename, 109 + struct acpi_file_node *head); 110 + 111 + void cv_label_file_node(union acpi_parse_object *op); 112 + 113 + void 114 + cv_capture_list_comments(struct acpi_parse_state *parser_state, 115 + struct acpi_comment_node *list_head, 116 + struct acpi_comment_node *list_tail); 117 + 118 + void cv_capture_comments_only(struct acpi_parse_state *parser_state); 119 + 120 + void cv_capture_comments(struct acpi_walk_state *walk_state); 121 + 122 + void cv_transfer_comments(union acpi_parse_object *op); 123 + 124 + /* 125 + * cvdisasm 126 + */ 127 + void cv_switch_files(u32 level, union acpi_parse_object *op); 128 + 129 + u8 cv_file_has_switched(union acpi_parse_object *op); 130 + 131 + void cv_close_paren_write_comment(union acpi_parse_object *op, u32 level); 132 + 133 + void cv_close_brace_write_comment(union acpi_parse_object *op, u32 level); 134 + 135 + void 136 + cv_print_one_comment_list(struct acpi_comment_node *comment_list, u32 level); 137 + 138 + void 139 + cv_print_one_comment_type(union acpi_parse_object *op, 140 + u8 comment_type, char *end_str, u32 level); 141 + 142 + #endif 143 + 144 + #endif /* _ACCONVERT */
+53
drivers/acpi/acpica/acglobal.h
··· 370 370 371 371 #endif 372 372 373 + /* 374 + * Meant for the -ca option. 375 + */ 376 + ACPI_INIT_GLOBAL(char *, acpi_gbl_current_inline_comment, NULL); 377 + ACPI_INIT_GLOBAL(char *, acpi_gbl_current_end_node_comment, NULL); 378 + ACPI_INIT_GLOBAL(char *, acpi_gbl_current_open_brace_comment, NULL); 379 + ACPI_INIT_GLOBAL(char *, acpi_gbl_current_close_brace_comment, NULL); 380 + 381 + ACPI_INIT_GLOBAL(char *, acpi_gbl_root_filename, NULL); 382 + ACPI_INIT_GLOBAL(char *, acpi_gbl_current_filename, NULL); 383 + ACPI_INIT_GLOBAL(char *, acpi_gbl_current_parent_filename, NULL); 384 + ACPI_INIT_GLOBAL(char *, acpi_gbl_current_include_filename, NULL); 385 + 386 + ACPI_INIT_GLOBAL(struct acpi_comment_node, *acpi_gbl_last_list_head, NULL); 387 + 388 + ACPI_INIT_GLOBAL(struct acpi_comment_node, *acpi_gbl_def_blk_comment_list_head, 389 + NULL); 390 + ACPI_INIT_GLOBAL(struct acpi_comment_node, *acpi_gbl_def_blk_comment_list_tail, 391 + NULL); 392 + 393 + ACPI_INIT_GLOBAL(struct acpi_comment_node, *acpi_gbl_reg_comment_list_head, 394 + NULL); 395 + ACPI_INIT_GLOBAL(struct acpi_comment_node, *acpi_gbl_reg_comment_list_tail, 396 + NULL); 397 + 398 + ACPI_INIT_GLOBAL(struct acpi_comment_node, *acpi_gbl_inc_comment_list_head, 399 + NULL); 400 + ACPI_INIT_GLOBAL(struct acpi_comment_node, *acpi_gbl_inc_comment_list_tail, 401 + NULL); 402 + 403 + ACPI_INIT_GLOBAL(struct acpi_comment_node, *acpi_gbl_end_blk_comment_list_head, 404 + NULL); 405 + ACPI_INIT_GLOBAL(struct acpi_comment_node, *acpi_gbl_end_blk_comment_list_tail, 406 + NULL); 407 + 408 + ACPI_INIT_GLOBAL(struct acpi_comment_addr_node, 409 + *acpi_gbl_comment_addr_list_head, NULL); 410 + 411 + ACPI_INIT_GLOBAL(union acpi_parse_object, *acpi_gbl_current_scope, NULL); 412 + 413 + ACPI_INIT_GLOBAL(struct acpi_file_node, *acpi_gbl_file_tree_root, NULL); 414 + 415 + ACPI_GLOBAL(acpi_cache_t *, acpi_gbl_reg_comment_cache); 416 + ACPI_GLOBAL(acpi_cache_t *, acpi_gbl_comment_addr_cache); 417 + ACPI_GLOBAL(acpi_cache_t *, acpi_gbl_file_cache); 418 + 419 + ACPI_INIT_GLOBAL(u8, gbl_capture_comments, FALSE); 420 + 421 + ACPI_INIT_GLOBAL(u8, acpi_gbl_debug_asl_conversion, FALSE); 422 + ACPI_INIT_GLOBAL(ACPI_FILE, acpi_gbl_conv_debug_file, NULL); 423 + 424 + ACPI_GLOBAL(char, acpi_gbl_table_sig[4]); 425 + 373 426 /***************************************************************************** 374 427 * 375 428 * Application globals
+88 -18
drivers/acpi/acpica/aclocal.h
··· 53 53 54 54 /* Total number of aml opcodes defined */ 55 55 56 - #define AML_NUM_OPCODES 0x82 56 + #define AML_NUM_OPCODES 0x83 57 57 58 58 /* Forward declarations */ 59 59 ··· 754 754 #define ACPI_DISASM_ONLY_MEMBERS(a) 755 755 #endif 756 756 757 + #if defined(ACPI_ASL_COMPILER) 758 + #define ACPI_CONVERTER_ONLY_MEMBERS(a) a; 759 + #else 760 + #define ACPI_CONVERTER_ONLY_MEMBERS(a) 761 + #endif 762 + 757 763 #define ACPI_PARSE_COMMON \ 758 - union acpi_parse_object *parent; /* Parent op */\ 759 - u8 descriptor_type; /* To differentiate various internal objs */\ 760 - u8 flags; /* Type of Op */\ 761 - u16 aml_opcode; /* AML opcode */\ 762 - u8 *aml; /* Address of declaration in AML */\ 763 - union acpi_parse_object *next; /* Next op */\ 764 - struct acpi_namespace_node *node; /* For use by interpreter */\ 765 - union acpi_parse_value value; /* Value or args associated with the opcode */\ 766 - u8 arg_list_length; /* Number of elements in the arg list */\ 767 - ACPI_DISASM_ONLY_MEMBERS (\ 768 - u16 disasm_flags; /* Used during AML disassembly */\ 769 - u8 disasm_opcode; /* Subtype used for disassembly */\ 770 - char *operator_symbol;/* Used for C-style operator name strings */\ 771 - char aml_op_name[16]) /* Op name (debug only) */ 764 + union acpi_parse_object *parent; /* Parent op */\ 765 + u8 descriptor_type; /* To differentiate various internal objs */\ 766 + u8 flags; /* Type of Op */\ 767 + u16 aml_opcode; /* AML opcode */\ 768 + u8 *aml; /* Address of declaration in AML */\ 769 + union acpi_parse_object *next; /* Next op */\ 770 + struct acpi_namespace_node *node; /* For use by interpreter */\ 771 + union acpi_parse_value value; /* Value or args associated with the opcode */\ 772 + u8 arg_list_length; /* Number of elements in the arg list */\ 773 + ACPI_DISASM_ONLY_MEMBERS (\ 774 + u16 disasm_flags; /* Used during AML disassembly */\ 775 + u8 disasm_opcode; /* Subtype used for disassembly */\ 776 + char *operator_symbol; /* Used for C-style operator name strings */\ 777 + char aml_op_name[16]) /* Op name (debug only) */\ 778 + ACPI_CONVERTER_ONLY_MEMBERS (\ 779 + char *inline_comment; /* Inline comment */\ 780 + char *end_node_comment; /* End of node comment */\ 781 + char *name_comment; /* Comment associated with the first parameter of the name node */\ 782 + char *close_brace_comment; /* Comments that come after } on the same as } */\ 783 + struct acpi_comment_node *comment_list; /* comments that appears before this node */\ 784 + struct acpi_comment_node *end_blk_comment; /* comments that at the end of a block but before ) or } */\ 785 + char *cv_filename; /* Filename associated with this node. Used for ASL/ASL+ converter */\ 786 + char *cv_parent_filename) /* Parent filename associated with this node. Used for ASL/ASL+ converter */ 787 + 788 + /* categories of comments */ 789 + 790 + typedef enum { 791 + STANDARD_COMMENT = 1, 792 + INLINE_COMMENT, 793 + ENDNODE_COMMENT, 794 + OPENBRACE_COMMENT, 795 + CLOSE_BRACE_COMMENT, 796 + STD_DEFBLK_COMMENT, 797 + END_DEFBLK_COMMENT, 798 + FILENAME_COMMENT, 799 + PARENTFILENAME_COMMENT, 800 + ENDBLK_COMMENT, 801 + INCLUDE_COMMENT 802 + } asl_comment_types; 772 803 773 804 /* Internal opcodes for disasm_opcode field above */ 774 805 ··· 815 784 #define ACPI_DASM_LNOT_SUFFIX 0x09 /* End of a Lnot_equal (etc.) pair of opcodes */ 816 785 #define ACPI_DASM_HID_STRING 0x0A /* String is a _HID or _CID */ 817 786 #define ACPI_DASM_IGNORE_SINGLE 0x0B /* Ignore the opcode but not it's children */ 818 - #define ACPI_DASM_SWITCH_PREDICATE 0x0C /* Object is a predicate for a Switch or Case block */ 819 - #define ACPI_DASM_CASE 0x0D /* If/Else is a Case in a Switch/Case block */ 820 - #define ACPI_DASM_DEFAULT 0x0E /* Else is a Default in a Switch/Case block */ 787 + #define ACPI_DASM_SWITCH 0x0C /* While is a Switch */ 788 + #define ACPI_DASM_SWITCH_PREDICATE 0x0D /* Object is a predicate for a Switch or Case block */ 789 + #define ACPI_DASM_CASE 0x0E /* If/Else is a Case in a Switch/Case block */ 790 + #define ACPI_DASM_DEFAULT 0x0F /* Else is a Default in a Switch/Case block */ 791 + 792 + /* 793 + * List struct used in the -ca option 794 + */ 795 + struct acpi_comment_node { 796 + char *comment; 797 + struct acpi_comment_node *next; 798 + }; 799 + 800 + struct acpi_comment_addr_node { 801 + u8 *addr; 802 + struct acpi_comment_addr_node *next; 803 + }; 804 + 805 + /* 806 + * File node - used for "Include" operator file stack and 807 + * depdendency tree for the -ca option 808 + */ 809 + struct acpi_file_node { 810 + void *file; 811 + char *filename; 812 + char *file_start; /* Points to AML and indicates when the AML for this particular file starts. */ 813 + char *file_end; /* Points to AML and indicates when the AML for this particular file ends. */ 814 + struct acpi_file_node *next; 815 + struct acpi_file_node *parent; 816 + u8 include_written; 817 + struct acpi_comment_node *include_comment; 818 + }; 821 819 822 820 /* 823 821 * Generic operation (for example: If, While, Store) ··· 873 813 ACPI_PARSE_COMMON union acpi_parse_object *child; 874 814 union acpi_parse_object *parent_method; 875 815 char *filename; 816 + u8 file_changed; 817 + char *parent_filename; 876 818 char *external_name; 877 819 char *namepath; 878 820 char name_seg[4]; ··· 902 840 struct acpi_parse_obj_common common; 903 841 struct acpi_parse_obj_named named; 904 842 struct acpi_parse_obj_asl asl; 843 + }; 844 + 845 + struct asl_comment_state { 846 + u8 comment_type; 847 + u32 spaces_before; 848 + union acpi_parse_object *latest_parse_node; 849 + union acpi_parse_object *parsing_paren_brace_node; 850 + u8 capture_comments; 905 851 }; 906 852 907 853 /*
+35
drivers/acpi/acpica/acmacros.h
··· 493 493 494 494 #define ACPI_IS_OCTAL_DIGIT(d) (((char)(d) >= '0') && ((char)(d) <= '7')) 495 495 496 + /* 497 + * Macors used for the ASL-/ASL+ converter utility 498 + */ 499 + #ifdef ACPI_ASL_COMPILER 500 + 501 + #define ASL_CV_LABEL_FILENODE(a) cv_label_file_node(a); 502 + #define ASL_CV_CAPTURE_COMMENTS_ONLY(a) cv_capture_comments_only (a); 503 + #define ASL_CV_CAPTURE_COMMENTS(a) cv_capture_comments (a); 504 + #define ASL_CV_TRANSFER_COMMENTS(a) cv_transfer_comments (a); 505 + #define ASL_CV_CLOSE_PAREN(a,b) cv_close_paren_write_comment(a,b); 506 + #define ASL_CV_CLOSE_BRACE(a,b) cv_close_brace_write_comment(a,b); 507 + #define ASL_CV_SWITCH_FILES(a,b) cv_switch_files(a,b); 508 + #define ASL_CV_CLEAR_OP_COMMENTS(a) cv_clear_op_comments(a); 509 + #define ASL_CV_PRINT_ONE_COMMENT(a,b,c,d) cv_print_one_comment_type (a,b,c,d); 510 + #define ASL_CV_PRINT_ONE_COMMENT_LIST(a,b) cv_print_one_comment_list (a,b); 511 + #define ASL_CV_FILE_HAS_SWITCHED(a) cv_file_has_switched(a) 512 + #define ASL_CV_INIT_FILETREE(a,b,c) cv_init_file_tree(a,b,c); 513 + 514 + #else 515 + 516 + #define ASL_CV_LABEL_FILENODE(a) 517 + #define ASL_CV_CAPTURE_COMMENTS_ONLY(a) 518 + #define ASL_CV_CAPTURE_COMMENTS(a) 519 + #define ASL_CV_TRANSFER_COMMENTS(a) 520 + #define ASL_CV_CLOSE_PAREN(a,b) acpi_os_printf (")"); 521 + #define ASL_CV_CLOSE_BRACE(a,b) acpi_os_printf ("}"); 522 + #define ASL_CV_SWITCH_FILES(a,b) 523 + #define ASL_CV_CLEAR_OP_COMMENTS(a) 524 + #define ASL_CV_PRINT_ONE_COMMENT(a,b,c,d) 525 + #define ASL_CV_PRINT_ONE_COMMENT_LIST(a,b) 526 + #define ASL_CV_FILE_HAS_SWITCHED(a) 0 527 + #define ASL_CV_INIT_FILETREE(a,b,c) 528 + 529 + #endif 530 + 496 531 #endif /* ACMACROS_H */
+2
drivers/acpi/acpica/acopcode.h
··· 90 90 #define ARGP_BUFFER_OP ARGP_LIST3 (ARGP_PKGLENGTH, ARGP_TERMARG, ARGP_BYTELIST) 91 91 #define ARGP_BYTE_OP ARGP_LIST1 (ARGP_BYTEDATA) 92 92 #define ARGP_BYTELIST_OP ARGP_LIST1 (ARGP_NAMESTRING) 93 + #define ARGP_COMMENT_OP ARGP_LIST2 (ARGP_BYTEDATA, ARGP_COMMENT) 93 94 #define ARGP_CONCAT_OP ARGP_LIST3 (ARGP_TERMARG, ARGP_TERMARG, ARGP_TARGET) 94 95 #define ARGP_CONCAT_RES_OP ARGP_LIST3 (ARGP_TERMARG, ARGP_TERMARG, ARGP_TARGET) 95 96 #define ARGP_COND_REF_OF_OP ARGP_LIST2 (ARGP_SIMPLENAME, ARGP_TARGET) ··· 224 223 #define ARGI_BUFFER_OP ARGI_LIST1 (ARGI_INTEGER) 225 224 #define ARGI_BYTE_OP ARGI_INVALID_OPCODE 226 225 #define ARGI_BYTELIST_OP ARGI_INVALID_OPCODE 226 + #define ARGI_COMMENT_OP ARGI_INVALID_OPCODE 227 227 #define ARGI_CONCAT_OP ARGI_LIST3 (ARGI_ANYTYPE, ARGI_ANYTYPE, ARGI_TARGETREF) 228 228 #define ARGI_CONCAT_RES_OP ARGI_LIST3 (ARGI_BUFFER, ARGI_BUFFER, ARGI_TARGETREF) 229 229 #define ARGI_COND_REF_OF_OP ARGI_LIST2 (ARGI_OBJECT_REF, ARGI_TARGETREF)
+45 -54
drivers/acpi/acpica/amlcode.h
··· 48 48 49 49 /* primary opcodes */ 50 50 51 - #define AML_NULL_CHAR (u16) 0x00 52 - 53 51 #define AML_ZERO_OP (u16) 0x00 54 52 #define AML_ONE_OP (u16) 0x01 55 - #define AML_UNASSIGNED (u16) 0x02 56 53 #define AML_ALIAS_OP (u16) 0x06 57 54 #define AML_NAME_OP (u16) 0x08 58 55 #define AML_BYTE_OP (u16) 0x0a ··· 60 63 #define AML_SCOPE_OP (u16) 0x10 61 64 #define AML_BUFFER_OP (u16) 0x11 62 65 #define AML_PACKAGE_OP (u16) 0x12 63 - #define AML_VAR_PACKAGE_OP (u16) 0x13 /* ACPI 2.0 */ 66 + #define AML_VARIABLE_PACKAGE_OP (u16) 0x13 /* ACPI 2.0 */ 64 67 #define AML_METHOD_OP (u16) 0x14 65 68 #define AML_EXTERNAL_OP (u16) 0x15 /* ACPI 6.0 */ 66 69 #define AML_DUAL_NAME_PREFIX (u16) 0x2e 67 - #define AML_MULTI_NAME_PREFIX_OP (u16) 0x2f 68 - #define AML_NAME_CHAR_SUBSEQ (u16) 0x30 69 - #define AML_NAME_CHAR_FIRST (u16) 0x41 70 - #define AML_EXTENDED_OP_PREFIX (u16) 0x5b 70 + #define AML_MULTI_NAME_PREFIX (u16) 0x2f 71 + #define AML_EXTENDED_PREFIX (u16) 0x5b 71 72 #define AML_ROOT_PREFIX (u16) 0x5c 72 73 #define AML_PARENT_PREFIX (u16) 0x5e 73 - #define AML_LOCAL_OP (u16) 0x60 74 + #define AML_FIRST_LOCAL_OP (u16) 0x60 /* Used for Local op # calculations */ 74 75 #define AML_LOCAL0 (u16) 0x60 75 76 #define AML_LOCAL1 (u16) 0x61 76 77 #define AML_LOCAL2 (u16) 0x62 ··· 77 82 #define AML_LOCAL5 (u16) 0x65 78 83 #define AML_LOCAL6 (u16) 0x66 79 84 #define AML_LOCAL7 (u16) 0x67 80 - #define AML_ARG_OP (u16) 0x68 85 + #define AML_FIRST_ARG_OP (u16) 0x68 /* Used for Arg op # calculations */ 81 86 #define AML_ARG0 (u16) 0x68 82 87 #define AML_ARG1 (u16) 0x69 83 88 #define AML_ARG2 (u16) 0x6a ··· 88 93 #define AML_STORE_OP (u16) 0x70 89 94 #define AML_REF_OF_OP (u16) 0x71 90 95 #define AML_ADD_OP (u16) 0x72 91 - #define AML_CONCAT_OP (u16) 0x73 96 + #define AML_CONCATENATE_OP (u16) 0x73 92 97 #define AML_SUBTRACT_OP (u16) 0x74 93 98 #define AML_INCREMENT_OP (u16) 0x75 94 99 #define AML_DECREMENT_OP (u16) 0x76 ··· 105 110 #define AML_FIND_SET_LEFT_BIT_OP (u16) 0x81 106 111 #define AML_FIND_SET_RIGHT_BIT_OP (u16) 0x82 107 112 #define AML_DEREF_OF_OP (u16) 0x83 108 - #define AML_CONCAT_RES_OP (u16) 0x84 /* ACPI 2.0 */ 113 + #define AML_CONCATENATE_TEMPLATE_OP (u16) 0x84 /* ACPI 2.0 */ 109 114 #define AML_MOD_OP (u16) 0x85 /* ACPI 2.0 */ 110 115 #define AML_NOTIFY_OP (u16) 0x86 111 116 #define AML_SIZE_OF_OP (u16) 0x87 ··· 117 122 #define AML_CREATE_BIT_FIELD_OP (u16) 0x8d 118 123 #define AML_OBJECT_TYPE_OP (u16) 0x8e 119 124 #define AML_CREATE_QWORD_FIELD_OP (u16) 0x8f /* ACPI 2.0 */ 120 - #define AML_LAND_OP (u16) 0x90 121 - #define AML_LOR_OP (u16) 0x91 122 - #define AML_LNOT_OP (u16) 0x92 123 - #define AML_LEQUAL_OP (u16) 0x93 124 - #define AML_LGREATER_OP (u16) 0x94 125 - #define AML_LLESS_OP (u16) 0x95 125 + #define AML_LOGICAL_AND_OP (u16) 0x90 126 + #define AML_LOGICAL_OR_OP (u16) 0x91 127 + #define AML_LOGICAL_NOT_OP (u16) 0x92 128 + #define AML_LOGICAL_EQUAL_OP (u16) 0x93 129 + #define AML_LOGICAL_GREATER_OP (u16) 0x94 130 + #define AML_LOGICAL_LESS_OP (u16) 0x95 126 131 #define AML_TO_BUFFER_OP (u16) 0x96 /* ACPI 2.0 */ 127 - #define AML_TO_DECSTRING_OP (u16) 0x97 /* ACPI 2.0 */ 128 - #define AML_TO_HEXSTRING_OP (u16) 0x98 /* ACPI 2.0 */ 132 + #define AML_TO_DECIMAL_STRING_OP (u16) 0x97 /* ACPI 2.0 */ 133 + #define AML_TO_HEX_STRING_OP (u16) 0x98 /* ACPI 2.0 */ 129 134 #define AML_TO_INTEGER_OP (u16) 0x99 /* ACPI 2.0 */ 130 135 #define AML_TO_STRING_OP (u16) 0x9c /* ACPI 2.0 */ 131 - #define AML_COPY_OP (u16) 0x9d /* ACPI 2.0 */ 136 + #define AML_COPY_OBJECT_OP (u16) 0x9d /* ACPI 2.0 */ 132 137 #define AML_MID_OP (u16) 0x9e /* ACPI 2.0 */ 133 138 #define AML_CONTINUE_OP (u16) 0x9f /* ACPI 2.0 */ 134 139 #define AML_IF_OP (u16) 0xa0 ··· 137 142 #define AML_NOOP_OP (u16) 0xa3 138 143 #define AML_RETURN_OP (u16) 0xa4 139 144 #define AML_BREAK_OP (u16) 0xa5 140 - #define AML_BREAK_POINT_OP (u16) 0xcc 145 + #define AML_COMMENT_OP (u16) 0xa9 146 + #define AML_BREAKPOINT_OP (u16) 0xcc 141 147 #define AML_ONES_OP (u16) 0xff 142 148 143 - /* prefixed opcodes */ 149 + /* 150 + * Combination opcodes (actually two one-byte opcodes) 151 + * Used by the disassembler and iASL compiler 152 + */ 153 + #define AML_LOGICAL_GREATER_EQUAL_OP (u16) 0x9295 /* LNot (LLess) */ 154 + #define AML_LOGICAL_LESS_EQUAL_OP (u16) 0x9294 /* LNot (LGreater) */ 155 + #define AML_LOGICAL_NOT_EQUAL_OP (u16) 0x9293 /* LNot (LEqual) */ 144 156 145 - #define AML_EXTENDED_OPCODE (u16) 0x5b00 /* prefix for 2-byte opcodes */ 157 + /* Prefixed (2-byte) opcodes (with AML_EXTENDED_PREFIX) */ 158 + 159 + #define AML_EXTENDED_OPCODE (u16) 0x5b00 /* Prefix for 2-byte opcodes */ 146 160 147 161 #define AML_MUTEX_OP (u16) 0x5b01 148 162 #define AML_EVENT_OP (u16) 0x5b02 149 - #define AML_SHIFT_RIGHT_BIT_OP (u16) 0x5b10 150 - #define AML_SHIFT_LEFT_BIT_OP (u16) 0x5b11 151 - #define AML_COND_REF_OF_OP (u16) 0x5b12 163 + #define AML_SHIFT_RIGHT_BIT_OP (u16) 0x5b10 /* Obsolete, not in ACPI spec */ 164 + #define AML_SHIFT_LEFT_BIT_OP (u16) 0x5b11 /* Obsolete, not in ACPI spec */ 165 + #define AML_CONDITIONAL_REF_OF_OP (u16) 0x5b12 152 166 #define AML_CREATE_FIELD_OP (u16) 0x5b13 153 167 #define AML_LOAD_TABLE_OP (u16) 0x5b1f /* ACPI 2.0 */ 154 168 #define AML_LOAD_OP (u16) 0x5b20 ··· 179 175 #define AML_FIELD_OP (u16) 0x5b81 180 176 #define AML_DEVICE_OP (u16) 0x5b82 181 177 #define AML_PROCESSOR_OP (u16) 0x5b83 182 - #define AML_POWER_RES_OP (u16) 0x5b84 178 + #define AML_POWER_RESOURCE_OP (u16) 0x5b84 183 179 #define AML_THERMAL_ZONE_OP (u16) 0x5b85 184 180 #define AML_INDEX_FIELD_OP (u16) 0x5b86 185 181 #define AML_BANK_FIELD_OP (u16) 0x5b87 186 182 #define AML_DATA_REGION_OP (u16) 0x5b88 /* ACPI 2.0 */ 187 - 188 - /* 189 - * Combination opcodes (actually two one-byte opcodes) 190 - * Used by the disassembler and iASL compiler 191 - */ 192 - #define AML_LGREATEREQUAL_OP (u16) 0x9295 193 - #define AML_LLESSEQUAL_OP (u16) 0x9294 194 - #define AML_LNOTEQUAL_OP (u16) 0x9293 195 183 196 184 /* 197 185 * Opcodes for "Field" operators ··· 237 241 #define ARGP_SIMPLENAME 0x12 /* name_string | local_term | arg_term */ 238 242 #define ARGP_NAME_OR_REF 0x13 /* For object_type only */ 239 243 #define ARGP_MAX 0x13 244 + #define ARGP_COMMENT 0x14 240 245 241 246 /* 242 247 * Resolved argument types for the AML Interpreter ··· 305 308 #define ARGI_INVALID_OPCODE 0xFFFFFFFF 306 309 307 310 /* 308 - * hash offsets 311 + * Some of the flags and types below are of the form: 312 + * 313 + * AML_FLAGS_EXEC_#A_#T,#R, or 314 + * AML_TYPE_EXEC_#A_#T,#R where: 315 + * 316 + * #A is the number of required arguments 317 + * #T is the number of target operands 318 + * #R indicates whether there is a return value 309 319 */ 310 - #define AML_EXTOP_HASH_OFFSET 22 311 - #define AML_LNOT_HASH_OFFSET 19 312 320 313 321 /* 314 - * opcode groups and types 322 + * Opcode information flags 315 323 */ 316 - #define OPGRP_NAMED 0x01 317 - #define OPGRP_FIELD 0x02 318 - #define OPGRP_BYTELIST 0x04 319 - 320 - /* 321 - * Opcode information 322 - */ 323 - 324 - /* Opcode flags */ 325 - 326 324 #define AML_LOGICAL 0x0001 327 325 #define AML_LOGICAL_NUMERIC 0x0002 328 326 #define AML_MATH 0x0004 ··· 334 342 #define AML_CONSTANT 0x2000 335 343 #define AML_NO_OPERAND_RESOLVE 0x4000 336 344 337 - /* Convenient flag groupings */ 345 + /* Convenient flag groupings of the flags above */ 338 346 339 347 #define AML_FLAGS_EXEC_0A_0T_1R AML_HAS_RETVAL 340 348 #define AML_FLAGS_EXEC_1A_0T_0R AML_HAS_ARGS /* Monadic1 */ ··· 351 359 352 360 /* 353 361 * The opcode Type is used in a dispatch table, do not change 354 - * without updating the table. 362 + * or add anything new without updating the table. 355 363 */ 356 364 #define AML_TYPE_EXEC_0A_0T_1R 0x00 357 365 #define AML_TYPE_EXEC_1A_0T_0R 0x01 /* Monadic1 */ ··· 377 385 378 386 #define AML_TYPE_METHOD_CALL 0x10 379 387 380 - /* Misc */ 388 + /* Miscellaneous types */ 381 389 382 390 #define AML_TYPE_CREATE_FIELD 0x11 383 391 #define AML_TYPE_CREATE_OBJECT 0x12 ··· 387 395 #define AML_TYPE_NAMED_SIMPLE 0x16 388 396 #define AML_TYPE_NAMED_COMPLEX 0x17 389 397 #define AML_TYPE_RETURN 0x18 390 - 391 398 #define AML_TYPE_UNDEFINED 0x19 392 399 #define AML_TYPE_BOGUS 0x1A 393 400
+1
drivers/acpi/acpica/dbmethod.c
··· 422 422 423 423 status = acpi_get_object_info(obj_handle, &obj_info); 424 424 if (ACPI_FAILURE(status)) { 425 + ACPI_FREE(pathname); 425 426 return (status); 426 427 } 427 428
+4 -1
drivers/acpi/acpica/dbxface.c
··· 45 45 #include "accommon.h" 46 46 #include "amlcode.h" 47 47 #include "acdebug.h" 48 + #include "acinterp.h" 48 49 49 50 #define _COMPONENT ACPI_CA_DEBUGGER 50 51 ACPI_MODULE_NAME("dbxface") ··· 126 125 * 127 126 * RETURN: Status 128 127 * 129 - * DESCRIPTION: Called for AML_BREAK_POINT_OP 128 + * DESCRIPTION: Called for AML_BREAKPOINT_OP 130 129 * 131 130 ******************************************************************************/ 132 131 ··· 369 368 walk_state->method_breakpoint = 1; /* Must be non-zero! */ 370 369 } 371 370 371 + acpi_ex_exit_interpreter(); 372 372 status = acpi_db_start_command(walk_state, op); 373 + acpi_ex_enter_interpreter(); 373 374 374 375 /* User commands complete, continue execution of the interrupted method */ 375 376
+1 -1
drivers/acpi/acpica/dscontrol.c
··· 347 347 348 348 break; 349 349 350 - case AML_BREAK_POINT_OP: 350 + case AML_BREAKPOINT_OP: 351 351 352 352 acpi_db_signal_break_point(walk_state); 353 353
+2 -1
drivers/acpi/acpica/dsmthdat.c
··· 672 672 * 673 673 * FUNCTION: acpi_ds_method_data_get_type 674 674 * 675 - * PARAMETERS: opcode - Either AML_LOCAL_OP or AML_ARG_OP 675 + * PARAMETERS: opcode - Either AML_FIRST LOCAL_OP or 676 + * AML_FIRST_ARG_OP 676 677 * index - Which Local or Arg whose type to get 677 678 * walk_state - Current walk state object 678 679 *
+8 -7
drivers/acpi/acpica/dsobject.c
··· 114 114 ((op->common.parent->common.aml_opcode == 115 115 AML_PACKAGE_OP) 116 116 || (op->common.parent->common.aml_opcode == 117 - AML_VAR_PACKAGE_OP))) { 117 + AML_VARIABLE_PACKAGE_OP))) { 118 118 /* 119 119 * We didn't find the target and we are populating elements 120 120 * of a package - ignore if slack enabled. Some ASL code ··· 144 144 145 145 if ((op->common.parent->common.aml_opcode == AML_PACKAGE_OP) || 146 146 (op->common.parent->common.aml_opcode == 147 - AML_VAR_PACKAGE_OP)) { 147 + AML_VARIABLE_PACKAGE_OP)) { 148 148 /* 149 149 * Attempt to resolve the node to a value before we insert it into 150 150 * the package. If this is a reference to a common data type, ··· 398 398 399 399 parent = op->common.parent; 400 400 while ((parent->common.aml_opcode == AML_PACKAGE_OP) || 401 - (parent->common.aml_opcode == AML_VAR_PACKAGE_OP)) { 401 + (parent->common.aml_opcode == AML_VARIABLE_PACKAGE_OP)) { 402 402 parent = parent->common.parent; 403 403 } 404 404 ··· 769 769 switch (op_info->type) { 770 770 case AML_TYPE_LOCAL_VARIABLE: 771 771 772 - /* Local ID (0-7) is (AML opcode - base AML_LOCAL_OP) */ 772 + /* Local ID (0-7) is (AML opcode - base AML_FIRST_LOCAL_OP) */ 773 773 774 774 obj_desc->reference.value = 775 - ((u32)opcode) - AML_LOCAL_OP; 775 + ((u32)opcode) - AML_FIRST_LOCAL_OP; 776 776 obj_desc->reference.class = ACPI_REFCLASS_LOCAL; 777 777 778 778 #ifndef ACPI_NO_METHOD_EXECUTION ··· 790 790 791 791 case AML_TYPE_METHOD_ARGUMENT: 792 792 793 - /* Arg ID (0-6) is (AML opcode - base AML_ARG_OP) */ 793 + /* Arg ID (0-6) is (AML opcode - base AML_FIRST_ARG_OP) */ 794 794 795 - obj_desc->reference.value = ((u32)opcode) - AML_ARG_OP; 795 + obj_desc->reference.value = 796 + ((u32)opcode) - AML_FIRST_ARG_OP; 796 797 obj_desc->reference.class = ACPI_REFCLASS_ARG; 797 798 798 799 #ifndef ACPI_NO_METHOD_EXECUTION
+2 -2
drivers/acpi/acpica/dsopcode.c
··· 639 639 break; 640 640 641 641 case AML_PACKAGE_OP: 642 - case AML_VAR_PACKAGE_OP: 642 + case AML_VARIABLE_PACKAGE_OP: 643 643 644 644 status = 645 645 acpi_ds_build_internal_package_obj(walk_state, op, length, ··· 660 660 if ((!op->common.parent) || 661 661 ((op->common.parent->common.aml_opcode != AML_PACKAGE_OP) && 662 662 (op->common.parent->common.aml_opcode != 663 - AML_VAR_PACKAGE_OP) 663 + AML_VARIABLE_PACKAGE_OP) 664 664 && (op->common.parent->common.aml_opcode != 665 665 AML_NAME_OP))) { 666 666 walk_state->result_obj = obj_desc;
+4 -4
drivers/acpi/acpica/dsutils.c
··· 275 275 if ((op->common.parent->common.aml_opcode == AML_REGION_OP) || 276 276 (op->common.parent->common.aml_opcode == AML_DATA_REGION_OP) 277 277 || (op->common.parent->common.aml_opcode == AML_PACKAGE_OP) 278 - || (op->common.parent->common.aml_opcode == 279 - AML_VAR_PACKAGE_OP) 280 278 || (op->common.parent->common.aml_opcode == AML_BUFFER_OP) 279 + || (op->common.parent->common.aml_opcode == 280 + AML_VARIABLE_PACKAGE_OP) 281 281 || (op->common.parent->common.aml_opcode == 282 282 AML_INT_EVAL_SUBTREE_OP) 283 283 || (op->common.parent->common.aml_opcode == ··· 551 551 */ 552 552 if (status == AE_NOT_FOUND) { 553 553 if (parent_op->common.aml_opcode == 554 - AML_COND_REF_OF_OP) { 554 + AML_CONDITIONAL_REF_OF_OP) { 555 555 /* 556 556 * For the Conditional Reference op, it's OK if 557 557 * the name is not found; We just need a way to ··· 806 806 } 807 807 808 808 if ((op->common.parent->common.aml_opcode == AML_PACKAGE_OP) || 809 - (op->common.parent->common.aml_opcode == AML_VAR_PACKAGE_OP) || 809 + (op->common.parent->common.aml_opcode == AML_VARIABLE_PACKAGE_OP) || 810 810 (op->common.parent->common.aml_opcode == AML_REF_OF_OP)) { 811 811 812 812 /* TBD: Should we specify this feature as a bit of op_info->Flags of these opcodes? */
+1 -1
drivers/acpi/acpica/dswexec.c
··· 497 497 if ((op->asl.parent) && 498 498 ((op->asl.parent->asl.aml_opcode == AML_PACKAGE_OP) 499 499 || (op->asl.parent->asl.aml_opcode == 500 - AML_VAR_PACKAGE_OP))) { 500 + AML_VARIABLE_PACKAGE_OP))) { 501 501 ACPI_DEBUG_PRINT((ACPI_DB_DISPATCH, 502 502 "Method Reference in a Package, Op=%p\n", 503 503 op));
+1 -1
drivers/acpi/acpica/dswload2.c
··· 528 528 status = acpi_ex_create_processor(walk_state); 529 529 break; 530 530 531 - case AML_POWER_RES_OP: 531 + case AML_POWER_RESOURCE_OP: 532 532 533 533 status = acpi_ex_create_power_resource(walk_state); 534 534 break;
+8 -8
drivers/acpi/acpica/exmisc.c
··· 249 249 ACPI_FUNCTION_TRACE(ex_do_logical_numeric_op); 250 250 251 251 switch (opcode) { 252 - case AML_LAND_OP: /* LAnd (Integer0, Integer1) */ 252 + case AML_LOGICAL_AND_OP: /* LAnd (Integer0, Integer1) */ 253 253 254 254 if (integer0 && integer1) { 255 255 local_result = TRUE; 256 256 } 257 257 break; 258 258 259 - case AML_LOR_OP: /* LOr (Integer0, Integer1) */ 259 + case AML_LOGICAL_OR_OP: /* LOr (Integer0, Integer1) */ 260 260 261 261 if (integer0 || integer1) { 262 262 local_result = TRUE; ··· 365 365 integer1 = local_operand1->integer.value; 366 366 367 367 switch (opcode) { 368 - case AML_LEQUAL_OP: /* LEqual (Operand0, Operand1) */ 368 + case AML_LOGICAL_EQUAL_OP: /* LEqual (Operand0, Operand1) */ 369 369 370 370 if (integer0 == integer1) { 371 371 local_result = TRUE; 372 372 } 373 373 break; 374 374 375 - case AML_LGREATER_OP: /* LGreater (Operand0, Operand1) */ 375 + case AML_LOGICAL_GREATER_OP: /* LGreater (Operand0, Operand1) */ 376 376 377 377 if (integer0 > integer1) { 378 378 local_result = TRUE; 379 379 } 380 380 break; 381 381 382 - case AML_LLESS_OP: /* LLess (Operand0, Operand1) */ 382 + case AML_LOGICAL_LESS_OP: /* LLess (Operand0, Operand1) */ 383 383 384 384 if (integer0 < integer1) { 385 385 local_result = TRUE; ··· 408 408 (length0 > length1) ? length1 : length0); 409 409 410 410 switch (opcode) { 411 - case AML_LEQUAL_OP: /* LEqual (Operand0, Operand1) */ 411 + case AML_LOGICAL_EQUAL_OP: /* LEqual (Operand0, Operand1) */ 412 412 413 413 /* Length and all bytes must be equal */ 414 414 ··· 420 420 } 421 421 break; 422 422 423 - case AML_LGREATER_OP: /* LGreater (Operand0, Operand1) */ 423 + case AML_LOGICAL_GREATER_OP: /* LGreater (Operand0, Operand1) */ 424 424 425 425 if (compare > 0) { 426 426 local_result = TRUE; ··· 437 437 } 438 438 break; 439 439 440 - case AML_LLESS_OP: /* LLess (Operand0, Operand1) */ 440 + case AML_LOGICAL_LESS_OP: /* LLess (Operand0, Operand1) */ 441 441 442 442 if (compare > 0) { 443 443 goto cleanup; /* FALSE */
+2 -2
drivers/acpi/acpica/exnames.c
··· 122 122 123 123 /* Set up multi prefixes */ 124 124 125 - *temp_ptr++ = AML_MULTI_NAME_PREFIX_OP; 125 + *temp_ptr++ = AML_MULTI_NAME_PREFIX; 126 126 *temp_ptr++ = (char)num_name_segs; 127 127 } else if (2 == num_name_segs) { 128 128 ··· 342 342 } 343 343 break; 344 344 345 - case AML_MULTI_NAME_PREFIX_OP: 345 + case AML_MULTI_NAME_PREFIX: 346 346 347 347 ACPI_DEBUG_PRINT((ACPI_DB_LOAD, 348 348 "MultiNamePrefix at %p\n",
+8 -9
drivers/acpi/acpica/exoparg1.c
··· 274 274 case AML_FIND_SET_RIGHT_BIT_OP: 275 275 case AML_FROM_BCD_OP: 276 276 case AML_TO_BCD_OP: 277 - case AML_COND_REF_OF_OP: 277 + case AML_CONDITIONAL_REF_OF_OP: 278 278 279 279 /* Create a return object of type Integer for these opcodes */ 280 280 ··· 405 405 } 406 406 break; 407 407 408 - case AML_COND_REF_OF_OP: /* cond_ref_of (source_object, Result) */ 408 + case AML_CONDITIONAL_REF_OF_OP: /* cond_ref_of (source_object, Result) */ 409 409 /* 410 410 * This op is a little strange because the internal return value is 411 411 * different than the return value stored in the result descriptor ··· 475 475 /* 476 476 * ACPI 2.0 Opcodes 477 477 */ 478 - case AML_COPY_OP: /* Copy (Source, Target) */ 478 + case AML_COPY_OBJECT_OP: /* copy_object (Source, Target) */ 479 479 480 480 status = 481 481 acpi_ut_copy_iobject_to_iobject(operand[0], &return_desc, 482 482 walk_state); 483 483 break; 484 484 485 - case AML_TO_DECSTRING_OP: /* to_decimal_string (Data, Result) */ 485 + case AML_TO_DECIMAL_STRING_OP: /* to_decimal_string (Data, Result) */ 486 486 487 487 status = 488 488 acpi_ex_convert_to_string(operand[0], &return_desc, ··· 495 495 } 496 496 break; 497 497 498 - case AML_TO_HEXSTRING_OP: /* to_hex_string (Data, Result) */ 498 + case AML_TO_HEX_STRING_OP: /* to_hex_string (Data, Result) */ 499 499 500 500 status = 501 501 acpi_ex_convert_to_string(operand[0], &return_desc, ··· 603 603 /* Examine the AML opcode */ 604 604 605 605 switch (walk_state->opcode) { 606 - case AML_LNOT_OP: /* LNot (Operand) */ 606 + case AML_LOGICAL_NOT_OP: /* LNot (Operand) */ 607 607 608 608 return_desc = acpi_ut_create_integer_object((u64) 0); 609 609 if (!return_desc) { ··· 652 652 * NOTE: We use LNOT_OP here in order to force resolution of the 653 653 * reference operand to an actual integer. 654 654 */ 655 - status = 656 - acpi_ex_resolve_operands(AML_LNOT_OP, &temp_desc, 657 - walk_state); 655 + status = acpi_ex_resolve_operands(AML_LOGICAL_NOT_OP, 656 + &temp_desc, walk_state); 658 657 if (ACPI_FAILURE(status)) { 659 658 ACPI_EXCEPTION((AE_INFO, status, 660 659 "While resolving operands for [%s]",
+2 -2
drivers/acpi/acpica/exoparg2.c
··· 298 298 NULL, &return_desc->integer.value); 299 299 break; 300 300 301 - case AML_CONCAT_OP: /* Concatenate (Data1, Data2, Result) */ 301 + case AML_CONCATENATE_OP: /* Concatenate (Data1, Data2, Result) */ 302 302 303 303 status = 304 304 acpi_ex_do_concatenate(operand[0], operand[1], &return_desc, ··· 343 343 operand[0]->buffer.pointer, length); 344 344 break; 345 345 346 - case AML_CONCAT_RES_OP: 346 + case AML_CONCATENATE_TEMPLATE_OP: 347 347 348 348 /* concatenate_res_template (Buffer, Buffer, Result) (ACPI 2.0) */ 349 349
+8 -8
drivers/acpi/acpica/exoparg6.c
··· 124 124 * Change to: (M == P[i]) 125 125 */ 126 126 status = 127 - acpi_ex_do_logical_op(AML_LEQUAL_OP, match_obj, package_obj, 128 - &logical_result); 127 + acpi_ex_do_logical_op(AML_LOGICAL_EQUAL_OP, match_obj, 128 + package_obj, &logical_result); 129 129 if (ACPI_FAILURE(status)) { 130 130 return (FALSE); 131 131 } ··· 137 137 * Change to: (M >= P[i]) (M not_less than P[i]) 138 138 */ 139 139 status = 140 - acpi_ex_do_logical_op(AML_LLESS_OP, match_obj, package_obj, 141 - &logical_result); 140 + acpi_ex_do_logical_op(AML_LOGICAL_LESS_OP, match_obj, 141 + package_obj, &logical_result); 142 142 if (ACPI_FAILURE(status)) { 143 143 return (FALSE); 144 144 } ··· 151 151 * Change to: (M > P[i]) 152 152 */ 153 153 status = 154 - acpi_ex_do_logical_op(AML_LGREATER_OP, match_obj, 154 + acpi_ex_do_logical_op(AML_LOGICAL_GREATER_OP, match_obj, 155 155 package_obj, &logical_result); 156 156 if (ACPI_FAILURE(status)) { 157 157 return (FALSE); ··· 164 164 * Change to: (M <= P[i]) (M not_greater than P[i]) 165 165 */ 166 166 status = 167 - acpi_ex_do_logical_op(AML_LGREATER_OP, match_obj, 167 + acpi_ex_do_logical_op(AML_LOGICAL_GREATER_OP, match_obj, 168 168 package_obj, &logical_result); 169 169 if (ACPI_FAILURE(status)) { 170 170 return (FALSE); ··· 178 178 * Change to: (M < P[i]) 179 179 */ 180 180 status = 181 - acpi_ex_do_logical_op(AML_LLESS_OP, match_obj, package_obj, 182 - &logical_result); 181 + acpi_ex_do_logical_op(AML_LOGICAL_LESS_OP, match_obj, 182 + package_obj, &logical_result); 183 183 if (ACPI_FAILURE(status)) { 184 184 return (FALSE); 185 185 }
+2 -1
drivers/acpi/acpica/exresolv.c
··· 196 196 197 197 if ((walk_state->opcode == 198 198 AML_INT_METHODCALL_OP) 199 - || (walk_state->opcode == AML_COPY_OP)) { 199 + || (walk_state->opcode == 200 + AML_COPY_OBJECT_OP)) { 200 201 break; 201 202 } 202 203
+3 -2
drivers/acpi/acpica/exstore.c
··· 416 416 417 417 /* Only limited target types possible for everything except copy_object */ 418 418 419 - if (walk_state->opcode != AML_COPY_OP) { 419 + if (walk_state->opcode != AML_COPY_OBJECT_OP) { 420 420 /* 421 421 * Only copy_object allows all object types to be overwritten. For 422 422 * target_ref(s), there are restrictions on the object types that ··· 499 499 case ACPI_TYPE_STRING: 500 500 case ACPI_TYPE_BUFFER: 501 501 502 - if ((walk_state->opcode == AML_COPY_OP) || !implicit_conversion) { 502 + if ((walk_state->opcode == AML_COPY_OBJECT_OP) || 503 + !implicit_conversion) { 503 504 /* 504 505 * However, copy_object and Stores to arg_x do not perform 505 506 * an implicit conversion, as per the ACPI specification.
+1 -1
drivers/acpi/acpica/exstoren.c
··· 107 107 108 108 /* For copy_object, no further validation necessary */ 109 109 110 - if (walk_state->opcode == AML_COPY_OP) { 110 + if (walk_state->opcode == AML_COPY_OBJECT_OP) { 111 111 break; 112 112 } 113 113
+9 -9
drivers/acpi/acpica/hwvalid.c
··· 102 102 {"PCI", 0x0CF8, 0x0CFF, ACPI_OSI_WIN_XP} 103 103 }; 104 104 105 - #define ACPI_PORT_INFO_ENTRIES ACPI_ARRAY_LENGTH (acpi_protected_ports) 105 + #define ACPI_PORT_INFO_ENTRIES ACPI_ARRAY_LENGTH (acpi_protected_ports) 106 106 107 107 /****************************************************************************** 108 108 * ··· 128 128 acpi_io_address last_address; 129 129 const struct acpi_port_info *port_info; 130 130 131 - ACPI_FUNCTION_TRACE(hw_validate_io_request); 131 + ACPI_FUNCTION_NAME(hw_validate_io_request); 132 132 133 133 /* Supported widths are 8/16/32 */ 134 134 ··· 153 153 ACPI_ERROR((AE_INFO, 154 154 "Illegal I/O port address/length above 64K: %8.8X%8.8X/0x%X", 155 155 ACPI_FORMAT_UINT64(address), byte_width)); 156 - return_ACPI_STATUS(AE_LIMIT); 156 + return (AE_LIMIT); 157 157 } 158 158 159 159 /* Exit if requested address is not within the protected port table */ 160 160 161 161 if (address > acpi_protected_ports[ACPI_PORT_INFO_ENTRIES - 1].end) { 162 - return_ACPI_STATUS(AE_OK); 162 + return (AE_OK); 163 163 } 164 164 165 165 /* Check request against the list of protected I/O ports */ ··· 167 167 for (i = 0; i < ACPI_PORT_INFO_ENTRIES; i++, port_info++) { 168 168 /* 169 169 * Check if the requested address range will write to a reserved 170 - * port. Four cases to consider: 170 + * port. There are four cases to consider: 171 171 * 172 172 * 1) Address range is contained completely in the port address range 173 173 * 2) Address range overlaps port range at the port range start ··· 198 198 } 199 199 } 200 200 201 - return_ACPI_STATUS(AE_OK); 201 + return (AE_OK); 202 202 } 203 203 204 204 /****************************************************************************** ··· 206 206 * FUNCTION: acpi_hw_read_port 207 207 * 208 208 * PARAMETERS: Address Address of I/O port/register to read 209 - * Value Where value is placed 209 + * Value Where value (data) is returned 210 210 * Width Number of bits 211 211 * 212 212 * RETURN: Status and value read from port ··· 244 244 /* 245 245 * There has been a protection violation within the request. Fall 246 246 * back to byte granularity port I/O and ignore the failing bytes. 247 - * This provides Windows compatibility. 247 + * This provides compatibility with other ACPI implementations. 248 248 */ 249 249 for (i = 0, *value = 0; i < width; i += 8) { 250 250 ··· 307 307 /* 308 308 * There has been a protection violation within the request. Fall 309 309 * back to byte granularity port I/O and ignore the failing bytes. 310 - * This provides Windows compatibility. 310 + * This provides compatibility with other ACPI implementations. 311 311 */ 312 312 for (i = 0; i < width; i += 8) { 313 313
+1 -1
drivers/acpi/acpica/nsaccess.c
··· 485 485 flags)); 486 486 break; 487 487 488 - case AML_MULTI_NAME_PREFIX_OP: 488 + case AML_MULTI_NAME_PREFIX: 489 489 490 490 /* More than one name_seg, search rules do not apply */ 491 491
+3 -13
drivers/acpi/acpica/nsrepair.c
··· 290 290 /* Object was successfully repaired */ 291 291 292 292 if (package_index != ACPI_NOT_PACKAGE_ELEMENT) { 293 - /* 294 - * The original object is a package element. We need to 295 - * decrement the reference count of the original object, 296 - * for removing it from the package. 297 - * 298 - * However, if the original object was just wrapped with a 299 - * package object as part of the repair, we don't need to 300 - * change the reference count. 301 - */ 293 + 294 + /* Update reference count of new object */ 295 + 302 296 if (!(info->return_flags & ACPI_OBJECT_WRAPPED)) { 303 297 new_object->common.reference_count = 304 298 return_object->common.reference_count; 305 - 306 - if (return_object->common.reference_count > 1) { 307 - return_object->common.reference_count--; 308 - } 309 299 } 310 300 311 301 ACPI_DEBUG_PRINT((ACPI_DB_REPAIR,
+1 -5
drivers/acpi/acpica/nsrepair2.c
··· 403 403 return (status); 404 404 } 405 405 406 - /* Take care with reference counts */ 407 - 408 406 if (original_element != *element_ptr) { 409 407 410 - /* Element was replaced */ 408 + /* Update reference count of new object */ 411 409 412 410 (*element_ptr)->common.reference_count = 413 411 original_ref_count; 414 - 415 - acpi_ut_remove_reference(original_element); 416 412 } 417 413 418 414 element_ptr++;
+12 -17
drivers/acpi/acpica/nsutils.c
··· 252 252 internal_name[1] = AML_DUAL_NAME_PREFIX; 253 253 result = &internal_name[2]; 254 254 } else { 255 - internal_name[1] = AML_MULTI_NAME_PREFIX_OP; 255 + internal_name[1] = AML_MULTI_NAME_PREFIX; 256 256 internal_name[2] = (char)num_segments; 257 257 result = &internal_name[3]; 258 258 } ··· 274 274 internal_name[i] = AML_DUAL_NAME_PREFIX; 275 275 result = &internal_name[(acpi_size)i + 1]; 276 276 } else { 277 - internal_name[i] = AML_MULTI_NAME_PREFIX_OP; 277 + internal_name[i] = AML_MULTI_NAME_PREFIX; 278 278 internal_name[(acpi_size)i + 1] = (char)num_segments; 279 279 result = &internal_name[(acpi_size)i + 2]; 280 280 } ··· 450 450 */ 451 451 if (prefix_length < internal_name_length) { 452 452 switch (internal_name[prefix_length]) { 453 - case AML_MULTI_NAME_PREFIX_OP: 453 + case AML_MULTI_NAME_PREFIX: 454 454 455 455 /* <count> 4-byte names */ 456 456 ··· 594 594 void acpi_ns_terminate(void) 595 595 { 596 596 acpi_status status; 597 + union acpi_operand_object *prev; 598 + union acpi_operand_object *next; 597 599 598 600 ACPI_FUNCTION_TRACE(ns_terminate); 599 601 600 - #ifdef ACPI_EXEC_APP 601 - { 602 - union acpi_operand_object *prev; 603 - union acpi_operand_object *next; 602 + /* Delete any module-level code blocks */ 604 603 605 - /* Delete any module-level code blocks */ 606 - 607 - next = acpi_gbl_module_code_list; 608 - while (next) { 609 - prev = next; 610 - next = next->method.mutex; 611 - prev->method.mutex = NULL; /* Clear the Mutex (cheated) field */ 612 - acpi_ut_remove_reference(prev); 613 - } 604 + next = acpi_gbl_module_code_list; 605 + while (next) { 606 + prev = next; 607 + next = next->method.mutex; 608 + prev->method.mutex = NULL; /* Clear the Mutex (cheated) field */ 609 + acpi_ut_remove_reference(prev); 614 610 } 615 - #endif 616 611 617 612 /* 618 613 * Free the entire namespace -- all nodes and all objects
+26 -3
drivers/acpi/acpica/psargs.c
··· 47 47 #include "amlcode.h" 48 48 #include "acnamesp.h" 49 49 #include "acdispat.h" 50 + #include "acconvert.h" 50 51 51 52 #define _COMPONENT ACPI_PARSER 52 53 ACPI_MODULE_NAME("psargs") ··· 187 186 end += 1 + (2 * ACPI_NAME_SIZE); 188 187 break; 189 188 190 - case AML_MULTI_NAME_PREFIX_OP: 189 + case AML_MULTI_NAME_PREFIX: 191 190 192 191 /* Multiple name segments, 4 chars each, count in next byte */ 193 192 ··· 340 339 /* 2) not_found during a cond_ref_of(x) is ok by definition */ 341 340 342 341 else if (walk_state->op->common.aml_opcode == 343 - AML_COND_REF_OF_OP) { 342 + AML_CONDITIONAL_REF_OF_OP) { 344 343 status = AE_OK; 345 344 } 346 345 ··· 353 352 ((arg->common.parent->common.aml_opcode == 354 353 AML_PACKAGE_OP) 355 354 || (arg->common.parent->common.aml_opcode == 356 - AML_VAR_PACKAGE_OP))) { 355 + AML_VARIABLE_PACKAGE_OP))) { 357 356 status = AE_OK; 358 357 } 359 358 } ··· 503 502 504 503 ACPI_FUNCTION_TRACE(ps_get_next_field); 505 504 505 + ASL_CV_CAPTURE_COMMENTS_ONLY(parser_state); 506 506 aml = parser_state->aml; 507 507 508 508 /* Determine field type */ ··· 548 546 549 547 /* Decode the field type */ 550 548 549 + ASL_CV_CAPTURE_COMMENTS_ONLY(parser_state); 551 550 switch (opcode) { 552 551 case AML_INT_NAMEDFIELD_OP: 553 552 ··· 557 554 ACPI_MOVE_32_TO_32(&name, parser_state->aml); 558 555 acpi_ps_set_name(field, name); 559 556 parser_state->aml += ACPI_NAME_SIZE; 557 + 558 + ASL_CV_CAPTURE_COMMENTS_ONLY(parser_state); 559 + 560 + #ifdef ACPI_ASL_COMPILER 561 + /* 562 + * Because the package length isn't represented as a parse tree object, 563 + * take comments surrounding this and add to the previously created 564 + * parse node. 565 + */ 566 + if (field->common.inline_comment) { 567 + field->common.name_comment = 568 + field->common.inline_comment; 569 + } 570 + field->common.inline_comment = acpi_gbl_current_inline_comment; 571 + acpi_gbl_current_inline_comment = NULL; 572 + #endif 560 573 561 574 /* Get the length which is encoded as a package length */ 562 575 ··· 628 609 if (ACPI_GET8(parser_state->aml) == AML_BUFFER_OP) { 629 610 parser_state->aml++; 630 611 612 + ASL_CV_CAPTURE_COMMENTS_ONLY(parser_state); 631 613 pkg_end = parser_state->aml; 632 614 pkg_length = 633 615 acpi_ps_get_next_package_length(parser_state); 634 616 pkg_end += pkg_length; 635 617 618 + ASL_CV_CAPTURE_COMMENTS_ONLY(parser_state); 636 619 if (parser_state->aml < pkg_end) { 637 620 638 621 /* Non-empty list */ ··· 651 630 opcode = ACPI_GET8(parser_state->aml); 652 631 parser_state->aml++; 653 632 633 + ASL_CV_CAPTURE_COMMENTS_ONLY(parser_state); 654 634 switch (opcode) { 655 635 case AML_BYTE_OP: /* AML_BYTEDATA_ARG */ 656 636 ··· 682 660 683 661 /* Fill in bytelist data */ 684 662 663 + ASL_CV_CAPTURE_COMMENTS_ONLY(parser_state); 685 664 arg->named.value.size = buffer_length; 686 665 arg->named.data = parser_state->aml; 687 666 }
+33 -1
drivers/acpi/acpica/psloop.c
··· 55 55 #include "acparser.h" 56 56 #include "acdispat.h" 57 57 #include "amlcode.h" 58 + #include "acconvert.h" 58 59 59 60 #define _COMPONENT ACPI_PARSER 60 61 ACPI_MODULE_NAME("psloop") ··· 132 131 while (GET_CURRENT_ARG_TYPE(walk_state->arg_types) && 133 132 !walk_state->arg_count) { 134 133 walk_state->aml = walk_state->parser_state.aml; 134 + 135 + switch (op->common.aml_opcode) { 136 + case AML_METHOD_OP: 137 + case AML_BUFFER_OP: 138 + case AML_PACKAGE_OP: 139 + case AML_VARIABLE_PACKAGE_OP: 140 + case AML_WHILE_OP: 141 + 142 + break; 143 + 144 + default: 145 + 146 + ASL_CV_CAPTURE_COMMENTS(walk_state); 147 + break; 148 + } 135 149 136 150 status = 137 151 acpi_ps_get_next_arg(walk_state, ··· 270 254 271 255 case AML_BUFFER_OP: 272 256 case AML_PACKAGE_OP: 273 - case AML_VAR_PACKAGE_OP: 257 + case AML_VARIABLE_PACKAGE_OP: 274 258 275 259 if ((op->common.parent) && 276 260 (op->common.parent->common.aml_opcode == ··· 496 480 /* Iterative parsing loop, while there is more AML to process: */ 497 481 498 482 while ((parser_state->aml < parser_state->aml_end) || (op)) { 483 + ASL_CV_CAPTURE_COMMENTS(walk_state); 484 + 499 485 aml_op_start = parser_state->aml; 500 486 if (!op) { 501 487 status = ··· 533 515 * any args yet 534 516 */ 535 517 walk_state->arg_count = 0; 518 + 519 + switch (op->common.aml_opcode) { 520 + case AML_BYTE_OP: 521 + case AML_WORD_OP: 522 + case AML_DWORD_OP: 523 + case AML_QWORD_OP: 524 + 525 + break; 526 + 527 + default: 528 + 529 + ASL_CV_CAPTURE_COMMENTS(walk_state); 530 + break; 531 + } 536 532 537 533 /* Are there any arguments that must be processed? */ 538 534
+38
drivers/acpi/acpica/psobject.c
··· 45 45 #include "accommon.h" 46 46 #include "acparser.h" 47 47 #include "amlcode.h" 48 + #include "acconvert.h" 48 49 49 50 #define _COMPONENT ACPI_PARSER 50 51 ACPI_MODULE_NAME("psobject") ··· 191 190 */ 192 191 while (GET_CURRENT_ARG_TYPE(walk_state->arg_types) && 193 192 (GET_CURRENT_ARG_TYPE(walk_state->arg_types) != ARGP_NAME)) { 193 + ASL_CV_CAPTURE_COMMENTS(walk_state); 194 194 status = 195 195 acpi_ps_get_next_arg(walk_state, 196 196 &(walk_state->parser_state), ··· 204 202 acpi_ps_append_arg(unnamed_op, arg); 205 203 INCREMENT_ARG_LIST(walk_state->arg_types); 206 204 } 205 + 206 + /* are there any inline comments associated with the name_seg?? If so, save this. */ 207 + 208 + ASL_CV_CAPTURE_COMMENTS(walk_state); 209 + 210 + #ifdef ACPI_ASL_COMPILER 211 + if (acpi_gbl_current_inline_comment != NULL) { 212 + unnamed_op->common.name_comment = 213 + acpi_gbl_current_inline_comment; 214 + acpi_gbl_current_inline_comment = NULL; 215 + } 216 + #endif 207 217 208 218 /* 209 219 * Make sure that we found a NAME and didn't run out of arguments ··· 256 242 } 257 243 258 244 acpi_ps_append_arg(*op, unnamed_op->common.value.arg); 245 + 246 + #ifdef ACPI_ASL_COMPILER 247 + 248 + /* save any comments that might be associated with unnamed_op. */ 249 + 250 + (*op)->common.inline_comment = unnamed_op->common.inline_comment; 251 + (*op)->common.end_node_comment = unnamed_op->common.end_node_comment; 252 + (*op)->common.close_brace_comment = 253 + unnamed_op->common.close_brace_comment; 254 + (*op)->common.name_comment = unnamed_op->common.name_comment; 255 + (*op)->common.comment_list = unnamed_op->common.comment_list; 256 + (*op)->common.end_blk_comment = unnamed_op->common.end_blk_comment; 257 + (*op)->common.cv_filename = unnamed_op->common.cv_filename; 258 + (*op)->common.cv_parent_filename = 259 + unnamed_op->common.cv_parent_filename; 260 + (*op)->named.aml = unnamed_op->common.aml; 261 + 262 + unnamed_op->common.inline_comment = NULL; 263 + unnamed_op->common.end_node_comment = NULL; 264 + unnamed_op->common.close_brace_comment = NULL; 265 + unnamed_op->common.name_comment = NULL; 266 + unnamed_op->common.comment_list = NULL; 267 + unnamed_op->common.end_blk_comment = NULL; 268 + #endif 259 269 260 270 if ((*op)->common.aml_opcode == AML_REGION_OP || 261 271 (*op)->common.aml_opcode == AML_DATA_REGION_OP) {
+9 -6
drivers/acpi/acpica/psopcode.c
··· 69 69 AML_DEVICE_OP 70 70 AML_THERMAL_ZONE_OP 71 71 AML_METHOD_OP 72 - AML_POWER_RES_OP 72 + AML_POWER_RESOURCE_OP 73 73 AML_PROCESSOR_OP 74 74 AML_FIELD_OP 75 75 AML_INDEX_FIELD_OP ··· 95 95 AML_DEVICE_OP 96 96 AML_THERMAL_ZONE_OP 97 97 AML_METHOD_OP 98 - AML_POWER_RES_OP 98 + AML_POWER_RESOURCE_OP 99 99 AML_PROCESSOR_OP 100 100 AML_FIELD_OP 101 101 AML_INDEX_FIELD_OP ··· 113 113 AML_DEVICE_OP 114 114 AML_THERMAL_ZONE_OP 115 115 AML_METHOD_OP 116 - AML_POWER_RES_OP 116 + AML_POWER_RESOURCE_OP 117 117 AML_PROCESSOR_OP 118 118 AML_NAME_OP 119 119 AML_ALIAS_OP ··· 136 136 AML_DEVICE_OP 137 137 AML_THERMAL_ZONE_OP 138 138 AML_METHOD_OP 139 - AML_POWER_RES_OP 139 + AML_POWER_RESOURCE_OP 140 140 AML_PROCESSOR_OP 141 141 AML_NAME_OP 142 142 AML_ALIAS_OP ··· 149 149 must be deferred until needed 150 150 151 151 AML_METHOD_OP 152 - AML_VAR_PACKAGE_OP 152 + AML_VARIABLE_PACKAGE_OP 153 153 AML_CREATE_FIELD_OP 154 154 AML_CREATE_BIT_FIELD_OP 155 155 AML_CREATE_BYTE_FIELD_OP ··· 652 652 653 653 /* 81 */ ACPI_OP("External", ARGP_EXTERNAL_OP, ARGI_EXTERNAL_OP, 654 654 ACPI_TYPE_ANY, AML_CLASS_EXECUTE, /* ? */ 655 - AML_TYPE_EXEC_3A_0T_0R, AML_FLAGS_EXEC_3A_0T_0R) 655 + AML_TYPE_EXEC_3A_0T_0R, AML_FLAGS_EXEC_3A_0T_0R), 656 + /* 82 */ ACPI_OP("Comment", ARGP_COMMENT_OP, ARGI_COMMENT_OP, 657 + ACPI_TYPE_STRING, AML_CLASS_ARGUMENT, 658 + AML_TYPE_LITERAL, AML_CONSTANT) 656 659 657 660 /*! [End] no source code translation !*/ 658 661 };
+1 -1
drivers/acpi/acpica/psopinfo.c
··· 226 226 /* 0x90 */ 0x38, 0x39, 0x3a, 0x3b, 0x3c, 0x3d, 0x73, 0x74, 227 227 /* 0x98 */ 0x75, 0x76, _UNK, _UNK, 0x77, 0x78, 0x79, 0x7A, 228 228 /* 0xA0 */ 0x3e, 0x3f, 0x40, 0x41, 0x42, 0x43, 0x60, 0x61, 229 - /* 0xA8 */ 0x62, _UNK, _UNK, _UNK, _UNK, _UNK, _UNK, _UNK, 229 + /* 0xA8 */ 0x62, 0x82, _UNK, _UNK, _UNK, _UNK, _UNK, _UNK, 230 230 /* 0xB0 */ _UNK, _UNK, _UNK, _UNK, _UNK, _UNK, _UNK, _UNK, 231 231 /* 0xB8 */ _UNK, _UNK, _UNK, _UNK, _UNK, _UNK, _UNK, _UNK, 232 232 /* 0xC0 */ _UNK, _UNK, _UNK, _UNK, _UNK, _UNK, _UNK, _UNK,
+3 -3
drivers/acpi/acpica/psparse.c
··· 105 105 aml = parser_state->aml; 106 106 opcode = (u16) ACPI_GET8(aml); 107 107 108 - if (opcode == AML_EXTENDED_OP_PREFIX) { 108 + if (opcode == AML_EXTENDED_PREFIX) { 109 109 110 110 /* Extended opcode, get the second opcode byte */ 111 111 ··· 210 210 || (op->common.parent->common.aml_opcode == 211 211 AML_BANK_FIELD_OP) 212 212 || (op->common.parent->common.aml_opcode == 213 - AML_VAR_PACKAGE_OP)) { 213 + AML_VARIABLE_PACKAGE_OP)) { 214 214 replacement_op = 215 215 acpi_ps_alloc_op(AML_INT_RETURN_VALUE_OP, 216 216 op->common.aml); ··· 225 225 if ((op->common.aml_opcode == AML_BUFFER_OP) 226 226 || (op->common.aml_opcode == AML_PACKAGE_OP) 227 227 || (op->common.aml_opcode == 228 - AML_VAR_PACKAGE_OP)) { 228 + AML_VARIABLE_PACKAGE_OP)) { 229 229 replacement_op = 230 230 acpi_ps_alloc_op(op->common. 231 231 aml_opcode,
+8 -1
drivers/acpi/acpica/pstree.c
··· 45 45 #include "accommon.h" 46 46 #include "acparser.h" 47 47 #include "amlcode.h" 48 + #include "acconvert.h" 48 49 49 50 #define _COMPONENT ACPI_PARSER 50 51 ACPI_MODULE_NAME("pstree") ··· 217 216 218 217 next = acpi_ps_get_arg(op, 0); 219 218 if (next) { 219 + ASL_CV_LABEL_FILENODE(next); 220 220 return (next); 221 221 } 222 222 ··· 225 223 226 224 next = op->common.next; 227 225 if (next) { 226 + ASL_CV_LABEL_FILENODE(next); 228 227 return (next); 229 228 } 230 229 ··· 236 233 while (parent) { 237 234 arg = acpi_ps_get_arg(parent, 0); 238 235 while (arg && (arg != origin) && (arg != op)) { 236 + 237 + ASL_CV_LABEL_FILENODE(arg); 239 238 arg = arg->common.next; 240 239 } 241 240 ··· 252 247 253 248 /* Found sibling of parent */ 254 249 250 + ASL_CV_LABEL_FILENODE(parent->common.next); 255 251 return (parent->common.next); 256 252 } 257 253 ··· 260 254 parent = parent->common.parent; 261 255 } 262 256 257 + ASL_CV_LABEL_FILENODE(next); 263 258 return (next); 264 259 } 265 260 ··· 303 296 child = acpi_ps_get_arg(op, 1); 304 297 break; 305 298 306 - case AML_POWER_RES_OP: 299 + case AML_POWER_RESOURCE_OP: 307 300 case AML_INDEX_FIELD_OP: 308 301 309 302 child = acpi_ps_get_arg(op, 2);
+11
drivers/acpi/acpica/psutils.c
··· 45 45 #include "accommon.h" 46 46 #include "acparser.h" 47 47 #include "amlcode.h" 48 + #include "acconvert.h" 48 49 49 50 #define _COMPONENT ACPI_PARSER 50 51 ACPI_MODULE_NAME("psutils") ··· 153 152 acpi_ps_init_op(op, opcode); 154 153 op->common.aml = aml; 155 154 op->common.flags = flags; 155 + ASL_CV_CLEAR_OP_COMMENTS(op); 156 + 157 + if (opcode == AML_SCOPE_OP) { 158 + acpi_gbl_current_scope = op; 159 + } 160 + } 161 + 162 + if (gbl_capture_comments) { 163 + ASL_CV_TRANSFER_COMMENTS(op); 156 164 } 157 165 158 166 return (op); ··· 184 174 { 185 175 ACPI_FUNCTION_NAME(ps_free_op); 186 176 177 + ASL_CV_CLEAR_OP_COMMENTS(op); 187 178 if (op->common.aml_opcode == AML_INT_RETURN_VALUE_OP) { 188 179 ACPI_DEBUG_PRINT((ACPI_DB_ALLOCATIONS, 189 180 "Free retval op: %p\n", op));
+50
drivers/acpi/acpica/utalloc.c
··· 142 142 if (ACPI_FAILURE(status)) { 143 143 return (status); 144 144 } 145 + #ifdef ACPI_ASL_COMPILER 146 + /* 147 + * For use with the ASL-/ASL+ option. This cache keeps track of regular 148 + * 0xA9 0x01 comments. 149 + */ 150 + status = 151 + acpi_os_create_cache("Acpi-Comment", 152 + sizeof(struct acpi_comment_node), 153 + ACPI_MAX_COMMENT_CACHE_DEPTH, 154 + &acpi_gbl_reg_comment_cache); 155 + if (ACPI_FAILURE(status)) { 156 + return (status); 157 + } 158 + 159 + /* 160 + * This cache keeps track of the starting addresses of where the comments 161 + * lie. This helps prevent duplication of comments. 162 + */ 163 + status = 164 + acpi_os_create_cache("Acpi-Comment-Addr", 165 + sizeof(struct acpi_comment_addr_node), 166 + ACPI_MAX_COMMENT_CACHE_DEPTH, 167 + &acpi_gbl_comment_addr_cache); 168 + if (ACPI_FAILURE(status)) { 169 + return (status); 170 + } 171 + 172 + /* 173 + * This cache will be used for nodes that represent files. 174 + */ 175 + status = 176 + acpi_os_create_cache("Acpi-File", sizeof(struct acpi_file_node), 177 + ACPI_MAX_COMMENT_CACHE_DEPTH, 178 + &acpi_gbl_file_cache); 179 + if (ACPI_FAILURE(status)) { 180 + return (status); 181 + } 182 + #endif 183 + 145 184 #ifdef ACPI_DBG_TRACK_ALLOCATIONS 146 185 147 186 /* Memory allocation lists */ ··· 239 200 240 201 (void)acpi_os_delete_cache(acpi_gbl_ps_node_ext_cache); 241 202 acpi_gbl_ps_node_ext_cache = NULL; 203 + 204 + #ifdef ACPI_ASL_COMPILER 205 + (void)acpi_os_delete_cache(acpi_gbl_reg_comment_cache); 206 + acpi_gbl_reg_comment_cache = NULL; 207 + 208 + (void)acpi_os_delete_cache(acpi_gbl_comment_addr_cache); 209 + acpi_gbl_comment_addr_cache = NULL; 210 + 211 + (void)acpi_os_delete_cache(acpi_gbl_file_cache); 212 + acpi_gbl_file_cache = NULL; 213 + #endif 242 214 243 215 #ifdef ACPI_DBG_TRACK_ALLOCATIONS 244 216
+1 -1
drivers/acpi/acpica/utcache.c
··· 71 71 72 72 ACPI_FUNCTION_ENTRY(); 73 73 74 - if (!cache_name || !return_cache || (object_size < 16)) { 74 + if (!cache_name || !return_cache || !object_size) { 75 75 return (AE_BAD_PARAMETER); 76 76 } 77 77
+1
drivers/acpi/acpica/utdebug.c
··· 627 627 } 628 628 629 629 ACPI_EXPORT_SYMBOL(acpi_trace_point) 630 + 630 631 #endif
+9
drivers/acpi/acpica/utresrc.c
··· 474 474 return_ACPI_STATUS(AE_AML_NO_RESOURCE_END_TAG); 475 475 } 476 476 477 + /* 478 + * The end_tag opcode must be followed by a zero byte. 479 + * Although this byte is technically defined to be a checksum, 480 + * in practice, all ASL compilers set this byte to zero. 481 + */ 482 + if (*(aml + 1) != 0) { 483 + return_ACPI_STATUS(AE_AML_NO_RESOURCE_END_TAG); 484 + } 485 + 477 486 /* Return the pointer to the end_tag if requested */ 478 487 479 488 if (!user_function) {
+6 -10
drivers/acpi/acpica/utxferror.c
··· 91 91 * 92 92 * PARAMETERS: module_name - Caller's module name (for error output) 93 93 * line_number - Caller's line number (for error output) 94 - * status - Status to be formatted 94 + * status - Status value to be decoded/formatted 95 95 * format - Printf format string + additional args 96 96 * 97 97 * RETURN: None ··· 132 132 * 133 133 * FUNCTION: acpi_warning 134 134 * 135 - * PARAMETERS: module_name - Caller's module name (for error output) 136 - * line_number - Caller's line number (for error output) 135 + * PARAMETERS: module_name - Caller's module name (for warning output) 136 + * line_number - Caller's line number (for warning output) 137 137 * format - Printf format string + additional args 138 138 * 139 139 * RETURN: None ··· 163 163 * 164 164 * FUNCTION: acpi_info 165 165 * 166 - * PARAMETERS: module_name - Caller's module name (for error output) 167 - * line_number - Caller's line number (for error output) 168 - * format - Printf format string + additional args 166 + * PARAMETERS: format - Printf format string + additional args 169 167 * 170 168 * RETURN: None 171 169 * 172 170 * DESCRIPTION: Print generic "ACPI:" information message. There is no 173 171 * module/line/version info in order to keep the message simple. 174 - * 175 - * TBD: module_name and line_number args are not needed, should be removed. 176 172 * 177 173 ******************************************************************************/ 178 174 void ACPI_INTERNAL_VAR_XFACE acpi_info(const char *format, ...) ··· 225 229 * 226 230 * FUNCTION: acpi_bios_warning 227 231 * 228 - * PARAMETERS: module_name - Caller's module name (for error output) 229 - * line_number - Caller's line number (for error output) 232 + * PARAMETERS: module_name - Caller's module name (for warning output) 233 + * line_number - Caller's line number (for warning output) 230 234 * format - Printf format string + additional args 231 235 * 232 236 * RETURN: None
+5
drivers/acpi/bus.c
··· 114 114 acpi_status status; 115 115 unsigned long long sta; 116 116 117 + if (acpi_device_always_present(device)) { 118 + acpi_set_device_status(device, ACPI_STA_DEFAULT); 119 + return 0; 120 + } 121 + 117 122 status = acpi_bus_get_status_handle(device->handle, &sta); 118 123 if (ACPI_FAILURE(status)) 119 124 return -ENODEV;
+27 -27
drivers/acpi/pmic/intel_pmic_xpower.c
··· 27 27 .address = 0x00, 28 28 .reg = 0x13, 29 29 .bit = 0x05, 30 - }, 30 + }, /* ALD1 */ 31 31 { 32 32 .address = 0x04, 33 33 .reg = 0x13, 34 34 .bit = 0x06, 35 - }, 35 + }, /* ALD2 */ 36 36 { 37 37 .address = 0x08, 38 38 .reg = 0x13, 39 39 .bit = 0x07, 40 - }, 40 + }, /* ALD3 */ 41 41 { 42 42 .address = 0x0c, 43 43 .reg = 0x12, 44 44 .bit = 0x03, 45 - }, 45 + }, /* DLD1 */ 46 46 { 47 47 .address = 0x10, 48 48 .reg = 0x12, 49 49 .bit = 0x04, 50 - }, 50 + }, /* DLD2 */ 51 51 { 52 52 .address = 0x14, 53 53 .reg = 0x12, 54 54 .bit = 0x05, 55 - }, 55 + }, /* DLD3 */ 56 56 { 57 57 .address = 0x18, 58 58 .reg = 0x12, 59 59 .bit = 0x06, 60 - }, 60 + }, /* DLD4 */ 61 61 { 62 62 .address = 0x1c, 63 63 .reg = 0x12, 64 64 .bit = 0x00, 65 - }, 65 + }, /* ELD1 */ 66 66 { 67 67 .address = 0x20, 68 68 .reg = 0x12, 69 69 .bit = 0x01, 70 - }, 70 + }, /* ELD2 */ 71 71 { 72 72 .address = 0x24, 73 73 .reg = 0x12, 74 74 .bit = 0x02, 75 - }, 75 + }, /* ELD3 */ 76 76 { 77 77 .address = 0x28, 78 78 .reg = 0x13, 79 79 .bit = 0x02, 80 - }, 80 + }, /* FLD1 */ 81 81 { 82 82 .address = 0x2c, 83 83 .reg = 0x13, 84 84 .bit = 0x03, 85 - }, 85 + }, /* FLD2 */ 86 86 { 87 87 .address = 0x30, 88 88 .reg = 0x13, 89 89 .bit = 0x04, 90 - }, 90 + }, /* FLD3 */ 91 + { 92 + .address = 0x34, 93 + .reg = 0x10, 94 + .bit = 0x03, 95 + }, /* BUC1 */ 91 96 { 92 97 .address = 0x38, 93 98 .reg = 0x10, 94 - .bit = 0x03, 95 - }, 99 + .bit = 0x06, 100 + }, /* BUC2 */ 96 101 { 97 102 .address = 0x3c, 98 103 .reg = 0x10, 99 - .bit = 0x06, 100 - }, 104 + .bit = 0x05, 105 + }, /* BUC3 */ 101 106 { 102 107 .address = 0x40, 103 108 .reg = 0x10, 104 - .bit = 0x05, 105 - }, 109 + .bit = 0x04, 110 + }, /* BUC4 */ 106 111 { 107 112 .address = 0x44, 108 113 .reg = 0x10, 109 - .bit = 0x04, 110 - }, 114 + .bit = 0x01, 115 + }, /* BUC5 */ 111 116 { 112 117 .address = 0x48, 113 118 .reg = 0x10, 114 - .bit = 0x01, 115 - }, 116 - { 117 - .address = 0x4c, 118 - .reg = 0x10, 119 119 .bit = 0x00 120 - }, 120 + }, /* BUC6 */ 121 121 }; 122 122 123 123 /* TMP0 - TMP5 are the same, all from GPADC */
+10
drivers/acpi/power.c
··· 864 864 865 865 mutex_unlock(&resource->resource_lock); 866 866 } 867 + 868 + mutex_unlock(&power_resource_list_lock); 869 + } 870 + 871 + void acpi_turn_off_unused_power_resources(void) 872 + { 873 + struct acpi_power_resource *resource; 874 + 875 + mutex_lock(&power_resource_list_lock); 876 + 867 877 list_for_each_entry_reverse(resource, &acpi_power_resource_list, list_node) { 868 878 int result, state; 869 879
+1
drivers/acpi/sleep.c
··· 474 474 */ 475 475 static void acpi_pm_end(void) 476 476 { 477 + acpi_turn_off_unused_power_resources(); 477 478 acpi_scan_lock_release(); 478 479 /* 479 480 * This is necessary in case acpi_pm_finish() is not called during a
+1
drivers/acpi/sleep.h
··· 6 6 extern struct mutex acpi_device_lock; 7 7 8 8 extern void acpi_resume_power_resources(void); 9 + extern void acpi_turn_off_unused_power_resources(void); 9 10 10 11 static inline acpi_status acpi_set_waking_vector(u32 wakeup_address) 11 12 {
+90
drivers/acpi/x86/utils.c
··· 1 + /* 2 + * X86 ACPI Utility Functions 3 + * 4 + * Copyright (C) 2017 Hans de Goede <hdegoede@redhat.com> 5 + * 6 + * Based on various non upstream patches to support the CHT Whiskey Cove PMIC: 7 + * Copyright (C) 2013-2015 Intel Corporation. All rights reserved. 8 + * 9 + * This program is free software; you can redistribute it and/or modify 10 + * it under the terms of the GNU General Public License version 2 as 11 + * published by the Free Software Foundation. 12 + */ 13 + 14 + #include <linux/acpi.h> 15 + #include <asm/cpu_device_id.h> 16 + #include <asm/intel-family.h> 17 + #include "../internal.h" 18 + 19 + /* 20 + * Some ACPI devices are hidden (status == 0x0) in recent BIOS-es because 21 + * some recent Windows drivers bind to one device but poke at multiple 22 + * devices at the same time, so the others get hidden. 23 + * We work around this by always reporting ACPI_STA_DEFAULT for these 24 + * devices. Note this MUST only be done for devices where this is safe. 25 + * 26 + * This forcing of devices to be present is limited to specific CPU (SoC) 27 + * models both to avoid potentially causing trouble on other models and 28 + * because some HIDs are re-used on different SoCs for completely 29 + * different devices. 30 + */ 31 + struct always_present_id { 32 + struct acpi_device_id hid[2]; 33 + struct x86_cpu_id cpu_ids[2]; 34 + const char *uid; 35 + }; 36 + 37 + #define ICPU(model) { X86_VENDOR_INTEL, 6, model, X86_FEATURE_ANY, } 38 + 39 + #define ENTRY(hid, uid, cpu_models) { \ 40 + { { hid, }, {} }, \ 41 + { cpu_models, {} }, \ 42 + uid, \ 43 + } 44 + 45 + static const struct always_present_id always_present_ids[] = { 46 + /* 47 + * Bay / Cherry Trail PWM directly poked by GPU driver in win10, 48 + * but Linux uses a separate PWM driver, harmless if not used. 49 + */ 50 + ENTRY("80860F09", "1", ICPU(INTEL_FAM6_ATOM_SILVERMONT1)), 51 + ENTRY("80862288", "1", ICPU(INTEL_FAM6_ATOM_AIRMONT)), 52 + /* 53 + * The INT0002 device is necessary to clear wakeup interrupt sources 54 + * on Cherry Trail devices, without it we get nobody cared IRQ msgs. 55 + */ 56 + ENTRY("INT0002", "1", ICPU(INTEL_FAM6_ATOM_AIRMONT)), 57 + }; 58 + 59 + bool acpi_device_always_present(struct acpi_device *adev) 60 + { 61 + u32 *status = (u32 *)&adev->status; 62 + u32 old_status = *status; 63 + bool ret = false; 64 + unsigned int i; 65 + 66 + /* acpi_match_device_ids checks status, so set it to default */ 67 + *status = ACPI_STA_DEFAULT; 68 + for (i = 0; i < ARRAY_SIZE(always_present_ids); i++) { 69 + if (acpi_match_device_ids(adev, always_present_ids[i].hid)) 70 + continue; 71 + 72 + if (!adev->pnp.unique_id || 73 + strcmp(adev->pnp.unique_id, always_present_ids[i].uid)) 74 + continue; 75 + 76 + if (!x86_match_cpu(always_present_ids[i].cpu_ids)) 77 + continue; 78 + 79 + if (old_status != ACPI_STA_DEFAULT) /* Log only once */ 80 + dev_info(&adev->dev, 81 + "Device [%s] is in always present list\n", 82 + adev->pnp.bus_id); 83 + 84 + ret = true; 85 + break; 86 + } 87 + *status = old_status; 88 + 89 + return ret; 90 + }
+2
drivers/i2c/busses/i2c-designware-platdrv.c
··· 157 157 { "AMDI0010", ACCESS_INTR_MASK }, 158 158 { "AMDI0510", 0 }, 159 159 { "APMC0D0F", 0 }, 160 + { "HISI02A1", 0 }, 161 + { "HISI02A2", 0 }, 160 162 { } 161 163 }; 162 164 MODULE_DEVICE_TABLE(acpi, dw_i2c_acpi_match);
+1
include/acpi/acconfig.h
··· 78 78 #define ACPI_MAX_EXTPARSE_CACHE_DEPTH 96 /* Parse tree objects */ 79 79 #define ACPI_MAX_OBJECT_CACHE_DEPTH 96 /* Interpreter operand objects */ 80 80 #define ACPI_MAX_NAMESPACE_CACHE_DEPTH 96 /* Namespace objects */ 81 + #define ACPI_MAX_COMMENT_CACHE_DEPTH 96 /* Comments for the -ca option */ 81 82 82 83 /* 83 84 * Should the subsystem abort the loading of an ACPI table if the
+9
include/acpi/acpi_bus.h
··· 588 588 int acpi_enable_wakeup_device_power(struct acpi_device *dev, int state); 589 589 int acpi_disable_wakeup_device_power(struct acpi_device *dev); 590 590 591 + #ifdef CONFIG_X86 592 + bool acpi_device_always_present(struct acpi_device *adev); 593 + #else 594 + static inline bool acpi_device_always_present(struct acpi_device *adev) 595 + { 596 + return false; 597 + } 598 + #endif 599 + 591 600 #ifdef CONFIG_PM 592 601 acpi_status acpi_add_pm_notifier(struct acpi_device *adev, struct device *dev, 593 602 void (*work_func)(struct work_struct *work));
+1 -1
include/acpi/acpixf.h
··· 46 46 47 47 /* Current ACPICA subsystem version in YYYYMMDD format */ 48 48 49 - #define ACPI_CA_VERSION 0x20170119 49 + #define ACPI_CA_VERSION 0x20170303 50 50 51 51 #include <acpi/acconfig.h> 52 52 #include <acpi/actypes.h>
+10
include/acpi/actbl2.h
··· 87 87 #define ACPI_SIG_WDAT "WDAT" /* Watchdog Action Table */ 88 88 #define ACPI_SIG_WDDT "WDDT" /* Watchdog Timer Description Table */ 89 89 #define ACPI_SIG_WDRT "WDRT" /* Watchdog Resource Table */ 90 + #define ACPI_SIG_XXXX "XXXX" /* Intermediate AML header for ASL/ASL+ converter */ 90 91 91 92 #ifdef ACPI_UNDEFINED_TABLES 92 93 /* ··· 783 782 784 783 #define ACPI_IORT_SMMU_DVM_SUPPORTED (1) 785 784 #define ACPI_IORT_SMMU_COHERENT_WALK (1<<1) 785 + 786 + /* Global interrupt format */ 787 + 788 + struct acpi_iort_smmu_gsi { 789 + u32 nsg_irpt; 790 + u32 nsg_irpt_flags; 791 + u32 nsg_cfg_irpt; 792 + u32 nsg_cfg_irpt_flags; 793 + }; 786 794 787 795 struct acpi_iort_smmu_v3 { 788 796 u64 base_address; /* SMMUv3 base address */