Skip to content

Commit 6885fb1

Browse files
Gavin Shanctmarinas
authored andcommitted
arm64: Rename cpu_read_ops() to init_cpu_ops()
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 <[email protected]> Acked-by: Mark Rutland <[email protected]> Signed-off-by: Catalin Marinas <[email protected]>
1 parent 7fec52b commit 6885fb1

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

arch/arm64/include/asm/cpu_ops.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,11 +56,11 @@ struct cpu_operations {
5656
};
5757

5858
extern const struct cpu_operations *cpu_ops[NR_CPUS];
59-
int __init cpu_read_ops(int cpu);
59+
int __init init_cpu_ops(int cpu);
6060

61-
static inline void __init cpu_read_bootcpu_ops(void)
61+
static inline void __init init_bootcpu_ops(void)
6262
{
63-
cpu_read_ops(0);
63+
init_cpu_ops(0);
6464
}
6565

6666
#endif /* ifndef __ASM_CPU_OPS_H */

arch/arm64/kernel/cpu_ops.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ static const char *__init cpu_read_enable_method(int cpu)
9696
/*
9797
* Read a cpu's enable method and record it in cpu_ops.
9898
*/
99-
int __init cpu_read_ops(int cpu)
99+
int __init init_cpu_ops(int cpu)
100100
{
101101
const char *enable_method = cpu_read_enable_method(cpu);
102102

arch/arm64/kernel/setup.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -344,7 +344,7 @@ void __init setup_arch(char **cmdline_p)
344344
else
345345
psci_acpi_init();
346346

347-
cpu_read_bootcpu_ops();
347+
init_bootcpu_ops();
348348
smp_init_cpus();
349349
smp_build_mpidr_hash();
350350

arch/arm64/kernel/smp.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -488,7 +488,7 @@ static bool __init is_mpidr_duplicate(unsigned int cpu, u64 hwid)
488488
*/
489489
static int __init smp_cpu_setup(int cpu)
490490
{
491-
if (cpu_read_ops(cpu))
491+
if (init_cpu_ops(cpu))
492492
return -ENODEV;
493493

494494
if (cpu_ops[cpu]->cpu_init(cpu))

0 commit comments

Comments
 (0)