x86/resctrl: Add __init attribute to rdt_get_mon_l3_config()
authorBabu Moger <babu.moger@amd.com>
Fri, 13 Jan 2023 15:20:33 +0000 (09:20 -0600)
committerBorislav Petkov (AMD) <bp@alien8.de>
Mon, 23 Jan 2023 16:40:11 +0000 (17:40 +0100)
commitbd334c86b5d70e5d1c6169991802e62c828d6f38
treedb60906c4a78f579ce6d4e4c07fb26847027d4ac
parent5b6fac3fa44bafee12e0c3d1c5cbae6d058e9c98
x86/resctrl: Add __init attribute to rdt_get_mon_l3_config()

In an upcoming change, rdt_get_mon_l3_config() needs to call rdt_cpu_has() to
query the monitor related features. It cannot be called right now because
rdt_cpu_has() has the __init attribute but rdt_get_mon_l3_config() doesn't.

Add the __init attribute to rdt_get_mon_l3_config() that is only called by
get_rdt_mon_resources() that already has the __init attribute. Also make
rdt_cpu_has() available to by rdt_get_mon_l3_config() via the internal header
file.

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