mirror of
https://github.com/torvalds/linux.git
synced 2026-05-22 22:22:08 +02:00
x86/resctrl: Move the filesystem bits to headers visible to fs/resctrl
Once the filesystem parts of resctrl move to fs/resctrl, it cannot rely on definitions in x86's internal.h. Move definitions in internal.h that need to be shared between the filesystem and architecture code to header files that fs/resctrl can include. Doing this separately means the filesystem code only moves between files of the same name, instead of having these changes mixed in too. Co-developed-by: Dave Martin <Dave.Martin@arm.com> Signed-off-by: Dave Martin <Dave.Martin@arm.com> Signed-off-by: James Morse <james.morse@arm.com> Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de> Reviewed-by: Shaopeng Tan <tan.shaopeng@jp.fujitsu.com> Reviewed-by: Tony Luck <tony.luck@intel.com> Reviewed-by: Fenghua Yu <fenghuay@nvidia.com> Reviewed-by: Reinette Chatre <reinette.chatre@intel.com> Tested-by: Fenghua Yu <fenghuay@nvidia.com> Tested-by: Carl Worth <carl@os.amperecomputing.com> # arm64 Tested-by: Shaopeng Tan <tan.shaopeng@jp.fujitsu.com> Tested-by: Peter Newman <peternewman@google.com> Tested-by: Amit Singh Tomar <amitsinght@marvell.com> # arm64 Tested-by: Shanker Donthineni <sdonthineni@nvidia.com> # arm64 Tested-by: Babu Moger <babu.moger@amd.com> Tested-by: Tony Luck <tony.luck@intel.com> Link: https://lore.kernel.org/20250515165855.31452-17-james.morse@arm.com
This commit is contained in:
parent
bff70402d6
commit
3d95a49b36
|
|
@ -16,8 +16,6 @@
|
|||
#define CQM_LIMBOCHECK_INTERVAL 1000
|
||||
|
||||
#define MBM_CNTR_WIDTH_BASE 24
|
||||
#define MBM_OVERFLOW_INTERVAL 1000
|
||||
#define MAX_MBA_BW 100u
|
||||
#define MBA_IS_LINEAR 0x4
|
||||
#define MBM_CNTR_WIDTH_OFFSET_AMD 20
|
||||
|
||||
|
|
@ -396,13 +394,6 @@ extern struct rdtgroup rdtgroup_default;
|
|||
extern struct dentry *debugfs_resctrl;
|
||||
extern enum resctrl_event_id mba_mbps_default_event;
|
||||
|
||||
static inline bool resctrl_arch_get_cdp_enabled(enum resctrl_res_level l)
|
||||
{
|
||||
return rdt_resources_all[l].cdp_enabled;
|
||||
}
|
||||
|
||||
int resctrl_arch_set_cdp_enabled(enum resctrl_res_level l, bool enable);
|
||||
|
||||
void arch_mon_domain_online(struct rdt_resource *r, struct rdt_mon_domain *d);
|
||||
|
||||
/* CPUID.(EAX=10H, ECX=ResID=1).EAX */
|
||||
|
|
|
|||
|
|
@ -2541,6 +2541,11 @@ int resctrl_arch_set_cdp_enabled(enum resctrl_res_level l, bool enable)
|
|||
return 0;
|
||||
}
|
||||
|
||||
bool resctrl_arch_get_cdp_enabled(enum resctrl_res_level l)
|
||||
{
|
||||
return rdt_resources_all[l].cdp_enabled;
|
||||
}
|
||||
|
||||
/*
|
||||
* We don't allow rdtgroup directories to be created anywhere
|
||||
* except the root directory. Thus when looking for the rdtgroup
|
||||
|
|
|
|||
|
|
@ -403,6 +403,9 @@ static inline u32 resctrl_get_config_index(u32 closid,
|
|||
}
|
||||
}
|
||||
|
||||
bool resctrl_arch_get_cdp_enabled(enum resctrl_res_level l);
|
||||
int resctrl_arch_set_cdp_enabled(enum resctrl_res_level l, bool enable);
|
||||
|
||||
/*
|
||||
* Update the ctrl_val and apply this config right now.
|
||||
* Must be called on one of the domain's CPUs.
|
||||
|
|
|
|||
|
|
@ -7,6 +7,9 @@
|
|||
#ifndef __LINUX_RESCTRL_TYPES_H
|
||||
#define __LINUX_RESCTRL_TYPES_H
|
||||
|
||||
#define MAX_MBA_BW 100u
|
||||
#define MBM_OVERFLOW_INTERVAL 1000
|
||||
|
||||
/* Reads to Local DRAM Memory */
|
||||
#define READS_TO_LOCAL_MEM BIT(0)
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user