linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] arm64/cpuinfo: Drop boot_cpu_data
@ 2020-05-04 12:30 Anshuman Khandual
  2020-05-04 12:43 ` Mark Rutland
  0 siblings, 1 reply; 4+ messages in thread
From: Anshuman Khandual @ 2020-05-04 12:30 UTC (permalink / raw)
  To: linux-arm-kernel
  Cc: Anshuman Khandual, Catalin Marinas, Will Deacon, Mark Brown,
	Mark Rutland, Suzuki Poulose, linux-kernel

A global boot_cpu_data is not really required. Lets drop this. While
here, rename the local variable as boot_cpu_info when it is fetched
for the boot cpu.

Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Will Deacon <will@kernel.org>
Cc: Mark Brown <broonie@kernel.org>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Suzuki Poulose <suzuki.poulose@arm.com>
Cc: linux-arm-kernel@lists.infradead.org
Cc: linux-kernel@vger.kernel.org

Signed-off-by: Anshuman Khandual <anshuman.khandual@arm.com>
---
Based on 5.7-rc4

 arch/arm64/kernel/cpuinfo.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/arch/arm64/kernel/cpuinfo.c b/arch/arm64/kernel/cpuinfo.c
index a515d8f3639e..dabcdc132e56 100644
--- a/arch/arm64/kernel/cpuinfo.c
+++ b/arch/arm64/kernel/cpuinfo.c
@@ -31,7 +31,6 @@
  * values depending on configuration at or after reset.
  */
 DEFINE_PER_CPU(struct cpuinfo_arm64, cpu_data);
-static struct cpuinfo_arm64 boot_cpu_data;
 
 static const char *icache_policy_str[] = {
 	[0 ... ICACHE_POLICY_PIPT]	= "RESERVED/UNKNOWN",
@@ -393,15 +392,16 @@ static void __cpuinfo_store_cpu(struct cpuinfo_arm64 *info)
 void cpuinfo_store_cpu(void)
 {
 	struct cpuinfo_arm64 *info = this_cpu_ptr(&cpu_data);
+	struct cpuinfo_arm64 *boot_cpu_info = &per_cpu(cpu_data, 0);
+
 	__cpuinfo_store_cpu(info);
-	update_cpu_features(smp_processor_id(), info, &boot_cpu_data);
+	update_cpu_features(smp_processor_id(), info, boot_cpu_info);
 }
 
 void __init cpuinfo_store_boot_cpu(void)
 {
-	struct cpuinfo_arm64 *info = &per_cpu(cpu_data, 0);
-	__cpuinfo_store_cpu(info);
+	struct cpuinfo_arm64 *boot_cpu_info = &per_cpu(cpu_data, 0);
 
-	boot_cpu_data = *info;
-	init_cpu_features(&boot_cpu_data);
+	__cpuinfo_store_cpu(boot_cpu_info);
+	init_cpu_features(boot_cpu_info);
 }
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2020-05-04 15:50 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-04 12:30 [PATCH] arm64/cpuinfo: Drop boot_cpu_data Anshuman Khandual
2020-05-04 12:43 ` Mark Rutland
2020-05-04 14:53   ` Anshuman Khandual
2020-05-04 15:50     ` Mark Rutland

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).