summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorTony Luck <tony.luck@intel.com>2026-01-08 09:42:25 -0800
committerBorislav Petkov (AMD) <bp@alien8.de>2026-01-09 16:36:34 +0100
commit39208e73a40e0e81a5b12ddc11157c0a414df307 (patch)
tree2456161c8e9d74c07d7237404fafc14b01d214ee /include/linux
parente37c9a3dc9f9645532780d5ef34ea3b8fcf9ddef (diff)
x86,fs/resctrl: Add an architectural hook called for first mount
Enumeration of Intel telemetry events is an asynchronous process involving several mutually dependent drivers added as auxiliary devices during the device_initcall() phase of Linux boot. The process finishes after the probe functions of these drivers completes. But this happens after resctrl_arch_late_init() is executed. Tracing the enumeration process shows that it does complete a full seven seconds before the earliest possible mount of the resctrl file system (when included in /etc/fstab for automatic mount by systemd). Add a hook for use by telemetry event enumeration and initialization and run it once at the beginning of resctrl mount without any locks held. The architecture is responsible for any required locking. Signed-off-by: Tony Luck <tony.luck@intel.com> Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de> Link: https://lore.kernel.org/r/20260105191711.GBaVwON5nZn-uO6Sqg@fat_crate.local
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/resctrl.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/linux/resctrl.h b/include/linux/resctrl.h
index c43526cdf304..2f938a5a16f8 100644
--- a/include/linux/resctrl.h
+++ b/include/linux/resctrl.h
@@ -514,6 +514,12 @@ void resctrl_offline_mon_domain(struct rdt_resource *r, struct rdt_domain_hdr *h
void resctrl_online_cpu(unsigned int cpu);
void resctrl_offline_cpu(unsigned int cpu);
+/*
+ * Architecture hook called at beginning of first file system mount attempt.
+ * No locks are held.
+ */
+void resctrl_arch_pre_mount(void);
+
/**
* resctrl_arch_rmid_read() - Read the eventid counter corresponding to rmid
* for this resource and domain.