All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mark Rutland <mark.rutland@arm.com>
To: Gavin Shan <gshan@redhat.com>
Cc: lorenzo.pieralisi@arm.com, catalin.marinas@arm.com,
	robin.murphy@arm.com, shan.gavin@gmail.com, sudeep.holla@arm.com,
	will@kernel.org, linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH v4 2/5] arm64: Rename cpu_read_ops() to init_cpu_ops()
Date: Tue, 17 Mar 2020 10:20:13 +0000	[thread overview]
Message-ID: <20200317102013.GC8831@lakrids.cambridge.arm.com> (raw)
In-Reply-To: <20200226002356.86986-3-gshan@redhat.com>

On Wed, Feb 26, 2020 at 11:23:53AM +1100, Gavin Shan wrote:
> This renames cpu_read_ops() to init_cpu_ops() as the function it's 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
> distinguish from their names.
> 
> Signed-off-by: Gavin Shan <gshan@redhat.com>

That rationale makes sense to me, and the patch itself looks sound, so:

Acked-by: Mark Rutland <mark.rutland@arm.com>

Mark.

> ---
>  arch/arm64/include/asm/cpu_ops.h | 6 +++---
>  arch/arm64/kernel/cpu_ops.c      | 2 +-
>  arch/arm64/kernel/setup.c        | 2 +-
>  arch/arm64/kernel/smp.c          | 2 +-
>  4 files changed, 6 insertions(+), 6 deletions(-)
> 
> diff --git a/arch/arm64/include/asm/cpu_ops.h b/arch/arm64/include/asm/cpu_ops.h
> index 86aabf1e0199..baa13b5db2ca 100644
> --- a/arch/arm64/include/asm/cpu_ops.h
> +++ b/arch/arm64/include/asm/cpu_ops.h
> @@ -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 */
> diff --git a/arch/arm64/kernel/cpu_ops.c b/arch/arm64/kernel/cpu_ops.c
> index 2082cfb1be86..a6c3c816b618 100644
> --- a/arch/arm64/kernel/cpu_ops.c
> +++ b/arch/arm64/kernel/cpu_ops.c
> @@ -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);
>  
> diff --git a/arch/arm64/kernel/setup.c b/arch/arm64/kernel/setup.c
> index a34890bf309f..f66bd260cce8 100644
> --- a/arch/arm64/kernel/setup.c
> +++ b/arch/arm64/kernel/setup.c
> @@ -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();
>  
> diff --git a/arch/arm64/kernel/smp.c b/arch/arm64/kernel/smp.c
> index d4ed9a19d8fe..6f8477d7f3be 100644
> --- a/arch/arm64/kernel/smp.c
> +++ b/arch/arm64/kernel/smp.c
> @@ -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))
> -- 
> 2.23.0
> 

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  reply	other threads:[~2020-03-17 10:21 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-26  0:23 [PATCH v4 0/5] arm64: Dereference CPU operations indirectly Gavin Shan
2020-02-26  0:23 ` [PATCH v4 1/5] arm64: Declare ACPI parking protocol CPU operation if needed Gavin Shan
2020-03-17 10:28   ` Mark Rutland
2020-03-18  2:06     ` Gavin Shan
2020-02-26  0:23 ` [PATCH v4 2/5] arm64: Rename cpu_read_ops() to init_cpu_ops() Gavin Shan
2020-03-17 10:20   ` Mark Rutland [this message]
2020-02-26  0:23 ` [PATCH v4 3/5] arm64: Introduce get_cpu_ops() helper function Gavin Shan
2020-03-17 10:48   ` Mark Rutland
2020-03-18  2:22     ` Gavin Shan
2020-02-26  0:23 ` [PATCH v4 4/5] arm64: Remove CPU operations dereferencing array Gavin Shan
2020-03-17 10:56   ` Mark Rutland
2020-03-18  3:53     ` Gavin Shan
2020-03-18 22:53       ` Gavin Shan
2020-02-26  0:23 ` [PATCH v4 5/5] arm64: Remove argument @cpu of get_cpu_ops() Gavin Shan
2020-03-16  3:05 ` [PATCH v4 0/5] arm64: Dereference CPU operations indirectly Gavin Shan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200317102013.GC8831@lakrids.cambridge.arm.com \
    --to=mark.rutland@arm.com \
    --cc=catalin.marinas@arm.com \
    --cc=gshan@redhat.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=lorenzo.pieralisi@arm.com \
    --cc=robin.murphy@arm.com \
    --cc=shan.gavin@gmail.com \
    --cc=sudeep.holla@arm.com \
    --cc=will@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.