FAILED: patch "[PATCH] arm64: Fix incorrect per-cpu usage for boot CPU" failed to apply to 4.4-stable tree
Subsystems (2)
[email protected]
maintainerThe patch below does not apply to the 4.4-stable tree.
If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to <[email protected]>.
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
Quoted 1 line
From
9113c2aa05e9848cd4f1154abee17d4f265f012dMon Sep 17 00:00:00 2001
From: Suzuki K Poulose <[email protected]>
Date: Thu, 21 Jul 2016 11:12:55 +0100
Subject: [PATCH] arm64: Fix incorrect per-cpu usage for boot CPU
In smp_prepare_boot_cpu(), we invoke cpuinfo_store_boot_cpu to store the cpuinfo in a per-cpu ptr, before initialising the per-cpu offset for the boot CPU. This patch reorders the sequence to make sure we initialise the per-cpu offset before accessing the per-cpu area.
Commit 4b998ff1885eec ("arm64: Delay cpuinfo_store_boot_cpu") fixed the issue where we modified the per-cpu area even before the kernel initialises the per-cpu areas, but failed to wait until the boot cpu updated it's offset.
arch/arm64/kernel/smp.c +1 -1
@@ -436,9 +436,9 @@ void __init smp_cpus_done(unsigned int max_cpus)void __init smp_prepare_boot_cpu (void ) { +set_my_cpu_offset (per_cpu_offset (smp_processor_id ()));cpuinfo_store_boot_cpu ();save_boot_cpu_run_el (); -set_my_cpu_offset (per_cpu_offset (smp_processor_id ())); }static u64 __init of_get_cpu_mpidr (struct device_node *dn)
Quoted 5 lines · On 17/08/16 13:51, [email protected] wrote:
The patch below does not apply to the 4.4-stable tree.
If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to <[email protected]>.
Greg,
I will send the backported version for 4.4 soon.
Thanks
Suzuki
Quoted 45 lines
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
From
9113c2aa05e9848cd4f1154abee17d4f265f012dMon Sep 17 00:00:00 2001
From: Suzuki K Poulose <[email protected]>
Date: Thu, 21 Jul 2016 11:12:55 +0100
Subject: [PATCH] arm64: Fix incorrect per-cpu usage for boot CPUIn
smp_prepare_boot_cpu(), we invokecpuinfo_store_boot_cputo store the cpuinfo in a per-cpu ptr, before initialising the per-cpu offset for the boot CPU. This patch reorders the sequence to make sure we initialise the per-cpu offset before accessing the per-cpu area.Commit
4b998ff1885eec("arm64: Delaycpuinfo_store_boot_cpu") fixed the issue where we modified the per-cpu area even before the kernel initialises the per-cpu areas, but failed to wait until the boot cpu updated it's offset.Fixes 4b998ff1885e ("arm64: Delay cpuinfo_store_boot_cpu")Cc <[email protected]> # 4.4+Cc Will Deacon <[email protected]>Signed-off-by Suzuki K Poulose <[email protected]>Acked-by Mark Rutland <[email protected]>Signed-off-by Catalin Marinas <[email protected]>arch/arm64/kernel/smp.c +1
-1@@ -436,9 +436,9 @@ void __init smp_cpus_done(unsigned int max_cpus)void __init smp_prepare_boot_cpu (void ) { +set_my_cpu_offset (per_cpu_offset (smp_processor_id ()));cpuinfo_store_boot_cpu ();save_boot_cpu_run_el (); -set_my_cpu_offset (per_cpu_offset (smp_processor_id ())); }static u64 __init of_get_cpu_mpidr (struct device_node *dn)