Message ID | 20220726015747.11754-1-zhouzhouyi@gmail.com (mailing list archive) |
---|---|
State | Accepted |
Commit | ca829e05d3d4f728810cc5e4b468d9ebc7745eb3 |
Headers | show |
Series | [linux-next,v2] powerpc: init jump label early in ppc 64 | expand |
On Tue, 26 Jul 2022 09:57:47 +0800, zhouzhouyi@gmail.com wrote: > From: Zhouyi Zhou <zhouzhouyi@gmail.com> > > In ppc 64, invoke jump_label_init in setup_feature_keys is too late > because static key will be used in subroutine of parse_early_param > which is again subroutine of early_init_devtree. > > So we invoke jump_label_init just before parse_early_param in > early_init_devtree. > > [...] Applied to powerpc/next. [1/1] powerpc: init jump label early in ppc 64 https://git.kernel.org/powerpc/c/ca829e05d3d4f728810cc5e4b468d9ebc7745eb3 cheers
On Tue, 26 Jul 2022 09:57:47 +0800, zhouzhouyi@gmail.com wrote: > From: Zhouyi Zhou <zhouzhouyi@gmail.com> > > In ppc 64, invoke jump_label_init in setup_feature_keys is too late > because static key will be used in subroutine of parse_early_param > which is again subroutine of early_init_devtree. > > So we invoke jump_label_init just before parse_early_param in > early_init_devtree. > > [...] Applied to powerpc/next. [1/1] powerpc: init jump label early in ppc 64 https://git.kernel.org/powerpc/c/ca829e05d3d4f728810cc5e4b468d9ebc7745eb3 cheers
diff --git a/arch/powerpc/kernel/prom.c b/arch/powerpc/kernel/prom.c index 1066b072db35..bfe170ed6b12 100644 --- a/arch/powerpc/kernel/prom.c +++ b/arch/powerpc/kernel/prom.c @@ -751,7 +751,13 @@ void __init early_init_devtree(void *params) early_init_dt_scan_root(); early_init_dt_scan_memory_ppc(); + /* + * As generic code authors expect to be able to use static keys + * in early_param() handlers, we initialize the static keys just + * before parsing early params (it's fine to call jump_label_init + * more than once). + */ + jump_label_init(); parse_early_param(); /* make sure we've parsed cmdline for mem= before this */ --