Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1372409 > unrolled thread
| Started by | Suzuki K Poulose <suzuki.poulose@arm.com> |
|---|---|
| First post | 2016-04-06 13:30 +0200 |
| Last post | 2016-04-15 16:20 +0200 |
| Articles | 5 — 3 participants |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
[PATCH 4/5] arm64: Verify CPU errata work arounds on hotplugged CPU Suzuki K Poulose <suzuki.poulose@arm.com> - 2016-04-06 13:30 +0200
Re: [PATCH 4/5] arm64: Verify CPU errata work arounds on hotplugged CPU Will Deacon <will.deacon@arm.com> - 2016-04-14 19:40 +0200
Re: [PATCH 4/5] arm64: Verify CPU errata work arounds on hotplugged CPU Suzuki K Poulose <Suzuki.Poulose@arm.com> - 2016-04-14 19:50 +0200
Re: [PATCH 4/5] arm64: Verify CPU errata work arounds on hotplugged CPU Suzuki K Poulose <Suzuki.Poulose@arm.com> - 2016-04-15 16:20 +0200
Re: [PATCH 4/5] arm64: Verify CPU errata work arounds on hotplugged CPU Will Deacon <will.deacon@arm.com> - 2016-04-15 16:20 +0200
| From | Suzuki K Poulose <suzuki.poulose@arm.com> |
|---|---|
| Date | 2016-04-06 13:30 +0200 |
| Subject | [PATCH 4/5] arm64: Verify CPU errata work arounds on hotplugged CPU |
| Message-ID | <rkTOO-33a-9@gated-at.bofh.it> |
CPU Errata work arounds are detected and applied to the
kernel code at boot time and the data is then freed up.
If a new hotplugged CPU requires a work around which
was not applied at boot time, there is nothing we can
do but simply fail the booting.
Cc: Will Deacon <will.deacon@arm.com>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Andre Przywara <andre.przywara@arm.com>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Suzuki K Poulose <suzuki.poulose@arm.com>
---
arch/arm64/include/asm/cpufeature.h | 2 +-
arch/arm64/kernel/cpu_errata.c | 22 ++++++++++++++++++++++
arch/arm64/kernel/cpufeature.c | 1 +
3 files changed, 24 insertions(+), 1 deletion(-)
diff --git a/arch/arm64/include/asm/cpufeature.h b/arch/arm64/include/asm/cpufeature.h
index 733b016..d5b7386 100644
--- a/arch/arm64/include/asm/cpufeature.h
+++ b/arch/arm64/include/asm/cpufeature.h
@@ -191,7 +191,7 @@ void __init setup_cpu_features(void);
void update_cpu_capabilities(const struct arm64_cpu_capabilities *caps,
const char *info);
void check_local_cpu_errata(void);
-
+void verify_local_cpu_errata(void);
void verify_local_cpu_capabilities(void);
u64 read_system_reg(u32 id);
diff --git a/arch/arm64/kernel/cpu_errata.c b/arch/arm64/kernel/cpu_errata.c
index 2fd5780..d35b398 100644
--- a/arch/arm64/kernel/cpu_errata.c
+++ b/arch/arm64/kernel/cpu_errata.c
@@ -101,6 +101,28 @@ const struct arm64_cpu_capabilities arm64_errata[] = {
}
};
+/*
+ * The CPU Errata work arounds are detected and applied at boot time
+ * and the related information is freed soon after. If the new CPU requires
+ * an errata not detected at boot, fail this CPU.
+ */
+void verify_local_cpu_errata(void)
+{
+ const struct arm64_cpu_capabilities *caps = arm64_errata;
+
+ for (; caps->matches; caps++)
+ if (!cpus_have_cap(caps->capability) &&
+ caps->matches(caps, SCOPE_CPU)) {
+ int cpu = smp_processor_id();
+
+ if (caps->desc)
+ pr_crit("CPU%d: Detected - %s\n", cpu, caps->desc);
+ pr_crit("CPU%d: Requires an errata work around not detected"
+ " at boot time\n", cpu);
+ cpu_die_early();
+ }
+}
+
void check_local_cpu_errata(void)
{
update_cpu_capabilities(arm64_errata, "enabling workaround for");
diff --git a/arch/arm64/kernel/cpufeature.c b/arch/arm64/kernel/cpufeature.c
index 3ace45f..2f6ce1d 100644
--- a/arch/arm64/kernel/cpufeature.c
+++ b/arch/arm64/kernel/cpufeature.c
@@ -983,6 +983,7 @@ void verify_local_cpu_capabilities(void)
if (!sys_caps_initialised)
return;
+ verify_local_cpu_errata();
verify_local_cpu_features(arm64_features);
verify_local_elf_hwcaps(arm64_elf_hwcaps);
if (system_supports_32bit_el0())
--
1.7.9.5
[toc] | [next] | [standalone]
| From | Will Deacon <will.deacon@arm.com> |
|---|---|
| Date | 2016-04-14 19:40 +0200 |
| Subject | Re: [PATCH 4/5] arm64: Verify CPU errata work arounds on hotplugged CPU |
| Message-ID | <rnTpg-5FL-7@gated-at.bofh.it> |
| In reply to | #1372409 |
On Wed, Apr 06, 2016 at 12:24:13PM +0100, Suzuki K Poulose wrote: > CPU Errata work arounds are detected and applied to the > kernel code at boot time and the data is then freed up. > If a new hotplugged CPU requires a work around which > was not applied at boot time, there is nothing we can > do but simply fail the booting. Hmm, wouldn't it be better not to free the alternative text for errata workarounds instead? Will
[toc] | [prev] | [next] | [standalone]
| From | Suzuki K Poulose <Suzuki.Poulose@arm.com> |
|---|---|
| Date | 2016-04-14 19:50 +0200 |
| Subject | Re: [PATCH 4/5] arm64: Verify CPU errata work arounds on hotplugged CPU |
| Message-ID | <rnTyY-5JF-53@gated-at.bofh.it> |
| In reply to | #1379146 |
On 14/04/16 18:39, Will Deacon wrote: > On Wed, Apr 06, 2016 at 12:24:13PM +0100, Suzuki K Poulose wrote: >> CPU Errata work arounds are detected and applied to the >> kernel code at boot time and the data is then freed up. >> If a new hotplugged CPU requires a work around which >> was not applied at boot time, there is nothing we can >> do but simply fail the booting. > > Hmm, wouldn't it be better not to free the alternative text for errata > workarounds instead? We could. I don't have a strong opinion. If there are no objections, I could adopt it. Cheers Suzuki
[toc] | [prev] | [next] | [standalone]
| From | Suzuki K Poulose <Suzuki.Poulose@arm.com> |
|---|---|
| Date | 2016-04-15 16:20 +0200 |
| Subject | Re: [PATCH 4/5] arm64: Verify CPU errata work arounds on hotplugged CPU |
| Message-ID | <rocLg-4gd-15@gated-at.bofh.it> |
| In reply to | #1379168 |
On 14/04/16 18:49, Suzuki K Poulose wrote:
> On 14/04/16 18:39, Will Deacon wrote:
>> On Wed, Apr 06, 2016 at 12:24:13PM +0100, Suzuki K Poulose wrote:
>>> CPU Errata work arounds are detected and applied to the
>>> kernel code at boot time and the data is then freed up.
>>> If a new hotplugged CPU requires a work around which
>>> was not applied at boot time, there is nothing we can
>>> do but simply fail the booting.
>>
>> Hmm, wouldn't it be better not to free the alternative text for errata
>> workarounds instead?
>
> We could. I don't have a strong opinion. If there are no objections, I could
> adopt it.
The alternatives have been merged to .init by :
commit 9aa4ec1571da6236 ("arm64: mm: fold alternatives into .init")
Mark,
Do you have any concerns on applying alternatives for CPUs turned online later ?
We have to revert the patch above to get going
Suzuki
[toc] | [prev] | [next] | [standalone]
| From | Will Deacon <will.deacon@arm.com> |
|---|---|
| Date | 2016-04-15 16:20 +0200 |
| Subject | Re: [PATCH 4/5] arm64: Verify CPU errata work arounds on hotplugged CPU |
| Message-ID | <rocLh-4gd-27@gated-at.bofh.it> |
| In reply to | #1379848 |
On Fri, Apr 15, 2016 at 03:10:27PM +0100, Suzuki K Poulose wrote:
> On 14/04/16 18:49, Suzuki K Poulose wrote:
> >On 14/04/16 18:39, Will Deacon wrote:
> >>On Wed, Apr 06, 2016 at 12:24:13PM +0100, Suzuki K Poulose wrote:
> >>>CPU Errata work arounds are detected and applied to the
> >>>kernel code at boot time and the data is then freed up.
> >>>If a new hotplugged CPU requires a work around which
> >>>was not applied at boot time, there is nothing we can
> >>>do but simply fail the booting.
> >>
> >>Hmm, wouldn't it be better not to free the alternative text for errata
> >>workarounds instead?
> >
> >We could. I don't have a strong opinion. If there are no objections, I could
> >adopt it.
>
> The alternatives have been merged to .init by :
>
> commit 9aa4ec1571da6236 ("arm64: mm: fold alternatives into .init")
>
> Mark,
>
> Do you have any concerns on applying alternatives for CPUs turned online later ?
> We have to revert the patch above to get going
Well, note that I'm only suggesting that we keep the alternatives for
CPU errata workarounds.
Will
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web