From fdda68feeca82610ccbcdcbda7250623a6d187d2 Mon Sep 17 00:00:00 2001 From: Ding Tianhong Date: Tue, 22 Sep 2020 10:14:33 +0800 Subject: [PATCH] arm64/ascend: Set mem_sleep_current to PM_SUSPEND_ON for ascend platform 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 Reviewed-by: Hanjun Guo Signed-off-by: Yang Yingliang --- 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 #include #include +#include #include #include @@ -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; } -- GitLab