.. | .. |
---|
49 | 49 | fpu__init_cpu_xstate(); |
---|
50 | 50 | } |
---|
51 | 51 | |
---|
52 | | -static bool fpu__probe_without_cpuid(void) |
---|
| 52 | +static bool __init fpu__probe_without_cpuid(void) |
---|
53 | 53 | { |
---|
54 | 54 | unsigned long cr0; |
---|
55 | 55 | u16 fsw, fcw; |
---|
.. | .. |
---|
67 | 67 | return fsw == 0 && (fcw & 0x103f) == 0x003f; |
---|
68 | 68 | } |
---|
69 | 69 | |
---|
70 | | -static void fpu__init_system_early_generic(struct cpuinfo_x86 *c) |
---|
| 70 | +static void __init fpu__init_system_early_generic(void) |
---|
71 | 71 | { |
---|
72 | 72 | if (!boot_cpu_has(X86_FEATURE_CPUID) && |
---|
73 | 73 | !test_bit(X86_FEATURE_FPU, (unsigned long *)cpu_caps_cleared)) { |
---|
.. | .. |
---|
138 | 138 | unsigned int fpu_kernel_xstate_size; |
---|
139 | 139 | EXPORT_SYMBOL_GPL(fpu_kernel_xstate_size); |
---|
140 | 140 | |
---|
141 | | -/* Get alignment of the TYPE. */ |
---|
142 | | -#define TYPE_ALIGN(TYPE) offsetof(struct { char x; TYPE test; }, test) |
---|
143 | | - |
---|
144 | 141 | /* |
---|
145 | 142 | * Enforce that 'MEMBER' is the last field of 'TYPE'. |
---|
146 | 143 | * |
---|
.. | .. |
---|
148 | 145 | * because that's how C aligns structs. |
---|
149 | 146 | */ |
---|
150 | 147 | #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))) |
---|
153 | 150 | |
---|
154 | 151 | /* |
---|
155 | 152 | * We append the 'struct fpu' to the task_struct: |
---|
.. | .. |
---|
240 | 237 | * Called on the boot CPU once per system bootup, to set up the initial |
---|
241 | 238 | * FPU state that is later cloned into all processes: |
---|
242 | 239 | */ |
---|
243 | | -void __init fpu__init_system(struct cpuinfo_x86 *c) |
---|
| 240 | +void __init fpu__init_system(void) |
---|
244 | 241 | { |
---|
245 | | - fpu__init_system_early_generic(c); |
---|
| 242 | + fpu__init_system_early_generic(); |
---|
246 | 243 | |
---|
247 | 244 | /* |
---|
248 | 245 | * The FPU has to be operational for some of the |
---|