android_kernel_motorola_sm6225/arch/x86
Ingo Molnar 8708714728 x86/platform/uv: Fix !KEXEC build failure
[ Upstream commit c2209ea55612efac75de0a58ef5f7394fae7fa0f ]

When KEXEC is disabled, the UV build fails:

  arch/x86/platform/uv/uv_nmi.c:875:14: error: ‘uv_nmi_kexec_failed’ undeclared (first use in this function)

Since uv_nmi_kexec_failed is only defined in the KEXEC_CORE #ifdef branch,
this code cannot ever have been build tested:

	if (main)
		pr_err("UV: NMI kdump: KEXEC not supported in this kernel\n");
	atomic_set(&uv_nmi_kexec_failed, 1);

Nor is this use possible in uv_handle_nmi():

                atomic_set(&uv_nmi_kexec_failed, 0);

These bugs were introduced in this commit:

    d0a9964e98: ("x86/platform/uv: Implement simple dump failover if kdump fails")

Which added the uv_nmi_kexec_failed assignments to !KEXEC code, while making the
definition KEXEC-only - apparently without testing the !KEXEC case.

Instead of complicating the #ifdef maze, simplify the code by requiring X86_UV
to depend on KEXEC_CORE. This pattern is present in other architectures as well.

( We'll remove the untested, 7 years old !KEXEC complications from the file in a
  separate commit. )

Fixes: d0a9964e98: ("x86/platform/uv: Implement simple dump failover if kdump fails")
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Cc: Mike Travis <travis@sgi.com>
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Sasha Levin <sashal@kernel.org>
2021-05-22 10:59:32 +02:00
..
boot x86/boot: kbuild: allow readelf executable to be specified 2020-09-26 18:01:32 +02:00
configs x86/defconfig: Enable CONFIG_USB_XHCI_HCD=y 2020-09-23 12:11:02 +02:00
crypto crypto: x86/crc32c - fix building with clang ias 2021-01-23 15:49:55 +01:00
entry x86/cpu: Initialize MSR_TSC_AUX if RDTSCP *or* RDPID is supported 2021-05-22 10:59:26 +02:00
events perf/x86/intel/uncore: Remove uncore extra PCI dev HSWEP_PCI_PCU_3 2021-04-28 13:16:52 +02:00
hyperv x86/hyperv: check cpu mask after interrupt has been disabled 2021-01-19 18:22:35 +01:00
ia32 x86/ia32: Fix ia32_restore_sigcontext() AC leak 2019-05-31 06:46:27 -07:00
include x86: Introduce TS_COMPAT_RESTART to fix get_nr_restart_syscall() 2021-03-24 11:07:38 +01:00
kernel x86/microcode: Check for offline CPUs before requesting new microcode 2021-05-22 10:59:28 +02:00
kvm KVM: SEV: fix double locking due to incorrect backport 2021-02-23 15:00:59 +01:00
lib x86/lib: Change .weak to SYM_FUNC_START_WEAK for arch/x86/lib/mem*_64.S 2020-12-30 11:25:37 +01:00
math-emu x86: math-emu: Fix up 'cmp' insn for clang ias 2020-07-29 10:16:54 +02:00
mm x86/mem_encrypt: Correct physical address calculation in __set_clr_pte_enc() 2021-03-30 14:37:03 +02:00
net bpf, x86: Validate computation of branch displacements for x86-32 2021-04-10 13:21:19 +02:00
oprofile x86/oprofile: Fix bogus GCC-8 warning in nmi_setup() 2018-02-21 09:54:17 +01:00
pci x86/PCI: Fix intel_mid_pci.c build error when ACPI is not enabled 2020-11-05 11:08:32 +01:00
platform efi/x86: Free efi_pgd with free_pages() 2020-11-24 13:27:23 +01:00
power PM / hibernate: Check the success of generating md5 digest before hibernation 2019-11-24 08:19:56 +01:00
purgatory x86/purgatory: Disable various profiling and sanitizing options 2020-06-25 15:32:52 +02:00
ras
realmode x86/realmode: Don't leak the trampoline kernel address 2019-05-04 09:20:21 +02:00
tools x86/build: Treat R_386_PLT32 relocation as R_386_PC32 2021-03-07 12:18:58 +01:00
um um: Drop own definition of PTRACE_SYSEMU/_SINGLESTEP 2018-11-21 09:19:16 +01:00
video
xen Xen/gnttab: handle p2m update errors on a per-slot basis 2021-03-07 12:19:01 +01:00
.gitignore x86/build: Add arch/x86/tools/insn_decoder_test to .gitignore 2018-02-13 14:10:29 +01:00
Kbuild
Kconfig x86/platform/uv: Fix !KEXEC build failure 2021-05-22 10:59:32 +02:00
Kconfig.cpu Merge branch 'x86-pti-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2018-03-25 07:36:02 -10:00
Kconfig.debug x86, perf: Fix the dependency of the x86 insn decoder selftest 2020-01-27 14:51:08 +01:00
Makefile x86/build: Propagate $(CLANG_FLAGS) to $(REALMODE_FLAGS) 2021-05-22 10:59:15 +02:00
Makefile.um kbuild: rename LDFLAGS to KBUILD_LDFLAGS 2018-08-24 08:22:08 +09:00
Makefile_32.cpu