From: Marek Vasut <marek.vasut@gmail.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] ARM: support for cache coherent allocations
Date: Tue, 19 Jun 2012 01:37:00 +0200 [thread overview]
Message-ID: <201206190137.01377.marek.vasut@gmail.com> (raw)
In-Reply-To: <CAA3CPjULwjf=B0FG08AX4nz07sV9MaYLDL_C6VBquNdcpg2ooA@mail.gmail.com>
Dear Ilya Yanok,
> Hi Marek,
>
> [sorry for copying, forget to CC the list]
>
> On Sat, Jun 16, 2012 at 2:29 AM, Marek Vasut <marek.vasut@gmail.com> wrote:
> > Hm, can't we just punch a hole in the MMU table at runtime instead of
> > preallocating it like this?
>
> It's allocated at runtime now, do you mean allocate it on demand? Good
> point, Probably we can malloc big enough block and make it uncached
> directly from dma_alloc_coherent(). Is it what you suggest?
Kind of ... I mean rather insert an entry into MMU table at runtime that says
"this region is uncached". But that'd need some hack in the mallocator now that
I think about it. It might not be as simple as I thought at first.
On the other hand, most MMUs allow you to allocate stuff with 4k density, which
should be ok.
> Also, what is this for? Can we not simply flush/invalidate the caches?
>
>
> flush/invalidate can be racy for some hardware. Sometimes we need to write
> some field to DMA descriptor and then read another one. And because one
> cannot flush/invalidate individual bytes write/flush can destroy the field
> updated by hardware. (Well, we can invalidate/read before write/flush but
> that introduces a race).
But that's shitty hardware. Do you really need to do it? Where? I fixed similar
issue in fec_mxc.c recently.
>
> Regards, Ilya.
Best regards,
Marek Vasut
next prev parent reply other threads:[~2012-06-18 23:37 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-05-30 21:41 [U-Boot] [PATCH] ARM: support for cache coherent allocations Ilya Yanok
2012-06-14 15:13 ` Ilya Yanok
2012-06-15 17:34 ` Tom Rini
2012-06-15 22:29 ` Marek Vasut
2012-06-18 18:15 ` Ilya Yanok
2012-06-18 23:37 ` Marek Vasut [this message]
2012-06-19 14:32 ` Ilya Yanok
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=201206190137.01377.marek.vasut@gmail.com \
--to=marek.vasut@gmail.com \
--cc=u-boot@lists.denx.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