All of lore.kernel.org
 help / color / mirror / Atom feed
From: "tip-bot2 for Reinette Chatre" <tip-bot2@linutronix.de>
To: linux-tip-commits@vger.kernel.org
Cc: kernel test robot <lkp@intel.com>,
	Reinette Chatre <reinette.chatre@intel.com>,
	Thomas Gleixner <tglx@linutronix.de>,
	x86@kernel.org, linux-kernel@vger.kernel.org, maz@kernel.org
Subject: [tip: irq/urgent] PCI/MSI: Provide missing stubs for CONFIG_PCI_MSI=n
Date: Mon, 13 Feb 2023 11:24:57 -0000	[thread overview]
Message-ID: <167628749774.4906.17069524905880641563.tip-bot2@tip-bot2> (raw)
In-Reply-To: =?utf-8?q?=3C158e40e1cfcfc58ae30ecb2bbfaf86e5bba7a1ef=2E16759?= =?utf-8?q?78686=2Egit=2Ereinette=2Echatre=40intel=2Ecom=3E?=

The following commit has been merged into the irq/urgent branch of tip:

Commit-ID:     2b129f0b24ab578b02901b4a1744b7f97399faa0
Gitweb:        https://git.kernel.org/tip/2b129f0b24ab578b02901b4a1744b7f97399faa0
Author:        Reinette Chatre <reinette.chatre@intel.com>
AuthorDate:    Thu, 09 Feb 2023 13:49:00 -08:00
Committer:     Thomas Gleixner <tglx@linutronix.de>
CommitterDate: Mon, 13 Feb 2023 12:17:20 +01:00

PCI/MSI: Provide missing stubs for CONFIG_PCI_MSI=n

pci_msix_alloc_irq_at() and pci_msix_free_irq() are not declared when
CONFIG_PCI_MSI is disabled.

Users of these two calls do not yet exist but when users do appear (shown
below is an attempt to use the new API in vfio-pci) the following errors
will be encountered when compiling with CONFIG_PCI_MSI disabled:

drivers/vfio/pci/vfio_pci_intrs.c:461:4: error: implicit declaration of\
        function 'pci_msix_free_irq' is invalid in C99\
        [-Werror,-Wimplicit-function-declaration]
                           pci_msix_free_irq(pdev, msix_map);
                           ^
drivers/vfio/pci/vfio_pci_intrs.c:511:15: error: implicit declaration of\
        function 'pci_msix_alloc_irq_at' is invalid in C99\
        [-Werror,-Wimplicit-function-declaration]
                   msix_map = pci_msix_alloc_irq_at(pdev, vector, NULL);

Provide definitions for pci_msix_alloc_irq_at() and pci_msix_free_irq() in
preparation for users that need to compile when CONFIG_PCI_MSI is
disabled.

Reported-by: kernel test robot <lkp@intel.com>
Fixes: 34026364df8e ("PCI/MSI: Provide post-enable dynamic allocation interfaces for MSI-X")
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Link: https://lore.kernel.org/r/158e40e1cfcfc58ae30ecb2bbfaf86e5bba7a1ef.1675978686.git.reinette.chatre@intel.com
---
 include/linux/pci.h | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/include/linux/pci.h b/include/linux/pci.h
index adffd65..254c8a4 100644
--- a/include/linux/pci.h
+++ b/include/linux/pci.h
@@ -1621,6 +1621,18 @@ pci_alloc_irq_vectors(struct pci_dev *dev, unsigned int min_vecs,
 					      flags, NULL);
 }
 
+static inline struct msi_map pci_msix_alloc_irq_at(struct pci_dev *dev, unsigned int index,
+						   const struct irq_affinity_desc *affdesc)
+{
+	struct msi_map map = { .index = -ENOSYS, };
+
+	return map;
+}
+
+static inline void pci_msix_free_irq(struct pci_dev *pdev, struct msi_map map)
+{
+}
+
 static inline void pci_free_irq_vectors(struct pci_dev *dev)
 {
 }

                 reply	other threads:[~2023-02-13 11:25 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=167628749774.4906.17069524905880641563.tip-bot2@tip-bot2 \
    --to=tip-bot2@linutronix.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tip-commits@vger.kernel.org \
    --cc=lkp@intel.com \
    --cc=maz@kernel.org \
    --cc=reinette.chatre@intel.com \
    --cc=tglx@linutronix.de \
    --cc=x86@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.