diff options
author | Reinette Chatre <reinette.chatre@intel.com> | 2020-05-06 01:36:13 +0300 |
---|---|---|
committer | Borislav Petkov <bp@suse.de> | 2020-05-06 18:51:21 +0300 |
commit | 0118ad82c2a64ebcf15d7565ed35361407efadfa (patch) | |
tree | 6f59aa6bd011a39d8952e41d46b950ef9c9587d0 /arch/x86/include/asm/resctrl.h | |
parent | 8dd97c65185c5a63c668e5bd8a861c04f47a35ed (diff) | |
download | linux-0118ad82c2a64ebcf15d7565ed35361407efadfa.tar.xz |
x86/cpu: Move resctrl CPUID code to resctrl/
The function determining a platform's support and properties of cache
occupancy and memory bandwidth monitoring (properties of
X86_FEATURE_CQM_LLC) can be found among the common CPU code. After
the feature's properties is populated in the per-CPU data the resctrl
subsystem is the only consumer (via boot_cpu_data).
Move the function that obtains the CPU information used by resctrl to
the resctrl subsystem and rename it from init_cqm() to
resctrl_cpu_detect(). The function continues to be called from the
common CPU code. This move is done in preparation of the addition of some
vendor specific code.
No functional change.
Suggested-by: Borislav Petkov <bp@suse.de>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: Borislav Petkov <bp@suse.de>
Link: https://lkml.kernel.org/r/38433b99f9d16c8f4ee796f8cc42b871531fa203.1588715690.git.reinette.chatre@intel.com
Diffstat (limited to 'arch/x86/include/asm/resctrl.h')
-rw-r--r-- | arch/x86/include/asm/resctrl.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/arch/x86/include/asm/resctrl.h b/arch/x86/include/asm/resctrl.h index 99b5728e441d..07603064df8f 100644 --- a/arch/x86/include/asm/resctrl.h +++ b/arch/x86/include/asm/resctrl.h @@ -84,9 +84,12 @@ static inline void resctrl_sched_in(void) __resctrl_sched_in(); } +void resctrl_cpu_detect(struct cpuinfo_x86 *c); + #else static inline void resctrl_sched_in(void) {} +static inline void resctrl_cpu_detect(struct cpuinfo_x86 *c) {} #endif /* CONFIG_X86_CPU_RESCTRL */ |