From: linux@arm.linux.org.uk (Russell King - ARM Linux)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] [arm l2x0] Extend cache-l2x0 to support the 16-way PL310
Date: Fri, 30 Apr 2010 20:06:33 +0100 [thread overview]
Message-ID: <20100430190633.GD1639@n2100.arm.linux.org.uk> (raw)
In-Reply-To: <1272653651-11590-2-git-send-email-jason.mcmullan@netronome.com>
On Fri, Apr 30, 2010 at 02:54:11PM -0400, Jason S. McMullan wrote:
> @@ -217,10 +217,32 @@ void __init l2x0_init(void __iomem *base, __u32 aux_val, __u32 aux_mask)
> * accessing the below registers will fault.
> */
> if (!(readl(l2x0_base + L2X0_CTRL) & 1)) {
> + int ways;
> + uint32_t cache_id;
>
> /* l2x0 controller is disabled */
> -
> + cache_id = readl(l2x0_base + L2X0_CACHE_ID);
> aux = readl(l2x0_base + L2X0_AUX_CTRL);
> +
> + /* Determine the number of ways */
> + switch (cache_id) {
> + case L2X0_CACHE_ID_PART_L310:
> + if (aux & (1 << 16))
> + ways = 16;
> + else
> + ways = 8;
> + break;
> + case L2X0_CACHE_ID_PART_L210:
> + ways = (aux >> 13) & 0xf;
> + break;
One of the things I found myself wishing for with the problems OMAP is
currently having is a means by which the "L2X0 cache controller enabled"
could be more informative about the L2 cache controller.
Maybe it should be "%s cache controller rel%u enabled". Also note that
the L210 and L220 cache controllers have different cache IDs.
L210 has a 1 in bits 9:6, and L220 is 2 in bits 9:6.
However, as for the above patch, I don't think the above code will work;
you're defining the L2X0_CACHE_ID_PART_L310 / L2X0_CACHE_ID_PART_L210
IDs to refer just to the part number field, but you're not masking off
the rest of the fields in cache_id.
next prev parent reply other threads:[~2010-04-30 19:06 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-04-30 18:54 [PATCH] Extend cache-l2x0 to support the 16-way PL310 Jason S. McMullan
2010-04-30 18:54 ` [PATCH] [arm l2x0] " Jason S. McMullan
2010-04-30 19:06 ` Russell King - ARM Linux [this message]
-- strict thread matches above, loose matches on Subject: below --
2010-04-30 19:13 [PATCH] " Jason S. McMullan
2010-04-30 19:13 ` [PATCH] [arm l2x0] " Jason S. McMullan
2010-05-04 9:10 ` Will Deacon
2010-04-30 19:22 ` Jason S. McMullan
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=20100430190633.GD1639@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).