Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1602293

Re: [PATCH v2 8/8] irqchip, gicv3-its, cma: Use CMA for allocation of large device tables

From Marc Zyngier <marc.zyngier@arm.com>
Newsgroups linux.kernel
Subject Re: [PATCH v2 8/8] irqchip, gicv3-its, cma: Use CMA for allocation of large device tables
Date 2017-03-16 14:50 +0100
Message-ID <tlDWW-7vw-29@gated-at.bofh.it> (permalink)
References (1 earlier) <tkYK6-3xL-37@gated-at.bofh.it> <tkYK6-3xL-33@gated-at.bofh.it> <tlm9J-3am-49@gated-at.bofh.it> <tlm9J-3am-47@gated-at.bofh.it> <tlDWW-7vw-31@gated-at.bofh.it>
Organization ARM Ltd

Show all headers | View raw


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.

Thanks,

	M.
-- 
Jazz is not dead. It just smells funny...

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Re: [PATCH v2 8/8] irqchip, gicv3-its, cma: Use CMA for allocation of  large device tables Shanker Donthineni <shankerd@codeaurora.org> - 2017-03-14 18:50 +0100
  Re: [PATCH v2 8/8] irqchip, gicv3-its, cma: Use CMA for allocation of  large device tables Marc Zyngier <marc.zyngier@arm.com> - 2017-03-15 19:50 +0100
    Re: [PATCH v2 8/8] irqchip, gicv3-its, cma: Use CMA for allocation of  large device tables Marc Zyngier <marc.zyngier@arm.com> - 2017-03-16 14:50 +0100
      Re: [PATCH v2 8/8] irqchip, gicv3-its, cma: Use CMA for allocation of  large device tables Shanker Donthineni <shankerd@codeaurora.org> - 2017-03-16 15:10 +0100

csiph-web