Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 77a20e0a authored by Yimin Peng's avatar Yimin Peng
Browse files

power: reset: cache flush before VM restart



Make sure data concurrency in dram for crash dump.

Change-Id: I17a29c709d3b5df015aa8fd44d27db914e1682b2
Signed-off-by: default avatarYimin Peng <yiminp@codeaurora.org>
parent 1e8f2043
Loading
Loading
Loading
Loading
+9 −1
Original line number Diff line number Diff line
/* Copyright (c) 2019, The Linux Foundation. All rights reserved.
/* Copyright (c) 2019-2020, The Linux Foundation. All rights reserved.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 and
@@ -20,6 +20,7 @@
#include <linux/delay.h>
#include <linux/of_address.h>

#include <asm/cacheflush.h>
#include <asm/system_misc.h>
#include <soc/qcom/watchdog.h>

@@ -41,6 +42,13 @@ static void do_vm_restart(enum reboot_mode reboot_mode, const char *cmd)
{
	pr_notice("Going down for vm restart now\n");

	flush_cache_all();

	/*outer_flush_all is not supported by 64bit kernel*/
#ifndef CONFIG_ARM64
	outer_flush_all();
#endif

	if (in_panic)
		msm_trigger_wdog_bite();