linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Russell King - ARM Linux <linux@arm.linux.org.uk>
To: Mark Rutland <mark.rutland@arm.com>
Cc: Tomasz Figa <tomasz.figa@gmail.com>,
	Marek Szyprowski <m.szyprowski@samsung.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"linux-arm-kernel@lists.infradead.org" 
	<linux-arm-kernel@lists.infradead.org>,
	"linux-samsung-soc@vger.kernel.org" 
	<linux-samsung-soc@vger.kernel.org>,
	Kukjin Kim <kgene.kim@samsung.com>,
	"lauraa@codeaurora.org" <lauraa@codeaurora.org>,
	"tony@atomide.com" <tony@atomide.com>,
	"linus.walleij@linaro.org" <linus.walleij@linaro.org>,
	"drake@endlessm.com" <drake@endlessm.com>,
	"loeliger@gmail.com" <loeliger@gmail.com>,
	Kyungmin Park <kyungmin.park@samsung.com>,
	"santosh.shilimkar@ti.com" <santosh.shilimkar@ti.com>,
	"linux-omap@vger.kernel.org" <linux-omap@vger.kernel.org>
Subject: Re: [PATCH v5 4/7] ARM: l2c: Add support for overriding prefetch settings
Date: Wed, 24 Sep 2014 23:12:20 +0100	[thread overview]
Message-ID: <20140924221220.GJ12379@n2100.arm.linux.org.uk> (raw)
In-Reply-To: <20140924121051.GF5729@leverpostej>

On Wed, Sep 24, 2014 at 01:10:51PM +0100, Mark Rutland wrote:
> On Wed, Sep 24, 2014 at 12:19:45PM +0100, Tomasz Figa wrote:
> > On 24.09.2014 13:14, Mark Rutland wrote:
> > > I'm not too keen on tristate properties. Is this level of flexibility
> > > really required?

I would say that we need a way to enable _and_ disable these features,
because:

1. When we converted the L2 code to DT, no one thought about creating
   a full and proper DT specification for the L2 code.  So, we have the
   situation today where platform code (and firmware code) enables or
   disables these features depending on platform knowledge.

2. If we are going to specify these options as a boolean-enable value,
   this implies that the lack of the boolean disables the option.
   We have pre-existing DT files which do not contain this option, but
   the platform may rely on the feature being enabled.

This is precisely the kind of mess that happens when incomplete DT
bindings are accepted.  DT bindings for any device should be _full_
bindings from the start, and not a half-hearted attempt at the job.

As much as we don't like tristate properties, we only have ourselves to
blame for them becoming a necessity in cases like this.

> With the lack of warnings for present but empty properties, I can forsee
> people placing empty properties (as the names make them sound like
> booleans which enable features).
> 
> Surely for enabling/disabling options we should only need to override
> one-way, disabling a feature that causes breakage for some reason?
> Otherwise we can keep the reset value (which might be sub-optimal).

What if enabling prefetching on an existing platform causes a failure?
That's a regression on a previously working DT file, and needing a DT
update to resolve.

The obvious alternative is we have two properties per feature - one
boolean to enable, and one boolean to disable the feature.  We already
have a number of negative properties because of exactly the same
problem I mention above (where the driver has assumed defaults for one
platform which are not appropriate for all platforms.)

> > As for why they cause crashes, I'm not an expert if it is about L2C
> > internals, so I can't really tell, but apparently the cache can work
> > correctly only on certain settings.
> 
> Likewise, I'm no expert on the l2x0 family. It would be nice to know if
> this justs masks an issue elsewhere in Linux, is required for some
> reason by the interconnect, etc. I guess we don't have enough
> information to figure that out.

No, it would be nice to have some errata information...

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

  reply	other threads:[~2014-09-24 22:12 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-24 11:05 [PATCH v5 0/7] Enable L2 cache support on Exynos4210/4x12 SoCs Marek Szyprowski
2014-09-24 11:05 ` [PATCH v5 1/7] ARM: l2c: Refactor the driver to use commit-like interface Marek Szyprowski
2014-09-24 11:05 ` [PATCH v5 2/7] ARM: l2c: Add interface to ask hypervisor to configure L2C Marek Szyprowski
2014-09-24 11:05 ` [PATCH v5 3/7] ARM: l2c: Get outer cache .write_sec callback from mach_desc only if not NULL Marek Szyprowski
2014-09-24 11:05 ` [PATCH v5 4/7] ARM: l2c: Add support for overriding prefetch settings Marek Szyprowski
2014-09-24 11:14   ` Mark Rutland
2014-09-24 11:19     ` Tomasz Figa
2014-09-24 12:10       ` Mark Rutland
2014-09-24 22:12         ` Russell King - ARM Linux [this message]
2014-09-24 11:05 ` [PATCH v5 5/7] ARM: EXYNOS: Add .write_sec outer cache callback for L2C-310 Marek Szyprowski
2014-09-24 11:05 ` [PATCH v5 6/7] ARM: EXYNOS: Add support for non-secure L2X0 resume Marek Szyprowski
2014-09-24 11:05 ` [PATCH v5 7/7] ARM: dts: exynos4: Add nodes for L2 cache controller Marek Szyprowski
2015-01-14 15:46 ` [PATCH v5 0/7] Enable L2 cache support on Exynos4210/4x12 SoCs Alexandre Belloni
2015-01-14 16:21   ` Russell King - ARM Linux
2015-01-14 16:49     ` Alexandre Belloni

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=20140924221220.GJ12379@n2100.arm.linux.org.uk \
    --to=linux@arm.linux.org.uk \
    --cc=drake@endlessm.com \
    --cc=kgene.kim@samsung.com \
    --cc=kyungmin.park@samsung.com \
    --cc=lauraa@codeaurora.org \
    --cc=linus.walleij@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=linux-samsung-soc@vger.kernel.org \
    --cc=loeliger@gmail.com \
    --cc=m.szyprowski@samsung.com \
    --cc=mark.rutland@arm.com \
    --cc=santosh.shilimkar@ti.com \
    --cc=tomasz.figa@gmail.com \
    --cc=tony@atomide.com \
    /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).