From patchwork Thu Nov 1 09:36:51 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Gleixner X-Patchwork-Id: 10663711 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 716CF157A for ; Thu, 1 Nov 2018 09:37:12 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 60B992B6B0 for ; Thu, 1 Nov 2018 09:37:12 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 543EC2B84E; Thu, 1 Nov 2018 09:37:12 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=unavailable version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 07BDC2B6B0 for ; Thu, 1 Nov 2018 09:37:12 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727806AbeKASjS (ORCPT ); Thu, 1 Nov 2018 14:39:18 -0400 Received: from Galois.linutronix.de ([146.0.238.70]:57148 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725800AbeKASjS (ORCPT ); Thu, 1 Nov 2018 14:39:18 -0400 Received: from p5492fe24.dip0.t-ipconnect.de ([84.146.254.36] helo=nanos) by Galois.linutronix.de with esmtpsa (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1gI9PH-0001aj-OX; Thu, 01 Nov 2018 10:36:51 +0100 Date: Thu, 1 Nov 2018 10:36:51 +0100 (CET) From: Thomas Gleixner To: Randy Dunlap cc: Andrew Morton , broonie@kernel.org, mhocko@suse.cz, Stephen Rothwell , linux-next@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-mm@kvack.org, LKML , mm-commits@vger.kernel.org, Ravikiran Thirumalai , Shai Fultheim , X86 ML Subject: [PATCH] x86/build: Build VSMP support only if selected In-Reply-To: <9e14d183-55a4-8299-7a18-0404e50bf004@infradead.org> Message-ID: References: <20181030230905.xHZmM%akpm@linux-foundation.org> <9e14d183-55a4-8299-7a18-0404e50bf004@infradead.org> User-Agent: Alpine 2.21 (DEB 202 2017-01-01) MIME-Version: 1.0 X-Linutronix-Spam-Score: -1.0 X-Linutronix-Spam-Level: - X-Linutronix-Spam-Status: No , -1.0 points, 5.0 required, ALL_TRUSTED=-1,SHORTCIRCUIT=-0.0001 Sender: linux-fsdevel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP VSMP support is built even if CONFIG_X86_VSMP is not set. This leads to a build breakage when CONFIG_PCI is disabled as well. Build VSMP code only when selected. Reported-by: Randy Dunlap Signed-off-by: Thomas Gleixner Signed-off-by: Eial Czerwacki Acked-by: Shai Fultheim Acked-by: Thomas Gleixner diff --git a/arch/x86/include/asm/setup.h b/arch/x86/include/asm/setup.h index ae13bc974416..b6b911c4c7f3 100644 --- a/arch/x86/include/asm/setup.h +++ b/arch/x86/include/asm/setup.h @@ -33,7 +33,7 @@ extern u64 relocated_ramdisk; /* Interrupt control for vSMPowered x86_64 systems */ -#ifdef CONFIG_X86_64 +#if defined(CONFIG_X86_64) && defined(CONFIG_X86_VSMP) void vsmp_init(void); #else static inline void vsmp_init(void) { } diff --git a/arch/x86/kernel/Makefile b/arch/x86/kernel/Makefile index 8824d01c0c35..647ce52b17d5 100644 --- a/arch/x86/kernel/Makefile +++ b/arch/x86/kernel/Makefile @@ -148,5 +148,5 @@ ifeq ($(CONFIG_X86_64),y) obj-$(CONFIG_CALGARY_IOMMU) += pci-calgary_64.o tce_64.o obj-$(CONFIG_MMCONF_FAM10H) += mmconf-fam10h_64.o - obj-y += vsmp_64.o + obj-$(CONFIG_X86_VSMP) += vsmp_64.o endif