arm: axxia: ddr_retention: don't call usleep at atomic context
When running the command: #echo 1 > /proc/driver/axxia_ddr_retention_reset the function usleep_range is called at an atomic context, using udelay can avoid the calltrace as below: BUG: scheduling while atomic: sh/519/0x00000002 Modules linked in: CPU: 12 PID: 519 Comm: sh Not tainted 5.10.75-yocto-standard+ #9 Hardware name: INTEL Axxia [<c0612444>] (unwind_backtrace) from [<c060c044>] (show_stack+0x18/0x1c) [<c060c044>] (show_stack) from [<c1034ee4>] (dump_stack+0x98/0xac) [<c1034ee4>] (dump_stack) from [<c0657900>] (__schedule_bug+0x78/0x8c) [<c0657900>] (__schedule_bug) from [<c103cc04>] (__schedule+0x454/0x648) [<c103cc04>] (__schedule) from [<c103ce90>] (schedule+0x98/0x120) [<c103ce90>] (schedule) from [<c1041384>] (schedule_hrtimeout_range_clock+0xcc/0x15c) [<c1041384>] (schedule_hrtimeout_range_clock) from [<c1041434>] (schedule_hrtimeout_range+0x20/0x28) [<c1041434>] (schedule_hrtimeout_range) from [<c1040c64>] (usleep_range+0x74/0xa4) [<c1040c64>] (usleep_range) from [<c0623290>] (axxia_ddr_retention_trigger+0x10/0x1c) [<c0623290>] (axxia_ddr_retention_trigger) from [<c08a4c0c>] (proc_reg_write+0xb0/0xd4) [<c08a4c0c>] (proc_reg_write) from [<c081260c>] (vfs_write+0xd4/0x464) [<c081260c>] (vfs_write) from [<c0813ed4>] (ksys_write+0x6c/0xf8) [<c0813ed4>] (ksys_write) from [<c0600060>] (ret_fast_syscall+0x0/0x4c) Exception stack(0xc566dfa8 to 0xc566dff0) dfa0: 00000002 0058c048 00000001 0058c048 00000002 00000000 dfc0: 00000002 0058c048 b6fcd480 00000004 b6f59c60 00000000 0056ac00 00000000 dfe0: 00000004 beb03918 b6eef459 b6e70386 Signed-off-by: Quanyang Wang <quanyang.wang@windriver.com> Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
parent
6838ba79