critical_section is not compatible with irq disabled, have to delay the
wd_start after spin_unlock_irqrestore.
Signed-off-by: buxiasen <buxiasen@xiaomi.com>
as we always want to take critical_section, and it is not long time job,
take mutex is not necessary, use spinlock_irq_save as a replace is
better, dont't have to take global critial_section in pm.
Signed-off-by: buxiasen <buxiasen@xiaomi.com>
After change, when CONFIG_PM_NDOMAINS > 1,
the pm_register will not able to get notificaion
from not PM_IDLE_DOMAIN.
Should use pm_domain_register as a replacement.
Isolate domains from global callbacks can decrease
not necessary execution, and reduce the
lock instruction requirements.
Signed-off-by: buxiasen <buxiasen@xiaomi.com>