[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250825022947.1596226-3-wangjinchao600@gmail.com>
Date: Mon, 25 Aug 2025 10:29:30 +0800
From: Jinchao Wang <wangjinchao600@...il.com>
To: Andrew Morton <akpm@...ux-foundation.org>,
Baoquan He <bhe@...hat.com>,
Yury Norov <yury.norov@...il.com>,
Qianqiang Liu <qianqiang.liu@....com>,
Simona Vetter <simona@...ll.ch>,
Helge Deller <deller@....de>,
Petr Mladek <pmladek@...e.com>,
Steven Rostedt <rostedt@...dmis.org>,
John Ogness <john.ogness@...utronix.de>,
Sergey Senozhatsky <senozhatsky@...omium.org>,
Vivek Goyal <vgoyal@...hat.com>,
Dave Young <dyoung@...hat.com>,
Kees Cook <kees@...nel.org>,
Tony Luck <tony.luck@...el.com>,
"Guilherme G. Piccoli" <gpiccoli@...lia.com>,
Thomas Zimmermann <tzimmermann@...e.de>,
Ville Syrjälä <ville.syrjala@...ux.intel.com>,
Shixiong Ou <oushixiong@...inos.cn>,
Jinchao Wang <wangjinchao600@...il.com>,
Zsolt Kajtar <soci@....rulez.org>,
Ingo Molnar <mingo@...nel.org>,
Nam Cao <namcao@...utronix.de>,
Jonathan Cameron <Jonathan.Cameron@...wei.com>,
Joel Fernandes <joelagnelf@...dia.com>,
Joel Granados <joel.granados@...nel.org>,
Jason Gunthorpe <jgg@...pe.ca>,
Sohil Mehta <sohil.mehta@...el.com>,
Feng Tang <feng.tang@...ux.alibaba.com>,
Sravan Kumar Gundu <sravankumarlpu@...il.com>,
Douglas Anderson <dianders@...omium.org>,
Thomas Gleixner <tglx@...utronix.de>,
Anna Schumaker <anna.schumaker@...cle.com>,
"Darrick J. Wong" <djwong@...nel.org>,
Max Kellermann <max.kellermann@...os.com>,
Yunhui Cui <cuiyunhui@...edance.com>,
Tejun Heo <tj@...nel.org>,
Luo Gengkun <luogengkun@...weicloud.com>,
Li Huafei <lihuafei1@...wei.com>,
Thorsten Blum <thorsten.blum@...ux.dev>,
Yicong Yang <yangyicong@...ilicon.com>,
linux-fbdev@...r.kernel.org,
dri-devel@...ts.freedesktop.org,
kexec@...ts.infradead.org,
linux-hardening@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: [PATCH v2 2/9] fbdev: Use panic_in_progress() helper
This patch updates the fbcon_skip_panic() function to use the
panic_in_progress() helper.
The previous direct access to panic_cpu is less readable and is being
replaced by a dedicated function that more clearly expresses the intent.
This change is part of a series to refactor the kernel's panic handling
logic for better clarity and robustness.
Signed-off-by: Jinchao Wang <wangjinchao600@...il.com>
Acked-by Qianqiang Liu <qianqiang.liu@....com>
---
drivers/video/fbdev/core/fbcon.c | 9 +--------
1 file changed, 1 insertion(+), 8 deletions(-)
diff --git a/drivers/video/fbdev/core/fbcon.c b/drivers/video/fbdev/core/fbcon.c
index 55f5731e94c3..b062b05f4128 100644
--- a/drivers/video/fbdev/core/fbcon.c
+++ b/drivers/video/fbdev/core/fbcon.c
@@ -279,14 +279,7 @@ 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
+ return (info->skip_panic && unlikely(panic_in_progress()));
}
static inline bool fbcon_is_active(struct vc_data *vc, struct fb_info *info)
--
2.43.0
Powered by blists - more mailing lists