x86/init: Initialize signal frame size late

No point in doing this during really early boot. Move it to an early
initcall so that it is set up before possible user mode helpers are started
during device initialization.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Link: https://lore.kernel.org/r/20230613224545.727330699@linutronix.de

+3 -6
-2
arch/x86/include/asm/sigframe.h
··· 85 86 #endif /* CONFIG_X86_64 */ 87 88 - void __init init_sigframe_size(void); 89 - 90 #endif /* _ASM_X86_SIGFRAME_H */
··· 85 86 #endif /* CONFIG_X86_64 */ 87 88 #endif /* _ASM_X86_SIGFRAME_H */
-3
arch/x86/kernel/cpu/common.c
··· 64 #include <asm/cpu_device_id.h> 65 #include <asm/uv/uv.h> 66 #include <asm/set_memory.h> 67 - #include <asm/sigframe.h> 68 #include <asm/traps.h> 69 #include <asm/sev.h> 70 ··· 1605 sld_setup(c); 1606 1607 fpu__init_system(c); 1608 - 1609 - init_sigframe_size(); 1610 1611 #ifdef CONFIG_X86_32 1612 /*
··· 64 #include <asm/cpu_device_id.h> 65 #include <asm/uv/uv.h> 66 #include <asm/set_memory.h> 67 #include <asm/traps.h> 68 #include <asm/sev.h> 69 ··· 1606 sld_setup(c); 1607 1608 fpu__init_system(c); 1609 1610 #ifdef CONFIG_X86_32 1611 /*
+3 -1
arch/x86/kernel/signal.c
··· 182 static unsigned long __ro_after_init max_frame_size; 183 static unsigned int __ro_after_init fpu_default_state_size; 184 185 - void __init init_sigframe_size(void) 186 { 187 fpu_default_state_size = fpu__get_fpstate_size(); 188 ··· 194 max_frame_size = round_up(max_frame_size, FRAME_ALIGNMENT); 195 196 pr_info("max sigframe size: %lu\n", max_frame_size); 197 } 198 199 unsigned long get_sigframe_size(void) 200 {
··· 182 static unsigned long __ro_after_init max_frame_size; 183 static unsigned int __ro_after_init fpu_default_state_size; 184 185 + static int __init init_sigframe_size(void) 186 { 187 fpu_default_state_size = fpu__get_fpstate_size(); 188 ··· 194 max_frame_size = round_up(max_frame_size, FRAME_ALIGNMENT); 195 196 pr_info("max sigframe size: %lu\n", max_frame_size); 197 + return 0; 198 } 199 + early_initcall(init_sigframe_size); 200 201 unsigned long get_sigframe_size(void) 202 {