linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: linux@arm.linux.org.uk (Russell King - ARM Linux)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 1/2] ARM: cache-l2x0: clean up aurora cache handling
Date: Thu, 11 Sep 2014 11:16:49 +0100	[thread overview]
Message-ID: <20140911101649.GI12361@n2100.arm.linux.org.uk> (raw)
In-Reply-To: <20140911105441.7876966a@free-electrons.com>

On Thu, Sep 11, 2014 at 10:54:41AM +0200, Thomas Petazzoni wrote:
> Arnd,
> 
> Thanks for working on this.

You know, we wouldn't be in this situation today with these warnings
if people /cooperated/ with me when I was working on this code.  So
I take your thanks to Arnd as a bit of an insult to me.

> On Mon, 08 Sep 2014 22:42:23 +0200, Arnd Bergmann wrote:
> > -#ifdef CONFIG_CACHE_PL310
> > -static inline void cache_wait(void __iomem *reg, unsigned long mask)
> > -{
> > -	/* cache operations by line are atomic on PL310 */
> > -}
> > -#else
> > -#define cache_wait	l2c_wait_mask
> > -#endif
> 
> How do you conclude from this that cache_wait() does nothing? When
> we're on PL310, it indeed does nothing, but in our case, we're not on a
> PL310, so cache_wait is equivalent to l2c_wait_mask, which does:

Right, which is why aurora is broken today - the behaviour you end up with
is 100% dependent on whether you've also included L2C310 support or not.
So, using Aurora with a single zImage (which will have support for L2C310
enabled) is going to make this a no-op.

This is why I didn't touch the Aurora code - I don't know what the correct
answer is, and I was ignored when I was working on this code.  So, I
decided that the current warnings which the code produces will serve as a
lesson to people *not* to ignore me, and they can remain there until
people start taking an interest in this.  This seems to be the only way
to get stuff done - being nice and civil gets you nowhere.

> /*
>  * Common code for all cache controllers.
>  */
> static inline void l2c_wait_mask(void __iomem *reg, unsigned long mask)
> {
>         /* wait for cache operation by line or way to complete */
>         while (readl_relaxed(reg) & mask)
>                 cpu_relax();
> }
> 
> And this does not seem to be in any conditional making it specific to
> PL210/PL220 as your commit log suggests.

Why would this need to be moved under an ifdef?  __l2c_op_way() also makes
use of l2c_wait_mask, which itself is used by l2c210_flush_all() and
l2c220_op_way().

-- 
FTTC broadband for 0.8mile line: currently at 9.5Mbps down 400kbps up
according to speedtest.net.

  parent reply	other threads:[~2014-09-11 10:16 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-08 14:53 [PATCH] ARM: avoid l2x0 build warning for CONFIG_OF=n Arnd Bergmann
2014-09-08 15:39 ` Russell King - ARM Linux
2014-09-08 20:36   ` Arnd Bergmann
2014-09-08 20:42     ` [PATCH 1/2] ARM: cache-l2x0: clean up aurora cache handling Arnd Bergmann
2014-09-11  8:54       ` Thomas Petazzoni
2014-09-11  9:50         ` Arnd Bergmann
2014-09-11 10:07           ` Thomas Petazzoni
2014-09-11 10:16         ` Russell King - ARM Linux [this message]
2014-09-11 10:31           ` Thomas Petazzoni
2014-09-11 10:08       ` Thomas Petazzoni
2014-09-08 20:43     ` [PATCH] ARM: cache-l2x0: optimize aurora range operations Arnd Bergmann
2014-09-11  9:13       ` Thomas Petazzoni
2014-09-11 10:08       ` Thomas Petazzoni
2014-09-11 10:20         ` Arnd Bergmann
  -- strict thread matches above, loose matches on Subject: below --
2014-11-19 14:40 [PATCH 1/2] ARM: cache-l2x0: clean up aurora cache handling Arnd Bergmann
2014-11-19 14:50 ` Russell King - ARM Linux
2014-11-19 15:06   ` Arnd Bergmann
2014-11-19 15:10     ` Arnd Bergmann

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=20140911101649.GI12361@n2100.arm.linux.org.uk \
    --to=linux@arm.linux.org.uk \
    --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).