Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1226153
| From | "Suzuki K. Poulose" <suzuki.poulose@arm.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH 02/22] arm64: Delay ELF HWCAP initialisation until all CPUs are up |
| Date | 2015-09-16 16:30 +0200 |
| Message-ID | <q9lSI-734-55@gated-at.bofh.it> (permalink) |
| References | <q9lSG-734-3@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
From: "Suzuki K. Poulose" <suzuki.poulose@arm.com>
Delay the ELF HWCAP initialisation untill all the (enabled) CPUs are
up, i.e, smp_cpus_done(). This is in preparation for detecting the
common features across the CPUS and creating a consistent ELF HWCAP
for the system.
Signed-off-by: Suzuki K. Poulose <suzuki.poulose@arm.com>
---
arch/arm64/include/asm/cpufeature.h | 1 +
arch/arm64/kernel/setup.c | 16 ++++++++--------
arch/arm64/kernel/smp.c | 1 +
3 files changed, 10 insertions(+), 8 deletions(-)
diff --git a/arch/arm64/include/asm/cpufeature.h b/arch/arm64/include/asm/cpufeature.h
index 1715707..b7769f6 100644
--- a/arch/arm64/include/asm/cpufeature.h
+++ b/arch/arm64/include/asm/cpufeature.h
@@ -81,6 +81,7 @@ static inline int __attribute_const__ cpuid_feature_extract_field(u64 features,
return (s64)(features << (64 - 4 - field)) >> (64 - 4);
}
+void __init setup_cpu_features(void);
void check_cpu_capabilities(const struct arm64_cpu_capabilities *caps,
const char *info);
diff --git a/arch/arm64/kernel/setup.c b/arch/arm64/kernel/setup.c
index 60fc9a9..d149c18 100644
--- a/arch/arm64/kernel/setup.c
+++ b/arch/arm64/kernel/setup.c
@@ -195,20 +195,13 @@ static void __init smp_build_mpidr_hash(void)
__flush_dcache_area(&mpidr_hash, sizeof(struct mpidr_hash));
}
-static void __init setup_processor(void)
+void __init setup_cpu_features(void)
{
u64 features;
s64 block;
u32 cwg;
int cls;
- pr_info("Boot CPU: AArch64 Processor [%08x]\n", read_cpuid_id());
-
- sprintf(init_utsname()->machine, ELF_PLATFORM);
- elf_hwcap = 0;
-
- cpuinfo_store_boot_cpu();
-
/*
* Check for sane CTR_EL0.CWG value.
*/
@@ -292,6 +285,13 @@ static void __init setup_processor(void)
#endif
}
+static void __init setup_processor(void)
+{
+ pr_info("Boot CPU: AArch64 Processor [%08x]\n", read_cpuid_id());
+ sprintf(init_utsname()->machine, ELF_PLATFORM);
+ cpuinfo_store_boot_cpu();
+}
+
static void __init setup_machine_fdt(phys_addr_t dt_phys)
{
void *dt_virt = fixmap_remap_fdt(dt_phys);
diff --git a/arch/arm64/kernel/smp.c b/arch/arm64/kernel/smp.c
index 641f529..cb3e0d8 100644
--- a/arch/arm64/kernel/smp.c
+++ b/arch/arm64/kernel/smp.c
@@ -326,6 +326,7 @@ static void __init hyp_mode_check(void)
void __init smp_cpus_done(unsigned int max_cpus)
{
pr_info("SMP: Total of %d processors activated.\n", num_online_cpus());
+ setup_cpu_features();
hyp_mode_check();
apply_alternatives_all();
}
--
1.7.9.5
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH 00/22] arm64: Consolidate CPU feature handling "Suzuki K. Poulose" <suzuki.poulose@arm.com> - 2015-09-16 16:30 +0200 [PATCH 06/22] arm64: sys_reg: Define System register encoding "Suzuki K. Poulose" <suzuki.poulose@arm.com> - 2015-09-16 16:30 +0200 [PATCH 03/22] arm64: Move cpu feature detection code "Suzuki K. Poulose" <suzuki.poulose@arm.com> - 2015-09-16 16:30 +0200 [PATCH 02/22] arm64: Delay ELF HWCAP initialisation until all CPUs are up "Suzuki K. Poulose" <suzuki.poulose@arm.com> - 2015-09-16 16:30 +0200 [PATCH 09/22] arm64: Read system wide CPUID value "Suzuki K. Poulose" <suzuki.poulose@arm.com> - 2015-09-16 16:30 +0200 [PATCH 13/22] arm64: Make use of system wide capability checks "Suzuki K. Poulose" <suzuki.poulose@arm.com> - 2015-09-16 16:30 +0200 [PATCH 04/22] arm64: Move mixed endian support detection "Suzuki K. Poulose" <suzuki.poulose@arm.com> - 2015-09-16 16:30 +0200 [PATCH 15/22] arm64: Move FP/ASIMD hwcap handling to common code "Suzuki K. Poulose" <suzuki.poulose@arm.com> - 2015-09-16 16:30 +0200 [PATCH 08/22] arm64: Consolidate CPU Sanity check to CPU Feature infrastructure "Suzuki K. Poulose" <suzuki.poulose@arm.com> - 2015-09-16 16:30 +0200 [PATCH 22/22] arm64: feature registers: Documentation "Suzuki K. Poulose" <suzuki.poulose@arm.com> - 2015-09-16 16:30 +0200 Re: [PATCH 00/22] arm64: Consolidate CPU feature handling "Suzuki K. Poulose" <Suzuki.Poulose@arm.com> - 2015-09-18 11:30 +0200
csiph-web