devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Russell King - ARM Linux <linux@arm.linux.org.uk>
To: Linus Walleij <linus.walleij@linaro.org>
Cc: linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org,
	linux-leds@vger.kernel.org, linux-pm@vger.kernel.org,
	Mark Rutland <mark.rutland@arm.com>,
	Rob Herring <robh@kernel.org>,
	Florian Fainelli <f.fainelli@gmail.com>,
	Arnd Bergmann <arnd@arndb.de>, Pawel Moll <pawel.moll@arm.com>,
	Marc Zyngier <marc.zyngier@arm.com>,
	Will Deacon <will.deacon@arm.com>
Subject: Re: [PATCH 7/8] ARM: l2x0: support associativity from DT
Date: Tue, 2 Sep 2014 14:17:29 +0100	[thread overview]
Message-ID: <20140902131729.GQ30401@n2100.arm.linux.org.uk> (raw)
In-Reply-To: <1409659354-23553-8-git-send-email-linus.walleij@linaro.org>

On Tue, Sep 02, 2014 at 02:02:33PM +0200, Linus Walleij wrote:
> The ARM RealView platforms comes with boot loaders that fail
> to set up cache size, ways and associativity correctly. This
> complements Florian's patch to set up cache size and sets from
> the device tree with the possibility to set up associativity
> on the L2C-220 cache variant.

Do we need this?

If we have the cache size, the number of sets, and the cache block size
(cache line size) which are all ePAPR specified properties for a cache,
then:

	number of cache blocks = cache size / cache block size
	ways of associativity = number of cache blocks / number of sets
	way size = cache block size * number of sets

It's a tad annoying to have to convert between the two representations,
but ePAPR decided on size, sets and block size rather than size and
ways.

See arch/powerpc/kernel/cacheinfo.c line 260 for the powerpc
associativity calculations from these values.

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

  reply	other threads:[~2014-09-02 13:17 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-02 12:02 [PATCH 0/8] ARM RealView DeviceTree support v5 Linus Walleij
2014-09-02 12:02 ` [PATCH 1/8 v2] leds: add a driver for syscon-based LEDs Linus Walleij
2014-09-02 12:02 ` [PATCH 2/8 v2] leds: add device tree bindings for register bit LEDs Linus Walleij
2014-09-02 12:24   ` Arnd Bergmann
2014-09-08 11:25     ` Linus Walleij
2014-09-02 14:22   ` Geert Uytterhoeven
2014-09-08 11:14     ` Linus Walleij
2014-09-02 12:02 ` [PATCH 3/8 v2] power: reset: driver for the Versatile syscon reboot Linus Walleij
2014-09-02 12:32   ` Arnd Bergmann
2014-09-02 12:02 ` [PATCH 4/8] soc: add driver for the ARM RealView Linus Walleij
2014-09-02 12:02 ` [PATCH 5/8] ARM: l2x0: move DT parsing for cache props Linus Walleij
2014-09-02 12:43   ` Russell King - ARM Linux
2014-09-05 11:10     ` Linus Walleij
2014-09-02 12:02 ` [PATCH 6/8] ARM: l2c: parse 'cache-size' and 'cache-sets' properties Linus Walleij
2014-09-02 12:02 ` [PATCH 7/8] ARM: l2x0: support associativity from DT Linus Walleij
2014-09-02 13:17   ` Russell King - ARM Linux [this message]
2014-09-02 12:02 ` [PATCH 8/8 v5] ARM: realview: basic device tree implementation Linus Walleij
2014-09-02 12:37   ` 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=20140902131729.GQ30401@n2100.arm.linux.org.uk \
    --to=linux@arm.linux.org.uk \
    --cc=arnd@arndb.de \
    --cc=devicetree@vger.kernel.org \
    --cc=f.fainelli@gmail.com \
    --cc=linus.walleij@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-leds@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=marc.zyngier@arm.com \
    --cc=mark.rutland@arm.com \
    --cc=pawel.moll@arm.com \
    --cc=robh@kernel.org \
    --cc=will.deacon@arm.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).