public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Thomas Chou <thomas@wytron.com.tw>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] nios2: convert cache flush to use dm cpu data
Date: Sat, 10 Oct 2015 14:32:09 +0800	[thread overview]
Message-ID: <5618B0E9.5030509@wytron.com.tw> (raw)
In-Reply-To: <5618A861.5020409@wytron.com.tw>

Hi Marek,

On 10/10/2015 01:55 PM, Thomas Chou wrote:
> Hi Marek,
>
> On 10/09/2015 10:42 PM, Marek Vasut wrote:
>>> In nios2, we don't skip the flushing when the inputs are not aligned
>>> like that of arm926ejs. We always flush all cache lines in the range,
>>> even if a single byte to flush is in request. So the inputs are rounded
>>> to get the lower and upper cache lines range inside the cache flush
>>> functions. The caller need not be aware of the detail.
>>
>> This is incorrect and all the places which produce these unaligned cache
>> operations must be fixed.
>
> I take a look into the cache flush operations in every arch of u-boot.
> It turns out that the arm926ejs is the only platform that does such
> cache line range check and skip. All other ARM and all other arch don't.
> And the cache flush in Linux don't.
>

+arm11, which is based on the same code.

I see your patch on this range check. I would prefer that the details of 
cache line configuration be kept inside the cache flush operators, and 
need not be exposed to drivers. As drivers might be used by different 
arch with different cache implementation, L1,L2..etc. It is not good for 
drivers to adjust the flush range before passing to cache flush operators.

Best regards,
Thomas

  reply	other threads:[~2015-10-10  6:32 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-06  8:20 [U-Boot] [PATCH] nios2: convert cache flush to use dm cpu data Thomas Chou
2015-10-08 21:39 ` Marek Vasut
2015-10-09  2:49   ` Ley Foon Tan
2015-10-09  8:00     ` Thomas Chou
2015-10-09 14:42       ` Marek Vasut
2015-10-10  5:55         ` Thomas Chou
2015-10-10  6:32           ` Thomas Chou [this message]
2015-10-10 18:18             ` Marek Vasut
2015-10-11  0:38               ` Thomas Chou
2015-10-11 12:15                 ` Marek Vasut
2015-10-12  0:34                   ` Thomas Chou
2015-10-12 10:30                     ` Marek Vasut
2015-10-12 13:12                       ` Thomas Chou
2015-10-12 13:29                         ` Marek Vasut
2015-10-12 13:49                           ` Wolfgang Denk
2015-10-13  1:04                           ` Thomas Chou
2015-10-16 23:03                             ` Marek Vasut
2015-10-17  3:22                               ` Thomas Chou
2015-10-17 11:44                                 ` Marek Vasut
2015-10-10 18:12           ` Marek Vasut
2015-10-09 14:40     ` Marek Vasut
2015-10-09 12:58 ` [U-Boot] [PATCH v2] " 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=5618B0E9.5030509@wytron.com.tw \
    --to=thomas@wytron.com.tw \
    --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