Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 5054ff49 authored by Matt Wagantall's avatar Matt Wagantall
Browse files

esoc: mdm-4x: Remove illegal msleep() from mdm_notify()



Code in mdm_notify() cannot sleep since it's called from an atomic
context in the panic path. For simplicity, just remove the delay
and busy-loop since, during panic, there's nothing else the CPU
could be spending cycles on anyway.

This avoids warnings like:
  bad: scheduling from the idle thread!
  ...
  (msleep+0x14/0x20) from [<c08f9d94>] (mdm_notify+0x134/0x190)
  (mdm_notify+0x134/0x190) from [<c08fa298>] (mdm_crash_shutdown+0x1c/0x20)
  (mdm_crash_shutdown+0x1c/0x20) from [<c023f500>] (subsys_panic+0x18/0x20)
  (subsys_panic+0x18/0x20) from [<c05a98a8>] (bus_for_each_dev+0x50/0x88)
  (bus_for_each_dev+0x50/0x88) from [<c023f674>] (ssr_panic_handler+0x18/0x28)
  (ssr_panic_handler+0x18/0x28) from [<c0b2dea0>] (notifier_call_chain+0x38/0x68)
  (notifier_call_chain+0x38/0x68) from [<c0b2df04>] (__atomic_notifier_call_chain+0x34/0x44)
  (__atomic_notifier_call_chain+0x34/0x44) from [<c0b2df28>] (atomic_notifier_call_chain+0x14/0x18)
  (atomic_notifier_call_chain+0x14/0x18) from [<c0b217a4>] (panic+0xac/0x1f0)
  (panic+0xac/0x1f0) from [<c020a028>] (die+0x290/0x2f4)

Change-Id: I2fbc99fd907d25a9894e747e653c06523c52ad6b
Signed-off-by: default avatarMatt Wagantall <mattw@codeaurora.org>
parent 6f1c4b95
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment