Received: by 10.223.185.116 with SMTP id b49csp1031217wrg; Fri, 23 Feb 2018 10:39:17 -0800 (PST) X-Google-Smtp-Source: AH8x225FHOHxQKmncCZlfYVOKIRLy+s1MJFEQdBiNgDLTWBzoaydFP5jUi5feKUk/Jda0LHKTDxJ X-Received: by 10.99.122.70 with SMTP id j6mr2136847pgn.17.1519411157391; Fri, 23 Feb 2018 10:39:17 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519411157; cv=none; d=google.com; s=arc-20160816; b=qfcImg6oYkmsug1kpKXt14+aHb3EKliybkGpehnIeE3hR7yPUEoZpYnvP5NhtsoRX8 OHaNgTUjdyIf4KdmOnu9zoC7+KieL3ynH5A7pcxoDt3gvxqq3NRvPnpkk09nHFcXiSPe xcCFTSaGTDUPCDEm3HvHLs+O8c9ps7bmQXg/U1vekzTqBsb8RydzI2+kIJCgS12/nBKm irWxz/8mowRd8yL9or7P7Ji3BxeWtlmWyfv1k+USN/8lfZ3ffqm+PBsCrbndWgYHbhL1 HE/ZOThBEEGQlr21KlQN/hZc9RcJezePRusSq8Bn3m8f+tB53/Ik1M7/r3FQaSrPUFSe LcWg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=FDcO9begceRxMQBetTELvJuBkX3p4lAvH9UQ45TzxlE=; b=gN/UbIRT26K7475CJq01XsD6YiFlZNaAVofusNZyu/3meLfeyZqxvMjh+9Q+kVmln/ N8zU1zCuSvwi/mUHbE6Q/nhww0EGgPlrtJq05vF9/mtTJERwMquoy40odU1ZpJvMDlY/ qNl3//iAg3/VfMsTtwzybE5N5EUdXr5p3Wn70ZfHTlZQ4UcNWyd3WwvdSD5lw+KaJzSf tbP633f0Kojma6C3NS+gKvh6y6XmUZnJndAA87YA9bM/fXPzVMYbtSTn+nH0Ul851Fmz ptCKeZe1u5OTrCMtzj6ZuRpWKbXbgr+Zk9yRN6g/mHIfp0QOWkggMBwN6bgrx9g76R0+ e+Sg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h8si2186639pfi.117.2018.02.23.10.39.03; Fri, 23 Feb 2018 10:39:17 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932351AbeBWSiY (ORCPT + 99 others); Fri, 23 Feb 2018 13:38:24 -0500 Received: from mail.linuxfoundation.org ([140.211.169.12]:38990 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932314AbeBWSiV (ORCPT ); Fri, 23 Feb 2018 13:38:21 -0500 Received: from localhost (LFbn-1-12258-90.w90-92.abo.wanadoo.fr [90.92.71.90]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id 259C41077; Fri, 23 Feb 2018 18:38:20 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Arnd Bergmann , Marc Zyngier , Alex Williamson , Bjorn Helgaas , Bart Van Assche , Thomas Gleixner Subject: [PATCH 4.4 123/193] genirq/msi: Add stubs for get_cached_msi_msg/pci_write_msi_msg Date: Fri, 23 Feb 2018 19:25:56 +0100 Message-Id: <20180223170345.141549331@linuxfoundation.org> X-Mailer: git-send-email 2.16.2 In-Reply-To: <20180223170325.997716448@linuxfoundation.org> References: <20180223170325.997716448@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.4-stable review patch. If anyone has any objections, please let me know. ------------------ From: Arnd Bergmann commit 2f44e29cef006a4b0a4ecf7d4c5aac7d0fbb505c upstream. A bug fix to the MSIx handling in vfio added references to functions that may not be defined if MSI is disabled in the kernel, resulting in this link error: drivers/built-in.o: In function `vfio_msi_set_vector_signal': :(.text+0x450808): undefined reference to `get_cached_msi_msg' :(.text+0x45080c): undefined reference to `write_msi_msg' As suggested by Alex Williamson, add stub implementations for get_cached_msi_msg() and pci_write_msi_msg(). In case this bugfix gets backported, please note that the #ifdef has changed over time, originally both functions were implemented in drivers/pci/msi.c and controlled by CONFIG_PCI_MSI, while nowadays get_cached_msi_msg() is part of the generic MSI support and can be used without PCI. Fixes: b8f02af096b1 ("vfio/pci: Restore MSIx message prior to enabling") Signed-off-by: Arnd Bergmann Cc: Marc Zyngier Cc: Alex Williamson Cc: Bjorn Helgaas Cc: Bart Van Assche Link: http://lkml.kernel.org/r/1413190208.4202.34.camel@ul30vt.home Link: http://lkml.kernel.org/r/20170214215343.3307861-1-arnd@arndb.de Signed-off-by: Thomas Gleixner Signed-off-by: Greg Kroah-Hartman --- include/linux/msi.h | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) --- a/include/linux/msi.h +++ b/include/linux/msi.h @@ -17,7 +17,13 @@ struct msi_desc; struct pci_dev; struct platform_msi_priv_data; void __get_cached_msi_msg(struct msi_desc *entry, struct msi_msg *msg); +#ifdef CONFIG_GENERIC_MSI_IRQ void get_cached_msi_msg(unsigned int irq, struct msi_msg *msg); +#else +static inline void get_cached_msi_msg(unsigned int irq, struct msi_msg *msg) +{ +} +#endif typedef void (*irq_write_msi_msg_t)(struct msi_desc *desc, struct msi_msg *msg); @@ -105,18 +111,21 @@ struct msi_desc { struct pci_dev *msi_desc_to_pci_dev(struct msi_desc *desc); void *msi_desc_to_pci_sysdata(struct msi_desc *desc); +void pci_write_msi_msg(unsigned int irq, struct msi_msg *msg); #else /* CONFIG_PCI_MSI */ static inline void *msi_desc_to_pci_sysdata(struct msi_desc *desc) { return NULL; } +static inline void pci_write_msi_msg(unsigned int irq, struct msi_msg *msg) +{ +} #endif /* CONFIG_PCI_MSI */ struct msi_desc *alloc_msi_entry(struct device *dev); void free_msi_entry(struct msi_desc *entry); void __pci_read_msi_msg(struct msi_desc *entry, struct msi_msg *msg); void __pci_write_msi_msg(struct msi_desc *entry, struct msi_msg *msg); -void pci_write_msi_msg(unsigned int irq, struct msi_msg *msg); u32 __pci_msix_desc_mask_irq(struct msi_desc *desc, u32 flag); u32 __pci_msi_desc_mask_irq(struct msi_desc *desc, u32 mask, u32 flag);