firmware/br-ext-chip-allwinner/board/v83x/kernel/patches/00000-drivers_firmware_psci...

39 lines
1.2 KiB
Diff

diff -drupN a/drivers/firmware/psci.c b/drivers/firmware/psci.c
--- a/drivers/firmware/psci.c 2018-08-06 17:23:04.000000000 +0300
+++ b/drivers/firmware/psci.c 2022-06-12 05:28:14.000000000 +0300
@@ -400,9 +400,14 @@ int psci_cpu_init_idle(unsigned int cpu)
static int psci_suspend_finisher(unsigned long index)
{
u32 *state = __this_cpu_read(psci_power_state);
+ unsigned long reentry;
- return psci_ops.cpu_suspend(state[index - 1],
- virt_to_phys(cpu_resume));
+#ifdef CONFIG_ARM
+ reentry = __pa_symbol(cpu_resume_arm);
+#else
+ reentry = __pa_symbol(cpu_resume);
+#endif
+ return psci_ops.cpu_suspend(state[index - 1], reentry);
}
int psci_cpu_suspend_enter(unsigned long index)
@@ -437,8 +442,15 @@ CPUIDLE_METHOD_OF_DECLARE(psci, "psci",
static int psci_system_suspend(unsigned long unused)
{
- return invoke_psci_fn(PSCI_FN_NATIVE(1_0, SYSTEM_SUSPEND),
- virt_to_phys(cpu_resume), 0, 0);
+ unsigned long reentry;
+
+#ifdef CONFIG_ARM
+ reentry = __pa_symbol(cpu_resume_arm);
+#else
+ reentry = __pa_symbol(cpu_resume);
+#endif
+ return invoke_psci_fn(PSCI_FN_NATIVE(1_0, SYSTEM_SUSPEND),
+ reentry, 0, 0);
}
static int psci_system_suspend_enter(suspend_state_t state)