Skip to content

Commit be6f885

Browse files
nathanlynchmpe
authored andcommitted
powerpc/cacheinfo: Use name@unit instead of full DT path in debug messages
We know that every OF node we deal with in this code is under /cpus, so we can make the debug messages a little less verbose without losing information. E.g. cacheinfo: creating L1 dcache and icache for /cpus/PowerPC,POWER8@0 cacheinfo: creating L2 ucache for /cpus/l2-cache@2006 cacheinfo: creating L3 ucache for /cpus/l3-cache@3106 becomes cacheinfo: creating L1 dcache and icache for PowerPC,POWER8@0 cacheinfo: creating L2 ucache for l2-cache@2006 cacheinfo: creating L3 ucache for l3-cache@3106 Replace all '%pOF' specifiers with '%pOFP'. Signed-off-by: Nathan Lynch <[email protected]> Signed-off-by: Michael Ellerman <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent e2b3c16 commit be6f885

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

arch/powerpc/kernel/cacheinfo.c

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ static void release_cache_debugcheck(struct cache *cache)
168168

169169
list_for_each_entry(iter, &cache_list, list)
170170
WARN_ONCE(iter->next_local == cache,
171-
"cache for %pOF(%s) refers to cache for %pOF(%s)\n",
171+
"cache for %pOFP(%s) refers to cache for %pOFP(%s)\n",
172172
iter->ofnode,
173173
cache_type_string(iter),
174174
cache->ofnode,
@@ -180,7 +180,7 @@ static void release_cache(struct cache *cache)
180180
if (!cache)
181181
return;
182182

183-
pr_debug("freeing L%d %s cache for %pOF\n", cache->level,
183+
pr_debug("freeing L%d %s cache for %pOFP\n", cache->level,
184184
cache_type_string(cache), cache->ofnode);
185185

186186
release_cache_debugcheck(cache);
@@ -195,7 +195,7 @@ static void cache_cpu_set(struct cache *cache, int cpu)
195195

196196
while (next) {
197197
WARN_ONCE(cpumask_test_cpu(cpu, &next->shared_cpu_map),
198-
"CPU %i already accounted in %pOF(%s)\n",
198+
"CPU %i already accounted in %pOFP(%s)\n",
199199
cpu, next->ofnode,
200200
cache_type_string(next));
201201
cpumask_set_cpu(cpu, &next->shared_cpu_map);
@@ -354,7 +354,7 @@ static int cache_is_unified_d(const struct device_node *np)
354354

355355
static struct cache *cache_do_one_devnode_unified(struct device_node *node, int level)
356356
{
357-
pr_debug("creating L%d ucache for %pOF\n", level, node);
357+
pr_debug("creating L%d ucache for %pOFP\n", level, node);
358358

359359
return new_cache(cache_is_unified_d(node), level, node);
360360
}
@@ -364,7 +364,7 @@ static struct cache *cache_do_one_devnode_split(struct device_node *node,
364364
{
365365
struct cache *dcache, *icache;
366366

367-
pr_debug("creating L%d dcache and icache for %pOF\n", level,
367+
pr_debug("creating L%d dcache and icache for %pOFP\n", level,
368368
node);
369369

370370
dcache = new_cache(CACHE_TYPE_DATA, level, node);
@@ -746,13 +746,13 @@ static void cacheinfo_create_index_opt_attrs(struct cache_index_dir *dir)
746746
rc = attr->show(&dir->kobj, attr, buf);
747747
if (rc <= 0) {
748748
pr_debug("not creating %s attribute for "
749-
"%pOF(%s) (rc = %zd)\n",
749+
"%pOFP(%s) (rc = %zd)\n",
750750
attr->attr.name, cache->ofnode,
751751
cache_type, rc);
752752
continue;
753753
}
754754
if (sysfs_create_file(&dir->kobj, &attr->attr))
755-
pr_debug("could not create %s attribute for %pOF(%s)\n",
755+
pr_debug("could not create %s attribute for %pOFP(%s)\n",
756756
attr->attr.name, cache->ofnode, cache_type);
757757
}
758758

@@ -868,7 +868,7 @@ static void cache_cpu_clear(struct cache *cache, int cpu)
868868
struct cache *next = cache->next_local;
869869

870870
WARN_ONCE(!cpumask_test_cpu(cpu, &cache->shared_cpu_map),
871-
"CPU %i not accounted in %pOF(%s)\n",
871+
"CPU %i not accounted in %pOFP(%s)\n",
872872
cpu, cache->ofnode,
873873
cache_type_string(cache));
874874

0 commit comments

Comments
 (0)