[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <87h6yfs676.ffs@tglx>
Date: Thu, 01 Dec 2022 12:40:13 +0100
From: Thomas Gleixner <tglx@...utronix.de>
To: Yuan ZhaoXiong <yuanzhx326@...il.com>, steven.price@....com,
Jason@...c4.com, juri.lelli@...hat.com, tony.luck@...el.com,
frederic@...nel.org, yuanzhx326@...il.com,
sathyanarayanan.kuppuswamy@...ux.intel.com
Cc: linux-kernel@...r.kernel.org
Subject: Re: [PATCH] cpu: printk error information when call cpu_up() failed.
On Mon, Nov 28 2022 at 21:28, Yuan ZhaoXiong wrote:
> It is better to printk error information out when calling cpu_up() failed.
> Users will observe cpu up error conveniently via the kernel log.
...
> + if (!cpu_online(cpu)) {
> + error = cpu_up(cpu, CPUHP_ONLINE);
> + if (error)
> + pr_err("Error taking CPU%d up: %d\n", cpu, error);
What's useful about it? If the CPU does not come up then it won't be
online.
The error code is pretty useless too because it does not tell you which
part of the online procedure caused it to fail. Just assume it fails
with -ENOMEM, then good luck to find the callback which observed the
memory allocation fail.
Thanks,
tglx
Powered by blists - more mailing lists