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

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

Pull ACPI updates from Rafael Wysocki:
"These are ACPICA updates including ACPI 6.3 support among other
things, APEI updates including the ARM Software Delegated Exception
Interface (SDEI) support, ACPI EC driver fixes and cleanups and other
assorted improvements.

Specifics:

- Update the ACPICA code in the kernel to upstream revision 20190215
including ACPI 6.3 support and more:
* New predefined methods: _NBS, _NCH, _NIC, _NIH, and _NIG (Erik
Schmauss).
* Update of the PCC Identifier structure in PDTT (Erik Schmauss).
* Support for new Generic Affinity Structure subtable in SRAT
(Erik Schmauss).
* New PCC operation region support (Erik Schmauss).
* Support for GICC statistical profiling for MADT (Erik Schmauss).
* New Error Disconnect Recover notification support (Erik
Schmauss).
* New PPTT Processor Structure Flags fields support (Erik
Schmauss).
* ACPI 6.3 HMAT updates (Erik Schmauss).
* GTDT Revision 3 support (Erik Schmauss).
* Legacy module-level code (MLC) support removal (Erik Schmauss).
* Update/clarification of messages for control method failures
(Bob Moore).
* Warning on creation of a zero-length opregion (Bob Moore).
* acpiexec option to dump extra info for memory leaks (Bob Moore).
* More ACPI error to firmware error conversions (Bob Moore).
* Debugger fix (Bob Moore).
* Copyrights update (Bob Moore)

- Clean up sleep states support code in ACPICA (Christoph Hellwig)

- Rework in_nmi() handling in the APEI code and add suppor for the
ARM Software Delegated Exception Interface (SDEI) to it (James
Morse)

- Fix possible out-of-bounds accesses in BERT-related core (Ross
Lagerwall)

- Fix the APEI code parsing HEST that includes a Deferred Machine
Check subtable (Yazen Ghannam)

- Use DEFINE_DEBUGFS_ATTRIBUTE for APEI-related debugfs files
(YueHaibing)

- Switch the APEI ERST code to the new generic UUID API (Andy
Shevchenko)

- Update the MAINTAINERS entry for APEI (Borislav Petkov)

- Fix and clean up the ACPI EC driver (Rafael Wysocki, Zhang Rui)

- Fix DMI checks handling in the ACPI backlight driver and add the
"Lunch Box" chassis-type check to it (Hans de Goede)

- Add support for using ACPI table overrides included in built-in
initrd images (Shunyong Yang)

- Update ACPI device enumeration to treat the PWM2 device as "always
present" on Lenovo Yoga Book (Yauhen Kharuzhy)

- Fix up the enumeration of device objects with the PRP0001 device ID
(Andy Shevchenko)

- Clean up PPTT parsing error messages (John Garry)

- Clean up debugfs files creation handling (Greg Kroah-Hartman,
Rafael Wysocki)

- Clean up the ACPI DPTF Makefile (Masahiro Yamada)"

* tag 'acpi-5.1-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: (65 commits)
ACPI / bus: Respect PRP0001 when retrieving device match data
ACPICA: Update version to 20190215
ACPI/ACPICA: Trivial: fix spelling mistakes and fix whitespace formatting
ACPICA: ACPI 6.3: add GTDT Revision 3 support
ACPICA: ACPI 6.3: HMAT updates
ACPICA: ACPI 6.3: PPTT add additional fields in Processor Structure Flags
ACPICA: ACPI 6.3: add Error Disconnect Recover Notification value
ACPICA: ACPI 6.3: MADT: add support for statistical profiling in GICC
ACPICA: ACPI 6.3: add PCC operation region support for AML interpreter
efi: cper: Fix possible out-of-bounds access
ACPI: APEI: Fix possible out-of-bounds access to BERT region
ACPICA: ACPI 6.3: SRAT: add Generic Affinity Structure subtable
ACPICA: ACPI 6.3: Add Trigger order to PCC Identifier structure in PDTT
ACPICA: ACPI 6.3: Adding predefined methods _NBS, _NCH, _NIC, _NIH, and _NIG
ACPICA: Update/clarify messages for control method failures
ACPICA: Debugger: Fix possible fault with the "test objects" command
ACPICA: Interpreter: Emit warning for creation of a zero-length op region
ACPICA: Remove legacy module-level code support
ACPI / x86: Make PWM2 device always present at Lenovo Yoga Book
ACPI / video: Extend chassis-type detection with a "Lunch Box" check
..

