remoteproc: pas: Update panic handler priority

Currently, both remoteproc and wdog driver panic handler has the
same priority due to which both gets registered one after the other.

Having the same priority breaks WDOG panic handler which should be
called as early as possible otherwise we will the devices gets
stuck if any of previous handlers gets stuck due to some reason
like sleep while atomic etc.,

Fix this by correcting the priorities as

dload_mode => INT_MAX
wdog => INT_MAX - 1
rproc => INT_MAX - 2
minidump => INT_MAX - 3
va-minidump => INT_MAX - 4, INT_MAX - 5 .

Change-Id: I79e454c7c671bbc83e5fac86e16717c3e09a06ce
Signed-off-by: Mukesh Ojha <quic_mojha@quicinc.com>
Signed-off-by: Srinivasarao Pathipati <quic_c_spathi@quicinc.com>
This commit is contained in:
Mukesh Ojha 2024-07-29 13:28:43 +05:30 committed by Srinivasarao Pathipati
parent a4f519bcfe
commit a700c40491
3 changed files with 6 additions and 6 deletions

View File

@ -1764,7 +1764,7 @@ static int adsp_probe(struct platform_device *pdev)
mutex_unlock(&q6v5_pas_mutex);
if (adsp->check_status) {
adsp->panic_blk.priority = INT_MAX - 1;
adsp->panic_blk.priority = INT_MAX - 2;
adsp->panic_blk.notifier_call = rproc_panic_handler;
atomic_notifier_chain_register(&panic_notifier_list, &adsp->panic_blk);
}

View File

@ -1,7 +1,7 @@
// SPDX-License-Identifier: GPL-2.0-only
/*
* Copyright (c) 2017-2021, The Linux Foundation. All rights reserved.
* Copyright (c) 2022-2023 Qualcomm Innovation Center, Inc. All rights reserved.
* Copyright (c) 2022-2024 Qualcomm Innovation Center, Inc. All rights reserved.
*/
#include <linux/cache.h>
@ -1153,7 +1153,7 @@ static int md_panic_handler(struct notifier_block *this,
static struct notifier_block md_panic_blk = {
.notifier_call = md_panic_handler,
.priority = INT_MAX - 2, /* < msm watchdog panic notifier */
.priority = INT_MAX - 3, /* < msm watchdog panic notifier */
};
static int md_register_minidump_entry(char *name, u64 virt_addr,

View File

@ -1,7 +1,7 @@
// SPDX-License-Identifier: GPL-2.0-only
/*
* Copyright (c) 2021, The Linux Foundation. All rights reserved.
* Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved.
* Copyright (c) 2022,2024, Qualcomm Innovation Center, Inc. All rights reserved.
*/
#define pr_fmt(fmt) "va-minidump: %s: " fmt, __func__
@ -690,12 +690,12 @@ static int qcom_va_md_elf_panic_handler(struct notifier_block *this,
static struct notifier_block qcom_va_md_panic_blk = {
.notifier_call = qcom_va_md_panic_handler,
.priority = INT_MAX - 3,
.priority = INT_MAX - 4,
};
static struct notifier_block qcom_va_md_elf_panic_blk = {
.notifier_call = qcom_va_md_elf_panic_handler,
.priority = INT_MAX - 4,
.priority = INT_MAX - 5,
};
static int qcom_va_md_reserve_mem(struct device *dev)