Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

x86/resctrl: Fix types in resctrl_arch_mon_ctx_{alloc,free}() stubs

resctrl_arch_mon_ctx_alloc() and resctrl_arch_mon_ctx_free() take an enum
resctrl_event_id that is already defined in resctrl_types.h to be
accessible to asm/resctrl.h.

The x86 stubs take an int. Fix that.

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-19-james.morse@arm.com

authored by

James Morse and committed by
Borislav Petkov (AMD)
272ed1c2 7bdb619c

+6 -4
+6 -4
arch/x86/include/asm/resctrl.h
··· 194 194 195 195 /* x86 can always read an rmid, nothing needs allocating */ 196 196 struct rdt_resource; 197 - static inline void *resctrl_arch_mon_ctx_alloc(struct rdt_resource *r, int evtid) 197 + static inline void *resctrl_arch_mon_ctx_alloc(struct rdt_resource *r, 198 + enum resctrl_event_id evtid) 198 199 { 199 200 might_sleep(); 200 201 return NULL; 201 - }; 202 + } 202 203 203 - static inline void resctrl_arch_mon_ctx_free(struct rdt_resource *r, int evtid, 204 - void *ctx) { }; 204 + static inline void resctrl_arch_mon_ctx_free(struct rdt_resource *r, 205 + enum resctrl_event_id evtid, 206 + void *ctx) { } 205 207 206 208 u64 resctrl_arch_get_prefetch_disable_bits(void); 207 209 int resctrl_arch_pseudo_lock_fn(void *_plr);