From a02a3e54b2b3066d3a4090679e6c2228dfc54e49 Mon Sep 17 00:00:00 2001 From: Murali Nalajala Date: Thu, 25 Jun 2020 18:45:24 -0700 Subject: [PATCH 1/2] haven: configure dbl and msgq interrupts as wakeup capable Configure dbl and msgq interrupts as wakeup capable to wake up the SVM from suspend-to-RAM state. Change-Id: I1825109736ace36c5c871d52dfefe4a320fea335 Signed-off-by: Murali Nalajala --- drivers/virt/haven/hh_dbl.c | 1 + drivers/virt/haven/hh_msgq.c | 1 + 2 files changed, 2 insertions(+) diff --git a/drivers/virt/haven/hh_dbl.c b/drivers/virt/haven/hh_dbl.c index 04a108bcfac5..265c0dc6110e 100644 --- a/drivers/virt/haven/hh_dbl.c +++ b/drivers/virt/haven/hh_dbl.c @@ -569,6 +569,7 @@ int hh_dbl_populate_cap_info(enum hh_dbl_label label, u64 cap_id, goto err; } + irq_set_irq_wake(rx_irq, 1); wake_up_interruptible(&cap_table_entry->cap_wq); pr_debug("%s: label: %d; rx_cap_id: %llu; dir: %d; rx_irq: %d\n", diff --git a/drivers/virt/haven/hh_msgq.c b/drivers/virt/haven/hh_msgq.c index da7daf28e915..3d2b87acd961 100644 --- a/drivers/virt/haven/hh_msgq.c +++ b/drivers/virt/haven/hh_msgq.c @@ -462,6 +462,7 @@ int hh_msgq_populate_cap_info(enum hh_msgq_label label, u64 cap_id, goto err; } + irq_set_irq_wake(irq, 1); spin_unlock(&cap_table_entry->cap_entry_lock); pr_debug( From 9f543e181cdf0ff0c04b041d65802a52496eda8f Mon Sep 17 00:00:00 2001 From: Murali Nalajala Date: Thu, 25 Jun 2020 18:29:52 -0700 Subject: [PATCH 2/2] arm64: defconfig: enable autosleep and wakelock configs SVM going to rely on kernel autosleep feature to do suspend-to-RAM. Enable required configurations to achieve suspend-to-RAM functionality. Change-Id: Ie31abce7927c8b6b2ce5dad6f917f96c52e90803 Signed-off-by: Murali Nalajala --- arch/arm64/configs/vendor/genericarmv8-64_defconfig | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/arm64/configs/vendor/genericarmv8-64_defconfig b/arch/arm64/configs/vendor/genericarmv8-64_defconfig index 3f9a3e5f7f43..150f3ab6144b 100644 --- a/arch/arm64/configs/vendor/genericarmv8-64_defconfig +++ b/arch/arm64/configs/vendor/genericarmv8-64_defconfig @@ -37,6 +37,8 @@ CONFIG_PARAVIRT=y CONFIG_COMPAT=y CONFIG_RANDOMIZE_BASE=y CONFIG_HIBERNATION=y +CONFIG_PM_AUTOSLEEP=y +CONFIG_PM_WAKELOCKS=y CONFIG_WQ_POWER_EFFICIENT_DEFAULT=y CONFIG_ARM_CPUIDLE=y CONFIG_ARM_PSCI_CPUIDLE=y