From: Thomas Gleixner <tglx@linutronix.de>
To: LKML <linux-kernel@vger.kernel.org>
Cc: Marc Zyngier <maz@kernel.org>, Nishanth Menon <nm@ti.com>,
Tero Kristo <kristo@kernel.org>,
Santosh Shilimkar <ssantosh@kernel.org>,
Jon Mason <jdmason@kudzu.us>, Dave Jiang <dave.jiang@intel.com>,
Allen Hubbe <allenbh@gmail.com>,
ntb@lists.linux.dev, Bjorn Helgaas <bhelgaas@google.com>,
linux-pci@vger.kernel.org, Haiyang Zhang <haiyangz@microsoft.com>,
Wei Liu <wei.liu@kernel.org>,
linux-hyperv@vger.kernel.org, Wei Huang <wei.huang2@amd.com>,
Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>,
"James E.J. Bottomley" <James.Bottomley@HansenPartnership.com>,
"Martin K. Petersen" <martin.petersen@oracle.com>,
linux-scsi@vger.kernel.org
Subject: [patch 01/10] genirq/msi: Make a few functions static
Date: Sun, 9 Mar 2025 09:41:42 +0100 (CET) [thread overview]
Message-ID: <20250309084110.204054172@linutronix.de> (raw)
In-Reply-To: 20250309083453.900516105@linutronix.de
None of these functions are used outside of the MSI core.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
---
include/linux/msi.h | 5 -----
kernel/irq/msi.c | 40 +++++++---------------------------------
2 files changed, 7 insertions(+), 38 deletions(-)
--- a/include/linux/msi.h
+++ b/include/linux/msi.h
@@ -81,7 +81,6 @@ struct device_attribute;
struct irq_domain;
struct irq_affinity_desc;
-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
@@ -603,8 +602,6 @@ void msi_remove_device_irq_domain(struct
bool msi_match_device_irq_domain(struct device *dev, unsigned int domid,
enum irq_domain_bus_token bus_token);
-int msi_domain_alloc_irqs_range_locked(struct device *dev, unsigned int domid,
- unsigned int first, unsigned int last);
int msi_domain_alloc_irqs_range(struct device *dev, unsigned int domid,
unsigned int first, unsigned int last);
int msi_domain_alloc_irqs_all_locked(struct device *dev, unsigned int domid, int nirqs);
@@ -613,8 +610,6 @@ struct msi_map msi_domain_alloc_irq_at(s
const struct irq_affinity_desc *affdesc,
union msi_instance_cookie *cookie);
-void msi_domain_free_irqs_range_locked(struct device *dev, unsigned int domid,
- unsigned int first, unsigned int last);
void msi_domain_free_irqs_range(struct device *dev, unsigned int domid,
unsigned int first, unsigned int last);
void msi_domain_free_irqs_all_locked(struct device *dev, unsigned int domid);
--- a/kernel/irq/msi.c
+++ b/kernel/irq/msi.c
@@ -270,16 +270,11 @@ static int msi_domain_add_simple_msi_des
return ret;
}
-void __get_cached_msi_msg(struct msi_desc *entry, struct msi_msg *msg)
-{
- *msg = entry->msg;
-}
-
void get_cached_msi_msg(unsigned int irq, struct msi_msg *msg)
{
struct msi_desc *entry = irq_get_msi_desc(irq);
- __get_cached_msi_msg(entry, msg);
+ *msg = entry->msg;
}
EXPORT_SYMBOL_GPL(get_cached_msi_msg);
@@ -1352,21 +1347,17 @@ static int msi_domain_alloc_locked(struc
}
/**
- * msi_domain_alloc_irqs_range_locked - Allocate interrupts from a MSI interrupt domain
+ * msi_domain_alloc_irqs_range - Allocate interrupts from a MSI interrupt domain
* @dev: Pointer to device struct of the device for which the interrupts
* are allocated
* @domid: Id of the interrupt domain to operate on
* @first: First index to allocate (inclusive)
* @last: Last index to allocate (inclusive)
*
- * Must be invoked from within a msi_lock_descs() / msi_unlock_descs()
- * pair. Use this for MSI irqdomains which implement their own descriptor
- * allocation/free.
- *
* Return: %0 on success or an error code.
*/
-int msi_domain_alloc_irqs_range_locked(struct device *dev, unsigned int domid,
- unsigned int first, unsigned int last)
+int msi_domain_alloc_irqs_range(struct device *dev, unsigned int domid,
+ unsigned int first, unsigned int last)
{
struct msi_ctrl ctrl = {
.domid = domid,
@@ -1374,27 +1365,10 @@ int msi_domain_alloc_irqs_range_locked(s
.last = last,
.nirqs = last + 1 - first,
};
-
- return msi_domain_alloc_locked(dev, &ctrl);
-}
-
-/**
- * msi_domain_alloc_irqs_range - Allocate interrupts from a MSI interrupt domain
- * @dev: Pointer to device struct of the device for which the interrupts
- * are allocated
- * @domid: Id of the interrupt domain to operate on
- * @first: First index to allocate (inclusive)
- * @last: Last index to allocate (inclusive)
- *
- * Return: %0 on success or an error code.
- */
-int msi_domain_alloc_irqs_range(struct device *dev, unsigned int domid,
- unsigned int first, unsigned int last)
-{
int ret;
msi_lock_descs(dev);
- ret = msi_domain_alloc_irqs_range_locked(dev, domid, first, last);
+ ret = msi_domain_alloc_locked(dev, &ctrl);
msi_unlock_descs(dev);
return ret;
}
@@ -1618,8 +1592,8 @@ static void msi_domain_free_locked(struc
* @first: First index to free (inclusive)
* @last: Last index to free (inclusive)
*/
-void msi_domain_free_irqs_range_locked(struct device *dev, unsigned int domid,
- unsigned int first, unsigned int last)
+static void msi_domain_free_irqs_range_locked(struct device *dev, unsigned int domid,
+ unsigned int first, unsigned int last)
{
struct msi_ctrl ctrl = {
.domid = domid,
next prev parent reply other threads:[~2025-03-09 8:41 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-09 8:41 [patch 00/10] genirq/msi: Spring cleaning Thomas Gleixner
2025-03-09 8:41 ` Thomas Gleixner [this message]
2025-03-11 17:45 ` [patch 01/10] genirq/msi: Make a few functions static Jonathan Cameron
2025-03-09 8:41 ` [patch 02/10] genirq/msi: Use lock guards for MSI descriptor locking Thomas Gleixner
2025-03-11 18:00 ` Jonathan Cameron
2025-03-11 21:26 ` Thomas Gleixner
2025-03-12 15:08 ` Jonathan Cameron
2025-03-12 17:46 ` Thomas Gleixner
2025-03-09 8:41 ` [patch 03/10] soc: ti: ti_sci_inta_msi: Switch MSI descriptor locking to guard() Thomas Gleixner
2025-03-11 18:01 ` Jonathan Cameron
2025-03-12 17:59 ` Nishanth Menon
2025-03-13 12:07 ` Dhruva Gole
2025-03-09 8:41 ` [patch 04/10] NTB/msi: Switch MSI descriptor locking to lock guard() Thomas Gleixner
2025-03-10 15:18 ` Dave Jiang
2025-03-10 16:34 ` Logan Gunthorpe
2025-03-11 18:02 ` Jonathan Cameron
2025-03-09 8:41 ` [patch 05/10] PCI/MSI: Switch to MSI descriptor locking to guard() Thomas Gleixner
2025-03-11 18:10 ` Jonathan Cameron
2025-03-11 21:45 ` Thomas Gleixner
2025-03-12 15:10 ` Jonathan Cameron
2025-03-09 8:41 ` [patch 06/10] PCI: hv: Switch " Thomas Gleixner
2025-03-10 16:52 ` Wei Liu
2025-03-10 20:33 ` Michael Kelley
2025-03-11 18:10 ` Jonathan Cameron
2025-03-09 8:41 ` [patch 07/10] PCI/MSI: Provide a sane mechanism for TPH Thomas Gleixner
2025-03-09 8:41 ` [patch 08/10] PCI/TPH: Replace the broken MSI-X control word update Thomas Gleixner
2025-03-09 8:41 ` [patch 09/10] scsi: ufs: qcom: Remove the MSI descriptor abuse Thomas Gleixner
2025-03-09 8:41 ` [patch 10/10] genirq/msi: Rename msi_[un]lock_descs() Thomas Gleixner
2025-03-09 8:48 ` Xin Li
2025-03-11 18:14 ` Jonathan Cameron
2025-03-10 16:51 ` [patch 00/10] genirq/msi: Spring cleaning Bjorn Helgaas
2025-03-10 17:31 ` Thomas Gleixner
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=20250309084110.204054172@linutronix.de \
--to=tglx@linutronix.de \
--cc=James.Bottomley@HansenPartnership.com \
--cc=allenbh@gmail.com \
--cc=bhelgaas@google.com \
--cc=dave.jiang@intel.com \
--cc=haiyangz@microsoft.com \
--cc=jdmason@kudzu.us \
--cc=kristo@kernel.org \
--cc=linux-hyperv@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=manivannan.sadhasivam@linaro.org \
--cc=martin.petersen@oracle.com \
--cc=maz@kernel.org \
--cc=nm@ti.com \
--cc=ntb@lists.linux.dev \
--cc=ssantosh@kernel.org \
--cc=wei.huang2@amd.com \
--cc=wei.liu@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).