summaryrefslogtreecommitdiff
path: root/include/linux/resctrl.h
diff options
context:
space:
mode:
authorJames Morse <james.morse@arm.com>2024-02-13 21:44:36 +0300
committerBorislav Petkov (AMD) <bp@alien8.de>2024-02-16 21:18:33 +0300
commit258c91e84fedc789353a35ad91d827a9111d3cbd (patch)
tree8436190af8021e0d31007996fdd20845d0566e54 /include/linux/resctrl.h
parent978fcca954cb52249babbc14e53de53c88dd6433 (diff)
downloadlinux-258c91e84fedc789353a35ad91d827a9111d3cbd.tar.xz
x86/resctrl: Add CPU offline callback for resctrl work
The resctrl architecture specific code may need to free a domain when a CPU goes offline, it also needs to reset the CPUs PQR_ASSOC register. Amongst other things, the resctrl filesystem code needs to clear this CPU from the cpu_mask of any control and monitor groups. Currently, this is all done in core.c and called from resctrl_offline_cpu(), making the split between architecture and filesystem code unclear. Move the filesystem work to remove the CPU from the control and monitor groups into a filesystem helper called resctrl_offline_cpu(), and rename the one in core.c resctrl_arch_offline_cpu(). Signed-off-by: James Morse <james.morse@arm.com> Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de> Reviewed-by: Shaopeng Tan <tan.shaopeng@fujitsu.com> Reviewed-by: Reinette Chatre <reinette.chatre@intel.com> Reviewed-by: Babu Moger <babu.moger@amd.com> Tested-by: Shaopeng Tan <tan.shaopeng@fujitsu.com> Tested-by: Peter Newman <peternewman@google.com> Tested-by: Babu Moger <babu.moger@amd.com> Tested-by: Carl Worth <carl@os.amperecomputing.com> # arm64 Link: https://lore.kernel.org/r/20240213184438.16675-23-james.morse@arm.com Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de>
Diffstat (limited to 'include/linux/resctrl.h')
-rw-r--r--include/linux/resctrl.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/resctrl.h b/include/linux/resctrl.h
index ccbbbe5d18d3..270ff1d5c051 100644
--- a/include/linux/resctrl.h
+++ b/include/linux/resctrl.h
@@ -226,6 +226,7 @@ u32 resctrl_arch_get_config(struct rdt_resource *r, struct rdt_domain *d,
int resctrl_online_domain(struct rdt_resource *r, struct rdt_domain *d);
void resctrl_offline_domain(struct rdt_resource *r, struct rdt_domain *d);
void resctrl_online_cpu(unsigned int cpu);
+void resctrl_offline_cpu(unsigned int cpu);
/**
* resctrl_arch_rmid_read() - Read the eventid counter corresponding to rmid