OSDN Git Service

powerpc/cacheinfo: Add per cpu per index shared_cpu_list
authorSrikar Dronamraju <srikar@linux.vnet.ibm.com>
Mon, 29 Jun 2020 10:37:03 +0000 (16:07 +0530)
committerMichael Ellerman <mpe@ellerman.id.au>
Wed, 15 Jul 2020 01:07:20 +0000 (11:07 +1000)
commita87a77cb947cc9fc89f0dad51aeee66a61cc7fc4
tree99bb82f7e22378610d006f3e74d7d3d37978ada4
parent74b7492e417812ea0f5002e210e2ac07a5728d17
powerpc/cacheinfo: Add per cpu per index shared_cpu_list

Unlike drivers/base/cacheinfo, powerpc cacheinfo code is not exposing
shared_cpu_list under /sys/devices/system/cpu/cpu<n>/cache/index<m>

Add shared_cpu_list to per cpu per index directory to maintain parity
with x86. Some scripts (example: mmtests
https://github.com/gormanm/mmtests) seem to be looking for
shared_cpu_list instead of shared_cpu_map.

Before this patch:
  # ls /sys/devices/system/cpu0/cache/index1
  coherency_line_size  number_of_sets  size  ways_of_associativity
  level                shared_cpu_map  type
  # cat /sys/devices/system/cpu0/cache/index1/shared_cpu_map
  00ff
  #

After this patch:
  # ls /sys/devices/system/cpu0/cache/index1
  coherency_line_size  number_of_sets   shared_cpu_map  type
  level                shared_cpu_list  size            ways_of_associativity
  # cat /sys/devices/system/cpu0/cache/index1/shared_cpu_map
  00ff
  # cat /sys/devices/system/cpu0/cache/index1/shared_cpu_list
  0-7
  #

Signed-off-by: Srikar Dronamraju <srikar@linux.vnet.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20200629103703.4538-4-srikar@linux.vnet.ibm.com
arch/powerpc/kernel/cacheinfo.c