mirror of
https://github.com/torvalds/linux.git
synced 2024-09-20 06:53:04 +00:00
fbcon: Use oops_in_progress instead of panic_cpu
Panic_cpu is not exported, so it can't be used if fbcon is used as a module. Use oops_in_progress in this case, but non-fatal oops won't be printed. Reported-by: kernel test robot <lkp@intel.com> Closes: https://lore.kernel.org/oe-kbuild-all/202407210203.2ISiIC9m-lkp@intel.com/ Signed-off-by: Jocelyn Falempe <jfalempe@redhat.com> Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch> Link: https://patchwork.freedesktop.org/patch/msgid/20240722114800.174558-1-jfalempe@redhat.com
This commit is contained in:
parent
7e33fc2ff6
commit
1c1ed27ee1
|
@ -64,6 +64,8 @@
|
|||
#include <linux/console.h>
|
||||
#include <linux/string.h>
|
||||
#include <linux/kd.h>
|
||||
#include <linux/panic.h>
|
||||
#include <linux/printk.h>
|
||||
#include <linux/slab.h>
|
||||
#include <linux/fb.h>
|
||||
#include <linux/fbcon.h>
|
||||
|
@ -272,7 +274,14 @@ static int fbcon_get_rotate(struct fb_info *info)
|
|||
|
||||
static bool fbcon_skip_panic(struct fb_info *info)
|
||||
{
|
||||
/* panic_cpu is not exported, and can't be used if built as module. Use
|
||||
* oops_in_progress instead, but non-fatal oops won't be printed.
|
||||
*/
|
||||
#if defined(MODULE)
|
||||
return (info->skip_panic && unlikely(oops_in_progress));
|
||||
#else
|
||||
return (info->skip_panic && unlikely(atomic_read(&panic_cpu) != PANIC_CPU_INVALID));
|
||||
#endif
|
||||
}
|
||||
|
||||
static inline int fbcon_is_inactive(struct vc_data *vc, struct fb_info *info)
|
||||
|
|
Loading…
Reference in New Issue
Block a user