]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
x86/resctrl: Introduce resctrl_file_fflags_init() to initialize fflags
authorBabu Moger <babu.moger@amd.com>
Fri, 6 Dec 2024 16:31:41 +0000 (08:31 -0800)
committerBorislav Petkov (AMD) <bp@alien8.de>
Mon, 9 Dec 2024 20:37:01 +0000 (21:37 +0100)
commit2937f9c361f7a8b230cd599e4af5264798bf4ce7
tree3c4cc7c238d78e516a8b93de399dfbcd521a9724
parent135eef38d7e081303fd9cdb982b37fcad32f9be0
x86/resctrl: Introduce resctrl_file_fflags_init() to initialize fflags

thread_throttle_mode_init() and mbm_config_rftype_init() both initialize
fflags for resctrl files.

Adding new files will involve adding another function to initialize
the fflags. This can be simplified by adding a new function
resctrl_file_fflags_init() and passing the file name and flags
to be initialized.

Consolidate fflags initialization into resctrl_file_fflags_init() and
remove thread_throttle_mode_init() and mbm_config_rftype_init().

  [ Tony: Drop __init attribute so resctrl_file_fflags_init() can be used at
    run time. ]

Signed-off-by: Babu Moger <babu.moger@amd.com>
Signed-off-by: Tony Luck <tony.luck@intel.com>
Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de>
Reviewed-by: Reinette Chatre <reinette.chatre@intel.com>
Link: https://lore.kernel.org/r/20241206163148.83828-2-tony.luck@intel.com
arch/x86/kernel/cpu/resctrl/core.c
arch/x86/kernel/cpu/resctrl/internal.h
arch/x86/kernel/cpu/resctrl/monitor.c
arch/x86/kernel/cpu/resctrl/rdtgroup.c