All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ray Jui <rjui@broadcom.com>
To: Marc Zyngier <marc.zyngier@arm.com>
Cc: Bjorn Helgaas <bhelgaas@google.com>,
	Arnd Bergmann <arnd@arndb.de>, Hauke Mehrtens <hauke@hauke-m.de>,
	<linux-kernel@vger.kernel.org>,
	<bcm-kernel-feedback-list@broadcom.com>,
	<linux-pci@vger.kernel.org>
Subject: Re: [PATCH v2 4/5] PCI: iproc: Add iProc PCIe MSI support
Date: Wed, 25 Nov 2015 21:14:36 -0800	[thread overview]
Message-ID: <5656953C.7050602@broadcom.com> (raw)
In-Reply-To: <565665E8.1080702@broadcom.com>

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

  reply	other threads:[~2015-11-26  5:14 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-24 23:04 [PATCH v2 0/5] Add iProc PCIe PAXC and MSI support Ray Jui
2015-11-24 23:04 ` [PATCH v2 1/5] PCI: iproc: Update iProc PCIe device tree binding Ray Jui
2015-11-24 23:04 ` [PATCH v2 2/5] PCI: iproc: Add PAXC interface support Ray Jui
2015-11-24 23:04 ` [PATCH v2 3/5] PCI: iproc: Add iProc PCIe MSI device tree binding Ray Jui
2015-11-24 23:04 ` [PATCH v2 4/5] PCI: iproc: Add iProc PCIe MSI support Ray Jui
2015-11-25 17:36   ` Marc Zyngier
2015-11-26  1:52     ` Ray Jui
2015-11-26  5:14       ` Ray Jui [this message]
2015-11-24 23:04 ` [PATCH v2 5/5] ARM: dts: Enable MSI support for Broadcom Cygnus Ray Jui

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=5656953C.7050602@broadcom.com \
    --to=rjui@broadcom.com \
    --cc=arnd@arndb.de \
    --cc=bcm-kernel-feedback-list@broadcom.com \
    --cc=bhelgaas@google.com \
    --cc=hauke@hauke-m.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=marc.zyngier@arm.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.