From: Dave Martin <Dave.Martin@arm.com>
To: Suzuki K Poulose <suzuki.poulose@arm.com>
Cc: Dirk Mueller <dmueller@suse.com>,
linux-arm-kernel@lists.infradead.org,
Marc Zyngier <marc.zyngier@arm.com>,
Catalin Marinas <catalin.marinas@arm.com>,
Will Deacon <will.deacon@arm.com>,
linux-kernel@vger.kernel.org, Alex Graf <agraf@suse.de>
Subject: Re: [PATCH] arm64: Check for errata before evaluating cpu features
Date: Wed, 25 Jul 2018 09:56:04 +0100 [thread overview]
Message-ID: <20180725085604.GB4240@e103592.cambridge.arm.com> (raw)
In-Reply-To: <aea2daa9-40ef-2066-0da9-0770c3c50dfb@arm.com>
On Wed, Jul 25, 2018 at 09:51:53AM +0100, Suzuki K Poulose wrote:
> On 07/25/2018 09:35 AM, Dirk Mueller wrote:
> >Since commit d3aec8a28be3b8 ("arm64: capabilities: Restrict KPTI
> >detection to boot-time CPUs") we rely on errata flags being already
> >populated during feature enumeration. The order of errata and
> >features was flipped as part of commit ed478b3f9e4a ("arm64:
> >capabilities: Group handling of features and errata workarounds").
> >
> >Return to the orginal order of errata and feature evaluation to
> >ensure errata flags are present during feature evaluation.
> >
> >Fixes: d3aec8a28be3b8 ("arm64: capabilities: Restrict KPTI
> >detection to boot-time CPUs")
> >CC: Suzuki K Poulose <suzuki.poulose@arm.com>
> >CC: Marc Zyngier <marc.zyngier@arm.com>
> >Signed-off-by: Dirk Mueller <dmueller@suse.com>
>
> It would be good to add "Fixes: ed478b3f9e4a" (instead), just to make
> sure this gets fixed everywhere the original problem appears.
>
> >---
> > arch/arm64/kernel/cpufeature.c | 4 ++--
> > 1 file changed, 2 insertions(+), 2 deletions(-)
> >
> >diff --git a/arch/arm64/kernel/cpufeature.c b/arch/arm64/kernel/cpufeature.c
> >index f24892a40d2c..c6d80743f4ed 100644
> >--- a/arch/arm64/kernel/cpufeature.c
> >+++ b/arch/arm64/kernel/cpufeature.c
> >@@ -1351,9 +1351,9 @@ static void __update_cpu_capabilities(const struct arm64_cpu_capabilities *caps,
> > static void update_cpu_capabilities(u16 scope_mask)
> > {
> >- __update_cpu_capabilities(arm64_features, scope_mask, "detected:");
> > __update_cpu_capabilities(arm64_errata, scope_mask,
> > "enabling workaround for");
> >+ __update_cpu_capabilities(arm64_features, scope_mask, "detected:");
> > }
> > static int __enable_cpu_capability(void *arg)
> >@@ -1408,8 +1408,8 @@ __enable_cpu_capabilities(const struct arm64_cpu_capabilities *caps,
> > static void __init enable_cpu_capabilities(u16 scope_mask)
> > {
> >- __enable_cpu_capabilities(arm64_features, scope_mask);
> > __enable_cpu_capabilities(arm64_errata, scope_mask);
> >+ __enable_cpu_capabilities(arm64_features, scope_mask);
I forget why these were originally reordered in ed478b3f9e4a.
Was there any real reason for it?
I also notice in that commit that after the detection pass, we set
things up (in update_cpu_capabilities(), enable_cpu_capabilities()) in
the order errata, features. Does this matter for anything?
Cheers
---Dave
>
> Reviewed-by: Suzuki K Poulose <suzuki.poulose@arm.com>
>
>
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2018-07-25 8:56 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-07-25 8:35 Dirk Mueller
2018-07-25 8:51 ` Suzuki K Poulose
2018-07-25 8:56 ` Dave Martin [this message]
2018-07-25 9:28 ` Suzuki K Poulose
2018-07-25 11:10 Dirk Mueller
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=20180725085604.GB4240@e103592.cambridge.arm.com \
--to=dave.martin@arm.com \
--cc=agraf@suse.de \
--cc=catalin.marinas@arm.com \
--cc=dmueller@suse.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=marc.zyngier@arm.com \
--cc=suzuki.poulose@arm.com \
--cc=will.deacon@arm.com \
/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
all inboxes | Powered by JetHome®