Re: [PATCH v11 2/8] x86/resctrl: Prepare for per-CTRL_MON group mba_MBps control

Borislav Petkov
2024-12-10T10:14:05Z

On Mon, Dec 09, 2024 at 04:00:54PM -0800, Luck, Tony wrote:
> Reinette is right. The post-split home of this is not <linux/resctrl.h>
> but fs/resctrl/internal.h which doesn't exist yet.
>
> So Boris is right, this declaration should be added to arch/x86/kernel/cpu/resctrl/internal.h
> by this patch to be moved later.

Done:

diff --git a/arch/x86/kernel/cpu/resctrl/internal.h b/arch/x86/kernel/cpu/resctrl/internal.h
index 485800055a7d..542d01c055aa 100644
--- a/arch/x86/kernel/cpu/resctrl/internal.h
+++ b/arch/x86/kernel/cpu/resctrl/internal.h
@@ -510,6 +510,7 @@ extern struct mutex rdtgroup_mutex;
extern struct rdt_hw_resource rdt_resources_all[];
extern struct rdtgroup rdtgroup_default;
extern struct dentry *debugfs_resctrl;
+extern enum resctrl_event_id mba_mbps_default_event;

enum resctrl_res_level {
RDT_RESOURCE_L3,
@@ -653,5 +654,4 @@ void resctrl_file_fflags_init(const char *config, unsigned long fflags);
void rdt_staged_configs_clear(void);
bool closid_allocated(unsigned int closid);
int resctrl_find_cleanest_closid(void);
-
#endif /* _ASM_X86_RESCTRL_INTERNAL_H */
diff --git a/include/linux/resctrl.h b/include/linux/resctrl.h
index fd05b937e2f4..d94abba1c716 100644
--- a/include/linux/resctrl.h
+++ b/include/linux/resctrl.h
@@ -49,8 +49,6 @@ enum resctrl_event_id {
QOS_L3_MBM_LOCAL_EVENT_ID = 0x03,
};

-extern enum resctrl_event_id mba_mbps_default_event;
-
/**
* struct resctrl_staged_config - parsed configuration to be applied
* @new_ctrl: new ctrl value to be loaded

--
Regards/Gruss,
Boris.