]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
x86/resctrl: Move enum resctrl_event_id to resctrl.h
authorJames Morse <james.morse@arm.com>
Thu, 15 May 2025 16:58:47 +0000 (16:58 +0000)
committerBorislav Petkov (AMD) <bp@alien8.de>
Fri, 16 May 2025 10:10:20 +0000 (12:10 +0200)
resctrl_types.h contains common types and constants to enable architectures
to use these types in their definitions within asm/resctrl.h.

enum resctrl_event_id was placed in resctrl_types.h for
resctrl_arch_get_cdp_enabled() and resctrl_arch_set_cdp_enabled(), but
these two functions are no longer inlined by any architecture.

Move enum resctrl_event_id to resctrl.h.

Signed-off-by: James Morse <james.morse@arm.com>
Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de>
Reviewed-by: Reinette Chatre <reinette.chatre@intel.com>
Reviewed-by: Fenghua Yu <fenghuay@nvidia.com>
Tested-by: Fenghua Yu <fenghuay@nvidia.com>
Tested-by: Babu Moger <babu.moger@amd.com>
Tested-by: Shaopeng Tan <tan.shaopeng@jp.fujitsu.com>
Tested-by: Tony Luck <tony.luck@intel.com>
Link: https://lore.kernel.org/20250515165855.31452-18-james.morse@arm.com
include/linux/resctrl.h
include/linux/resctrl_types.h

index b9d1f2916e9cc2221efed9ca1d6531fc3af05789..5ef972cbf56be5e5474325d5e14b2e28a4700b93 100644 (file)
@@ -48,6 +48,16 @@ int proc_resctrl_show(struct seq_file *m,
        for_each_rdt_resource((r))                                            \
                if ((r)->mon_capable)
 
+enum resctrl_res_level {
+       RDT_RESOURCE_L3,
+       RDT_RESOURCE_L2,
+       RDT_RESOURCE_MBA,
+       RDT_RESOURCE_SMBA,
+
+       /* Must be the last */
+       RDT_NUM_RESOURCES,
+};
+
 /**
  * enum resctrl_conf_type - The type of configuration.
  * @CDP_NONE:  No prioritisation, both code and data are controlled or monitored.
index a66e7936943e9360f75f4438b0a0846eafeb5bb9..a25fb9c4070d3cc509298df519f7078cd124b4cd 100644 (file)
 /* Max event bits supported */
 #define MAX_EVT_CONFIG_BITS            GENMASK(6, 0)
 
-enum resctrl_res_level {
-       RDT_RESOURCE_L3,
-       RDT_RESOURCE_L2,
-       RDT_RESOURCE_MBA,
-       RDT_RESOURCE_SMBA,
-
-       /* Must be the last */
-       RDT_NUM_RESOURCES,
-};
-
 /*
  * Event IDs, the values match those used to program IA32_QM_EVTSEL before
  * reading IA32_QM_CTR on RDT systems.