[PATCH 2/2] ARM: use const and __initconst for smp_operations

Liviu Dudau liviu.dudau at arm.com
Tue Nov 24 10:34:45 PST 2015


On Sun, Nov 15, 2015 at 10:39:53AM +0900, Masahiro Yamada wrote:
> These smp_operations structures are not over-written, so add "const"
> qualifier and replace __initdata with __initconst.
> 
> Also, add "static" where it is possible.
> 
> Signed-off-by: Masahiro Yamada <yamada.masahiro at socionext.com>
> Acked-by: Krzysztof Kozlowski <k.kozlowski at samsung.com>
> Acked-by: Maxime Ripard <maxime.ripard at free-electrons.com>
> Acked-by: Moritz Fischer <moritz.fischer at ettus.com>
> ---

[....]

> diff --git a/arch/arm/mach-vexpress/core.h b/arch/arm/mach-vexpress/core.h
> index 2a11d3a..a162ab4 100644
> --- a/arch/arm/mach-vexpress/core.h
> +++ b/arch/arm/mach-vexpress/core.h
> @@ -1,5 +1,5 @@
>  bool vexpress_smp_init_ops(void);
>  
> -extern struct smp_operations	vexpress_smp_dt_ops;
> +extern const struct smp_operations vexpress_smp_dt_ops;
>  
>  extern void vexpress_cpu_die(unsigned int cpu);
> diff --git a/arch/arm/mach-vexpress/platsmp.c b/arch/arm/mach-vexpress/platsmp.c
> index 83188cf..8b8d072 100644
> --- a/arch/arm/mach-vexpress/platsmp.c
> +++ b/arch/arm/mach-vexpress/platsmp.c
> @@ -64,7 +64,7 @@ static void __init vexpress_smp_dt_prepare_cpus(unsigned int max_cpus)
>  	vexpress_flags_set(virt_to_phys(versatile_secondary_startup));
>  }
>  
> -struct smp_operations __initdata vexpress_smp_dt_ops = {
> +const struct smp_operations vexpress_smp_dt_ops __initconst = {
>  	.smp_prepare_cpus	= vexpress_smp_dt_prepare_cpus,
>  	.smp_secondary_init	= versatile_secondary_init,
>  	.smp_boot_secondary	= versatile_boot_secondary,

[....]

For the vexpress part:

Acked-by: Liviu Dudau <Liviu.Dudau at arm.com>

-- 
====================
| I would like to |
| fix the world,  |
| but they're not |
| giving me the   |
 \ source code!  /
  ---------------
    ¯\_(ツ)_/¯



More information about the Linux-rockchip mailing list