panic: resume console if panic after console suspend.
Device rebooted by kernel panic but no panic message. This helps to get the panic messages in this case. Bug: 10184128 Change-Id: I24545b1ce2f9e3e239795089d8564c2cc5f89fe7 Signed-off-by: shihhao.feng <shihhao.feng@lge.com> Signed-off-by: Devin Kim <dojip.kim@lge.com>
This commit is contained in:
@@ -153,6 +153,7 @@ extern int braille_register_console(struct console *, int index,
|
|||||||
extern int braille_unregister_console(struct console *);
|
extern int braille_unregister_console(struct console *);
|
||||||
extern void console_sysfs_notify(void);
|
extern void console_sysfs_notify(void);
|
||||||
extern bool console_suspend_enabled;
|
extern bool console_suspend_enabled;
|
||||||
|
extern int is_console_suspended(void);
|
||||||
|
|
||||||
/* Suspend and resume console messages over PM events */
|
/* Suspend and resume console messages over PM events */
|
||||||
extern void suspend_console(void);
|
extern void suspend_console(void);
|
||||||
|
|||||||
@@ -24,6 +24,7 @@
|
|||||||
#include <linux/nmi.h>
|
#include <linux/nmi.h>
|
||||||
#include <linux/dmi.h>
|
#include <linux/dmi.h>
|
||||||
#include <linux/coresight.h>
|
#include <linux/coresight.h>
|
||||||
|
#include <linux/console.h>
|
||||||
|
|
||||||
#define PANIC_TIMER_STEP 100
|
#define PANIC_TIMER_STEP 100
|
||||||
#define PANIC_BLINK_SPD 18
|
#define PANIC_BLINK_SPD 18
|
||||||
@@ -133,6 +134,10 @@ void panic(const char *fmt, ...)
|
|||||||
|
|
||||||
kmsg_dump(KMSG_DUMP_PANIC);
|
kmsg_dump(KMSG_DUMP_PANIC);
|
||||||
|
|
||||||
|
/* print last_kmsg even after console suspend */
|
||||||
|
if (is_console_suspended())
|
||||||
|
resume_console();
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Note smp_send_stop is the usual smp shutdown function, which
|
* Note smp_send_stop is the usual smp shutdown function, which
|
||||||
* unfortunately means it may not be hardened to work in a panic
|
* unfortunately means it may not be hardened to work in a panic
|
||||||
|
|||||||
@@ -1188,6 +1188,12 @@ module_param_named(console_suspend, console_suspend_enabled,
|
|||||||
MODULE_PARM_DESC(console_suspend, "suspend console during suspend"
|
MODULE_PARM_DESC(console_suspend, "suspend console during suspend"
|
||||||
" and hibernate operations");
|
" and hibernate operations");
|
||||||
|
|
||||||
|
/* check current suspend/resume status of the console */
|
||||||
|
int is_console_suspended(void)
|
||||||
|
{
|
||||||
|
return console_suspended;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* suspend_console - suspend the console subsystem
|
* suspend_console - suspend the console subsystem
|
||||||
*
|
*
|
||||||
|
|||||||
Reference in New Issue
Block a user