The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: Feng Tang <feng.tang@linux.alibaba.com>
To: Borislav Petkov <bp@alien8.de>
Cc: "Huang, Ying" <ying.huang@linux.alibaba.com>,
	rafael@kernel.org, Len Brown <lenb@kernel.org>,
	James Morse <james.morse@arm.com>,
	Tony Luck <tony.luck@intel.com>,
	linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org,
	Ira Weiny <ira.weiny@intel.com>,
	Dave Jiang <dave.jiang@intel.com>,
	Dan Williams <dan.j.williams@intel.com>,
	Andi Kleen <ak@linux.intel.com>
Subject: Re: [PATCH] acpi/ghes: Make ghes_panic_timeout adjustable as a parameter
Date: Tue, 31 Dec 2024 14:44:48 +0800	[thread overview]
Message-ID: <Z3OS4LCCxfVN32uH@U-2FWC9VHC-2323.local> (raw)
In-Reply-To: <20241230132403.GEZ3Ke8zm7HxSv84pA@fat_crate.local>

On Mon, Dec 30, 2024 at 02:24:03PM +0100, Borislav Petkov wrote:
> On Mon, Dec 30, 2024 at 09:04:11PM +0800, Feng Tang wrote:
> > As per kernel config, most ARCH has 'panic_timeout' as 0 by default, so
> > need to set the kcmdline. For the case in my commit log, where user had
> > clear requirement for not-reboot and wait, the manually set 'panic=0'
> > should take priority here?
> 
> I think so.
> 
> I'm not convinced that lets-log-the-hw-error-faster should override the panic
> timeout setting but I'm open to real-life example scenarios...
> 

I see. Upon the discussion so far, how about the change below?

---
diff --git a/drivers/acpi/apei/ghes.c b/drivers/acpi/apei/ghes.c
index 07789f0b59bc..113471b76d8d 100644
--- a/drivers/acpi/apei/ghes.c
+++ b/drivers/acpi/apei/ghes.c
@@ -173,8 +173,6 @@ static struct gen_pool *ghes_estatus_pool;
 static struct ghes_estatus_cache __rcu *ghes_estatus_caches[GHES_ESTATUS_CACHES_SIZE];
 static atomic_t ghes_estatus_cache_alloced;
 
-static int ghes_panic_timeout __read_mostly = 30;
-
 static void __iomem *ghes_map(u64 pfn, enum fixed_addresses fixmap_idx)
 {
 	phys_addr_t paddr;
@@ -987,9 +985,10 @@ static void __ghes_panic(struct ghes *ghes,
 
 	ghes_clear_estatus(ghes, estatus, buf_paddr, fixmap_idx);
 
-	/* reboot to log the error! */
-	if (!panic_timeout)
-		panic_timeout = ghes_panic_timeout;
+	/* If user hasn't specifically set panic timeout, reboot to log the error! */
+	if (!panic_timeout && !strstr(saved_command_line, "panic="))
+		panic_timeout = 30;
+
 	panic("Fatal hardware error!");
 }

Or we want to stick the orignal patch, which doesn't change the
original flow?

Thanks,
Feng

  reply	other threads:[~2024-12-31  6:44 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-12-27  9:54 [PATCH] acpi/ghes: Make ghes_panic_timeout adjustable as a parameter Feng Tang
2024-12-27 10:09 ` Borislav Petkov
2024-12-30  5:54   ` Huang, Ying
2024-12-30 10:16     ` Borislav Petkov
2024-12-30 11:04       ` Huang, Ying
2024-12-30 11:26         ` Borislav Petkov
2024-12-30 11:40           ` Feng Tang
2024-12-30 12:10             ` Borislav Petkov
2024-12-30 13:04               ` Feng Tang
2024-12-30 13:24                 ` Borislav Petkov
2024-12-31  6:44                   ` Feng Tang [this message]
2024-12-31  9:23                     ` Borislav Petkov
2024-12-31 10:15                       ` Feng Tang
2024-12-31 11:13                         ` Borislav Petkov
2024-12-31 12:02                           ` Feng Tang
2025-01-02  2:46                           ` Huang, Ying
2025-01-02  8:35                             ` Borislav Petkov
2025-01-13 12:52                               ` [PATCH] APEI: GHES: Have GHES honor the panic= setting Borislav Petkov
2025-01-13 20:08                                 ` Ira Weiny
2025-01-14 17:29                                   ` Rafael J. Wysocki
2025-01-09 13:47                           ` [PATCH] acpi/ghes: Make ghes_panic_timeout adjustable as a parameter Feng Tang
2025-01-13 12:50                             ` Borislav Petkov

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=Z3OS4LCCxfVN32uH@U-2FWC9VHC-2323.local \
    --to=feng.tang@linux.alibaba.com \
    --cc=ak@linux.intel.com \
    --cc=bp@alien8.de \
    --cc=dan.j.williams@intel.com \
    --cc=dave.jiang@intel.com \
    --cc=ira.weiny@intel.com \
    --cc=james.morse@arm.com \
    --cc=lenb@kernel.org \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rafael@kernel.org \
    --cc=tony.luck@intel.com \
    --cc=ying.huang@linux.alibaba.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