On 09/20/2018 12:49 PM, Geoff Levand wrote: > Attached are the two kernel config patches rebased to the latest v4.18.6-1 > Buster kernel.
Forgot to include the rebased m400 fixup patch. 0001-arm64-Use-default-of-CONFIG_ACPI_NFIT-m.patch 0002-arm64-Updates-for-ACPI-servers.patch 0003-arm64-Add-fixup-for-HPE-m400-APEI-firmware-problems.patch -Geoff
>From 63d1232a77b667090e2dd3fff0ac7868784850e9 Mon Sep 17 00:00:00 2001 From: Geoff Levand <ge...@infradead.org> Date: Thu, 20 Sep 2018 12:23:55 -0700 Subject: [PATCH 1/8] [arm64] Use default of CONFIG_ACPI_NFIT=m Commit ed497f3cb706d0e0f63844b064d9ebbf6f33b052 (Add server and 96boards options) added an arm64 specific CONFIG_ACPI_NFIT=y, overriding the default of =m, but the commit message mentions nothing about why this was done. Remove the arm64 specific setting and use the default of module build. Cc: Riku Voipio <riku.voi...@linaro.org> Signed-off-by: Geoff Levand <ge...@infradead.org> --- debian/config/arm64/config | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/debian/config/arm64/config b/debian/config/arm64/config index d14f3ff13174..0e0bf1b05db7 100644 --- a/debian/config/arm64/config +++ b/debian/config/arm64/config @@ -71,7 +71,7 @@ CONFIG_ACPI_NUMA=y ## ## file: drivers/acpi/nfit/Kconfig ## -CONFIG_ACPI_NFIT=y +CONFIG_ACPI_NFIT=m ## ## file: drivers/android/Kconfig -- 2.14.1
>From b1e30cf4155b5496234da7b1072f4c246cdfc9a1 Mon Sep 17 00:00:00 2001 From: Geoff Levand <ge...@infradead.org> Date: Thu, 20 Sep 2018 12:23:55 -0700 Subject: [PATCH 2/8] [arm64] Updates for ACPI servers o Enable CONFIG_SCHED_SMT for hyperthreading processors. o Enable CONFIG_ARM64_LSE_ATOMICS for v8.1 processors. o Enable a number of ACPI options likely to be available on servers. o CONFIG_ACPI_APEI selects PSTORE, so remove the arm64 specific setting. Signed-off-by: Geoff Levand <ge...@infradead.org> --- debian/config/arm64/config | 29 ++++++++++++++++++++++++----- 1 file changed, 24 insertions(+), 5 deletions(-) diff --git a/debian/config/arm64/config b/debian/config/arm64/config index 0e0bf1b05db7..1a6c6a41d6e4 100644 --- a/debian/config/arm64/config +++ b/debian/config/arm64/config @@ -9,6 +9,7 @@ CONFIG_ARM64_ERRATUM_834220=y CONFIG_ARM64_VA_BITS_48=y ## end choice CONFIG_SCHED_MC=y +CONFIG_SCHED_SMT=y CONFIG_NR_CPUS=256 CONFIG_NUMA=y CONFIG_SECCOMP=y @@ -24,6 +25,7 @@ CONFIG_RANDOMIZE_BASE=y CONFIG_RANDOMIZE_MODULE_REGION_FULL=y CONFIG_ARM64_ACPI_PARKING_PROTOCOL=y CONFIG_COMPAT=y +CONFIG_ARM64_LSE_ATOMICS=y ## ## file: arch/arm64/crypto/Kconfig @@ -67,6 +69,21 @@ CONFIG_ARCH_XGENE=y ## CONFIG_ACPI=y CONFIG_ACPI_NUMA=y +CONFIG_ACPI_PCI_SLOT=y +CONFIG_ACPI_HED=y +CONFIG_ACPI_BGRT=y +CONFIG_ACPI_WATCHDOG=y +CONFIG_ACPI_CONFIGFS=m + +## +## file: drivers/acpi/apei/Kconfig +## +CONFIG_ACPI_APEI=y +CONFIG_ACPI_APEI_GHES=y +CONFIG_ACPI_APEI_PCIEAER=y +CONFIG_ACPI_APEI_SEA=y +CONFIG_ACPI_APEI_MEMORY_FAILURE=y +CONFIG_ACPI_APEI_EINJ=m ## ## file: drivers/acpi/nfit/Kconfig @@ -222,6 +239,12 @@ CONFIG_EXTCON_USB_GPIO=m ## CONFIG_RASPBERRYPI_FIRMWARE=y +## +## file: drivers/firmware/efi/Kconfig +## +CONFIG_UEFI_CPER=y +CONFIG_UEFI_CPER_ARM=y + ## ## file: drivers/gpio/Kconfig ## @@ -1097,6 +1120,7 @@ CONFIG_VIRTIO_MMIO=m ## file: drivers/watchdog/Kconfig ## CONFIG_GPIO_WATCHDOG=m +CONFIG_WDAT_WDT=m CONFIG_ARM_SP805_WATCHDOG=m CONFIG_ARM_SBSA_WATCHDOG=m CONFIG_DW_WATCHDOG=m @@ -1107,11 +1131,6 @@ CONFIG_MESON_GXBB_WATCHDOG=m CONFIG_MESON_WATCHDOG=m CONFIG_BCM2835_WDT=m -## -## file: fs/pstore/Kconfig -## -CONFIG_PSTORE=y - ## ## file: mm/Kconfig ## -- 2.14.1
>From 0fc33a4cfa3bb1ad35f18d161c9b78298dd08770 Mon Sep 17 00:00:00 2001 From: Geoff Levand <ge...@infradead.org> Date: Thu, 20 Sep 2018 12:23:55 -0700 Subject: [PATCH 3/8] [arm64] Add fixup for HPE m400 APEI firmware problems Signed-off-by: Geoff Levand <ge...@infradead.org> --- .../arm64-acpi-Add-fixup-for-HPE-m400-quirks.patch | 94 ++++++++++++++++++++++ debian/patches/series | 1 + 2 files changed, 95 insertions(+) create mode 100644 debian/patches/bugfix/arm64/arm64-acpi-Add-fixup-for-HPE-m400-quirks.patch diff --git a/debian/patches/bugfix/arm64/arm64-acpi-Add-fixup-for-HPE-m400-quirks.patch b/debian/patches/bugfix/arm64/arm64-acpi-Add-fixup-for-HPE-m400-quirks.patch new file mode 100644 index 000000000000..efd13e36faa0 --- /dev/null +++ b/debian/patches/bugfix/arm64/arm64-acpi-Add-fixup-for-HPE-m400-quirks.patch @@ -0,0 +1,94 @@ +From e0dc30ae9056c3c01423c75ea28c20fb135f72ad Mon Sep 17 00:00:00 2001 +From: Geoff Levand <ge...@infradead.org> +Date: Wed, 13 Jun 2018 10:56:08 -0700 +Subject: [PATCH] arm64/acpi: Add fixup for HPE m400 quirks + +Adds a new ACPI init routine acpi_fixup_m400_quirks that adds +a work-around for HPE ProLiant m400 APEI firmware problems. + +The work-around disables APEI when CONFIG_ACPI_APEI is set and +m400 firmware is detected. Without this fixup m400 systems +experience errors like these on startup: + + [Hardware Error]: Hardware error from APEI Generic Hardware Error Source: 2 + [Hardware Error]: event severity: fatal + [Hardware Error]: Error 0, type: fatal + [Hardware Error]: section_type: memory error + [Hardware Error]: error_status: 0x0000000000001300 + [Hardware Error]: error_type: 10, invalid address + Kernel panic - not syncing: Fatal hardware error! + +Signed-off-by: Geoff Levand <ge...@infradead.org> +--- + arch/arm64/kernel/acpi.c | 40 ++++++++++++++++++++++++++++++++++++---- + 1 file changed, 36 insertions(+), 4 deletions(-) + +diff --git a/arch/arm64/kernel/acpi.c b/arch/arm64/kernel/acpi.c +index 7b09487ff8fb..3c315c2c7476 100644 +--- a/arch/arm64/kernel/acpi.c ++++ b/arch/arm64/kernel/acpi.c +@@ -31,6 +31,8 @@ + #include <asm/cpu_ops.h> + #include <asm/smp_plat.h> + ++#include <acpi/apei.h> ++ + #ifdef CONFIG_ACPI_APEI + # include <linux/efi.h> + # include <asm/pgtable.h> +@@ -177,6 +179,33 @@ static int __init acpi_fadt_sanity_check(void) + return ret; + } + ++/* ++ * acpi_fixup_m400_quirks - Work-around for HPE ProLiant m400 APEI firmware ++ * problems. ++ */ ++static void __init acpi_fixup_m400_quirks(void) ++{ ++ acpi_status status; ++ struct acpi_table_header *header; ++#if !defined(CONFIG_ACPI_APEI) ++ int hest_disable = HEST_DISABLED; ++#endif ++ ++ if (!IS_ENABLED(CONFIG_ACPI_APEI) || hest_disable != HEST_ENABLED) ++ return; ++ ++ status = acpi_get_table(ACPI_SIG_HEST, 0, &header); ++ ++ if (ACPI_SUCCESS(status) && !strncmp(header->oem_id, "HPE ", 6) && ++ !strncmp(header->oem_table_id, "ProLiant", 8) && ++ MIDR_IMPLEMENTOR(read_cpuid_id()) == ARM_CPU_IMP_APM) { ++ hest_disable = HEST_DISABLED; ++ pr_info("Disabled APEI for m400.\n"); ++ } ++ ++ acpi_put_table(header); ++} ++ + /* + * acpi_boot_table_init() called from setup_arch(), always. + * 1. find RSDP and get its address, and then find XSDT +@@ -232,11 +261,14 @@ void __init acpi_boot_table_init(void) + if (acpi_disabled) { + if (earlycon_acpi_spcr_enable) + early_init_dt_scan_chosen_stdout(); +- } else { +- acpi_parse_spcr(earlycon_acpi_spcr_enable, true); +- if (IS_ENABLED(CONFIG_ACPI_BGRT)) +- acpi_table_parse(ACPI_SIG_BGRT, acpi_parse_bgrt); ++ return; + } ++ ++ acpi_parse_spcr(earlycon_acpi_spcr_enable, true); ++ if (IS_ENABLED(CONFIG_ACPI_BGRT)) ++ acpi_table_parse(ACPI_SIG_BGRT, acpi_parse_bgrt); ++ ++ acpi_fixup_m400_quirks(); + } + + #ifdef CONFIG_ACPI_APEI +-- +2.14.1 + diff --git a/debian/patches/series b/debian/patches/series index 9520c5ce540d..4b3d5f2069a0 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -75,6 +75,7 @@ bugfix/x86/mmap-add-an-exception-to-the-stack-gap-for-hotspot-jvm.patch bugfix/powerpc/powerpc-lib-sstep-fix-building-for-powerpcspe.patch bugfix/powerpc/powerpc-lib-makefile-don-t-pull-in-quad.o-for-32-bit.patch bugfix/arm/arm-mm-export-__sync_icache_dcache-for-xen-privcmd.patch +bugfix/arm64/arm64-acpi-Add-fixup-for-HPE-m400-quirks.patch # Arch features features/mips/MIPS-increase-MAX-PHYSMEM-BITS-on-Loongson-3-only.patch -- 2.14.1