Re: [PATCH v7 07/14] PCI: rzg3s-host: Use cached MSI address in .irq_compose_msi_msg()

From: Claudiu Beznea

Date: Tue Oct 20 2026 - 05:16:55 EST


Hi, Prabhakar,

On 10/20/26 11:45, Lad, Prabhakar wrote:
Hi Claudiu,

Thank you for the patch.

On Mon, Oct 19, 2026 at 7:57 AM Claudiu Beznea
<claudiu.beznea@xxxxxxxxxx> wrote:
From: Claudiu Beznea<claudiu.beznea.uj@xxxxxxxxxxxxxx>

The MSI window address is already cached in msi->window_base when the
MSI window is configured. Use it to fill msg->address_lo and
msg->address_hi in .irq_compose_msi_msg() instead of reading it back
from the controller registers.

This avoids unnecessary register accesses.

Signed-off-by: Claudiu Beznea<claudiu.beznea.uj@xxxxxxxxxxxxxx>
---

Changes in v7:
- none, this patch is new

drivers/pci/controller/pcie-rzg3s-host.c | 14 ++------------
1 file changed, 2 insertions(+), 12 deletions(-)

diff --git a/drivers/pci/controller/pcie-rzg3s-host.c b/drivers/pci/controller/pcie-rzg3s-host.c
index b0a150262959..6acb0231a067 100644
--- a/drivers/pci/controller/pcie-rzg3s-host.c
+++ b/drivers/pci/controller/pcie-rzg3s-host.c
@@ -660,19 +660,9 @@ static void rzg3s_pcie_irq_compose_msi_msg(struct irq_data *data,
struct msi_msg *msg)
{
struct rzg3s_pcie_msi *msi = irq_data_get_irq_chip_data(data);
- struct rzg3s_pcie_host *host = rzg3s_msi_to_host(msi);
- u32 lo, hi;
-
- /*
- * Enable and msg data enable bits are part of the address lo. Drop
- * them along with the unused bit.
- */
- lo = readl_relaxed(host->axi + RZG3S_PCI_MSIRCVWADRL) &
- RZG3S_PCI_MSIRCVWADRL_MASK;
We need to drop RZG3S_PCI_MSIRCVWADRL_MASK macro, as this now triggers
the below warning:

drivers/pci/controller/pcie-rzg3s-host.c:66:9: warning: macro
‘RZG3S_PCI_MSIRCVWADRL_MASK’ is not used [-Wunused-macros]
66 | #define RZG3S_PCI_MSIRCVWADRL_MASK GENMASK(31, 3)

Will update it in the next version.

Thank you for your review,
Claudiu