android_kernel_xiaomi_sm7250/arch/powerpc
Zhouyi Zhou 4bb1188e2b powerpc/64: Init jump labels before parse_early_param()
[ Upstream commit ca829e05d3d4f728810cc5e4b468d9ebc7745eb3 ]

On 64-bit, calling jump_label_init() in setup_feature_keys() is too
late because static keys may be used in subroutines of
parse_early_param() which is again subroutine of early_init_devtree().

For example booting with "threadirqs":

  static_key_enable_cpuslocked(): static key '0xc000000002953260' used before call to jump_label_init()
  WARNING: CPU: 0 PID: 0 at kernel/jump_label.c:166 static_key_enable_cpuslocked+0xfc/0x120
  ...
  NIP static_key_enable_cpuslocked+0xfc/0x120
  LR  static_key_enable_cpuslocked+0xf8/0x120
  Call Trace:
    static_key_enable_cpuslocked+0xf8/0x120 (unreliable)
    static_key_enable+0x30/0x50
    setup_forced_irqthreads+0x28/0x40
    do_early_param+0xa0/0x108
    parse_args+0x290/0x4e0
    parse_early_options+0x48/0x5c
    parse_early_param+0x58/0x84
    early_init_devtree+0xd4/0x518
    early_setup+0xb4/0x214

So call jump_label_init() just before parse_early_param() in
early_init_devtree().

Suggested-by: Michael Ellerman <mpe@ellerman.id.au>
Signed-off-by: Zhouyi Zhou <zhouzhouyi@gmail.com>
[mpe: Add call trace to change log and minor wording edits.]
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20220726015747.11754-1-zhouzhouyi@gmail.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
2022-08-25 11:15:47 +02:00
..
boot powerpc: dts: t104xrdb: fix phy type for FMAN 4/5 2022-04-15 14:15:01 +02:00
configs vgacon: remove software scrollback support 2020-09-17 13:45:29 +02:00
crypto
include powerpc/mm: Switch obsolete dssall to .long 2022-06-25 11:49:17 +02:00
kernel powerpc/64: Init jump labels before parse_early_param() 2022-08-25 11:15:47 +02:00
kvm KVM: PPC: Fix vmx/vsx mixup in mmio emulation 2022-04-15 14:14:47 +02:00
lib powerpc/lib/sstep: Fix build errors with newer binutils 2022-04-15 14:14:56 +02:00
math-emu
mm powerpc/ptdump: Fix display of RW pages on FSL_BOOK3E 2022-08-25 11:15:33 +02:00
net powerpc/bpf: Emit stf barrier instruction sequences for BPF_NOSPEC 2021-11-26 11:36:17 +01:00
oprofile
perf powerpc/perf: Fix the threshold compare group constraint for power9 2022-06-14 16:59:25 +02:00
platforms powerpc/cell/axon_msi: Fix refcount leak in setup_msi_msg_address 2022-08-25 11:15:25 +02:00
purgatory
sysdev powerpc/xive: Fix refcount leak in xive_get_max_prio 2022-08-25 11:15:25 +02:00
tools
xmon powerpc/xmon: Change printk() to pr_cont() 2020-12-30 11:26:12 +01:00
Kconfig powerpc: Fix HAVE_HARDLOCKUP_DETECTOR_ARCH build configuration 2021-05-22 10:59:35 +02:00
Kconfig.debug powerpc: iommu: fix build when neither PCI or IBMVIO is set 2021-05-22 10:59:35 +02:00
Makefile powerpc/Makefile: Don't pass -mcpu=powerpc64 when building 32-bit 2022-04-15 14:14:49 +02:00
Makefile.postlink