[PATCH 01/13] mtrr: Don't show an invalid CPU number
Bin Meng
bmeng.cn at gmail.com
Mon Mar 20 07:23:33 CET 2023
Hi Simon,
On Tue, Feb 21, 2023 at 3:49 AM Simon Glass <sjg at chromium.org> wrote:
>
> When U-Boot did not do the MP init, we don't get an actual CPU number
> here. Skip printing it in that case.
>
> Signed-off-by: Simon Glass <sjg at chromium.org>
> ---
>
> cmd/x86/mtrr.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/cmd/x86/mtrr.c b/cmd/x86/mtrr.c
> index b213a942fde..95916933e9a 100644
> --- a/cmd/x86/mtrr.c
> +++ b/cmd/x86/mtrr.c
> @@ -145,7 +145,8 @@ static int do_mtrr(struct cmd_tbl *cmdtp, int flag, int argc,
> for (; i >= 0; i = mp_next_cpu(cpu_select, i)) {
> if (!first)
> printf("\n");
> - printf("CPU %d:\n", i);
> + if (i < MP_SELECT_ALL)
> + printf("CPU %d:\n", i);
> ret = do_mtrr_list(reg_count, i);
> if (ret) {
> printf("Failed to read CPU %d (err=%d)\n", i,
The CPU number <i> should not be printed here if (i >= MP_SELECT_ALL)
Regards,
Bin
More information about the U-Boot
mailing list