mm: fix suspend crash on u200 [1/1]

PD#SWPL-1219

Problem:
When open vmap stack, suspend will fail on U200. If open cpu idle,
resume from idle will fail too.

Solution:
set up vmap stack early before open IRQ. If set up this stack late
than IRQ open, stack will point to a ramdom address

Verify:
u200

Change-Id: Ie60f6faadf9afece47ccc887a0af46814f070897
Signed-off-by: Tao Zeng <tao.zeng@amlogic.com>
This commit is contained in:
Tao Zeng
2018-12-12 14:37:26 +08:00
committed by Luan Yuan
parent 3cb6da402d
commit 9beb643af8
2 changed files with 6 additions and 6 deletions

View File

@@ -12,6 +12,9 @@
#include <asm/smp_plat.h>
#include <asm/suspend.h>
#include <asm/tlbflush.h>
#ifdef CONFIG_AMLOGIC_VMAP
#include <linux/amlogic/vmap_stack.h>
#endif
/*
* This is allocated by cpu_suspend_init(), and used to store a pointer to
@@ -39,6 +42,9 @@ void notrace __cpu_suspend_exit(void)
{
unsigned int cpu = smp_processor_id();
#ifdef CONFIG_AMLOGIC_VMAP
__setup_vmap_stack(my_cpu_offset);
#endif
/*
* We are resuming from reset with the idmap active in TTBR0_EL1.
* We must uninstall the idmap and restore the expected MMU

View File

@@ -42,9 +42,6 @@
#include <linux/kobject.h>
#include <../kernel/power/power.h>
#include <linux/amlogic/scpi_protocol.h>
#ifdef CONFIG_AMLOGIC_VMAP
#include <linux/amlogic/vmap_stack.h>
#endif
typedef unsigned long (psci_fn)(unsigned long, unsigned long,
unsigned long, unsigned long);
@@ -85,9 +82,6 @@ static void meson_gx_suspend(void)
/* cpu_suspend(0, meson_system_suspend);
*/
pr_info("... wake up\n");
#ifdef CONFIG_AMLOGIC_VMAP
__setup_vmap_stack(my_cpu_offset);
#endif
}
static int meson_pm_prepare(void)