mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Pnina Feder <pnina.feder@mobileye.com>
To: akpm@linux-foundation.org
Cc: pmladek@suse.com, bhe@redhat.com, linux-kernel@vger.kernel.org,
	lkp@intel.com, mgorman@suse.de, mingo@redhat.com,
	peterz@infradead.org, pnina.feder@mobileye.com,
	rostedt@goodmis.org, senozhatsky@chromium.org,
	tglx@linutronix.de, vkondra@mobileye.com
Subject: [PATCH v1] panic: add panic_redirect_cpu declaration to header
Date: Sun, 18 Jan 2026 14:01:49 +0200	[thread overview]
Message-ID: <20260118120149.986849-1-pnina.feder@mobileye.com> (raw)

Add the extern declaration for panic_redirect_cpu to linux/panic.h
to fix the sparse warning:

  kernel/panic.c:305:10: sparse: sparse: symbol 'panic_redirect_cpu'
  was not declared. Should it be static?

The variable needs to be declared in the header alongside panic_cpu
since it is used for synchronization when redirecting panic to a
specific CPU via the panic_force_cpu= boot parameter.

Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202601161825.pUmb6FsK-lkp@intel.com/
Signed-off-by: Pnina Feder <pnina.feder@mobileye.com>
---
 include/linux/panic.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/include/linux/panic.h b/include/linux/panic.h
index a00bc0937698..f1dd417e54b2 100644
--- a/include/linux/panic.h
+++ b/include/linux/panic.h
@@ -41,6 +41,14 @@ void abort(void);
  * PANIC_CPU_INVALID means no CPU has entered panic() or crash_kexec().
  */
 extern atomic_t panic_cpu;
+
+/*
+ * panic_redirect_cpu is used when panic is redirected to a specific CPU via
+ * the panic_force_cpu= boot parameter. It holds the CPU number that originally
+ * triggered the panic before redirection. A value of PANIC_CPU_INVALID means
+ * no redirection has occurred.
+ */
+extern atomic_t panic_redirect_cpu;
 #define PANIC_CPU_INVALID	-1
 
 bool panic_try_start(void);
-- 
2.43.0


             reply	other threads:[~2026-01-18 12:02 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-01-18 12:01 Pnina Feder [this message]
2026-01-18 20:44 ` Andrew Morton

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260118120149.986849-1-pnina.feder@mobileye.com \
    --to=pnina.feder@mobileye.com \
    --cc=akpm@linux-foundation.org \
    --cc=bhe@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lkp@intel.com \
    --cc=mgorman@suse.de \
    --cc=mingo@redhat.com \
    --cc=peterz@infradead.org \
    --cc=pmladek@suse.com \
    --cc=rostedt@goodmis.org \
    --cc=senozhatsky@chromium.org \
    --cc=tglx@linutronix.de \
    --cc=vkondra@mobileye.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®