public inbox for linuxppc-dev@ozlabs.org 
 help / color / mirror / Atom feed
From: Dave Olson <olson@cumulusnetworks•com>
To: Benjamin Herrenschmidt <benh@kernel•crashing.org>,
	Paul Mackerras <paulus@samba•org>,
	Michael Ellerman <mpe@ellerman•id.au>
Cc: linuxppc-dev@lists•ozlabs.org
Subject: [PATCH 1/1] powerpc: fix missing L2 cache size in /sys/devices/system/cpu
Date: Mon, 9 Feb 2015 14:14:21 -0800	[thread overview]
Message-ID: <20150209221421.GA22286@cumulusnetworks.com> (raw)

From: Dave Olson <olson@cumulusnetworks•com>

Fix missing L2 cache size in /sys/devices/system/cpu/cpu0/cache/index2/size
This bug appears to be introduced in 2.6.29 by 93197a36a9c16a85fb24cf5a8639f7bf9af838a3.
The missing entry caused lscpu to error out on e500v2 devices, and probably others
 error: cannot open /sys/devices/system/cpu/cpu0/cache/index2/size: No such file or directory
The DTS files we see use cache-size for the unified L2 cache size, not d-cache-size

Signed-off-by: Dave Olson <olson@cumulusnetworks•com>

---

diff --git a/arch/powerpc/kernel/cacheinfo.c b/arch/powerpc/kernel/cacheinfo.c
index 40198d5..9ca1e9a 100644
--- a/arch/powerpc/kernel/cacheinfo.c
+++ b/arch/powerpc/kernel/cacheinfo.c
@@ -72,7 +72,7 @@ static const struct cache_type_info cache_type_info[] = {
 		 * must be equal on unified caches, so just use
 		 * d-cache properties. */
 		.name            = "Unified",
-		.size_prop       = "d-cache-size",
+		.size_prop       = "cache-size",
 		.line_size_props = { "d-cache-line-size",
 				     "d-cache-block-size", },
 		.nr_sets_prop    = "d-cache-sets",

             reply	other threads:[~2015-02-09 22:14 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-09 22:14 Dave Olson [this message]
2015-02-09 23:33 ` [PATCH 1/1] powerpc: fix missing L2 cache size in /sys/devices/system/cpu Michael Ellerman
2015-02-09 23:43   ` Dave Olson
2015-02-10  0:12     ` Benjamin Herrenschmidt
2015-02-10  3:30       ` Michael Ellerman
2015-02-10  8:00       ` Dave Olson
2015-02-10  8:14         ` Benjamin Herrenschmidt
2015-02-10 16:55           ` Dave Olson
2015-02-10 19:45             ` Benjamin Herrenschmidt

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=20150209221421.GA22286@cumulusnetworks.com \
    --to=olson@cumulusnetworks$(echo .)com \
    --cc=benh@kernel$(echo .)crashing.org \
    --cc=linuxppc-dev@lists$(echo .)ozlabs.org \
    --cc=mpe@ellerman$(echo .)id.au \
    --cc=paulus@samba$(echo .)org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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