arm64: Rename cpu_read_ops() to init_cpu_ops()
authorGavin Shan <gshan@redhat.com>
Wed, 18 Mar 2020 23:01:43 +0000 (10:01 +1100)
committerCatalin Marinas <catalin.marinas@arm.com>
Tue, 24 Mar 2020 17:24:13 +0000 (17:24 +0000)
This renames cpu_read_ops() to init_cpu_ops() as the function is only
called in initialization phase. Also, we will introduce get_cpu_ops() in
the subsequent patches, to retireve the CPU operation by the given CPU
index. The usage of cpu_read_ops() and get_cpu_ops() are difficult to be
distinguished from their names.

Signed-off-by: Gavin Shan <gshan@redhat.com>
Acked-by: Mark Rutland <mark.rutland@arm.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
arch/arm64/include/asm/cpu_ops.h
arch/arm64/kernel/cpu_ops.c
arch/arm64/kernel/setup.c
arch/arm64/kernel/smp.c

index 86aabf1..baa13b5 100644 (file)
@@ -56,11 +56,11 @@ struct cpu_operations {
 };
 
 extern const struct cpu_operations *cpu_ops[NR_CPUS];
-int __init cpu_read_ops(int cpu);
+int __init init_cpu_ops(int cpu);
 
-static inline void __init cpu_read_bootcpu_ops(void)
+static inline void __init init_bootcpu_ops(void)
 {
-       cpu_read_ops(0);
+       init_cpu_ops(0);
 }
 
 #endif /* ifndef __ASM_CPU_OPS_H */
index 2082cfb..a6c3c81 100644 (file)
@@ -96,7 +96,7 @@ static const char *__init cpu_read_enable_method(int cpu)
 /*
  * Read a cpu's enable method and record it in cpu_ops.
  */
-int __init cpu_read_ops(int cpu)
+int __init init_cpu_ops(int cpu)
 {
        const char *enable_method = cpu_read_enable_method(cpu);
 
index a34890b..f66bd26 100644 (file)
@@ -344,7 +344,7 @@ void __init setup_arch(char **cmdline_p)
        else
                psci_acpi_init();
 
-       cpu_read_bootcpu_ops();
+       init_bootcpu_ops();
        smp_init_cpus();
        smp_build_mpidr_hash();
 
index d4ed9a1..6f8477d 100644 (file)
@@ -488,7 +488,7 @@ static bool __init is_mpidr_duplicate(unsigned int cpu, u64 hwid)
  */
 static int __init smp_cpu_setup(int cpu)
 {
-       if (cpu_read_ops(cpu))
+       if (init_cpu_ops(cpu))
                return -ENODEV;
 
        if (cpu_ops[cpu]->cpu_init(cpu))