+1444 -1328
+4
Documentation/acpi/initrd_table_override.txt
··· 14 14 via upgrading the ACPI tables provided by the BIOS with an instrumented, 15 15 modified, more recent version one, or installing brand new ACPI tables. 16 16 17 + When building initrd with kernel in a single image, option 18 + ACPI_TABLE_OVERRIDE_VIA_BUILTIN_INITRD should also be true for this 19 + feature to work. 20 + 17 21 For a full list of ACPI tables that can be upgraded/installed, take a look 18 22 at the char *table_sigs[MAX_ACPI_SIGNATURE]; definition in 19 23 drivers/acpi/tables.c.
+1
MAINTAINERS
··· 331 331 M: "Rafael J. Wysocki" <rjw@rjwysocki.net> 332 332 M: Len Brown <lenb@kernel.org> 333 333 L: linux-acpi@vger.kernel.org 334 + R: James Morse <james.morse@arm.com> 334 335 R: Tony Luck <tony.luck@intel.com> 335 336 R: Borislav Petkov <bp@alien8.de> 336 337 F: drivers/acpi/apei/
+14
arch/arm/include/asm/kvm_ras.h
··· 1 + /* SPDX-License-Identifier: GPL-2.0 */ 2 + /* Copyright (C) 2018 - Arm Ltd */ 3 + 4 + #ifndef __ARM_KVM_RAS_H__ 5 + #define __ARM_KVM_RAS_H__ 6 + 7 + #include <linux/types.h> 8 + 9 + static inline int kvm_handle_guest_sea(phys_addr_t addr, unsigned int esr) 10 + { 11 + return -1; 12 + } 13 + 14 + #endif /* __ARM_KVM_RAS_H__ */
-5
arch/arm/include/asm/system_misc.h
··· 38 38 39 39 extern unsigned int user_debug; 40 40 41 - static inline int handle_guest_sea(phys_addr_t addr, unsigned int esr) 42 - { 43 - return -1; 44 - } 45 - 46 41 #endif /* !__ASSEMBLY__ */ 47 42 48 43 #endif /* __ASM_ARM_SYSTEM_MISC_H */
+3 -1
arch/arm64/include/asm/acpi.h
··· 18 18 19 19 #include <asm/cputype.h> 20 20 #include <asm/io.h> 21 + #include <asm/ptrace.h> 21 22 #include <asm/smp_plat.h> 22 23 #include <asm/tlbflush.h> 23 24 ··· 111 110 112 111 static inline void arch_fix_phys_package_id(int num, u32 slot) { } 113 112 void __init acpi_init_cpus(void); 114 - 113 + int apei_claim_sea(struct pt_regs *regs); 115 114 #else 116 115 static inline void acpi_init_cpus(void) { } 116 + static inline int apei_claim_sea(struct pt_regs *regs) { return -ENOENT; } 117 117 #endif /* CONFIG_ACPI */ 118 118 119 119 #ifdef CONFIG_ARM64_ACPI_PARKING_PROTOCOL
+1
arch/arm64/include/asm/daifflags.h
··· 20 20 21 21 #define DAIF_PROCCTX 0 22 22 #define DAIF_PROCCTX_NOIRQ PSR_I_BIT 23 + #define DAIF_ERRCTX (PSR_I_BIT | PSR_A_BIT) 23 24 24 25 /* mask/save/unmask/restore all exceptions, including interrupts. */ 25 26 static inline void local_daif_mask(void)
+5 -1
arch/arm64/include/asm/fixmap.h
··· 55 55 #ifdef CONFIG_ACPI_APEI_GHES 56 56 /* Used for GHES mapping from assorted contexts */ 57 57 FIX_APEI_GHES_IRQ, 58 - FIX_APEI_GHES_NMI, 58 + FIX_APEI_GHES_SEA, 59 + #ifdef CONFIG_ARM_SDE_INTERFACE 60 + FIX_APEI_GHES_SDEI_NORMAL, 61 + FIX_APEI_GHES_SDEI_CRITICAL, 62 + #endif 59 63 #endif /* CONFIG_ACPI_APEI_GHES */ 60 64 61 65 #ifdef CONFIG_UNMAP_KERNEL_AT_EL0
+25
arch/arm64/include/asm/kvm_ras.h
··· 1 + /* SPDX-License-Identifier: GPL-2.0 */ 2 + /* Copyright (C) 2018 - Arm Ltd */ 3 + 4 + #ifndef __ARM64_KVM_RAS_H__ 5 + #define __ARM64_KVM_RAS_H__ 6 + 7 + #include <linux/acpi.h> 8 + #include <linux/errno.h> 9 + #include <linux/types.h> 10 + 11 + #include <asm/acpi.h> 12 + 13 + /* 14 + * Was this synchronous external abort a RAS notification? 15 + * Returns '0' for errors handled by some RAS subsystem, or -ENOENT. 16 + */ 17 + static inline int kvm_handle_guest_sea(phys_addr_t addr, unsigned int esr) 18 + { 19 + /* apei_claim_sea(NULL) expects to mask interrupts itself */ 20 + lockdep_assert_irqs_enabled(); 21 + 22 + return apei_claim_sea(NULL); 23 + } 24 + 25 + #endif /* __ARM64_KVM_RAS_H__ */
-2
arch/arm64/include/asm/system_misc.h
··· 46 46 47 47 extern void (*arm_pm_restart)(enum reboot_mode reboot_mode, const char *cmd); 48 48 49 - int handle_guest_sea(phys_addr_t addr, unsigned int esr); 50 - 51 49 #endif /* __ASSEMBLY__ */ 52 50 53 51 #endif /* __ASM_SYSTEM_MISC_H */
+31
arch/arm64/kernel/acpi.c
··· 27 27 #include <linux/smp.h> 28 28 #include <linux/serial_core.h> 29 29 30 + #include <acpi/ghes.h> 30 31 #include <asm/cputype.h> 31 32 #include <asm/cpu_ops.h> 33 + #include <asm/daifflags.h> 32 34 #include <asm/pgtable.h> 33 35 #include <asm/smp_plat.h> 34 36 ··· 257 255 if (attr & EFI_MEMORY_WC) 258 256 return __pgprot(PROT_NORMAL_NC); 259 257 return __pgprot(PROT_DEVICE_nGnRnE); 258 + } 259 + 260 + /* 261 + * Claim Synchronous External Aborts as a firmware first notification. 262 + * 263 + * Used by KVM and the arch do_sea handler. 264 + * @regs may be NULL when called from process context. 265 + */ 266 + int apei_claim_sea(struct pt_regs *regs) 267 + { 268 + int err = -ENOENT; 269 + unsigned long current_flags; 270 + 271 + if (!IS_ENABLED(CONFIG_ACPI_APEI_GHES)) 272 + return err; 273 + 274 + current_flags = arch_local_save_flags(); 275 + 276 + /* 277 + * SEA can interrupt SError, mask it and describe this as an NMI so 278 + * that APEI defers the handling. 279 + */ 280 + local_daif_restore(DAIF_ERRCTX); 281 + nmi_enter(); 282 + err = ghes_notify_sea(); 283 + nmi_exit(); 284 + local_daif_restore(current_flags); 285 + 286 + return err; 260 287 }
+5 -19
arch/arm64/mm/fault.c
··· 18 18 * along with this program. If not, see <http://www.gnu.org/licenses/>. 19 19 */ 20 20 21 + #include <linux/acpi.h> 21 22 #include <linux/extable.h> 22 23 #include <linux/signal.h> 23 24 #include <linux/mm.h> ··· 34 33 #include <linux/preempt.h> 35 34 #include <linux/hugetlb.h> 36 35 36 + #include <asm/acpi.h> 37 37 #include <asm/bug.h> 38 38 #include <asm/cmpxchg.h> 39 39 #include <asm/cpufeature.h> ··· 48 46 #include <asm/pgtable.h> 49 47 #include <asm/tlbflush.h> 50 48 #include <asm/traps.h> 51 - 52 - #include <acpi/ghes.h> 53 49 54 50 struct fault_info { 55 51 int (*fn)(unsigned long addr, unsigned int esr, ··· 643 643 inf = esr_to_fault_info(esr); 644 644 645 645 /* 646 - * Synchronous aborts may interrupt code which had interrupts masked. 647 - * Before calling out into the wider kernel tell the interested 648 - * subsystems. 646 + * Return value ignored as we rely on signal merging. 647 + * Future patches will make this more robust. 649 648 */ 650 - if (IS_ENABLED(CONFIG_ACPI_APEI_SEA)) { 651 - if (interrupts_enabled(regs)) 652 - nmi_enter(); 653 - 654 - ghes_notify_sea(); 655 - 656 - if (interrupts_enabled(regs)) 657 - nmi_exit(); 658 - } 649 + apei_claim_sea(regs); 659 650 660 651 if (esr & ESR_ELx_FnV) 661 652 siaddr = NULL; ··· 723 732 { do_bad, SIGKILL, SI_KERNEL, "page domain fault" }, 724 733 { do_bad, SIGKILL, SI_KERNEL, "unknown 63" }, 725 734 }; 726 - 727 - int handle_guest_sea(phys_addr_t addr, unsigned int esr) 728 - { 729 - return ghes_notify_sea(); 730 - } 731 735 732 736 asmlinkage void __exception do_mem_abort(unsigned long addr, unsigned int esr, 733 737 struct pt_regs *regs)
+10
drivers/acpi/Kconfig
··· 357 357 initrd, therefore it's safe to say Y. 358 358 See Documentation/acpi/initrd_table_override.txt for details 359 359 360 + config ACPI_TABLE_OVERRIDE_VIA_BUILTIN_INITRD 361 + bool "Override ACPI tables from built-in initrd" 362 + depends on ACPI_TABLE_UPGRADE 363 + depends on INITRAMFS_SOURCE!="" && INITRAMFS_COMPRESSION="" 364 + help 365 + This option provides functionality to override arbitrary ACPI tables 366 + from built-in uncompressed initrd. 367 + 368 + See Documentation/acpi/initrd_table_override.txt for details 369 + 360 370 config ACPI_DEBUG 361 371 bool "Debug Statements" 362 372 help
+9 -21
drivers/acpi/acpi_dbg.c
··· 750 750 751 751 int __init acpi_aml_init(void) 752 752 { 753 - int ret = 0; 754 - 755 - if (!acpi_debugfs_dir) { 756 - ret = -ENOENT; 757 - goto err_exit; 758 - } 753 + int ret; 759 754 760 755 /* Initialize AML IO interface */ 761 756 mutex_init(&acpi_aml_io.lock); 762 757 init_waitqueue_head(&acpi_aml_io.wait); 763 758 acpi_aml_io.out_crc.buf = acpi_aml_io.out_buf; 764 759 acpi_aml_io.in_crc.buf = acpi_aml_io.in_buf; 760 + 765 761 acpi_aml_dentry = debugfs_create_file("acpidbg", 766 762 S_IFREG | S_IRUGO | S_IWUSR, 767 763 acpi_debugfs_dir, NULL, 768 764 &acpi_aml_operations); 769 - if (acpi_aml_dentry == NULL) { 770 - ret = -ENODEV; 771 - goto err_exit; 772 - } 773 - ret = acpi_register_debugger(THIS_MODULE, &acpi_aml_debugger); 774 - if (ret) 775 - goto err_fs; 776 - acpi_aml_initialized = true; 777 765 778 - err_fs: 766 + ret = acpi_register_debugger(THIS_MODULE, &acpi_aml_debugger); 779 767 if (ret) { 780 768 debugfs_remove(acpi_aml_dentry); 781 769 acpi_aml_dentry = NULL; 770 + return ret; 782 771 } 783 - err_exit: 784 - return ret; 772 + 773 + acpi_aml_initialized = true; 774 + return 0; 785 775 } 786 776 787 777 void __exit acpi_aml_exit(void) 788 778 { 789 779 if (acpi_aml_initialized) { 790 780 acpi_unregister_debugger(&acpi_aml_debugger); 791 - if (acpi_aml_dentry) { 792 - debugfs_remove(acpi_aml_dentry); 793 - acpi_aml_dentry = NULL; 794 - } 781 + debugfs_remove(acpi_aml_dentry); 782 + acpi_aml_dentry = NULL; 795 783 acpi_aml_initialized = false; 796 784 } 797 785 }
+14 -6
drivers/acpi/acpi_video.c
··· 2124 2124 return opregion; 2125 2125 } 2126 2126 2127 + /* Check if the chassis-type indicates there is no builtin LCD panel */ 2127 2128 static bool dmi_is_desktop(void) 2128 2129 { 2129 2130 const char *chassis_type; 2131 + unsigned long type; 2130 2132 2131 2133 chassis_type = dmi_get_system_info(DMI_CHASSIS_TYPE); 2132 2134 if (!chassis_type) 2133 2135 return false; 2134 2136 2135 - if (!strcmp(chassis_type, "3") || /* 3: Desktop */ 2136 - !strcmp(chassis_type, "4") || /* 4: Low Profile Desktop */ 2137 - !strcmp(chassis_type, "5") || /* 5: Pizza Box */ 2138 - !strcmp(chassis_type, "6") || /* 6: Mini Tower */ 2139 - !strcmp(chassis_type, "7") || /* 7: Tower */ 2140 - !strcmp(chassis_type, "11")) /* 11: Main Server Chassis */ 2137 + if (kstrtoul(chassis_type, 10, &type) != 0) 2138 + return false; 2139 + 2140 + switch (type) { 2141 + case 0x03: /* Desktop */ 2142 + case 0x04: /* Low Profile Desktop */ 2143 + case 0x05: /* Pizza Box */ 2144 + case 0x06: /* Mini Tower */ 2145 + case 0x07: /* Tower */ 2146 + case 0x10: /* Lunch Box */ 2147 + case 0x11: /* Main Server Chassis */ 2141 2148 return true; 2149 + } 2142 2150 2143 2151 return false; 2144 2152 }
+2 -2
drivers/acpi/acpica/acapps.h
··· 3 3 * 4 4 * Module Name: acapps - common include for ACPI applications/tools 5 5 * 6 - * Copyright (C) 2000 - 2018, Intel Corp. 6 + * Copyright (C) 2000 - 2019, Intel Corp. 7 7 * 8 8 *****************************************************************************/ 9 9 ··· 17 17 /* Common info for tool signons */ 18 18 19 19 #define ACPICA_NAME "Intel ACPI Component Architecture" 20 - #define ACPICA_COPYRIGHT "Copyright (c) 2000 - 2018 Intel Corporation" 20 + #define ACPICA_COPYRIGHT "Copyright (c) 2000 - 2019 Intel Corporation" 21 21 22 22 #if ACPI_MACHINE_WIDTH == 64 23 23 #define ACPI_WIDTH " (64-bit version)"
+1 -1
drivers/acpi/acpica/accommon.h
··· 3 3 * 4 4 * Name: accommon.h - Common include files for generation of ACPICA source 5 5 * 6 - * Copyright (C) 2000 - 2018, Intel Corp. 6 + * Copyright (C) 2000 - 2019, Intel Corp. 7 7 * 8 8 *****************************************************************************/ 9 9
+1 -1
drivers/acpi/acpica/acconvert.h
··· 3 3 * 4 4 * Module Name: acapps - common include for ACPI applications/tools 5 5 * 6 - * Copyright (C) 2000 - 2018, Intel Corp. 6 + * Copyright (C) 2000 - 2019, Intel Corp. 7 7 * 8 8 *****************************************************************************/ 9 9
+3 -2
drivers/acpi/acpica/acdebug.h
··· 3 3 * 4 4 * Name: acdebug.h - ACPI/AML debugger 5 5 * 6 - * Copyright (C) 2000 - 2018, Intel Corp. 6 + * Copyright (C) 2000 - 2019, Intel Corp. 7 7 * 8 8 *****************************************************************************/ 9 9 ··· 16 16 #include "acdisasm.h" 17 17 #endif 18 18 19 - #define ACPI_DEBUG_BUFFER_SIZE 0x4000 /* 16K buffer for return objects */ 19 + #define ACPI_DEBUG_BUFFER_SIZE 0x4000 /* 16K buffer for return objects */ 20 + #define ACPI_DEBUG_LENGTH_FORMAT " (%.4X bits, %.3X bytes)" 20 21 21 22 struct acpi_db_command_info { 22 23 const char *name; /* Command Name */
+1 -1
drivers/acpi/acpica/acdispat.h
··· 3 3 * 4 4 * Name: acdispat.h - dispatcher (parser to interpreter interface) 5 5 * 6 - * Copyright (C) 2000 - 2018, Intel Corp. 6 + * Copyright (C) 2000 - 2019, Intel Corp. 7 7 * 8 8 *****************************************************************************/ 9 9
+1 -1
drivers/acpi/acpica/acevents.h
··· 3 3 * 4 4 * Name: acevents.h - Event subcomponent prototypes and defines 5 5 * 6 - * Copyright (C) 2000 - 2018, Intel Corp. 6 + * Copyright (C) 2000 - 2019, Intel Corp. 7 7 * 8 8 *****************************************************************************/ 9 9
+2 -1
drivers/acpi/acpica/acglobal.h
··· 3 3 * 4 4 * Name: acglobal.h - Declarations for global variables 5 5 * 6 - * Copyright (C) 2000 - 2018, Intel Corp. 6 + * Copyright (C) 2000 - 2019, Intel Corp. 7 7 * 8 8 *****************************************************************************/ 9 9 ··· 164 164 ACPI_GLOBAL(struct acpi_memory_list *, acpi_gbl_ns_node_list); 165 165 ACPI_GLOBAL(u8, acpi_gbl_display_final_mem_stats); 166 166 ACPI_GLOBAL(u8, acpi_gbl_disable_mem_tracking); 167 + ACPI_GLOBAL(u8, acpi_gbl_verbose_leak_dump); 167 168 #endif 168 169 169 170 /*****************************************************************************
+1 -1
drivers/acpi/acpica/achware.h
··· 3 3 * 4 4 * Name: achware.h -- hardware specific interfaces 5 5 * 6 - * Copyright (C) 2000 - 2018, Intel Corp. 6 + * Copyright (C) 2000 - 2019, Intel Corp. 7 7 * 8 8 *****************************************************************************/ 9 9
+1 -1
drivers/acpi/acpica/acinterp.h
··· 3 3 * 4 4 * Name: acinterp.h - Interpreter subcomponent prototypes and defines 5 5 * 6 - * Copyright (C) 2000 - 2018, Intel Corp. 6 + * Copyright (C) 2000 - 2019, Intel Corp. 7 7 * 8 8 *****************************************************************************/ 9 9
+2 -2
drivers/acpi/acpica/aclocal.h
··· 3 3 * 4 4 * Name: aclocal.h - Internal data types used across the ACPI subsystem 5 5 * 6 - * Copyright (C) 2000 - 2018, Intel Corp. 6 + * Copyright (C) 2000 - 2019, Intel Corp. 7 7 * 8 8 *****************************************************************************/ 9 9 ··· 802 802 803 803 /* 804 804 * File node - used for "Include" operator file stack and 805 - * depdendency tree for the -ca option 805 + * dependency tree for the -ca option 806 806 */ 807 807 struct acpi_file_node { 808 808 void *file;
+2 -2
drivers/acpi/acpica/acmacros.h
··· 3 3 * 4 4 * Name: acmacros.h - C macros for the entire subsystem. 5 5 * 6 - * Copyright (C) 2000 - 2018, Intel Corp. 6 + * Copyright (C) 2000 - 2019, Intel Corp. 7 7 * 8 8 *****************************************************************************/ 9 9 ··· 462 462 #define ACPI_IS_OCTAL_DIGIT(d) (((char)(d) >= '0') && ((char)(d) <= '7')) 463 463 464 464 /* 465 - * Macors used for the ASL-/ASL+ converter utility 465 + * Macros used for the ASL-/ASL+ converter utility 466 466 */ 467 467 #ifdef ACPI_ASL_COMPILER 468 468
+1 -1
drivers/acpi/acpica/acnamesp.h
··· 3 3 * 4 4 * Name: acnamesp.h - Namespace subcomponent prototypes and defines 5 5 * 6 - * Copyright (C) 2000 - 2018, Intel Corp. 6 + * Copyright (C) 2000 - 2019, Intel Corp. 7 7 * 8 8 *****************************************************************************/ 9 9
+2 -1
drivers/acpi/acpica/acobject.h
··· 3 3 * 4 4 * Name: acobject.h - Definition of union acpi_operand_object (Internal object only) 5 5 * 6 - * Copyright (C) 2000 - 2018, Intel Corp. 6 + * Copyright (C) 2000 - 2019, Intel Corp. 7 7 * 8 8 *****************************************************************************/ 9 9 ··· 239 239 union acpi_operand_object *region_obj; /* Containing op_region object */ 240 240 u8 *resource_buffer; /* resource_template for serial regions/fields */ 241 241 u16 pin_number_index; /* Index relative to previous Connection/Template */ 242 + u8 *internal_pcc_buffer; /* Internal buffer for fields associated with PCC */ 242 243 }; 243 244 244 245 struct acpi_object_bank_field {
+1 -1
drivers/acpi/acpica/acopcode.h
··· 3 3 * 4 4 * Name: acopcode.h - AML opcode information for the AML parser and interpreter 5 5 * 6 - * Copyright (C) 2000 - 2018, Intel Corp. 6 + * Copyright (C) 2000 - 2019, Intel Corp. 7 7 * 8 8 *****************************************************************************/ 9 9
+1 -1
drivers/acpi/acpica/acparser.h
··· 3 3 * 4 4 * Module Name: acparser.h - AML Parser subcomponent prototypes and defines 5 5 * 6 - * Copyright (C) 2000 - 2018, Intel Corp. 6 + * Copyright (C) 2000 - 2019, Intel Corp. 7 7 * 8 8 *****************************************************************************/ 9 9
+16 -1
drivers/acpi/acpica/acpredef.h
··· 3 3 * 4 4 * Name: acpredef - Information table for ACPI predefined methods and objects 5 5 * 6 - * Copyright (C) 2000 - 2018, Intel Corp. 6 + * Copyright (C) 2000 - 2019, Intel Corp. 7 7 * 8 8 *****************************************************************************/ 9 9 ··· 630 630 631 631 {{"_MTL", METHOD_0ARGS, /* ACPI 6.0 */ 632 632 METHOD_RETURNS(ACPI_RTYPE_INTEGER)}}, 633 + 634 + {{"_NBS", METHOD_0ARGS, /* ACPI 6.3 */ 635 + METHOD_RETURNS(ACPI_RTYPE_BUFFER)}}, 636 + 637 + {{"_NCH", METHOD_0ARGS, /* ACPI 6.3 */ 638 + METHOD_RETURNS(ACPI_RTYPE_BUFFER)}}, 639 + 640 + {{"_NIC", METHOD_0ARGS, /* ACPI 6.3 */ 641 + METHOD_RETURNS(ACPI_RTYPE_BUFFER)}}, 642 + 643 + {{"_NIG", METHOD_1ARGS(ACPI_TYPE_BUFFER), /* ACPI 6.3 */ 644 + METHOD_RETURNS(ACPI_RTYPE_BUFFER)}}, 645 + 646 + {{"_NIH", METHOD_0ARGS, /* ACPI 6.3 */ 647 + METHOD_RETURNS(ACPI_RTYPE_BUFFER)}}, 633 648 634 649 {{"_NTT", METHOD_0ARGS, 635 650 METHOD_RETURNS(ACPI_RTYPE_INTEGER)}},
+1 -1
drivers/acpi/acpica/acresrc.h
··· 3 3 * 4 4 * Name: acresrc.h - Resource Manager function prototypes 5 5 * 6 - * Copyright (C) 2000 - 2018, Intel Corp. 6 + * Copyright (C) 2000 - 2019, Intel Corp. 7 7 * 8 8 *****************************************************************************/ 9 9
+1 -1
drivers/acpi/acpica/acstruct.h
··· 3 3 * 4 4 * Name: acstruct.h - Internal structs 5 5 * 6 - * Copyright (C) 2000 - 2018, Intel Corp. 6 + * Copyright (C) 2000 - 2019, Intel Corp. 7 7 * 8 8 *****************************************************************************/ 9 9
+1 -1
drivers/acpi/acpica/actables.h
··· 3 3 * 4 4 * Name: actables.h - ACPI table management 5 5 * 6 - * Copyright (C) 2000 - 2018, Intel Corp. 6 + * Copyright (C) 2000 - 2019, Intel Corp. 7 7 * 8 8 *****************************************************************************/ 9 9
+1 -1
drivers/acpi/acpica/acutils.h
··· 3 3 * 4 4 * Name: acutils.h -- prototypes for the common (subsystem-wide) procedures 5 5 * 6 - * Copyright (C) 2000 - 2018, Intel Corp. 6 + * Copyright (C) 2000 - 2019, Intel Corp. 7 7 * 8 8 *****************************************************************************/ 9 9
+1 -1
drivers/acpi/acpica/amlcode.h
··· 5 5 * Declarations and definitions contained herein are derived 6 6 * directly from the ACPI specification. 7 7 * 8 - * Copyright (C) 2000 - 2018, Intel Corp. 8 + * Copyright (C) 2000 - 2019, Intel Corp. 9 9 * 10 10 *****************************************************************************/ 11 11
+1 -1
drivers/acpi/acpica/amlresrc.h
··· 3 3 * 4 4 * Module Name: amlresrc.h - AML resource descriptors 5 5 * 6 - * Copyright (C) 2000 - 2018, Intel Corp. 6 + * Copyright (C) 2000 - 2019, Intel Corp. 7 7 * 8 8 *****************************************************************************/ 9 9
+2 -2
drivers/acpi/acpica/dbdisply.c
··· 237 237 238 238 default: 239 239 240 - /* Is not a recognizeable object */ 240 + /* Is not a recognizable object */ 241 241 242 242 acpi_os_printf 243 243 ("Not a known ACPI internal object, descriptor type %2.2X\n", ··· 647 647 * 648 648 * DESCRIPTION: Display the result of an AML opcode 649 649 * 650 - * Note: Curently only displays the result object if we are single stepping. 650 + * Note: Currently only displays the result object if we are single stepping. 651 651 * However, this output may be useful in other contexts and could be enabled 652 652 * to do so if needed. 653 653 *
+2 -2
drivers/acpi/acpica/dbexec.c
··· 160 160 } 161 161 162 162 ACPI_EXCEPTION((AE_INFO, status, 163 - "while executing %s from debugger", 163 + "while executing %s from AML Debugger", 164 164 info->pathname)); 165 165 166 166 if (status == AE_BUFFER_OVERFLOW) { 167 167 ACPI_ERROR((AE_INFO, 168 - "Possible overflow of internal debugger " 168 + "Possible buffer overflow within AML Debugger " 169 169 "buffer (size 0x%X needed 0x%X)", 170 170 ACPI_DEBUG_BUFFER_SIZE, 171 171 (u32)return_obj->length));
+1 -1
drivers/acpi/acpica/dbhistry.c
··· 3 3 * 4 4 * Module Name: dbhistry - debugger HISTORY command 5 5 * 6 - * Copyright (C) 2000 - 2018, Intel Corp. 6 + * Copyright (C) 2000 - 2019, Intel Corp. 7 7 * 8 8 *****************************************************************************/ 9 9
+1 -1
drivers/acpi/acpica/dbnames.c
··· 904 904 * 905 905 * RETURN: None 906 906 * 907 - * DESCRIPTION: Display info about system busses. 907 + * DESCRIPTION: Display info about system buses. 908 908 * 909 909 ******************************************************************************/ 910 910
+1 -1
drivers/acpi/acpica/dbobject.c
··· 243 243 acpi_os_printf("[%s] ", 244 244 acpi_ut_get_reference_name(obj_desc)); 245 245 246 - /* Decode the refererence */ 246 + /* Decode the reference */ 247 247 248 248 switch (obj_desc->reference.class) { 249 249 case ACPI_REFCLASS_LOCAL:
+98 -66
drivers/acpi/acpica/dbtest.c
··· 10 10 #include "acdebug.h" 11 11 #include "acnamesp.h" 12 12 #include "acpredef.h" 13 + #include "acinterp.h" 13 14 14 15 #define _COMPONENT ACPI_CA_DEBUGGER 15 16 ACPI_MODULE_NAME("dbtest") ··· 32 31 acpi_db_test_string_type(struct acpi_namespace_node *node, u32 byte_length); 33 32 34 33 static acpi_status acpi_db_test_package_type(struct acpi_namespace_node *node); 34 + 35 + static acpi_status 36 + acpi_db_test_field_unit_type(union acpi_operand_object *obj_desc); 35 37 36 38 static acpi_status 37 39 acpi_db_read_from_object(struct acpi_namespace_node *node, ··· 78 74 static acpi_handle read_handle = NULL; 79 75 static acpi_handle write_handle = NULL; 80 76 81 - /* ASL Definitions of the debugger read/write control methods */ 77 + /* ASL Definitions of the debugger read/write control methods. AML below. */ 82 78 83 79 #if 0 84 80 definition_block("ssdt.aml", "SSDT", 2, "Intel", "DEBUG", 0x00000001) ··· 231 227 * RETURN: Status 232 228 * 233 229 * DESCRIPTION: Test one namespace object. Supported types are Integer, 234 - * String, Buffer, buffer_field, and field_unit. All other object 235 - * types are simply ignored. 236 - * 237 - * Note: Support for Packages is not implemented. 230 + * String, Buffer, Package, buffer_field, and field_unit. 231 + * All other object types are simply ignored. 238 232 * 239 233 ******************************************************************************/ 240 234 ··· 242 240 { 243 241 struct acpi_namespace_node *node; 244 242 union acpi_operand_object *obj_desc; 245 - union acpi_operand_object *region_obj; 246 243 acpi_object_type local_type; 247 244 u32 bit_length = 0; 248 245 u32 byte_length = 0; ··· 282 281 break; 283 282 284 283 case ACPI_TYPE_FIELD_UNIT: 285 - case ACPI_TYPE_BUFFER_FIELD: 286 284 case ACPI_TYPE_LOCAL_REGION_FIELD: 287 285 case ACPI_TYPE_LOCAL_INDEX_FIELD: 288 286 case ACPI_TYPE_LOCAL_BANK_FIELD: 289 287 288 + local_type = ACPI_TYPE_FIELD_UNIT; 289 + break; 290 + 291 + case ACPI_TYPE_BUFFER_FIELD: 292 + /* 293 + * The returned object will be a Buffer if the field length 294 + * is larger than the size of an Integer (32 or 64 bits 295 + * depending on the DSDT version). 296 + */ 290 297 local_type = ACPI_TYPE_INTEGER; 291 298 if (obj_desc) { 292 - /* 293 - * Returned object will be a Buffer if the field length 294 - * is larger than the size of an Integer (32 or 64 bits 295 - * depending on the DSDT version). 296 - */ 297 299 bit_length = obj_desc->common_field.bit_length; 298 300 byte_length = ACPI_ROUND_BITS_UP_TO_BYTES(bit_length); 299 301 if (bit_length > acpi_gbl_integer_bit_width) { ··· 307 303 308 304 default: 309 305 310 - /* Ignore all other types */ 306 + /* Ignore all non-data types - Methods, Devices, Scopes, etc. */ 311 307 312 308 return (AE_OK); 313 309 } ··· 318 314 acpi_ut_get_type_name(node->type), node->name.ascii); 319 315 320 316 if (!obj_desc) { 321 - acpi_os_printf(" Ignoring, no attached object\n"); 317 + acpi_os_printf(" No attached sub-object, ignoring\n"); 322 318 return (AE_OK); 323 - } 324 - 325 - /* 326 - * Check for unsupported region types. Note: acpi_exec simulates 327 - * access to system_memory, system_IO, PCI_Config, and EC. 328 - */ 329 - switch (node->type) { 330 - case ACPI_TYPE_LOCAL_REGION_FIELD: 331 - 332 - region_obj = obj_desc->field.region_obj; 333 - switch (region_obj->region.space_id) { 334 - case ACPI_ADR_SPACE_SYSTEM_MEMORY: 335 - case ACPI_ADR_SPACE_SYSTEM_IO: 336 - case ACPI_ADR_SPACE_PCI_CONFIG: 337 - 338 - break; 339 - 340 - default: 341 - 342 - acpi_os_printf 343 - (" %s space is not supported in this command [%4.4s]\n", 344 - acpi_ut_get_region_name(region_obj->region. 345 - space_id), 346 - region_obj->region.node->name.ascii); 347 - return (AE_OK); 348 - } 349 - break; 350 - 351 - default: 352 - break; 353 319 } 354 320 355 321 /* At this point, we have resolved the object to one of the major types */ ··· 345 371 status = acpi_db_test_package_type(node); 346 372 break; 347 373 374 + case ACPI_TYPE_FIELD_UNIT: 375 + 376 + status = acpi_db_test_field_unit_type(obj_desc); 377 + break; 378 + 348 379 default: 349 380 350 381 acpi_os_printf(" Ignoring, type not implemented (%2.2X)", ··· 361 382 362 383 if (ACPI_FAILURE(status)) { 363 384 status = AE_OK; 364 - goto exit; 365 385 } 366 386 367 - switch (node->type) { 368 - case ACPI_TYPE_LOCAL_REGION_FIELD: 369 - 370 - region_obj = obj_desc->field.region_obj; 371 - acpi_os_printf(" (%s)", 372 - acpi_ut_get_region_name(region_obj->region. 373 - space_id)); 374 - 375 - break; 376 - 377 - default: 378 - break; 379 - } 380 - 381 - exit: 382 387 acpi_os_printf("\n"); 383 388 return (status); 384 389 } ··· 407 444 return (status); 408 445 } 409 446 410 - acpi_os_printf(" (%4.4X/%3.3X) %8.8X%8.8X", 447 + acpi_os_printf(ACPI_DEBUG_LENGTH_FORMAT " %8.8X%8.8X", 411 448 bit_length, ACPI_ROUND_BITS_UP_TO_BYTES(bit_length), 412 449 ACPI_FORMAT_UINT64(temp1->integer.value)); 413 450 ··· 521 558 522 559 /* Emit a few bytes of the buffer */ 523 560 524 - acpi_os_printf(" (%4.4X/%3.3X)", bit_length, temp1->buffer.length); 525 - for (i = 0; ((i < 4) && (i < byte_length)); i++) { 561 + acpi_os_printf(ACPI_DEBUG_LENGTH_FORMAT, bit_length, 562 + temp1->buffer.length); 563 + for (i = 0; ((i < 8) && (i < byte_length)); i++) { 526 564 acpi_os_printf(" %2.2X", temp1->buffer.pointer[i]); 527 565 } 528 566 acpi_os_printf("... "); ··· 629 665 return (status); 630 666 } 631 667 632 - acpi_os_printf(" (%4.4X/%3.3X) \"%s\"", (temp1->string.length * 8), 633 - temp1->string.length, temp1->string.pointer); 668 + acpi_os_printf(ACPI_DEBUG_LENGTH_FORMAT " \"%s\"", 669 + (temp1->string.length * 8), temp1->string.length, 670 + temp1->string.pointer); 634 671 635 672 /* Write a new value */ 636 673 ··· 715 750 return (status); 716 751 } 717 752 718 - acpi_os_printf(" %8.8X Elements", temp1->package.count); 753 + acpi_os_printf(" %.2X Elements", temp1->package.count); 719 754 acpi_os_free(temp1); 720 755 return (status); 756 + } 757 + 758 + /******************************************************************************* 759 + * 760 + * FUNCTION: acpi_db_test_field_unit_type 761 + * 762 + * PARAMETERS: obj_desc - A field unit object 763 + * 764 + * RETURN: Status 765 + * 766 + * DESCRIPTION: Test read/write on a named field unit. 767 + * 768 + ******************************************************************************/ 769 + 770 + static acpi_status 771 + acpi_db_test_field_unit_type(union acpi_operand_object *obj_desc) 772 + { 773 + union acpi_operand_object *region_obj; 774 + u32 bit_length = 0; 775 + u32 byte_length = 0; 776 + acpi_status status = AE_OK; 777 + union acpi_operand_object *ret_buffer_desc; 778 + 779 + /* Supported spaces are memory/io/pci_config */ 780 + 781 + region_obj = obj_desc->field.region_obj; 782 + switch (region_obj->region.space_id) { 783 + case ACPI_ADR_SPACE_SYSTEM_MEMORY: 784 + case ACPI_ADR_SPACE_SYSTEM_IO: 785 + case ACPI_ADR_SPACE_PCI_CONFIG: 786 + 787 + /* Need the interpreter to execute */ 788 + 789 + acpi_ut_acquire_mutex(ACPI_MTX_INTERPRETER); 790 + acpi_ut_acquire_mutex(ACPI_MTX_NAMESPACE); 791 + 792 + /* Exercise read-then-write */ 793 + 794 + status = 795 + acpi_ex_read_data_from_field(NULL, obj_desc, 796 + &ret_buffer_desc); 797 + if (status == AE_OK) { 798 + acpi_ex_write_data_to_field(ret_buffer_desc, obj_desc, 799 + NULL); 800 + acpi_ut_remove_reference(ret_buffer_desc); 801 + } 802 + 803 + acpi_ut_release_mutex(ACPI_MTX_NAMESPACE); 804 + acpi_ut_release_mutex(ACPI_MTX_INTERPRETER); 805 + 806 + bit_length = obj_desc->common_field.bit_length; 807 + byte_length = ACPI_ROUND_BITS_UP_TO_BYTES(bit_length); 808 + 809 + acpi_os_printf(ACPI_DEBUG_LENGTH_FORMAT " [%s]", bit_length, 810 + byte_length, 811 + acpi_ut_get_region_name(region_obj->region. 812 + space_id)); 813 + return (status); 814 + 815 + default: 816 + 817 + acpi_os_printf 818 + (" %s address space is not supported in this command [%4.4s]", 819 + acpi_ut_get_region_name(region_obj->region.space_id), 820 + region_obj->region.node->name.ascii); 821 + return (AE_OK); 822 + } 721 823 } 722 824 723 825 /*******************************************************************************
+1 -1
drivers/acpi/acpica/dsargs.c
··· 4 4 * Module Name: dsargs - Support for execution of dynamic arguments for static 5 5 * objects (regions, fields, buffer fields, etc.) 6 6 * 7 - * Copyright (C) 2000 - 2018, Intel Corp. 7 + * Copyright (C) 2000 - 2019, Intel Corp. 8 8 * 9 9 *****************************************************************************/ 10 10
+1 -1
drivers/acpi/acpica/dscontrol.c
··· 4 4 * Module Name: dscontrol - Support for execution control opcodes - 5 5 * if/else/while/return 6 6 * 7 - * Copyright (C) 2000 - 2018, Intel Corp. 7 + * Copyright (C) 2000 - 2019, Intel Corp. 8 8 * 9 9 *****************************************************************************/ 10 10
+1 -1
drivers/acpi/acpica/dsdebug.c
··· 3 3 * 4 4 * Module Name: dsdebug - Parser/Interpreter interface - debugging 5 5 * 6 - * Copyright (C) 2000 - 2018, Intel Corp. 6 + * Copyright (C) 2000 - 2019, Intel Corp. 7 7 * 8 8 *****************************************************************************/ 9 9
+8 -1
drivers/acpi/acpica/dsfield.c
··· 3 3 * 4 4 * Module Name: dsfield - Dispatcher field routines 5 5 * 6 - * Copyright (C) 2000 - 2018, Intel Corp. 6 + * Copyright (C) 2000 - 2019, Intel Corp. 7 7 * 8 8 *****************************************************************************/ 9 9 ··· 518 518 info.region_node = region_node; 519 519 520 520 status = acpi_ds_get_field_names(&info, walk_state, arg->common.next); 521 + if (info.region_node->object->region.space_id == 522 + ACPI_ADR_SPACE_PLATFORM_COMM 523 + && !(region_node->object->field.internal_pcc_buffer = 524 + ACPI_ALLOCATE_ZEROED(info.region_node->object->region. 525 + length))) { 526 + return_ACPI_STATUS(AE_NO_MEMORY); 527 + } 521 528 return_ACPI_STATUS(status); 522 529 } 523 530
+1 -1
drivers/acpi/acpica/dsinit.c
··· 3 3 * 4 4 * Module Name: dsinit - Object initialization namespace walk 5 5 * 6 - * Copyright (C) 2000 - 2018, Intel Corp. 6 + * Copyright (C) 2000 - 2019, Intel Corp. 7 7 * 8 8 *****************************************************************************/ 9 9
+1 -1
drivers/acpi/acpica/dsmethod.c
··· 3 3 * 4 4 * Module Name: dsmethod - Parser/Interpreter interface - control method parsing 5 5 * 6 - * Copyright (C) 2000 - 2018, Intel Corp. 6 + * Copyright (C) 2000 - 2019, Intel Corp. 7 7 * 8 8 *****************************************************************************/ 9 9
+1 -1
drivers/acpi/acpica/dsobject.c
··· 3 3 * 4 4 * Module Name: dsobject - Dispatcher object management routines 5 5 * 6 - * Copyright (C) 2000 - 2018, Intel Corp. 6 + * Copyright (C) 2000 - 2019, Intel Corp. 7 7 * 8 8 *****************************************************************************/ 9 9
+20 -8
drivers/acpi/acpica/dsopcode.c
··· 3 3 * 4 4 * Module Name: dsopcode - Dispatcher support for regions and fields 5 5 * 6 - * Copyright (C) 2000 - 2018, Intel Corp. 6 + * Copyright (C) 2000 - 2019, Intel Corp. 7 7 * 8 8 *****************************************************************************/ 9 9 ··· 130 130 /* Must have a valid (>0) bit count */ 131 131 132 132 if (bit_count == 0) { 133 - ACPI_ERROR((AE_INFO, 134 - "Attempt to CreateField of length zero")); 133 + ACPI_BIOS_ERROR((AE_INFO, 134 + "Attempt to CreateField of length zero")); 135 135 status = AE_AML_OPERAND_VALUE; 136 136 goto cleanup; 137 137 } ··· 194 194 /* Entire field must fit within the current length of the buffer */ 195 195 196 196 if ((bit_offset + bit_count) > (8 * (u32)buffer_desc->buffer.length)) { 197 - ACPI_ERROR((AE_INFO, 198 - "Field [%4.4s] at bit offset/length %u/%u " 199 - "exceeds size of target Buffer (%u bits)", 200 - acpi_ut_get_node_name(result_desc), bit_offset, 201 - bit_count, 8 * (u32)buffer_desc->buffer.length)); 202 197 status = AE_AML_BUFFER_LIMIT; 198 + ACPI_BIOS_EXCEPTION((AE_INFO, status, 199 + "Field [%4.4s] at bit offset/length %u/%u " 200 + "exceeds size of target Buffer (%u bits)", 201 + acpi_ut_get_node_name(result_desc), 202 + bit_offset, bit_count, 203 + 8 * (u32)buffer_desc->buffer.length)); 203 204 goto cleanup; 204 205 } 205 206 ··· 356 355 union acpi_operand_object *operand_desc; 357 356 struct acpi_namespace_node *node; 358 357 union acpi_parse_object *next_op; 358 + acpi_adr_space_type space_id; 359 359 360 360 ACPI_FUNCTION_TRACE_PTR(ds_eval_region_operands, op); 361 361 ··· 369 367 /* next_op points to the op that holds the space_ID */ 370 368 371 369 next_op = op->common.value.arg; 370 + space_id = (acpi_adr_space_type)next_op->common.value.integer; 372 371 373 372 /* next_op points to address op */ 374 373 ··· 404 401 405 402 obj_desc->region.length = (u32) operand_desc->integer.value; 406 403 acpi_ut_remove_reference(operand_desc); 404 + 405 + /* A zero-length operation region is unusable. Just warn */ 406 + 407 + if (!obj_desc->region.length 408 + && (space_id < ACPI_NUM_PREDEFINED_REGIONS)) { 409 + ACPI_WARNING((AE_INFO, 410 + "Operation Region [%4.4s] has zero length (SpaceId %X)", 411 + node->name.ascii, space_id)); 412 + } 407 413 408 414 /* 409 415 * Get the address and save it
+1 -1
drivers/acpi/acpica/dspkginit.c
··· 3 3 * 4 4 * Module Name: dspkginit - Completion of deferred package initialization 5 5 * 6 - * Copyright (C) 2000 - 2018, Intel Corp. 6 + * Copyright (C) 2000 - 2019, Intel Corp. 7 7 * 8 8 *****************************************************************************/ 9 9
+1 -1
drivers/acpi/acpica/dswexec.c
··· 4 4 * Module Name: dswexec - Dispatcher method execution callbacks; 5 5 * dispatch to interpreter. 6 6 * 7 - * Copyright (C) 2000 - 2018, Intel Corp. 7 + * Copyright (C) 2000 - 2019, Intel Corp. 8 8 * 9 9 *****************************************************************************/ 10 10
+1 -1
drivers/acpi/acpica/dswload.c
··· 3 3 * 4 4 * Module Name: dswload - Dispatcher first pass namespace load callbacks 5 5 * 6 - * Copyright (C) 2000 - 2018, Intel Corp. 6 + * Copyright (C) 2000 - 2019, Intel Corp. 7 7 * 8 8 *****************************************************************************/ 9 9
+2 -2
drivers/acpi/acpica/dswload2.c
··· 3 3 * 4 4 * Module Name: dswload2 - Dispatcher second pass namespace load callbacks 5 5 * 6 - * Copyright (C) 2000 - 2018, Intel Corp. 6 + * Copyright (C) 2000 - 2019, Intel Corp. 7 7 * 8 8 *****************************************************************************/ 9 9 ··· 24 24 * FUNCTION: acpi_ds_load2_begin_op 25 25 * 26 26 * PARAMETERS: walk_state - Current state of the parse tree walk 27 - * out_op - Wher to return op if a new one is created 27 + * out_op - Where to return op if a new one is created 28 28 * 29 29 * RETURN: Status 30 30 *
+1 -1
drivers/acpi/acpica/dswscope.c
··· 3 3 * 4 4 * Module Name: dswscope - Scope stack manipulation 5 5 * 6 - * Copyright (C) 2000 - 2018, Intel Corp. 6 + * Copyright (C) 2000 - 2019, Intel Corp. 7 7 * 8 8 *****************************************************************************/ 9 9
+1 -1
drivers/acpi/acpica/dswstate.c
··· 3 3 * 4 4 * Module Name: dswstate - Dispatcher parse tree walk management routines 5 5 * 6 - * Copyright (C) 2000 - 2018, Intel Corp. 6 + * Copyright (C) 2000 - 2019, Intel Corp. 7 7 * 8 8 *****************************************************************************/ 9 9
+1 -1
drivers/acpi/acpica/evevent.c
··· 3 3 * 4 4 * Module Name: evevent - Fixed Event handling and dispatch 5 5 * 6 - * Copyright (C) 2000 - 2018, Intel Corp. 6 + * Copyright (C) 2000 - 2019, Intel Corp. 7 7 * 8 8 *****************************************************************************/ 9 9
+1 -1
drivers/acpi/acpica/evglock.c
··· 3 3 * 4 4 * Module Name: evglock - Global Lock support 5 5 * 6 - * Copyright (C) 2000 - 2018, Intel Corp. 6 + * Copyright (C) 2000 - 2019, Intel Corp. 7 7 * 8 8 *****************************************************************************/ 9 9
+2 -2
drivers/acpi/acpica/evgpe.c
··· 3 3 * 4 4 * Module Name: evgpe - General Purpose Event handling and dispatch 5 5 * 6 - * Copyright (C) 2000 - 2018, Intel Corp. 6 + * Copyright (C) 2000 - 2019, Intel Corp. 7 7 * 8 8 *****************************************************************************/ 9 9 ··· 801 801 dispatch.handler-> 802 802 context); 803 803 804 - /* If requested, clear (if level-triggered) and reenable the GPE */ 804 + /* If requested, clear (if level-triggered) and re-enable the GPE */ 805 805 806 806 if (return_value & ACPI_REENABLE_GPE) { 807 807 (void)acpi_ev_finish_gpe(gpe_event_info);
+1 -1
drivers/acpi/acpica/evgpeblk.c
··· 3 3 * 4 4 * Module Name: evgpeblk - GPE block creation and initialization. 5 5 * 6 - * Copyright (C) 2000 - 2018, Intel Corp. 6 + * Copyright (C) 2000 - 2019, Intel Corp. 7 7 * 8 8 *****************************************************************************/ 9 9
+1 -1
drivers/acpi/acpica/evgpeinit.c
··· 3 3 * 4 4 * Module Name: evgpeinit - System GPE initialization and update 5 5 * 6 - * Copyright (C) 2000 - 2018, Intel Corp. 6 + * Copyright (C) 2000 - 2019, Intel Corp. 7 7 * 8 8 *****************************************************************************/ 9 9
+1 -1
drivers/acpi/acpica/evgpeutil.c
··· 3 3 * 4 4 * Module Name: evgpeutil - GPE utilities 5 5 * 6 - * Copyright (C) 2000 - 2018, Intel Corp. 6 + * Copyright (C) 2000 - 2019, Intel Corp. 7 7 * 8 8 *****************************************************************************/ 9 9
+1 -1
drivers/acpi/acpica/evhandler.c
··· 3 3 * 4 4 * Module Name: evhandler - Support for Address Space handlers 5 5 * 6 - * Copyright (C) 2000 - 2018, Intel Corp. 6 + * Copyright (C) 2000 - 2019, Intel Corp. 7 7 * 8 8 *****************************************************************************/ 9 9
+1 -1
drivers/acpi/acpica/evmisc.c
··· 3 3 * 4 4 * Module Name: evmisc - Miscellaneous event manager support functions 5 5 * 6 - * Copyright (C) 2000 - 2018, Intel Corp. 6 + * Copyright (C) 2000 - 2019, Intel Corp. 7 7 * 8 8 *****************************************************************************/ 9 9
+2 -2
drivers/acpi/acpica/evregion.c
··· 3 3 * 4 4 * Module Name: evregion - Operation Region support 5 5 * 6 - * Copyright (C) 2000 - 2018, Intel Corp. 6 + * Copyright (C) 2000 - 2019, Intel Corp. 7 7 * 8 8 *****************************************************************************/ 9 9 ··· 250 250 /* 251 251 * For handlers other than the default (supplied) handlers, we must 252 252 * exit the interpreter because the handler *might* block -- we don't 253 - * know what it will do, so we can't hold the lock on the intepreter. 253 + * know what it will do, so we can't hold the lock on the interpreter. 254 254 */ 255 255 acpi_ex_exit_interpreter(); 256 256 }
+1 -20
drivers/acpi/acpica/evrgnini.c
··· 3 3 * 4 4 * Module Name: evrgnini- ACPI address_space (op_region) init 5 5 * 6 - * Copyright (C) 2000 - 2018, Intel Corp. 6 + * Copyright (C) 2000 - 2019, Intel Corp. 7 7 * 8 8 *****************************************************************************/ 9 9 ··· 514 514 case ACPI_TYPE_THERMAL: 515 515 516 516 handler_obj = obj_desc->common_notify.handler; 517 - break; 518 - 519 - case ACPI_TYPE_METHOD: 520 - /* 521 - * If we are executing module level code, the original 522 - * Node's object was replaced by this Method object and we 523 - * saved the handler in the method object. 524 - * 525 - * Note: Only used for the legacy MLC support. Will 526 - * be removed in the future. 527 - * 528 - * See acpi_ns_exec_module_code 529 - */ 530 - if (!acpi_gbl_execute_tables_as_methods && 531 - obj_desc->method. 532 - info_flags & ACPI_METHOD_MODULE_LEVEL) { 533 - handler_obj = 534 - obj_desc->method.dispatch.handler; 535 - } 536 517 break; 537 518 538 519 default:
+1 -1
drivers/acpi/acpica/evxface.c
··· 3 3 * 4 4 * Module Name: evxface - External interfaces for ACPI events 5 5 * 6 - * Copyright (C) 2000 - 2018, Intel Corp. 6 + * Copyright (C) 2000 - 2019, Intel Corp. 7 7 * 8 8 *****************************************************************************/ 9 9
+1 -1
drivers/acpi/acpica/evxfevnt.c
··· 3 3 * 4 4 * Module Name: evxfevnt - External Interfaces, ACPI event disable/enable 5 5 * 6 - * Copyright (C) 2000 - 2018, Intel Corp. 6 + * Copyright (C) 2000 - 2019, Intel Corp. 7 7 * 8 8 *****************************************************************************/ 9 9
+3 -3
drivers/acpi/acpica/evxfgpe.c
··· 3 3 * 4 4 * Module Name: evxfgpe - External Interfaces for General Purpose Events (GPEs) 5 5 * 6 - * Copyright (C) 2000 - 2018, Intel Corp. 6 + * Copyright (C) 2000 - 2019, Intel Corp. 7 7 * 8 8 *****************************************************************************/ 9 9 ··· 669 669 * 670 670 * RETURN: Status 671 671 * 672 - * DESCRIPTION: Clear and conditionally reenable a GPE. This completes the GPE 672 + * DESCRIPTION: Clear and conditionally re-enable a GPE. This completes the GPE 673 673 * processing. Intended for use by asynchronous host-installed 674 - * GPE handlers. The GPE is only reenabled if the enable_for_run bit 674 + * GPE handlers. The GPE is only re-enabled if the enable_for_run bit 675 675 * is set in the GPE info. 676 676 * 677 677 ******************************************************************************/
+1 -1
drivers/acpi/acpica/evxfregn.c
··· 4 4 * Module Name: evxfregn - External Interfaces, ACPI Operation Regions and 5 5 * Address Spaces. 6 6 * 7 - * Copyright (C) 2000 - 2018, Intel Corp. 7 + * Copyright (C) 2000 - 2019, Intel Corp. 8 8 * 9 9 *****************************************************************************/ 10 10
+1 -1
drivers/acpi/acpica/exconcat.c
··· 3 3 * 4 4 * Module Name: exconcat - Concatenate-type AML operators 5 5 * 6 - * Copyright (C) 2000 - 2018, Intel Corp. 6 + * Copyright (C) 2000 - 2019, Intel Corp. 7 7 * 8 8 *****************************************************************************/ 9 9
+1 -1
drivers/acpi/acpica/exconfig.c
··· 3 3 * 4 4 * Module Name: exconfig - Namespace reconfiguration (Load/Unload opcodes) 5 5 * 6 - * Copyright (C) 2000 - 2018, Intel Corp. 6 + * Copyright (C) 2000 - 2019, Intel Corp. 7 7 * 8 8 *****************************************************************************/ 9 9
+2 -2
drivers/acpi/acpica/exconvrt.c
··· 3 3 * 4 4 * Module Name: exconvrt - Object conversion routines 5 5 * 6 - * Copyright (C) 2000 - 2018, Intel Corp. 6 + * Copyright (C) 2000 - 2019, Intel Corp. 7 7 * 8 8 *****************************************************************************/ 9 9 ··· 520 520 for (i = 0; i < obj_desc->buffer.length; i++) { 521 521 if (base == 16) { 522 522 523 - /* Emit 0x prefix for explict/implicit hex conversion */ 523 + /* Emit 0x prefix for explicit/implicit hex conversion */ 524 524 525 525 *new_buf++ = '0'; 526 526 *new_buf++ = 'x';
+1 -1
drivers/acpi/acpica/excreate.c
··· 3 3 * 4 4 * Module Name: excreate - Named object creation 5 5 * 6 - * Copyright (C) 2000 - 2018, Intel Corp. 6 + * Copyright (C) 2000 - 2019, Intel Corp. 7 7 * 8 8 *****************************************************************************/ 9 9
+1 -1
drivers/acpi/acpica/exdebug.c
··· 3 3 * 4 4 * Module Name: exdebug - Support for stores to the AML Debug Object 5 5 * 6 - * Copyright (C) 2000 - 2018, Intel Corp. 6 + * Copyright (C) 2000 - 2019, Intel Corp. 7 7 * 8 8 *****************************************************************************/ 9 9
+1 -1
drivers/acpi/acpica/exdump.c
··· 3 3 * 4 4 * Module Name: exdump - Interpreter debug output routines 5 5 * 6 - * Copyright (C) 2000 - 2018, Intel Corp. 6 + * Copyright (C) 2000 - 2019, Intel Corp. 7 7 * 8 8 *****************************************************************************/ 9 9
+70 -1
drivers/acpi/acpica/exfield.c
··· 3 3 * 4 4 * Module Name: exfield - AML execution - field_unit read/write 5 5 * 6 - * Copyright (C) 2000 - 2018, Intel Corp. 6 + * Copyright (C) 2000 - 2019, Intel Corp. 7 7 * 8 8 *****************************************************************************/ 9 9 ··· 40 40 0xFF, /* E - ATTRIB_RAW_BYTES */ 41 41 0xFF /* F - ATTRIB_RAW_PROCESS_BYTES */ 42 42 }; 43 + 44 + #define PCC_MASTER_SUBSPACE 3 45 + 46 + /* 47 + * The following macros determine a given offset is a COMD field. 48 + * According to the specification, generic subspaces (types 0-2) contains a 49 + * 2-byte COMD field at offset 4 and master subspaces (type 3) contains a 4-byte 50 + * COMD field starting at offset 12. 51 + */ 52 + #define GENERIC_SUBSPACE_COMMAND(a) (4 == a || a == 5) 53 + #define MASTER_SUBSPACE_COMMAND(a) (12 <= a && a <= 15) 43 54 44 55 /******************************************************************************* 45 56 * ··· 188 177 189 178 status = acpi_ex_read_gpio(obj_desc, buffer); 190 179 goto exit; 180 + } else if ((obj_desc->common.type == ACPI_TYPE_LOCAL_REGION_FIELD) && 181 + (obj_desc->field.region_obj->region.space_id == 182 + ACPI_ADR_SPACE_PLATFORM_COMM)) { 183 + /* 184 + * Reading from a PCC field unit does not require the handler because 185 + * it only requires reading from the internal_pcc_buffer. 186 + */ 187 + ACPI_DEBUG_PRINT((ACPI_DB_BFIELD, 188 + "PCC FieldRead bits %u\n", 189 + obj_desc->field.bit_length)); 190 + 191 + memcpy(buffer, 192 + obj_desc->field.region_obj->field.internal_pcc_buffer + 193 + obj_desc->field.base_byte_offset, 194 + (acpi_size)ACPI_ROUND_BITS_UP_TO_BYTES(obj_desc->field. 195 + bit_length)); 196 + 197 + *ret_buffer_desc = buffer_desc; 198 + return AE_OK; 191 199 } 192 200 193 201 ACPI_DEBUG_PRINT((ACPI_DB_BFIELD, ··· 259 229 { 260 230 acpi_status status; 261 231 u32 buffer_length; 232 + u32 data_length; 262 233 void *buffer; 263 234 264 235 ACPI_FUNCTION_TRACE_PTR(ex_write_data_to_field, obj_desc); ··· 303 272 acpi_ex_write_serial_bus(source_desc, obj_desc, 304 273 result_desc); 305 274 return_ACPI_STATUS(status); 275 + } else if ((obj_desc->common.type == ACPI_TYPE_LOCAL_REGION_FIELD) && 276 + (obj_desc->field.region_obj->region.space_id == 277 + ACPI_ADR_SPACE_PLATFORM_COMM)) { 278 + /* 279 + * According to the spec a write to the COMD field will invoke the 280 + * region handler. Otherwise, write to the pcc_internal buffer. This 281 + * implementation will use the offsets specified rather than the name 282 + * of the field. This is considered safer because some firmware tools 283 + * are known to obfiscate named objects. 284 + */ 285 + data_length = 286 + (acpi_size)ACPI_ROUND_BITS_UP_TO_BYTES(obj_desc->field. 287 + bit_length); 288 + memcpy(obj_desc->field.region_obj->field.internal_pcc_buffer + 289 + obj_desc->field.base_byte_offset, 290 + source_desc->buffer.pointer, data_length); 291 + 292 + if ((obj_desc->field.region_obj->region.address == 293 + PCC_MASTER_SUBSPACE 294 + && MASTER_SUBSPACE_COMMAND(obj_desc->field. 295 + base_byte_offset)) 296 + || GENERIC_SUBSPACE_COMMAND(obj_desc->field. 297 + base_byte_offset)) { 298 + 299 + /* Perform the write */ 300 + 301 + ACPI_DEBUG_PRINT((ACPI_DB_BFIELD, 302 + "PCC COMD field has been written. Invoking PCC handler now.\n")); 303 + 304 + status = 305 + acpi_ex_access_region(obj_desc, 0, 306 + (u64 *)obj_desc->field. 307 + region_obj->field. 308 + internal_pcc_buffer, 309 + ACPI_WRITE); 310 + return_ACPI_STATUS(status); 311 + } 312 + return (AE_OK); 306 313 } 307 314 308 315 /* Get a pointer to the data to be written */
+1 -1
drivers/acpi/acpica/exfldio.c
··· 3 3 * 4 4 * Module Name: exfldio - Aml Field I/O 5 5 * 6 - * Copyright (C) 2000 - 2018, Intel Corp. 6 + * Copyright (C) 2000 - 2019, Intel Corp. 7 7 * 8 8 *****************************************************************************/ 9 9
+1 -1
drivers/acpi/acpica/exmisc.c
··· 3 3 * 4 4 * Module Name: exmisc - ACPI AML (p-code) execution - specific opcodes 5 5 * 6 - * Copyright (C) 2000 - 2018, Intel Corp. 6 + * Copyright (C) 2000 - 2019, Intel Corp. 7 7 * 8 8 *****************************************************************************/ 9 9
+1 -1
drivers/acpi/acpica/exmutex.c
··· 3 3 * 4 4 * Module Name: exmutex - ASL Mutex Acquire/Release functions 5 5 * 6 - * Copyright (C) 2000 - 2018, Intel Corp. 6 + * Copyright (C) 2000 - 2019, Intel Corp. 7 7 * 8 8 *****************************************************************************/ 9 9
+1 -1
drivers/acpi/acpica/exnames.c
··· 3 3 * 4 4 * Module Name: exnames - interpreter/scanner name load/execute 5 5 * 6 - * Copyright (C) 2000 - 2018, Intel Corp. 6 + * Copyright (C) 2000 - 2019, Intel Corp. 7 7 * 8 8 *****************************************************************************/ 9 9
+1 -1
drivers/acpi/acpica/exoparg1.c
··· 3 3 * 4 4 * Module Name: exoparg1 - AML execution - opcodes with 1 argument 5 5 * 6 - * Copyright (C) 2000 - 2018, Intel Corp. 6 + * Copyright (C) 2000 - 2019, Intel Corp. 7 7 * 8 8 *****************************************************************************/ 9 9
+5 -5
drivers/acpi/acpica/exoparg2.c
··· 3 3 * 4 4 * Module Name: exoparg2 - AML execution - opcodes with 2 arguments 5 5 * 6 - * Copyright (C) 2000 - 2018, Intel Corp. 6 + * Copyright (C) 2000 - 2019, Intel Corp. 7 7 * 8 8 *****************************************************************************/ 9 9 ··· 390 390 /* Failure means that the Index was beyond the end of the object */ 391 391 392 392 if (ACPI_FAILURE(status)) { 393 - ACPI_EXCEPTION((AE_INFO, status, 394 - "Index (0x%X%8.8X) is beyond end of object (length 0x%X)", 395 - ACPI_FORMAT_UINT64(index), 396 - (u32)length)); 393 + ACPI_BIOS_EXCEPTION((AE_INFO, status, 394 + "Index (0x%X%8.8X) is beyond end of object (length 0x%X)", 395 + ACPI_FORMAT_UINT64(index), 396 + (u32)length)); 397 397 goto cleanup; 398 398 } 399 399
+1 -1
drivers/acpi/acpica/exoparg3.c
··· 3 3 * 4 4 * Module Name: exoparg3 - AML execution - opcodes with 3 arguments 5 5 * 6 - * Copyright (C) 2000 - 2018, Intel Corp. 6 + * Copyright (C) 2000 - 2019, Intel Corp. 7 7 * 8 8 *****************************************************************************/ 9 9
+1 -1
drivers/acpi/acpica/exoparg6.c
··· 3 3 * 4 4 * Module Name: exoparg6 - AML execution - opcodes with 6 arguments 5 5 * 6 - * Copyright (C) 2000 - 2018, Intel Corp. 6 + * Copyright (C) 2000 - 2019, Intel Corp. 7 7 * 8 8 *****************************************************************************/ 9 9
+1 -1
drivers/acpi/acpica/exprep.c
··· 3 3 * 4 4 * Module Name: exprep - ACPI AML field prep utilities 5 5 * 6 - * Copyright (C) 2000 - 2018, Intel Corp. 6 + * Copyright (C) 2000 - 2019, Intel Corp. 7 7 * 8 8 *****************************************************************************/ 9 9
+1 -1
drivers/acpi/acpica/exregion.c
··· 3 3 * 4 4 * Module Name: exregion - ACPI default op_region (address space) handlers 5 5 * 6 - * Copyright (C) 2000 - 2018, Intel Corp. 6 + * Copyright (C) 2000 - 2019, Intel Corp. 7 7 * 8 8 *****************************************************************************/ 9 9
+1 -1
drivers/acpi/acpica/exresnte.c
··· 3 3 * 4 4 * Module Name: exresnte - AML Interpreter object resolution 5 5 * 6 - * Copyright (C) 2000 - 2018, Intel Corp. 6 + * Copyright (C) 2000 - 2019, Intel Corp. 7 7 * 8 8 *****************************************************************************/ 9 9
+1 -1
drivers/acpi/acpica/exresolv.c
··· 3 3 * 4 4 * Module Name: exresolv - AML Interpreter object resolution 5 5 * 6 - * Copyright (C) 2000 - 2018, Intel Corp. 6 + * Copyright (C) 2000 - 2019, Intel Corp. 7 7 * 8 8 *****************************************************************************/ 9 9
+1 -1
drivers/acpi/acpica/exresop.c
··· 3 3 * 4 4 * Module Name: exresop - AML Interpreter operand/object resolution 5 5 * 6 - * Copyright (C) 2000 - 2018, Intel Corp. 6 + * Copyright (C) 2000 - 2019, Intel Corp. 7 7 * 8 8 *****************************************************************************/ 9 9
+2 -2
drivers/acpi/acpica/exserial.c
··· 3 3 * 4 4 * Module Name: exserial - field_unit support for serial address spaces 5 5 * 6 - * Copyright (C) 2000 - 2018, Intel Corp. 6 + * Copyright (C) 2000 - 2019, Intel Corp. 7 7 * 8 8 *****************************************************************************/ 9 9 ··· 21 21 * FUNCTION: acpi_ex_read_gpio 22 22 * 23 23 * PARAMETERS: obj_desc - The named field to read 24 - * buffer - Where the return data is returnd 24 + * buffer - Where the return data is returned 25 25 * 26 26 * RETURN: Status 27 27 *
+1 -1
drivers/acpi/acpica/exstore.c
··· 3 3 * 4 4 * Module Name: exstore - AML Interpreter object store support 5 5 * 6 - * Copyright (C) 2000 - 2018, Intel Corp. 6 + * Copyright (C) 2000 - 2019, Intel Corp. 7 7 * 8 8 *****************************************************************************/ 9 9
+1 -1
drivers/acpi/acpica/exstoren.c
··· 4 4 * Module Name: exstoren - AML Interpreter object store support, 5 5 * Store to Node (namespace object) 6 6 * 7 - * Copyright (C) 2000 - 2018, Intel Corp. 7 + * Copyright (C) 2000 - 2019, Intel Corp. 8 8 * 9 9 *****************************************************************************/ 10 10
+1 -1
drivers/acpi/acpica/exstorob.c
··· 3 3 * 4 4 * Module Name: exstorob - AML object store support, store to object 5 5 * 6 - * Copyright (C) 2000 - 2018, Intel Corp. 6 + * Copyright (C) 2000 - 2019, Intel Corp. 7 7 * 8 8 *****************************************************************************/ 9 9
+1 -1
drivers/acpi/acpica/exsystem.c
··· 3 3 * 4 4 * Module Name: exsystem - Interface to OS services 5 5 * 6 - * Copyright (C) 2000 - 2018, Intel Corp. 6 + * Copyright (C) 2000 - 2019, Intel Corp. 7 7 * 8 8 *****************************************************************************/ 9 9
+1 -1
drivers/acpi/acpica/extrace.c
··· 3 3 * 4 4 * Module Name: extrace - Support for interpreter execution tracing 5 5 * 6 - * Copyright (C) 2000 - 2018, Intel Corp. 6 + * Copyright (C) 2000 - 2019, Intel Corp. 7 7 * 8 8 *****************************************************************************/ 9 9
+2 -2
drivers/acpi/acpica/exutils.c
··· 3 3 * 4 4 * Module Name: exutils - interpreter/scanner utilities 5 5 * 6 - * Copyright (C) 2000 - 2018, Intel Corp. 6 + * Copyright (C) 2000 - 2019, Intel Corp. 7 7 * 8 8 *****************************************************************************/ 9 9 ··· 160 160 * RETURN: None 161 161 * 162 162 * DESCRIPTION: Obtain the ACPI hardware Global Lock, only if the field 163 - * flags specifiy that it is to be obtained before field access. 163 + * flags specify that it is to be obtained before field access. 164 164 * 165 165 ******************************************************************************/ 166 166
+1 -1
drivers/acpi/acpica/hwacpi.c
··· 3 3 * 4 4 * Module Name: hwacpi - ACPI Hardware Initialization/Mode Interface 5 5 * 6 - * Copyright (C) 2000 - 2018, Intel Corp. 6 + * Copyright (C) 2000 - 2019, Intel Corp. 7 7 * 8 8 *****************************************************************************/ 9 9
+1 -1
drivers/acpi/acpica/hwesleep.c
··· 4 4 * Name: hwesleep.c - ACPI Hardware Sleep/Wake Support functions for the 5 5 * extended FADT-V5 sleep registers. 6 6 * 7 - * Copyright (C) 2000 - 2018, Intel Corp. 7 + * Copyright (C) 2000 - 2019, Intel Corp. 8 8 * 9 9 *****************************************************************************/ 10 10
+1 -1
drivers/acpi/acpica/hwgpe.c
··· 3 3 * 4 4 * Module Name: hwgpe - Low level GPE enable/disable/clear functions 5 5 * 6 - * Copyright (C) 2000 - 2018, Intel Corp. 6 + * Copyright (C) 2000 - 2019, Intel Corp. 7 7 * 8 8 *****************************************************************************/ 9 9
+1 -1
drivers/acpi/acpica/hwsleep.c
··· 4 4 * Name: hwsleep.c - ACPI Hardware Sleep/Wake Support functions for the 5 5 * original/legacy sleep/PM registers. 6 6 * 7 - * Copyright (C) 2000 - 2018, Intel Corp. 7 + * Copyright (C) 2000 - 2019, Intel Corp. 8 8 * 9 9 *****************************************************************************/ 10 10
+1 -1
drivers/acpi/acpica/hwtimer.c
··· 3 3 * 4 4 * Name: hwtimer.c - ACPI Power Management Timer Interface 5 5 * 6 - * Copyright (C) 2000 - 2018, Intel Corp. 6 + * Copyright (C) 2000 - 2019, Intel Corp. 7 7 * 8 8 *****************************************************************************/ 9 9
+1 -1
drivers/acpi/acpica/hwvalid.c
··· 3 3 * 4 4 * Module Name: hwvalid - I/O request validation 5 5 * 6 - * Copyright (C) 2000 - 2018, Intel Corp. 6 + * Copyright (C) 2000 - 2019, Intel Corp. 7 7 * 8 8 *****************************************************************************/ 9 9
+1 -1
drivers/acpi/acpica/hwxface.c
··· 3 3 * 4 4 * Module Name: hwxface - Public ACPICA hardware interfaces 5 5 * 6 - * Copyright (C) 2000 - 2018, Intel Corp. 6 + * Copyright (C) 2000 - 2019, Intel Corp. 7 7 * 8 8 *****************************************************************************/ 9 9
+19 -79
drivers/acpi/acpica/hwxfsleep.c
··· 3 3 * 4 4 * Name: hwxfsleep.c - ACPI Hardware Sleep/Wake External Interfaces 5 5 * 6 - * Copyright (C) 2000 - 2018, Intel Corp. 6 + * Copyright (C) 2000 - 2019, Intel Corp. 7 7 * 8 8 *****************************************************************************/ 9 9 ··· 22 22 acpi_physical_address physical_address, 23 23 acpi_physical_address physical_address64); 24 24 #endif 25 - 26 - static acpi_status acpi_hw_sleep_dispatch(u8 sleep_state, u32 function_id); 27 - 28 - /* 29 - * Dispatch table used to efficiently branch to the various sleep 30 - * functions. 31 - */ 32 - #define ACPI_SLEEP_FUNCTION_ID 0 33 - #define ACPI_WAKE_PREP_FUNCTION_ID 1 34 - #define ACPI_WAKE_FUNCTION_ID 2 35 - 36 - /* Legacy functions are optional, based upon ACPI_REDUCED_HARDWARE */ 37 - 38 - static struct acpi_sleep_functions acpi_sleep_dispatch[] = { 39 - {ACPI_STRUCT_INIT(legacy_function, 40 - ACPI_HW_OPTIONAL_FUNCTION(acpi_hw_legacy_sleep)), 41 - ACPI_STRUCT_INIT(extended_function, 42 - acpi_hw_extended_sleep)}, 43 - {ACPI_STRUCT_INIT(legacy_function, 44 - ACPI_HW_OPTIONAL_FUNCTION(acpi_hw_legacy_wake_prep)), 45 - ACPI_STRUCT_INIT(extended_function, 46 - acpi_hw_extended_wake_prep)}, 47 - {ACPI_STRUCT_INIT(legacy_function, 48 - ACPI_HW_OPTIONAL_FUNCTION(acpi_hw_legacy_wake)), 49 - ACPI_STRUCT_INIT(extended_function, 50 - acpi_hw_extended_wake)} 51 - }; 52 25 53 26 /* 54 27 * These functions are removed for the ACPI_REDUCED_HARDWARE case: ··· 182 209 183 210 ACPI_EXPORT_SYMBOL(acpi_enter_sleep_state_s4bios) 184 211 #endif /* !ACPI_REDUCED_HARDWARE */ 185 - /******************************************************************************* 186 - * 187 - * FUNCTION: acpi_hw_sleep_dispatch 188 - * 189 - * PARAMETERS: sleep_state - Which sleep state to enter/exit 190 - * function_id - Sleep, wake_prep, or Wake 191 - * 192 - * RETURN: Status from the invoked sleep handling function. 193 - * 194 - * DESCRIPTION: Dispatch a sleep/wake request to the appropriate handling 195 - * function. 196 - * 197 - ******************************************************************************/ 198 - static acpi_status acpi_hw_sleep_dispatch(u8 sleep_state, u32 function_id) 199 - { 200 - acpi_status status; 201 - struct acpi_sleep_functions *sleep_functions = 202 - &acpi_sleep_dispatch[function_id]; 203 - 204 - #if (!ACPI_REDUCED_HARDWARE) 205 - /* 206 - * If the Hardware Reduced flag is set (from the FADT), we must 207 - * use the extended sleep registers (FADT). Note: As per the ACPI 208 - * specification, these extended registers are to be used for HW-reduced 209 - * platforms only. They are not general-purpose replacements for the 210 - * legacy PM register sleep support. 211 - */ 212 - if (acpi_gbl_reduced_hardware) { 213 - status = sleep_functions->extended_function(sleep_state); 214 - } else { 215 - /* Legacy sleep */ 216 - 217 - status = sleep_functions->legacy_function(sleep_state); 218 - } 219 - 220 - return (status); 221 - 222 - #else 223 - /* 224 - * For the case where reduced-hardware-only code is being generated, 225 - * we know that only the extended sleep registers are available 226 - */ 227 - status = sleep_functions->extended_function(sleep_state); 228 - return (status); 229 - 230 - #endif /* !ACPI_REDUCED_HARDWARE */ 231 - } 232 212 233 213 /******************************************************************************* 234 214 * ··· 288 362 return_ACPI_STATUS(AE_AML_OPERAND_VALUE); 289 363 } 290 364 291 - status = acpi_hw_sleep_dispatch(sleep_state, ACPI_SLEEP_FUNCTION_ID); 365 + #if !ACPI_REDUCED_HARDWARE 366 + if (!acpi_gbl_reduced_hardware) 367 + status = acpi_hw_legacy_sleep(sleep_state); 368 + else 369 + #endif 370 + status = acpi_hw_extended_sleep(sleep_state); 292 371 return_ACPI_STATUS(status); 293 372 } 294 373 ··· 319 388 320 389 ACPI_FUNCTION_TRACE(acpi_leave_sleep_state_prep); 321 390 322 - status = 323 - acpi_hw_sleep_dispatch(sleep_state, ACPI_WAKE_PREP_FUNCTION_ID); 391 + #if !ACPI_REDUCED_HARDWARE 392 + if (!acpi_gbl_reduced_hardware) 393 + status = acpi_hw_legacy_wake_prep(sleep_state); 394 + else 395 + #endif 396 + status = acpi_hw_extended_wake_prep(sleep_state); 324 397 return_ACPI_STATUS(status); 325 398 } 326 399 ··· 348 413 349 414 ACPI_FUNCTION_TRACE(acpi_leave_sleep_state); 350 415 351 - status = acpi_hw_sleep_dispatch(sleep_state, ACPI_WAKE_FUNCTION_ID); 416 + #if !ACPI_REDUCED_HARDWARE 417 + if (!acpi_gbl_reduced_hardware) 418 + status = acpi_hw_legacy_wake(sleep_state); 419 + else 420 + #endif 421 + status = acpi_hw_extended_wake(sleep_state); 352 422 return_ACPI_STATUS(status); 353 423 } 354 424
+1 -1
drivers/acpi/acpica/nsarguments.c
··· 3 3 * 4 4 * Module Name: nsarguments - Validation of args for ACPI predefined methods 5 5 * 6 - * Copyright (C) 2000 - 2018, Intel Corp. 6 + * Copyright (C) 2000 - 2019, Intel Corp. 7 7 * 8 8 *****************************************************************************/ 9 9
+1 -1
drivers/acpi/acpica/nsconvert.c
··· 4 4 * Module Name: nsconvert - Object conversions for objects returned by 5 5 * predefined methods 6 6 * 7 - * Copyright (C) 2000 - 2018, Intel Corp. 7 + * Copyright (C) 2000 - 2019, Intel Corp. 8 8 * 9 9 *****************************************************************************/ 10 10
+1 -1
drivers/acpi/acpica/nsdump.c
··· 3 3 * 4 4 * Module Name: nsdump - table dumping routines for debug 5 5 * 6 - * Copyright (C) 2000 - 2018, Intel Corp. 6 + * Copyright (C) 2000 - 2019, Intel Corp. 7 7 * 8 8 *****************************************************************************/ 9 9
+1 -1
drivers/acpi/acpica/nsdumpdv.c
··· 3 3 * 4 4 * Module Name: nsdump - table dumping routines for debug 5 5 * 6 - * Copyright (C) 2000 - 2018, Intel Corp. 6 + * Copyright (C) 2000 - 2019, Intel Corp. 7 7 * 8 8 *****************************************************************************/ 9 9
+1 -1
drivers/acpi/acpica/nsinit.c
··· 3 3 * 4 4 * Module Name: nsinit - namespace initialization 5 5 * 6 - * Copyright (C) 2000 - 2018, Intel Corp. 6 + * Copyright (C) 2000 - 2019, Intel Corp. 7 7 * 8 8 *****************************************************************************/ 9 9
+2 -2
drivers/acpi/acpica/nsload.c
··· 3 3 * 4 4 * Module Name: nsload - namespace loading/expanding/contracting procedures 5 5 * 6 - * Copyright (C) 2000 - 2018, Intel Corp. 6 + * Copyright (C) 2000 - 2019, Intel Corp. 7 7 * 8 8 *****************************************************************************/ 9 9 ··· 75 75 /* 76 76 * On error, delete any namespace objects created by this table. 77 77 * We cannot initialize these objects, so delete them. There are 78 - * a couple of expecially bad cases: 78 + * a couple of especially bad cases: 79 79 * AE_ALREADY_EXISTS - namespace collision. 80 80 * AE_NOT_FOUND - the target of a Scope operator does not 81 81 * exist. This target of Scope must already exist in the
+13 -55
drivers/acpi/acpica/nsparse.c
··· 3 3 * 4 4 * Module Name: nsparse - namespace interface to AML parser 5 5 * 6 - * Copyright (C) 2000 - 2018, Intel Corp. 6 + * Copyright (C) 2000 - 2019, Intel Corp. 7 7 * 8 8 *****************************************************************************/ 9 9 ··· 253 253 254 254 ACPI_FUNCTION_TRACE(ns_parse_table); 255 255 256 - if (acpi_gbl_execute_tables_as_methods) { 257 - /* 258 - * This case executes the AML table as one large control method. 259 - * The point of this is to execute any module-level code in-place 260 - * as the table is parsed. Some AML code depends on this behavior. 261 - * 262 - * It is a run-time option at this time, but will eventually become 263 - * the default. 264 - * 265 - * Note: This causes the table to only have a single-pass parse. 266 - * However, this is compatible with other ACPI implementations. 267 - */ 268 - ACPI_DEBUG_PRINT_RAW((ACPI_DB_PARSE, 269 - "%s: **** Start table execution pass\n", 270 - ACPI_GET_FUNCTION_NAME)); 256 + /* 257 + * Executes the AML table as one large control method. 258 + * The point of this is to execute any module-level code in-place 259 + * as the table is parsed. Some AML code depends on this behavior. 260 + * 261 + * Note: This causes the table to only have a single-pass parse. 262 + * However, this is compatible with other ACPI implementations. 263 + */ 264 + ACPI_DEBUG_PRINT_RAW((ACPI_DB_PARSE, 265 + "%s: **** Start table execution pass\n", 266 + ACPI_GET_FUNCTION_NAME)); 271 267 272 - status = acpi_ns_execute_table(table_index, start_node); 273 - if (ACPI_FAILURE(status)) { 274 - return_ACPI_STATUS(status); 275 - } 276 - } else { 277 - /* 278 - * AML Parse, pass 1 279 - * 280 - * In this pass, we load most of the namespace. Control methods 281 - * are not parsed until later. A parse tree is not created. 282 - * Instead, each Parser Op subtree is deleted when it is finished. 283 - * This saves a great deal of memory, and allows a small cache of 284 - * parse objects to service the entire parse. The second pass of 285 - * the parse then performs another complete parse of the AML. 286 - */ 287 - ACPI_DEBUG_PRINT((ACPI_DB_PARSE, "**** Start pass 1\n")); 288 - 289 - status = acpi_ns_one_complete_parse(ACPI_IMODE_LOAD_PASS1, 290 - table_index, start_node); 291 - if (ACPI_FAILURE(status)) { 292 - return_ACPI_STATUS(status); 293 - } 294 - 295 - /* 296 - * AML Parse, pass 2 297 - * 298 - * In this pass, we resolve forward references and other things 299 - * that could not be completed during the first pass. 300 - * Another complete parse of the AML is performed, but the 301 - * overhead of this is compensated for by the fact that the 302 - * parse objects are all cached. 303 - */ 304 - ACPI_DEBUG_PRINT((ACPI_DB_PARSE, "**** Start pass 2\n")); 305 - status = acpi_ns_one_complete_parse(ACPI_IMODE_LOAD_PASS2, 306 - table_index, start_node); 307 - if (ACPI_FAILURE(status)) { 308 - return_ACPI_STATUS(status); 309 - } 310 - } 268 + status = acpi_ns_execute_table(table_index, start_node); 311 269 312 270 return_ACPI_STATUS(status); 313 271 }
+1 -1
drivers/acpi/acpica/nspredef.c
··· 3 3 * 4 4 * Module Name: nspredef - Validation of ACPI predefined methods and objects 5 5 * 6 - * Copyright (C) 2000 - 2018, Intel Corp. 6 + * Copyright (C) 2000 - 2019, Intel Corp. 7 7 * 8 8 *****************************************************************************/ 9 9
+1 -1
drivers/acpi/acpica/nsprepkg.c
··· 3 3 * 4 4 * Module Name: nsprepkg - Validation of package objects for predefined names 5 5 * 6 - * Copyright (C) 2000 - 2018, Intel Corp. 6 + * Copyright (C) 2000 - 2019, Intel Corp. 7 7 * 8 8 *****************************************************************************/ 9 9
+1 -1
drivers/acpi/acpica/nsrepair.c
··· 3 3 * 4 4 * Module Name: nsrepair - Repair for objects returned by predefined methods 5 5 * 6 - * Copyright (C) 2000 - 2018, Intel Corp. 6 + * Copyright (C) 2000 - 2019, Intel Corp. 7 7 * 8 8 *****************************************************************************/ 9 9
+1 -1
drivers/acpi/acpica/nsrepair2.c
··· 4 4 * Module Name: nsrepair2 - Repair for objects returned by specific 5 5 * predefined methods 6 6 * 7 - * Copyright (C) 2000 - 2018, Intel Corp. 7 + * Copyright (C) 2000 - 2019, Intel Corp. 8 8 * 9 9 *****************************************************************************/ 10 10
+2 -2
drivers/acpi/acpica/nsutils.c
··· 4 4 * Module Name: nsutils - Utilities for accessing ACPI namespace, accessing 5 5 * parents and siblings and Scope manipulation 6 6 * 7 - * Copyright (C) 2000 - 2018, Intel Corp. 7 + * Copyright (C) 2000 - 2019, Intel Corp. 8 8 * 9 9 *****************************************************************************/ 10 10 ··· 350 350 * 351 351 * FUNCTION: acpi_ns_externalize_name 352 352 * 353 - * PARAMETERS: internal_name_length - Lenth of the internal name below 353 + * PARAMETERS: internal_name_length - Length of the internal name below 354 354 * internal_name - Internal representation of name 355 355 * converted_name_length - Where the length is returned 356 356 * converted_name - Where the resulting external name
+1 -1
drivers/acpi/acpica/nswalk.c
··· 3 3 * 4 4 * Module Name: nswalk - Functions for walking the ACPI namespace 5 5 * 6 - * Copyright (C) 2000 - 2018, Intel Corp. 6 + * Copyright (C) 2000 - 2019, Intel Corp. 7 7 * 8 8 *****************************************************************************/ 9 9
+1 -1
drivers/acpi/acpica/nsxfname.c
··· 4 4 * Module Name: nsxfname - Public interfaces to the ACPI subsystem 5 5 * ACPI Namespace oriented interfaces 6 6 * 7 - * Copyright (C) 2000 - 2018, Intel Corp. 7 + * Copyright (C) 2000 - 2019, Intel Corp. 8 8 * 9 9 *****************************************************************************/ 10 10
+1 -1
drivers/acpi/acpica/psargs.c
··· 3 3 * 4 4 * Module Name: psargs - Parse AML opcode arguments 5 5 * 6 - * Copyright (C) 2000 - 2018, Intel Corp. 6 + * Copyright (C) 2000 - 2019, Intel Corp. 7 7 * 8 8 *****************************************************************************/ 9 9
+1 -194
drivers/acpi/acpica/psloop.c
··· 3 3 * 4 4 * Module Name: psloop - Main AML parse loop 5 5 * 6 - * Copyright (C) 2000 - 2018, Intel Corp. 6 + * Copyright (C) 2000 - 2019, Intel Corp. 7 7 * 8 8 *****************************************************************************/ 9 9 ··· 32 32 acpi_ps_get_arguments(struct acpi_walk_state *walk_state, 33 33 u8 * aml_op_start, union acpi_parse_object *op); 34 34 35 - static void 36 - acpi_ps_link_module_code(union acpi_parse_object *parent_op, 37 - u8 *aml_start, u32 aml_length, acpi_owner_id owner_id); 38 - 39 35 /******************************************************************************* 40 36 * 41 37 * FUNCTION: acpi_ps_get_arguments ··· 52 56 { 53 57 acpi_status status = AE_OK; 54 58 union acpi_parse_object *arg = NULL; 55 - const struct acpi_opcode_info *op_info; 56 59 57 60 ACPI_FUNCTION_TRACE_PTR(ps_get_arguments, walk_state); 58 61 ··· 131 136 walk_state->arg_count, 132 137 walk_state->pass_number)); 133 138 134 - /* 135 - * This case handles the legacy option that groups all module-level 136 - * code blocks together and defers execution until all of the tables 137 - * are loaded. Execute all of these blocks at this time. 138 - * Execute any module-level code that was detected during the table 139 - * load phase. 140 - * 141 - * Note: this option is deprecated and will be eliminated in the 142 - * future. Use of this option can cause problems with AML code that 143 - * depends upon in-order immediate execution of module-level code. 144 - */ 145 - if (!acpi_gbl_execute_tables_as_methods && 146 - (walk_state->pass_number <= ACPI_IMODE_LOAD_PASS2) && 147 - ((walk_state->parse_flags & ACPI_PARSE_DISASSEMBLE) == 0)) { 148 - /* 149 - * We want to skip If/Else/While constructs during Pass1 because we 150 - * want to actually conditionally execute the code during Pass2. 151 - * 152 - * Except for disassembly, where we always want to walk the 153 - * If/Else/While packages 154 - */ 155 - switch (op->common.aml_opcode) { 156 - case AML_IF_OP: 157 - case AML_ELSE_OP: 158 - case AML_WHILE_OP: 159 - /* 160 - * Currently supported module-level opcodes are: 161 - * IF/ELSE/WHILE. These appear to be the most common, 162 - * and easiest to support since they open an AML 163 - * package. 164 - */ 165 - if (walk_state->pass_number == 166 - ACPI_IMODE_LOAD_PASS1) { 167 - acpi_ps_link_module_code(op->common. 168 - parent, 169 - aml_op_start, 170 - (u32) 171 - (walk_state-> 172 - parser_state. 173 - pkg_end - 174 - aml_op_start), 175 - walk_state-> 176 - owner_id); 177 - } 178 - 179 - ACPI_DEBUG_PRINT((ACPI_DB_PARSE, 180 - "Pass1: Skipping an If/Else/While body\n")); 181 - 182 - /* Skip body of if/else/while in pass 1 */ 183 - 184 - walk_state->parser_state.aml = 185 - walk_state->parser_state.pkg_end; 186 - walk_state->arg_count = 0; 187 - break; 188 - 189 - default: 190 - /* 191 - * Check for an unsupported executable opcode at module 192 - * level. We must be in PASS1, the parent must be a SCOPE, 193 - * The opcode class must be EXECUTE, and the opcode must 194 - * not be an argument to another opcode. 195 - */ 196 - if ((walk_state->pass_number == 197 - ACPI_IMODE_LOAD_PASS1) 198 - && (op->common.parent->common.aml_opcode == 199 - AML_SCOPE_OP)) { 200 - op_info = 201 - acpi_ps_get_opcode_info(op->common. 202 - aml_opcode); 203 - if ((op_info->class == 204 - AML_CLASS_EXECUTE) && (!arg)) { 205 - ACPI_WARNING((AE_INFO, 206 - "Unsupported module-level executable opcode " 207 - "0x%.2X at table offset 0x%.4X", 208 - op->common. 209 - aml_opcode, 210 - (u32) 211 - (ACPI_PTR_DIFF 212 - (aml_op_start, 213 - walk_state-> 214 - parser_state. 215 - aml_start) + 216 - sizeof(struct 217 - acpi_table_header)))); 218 - } 219 - } 220 - break; 221 - } 222 - } 223 - 224 139 /* Special processing for certain opcodes */ 225 140 226 141 switch (op->common.aml_opcode) { ··· 203 298 } 204 299 205 300 return_ACPI_STATUS(AE_OK); 206 - } 207 - 208 - /******************************************************************************* 209 - * 210 - * FUNCTION: acpi_ps_link_module_code 211 - * 212 - * PARAMETERS: parent_op - Parent parser op 213 - * aml_start - Pointer to the AML 214 - * aml_length - Length of executable AML 215 - * owner_id - owner_id of module level code 216 - * 217 - * RETURN: None. 218 - * 219 - * DESCRIPTION: Wrap the module-level code with a method object and link the 220 - * object to the global list. Note, the mutex field of the method 221 - * object is used to link multiple module-level code objects. 222 - * 223 - * NOTE: In this legacy option, each block of detected executable AML 224 - * code that is outside of any control method is wrapped with a temporary 225 - * control method object and placed on a global list below. 226 - * 227 - * This function executes the module-level code for all tables only after 228 - * all of the tables have been loaded. It is a legacy option and is 229 - * not compatible with other ACPI implementations. See acpi_ns_load_table. 230 - * 231 - * This function will be removed when the legacy option is removed. 232 - * 233 - ******************************************************************************/ 234 - 235 - static void 236 - acpi_ps_link_module_code(union acpi_parse_object *parent_op, 237 - u8 *aml_start, u32 aml_length, acpi_owner_id owner_id) 238 - { 239 - union acpi_operand_object *prev; 240 - union acpi_operand_object *next; 241 - union acpi_operand_object *method_obj; 242 - struct acpi_namespace_node *parent_node; 243 - 244 - ACPI_FUNCTION_TRACE(ps_link_module_code); 245 - 246 - /* Get the tail of the list */ 247 - 248 - prev = next = acpi_gbl_module_code_list; 249 - while (next) { 250 - prev = next; 251 - next = next->method.mutex; 252 - } 253 - 254 - /* 255 - * Insert the module level code into the list. Merge it if it is 256 - * adjacent to the previous element. 257 - */ 258 - if (!prev || 259 - ((prev->method.aml_start + prev->method.aml_length) != aml_start)) { 260 - 261 - /* Create, initialize, and link a new temporary method object */ 262 - 263 - method_obj = acpi_ut_create_internal_object(ACPI_TYPE_METHOD); 264 - if (!method_obj) { 265 - return_VOID; 266 - } 267 - 268 - ACPI_DEBUG_PRINT((ACPI_DB_PARSE, 269 - "Create/Link new code block: %p\n", 270 - method_obj)); 271 - 272 - if (parent_op->common.node) { 273 - parent_node = parent_op->common.node; 274 - } else { 275 - parent_node = acpi_gbl_root_node; 276 - } 277 - 278 - method_obj->method.aml_start = aml_start; 279 - method_obj->method.aml_length = aml_length; 280 - method_obj->method.owner_id = owner_id; 281 - method_obj->method.info_flags |= ACPI_METHOD_MODULE_LEVEL; 282 - 283 - /* 284 - * Save the parent node in next_object. This is cheating, but we 285 - * don't want to expand the method object. 286 - */ 287 - method_obj->method.next_object = 288 - ACPI_CAST_PTR(union acpi_operand_object, parent_node); 289 - 290 - if (!prev) { 291 - acpi_gbl_module_code_list = method_obj; 292 - } else { 293 - prev->method.mutex = method_obj; 294 - } 295 - } else { 296 - ACPI_DEBUG_PRINT((ACPI_DB_PARSE, 297 - "Appending to existing code block: %p\n", 298 - prev)); 299 - 300 - prev->method.aml_length += aml_length; 301 - } 302 - 303 - return_VOID; 304 301 } 305 302 306 303 /*******************************************************************************
+1 -1
drivers/acpi/acpica/psobject.c
··· 3 3 * 4 4 * Module Name: psobject - Support for parse objects 5 5 * 6 - * Copyright (C) 2000 - 2018, Intel Corp. 6 + * Copyright (C) 2000 - 2019, Intel Corp. 7 7 * 8 8 *****************************************************************************/ 9 9
+1 -1
drivers/acpi/acpica/psopcode.c
··· 3 3 * 4 4 * Module Name: psopcode - Parser/Interpreter opcode information table 5 5 * 6 - * Copyright (C) 2000 - 2018, Intel Corp. 6 + * Copyright (C) 2000 - 2019, Intel Corp. 7 7 * 8 8 *****************************************************************************/ 9 9
+1 -1
drivers/acpi/acpica/psopinfo.c
··· 3 3 * 4 4 * Module Name: psopinfo - AML opcode information functions and dispatch tables 5 5 * 6 - * Copyright (C) 2000 - 2018, Intel Corp. 6 + * Copyright (C) 2000 - 2019, Intel Corp. 7 7 * 8 8 *****************************************************************************/ 9 9
+5 -5
drivers/acpi/acpica/psparse.c
··· 3 3 * 4 4 * Module Name: psparse - Parser top level AML parse routines 5 5 * 6 - * Copyright (C) 2000 - 2018, Intel Corp. 6 + * Copyright (C) 2000 - 2019, Intel Corp. 7 7 * 8 8 *****************************************************************************/ 9 9 ··· 523 523 if (status == AE_ABORT_METHOD) { 524 524 acpi_ns_print_node_pathname(walk_state-> 525 525 method_node, 526 - "Method aborted:"); 526 + "Aborting method"); 527 527 acpi_os_printf("\n"); 528 528 } else { 529 - ACPI_ERROR_METHOD 530 - ("Method parse/execution failed", 531 - walk_state->method_node, NULL, status); 529 + ACPI_ERROR_METHOD("Aborting method", 530 + walk_state->method_node, NULL, 531 + status); 532 532 } 533 533 acpi_ex_enter_interpreter(); 534 534
+1 -1
drivers/acpi/acpica/psscope.c
··· 3 3 * 4 4 * Module Name: psscope - Parser scope stack management routines 5 5 * 6 - * Copyright (C) 2000 - 2018, Intel Corp. 6 + * Copyright (C) 2000 - 2019, Intel Corp. 7 7 * 8 8 *****************************************************************************/ 9 9
+1 -1
drivers/acpi/acpica/pstree.c
··· 3 3 * 4 4 * Module Name: pstree - Parser op tree manipulation/traversal/search 5 5 * 6 - * Copyright (C) 2000 - 2018, Intel Corp. 6 + * Copyright (C) 2000 - 2019, Intel Corp. 7 7 * 8 8 *****************************************************************************/ 9 9
+1 -1
drivers/acpi/acpica/psutils.c
··· 3 3 * 4 4 * Module Name: psutils - Parser miscellaneous utilities (Parser only) 5 5 * 6 - * Copyright (C) 2000 - 2018, Intel Corp. 6 + * Copyright (C) 2000 - 2019, Intel Corp. 7 7 * 8 8 *****************************************************************************/ 9 9
+1 -1
drivers/acpi/acpica/pswalk.c
··· 3 3 * 4 4 * Module Name: pswalk - Parser routines to walk parsed op tree(s) 5 5 * 6 - * Copyright (C) 2000 - 2018, Intel Corp. 6 + * Copyright (C) 2000 - 2019, Intel Corp. 7 7 * 8 8 *****************************************************************************/ 9 9
+1 -1
drivers/acpi/acpica/psxface.c
··· 3 3 * 4 4 * Module Name: psxface - Parser external interfaces 5 5 * 6 - * Copyright (C) 2000 - 2018, Intel Corp. 6 + * Copyright (C) 2000 - 2019, Intel Corp. 7 7 * 8 8 *****************************************************************************/ 9 9
+7 -7
drivers/acpi/acpica/rsdumpinfo.c
··· 32 32 acpi_gbl_he_decode}, 33 33 {ACPI_RSD_1BITFLAG, ACPI_RSD_OFFSET(irq.polarity), "Polarity", 34 34 acpi_gbl_ll_decode}, 35 - {ACPI_RSD_2BITFLAG, ACPI_RSD_OFFSET(irq.sharable), "Sharing", 35 + {ACPI_RSD_2BITFLAG, ACPI_RSD_OFFSET(irq.shareable), "Sharing", 36 36 acpi_gbl_shr_decode}, 37 37 {ACPI_RSD_UINT8, ACPI_RSD_OFFSET(irq.interrupt_count), 38 38 "Interrupt Count", NULL}, ··· 222 222 "Triggering", acpi_gbl_he_decode}, 223 223 {ACPI_RSD_1BITFLAG, ACPI_RSD_OFFSET(extended_irq.polarity), "Polarity", 224 224 acpi_gbl_ll_decode}, 225 - {ACPI_RSD_2BITFLAG, ACPI_RSD_OFFSET(extended_irq.sharable), "Sharing", 225 + {ACPI_RSD_2BITFLAG, ACPI_RSD_OFFSET(extended_irq.shareable), "Sharing", 226 226 acpi_gbl_shr_decode}, 227 227 {ACPI_RSD_SOURCE, ACPI_RSD_OFFSET(extended_irq.resource_source), NULL, 228 228 NULL}, ··· 255 255 "ProducerConsumer", acpi_gbl_consume_decode}, 256 256 {ACPI_RSD_UINT8, ACPI_RSD_OFFSET(gpio.pin_config), "PinConfig", 257 257 acpi_gbl_ppc_decode}, 258 - {ACPI_RSD_2BITFLAG, ACPI_RSD_OFFSET(gpio.sharable), "Sharing", 258 + {ACPI_RSD_2BITFLAG, ACPI_RSD_OFFSET(gpio.shareable), "Sharing", 259 259 acpi_gbl_shr_decode}, 260 260 {ACPI_RSD_2BITFLAG, ACPI_RSD_OFFSET(gpio.io_restriction), 261 261 "IoRestriction", acpi_gbl_ior_decode}, ··· 285 285 "RevisionId", NULL}, 286 286 {ACPI_RSD_UINT8, ACPI_RSD_OFFSET(pin_function.pin_config), "PinConfig", 287 287 acpi_gbl_ppc_decode}, 288 - {ACPI_RSD_1BITFLAG, ACPI_RSD_OFFSET(pin_function.sharable), "Sharing", 288 + {ACPI_RSD_1BITFLAG, ACPI_RSD_OFFSET(pin_function.shareable), "Sharing", 289 289 acpi_gbl_shr_decode}, 290 290 {ACPI_RSD_UINT16, ACPI_RSD_OFFSET(pin_function.function_number), 291 291 "FunctionNumber", NULL}, ··· 308 308 NULL}, 309 309 {ACPI_RSD_1BITFLAG, ACPI_RSD_OFFSET(pin_config.producer_consumer), 310 310 "ProducerConsumer", acpi_gbl_consume_decode}, 311 - {ACPI_RSD_1BITFLAG, ACPI_RSD_OFFSET(pin_config.sharable), "Sharing", 311 + {ACPI_RSD_1BITFLAG, ACPI_RSD_OFFSET(pin_config.shareable), "Sharing", 312 312 acpi_gbl_shr_decode}, 313 313 {ACPI_RSD_UINT8, ACPI_RSD_OFFSET(pin_config.pin_config_type), 314 314 "PinConfigType", NULL}, ··· 353 353 {ACPI_RSD_1BITFLAG, 354 354 ACPI_RSD_OFFSET(pin_group_function.producer_consumer), 355 355 "ProducerConsumer", acpi_gbl_consume_decode}, 356 - {ACPI_RSD_1BITFLAG, ACPI_RSD_OFFSET(pin_group_function.sharable), 356 + {ACPI_RSD_1BITFLAG, ACPI_RSD_OFFSET(pin_group_function.shareable), 357 357 "Sharing", acpi_gbl_shr_decode}, 358 358 {ACPI_RSD_UINT16, ACPI_RSD_OFFSET(pin_group_function.function_number), 359 359 "FunctionNumber", NULL}, ··· 375 375 "RevisionId", NULL}, 376 376 {ACPI_RSD_1BITFLAG, ACPI_RSD_OFFSET(pin_group_config.producer_consumer), 377 377 "ProducerConsumer", acpi_gbl_consume_decode}, 378 - {ACPI_RSD_1BITFLAG, ACPI_RSD_OFFSET(pin_group_config.sharable), 378 + {ACPI_RSD_1BITFLAG, ACPI_RSD_OFFSET(pin_group_config.shareable), 379 379 "Sharing", acpi_gbl_shr_decode}, 380 380 {ACPI_RSD_UINT8, ACPI_RSD_OFFSET(pin_group_config.pin_config_type), 381 381 "PinConfigType", NULL},
+4 -4
drivers/acpi/acpica/rsirq.c
··· 54 54 AML_OFFSET(irq.flags), 55 55 3}, 56 56 57 - {ACPI_RSC_1BITFLAG, ACPI_RS_OFFSET(data.irq.sharable), 57 + {ACPI_RSC_1BITFLAG, ACPI_RS_OFFSET(data.irq.shareable), 58 58 AML_OFFSET(irq.flags), 59 59 4}, 60 60 ··· 92 92 AML_OFFSET(irq.flags), 93 93 3}, 94 94 95 - {ACPI_RSC_1BITFLAG, ACPI_RS_OFFSET(data.irq.sharable), 95 + {ACPI_RSC_1BITFLAG, ACPI_RS_OFFSET(data.irq.shareable), 96 96 AML_OFFSET(irq.flags), 97 97 4}, 98 98 ··· 139 139 ACPI_ACTIVE_HIGH}, 140 140 141 141 {ACPI_RSC_EXIT_NE, ACPI_RSC_COMPARE_VALUE, 142 - ACPI_RS_OFFSET(data.irq.sharable), 142 + ACPI_RS_OFFSET(data.irq.shareable), 143 143 ACPI_EXCLUSIVE}, 144 144 145 145 /* We can optimize to a 2-byte irq_no_flags() descriptor */ ··· 178 178 AML_OFFSET(extended_irq.flags), 179 179 2}, 180 180 181 - {ACPI_RSC_1BITFLAG, ACPI_RS_OFFSET(data.extended_irq.sharable), 181 + {ACPI_RSC_1BITFLAG, ACPI_RS_OFFSET(data.extended_irq.shareable), 182 182 AML_OFFSET(extended_irq.flags), 183 183 3}, 184 184
+5 -5
drivers/acpi/acpica/rsserial.c
··· 39 39 AML_OFFSET(gpio.flags), 40 40 0}, 41 41 42 - {ACPI_RSC_1BITFLAG, ACPI_RS_OFFSET(data.gpio.sharable), 42 + {ACPI_RSC_1BITFLAG, ACPI_RS_OFFSET(data.gpio.shareable), 43 43 AML_OFFSET(gpio.int_flags), 44 44 3}, 45 45 ··· 128 128 AML_OFFSET(pin_function.revision_id), 129 129 1}, 130 130 131 - {ACPI_RSC_1BITFLAG, ACPI_RS_OFFSET(data.pin_function.sharable), 131 + {ACPI_RSC_1BITFLAG, ACPI_RS_OFFSET(data.pin_function.shareable), 132 132 AML_OFFSET(pin_function.flags), 133 133 0}, 134 134 ··· 518 518 AML_OFFSET(pin_config.revision_id), 519 519 1}, 520 520 521 - {ACPI_RSC_1BITFLAG, ACPI_RS_OFFSET(data.pin_config.sharable), 521 + {ACPI_RSC_1BITFLAG, ACPI_RS_OFFSET(data.pin_config.shareable), 522 522 AML_OFFSET(pin_config.flags), 523 523 0}, 524 524 ··· 658 658 AML_OFFSET(pin_group_function.revision_id), 659 659 1}, 660 660 661 - {ACPI_RSC_1BITFLAG, ACPI_RS_OFFSET(data.pin_group_function.sharable), 661 + {ACPI_RSC_1BITFLAG, ACPI_RS_OFFSET(data.pin_group_function.shareable), 662 662 AML_OFFSET(pin_group_function.flags), 663 663 0}, 664 664 ··· 735 735 AML_OFFSET(pin_group_config.revision_id), 736 736 1}, 737 737 738 - {ACPI_RSC_1BITFLAG, ACPI_RS_OFFSET(data.pin_group_config.sharable), 738 + {ACPI_RSC_1BITFLAG, ACPI_RS_OFFSET(data.pin_group_config.shareable), 739 739 AML_OFFSET(pin_group_config.flags), 740 740 0}, 741 741
+1 -1
drivers/acpi/acpica/tbdata.c
··· 3 3 * 4 4 * Module Name: tbdata - Table manager data structure functions 5 5 * 6 - * Copyright (C) 2000 - 2018, Intel Corp. 6 + * Copyright (C) 2000 - 2019, Intel Corp. 7 7 * 8 8 *****************************************************************************/ 9 9
+2 -2
drivers/acpi/acpica/tbfadt.c
··· 3 3 * 4 4 * Module Name: tbfadt - FADT table utilities 5 5 * 6 - * Copyright (C) 2000 - 2018, Intel Corp. 6 + * Copyright (C) 2000 - 2019, Intel Corp. 7 7 * 8 8 *****************************************************************************/ 9 9 ··· 556 556 * 64-bit X length field. 557 557 * Note: If the legacy length field is > 0xFF bits, ignore 558 558 * this check. (GPE registers can be larger than the 559 - * 64-bit GAS structure can accomodate, 0xFF bits). 559 + * 64-bit GAS structure can accommodate, 0xFF bits). 560 560 */ 561 561 if ((ACPI_MUL_8(length) <= ACPI_UINT8_MAX) && 562 562 (address64->bit_width !=
+1 -1
drivers/acpi/acpica/tbfind.c
··· 3 3 * 4 4 * Module Name: tbfind - find table 5 5 * 6 - * Copyright (C) 2000 - 2018, Intel Corp. 6 + * Copyright (C) 2000 - 2019, Intel Corp. 7 7 * 8 8 *****************************************************************************/ 9 9
+1 -1
drivers/acpi/acpica/tbinstal.c
··· 3 3 * 4 4 * Module Name: tbinstal - ACPI table installation and removal 5 5 * 6 - * Copyright (C) 2000 - 2018, Intel Corp. 6 + * Copyright (C) 2000 - 2019, Intel Corp. 7 7 * 8 8 *****************************************************************************/ 9 9
+1 -1
drivers/acpi/acpica/tbprint.c
··· 3 3 * 4 4 * Module Name: tbprint - Table output utilities 5 5 * 6 - * Copyright (C) 2000 - 2018, Intel Corp. 6 + * Copyright (C) 2000 - 2019, Intel Corp. 7 7 * 8 8 *****************************************************************************/ 9 9
+1 -1
drivers/acpi/acpica/tbutils.c
··· 3 3 * 4 4 * Module Name: tbutils - ACPI Table utilities 5 5 * 6 - * Copyright (C) 2000 - 2018, Intel Corp. 6 + * Copyright (C) 2000 - 2019, Intel Corp. 7 7 * 8 8 *****************************************************************************/ 9 9
+3 -3
drivers/acpi/acpica/tbxface.c
··· 3 3 * 4 4 * Module Name: tbxface - ACPI table-oriented external interfaces 5 5 * 6 - * Copyright (C) 2000 - 2018, Intel Corp. 6 + * Copyright (C) 2000 - 2019, Intel Corp. 7 7 * 8 8 *****************************************************************************/ 9 9 ··· 108 108 /* 109 109 * Get the root table (RSDT or XSDT) and extract all entries to the local 110 110 * Root Table Array. This array contains the information of the RSDT/XSDT 111 - * in a common, more useable format. 111 + * in a common, more usable format. 112 112 */ 113 113 status = acpi_tb_parse_root_table(rsdp_address); 114 114 return_ACPI_STATUS(status); ··· 169 169 if (!acpi_gbl_enable_table_validation) { 170 170 /* 171 171 * Now it's safe to do full table validation. We can do deferred 172 - * table initilization here once the flag is set. 172 + * table initialization here once the flag is set. 173 173 */ 174 174 acpi_gbl_enable_table_validation = TRUE; 175 175 for (i = 0; i < acpi_gbl_root_table_list.current_table_count;
+11 -16
drivers/acpi/acpica/tbxfload.c
··· 3 3 * 4 4 * Module Name: tbxfload - Table load/unload external interfaces 5 5 * 6 - * Copyright (C) 2000 - 2018, Intel Corp. 6 + * Copyright (C) 2000 - 2019, Intel Corp. 7 7 * 8 8 *****************************************************************************/ 9 9 ··· 69 69 "While loading namespace from ACPI tables")); 70 70 } 71 71 72 - if (acpi_gbl_execute_tables_as_methods) { 73 - /* 74 - * If the module-level code support is enabled, initialize the objects 75 - * in the namespace that remain uninitialized. This runs the executable 76 - * AML that may be part of the declaration of these name objects: 77 - * operation_regions, buffer_fields, Buffers, and Packages. 78 - * 79 - * Note: The module-level code is optional at this time, but will 80 - * become the default in the future. 81 - */ 82 - status = acpi_ns_initialize_objects(); 83 - if (ACPI_FAILURE(status)) { 84 - return_ACPI_STATUS(status); 85 - } 72 + /* 73 + * Initialize the objects in the namespace that remain uninitialized. 74 + * This runs the executable AML that may be part of the declaration of 75 + * these name objects: 76 + * operation_regions, buffer_fields, Buffers, and Packages. 77 + * 78 + */ 79 + status = acpi_ns_initialize_objects(); 80 + if (ACPI_SUCCESS(status)) { 81 + acpi_gbl_namespace_initialized = TRUE; 86 82 } 87 83 88 - acpi_gbl_namespace_initialized = TRUE; 89 84 return_ACPI_STATUS(status); 90 85 } 91 86
+1 -1
drivers/acpi/acpica/tbxfroot.c
··· 3 3 * 4 4 * Module Name: tbxfroot - Find the root ACPI table (RSDT) 5 5 * 6 - * Copyright (C) 2000 - 2018, Intel Corp. 6 + * Copyright (C) 2000 - 2019, Intel Corp. 7 7 * 8 8 *****************************************************************************/ 9 9
+1 -1
drivers/acpi/acpica/utaddress.c
··· 3 3 * 4 4 * Module Name: utaddress - op_region address range check 5 5 * 6 - * Copyright (C) 2000 - 2018, Intel Corp. 6 + * Copyright (C) 2000 - 2019, Intel Corp. 7 7 * 8 8 *****************************************************************************/ 9 9
+1 -1
drivers/acpi/acpica/utalloc.c
··· 3 3 * 4 4 * Module Name: utalloc - local memory allocation routines 5 5 * 6 - * Copyright (C) 2000 - 2018, Intel Corp. 6 + * Copyright (C) 2000 - 2019, Intel Corp. 7 7 * 8 8 *****************************************************************************/ 9 9
+1 -1
drivers/acpi/acpica/utascii.c
··· 3 3 * 4 4 * Module Name: utascii - Utility ascii functions 5 5 * 6 - * Copyright (C) 2000 - 2018, Intel Corp. 6 + * Copyright (C) 2000 - 2019, Intel Corp. 7 7 * 8 8 *****************************************************************************/ 9 9
+1 -1
drivers/acpi/acpica/utbuffer.c
··· 3 3 * 4 4 * Module Name: utbuffer - Buffer dump routines 5 5 * 6 - * Copyright (C) 2000 - 2018, Intel Corp. 6 + * Copyright (C) 2000 - 2019, Intel Corp. 7 7 * 8 8 *****************************************************************************/ 9 9
+1 -1
drivers/acpi/acpica/utcache.c
··· 3 3 * 4 4 * Module Name: utcache - local cache allocation routines 5 5 * 6 - * Copyright (C) 2000 - 2018, Intel Corp. 6 + * Copyright (C) 2000 - 2019, Intel Corp. 7 7 * 8 8 *****************************************************************************/ 9 9
+1 -1
drivers/acpi/acpica/utcopy.c
··· 3 3 * 4 4 * Module Name: utcopy - Internal to external object translation utilities 5 5 * 6 - * Copyright (C) 2000 - 2018, Intel Corp. 6 + * Copyright (C) 2000 - 2019, Intel Corp. 7 7 * 8 8 *****************************************************************************/ 9 9
+1 -1
drivers/acpi/acpica/utdebug.c
··· 3 3 * 4 4 * Module Name: utdebug - Debug print/trace routines 5 5 * 6 - * Copyright (C) 2000 - 2018, Intel Corp. 6 + * Copyright (C) 2000 - 2019, Intel Corp. 7 7 * 8 8 *****************************************************************************/ 9 9
+11 -9
drivers/acpi/acpica/utdecode.c
··· 3 3 * 4 4 * Module Name: utdecode - Utility decoding routines (value-to-string) 5 5 * 6 - * Copyright (C) 2000 - 2018, Intel Corp. 6 + * Copyright (C) 2000 - 2019, Intel Corp. 7 7 * 8 8 *****************************************************************************/ 9 9 ··· 284 284 285 285 static const char *acpi_gbl_desc_type_names[] = { 286 286 /* 00 */ "Not a Descriptor", 287 - /* 01 */ "Cached", 287 + /* 01 */ "Cached Object", 288 288 /* 02 */ "State-Generic", 289 289 /* 03 */ "State-Update", 290 290 /* 04 */ "State-Package", ··· 295 295 /* 09 */ "State-Result", 296 296 /* 10 */ "State-Notify", 297 297 /* 11 */ "State-Thread", 298 - /* 12 */ "Walk", 299 - /* 13 */ "Parser", 300 - /* 14 */ "Operand", 301 - /* 15 */ "Node" 298 + /* 12 */ "Tree Walk State", 299 + /* 13 */ "Parse Tree Op", 300 + /* 14 */ "Operand Object", 301 + /* 15 */ "Namespace Node" 302 302 }; 303 303 304 304 const char *acpi_ut_get_descriptor_name(void *object) ··· 430 430 /* 0C */ "Reserved (was previously Shutdown Request)", 431 431 /* Reserved in ACPI 6.0 */ 432 432 /* 0D */ "System Resource Affinity Update", 433 - /* 0E */ "Heterogeneous Memory Attributes Update" 433 + /* 0E */ "Heterogeneous Memory Attributes Update", 434 434 /* ACPI 6.2 */ 435 + /* 0F */ "Error Disconnect Recover" 436 + /* ACPI 6.3 */ 435 437 }; 436 438 437 439 static const char *acpi_gbl_device_notify[5] = { ··· 463 461 const char *acpi_ut_get_notify_name(u32 notify_value, acpi_object_type type) 464 462 { 465 463 466 - /* 00 - 0D are "common to all object types" (from ACPI Spec) */ 464 + /* 00 - 0F are "common to all object types" (from ACPI Spec) */ 467 465 468 466 if (notify_value <= ACPI_GENERIC_NOTIFY_MAX) { 469 467 return (acpi_gbl_generic_notify[notify_value]); 470 468 } 471 469 472 - /* 0E - 7F are reserved */ 470 + /* 10 - 7F are reserved */ 473 471 474 472 if (notify_value <= ACPI_MAX_SYS_NOTIFY) { 475 473 return ("Reserved");
+4
drivers/acpi/acpica/utdelete.c
··· 257 257 258 258 acpi_ut_delete_object_desc(second_desc); 259 259 } 260 + if (object->field.internal_pcc_buffer) { 261 + ACPI_FREE(object->field.internal_pcc_buffer); 262 + } 263 + 260 264 break; 261 265 262 266 case ACPI_TYPE_BUFFER_FIELD:
+5 -4
drivers/acpi/acpica/uterror.c
··· 183 183 case AE_ALREADY_EXISTS: 184 184 185 185 acpi_os_printf(ACPI_MSG_BIOS_ERROR); 186 - message = "Failure creating"; 186 + message = "Failure creating named object"; 187 187 break; 188 188 189 189 case AE_NOT_FOUND: 190 190 191 191 acpi_os_printf(ACPI_MSG_BIOS_ERROR); 192 - message = "Could not resolve"; 192 + message = "Could not resolve symbol"; 193 193 break; 194 194 195 195 default: 196 196 197 197 acpi_os_printf(ACPI_MSG_ERROR); 198 - message = "Failure resolving"; 198 + message = "Failure resolving symbol"; 199 199 break; 200 200 } 201 201 ··· 317 317 } 318 318 319 319 acpi_ns_print_node_pathname(node, message); 320 - acpi_os_printf(", %s", acpi_format_exception(method_status)); 320 + acpi_os_printf(" due to previous error (%s)", 321 + acpi_format_exception(method_status)); 321 322 322 323 ACPI_MSG_SUFFIX; 323 324 ACPI_MSG_REDIRECT_END;
+1 -1
drivers/acpi/acpica/uteval.c
··· 3 3 * 4 4 * Module Name: uteval - Object evaluation 5 5 * 6 - * Copyright (C) 2000 - 2018, Intel Corp. 6 + * Copyright (C) 2000 - 2019, Intel Corp. 7 7 * 8 8 *****************************************************************************/ 9 9
+1 -1
drivers/acpi/acpica/utglobal.c
··· 3 3 * 4 4 * Module Name: utglobal - Global variables for the ACPI subsystem 5 5 * 6 - * Copyright (C) 2000 - 2018, Intel Corp. 6 + * Copyright (C) 2000 - 2019, Intel Corp. 7 7 * 8 8 *****************************************************************************/ 9 9
+1 -1
drivers/acpi/acpica/uthex.c
··· 3 3 * 4 4 * Module Name: uthex -- Hex/ASCII support functions 5 5 * 6 - * Copyright (C) 2000 - 2018, Intel Corp. 6 + * Copyright (C) 2000 - 2019, Intel Corp. 7 7 * 8 8 *****************************************************************************/ 9 9
+1 -1
drivers/acpi/acpica/utids.c
··· 3 3 * 4 4 * Module Name: utids - support for device Ids - HID, UID, CID, SUB, CLS 5 5 * 6 - * Copyright (C) 2000 - 2018, Intel Corp. 6 + * Copyright (C) 2000 - 2019, Intel Corp. 7 7 * 8 8 *****************************************************************************/ 9 9
+1 -1
drivers/acpi/acpica/utinit.c
··· 3 3 * 4 4 * Module Name: utinit - Common ACPI subsystem initialization 5 5 * 6 - * Copyright (C) 2000 - 2018, Intel Corp. 6 + * Copyright (C) 2000 - 2019, Intel Corp. 7 7 * 8 8 *****************************************************************************/ 9 9
+1 -1
drivers/acpi/acpica/utlock.c
··· 3 3 * 4 4 * Module Name: utlock - Reader/Writer lock interfaces 5 5 * 6 - * Copyright (C) 2000 - 2018, Intel Corp. 6 + * Copyright (C) 2000 - 2019, Intel Corp. 7 7 * 8 8 *****************************************************************************/ 9 9
+1 -1
drivers/acpi/acpica/utobject.c
··· 3 3 * 4 4 * Module Name: utobject - ACPI object create/delete/size/cache routines 5 5 * 6 - * Copyright (C) 2000 - 2018, Intel Corp. 6 + * Copyright (C) 2000 - 2019, Intel Corp. 7 7 * 8 8 *****************************************************************************/ 9 9
+1 -1
drivers/acpi/acpica/utosi.c
··· 3 3 * 4 4 * Module Name: utosi - Support for the _OSI predefined control method 5 5 * 6 - * Copyright (C) 2000 - 2018, Intel Corp. 6 + * Copyright (C) 2000 - 2019, Intel Corp. 7 7 * 8 8 *****************************************************************************/ 9 9
+1 -1
drivers/acpi/acpica/utpredef.c
··· 3 3 * 4 4 * Module Name: utpredef - support functions for predefined names 5 5 * 6 - * Copyright (C) 2000 - 2018, Intel Corp. 6 + * Copyright (C) 2000 - 2019, Intel Corp. 7 7 * 8 8 *****************************************************************************/ 9 9
+1 -1
drivers/acpi/acpica/utprint.c
··· 3 3 * 4 4 * Module Name: utprint - Formatted printing routines 5 5 * 6 - * Copyright (C) 2000 - 2018, Intel Corp. 6 + * Copyright (C) 2000 - 2019, Intel Corp. 7 7 * 8 8 *****************************************************************************/ 9 9
+13 -1
drivers/acpi/acpica/uttrack.c
··· 3 3 * 4 4 * Module Name: uttrack - Memory allocation tracking routines (debug only) 5 5 * 6 - * Copyright (C) 2000 - 2018, Intel Corp. 6 + * Copyright (C) 2000 - 2019, Intel Corp. 7 7 * 8 8 *****************************************************************************/ 9 9 ··· 587 587 element->module, element->line, 588 588 acpi_ut_get_descriptor_name 589 589 (descriptor)); 590 + 591 + /* Optional object hex dump */ 592 + 593 + if (acpi_gbl_verbose_leak_dump) { 594 + acpi_os_printf("\n"); 595 + acpi_ut_dump_buffer((u8 *) 596 + descriptor, 597 + element-> 598 + size, 599 + DB_BYTE_DISPLAY, 600 + 0); 601 + } 590 602 591 603 /* Validate the descriptor type using Type field and length */ 592 604
+1 -1
drivers/acpi/acpica/utuuid.c
··· 3 3 * 4 4 * Module Name: utuuid -- UUID support functions 5 5 * 6 - * Copyright (C) 2000 - 2018, Intel Corp. 6 + * Copyright (C) 2000 - 2019, Intel Corp. 7 7 * 8 8 *****************************************************************************/ 9 9
+1 -1
drivers/acpi/acpica/utxface.c
··· 3 3 * 4 4 * Module Name: utxface - External interfaces, miscellaneous utility functions 5 5 * 6 - * Copyright (C) 2000 - 2018, Intel Corp. 6 + * Copyright (C) 2000 - 2019, Intel Corp. 7 7 * 8 8 *****************************************************************************/ 9 9
+44
drivers/acpi/acpica/utxferror.c
··· 187 187 188 188 /******************************************************************************* 189 189 * 190 + * FUNCTION: acpi_bios_exception 191 + * 192 + * PARAMETERS: module_name - Caller's module name (for error output) 193 + * line_number - Caller's line number (for error output) 194 + * status - Status value to be decoded/formatted 195 + * format - Printf format string + additional args 196 + * 197 + * RETURN: None 198 + * 199 + * DESCRIPTION: Print an "ACPI Firmware Error" message with module/line/version 200 + * info as well as decoded acpi_status. 201 + * 202 + ******************************************************************************/ 203 + void ACPI_INTERNAL_VAR_XFACE 204 + acpi_bios_exception(const char *module_name, 205 + u32 line_number, 206 + acpi_status status, const char *format, ...) 207 + { 208 + va_list arg_list; 209 + 210 + ACPI_MSG_REDIRECT_BEGIN; 211 + 212 + /* For AE_OK, just print the message */ 213 + 214 + if (ACPI_SUCCESS(status)) { 215 + acpi_os_printf(ACPI_MSG_BIOS_ERROR); 216 + 217 + } else { 218 + acpi_os_printf(ACPI_MSG_BIOS_ERROR "%s, ", 219 + acpi_format_exception(status)); 220 + } 221 + 222 + va_start(arg_list, format); 223 + acpi_os_vprintf(format, arg_list); 224 + ACPI_MSG_SUFFIX; 225 + va_end(arg_list); 226 + 227 + ACPI_MSG_REDIRECT_END; 228 + } 229 + 230 + ACPI_EXPORT_SYMBOL(acpi_bios_exception) 231 + 232 + /******************************************************************************* 233 + * 190 234 * FUNCTION: acpi_bios_warning 191 235 * 192 236 * PARAMETERS: module_name - Caller's module name (for warning output)
+1 -1
drivers/acpi/acpica/utxfinit.c
··· 3 3 * 4 4 * Module Name: utxfinit - External interfaces for ACPICA initialization 5 5 * 6 - * Copyright (C) 2000 - 2018, Intel Corp. 6 + * Copyright (C) 2000 - 2019, Intel Corp. 7 7 * 8 8 *****************************************************************************/ 9 9
+1 -11
drivers/acpi/apei/Kconfig
··· 41 41 Turn on this option to enable the corresponding support. 42 42 43 43 config ACPI_APEI_SEA 44 - bool "APEI Synchronous External Abort logging/recovering support" 44 + bool 45 45 depends on ARM64 && ACPI_APEI_GHES 46 46 default y 47 - help 48 - This option should be enabled if the system supports 49 - firmware first handling of SEA (Synchronous External Abort). 50 - SEA happens with certain faults of data abort or instruction 51 - abort synchronous exceptions on ARMv8 systems. If a system 52 - supports firmware first handling of SEA, the platform analyzes 53 - and handles hardware error notifications from SEA, and it may then 54 - form a HW error record for the OS to parse and handle. This 55 - option allows the OS to look for such hardware error record, and 56 - take appropriate action. 57 47 58 48 config ACPI_APEI_MEMORY_FAILURE 59 49 bool "APEI memory error recovering support"
+10 -13
drivers/acpi/apei/bert.c
··· 42 42 int remain = region_len; 43 43 u32 estatus_len; 44 44 45 - if (!estatus->block_status) 46 - return; 47 - 48 - while (remain > sizeof(struct acpi_bert_region)) { 49 - if (cper_estatus_check(estatus)) { 50 - pr_err(FW_BUG "Invalid error record.\n"); 51 - return; 52 - } 53 - 45 + while (remain >= sizeof(struct acpi_bert_region)) { 54 46 estatus_len = cper_estatus_len(estatus); 55 47 if (remain < estatus_len) { 56 48 pr_err(FW_BUG "Truncated status block (length: %u).\n", 57 49 estatus_len); 50 + return; 51 + } 52 + 53 + /* No more error records. */ 54 + if (!estatus->block_status) 55 + return; 56 + 57 + if (cper_estatus_check(estatus)) { 58 + pr_err(FW_BUG "Invalid error record.\n"); 58 59 return; 59 60 } 60 61 ··· 71 70 estatus->block_status = 0; 72 71 73 72 estatus = (void *)estatus + estatus_len; 74 - /* No more error records. */ 75 - if (!estatus->block_status) 76 - return; 77 - 78 73 remain -= estatus_len; 79 74 } 80 75 }
+25 -68
drivers/acpi/apei/einj.c
··· 644 644 return 0; 645 645 } 646 646 647 - DEFINE_SIMPLE_ATTRIBUTE(error_type_fops, error_type_get, 648 - error_type_set, "0x%llx\n"); 647 + DEFINE_DEBUGFS_ATTRIBUTE(error_type_fops, error_type_get, error_type_set, 648 + "0x%llx\n"); 649 649 650 650 static int error_inject_set(void *data, u64 val) 651 651 { ··· 656 656 error_param3, error_param4); 657 657 } 658 658 659 - DEFINE_SIMPLE_ATTRIBUTE(error_inject_fops, NULL, 660 - error_inject_set, "%llu\n"); 659 + DEFINE_DEBUGFS_ATTRIBUTE(error_inject_fops, NULL, error_inject_set, "%llu\n"); 661 660 662 661 static int einj_check_table(struct acpi_table_einj *einj_tab) 663 662 { ··· 678 679 { 679 680 int rc; 680 681 acpi_status status; 681 - struct dentry *fentry; 682 682 struct apei_exec_context ctx; 683 683 684 684 if (acpi_disabled) { ··· 705 707 706 708 rc = -ENOMEM; 707 709 einj_debug_dir = debugfs_create_dir("einj", apei_get_debugfs_dir()); 708 - if (!einj_debug_dir) { 709 - pr_err("Error creating debugfs node.\n"); 710 - goto err_cleanup; 711 - } 712 710 713 - fentry = debugfs_create_file("available_error_type", S_IRUSR, 714 - einj_debug_dir, NULL, 715 - &available_error_type_fops); 716 - if (!fentry) 717 - goto err_cleanup; 718 - 719 - fentry = debugfs_create_file("error_type", S_IRUSR | S_IWUSR, 720 - einj_debug_dir, NULL, &error_type_fops); 721 - if (!fentry) 722 - goto err_cleanup; 723 - fentry = debugfs_create_file("error_inject", S_IWUSR, 724 - einj_debug_dir, NULL, &error_inject_fops); 725 - if (!fentry) 726 - goto err_cleanup; 711 + debugfs_create_file("available_error_type", S_IRUSR, einj_debug_dir, 712 + NULL, &available_error_type_fops); 713 + debugfs_create_file_unsafe("error_type", 0600, einj_debug_dir, 714 + NULL, &error_type_fops); 715 + debugfs_create_file_unsafe("error_inject", 0200, einj_debug_dir, 716 + NULL, &error_inject_fops); 727 717 728 718 apei_resources_init(&einj_resources); 729 719 einj_exec_ctx_init(&ctx); ··· 736 750 rc = -ENOMEM; 737 751 einj_param = einj_get_parameter_address(); 738 752 if ((param_extension || acpi5) && einj_param) { 739 - fentry = debugfs_create_x32("flags", S_IRUSR | S_IWUSR, 740 - einj_debug_dir, &error_flags); 741 - if (!fentry) 742 - goto err_unmap; 743 - fentry = debugfs_create_x64("param1", S_IRUSR | S_IWUSR, 744 - einj_debug_dir, &error_param1); 745 - if (!fentry) 746 - goto err_unmap; 747 - fentry = debugfs_create_x64("param2", S_IRUSR | S_IWUSR, 748 - einj_debug_dir, &error_param2); 749 - if (!fentry) 750 - goto err_unmap; 751 - fentry = debugfs_create_x64("param3", S_IRUSR | S_IWUSR, 752 - einj_debug_dir, &error_param3); 753 - if (!fentry) 754 - goto err_unmap; 755 - fentry = debugfs_create_x64("param4", S_IRUSR | S_IWUSR, 756 - einj_debug_dir, &error_param4); 757 - if (!fentry) 758 - goto err_unmap; 759 - 760 - fentry = debugfs_create_x32("notrigger", S_IRUSR | S_IWUSR, 761 - einj_debug_dir, &notrigger); 762 - if (!fentry) 763 - goto err_unmap; 753 + debugfs_create_x32("flags", S_IRUSR | S_IWUSR, einj_debug_dir, 754 + &error_flags); 755 + debugfs_create_x64("param1", S_IRUSR | S_IWUSR, einj_debug_dir, 756 + &error_param1); 757 + debugfs_create_x64("param2", S_IRUSR | S_IWUSR, einj_debug_dir, 758 + &error_param2); 759 + debugfs_create_x64("param3", S_IRUSR | S_IWUSR, einj_debug_dir, 760 + &error_param3); 761 + debugfs_create_x64("param4", S_IRUSR | S_IWUSR, einj_debug_dir, 762 + &error_param4); 763 + debugfs_create_x32("notrigger", S_IRUSR | S_IWUSR, 764 + einj_debug_dir, &notrigger); 764 765 } 765 766 766 767 if (vendor_dev[0]) { 767 768 vendor_blob.data = vendor_dev; 768 769 vendor_blob.size = strlen(vendor_dev); 769 - fentry = debugfs_create_blob("vendor", S_IRUSR, 770 - einj_debug_dir, &vendor_blob); 771 - if (!fentry) 772 - goto err_unmap; 773 - fentry = debugfs_create_x32("vendor_flags", S_IRUSR | S_IWUSR, 774 - einj_debug_dir, &vendor_flags); 775 - if (!fentry) 776 - goto err_unmap; 770 + debugfs_create_blob("vendor", S_IRUSR, einj_debug_dir, 771 + &vendor_blob); 772 + debugfs_create_x32("vendor_flags", S_IRUSR | S_IWUSR, 773 + einj_debug_dir, &vendor_flags); 777 774 } 778 775 779 776 pr_info("Error INJection is initialized.\n"); 780 777 781 778 return 0; 782 779 783 - err_unmap: 784 - if (einj_param) { 785 - acpi_size size = (acpi5) ? 786 - sizeof(struct set_error_type_with_address) : 787 - sizeof(struct einj_parameter); 788 - 789 - acpi_os_unmap_iomem(einj_param, size); 790 - pr_err("Error creating param extension debugfs nodes.\n"); 791 - } 792 - apei_exec_post_unmap_gars(&ctx); 793 780 err_release: 794 781 apei_resources_release(&einj_resources); 795 782 err_fini: 796 783 apei_resources_fini(&einj_resources); 797 - err_cleanup: 798 - pr_err("Error creating primary debugfs nodes.\n"); 799 784 debugfs_remove_recursive(einj_debug_dir); 800 785 801 786 return rc;
+12 -15
drivers/acpi/apei/erst.c
··· 938 938 }; 939 939 940 940 #define CPER_CREATOR_PSTORE \ 941 - UUID_LE(0x75a574e3, 0x5052, 0x4b29, 0x8a, 0x8e, 0xbe, 0x2c, \ 942 - 0x64, 0x90, 0xb8, 0x9d) 941 + GUID_INIT(0x75a574e3, 0x5052, 0x4b29, 0x8a, 0x8e, 0xbe, 0x2c, \ 942 + 0x64, 0x90, 0xb8, 0x9d) 943 943 #define CPER_SECTION_TYPE_DMESG \ 944 - UUID_LE(0xc197e04e, 0xd545, 0x4a70, 0x9c, 0x17, 0xa5, 0x54, \ 945 - 0x94, 0x19, 0xeb, 0x12) 944 + GUID_INIT(0xc197e04e, 0xd545, 0x4a70, 0x9c, 0x17, 0xa5, 0x54, \ 945 + 0x94, 0x19, 0xeb, 0x12) 946 946 #define CPER_SECTION_TYPE_DMESG_Z \ 947 - UUID_LE(0x4f118707, 0x04dd, 0x4055, 0xb5, 0xdd, 0x95, 0x6d, \ 948 - 0x34, 0xdd, 0xfa, 0xc6) 947 + GUID_INIT(0x4f118707, 0x04dd, 0x4055, 0xb5, 0xdd, 0x95, 0x6d, \ 948 + 0x34, 0xdd, 0xfa, 0xc6) 949 949 #define CPER_SECTION_TYPE_MCE \ 950 - UUID_LE(0xfe08ffbe, 0x95e4, 0x4be7, 0xbc, 0x73, 0x40, 0x96, \ 951 - 0x04, 0x4a, 0x38, 0xfc) 950 + GUID_INIT(0xfe08ffbe, 0x95e4, 0x4be7, 0xbc, 0x73, 0x40, 0x96, \ 951 + 0x04, 0x4a, 0x38, 0xfc) 952 952 953 953 struct cper_pstore_record { 954 954 struct cper_record_header hdr; ··· 1012 1012 rc = -EIO; 1013 1013 goto out; 1014 1014 } 1015 - if (uuid_le_cmp(rcd->hdr.creator_id, CPER_CREATOR_PSTORE) != 0) 1015 + if (!guid_equal(&rcd->hdr.creator_id, &CPER_CREATOR_PSTORE)) 1016 1016 goto skip; 1017 1017 1018 1018 record->buf = kmalloc(len, GFP_KERNEL); ··· 1024 1024 record->id = record_id; 1025 1025 record->compressed = false; 1026 1026 record->ecc_notice_size = 0; 1027 - if (uuid_le_cmp(rcd->sec_hdr.section_type, 1028 - CPER_SECTION_TYPE_DMESG_Z) == 0) { 1027 + if (guid_equal(&rcd->sec_hdr.section_type, &CPER_SECTION_TYPE_DMESG_Z)) { 1029 1028 record->type = PSTORE_TYPE_DMESG; 1030 1029 record->compressed = true; 1031 - } else if (uuid_le_cmp(rcd->sec_hdr.section_type, 1032 - CPER_SECTION_TYPE_DMESG) == 0) 1030 + } else if (guid_equal(&rcd->sec_hdr.section_type, &CPER_SECTION_TYPE_DMESG)) 1033 1031 record->type = PSTORE_TYPE_DMESG; 1034 - else if (uuid_le_cmp(rcd->sec_hdr.section_type, 1035 - CPER_SECTION_TYPE_MCE) == 0) 1032 + else if (guid_equal(&rcd->sec_hdr.section_type, &CPER_SECTION_TYPE_MCE)) 1036 1033 record->type = PSTORE_TYPE_MCE; 1037 1034 else 1038 1035 record->type = PSTORE_TYPE_MAX;
+378 -291
drivers/acpi/apei/ghes.c
··· 25 25 * GNU General Public License for more details. 26 26 */ 27 27 28 + #include <linux/arm_sdei.h> 28 29 #include <linux/kernel.h> 29 30 #include <linux/moduleparam.h> 30 31 #include <linux/init.h> ··· 34 33 #include <linux/interrupt.h> 35 34 #include <linux/timer.h> 36 35 #include <linux/cper.h> 37 - #include <linux/kdebug.h> 38 36 #include <linux/platform_device.h> 39 37 #include <linux/mutex.h> 40 38 #include <linux/ratelimit.h> ··· 42 42 #include <linux/llist.h> 43 43 #include <linux/genalloc.h> 44 44 #include <linux/pci.h> 45 + #include <linux/pfn.h> 45 46 #include <linux/aer.h> 46 47 #include <linux/nmi.h> 47 48 #include <linux/sched/clock.h> ··· 86 85 ((struct acpi_hest_generic_status *) \ 87 86 ((struct ghes_estatus_node *)(estatus_node) + 1)) 88 87 88 + /* 89 + * NMI-like notifications vary by architecture, before the compiler can prune 90 + * unused static functions it needs a value for these enums. 91 + */ 92 + #ifndef CONFIG_ARM_SDE_INTERFACE 93 + #define FIX_APEI_GHES_SDEI_NORMAL __end_of_fixed_addresses 94 + #define FIX_APEI_GHES_SDEI_CRITICAL __end_of_fixed_addresses 95 + #endif 96 + 89 97 static inline bool is_hest_type_generic_v2(struct ghes *ghes) 90 98 { 91 99 return ghes->generic->header.type == ACPI_HEST_TYPE_GENERIC_ERROR_V2; ··· 125 115 * handler, but general ioremap can not be used in atomic context, so 126 116 * the fixmap is used instead. 127 117 * 128 - * These 2 spinlocks are used to prevent the fixmap entries from being used 118 + * This spinlock is used to prevent the fixmap entry from being used 129 119 * simultaneously. 130 120 */ 131 - static DEFINE_RAW_SPINLOCK(ghes_ioremap_lock_nmi); 132 - static DEFINE_SPINLOCK(ghes_ioremap_lock_irq); 121 + static DEFINE_SPINLOCK(ghes_notify_lock_irq); 133 122 134 123 static struct gen_pool *ghes_estatus_pool; 135 124 static unsigned long ghes_estatus_pool_size_request; ··· 138 129 139 130 static int ghes_panic_timeout __read_mostly = 30; 140 131 141 - static void __iomem *ghes_ioremap_pfn_nmi(u64 pfn) 132 + static void __iomem *ghes_map(u64 pfn, enum fixed_addresses fixmap_idx) 142 133 { 143 134 phys_addr_t paddr; 144 135 pgprot_t prot; 145 136 146 - paddr = pfn << PAGE_SHIFT; 137 + paddr = PFN_PHYS(pfn); 147 138 prot = arch_apei_get_mem_attribute(paddr); 148 - __set_fixmap(FIX_APEI_GHES_NMI, paddr, prot); 139 + __set_fixmap(fixmap_idx, paddr, prot); 149 140 150 - return (void __iomem *) fix_to_virt(FIX_APEI_GHES_NMI); 141 + return (void __iomem *) __fix_to_virt(fixmap_idx); 151 142 } 152 143 153 - static void __iomem *ghes_ioremap_pfn_irq(u64 pfn) 144 + static void ghes_unmap(void __iomem *vaddr, enum fixed_addresses fixmap_idx) 154 145 { 155 - phys_addr_t paddr; 156 - pgprot_t prot; 146 + int _idx = virt_to_fix((unsigned long)vaddr); 157 147 158 - paddr = pfn << PAGE_SHIFT; 159 - prot = arch_apei_get_mem_attribute(paddr); 160 - __set_fixmap(FIX_APEI_GHES_IRQ, paddr, prot); 161 - 162 - return (void __iomem *) fix_to_virt(FIX_APEI_GHES_IRQ); 148 + WARN_ON_ONCE(fixmap_idx != _idx); 149 + clear_fixmap(fixmap_idx); 163 150 } 164 151 165 - static void ghes_iounmap_nmi(void) 152 + int ghes_estatus_pool_init(int num_ghes) 166 153 { 167 - clear_fixmap(FIX_APEI_GHES_NMI); 168 - } 154 + unsigned long addr, len; 169 155 170 - static void ghes_iounmap_irq(void) 171 - { 172 - clear_fixmap(FIX_APEI_GHES_IRQ); 173 - } 174 - 175 - static int ghes_estatus_pool_init(void) 176 - { 177 156 ghes_estatus_pool = gen_pool_create(GHES_ESTATUS_POOL_MIN_ALLOC_ORDER, -1); 178 157 if (!ghes_estatus_pool) 179 158 return -ENOMEM; 180 - return 0; 181 - } 182 159 183 - static void ghes_estatus_pool_free_chunk_page(struct gen_pool *pool, 184 - struct gen_pool_chunk *chunk, 185 - void *data) 186 - { 187 - free_page(chunk->start_addr); 188 - } 160 + len = GHES_ESTATUS_CACHE_AVG_SIZE * GHES_ESTATUS_CACHE_ALLOCED_MAX; 161 + len += (num_ghes * GHES_ESOURCE_PREALLOC_MAX_SIZE); 189 162 190 - static void ghes_estatus_pool_exit(void) 191 - { 192 - gen_pool_for_each_chunk(ghes_estatus_pool, 193 - ghes_estatus_pool_free_chunk_page, NULL); 194 - gen_pool_destroy(ghes_estatus_pool); 195 - } 163 + ghes_estatus_pool_size_request = PAGE_ALIGN(len); 164 + addr = (unsigned long)vmalloc(PAGE_ALIGN(len)); 165 + if (!addr) 166 + return -ENOMEM; 196 167 197 - static int ghes_estatus_pool_expand(unsigned long len) 198 - { 199 - unsigned long i, pages, size, addr; 200 - int ret; 168 + /* 169 + * New allocation must be visible in all pgd before it can be found by 170 + * an NMI allocating from the pool. 171 + */ 172 + vmalloc_sync_all(); 201 173 202 - ghes_estatus_pool_size_request += PAGE_ALIGN(len); 203 - size = gen_pool_size(ghes_estatus_pool); 204 - if (size >= ghes_estatus_pool_size_request) 205 - return 0; 206 - pages = (ghes_estatus_pool_size_request - size) / PAGE_SIZE; 207 - for (i = 0; i < pages; i++) { 208 - addr = __get_free_page(GFP_KERNEL); 209 - if (!addr) 210 - return -ENOMEM; 211 - ret = gen_pool_add(ghes_estatus_pool, addr, PAGE_SIZE, -1); 212 - if (ret) 213 - return ret; 214 - } 215 - 216 - return 0; 174 + return gen_pool_add(ghes_estatus_pool, addr, PAGE_ALIGN(len), -1); 217 175 } 218 176 219 177 static int map_gen_v2(struct ghes *ghes) ··· 191 215 static void unmap_gen_v2(struct ghes *ghes) 192 216 { 193 217 apei_unmap_generic_address(&ghes->generic_v2->read_ack_register); 218 + } 219 + 220 + static void ghes_ack_error(struct acpi_hest_generic_v2 *gv2) 221 + { 222 + int rc; 223 + u64 val = 0; 224 + 225 + rc = apei_read(&val, &gv2->read_ack_register); 226 + if (rc) 227 + return; 228 + 229 + val &= gv2->read_ack_preserve << gv2->read_ack_register.bit_offset; 230 + val |= gv2->read_ack_write << gv2->read_ack_register.bit_offset; 231 + 232 + apei_write(val, &gv2->read_ack_register); 194 233 } 195 234 196 235 static struct ghes *ghes_new(struct acpi_hest_generic *generic) ··· 280 289 } 281 290 282 291 static void ghes_copy_tofrom_phys(void *buffer, u64 paddr, u32 len, 283 - int from_phys) 292 + int from_phys, 293 + enum fixed_addresses fixmap_idx) 284 294 { 285 295 void __iomem *vaddr; 286 - unsigned long flags = 0; 287 - int in_nmi = in_nmi(); 288 296 u64 offset; 289 297 u32 trunk; 290 298 291 299 while (len > 0) { 292 300 offset = paddr - (paddr & PAGE_MASK); 293 - if (in_nmi) { 294 - raw_spin_lock(&ghes_ioremap_lock_nmi); 295 - vaddr = ghes_ioremap_pfn_nmi(paddr >> PAGE_SHIFT); 296 - } else { 297 - spin_lock_irqsave(&ghes_ioremap_lock_irq, flags); 298 - vaddr = ghes_ioremap_pfn_irq(paddr >> PAGE_SHIFT); 299 - } 301 + vaddr = ghes_map(PHYS_PFN(paddr), fixmap_idx); 300 302 trunk = PAGE_SIZE - offset; 301 303 trunk = min(trunk, len); 302 304 if (from_phys) ··· 299 315 len -= trunk; 300 316 paddr += trunk; 301 317 buffer += trunk; 302 - if (in_nmi) { 303 - ghes_iounmap_nmi(); 304 - raw_spin_unlock(&ghes_ioremap_lock_nmi); 305 - } else { 306 - ghes_iounmap_irq(); 307 - spin_unlock_irqrestore(&ghes_ioremap_lock_irq, flags); 308 - } 318 + ghes_unmap(vaddr, fixmap_idx); 309 319 } 310 320 } 311 321 312 - static int ghes_read_estatus(struct ghes *ghes, int silent) 322 + /* Check the top-level record header has an appropriate size. */ 323 + static int __ghes_check_estatus(struct ghes *ghes, 324 + struct acpi_hest_generic_status *estatus) 325 + { 326 + u32 len = cper_estatus_len(estatus); 327 + 328 + if (len < sizeof(*estatus)) { 329 + pr_warn_ratelimited(FW_WARN GHES_PFX "Truncated error status block!\n"); 330 + return -EIO; 331 + } 332 + 333 + if (len > ghes->generic->error_block_length) { 334 + pr_warn_ratelimited(FW_WARN GHES_PFX "Invalid error status block length!\n"); 335 + return -EIO; 336 + } 337 + 338 + if (cper_estatus_check_header(estatus)) { 339 + pr_warn_ratelimited(FW_WARN GHES_PFX "Invalid CPER header!\n"); 340 + return -EIO; 341 + } 342 + 343 + return 0; 344 + } 345 + 346 + /* Read the CPER block, returning its address, and header in estatus. */ 347 + static int __ghes_peek_estatus(struct ghes *ghes, 348 + struct acpi_hest_generic_status *estatus, 349 + u64 *buf_paddr, enum fixed_addresses fixmap_idx) 313 350 { 314 351 struct acpi_hest_generic *g = ghes->generic; 315 - u64 buf_paddr; 316 - u32 len; 317 352 int rc; 318 353 319 - rc = apei_read(&buf_paddr, &g->error_status_address); 354 + rc = apei_read(buf_paddr, &g->error_status_address); 320 355 if (rc) { 321 - if (!silent && printk_ratelimit()) 322 - pr_warning(FW_WARN GHES_PFX 356 + *buf_paddr = 0; 357 + pr_warn_ratelimited(FW_WARN GHES_PFX 323 358 "Failed to read error status block address for hardware error source: %d.\n", 324 359 g->header.source_id); 325 360 return -EIO; 326 361 } 327 - if (!buf_paddr) 362 + if (!*buf_paddr) 328 363 return -ENOENT; 329 364 330 - ghes_copy_tofrom_phys(ghes->estatus, buf_paddr, 331 - sizeof(*ghes->estatus), 1); 332 - if (!ghes->estatus->block_status) 365 + ghes_copy_tofrom_phys(estatus, *buf_paddr, sizeof(*estatus), 1, 366 + fixmap_idx); 367 + if (!estatus->block_status) { 368 + *buf_paddr = 0; 333 369 return -ENOENT; 370 + } 334 371 335 - ghes->buffer_paddr = buf_paddr; 336 - ghes->flags |= GHES_TO_CLEAR; 337 - 338 - rc = -EIO; 339 - len = cper_estatus_len(ghes->estatus); 340 - if (len < sizeof(*ghes->estatus)) 341 - goto err_read_block; 342 - if (len > ghes->generic->error_block_length) 343 - goto err_read_block; 344 - if (cper_estatus_check_header(ghes->estatus)) 345 - goto err_read_block; 346 - ghes_copy_tofrom_phys(ghes->estatus + 1, 347 - buf_paddr + sizeof(*ghes->estatus), 348 - len - sizeof(*ghes->estatus), 1); 349 - if (cper_estatus_check(ghes->estatus)) 350 - goto err_read_block; 351 - rc = 0; 352 - 353 - err_read_block: 354 - if (rc && !silent && printk_ratelimit()) 355 - pr_warning(FW_WARN GHES_PFX 356 - "Failed to read error status block!\n"); 357 - return rc; 372 + return __ghes_check_estatus(ghes, estatus); 358 373 } 359 374 360 - static void ghes_clear_estatus(struct ghes *ghes) 375 + static int __ghes_read_estatus(struct acpi_hest_generic_status *estatus, 376 + u64 buf_paddr, enum fixed_addresses fixmap_idx, 377 + size_t buf_len) 361 378 { 362 - ghes->estatus->block_status = 0; 363 - if (!(ghes->flags & GHES_TO_CLEAR)) 379 + ghes_copy_tofrom_phys(estatus, buf_paddr, buf_len, 1, fixmap_idx); 380 + if (cper_estatus_check(estatus)) { 381 + pr_warn_ratelimited(FW_WARN GHES_PFX 382 + "Failed to read error status block!\n"); 383 + return -EIO; 384 + } 385 + 386 + return 0; 387 + } 388 + 389 + static int ghes_read_estatus(struct ghes *ghes, 390 + struct acpi_hest_generic_status *estatus, 391 + u64 *buf_paddr, enum fixed_addresses fixmap_idx) 392 + { 393 + int rc; 394 + 395 + rc = __ghes_peek_estatus(ghes, estatus, buf_paddr, fixmap_idx); 396 + if (rc) 397 + return rc; 398 + 399 + rc = __ghes_check_estatus(ghes, estatus); 400 + if (rc) 401 + return rc; 402 + 403 + return __ghes_read_estatus(estatus, *buf_paddr, fixmap_idx, 404 + cper_estatus_len(estatus)); 405 + } 406 + 407 + static void ghes_clear_estatus(struct ghes *ghes, 408 + struct acpi_hest_generic_status *estatus, 409 + u64 buf_paddr, enum fixed_addresses fixmap_idx) 410 + { 411 + estatus->block_status = 0; 412 + 413 + if (!buf_paddr) 364 414 return; 365 - ghes_copy_tofrom_phys(ghes->estatus, ghes->buffer_paddr, 366 - sizeof(ghes->estatus->block_status), 0); 367 - ghes->flags &= ~GHES_TO_CLEAR; 415 + 416 + ghes_copy_tofrom_phys(estatus, buf_paddr, 417 + sizeof(estatus->block_status), 0, 418 + fixmap_idx); 419 + 420 + /* 421 + * GHESv2 type HEST entries introduce support for error acknowledgment, 422 + * so only acknowledge the error if this support is present. 423 + */ 424 + if (is_hest_type_generic_v2(ghes)) 425 + ghes_ack_error(ghes->generic_v2); 368 426 } 369 427 370 428 static void ghes_handle_memory_failure(struct acpi_hest_generic_data *gdata, int sev) ··· 698 672 rcu_read_unlock(); 699 673 } 700 674 701 - static int ghes_ack_error(struct acpi_hest_generic_v2 *gv2) 675 + static void __ghes_panic(struct ghes *ghes, 676 + struct acpi_hest_generic_status *estatus, 677 + u64 buf_paddr, enum fixed_addresses fixmap_idx) 702 678 { 703 - int rc; 704 - u64 val = 0; 679 + __ghes_print_estatus(KERN_EMERG, ghes->generic, estatus); 705 680 706 - rc = apei_read(&val, &gv2->read_ack_register); 707 - if (rc) 708 - return rc; 709 - 710 - val &= gv2->read_ack_preserve << gv2->read_ack_register.bit_offset; 711 - val |= gv2->read_ack_write << gv2->read_ack_register.bit_offset; 712 - 713 - return apei_write(val, &gv2->read_ack_register); 714 - } 715 - 716 - static void __ghes_panic(struct ghes *ghes) 717 - { 718 - __ghes_print_estatus(KERN_EMERG, ghes->generic, ghes->estatus); 719 - 720 - ghes_clear_estatus(ghes); 681 + ghes_clear_estatus(ghes, estatus, buf_paddr, fixmap_idx); 721 682 722 683 /* reboot to log the error! */ 723 684 if (!panic_timeout) ··· 714 701 715 702 static int ghes_proc(struct ghes *ghes) 716 703 { 704 + struct acpi_hest_generic_status *estatus = ghes->estatus; 705 + u64 buf_paddr; 717 706 int rc; 718 707 719 - rc = ghes_read_estatus(ghes, 0); 708 + rc = ghes_read_estatus(ghes, estatus, &buf_paddr, FIX_APEI_GHES_IRQ); 720 709 if (rc) 721 710 goto out; 722 711 723 - if (ghes_severity(ghes->estatus->error_severity) >= GHES_SEV_PANIC) { 724 - __ghes_panic(ghes); 725 - } 712 + if (ghes_severity(estatus->error_severity) >= GHES_SEV_PANIC) 713 + __ghes_panic(ghes, estatus, buf_paddr, FIX_APEI_GHES_IRQ); 726 714 727 - if (!ghes_estatus_cached(ghes->estatus)) { 728 - if (ghes_print_estatus(NULL, ghes->generic, ghes->estatus)) 729 - ghes_estatus_cache_add(ghes->generic, ghes->estatus); 715 + if (!ghes_estatus_cached(estatus)) { 716 + if (ghes_print_estatus(NULL, ghes->generic, estatus)) 717 + ghes_estatus_cache_add(ghes->generic, estatus); 730 718 } 731 - ghes_do_proc(ghes, ghes->estatus); 719 + ghes_do_proc(ghes, estatus); 732 720 733 721 out: 734 - ghes_clear_estatus(ghes); 735 - 736 - if (rc == -ENOENT) 737 - return rc; 738 - 739 - /* 740 - * GHESv2 type HEST entries introduce support for error acknowledgment, 741 - * so only acknowledge the error if this support is present. 742 - */ 743 - if (is_hest_type_generic_v2(ghes)) 744 - return ghes_ack_error(ghes->generic_v2); 722 + ghes_clear_estatus(ghes, estatus, buf_paddr, FIX_APEI_GHES_IRQ); 745 723 746 724 return rc; 747 725 } ··· 755 751 static void ghes_poll_func(struct timer_list *t) 756 752 { 757 753 struct ghes *ghes = from_timer(ghes, t, timer); 754 + unsigned long flags; 758 755 756 + spin_lock_irqsave(&ghes_notify_lock_irq, flags); 759 757 ghes_proc(ghes); 758 + spin_unlock_irqrestore(&ghes_notify_lock_irq, flags); 760 759 if (!(ghes->flags & GHES_EXITING)) 761 760 ghes_add_timer(ghes); 762 761 } ··· 767 760 static irqreturn_t ghes_irq_func(int irq, void *data) 768 761 { 769 762 struct ghes *ghes = data; 763 + unsigned long flags; 770 764 int rc; 771 765 766 + spin_lock_irqsave(&ghes_notify_lock_irq, flags); 772 767 rc = ghes_proc(ghes); 768 + spin_unlock_irqrestore(&ghes_notify_lock_irq, flags); 773 769 if (rc) 774 770 return IRQ_NONE; 775 771 ··· 783 773 void *data) 784 774 { 785 775 struct ghes *ghes; 776 + unsigned long flags; 786 777 int ret = NOTIFY_DONE; 787 778 779 + spin_lock_irqsave(&ghes_notify_lock_irq, flags); 788 780 rcu_read_lock(); 789 781 list_for_each_entry_rcu(ghes, &ghes_hed, list) { 790 782 if (!ghes_proc(ghes)) 791 783 ret = NOTIFY_OK; 792 784 } 793 785 rcu_read_unlock(); 786 + spin_unlock_irqrestore(&ghes_notify_lock_irq, flags); 794 787 795 788 return ret; 796 789 } ··· 802 789 .notifier_call = ghes_notify_hed, 803 790 }; 804 791 805 - #ifdef CONFIG_ACPI_APEI_SEA 806 - static LIST_HEAD(ghes_sea); 807 - 808 792 /* 809 - * Return 0 only if one of the SEA error sources successfully reported an error 810 - * record sent from the firmware. 811 - */ 812 - int ghes_notify_sea(void) 813 - { 814 - struct ghes *ghes; 815 - int ret = -ENOENT; 816 - 817 - rcu_read_lock(); 818 - list_for_each_entry_rcu(ghes, &ghes_sea, list) { 819 - if (!ghes_proc(ghes)) 820 - ret = 0; 821 - } 822 - rcu_read_unlock(); 823 - return ret; 824 - } 825 - 826 - static void ghes_sea_add(struct ghes *ghes) 827 - { 828 - mutex_lock(&ghes_list_mutex); 829 - list_add_rcu(&ghes->list, &ghes_sea); 830 - mutex_unlock(&ghes_list_mutex); 831 - } 832 - 833 - static void ghes_sea_remove(struct ghes *ghes) 834 - { 835 - mutex_lock(&ghes_list_mutex); 836 - list_del_rcu(&ghes->list); 837 - mutex_unlock(&ghes_list_mutex); 838 - synchronize_rcu(); 839 - } 840 - #else /* CONFIG_ACPI_APEI_SEA */ 841 - static inline void ghes_sea_add(struct ghes *ghes) { } 842 - static inline void ghes_sea_remove(struct ghes *ghes) { } 843 - #endif /* CONFIG_ACPI_APEI_SEA */ 844 - 845 - #ifdef CONFIG_HAVE_ACPI_APEI_NMI 846 - /* 847 - * printk is not safe in NMI context. So in NMI handler, we allocate 848 - * required memory from lock-less memory allocator 849 - * (ghes_estatus_pool), save estatus into it, put them into lock-less 850 - * list (ghes_estatus_llist), then delay printk into IRQ context via 851 - * irq_work (ghes_proc_irq_work). ghes_estatus_size_request record 852 - * required pool size by all NMI error source. 793 + * Handlers for CPER records may not be NMI safe. For example, 794 + * memory_failure_queue() takes spinlocks and calls schedule_work_on(). 795 + * In any NMI-like handler, memory from ghes_estatus_pool is used to save 796 + * estatus, and added to the ghes_estatus_llist. irq_work_queue() causes 797 + * ghes_proc_in_irq() to run in IRQ context where each estatus in 798 + * ghes_estatus_llist is processed. 799 + * 800 + * Memory from the ghes_estatus_pool is also used with the ghes_estatus_cache 801 + * to suppress frequent messages. 853 802 */ 854 803 static struct llist_head ghes_estatus_llist; 855 804 static struct irq_work ghes_proc_irq_work; 856 - 857 - /* 858 - * NMI may be triggered on any CPU, so ghes_in_nmi is used for 859 - * having only one concurrent reader. 860 - */ 861 - static atomic_t ghes_in_nmi = ATOMIC_INIT(0); 862 - 863 - static LIST_HEAD(ghes_nmi); 864 805 865 806 static void ghes_proc_in_irq(struct irq_work *irq_work) 866 807 { ··· 872 905 } 873 906 } 874 907 875 - /* Save estatus for further processing in IRQ context */ 876 - static void __process_error(struct ghes *ghes) 908 + static int ghes_in_nmi_queue_one_entry(struct ghes *ghes, 909 + enum fixed_addresses fixmap_idx) 877 910 { 878 - #ifdef CONFIG_ARCH_HAVE_NMI_SAFE_CMPXCHG 879 - u32 len, node_len; 911 + struct acpi_hest_generic_status *estatus, tmp_header; 880 912 struct ghes_estatus_node *estatus_node; 881 - struct acpi_hest_generic_status *estatus; 913 + u32 len, node_len; 914 + u64 buf_paddr; 915 + int sev, rc; 882 916 883 - if (ghes_estatus_cached(ghes->estatus)) 884 - return; 917 + if (!IS_ENABLED(CONFIG_ARCH_HAVE_NMI_SAFE_CMPXCHG)) 918 + return -EOPNOTSUPP; 885 919 886 - len = cper_estatus_len(ghes->estatus); 920 + rc = __ghes_peek_estatus(ghes, &tmp_header, &buf_paddr, fixmap_idx); 921 + if (rc) { 922 + ghes_clear_estatus(ghes, &tmp_header, buf_paddr, fixmap_idx); 923 + return rc; 924 + } 925 + 926 + rc = __ghes_check_estatus(ghes, &tmp_header); 927 + if (rc) { 928 + ghes_clear_estatus(ghes, &tmp_header, buf_paddr, fixmap_idx); 929 + return rc; 930 + } 931 + 932 + len = cper_estatus_len(&tmp_header); 887 933 node_len = GHES_ESTATUS_NODE_LEN(len); 888 - 889 934 estatus_node = (void *)gen_pool_alloc(ghes_estatus_pool, node_len); 890 935 if (!estatus_node) 891 - return; 936 + return -ENOMEM; 892 937 893 938 estatus_node->ghes = ghes; 894 939 estatus_node->generic = ghes->generic; 895 940 estatus = GHES_ESTATUS_FROM_NODE(estatus_node); 896 - memcpy(estatus, ghes->estatus, len); 941 + 942 + if (__ghes_read_estatus(estatus, buf_paddr, fixmap_idx, len)) { 943 + ghes_clear_estatus(ghes, estatus, buf_paddr, fixmap_idx); 944 + rc = -ENOENT; 945 + goto no_work; 946 + } 947 + 948 + sev = ghes_severity(estatus->error_severity); 949 + if (sev >= GHES_SEV_PANIC) { 950 + ghes_print_queued_estatus(); 951 + __ghes_panic(ghes, estatus, buf_paddr, fixmap_idx); 952 + } 953 + 954 + ghes_clear_estatus(ghes, &tmp_header, buf_paddr, fixmap_idx); 955 + 956 + /* This error has been reported before, don't process it again. */ 957 + if (ghes_estatus_cached(estatus)) 958 + goto no_work; 959 + 897 960 llist_add(&estatus_node->llnode, &ghes_estatus_llist); 898 - #endif 961 + 962 + return rc; 963 + 964 + no_work: 965 + gen_pool_free(ghes_estatus_pool, (unsigned long)estatus_node, 966 + node_len); 967 + 968 + return rc; 899 969 } 970 + 971 + static int ghes_in_nmi_spool_from_list(struct list_head *rcu_list, 972 + enum fixed_addresses fixmap_idx) 973 + { 974 + int ret = -ENOENT; 975 + struct ghes *ghes; 976 + 977 + rcu_read_lock(); 978 + list_for_each_entry_rcu(ghes, rcu_list, list) { 979 + if (!ghes_in_nmi_queue_one_entry(ghes, fixmap_idx)) 980 + ret = 0; 981 + } 982 + rcu_read_unlock(); 983 + 984 + if (IS_ENABLED(CONFIG_ARCH_HAVE_NMI_SAFE_CMPXCHG) && !ret) 985 + irq_work_queue(&ghes_proc_irq_work); 986 + 987 + return ret; 988 + } 989 + 990 + #ifdef CONFIG_ACPI_APEI_SEA 991 + static LIST_HEAD(ghes_sea); 992 + 993 + /* 994 + * Return 0 only if one of the SEA error sources successfully reported an error 995 + * record sent from the firmware. 996 + */ 997 + int ghes_notify_sea(void) 998 + { 999 + static DEFINE_RAW_SPINLOCK(ghes_notify_lock_sea); 1000 + int rv; 1001 + 1002 + raw_spin_lock(&ghes_notify_lock_sea); 1003 + rv = ghes_in_nmi_spool_from_list(&ghes_sea, FIX_APEI_GHES_SEA); 1004 + raw_spin_unlock(&ghes_notify_lock_sea); 1005 + 1006 + return rv; 1007 + } 1008 + 1009 + static void ghes_sea_add(struct ghes *ghes) 1010 + { 1011 + mutex_lock(&ghes_list_mutex); 1012 + list_add_rcu(&ghes->list, &ghes_sea); 1013 + mutex_unlock(&ghes_list_mutex); 1014 + } 1015 + 1016 + static void ghes_sea_remove(struct ghes *ghes) 1017 + { 1018 + mutex_lock(&ghes_list_mutex); 1019 + list_del_rcu(&ghes->list); 1020 + mutex_unlock(&ghes_list_mutex); 1021 + synchronize_rcu(); 1022 + } 1023 + #else /* CONFIG_ACPI_APEI_SEA */ 1024 + static inline void ghes_sea_add(struct ghes *ghes) { } 1025 + static inline void ghes_sea_remove(struct ghes *ghes) { } 1026 + #endif /* CONFIG_ACPI_APEI_SEA */ 1027 + 1028 + #ifdef CONFIG_HAVE_ACPI_APEI_NMI 1029 + /* 1030 + * NMI may be triggered on any CPU, so ghes_in_nmi is used for 1031 + * having only one concurrent reader. 1032 + */ 1033 + static atomic_t ghes_in_nmi = ATOMIC_INIT(0); 1034 + 1035 + static LIST_HEAD(ghes_nmi); 900 1036 901 1037 static int ghes_notify_nmi(unsigned int cmd, struct pt_regs *regs) 902 1038 { 903 - struct ghes *ghes; 904 - int sev, ret = NMI_DONE; 1039 + static DEFINE_RAW_SPINLOCK(ghes_notify_lock_nmi); 1040 + int ret = NMI_DONE; 905 1041 906 1042 if (!atomic_add_unless(&ghes_in_nmi, 1, 1)) 907 1043 return ret; 908 1044 909 - list_for_each_entry_rcu(ghes, &ghes_nmi, list) { 910 - if (ghes_read_estatus(ghes, 1)) { 911 - ghes_clear_estatus(ghes); 912 - continue; 913 - } else { 914 - ret = NMI_HANDLED; 915 - } 1045 + raw_spin_lock(&ghes_notify_lock_nmi); 1046 + if (!ghes_in_nmi_spool_from_list(&ghes_nmi, FIX_APEI_GHES_NMI)) 1047 + ret = NMI_HANDLED; 1048 + raw_spin_unlock(&ghes_notify_lock_nmi); 916 1049 917 - sev = ghes_severity(ghes->estatus->error_severity); 918 - if (sev >= GHES_SEV_PANIC) { 919 - oops_begin(); 920 - ghes_print_queued_estatus(); 921 - __ghes_panic(ghes); 922 - } 923 - 924 - if (!(ghes->flags & GHES_TO_CLEAR)) 925 - continue; 926 - 927 - __process_error(ghes); 928 - ghes_clear_estatus(ghes); 929 - } 930 - 931 - #ifdef CONFIG_ARCH_HAVE_NMI_SAFE_CMPXCHG 932 - if (ret == NMI_HANDLED) 933 - irq_work_queue(&ghes_proc_irq_work); 934 - #endif 935 1050 atomic_dec(&ghes_in_nmi); 936 1051 return ret; 937 1052 } 938 1053 939 - static unsigned long ghes_esource_prealloc_size( 940 - const struct acpi_hest_generic *generic) 941 - { 942 - unsigned long block_length, prealloc_records, prealloc_size; 943 - 944 - block_length = min_t(unsigned long, generic->error_block_length, 945 - GHES_ESTATUS_MAX_SIZE); 946 - prealloc_records = max_t(unsigned long, 947 - generic->records_to_preallocate, 1); 948 - prealloc_size = min_t(unsigned long, block_length * prealloc_records, 949 - GHES_ESOURCE_PREALLOC_MAX_SIZE); 950 - 951 - return prealloc_size; 952 - } 953 - 954 - static void ghes_estatus_pool_shrink(unsigned long len) 955 - { 956 - ghes_estatus_pool_size_request -= PAGE_ALIGN(len); 957 - } 958 - 959 1054 static void ghes_nmi_add(struct ghes *ghes) 960 1055 { 961 - unsigned long len; 962 - 963 - len = ghes_esource_prealloc_size(ghes->generic); 964 - ghes_estatus_pool_expand(len); 965 1056 mutex_lock(&ghes_list_mutex); 966 1057 if (list_empty(&ghes_nmi)) 967 1058 register_nmi_handler(NMI_LOCAL, ghes_notify_nmi, 0, "ghes"); ··· 1029 1004 1030 1005 static void ghes_nmi_remove(struct ghes *ghes) 1031 1006 { 1032 - unsigned long len; 1033 - 1034 1007 mutex_lock(&ghes_list_mutex); 1035 1008 list_del_rcu(&ghes->list); 1036 1009 if (list_empty(&ghes_nmi)) ··· 1039 1016 * freed after NMI handler finishes. 1040 1017 */ 1041 1018 synchronize_rcu(); 1042 - len = ghes_esource_prealloc_size(ghes->generic); 1043 - ghes_estatus_pool_shrink(len); 1044 1019 } 1020 + #else /* CONFIG_HAVE_ACPI_APEI_NMI */ 1021 + static inline void ghes_nmi_add(struct ghes *ghes) { } 1022 + static inline void ghes_nmi_remove(struct ghes *ghes) { } 1023 + #endif /* CONFIG_HAVE_ACPI_APEI_NMI */ 1045 1024 1046 1025 static void ghes_nmi_init_cxt(void) 1047 1026 { 1048 1027 init_irq_work(&ghes_proc_irq_work, ghes_proc_in_irq); 1049 1028 } 1050 - #else /* CONFIG_HAVE_ACPI_APEI_NMI */ 1051 - static inline void ghes_nmi_add(struct ghes *ghes) { } 1052 - static inline void ghes_nmi_remove(struct ghes *ghes) { } 1053 - static inline void ghes_nmi_init_cxt(void) { } 1054 - #endif /* CONFIG_HAVE_ACPI_APEI_NMI */ 1029 + 1030 + static int __ghes_sdei_callback(struct ghes *ghes, 1031 + enum fixed_addresses fixmap_idx) 1032 + { 1033 + if (!ghes_in_nmi_queue_one_entry(ghes, fixmap_idx)) { 1034 + irq_work_queue(&ghes_proc_irq_work); 1035 + 1036 + return 0; 1037 + } 1038 + 1039 + return -ENOENT; 1040 + } 1041 + 1042 + static int ghes_sdei_normal_callback(u32 event_num, struct pt_regs *regs, 1043 + void *arg) 1044 + { 1045 + static DEFINE_RAW_SPINLOCK(ghes_notify_lock_sdei_normal); 1046 + struct ghes *ghes = arg; 1047 + int err; 1048 + 1049 + raw_spin_lock(&ghes_notify_lock_sdei_normal); 1050 + err = __ghes_sdei_callback(ghes, FIX_APEI_GHES_SDEI_NORMAL); 1051 + raw_spin_unlock(&ghes_notify_lock_sdei_normal); 1052 + 1053 + return err; 1054 + } 1055 + 1056 + static int ghes_sdei_critical_callback(u32 event_num, struct pt_regs *regs, 1057 + void *arg) 1058 + { 1059 + static DEFINE_RAW_SPINLOCK(ghes_notify_lock_sdei_critical); 1060 + struct ghes *ghes = arg; 1061 + int err; 1062 + 1063 + raw_spin_lock(&ghes_notify_lock_sdei_critical); 1064 + err = __ghes_sdei_callback(ghes, FIX_APEI_GHES_SDEI_CRITICAL); 1065 + raw_spin_unlock(&ghes_notify_lock_sdei_critical); 1066 + 1067 + return err; 1068 + } 1069 + 1070 + static int apei_sdei_register_ghes(struct ghes *ghes) 1071 + { 1072 + if (!IS_ENABLED(CONFIG_ARM_SDE_INTERFACE)) 1073 + return -EOPNOTSUPP; 1074 + 1075 + return sdei_register_ghes(ghes, ghes_sdei_normal_callback, 1076 + ghes_sdei_critical_callback); 1077 + } 1078 + 1079 + static int apei_sdei_unregister_ghes(struct ghes *ghes) 1080 + { 1081 + if (!IS_ENABLED(CONFIG_ARM_SDE_INTERFACE)) 1082 + return -EOPNOTSUPP; 1083 + 1084 + return sdei_unregister_ghes(ghes); 1085 + } 1055 1086 1056 1087 static int ghes_probe(struct platform_device *ghes_dev) 1057 1088 { 1058 1089 struct acpi_hest_generic *generic; 1059 1090 struct ghes *ghes = NULL; 1091 + unsigned long flags; 1060 1092 1061 1093 int rc = -EINVAL; 1062 1094 ··· 1138 1060 case ACPI_HEST_NOTIFY_NMI: 1139 1061 if (!IS_ENABLED(CONFIG_HAVE_ACPI_APEI_NMI)) { 1140 1062 pr_warn(GHES_PFX "Generic hardware error source: %d notified via NMI interrupt is not supported!\n", 1063 + generic->header.source_id); 1064 + goto err; 1065 + } 1066 + break; 1067 + case ACPI_HEST_NOTIFY_SOFTWARE_DELEGATED: 1068 + if (!IS_ENABLED(CONFIG_ARM_SDE_INTERFACE)) { 1069 + pr_warn(GHES_PFX "Generic hardware error source: %d notified via SDE Interface is not supported!\n", 1141 1070 generic->header.source_id); 1142 1071 goto err; 1143 1072 } ··· 1212 1127 case ACPI_HEST_NOTIFY_NMI: 1213 1128 ghes_nmi_add(ghes); 1214 1129 break; 1130 + case ACPI_HEST_NOTIFY_SOFTWARE_DELEGATED: 1131 + rc = apei_sdei_register_ghes(ghes); 1132 + if (rc) 1133 + goto err; 1134 + break; 1215 1135 default: 1216 1136 BUG(); 1217 1137 } ··· 1226 1136 ghes_edac_register(ghes, &ghes_dev->dev); 1227 1137 1228 1138 /* Handle any pending errors right away */ 1139 + spin_lock_irqsave(&ghes_notify_lock_irq, flags); 1229 1140 ghes_proc(ghes); 1141 + spin_unlock_irqrestore(&ghes_notify_lock_irq, flags); 1230 1142 1231 1143 return 0; 1232 1144 ··· 1242 1150 1243 1151 static int ghes_remove(struct platform_device *ghes_dev) 1244 1152 { 1153 + int rc; 1245 1154 struct ghes *ghes; 1246 1155 struct acpi_hest_generic *generic; 1247 1156 ··· 1274 1181 break; 1275 1182 case ACPI_HEST_NOTIFY_NMI: 1276 1183 ghes_nmi_remove(ghes); 1184 + break; 1185 + case ACPI_HEST_NOTIFY_SOFTWARE_DELEGATED: 1186 + rc = apei_sdei_unregister_ghes(ghes); 1187 + if (rc) 1188 + return rc; 1277 1189 break; 1278 1190 default: 1279 1191 BUG(); ··· 1328 1230 1329 1231 ghes_nmi_init_cxt(); 1330 1232 1331 - rc = ghes_estatus_pool_init(); 1332 - if (rc) 1333 - goto err; 1334 - 1335 - rc = ghes_estatus_pool_expand(GHES_ESTATUS_CACHE_AVG_SIZE * 1336 - GHES_ESTATUS_CACHE_ALLOCED_MAX); 1337 - if (rc) 1338 - goto err_pool_exit; 1339 - 1340 1233 rc = platform_driver_register(&ghes_platform_driver); 1341 1234 if (rc) 1342 - goto err_pool_exit; 1235 + goto err; 1343 1236 1344 1237 rc = apei_osc_setup(); 1345 1238 if (rc == 0 && osc_sb_apei_support_acked) ··· 1343 1254 pr_info(GHES_PFX "Failed to enable APEI firmware first mode.\n"); 1344 1255 1345 1256 return 0; 1346 - err_pool_exit: 1347 - ghes_estatus_pool_exit(); 1348 1257 err: 1349 1258 return rc; 1350 1259 }
+15 -1
drivers/acpi/apei/hest.c
··· 32 32 #include <linux/io.h> 33 33 #include <linux/platform_device.h> 34 34 #include <acpi/apei.h> 35 + #include <acpi/ghes.h> 35 36 36 37 #include "apei-internal.h" 37 38 ··· 54 53 [ACPI_HEST_TYPE_AER_BRIDGE] = sizeof(struct acpi_hest_aer_bridge), 55 54 [ACPI_HEST_TYPE_GENERIC_ERROR] = sizeof(struct acpi_hest_generic), 56 55 [ACPI_HEST_TYPE_GENERIC_ERROR_V2] = sizeof(struct acpi_hest_generic_v2), 56 + [ACPI_HEST_TYPE_IA32_DEFERRED_CHECK] = -1, 57 57 }; 58 58 59 59 static int hest_esrc_len(struct acpi_hest_header *hest_hdr) ··· 75 73 } else if (hest_type == ACPI_HEST_TYPE_IA32_CHECK) { 76 74 struct acpi_hest_ia_machine_check *mc; 77 75 mc = (struct acpi_hest_ia_machine_check *)hest_hdr; 76 + len = sizeof(*mc) + mc->num_hardware_banks * 77 + sizeof(struct acpi_hest_ia_error_bank); 78 + } else if (hest_type == ACPI_HEST_TYPE_IA32_DEFERRED_CHECK) { 79 + struct acpi_hest_ia_deferred_check *mc; 80 + mc = (struct acpi_hest_ia_deferred_check *)hest_hdr; 78 81 len = sizeof(*mc) + mc->num_hardware_banks * 79 82 sizeof(struct acpi_hest_ia_error_bank); 80 83 } ··· 210 203 rc = apei_hest_parse(hest_parse_ghes, &ghes_arr); 211 204 if (rc) 212 205 goto err; 206 + 207 + rc = ghes_estatus_pool_init(ghes_count); 208 + if (rc) 209 + goto err; 210 + 213 211 out: 214 212 kfree(ghes_arr.ghes_devs); 215 213 return rc; ··· 263 251 rc = apei_hest_parse(hest_parse_ghes_count, &ghes_count); 264 252 if (rc) 265 253 goto err; 266 - rc = hest_ghes_dev_register(ghes_count); 254 + 255 + if (ghes_count) 256 + rc = hest_ghes_dev_register(ghes_count); 267 257 if (rc) 268 258 goto err; 269 259 }
+14
drivers/acpi/bus.c
··· 799 799 } 800 800 EXPORT_SYMBOL_GPL(acpi_match_device); 801 801 802 + static const void *acpi_of_device_get_match_data(const struct device *dev) 803 + { 804 + struct acpi_device *adev = ACPI_COMPANION(dev); 805 + const struct of_device_id *match = NULL; 806 + 807 + if (!acpi_of_match_device(adev, dev->driver->of_match_table, &match)) 808 + return NULL; 809 + 810 + return match->data; 811 + } 812 + 802 813 const void *acpi_device_get_match_data(const struct device *dev) 803 814 { 804 815 const struct acpi_device_id *match; 816 + 817 + if (!dev->driver->acpi_match_table) 818 + return acpi_of_device_get_match_data(dev); 805 819 806 820 match = acpi_match_device(dev->driver->acpi_match_table, dev); 807 821 if (!match)
-6
drivers/acpi/custom_method.c
··· 79 79 80 80 static int __init acpi_custom_method_init(void) 81 81 { 82 - if (acpi_debugfs_dir == NULL) 83 - return -ENOENT; 84 - 85 82 cm_dentry = debugfs_create_file("custom_method", S_IWUSR, 86 83 acpi_debugfs_dir, NULL, &cm_fops); 87 - if (cm_dentry == NULL) 88 - return -ENODEV; 89 - 90 84 return 0; 91 85 } 92 86
-2
drivers/acpi/dptf/Makefile
··· 1 1 obj-$(CONFIG_ACPI) += int340x_thermal.o 2 2 obj-$(CONFIG_DPTF_POWER) += dptf_power.o 3 - 4 - ccflags-y += -Idrivers/acpi
+1 -1
drivers/acpi/dptf/int340x_thermal.c
··· 12 12 #include <linux/acpi.h> 13 13 #include <linux/module.h> 14 14 15 - #include "internal.h" 15 + #include "../internal.h" 16 16 17 17 #define INT3401_DEVICE 0X01 18 18 static const struct acpi_device_id int340x_thermal_device_ids[] = {
+112 -96
drivers/acpi/ec.c
··· 186 186 static void acpi_ec_event_handler(struct work_struct *work); 187 187 static void acpi_ec_event_processor(struct work_struct *work); 188 188 189 - struct acpi_ec *boot_ec, *first_ec; 189 + struct acpi_ec *first_ec; 190 190 EXPORT_SYMBOL(first_ec); 191 + 192 + static struct acpi_ec *boot_ec; 191 193 static bool boot_ec_is_ecdt = false; 192 194 static struct workqueue_struct *ec_query_wq; 193 195 194 196 static int EC_FLAGS_QUERY_HANDSHAKE; /* Needs QR_EC issued when SCI_EVT set */ 195 197 static int EC_FLAGS_CORRECT_ECDT; /* Needs ECDT port address correction */ 196 198 static int EC_FLAGS_IGNORE_DSDT_GPE; /* Needs ECDT GPE as correction setting */ 199 + static int EC_FLAGS_CLEAR_ON_RESUME; /* Needs acpi_ec_clear() on boot/resume */ 197 200 198 201 /* -------------------------------------------------------------------------- 199 202 * Logging/Debugging ··· 502 499 ec_log_drv("event blocked"); 503 500 } 504 501 502 + /* 503 + * Process _Q events that might have accumulated in the EC. 504 + * Run with locked ec mutex. 505 + */ 506 + static void acpi_ec_clear(struct acpi_ec *ec) 507 + { 508 + int i, status; 509 + u8 value = 0; 510 + 511 + for (i = 0; i < ACPI_EC_CLEAR_MAX; i++) { 512 + status = acpi_ec_query(ec, &value); 513 + if (status || !value) 514 + break; 515 + } 516 + if (unlikely(i == ACPI_EC_CLEAR_MAX)) 517 + pr_warn("Warning: Maximum of %d stale EC events cleared\n", i); 518 + else 519 + pr_info("%d stale EC events cleared\n", i); 520 + } 521 + 505 522 static void acpi_ec_enable_event(struct acpi_ec *ec) 506 523 { 507 524 unsigned long flags; ··· 530 507 if (acpi_ec_started(ec)) 531 508 __acpi_ec_enable_event(ec); 532 509 spin_unlock_irqrestore(&ec->lock, flags); 510 + 511 + /* Drain additional events if hardware requires that */ 512 + if (EC_FLAGS_CLEAR_ON_RESUME) 513 + acpi_ec_clear(ec); 533 514 } 534 515 535 516 #ifdef CONFIG_PM_SLEEP ··· 1566 1539 return ret; 1567 1540 } 1568 1541 1569 - static int acpi_config_boot_ec(struct acpi_ec *ec, acpi_handle handle, 1570 - bool handle_events, bool is_ecdt) 1571 - { 1572 - int ret; 1573 - 1574 - /* 1575 - * Changing the ACPI handle results in a re-configuration of the 1576 - * boot EC. And if it happens after the namespace initialization, 1577 - * it causes _REG evaluations. 1578 - */ 1579 - if (boot_ec && boot_ec->handle != handle) 1580 - ec_remove_handlers(boot_ec); 1581 - 1582 - /* Unset old boot EC */ 1583 - if (boot_ec != ec) 1584 - acpi_ec_free(boot_ec); 1585 - 1586 - /* 1587 - * ECDT device creation is split into acpi_ec_ecdt_probe() and 1588 - * acpi_ec_ecdt_start(). This function takes care of completing the 1589 - * ECDT parsing logic as the handle update should be performed 1590 - * between the installation/uninstallation of the handlers. 1591 - */ 1592 - if (ec->handle != handle) 1593 - ec->handle = handle; 1594 - 1595 - ret = acpi_ec_setup(ec, handle_events); 1596 - if (ret) 1597 - return ret; 1598 - 1599 - /* Set new boot EC */ 1600 - if (!boot_ec) { 1601 - boot_ec = ec; 1602 - boot_ec_is_ecdt = is_ecdt; 1603 - } 1604 - 1605 - acpi_handle_info(boot_ec->handle, 1606 - "Used as boot %s EC to handle transactions%s\n", 1607 - is_ecdt ? "ECDT" : "DSDT", 1608 - handle_events ? " and events" : ""); 1609 - return ret; 1610 - } 1611 - 1612 1542 static bool acpi_ec_ecdt_get_handle(acpi_handle *phandle) 1613 1543 { 1614 1544 struct acpi_table_ecdt *ecdt_ptr; ··· 1585 1601 return true; 1586 1602 } 1587 1603 1588 - static bool acpi_is_boot_ec(struct acpi_ec *ec) 1589 - { 1590 - if (!boot_ec) 1591 - return false; 1592 - if (ec->command_addr == boot_ec->command_addr && 1593 - ec->data_addr == boot_ec->data_addr) 1594 - return true; 1595 - return false; 1596 - } 1597 - 1598 1604 static int acpi_ec_add(struct acpi_device *device) 1599 1605 { 1600 1606 struct acpi_ec *ec = NULL; 1601 - int ret; 1602 - bool is_ecdt = false; 1607 + bool dep_update = true; 1603 1608 acpi_status status; 1609 + int ret; 1604 1610 1605 1611 strcpy(acpi_device_name(device), ACPI_EC_DEVICE_NAME); 1606 1612 strcpy(acpi_device_class(device), ACPI_EC_CLASS); 1607 1613 1608 1614 if (!strcmp(acpi_device_hid(device), ACPI_ECDT_HID)) { 1609 - is_ecdt = true; 1615 + boot_ec_is_ecdt = true; 1610 1616 ec = boot_ec; 1617 + dep_update = false; 1611 1618 } else { 1612 1619 ec = acpi_ec_alloc(); 1613 1620 if (!ec) 1614 1621 return -ENOMEM; 1622 + 1615 1623 status = ec_parse_device(device->handle, 0, ec, NULL); 1616 1624 if (status != AE_CTRL_TERMINATE) { 1617 1625 ret = -EINVAL; 1618 1626 goto err_alloc; 1619 1627 } 1620 - } 1621 1628 1622 - if (acpi_is_boot_ec(ec)) { 1623 - boot_ec_is_ecdt = is_ecdt; 1624 - if (!is_ecdt) { 1629 + if (boot_ec && ec->command_addr == boot_ec->command_addr && 1630 + ec->data_addr == boot_ec->data_addr) { 1631 + boot_ec_is_ecdt = false; 1625 1632 /* 1626 1633 * Trust PNP0C09 namespace location rather than 1627 1634 * ECDT ID. But trust ECDT GPE rather than _GPE ··· 1624 1649 acpi_ec_free(ec); 1625 1650 ec = boot_ec; 1626 1651 } 1627 - ret = acpi_config_boot_ec(ec, ec->handle, true, is_ecdt); 1628 - } else 1629 - ret = acpi_ec_setup(ec, true); 1652 + } 1653 + 1654 + ret = acpi_ec_setup(ec, true); 1630 1655 if (ret) 1631 1656 goto err_query; 1657 + 1658 + if (ec == boot_ec) 1659 + acpi_handle_info(boot_ec->handle, 1660 + "Boot %s EC used to handle transactions and events\n", 1661 + boot_ec_is_ecdt ? "ECDT" : "DSDT"); 1632 1662 1633 1663 device->driver_data = ec; 1634 1664 ··· 1642 1662 ret = !!request_region(ec->command_addr, 1, "EC cmd"); 1643 1663 WARN(!ret, "Could not request EC cmd io port 0x%lx", ec->command_addr); 1644 1664 1645 - if (!is_ecdt) { 1665 + if (dep_update) { 1646 1666 /* Reprobe devices depending on the EC */ 1647 1667 acpi_walk_dep_device_list(ec->handle); 1648 1668 } ··· 1710 1730 * namespace EC before the main ACPI device enumeration process. It is 1711 1731 * retained for historical reason and will be deprecated in the future. 1712 1732 */ 1713 - int __init acpi_ec_dsdt_probe(void) 1733 + void __init acpi_ec_dsdt_probe(void) 1714 1734 { 1715 - acpi_status status; 1716 1735 struct acpi_ec *ec; 1736 + acpi_status status; 1717 1737 int ret; 1718 1738 1719 1739 /* ··· 1723 1743 * picking up an invalid EC device. 1724 1744 */ 1725 1745 if (boot_ec) 1726 - return -ENODEV; 1746 + return; 1727 1747 1728 1748 ec = acpi_ec_alloc(); 1729 1749 if (!ec) 1730 - return -ENOMEM; 1750 + return; 1751 + 1731 1752 /* 1732 1753 * At this point, the namespace is initialized, so start to find 1733 1754 * the namespace objects. 1734 1755 */ 1735 - status = acpi_get_devices(ec_device_ids[0].id, 1736 - ec_parse_device, ec, NULL); 1756 + status = acpi_get_devices(ec_device_ids[0].id, ec_parse_device, ec, NULL); 1737 1757 if (ACPI_FAILURE(status) || !ec->handle) { 1738 - ret = -ENODEV; 1739 - goto error; 1758 + acpi_ec_free(ec); 1759 + return; 1740 1760 } 1761 + 1741 1762 /* 1742 1763 * When the DSDT EC is available, always re-configure boot EC to 1743 1764 * have _REG evaluated. _REG can only be evaluated after the ··· 1746 1765 * At this point, the GPE is not fully initialized, so do not to 1747 1766 * handle the events. 1748 1767 */ 1749 - ret = acpi_config_boot_ec(ec, ec->handle, false, false); 1750 - error: 1751 - if (ret) 1768 + ret = acpi_ec_setup(ec, false); 1769 + if (ret) { 1752 1770 acpi_ec_free(ec); 1753 - return ret; 1771 + return; 1772 + } 1773 + 1774 + boot_ec = ec; 1775 + 1776 + acpi_handle_info(ec->handle, 1777 + "Boot DSDT EC used to handle transactions\n"); 1754 1778 } 1755 1779 1756 1780 /* ··· 1807 1821 #endif 1808 1822 1809 1823 /* 1824 + * On some hardware it is necessary to clear events accumulated by the EC during 1825 + * sleep. These ECs stop reporting GPEs until they are manually polled, if too 1826 + * many events are accumulated. (e.g. Samsung Series 5/9 notebooks) 1827 + * 1828 + * https://bugzilla.kernel.org/show_bug.cgi?id=44161 1829 + * 1830 + * Ideally, the EC should also be instructed NOT to accumulate events during 1831 + * sleep (which Windows seems to do somehow), but the interface to control this 1832 + * behaviour is not known at this time. 1833 + * 1834 + * Models known to be affected are Samsung 530Uxx/535Uxx/540Uxx/550Pxx/900Xxx, 1835 + * however it is very likely that other Samsung models are affected. 1836 + * 1837 + * On systems which don't accumulate _Q events during sleep, this extra check 1838 + * should be harmless. 1839 + */ 1840 + static int ec_clear_on_resume(const struct dmi_system_id *id) 1841 + { 1842 + pr_debug("Detected system needing EC poll on resume.\n"); 1843 + EC_FLAGS_CLEAR_ON_RESUME = 1; 1844 + ec_event_clearing = ACPI_EC_EVT_TIMING_STATUS; 1845 + return 0; 1846 + } 1847 + 1848 + /* 1810 1849 * Some ECDTs contain wrong register addresses. 1811 1850 * MSI MS-171F 1812 1851 * https://bugzilla.kernel.org/show_bug.cgi?id=12461 ··· 1880 1869 ec_honor_ecdt_gpe, "ASUS X580VD", { 1881 1870 DMI_MATCH(DMI_SYS_VENDOR, "ASUSTeK COMPUTER INC."), 1882 1871 DMI_MATCH(DMI_PRODUCT_NAME, "X580VD"),}, NULL}, 1872 + { 1873 + ec_clear_on_resume, "Samsung hardware", { 1874 + DMI_MATCH(DMI_SYS_VENDOR, "SAMSUNG ELECTRONICS CO., LTD.")}, NULL}, 1883 1875 {}, 1884 1876 }; 1885 1877 1886 - int __init acpi_ec_ecdt_probe(void) 1878 + void __init acpi_ec_ecdt_probe(void) 1887 1879 { 1888 - int ret; 1889 - acpi_status status; 1890 1880 struct acpi_table_ecdt *ecdt_ptr; 1891 1881 struct acpi_ec *ec; 1882 + acpi_status status; 1883 + int ret; 1892 1884 1893 - ec = acpi_ec_alloc(); 1894 - if (!ec) 1895 - return -ENOMEM; 1896 - /* 1897 - * Generate a boot ec context 1898 - */ 1885 + /* Generate a boot ec context. */ 1899 1886 dmi_check_system(ec_dmi_table); 1900 1887 status = acpi_get_table(ACPI_SIG_ECDT, 1, 1901 1888 (struct acpi_table_header **)&ecdt_ptr); 1902 - if (ACPI_FAILURE(status)) { 1903 - ret = -ENODEV; 1904 - goto error; 1905 - } 1889 + if (ACPI_FAILURE(status)) 1890 + return; 1906 1891 1907 1892 if (!ecdt_ptr->control.address || !ecdt_ptr->data.address) { 1908 1893 /* 1909 1894 * Asus X50GL: 1910 1895 * https://bugzilla.kernel.org/show_bug.cgi?id=11880 1911 1896 */ 1912 - ret = -ENODEV; 1913 - goto error; 1897 + return; 1914 1898 } 1899 + 1900 + ec = acpi_ec_alloc(); 1901 + if (!ec) 1902 + return; 1915 1903 1916 1904 if (EC_FLAGS_CORRECT_ECDT) { 1917 1905 ec->command_addr = ecdt_ptr->data.address; ··· 1920 1910 ec->data_addr = ecdt_ptr->data.address; 1921 1911 } 1922 1912 ec->gpe = ecdt_ptr->gpe; 1913 + ec->handle = ACPI_ROOT_OBJECT; 1923 1914 1924 1915 /* 1925 1916 * At this point, the namespace is not initialized, so do not find 1926 1917 * the namespace objects, or handle the events. 1927 1918 */ 1928 - ret = acpi_config_boot_ec(ec, ACPI_ROOT_OBJECT, false, true); 1929 - error: 1930 - if (ret) 1919 + ret = acpi_ec_setup(ec, false); 1920 + if (ret) { 1931 1921 acpi_ec_free(ec); 1932 - return ret; 1922 + return; 1923 + } 1924 + 1925 + boot_ec = ec; 1926 + boot_ec_is_ecdt = true; 1927 + 1928 + pr_info("Boot ECDT EC used to handle transactions\n"); 1933 1929 } 1934 1930 1935 1931 #ifdef CONFIG_PM_SLEEP
+8 -28
drivers/acpi/ec_sys.c
··· 108 108 .llseek = default_llseek, 109 109 }; 110 110 111 - static int acpi_ec_add_debugfs(struct acpi_ec *ec, unsigned int ec_device_count) 111 + static void acpi_ec_add_debugfs(struct acpi_ec *ec, unsigned int ec_device_count) 112 112 { 113 113 struct dentry *dev_dir; 114 114 char name[64]; 115 115 umode_t mode = 0400; 116 116 117 - if (ec_device_count == 0) { 117 + if (ec_device_count == 0) 118 118 acpi_ec_debugfs_dir = debugfs_create_dir("ec", NULL); 119 - if (!acpi_ec_debugfs_dir) 120 - return -ENOMEM; 121 - } 122 119 123 120 sprintf(name, "ec%u", ec_device_count); 124 121 dev_dir = debugfs_create_dir(name, acpi_ec_debugfs_dir); 125 - if (!dev_dir) { 126 - if (ec_device_count != 0) 127 - goto error; 128 - return -ENOMEM; 129 - } 130 122 131 - if (!debugfs_create_x32("gpe", 0444, dev_dir, &first_ec->gpe)) 132 - goto error; 133 - if (!debugfs_create_bool("use_global_lock", 0444, dev_dir, 134 - &first_ec->global_lock)) 135 - goto error; 123 + debugfs_create_x32("gpe", 0444, dev_dir, &first_ec->gpe); 124 + debugfs_create_bool("use_global_lock", 0444, dev_dir, 125 + &first_ec->global_lock); 136 126 137 127 if (write_support) 138 128 mode = 0600; 139 - if (!debugfs_create_file("io", mode, dev_dir, ec, &acpi_ec_io_ops)) 140 - goto error; 141 - 142 - return 0; 143 - 144 - error: 145 - debugfs_remove_recursive(acpi_ec_debugfs_dir); 146 - return -ENOMEM; 129 + debugfs_create_file("io", mode, dev_dir, ec, &acpi_ec_io_ops); 147 130 } 148 131 149 132 static int __init acpi_ec_sys_init(void) 150 133 { 151 - int err = 0; 152 134 if (first_ec) 153 - err = acpi_ec_add_debugfs(first_ec, 0); 154 - else 155 - err = -ENODEV; 156 - return err; 135 + acpi_ec_add_debugfs(first_ec, 0); 136 + return 0; 157 137 } 158 138 159 139 static void __exit acpi_ec_sys_exit(void)
+2 -2
drivers/acpi/internal.h
··· 192 192 typedef int (*acpi_ec_query_func) (void *data); 193 193 194 194 int acpi_ec_init(void); 195 - int acpi_ec_ecdt_probe(void); 196 - int acpi_ec_dsdt_probe(void); 195 + void acpi_ec_ecdt_probe(void); 196 + void acpi_ec_dsdt_probe(void); 197 197 void acpi_ec_block_transactions(void); 198 198 void acpi_ec_unblock_transactions(void); 199 199 void acpi_ec_mark_gpe_for_wake(void);
+2 -2
drivers/acpi/irq.c
··· 196 196 fwnode = acpi_gsi_domain_id; 197 197 acpi_irq_parse_one_match(fwnode, irq->interrupts[ctx->index], 198 198 irq->triggering, irq->polarity, 199 - irq->sharable, ctx); 199 + irq->shareable, ctx); 200 200 return AE_CTRL_TERMINATE; 201 201 case ACPI_RESOURCE_TYPE_EXTENDED_IRQ: 202 202 eirq = &ares->data.extended_irq; ··· 209 209 fwnode = acpi_get_irq_source_fwhandle(&eirq->resource_source); 210 210 acpi_irq_parse_one_match(fwnode, eirq->interrupts[ctx->index], 211 211 eirq->triggering, eirq->polarity, 212 - eirq->sharable, ctx); 212 + eirq->shareable, ctx); 213 213 return AE_CTRL_TERMINATE; 214 214 } 215 215
+4 -4
drivers/acpi/pci_link.c
··· 317 317 resource->res.data.irq.polarity = 318 318 link->irq.polarity; 319 319 if (link->irq.triggering == ACPI_EDGE_SENSITIVE) 320 - resource->res.data.irq.sharable = 320 + resource->res.data.irq.shareable = 321 321 ACPI_EXCLUSIVE; 322 322 else 323 - resource->res.data.irq.sharable = ACPI_SHARED; 323 + resource->res.data.irq.shareable = ACPI_SHARED; 324 324 resource->res.data.irq.interrupt_count = 1; 325 325 resource->res.data.irq.interrupts[0] = irq; 326 326 break; ··· 335 335 resource->res.data.extended_irq.polarity = 336 336 link->irq.polarity; 337 337 if (link->irq.triggering == ACPI_EDGE_SENSITIVE) 338 - resource->res.data.irq.sharable = 338 + resource->res.data.irq.shareable = 339 339 ACPI_EXCLUSIVE; 340 340 else 341 - resource->res.data.irq.sharable = ACPI_SHARED; 341 + resource->res.data.irq.shareable = ACPI_SHARED; 342 342 resource->res.data.extended_irq.interrupt_count = 1; 343 343 resource->res.data.extended_irq.interrupts[0] = irq; 344 344 /* ignore resource_source, it's optional */
+9 -4
drivers/acpi/pptt.c
··· 451 451 return cpu; 452 452 } 453 453 454 + static void acpi_pptt_warn_missing(void) 455 + { 456 + pr_warn_once("No PPTT table found, cpu and cache topology may be inaccurate\n"); 457 + } 458 + 454 459 /** 455 460 * topology_get_acpi_cpu_tag() - Find a unique topology value for a feature 456 461 * @table: Pointer to the head of the PPTT table ··· 503 498 504 499 status = acpi_get_table(ACPI_SIG_PPTT, 0, &table); 505 500 if (ACPI_FAILURE(status)) { 506 - pr_warn_once("No PPTT table found, cpu topology may be inaccurate\n"); 501 + acpi_pptt_warn_missing(); 507 502 return -ENOENT; 508 503 } 509 504 retval = topology_get_acpi_cpu_tag(table, cpu, level, flag); ··· 536 531 acpi_cpu_id = get_acpi_id_for_cpu(cpu); 537 532 status = acpi_get_table(ACPI_SIG_PPTT, 0, &table); 538 533 if (ACPI_FAILURE(status)) { 539 - pr_warn_once("No PPTT table found, cache topology may be inaccurate\n"); 534 + acpi_pptt_warn_missing(); 540 535 } else { 541 536 number_of_levels = acpi_find_cache_levels(table, acpi_cpu_id); 542 537 acpi_put_table(table); ··· 568 563 569 564 status = acpi_get_table(ACPI_SIG_PPTT, 0, &table); 570 565 if (ACPI_FAILURE(status)) { 571 - pr_warn_once("No PPTT table found, cache topology may be inaccurate\n"); 566 + acpi_pptt_warn_missing(); 572 567 return -ENOENT; 573 568 } 574 569 ··· 622 617 623 618 status = acpi_get_table(ACPI_SIG_PPTT, 0, &table); 624 619 if (ACPI_FAILURE(status)) { 625 - pr_warn_once("No PPTT table found, topology may be inaccurate\n"); 620 + acpi_pptt_warn_missing(); 626 621 return -ENOENT; 627 622 } 628 623
+2 -2
drivers/acpi/resource.c
··· 476 476 } 477 477 acpi_dev_get_irqresource(res, irq->interrupts[index], 478 478 irq->triggering, irq->polarity, 479 - irq->sharable, true); 479 + irq->shareable, true); 480 480 break; 481 481 case ACPI_RESOURCE_TYPE_EXTENDED_IRQ: 482 482 ext_irq = &ares->data.extended_irq; ··· 487 487 if (is_gsi(ext_irq)) 488 488 acpi_dev_get_irqresource(res, ext_irq->interrupts[index], 489 489 ext_irq->triggering, ext_irq->polarity, 490 - ext_irq->sharable, false); 490 + ext_irq->shareable, false); 491 491 else 492 492 acpi_dev_irqresource_disabled(res, 0); 493 493 break;
+10 -2
drivers/acpi/tables.c
··· 473 473 474 474 void __init acpi_table_upgrade(void) 475 475 { 476 - void *data = (void *)initrd_start; 477 - size_t size = initrd_end - initrd_start; 476 + void *data; 477 + size_t size; 478 478 int sig, no, table_nr = 0, total_offset = 0; 479 479 long offset = 0; 480 480 struct acpi_table_header *table; 481 481 char cpio_path[32] = "kernel/firmware/acpi/"; 482 482 struct cpio_data file; 483 + 484 + if (IS_ENABLED(CONFIG_ACPI_TABLE_OVERRIDE_VIA_BUILTIN_INITRD)) { 485 + data = __initramfs_start; 486 + size = __initramfs_size; 487 + } else { 488 + data = (void *)initrd_start; 489 + size = initrd_end - initrd_start; 490 + } 483 491 484 492 if (data == NULL || size == 0) 485 493 return;
+5
drivers/acpi/x86/utils.c
··· 56 56 */ 57 57 ENTRY("80860F09", "1", ICPU(INTEL_FAM6_ATOM_SILVERMONT), {}), 58 58 ENTRY("80862288", "1", ICPU(INTEL_FAM6_ATOM_AIRMONT), {}), 59 + 60 + /* Lenovo Yoga Book uses PWM2 for keyboard backlight control */ 61 + ENTRY("80862289", "2", ICPU(INTEL_FAM6_ATOM_AIRMONT), { 62 + DMI_MATCH(DMI_PRODUCT_NAME, "Lenovo YB1-X9"), 63 + }), 59 64 /* 60 65 * The INT0002 device is necessary to clear wakeup interrupt sources 61 66 * on Cherry Trail devices, without it we get nobody cared IRQ msgs.
+68
drivers/firmware/arm_sdei.c
··· 2 2 // Copyright (C) 2017 Arm Ltd. 3 3 #define pr_fmt(fmt) "sdei: " fmt 4 4 5 + #include <acpi/ghes.h> 5 6 #include <linux/acpi.h> 6 7 #include <linux/arm_sdei.h> 7 8 #include <linux/arm-smccc.h> ··· 886 885 unsigned long arg4, struct arm_smccc_res *res) 887 886 { 888 887 arm_smccc_hvc(function_id, arg0, arg1, arg2, arg3, arg4, 0, 0, res); 888 + } 889 + 890 + int sdei_register_ghes(struct ghes *ghes, sdei_event_callback *normal_cb, 891 + sdei_event_callback *critical_cb) 892 + { 893 + int err; 894 + u64 result; 895 + u32 event_num; 896 + sdei_event_callback *cb; 897 + 898 + if (!IS_ENABLED(CONFIG_ACPI_APEI_GHES)) 899 + return -EOPNOTSUPP; 900 + 901 + event_num = ghes->generic->notify.vector; 902 + if (event_num == 0) { 903 + /* 904 + * Event 0 is reserved by the specification for 905 + * SDEI_EVENT_SIGNAL. 906 + */ 907 + return -EINVAL; 908 + } 909 + 910 + err = sdei_api_event_get_info(event_num, SDEI_EVENT_INFO_EV_PRIORITY, 911 + &result); 912 + if (err) 913 + return err; 914 + 915 + if (result == SDEI_EVENT_PRIORITY_CRITICAL) 916 + cb = critical_cb; 917 + else 918 + cb = normal_cb; 919 + 920 + err = sdei_event_register(event_num, cb, ghes); 921 + if (!err) 922 + err = sdei_event_enable(event_num); 923 + 924 + return err; 925 + } 926 + 927 + int sdei_unregister_ghes(struct ghes *ghes) 928 + { 929 + int i; 930 + int err; 931 + u32 event_num = ghes->generic->notify.vector; 932 + 933 + might_sleep(); 934 + 935 + if (!IS_ENABLED(CONFIG_ACPI_APEI_GHES)) 936 + return -EOPNOTSUPP; 937 + 938 + /* 939 + * The event may be running on another CPU. Disable it 940 + * to stop new events, then try to unregister a few times. 941 + */ 942 + err = sdei_event_disable(event_num); 943 + if (err) 944 + return err; 945 + 946 + for (i = 0; i < 3; i++) { 947 + err = sdei_event_unregister(event_num); 948 + if (err != -EINPROGRESS) 949 + break; 950 + 951 + schedule(); 952 + } 953 + 954 + return err; 889 955 } 890 956 891 957 static int sdei_get_conduit(struct platform_device *pdev)
+9 -4
drivers/firmware/efi/cper.c
··· 534 534 int cper_estatus_check(const struct acpi_hest_generic_status *estatus) 535 535 { 536 536 struct acpi_hest_generic_data *gdata; 537 - unsigned int data_len, gedata_len; 537 + unsigned int data_len, record_size; 538 538 int rc; 539 539 540 540 rc = cper_estatus_check_header(estatus); 541 541 if (rc) 542 542 return rc; 543 + 543 544 data_len = estatus->data_length; 544 545 545 546 apei_estatus_for_each_section(estatus, gdata) { 546 - gedata_len = acpi_hest_get_error_length(gdata); 547 - if (gedata_len > data_len - acpi_hest_get_size(gdata)) 547 + if (sizeof(struct acpi_hest_generic_data) > data_len) 548 548 return -EINVAL; 549 - data_len -= acpi_hest_get_record_size(gdata); 549 + 550 + record_size = acpi_hest_get_record_size(gdata); 551 + if (record_size > data_len) 552 + return -EINVAL; 553 + 554 + data_len -= record_size; 550 555 } 551 556 if (data_len) 552 557 return -EINVAL;
+1 -1
drivers/gpio/gpiolib-acpi.c
··· 892 892 * event but only if the access here is ACPI_READ. In that 893 893 * case we "borrow" the event GPIO instead. 894 894 */ 895 - if (!found && agpio->sharable == ACPI_SHARED && 895 + if (!found && agpio->shareable == ACPI_SHARED && 896 896 function == ACPI_READ) { 897 897 struct acpi_gpio_event *event; 898 898
+4 -4
drivers/platform/x86/sony-laptop.c
··· 4392 4392 list_add(&interrupt->list, &dev->interrupts); 4393 4393 interrupt->irq.triggering = p->triggering; 4394 4394 interrupt->irq.polarity = p->polarity; 4395 - interrupt->irq.sharable = p->sharable; 4395 + interrupt->irq.shareable = p->shareable; 4396 4396 interrupt->irq.interrupt_count = 1; 4397 4397 interrupt->irq.interrupts[0] = p->interrupts[i]; 4398 4398 } ··· 4546 4546 memcpy(&resource->res3.data.irq, &irq->irq, 4547 4547 sizeof(struct acpi_resource_irq)); 4548 4548 /* we requested a shared irq */ 4549 - resource->res3.data.irq.sharable = ACPI_SHARED; 4549 + resource->res3.data.irq.shareable = ACPI_SHARED; 4550 4550 4551 4551 resource->res4.type = ACPI_RESOURCE_TYPE_END_TAG; 4552 4552 resource->res4.length = sizeof(struct acpi_resource); ··· 4565 4565 memcpy(&resource->res2.data.irq, &irq->irq, 4566 4566 sizeof(struct acpi_resource_irq)); 4567 4567 /* we requested a shared irq */ 4568 - resource->res2.data.irq.sharable = ACPI_SHARED; 4568 + resource->res2.data.irq.shareable = ACPI_SHARED; 4569 4569 4570 4570 resource->res3.type = ACPI_RESOURCE_TYPE_END_TAG; 4571 4571 resource->res3.length = sizeof(struct acpi_resource); ··· 4779 4779 irq->irq.interrupts[0], 4780 4780 irq->irq.triggering, 4781 4781 irq->irq.polarity, 4782 - irq->irq.sharable); 4782 + irq->irq.shareable); 4783 4783 spic_dev.cur_irq = irq; 4784 4784 break; 4785 4785 }
+7 -7
drivers/pnp/pnpacpi/rsparser.c
··· 215 215 if (i >= 0) { 216 216 flags = acpi_dev_irq_flags(gpio->triggering, 217 217 gpio->polarity, 218 - gpio->sharable); 218 + gpio->shareable); 219 219 } else { 220 220 flags = IORESOURCE_DISABLED; 221 221 } ··· 324 324 if (p->interrupts[i]) 325 325 __set_bit(p->interrupts[i], map.bits); 326 326 327 - flags = acpi_dev_irq_flags(p->triggering, p->polarity, p->sharable); 327 + flags = acpi_dev_irq_flags(p->triggering, p->polarity, p->shareable); 328 328 pnp_register_irq_resource(dev, option_flags, &map, flags); 329 329 } 330 330 ··· 348 348 } 349 349 } 350 350 351 - flags = acpi_dev_irq_flags(p->triggering, p->polarity, p->sharable); 351 + flags = acpi_dev_irq_flags(p->triggering, p->polarity, p->shareable); 352 352 pnp_register_irq_resource(dev, option_flags, &map, flags); 353 353 } 354 354 ··· 681 681 decode_irq_flags(dev, p->flags, &triggering, &polarity, &shareable); 682 682 irq->triggering = triggering; 683 683 irq->polarity = polarity; 684 - irq->sharable = shareable; 684 + irq->shareable = shareable; 685 685 irq->interrupt_count = 1; 686 686 irq->interrupts[0] = p->start; 687 687 ··· 689 689 (int) p->start, 690 690 triggering == ACPI_LEVEL_SENSITIVE ? "level" : "edge", 691 691 polarity == ACPI_ACTIVE_LOW ? "low" : "high", 692 - irq->sharable == ACPI_SHARED ? "shared" : "exclusive", 692 + irq->shareable == ACPI_SHARED ? "shared" : "exclusive", 693 693 irq->descriptor_length); 694 694 } 695 695 ··· 711 711 extended_irq->producer_consumer = ACPI_CONSUMER; 712 712 extended_irq->triggering = triggering; 713 713 extended_irq->polarity = polarity; 714 - extended_irq->sharable = shareable; 714 + extended_irq->shareable = shareable; 715 715 extended_irq->interrupt_count = 1; 716 716 extended_irq->interrupts[0] = p->start; 717 717 718 718 pnp_dbg(&dev->dev, " encode irq %d %s %s %s\n", (int) p->start, 719 719 triggering == ACPI_LEVEL_SENSITIVE ? "level" : "edge", 720 720 polarity == ACPI_ACTIVE_LOW ? "low" : "high", 721 - extended_irq->sharable == ACPI_SHARED ? "shared" : "exclusive"); 721 + extended_irq->shareable == ACPI_SHARED ? "shared" : "exclusive"); 722 722 } 723 723 724 724 static void pnpacpi_encode_dma(struct pnp_dev *dev,
+1 -1
include/acpi/acbuffer.h
··· 3 3 * 4 4 * Name: acbuffer.h - Support for buffers returned by ACPI predefined names 5 5 * 6 - * Copyright (C) 2000 - 2018, Intel Corp. 6 + * Copyright (C) 2000 - 2019, Intel Corp. 7 7 * 8 8 *****************************************************************************/ 9 9
+2 -2
include/acpi/acconfig.h
··· 3 3 * 4 4 * Name: acconfig.h - Global configuration constants 5 5 * 6 - * Copyright (C) 2000 - 2018, Intel Corp. 6 + * Copyright (C) 2000 - 2019, Intel Corp. 7 7 * 8 8 *****************************************************************************/ 9 9 ··· 141 141 142 142 /* 143 143 * Maximal number of elements the Result Stack can contain, 144 - * it may be an arbitray value not exceeding the types of 144 + * it may be an arbitrary value not exceeding the types of 145 145 * result_size and result_count (now u8). 146 146 */ 147 147 #define ACPI_RESULTS_OBJ_NUM_MAX 255
+3 -2
include/acpi/acexcep.h
··· 3 3 * 4 4 * Name: acexcep.h - Exception codes returned by the ACPI subsystem 5 5 * 6 - * Copyright (C) 2000 - 2018, Intel Corp. 6 + * Copyright (C) 2000 - 2019, Intel Corp. 7 7 * 8 8 *****************************************************************************/ 9 9 ··· 311 311 "An ACPI name contains invalid character(s)"), 312 312 EXCEP_TXT("AE_AML_NAME_NOT_FOUND", 313 313 "Could not resolve a named reference"), 314 - EXCEP_TXT("AE_AML_INTERNAL", "An internal error within the interprete"), 314 + EXCEP_TXT("AE_AML_INTERNAL", 315 + "An internal error within the interpreter"), 315 316 EXCEP_TXT("AE_AML_INVALID_SPACE_ID", 316 317 "An Operation Region SpaceID is invalid"), 317 318 EXCEP_TXT("AE_AML_STRING_LIMIT",
+1 -1
include/acpi/acnames.h
··· 3 3 * 4 4 * Name: acnames.h - Global names and strings 5 5 * 6 - * Copyright (C) 2000 - 2018, Intel Corp. 6 + * Copyright (C) 2000 - 2019, Intel Corp. 7 7 * 8 8 *****************************************************************************/ 9 9
+3 -1
include/acpi/acoutput.h
··· 3 3 * 4 4 * Name: acoutput.h -- debug output 5 5 * 6 - * Copyright (C) 2000 - 2018, Intel Corp. 6 + * Copyright (C) 2000 - 2019, Intel Corp. 7 7 * 8 8 *****************************************************************************/ 9 9 ··· 201 201 #define ACPI_EXCEPTION(plist) acpi_exception plist 202 202 #define ACPI_ERROR(plist) acpi_error plist 203 203 #define ACPI_BIOS_WARNING(plist) acpi_bios_warning plist 204 + #define ACPI_BIOS_EXCEPTION(plist) acpi_bios_exception plist 204 205 #define ACPI_BIOS_ERROR(plist) acpi_bios_error plist 205 206 #define ACPI_DEBUG_OBJECT(obj,l,i) acpi_ex_do_debug_object(obj,l,i) 206 207 ··· 214 213 #define ACPI_EXCEPTION(plist) 215 214 #define ACPI_ERROR(plist) 216 215 #define ACPI_BIOS_WARNING(plist) 216 + #define ACPI_BIOS_EXCEPTION(plist) 217 217 #define ACPI_BIOS_ERROR(plist) 218 218 #define ACPI_DEBUG_OBJECT(obj,l,i) 219 219
+1 -1
include/acpi/acpi.h
··· 3 3 * 4 4 * Name: acpi.h - Master public include file used to interface to ACPICA 5 5 * 6 - * Copyright (C) 2000 - 2018, Intel Corp. 6 + * Copyright (C) 2000 - 2019, Intel Corp. 7 7 * 8 8 *****************************************************************************/ 9 9
+1 -1
include/acpi/acpiosxf.h
··· 5 5 * interfaces must be implemented by OSL to interface the 6 6 * ACPI components to the host operating system. 7 7 * 8 - * Copyright (C) 2000 - 2018, Intel Corp. 8 + * Copyright (C) 2000 - 2019, Intel Corp. 9 9 * 10 10 *****************************************************************************/ 11 11
+8 -10
include/acpi/acpixf.h
··· 3 3 * 4 4 * Name: acpixf.h - External interfaces to the ACPI subsystem 5 5 * 6 - * Copyright (C) 2000 - 2018, Intel Corp. 6 + * Copyright (C) 2000 - 2019, Intel Corp. 7 7 * 8 8 *****************************************************************************/ 9 9 ··· 12 12 13 13 /* Current ACPICA subsystem version in YYYYMMDD format */ 14 14 15 - #define ACPI_CA_VERSION 0x20181213 15 + #define ACPI_CA_VERSION 0x20190215 16 16 17 17 #include <acpi/acconfig.h> 18 18 #include <acpi/actypes.h> ··· 155 155 * some machines. Default behavior is to use the XSDT if present. 156 156 */ 157 157 ACPI_INIT_GLOBAL(u8, acpi_gbl_do_not_use_xsdt, FALSE); 158 - 159 - /* 160 - * Optionally support module level code by parsing an entire table as 161 - * a method as it is loaded. Default is TRUE. 162 - * NOTE, this is essentially obsolete and will be removed soon 163 - * (01/2018). 164 - */ 165 - ACPI_INIT_GLOBAL(u8, acpi_gbl_execute_tables_as_methods, TRUE); 166 158 167 159 /* 168 160 * Optionally use 32-bit FADT addresses if and when there is a conflict ··· 895 903 acpi_bios_error(const char *module_name, 896 904 u32 line_number, 897 905 const char *format, ...)) 906 + ACPI_MSG_DEPENDENT_RETURN_VOID(ACPI_PRINTF_LIKE(4) 907 + void ACPI_INTERNAL_VAR_XFACE 908 + acpi_bios_exception(const char *module_name, 909 + u32 line_number, 910 + acpi_status status, 911 + const char *format, ...)) 898 912 ACPI_MSG_DEPENDENT_RETURN_VOID(ACPI_PRINTF_LIKE(3) 899 913 void ACPI_INTERNAL_VAR_XFACE 900 914 acpi_bios_warning(const char *module_name,
+8 -8
include/acpi/acrestyp.h
··· 3 3 * 4 4 * Name: acrestyp.h - Defines, types, and structures for resource descriptors 5 5 * 6 - * Copyright (C) 2000 - 2018, Intel Corp. 6 + * Copyright (C) 2000 - 2019, Intel Corp. 7 7 * 8 8 *****************************************************************************/ 9 9 ··· 139 139 u8 descriptor_length; 140 140 u8 triggering; 141 141 u8 polarity; 142 - u8 sharable; 142 + u8 shareable; 143 143 u8 wake_capable; 144 144 u8 interrupt_count; 145 145 u8 interrupts[1]; ··· 328 328 u8 producer_consumer; 329 329 u8 triggering; 330 330 u8 polarity; 331 - u8 sharable; 331 + u8 shareable; 332 332 u8 wake_capable; 333 333 u8 interrupt_count; 334 334 struct acpi_resource_source resource_source; ··· 348 348 u8 connection_type; 349 349 u8 producer_consumer; /* For values, see Producer/Consumer above */ 350 350 u8 pin_config; 351 - u8 sharable; /* For values, see Interrupt Attributes above */ 351 + u8 shareable; /* For values, see Interrupt Attributes above */ 352 352 u8 wake_capable; /* For values, see Interrupt Attributes above */ 353 353 u8 io_restriction; 354 354 u8 triggering; /* For values, see Interrupt Attributes above */ ··· 508 508 struct acpi_resource_pin_function { 509 509 u8 revision_id; 510 510 u8 pin_config; 511 - u8 sharable; /* For values, see Interrupt Attributes above */ 511 + u8 shareable; /* For values, see Interrupt Attributes above */ 512 512 u16 function_number; 513 513 u16 pin_table_length; 514 514 u16 vendor_length; ··· 520 520 struct acpi_resource_pin_config { 521 521 u8 revision_id; 522 522 u8 producer_consumer; /* For values, see Producer/Consumer above */ 523 - u8 sharable; /* For values, see Interrupt Attributes above */ 523 + u8 shareable; /* For values, see Interrupt Attributes above */ 524 524 u8 pin_config_type; 525 525 u32 pin_config_value; 526 526 u16 pin_table_length; ··· 560 560 struct acpi_resource_pin_group_function { 561 561 u8 revision_id; 562 562 u8 producer_consumer; /* For values, see Producer/Consumer above */ 563 - u8 sharable; /* For values, see Interrupt Attributes above */ 563 + u8 shareable; /* For values, see Interrupt Attributes above */ 564 564 u16 function_number; 565 565 u16 vendor_length; 566 566 struct acpi_resource_source resource_source; ··· 571 571 struct acpi_resource_pin_group_config { 572 572 u8 revision_id; 573 573 u8 producer_consumer; /* For values, see Producer/Consumer above */ 574 - u8 sharable; /* For values, see Interrupt Attributes above */ 574 + u8 shareable; /* For values, see Interrupt Attributes above */ 575 575 u8 pin_config_type; /* For values, see pin_config_type above */ 576 576 u32 pin_config_value; 577 577 u16 vendor_length;
+1 -1
include/acpi/actbl.h
··· 3 3 * 4 4 * Name: actbl.h - Basic ACPI Table Definitions 5 5 * 6 - * Copyright (C) 2000 - 2018, Intel Corp. 6 + * Copyright (C) 2000 - 2019, Intel Corp. 7 7 * 8 8 *****************************************************************************/ 9 9
+12 -7
include/acpi/actbl1.h
··· 3 3 * 4 4 * Name: actbl1.h - Additional ACPI table definitions 5 5 * 6 - * Copyright (C) 2000 - 2018, Intel Corp. 6 + * Copyright (C) 2000 - 2019, Intel Corp. 7 7 * 8 8 *****************************************************************************/ 9 9 ··· 562 562 563 563 #define ACPI_DMAR_INCLUDE_ALL (1) 564 564 565 - /* 1: Reserved Memory Defininition */ 565 + /* 1: Reserved Memory Definition */ 566 566 567 567 struct acpi_dmar_reserved_memory { 568 568 struct acpi_dmar_header header; ··· 1001 1001 #define ACPI_GTDT_INTERRUPT_POLARITY (1<<1) 1002 1002 #define ACPI_GTDT_ALWAYS_ON (1<<2) 1003 1003 1004 + struct acpi_gtdt_el2 { 1005 + u32 virtual_el2_timer_gsiv; 1006 + u32 virtual_el2_timer_flags; 1007 + }; 1008 + 1004 1009 /* Common GTDT subtable header */ 1005 1010 1006 1011 struct acpi_gtdt_header { ··· 1395 1390 /* Values for HMAT structure types */ 1396 1391 1397 1392 enum acpi_hmat_type { 1398 - ACPI_HMAT_TYPE_ADDRESS_RANGE = 0, /* Memory subystem address range */ 1393 + ACPI_HMAT_TYPE_ADDRESS_RANGE = 0, /* Memory subsystem address range */ 1399 1394 ACPI_HMAT_TYPE_LOCALITY = 1, /* System locality latency and bandwidth information */ 1400 1395 ACPI_HMAT_TYPE_CACHE = 2, /* Memory side cache information */ 1401 1396 ACPI_HMAT_TYPE_RESERVED = 3 /* 3 and greater are reserved */ ··· 1411 1406 * HMAT Structures, correspond to Type in struct acpi_hmat_structure 1412 1407 */ 1413 1408 1414 - /* 0: Memory subystem address range */ 1409 + /* 0: Memory proximity domain attributes */ 1415 1410 1416 - struct acpi_hmat_address_range { 1411 + struct acpi_hmat_proximity_domain { 1417 1412 struct acpi_hmat_structure header; 1418 1413 u16 flags; 1419 1414 u16 reserved1; 1420 1415 u32 processor_PD; /* Processor proximity domain */ 1421 1416 u32 memory_PD; /* Memory proximity domain */ 1422 1417 u32 reserved2; 1423 - u64 physical_address_base; /* Physical address range base */ 1424 - u64 physical_address_length; /* Physical address range length */ 1418 + u64 reserved3; 1419 + u64 reserved4; 1425 1420 }; 1426 1421 1427 1422 /* Masks for Flags field above */
+11 -6
include/acpi/actbl2.h
··· 3 3 * 4 4 * Name: actbl2.h - ACPI Table Definitions (tables not in ACPI spec) 5 5 * 6 - * Copyright (C) 2000 - 2018, Intel Corp. 6 + * Copyright (C) 2000 - 2019, Intel Corp. 7 7 * 8 8 *****************************************************************************/ 9 9 ··· 143 143 */ 144 144 struct acpi_iort_its_group { 145 145 u32 its_count; 146 - u32 identifiers[1]; /* GIC ITS identifier arrary */ 146 + u32 identifiers[1]; /* GIC ITS identifier array */ 147 147 }; 148 148 149 149 struct acpi_iort_named_component { ··· 623 623 u8 reserved[3]; /* reserved - must be zero */ 624 624 }; 625 625 626 - /* 11: Generic Interrupt (ACPI 5.0 + ACPI 6.0 changes) */ 626 + /* 11: Generic interrupt - GICC (ACPI 5.0 + ACPI 6.0 + ACPI 6.3 changes) */ 627 627 628 628 struct acpi_madt_generic_interrupt { 629 629 struct acpi_subtable_header header; ··· 641 641 u64 gicr_base_address; 642 642 u64 arm_mpidr; 643 643 u8 efficiency_class; 644 - u8 reserved2[3]; 644 + u8 reserved2[1]; 645 + u16 spe_interrupt; /* ACPI 6.3 */ 645 646 }; 646 647 647 648 /* Masks for Flags field above */ ··· 1362 1361 1363 1362 #define ACPI_PDTT_RUNTIME_TRIGGER (1) 1364 1363 #define ACPI_PDTT_WAIT_COMPLETION (1<<1) 1364 + #define ACPI_PDTT_TRIGGER_ORDER (1<<2) 1365 1365 1366 1366 /******************************************************************************* 1367 1367 * ··· 1474 1472 1475 1473 /* Flags */ 1476 1474 1477 - #define ACPI_PPTT_PHYSICAL_PACKAGE (1) /* Physical package */ 1478 - #define ACPI_PPTT_ACPI_PROCESSOR_ID_VALID (2) /* ACPI Processor ID valid */ 1475 + #define ACPI_PPTT_PHYSICAL_PACKAGE (1) 1476 + #define ACPI_PPTT_ACPI_PROCESSOR_ID_VALID (1<<1) 1477 + #define ACPI_PPTT_ACPI_PROCESSOR_IS_THREAD (1<<2) /* ACPI 6.3 */ 1478 + #define ACPI_PPTT_ACPI_LEAF_NODE (1<<3) /* ACPI 6.3 */ 1479 + #define ACPI_PPTT_ACPI_IDENTICAL (1<<4) /* ACPI 6.3 */ 1479 1480 1480 1481 /* 1: Cache Type Structure */ 1481 1482
+19 -2
include/acpi/actbl3.h
··· 3 3 * 4 4 * Name: actbl3.h - ACPI Table Definitions 5 5 * 6 - * Copyright (C) 2000 - 2018, Intel Corp. 6 + * Copyright (C) 2000 - 2019, Intel Corp. 7 7 * 8 8 *****************************************************************************/ 9 9 ··· 190 190 ACPI_SRAT_TYPE_X2APIC_CPU_AFFINITY = 2, 191 191 ACPI_SRAT_TYPE_GICC_AFFINITY = 3, 192 192 ACPI_SRAT_TYPE_GIC_ITS_AFFINITY = 4, /* ACPI 6.2 */ 193 - ACPI_SRAT_TYPE_RESERVED = 5 /* 5 and greater are reserved */ 193 + ACPI_SRAT_TYPE_GENERIC_AFFINITY = 5, /* ACPI 6.3 */ 194 + ACPI_SRAT_TYPE_RESERVED = 6 /* 5 and greater are reserved */ 194 195 }; 195 196 196 197 /* ··· 271 270 u16 reserved; 272 271 u32 its_id; 273 272 }; 273 + 274 + /* 5: Generic Initiator Affinity Structure (ACPI 6.3) */ 275 + 276 + struct acpi_srat_generic_affinity { 277 + struct acpi_subtable_header header; 278 + u8 reserved; 279 + u8 device_handle_type; 280 + u32 proximity_domain; 281 + u8 device_handle[16]; 282 + u32 flags; 283 + u32 reserved1; 284 + }; 285 + 286 + /* Flags for struct acpi_srat_generic_affinity */ 287 + 288 + #define ACPI_SRAT_GENERIC_AFFINITY_ENABLED (1) /* 00: Use affinity structure */ 274 289 275 290 /******************************************************************************* 276 291 *
+3 -11
include/acpi/actypes.h
··· 3 3 * 4 4 * Name: actypes.h - Common data types for the entire ACPI subsystem 5 5 * 6 - * Copyright (C) 2000 - 2018, Intel Corp. 6 + * Copyright (C) 2000 - 2019, Intel Corp. 7 7 * 8 8 *****************************************************************************/ 9 9 ··· 617 617 #define ACPI_NOTIFY_SHUTDOWN_REQUEST (u8) 0x0C 618 618 #define ACPI_NOTIFY_AFFINITY_UPDATE (u8) 0x0D 619 619 #define ACPI_NOTIFY_MEMORY_UPDATE (u8) 0x0E 620 + #define ACPI_NOTIFY_DISCONNECT_RECOVER (u8) 0x0F 620 621 621 - #define ACPI_GENERIC_NOTIFY_MAX 0x0E 622 + #define ACPI_GENERIC_NOTIFY_MAX 0x0F 622 623 #define ACPI_SPECIFIC_NOTIFY_MAX 0x84 623 624 624 625 /* ··· 885 884 886 885 #define ACPI_ENABLE_EVENT 1 887 886 #define ACPI_DISABLE_EVENT 0 888 - 889 - /* Sleep function dispatch */ 890 - 891 - typedef acpi_status (*acpi_sleep_function) (u8 sleep_state); 892 - 893 - struct acpi_sleep_functions { 894 - acpi_sleep_function legacy_function; 895 - acpi_sleep_function extended_function; 896 - }; 897 887 898 888 /* 899 889 * External ACPI object definition
+1 -1
include/acpi/acuuid.h
··· 3 3 * 4 4 * Name: acuuid.h - ACPI-related UUID/GUID definitions 5 5 * 6 - * Copyright (C) 2000 - 2018, Intel Corp. 6 + * Copyright (C) 2000 - 2019, Intel Corp. 7 7 * 8 8 *****************************************************************************/ 9 9
+2 -2
include/acpi/ghes.h
··· 13 13 * estatus: memory buffer for error status block, allocated during 14 14 * HEST parsing. 15 15 */ 16 - #define GHES_TO_CLEAR 0x0001 17 16 #define GHES_EXITING 0x0002 18 17 19 18 struct ghes { ··· 21 22 struct acpi_hest_generic_v2 *generic_v2; 22 23 }; 23 24 struct acpi_hest_generic_status *estatus; 24 - u64 buffer_paddr; 25 25 unsigned long flags; 26 26 union { 27 27 struct list_head list; ··· 49 51 GHES_SEV_RECOVERABLE = 0x2, 50 52 GHES_SEV_PANIC = 0x3, 51 53 }; 54 + 55 + int ghes_estatus_pool_init(int num_ghes); 52 56 53 57 /* From drivers/edac/ghes_edac.c */ 54 58
+1 -1
include/acpi/platform/acenv.h
··· 3 3 * 4 4 * Name: acenv.h - Host and compiler configuration 5 5 * 6 - * Copyright (C) 2000 - 2018, Intel Corp. 6 + * Copyright (C) 2000 - 2019, Intel Corp. 7 7 * 8 8 *****************************************************************************/ 9 9
+1 -1
include/acpi/platform/acenvex.h
··· 3 3 * 4 4 * Name: acenvex.h - Extra host and compiler configuration 5 5 * 6 - * Copyright (C) 2000 - 2018, Intel Corp. 6 + * Copyright (C) 2000 - 2019, Intel Corp. 7 7 * 8 8 *****************************************************************************/ 9 9
+1 -1
include/acpi/platform/acgcc.h
··· 3 3 * 4 4 * Name: acgcc.h - GCC specific defines, etc. 5 5 * 6 - * Copyright (C) 2000 - 2018, Intel Corp. 6 + * Copyright (C) 2000 - 2019, Intel Corp. 7 7 * 8 8 *****************************************************************************/ 9 9
+1 -1
include/acpi/platform/acgccex.h
··· 3 3 * 4 4 * Name: acgccex.h - Extra GCC specific defines, etc. 5 5 * 6 - * Copyright (C) 2000 - 2018, Intel Corp. 6 + * Copyright (C) 2000 - 2019, Intel Corp. 7 7 * 8 8 *****************************************************************************/ 9 9
+1 -1
include/acpi/platform/acintel.h
··· 3 3 * 4 4 * Name: acintel.h - VC specific defines, etc. 5 5 * 6 - * Copyright (C) 2000 - 2018, Intel Corp. 6 + * Copyright (C) 2000 - 2019, Intel Corp. 7 7 * 8 8 *****************************************************************************/ 9 9
+1 -1
include/acpi/platform/aclinux.h
··· 3 3 * 4 4 * Name: aclinux.h - OS specific defines, etc. for Linux 5 5 * 6 - * Copyright (C) 2000 - 2018, Intel Corp. 6 + * Copyright (C) 2000 - 2019, Intel Corp. 7 7 * 8 8 *****************************************************************************/ 9 9
+1 -1
include/acpi/platform/aclinuxex.h
··· 3 3 * 4 4 * Name: aclinuxex.h - Extra OS specific defines, etc. for Linux 5 5 * 6 - * Copyright (C) 2000 - 2018, Intel Corp. 6 + * Copyright (C) 2000 - 2019, Intel Corp. 7 7 * 8 8 *****************************************************************************/ 9 9
+9
include/linux/arm_sdei.h
··· 11 11 CONDUIT_HVC, 12 12 }; 13 13 14 + #include <acpi/ghes.h> 15 + 16 + #ifdef CONFIG_ARM_SDE_INTERFACE 14 17 #include <asm/sdei.h> 18 + #endif 15 19 16 20 /* Arch code should override this to set the entry point from firmware... */ 17 21 #ifndef sdei_arch_get_entry_point ··· 42 38 43 39 int sdei_event_enable(u32 event_num); 44 40 int sdei_event_disable(u32 event_num); 41 + 42 + /* GHES register/unregister helpers */ 43 + int sdei_register_ghes(struct ghes *ghes, sdei_event_callback *normal_cb, 44 + sdei_event_callback *critical_cb); 45 + int sdei_unregister_ghes(struct ghes *ghes); 45 46 46 47 #ifdef CONFIG_ARM_SDE_INTERFACE 47 48 /* For use by arch code when CPU hotplug notifiers are not appropriate. */
+3
include/linux/initrd.h
··· 25 25 extern unsigned long phys_initrd_size; 26 26 27 27 extern unsigned int real_root_dev; 28 + 29 + extern char __initramfs_start[]; 30 + extern unsigned long __initramfs_size;
+1 -1
tools/power/acpi/common/cmfsize.c
··· 3 3 * 4 4 * Module Name: cfsize - Common get file size function 5 5 * 6 - * Copyright (C) 2000 - 2018, Intel Corp. 6 + * Copyright (C) 2000 - 2019, Intel Corp. 7 7 * 8 8 *****************************************************************************/ 9 9
+1 -1
tools/power/acpi/common/getopt.c
··· 3 3 * 4 4 * Module Name: getopt 5 5 * 6 - * Copyright (C) 2000 - 2018, Intel Corp. 6 + * Copyright (C) 2000 - 2019, Intel Corp. 7 7 * 8 8 *****************************************************************************/ 9 9
+1 -1
tools/power/acpi/os_specific/service_layers/oslinuxtbl.c
··· 3 3 * 4 4 * Module Name: oslinuxtbl - Linux OSL for obtaining ACPI tables 5 5 * 6 - * Copyright (C) 2000 - 2018, Intel Corp. 6 + * Copyright (C) 2000 - 2019, Intel Corp. 7 7 * 8 8 *****************************************************************************/ 9 9
+1 -1
tools/power/acpi/os_specific/service_layers/osunixdir.c
··· 3 3 * 4 4 * Module Name: osunixdir - Unix directory access interfaces 5 5 * 6 - * Copyright (C) 2000 - 2018, Intel Corp. 6 + * Copyright (C) 2000 - 2019, Intel Corp. 7 7 * 8 8 *****************************************************************************/ 9 9
+1 -1
tools/power/acpi/os_specific/service_layers/osunixmap.c
··· 3 3 * 4 4 * Module Name: osunixmap - Unix OSL for file mappings 5 5 * 6 - * Copyright (C) 2000 - 2018, Intel Corp. 6 + * Copyright (C) 2000 - 2019, Intel Corp. 7 7 * 8 8 *****************************************************************************/ 9 9
+1 -1
tools/power/acpi/os_specific/service_layers/osunixxf.c
··· 3 3 * 4 4 * Module Name: osunixxf - UNIX OSL interfaces 5 5 * 6 - * Copyright (C) 2000 - 2018, Intel Corp. 6 + * Copyright (C) 2000 - 2019, Intel Corp. 7 7 * 8 8 *****************************************************************************/ 9 9
+1 -1
tools/power/acpi/tools/acpidump/acpidump.h
··· 3 3 * 4 4 * Module Name: acpidump.h - Include file for acpi_dump utility 5 5 * 6 - * Copyright (C) 2000 - 2018, Intel Corp. 6 + * Copyright (C) 2000 - 2019, Intel Corp. 7 7 * 8 8 *****************************************************************************/ 9 9
+1 -1
tools/power/acpi/tools/acpidump/apdump.c
··· 3 3 * 4 4 * Module Name: apdump - Dump routines for ACPI tables (acpidump) 5 5 * 6 - * Copyright (C) 2000 - 2018, Intel Corp. 6 + * Copyright (C) 2000 - 2019, Intel Corp. 7 7 * 8 8 *****************************************************************************/ 9 9
+1 -1
tools/power/acpi/tools/acpidump/apfiles.c
··· 3 3 * 4 4 * Module Name: apfiles - File-related functions for acpidump utility 5 5 * 6 - * Copyright (C) 2000 - 2018, Intel Corp. 6 + * Copyright (C) 2000 - 2019, Intel Corp. 7 7 * 8 8 *****************************************************************************/ 9 9
+1 -1
tools/power/acpi/tools/acpidump/apmain.c
··· 3 3 * 4 4 * Module Name: apmain - Main module for the acpidump utility 5 5 * 6 - * Copyright (C) 2000 - 2018, Intel Corp. 6 + * Copyright (C) 2000 - 2019, Intel Corp. 7 7 * 8 8 *****************************************************************************/ 9 9
+2 -2
virt/kvm/arm/mmu.c
··· 27 27 #include <asm/kvm_arm.h> 28 28 #include <asm/kvm_mmu.h> 29 29 #include <asm/kvm_mmio.h> 30 + #include <asm/kvm_ras.h> 30 31 #include <asm/kvm_asm.h> 31 32 #include <asm/kvm_emulate.h> 32 33 #include <asm/virt.h> 33 - #include <asm/system_misc.h> 34 34 35 35 #include "trace.h" 36 36 ··· 1906 1906 * For RAS the host kernel may handle this abort. 1907 1907 * There is no need to pass the error into the guest. 1908 1908 */ 1909 - if (!handle_guest_sea(fault_ipa, kvm_vcpu_get_hsr(vcpu))) 1909 + if (!kvm_handle_guest_sea(fault_ipa, kvm_vcpu_get_hsr(vcpu))) 1910 1910 return 1; 1911 1911 1912 1912 if (unlikely(!is_iabt)) {