From 614d1069dc6ca73840c0b2039507c66c583a9bd3 Mon Sep 17 00:00:00 2001 From: Patryk Duda Date: Fri, 28 Aug 2020 13:33:51 +0200 Subject: it83xx/watchdog: Use newly provided functions to access panic data This change removes usage of PANIC_DATA_PTR where possible. Now panic data is accessed through functions that performs more checks and in case of writing also moves other data when necessary. BUG=b:165773837, b:162254118 BRANCH=none TEST=make -j buildall Signed-off-by: Patryk Duda Change-Id: Ibe23fcbbf829d25e573104c8bc6a407f8acc0282 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2379849 Reviewed-by: Jett Rink --- chip/it83xx/watchdog.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/chip/it83xx/watchdog.c b/chip/it83xx/watchdog.c index 6e12b9ba37..f0e200c4ac 100644 --- a/chip/it83xx/watchdog.c +++ b/chip/it83xx/watchdog.c @@ -14,8 +14,6 @@ #include "task.h" #include "watchdog.h" -/* Panic data goes at the end of RAM. */ -static struct panic_data * const pdata_ptr = PANIC_DATA_PTR; /* Enter critical period or not. */ static int wdt_warning_fired; @@ -41,6 +39,8 @@ static void watchdog_set_warning_timer(int32_t ms, int init) void watchdog_warning_irq(void) { #ifdef CONFIG_SOFTWARE_PANIC + struct panic_data * const pdata_ptr = get_panic_data_write(); + #if defined(CHIP_CORE_NDS32) pdata_ptr->nds_n8.ipc = get_ipc(); #elif defined(CHIP_CORE_RISCV) -- cgit v1.2.1