Skip to content
Commit 78455c18 authored by Quanyang Wang's avatar Quanyang Wang Committed by Bruce Ashfield
Browse files

axxia: use udelay instead of usleep in kexec/kdump routine



The kexec/kdump routine is mostly running at a atomic context,
calling usleep will trigger the calltrace as below:

WARNING: CPU: 0 PID: 529 at kernel/sched/core.c:4844 preempt_count_sub+0x74/0xf0
DEBUG_LOCKS_WARN_ON(val > preempt_count())
Modules linked in:
CPU: 0 PID: 529 Comm: kexec Tainted: G        W         5.10.57-rt47-yocto-preempt-rt+ #80
Hardware name: INTEL Axxia
[<c0610764>] (unwind_backtrace) from [<c060ac74>] (show_stack+0x18/0x1c)
[<c060ac74>] (show_stack) from [<c0e0220c>] (dump_stack+0x80/0x9c)
[<c0e0220c>] (dump_stack) from [<c0622bb4>] (__warn+0xcc/0xf8)
[<c0622bb4>] (__warn) from [<c0dfc318>] (warn_slowpath_fmt+0x80/0xc0)
[<c0dfc318>] (warn_slowpath_fmt) from [<c064bc10>] (preempt_count_sub+0x74/0xf0)
[<c064bc10>] (preempt_count_sub) from [<c061d3b8>] (axxia_platform_cpu_kill+0x88/0x104)
[<c061d3b8>] (axxia_platform_cpu_kill) from [<c060e024>] (__cpu_die+0x48/0x6c)
[<c060e024>] (__cpu_die) from [<c06232fc>] (takedown_cpu+0xac/0xd4)
[<c06232fc>] (takedown_cpu) from [<c0623a68>] (cpuhp_invoke_callback+0x114/0x318)
[<c0623a68>] (cpuhp_invoke_callback) from [<c0e08250>] (_cpu_down+0x114/0x1e8)
[<c0e08250>] (_cpu_down) from [<c062532c>] (smp_shutdown_nonboot_cpus+0x74/0xc0)
[<c062532c>] (smp_shutdown_nonboot_cpus) from [<c06b495c>] (kernel_kexec+0x58/0x80)
[<c06b495c>] (kernel_kexec) from [<c06461e0>] (__do_sys_reboot+0x1c0/0x214)
[<c06461e0>] (__do_sys_reboot) from [<c0600060>] (ret_fast_syscall+0x0/0x54)

Use udelay to eliminate this warning.

Signed-off-by: default avatarQuanyang Wang <quanyang.wang@windriver.com>
Signed-off-by: default avatarBruce Ashfield <bruce.ashfield@gmail.com>
parent 8a66fd2c
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment