On 08.08.2025 22:23, Andrew Cooper wrote: > Switch it to Xen coding style and fix MISRA violations.
That were all ul -> UL suffix transformations, afaics? > Make it static as > there are no external caller now. > > Since commit a35816b5cae8 ("x86/traps: Introduce early_traps_init() and > simplify setup"), load_system_tables() is called later on the BSP, so the > SYS_STATE_early_boot check can be dropped from the safety BUG_ON(). > > Move the BUILD_BUG_ON() into build_assertions(), I'm not quite convinced of this move - having the related BUILD_BUG_ON() and BUG_ON() next to each other would seem better to me. (Same would apply to the TSS size related BUILD_BUG_ON(), if in the earlier patch we ended up agreeing that only the comment wants dropping there.) > @@ -139,3 +258,16 @@ void asmlinkage ap_early_traps_init(void) > { > load_system_tables(); > } > + > +static void __init __maybe_unused build_assertions(void) > +{ > + /* > + * This is best-effort (it doesn't cover some padding corner cases), but > + * is preforable to hitting the check at boot time. Nit: "preferable" Jan