Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1277973
| From | Ray Jui <rjui@broadcom.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH v2 4/5] PCI: iproc: Add iProc PCIe MSI support |
| Date | 2015-11-26 06:20 +0100 |
| Message-ID | <qyX8l-8H-1@gated-at.bofh.it> (permalink) |
| References | <qyuSJ-6fq-3@gated-at.bofh.it> <qyuSK-6fq-21@gated-at.bofh.it> <qyMcX-Vq-19@gated-at.bofh.it> <qyU0O-5R8-19@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
Hi Marc, On 11/25/2015 5:52 PM, Ray Jui wrote: > Hi Marc, > [...] >>> + /* reserve memory for MSI posted writes */ >>> + msi->msi_cpu = dma_alloc_coherent(pcie->dev, >>> + msi->nr_msi_region * MSI_MEM_REGION_SIZE, >>> + &msi->msi_dma, GFP_KERNEL); >> >> Same here. Also, what is the exact purpose of that memory? You have a >> coherent mapping with the CPU, but you never read from it. So what's >> the point? >> > > Yeah I guess I can change this back to kmalloc since coherent memory is > a scarce resource, and the CPU does not need to access the memory, so > there's no cache issue. > > I know I have not answered the first part of your question. Let me do > some experiments first and I'll get back to you on that, :) > I did some experiment with the msi_dma here. It looks like it can be any address as long as it's 4K aligned (i.e., can be from the device address range instead of the RAM address range). The MSI message data actually goes to the memory allocated for the event queue (makes sense...), and never made it to the MSI page memory allocated here. Our arch doc is just confusing....:( I saw your comment on the other email thread with Xilinx MSI. I'll set the address to the base address of the iProc PCIe controller (which is always 4K aligned). [...] >> >> Thanks, >> >> M. >> > > Thanks, Marc! > > Ray Thanks again! Ray -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread
[PATCH v2 4/5] PCI: iproc: Add iProc PCIe MSI support Ray Jui <rjui@broadcom.com> - 2015-11-25 00:10 +0100
Re: [PATCH v2 4/5] PCI: iproc: Add iProc PCIe MSI support Marc Zyngier <marc.zyngier@arm.com> - 2015-11-25 18:40 +0100
Re: [PATCH v2 4/5] PCI: iproc: Add iProc PCIe MSI support Ray Jui <rjui@broadcom.com> - 2015-11-26 03:00 +0100
Re: [PATCH v2 4/5] PCI: iproc: Add iProc PCIe MSI support Ray Jui <rjui@broadcom.com> - 2015-11-26 06:20 +0100
csiph-web