Skip to content

Commit

Permalink
drivers: event: add macro definition to control SW_PANIC event
Browse files Browse the repository at this point in the history
Signed-off-by: Xiangyi Zeng <[email protected]>
  • Loading branch information
Xiangyi Zeng authored and RevySR committed Jul 4, 2024
1 parent c66514a commit 4c09842
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion kernel/panic.c
Original file line number Diff line number Diff line change
Expand Up @@ -282,12 +282,14 @@ void panic(const char *fmt, ...)
int state = 0;
int old_cpu, this_cpu;
bool _crash_kexec_post_notifiers = crash_kexec_post_notifiers;

#ifdef CONFIG_TH1520_REBOOTMODE
enum th1520_rebootmode_index mode;

if (!th1520_event_get_rebootmode(&mode) &&
mode != TH1520_EVENT_SW_WATCHDOG)
th1520_event_set_rebootmode(TH1520_EVENT_SW_PANIC);

#endif
if (panic_on_warn) {
/*
* This thread may hit another WARN() in the panic path.
Expand Down

0 comments on commit 4c09842

Please sign in to comment.