diff mbox series

[v3,2/3] PCI/rcar-host: Silence set affinity failed warning

Message ID 20240715122012.35222-2-marek.vasut+renesas@mailbox.org (mailing list archive)
State Superseded
Delegated to: Geert Uytterhoeven
Headers show
Series [v3,1/3] genirq/msi: Silence set affinity failed warning | expand

Commit Message

Marek Vasut July 15, 2024, 12:19 p.m. UTC
Use newly introduced MSI_FLAG_NO_AFFINITY, which keeps .irq_set_affinity unset
and allows migrate_one_irq() code in cpuhotplug.c to exit right away, without
printing "IRQ...: set affinity failed(-22)" warning.

Remove .irq_set_affinity implementation which only return -EINVAL from this
controller driver.

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
---
Cc: "Krzysztof Wilczyński" <kw@linux.com>
Cc: Anna-Maria Behnsen <anna-maria@linutronix.de>
Cc: Anup Patel <apatel@ventanamicro.com>
Cc: Bjorn Helgaas <bhelgaas@google.com>
Cc: Jisheng Zhang <Jisheng.Zhang@synaptics.com>
Cc: Jon Hunter <jonathanh@nvidia.com>
Cc: Jonathan Hunter <jonathanh@nvidia.com>
Cc: Koichiro Den <den@valinux.co.jp>
Cc: Lorenzo Pieralisi <lpieralisi@kernel.org>
Cc: Marc Zyngier <maz@kernel.org>
Cc: Nipun Gupta <nipun.gupta@amd.com>
Cc: Rob Herring <robh@kernel.org>
Cc: Shivamurthy Shastri <shivamurthy.shastri@linutronix.de>
Cc: Thierry Reding <thierry.reding@gmail.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Cc: linux-pci@vger.kernel.org
Cc: linux-renesas-soc@vger.kernel.org
Cc: linux-tegra@vger.kernel.org
---
V3: - New patch
---
 drivers/pci/controller/pcie-rcar-host.c | 10 ++--------
 1 file changed, 2 insertions(+), 8 deletions(-)

Comments

Bjorn Helgaas July 22, 2024, 10:38 p.m. UTC | #1
In subject, to match history:

s|PCI/rcar-host|PCI: rcar-host|

On Mon, Jul 15, 2024 at 02:19:27PM +0200, Marek Vasut wrote:
> Use newly introduced MSI_FLAG_NO_AFFINITY, which keeps .irq_set_affinity unset
> and allows migrate_one_irq() code in cpuhotplug.c to exit right away, without
> printing "IRQ...: set affinity failed(-22)" warning.
> 
> Remove .irq_set_affinity implementation which only return -EINVAL from this
> controller driver.

This would be a nice improvement; thanks for working on it.

As you allude to at [1], there are many more PCI controller drivers
that could benefit from similar changes.  I'd like to do them all at
once if possible.

[1] https://lore.kernel.org/r/d5efcb28-dd5a-4b96-aabd-c73c95dff8e7@mailbox.org

> Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
> ---
> Cc: "Krzysztof Wilczyński" <kw@linux.com>
> Cc: Anna-Maria Behnsen <anna-maria@linutronix.de>
> Cc: Anup Patel <apatel@ventanamicro.com>
> Cc: Bjorn Helgaas <bhelgaas@google.com>
> Cc: Jisheng Zhang <Jisheng.Zhang@synaptics.com>
> Cc: Jon Hunter <jonathanh@nvidia.com>
> Cc: Jonathan Hunter <jonathanh@nvidia.com>
> Cc: Koichiro Den <den@valinux.co.jp>
> Cc: Lorenzo Pieralisi <lpieralisi@kernel.org>
> Cc: Marc Zyngier <maz@kernel.org>
> Cc: Nipun Gupta <nipun.gupta@amd.com>
> Cc: Rob Herring <robh@kernel.org>
> Cc: Shivamurthy Shastri <shivamurthy.shastri@linutronix.de>
> Cc: Thierry Reding <thierry.reding@gmail.com>
> Cc: Thomas Gleixner <tglx@linutronix.de>
> Cc: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
> Cc: linux-pci@vger.kernel.org
> Cc: linux-renesas-soc@vger.kernel.org
> Cc: linux-tegra@vger.kernel.org
> ---
> V3: - New patch
> ---
>  drivers/pci/controller/pcie-rcar-host.c | 10 ++--------
>  1 file changed, 2 insertions(+), 8 deletions(-)
> 
> diff --git a/drivers/pci/controller/pcie-rcar-host.c b/drivers/pci/controller/pcie-rcar-host.c
> index c01efc6ea64f6..3dd653f3d7841 100644
> --- a/drivers/pci/controller/pcie-rcar-host.c
> +++ b/drivers/pci/controller/pcie-rcar-host.c
> @@ -658,11 +658,6 @@ static void rcar_msi_irq_unmask(struct irq_data *d)
>  	spin_unlock_irqrestore(&msi->mask_lock, flags);
>  }
>  
> -static int rcar_msi_set_affinity(struct irq_data *d, const struct cpumask *mask, bool force)
> -{
> -	return -EINVAL;
> -}
> -
>  static void rcar_compose_msi_msg(struct irq_data *data, struct msi_msg *msg)
>  {
>  	struct rcar_msi *msi = irq_data_get_irq_chip_data(data);
> @@ -678,7 +673,6 @@ static struct irq_chip rcar_msi_bottom_chip = {
>  	.irq_ack		= rcar_msi_irq_ack,
>  	.irq_mask		= rcar_msi_irq_mask,
>  	.irq_unmask		= rcar_msi_irq_unmask,
> -	.irq_set_affinity 	= rcar_msi_set_affinity,
>  	.irq_compose_msi_msg	= rcar_compose_msi_msg,
>  };
>  
> @@ -725,8 +719,8 @@ static const struct irq_domain_ops rcar_msi_domain_ops = {
>  };
>  
>  static struct msi_domain_info rcar_msi_info = {
> -	.flags	= (MSI_FLAG_USE_DEF_DOM_OPS | MSI_FLAG_USE_DEF_CHIP_OPS |
> -		   MSI_FLAG_MULTI_PCI_MSI),
> +	.flags	= MSI_FLAG_USE_DEF_DOM_OPS | MSI_FLAG_USE_DEF_CHIP_OPS |
> +		  MSI_FLAG_NO_AFFINITY | MSI_FLAG_MULTI_PCI_MSI,
>  	.chip	= &rcar_msi_top_chip,
>  };
>  
> -- 
> 2.43.0
>
Marek Vasut July 23, 2024, 10:17 p.m. UTC | #2
On 7/23/24 12:38 AM, Bjorn Helgaas wrote:
> In subject, to match history:
> 
> s|PCI/rcar-host|PCI: rcar-host|
> 
> On Mon, Jul 15, 2024 at 02:19:27PM +0200, Marek Vasut wrote:
>> Use newly introduced MSI_FLAG_NO_AFFINITY, which keeps .irq_set_affinity unset
>> and allows migrate_one_irq() code in cpuhotplug.c to exit right away, without
>> printing "IRQ...: set affinity failed(-22)" warning.
>>
>> Remove .irq_set_affinity implementation which only return -EINVAL from this
>> controller driver.
> 
> This would be a nice improvement; thanks for working on it.
> 
> As you allude to at [1], there are many more PCI controller drivers
> that could benefit from similar changes.  I'd like to do them all at
> once if possible.

Should be addressed in V4 .
diff mbox series

Patch

diff --git a/drivers/pci/controller/pcie-rcar-host.c b/drivers/pci/controller/pcie-rcar-host.c
index c01efc6ea64f6..3dd653f3d7841 100644
--- a/drivers/pci/controller/pcie-rcar-host.c
+++ b/drivers/pci/controller/pcie-rcar-host.c
@@ -658,11 +658,6 @@  static void rcar_msi_irq_unmask(struct irq_data *d)
 	spin_unlock_irqrestore(&msi->mask_lock, flags);
 }
 
-static int rcar_msi_set_affinity(struct irq_data *d, const struct cpumask *mask, bool force)
-{
-	return -EINVAL;
-}
-
 static void rcar_compose_msi_msg(struct irq_data *data, struct msi_msg *msg)
 {
 	struct rcar_msi *msi = irq_data_get_irq_chip_data(data);
@@ -678,7 +673,6 @@  static struct irq_chip rcar_msi_bottom_chip = {
 	.irq_ack		= rcar_msi_irq_ack,
 	.irq_mask		= rcar_msi_irq_mask,
 	.irq_unmask		= rcar_msi_irq_unmask,
-	.irq_set_affinity 	= rcar_msi_set_affinity,
 	.irq_compose_msi_msg	= rcar_compose_msi_msg,
 };
 
@@ -725,8 +719,8 @@  static const struct irq_domain_ops rcar_msi_domain_ops = {
 };
 
 static struct msi_domain_info rcar_msi_info = {
-	.flags	= (MSI_FLAG_USE_DEF_DOM_OPS | MSI_FLAG_USE_DEF_CHIP_OPS |
-		   MSI_FLAG_MULTI_PCI_MSI),
+	.flags	= MSI_FLAG_USE_DEF_DOM_OPS | MSI_FLAG_USE_DEF_CHIP_OPS |
+		  MSI_FLAG_NO_AFFINITY | MSI_FLAG_MULTI_PCI_MSI,
 	.chip	= &rcar_msi_top_chip,
 };