]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/commit - drivers/base/cacheinfo.c
cacheinfo: Introduce cache id
authorFenghua Yu <fenghua.yu@intel.com>
Sat, 22 Oct 2016 13:19:49 +0000 (06:19 -0700)
committerThomas Gleixner <tglx@linutronix.de>
Wed, 26 Oct 2016 21:12:37 +0000 (23:12 +0200)
commite9a2ea5a1ba09c35258f3663842fb8d8cf2e00c2
tree07a86bc4db32b68dbaca07a62c54b2f14e19db59
parent1d78dc59f5ab6f467e49882518453adc7e4caa44
cacheinfo: Introduce cache id

Cache management software needs an id for each instance of a cache of
a particular type.

The current cacheinfo structure does not provide any information about
the underlying hardware so there is no way to expose it.

Hardware with cache management features provides means (cpuid, enumeration
etc.) to retrieve the hardware id of a particular cache instance. Cache
instances which share hardware have the same hardware id.

Add an 'id' field to struct cacheinfo to store this information. Expose
this information under the /sys/devices/system/cpu/cpu*/cache/index*/
directory as well.

Signed-off-by: Fenghua Yu <fenghua.yu@intel.com>
Cc: "Ravi V Shankar" <ravi.v.shankar@intel.com>
Cc: "Tony Luck" <tony.luck@intel.com>
Cc: "David Carrillo-Cisneros" <davidcc@google.com>
Cc: "Sai Prakhya" <sai.praneeth.prakhya@intel.com>
Cc: "Peter Zijlstra" <peterz@infradead.org>
Cc: "Stephane Eranian" <eranian@google.com>
Cc: "Dave Hansen" <dave.hansen@intel.com>
Cc: "Shaohua Li" <shli@fb.com>
Cc: "Nilay Vaish" <nilayvaish@gmail.com>
Cc: "Vikas Shivappa" <vikas.shivappa@linux.intel.com>
Cc: "Ingo Molnar" <mingo@elte.hu>
Cc: "Borislav Petkov" <bp@suse.de>
Cc: "H. Peter Anvin" <h.peter.anvin@intel.com>
Link: http://lkml.kernel.org/r/1477142405-32078-3-git-send-email-fenghua.yu@intel.com
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
drivers/base/cacheinfo.c
include/linux/cacheinfo.h