Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp436343pxj; Thu, 20 May 2021 12:52:28 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwnQMwK8ANgLIddrXC4g0JdPH1JLHq/Q4lbGLT4XoaKKLYrQrnAH8MyXIz7Vw6uTDMDUi59 X-Received: by 2002:a17:906:a393:: with SMTP id k19mr6351660ejz.462.1621540347630; Thu, 20 May 2021 12:52:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621540347; cv=none; d=google.com; s=arc-20160816; b=XIrONHYBEvx0sxGBQd1KItAF4gXJhV1SbOmXSdeRVaC9W9xKRUKvdEba0Ldwxa8CRQ I0TCpU0I3s23tGCWgTtBwNb3YObi+hNAIavQT4nHeYuVasDFT4Y0wLdHtMHkDSegbK2n rQv0n+ZGgIISJqZ+i4yqWqSE1J18SN3JrBpjl3zZ1ulHFJ8Ap0Hs9t/A1T2/1fTP0G2j sE+xLe4/Q4vWJFG254IkN9hcUNn6j2rxiwimA5LPD1Yh+/2ljT3pt/LfExAgp8eY48K3 xvvBicMvxL19Ct29uDuOTYQ1TbyLXrAtAi24QiLRH+JIPdY1cMYSEO9IJ+HiksDIByED bJPg== 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=a7l4UMUqUldMfvRPhh7N26T+RUqaYhnHl04SamNVa+0=; b=tClJTYEQFPDj7+XeXvn9QwXEWHGsAWgm3YUU6sVfVIMrEUcApTY6hjJ6efgKHLiQMp OdCrtSjMOmRvH4gyM6oxIZVxEIBoiEkS/iAdPdIsE+PdLyHyAaDKCUXkp01i6luO9v30 UE/6KaEgJm+qqu/5KmNNTND25NqWNnt7Tl/WLIb128yz64mkNJGz4cOvkmrLJ1MOXZzR fFf+iw0u22bfOlFS/FKknH6cKPdhakKZE9zomf14voPkmX0qPqdvuRugfP3haEpT0R4O MZXVJUnbnK0VZivpjWZCTBSWAZfT78T0v0KJrghyTzDw789APr6tDDPL3690tTYYHMYY bh7A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=LqPVigPn; 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 de28si407472edb.542.2021.05.20.12.52.03; Thu, 20 May 2021 12:52:27 -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=LqPVigPn; 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 S237196AbhETKpX (ORCPT + 99 others); Thu, 20 May 2021 06:45:23 -0400 Received: from mail.kernel.org ([198.145.29.99]:60392 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237049AbhETK3a (ORCPT ); Thu, 20 May 2021 06:29:30 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 3BFF1613BD; Thu, 20 May 2021 09:51:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1621504283; bh=z0SVMFHk3yE4rZHzrmmq8YhfU3p2fqebAw8LnhBWxdY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=LqPVigPnpA04jofIk2MkvUbVyJLbQ71D1cWcQpxacGP6fnDOf3np2rLSGhG9WrKSk 3OysIRmgDvwWNVbcZXbplYMsltAnAgI0LbDXP2jYSY2seZ4i90TVMQAlStQa68recK J8RVnPjVZHT5vzF0K8RUmoNuBnBAZkTA3e6nGwRc= 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 4.14 176/323] x86/platform/uv: Fix !KEXEC build failure Date: Thu, 20 May 2021 11:21:08 +0200 Message-Id: <20210520092126.147765620@linuxfoundation.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210520092120.115153432@linuxfoundation.org> References: <20210520092120.115153432@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 c55870ac907e..64edc125c122 100644 --- a/arch/x86/Kconfig +++ b/arch/x86/Kconfig @@ -526,6 +526,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