From: mark.rutland@arm.com (Mark Rutland)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] arm64: consistently log boot/secondary CPU IDs
Date: Thu, 28 Sep 2017 12:52:53 +0100 [thread overview]
Message-ID: <20170928115253.GB11310@leverpostej> (raw)
In-Reply-To: <20170928085446.GB19060@arm.com>
On Thu, Sep 28, 2017 at 09:54:47AM +0100, Will Deacon wrote:
> On Wed, Sep 27, 2017 at 02:50:38PM +0100, Mark Rutland wrote:
> > Currently we inconsistently log identifying information for the boot CPU
> > and secondary CPUs. For the boot CPU, we log the MIDR and MPIDR across
> > separate messages, whereas for the secondary CPUs we only log the MIDR.
> >
> > In some cases, it would be useful to know the MPIDR of secondary CPUs,
> > and it would be nice for these messages to be consistent.
> >
> > This patch ensures that in the primary and secondary boot paths, we log
> > both the MPIDR and MIDR in a single message, with a consistent format.
> > the MPIDR is consistently padded to 10 hex characters to cover Aff3 in
> > bits 39:32, so that IDs can be compared easily.
> >
> > The newly redundant message in setup_arch() is removed.
> >
> > Signed-off-by: Mark Rutland <mark.rutland@arm.com>
> > Cc: Al Stone <ahs3@redhat.com>
> > Cc: Catalin Marinas <catalin.marinas@arm.com>
> > Cc: Will Deacon <will.deacon@arm.com>
> > ---
> > arch/arm64/kernel/setup.c | 5 ++---
> > arch/arm64/kernel/smp.c | 6 ++++--
> > 2 files changed, 6 insertions(+), 5 deletions(-)
> >
> > diff --git a/arch/arm64/kernel/setup.c b/arch/arm64/kernel/setup.c
> > index d4b7405..819c1d1 100644
> > --- a/arch/arm64/kernel/setup.c
> > +++ b/arch/arm64/kernel/setup.c
> > @@ -103,7 +103,8 @@ void __init smp_setup_processor_id(void)
> > * access percpu variable inside lock_release
> > */
> > set_my_cpu_offset(0);
> > - pr_info("Booting Linux on physical CPU 0x%lx\n", (unsigned long)mpidr);
> > + pr_info("Booting Linux on physical CPU 0x%010lx [%08x]\n",
> > + (unsigned long)mpidr, read_cpuid_id());
>
> We should probably be consistent in whether or not we include the '0x'
> prefix for these hex numbers, otherwise it could get confusing. I don't mind
> which way we go.
Sure.
My preference would be to add the 0x in both cases so that there's no
ambiguity.
I can send a new version with that fixed up, unless you're happy to do
that locally?
Thanks,
Mark.
prev parent reply other threads:[~2017-09-28 11:52 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-09-27 13:50 [PATCH] arm64: consistently log boot/secondary CPU IDs Mark Rutland
2017-09-28 8:54 ` Will Deacon
2017-09-28 11:52 ` Mark Rutland [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=20170928115253.GB11310@leverpostej \
--to=mark.rutland@arm.com \
--cc=linux-arm-kernel@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