x86/intel_rdt: Global closid helper to support future fixes
authorReinette Chatre <reinette.chatre@intel.com>
Sat, 15 Sep 2018 21:58:21 +0000 (14:58 -0700)
committerThomas Gleixner <tglx@linutronix.de>
Tue, 18 Sep 2018 21:38:05 +0000 (23:38 +0200)
commitc793da8e4c62d2c002a79c47f44efead450cbcae
tree1b8fd80feb2d6b6ccf770a0a2573cdf17655068a
parentf968dc119a159a95628a20de2a2dcc913d0a82d7
x86/intel_rdt: Global closid helper to support future fixes

The number of CLOSIDs supported by a system is the minimum number of
CLOSIDs supported by any of its resources. Care should be taken when
iterating over the CLOSIDs of a resource since it may be that the number
of CLOSIDs supported on the system is less than the number of CLOSIDs
supported by the resource.

Introduce a helper function that can be used to query the number of
CLOSIDs that is supported by all resources, irrespective of how many
CLOSIDs are supported by a particular resource.

Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: Fenghua Yu <fenghua.yu@intel.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: "H Peter Anvin" <hpa@zytor.com>
Cc: "Tony Luck" <tony.luck@intel.com>
Cc: "Xiaochen Shen" <xiaochen.shen@intel.com>
Cc: "Chen Yu" <yu.c.chen@intel.com>
Link: https://lkml.kernel.org/r/1537048707-76280-4-git-send-email-fenghua.yu@intel.com
arch/x86/kernel/cpu/intel_rdt.h
arch/x86/kernel/cpu/intel_rdt_rdtgroup.c