mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Shanker Donthineni <shankerd@codeaurora.org>
To: Marc Zyngier <marc.zyngier@arm.com>,
	Robert Richter <robert.richter@cavium.com>
Cc: Thomas Gleixner <tglx@linutronix.de>,
	Jason Cooper <jason@lakedaemon.net>,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 8/8] irqchip, gicv3-its, cma: Use CMA for allocation of large device tables
Date: Thu, 16 Mar 2017 09:03:24 -0500	[thread overview]
Message-ID: <b1ec8924-5154-706d-4d25-4ee44be45fb4@codeaurora.org> (raw)
In-Reply-To: <a00390ef-808d-59ea-521c-b759a00b5951@arm.com>

Hi Marc/Robert,

On 03/16/2017 08:41 AM, Marc Zyngier wrote:
> On 16/03/17 13:31, Robert Richter wrote:
>> On 15.03.17 18:46:22, Marc Zyngier wrote:
>>> On 15/03/17 18:37, Robert Richter wrote:
>>>> On 14.03.17 12:40:45, Shanker Donthineni wrote:
>>>>>> @@ -1698,6 +1706,9 @@ static int __init its_init_one(struct its_node *its)
>>>>>>  		return err;
>>>>>>  	}
>>>>>>  
>>>>>> +	/* Setup dma_ops for dmam_alloc_coherent() */
>>>>>> +	arch_setup_dma_ops(&its->dev, 0, 0, NULL, true);
>>>>>> +
>>>>> Why you are hard-coding DMA coherent property to true here ? It
>>>>> breaks the MSI(x) functionally on systems where ITS hardware doesn't
>>>>> support coherency.
>>>> Aren't current ITS tables coherent only?
>>> No, there is no such guarantee. Actually, there is strictly no need for
>>> coherency, as the ITS tables are only written by the ITS itself, for its
>>> own purpose.
>> So no need to change that, right?
> I don't think there is any. We just need to allocate memory with the
> relevant constraints (alignment and zeroing, mostly), and make sure we
> never access it directly. Of course, property tables and command queues
> would benefit from being allocated as DMA buffers, which would allow the
> cache flush to be dealt with at the DMA level.

Agree with Marc, only PROP tables and CMD queue buffers are touched by CPU during runtime. That means DMA coherent property set to true only when both the CMD_BASE (ITS_FLAGS_CMDQ_NEEDS_FLUSHING) and PROP_BASE (RDIST_FLAGS_PROPBASE_NEEDS_FLUSHING) tables support coherency.

> Thanks,
>
> 	M.

-- 
Shanker Donthineni
Qualcomm Datacenter Technologies, Inc. as an affiliate of Qualcomm Technologies, Inc.
Qualcomm Technologies, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project.

      reply	other threads:[~2017-03-16 14:03 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-06 12:57 [PATCH v2 0/8] irqchip/gic-v3-its: Implement ITS nodes as kernel devices and use CMA Robert Richter
2017-03-06 12:57 ` [PATCH v2 1/8] irqchip/gic-v3-its: Initialize its nodes in probe order Robert Richter
2017-03-06 12:57 ` [PATCH v2 2/8] irqchip/gic-v3-its: Initialize MSIs with subsys_initcalls Robert Richter
2017-03-06 12:57 ` [PATCH v2 3/8] irqchip/gic-v3-its: Split probing from its node initialization Robert Richter
2017-03-06 12:57 ` [PATCH v2 4/8] irqchip/gic-v3-its: Decouple its initialization from gic Robert Richter
2017-03-06 12:57 ` [PATCH v2 5/8] irqchip/gic-v3-its: Prevent its init ordering dependencies Robert Richter
2017-03-06 12:57 ` [PATCH v2 6/8] irqchip/gic-v3-its: Initialize its nodes later Robert Richter
2017-03-06 12:57 ` [PATCH v2 7/8] irqchip/gic-v3-its: Handle its nodes as kernel devices Robert Richter
2017-03-06 12:57 ` [PATCH v2 8/8] irqchip, gicv3-its, cma: Use CMA for allocation of large device tables Robert Richter
2017-03-14 17:40   ` Shanker Donthineni
2017-03-15 18:37     ` Robert Richter
2017-03-15 18:46       ` Marc Zyngier
2017-03-16 13:31         ` Robert Richter
2017-03-16 13:41           ` Marc Zyngier
2017-03-16 14:03             ` Shanker Donthineni [this message]

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=b1ec8924-5154-706d-4d25-4ee44be45fb4@codeaurora.org \
    --to=shankerd@codeaurora.org \
    --cc=jason@lakedaemon.net \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=marc.zyngier@arm.com \
    --cc=robert.richter@cavium.com \
    --cc=tglx@linutronix.de \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome