diff options
author | Simon Glass <sjg@chromium.org> | 2023-05-04 16:54:54 -0600 |
---|---|---|
committer | Bin Meng <bmeng@tinylab.org> | 2023-05-11 10:25:29 +0800 |
commit | 0fb19ffe3056e02408c4e14940d3635bbffd7295 (patch) | |
tree | 6a5a373bc709850d37d3fd5c6b8b60b6ce101643 | |
parent | 0a9a4384c1483a88776bca38e28f09be51161034 (diff) | |
download | u-boot-0fb19ffe3056e02408c4e14940d3635bbffd7295.tar.gz u-boot-0fb19ffe3056e02408c4e14940d3635bbffd7295.tar.bz2 u-boot-0fb19ffe3056e02408c4e14940d3635bbffd7295.zip |
mtrr: Don't show an invalid CPU number
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@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
-rw-r--r-- | cmd/x86/mtrr.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/cmd/x86/mtrr.c b/cmd/x86/mtrr.c index b213a942fd..b1691d8b65 100644 --- a/cmd/x86/mtrr.c +++ b/cmd/x86/mtrr.c @@ -148,7 +148,8 @@ static int do_mtrr(struct cmd_tbl *cmdtp, int flag, int argc, printf("CPU %d:\n", i); ret = do_mtrr_list(reg_count, i); if (ret) { - printf("Failed to read CPU %d (err=%d)\n", i, + printf("Failed to read CPU %s (err=%d)\n", + i < MP_SELECT_ALL ? simple_itoa(i) : "", ret); return CMD_RET_FAILURE; } |