Commit 757b227f authored by James Morse's avatar James Morse Committed by Yang Yingliang
Browse files

cacheinfo: Provide a helper to find a cacheinfo leaf



hulk inclusion
category: feature
bugzilla: 34278
CVE: NA

-------------------------------------------------

To provide a reasonable threshold for a measure of cache-usage, MPAM
would like to keep track of the largest cache it has seen.

Provide a helper that takes a cpu and a cache-level, and returns
the corresponding leaf. This only works for unified caches.

Callers must hold the cpus_read_lock() to prevent the leaf being
free()d.

Conflicts:
  include/linux/cacheinfo.h
[Wang ShaoBo: fix a little conflicts and validate info_list]

Signed-off-by: default avatarJames Morse <james.morse@arm.com>
Link: http://www.linux-arm.org/git?p=linux-jm.git;a=patch;h=c9972f21aa19762dc6acf14c45f0d534fb4147da


Signed-off-by: default avatarWang ShaoBo <bobo.shaobowang@huawei.com>
Reviewed-by: default avatarXiongfeng Wang <wangxiongfeng2@huawei.com>
Reviewed-by: default avatarCheng Jian <cj.chengjian@huawei.com>
Signed-off-by: default avatarYang Yingliang <yangyingliang@huawei.com>
Signed-off-by: default avatarCheng Jian <cj.chengjian@huawei.com>
parent 73d5cd42
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment