From 5ea1da1601e1d97ec9238a10dbe3b38611677938 Mon Sep 17 00:00:00 2001 From: Komal Bajaj Date: Sat, 30 Jan 2021 22:34:31 +0530 Subject: [PATCH] soc: qcom: Reset watchdog before setting bite time MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Reset watchdog before setting bite time in watchdog panic handler. If the watchdog’s bite time is reduced below its current count, there is a possibility that it will bite as the virtual watchdog sets times relative to the last pet. Change-Id: I27a456a0f81525987003c7eb54a9e766b6e184ca Signed-off-by: Komal Bajaj --- drivers/soc/qcom/qcom_wdt_core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/soc/qcom/qcom_wdt_core.c b/drivers/soc/qcom/qcom_wdt_core.c index d3d801633c83..b9d16e1eb833 100644 --- a/drivers/soc/qcom/qcom_wdt_core.c +++ b/drivers/soc/qcom/qcom_wdt_core.c @@ -1,6 +1,6 @@ // SPDX-License-Identifier: GPL-2.0-only /* - * Copyright (c) 2012-2020, The Linux Foundation. All rights reserved. + * Copyright (c) 2012-2021, The Linux Foundation. All rights reserved. */ #include #include @@ -407,11 +407,11 @@ static struct syscore_ops qcom_wdt_syscore_ops = { static void qcom_wdt_reset_on_oops(struct msm_watchdog_data *wdog_dd, int timeout) { + wdog_dd->ops->reset_wdt(wdog_dd); wdog_dd->ops->set_bark_time((timeout + 10) * 1000, wdog_dd); wdog_dd->ops->set_bite_time((timeout + 10) * 1000, wdog_dd); - wdog_dd->ops->reset_wdt(wdog_dd); } static int qcom_wdt_panic_handler(struct notifier_block *this,