diff options
author | Babu Moger <babu.moger@amd.com> | 2022-09-27 23:16:36 +0300 |
---|---|---|
committer | Borislav Petkov <bp@suse.de> | 2022-10-24 11:30:29 +0300 |
commit | 2d4daa549c17b6ba4845a751c7a78d3b2419d78f (patch) | |
tree | ab16843269cc982c7a92c8c3510a3858e5bc35d1 /arch/x86/kernel/cpu/resctrl/ctrlmondata.c | |
parent | 247f34f7b80357943234f93f247a1ae6b6c3a740 (diff) | |
download | linux-2d4daa549c17b6ba4845a751c7a78d3b2419d78f.tar.xz |
x86/resctrl: Remove arch_has_empty_bitmaps
The field arch_has_empty_bitmaps is not required anymore. The field
min_cbm_bits is enough to validate the CBM (capacity bit mask) if the
architecture can support the zero CBM or not.
Suggested-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: Babu Moger <babu.moger@amd.com>
Signed-off-by: Borislav Petkov <bp@suse.de>
Reviewed-by: Reinette Chatre <reinette.chatre@intel.com>
Reviewed-by: Fenghua Yu <fenghua.yu@intel.com>
Link: https://lore.kernel.org/r/166430979654.372014.615622285687642644.stgit@bmoger-ubuntu
Diffstat (limited to 'arch/x86/kernel/cpu/resctrl/ctrlmondata.c')
-rw-r--r-- | arch/x86/kernel/cpu/resctrl/ctrlmondata.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/arch/x86/kernel/cpu/resctrl/ctrlmondata.c b/arch/x86/kernel/cpu/resctrl/ctrlmondata.c index 1dafbdc5ac31..1df0e3262bca 100644 --- a/arch/x86/kernel/cpu/resctrl/ctrlmondata.c +++ b/arch/x86/kernel/cpu/resctrl/ctrlmondata.c @@ -105,8 +105,7 @@ static bool cbm_validate(char *buf, u32 *data, struct rdt_resource *r) return false; } - if ((!r->cache.arch_has_empty_bitmaps && val == 0) || - val > r->default_ctrl) { + if ((r->cache.min_cbm_bits > 0 && val == 0) || val > r->default_ctrl) { rdt_last_cmd_puts("Mask out of range\n"); return false; } |