[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <aBcLZUxct4ppmWVB@gmail.com>
Date: Sun, 4 May 2025 08:38:29 +0200
From: Ingo Molnar <mingo@...nel.org>
To: Borislav Petkov <bp@...en8.de>
Cc: Mario Limonciello <superm1@...nel.org>,
Jean Delvare <jdelvare@...e.com>,
Andi Shyti <andi.shyti@...nel.org>,
Ilpo Järvinen <ilpo.jarvinen@...ux.intel.com>,
Jonathan Corbet <corbet@....net>,
Mario Limonciello <mario.limonciello@....com>,
Yazen Ghannam <yazen.ghannam@....com>,
Thomas Gleixner <tglx@...utronix.de>,
Ingo Molnar <mingo@...hat.com>,
Dave Hansen <dave.hansen@...ux.intel.com>,
"maintainer:X86 ARCHITECTURE (32-BIT AND 64-BIT)" <x86@...nel.org>,
"H . Peter Anvin" <hpa@...or.com>,
Shyam Sundar S K <Shyam-sundar.S-k@....com>,
Hans de Goede <hdegoede@...hat.com>,
"open list:DOCUMENTATION" <linux-doc@...r.kernel.org>,
open list <linux-kernel@...r.kernel.org>,
"open list:I2C/SMBUS CONTROLLER DRIVERS FOR PC" <linux-i2c@...r.kernel.org>,
"open list:AMD PMC DRIVER" <platform-driver-x86@...r.kernel.org>
Subject: Re: [PATCH v5 5/5] x86/CPU/AMD: Print the reason for the last reset
* Borislav Petkov <bp@...en8.de> wrote:
> + for (i = 0; i <= ARRAY_SIZE(s5_reset_reason_txt); i++) {
> + if (!(value & BIT(i)))
> continue;
>
> - nr_reasons++;
> - pr_info("x86/amd: Previous system reset reason [0x%08lx]: %s\n",
> - value, s5_reset_reason_txt[bit]);
> + if (s5_reset_reason_txt[i])
> + pr_info("x86/amd: Previous system reset reason [0x%08lx]: %s\n",
> + value, s5_reset_reason_txt[i]);
> }
Yeah, this is much more straightforward code that gets us all the
information - as diagnostics code should be.
Thanks,
Ingo
Powered by blists - more mailing lists