From: Sascha Hauer <sha@pengutronix.de>
To: Ahmad Fatoum <a.fatoum@pengutronix.de>
Cc: barebox@lists.infradead.org
Subject: Re: [PATCH 1/2] ARM: cpuinfo: print CPU mainid if unknown
Date: Tue, 7 Jun 2022 09:07:27 +0200 [thread overview]
Message-ID: <20220607070727.GK1615@pengutronix.de> (raw)
In-Reply-To: <20220603072436.1579545-1-a.fatoum@pengutronix.de>
On Fri, Jun 03, 2022 at 09:24:35AM +0200, Ahmad Fatoum wrote:
> Instead of e.g.
>
> core: unknown r0p3
>
> We now get
>
> core: unknown (0x410fd083) r0p3
>
> Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
> ---
> arch/arm/cpu/cpuinfo.c | 10 +++++++---
> 1 file changed, 7 insertions(+), 3 deletions(-)
Applied, thanks
Sascha
>
> diff --git a/arch/arm/cpu/cpuinfo.c b/arch/arm/cpu/cpuinfo.c
> index a08fc253efbb..5dce34536efc 100644
> --- a/arch/arm/cpu/cpuinfo.c
> +++ b/arch/arm/cpu/cpuinfo.c
> @@ -191,7 +191,7 @@ static int do_cpuinfo(int argc, char *argv[])
>
> if (cpu_arch >= CPU_ARCH_ARMv7) {
> unsigned int major, minor;
> - char *part;
> + const char *part = NULL;
> major = (mainid >> 20) & 0xf;
> minor = mainid & 0xf;
> switch (mainid & 0xfff0) {
> @@ -217,9 +217,13 @@ static int do_cpuinfo(int argc, char *argv[])
> part = "Cortex-A57";
> break;
> default:
> - part = "unknown";
> + printf("core: unknown (0x%08lx) r%up%u\n",
> + mainid, major, minor);
> + break;
> }
> - printf("core: %s r%up%u\n", part, major, minor);
> +
> + if (part)
> + printf("core: %s r%up%u\n", part, major, minor);
> }
>
> if (cache & (1 << 24)) {
> --
> 2.30.2
>
>
> _______________________________________________
> barebox mailing list
> barebox@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/barebox
>
--
Pengutronix e.K. | |
Steuerwalder Str. 21 | http://www.pengutronix.de/ |
31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
prev parent reply other threads:[~2022-06-07 7:09 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-03 7:24 Ahmad Fatoum
2022-06-03 7:24 ` [PATCH 2/2] ARM: cpuinfo: detect Cortex-A72 Ahmad Fatoum
2022-06-07 7:07 ` Sascha Hauer [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220607070727.GK1615@pengutronix.de \
--to=sha@pengutronix.de \
--cc=a.fatoum@pengutronix.de \
--cc=barebox@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox