aboutsummaryrefslogtreecommitdiff
path: root/arch/arm64/kernel/setup.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm64/kernel/setup.c')
-rw-r--r--arch/arm64/kernel/setup.c40
1 files changed, 22 insertions, 18 deletions
diff --git a/arch/arm64/kernel/setup.c b/arch/arm64/kernel/setup.c
index dff33006322b..76b30b984e65 100644
--- a/arch/arm64/kernel/setup.c
+++ b/arch/arm64/kernel/setup.c
@@ -45,6 +45,7 @@
#include <linux/personality.h>
#include <asm/fixmap.h>
+#include <asm/cpu.h>
#include <asm/cputype.h>
#include <asm/elf.h>
#include <asm/cputable.h>
@@ -197,19 +198,6 @@ static void __init smp_build_mpidr_hash(void)
}
#endif
-struct cpuinfo_arm64 {
- struct cpu cpu;
- u32 reg_midr;
-};
-
-static DEFINE_PER_CPU(struct cpuinfo_arm64, cpu_data);
-
-void cpuinfo_store_cpu(void)
-{
- struct cpuinfo_arm64 *info = this_cpu_ptr(&cpu_data);
- info->reg_midr = read_cpuid_id();
-}
-
static void __init setup_processor(void)
{
struct cpu_info *cpu_info;
@@ -230,7 +218,7 @@ static void __init setup_processor(void)
sprintf(init_utsname()->machine, ELF_PLATFORM);
elf_hwcap = 0;
- cpuinfo_store_cpu();
+ cpuinfo_store_boot_cpu();
/*
* ID_AA64ISAR0_EL1 contains 4-bit wide signed feature blocks.
@@ -308,6 +296,8 @@ static void __init setup_machine_fdt(phys_addr_t dt_phys)
while (true)
cpu_relax();
}
+
+ dump_stack_set_arch_desc("%s (DT)", of_flat_dt_get_machine_name());
}
static void __init request_standard_resources(void)
@@ -449,6 +439,15 @@ static const char *compat_hwcap_str[] = {
"lpae",
"evtstrm"
};
+
+static const char *compat_hwcap2_str[] = {
+ "aes",
+ "pmull",
+ "sha1",
+ "sha2",
+ "crc32",
+ NULL
+};
#endif /* CONFIG_COMPAT */
static int c_show(struct seq_file *m, void *v)
@@ -480,6 +479,10 @@ static int c_show(struct seq_file *m, void *v)
for (j = 0; compat_hwcap_str[j]; j++)
if (compat_elf_hwcap & (1 << j))
seq_printf(m, " %s", compat_hwcap_str[j]);
+
+ for (j = 0; compat_hwcap2_str[j]; j++)
+ if (compat_elf_hwcap2 & (1 << j))
+ seq_printf(m, " %s", compat_hwcap2_str[j]);
#endif /* CONFIG_COMPAT */
} else {
for (j = 0; hwcap_str[j]; j++)
@@ -488,11 +491,12 @@ static int c_show(struct seq_file *m, void *v)
}
seq_puts(m, "\n");
- seq_printf(m, "CPU implementer\t: 0x%02x\n", (midr >> 24));
+ seq_printf(m, "CPU implementer\t: 0x%02x\n",
+ MIDR_IMPLEMENTOR(midr));
seq_printf(m, "CPU architecture: 8\n");
- seq_printf(m, "CPU variant\t: 0x%x\n", ((midr >> 20) & 0xf));
- seq_printf(m, "CPU part\t: 0x%03x\n", ((midr >> 4) & 0xfff));
- seq_printf(m, "CPU revision\t: %d\n\n", (midr & 0xf));
+ seq_printf(m, "CPU variant\t: 0x%x\n", MIDR_VARIANT(midr));
+ seq_printf(m, "CPU part\t: 0x%03x\n", MIDR_PARTNUM(midr));
+ seq_printf(m, "CPU revision\t: %d\n\n", MIDR_REVISION(midr));
}
return 0;