Thread (28 messages) 28 messages, 4 authors, 2021-03-25

Re: [PATCH v2 04/15] PCI: xilinx: Don't allocate extra memory for the MSI capture address

From: Marc Zyngier <maz@kernel.org>
Date: 2021-03-24 12:56:30
Also in: linux-hyperv, linux-mediatek, linux-pci, linux-renesas-soc, linux-tegra, lkml

On Wed, 24 Mar 2021 12:35:58 +0000,
Bharat Kumar Gogada [off-list ref] wrote:
Thanks Marc for the patch.
quoted
Subject: [PATCH v2 04/15] PCI: xilinx: Don't allocate extra memory for the
MSI capture address

A long cargo-culted behaviour of PCI drivers is to allocate memory to obtain
an address that is fed to the controller as the MSI capture address (i.e. the
MSI doorbell).

But there is no actual requirement for this address to be RAM.
All it needs to be is a suitable aligned address that will
*not* be DMA'd to.

Use the physical address of the 'port' data structure as the MSI capture
address.

Signed-off-by: Marc Zyngier <maz@kernel.org>
---
 drivers/pci/controller/pcie-xilinx.c | 18 ++++++------------
 1 file changed, 6 insertions(+), 12 deletions(-)
...
quoted
-	msg.address_hi = 0;
-	msg.address_lo = msg_addr;
+	msg.address_hi = upper_32_bits(msg_addr);
+	msg.address_lo = lower_32_bits(msg_addr);
The XILINX_PCIE_REG_MSIBASE2 register expects 4KB aligned address.
The lower 12-bits are always set to 0 in this register. So we need
to mask the address while programming address to
Thanks for the heads up, I'll fix this up. Does it work correctly once
the address is aligned?

	M.

-- 
Without deviation from the norm, progress is not possible.

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help