From: vichy.kuo@gmail.com (vichy)
To: linux-arm-kernel@lists.infradead.org
Subject: some question about Set bit 22 in the PL310 (cache controller) AuxCtlr register
Date: Thu, 12 Mar 2015 05:54:59 +0800 [thread overview]
Message-ID: <CAOVJa8Gi4JRT=VDXG_nec30PCJoWUiA-9dE56NrGeE48Lww+Hw@mail.gmail.com> (raw)
In-Reply-To: <CAOVJa8EneaXA5bX2_f4JBjKyG2G2subWPd3Vf9d_S-QxG9iO5g@mail.gmail.com>
hi Catalin:
2015-03-11 22:35 GMT+08:00 vichy <vichy.kuo@gmail.com>:
> hi Catalin:
>
> 2015-03-11 0:31 GMT+08:00 Catalin Marinas <catalin.marinas@arm.com>:
>> On Sun, Mar 08, 2015 at 08:31:45PM +0800, vichy wrote:
>>> Recently we bumped into the same issue like below path:
>>> http://lists.infradead.org/pipermail/linux-arm-kernel/2014-April/245908.html
>>> http://lists.infradead.org/pipermail/linux-arm-kernel/2010-November/031810.html
>>>
>>> We have some question about this patch:
>>> a. Under what circumstances, there will be memory returned by
>>> dma_alloc_coherent and friends mapped as normal, cacheable mappings?
>>
>> dma_alloc_coherent() allocating from ZONE_DMA (or ZONE_NORMAL) which is
>> already mapped in the kernel linear mapping as Normal Cacheable.
>>
>>> b. why "with CMA enabled, it should be safe not to set this bit."
>>
>> It's not entirely safe either. I guess the assumption is that CMA
>> allocates from highmem which is not mapped in the kernel linear mapping.
>> However, to be able to flush the caches for such highmem pages, they
>> need to be mapped (kmap_atomic() in __dma_clear_buffer()) but there is a
>> small window between dmac_flush_range() and kunmap_atomic() where
>> speculative cache line fills can still happen.
>>
>> Bit 22 in PL310 AuxCtlr must be set for most (all) uses of the coherent
>> DMA API in Linux.
Sorry for not describing my question more clear.
Not only the above 2 links I pasted in the mail, I also found other
threads has the issue as mine.
(about L2C_AUX_CTRL_SHARED_OVERRIDE)
And all of them(so far I see) suggest to set this bit on.
if so, under what circumstance, the Bit22 in PL310 AuxCtlr will be cleared?
thanks your kind help,
next prev parent reply other threads:[~2015-03-11 21:54 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-03-08 12:31 some question about Set bit 22 in the PL310 (cache controller) AuxCtlr register vichy
2015-03-10 16:31 ` Catalin Marinas
2015-03-10 16:34 ` Russell King - ARM Linux
2015-03-10 17:40 ` Catalin Marinas
2015-03-10 17:48 ` Russell King - ARM Linux
2015-03-10 17:11 ` Krishna Reddy
2015-03-10 17:27 ` Russell King - ARM Linux
2015-03-11 14:35 ` vichy
2015-03-11 21:54 ` vichy [this message]
2015-03-13 14:11 ` Catalin Marinas
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='CAOVJa8Gi4JRT=VDXG_nec30PCJoWUiA-9dE56NrGeE48Lww+Hw@mail.gmail.com' \
--to=vichy.kuo@gmail.com \
--cc=linux-arm-kernel@lists.infradead.org \
/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;
as well as URLs for NNTP newsgroup(s).