Skip to content

Commit f3efb67

Browse files
Suzuki K Poulosewildea01
authored andcommitted
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>
1 parent 2ff4936 commit f3efb67

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

arch/arm64/kernel/cpufeature.c

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -744,7 +744,7 @@ static const struct arm64_cpu_capabilities arm64_features[] = {
744744
.hwcap = cap, \
745745
}
746746

747-
static const struct arm64_cpu_capabilities arm64_hwcaps[] = {
747+
static const struct arm64_cpu_capabilities arm64_elf_hwcaps[] = {
748748
HWCAP_CAP(SYS_ID_AA64ISAR0_EL1, ID_AA64ISAR0_AES_SHIFT, FTR_UNSIGNED, 2, CAP_HWCAP, HWCAP_PMULL),
749749
HWCAP_CAP(SYS_ID_AA64ISAR0_EL1, ID_AA64ISAR0_AES_SHIFT, FTR_UNSIGNED, 1, CAP_HWCAP, HWCAP_AES),
750750
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[] = {
765765
{},
766766
};
767767

768-
static void __init cap_set_hwcap(const struct arm64_cpu_capabilities *cap)
768+
static void __init cap_set_elf_hwcap(const struct arm64_cpu_capabilities *cap)
769769
{
770770
switch (cap->hwcap_type) {
771771
case CAP_HWCAP:
@@ -786,7 +786,7 @@ static void __init cap_set_hwcap(const struct arm64_cpu_capabilities *cap)
786786
}
787787

788788
/* Check if we have a particular HWCAP enabled */
789-
static bool __maybe_unused cpus_have_hwcap(const struct arm64_cpu_capabilities *cap)
789+
static bool cpus_have_elf_hwcap(const struct arm64_cpu_capabilities *cap)
790790
{
791791
bool rc;
792792

@@ -810,14 +810,14 @@ static bool __maybe_unused cpus_have_hwcap(const struct arm64_cpu_capabilities *
810810
return rc;
811811
}
812812

813-
static void __init setup_cpu_hwcaps(void)
813+
static void __init setup_elf_hwcaps(void)
814814
{
815815
int i;
816-
const struct arm64_cpu_capabilities *hwcaps = arm64_hwcaps;
816+
const struct arm64_cpu_capabilities *hwcaps = arm64_elf_hwcaps;
817817

818818
for (i = 0; hwcaps[i].matches; i++)
819819
if (hwcaps[i].matches(&hwcaps[i]))
820-
cap_set_hwcap(&hwcaps[i]);
820+
cap_set_elf_hwcap(&hwcaps[i]);
821821
}
822822

823823
void update_cpu_capabilities(const struct arm64_cpu_capabilities *caps,
@@ -955,8 +955,8 @@ void verify_local_cpu_capabilities(void)
955955
caps[i].enable(NULL);
956956
}
957957

958-
for (i = 0, caps = arm64_hwcaps; caps[i].matches; i++) {
959-
if (!cpus_have_hwcap(&caps[i]))
958+
for (i = 0, caps = arm64_elf_hwcaps; caps[i].matches; i++) {
959+
if (!cpus_have_elf_hwcap(&caps[i]))
960960
continue;
961961
if (!feature_matches(__raw_read_system_reg(caps[i].sys_reg), &caps[i])) {
962962
pr_crit("CPU%d: missing HWCAP: %s\n",
@@ -979,7 +979,7 @@ void __init setup_cpu_features(void)
979979

980980
/* Set the CPU feature capabilies */
981981
setup_feature_capabilities();
982-
setup_cpu_hwcaps();
982+
setup_elf_hwcaps();
983983

984984
/* Advertise that we have computed the system capabilities */
985985
set_sys_caps_initialised();

0 commit comments

Comments
 (0)