From: Ding Tianhong dingtianhong@huawei.com
ascend inclusion category: feature bugzilla: NA CVE: NA
-------------------------------------------------
The mem_sleep_current is set to PM_SUSPEND_TO_IDLE default, it would cause the system to hang up if the wake-up device is not registered, therefore the PM_SUSPEND_ON need to be set to prevent the system from entering an endless loop.
Signed-off-by: Ding Tianhong dingtianhong@huawei.com Reviewed-by: Hanjun Guo guohanjun@huawei.com Signed-off-by: Yang Yingliang yangyingliang@huawei.com --- arch/arm64/mm/init.c | 4 ++++ 1 file changed, 4 insertions(+)
diff --git a/arch/arm64/mm/init.c b/arch/arm64/mm/init.c index 88887e0722b7..883350f9cc42 100644 --- a/arch/arm64/mm/init.c +++ b/arch/arm64/mm/init.c @@ -41,6 +41,7 @@ #include <linux/kexec.h> #include <linux/crash_dump.h> #include <linux/iommu.h> +#include <linux/suspend.h>
#include <asm/boot.h> #include <asm/fixmap.h> @@ -779,6 +780,9 @@ static int __init ascend_enable_setup(char *__unused) if (IS_ENABLED(CONFIG_ASCEND_CHARGE_MIGRATE_HUGEPAGES)) enable_charge_mighp = 1;
+ if (IS_ENABLED(CONFIG_SUSPEND)) + mem_sleep_current = PM_SUSPEND_ON; + return 1; }