hc
2024-01-03 2f7c68cb55ecb7331f2381deb497c27155f32faf
kernel/arch/x86/kernel/fpu/init.c
....@@ -49,7 +49,7 @@
4949 fpu__init_cpu_xstate();
5050 }
5151
52
-static bool fpu__probe_without_cpuid(void)
52
+static bool __init fpu__probe_without_cpuid(void)
5353 {
5454 unsigned long cr0;
5555 u16 fsw, fcw;
....@@ -67,7 +67,7 @@
6767 return fsw == 0 && (fcw & 0x103f) == 0x003f;
6868 }
6969
70
-static void fpu__init_system_early_generic(struct cpuinfo_x86 *c)
70
+static void __init fpu__init_system_early_generic(void)
7171 {
7272 if (!boot_cpu_has(X86_FEATURE_CPUID) &&
7373 !test_bit(X86_FEATURE_FPU, (unsigned long *)cpu_caps_cleared)) {
....@@ -138,9 +138,6 @@
138138 unsigned int fpu_kernel_xstate_size;
139139 EXPORT_SYMBOL_GPL(fpu_kernel_xstate_size);
140140
141
-/* Get alignment of the TYPE. */
142
-#define TYPE_ALIGN(TYPE) offsetof(struct { char x; TYPE test; }, test)
143
-
144141 /*
145142 * Enforce that 'MEMBER' is the last field of 'TYPE'.
146143 *
....@@ -148,8 +145,8 @@
148145 * because that's how C aligns structs.
149146 */
150147 #define CHECK_MEMBER_AT_END_OF(TYPE, MEMBER) \
151
- BUILD_BUG_ON(sizeof(TYPE) != ALIGN(offsetofend(TYPE, MEMBER), \
152
- TYPE_ALIGN(TYPE)))
148
+ BUILD_BUG_ON(sizeof(TYPE) != \
149
+ ALIGN(offsetofend(TYPE, MEMBER), _Alignof(TYPE)))
153150
154151 /*
155152 * We append the 'struct fpu' to the task_struct:
....@@ -240,9 +237,9 @@
240237 * Called on the boot CPU once per system bootup, to set up the initial
241238 * FPU state that is later cloned into all processes:
242239 */
243
-void __init fpu__init_system(struct cpuinfo_x86 *c)
240
+void __init fpu__init_system(void)
244241 {
245
- fpu__init_system_early_generic(c);
242
+ fpu__init_system_early_generic();
246243
247244 /*
248245 * The FPU has to be operational for some of the