Skip to content

Commit d276709

Browse files
committed
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 ..
2 parents ef80068 + 8167e00 commit d276709

File tree

227 files changed

+1437
-1321
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

227 files changed

+1437
-1321
lines changed

Documentation/acpi/initrd_table_override.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,10 @@ upgrade the ACPI execution environment that is defined by the ACPI tables
1414
via upgrading the ACPI tables provided by the BIOS with an instrumented,
1515
modified, more recent version one, or installing brand new ACPI tables.
1616

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+
1721
For a full list of ACPI tables that can be upgraded/installed, take a look
1822
at the char *table_sigs[MAX_ACPI_SIGNATURE]; definition in
1923
drivers/acpi/tables.c.

MAINTAINERS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -331,6 +331,7 @@ ACPI APEI
331331
M: "Rafael J. Wysocki" <[email protected]>
332332
M: Len Brown <[email protected]>
333333
334+
R: James Morse <[email protected]>
334335
R: Tony Luck <[email protected]>
335336
R: Borislav Petkov <[email protected]>
336337
F: drivers/acpi/apei/

arch/arm/include/asm/kvm_ras.h

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
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__ */

arch/arm/include/asm/system_misc.h

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -38,11 +38,6 @@ static inline void harden_branch_predictor(void)
3838

3939
extern unsigned int user_debug;
4040

41-
static inline int handle_guest_sea(phys_addr_t addr, unsigned int esr)
42-
{
43-
return -1;
44-
}
45-
4641
#endif /* !__ASSEMBLY__ */
4742

4843
#endif /* __ASM_ARM_SYSTEM_MISC_H */

arch/arm64/include/asm/acpi.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818

1919
#include <asm/cputype.h>
2020
#include <asm/io.h>
21+
#include <asm/ptrace.h>
2122
#include <asm/smp_plat.h>
2223
#include <asm/tlbflush.h>
2324

@@ -110,9 +111,10 @@ static inline u32 get_acpi_id_for_cpu(unsigned int cpu)
110111

111112
static inline void arch_fix_phys_package_id(int num, u32 slot) { }
112113
void __init acpi_init_cpus(void);
113-
114+
int apei_claim_sea(struct pt_regs *regs);
114115
#else
115116
static inline void acpi_init_cpus(void) { }
117+
static inline int apei_claim_sea(struct pt_regs *regs) { return -ENOENT; }
116118
#endif /* CONFIG_ACPI */
117119

118120
#ifdef CONFIG_ARM64_ACPI_PARKING_PROTOCOL

arch/arm64/include/asm/daifflags.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020

2121
#define DAIF_PROCCTX 0
2222
#define DAIF_PROCCTX_NOIRQ PSR_I_BIT
23+
#define DAIF_ERRCTX (PSR_I_BIT | PSR_A_BIT)
2324

2425
/* mask/save/unmask/restore all exceptions, including interrupts. */
2526
static inline void local_daif_mask(void)

arch/arm64/include/asm/fixmap.h

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,11 @@ enum fixed_addresses {
5555
#ifdef CONFIG_ACPI_APEI_GHES
5656
/* Used for GHES mapping from assorted contexts */
5757
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
5963
#endif /* CONFIG_ACPI_APEI_GHES */
6064

6165
#ifdef CONFIG_UNMAP_KERNEL_AT_EL0

arch/arm64/include/asm/kvm_ras.h

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
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__ */

arch/arm64/include/asm/system_misc.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,6 @@ extern void __show_regs(struct pt_regs *);
4646

4747
extern void (*arm_pm_restart)(enum reboot_mode reboot_mode, const char *cmd);
4848

49-
int handle_guest_sea(phys_addr_t addr, unsigned int esr);
50-
5149
#endif /* __ASSEMBLY__ */
5250

5351
#endif /* __ASM_SYSTEM_MISC_H */

arch/arm64/kernel/acpi.c

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,10 @@
2727
#include <linux/smp.h>
2828
#include <linux/serial_core.h>
2929

30+
#include <acpi/ghes.h>
3031
#include <asm/cputype.h>
3132
#include <asm/cpu_ops.h>
33+
#include <asm/daifflags.h>
3234
#include <asm/pgtable.h>
3335
#include <asm/smp_plat.h>
3436

@@ -256,3 +258,32 @@ pgprot_t __acpi_get_mem_attribute(phys_addr_t addr)
256258
return __pgprot(PROT_NORMAL_NC);
257259
return __pgprot(PROT_DEVICE_nGnRnE);
258260
}
261+
262+
/*
263+
* Claim Synchronous External Aborts as a firmware first notification.
264+
*
265+
* Used by KVM and the arch do_sea handler.
266+
* @regs may be NULL when called from process context.
267+
*/
268+
int apei_claim_sea(struct pt_regs *regs)
269+
{
270+
int err = -ENOENT;
271+
unsigned long current_flags;
272+
273+
if (!IS_ENABLED(CONFIG_ACPI_APEI_GHES))
274+
return err;
275+
276+
current_flags = arch_local_save_flags();
277+
278+
/*
279+
* SEA can interrupt SError, mask it and describe this as an NMI so
280+
* that APEI defers the handling.
281+
*/
282+
local_daif_restore(DAIF_ERRCTX);
283+
nmi_enter();
284+
err = ghes_notify_sea();
285+
nmi_exit();
286+
local_daif_restore(current_flags);
287+
288+
return err;
289+
}

0 commit comments

Comments
 (0)