All of lore.kernel.org
 help / color / mirror / Atom feed
From: Bjorn Helgaas <helgaas@kernel.org>
To: Siddharth Vadapalli <s-vadapalli@ti.com>
Cc: bhelgaas@google.com, lpieralisi@kernel.org, kw@linux.com,
	robh@kernel.org, vigneshr@ti.com, kishon@kernel.org,
	linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org, stable@vger.kernel.org,
	ahalaney@redhat.com, srk@ti.com
Subject: Re: [PATCH] PCI: j721e: Set .map_irq and .swizzle_irq to NULL
Date: Wed, 24 Jul 2024 11:23:04 -0500	[thread overview]
Message-ID: <20240724162304.GA802428@bhelgaas> (raw)
In-Reply-To: <20240724065048.285838-1-s-vadapalli@ti.com>

Subject should say something about why this change is needed, not just
translate the C code to English.

On Wed, Jul 24, 2024 at 12:20:48PM +0530, Siddharth Vadapalli wrote:
> Since the configuration of Legacy Interrupts (INTx) is not supported, set

I assume you mean J721E doesn't support INTx?

> the .map_irq and .swizzle_irq callbacks to NULL. This fixes the error:
>   of_irq_parse_pci: failed with rc=-22

I guess this happens because devm_of_pci_bridge_init() initializes
.map_irq and .swizzle_irq unconditionally?

I'm not sure the default assumption should be that a host bridge
supports INTx.

Maybe .map_irq and .swizzle_irq should only be set when we discover
some information about INTx routing, e.g., an ACPI _PRT or the
corresponding DT properties.

> due to the absence of Legacy Interrupts in the device-tree.
> 
> Fixes: f3e25911a430 ("PCI: j721e: Add TI J721E PCIe driver")
> Reported-by: Andrew Halaney <ahalaney@redhat.com>
> Signed-off-by: Siddharth Vadapalli <s-vadapalli@ti.com>
> ---
> 
> Hello,
> 
> This patch is based on commit
> 786c8248dbd3 Merge tag 'perf-tools-fixes-for-v6.11-2024-07-23' of git://git.kernel.org/pub/scm/linux/kernel/git/perf/perf-tools
> of Mainline Linux.
> 
> Patch has been tested on J784S4-EVM and J721e-EVM, both of which have
> the PCIe Controller configured by the pci-j721e.c driver.
> 
> Regards,
> Siddharth.
> 
>  drivers/pci/controller/cadence/pci-j721e.c | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/drivers/pci/controller/cadence/pci-j721e.c b/drivers/pci/controller/cadence/pci-j721e.c
> index 85718246016b..5372218849a8 100644
> --- a/drivers/pci/controller/cadence/pci-j721e.c
> +++ b/drivers/pci/controller/cadence/pci-j721e.c
> @@ -417,6 +417,10 @@ static int j721e_pcie_probe(struct platform_device *pdev)
>  		if (!bridge)
>  			return -ENOMEM;
>  
> +		/* Legacy interrupts are not supported */

Say "INTx" explicitly here instead of assuming "legacy" == "INTx".

> +		bridge->map_irq = NULL;
> +		bridge->swizzle_irq = NULL;
> +
>  		if (!data->byte_access_allowed)
>  			bridge->ops = &cdns_ti_pcie_host_ops;
>  		rc = pci_host_bridge_priv(bridge);
> -- 
> 2.40.1
> 

  parent reply	other threads:[~2024-07-24 16:23 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-07-24  6:50 [PATCH] PCI: j721e: Set .map_irq and .swizzle_irq to NULL Siddharth Vadapalli
2024-07-24  6:54 ` kernel test robot
2024-07-24 16:19 ` Manivannan Sadhasivam
2024-07-25  4:20   ` Manivannan Sadhasivam
2024-07-25  8:20     ` Siddharth Vadapalli
2024-07-26 11:56       ` Manivannan Sadhasivam
2024-08-05 16:01         ` Rob Herring
2024-08-05 16:45           ` Manivannan Sadhasivam
2024-08-05 19:05             ` Rob Herring
2024-08-05 20:40               ` Rob Herring
2024-08-08 20:56               ` Andrew Halaney
2024-08-09  5:33                 ` Manivannan Sadhasivam
2024-07-25  5:20   ` Siddharth Vadapalli
2024-07-25  7:47     ` Manivannan Sadhasivam
2024-07-25  8:31       ` Siddharth Vadapalli
2024-07-26 10:24         ` Siddharth Vadapalli
2024-07-26 11:30           ` Manivannan Sadhasivam
2024-07-26 12:06             ` Siddharth Vadapalli
2024-07-24 16:23 ` Bjorn Helgaas [this message]
2024-07-25  5:53   ` Siddharth Vadapalli
2024-07-25 21:19     ` Bjorn Helgaas
2024-07-25 22:21 ` Andrew Halaney

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=20240724162304.GA802428@bhelgaas \
    --to=helgaas@kernel.org \
    --cc=ahalaney@redhat.com \
    --cc=bhelgaas@google.com \
    --cc=kishon@kernel.org \
    --cc=kw@linux.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=lpieralisi@kernel.org \
    --cc=robh@kernel.org \
    --cc=s-vadapalli@ti.com \
    --cc=srk@ti.com \
    --cc=stable@vger.kernel.org \
    --cc=vigneshr@ti.com \
    /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.