[PATCH 1/1] powerpc: fix missing L2 cache size in /sys/devices/system/cpu

Dave Olson olson at cumulusnetworks.com
Tue Feb 10 09:14:21 AEDT 2015


From: Dave Olson <olson at 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 at 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",



More information about the Linuxppc-dev mailing list