From patchwork Wed Dec 15 14:01:59 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 12678393 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id BCCA7C433F5 for ; Wed, 15 Dec 2021 14:02:32 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.247407.426613 (Exim 4.92) (envelope-from ) id 1mxUrO-0002Iy-4J; Wed, 15 Dec 2021 14:02:22 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 247407.426613; Wed, 15 Dec 2021 14:02:22 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1mxUrN-0002Ir-Vz; Wed, 15 Dec 2021 14:02:21 +0000 Received: by outflank-mailman (input) for mailman id 247407; Wed, 15 Dec 2021 14:02:20 +0000 Received: from se1-gles-sth1-in.inumbo.com ([159.253.27.254] helo=se1-gles-sth1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1mxUrM-0002GE-FA for xen-devel@lists.xenproject.org; Wed, 15 Dec 2021 14:02:20 +0000 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id 9d0433e1-5daf-11ec-9e60-abaf8a552007; Wed, 15 Dec 2021 15:02:18 +0100 (CET) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id AB11CB81F21; Wed, 15 Dec 2021 14:02:16 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6D94EC34604; Wed, 15 Dec 2021 14:02:12 +0000 (UTC) X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: 9d0433e1-5daf-11ec-9e60-abaf8a552007 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1639576935; bh=cXYTLYTbqfDJRy2dCkqPSsmWK+rChKlIWB5CxhnAkoE=; h=From:To:Cc:Subject:Date:From; b=fuGPzjjPZux4pwsI/ALYQx5LaT/QTolTA/G5sONu5Ge6PHgTmT842mg1U6HQlhFGH PTQwis0a8Mfdi69qfIeKVK0hnaXAJ/nEEcqzCbyN1IXzwMlKJp9adKLt5i9iQLrTKO Sgd6HxvPLIjyUf/ko+aNJqH8Ejxy2Qcdb1EQKitxEjXoDE3g2yjpLn+lNC3XQIdts1 5d8IiYdvi95acthucvRyOZ/mJlj3cJ+6zvW7EYRpvPgxOD638pXPPZi9GtB/OEo/qi I1kARHx46CV3t+i+mk7RccENhXFhSwZy2i3v48m9EYiy3DMia7A7Yhme+CtWjc9jlB h0GUrJd6/8DDg== From: Arnd Bergmann To: Thomas Gleixner Cc: Arnd Bergmann , Boris Ostrovsky , Juergen Gross , Stefano Stabellini , Ingo Molnar , Borislav Petkov , Dave Hansen , x86@kernel.org, "H. Peter Anvin" , Bjorn Helgaas , Jason Gunthorpe , xen-devel@lists.xenproject.org, linux-kernel@vger.kernel.org Subject: [PATCH] x86: xen: Fix xen_initdom_restore_msi #ifdef Date: Wed, 15 Dec 2021 15:01:59 +0100 Message-Id: <20211215140209.451379-1-arnd@kernel.org> X-Mailer: git-send-email 2.29.2 MIME-Version: 1.0 From: Arnd Bergmann The #ifdef check around the definition doesn't match the one around the declaration, leading to a link failure when CONFIG_XEN_DOM0 is enabled but CONFIG_XEN_PV_DOM0 is not: x86_64-linux-ld: arch/x86/kernel/apic/msi.o: in function `arch_restore_msi_irqs': msi.c:(.text+0x29a): undefined reference to `xen_initdom_restore_msi' Change the declaration to use the same check that was already present around the function definition. Fixes: ae72f3156729 ("PCI/MSI: Make arch_restore_msi_irqs() less horrible.") Signed-off-by: Arnd Bergmann --- This should go on top the irq/msi branch of the tip tree, which introduced the build regression --- arch/x86/include/asm/xen/hypervisor.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/x86/include/asm/xen/hypervisor.h b/arch/x86/include/asm/xen/hypervisor.h index 677f84d0039f..1bf2ad34188a 100644 --- a/arch/x86/include/asm/xen/hypervisor.h +++ b/arch/x86/include/asm/xen/hypervisor.h @@ -59,7 +59,7 @@ static inline bool __init xen_x2apic_para_available(void) struct pci_dev; -#ifdef CONFIG_XEN_DOM0 +#ifdef CONFIG_XEN_PV_DOM0 bool xen_initdom_restore_msi(struct pci_dev *dev); #else static inline bool xen_initdom_restore_msi(struct pci_dev *dev) { return true; }