From: Marc Zyngier <maz@kernel.org>
To: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Cc: Catalin Marinas <catalin.marinas@arm.com>,
Will Deacon <will@kernel.org>,
linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org
Subject: Re: [PATCH] arm64: cpufeature: fix CPU features mismatch message
Date: Wed, 17 Nov 2021 09:13:28 +0000 [thread overview]
Message-ID: <871r3f87rb.wl-maz@kernel.org> (raw)
In-Reply-To: <20211116215922.2021550-1-dmitry.baryshkov@linaro.org>
On Tue, 16 Nov 2021 21:59:22 +0000,
Dmitry Baryshkov <dmitry.baryshkov@linaro.org> wrote:
>
> Fix cpp magic involved in ARM64_FTR_REG/ARM64_FTR_REG_OVERRIDE macros.
> Currently ARM64_FTR_REG parameters are expanded early, resulting in
> cryptic debug messages:
>
> [ 0.071123] CPU features: SANITY CHECK: Unexpected variation in (((3) << 19) | ((0) << 16) | ((0) << 12) | ((7) << 8) | ((0) << 5)). Boot CPU: 0x00022200101022, CPU4: 0x00022200101122
>
> Make ARM64_FTR_REG to be expanded before parameters, resulting in proper
> debug log:
>
> [ 0.071163] CPU features: SANITY CHECK: Unexpected variation in SYS_ID_AA64MMFR0_EL1. Boot CPU: 0x00022200101022, CPU4: 0x00022200101122
>
> Fixes: 8f266a5d878a ("arm64: cpufeature: Add global feature override facility")
> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
> ---
> arch/arm64/kernel/cpufeature.c | 8 +++++---
> 1 file changed, 5 insertions(+), 3 deletions(-)
>
> diff --git a/arch/arm64/kernel/cpufeature.c b/arch/arm64/kernel/cpufeature.c
> index 6ec7036ef7e1..72e3e3819eb4 100644
> --- a/arch/arm64/kernel/cpufeature.c
> +++ b/arch/arm64/kernel/cpufeature.c
> @@ -573,15 +573,17 @@ static const struct arm64_ftr_bits ftr_raz[] = {
> ARM64_FTR_END,
> };
>
> -#define ARM64_FTR_REG_OVERRIDE(id, table, ovr) { \
> +#define __ARM64_FTR_REG(id, _name, table, ovr) { \
> .sys_id = id, \
> .reg = &(struct arm64_ftr_reg){ \
> - .name = #id, \
> + .name = _name, \
> .override = (ovr), \
> .ftr_bits = &((table)[0]), \
> }}
>
> -#define ARM64_FTR_REG(id, table) ARM64_FTR_REG_OVERRIDE(id, table, &no_override)
> +#define ARM64_FTR_REG_OVERRIDE(id, table, ovr) __ARM64_FTR_REG(id, #id, table, ovr)
> +
> +#define ARM64_FTR_REG(id, table) __ARM64_FTR_REG(id, #id, table, &no_override)
>
> struct arm64_ftr_override __ro_after_init id_aa64mmfr1_override;
> struct arm64_ftr_override __ro_after_init id_aa64pfr1_override;
Please see commit 9dc232a8ab18 ("arm64: arm64_ftr_reg->name may not be
a human-readable string").
M.
--
Without deviation from the norm, progress is not possible.
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
prev parent reply other threads:[~2021-11-17 9:26 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-11-16 21:59 [PATCH] arm64: cpufeature: fix CPU features mismatch message Dmitry Baryshkov
2021-11-17 9:13 ` Marc Zyngier [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=871r3f87rb.wl-maz@kernel.org \
--to=maz@kernel.org \
--cc=catalin.marinas@arm.com \
--cc=dmitry.baryshkov@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=will@kernel.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;
as well as URLs for NNTP newsgroup(s).