linux/arch/powerpc
Zhouyi Zhou 8f9357313c powerpc/64: Init jump labels before parse_early_param()
[ Upstream commit ca829e05d3 ]

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>
History 2022-08-25 11:45:53 +02:00
..
boot powerpc updates for 5.19 2022-05-28 11:27:17 -07:00
configs powerpc: Restore CONFIG_DEBUG_INFO in defconfigs 2022-08-17 15:13:56 +02:00
crypto powerpc: fix typos in comments 2022-05-05 22:12:44 +10:00
include powerpc/watchdog: introduce a NMI watchdog's factor 2022-08-25 11:45:51 +02:00
kernel powerpc/64: Init jump labels before parse_early_param() 2022-08-25 11:45:53 +02:00
kexec powerpc/kexec: Fix build failure from uninitialised variable 2022-08-17 15:16:21 +02:00
kvm KVM: PPC: Book3S HV: Fix "rm_exit" entry in debugfs timings 2022-08-25 11:45:48 +02:00
lib powerpc updates for 5.19 2022-05-28 11:27:17 -07:00
math-emu powerpc/64s: avoid reloading (H)SRR registers if they are still valid 2021-06-25 00:06:55 +10:00
mm powerpc/32: Set an IBAT covering up to _einittext during init 2022-08-25 11:45:51 +02:00
net powerpc/inst: Remove PPC_INST_BL 2022-05-22 15:58:27 +10:00
perf powerpc/perf: Optimize clearing the pending PMI and remove WARN_ON for PMI check in power_pmu_disable 2022-08-17 15:15:47 +02:00
platforms powerpc/ioda/iommu/debugfs: Generate unique debugfs entries 2022-08-25 11:45:52 +02:00
purgatory powerpc/kexec: Don't use .machine ppc64 in trampoline_64.S 2021-04-08 21:17:43 +10:00
sysdev powerpc/xive: Fix refcount leak in xive_get_max_prio 2022-08-17 15:16:00 +02:00
tools powerpc/64: Add UADDR64 relocation support 2022-03-09 21:47:53 +11:00
xmon More power management updates for 5.19-rc1 2022-05-30 11:37:26 -07:00
Kbuild kbuild: use more subdir- for visiting subdirectories while cleaning 2021-10-24 13:49:46 +09:00
Kconfig powerpc fixes for 5.19 #6 2022-07-29 09:57:07 -07:00
Kconfig.debug powerpc: Book3S 64-bit outline-only KASAN support 2022-05-22 15:58:29 +10:00
Makefile powerpc/32: Don't always pass -mcpu=powerpc to the compiler 2022-08-25 11:45:51 +02:00
Makefile.postlink powerpc: unrel_branch_check.sh: use nm to find symbol value 2020-09-02 11:00:22 +10:00