diff options
author | Suzuki K Poulose <suzuki.poulose@arm.com> | 2016-04-18 11:28:32 +0200 |
---|---|---|
committer | Will Deacon <will.deacon@arm.com> | 2016-04-20 13:22:41 +0200 |
commit | f3efb67590e8f68918a7a63ab0d2debee04fba9e (patch) | |
tree | 3ba1b597b8444fde6c9452747f20b864ba27fa26 /arch/arm64/kernel/cpufeature.c | |
parent | arm64: asm: remove unused push/pop macros (diff) | |
download | linux-f3efb67590e8f68918a7a63ab0d2debee04fba9e.tar.xz linux-f3efb67590e8f68918a7a63ab0d2debee04fba9e.zip |
arm64: hwcaps: Cleanup naming
We use hwcaps for referring to ELF hwcaps capability information.
However this can be confusing with 'cpu_hwcaps' which stands for the
CPU capability bit field. This patch cleans up the names to make it
a bit more readable.
Tested-by: Yury Norov <ynorov@caviumnetworks.com>
Signed-off-by: Suzuki K Poulose <suzuki.poulose@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
Diffstat (limited to '')
-rw-r--r-- | arch/arm64/kernel/cpufeature.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/arch/arm64/kernel/cpufeature.c b/arch/arm64/kernel/cpufeature.c index f586343723fb..e3576d9b45c7 100644 --- a/arch/arm64/kernel/cpufeature.c +++ b/arch/arm64/kernel/cpufeature.c @@ -744,7 +744,7 @@ static const struct arm64_cpu_capabilities arm64_features[] = { .hwcap = cap, \ } -static const struct arm64_cpu_capabilities arm64_hwcaps[] = { +static const struct arm64_cpu_capabilities arm64_elf_hwcaps[] = { HWCAP_CAP(SYS_ID_AA64ISAR0_EL1, ID_AA64ISAR0_AES_SHIFT, FTR_UNSIGNED, 2, CAP_HWCAP, HWCAP_PMULL), HWCAP_CAP(SYS_ID_AA64ISAR0_EL1, ID_AA64ISAR0_AES_SHIFT, FTR_UNSIGNED, 1, CAP_HWCAP, HWCAP_AES), HWCAP_CAP(SYS_ID_AA64ISAR0_EL1, ID_AA64ISAR0_SHA1_SHIFT, FTR_UNSIGNED, 1, CAP_HWCAP, HWCAP_SHA1), @@ -765,7 +765,7 @@ static const struct arm64_cpu_capabilities arm64_hwcaps[] = { {}, }; -static void __init cap_set_hwcap(const struct arm64_cpu_capabilities *cap) +static void __init cap_set_elf_hwcap(const struct arm64_cpu_capabilities *cap) { switch (cap->hwcap_type) { case CAP_HWCAP: @@ -786,7 +786,7 @@ static void __init cap_set_hwcap(const struct arm64_cpu_capabilities *cap) } /* Check if we have a particular HWCAP enabled */ -static bool __maybe_unused cpus_have_hwcap(const struct arm64_cpu_capabilities *cap) +static bool cpus_have_elf_hwcap(const struct arm64_cpu_capabilities *cap) { bool rc; @@ -810,14 +810,14 @@ static bool __maybe_unused cpus_have_hwcap(const struct arm64_cpu_capabilities * return rc; } -static void __init setup_cpu_hwcaps(void) +static void __init setup_elf_hwcaps(void) { int i; - const struct arm64_cpu_capabilities *hwcaps = arm64_hwcaps; + const struct arm64_cpu_capabilities *hwcaps = arm64_elf_hwcaps; for (i = 0; hwcaps[i].matches; i++) if (hwcaps[i].matches(&hwcaps[i])) - cap_set_hwcap(&hwcaps[i]); + cap_set_elf_hwcap(&hwcaps[i]); } void update_cpu_capabilities(const struct arm64_cpu_capabilities *caps, @@ -955,8 +955,8 @@ void verify_local_cpu_capabilities(void) caps[i].enable(NULL); } - for (i = 0, caps = arm64_hwcaps; caps[i].matches; i++) { - if (!cpus_have_hwcap(&caps[i])) + for (i = 0, caps = arm64_elf_hwcaps; caps[i].matches; i++) { + if (!cpus_have_elf_hwcap(&caps[i])) continue; if (!feature_matches(__raw_read_system_reg(caps[i].sys_reg), &caps[i])) { pr_crit("CPU%d: missing HWCAP: %s\n", @@ -979,7 +979,7 @@ void __init setup_cpu_features(void) /* Set the CPU feature capabilies */ setup_feature_capabilities(); - setup_cpu_hwcaps(); + setup_elf_hwcaps(); /* Advertise that we have computed the system capabilities */ set_sys_caps_initialised(); |