Messages in this thread | | | From | Thomas Gleixner <> | Subject | Re: [PATCH] cpu: printk error information when call cpu_up() failed. | Date | Thu, 01 Dec 2022 12:40:13 +0100 |
| |
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
| |