Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp4601800pxj; Wed, 12 May 2021 09:02:41 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxrAPUMw0osAA+p2SsyycKiU/DVxcRKAYDJYVJoJZ/w0eUK0Bj9WZgBFCXj2+6d20rHyNvM X-Received: by 2002:aa7:dd19:: with SMTP id i25mr44627000edv.247.1620835361382; Wed, 12 May 2021 09:02:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1620835361; cv=none; d=google.com; s=arc-20160816; b=j24btQjrbYZ7OsX5QfSZwsGVvbg6wzhCDiY8VKAjvHX+ELUceyEB78RtIZaxzvFnIq XPpbqbFUJCzFvh+WSgXOraow+cUo+krWrtzYIrIwCkVUaxBVxUfeOTzJLSuwFEMZE+TX fRsddWNTvakGx3M7tHxXAfVUh52UnfwG12s4ey5fhzxZgKllaiN1O0+XFLu7vzu3Ys8w KUz84+rq7kO1xZ+t85EcPH1C9qIHFB8mgUT3vLVuuB9y3bvoNzrpclWElasUBm8Hj8dj I3Dj4TzZ4Elt7ieB3ZczOXoku9zRdgWFDHC8RILQ4TwAUrvEjygobKZuJnysInhhX6gI Yzfg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=fWGaWmK55BCIbcH61OWbsiAK8xziAL3mDbJSGNgBfX8=; b=BX65hA5SmArbaAWEoX4u2q8CSb05Yz8xoShcgaM0GNDwExJMjhaP6a4WwJgWH13jQV KCErcsBLfyG8Q9uss6FZ1ux9sU2NUr/lUA08rUlmNqlh2hfYndfyxfBpwKsXnrB0+yxd 71+McXRwgAL8JnLJA6uClP2jnlOVlKd2ZZ3D9/c/zjEMqEl+srmgAnqyT5F/Ra/ea88C 1npDWkyZOTAAGB545SDpc6nXhP0N/GQEjMjn4eQuFkC2bbYSmvHhz6eNIaPxqkUubX7Q j2xDxW4OzQihcbctHrbKdwVCYBQ2qwynPLuo+N3F74/lI6u4GOcNKE3uGrx5ucAWDKFI /zYw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=CEuEzXAN; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id hx9si327153ejc.627.2021.05.12.09.02.16; Wed, 12 May 2021 09:02:41 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=CEuEzXAN; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236684AbhELQCO (ORCPT + 99 others); Wed, 12 May 2021 12:02:14 -0400 Received: from mail.kernel.org ([198.145.29.99]:40990 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235508AbhELP2Q (ORCPT ); Wed, 12 May 2021 11:28:16 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 8C1E961C1C; Wed, 12 May 2021 15:13:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1620832403; bh=2G9HOUVLW69YhyaAF4q/mXKEr63MDrABeSTAHkaHJPI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=CEuEzXANWis/E1qz66NSGsEiWrBPFvV1cTRo9sRO27KZOjATP2XNegHLw56Kbs+Tk 9xOJhuM1lmeeFEbmiFcc8O2WXwK84Zm2XZtPDEvvUY0Cp04zC0s5GAkTbQtPKy+S9s S3YfWYdV3P++nSdSocIfQw05G/5/L2329XJjgPnY= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Ingo Molnar , Mike Travis , Sasha Levin Subject: [PATCH 5.10 266/530] x86/platform/uv: Fix !KEXEC build failure Date: Wed, 12 May 2021 16:46:16 +0200 Message-Id: <20210512144828.562642553@linuxfoundation.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210512144819.664462530@linuxfoundation.org> References: <20210512144819.664462530@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Ingo Molnar [ 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: d0a9964e9873: ("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: d0a9964e9873: ("x86/platform/uv: Implement simple dump failover if kdump fails") Signed-off-by: Ingo Molnar Cc: Mike Travis Cc: linux-kernel@vger.kernel.org Signed-off-by: Sasha Levin --- arch/x86/Kconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig index 183ee73d9019..f3c8a8110f60 100644 --- a/arch/x86/Kconfig +++ b/arch/x86/Kconfig @@ -562,6 +562,7 @@ config X86_UV depends on X86_EXTENDED_PLATFORM depends on NUMA depends on EFI + depends on KEXEC_CORE depends on X86_X2APIC depends on PCI help -- 2.30.2