Message ID | 1458213903-9299-1-git-send-email-fu.wei@linaro.org (mailing list archive) |
---|---|
State | Not Applicable, archived |
Headers | show |
Hi Tomasz,
[auto build test ERROR on arm64/for-next/core]
[also build test ERROR on v4.5 next-20160318]
[if your patch is applied to the wrong git tree, please drop us a note to help improving the system]
url: https://github.com/0day-ci/linux/commits/fu-wei-linaro-org/acpi-apei-arm64-APEI-initial-support-for-aarch64/20160317-192657
base: https://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux for-next/core
config: arm64-allmodconfig (attached as .config)
reproduce:
wget https://git.kernel.org/cgit/linux/kernel/git/wfg/lkp-tests.git/plain/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# save the attached .config to linux build tree
make.cross ARCH=arm64
All errors (new ones prefixed by >>):
arch/arm64/kernel/built-in.o: In function `c_show':
:(.text+0x1c054): relocation truncated to fit: R_AARCH64_LDST64_ABS_LO12_NC against symbol `loops_per_jiffy' defined in .data section in init/built-in.o
arch/arm64/kernel/built-in.o: In function `arch_apei_get_mem_attribute':
>> :(.text+0x39148): undefined reference to `efi_mem_attributes'
drivers/built-in.o: In function `kgdb_nmi_console_setup':
:(.text+0x36374c): relocation truncated to fit: R_AARCH64_LDST64_ABS_LO12_NC against symbol `arch_kgdb_ops' defined in .data section in arch/arm64/kernel/built-in.o
drivers/built-in.o: In function `kgdb_register_nmi_console':
:(.text+0x364680): relocation truncated to fit: R_AARCH64_LDST64_ABS_LO12_NC against symbol `arch_kgdb_ops' defined in .data section in arch/arm64/kernel/built-in.o
drivers/built-in.o: In function `kgdb_unregister_nmi_console':
:(.text+0x364960): relocation truncated to fit: R_AARCH64_LDST64_ABS_LO12_NC against symbol `arch_kgdb_ops' defined in .data section in arch/arm64/kernel/built-in.o
drivers/built-in.o: In function `kgdbts_run_tests':
:(.text+0x4786bc): relocation truncated to fit: R_AARCH64_LDST64_ABS_LO12_NC against symbol `arch_kgdb_ops' defined in .data section in arch/arm64/kernel/built-in.o
drivers/built-in.o: In function `led_trigger_register':
:(.text+0x51efc8): relocation truncated to fit: R_AARCH64_LDST64_ABS_LO12_NC against symbol `leds_list' defined in .data section in drivers/built-in.o
drivers/built-in.o: In function `led_trigger_unregister':
:(.text+0x51f3e0): relocation truncated to fit: R_AARCH64_LDST64_ABS_LO12_NC against symbol `leds_list' defined in .data section in drivers/built-in.o
drivers/built-in.o: In function `vt8500_timer_read':
:(.text+0x534c1c): relocation truncated to fit: R_AARCH64_LDST64_ABS_LO12_NC against symbol `loops_per_jiffy' defined in .data section in init/built-in.o
drivers/built-in.o: In function `vt8500_timer_set_next_event':
:(.text+0x534efc): relocation truncated to fit: R_AARCH64_LDST64_ABS_LO12_NC against symbol `loops_per_jiffy' defined in .data section in init/built-in.o
drivers/built-in.o: In function `tegra124_132_clock_init_post':
:(.init.text+0x5b38c): relocation truncated to fit: R_AARCH64_LDST64_ABS_LO12_NC against symbol `tegra_cpu_car_ops' defined in .data section in drivers/built-in.o
drivers/built-in.o: In function `tegra210_clock_init':
:(.init.text+0x5cdec): additional relocation overflows omitted from the output
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig index b3f2522..0260b4c 100644 --- a/arch/arm64/Kconfig +++ b/arch/arm64/Kconfig @@ -3,6 +3,7 @@ config ARM64 select ACPI_CCA_REQUIRED if ACPI select ACPI_GENERIC_GSI if ACPI select ACPI_REDUCED_HARDWARE_ONLY if ACPI + select HAVE_ACPI_APEI if ACPI select ARCH_HAS_DEVMEM_IS_ALLOWED select ARCH_HAS_ATOMIC64_DEC_IF_POSITIVE select ARCH_HAS_ELF_RANDOMIZE diff --git a/arch/arm64/include/asm/acpi.h b/arch/arm64/include/asm/acpi.h index caafd63..077a87d 100644 --- a/arch/arm64/include/asm/acpi.h +++ b/arch/arm64/include/asm/acpi.h @@ -17,6 +17,7 @@ #include <asm/cputype.h> #include <asm/smp_plat.h> +#include <asm/tlbflush.h> /* Macros for consistency checks of the GICC subtable of MADT */ #define ACPI_MADT_GICC_LENGTH \ @@ -93,7 +94,19 @@ static inline const char *acpi_get_enable_method(int cpu) } #ifdef CONFIG_ACPI_APEI +#define acpi_disable_cmcff 1 pgprot_t arch_apei_get_mem_attribute(phys_addr_t addr); -#endif +/* + * This inline function is used in IRQ context (by GHES driver now), + * see ghes_iounmap_irq and ghes_iounmap_nmi in drivers/acpi/apei/ghes.c. + * The page mapped is reserved for firmware in kernel. This invalidate TLB + * maintenance should be broadcasted safely to make sure that all the cores + * will do TLB invalidation, then get the right pages. + */ +static inline void arch_apei_flush_tlb_one(unsigned long addr) +{ + flush_tlb_kernel_range(addr, addr + PAGE_SIZE); +} +#endif /* CONFIG_ACPI_APEI */ #endif /*_ASM_ACPI_H*/ diff --git a/arch/x86/kernel/acpi/apei.c b/arch/x86/kernel/acpi/apei.c index c280df6..ea3046e 100644 --- a/arch/x86/kernel/acpi/apei.c +++ b/arch/x86/kernel/acpi/apei.c @@ -24,9 +24,6 @@ int arch_apei_enable_cmcff(struct acpi_hest_header *hest_hdr, void *data) struct acpi_hest_ia_corrected *cmc; struct acpi_hest_ia_error_bank *mc_bank; - if (hest_hdr->type != ACPI_HEST_TYPE_IA32_CORRECTED_CHECK) - return 0; - cmc = (struct acpi_hest_ia_corrected *)hest_hdr; if (!cmc->enabled) return 0; diff --git a/drivers/acpi/apei/hest.c b/drivers/acpi/apei/hest.c index 20b3fcf..792a0d9 100644 --- a/drivers/acpi/apei/hest.c +++ b/drivers/acpi/apei/hest.c @@ -123,7 +123,18 @@ EXPORT_SYMBOL_GPL(apei_hest_parse); */ static int __init hest_parse_cmc(struct acpi_hest_header *hest_hdr, void *data) { - return arch_apei_enable_cmcff(hest_hdr, data); + if (hest_hdr->type != ACPI_HEST_TYPE_IA32_CORRECTED_CHECK) + return 0; + + if (!acpi_disable_cmcff) + return !arch_apei_enable_cmcff(hest_hdr, data); + + return 0; +} + +static inline int __init hest_ia32_init(void) +{ + return apei_hest_parse(hest_parse_cmc, NULL); } struct ghes_arr { @@ -232,8 +243,9 @@ void __init acpi_hest_init(void) goto err; } - if (!acpi_disable_cmcff) - apei_hest_parse(hest_parse_cmc, NULL); + rc = hest_ia32_init(); + if (rc) + goto err; if (!ghes_disable) { rc = apei_hest_parse(hest_parse_ghes_count, &ghes_count);