summaryrefslogtreecommitdiff
path: root/arch/x86/kernel/topology.c
diff options
context:
space:
mode:
authorJames Morse <james.morse@arm.com>2023-09-07 14:08:47 +0100
committerRussell King (Oracle) <rmk+kernel@armlinux.org.uk>2023-10-30 12:22:23 +0000
commit8aa29b8dade973d589356199a6cef546676203e9 (patch)
treeb48c2c897ec69f78430e5bd13a6c3463fc12a522 /arch/x86/kernel/topology.c
parent0bfbcfdc74d191e53ee6c86431beb10bcf6e5205 (diff)
x86: intel_epb: Don't rely on link order
intel_epb_init() is called as a subsys_initcall() to register cpuhp callbacks. The callbacks make use of get_cpu_device() which will return NULL unless register_cpu() has been called. register_cpu() is called from topology_init(), which is also a subsys_initcall(). This is fragile. Moving the register_cpu() to a different subsys_initcall() leads to a NULL dereference during boot. Make intel_epb_init() a late_initcall(), user-space can't provide a policy before this point anyway. Signed-off-by: James Morse <james.morse@arm.com> Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk> --- subsys_initcall_sync() would be an option, but moving the register_cpu() calls into ACPI also means adding a safety net for CPUs that are online but not described properly by firmware. This lives in subsys_initcall_sync().
Diffstat (limited to 'arch/x86/kernel/topology.c')
0 files changed, 0 insertions, 0 deletions