From: Marek Vasut <marex@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v3] nios2: convert cache flush to use dm cpu data
Date: Sat, 17 Oct 2015 13:52:10 +0200 [thread overview]
Message-ID: <201510171352.10109.marex@denx.de> (raw)
In-Reply-To: <5621F0C1.6070906@wytron.com.tw>
On Saturday, October 17, 2015 at 08:54:57 AM, Thomas Chou wrote:
> Hi Marek,
Hi!
> On 10/17/2015 07:00 AM, Marek Vasut wrote:
> >> +static void __flush_dcache(unsigned long start, unsigned long end)
> >> +{
> >> + unsigned long addr;
> >> +
> >> + start &= ~(gd->arch.dcache_line_size - 1);
> >> + end += (gd->arch.dcache_line_size - 1);
> >> + end &= ~(gd->arch.dcache_line_size - 1);
> >
> > I really don't think we should do this alignment here :-(
>
> The rounding to get flush range is necessary to keep it confirm to the
> interface defined in linux/Documentation/cachetlb.txt.
>
> Removing the rounding and adding "range check and keep" is a violation
> to the common interface.
>
> You cannot agree to the common interface and, at the same time, insist
> on changing the definition by your own.
I agree we should strive for such an interface, but it's not in place yet
and there are many nasty places in U-Boot where such an interface is not
directly applicable yet. That's why we need some sort of detection of the
incorrect addresses used in cache ops, since if I am tracking down some
sort of DMA issues and I find that my cache code is hiding them, I'll be
really unhappy.
btw. I think most of the U-Boot code has been already fixed, so if you
add the cache range checks, they shouldn't trigger too much.
Best regards,
Marek Vasut
next prev parent reply other threads:[~2015-10-17 11:52 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1444119600-31999-1-git-send-email-thomas@wytron.com.t>
2015-10-14 1:38 ` [U-Boot] [PATCH v3] nios2: convert cache flush to use dm cpu data Thomas Chou
2015-10-16 23:00 ` Marek Vasut
2015-10-17 6:54 ` Thomas Chou
2015-10-17 11:52 ` Marek Vasut [this message]
2015-10-18 23:48 ` Thomas Chou
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=201510171352.10109.marex@denx.de \
--to=marex@denx.de \
--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 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.