All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] ARM: use const and __initconst for smp_operations (with refactoring hisi)
@ 2015-11-15  1:39 Masahiro Yamada
  2015-11-15  1:39   ` Masahiro Yamada
       [not found] ` <1447551593-22246-1-git-send-email-yamada.masahiro-uWyLwvC0a2jby3iVrkZq2A@public.gmane.org>
  0 siblings, 2 replies; 24+ messages in thread
From: Masahiro Yamada @ 2015-11-15  1:39 UTC (permalink / raw)
  To: arm-DgEjT+Ai2ygdnm+yROfE0A
  Cc: Mark Rutland, Andrew Lunn, Krzysztof Kozlowski,
	kernel-F5mvAk5X5gdBDgjK7y7TUQ, linux-sh-u79uwXL29TY76Z2rM5mHXA,
	Brian Norris, Linus Walleij, Will Deacon, Patrice Chotard,
	Masahiro Yamada, Chen-Yu Tsai, Thierry Reding, Matthias Brugger,
	Shawn Guo, Heiko Stuebner, Alexandre Courbot,
	linux-samsung-soc-u79uwXL29TY76Z2rM5mHXA, Florian Fainelli,
	Russell King, Emilio López, Viresh Kumar, Stephen Warren,
	Magnus Damm


1/2: minor refactoring for mach-hisi
2/2: use const ... __initconst for smp_operations

I hope 2/2 will be reviewed by sub-arch maintainers.
Please issue Acked-by if it is OK.

I hope this series will be applied to ARM-SOC.



Masahiro Yamada (2):
  ARM: hisi: do not export smp_operations structures
  ARM: use const and __initconst for smp_operations

 arch/arm/common/mcpm_platsmp.c       | 2 +-
 arch/arm/include/asm/psci.h          | 2 +-
 arch/arm/kernel/psci_smp.c           | 2 +-
 arch/arm/mach-alpine/platsmp.c       | 2 +-
 arch/arm/mach-axxia/platsmp.c        | 2 +-
 arch/arm/mach-bcm/bcm63xx_smp.c      | 2 +-
 arch/arm/mach-bcm/kona_smp.c         | 2 +-
 arch/arm/mach-bcm/platsmp-brcmstb.c  | 2 +-
 arch/arm/mach-berlin/platsmp.c       | 2 +-
 arch/arm/mach-exynos/common.h        | 2 +-
 arch/arm/mach-exynos/platsmp.c       | 2 +-
 arch/arm/mach-hisi/core.h            | 3 ---
 arch/arm/mach-hisi/platmcpm.c        | 2 +-
 arch/arm/mach-hisi/platsmp.c         | 6 +++---
 arch/arm/mach-imx/common.h           | 4 ++--
 arch/arm/mach-imx/platsmp.c          | 4 ++--
 arch/arm/mach-keystone/keystone.h    | 2 +-
 arch/arm/mach-keystone/platsmp.c     | 2 +-
 arch/arm/mach-mediatek/platsmp.c     | 4 ++--
 arch/arm/mach-mvebu/armada-370-xp.h  | 2 +-
 arch/arm/mach-mvebu/platsmp-a9.c     | 4 ++--
 arch/arm/mach-mvebu/platsmp.c        | 2 +-
 arch/arm/mach-omap2/common.h         | 2 +-
 arch/arm/mach-omap2/omap-smp.c       | 2 +-
 arch/arm/mach-prima2/common.h        | 2 +-
 arch/arm/mach-prima2/platsmp.c       | 2 +-
 arch/arm/mach-qcom/platsmp.c         | 6 +++---
 arch/arm/mach-realview/core.h        | 2 +-
 arch/arm/mach-realview/platsmp.c     | 2 +-
 arch/arm/mach-rockchip/platsmp.c     | 2 +-
 arch/arm/mach-shmobile/r8a7779.h     | 2 +-
 arch/arm/mach-shmobile/r8a7790.h     | 2 +-
 arch/arm/mach-shmobile/r8a7791.h     | 2 +-
 arch/arm/mach-shmobile/setup-emev2.c | 2 +-
 arch/arm/mach-shmobile/sh73a0.h      | 2 +-
 arch/arm/mach-shmobile/smp-emev2.c   | 2 +-
 arch/arm/mach-shmobile/smp-r8a7779.c | 2 +-
 arch/arm/mach-shmobile/smp-r8a7790.c | 2 +-
 arch/arm/mach-shmobile/smp-r8a7791.c | 2 +-
 arch/arm/mach-shmobile/smp-sh73a0.c  | 2 +-
 arch/arm/mach-socfpga/platsmp.c      | 4 ++--
 arch/arm/mach-spear/generic.h        | 2 +-
 arch/arm/mach-spear/platsmp.c        | 2 +-
 arch/arm/mach-sti/platsmp.c          | 2 +-
 arch/arm/mach-sti/smp.h              | 2 +-
 arch/arm/mach-sunxi/platsmp.c        | 4 ++--
 arch/arm/mach-tegra/common.h         | 2 +-
 arch/arm/mach-tegra/platsmp.c        | 2 +-
 arch/arm/mach-uniphier/platsmp.c     | 2 +-
 arch/arm/mach-ux500/platsmp.c        | 2 +-
 arch/arm/mach-vexpress/core.h        | 2 +-
 arch/arm/mach-vexpress/platsmp.c     | 2 +-
 arch/arm/mach-zx/platsmp.c           | 2 +-
 arch/arm/mach-zynq/common.h          | 2 +-
 arch/arm/mach-zynq/platsmp.c         | 2 +-
 55 files changed, 64 insertions(+), 67 deletions(-)

-- 
1.9.1

^ permalink raw reply	[flat|nested] 24+ messages in thread

* [PATCH 1/2] ARM: hisi: do not export smp_operations structures
  2015-11-15  1:39 [PATCH 0/2] ARM: use const and __initconst for smp_operations (with refactoring hisi) Masahiro Yamada
@ 2015-11-15  1:39   ` Masahiro Yamada
       [not found] ` <1447551593-22246-1-git-send-email-yamada.masahiro-uWyLwvC0a2jby3iVrkZq2A@public.gmane.org>
  1 sibling, 0 replies; 24+ messages in thread
From: Masahiro Yamada @ 2015-11-15  1:39 UTC (permalink / raw)
  To: arm; +Cc: Masahiro Yamada, Russell King, linux-kernel, linux-arm-kernel, Wei Xu

These three structures are only defined and referenced in
mach-hisi/platsmp.c.

Drop the declarations from the header and add static qualifier
to the definitions.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
---

 arch/arm/mach-hisi/core.h    | 3 ---
 arch/arm/mach-hisi/platsmp.c | 6 +++---
 2 files changed, 3 insertions(+), 6 deletions(-)

diff --git a/arch/arm/mach-hisi/core.h b/arch/arm/mach-hisi/core.h
index c7648ef..e883583 100644
--- a/arch/arm/mach-hisi/core.h
+++ b/arch/arm/mach-hisi/core.h
@@ -6,17 +6,14 @@
 extern void hi3xxx_set_cpu_jump(int cpu, void *jump_addr);
 extern int hi3xxx_get_cpu_jump(int cpu);
 extern void secondary_startup(void);
-extern struct smp_operations hi3xxx_smp_ops;
 
 extern void hi3xxx_cpu_die(unsigned int cpu);
 extern int hi3xxx_cpu_kill(unsigned int cpu);
 extern void hi3xxx_set_cpu(int cpu, bool enable);
 
-extern struct smp_operations hix5hd2_smp_ops;
 extern void hix5hd2_set_cpu(int cpu, bool enable);
 extern void hix5hd2_cpu_die(unsigned int cpu);
 
-extern struct smp_operations hip01_smp_ops;
 extern void hip01_set_cpu(int cpu, bool enable);
 extern void hip01_cpu_die(unsigned int cpu);
 #endif
diff --git a/arch/arm/mach-hisi/platsmp.c b/arch/arm/mach-hisi/platsmp.c
index 5174412..3c5237d 100644
--- a/arch/arm/mach-hisi/platsmp.c
+++ b/arch/arm/mach-hisi/platsmp.c
@@ -89,7 +89,7 @@ static int hi3xxx_boot_secondary(unsigned int cpu, struct task_struct *idle)
 	return 0;
 }
 
-struct smp_operations hi3xxx_smp_ops __initdata = {
+static struct smp_operations hi3xxx_smp_ops __initdata = {
 	.smp_prepare_cpus	= hi3xxx_smp_prepare_cpus,
 	.smp_boot_secondary	= hi3xxx_boot_secondary,
 #ifdef CONFIG_HOTPLUG_CPU
@@ -126,7 +126,7 @@ static int hix5hd2_boot_secondary(unsigned int cpu, struct task_struct *idle)
 }
 
 
-struct smp_operations hix5hd2_smp_ops __initdata = {
+static struct smp_operations hix5hd2_smp_ops __initdata = {
 	.smp_prepare_cpus	= hisi_common_smp_prepare_cpus,
 	.smp_boot_secondary	= hix5hd2_boot_secondary,
 #ifdef CONFIG_HOTPLUG_CPU
@@ -176,7 +176,7 @@ static int hip01_boot_secondary(unsigned int cpu, struct task_struct *idle)
 	return 0;
 }
 
-struct smp_operations hip01_smp_ops __initdata = {
+static struct smp_operations hip01_smp_ops __initdata = {
 	.smp_prepare_cpus       = hisi_common_smp_prepare_cpus,
 	.smp_boot_secondary     = hip01_boot_secondary,
 };
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 24+ messages in thread

* [PATCH 1/2] ARM: hisi: do not export smp_operations structures
@ 2015-11-15  1:39   ` Masahiro Yamada
  0 siblings, 0 replies; 24+ messages in thread
From: Masahiro Yamada @ 2015-11-15  1:39 UTC (permalink / raw)
  To: linux-arm-kernel

These three structures are only defined and referenced in
mach-hisi/platsmp.c.

Drop the declarations from the header and add static qualifier
to the definitions.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
---

 arch/arm/mach-hisi/core.h    | 3 ---
 arch/arm/mach-hisi/platsmp.c | 6 +++---
 2 files changed, 3 insertions(+), 6 deletions(-)

diff --git a/arch/arm/mach-hisi/core.h b/arch/arm/mach-hisi/core.h
index c7648ef..e883583 100644
--- a/arch/arm/mach-hisi/core.h
+++ b/arch/arm/mach-hisi/core.h
@@ -6,17 +6,14 @@
 extern void hi3xxx_set_cpu_jump(int cpu, void *jump_addr);
 extern int hi3xxx_get_cpu_jump(int cpu);
 extern void secondary_startup(void);
-extern struct smp_operations hi3xxx_smp_ops;
 
 extern void hi3xxx_cpu_die(unsigned int cpu);
 extern int hi3xxx_cpu_kill(unsigned int cpu);
 extern void hi3xxx_set_cpu(int cpu, bool enable);
 
-extern struct smp_operations hix5hd2_smp_ops;
 extern void hix5hd2_set_cpu(int cpu, bool enable);
 extern void hix5hd2_cpu_die(unsigned int cpu);
 
-extern struct smp_operations hip01_smp_ops;
 extern void hip01_set_cpu(int cpu, bool enable);
 extern void hip01_cpu_die(unsigned int cpu);
 #endif
diff --git a/arch/arm/mach-hisi/platsmp.c b/arch/arm/mach-hisi/platsmp.c
index 5174412..3c5237d 100644
--- a/arch/arm/mach-hisi/platsmp.c
+++ b/arch/arm/mach-hisi/platsmp.c
@@ -89,7 +89,7 @@ static int hi3xxx_boot_secondary(unsigned int cpu, struct task_struct *idle)
 	return 0;
 }
 
-struct smp_operations hi3xxx_smp_ops __initdata = {
+static struct smp_operations hi3xxx_smp_ops __initdata = {
 	.smp_prepare_cpus	= hi3xxx_smp_prepare_cpus,
 	.smp_boot_secondary	= hi3xxx_boot_secondary,
 #ifdef CONFIG_HOTPLUG_CPU
@@ -126,7 +126,7 @@ static int hix5hd2_boot_secondary(unsigned int cpu, struct task_struct *idle)
 }
 
 
-struct smp_operations hix5hd2_smp_ops __initdata = {
+static struct smp_operations hix5hd2_smp_ops __initdata = {
 	.smp_prepare_cpus	= hisi_common_smp_prepare_cpus,
 	.smp_boot_secondary	= hix5hd2_boot_secondary,
 #ifdef CONFIG_HOTPLUG_CPU
@@ -176,7 +176,7 @@ static int hip01_boot_secondary(unsigned int cpu, struct task_struct *idle)
 	return 0;
 }
 
-struct smp_operations hip01_smp_ops __initdata = {
+static struct smp_operations hip01_smp_ops __initdata = {
 	.smp_prepare_cpus       = hisi_common_smp_prepare_cpus,
 	.smp_boot_secondary     = hip01_boot_secondary,
 };
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 24+ messages in thread

* [PATCH 2/2] ARM: use const and __initconst for smp_operations
       [not found] ` <1447551593-22246-1-git-send-email-yamada.masahiro-uWyLwvC0a2jby3iVrkZq2A@public.gmane.org>
@ 2015-11-15  1:39   ` Masahiro Yamada
       [not found]     ` <1447551593-22246-3-git-send-email-yamada.masahiro-uWyLwvC0a2jby3iVrkZq2A@public.gmane.org>
  2015-11-19 19:58       ` Sebastian Hesselbarth
  2015-11-17 17:57   ` [PATCH 0/2] ARM: use const and __initconst for smp_operations (with refactoring hisi) Simon Horman
  2015-12-01 21:21   ` Arnd Bergmann
  2 siblings, 2 replies; 24+ messages in thread
From: Masahiro Yamada @ 2015-11-15  1:39 UTC (permalink / raw)
  To: arm-DgEjT+Ai2ygdnm+yROfE0A
  Cc: Mark Rutland, Andrew Lunn, Krzysztof Kozlowski,
	kernel-F5mvAk5X5gdBDgjK7y7TUQ, linux-sh-u79uwXL29TY76Z2rM5mHXA,
	Brian Norris, Linus Walleij, Will Deacon,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA, Masahiro Yamada,
	Chen-Yu Tsai, Thierry Reding, Matthias Brugger, Shawn Guo,
	Heiko Stuebner, Alexandre Courbot,
	linux-samsung-soc-u79uwXL29TY76Z2rM5mHXA, Florian Fainelli,
	Russell King, Emilio López, Viresh Kumar, Stephen Warren,
	Magnus Damm

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-uWyLwvC0a2jby3iVrkZq2A@public.gmane.org>
Acked-by: Krzysztof Kozlowski <k.kozlowski-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
Acked-by: Maxime Ripard <maxime.ripard-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org>
Acked-by: Moritz Fischer <moritz.fischer-+aYTwkv1SeIAvxtiuMwx3w@public.gmane.org>
---

 arch/arm/common/mcpm_platsmp.c       | 2 +-
 arch/arm/include/asm/psci.h          | 2 +-
 arch/arm/kernel/psci_smp.c           | 2 +-
 arch/arm/mach-alpine/platsmp.c       | 2 +-
 arch/arm/mach-axxia/platsmp.c        | 2 +-
 arch/arm/mach-bcm/bcm63xx_smp.c      | 2 +-
 arch/arm/mach-bcm/kona_smp.c         | 2 +-
 arch/arm/mach-bcm/platsmp-brcmstb.c  | 2 +-
 arch/arm/mach-berlin/platsmp.c       | 2 +-
 arch/arm/mach-exynos/common.h        | 2 +-
 arch/arm/mach-exynos/platsmp.c       | 2 +-
 arch/arm/mach-hisi/platmcpm.c        | 2 +-
 arch/arm/mach-hisi/platsmp.c         | 6 +++---
 arch/arm/mach-imx/common.h           | 4 ++--
 arch/arm/mach-imx/platsmp.c          | 4 ++--
 arch/arm/mach-keystone/keystone.h    | 2 +-
 arch/arm/mach-keystone/platsmp.c     | 2 +-
 arch/arm/mach-mediatek/platsmp.c     | 4 ++--
 arch/arm/mach-mvebu/armada-370-xp.h  | 2 +-
 arch/arm/mach-mvebu/platsmp-a9.c     | 4 ++--
 arch/arm/mach-mvebu/platsmp.c        | 2 +-
 arch/arm/mach-omap2/common.h         | 2 +-
 arch/arm/mach-omap2/omap-smp.c       | 2 +-
 arch/arm/mach-prima2/common.h        | 2 +-
 arch/arm/mach-prima2/platsmp.c       | 2 +-
 arch/arm/mach-qcom/platsmp.c         | 6 +++---
 arch/arm/mach-realview/core.h        | 2 +-
 arch/arm/mach-realview/platsmp.c     | 2 +-
 arch/arm/mach-rockchip/platsmp.c     | 2 +-
 arch/arm/mach-shmobile/r8a7779.h     | 2 +-
 arch/arm/mach-shmobile/r8a7790.h     | 2 +-
 arch/arm/mach-shmobile/r8a7791.h     | 2 +-
 arch/arm/mach-shmobile/setup-emev2.c | 2 +-
 arch/arm/mach-shmobile/sh73a0.h      | 2 +-
 arch/arm/mach-shmobile/smp-emev2.c   | 2 +-
 arch/arm/mach-shmobile/smp-r8a7779.c | 2 +-
 arch/arm/mach-shmobile/smp-r8a7790.c | 2 +-
 arch/arm/mach-shmobile/smp-r8a7791.c | 2 +-
 arch/arm/mach-shmobile/smp-sh73a0.c  | 2 +-
 arch/arm/mach-socfpga/platsmp.c      | 4 ++--
 arch/arm/mach-spear/generic.h        | 2 +-
 arch/arm/mach-spear/platsmp.c        | 2 +-
 arch/arm/mach-sti/platsmp.c          | 2 +-
 arch/arm/mach-sti/smp.h              | 2 +-
 arch/arm/mach-sunxi/platsmp.c        | 4 ++--
 arch/arm/mach-tegra/common.h         | 2 +-
 arch/arm/mach-tegra/platsmp.c        | 2 +-
 arch/arm/mach-uniphier/platsmp.c     | 2 +-
 arch/arm/mach-ux500/platsmp.c        | 2 +-
 arch/arm/mach-vexpress/core.h        | 2 +-
 arch/arm/mach-vexpress/platsmp.c     | 2 +-
 arch/arm/mach-zx/platsmp.c           | 2 +-
 arch/arm/mach-zynq/common.h          | 2 +-
 arch/arm/mach-zynq/platsmp.c         | 2 +-
 54 files changed, 64 insertions(+), 64 deletions(-)

diff --git a/arch/arm/common/mcpm_platsmp.c b/arch/arm/common/mcpm_platsmp.c
index 2b25b60..c773157 100644
--- a/arch/arm/common/mcpm_platsmp.c
+++ b/arch/arm/common/mcpm_platsmp.c
@@ -83,7 +83,7 @@ static void mcpm_cpu_die(unsigned int cpu)
 
 #endif
 
-static struct smp_operations __initdata mcpm_smp_ops = {
+static const struct smp_operations mcpm_smp_ops __initconst = {
 	.smp_boot_secondary	= mcpm_boot_secondary,
 	.smp_secondary_init	= mcpm_secondary_init,
 #ifdef CONFIG_HOTPLUG_CPU
diff --git a/arch/arm/include/asm/psci.h b/arch/arm/include/asm/psci.h
index 68ee3ce..97735a8 100644
--- a/arch/arm/include/asm/psci.h
+++ b/arch/arm/include/asm/psci.h
@@ -14,7 +14,7 @@
 #ifndef __ASM_ARM_PSCI_H
 #define __ASM_ARM_PSCI_H
 
-extern struct smp_operations psci_smp_ops;
+extern const struct smp_operations psci_smp_ops;
 
 #ifdef CONFIG_ARM_PSCI
 bool psci_smp_available(void);
diff --git a/arch/arm/kernel/psci_smp.c b/arch/arm/kernel/psci_smp.c
index 9d479b2..cb3fcae 100644
--- a/arch/arm/kernel/psci_smp.c
+++ b/arch/arm/kernel/psci_smp.c
@@ -120,7 +120,7 @@ bool __init psci_smp_available(void)
 	return (psci_ops.cpu_on != NULL);
 }
 
-struct smp_operations __initdata psci_smp_ops = {
+const struct smp_operations psci_smp_ops __initconst = {
 	.smp_boot_secondary	= psci_boot_secondary,
 #ifdef CONFIG_HOTPLUG_CPU
 	.cpu_disable		= psci_cpu_disable,
diff --git a/arch/arm/mach-alpine/platsmp.c b/arch/arm/mach-alpine/platsmp.c
index f78429f..dd77ea2 100644
--- a/arch/arm/mach-alpine/platsmp.c
+++ b/arch/arm/mach-alpine/platsmp.c
@@ -42,7 +42,7 @@ static void __init alpine_smp_prepare_cpus(unsigned int max_cpus)
 	alpine_cpu_pm_init();
 }
 
-static struct smp_operations alpine_smp_ops __initdata = {
+static const struct smp_operations alpine_smp_ops __initconst = {
 	.smp_prepare_cpus	= alpine_smp_prepare_cpus,
 	.smp_boot_secondary	= alpine_boot_secondary,
 };
diff --git a/arch/arm/mach-axxia/platsmp.c b/arch/arm/mach-axxia/platsmp.c
index 959d4df..ffbd71d 100644
--- a/arch/arm/mach-axxia/platsmp.c
+++ b/arch/arm/mach-axxia/platsmp.c
@@ -82,7 +82,7 @@ static void __init axxia_smp_prepare_cpus(unsigned int max_cpus)
 	}
 }
 
-static struct smp_operations axxia_smp_ops __initdata = {
+static const struct smp_operations axxia_smp_ops __initconst = {
 	.smp_prepare_cpus	= axxia_smp_prepare_cpus,
 	.smp_boot_secondary	= axxia_boot_secondary,
 };
diff --git a/arch/arm/mach-bcm/bcm63xx_smp.c b/arch/arm/mach-bcm/bcm63xx_smp.c
index 19be904..9b6727e 100644
--- a/arch/arm/mach-bcm/bcm63xx_smp.c
+++ b/arch/arm/mach-bcm/bcm63xx_smp.c
@@ -161,7 +161,7 @@ static void __init bcm63138_smp_prepare_cpus(unsigned int max_cpus)
 	}
 }
 
-struct smp_operations bcm63138_smp_ops __initdata = {
+static const struct smp_operations bcm63138_smp_ops __initconst = {
 	.smp_prepare_cpus	= bcm63138_smp_prepare_cpus,
 	.smp_boot_secondary	= bcm63138_smp_boot_secondary,
 };
diff --git a/arch/arm/mach-bcm/kona_smp.c b/arch/arm/mach-bcm/kona_smp.c
index 66a0465..da8328b 100644
--- a/arch/arm/mach-bcm/kona_smp.c
+++ b/arch/arm/mach-bcm/kona_smp.c
@@ -194,7 +194,7 @@ static int bcm_boot_secondary(unsigned int cpu, struct task_struct *idle)
 	return -ENOSYS;
 }
 
-static struct smp_operations bcm_smp_ops __initdata = {
+static const struct smp_operations bcm_smp_ops __initconst = {
 	.smp_prepare_cpus	= bcm_smp_prepare_cpus,
 	.smp_boot_secondary	= bcm_boot_secondary,
 };
diff --git a/arch/arm/mach-bcm/platsmp-brcmstb.c b/arch/arm/mach-bcm/platsmp-brcmstb.c
index 44d6bddf..40dc844 100644
--- a/arch/arm/mach-bcm/platsmp-brcmstb.c
+++ b/arch/arm/mach-bcm/platsmp-brcmstb.c
@@ -356,7 +356,7 @@ static int brcmstb_boot_secondary(unsigned int cpu, struct task_struct *idle)
 	return 0;
 }
 
-static struct smp_operations brcmstb_smp_ops __initdata = {
+static const struct smp_operations brcmstb_smp_ops __initconst = {
 	.smp_prepare_cpus	= brcmstb_cpu_ctrl_setup,
 	.smp_boot_secondary	= brcmstb_boot_secondary,
 #ifdef CONFIG_HOTPLUG_CPU
diff --git a/arch/arm/mach-berlin/platsmp.c b/arch/arm/mach-berlin/platsmp.c
index 405cd37..93f9068 100644
--- a/arch/arm/mach-berlin/platsmp.c
+++ b/arch/arm/mach-berlin/platsmp.c
@@ -119,7 +119,7 @@ static int berlin_cpu_kill(unsigned int cpu)
 }
 #endif
 
-static struct smp_operations berlin_smp_ops __initdata = {
+static const struct smp_operations berlin_smp_ops __initconst = {
 	.smp_prepare_cpus	= berlin_smp_prepare_cpus,
 	.smp_boot_secondary	= berlin_boot_secondary,
 #ifdef CONFIG_HOTPLUG_CPU
diff --git a/arch/arm/mach-exynos/common.h b/arch/arm/mach-exynos/common.h
index 1534925..e349a03 100644
--- a/arch/arm/mach-exynos/common.h
+++ b/arch/arm/mach-exynos/common.h
@@ -149,7 +149,7 @@ static inline void exynos_pm_init(void) {}
 extern void exynos_cpu_resume(void);
 extern void exynos_cpu_resume_ns(void);
 
-extern struct smp_operations exynos_smp_ops;
+extern const struct smp_operations exynos_smp_ops;
 
 extern void exynos_cpu_power_down(int cpu);
 extern void exynos_cpu_power_up(int cpu);
diff --git a/arch/arm/mach-exynos/platsmp.c b/arch/arm/mach-exynos/platsmp.c
index 98a2c0c..5bd9559 100644
--- a/arch/arm/mach-exynos/platsmp.c
+++ b/arch/arm/mach-exynos/platsmp.c
@@ -479,7 +479,7 @@ static void exynos_cpu_die(unsigned int cpu)
 }
 #endif /* CONFIG_HOTPLUG_CPU */
 
-struct smp_operations exynos_smp_ops __initdata = {
+const struct smp_operations exynos_smp_ops __initconst = {
 	.smp_init_cpus		= exynos_smp_init_cpus,
 	.smp_prepare_cpus	= exynos_smp_prepare_cpus,
 	.smp_secondary_init	= exynos_secondary_init,
diff --git a/arch/arm/mach-hisi/platmcpm.c b/arch/arm/mach-hisi/platmcpm.c
index b5f8f5f..4b653a8 100644
--- a/arch/arm/mach-hisi/platmcpm.c
+++ b/arch/arm/mach-hisi/platmcpm.c
@@ -239,7 +239,7 @@ err:
 }
 #endif
 
-static struct smp_operations __initdata hip04_smp_ops = {
+static const struct smp_operations hip04_smp_ops __initconst = {
 	.smp_boot_secondary	= hip04_boot_secondary,
 #ifdef CONFIG_HOTPLUG_CPU
 	.cpu_die		= hip04_cpu_die,
diff --git a/arch/arm/mach-hisi/platsmp.c b/arch/arm/mach-hisi/platsmp.c
index 3c5237d..47ed32c 100644
--- a/arch/arm/mach-hisi/platsmp.c
+++ b/arch/arm/mach-hisi/platsmp.c
@@ -89,7 +89,7 @@ static int hi3xxx_boot_secondary(unsigned int cpu, struct task_struct *idle)
 	return 0;
 }
 
-static struct smp_operations hi3xxx_smp_ops __initdata = {
+static const struct smp_operations hi3xxx_smp_ops __initconst = {
 	.smp_prepare_cpus	= hi3xxx_smp_prepare_cpus,
 	.smp_boot_secondary	= hi3xxx_boot_secondary,
 #ifdef CONFIG_HOTPLUG_CPU
@@ -126,7 +126,7 @@ static int hix5hd2_boot_secondary(unsigned int cpu, struct task_struct *idle)
 }
 
 
-static struct smp_operations hix5hd2_smp_ops __initdata = {
+static const struct smp_operations hix5hd2_smp_ops __initconst = {
 	.smp_prepare_cpus	= hisi_common_smp_prepare_cpus,
 	.smp_boot_secondary	= hix5hd2_boot_secondary,
 #ifdef CONFIG_HOTPLUG_CPU
@@ -176,7 +176,7 @@ static int hip01_boot_secondary(unsigned int cpu, struct task_struct *idle)
 	return 0;
 }
 
-static struct smp_operations hip01_smp_ops __initdata = {
+static const struct smp_operations hip01_smp_ops __initconst = {
 	.smp_prepare_cpus       = hisi_common_smp_prepare_cpus,
 	.smp_boot_secondary     = hip01_boot_secondary,
 };
diff --git a/arch/arm/mach-imx/common.h b/arch/arm/mach-imx/common.h
index e2d5383..32b83f0 100644
--- a/arch/arm/mach-imx/common.h
+++ b/arch/arm/mach-imx/common.h
@@ -153,7 +153,7 @@ void imx_init_l2cache(void);
 static inline void imx_init_l2cache(void) {}
 #endif
 
-extern struct smp_operations imx_smp_ops;
-extern struct smp_operations ls1021a_smp_ops;
+extern const struct smp_operations imx_smp_ops;
+extern const struct smp_operations ls1021a_smp_ops;
 
 #endif
diff --git a/arch/arm/mach-imx/platsmp.c b/arch/arm/mach-imx/platsmp.c
index 7f27001..711dbbd 100644
--- a/arch/arm/mach-imx/platsmp.c
+++ b/arch/arm/mach-imx/platsmp.c
@@ -88,7 +88,7 @@ static void __init imx_smp_prepare_cpus(unsigned int max_cpus)
 	sync_cache_w(&g_diag_reg);
 }
 
-struct smp_operations  imx_smp_ops __initdata = {
+const struct smp_operations imx_smp_ops __initconst = {
 	.smp_init_cpus		= imx_smp_init_cpus,
 	.smp_prepare_cpus	= imx_smp_prepare_cpus,
 	.smp_boot_secondary	= imx_boot_secondary,
@@ -123,7 +123,7 @@ static void __init ls1021a_smp_prepare_cpus(unsigned int max_cpus)
 	iounmap(dcfg_base);
 }
 
-struct smp_operations  ls1021a_smp_ops __initdata = {
+const struct smp_operations ls1021a_smp_ops __initconst = {
 	.smp_prepare_cpus	= ls1021a_smp_prepare_cpus,
 	.smp_boot_secondary	= ls1021a_boot_secondary,
 };
diff --git a/arch/arm/mach-keystone/keystone.h b/arch/arm/mach-keystone/keystone.h
index cd04a1c..33eaa03 100644
--- a/arch/arm/mach-keystone/keystone.h
+++ b/arch/arm/mach-keystone/keystone.h
@@ -15,7 +15,7 @@
 
 #ifndef __ASSEMBLER__
 
-extern struct smp_operations keystone_smp_ops;
+extern const struct smp_operations keystone_smp_ops;
 extern void secondary_startup(void);
 extern u32 keystone_cpu_smc(u32 command, u32 cpu, u32 addr);
 extern int keystone_pm_runtime_init(void);
diff --git a/arch/arm/mach-keystone/platsmp.c b/arch/arm/mach-keystone/platsmp.c
index 4bbb184..5665276 100644
--- a/arch/arm/mach-keystone/platsmp.c
+++ b/arch/arm/mach-keystone/platsmp.c
@@ -39,6 +39,6 @@ static int keystone_smp_boot_secondary(unsigned int cpu,
 	return error;
 }
 
-struct smp_operations keystone_smp_ops __initdata = {
+const struct smp_operations keystone_smp_ops __initconst = {
 	.smp_boot_secondary	= keystone_smp_boot_secondary,
 };
diff --git a/arch/arm/mach-mediatek/platsmp.c b/arch/arm/mach-mediatek/platsmp.c
index 8141f3f..a1b07ee 100644
--- a/arch/arm/mach-mediatek/platsmp.c
+++ b/arch/arm/mach-mediatek/platsmp.c
@@ -128,13 +128,13 @@ static void __init mtk_smp_prepare_cpus(unsigned int max_cpus)
 	__mtk_smp_prepare_cpus(max_cpus, 0);
 }
 
-static struct smp_operations mt81xx_tz_smp_ops __initdata = {
+static const struct smp_operations mt81xx_tz_smp_ops __initconst = {
 	.smp_prepare_cpus = mtk_tz_smp_prepare_cpus,
 	.smp_boot_secondary = mtk_boot_secondary,
 };
 CPU_METHOD_OF_DECLARE(mt81xx_tz_smp, "mediatek,mt81xx-tz-smp", &mt81xx_tz_smp_ops);
 
-static struct smp_operations mt6589_smp_ops __initdata = {
+static const struct smp_operations mt6589_smp_ops __initconst = {
 	.smp_prepare_cpus = mtk_smp_prepare_cpus,
 	.smp_boot_secondary = mtk_boot_secondary,
 };
diff --git a/arch/arm/mach-mvebu/armada-370-xp.h b/arch/arm/mach-mvebu/armada-370-xp.h
index c55bbf8..09413b6 100644
--- a/arch/arm/mach-mvebu/armada-370-xp.h
+++ b/arch/arm/mach-mvebu/armada-370-xp.h
@@ -17,7 +17,7 @@
 
 #ifdef CONFIG_SMP
 void armada_xp_secondary_startup(void);
-extern struct smp_operations armada_xp_smp_ops;
+extern const struct smp_operations armada_xp_smp_ops;
 #endif
 
 #endif /* __MACH_ARMADA_370_XP_H */
diff --git a/arch/arm/mach-mvebu/platsmp-a9.c b/arch/arm/mach-mvebu/platsmp-a9.c
index 3d50004..d715dec 100644
--- a/arch/arm/mach-mvebu/platsmp-a9.c
+++ b/arch/arm/mach-mvebu/platsmp-a9.c
@@ -93,11 +93,11 @@ static int armada_38x_cpu_kill(unsigned int cpu)
 }
 #endif
 
-static struct smp_operations mvebu_cortex_a9_smp_ops __initdata = {
+static const struct smp_operations mvebu_cortex_a9_smp_ops __initconst = {
 	.smp_boot_secondary	= mvebu_cortex_a9_boot_secondary,
 };
 
-static struct smp_operations armada_38x_smp_ops __initdata = {
+static const struct smp_operations armada_38x_smp_ops __initconst = {
 	.smp_boot_secondary	= mvebu_cortex_a9_boot_secondary,
 	.smp_secondary_init     = armada_38x_secondary_init,
 #ifdef CONFIG_HOTPLUG_CPU
diff --git a/arch/arm/mach-mvebu/platsmp.c b/arch/arm/mach-mvebu/platsmp.c
index 58cc8c1..f9597b7 100644
--- a/arch/arm/mach-mvebu/platsmp.c
+++ b/arch/arm/mach-mvebu/platsmp.c
@@ -170,7 +170,7 @@ static int armada_xp_cpu_kill(unsigned int cpu)
 }
 #endif
 
-struct smp_operations armada_xp_smp_ops __initdata = {
+const struct smp_operations armada_xp_smp_ops __initconst = {
 	.smp_init_cpus		= armada_xp_smp_init_cpus,
 	.smp_prepare_cpus	= armada_xp_smp_prepare_cpus,
 	.smp_boot_secondary	= armada_xp_boot_secondary,
diff --git a/arch/arm/mach-omap2/common.h b/arch/arm/mach-omap2/common.h
index 0cba957..f7666b9 100644
--- a/arch/arm/mach-omap2/common.h
+++ b/arch/arm/mach-omap2/common.h
@@ -270,7 +270,7 @@ extern u32 omap_read_auxcoreboot0(void);
 
 extern void omap4_cpu_die(unsigned int cpu);
 
-extern struct smp_operations omap4_smp_ops;
+extern const struct smp_operations omap4_smp_ops;
 
 extern void omap5_secondary_startup(void);
 extern void omap5_secondary_hyp_startup(void);
diff --git a/arch/arm/mach-omap2/omap-smp.c b/arch/arm/mach-omap2/omap-smp.c
index 5305ec7..ddcd1d2 100644
--- a/arch/arm/mach-omap2/omap-smp.c
+++ b/arch/arm/mach-omap2/omap-smp.c
@@ -241,7 +241,7 @@ static void __init omap4_smp_prepare_cpus(unsigned int max_cpus)
 
 }
 
-struct smp_operations omap4_smp_ops __initdata = {
+const struct smp_operations omap4_smp_ops __initconst = {
 	.smp_init_cpus		= omap4_smp_init_cpus,
 	.smp_prepare_cpus	= omap4_smp_prepare_cpus,
 	.smp_secondary_init	= omap4_secondary_init,
diff --git a/arch/arm/mach-prima2/common.h b/arch/arm/mach-prima2/common.h
index 3916a66..6d77b62 100644
--- a/arch/arm/mach-prima2/common.h
+++ b/arch/arm/mach-prima2/common.h
@@ -15,7 +15,7 @@
 #include <asm/mach/time.h>
 #include <asm/exception.h>
 
-extern struct smp_operations   sirfsoc_smp_ops;
+extern const struct smp_operations sirfsoc_smp_ops;
 extern void sirfsoc_secondary_startup(void);
 extern void sirfsoc_cpu_die(unsigned int cpu);
 
diff --git a/arch/arm/mach-prima2/platsmp.c b/arch/arm/mach-prima2/platsmp.c
index e46c910..0875b99 100644
--- a/arch/arm/mach-prima2/platsmp.c
+++ b/arch/arm/mach-prima2/platsmp.c
@@ -112,7 +112,7 @@ static int sirfsoc_boot_secondary(unsigned int cpu, struct task_struct *idle)
 	return pen_release != -1 ? -ENOSYS : 0;
 }
 
-struct smp_operations sirfsoc_smp_ops __initdata = {
+const struct smp_operations sirfsoc_smp_ops __initconst = {
 	.smp_secondary_init     = sirfsoc_secondary_init,
 	.smp_boot_secondary     = sirfsoc_boot_secondary,
 #ifdef CONFIG_HOTPLUG_CPU
diff --git a/arch/arm/mach-qcom/platsmp.c b/arch/arm/mach-qcom/platsmp.c
index 9b00123..5494c9e 100644
--- a/arch/arm/mach-qcom/platsmp.c
+++ b/arch/arm/mach-qcom/platsmp.c
@@ -332,7 +332,7 @@ static void __init qcom_smp_prepare_cpus(unsigned int max_cpus)
 	}
 }
 
-static struct smp_operations smp_msm8660_ops __initdata = {
+static const struct smp_operations smp_msm8660_ops __initconst = {
 	.smp_prepare_cpus	= qcom_smp_prepare_cpus,
 	.smp_secondary_init	= qcom_secondary_init,
 	.smp_boot_secondary	= msm8660_boot_secondary,
@@ -342,7 +342,7 @@ static struct smp_operations smp_msm8660_ops __initdata = {
 };
 CPU_METHOD_OF_DECLARE(qcom_smp, "qcom,gcc-msm8660", &smp_msm8660_ops);
 
-static struct smp_operations qcom_smp_kpssv1_ops __initdata = {
+static const struct smp_operations qcom_smp_kpssv1_ops __initconst = {
 	.smp_prepare_cpus	= qcom_smp_prepare_cpus,
 	.smp_secondary_init	= qcom_secondary_init,
 	.smp_boot_secondary	= kpssv1_boot_secondary,
@@ -352,7 +352,7 @@ static struct smp_operations qcom_smp_kpssv1_ops __initdata = {
 };
 CPU_METHOD_OF_DECLARE(qcom_smp_kpssv1, "qcom,kpss-acc-v1", &qcom_smp_kpssv1_ops);
 
-static struct smp_operations qcom_smp_kpssv2_ops __initdata = {
+static const struct smp_operations qcom_smp_kpssv2_ops __initconst = {
 	.smp_prepare_cpus	= qcom_smp_prepare_cpus,
 	.smp_secondary_init	= qcom_secondary_init,
 	.smp_boot_secondary	= kpssv2_boot_secondary,
diff --git a/arch/arm/mach-realview/core.h b/arch/arm/mach-realview/core.h
index 868ece2..670ee0e 100644
--- a/arch/arm/mach-realview/core.h
+++ b/arch/arm/mach-realview/core.h
@@ -54,7 +54,7 @@ extern int realview_usb_register(struct resource *res);
 extern void realview_init_early(void);
 extern void realview_fixup(struct tag *tags, char **from);
 
-extern struct smp_operations realview_smp_ops;
+extern const struct smp_operations realview_smp_ops;
 extern void realview_cpu_die(unsigned int cpu);
 
 #endif
diff --git a/arch/arm/mach-realview/platsmp.c b/arch/arm/mach-realview/platsmp.c
index 98e3052..dc29029 100644
--- a/arch/arm/mach-realview/platsmp.c
+++ b/arch/arm/mach-realview/platsmp.c
@@ -75,7 +75,7 @@ static void __init realview_smp_prepare_cpus(unsigned int max_cpus)
 		     __io_address(REALVIEW_SYS_FLAGSSET));
 }
 
-struct smp_operations realview_smp_ops __initdata = {
+const struct smp_operations realview_smp_ops __initconst = {
 	.smp_init_cpus		= realview_smp_init_cpus,
 	.smp_prepare_cpus	= realview_smp_prepare_cpus,
 	.smp_secondary_init	= versatile_secondary_init,
diff --git a/arch/arm/mach-rockchip/platsmp.c b/arch/arm/mach-rockchip/platsmp.c
index 3e7a4b7..938888f 100644
--- a/arch/arm/mach-rockchip/platsmp.c
+++ b/arch/arm/mach-rockchip/platsmp.c
@@ -340,7 +340,7 @@ static void rockchip_cpu_die(unsigned int cpu)
 }
 #endif
 
-static struct smp_operations rockchip_smp_ops __initdata = {
+static const struct smp_operations rockchip_smp_ops __initconst = {
 	.smp_prepare_cpus	= rockchip_smp_prepare_cpus,
 	.smp_boot_secondary	= rockchip_boot_secondary,
 #ifdef CONFIG_HOTPLUG_CPU
diff --git a/arch/arm/mach-shmobile/r8a7779.h b/arch/arm/mach-shmobile/r8a7779.h
index e1aaa2e..2a5f773 100644
--- a/arch/arm/mach-shmobile/r8a7779.h
+++ b/arch/arm/mach-shmobile/r8a7779.h
@@ -3,6 +3,6 @@
 
 extern void r8a7779_pm_init(void);
 
-extern struct smp_operations r8a7779_smp_ops;
+extern const struct smp_operations r8a7779_smp_ops;
 
 #endif /* __ASM_R8A7779_H__ */
diff --git a/arch/arm/mach-shmobile/r8a7790.h b/arch/arm/mach-shmobile/r8a7790.h
index 1a46d02..136f345 100644
--- a/arch/arm/mach-shmobile/r8a7790.h
+++ b/arch/arm/mach-shmobile/r8a7790.h
@@ -1,6 +1,6 @@
 #ifndef __ASM_R8A7790_H__
 #define __ASM_R8A7790_H__
 
-extern struct smp_operations r8a7790_smp_ops;
+extern const struct smp_operations r8a7790_smp_ops;
 
 #endif /* __ASM_R8A7790_H__ */
diff --git a/arch/arm/mach-shmobile/r8a7791.h b/arch/arm/mach-shmobile/r8a7791.h
index 7ca0b7d..cf7a840 100644
--- a/arch/arm/mach-shmobile/r8a7791.h
+++ b/arch/arm/mach-shmobile/r8a7791.h
@@ -1,6 +1,6 @@
 #ifndef __ASM_R8A7791_H__
 #define __ASM_R8A7791_H__
 
-extern struct smp_operations r8a7791_smp_ops;
+extern const struct smp_operations r8a7791_smp_ops;
 
 #endif /* __ASM_R8A7791_H__ */
diff --git a/arch/arm/mach-shmobile/setup-emev2.c b/arch/arm/mach-shmobile/setup-emev2.c
index 37f7b15..10b7cb5 100644
--- a/arch/arm/mach-shmobile/setup-emev2.c
+++ b/arch/arm/mach-shmobile/setup-emev2.c
@@ -42,7 +42,7 @@ static const char *const emev2_boards_compat_dt[] __initconst = {
 	NULL,
 };
 
-extern struct smp_operations emev2_smp_ops;
+extern const struct smp_operations emev2_smp_ops;
 
 DT_MACHINE_START(EMEV2_DT, "Generic Emma Mobile EV2 (Flattened Device Tree)")
 	.smp		= smp_ops(emev2_smp_ops),
diff --git a/arch/arm/mach-shmobile/sh73a0.h b/arch/arm/mach-shmobile/sh73a0.h
index 3964680..50ef24f 100644
--- a/arch/arm/mach-shmobile/sh73a0.h
+++ b/arch/arm/mach-shmobile/sh73a0.h
@@ -1,6 +1,6 @@
 #ifndef __ASM_SH73A0_H__
 #define __ASM_SH73A0_H__
 
-extern struct smp_operations sh73a0_smp_ops;
+extern const struct smp_operations sh73a0_smp_ops;
 
 #endif /* __ASM_SH73A0_H__ */
diff --git a/arch/arm/mach-shmobile/smp-emev2.c b/arch/arm/mach-shmobile/smp-emev2.c
index baff3b5..adbac69 100644
--- a/arch/arm/mach-shmobile/smp-emev2.c
+++ b/arch/arm/mach-shmobile/smp-emev2.c
@@ -49,7 +49,7 @@ static void __init emev2_smp_prepare_cpus(unsigned int max_cpus)
 	shmobile_smp_scu_prepare_cpus(max_cpus);
 }
 
-struct smp_operations emev2_smp_ops __initdata = {
+const struct smp_operations emev2_smp_ops __initconst = {
 	.smp_prepare_cpus	= emev2_smp_prepare_cpus,
 	.smp_boot_secondary	= emev2_boot_secondary,
 };
diff --git a/arch/arm/mach-shmobile/smp-r8a7779.c b/arch/arm/mach-shmobile/smp-r8a7779.c
index 353562b8..b854fe2 100644
--- a/arch/arm/mach-shmobile/smp-r8a7779.c
+++ b/arch/arm/mach-shmobile/smp-r8a7779.c
@@ -117,7 +117,7 @@ static int r8a7779_cpu_kill(unsigned int cpu)
 }
 #endif /* CONFIG_HOTPLUG_CPU */
 
-struct smp_operations r8a7779_smp_ops  __initdata = {
+const struct smp_operations r8a7779_smp_ops  __initconst = {
 	.smp_prepare_cpus	= r8a7779_smp_prepare_cpus,
 	.smp_boot_secondary	= r8a7779_boot_secondary,
 #ifdef CONFIG_HOTPLUG_CPU
diff --git a/arch/arm/mach-shmobile/smp-r8a7790.c b/arch/arm/mach-shmobile/smp-r8a7790.c
index 4b33d43..f6426c6 100644
--- a/arch/arm/mach-shmobile/smp-r8a7790.c
+++ b/arch/arm/mach-shmobile/smp-r8a7790.c
@@ -60,7 +60,7 @@ static void __init r8a7790_smp_prepare_cpus(unsigned int max_cpus)
 	rcar_sysc_power_up(&r8a7790_ca7_scu);
 }
 
-struct smp_operations r8a7790_smp_ops __initdata = {
+const struct smp_operations r8a7790_smp_ops __initconst = {
 	.smp_prepare_cpus	= r8a7790_smp_prepare_cpus,
 	.smp_boot_secondary	= shmobile_smp_apmu_boot_secondary,
 #ifdef CONFIG_HOTPLUG_CPU
diff --git a/arch/arm/mach-shmobile/smp-r8a7791.c b/arch/arm/mach-shmobile/smp-r8a7791.c
index b2508c0..2d6417a 100644
--- a/arch/arm/mach-shmobile/smp-r8a7791.c
+++ b/arch/arm/mach-shmobile/smp-r8a7791.c
@@ -54,7 +54,7 @@ static int r8a7791_smp_boot_secondary(unsigned int cpu,
 	return shmobile_smp_apmu_boot_secondary(cpu, idle);
 }
 
-struct smp_operations r8a7791_smp_ops __initdata = {
+const struct smp_operations r8a7791_smp_ops __initconst = {
 	.smp_prepare_cpus	= r8a7791_smp_prepare_cpus,
 	.smp_boot_secondary	= r8a7791_smp_boot_secondary,
 #ifdef CONFIG_HOTPLUG_CPU
diff --git a/arch/arm/mach-shmobile/smp-sh73a0.c b/arch/arm/mach-shmobile/smp-sh73a0.c
index bc2824a..ee1a4b7 100644
--- a/arch/arm/mach-shmobile/smp-sh73a0.c
+++ b/arch/arm/mach-shmobile/smp-sh73a0.c
@@ -56,7 +56,7 @@ static void __init sh73a0_smp_prepare_cpus(unsigned int max_cpus)
 	shmobile_smp_scu_prepare_cpus(max_cpus);
 }
 
-struct smp_operations sh73a0_smp_ops __initdata = {
+const struct smp_operations sh73a0_smp_ops __initconst = {
 	.smp_prepare_cpus	= sh73a0_smp_prepare_cpus,
 	.smp_boot_secondary	= sh73a0_boot_secondary,
 #ifdef CONFIG_HOTPLUG_CPU
diff --git a/arch/arm/mach-socfpga/platsmp.c b/arch/arm/mach-socfpga/platsmp.c
index 15c8ce8..cbb0a54 100644
--- a/arch/arm/mach-socfpga/platsmp.c
+++ b/arch/arm/mach-socfpga/platsmp.c
@@ -117,7 +117,7 @@ static int socfpga_cpu_kill(unsigned int cpu)
 	return 1;
 }
 
-static struct smp_operations socfpga_smp_ops __initdata = {
+static const struct smp_operations socfpga_smp_ops __initconst = {
 	.smp_prepare_cpus	= socfpga_smp_prepare_cpus,
 	.smp_boot_secondary	= socfpga_boot_secondary,
 #ifdef CONFIG_HOTPLUG_CPU
@@ -126,7 +126,7 @@ static struct smp_operations socfpga_smp_ops __initdata = {
 #endif
 };
 
-static struct smp_operations socfpga_a10_smp_ops __initdata = {
+static const struct smp_operations socfpga_a10_smp_ops __initconst = {
 	.smp_prepare_cpus	= socfpga_smp_prepare_cpus,
 	.smp_boot_secondary	= socfpga_a10_boot_secondary,
 #ifdef CONFIG_HOTPLUG_CPU
diff --git a/arch/arm/mach-spear/generic.h b/arch/arm/mach-spear/generic.h
index 0664091..909b97c0 100644
--- a/arch/arm/mach-spear/generic.h
+++ b/arch/arm/mach-spear/generic.h
@@ -39,7 +39,7 @@ void spear_restart(enum reboot_mode, const char *);
 void spear13xx_secondary_startup(void);
 void spear13xx_cpu_die(unsigned int cpu);
 
-extern struct smp_operations spear13xx_smp_ops;
+extern const struct smp_operations spear13xx_smp_ops;
 
 #ifdef CONFIG_MACH_SPEAR1310
 void __init spear1310_clk_init(void __iomem *misc_base, void __iomem *ras_base);
diff --git a/arch/arm/mach-spear/platsmp.c b/arch/arm/mach-spear/platsmp.c
index fd42977..8d1e2d5 100644
--- a/arch/arm/mach-spear/platsmp.c
+++ b/arch/arm/mach-spear/platsmp.c
@@ -120,7 +120,7 @@ static void __init spear13xx_smp_prepare_cpus(unsigned int max_cpus)
 	__raw_writel(virt_to_phys(spear13xx_secondary_startup), SYS_LOCATION);
 }
 
-struct smp_operations spear13xx_smp_ops __initdata = {
+const struct smp_operations spear13xx_smp_ops __initconst = {
        .smp_init_cpus		= spear13xx_smp_init_cpus,
        .smp_prepare_cpus	= spear13xx_smp_prepare_cpus,
        .smp_secondary_init	= spear13xx_secondary_init,
diff --git a/arch/arm/mach-sti/platsmp.c b/arch/arm/mach-sti/platsmp.c
index c4ad6ea..ea5a227 100644
--- a/arch/arm/mach-sti/platsmp.c
+++ b/arch/arm/mach-sti/platsmp.c
@@ -156,7 +156,7 @@ static void __init sti_smp_prepare_cpus(unsigned int max_cpus)
 	}
 }
 
-struct smp_operations __initdata sti_smp_ops = {
+const struct smp_operations sti_smp_ops __initconst = {
 	.smp_prepare_cpus	= sti_smp_prepare_cpus,
 	.smp_secondary_init	= sti_secondary_init,
 	.smp_boot_secondary	= sti_boot_secondary,
diff --git a/arch/arm/mach-sti/smp.h b/arch/arm/mach-sti/smp.h
index ae22707..d8a2f87 100644
--- a/arch/arm/mach-sti/smp.h
+++ b/arch/arm/mach-sti/smp.h
@@ -12,7 +12,7 @@
 #ifndef __MACH_STI_SMP_H
 #define __MACH_STI_SMP_H
 
-extern struct smp_operations	sti_smp_ops;
+extern const struct smp_operations sti_smp_ops;
 
 void sti_secondary_startup(void);
 
diff --git a/arch/arm/mach-sunxi/platsmp.c b/arch/arm/mach-sunxi/platsmp.c
index e8483ec..6642267 100644
--- a/arch/arm/mach-sunxi/platsmp.c
+++ b/arch/arm/mach-sunxi/platsmp.c
@@ -116,7 +116,7 @@ static int sun6i_smp_boot_secondary(unsigned int cpu,
 	return 0;
 }
 
-static struct smp_operations sun6i_smp_ops __initdata = {
+static const struct smp_operations sun6i_smp_ops __initconst = {
 	.smp_prepare_cpus	= sun6i_smp_prepare_cpus,
 	.smp_boot_secondary	= sun6i_smp_boot_secondary,
 };
@@ -185,7 +185,7 @@ static int sun8i_smp_boot_secondary(unsigned int cpu,
 	return 0;
 }
 
-struct smp_operations sun8i_smp_ops __initdata = {
+static const struct smp_operations sun8i_smp_ops __initconst = {
 	.smp_prepare_cpus	= sun8i_smp_prepare_cpus,
 	.smp_boot_secondary	= sun8i_smp_boot_secondary,
 };
diff --git a/arch/arm/mach-tegra/common.h b/arch/arm/mach-tegra/common.h
index 5900cc4..1f6fb80 100644
--- a/arch/arm/mach-tegra/common.h
+++ b/arch/arm/mach-tegra/common.h
@@ -1,4 +1,4 @@
-extern struct smp_operations tegra_smp_ops;
+extern const struct smp_operations tegra_smp_ops;
 
 extern int tegra_cpu_kill(unsigned int cpu);
 extern void tegra_cpu_die(unsigned int cpu);
diff --git a/arch/arm/mach-tegra/platsmp.c b/arch/arm/mach-tegra/platsmp.c
index b450866..f3f61db 100644
--- a/arch/arm/mach-tegra/platsmp.c
+++ b/arch/arm/mach-tegra/platsmp.c
@@ -192,7 +192,7 @@ static void __init tegra_smp_prepare_cpus(unsigned int max_cpus)
 		scu_enable(IO_ADDRESS(scu_a9_get_base()));
 }
 
-struct smp_operations tegra_smp_ops __initdata = {
+const struct smp_operations tegra_smp_ops __initconst = {
 	.smp_prepare_cpus	= tegra_smp_prepare_cpus,
 	.smp_secondary_init	= tegra_secondary_init,
 	.smp_boot_secondary	= tegra_boot_secondary,
diff --git a/arch/arm/mach-uniphier/platsmp.c b/arch/arm/mach-uniphier/platsmp.c
index f057766..e1cfc1d 100644
--- a/arch/arm/mach-uniphier/platsmp.c
+++ b/arch/arm/mach-uniphier/platsmp.c
@@ -201,7 +201,7 @@ static int __init uniphier_smp_boot_secondary(unsigned int cpu,
 	return 0;
 }
 
-static struct smp_operations uniphier_smp_ops __initdata = {
+static const struct smp_operations uniphier_smp_ops __initconst = {
 	.smp_prepare_cpus	= uniphier_smp_prepare_cpus,
 	.smp_boot_secondary	= uniphier_smp_boot_secondary,
 };
diff --git a/arch/arm/mach-ux500/platsmp.c b/arch/arm/mach-ux500/platsmp.c
index 70766b96..88b8ab4 100644
--- a/arch/arm/mach-ux500/platsmp.c
+++ b/arch/arm/mach-ux500/platsmp.c
@@ -98,7 +98,7 @@ static int ux500_boot_secondary(unsigned int cpu, struct task_struct *idle)
 	return 0;
 }
 
-struct smp_operations ux500_smp_ops __initdata = {
+static const struct smp_operations ux500_smp_ops __initconst = {
 	.smp_prepare_cpus	= ux500_smp_prepare_cpus,
 	.smp_boot_secondary	= ux500_boot_secondary,
 #ifdef CONFIG_HOTPLUG_CPU
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,
diff --git a/arch/arm/mach-zx/platsmp.c b/arch/arm/mach-zx/platsmp.c
index a369398..0297f92 100644
--- a/arch/arm/mach-zx/platsmp.c
+++ b/arch/arm/mach-zx/platsmp.c
@@ -176,7 +176,7 @@ static void zx_secondary_init(unsigned int cpu)
 	scu_power_mode(scu_base, SCU_PM_NORMAL);
 }
 
-struct smp_operations zx_smp_ops __initdata = {
+static const struct smp_operations zx_smp_ops __initconst = {
 	.smp_prepare_cpus	= zx_smp_prepare_cpus,
 	.smp_secondary_init	= zx_secondary_init,
 	.smp_boot_secondary	= zx_boot_secondary,
diff --git a/arch/arm/mach-zynq/common.h b/arch/arm/mach-zynq/common.h
index 79cda2e..e771933 100644
--- a/arch/arm/mach-zynq/common.h
+++ b/arch/arm/mach-zynq/common.h
@@ -30,7 +30,7 @@ extern char zynq_secondary_trampoline;
 extern char zynq_secondary_trampoline_jump;
 extern char zynq_secondary_trampoline_end;
 extern int zynq_cpun_start(u32 address, int cpu);
-extern struct smp_operations zynq_smp_ops __initdata;
+extern const struct smp_operations zynq_smp_ops;
 #endif
 
 extern void __iomem *zynq_scu_base;
diff --git a/arch/arm/mach-zynq/platsmp.c b/arch/arm/mach-zynq/platsmp.c
index f66816c..7cd9865 100644
--- a/arch/arm/mach-zynq/platsmp.c
+++ b/arch/arm/mach-zynq/platsmp.c
@@ -157,7 +157,7 @@ static void zynq_cpu_die(unsigned int cpu)
 }
 #endif
 
-struct smp_operations zynq_smp_ops __initdata = {
+const struct smp_operations zynq_smp_ops __initconst = {
 	.smp_init_cpus		= zynq_smp_init_cpus,
 	.smp_prepare_cpus	= zynq_smp_prepare_cpus,
 	.smp_boot_secondary	= zynq_boot_secondary,
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 24+ messages in thread

* Re: [PATCH 0/2] ARM: use const and __initconst for smp_operations (with refactoring hisi)
       [not found] ` <1447551593-22246-1-git-send-email-yamada.masahiro-uWyLwvC0a2jby3iVrkZq2A@public.gmane.org>
  2015-11-15  1:39   ` [PATCH 2/2] ARM: use const and __initconst for smp_operations Masahiro Yamada
@ 2015-11-17 17:57   ` Simon Horman
  2015-12-01 21:21   ` Arnd Bergmann
  2 siblings, 0 replies; 24+ messages in thread
From: Simon Horman @ 2015-11-17 17:57 UTC (permalink / raw)
  To: Masahiro Yamada
  Cc: Mark Rutland, Andrew Lunn, Krzysztof Kozlowski,
	kernel-F5mvAk5X5gdBDgjK7y7TUQ, linux-sh-u79uwXL29TY76Z2rM5mHXA,
	Brian Norris, Linus Walleij, Will Deacon, Patrice Chotard,
	Matthias Brugger, Chen-Yu Tsai, Thierry Reding, Shawn Guo,
	Heiko Stuebner, Alexandre Courbot, Florian Fainelli,
	Russell King, Emilio López, Viresh Kumar, Stephen Warren,
	Magnus Damm, Michal Simek, Wei Xu

On Sun, Nov 15, 2015 at 10:39:51AM +0900, Masahiro Yamada wrote:
> 
> 1/2: minor refactoring for mach-hisi
> 2/2: use const ... __initconst for smp_operations
> 
> I hope 2/2 will be reviewed by sub-arch maintainers.
> Please issue Acked-by if it is OK.
> 
> I hope this series will be applied to ARM-SOC.

My suggestion is to split this patch up. In its current form
it seems bound to cause some merge conflicts at some point.
If you were to submit the mach-shmobile portion as a separate patch
I would be happy to queue it up.

That aside, I don't have any objections to the mach-shmobile code changes.
So if you wish to proceed with a large patch then for the mach-shmobile
portion:

Acked-by: Simon Horman <horms+renesas-/R6kz+dDXgpPR4JQBCEnsQ@public.gmane.org>

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [PATCH 2/2] ARM: use const and __initconst for smp_operations
       [not found]     ` <1447551593-22246-3-git-send-email-yamada.masahiro-uWyLwvC0a2jby3iVrkZq2A@public.gmane.org>
@ 2015-11-18  1:30       ` Stephen Boyd
  2015-11-18  5:36       ` Viresh Kumar
                         ` (12 subsequent siblings)
  13 siblings, 0 replies; 24+ messages in thread
From: Stephen Boyd @ 2015-11-18  1:30 UTC (permalink / raw)
  To: Masahiro Yamada
  Cc: Mark Rutland, Andrew Lunn, Krzysztof Kozlowski,
	kernel-F5mvAk5X5gdBDgjK7y7TUQ, linux-sh-u79uwXL29TY76Z2rM5mHXA,
	Brian Norris, Linus Walleij, Will Deacon,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA, Matthias Brugger,
	Chen-Yu Tsai, Thierry Reding, Shawn Guo, Heiko Stuebner,
	Alexandre Courbot, linux-samsung-soc-u79uwXL29TY76Z2rM5mHXA,
	Florian Fainelli, Russell King, Emilio López, Viresh Kumar,
	Stephen Warren, Magnus Damm, Michal Simek, Wei Xu

On 11/15, 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-uWyLwvC0a2jby3iVrkZq2A@public.gmane.org>
> Acked-by: Krzysztof Kozlowski <k.kozlowski-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
> Acked-by: Maxime Ripard <maxime.ripard-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org>
> Acked-by: Moritz Fischer <moritz.fischer-+aYTwkv1SeIAvxtiuMwx3w@public.gmane.org>
> ---

Acked-by: Stephen Boyd <sboyd-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org> # qcom part

-- 
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
a Linux Foundation Collaborative Project

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [PATCH 2/2] ARM: use const and __initconst for smp_operations
       [not found]     ` <1447551593-22246-3-git-send-email-yamada.masahiro-uWyLwvC0a2jby3iVrkZq2A@public.gmane.org>
  2015-11-18  1:30       ` Stephen Boyd
@ 2015-11-18  5:36       ` Viresh Kumar
  2015-11-18  8:15       ` Patrice Chotard
                         ` (11 subsequent siblings)
  13 siblings, 0 replies; 24+ messages in thread
From: Viresh Kumar @ 2015-11-18  5:36 UTC (permalink / raw)
  To: Masahiro Yamada
  Cc: Mark Rutland, Andrew Lunn, Krzysztof Kozlowski,
	kernel-F5mvAk5X5gdBDgjK7y7TUQ, linux-sh-u79uwXL29TY76Z2rM5mHXA,
	Brian Norris, Linus Walleij, Will Deacon,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA, Matthias Brugger,
	Chen-Yu Tsai, Thierry Reding, Shawn Guo, Heiko Stuebner,
	Alexandre Courbot, linux-samsung-soc-u79uwXL29TY76Z2rM5mHXA,
	Florian Fainelli, Russell King, Emilio López, Viresh Kumar,
	Stephen Warren, Magnus Damm, Michal Simek, Wei Xu

On 15-11-15, 10:39, 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-uWyLwvC0a2jby3iVrkZq2A@public.gmane.org>
> Acked-by: Krzysztof Kozlowski <k.kozlowski-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
> Acked-by: Maxime Ripard <maxime.ripard-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org>
> Acked-by: Moritz Fischer <moritz.fischer-+aYTwkv1SeIAvxtiuMwx3w@public.gmane.org>
> ---
> 
>  arch/arm/mach-spear/generic.h        | 2 +-
>  arch/arm/mach-spear/platsmp.c        | 2 +-

Acked-by: Viresh Kumar <viresh.kumar-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>

-- 
viresh

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [PATCH 2/2] ARM: use const and __initconst for smp_operations
       [not found]     ` <1447551593-22246-3-git-send-email-yamada.masahiro-uWyLwvC0a2jby3iVrkZq2A@public.gmane.org>
  2015-11-18  1:30       ` Stephen Boyd
  2015-11-18  5:36       ` Viresh Kumar
@ 2015-11-18  8:15       ` Patrice Chotard
  2015-11-18 11:22       ` Heiko Stübner
                         ` (10 subsequent siblings)
  13 siblings, 0 replies; 24+ messages in thread
From: Patrice Chotard @ 2015-11-18  8:15 UTC (permalink / raw)
  To: Masahiro Yamada, arm-DgEjT+Ai2ygdnm+yROfE0A
  Cc: Mark Rutland, Andrew Lunn, Krzysztof Kozlowski,
	kernel-F5mvAk5X5gdBDgjK7y7TUQ, linux-sh-u79uwXL29TY76Z2rM5mHXA,
	Brian Norris, Linus Walleij, Will Deacon, Chen-Yu Tsai,
	Matthias Brugger, Thierry Reding, Shawn Guo, Heiko Stuebner,
	Alexandre Courbot, linux-samsung-soc-u79uwXL29TY76Z2rM5mHXA,
	Florian Fainelli, Russell King, Emilio López, Viresh Kumar,
	Stephen Warren, Magnus Damm, Michal Simek, Wei Xu

Hi

On 11/15/2015 02:39 AM, 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-uWyLwvC0a2jby3iVrkZq2A@public.gmane.org>
> Acked-by: Krzysztof Kozlowski <k.kozlowski-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
> Acked-by: Maxime Ripard <maxime.ripard-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org>
> Acked-by: Moritz Fischer <moritz.fischer-+aYTwkv1SeIAvxtiuMwx3w@public.gmane.org>

For STi part

Acked-by: Patrice Chotard <patrice.chotard-qxv4g6HH51o@public.gmane.org>


> ---
>
>   arch/arm/common/mcpm_platsmp.c       | 2 +-
>   arch/arm/include/asm/psci.h          | 2 +-
>   arch/arm/kernel/psci_smp.c           | 2 +-
>   arch/arm/mach-alpine/platsmp.c       | 2 +-
>   arch/arm/mach-axxia/platsmp.c        | 2 +-
>   arch/arm/mach-bcm/bcm63xx_smp.c      | 2 +-
>   arch/arm/mach-bcm/kona_smp.c         | 2 +-
>   arch/arm/mach-bcm/platsmp-brcmstb.c  | 2 +-
>   arch/arm/mach-berlin/platsmp.c       | 2 +-
>   arch/arm/mach-exynos/common.h        | 2 +-
>   arch/arm/mach-exynos/platsmp.c       | 2 +-
>   arch/arm/mach-hisi/platmcpm.c        | 2 +-
>   arch/arm/mach-hisi/platsmp.c         | 6 +++---
>   arch/arm/mach-imx/common.h           | 4 ++--
>   arch/arm/mach-imx/platsmp.c          | 4 ++--
>   arch/arm/mach-keystone/keystone.h    | 2 +-
>   arch/arm/mach-keystone/platsmp.c     | 2 +-
>   arch/arm/mach-mediatek/platsmp.c     | 4 ++--
>   arch/arm/mach-mvebu/armada-370-xp.h  | 2 +-
>   arch/arm/mach-mvebu/platsmp-a9.c     | 4 ++--
>   arch/arm/mach-mvebu/platsmp.c        | 2 +-
>   arch/arm/mach-omap2/common.h         | 2 +-
>   arch/arm/mach-omap2/omap-smp.c       | 2 +-
>   arch/arm/mach-prima2/common.h        | 2 +-
>   arch/arm/mach-prima2/platsmp.c       | 2 +-
>   arch/arm/mach-qcom/platsmp.c         | 6 +++---
>   arch/arm/mach-realview/core.h        | 2 +-
>   arch/arm/mach-realview/platsmp.c     | 2 +-
>   arch/arm/mach-rockchip/platsmp.c     | 2 +-
>   arch/arm/mach-shmobile/r8a7779.h     | 2 +-
>   arch/arm/mach-shmobile/r8a7790.h     | 2 +-
>   arch/arm/mach-shmobile/r8a7791.h     | 2 +-
>   arch/arm/mach-shmobile/setup-emev2.c | 2 +-
>   arch/arm/mach-shmobile/sh73a0.h      | 2 +-
>   arch/arm/mach-shmobile/smp-emev2.c   | 2 +-
>   arch/arm/mach-shmobile/smp-r8a7779.c | 2 +-
>   arch/arm/mach-shmobile/smp-r8a7790.c | 2 +-
>   arch/arm/mach-shmobile/smp-r8a7791.c | 2 +-
>   arch/arm/mach-shmobile/smp-sh73a0.c  | 2 +-
>   arch/arm/mach-socfpga/platsmp.c      | 4 ++--
>   arch/arm/mach-spear/generic.h        | 2 +-
>   arch/arm/mach-spear/platsmp.c        | 2 +-
>   arch/arm/mach-sti/platsmp.c          | 2 +-
>   arch/arm/mach-sti/smp.h              | 2 +-
>   arch/arm/mach-sunxi/platsmp.c        | 4 ++--
>   arch/arm/mach-tegra/common.h         | 2 +-
>   arch/arm/mach-tegra/platsmp.c        | 2 +-
>   arch/arm/mach-uniphier/platsmp.c     | 2 +-
>   arch/arm/mach-ux500/platsmp.c        | 2 +-
>   arch/arm/mach-vexpress/core.h        | 2 +-
>   arch/arm/mach-vexpress/platsmp.c     | 2 +-
>   arch/arm/mach-zx/platsmp.c           | 2 +-
>   arch/arm/mach-zynq/common.h          | 2 +-
>   arch/arm/mach-zynq/platsmp.c         | 2 +-
>   54 files changed, 64 insertions(+), 64 deletions(-)
>
> diff --git a/arch/arm/common/mcpm_platsmp.c b/arch/arm/common/mcpm_platsmp.c
> index 2b25b60..c773157 100644
> --- a/arch/arm/common/mcpm_platsmp.c
> +++ b/arch/arm/common/mcpm_platsmp.c
> @@ -83,7 +83,7 @@ static void mcpm_cpu_die(unsigned int cpu)
>   
>   #endif
>   
> -static struct smp_operations __initdata mcpm_smp_ops = {
> +static const struct smp_operations mcpm_smp_ops __initconst = {
>   	.smp_boot_secondary	= mcpm_boot_secondary,
>   	.smp_secondary_init	= mcpm_secondary_init,
>   #ifdef CONFIG_HOTPLUG_CPU
> diff --git a/arch/arm/include/asm/psci.h b/arch/arm/include/asm/psci.h
> index 68ee3ce..97735a8 100644
> --- a/arch/arm/include/asm/psci.h
> +++ b/arch/arm/include/asm/psci.h
> @@ -14,7 +14,7 @@
>   #ifndef __ASM_ARM_PSCI_H
>   #define __ASM_ARM_PSCI_H
>   
> -extern struct smp_operations psci_smp_ops;
> +extern const struct smp_operations psci_smp_ops;
>   
>   #ifdef CONFIG_ARM_PSCI
>   bool psci_smp_available(void);
> diff --git a/arch/arm/kernel/psci_smp.c b/arch/arm/kernel/psci_smp.c
> index 9d479b2..cb3fcae 100644
> --- a/arch/arm/kernel/psci_smp.c
> +++ b/arch/arm/kernel/psci_smp.c
> @@ -120,7 +120,7 @@ bool __init psci_smp_available(void)
>   	return (psci_ops.cpu_on != NULL);
>   }
>   
> -struct smp_operations __initdata psci_smp_ops = {
> +const struct smp_operations psci_smp_ops __initconst = {
>   	.smp_boot_secondary	= psci_boot_secondary,
>   #ifdef CONFIG_HOTPLUG_CPU
>   	.cpu_disable		= psci_cpu_disable,
> diff --git a/arch/arm/mach-alpine/platsmp.c b/arch/arm/mach-alpine/platsmp.c
> index f78429f..dd77ea2 100644
> --- a/arch/arm/mach-alpine/platsmp.c
> +++ b/arch/arm/mach-alpine/platsmp.c
> @@ -42,7 +42,7 @@ static void __init alpine_smp_prepare_cpus(unsigned int max_cpus)
>   	alpine_cpu_pm_init();
>   }
>   
> -static struct smp_operations alpine_smp_ops __initdata = {
> +static const struct smp_operations alpine_smp_ops __initconst = {
>   	.smp_prepare_cpus	= alpine_smp_prepare_cpus,
>   	.smp_boot_secondary	= alpine_boot_secondary,
>   };
> diff --git a/arch/arm/mach-axxia/platsmp.c b/arch/arm/mach-axxia/platsmp.c
> index 959d4df..ffbd71d 100644
> --- a/arch/arm/mach-axxia/platsmp.c
> +++ b/arch/arm/mach-axxia/platsmp.c
> @@ -82,7 +82,7 @@ static void __init axxia_smp_prepare_cpus(unsigned int max_cpus)
>   	}
>   }
>   
> -static struct smp_operations axxia_smp_ops __initdata = {
> +static const struct smp_operations axxia_smp_ops __initconst = {
>   	.smp_prepare_cpus	= axxia_smp_prepare_cpus,
>   	.smp_boot_secondary	= axxia_boot_secondary,
>   };
> diff --git a/arch/arm/mach-bcm/bcm63xx_smp.c b/arch/arm/mach-bcm/bcm63xx_smp.c
> index 19be904..9b6727e 100644
> --- a/arch/arm/mach-bcm/bcm63xx_smp.c
> +++ b/arch/arm/mach-bcm/bcm63xx_smp.c
> @@ -161,7 +161,7 @@ static void __init bcm63138_smp_prepare_cpus(unsigned int max_cpus)
>   	}
>   }
>   
> -struct smp_operations bcm63138_smp_ops __initdata = {
> +static const struct smp_operations bcm63138_smp_ops __initconst = {
>   	.smp_prepare_cpus	= bcm63138_smp_prepare_cpus,
>   	.smp_boot_secondary	= bcm63138_smp_boot_secondary,
>   };
> diff --git a/arch/arm/mach-bcm/kona_smp.c b/arch/arm/mach-bcm/kona_smp.c
> index 66a0465..da8328b 100644
> --- a/arch/arm/mach-bcm/kona_smp.c
> +++ b/arch/arm/mach-bcm/kona_smp.c
> @@ -194,7 +194,7 @@ static int bcm_boot_secondary(unsigned int cpu, struct task_struct *idle)
>   	return -ENOSYS;
>   }
>   
> -static struct smp_operations bcm_smp_ops __initdata = {
> +static const struct smp_operations bcm_smp_ops __initconst = {
>   	.smp_prepare_cpus	= bcm_smp_prepare_cpus,
>   	.smp_boot_secondary	= bcm_boot_secondary,
>   };
> diff --git a/arch/arm/mach-bcm/platsmp-brcmstb.c b/arch/arm/mach-bcm/platsmp-brcmstb.c
> index 44d6bddf..40dc844 100644
> --- a/arch/arm/mach-bcm/platsmp-brcmstb.c
> +++ b/arch/arm/mach-bcm/platsmp-brcmstb.c
> @@ -356,7 +356,7 @@ static int brcmstb_boot_secondary(unsigned int cpu, struct task_struct *idle)
>   	return 0;
>   }
>   
> -static struct smp_operations brcmstb_smp_ops __initdata = {
> +static const struct smp_operations brcmstb_smp_ops __initconst = {
>   	.smp_prepare_cpus	= brcmstb_cpu_ctrl_setup,
>   	.smp_boot_secondary	= brcmstb_boot_secondary,
>   #ifdef CONFIG_HOTPLUG_CPU
> diff --git a/arch/arm/mach-berlin/platsmp.c b/arch/arm/mach-berlin/platsmp.c
> index 405cd37..93f9068 100644
> --- a/arch/arm/mach-berlin/platsmp.c
> +++ b/arch/arm/mach-berlin/platsmp.c
> @@ -119,7 +119,7 @@ static int berlin_cpu_kill(unsigned int cpu)
>   }
>   #endif
>   
> -static struct smp_operations berlin_smp_ops __initdata = {
> +static const struct smp_operations berlin_smp_ops __initconst = {
>   	.smp_prepare_cpus	= berlin_smp_prepare_cpus,
>   	.smp_boot_secondary	= berlin_boot_secondary,
>   #ifdef CONFIG_HOTPLUG_CPU
> diff --git a/arch/arm/mach-exynos/common.h b/arch/arm/mach-exynos/common.h
> index 1534925..e349a03 100644
> --- a/arch/arm/mach-exynos/common.h
> +++ b/arch/arm/mach-exynos/common.h
> @@ -149,7 +149,7 @@ static inline void exynos_pm_init(void) {}
>   extern void exynos_cpu_resume(void);
>   extern void exynos_cpu_resume_ns(void);
>   
> -extern struct smp_operations exynos_smp_ops;
> +extern const struct smp_operations exynos_smp_ops;
>   
>   extern void exynos_cpu_power_down(int cpu);
>   extern void exynos_cpu_power_up(int cpu);
> diff --git a/arch/arm/mach-exynos/platsmp.c b/arch/arm/mach-exynos/platsmp.c
> index 98a2c0c..5bd9559 100644
> --- a/arch/arm/mach-exynos/platsmp.c
> +++ b/arch/arm/mach-exynos/platsmp.c
> @@ -479,7 +479,7 @@ static void exynos_cpu_die(unsigned int cpu)
>   }
>   #endif /* CONFIG_HOTPLUG_CPU */
>   
> -struct smp_operations exynos_smp_ops __initdata = {
> +const struct smp_operations exynos_smp_ops __initconst = {
>   	.smp_init_cpus		= exynos_smp_init_cpus,
>   	.smp_prepare_cpus	= exynos_smp_prepare_cpus,
>   	.smp_secondary_init	= exynos_secondary_init,
> diff --git a/arch/arm/mach-hisi/platmcpm.c b/arch/arm/mach-hisi/platmcpm.c
> index b5f8f5f..4b653a8 100644
> --- a/arch/arm/mach-hisi/platmcpm.c
> +++ b/arch/arm/mach-hisi/platmcpm.c
> @@ -239,7 +239,7 @@ err:
>   }
>   #endif
>   
> -static struct smp_operations __initdata hip04_smp_ops = {
> +static const struct smp_operations hip04_smp_ops __initconst = {
>   	.smp_boot_secondary	= hip04_boot_secondary,
>   #ifdef CONFIG_HOTPLUG_CPU
>   	.cpu_die		= hip04_cpu_die,
> diff --git a/arch/arm/mach-hisi/platsmp.c b/arch/arm/mach-hisi/platsmp.c
> index 3c5237d..47ed32c 100644
> --- a/arch/arm/mach-hisi/platsmp.c
> +++ b/arch/arm/mach-hisi/platsmp.c
> @@ -89,7 +89,7 @@ static int hi3xxx_boot_secondary(unsigned int cpu, struct task_struct *idle)
>   	return 0;
>   }
>   
> -static struct smp_operations hi3xxx_smp_ops __initdata = {
> +static const struct smp_operations hi3xxx_smp_ops __initconst = {
>   	.smp_prepare_cpus	= hi3xxx_smp_prepare_cpus,
>   	.smp_boot_secondary	= hi3xxx_boot_secondary,
>   #ifdef CONFIG_HOTPLUG_CPU
> @@ -126,7 +126,7 @@ static int hix5hd2_boot_secondary(unsigned int cpu, struct task_struct *idle)
>   }
>   
>   
> -static struct smp_operations hix5hd2_smp_ops __initdata = {
> +static const struct smp_operations hix5hd2_smp_ops __initconst = {
>   	.smp_prepare_cpus	= hisi_common_smp_prepare_cpus,
>   	.smp_boot_secondary	= hix5hd2_boot_secondary,
>   #ifdef CONFIG_HOTPLUG_CPU
> @@ -176,7 +176,7 @@ static int hip01_boot_secondary(unsigned int cpu, struct task_struct *idle)
>   	return 0;
>   }
>   
> -static struct smp_operations hip01_smp_ops __initdata = {
> +static const struct smp_operations hip01_smp_ops __initconst = {
>   	.smp_prepare_cpus       = hisi_common_smp_prepare_cpus,
>   	.smp_boot_secondary     = hip01_boot_secondary,
>   };
> diff --git a/arch/arm/mach-imx/common.h b/arch/arm/mach-imx/common.h
> index e2d5383..32b83f0 100644
> --- a/arch/arm/mach-imx/common.h
> +++ b/arch/arm/mach-imx/common.h
> @@ -153,7 +153,7 @@ void imx_init_l2cache(void);
>   static inline void imx_init_l2cache(void) {}
>   #endif
>   
> -extern struct smp_operations imx_smp_ops;
> -extern struct smp_operations ls1021a_smp_ops;
> +extern const struct smp_operations imx_smp_ops;
> +extern const struct smp_operations ls1021a_smp_ops;
>   
>   #endif
> diff --git a/arch/arm/mach-imx/platsmp.c b/arch/arm/mach-imx/platsmp.c
> index 7f27001..711dbbd 100644
> --- a/arch/arm/mach-imx/platsmp.c
> +++ b/arch/arm/mach-imx/platsmp.c
> @@ -88,7 +88,7 @@ static void __init imx_smp_prepare_cpus(unsigned int max_cpus)
>   	sync_cache_w(&g_diag_reg);
>   }
>   
> -struct smp_operations  imx_smp_ops __initdata = {
> +const struct smp_operations imx_smp_ops __initconst = {
>   	.smp_init_cpus		= imx_smp_init_cpus,
>   	.smp_prepare_cpus	= imx_smp_prepare_cpus,
>   	.smp_boot_secondary	= imx_boot_secondary,
> @@ -123,7 +123,7 @@ static void __init ls1021a_smp_prepare_cpus(unsigned int max_cpus)
>   	iounmap(dcfg_base);
>   }
>   
> -struct smp_operations  ls1021a_smp_ops __initdata = {
> +const struct smp_operations ls1021a_smp_ops __initconst = {
>   	.smp_prepare_cpus	= ls1021a_smp_prepare_cpus,
>   	.smp_boot_secondary	= ls1021a_boot_secondary,
>   };
> diff --git a/arch/arm/mach-keystone/keystone.h b/arch/arm/mach-keystone/keystone.h
> index cd04a1c..33eaa03 100644
> --- a/arch/arm/mach-keystone/keystone.h
> +++ b/arch/arm/mach-keystone/keystone.h
> @@ -15,7 +15,7 @@
>   
>   #ifndef __ASSEMBLER__
>   
> -extern struct smp_operations keystone_smp_ops;
> +extern const struct smp_operations keystone_smp_ops;
>   extern void secondary_startup(void);
>   extern u32 keystone_cpu_smc(u32 command, u32 cpu, u32 addr);
>   extern int keystone_pm_runtime_init(void);
> diff --git a/arch/arm/mach-keystone/platsmp.c b/arch/arm/mach-keystone/platsmp.c
> index 4bbb184..5665276 100644
> --- a/arch/arm/mach-keystone/platsmp.c
> +++ b/arch/arm/mach-keystone/platsmp.c
> @@ -39,6 +39,6 @@ static int keystone_smp_boot_secondary(unsigned int cpu,
>   	return error;
>   }
>   
> -struct smp_operations keystone_smp_ops __initdata = {
> +const struct smp_operations keystone_smp_ops __initconst = {
>   	.smp_boot_secondary	= keystone_smp_boot_secondary,
>   };
> diff --git a/arch/arm/mach-mediatek/platsmp.c b/arch/arm/mach-mediatek/platsmp.c
> index 8141f3f..a1b07ee 100644
> --- a/arch/arm/mach-mediatek/platsmp.c
> +++ b/arch/arm/mach-mediatek/platsmp.c
> @@ -128,13 +128,13 @@ static void __init mtk_smp_prepare_cpus(unsigned int max_cpus)
>   	__mtk_smp_prepare_cpus(max_cpus, 0);
>   }
>   
> -static struct smp_operations mt81xx_tz_smp_ops __initdata = {
> +static const struct smp_operations mt81xx_tz_smp_ops __initconst = {
>   	.smp_prepare_cpus = mtk_tz_smp_prepare_cpus,
>   	.smp_boot_secondary = mtk_boot_secondary,
>   };
>   CPU_METHOD_OF_DECLARE(mt81xx_tz_smp, "mediatek,mt81xx-tz-smp", &mt81xx_tz_smp_ops);
>   
> -static struct smp_operations mt6589_smp_ops __initdata = {
> +static const struct smp_operations mt6589_smp_ops __initconst = {
>   	.smp_prepare_cpus = mtk_smp_prepare_cpus,
>   	.smp_boot_secondary = mtk_boot_secondary,
>   };
> diff --git a/arch/arm/mach-mvebu/armada-370-xp.h b/arch/arm/mach-mvebu/armada-370-xp.h
> index c55bbf8..09413b6 100644
> --- a/arch/arm/mach-mvebu/armada-370-xp.h
> +++ b/arch/arm/mach-mvebu/armada-370-xp.h
> @@ -17,7 +17,7 @@
>   
>   #ifdef CONFIG_SMP
>   void armada_xp_secondary_startup(void);
> -extern struct smp_operations armada_xp_smp_ops;
> +extern const struct smp_operations armada_xp_smp_ops;
>   #endif
>   
>   #endif /* __MACH_ARMADA_370_XP_H */
> diff --git a/arch/arm/mach-mvebu/platsmp-a9.c b/arch/arm/mach-mvebu/platsmp-a9.c
> index 3d50004..d715dec 100644
> --- a/arch/arm/mach-mvebu/platsmp-a9.c
> +++ b/arch/arm/mach-mvebu/platsmp-a9.c
> @@ -93,11 +93,11 @@ static int armada_38x_cpu_kill(unsigned int cpu)
>   }
>   #endif
>   
> -static struct smp_operations mvebu_cortex_a9_smp_ops __initdata = {
> +static const struct smp_operations mvebu_cortex_a9_smp_ops __initconst = {
>   	.smp_boot_secondary	= mvebu_cortex_a9_boot_secondary,
>   };
>   
> -static struct smp_operations armada_38x_smp_ops __initdata = {
> +static const struct smp_operations armada_38x_smp_ops __initconst = {
>   	.smp_boot_secondary	= mvebu_cortex_a9_boot_secondary,
>   	.smp_secondary_init     = armada_38x_secondary_init,
>   #ifdef CONFIG_HOTPLUG_CPU
> diff --git a/arch/arm/mach-mvebu/platsmp.c b/arch/arm/mach-mvebu/platsmp.c
> index 58cc8c1..f9597b7 100644
> --- a/arch/arm/mach-mvebu/platsmp.c
> +++ b/arch/arm/mach-mvebu/platsmp.c
> @@ -170,7 +170,7 @@ static int armada_xp_cpu_kill(unsigned int cpu)
>   }
>   #endif
>   
> -struct smp_operations armada_xp_smp_ops __initdata = {
> +const struct smp_operations armada_xp_smp_ops __initconst = {
>   	.smp_init_cpus		= armada_xp_smp_init_cpus,
>   	.smp_prepare_cpus	= armada_xp_smp_prepare_cpus,
>   	.smp_boot_secondary	= armada_xp_boot_secondary,
> diff --git a/arch/arm/mach-omap2/common.h b/arch/arm/mach-omap2/common.h
> index 0cba957..f7666b9 100644
> --- a/arch/arm/mach-omap2/common.h
> +++ b/arch/arm/mach-omap2/common.h
> @@ -270,7 +270,7 @@ extern u32 omap_read_auxcoreboot0(void);
>   
>   extern void omap4_cpu_die(unsigned int cpu);
>   
> -extern struct smp_operations omap4_smp_ops;
> +extern const struct smp_operations omap4_smp_ops;
>   
>   extern void omap5_secondary_startup(void);
>   extern void omap5_secondary_hyp_startup(void);
> diff --git a/arch/arm/mach-omap2/omap-smp.c b/arch/arm/mach-omap2/omap-smp.c
> index 5305ec7..ddcd1d2 100644
> --- a/arch/arm/mach-omap2/omap-smp.c
> +++ b/arch/arm/mach-omap2/omap-smp.c
> @@ -241,7 +241,7 @@ static void __init omap4_smp_prepare_cpus(unsigned int max_cpus)
>   
>   }
>   
> -struct smp_operations omap4_smp_ops __initdata = {
> +const struct smp_operations omap4_smp_ops __initconst = {
>   	.smp_init_cpus		= omap4_smp_init_cpus,
>   	.smp_prepare_cpus	= omap4_smp_prepare_cpus,
>   	.smp_secondary_init	= omap4_secondary_init,
> diff --git a/arch/arm/mach-prima2/common.h b/arch/arm/mach-prima2/common.h
> index 3916a66..6d77b62 100644
> --- a/arch/arm/mach-prima2/common.h
> +++ b/arch/arm/mach-prima2/common.h
> @@ -15,7 +15,7 @@
>   #include <asm/mach/time.h>
>   #include <asm/exception.h>
>   
> -extern struct smp_operations   sirfsoc_smp_ops;
> +extern const struct smp_operations sirfsoc_smp_ops;
>   extern void sirfsoc_secondary_startup(void);
>   extern void sirfsoc_cpu_die(unsigned int cpu);
>   
> diff --git a/arch/arm/mach-prima2/platsmp.c b/arch/arm/mach-prima2/platsmp.c
> index e46c910..0875b99 100644
> --- a/arch/arm/mach-prima2/platsmp.c
> +++ b/arch/arm/mach-prima2/platsmp.c
> @@ -112,7 +112,7 @@ static int sirfsoc_boot_secondary(unsigned int cpu, struct task_struct *idle)
>   	return pen_release != -1 ? -ENOSYS : 0;
>   }
>   
> -struct smp_operations sirfsoc_smp_ops __initdata = {
> +const struct smp_operations sirfsoc_smp_ops __initconst = {
>   	.smp_secondary_init     = sirfsoc_secondary_init,
>   	.smp_boot_secondary     = sirfsoc_boot_secondary,
>   #ifdef CONFIG_HOTPLUG_CPU
> diff --git a/arch/arm/mach-qcom/platsmp.c b/arch/arm/mach-qcom/platsmp.c
> index 9b00123..5494c9e 100644
> --- a/arch/arm/mach-qcom/platsmp.c
> +++ b/arch/arm/mach-qcom/platsmp.c
> @@ -332,7 +332,7 @@ static void __init qcom_smp_prepare_cpus(unsigned int max_cpus)
>   	}
>   }
>   
> -static struct smp_operations smp_msm8660_ops __initdata = {
> +static const struct smp_operations smp_msm8660_ops __initconst = {
>   	.smp_prepare_cpus	= qcom_smp_prepare_cpus,
>   	.smp_secondary_init	= qcom_secondary_init,
>   	.smp_boot_secondary	= msm8660_boot_secondary,
> @@ -342,7 +342,7 @@ static struct smp_operations smp_msm8660_ops __initdata = {
>   };
>   CPU_METHOD_OF_DECLARE(qcom_smp, "qcom,gcc-msm8660", &smp_msm8660_ops);
>   
> -static struct smp_operations qcom_smp_kpssv1_ops __initdata = {
> +static const struct smp_operations qcom_smp_kpssv1_ops __initconst = {
>   	.smp_prepare_cpus	= qcom_smp_prepare_cpus,
>   	.smp_secondary_init	= qcom_secondary_init,
>   	.smp_boot_secondary	= kpssv1_boot_secondary,
> @@ -352,7 +352,7 @@ static struct smp_operations qcom_smp_kpssv1_ops __initdata = {
>   };
>   CPU_METHOD_OF_DECLARE(qcom_smp_kpssv1, "qcom,kpss-acc-v1", &qcom_smp_kpssv1_ops);
>   
> -static struct smp_operations qcom_smp_kpssv2_ops __initdata = {
> +static const struct smp_operations qcom_smp_kpssv2_ops __initconst = {
>   	.smp_prepare_cpus	= qcom_smp_prepare_cpus,
>   	.smp_secondary_init	= qcom_secondary_init,
>   	.smp_boot_secondary	= kpssv2_boot_secondary,
> diff --git a/arch/arm/mach-realview/core.h b/arch/arm/mach-realview/core.h
> index 868ece2..670ee0e 100644
> --- a/arch/arm/mach-realview/core.h
> +++ b/arch/arm/mach-realview/core.h
> @@ -54,7 +54,7 @@ extern int realview_usb_register(struct resource *res);
>   extern void realview_init_early(void);
>   extern void realview_fixup(struct tag *tags, char **from);
>   
> -extern struct smp_operations realview_smp_ops;
> +extern const struct smp_operations realview_smp_ops;
>   extern void realview_cpu_die(unsigned int cpu);
>   
>   #endif
> diff --git a/arch/arm/mach-realview/platsmp.c b/arch/arm/mach-realview/platsmp.c
> index 98e3052..dc29029 100644
> --- a/arch/arm/mach-realview/platsmp.c
> +++ b/arch/arm/mach-realview/platsmp.c
> @@ -75,7 +75,7 @@ static void __init realview_smp_prepare_cpus(unsigned int max_cpus)
>   		     __io_address(REALVIEW_SYS_FLAGSSET));
>   }
>   
> -struct smp_operations realview_smp_ops __initdata = {
> +const struct smp_operations realview_smp_ops __initconst = {
>   	.smp_init_cpus		= realview_smp_init_cpus,
>   	.smp_prepare_cpus	= realview_smp_prepare_cpus,
>   	.smp_secondary_init	= versatile_secondary_init,
> diff --git a/arch/arm/mach-rockchip/platsmp.c b/arch/arm/mach-rockchip/platsmp.c
> index 3e7a4b7..938888f 100644
> --- a/arch/arm/mach-rockchip/platsmp.c
> +++ b/arch/arm/mach-rockchip/platsmp.c
> @@ -340,7 +340,7 @@ static void rockchip_cpu_die(unsigned int cpu)
>   }
>   #endif
>   
> -static struct smp_operations rockchip_smp_ops __initdata = {
> +static const struct smp_operations rockchip_smp_ops __initconst = {
>   	.smp_prepare_cpus	= rockchip_smp_prepare_cpus,
>   	.smp_boot_secondary	= rockchip_boot_secondary,
>   #ifdef CONFIG_HOTPLUG_CPU
> diff --git a/arch/arm/mach-shmobile/r8a7779.h b/arch/arm/mach-shmobile/r8a7779.h
> index e1aaa2e..2a5f773 100644
> --- a/arch/arm/mach-shmobile/r8a7779.h
> +++ b/arch/arm/mach-shmobile/r8a7779.h
> @@ -3,6 +3,6 @@
>   
>   extern void r8a7779_pm_init(void);
>   
> -extern struct smp_operations r8a7779_smp_ops;
> +extern const struct smp_operations r8a7779_smp_ops;
>   
>   #endif /* __ASM_R8A7779_H__ */
> diff --git a/arch/arm/mach-shmobile/r8a7790.h b/arch/arm/mach-shmobile/r8a7790.h
> index 1a46d02..136f345 100644
> --- a/arch/arm/mach-shmobile/r8a7790.h
> +++ b/arch/arm/mach-shmobile/r8a7790.h
> @@ -1,6 +1,6 @@
>   #ifndef __ASM_R8A7790_H__
>   #define __ASM_R8A7790_H__
>   
> -extern struct smp_operations r8a7790_smp_ops;
> +extern const struct smp_operations r8a7790_smp_ops;
>   
>   #endif /* __ASM_R8A7790_H__ */
> diff --git a/arch/arm/mach-shmobile/r8a7791.h b/arch/arm/mach-shmobile/r8a7791.h
> index 7ca0b7d..cf7a840 100644
> --- a/arch/arm/mach-shmobile/r8a7791.h
> +++ b/arch/arm/mach-shmobile/r8a7791.h
> @@ -1,6 +1,6 @@
>   #ifndef __ASM_R8A7791_H__
>   #define __ASM_R8A7791_H__
>   
> -extern struct smp_operations r8a7791_smp_ops;
> +extern const struct smp_operations r8a7791_smp_ops;
>   
>   #endif /* __ASM_R8A7791_H__ */
> diff --git a/arch/arm/mach-shmobile/setup-emev2.c b/arch/arm/mach-shmobile/setup-emev2.c
> index 37f7b15..10b7cb5 100644
> --- a/arch/arm/mach-shmobile/setup-emev2.c
> +++ b/arch/arm/mach-shmobile/setup-emev2.c
> @@ -42,7 +42,7 @@ static const char *const emev2_boards_compat_dt[] __initconst = {
>   	NULL,
>   };
>   
> -extern struct smp_operations emev2_smp_ops;
> +extern const struct smp_operations emev2_smp_ops;
>   
>   DT_MACHINE_START(EMEV2_DT, "Generic Emma Mobile EV2 (Flattened Device Tree)")
>   	.smp		= smp_ops(emev2_smp_ops),
> diff --git a/arch/arm/mach-shmobile/sh73a0.h b/arch/arm/mach-shmobile/sh73a0.h
> index 3964680..50ef24f 100644
> --- a/arch/arm/mach-shmobile/sh73a0.h
> +++ b/arch/arm/mach-shmobile/sh73a0.h
> @@ -1,6 +1,6 @@
>   #ifndef __ASM_SH73A0_H__
>   #define __ASM_SH73A0_H__
>   
> -extern struct smp_operations sh73a0_smp_ops;
> +extern const struct smp_operations sh73a0_smp_ops;
>   
>   #endif /* __ASM_SH73A0_H__ */
> diff --git a/arch/arm/mach-shmobile/smp-emev2.c b/arch/arm/mach-shmobile/smp-emev2.c
> index baff3b5..adbac69 100644
> --- a/arch/arm/mach-shmobile/smp-emev2.c
> +++ b/arch/arm/mach-shmobile/smp-emev2.c
> @@ -49,7 +49,7 @@ static void __init emev2_smp_prepare_cpus(unsigned int max_cpus)
>   	shmobile_smp_scu_prepare_cpus(max_cpus);
>   }
>   
> -struct smp_operations emev2_smp_ops __initdata = {
> +const struct smp_operations emev2_smp_ops __initconst = {
>   	.smp_prepare_cpus	= emev2_smp_prepare_cpus,
>   	.smp_boot_secondary	= emev2_boot_secondary,
>   };
> diff --git a/arch/arm/mach-shmobile/smp-r8a7779.c b/arch/arm/mach-shmobile/smp-r8a7779.c
> index 353562b8..b854fe2 100644
> --- a/arch/arm/mach-shmobile/smp-r8a7779.c
> +++ b/arch/arm/mach-shmobile/smp-r8a7779.c
> @@ -117,7 +117,7 @@ static int r8a7779_cpu_kill(unsigned int cpu)
>   }
>   #endif /* CONFIG_HOTPLUG_CPU */
>   
> -struct smp_operations r8a7779_smp_ops  __initdata = {
> +const struct smp_operations r8a7779_smp_ops  __initconst = {
>   	.smp_prepare_cpus	= r8a7779_smp_prepare_cpus,
>   	.smp_boot_secondary	= r8a7779_boot_secondary,
>   #ifdef CONFIG_HOTPLUG_CPU
> diff --git a/arch/arm/mach-shmobile/smp-r8a7790.c b/arch/arm/mach-shmobile/smp-r8a7790.c
> index 4b33d43..f6426c6 100644
> --- a/arch/arm/mach-shmobile/smp-r8a7790.c
> +++ b/arch/arm/mach-shmobile/smp-r8a7790.c
> @@ -60,7 +60,7 @@ static void __init r8a7790_smp_prepare_cpus(unsigned int max_cpus)
>   	rcar_sysc_power_up(&r8a7790_ca7_scu);
>   }
>   
> -struct smp_operations r8a7790_smp_ops __initdata = {
> +const struct smp_operations r8a7790_smp_ops __initconst = {
>   	.smp_prepare_cpus	= r8a7790_smp_prepare_cpus,
>   	.smp_boot_secondary	= shmobile_smp_apmu_boot_secondary,
>   #ifdef CONFIG_HOTPLUG_CPU
> diff --git a/arch/arm/mach-shmobile/smp-r8a7791.c b/arch/arm/mach-shmobile/smp-r8a7791.c
> index b2508c0..2d6417a 100644
> --- a/arch/arm/mach-shmobile/smp-r8a7791.c
> +++ b/arch/arm/mach-shmobile/smp-r8a7791.c
> @@ -54,7 +54,7 @@ static int r8a7791_smp_boot_secondary(unsigned int cpu,
>   	return shmobile_smp_apmu_boot_secondary(cpu, idle);
>   }
>   
> -struct smp_operations r8a7791_smp_ops __initdata = {
> +const struct smp_operations r8a7791_smp_ops __initconst = {
>   	.smp_prepare_cpus	= r8a7791_smp_prepare_cpus,
>   	.smp_boot_secondary	= r8a7791_smp_boot_secondary,
>   #ifdef CONFIG_HOTPLUG_CPU
> diff --git a/arch/arm/mach-shmobile/smp-sh73a0.c b/arch/arm/mach-shmobile/smp-sh73a0.c
> index bc2824a..ee1a4b7 100644
> --- a/arch/arm/mach-shmobile/smp-sh73a0.c
> +++ b/arch/arm/mach-shmobile/smp-sh73a0.c
> @@ -56,7 +56,7 @@ static void __init sh73a0_smp_prepare_cpus(unsigned int max_cpus)
>   	shmobile_smp_scu_prepare_cpus(max_cpus);
>   }
>   
> -struct smp_operations sh73a0_smp_ops __initdata = {
> +const struct smp_operations sh73a0_smp_ops __initconst = {
>   	.smp_prepare_cpus	= sh73a0_smp_prepare_cpus,
>   	.smp_boot_secondary	= sh73a0_boot_secondary,
>   #ifdef CONFIG_HOTPLUG_CPU
> diff --git a/arch/arm/mach-socfpga/platsmp.c b/arch/arm/mach-socfpga/platsmp.c
> index 15c8ce8..cbb0a54 100644
> --- a/arch/arm/mach-socfpga/platsmp.c
> +++ b/arch/arm/mach-socfpga/platsmp.c
> @@ -117,7 +117,7 @@ static int socfpga_cpu_kill(unsigned int cpu)
>   	return 1;
>   }
>   
> -static struct smp_operations socfpga_smp_ops __initdata = {
> +static const struct smp_operations socfpga_smp_ops __initconst = {
>   	.smp_prepare_cpus	= socfpga_smp_prepare_cpus,
>   	.smp_boot_secondary	= socfpga_boot_secondary,
>   #ifdef CONFIG_HOTPLUG_CPU
> @@ -126,7 +126,7 @@ static struct smp_operations socfpga_smp_ops __initdata = {
>   #endif
>   };
>   
> -static struct smp_operations socfpga_a10_smp_ops __initdata = {
> +static const struct smp_operations socfpga_a10_smp_ops __initconst = {
>   	.smp_prepare_cpus	= socfpga_smp_prepare_cpus,
>   	.smp_boot_secondary	= socfpga_a10_boot_secondary,
>   #ifdef CONFIG_HOTPLUG_CPU
> diff --git a/arch/arm/mach-spear/generic.h b/arch/arm/mach-spear/generic.h
> index 0664091..909b97c0 100644
> --- a/arch/arm/mach-spear/generic.h
> +++ b/arch/arm/mach-spear/generic.h
> @@ -39,7 +39,7 @@ void spear_restart(enum reboot_mode, const char *);
>   void spear13xx_secondary_startup(void);
>   void spear13xx_cpu_die(unsigned int cpu);
>   
> -extern struct smp_operations spear13xx_smp_ops;
> +extern const struct smp_operations spear13xx_smp_ops;
>   
>   #ifdef CONFIG_MACH_SPEAR1310
>   void __init spear1310_clk_init(void __iomem *misc_base, void __iomem *ras_base);
> diff --git a/arch/arm/mach-spear/platsmp.c b/arch/arm/mach-spear/platsmp.c
> index fd42977..8d1e2d5 100644
> --- a/arch/arm/mach-spear/platsmp.c
> +++ b/arch/arm/mach-spear/platsmp.c
> @@ -120,7 +120,7 @@ static void __init spear13xx_smp_prepare_cpus(unsigned int max_cpus)
>   	__raw_writel(virt_to_phys(spear13xx_secondary_startup), SYS_LOCATION);
>   }
>   
> -struct smp_operations spear13xx_smp_ops __initdata = {
> +const struct smp_operations spear13xx_smp_ops __initconst = {
>          .smp_init_cpus		= spear13xx_smp_init_cpus,
>          .smp_prepare_cpus	= spear13xx_smp_prepare_cpus,
>          .smp_secondary_init	= spear13xx_secondary_init,
> diff --git a/arch/arm/mach-sti/platsmp.c b/arch/arm/mach-sti/platsmp.c
> index c4ad6ea..ea5a227 100644
> --- a/arch/arm/mach-sti/platsmp.c
> +++ b/arch/arm/mach-sti/platsmp.c
> @@ -156,7 +156,7 @@ static void __init sti_smp_prepare_cpus(unsigned int max_cpus)
>   	}
>   }
>   
> -struct smp_operations __initdata sti_smp_ops = {
> +const struct smp_operations sti_smp_ops __initconst = {
>   	.smp_prepare_cpus	= sti_smp_prepare_cpus,
>   	.smp_secondary_init	= sti_secondary_init,
>   	.smp_boot_secondary	= sti_boot_secondary,
> diff --git a/arch/arm/mach-sti/smp.h b/arch/arm/mach-sti/smp.h
> index ae22707..d8a2f87 100644
> --- a/arch/arm/mach-sti/smp.h
> +++ b/arch/arm/mach-sti/smp.h
> @@ -12,7 +12,7 @@
>   #ifndef __MACH_STI_SMP_H
>   #define __MACH_STI_SMP_H
>   
> -extern struct smp_operations	sti_smp_ops;
> +extern const struct smp_operations sti_smp_ops;
>   
>   void sti_secondary_startup(void);
>   
> diff --git a/arch/arm/mach-sunxi/platsmp.c b/arch/arm/mach-sunxi/platsmp.c
> index e8483ec..6642267 100644
> --- a/arch/arm/mach-sunxi/platsmp.c
> +++ b/arch/arm/mach-sunxi/platsmp.c
> @@ -116,7 +116,7 @@ static int sun6i_smp_boot_secondary(unsigned int cpu,
>   	return 0;
>   }
>   
> -static struct smp_operations sun6i_smp_ops __initdata = {
> +static const struct smp_operations sun6i_smp_ops __initconst = {
>   	.smp_prepare_cpus	= sun6i_smp_prepare_cpus,
>   	.smp_boot_secondary	= sun6i_smp_boot_secondary,
>   };
> @@ -185,7 +185,7 @@ static int sun8i_smp_boot_secondary(unsigned int cpu,
>   	return 0;
>   }
>   
> -struct smp_operations sun8i_smp_ops __initdata = {
> +static const struct smp_operations sun8i_smp_ops __initconst = {
>   	.smp_prepare_cpus	= sun8i_smp_prepare_cpus,
>   	.smp_boot_secondary	= sun8i_smp_boot_secondary,
>   };
> diff --git a/arch/arm/mach-tegra/common.h b/arch/arm/mach-tegra/common.h
> index 5900cc4..1f6fb80 100644
> --- a/arch/arm/mach-tegra/common.h
> +++ b/arch/arm/mach-tegra/common.h
> @@ -1,4 +1,4 @@
> -extern struct smp_operations tegra_smp_ops;
> +extern const struct smp_operations tegra_smp_ops;
>   
>   extern int tegra_cpu_kill(unsigned int cpu);
>   extern void tegra_cpu_die(unsigned int cpu);
> diff --git a/arch/arm/mach-tegra/platsmp.c b/arch/arm/mach-tegra/platsmp.c
> index b450866..f3f61db 100644
> --- a/arch/arm/mach-tegra/platsmp.c
> +++ b/arch/arm/mach-tegra/platsmp.c
> @@ -192,7 +192,7 @@ static void __init tegra_smp_prepare_cpus(unsigned int max_cpus)
>   		scu_enable(IO_ADDRESS(scu_a9_get_base()));
>   }
>   
> -struct smp_operations tegra_smp_ops __initdata = {
> +const struct smp_operations tegra_smp_ops __initconst = {
>   	.smp_prepare_cpus	= tegra_smp_prepare_cpus,
>   	.smp_secondary_init	= tegra_secondary_init,
>   	.smp_boot_secondary	= tegra_boot_secondary,
> diff --git a/arch/arm/mach-uniphier/platsmp.c b/arch/arm/mach-uniphier/platsmp.c
> index f057766..e1cfc1d 100644
> --- a/arch/arm/mach-uniphier/platsmp.c
> +++ b/arch/arm/mach-uniphier/platsmp.c
> @@ -201,7 +201,7 @@ static int __init uniphier_smp_boot_secondary(unsigned int cpu,
>   	return 0;
>   }
>   
> -static struct smp_operations uniphier_smp_ops __initdata = {
> +static const struct smp_operations uniphier_smp_ops __initconst = {
>   	.smp_prepare_cpus	= uniphier_smp_prepare_cpus,
>   	.smp_boot_secondary	= uniphier_smp_boot_secondary,
>   };
> diff --git a/arch/arm/mach-ux500/platsmp.c b/arch/arm/mach-ux500/platsmp.c
> index 70766b96..88b8ab4 100644
> --- a/arch/arm/mach-ux500/platsmp.c
> +++ b/arch/arm/mach-ux500/platsmp.c
> @@ -98,7 +98,7 @@ static int ux500_boot_secondary(unsigned int cpu, struct task_struct *idle)
>   	return 0;
>   }
>   
> -struct smp_operations ux500_smp_ops __initdata = {
> +static const struct smp_operations ux500_smp_ops __initconst = {
>   	.smp_prepare_cpus	= ux500_smp_prepare_cpus,
>   	.smp_boot_secondary	= ux500_boot_secondary,
>   #ifdef CONFIG_HOTPLUG_CPU
> 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,
> diff --git a/arch/arm/mach-zx/platsmp.c b/arch/arm/mach-zx/platsmp.c
> index a369398..0297f92 100644
> --- a/arch/arm/mach-zx/platsmp.c
> +++ b/arch/arm/mach-zx/platsmp.c
> @@ -176,7 +176,7 @@ static void zx_secondary_init(unsigned int cpu)
>   	scu_power_mode(scu_base, SCU_PM_NORMAL);
>   }
>   
> -struct smp_operations zx_smp_ops __initdata = {
> +static const struct smp_operations zx_smp_ops __initconst = {
>   	.smp_prepare_cpus	= zx_smp_prepare_cpus,
>   	.smp_secondary_init	= zx_secondary_init,
>   	.smp_boot_secondary	= zx_boot_secondary,
> diff --git a/arch/arm/mach-zynq/common.h b/arch/arm/mach-zynq/common.h
> index 79cda2e..e771933 100644
> --- a/arch/arm/mach-zynq/common.h
> +++ b/arch/arm/mach-zynq/common.h
> @@ -30,7 +30,7 @@ extern char zynq_secondary_trampoline;
>   extern char zynq_secondary_trampoline_jump;
>   extern char zynq_secondary_trampoline_end;
>   extern int zynq_cpun_start(u32 address, int cpu);
> -extern struct smp_operations zynq_smp_ops __initdata;
> +extern const struct smp_operations zynq_smp_ops;
>   #endif
>   
>   extern void __iomem *zynq_scu_base;
> diff --git a/arch/arm/mach-zynq/platsmp.c b/arch/arm/mach-zynq/platsmp.c
> index f66816c..7cd9865 100644
> --- a/arch/arm/mach-zynq/platsmp.c
> +++ b/arch/arm/mach-zynq/platsmp.c
> @@ -157,7 +157,7 @@ static void zynq_cpu_die(unsigned int cpu)
>   }
>   #endif
>   
> -struct smp_operations zynq_smp_ops __initdata = {
> +const struct smp_operations zynq_smp_ops __initconst = {
>   	.smp_init_cpus		= zynq_smp_init_cpus,
>   	.smp_prepare_cpus	= zynq_smp_prepare_cpus,
>   	.smp_boot_secondary	= zynq_boot_secondary,

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [PATCH 2/2] ARM: use const and __initconst for smp_operations
       [not found]     ` <1447551593-22246-3-git-send-email-yamada.masahiro-uWyLwvC0a2jby3iVrkZq2A@public.gmane.org>
                         ` (2 preceding siblings ...)
  2015-11-18  8:15       ` Patrice Chotard
@ 2015-11-18 11:22       ` Heiko Stübner
  2015-11-19 16:52       ` Wei Xu
                         ` (9 subsequent siblings)
  13 siblings, 0 replies; 24+ messages in thread
From: Heiko Stübner @ 2015-11-18 11:22 UTC (permalink / raw)
  To: Masahiro Yamada
  Cc: Mark Rutland, Andrew Lunn, Krzysztof Kozlowski,
	kernel-F5mvAk5X5gdBDgjK7y7TUQ, linux-sh-u79uwXL29TY76Z2rM5mHXA,
	Brian Norris, Linus Walleij, Will Deacon,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA, Matthias Brugger,
	Chen-Yu Tsai, Thierry Reding, Shawn Guo, Alexandre Courbot,
	linux-samsung-soc-u79uwXL29TY76Z2rM5mHXA, Florian Fainelli,
	Russell King, Emilio López, Viresh Kumar, Stephen Warren,
	Magnus Damm, Michal Simek, Wei Xu, Maxime Ripard

Am Sonntag, 15. November 2015, 10:39:53 schrieb Masahiro Yamada:
> 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-uWyLwvC0a2jby3iVrkZq2A@public.gmane.org>
> Acked-by: Krzysztof Kozlowski <k.kozlowski-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
> Acked-by: Maxime Ripard <maxime.ripard-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org>
> Acked-by: Moritz Fischer <moritz.fischer-+aYTwkv1SeIAvxtiuMwx3w@public.gmane.org>
> ---
> 

>  arch/arm/mach-rockchip/platsmp.c     | 2 +-

For the Rockchip-part

Acked-by: Heiko Stuebner <heiko-4mtYJXux2i+zQB+pC5nmwQ@public.gmane.org>

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [PATCH 1/2] ARM: hisi: do not export smp_operations structures
  2015-11-15  1:39   ` Masahiro Yamada
@ 2015-11-19 16:50     ` Wei Xu
  -1 siblings, 0 replies; 24+ messages in thread
From: Wei Xu @ 2015-11-19 16:50 UTC (permalink / raw)
  To: Masahiro Yamada, arm; +Cc: Russell King, linux-kernel, linux-arm-kernel


Hi Masahiro,

On 15/11/2015 01:39, Masahiro Yamada wrote:
> These three structures are only defined and referenced in
> mach-hisi/platsmp.c.
> 
> Drop the declarations from the header and add static qualifier
> to the definitions.
> 
> Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
> ---

Thanks!
Acked-by: Wei Xu <xuwei5@hisilicon.com>

Best Regards,
Wei


^ permalink raw reply	[flat|nested] 24+ messages in thread

* [PATCH 1/2] ARM: hisi: do not export smp_operations structures
@ 2015-11-19 16:50     ` Wei Xu
  0 siblings, 0 replies; 24+ messages in thread
From: Wei Xu @ 2015-11-19 16:50 UTC (permalink / raw)
  To: linux-arm-kernel


Hi Masahiro,

On 15/11/2015 01:39, Masahiro Yamada wrote:
> These three structures are only defined and referenced in
> mach-hisi/platsmp.c.
> 
> Drop the declarations from the header and add static qualifier
> to the definitions.
> 
> Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
> ---

Thanks!
Acked-by: Wei Xu <xuwei5@hisilicon.com>

Best Regards,
Wei

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [PATCH 2/2] ARM: use const and __initconst for smp_operations
       [not found]     ` <1447551593-22246-3-git-send-email-yamada.masahiro-uWyLwvC0a2jby3iVrkZq2A@public.gmane.org>
                         ` (3 preceding siblings ...)
  2015-11-18 11:22       ` Heiko Stübner
@ 2015-11-19 16:52       ` Wei Xu
  2015-11-19 19:16       ` Florian Fainelli
                         ` (8 subsequent siblings)
  13 siblings, 0 replies; 24+ messages in thread
From: Wei Xu @ 2015-11-19 16:52 UTC (permalink / raw)
  To: Masahiro Yamada, arm-DgEjT+Ai2ygdnm+yROfE0A
  Cc: Mark Rutland, Andrew Lunn, Krzysztof Kozlowski,
	kernel-F5mvAk5X5gdBDgjK7y7TUQ, linux-sh-u79uwXL29TY76Z2rM5mHXA,
	Brian Norris, Linus Walleij, Will Deacon,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA, Matthias Brugger,
	Chen-Yu Tsai, Thierry Reding, Shawn Guo, Heiko Stuebner,
	Alexandre Courbot, linux-samsung-soc-u79uwXL29TY76Z2rM5mHXA,
	Florian Fainelli, Russell King, Emilio López, Viresh Kumar,
	Stephen Warren, Magnus Damm, Michal Simek

Hi Masahiro,

On 15/11/2015 01:39, 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-uWyLwvC0a2jby3iVrkZq2A@public.gmane.org>
> Acked-by: Krzysztof Kozlowski <k.kozlowski-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
> Acked-by: Maxime Ripard <maxime.ripard-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org>
> Acked-by: Moritz Fischer <moritz.fischer-+aYTwkv1SeIAvxtiuMwx3w@public.gmane.org>
> ---
> 
>  arch/arm/mach-hisi/platmcpm.c        | 2 +-
>  arch/arm/mach-hisi/platsmp.c         | 6 +++---


Thanks!
For the Hisilicon part,
Acked-by: Wei Xu <xuwei5-C8/M+/jPZTeaMJb+Lgu22Q@public.gmane.org>

Best Regards,
Wei

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [PATCH 2/2] ARM: use const and __initconst for smp_operations
       [not found]     ` <1447551593-22246-3-git-send-email-yamada.masahiro-uWyLwvC0a2jby3iVrkZq2A@public.gmane.org>
                         ` (4 preceding siblings ...)
  2015-11-19 16:52       ` Wei Xu
@ 2015-11-19 19:16       ` Florian Fainelli
  2015-11-23 17:02       ` Gregory CLEMENT
                         ` (7 subsequent siblings)
  13 siblings, 0 replies; 24+ messages in thread
From: Florian Fainelli @ 2015-11-19 19:16 UTC (permalink / raw)
  To: Masahiro Yamada, arm-DgEjT+Ai2ygdnm+yROfE0A
  Cc: Mark Rutland, Andrew Lunn, Krzysztof Kozlowski,
	kernel-F5mvAk5X5gdBDgjK7y7TUQ, linux-sh-u79uwXL29TY76Z2rM5mHXA,
	Brian Norris, Linus Walleij, Will Deacon,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA, Matthias Brugger,
	Chen-Yu Tsai, Thierry Reding, Shawn Guo, Heiko Stuebner,
	Alexandre Courbot, linux-samsung-soc-u79uwXL29TY76Z2rM5mHXA,
	Florian Fainelli, Russell King, Emilio López, Viresh Kumar,
	Stephen Warren, Magnus Damm, Michal Simek, Wei Xu

On 14/11/15 17:39, 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-uWyLwvC0a2jby3iVrkZq2A@public.gmane.org>
> Acked-by: Krzysztof Kozlowski <k.kozlowski-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
> Acked-by: Maxime Ripard <maxime.ripard-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org>
> Acked-by: Moritz Fischer <moritz.fischer-+aYTwkv1SeIAvxtiuMwx3w@public.gmane.org>
> ---

>  arch/arm/mach-bcm/bcm63xx_smp.c      | 2 +-
>  arch/arm/mach-bcm/kona_smp.c         | 2 +-
>  arch/arm/mach-bcm/platsmp-brcmstb.c  | 2 +-

> -struct smp_operations bcm63138_smp_ops __initdata = {
> +static const struct smp_operations bcm63138_smp_ops __initconst = {
>  	.smp_prepare_cpus	= bcm63138_smp_prepare_cpus,
>  	.smp_boot_secondary	= bcm63138_smp_boot_secondary,
>  };
> diff --git a/arch/arm/mach-bcm/kona_smp.c b/arch/arm/mach-bcm/kona_smp.c
> index 66a0465..da8328b 100644
> --- a/arch/arm/mach-bcm/kona_smp.c
> +++ b/arch/arm/mach-bcm/kona_smp.c
> @@ -194,7 +194,7 @@ static int bcm_boot_secondary(unsigned int cpu, struct task_struct *idle)
>  	return -ENOSYS;
>  }
>  
> -static struct smp_operations bcm_smp_ops __initdata = {
> +static const struct smp_operations bcm_smp_ops __initconst = {
>  	.smp_prepare_cpus	= bcm_smp_prepare_cpus,
>  	.smp_boot_secondary	= bcm_boot_secondary,
>  };
> diff --git a/arch/arm/mach-bcm/platsmp-brcmstb.c b/arch/arm/mach-bcm/platsmp-brcmstb.c
> index 44d6bddf..40dc844 100644
> --- a/arch/arm/mach-bcm/platsmp-brcmstb.c
> +++ b/arch/arm/mach-bcm/platsmp-brcmstb.c
> @@ -356,7 +356,7 @@ static int brcmstb_boot_secondary(unsigned int cpu, struct task_struct *idle)
>  	return 0;
>  }
>  
> -static struct smp_operations brcmstb_smp_ops __initdata = {
> +static const struct smp_operations brcmstb_smp_ops __initconst = {
>  	.smp_prepare_cpus	= brcmstb_cpu_ctrl_setup,
>  	.smp_boot_secondary	= brcmstb_boot_secondary,
>  #ifdef CONFIG_HOTPLUG_CPU

For the Broadcom SoCs:

Acked-by: Florian Fainelli <f.fainelli-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>

-- 
Florian

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [PATCH 2/2] ARM: use const and __initconst for smp_operations
  2015-11-15  1:39   ` [PATCH 2/2] ARM: use const and __initconst for smp_operations Masahiro Yamada
@ 2015-11-19 19:58       ` Sebastian Hesselbarth
  2015-11-19 19:58       ` Sebastian Hesselbarth
  1 sibling, 0 replies; 24+ messages in thread
From: Sebastian Hesselbarth @ 2015-11-19 19:58 UTC (permalink / raw)
  To: Masahiro Yamada; +Cc: linux-arm-kernel, linux-kernel

On 15.11.2015 02:39, 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@socionext.com>

> ---
[...]
>  arch/arm/mach-berlin/platsmp.c       | 2 +-
[...]
>  54 files changed, 64 insertions(+), 64 deletions(-)

For berlin,

Acked-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>



^ permalink raw reply	[flat|nested] 24+ messages in thread

* [PATCH 2/2] ARM: use const and __initconst for smp_operations
@ 2015-11-19 19:58       ` Sebastian Hesselbarth
  0 siblings, 0 replies; 24+ messages in thread
From: Sebastian Hesselbarth @ 2015-11-19 19:58 UTC (permalink / raw)
  To: linux-arm-kernel

On 15.11.2015 02:39, 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@socionext.com>

> ---
[...]
>  arch/arm/mach-berlin/platsmp.c       | 2 +-
[...]
>  54 files changed, 64 insertions(+), 64 deletions(-)

For berlin,

Acked-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [PATCH 2/2] ARM: use const and __initconst for smp_operations
       [not found]     ` <1447551593-22246-3-git-send-email-yamada.masahiro-uWyLwvC0a2jby3iVrkZq2A@public.gmane.org>
                         ` (5 preceding siblings ...)
  2015-11-19 19:16       ` Florian Fainelli
@ 2015-11-23 17:02       ` Gregory CLEMENT
  2015-11-23 20:33       ` Dinh Nguyen
                         ` (6 subsequent siblings)
  13 siblings, 0 replies; 24+ messages in thread
From: Gregory CLEMENT @ 2015-11-23 17:02 UTC (permalink / raw)
  To: Masahiro Yamada
  Cc: Mark Rutland, Andrew Lunn, Krzysztof Kozlowski,
	kernel-F5mvAk5X5gdBDgjK7y7TUQ, linux-sh-u79uwXL29TY76Z2rM5mHXA,
	Brian Norris, Linus Walleij, Will Deacon,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA,
	linux-tegra-u79uwXL29TY76Z2rM5mHXA, Chen-Yu Tsai, Thierry Reding,
	Shawn Guo, Heiko Stuebner, Alexandre Courbot,
	linux-samsung-soc-u79uwXL29TY76Z2rM5mHXA, Florian Fainelli,
	Russell King, Emilio López, Viresh Kumar, Stephen Warren,
	Magnus Damm, Michal Simek, Wei Xu

Hi Masahiro Yamada,
 
 On dim., nov. 15 2015, Masahiro Yamada <yamada.masahiro-uWyLwvC0a2jby3iVrkZq2A@public.gmane.org> 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-uWyLwvC0a2jby3iVrkZq2A@public.gmane.org>
> Acked-by: Krzysztof Kozlowski <k.kozlowski-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
> Acked-by: Maxime Ripard <maxime.ripard-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org>
> Acked-by: Moritz Fischer <moritz.fischer-+aYTwkv1SeIAvxtiuMwx3w@public.gmane.org>
> ---
>

>  arch/arm/mach-mvebu/armada-370-xp.h  | 2 +-
>  arch/arm/mach-mvebu/platsmp-a9.c     | 4 ++--
>  arch/arm/mach-mvebu/platsmp.c        | 2 +-

For mvebu:
Acked-by: Gregory CLEMENT <gregory.clement-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org>

Thanks,

Gregory

-- 
Gregory Clement, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [PATCH 2/2] ARM: use const and __initconst for smp_operations
       [not found]     ` <1447551593-22246-3-git-send-email-yamada.masahiro-uWyLwvC0a2jby3iVrkZq2A@public.gmane.org>
                         ` (6 preceding siblings ...)
  2015-11-23 17:02       ` Gregory CLEMENT
@ 2015-11-23 20:33       ` Dinh Nguyen
  2015-11-24  8:56       ` Shawn Guo
                         ` (5 subsequent siblings)
  13 siblings, 0 replies; 24+ messages in thread
From: Dinh Nguyen @ 2015-11-23 20:33 UTC (permalink / raw)
  To: Masahiro Yamada, arm-DgEjT+Ai2ygdnm+yROfE0A
  Cc: Mark Rutland, Andrew Lunn, Krzysztof Kozlowski,
	kernel-F5mvAk5X5gdBDgjK7y7TUQ, linux-sh-u79uwXL29TY76Z2rM5mHXA,
	Brian Norris, Linus Walleij, Will Deacon,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA, Matthias Brugger,
	Chen-Yu Tsai, Thierry Reding, Shawn Guo, Heiko Stuebner,
	Alexandre Courbot, linux-samsung-soc-u79uwXL29TY76Z2rM5mHXA,
	Florian Fainelli, Russell King, Emilio López, Viresh Kumar,
	Stephen Warren, Magnus Damm, Michal Simek, Wei Xu

On 11/14/2015 07:39 PM, 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-uWyLwvC0a2jby3iVrkZq2A@public.gmane.org>
> Acked-by: Krzysztof Kozlowski <k.kozlowski-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
> Acked-by: Maxime Ripard <maxime.ripard-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org>
> Acked-by: Moritz Fischer <moritz.fischer-+aYTwkv1SeIAvxtiuMwx3w@public.gmane.org>
> ---

>  arch/arm/mach-socfpga/platsmp.c      | 4 ++--

Acked-by: Dinh Nguyen <dinguyen-yzvPICuk2ABMcg4IHK0kFoH6Mc4MB0Vx@public.gmane.org>

Thanks,
Dinh

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [PATCH 2/2] ARM: use const and __initconst for smp_operations
       [not found]     ` <1447551593-22246-3-git-send-email-yamada.masahiro-uWyLwvC0a2jby3iVrkZq2A@public.gmane.org>
                         ` (7 preceding siblings ...)
  2015-11-23 20:33       ` Dinh Nguyen
@ 2015-11-24  8:56       ` Shawn Guo
  2015-11-24  9:25       ` Matthias Brugger
                         ` (4 subsequent siblings)
  13 siblings, 0 replies; 24+ messages in thread
From: Shawn Guo @ 2015-11-24  8:56 UTC (permalink / raw)
  To: Masahiro Yamada
  Cc: Mark Rutland, Andrew Lunn, Krzysztof Kozlowski,
	kernel-F5mvAk5X5gdBDgjK7y7TUQ, linux-sh-u79uwXL29TY76Z2rM5mHXA,
	Brian Norris, Linus Walleij, Will Deacon,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA, Matthias Brugger,
	Chen-Yu Tsai, Thierry Reding, Lorenzo Pieralisi, Heiko Stuebner,
	Alexandre Courbot, linux-samsung-soc-u79uwXL29TY76Z2rM5mHXA,
	Florian Fainelli, Russell King, Emilio López, Viresh Kumar,
	Stephen Warren, Magnus Damm, Michal Simek

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-uWyLwvC0a2jby3iVrkZq2A@public.gmane.org>
> Acked-by: Krzysztof Kozlowski <k.kozlowski-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
> Acked-by: Maxime Ripard <maxime.ripard-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org>
> Acked-by: Moritz Fischer <moritz.fischer-+aYTwkv1SeIAvxtiuMwx3w@public.gmane.org>
> ---
...
>  arch/arm/mach-imx/common.h           | 4 ++--
>  arch/arm/mach-imx/platsmp.c          | 4 ++--

Acked-by: Shawn Guo <shawnguo-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [PATCH 2/2] ARM: use const and __initconst for smp_operations
       [not found]     ` <1447551593-22246-3-git-send-email-yamada.masahiro-uWyLwvC0a2jby3iVrkZq2A@public.gmane.org>
                         ` (8 preceding siblings ...)
  2015-11-24  8:56       ` Shawn Guo
@ 2015-11-24  9:25       ` Matthias Brugger
  2015-11-24 15:40       ` Thierry Reding
                         ` (3 subsequent siblings)
  13 siblings, 0 replies; 24+ messages in thread
From: Matthias Brugger @ 2015-11-24  9:25 UTC (permalink / raw)
  To: Masahiro Yamada, arm-DgEjT+Ai2ygdnm+yROfE0A
  Cc: Mark Rutland, Andrew Lunn, Krzysztof Kozlowski,
	kernel-F5mvAk5X5gdBDgjK7y7TUQ, linux-sh-u79uwXL29TY76Z2rM5mHXA,
	Brian Norris, Linus Walleij, Will Deacon,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA,
	linux-tegra-u79uwXL29TY76Z2rM5mHXA, Chen-Yu Tsai, Thierry Reding,
	Shawn Guo, Heiko Stuebner, Alexandre Courbot,
	linux-samsung-soc-u79uwXL29TY76Z2rM5mHXA, Florian Fainelli,
	Russell King, Emilio López, Viresh Kumar, Stephen Warren,
	Magnus Damm, Michal Simek, Wei Xu



On 15/11/15 02:39, 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-uWyLwvC0a2jby3iVrkZq2A@public.gmane.org>
> Acked-by: Krzysztof Kozlowski <k.kozlowski-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
> Acked-by: Maxime Ripard <maxime.ripard-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org>
> Acked-by: Moritz Fischer <moritz.fischer-+aYTwkv1SeIAvxtiuMwx3w@public.gmane.org>
> ---
>

[...]

>   arch/arm/mach-mediatek/platsmp.c     | 4 ++--

For mediatek:
Acked-by: Matthias Brugger <matthias.bgg-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [PATCH 2/2] ARM: use const and __initconst for smp_operations
       [not found]     ` <1447551593-22246-3-git-send-email-yamada.masahiro-uWyLwvC0a2jby3iVrkZq2A@public.gmane.org>
                         ` (9 preceding siblings ...)
  2015-11-24  9:25       ` Matthias Brugger
@ 2015-11-24 15:40       ` Thierry Reding
  2015-11-24 18:19       ` Nicolas Pitre
                         ` (2 subsequent siblings)
  13 siblings, 0 replies; 24+ messages in thread
From: Thierry Reding @ 2015-11-24 15:40 UTC (permalink / raw)
  To: Masahiro Yamada
  Cc: Mark Rutland, Andrew Lunn, Krzysztof Kozlowski,
	kernel-F5mvAk5X5gdBDgjK7y7TUQ, linux-sh-u79uwXL29TY76Z2rM5mHXA,
	Brian Norris, Linus Walleij, Will Deacon,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA, Matthias Brugger,
	Chen-Yu Tsai, Shawn Guo, Heiko Stuebner, Alexandre Courbot,
	linux-samsung-soc-u79uwXL29TY76Z2rM5mHXA, Florian Fainelli,
	Russell King, Emilio López, Viresh Kumar, Stephen Warren,
	Magnus Damm, Michal Simek, Wei Xu, Maxime Ripard


[-- Attachment #1.1: Type: text/plain, Size: 789 bytes --]

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-uWyLwvC0a2jby3iVrkZq2A@public.gmane.org>
> Acked-by: Krzysztof Kozlowski <k.kozlowski-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
> Acked-by: Maxime Ripard <maxime.ripard-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org>
> Acked-by: Moritz Fischer <moritz.fischer-+aYTwkv1SeIAvxtiuMwx3w@public.gmane.org>
> ---
[...]
>  arch/arm/mach-tegra/common.h         | 2 +-
>  arch/arm/mach-tegra/platsmp.c        | 2 +-

Acked-by: Thierry Reding <treding-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>

[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

[-- Attachment #2: Type: text/plain, Size: 200 bytes --]

_______________________________________________
Linux-mediatek mailing list
Linux-mediatek-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org
http://lists.infradead.org/mailman/listinfo/linux-mediatek

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [PATCH 2/2] ARM: use const and __initconst for smp_operations
       [not found]     ` <1447551593-22246-3-git-send-email-yamada.masahiro-uWyLwvC0a2jby3iVrkZq2A@public.gmane.org>
                         ` (10 preceding siblings ...)
  2015-11-24 15:40       ` Thierry Reding
@ 2015-11-24 18:19       ` Nicolas Pitre
  2015-11-24 18:34       ` Liviu Dudau
  2015-12-01  9:43       ` Linus Walleij
  13 siblings, 0 replies; 24+ messages in thread
From: Nicolas Pitre @ 2015-11-24 18:19 UTC (permalink / raw)
  To: Masahiro Yamada
  Cc: Mark Rutland, Andrew Lunn, Krzysztof Kozlowski,
	kernel-F5mvAk5X5gdBDgjK7y7TUQ, linux-sh-u79uwXL29TY76Z2rM5mHXA,
	Brian Norris, Linus Walleij, Will Deacon,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA, Matthias Brugger,
	Chen-Yu Tsai, Thierry Reding, Shawn Guo, Heiko Stuebner,
	Alexandre Courbot, linux-samsung-soc-u79uwXL29TY76Z2rM5mHXA,
	Florian Fainelli, Russell King, Emilio López, Viresh Kumar,
	Stephen Warren, Magnus Damm, Michal Simek, Wei Xu

On Sun, 15 Nov 2015, 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-uWyLwvC0a2jby3iVrkZq2A@public.gmane.org>
> Acked-by: Krzysztof Kozlowski <k.kozlowski-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
> Acked-by: Maxime Ripard <maxime.ripard-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org>
> Acked-by: Moritz Fischer <moritz.fischer-+aYTwkv1SeIAvxtiuMwx3w@public.gmane.org>
> ---

Tested with LTO which is rather picky about those things.

Acked-by: Nicolas Pitre <nico-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>

>  arch/arm/common/mcpm_platsmp.c       | 2 +-
>  arch/arm/include/asm/psci.h          | 2 +-
>  arch/arm/kernel/psci_smp.c           | 2 +-
>  arch/arm/mach-alpine/platsmp.c       | 2 +-
>  arch/arm/mach-axxia/platsmp.c        | 2 +-
>  arch/arm/mach-bcm/bcm63xx_smp.c      | 2 +-
>  arch/arm/mach-bcm/kona_smp.c         | 2 +-
>  arch/arm/mach-bcm/platsmp-brcmstb.c  | 2 +-
>  arch/arm/mach-berlin/platsmp.c       | 2 +-
>  arch/arm/mach-exynos/common.h        | 2 +-
>  arch/arm/mach-exynos/platsmp.c       | 2 +-
>  arch/arm/mach-hisi/platmcpm.c        | 2 +-
>  arch/arm/mach-hisi/platsmp.c         | 6 +++---
>  arch/arm/mach-imx/common.h           | 4 ++--
>  arch/arm/mach-imx/platsmp.c          | 4 ++--
>  arch/arm/mach-keystone/keystone.h    | 2 +-
>  arch/arm/mach-keystone/platsmp.c     | 2 +-
>  arch/arm/mach-mediatek/platsmp.c     | 4 ++--
>  arch/arm/mach-mvebu/armada-370-xp.h  | 2 +-
>  arch/arm/mach-mvebu/platsmp-a9.c     | 4 ++--
>  arch/arm/mach-mvebu/platsmp.c        | 2 +-
>  arch/arm/mach-omap2/common.h         | 2 +-
>  arch/arm/mach-omap2/omap-smp.c       | 2 +-
>  arch/arm/mach-prima2/common.h        | 2 +-
>  arch/arm/mach-prima2/platsmp.c       | 2 +-
>  arch/arm/mach-qcom/platsmp.c         | 6 +++---
>  arch/arm/mach-realview/core.h        | 2 +-
>  arch/arm/mach-realview/platsmp.c     | 2 +-
>  arch/arm/mach-rockchip/platsmp.c     | 2 +-
>  arch/arm/mach-shmobile/r8a7779.h     | 2 +-
>  arch/arm/mach-shmobile/r8a7790.h     | 2 +-
>  arch/arm/mach-shmobile/r8a7791.h     | 2 +-
>  arch/arm/mach-shmobile/setup-emev2.c | 2 +-
>  arch/arm/mach-shmobile/sh73a0.h      | 2 +-
>  arch/arm/mach-shmobile/smp-emev2.c   | 2 +-
>  arch/arm/mach-shmobile/smp-r8a7779.c | 2 +-
>  arch/arm/mach-shmobile/smp-r8a7790.c | 2 +-
>  arch/arm/mach-shmobile/smp-r8a7791.c | 2 +-
>  arch/arm/mach-shmobile/smp-sh73a0.c  | 2 +-
>  arch/arm/mach-socfpga/platsmp.c      | 4 ++--
>  arch/arm/mach-spear/generic.h        | 2 +-
>  arch/arm/mach-spear/platsmp.c        | 2 +-
>  arch/arm/mach-sti/platsmp.c          | 2 +-
>  arch/arm/mach-sti/smp.h              | 2 +-
>  arch/arm/mach-sunxi/platsmp.c        | 4 ++--
>  arch/arm/mach-tegra/common.h         | 2 +-
>  arch/arm/mach-tegra/platsmp.c        | 2 +-
>  arch/arm/mach-uniphier/platsmp.c     | 2 +-
>  arch/arm/mach-ux500/platsmp.c        | 2 +-
>  arch/arm/mach-vexpress/core.h        | 2 +-
>  arch/arm/mach-vexpress/platsmp.c     | 2 +-
>  arch/arm/mach-zx/platsmp.c           | 2 +-
>  arch/arm/mach-zynq/common.h          | 2 +-
>  arch/arm/mach-zynq/platsmp.c         | 2 +-
>  54 files changed, 64 insertions(+), 64 deletions(-)
> 
> diff --git a/arch/arm/common/mcpm_platsmp.c b/arch/arm/common/mcpm_platsmp.c
> index 2b25b60..c773157 100644
> --- a/arch/arm/common/mcpm_platsmp.c
> +++ b/arch/arm/common/mcpm_platsmp.c
> @@ -83,7 +83,7 @@ static void mcpm_cpu_die(unsigned int cpu)
>  
>  #endif
>  
> -static struct smp_operations __initdata mcpm_smp_ops = {
> +static const struct smp_operations mcpm_smp_ops __initconst = {
>  	.smp_boot_secondary	= mcpm_boot_secondary,
>  	.smp_secondary_init	= mcpm_secondary_init,
>  #ifdef CONFIG_HOTPLUG_CPU
> diff --git a/arch/arm/include/asm/psci.h b/arch/arm/include/asm/psci.h
> index 68ee3ce..97735a8 100644
> --- a/arch/arm/include/asm/psci.h
> +++ b/arch/arm/include/asm/psci.h
> @@ -14,7 +14,7 @@
>  #ifndef __ASM_ARM_PSCI_H
>  #define __ASM_ARM_PSCI_H
>  
> -extern struct smp_operations psci_smp_ops;
> +extern const struct smp_operations psci_smp_ops;
>  
>  #ifdef CONFIG_ARM_PSCI
>  bool psci_smp_available(void);
> diff --git a/arch/arm/kernel/psci_smp.c b/arch/arm/kernel/psci_smp.c
> index 9d479b2..cb3fcae 100644
> --- a/arch/arm/kernel/psci_smp.c
> +++ b/arch/arm/kernel/psci_smp.c
> @@ -120,7 +120,7 @@ bool __init psci_smp_available(void)
>  	return (psci_ops.cpu_on != NULL);
>  }
>  
> -struct smp_operations __initdata psci_smp_ops = {
> +const struct smp_operations psci_smp_ops __initconst = {
>  	.smp_boot_secondary	= psci_boot_secondary,
>  #ifdef CONFIG_HOTPLUG_CPU
>  	.cpu_disable		= psci_cpu_disable,
> diff --git a/arch/arm/mach-alpine/platsmp.c b/arch/arm/mach-alpine/platsmp.c
> index f78429f..dd77ea2 100644
> --- a/arch/arm/mach-alpine/platsmp.c
> +++ b/arch/arm/mach-alpine/platsmp.c
> @@ -42,7 +42,7 @@ static void __init alpine_smp_prepare_cpus(unsigned int max_cpus)
>  	alpine_cpu_pm_init();
>  }
>  
> -static struct smp_operations alpine_smp_ops __initdata = {
> +static const struct smp_operations alpine_smp_ops __initconst = {
>  	.smp_prepare_cpus	= alpine_smp_prepare_cpus,
>  	.smp_boot_secondary	= alpine_boot_secondary,
>  };
> diff --git a/arch/arm/mach-axxia/platsmp.c b/arch/arm/mach-axxia/platsmp.c
> index 959d4df..ffbd71d 100644
> --- a/arch/arm/mach-axxia/platsmp.c
> +++ b/arch/arm/mach-axxia/platsmp.c
> @@ -82,7 +82,7 @@ static void __init axxia_smp_prepare_cpus(unsigned int max_cpus)
>  	}
>  }
>  
> -static struct smp_operations axxia_smp_ops __initdata = {
> +static const struct smp_operations axxia_smp_ops __initconst = {
>  	.smp_prepare_cpus	= axxia_smp_prepare_cpus,
>  	.smp_boot_secondary	= axxia_boot_secondary,
>  };
> diff --git a/arch/arm/mach-bcm/bcm63xx_smp.c b/arch/arm/mach-bcm/bcm63xx_smp.c
> index 19be904..9b6727e 100644
> --- a/arch/arm/mach-bcm/bcm63xx_smp.c
> +++ b/arch/arm/mach-bcm/bcm63xx_smp.c
> @@ -161,7 +161,7 @@ static void __init bcm63138_smp_prepare_cpus(unsigned int max_cpus)
>  	}
>  }
>  
> -struct smp_operations bcm63138_smp_ops __initdata = {
> +static const struct smp_operations bcm63138_smp_ops __initconst = {
>  	.smp_prepare_cpus	= bcm63138_smp_prepare_cpus,
>  	.smp_boot_secondary	= bcm63138_smp_boot_secondary,
>  };
> diff --git a/arch/arm/mach-bcm/kona_smp.c b/arch/arm/mach-bcm/kona_smp.c
> index 66a0465..da8328b 100644
> --- a/arch/arm/mach-bcm/kona_smp.c
> +++ b/arch/arm/mach-bcm/kona_smp.c
> @@ -194,7 +194,7 @@ static int bcm_boot_secondary(unsigned int cpu, struct task_struct *idle)
>  	return -ENOSYS;
>  }
>  
> -static struct smp_operations bcm_smp_ops __initdata = {
> +static const struct smp_operations bcm_smp_ops __initconst = {
>  	.smp_prepare_cpus	= bcm_smp_prepare_cpus,
>  	.smp_boot_secondary	= bcm_boot_secondary,
>  };
> diff --git a/arch/arm/mach-bcm/platsmp-brcmstb.c b/arch/arm/mach-bcm/platsmp-brcmstb.c
> index 44d6bddf..40dc844 100644
> --- a/arch/arm/mach-bcm/platsmp-brcmstb.c
> +++ b/arch/arm/mach-bcm/platsmp-brcmstb.c
> @@ -356,7 +356,7 @@ static int brcmstb_boot_secondary(unsigned int cpu, struct task_struct *idle)
>  	return 0;
>  }
>  
> -static struct smp_operations brcmstb_smp_ops __initdata = {
> +static const struct smp_operations brcmstb_smp_ops __initconst = {
>  	.smp_prepare_cpus	= brcmstb_cpu_ctrl_setup,
>  	.smp_boot_secondary	= brcmstb_boot_secondary,
>  #ifdef CONFIG_HOTPLUG_CPU
> diff --git a/arch/arm/mach-berlin/platsmp.c b/arch/arm/mach-berlin/platsmp.c
> index 405cd37..93f9068 100644
> --- a/arch/arm/mach-berlin/platsmp.c
> +++ b/arch/arm/mach-berlin/platsmp.c
> @@ -119,7 +119,7 @@ static int berlin_cpu_kill(unsigned int cpu)
>  }
>  #endif
>  
> -static struct smp_operations berlin_smp_ops __initdata = {
> +static const struct smp_operations berlin_smp_ops __initconst = {
>  	.smp_prepare_cpus	= berlin_smp_prepare_cpus,
>  	.smp_boot_secondary	= berlin_boot_secondary,
>  #ifdef CONFIG_HOTPLUG_CPU
> diff --git a/arch/arm/mach-exynos/common.h b/arch/arm/mach-exynos/common.h
> index 1534925..e349a03 100644
> --- a/arch/arm/mach-exynos/common.h
> +++ b/arch/arm/mach-exynos/common.h
> @@ -149,7 +149,7 @@ static inline void exynos_pm_init(void) {}
>  extern void exynos_cpu_resume(void);
>  extern void exynos_cpu_resume_ns(void);
>  
> -extern struct smp_operations exynos_smp_ops;
> +extern const struct smp_operations exynos_smp_ops;
>  
>  extern void exynos_cpu_power_down(int cpu);
>  extern void exynos_cpu_power_up(int cpu);
> diff --git a/arch/arm/mach-exynos/platsmp.c b/arch/arm/mach-exynos/platsmp.c
> index 98a2c0c..5bd9559 100644
> --- a/arch/arm/mach-exynos/platsmp.c
> +++ b/arch/arm/mach-exynos/platsmp.c
> @@ -479,7 +479,7 @@ static void exynos_cpu_die(unsigned int cpu)
>  }
>  #endif /* CONFIG_HOTPLUG_CPU */
>  
> -struct smp_operations exynos_smp_ops __initdata = {
> +const struct smp_operations exynos_smp_ops __initconst = {
>  	.smp_init_cpus		= exynos_smp_init_cpus,
>  	.smp_prepare_cpus	= exynos_smp_prepare_cpus,
>  	.smp_secondary_init	= exynos_secondary_init,
> diff --git a/arch/arm/mach-hisi/platmcpm.c b/arch/arm/mach-hisi/platmcpm.c
> index b5f8f5f..4b653a8 100644
> --- a/arch/arm/mach-hisi/platmcpm.c
> +++ b/arch/arm/mach-hisi/platmcpm.c
> @@ -239,7 +239,7 @@ err:
>  }
>  #endif
>  
> -static struct smp_operations __initdata hip04_smp_ops = {
> +static const struct smp_operations hip04_smp_ops __initconst = {
>  	.smp_boot_secondary	= hip04_boot_secondary,
>  #ifdef CONFIG_HOTPLUG_CPU
>  	.cpu_die		= hip04_cpu_die,
> diff --git a/arch/arm/mach-hisi/platsmp.c b/arch/arm/mach-hisi/platsmp.c
> index 3c5237d..47ed32c 100644
> --- a/arch/arm/mach-hisi/platsmp.c
> +++ b/arch/arm/mach-hisi/platsmp.c
> @@ -89,7 +89,7 @@ static int hi3xxx_boot_secondary(unsigned int cpu, struct task_struct *idle)
>  	return 0;
>  }
>  
> -static struct smp_operations hi3xxx_smp_ops __initdata = {
> +static const struct smp_operations hi3xxx_smp_ops __initconst = {
>  	.smp_prepare_cpus	= hi3xxx_smp_prepare_cpus,
>  	.smp_boot_secondary	= hi3xxx_boot_secondary,
>  #ifdef CONFIG_HOTPLUG_CPU
> @@ -126,7 +126,7 @@ static int hix5hd2_boot_secondary(unsigned int cpu, struct task_struct *idle)
>  }
>  
>  
> -static struct smp_operations hix5hd2_smp_ops __initdata = {
> +static const struct smp_operations hix5hd2_smp_ops __initconst = {
>  	.smp_prepare_cpus	= hisi_common_smp_prepare_cpus,
>  	.smp_boot_secondary	= hix5hd2_boot_secondary,
>  #ifdef CONFIG_HOTPLUG_CPU
> @@ -176,7 +176,7 @@ static int hip01_boot_secondary(unsigned int cpu, struct task_struct *idle)
>  	return 0;
>  }
>  
> -static struct smp_operations hip01_smp_ops __initdata = {
> +static const struct smp_operations hip01_smp_ops __initconst = {
>  	.smp_prepare_cpus       = hisi_common_smp_prepare_cpus,
>  	.smp_boot_secondary     = hip01_boot_secondary,
>  };
> diff --git a/arch/arm/mach-imx/common.h b/arch/arm/mach-imx/common.h
> index e2d5383..32b83f0 100644
> --- a/arch/arm/mach-imx/common.h
> +++ b/arch/arm/mach-imx/common.h
> @@ -153,7 +153,7 @@ void imx_init_l2cache(void);
>  static inline void imx_init_l2cache(void) {}
>  #endif
>  
> -extern struct smp_operations imx_smp_ops;
> -extern struct smp_operations ls1021a_smp_ops;
> +extern const struct smp_operations imx_smp_ops;
> +extern const struct smp_operations ls1021a_smp_ops;
>  
>  #endif
> diff --git a/arch/arm/mach-imx/platsmp.c b/arch/arm/mach-imx/platsmp.c
> index 7f27001..711dbbd 100644
> --- a/arch/arm/mach-imx/platsmp.c
> +++ b/arch/arm/mach-imx/platsmp.c
> @@ -88,7 +88,7 @@ static void __init imx_smp_prepare_cpus(unsigned int max_cpus)
>  	sync_cache_w(&g_diag_reg);
>  }
>  
> -struct smp_operations  imx_smp_ops __initdata = {
> +const struct smp_operations imx_smp_ops __initconst = {
>  	.smp_init_cpus		= imx_smp_init_cpus,
>  	.smp_prepare_cpus	= imx_smp_prepare_cpus,
>  	.smp_boot_secondary	= imx_boot_secondary,
> @@ -123,7 +123,7 @@ static void __init ls1021a_smp_prepare_cpus(unsigned int max_cpus)
>  	iounmap(dcfg_base);
>  }
>  
> -struct smp_operations  ls1021a_smp_ops __initdata = {
> +const struct smp_operations ls1021a_smp_ops __initconst = {
>  	.smp_prepare_cpus	= ls1021a_smp_prepare_cpus,
>  	.smp_boot_secondary	= ls1021a_boot_secondary,
>  };
> diff --git a/arch/arm/mach-keystone/keystone.h b/arch/arm/mach-keystone/keystone.h
> index cd04a1c..33eaa03 100644
> --- a/arch/arm/mach-keystone/keystone.h
> +++ b/arch/arm/mach-keystone/keystone.h
> @@ -15,7 +15,7 @@
>  
>  #ifndef __ASSEMBLER__
>  
> -extern struct smp_operations keystone_smp_ops;
> +extern const struct smp_operations keystone_smp_ops;
>  extern void secondary_startup(void);
>  extern u32 keystone_cpu_smc(u32 command, u32 cpu, u32 addr);
>  extern int keystone_pm_runtime_init(void);
> diff --git a/arch/arm/mach-keystone/platsmp.c b/arch/arm/mach-keystone/platsmp.c
> index 4bbb184..5665276 100644
> --- a/arch/arm/mach-keystone/platsmp.c
> +++ b/arch/arm/mach-keystone/platsmp.c
> @@ -39,6 +39,6 @@ static int keystone_smp_boot_secondary(unsigned int cpu,
>  	return error;
>  }
>  
> -struct smp_operations keystone_smp_ops __initdata = {
> +const struct smp_operations keystone_smp_ops __initconst = {
>  	.smp_boot_secondary	= keystone_smp_boot_secondary,
>  };
> diff --git a/arch/arm/mach-mediatek/platsmp.c b/arch/arm/mach-mediatek/platsmp.c
> index 8141f3f..a1b07ee 100644
> --- a/arch/arm/mach-mediatek/platsmp.c
> +++ b/arch/arm/mach-mediatek/platsmp.c
> @@ -128,13 +128,13 @@ static void __init mtk_smp_prepare_cpus(unsigned int max_cpus)
>  	__mtk_smp_prepare_cpus(max_cpus, 0);
>  }
>  
> -static struct smp_operations mt81xx_tz_smp_ops __initdata = {
> +static const struct smp_operations mt81xx_tz_smp_ops __initconst = {
>  	.smp_prepare_cpus = mtk_tz_smp_prepare_cpus,
>  	.smp_boot_secondary = mtk_boot_secondary,
>  };
>  CPU_METHOD_OF_DECLARE(mt81xx_tz_smp, "mediatek,mt81xx-tz-smp", &mt81xx_tz_smp_ops);
>  
> -static struct smp_operations mt6589_smp_ops __initdata = {
> +static const struct smp_operations mt6589_smp_ops __initconst = {
>  	.smp_prepare_cpus = mtk_smp_prepare_cpus,
>  	.smp_boot_secondary = mtk_boot_secondary,
>  };
> diff --git a/arch/arm/mach-mvebu/armada-370-xp.h b/arch/arm/mach-mvebu/armada-370-xp.h
> index c55bbf8..09413b6 100644
> --- a/arch/arm/mach-mvebu/armada-370-xp.h
> +++ b/arch/arm/mach-mvebu/armada-370-xp.h
> @@ -17,7 +17,7 @@
>  
>  #ifdef CONFIG_SMP
>  void armada_xp_secondary_startup(void);
> -extern struct smp_operations armada_xp_smp_ops;
> +extern const struct smp_operations armada_xp_smp_ops;
>  #endif
>  
>  #endif /* __MACH_ARMADA_370_XP_H */
> diff --git a/arch/arm/mach-mvebu/platsmp-a9.c b/arch/arm/mach-mvebu/platsmp-a9.c
> index 3d50004..d715dec 100644
> --- a/arch/arm/mach-mvebu/platsmp-a9.c
> +++ b/arch/arm/mach-mvebu/platsmp-a9.c
> @@ -93,11 +93,11 @@ static int armada_38x_cpu_kill(unsigned int cpu)
>  }
>  #endif
>  
> -static struct smp_operations mvebu_cortex_a9_smp_ops __initdata = {
> +static const struct smp_operations mvebu_cortex_a9_smp_ops __initconst = {
>  	.smp_boot_secondary	= mvebu_cortex_a9_boot_secondary,
>  };
>  
> -static struct smp_operations armada_38x_smp_ops __initdata = {
> +static const struct smp_operations armada_38x_smp_ops __initconst = {
>  	.smp_boot_secondary	= mvebu_cortex_a9_boot_secondary,
>  	.smp_secondary_init     = armada_38x_secondary_init,
>  #ifdef CONFIG_HOTPLUG_CPU
> diff --git a/arch/arm/mach-mvebu/platsmp.c b/arch/arm/mach-mvebu/platsmp.c
> index 58cc8c1..f9597b7 100644
> --- a/arch/arm/mach-mvebu/platsmp.c
> +++ b/arch/arm/mach-mvebu/platsmp.c
> @@ -170,7 +170,7 @@ static int armada_xp_cpu_kill(unsigned int cpu)
>  }
>  #endif
>  
> -struct smp_operations armada_xp_smp_ops __initdata = {
> +const struct smp_operations armada_xp_smp_ops __initconst = {
>  	.smp_init_cpus		= armada_xp_smp_init_cpus,
>  	.smp_prepare_cpus	= armada_xp_smp_prepare_cpus,
>  	.smp_boot_secondary	= armada_xp_boot_secondary,
> diff --git a/arch/arm/mach-omap2/common.h b/arch/arm/mach-omap2/common.h
> index 0cba957..f7666b9 100644
> --- a/arch/arm/mach-omap2/common.h
> +++ b/arch/arm/mach-omap2/common.h
> @@ -270,7 +270,7 @@ extern u32 omap_read_auxcoreboot0(void);
>  
>  extern void omap4_cpu_die(unsigned int cpu);
>  
> -extern struct smp_operations omap4_smp_ops;
> +extern const struct smp_operations omap4_smp_ops;
>  
>  extern void omap5_secondary_startup(void);
>  extern void omap5_secondary_hyp_startup(void);
> diff --git a/arch/arm/mach-omap2/omap-smp.c b/arch/arm/mach-omap2/omap-smp.c
> index 5305ec7..ddcd1d2 100644
> --- a/arch/arm/mach-omap2/omap-smp.c
> +++ b/arch/arm/mach-omap2/omap-smp.c
> @@ -241,7 +241,7 @@ static void __init omap4_smp_prepare_cpus(unsigned int max_cpus)
>  
>  }
>  
> -struct smp_operations omap4_smp_ops __initdata = {
> +const struct smp_operations omap4_smp_ops __initconst = {
>  	.smp_init_cpus		= omap4_smp_init_cpus,
>  	.smp_prepare_cpus	= omap4_smp_prepare_cpus,
>  	.smp_secondary_init	= omap4_secondary_init,
> diff --git a/arch/arm/mach-prima2/common.h b/arch/arm/mach-prima2/common.h
> index 3916a66..6d77b62 100644
> --- a/arch/arm/mach-prima2/common.h
> +++ b/arch/arm/mach-prima2/common.h
> @@ -15,7 +15,7 @@
>  #include <asm/mach/time.h>
>  #include <asm/exception.h>
>  
> -extern struct smp_operations   sirfsoc_smp_ops;
> +extern const struct smp_operations sirfsoc_smp_ops;
>  extern void sirfsoc_secondary_startup(void);
>  extern void sirfsoc_cpu_die(unsigned int cpu);
>  
> diff --git a/arch/arm/mach-prima2/platsmp.c b/arch/arm/mach-prima2/platsmp.c
> index e46c910..0875b99 100644
> --- a/arch/arm/mach-prima2/platsmp.c
> +++ b/arch/arm/mach-prima2/platsmp.c
> @@ -112,7 +112,7 @@ static int sirfsoc_boot_secondary(unsigned int cpu, struct task_struct *idle)
>  	return pen_release != -1 ? -ENOSYS : 0;
>  }
>  
> -struct smp_operations sirfsoc_smp_ops __initdata = {
> +const struct smp_operations sirfsoc_smp_ops __initconst = {
>  	.smp_secondary_init     = sirfsoc_secondary_init,
>  	.smp_boot_secondary     = sirfsoc_boot_secondary,
>  #ifdef CONFIG_HOTPLUG_CPU
> diff --git a/arch/arm/mach-qcom/platsmp.c b/arch/arm/mach-qcom/platsmp.c
> index 9b00123..5494c9e 100644
> --- a/arch/arm/mach-qcom/platsmp.c
> +++ b/arch/arm/mach-qcom/platsmp.c
> @@ -332,7 +332,7 @@ static void __init qcom_smp_prepare_cpus(unsigned int max_cpus)
>  	}
>  }
>  
> -static struct smp_operations smp_msm8660_ops __initdata = {
> +static const struct smp_operations smp_msm8660_ops __initconst = {
>  	.smp_prepare_cpus	= qcom_smp_prepare_cpus,
>  	.smp_secondary_init	= qcom_secondary_init,
>  	.smp_boot_secondary	= msm8660_boot_secondary,
> @@ -342,7 +342,7 @@ static struct smp_operations smp_msm8660_ops __initdata = {
>  };
>  CPU_METHOD_OF_DECLARE(qcom_smp, "qcom,gcc-msm8660", &smp_msm8660_ops);
>  
> -static struct smp_operations qcom_smp_kpssv1_ops __initdata = {
> +static const struct smp_operations qcom_smp_kpssv1_ops __initconst = {
>  	.smp_prepare_cpus	= qcom_smp_prepare_cpus,
>  	.smp_secondary_init	= qcom_secondary_init,
>  	.smp_boot_secondary	= kpssv1_boot_secondary,
> @@ -352,7 +352,7 @@ static struct smp_operations qcom_smp_kpssv1_ops __initdata = {
>  };
>  CPU_METHOD_OF_DECLARE(qcom_smp_kpssv1, "qcom,kpss-acc-v1", &qcom_smp_kpssv1_ops);
>  
> -static struct smp_operations qcom_smp_kpssv2_ops __initdata = {
> +static const struct smp_operations qcom_smp_kpssv2_ops __initconst = {
>  	.smp_prepare_cpus	= qcom_smp_prepare_cpus,
>  	.smp_secondary_init	= qcom_secondary_init,
>  	.smp_boot_secondary	= kpssv2_boot_secondary,
> diff --git a/arch/arm/mach-realview/core.h b/arch/arm/mach-realview/core.h
> index 868ece2..670ee0e 100644
> --- a/arch/arm/mach-realview/core.h
> +++ b/arch/arm/mach-realview/core.h
> @@ -54,7 +54,7 @@ extern int realview_usb_register(struct resource *res);
>  extern void realview_init_early(void);
>  extern void realview_fixup(struct tag *tags, char **from);
>  
> -extern struct smp_operations realview_smp_ops;
> +extern const struct smp_operations realview_smp_ops;
>  extern void realview_cpu_die(unsigned int cpu);
>  
>  #endif
> diff --git a/arch/arm/mach-realview/platsmp.c b/arch/arm/mach-realview/platsmp.c
> index 98e3052..dc29029 100644
> --- a/arch/arm/mach-realview/platsmp.c
> +++ b/arch/arm/mach-realview/platsmp.c
> @@ -75,7 +75,7 @@ static void __init realview_smp_prepare_cpus(unsigned int max_cpus)
>  		     __io_address(REALVIEW_SYS_FLAGSSET));
>  }
>  
> -struct smp_operations realview_smp_ops __initdata = {
> +const struct smp_operations realview_smp_ops __initconst = {
>  	.smp_init_cpus		= realview_smp_init_cpus,
>  	.smp_prepare_cpus	= realview_smp_prepare_cpus,
>  	.smp_secondary_init	= versatile_secondary_init,
> diff --git a/arch/arm/mach-rockchip/platsmp.c b/arch/arm/mach-rockchip/platsmp.c
> index 3e7a4b7..938888f 100644
> --- a/arch/arm/mach-rockchip/platsmp.c
> +++ b/arch/arm/mach-rockchip/platsmp.c
> @@ -340,7 +340,7 @@ static void rockchip_cpu_die(unsigned int cpu)
>  }
>  #endif
>  
> -static struct smp_operations rockchip_smp_ops __initdata = {
> +static const struct smp_operations rockchip_smp_ops __initconst = {
>  	.smp_prepare_cpus	= rockchip_smp_prepare_cpus,
>  	.smp_boot_secondary	= rockchip_boot_secondary,
>  #ifdef CONFIG_HOTPLUG_CPU
> diff --git a/arch/arm/mach-shmobile/r8a7779.h b/arch/arm/mach-shmobile/r8a7779.h
> index e1aaa2e..2a5f773 100644
> --- a/arch/arm/mach-shmobile/r8a7779.h
> +++ b/arch/arm/mach-shmobile/r8a7779.h
> @@ -3,6 +3,6 @@
>  
>  extern void r8a7779_pm_init(void);
>  
> -extern struct smp_operations r8a7779_smp_ops;
> +extern const struct smp_operations r8a7779_smp_ops;
>  
>  #endif /* __ASM_R8A7779_H__ */
> diff --git a/arch/arm/mach-shmobile/r8a7790.h b/arch/arm/mach-shmobile/r8a7790.h
> index 1a46d02..136f345 100644
> --- a/arch/arm/mach-shmobile/r8a7790.h
> +++ b/arch/arm/mach-shmobile/r8a7790.h
> @@ -1,6 +1,6 @@
>  #ifndef __ASM_R8A7790_H__
>  #define __ASM_R8A7790_H__
>  
> -extern struct smp_operations r8a7790_smp_ops;
> +extern const struct smp_operations r8a7790_smp_ops;
>  
>  #endif /* __ASM_R8A7790_H__ */
> diff --git a/arch/arm/mach-shmobile/r8a7791.h b/arch/arm/mach-shmobile/r8a7791.h
> index 7ca0b7d..cf7a840 100644
> --- a/arch/arm/mach-shmobile/r8a7791.h
> +++ b/arch/arm/mach-shmobile/r8a7791.h
> @@ -1,6 +1,6 @@
>  #ifndef __ASM_R8A7791_H__
>  #define __ASM_R8A7791_H__
>  
> -extern struct smp_operations r8a7791_smp_ops;
> +extern const struct smp_operations r8a7791_smp_ops;
>  
>  #endif /* __ASM_R8A7791_H__ */
> diff --git a/arch/arm/mach-shmobile/setup-emev2.c b/arch/arm/mach-shmobile/setup-emev2.c
> index 37f7b15..10b7cb5 100644
> --- a/arch/arm/mach-shmobile/setup-emev2.c
> +++ b/arch/arm/mach-shmobile/setup-emev2.c
> @@ -42,7 +42,7 @@ static const char *const emev2_boards_compat_dt[] __initconst = {
>  	NULL,
>  };
>  
> -extern struct smp_operations emev2_smp_ops;
> +extern const struct smp_operations emev2_smp_ops;
>  
>  DT_MACHINE_START(EMEV2_DT, "Generic Emma Mobile EV2 (Flattened Device Tree)")
>  	.smp		= smp_ops(emev2_smp_ops),
> diff --git a/arch/arm/mach-shmobile/sh73a0.h b/arch/arm/mach-shmobile/sh73a0.h
> index 3964680..50ef24f 100644
> --- a/arch/arm/mach-shmobile/sh73a0.h
> +++ b/arch/arm/mach-shmobile/sh73a0.h
> @@ -1,6 +1,6 @@
>  #ifndef __ASM_SH73A0_H__
>  #define __ASM_SH73A0_H__
>  
> -extern struct smp_operations sh73a0_smp_ops;
> +extern const struct smp_operations sh73a0_smp_ops;
>  
>  #endif /* __ASM_SH73A0_H__ */
> diff --git a/arch/arm/mach-shmobile/smp-emev2.c b/arch/arm/mach-shmobile/smp-emev2.c
> index baff3b5..adbac69 100644
> --- a/arch/arm/mach-shmobile/smp-emev2.c
> +++ b/arch/arm/mach-shmobile/smp-emev2.c
> @@ -49,7 +49,7 @@ static void __init emev2_smp_prepare_cpus(unsigned int max_cpus)
>  	shmobile_smp_scu_prepare_cpus(max_cpus);
>  }
>  
> -struct smp_operations emev2_smp_ops __initdata = {
> +const struct smp_operations emev2_smp_ops __initconst = {
>  	.smp_prepare_cpus	= emev2_smp_prepare_cpus,
>  	.smp_boot_secondary	= emev2_boot_secondary,
>  };
> diff --git a/arch/arm/mach-shmobile/smp-r8a7779.c b/arch/arm/mach-shmobile/smp-r8a7779.c
> index 353562b8..b854fe2 100644
> --- a/arch/arm/mach-shmobile/smp-r8a7779.c
> +++ b/arch/arm/mach-shmobile/smp-r8a7779.c
> @@ -117,7 +117,7 @@ static int r8a7779_cpu_kill(unsigned int cpu)
>  }
>  #endif /* CONFIG_HOTPLUG_CPU */
>  
> -struct smp_operations r8a7779_smp_ops  __initdata = {
> +const struct smp_operations r8a7779_smp_ops  __initconst = {
>  	.smp_prepare_cpus	= r8a7779_smp_prepare_cpus,
>  	.smp_boot_secondary	= r8a7779_boot_secondary,
>  #ifdef CONFIG_HOTPLUG_CPU
> diff --git a/arch/arm/mach-shmobile/smp-r8a7790.c b/arch/arm/mach-shmobile/smp-r8a7790.c
> index 4b33d43..f6426c6 100644
> --- a/arch/arm/mach-shmobile/smp-r8a7790.c
> +++ b/arch/arm/mach-shmobile/smp-r8a7790.c
> @@ -60,7 +60,7 @@ static void __init r8a7790_smp_prepare_cpus(unsigned int max_cpus)
>  	rcar_sysc_power_up(&r8a7790_ca7_scu);
>  }
>  
> -struct smp_operations r8a7790_smp_ops __initdata = {
> +const struct smp_operations r8a7790_smp_ops __initconst = {
>  	.smp_prepare_cpus	= r8a7790_smp_prepare_cpus,
>  	.smp_boot_secondary	= shmobile_smp_apmu_boot_secondary,
>  #ifdef CONFIG_HOTPLUG_CPU
> diff --git a/arch/arm/mach-shmobile/smp-r8a7791.c b/arch/arm/mach-shmobile/smp-r8a7791.c
> index b2508c0..2d6417a 100644
> --- a/arch/arm/mach-shmobile/smp-r8a7791.c
> +++ b/arch/arm/mach-shmobile/smp-r8a7791.c
> @@ -54,7 +54,7 @@ static int r8a7791_smp_boot_secondary(unsigned int cpu,
>  	return shmobile_smp_apmu_boot_secondary(cpu, idle);
>  }
>  
> -struct smp_operations r8a7791_smp_ops __initdata = {
> +const struct smp_operations r8a7791_smp_ops __initconst = {
>  	.smp_prepare_cpus	= r8a7791_smp_prepare_cpus,
>  	.smp_boot_secondary	= r8a7791_smp_boot_secondary,
>  #ifdef CONFIG_HOTPLUG_CPU
> diff --git a/arch/arm/mach-shmobile/smp-sh73a0.c b/arch/arm/mach-shmobile/smp-sh73a0.c
> index bc2824a..ee1a4b7 100644
> --- a/arch/arm/mach-shmobile/smp-sh73a0.c
> +++ b/arch/arm/mach-shmobile/smp-sh73a0.c
> @@ -56,7 +56,7 @@ static void __init sh73a0_smp_prepare_cpus(unsigned int max_cpus)
>  	shmobile_smp_scu_prepare_cpus(max_cpus);
>  }
>  
> -struct smp_operations sh73a0_smp_ops __initdata = {
> +const struct smp_operations sh73a0_smp_ops __initconst = {
>  	.smp_prepare_cpus	= sh73a0_smp_prepare_cpus,
>  	.smp_boot_secondary	= sh73a0_boot_secondary,
>  #ifdef CONFIG_HOTPLUG_CPU
> diff --git a/arch/arm/mach-socfpga/platsmp.c b/arch/arm/mach-socfpga/platsmp.c
> index 15c8ce8..cbb0a54 100644
> --- a/arch/arm/mach-socfpga/platsmp.c
> +++ b/arch/arm/mach-socfpga/platsmp.c
> @@ -117,7 +117,7 @@ static int socfpga_cpu_kill(unsigned int cpu)
>  	return 1;
>  }
>  
> -static struct smp_operations socfpga_smp_ops __initdata = {
> +static const struct smp_operations socfpga_smp_ops __initconst = {
>  	.smp_prepare_cpus	= socfpga_smp_prepare_cpus,
>  	.smp_boot_secondary	= socfpga_boot_secondary,
>  #ifdef CONFIG_HOTPLUG_CPU
> @@ -126,7 +126,7 @@ static struct smp_operations socfpga_smp_ops __initdata = {
>  #endif
>  };
>  
> -static struct smp_operations socfpga_a10_smp_ops __initdata = {
> +static const struct smp_operations socfpga_a10_smp_ops __initconst = {
>  	.smp_prepare_cpus	= socfpga_smp_prepare_cpus,
>  	.smp_boot_secondary	= socfpga_a10_boot_secondary,
>  #ifdef CONFIG_HOTPLUG_CPU
> diff --git a/arch/arm/mach-spear/generic.h b/arch/arm/mach-spear/generic.h
> index 0664091..909b97c0 100644
> --- a/arch/arm/mach-spear/generic.h
> +++ b/arch/arm/mach-spear/generic.h
> @@ -39,7 +39,7 @@ void spear_restart(enum reboot_mode, const char *);
>  void spear13xx_secondary_startup(void);
>  void spear13xx_cpu_die(unsigned int cpu);
>  
> -extern struct smp_operations spear13xx_smp_ops;
> +extern const struct smp_operations spear13xx_smp_ops;
>  
>  #ifdef CONFIG_MACH_SPEAR1310
>  void __init spear1310_clk_init(void __iomem *misc_base, void __iomem *ras_base);
> diff --git a/arch/arm/mach-spear/platsmp.c b/arch/arm/mach-spear/platsmp.c
> index fd42977..8d1e2d5 100644
> --- a/arch/arm/mach-spear/platsmp.c
> +++ b/arch/arm/mach-spear/platsmp.c
> @@ -120,7 +120,7 @@ static void __init spear13xx_smp_prepare_cpus(unsigned int max_cpus)
>  	__raw_writel(virt_to_phys(spear13xx_secondary_startup), SYS_LOCATION);
>  }
>  
> -struct smp_operations spear13xx_smp_ops __initdata = {
> +const struct smp_operations spear13xx_smp_ops __initconst = {
>         .smp_init_cpus		= spear13xx_smp_init_cpus,
>         .smp_prepare_cpus	= spear13xx_smp_prepare_cpus,
>         .smp_secondary_init	= spear13xx_secondary_init,
> diff --git a/arch/arm/mach-sti/platsmp.c b/arch/arm/mach-sti/platsmp.c
> index c4ad6ea..ea5a227 100644
> --- a/arch/arm/mach-sti/platsmp.c
> +++ b/arch/arm/mach-sti/platsmp.c
> @@ -156,7 +156,7 @@ static void __init sti_smp_prepare_cpus(unsigned int max_cpus)
>  	}
>  }
>  
> -struct smp_operations __initdata sti_smp_ops = {
> +const struct smp_operations sti_smp_ops __initconst = {
>  	.smp_prepare_cpus	= sti_smp_prepare_cpus,
>  	.smp_secondary_init	= sti_secondary_init,
>  	.smp_boot_secondary	= sti_boot_secondary,
> diff --git a/arch/arm/mach-sti/smp.h b/arch/arm/mach-sti/smp.h
> index ae22707..d8a2f87 100644
> --- a/arch/arm/mach-sti/smp.h
> +++ b/arch/arm/mach-sti/smp.h
> @@ -12,7 +12,7 @@
>  #ifndef __MACH_STI_SMP_H
>  #define __MACH_STI_SMP_H
>  
> -extern struct smp_operations	sti_smp_ops;
> +extern const struct smp_operations sti_smp_ops;
>  
>  void sti_secondary_startup(void);
>  
> diff --git a/arch/arm/mach-sunxi/platsmp.c b/arch/arm/mach-sunxi/platsmp.c
> index e8483ec..6642267 100644
> --- a/arch/arm/mach-sunxi/platsmp.c
> +++ b/arch/arm/mach-sunxi/platsmp.c
> @@ -116,7 +116,7 @@ static int sun6i_smp_boot_secondary(unsigned int cpu,
>  	return 0;
>  }
>  
> -static struct smp_operations sun6i_smp_ops __initdata = {
> +static const struct smp_operations sun6i_smp_ops __initconst = {
>  	.smp_prepare_cpus	= sun6i_smp_prepare_cpus,
>  	.smp_boot_secondary	= sun6i_smp_boot_secondary,
>  };
> @@ -185,7 +185,7 @@ static int sun8i_smp_boot_secondary(unsigned int cpu,
>  	return 0;
>  }
>  
> -struct smp_operations sun8i_smp_ops __initdata = {
> +static const struct smp_operations sun8i_smp_ops __initconst = {
>  	.smp_prepare_cpus	= sun8i_smp_prepare_cpus,
>  	.smp_boot_secondary	= sun8i_smp_boot_secondary,
>  };
> diff --git a/arch/arm/mach-tegra/common.h b/arch/arm/mach-tegra/common.h
> index 5900cc4..1f6fb80 100644
> --- a/arch/arm/mach-tegra/common.h
> +++ b/arch/arm/mach-tegra/common.h
> @@ -1,4 +1,4 @@
> -extern struct smp_operations tegra_smp_ops;
> +extern const struct smp_operations tegra_smp_ops;
>  
>  extern int tegra_cpu_kill(unsigned int cpu);
>  extern void tegra_cpu_die(unsigned int cpu);
> diff --git a/arch/arm/mach-tegra/platsmp.c b/arch/arm/mach-tegra/platsmp.c
> index b450866..f3f61db 100644
> --- a/arch/arm/mach-tegra/platsmp.c
> +++ b/arch/arm/mach-tegra/platsmp.c
> @@ -192,7 +192,7 @@ static void __init tegra_smp_prepare_cpus(unsigned int max_cpus)
>  		scu_enable(IO_ADDRESS(scu_a9_get_base()));
>  }
>  
> -struct smp_operations tegra_smp_ops __initdata = {
> +const struct smp_operations tegra_smp_ops __initconst = {
>  	.smp_prepare_cpus	= tegra_smp_prepare_cpus,
>  	.smp_secondary_init	= tegra_secondary_init,
>  	.smp_boot_secondary	= tegra_boot_secondary,
> diff --git a/arch/arm/mach-uniphier/platsmp.c b/arch/arm/mach-uniphier/platsmp.c
> index f057766..e1cfc1d 100644
> --- a/arch/arm/mach-uniphier/platsmp.c
> +++ b/arch/arm/mach-uniphier/platsmp.c
> @@ -201,7 +201,7 @@ static int __init uniphier_smp_boot_secondary(unsigned int cpu,
>  	return 0;
>  }
>  
> -static struct smp_operations uniphier_smp_ops __initdata = {
> +static const struct smp_operations uniphier_smp_ops __initconst = {
>  	.smp_prepare_cpus	= uniphier_smp_prepare_cpus,
>  	.smp_boot_secondary	= uniphier_smp_boot_secondary,
>  };
> diff --git a/arch/arm/mach-ux500/platsmp.c b/arch/arm/mach-ux500/platsmp.c
> index 70766b96..88b8ab4 100644
> --- a/arch/arm/mach-ux500/platsmp.c
> +++ b/arch/arm/mach-ux500/platsmp.c
> @@ -98,7 +98,7 @@ static int ux500_boot_secondary(unsigned int cpu, struct task_struct *idle)
>  	return 0;
>  }
>  
> -struct smp_operations ux500_smp_ops __initdata = {
> +static const struct smp_operations ux500_smp_ops __initconst = {
>  	.smp_prepare_cpus	= ux500_smp_prepare_cpus,
>  	.smp_boot_secondary	= ux500_boot_secondary,
>  #ifdef CONFIG_HOTPLUG_CPU
> 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,
> diff --git a/arch/arm/mach-zx/platsmp.c b/arch/arm/mach-zx/platsmp.c
> index a369398..0297f92 100644
> --- a/arch/arm/mach-zx/platsmp.c
> +++ b/arch/arm/mach-zx/platsmp.c
> @@ -176,7 +176,7 @@ static void zx_secondary_init(unsigned int cpu)
>  	scu_power_mode(scu_base, SCU_PM_NORMAL);
>  }
>  
> -struct smp_operations zx_smp_ops __initdata = {
> +static const struct smp_operations zx_smp_ops __initconst = {
>  	.smp_prepare_cpus	= zx_smp_prepare_cpus,
>  	.smp_secondary_init	= zx_secondary_init,
>  	.smp_boot_secondary	= zx_boot_secondary,
> diff --git a/arch/arm/mach-zynq/common.h b/arch/arm/mach-zynq/common.h
> index 79cda2e..e771933 100644
> --- a/arch/arm/mach-zynq/common.h
> +++ b/arch/arm/mach-zynq/common.h
> @@ -30,7 +30,7 @@ extern char zynq_secondary_trampoline;
>  extern char zynq_secondary_trampoline_jump;
>  extern char zynq_secondary_trampoline_end;
>  extern int zynq_cpun_start(u32 address, int cpu);
> -extern struct smp_operations zynq_smp_ops __initdata;
> +extern const struct smp_operations zynq_smp_ops;
>  #endif
>  
>  extern void __iomem *zynq_scu_base;
> diff --git a/arch/arm/mach-zynq/platsmp.c b/arch/arm/mach-zynq/platsmp.c
> index f66816c..7cd9865 100644
> --- a/arch/arm/mach-zynq/platsmp.c
> +++ b/arch/arm/mach-zynq/platsmp.c
> @@ -157,7 +157,7 @@ static void zynq_cpu_die(unsigned int cpu)
>  }
>  #endif
>  
> -struct smp_operations zynq_smp_ops __initdata = {
> +const struct smp_operations zynq_smp_ops __initconst = {
>  	.smp_init_cpus		= zynq_smp_init_cpus,
>  	.smp_prepare_cpus	= zynq_smp_prepare_cpus,
>  	.smp_boot_secondary	= zynq_boot_secondary,
> -- 
> 1.9.1
> 
> 

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [PATCH 2/2] ARM: use const and __initconst for smp_operations
       [not found]     ` <1447551593-22246-3-git-send-email-yamada.masahiro-uWyLwvC0a2jby3iVrkZq2A@public.gmane.org>
                         ` (11 preceding siblings ...)
  2015-11-24 18:19       ` Nicolas Pitre
@ 2015-11-24 18:34       ` Liviu Dudau
  2015-12-01  9:43       ` Linus Walleij
  13 siblings, 0 replies; 24+ messages in thread
From: Liviu Dudau @ 2015-11-24 18:34 UTC (permalink / raw)
  To: Masahiro Yamada
  Cc: Mark Rutland, Andrew Lunn, Krzysztof Kozlowski,
	kernel-F5mvAk5X5gdBDgjK7y7TUQ, linux-sh-u79uwXL29TY76Z2rM5mHXA,
	Brian Norris, Linus Walleij, Will Deacon,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA, Matthias Brugger,
	Chen-Yu Tsai, Thierry Reding, Shawn Guo, Heiko Stuebner,
	Alexandre Courbot, linux-samsung-soc-u79uwXL29TY76Z2rM5mHXA,
	Florian Fainelli, Russell King, Emilio López, Viresh Kumar,
	Stephen Warren, Magnus Damm, Michal Simek, Wei Xu

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@socionext.com>
> Acked-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
> Acked-by: Maxime Ripard <maxime.ripard@free-electrons.com>
> Acked-by: Moritz Fischer <moritz.fischer@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@arm.com>

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

_______________________________________________
Linux-mediatek mailing list
Linux-mediatek@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-mediatek

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [PATCH 2/2] ARM: use const and __initconst for smp_operations
       [not found]     ` <1447551593-22246-3-git-send-email-yamada.masahiro-uWyLwvC0a2jby3iVrkZq2A@public.gmane.org>
                         ` (12 preceding siblings ...)
  2015-11-24 18:34       ` Liviu Dudau
@ 2015-12-01  9:43       ` Linus Walleij
  13 siblings, 0 replies; 24+ messages in thread
From: Linus Walleij @ 2015-12-01  9:43 UTC (permalink / raw)
  To: Masahiro Yamada
  Cc: Mark Rutland, Andrew Lunn, Krzysztof Kozlowski,
	open list:ARM/STI ARCHITECTURE, linux-sh-u79uwXL29TY76Z2rM5mHXA,
	Brian Norris, Will Deacon, linux-kernel-u79uwXL29TY76Z2rM5mHXA,
	Matthias Brugger, Chen-Yu Tsai, Thierry Reding, Shawn Guo,
	Heiko Stuebner, Alexandre Courbot, linux-samsung-soc,
	Florian Fainelli, Russell King, Emilio López, Viresh Kumar,
	Stephen Warren, Magnus Damm

On Sun, Nov 15, 2015 at 2:39 AM, Masahiro Yamada
<yamada.masahiro-uWyLwvC0a2jby3iVrkZq2A@public.gmane.org> 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-uWyLwvC0a2jby3iVrkZq2A@public.gmane.org>
> Acked-by: Krzysztof Kozlowski <k.kozlowski-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
> Acked-by: Maxime Ripard <maxime.ripard-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org>
> Acked-by: Moritz Fischer <moritz.fischer-+aYTwkv1SeIAvxtiuMwx3w@public.gmane.org>

Acked-by: Linus Walleij <linus.walleij-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>

Yours,
Linus Walleij

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [PATCH 0/2] ARM: use const and __initconst for smp_operations (with refactoring hisi)
       [not found] ` <1447551593-22246-1-git-send-email-yamada.masahiro-uWyLwvC0a2jby3iVrkZq2A@public.gmane.org>
  2015-11-15  1:39   ` [PATCH 2/2] ARM: use const and __initconst for smp_operations Masahiro Yamada
  2015-11-17 17:57   ` [PATCH 0/2] ARM: use const and __initconst for smp_operations (with refactoring hisi) Simon Horman
@ 2015-12-01 21:21   ` Arnd Bergmann
  2 siblings, 0 replies; 24+ messages in thread
From: Arnd Bergmann @ 2015-12-01 21:21 UTC (permalink / raw)
  To: Masahiro Yamada
  Cc: Mark Rutland, Andrew Lunn, Krzysztof Kozlowski,
	kernel-F5mvAk5X5gdBDgjK7y7TUQ, linux-sh-u79uwXL29TY76Z2rM5mHXA,
	Brian Norris, Linus Walleij, Will Deacon, Patrice Chotard,
	Matthias Brugger, Chen-Yu Tsai, Thierry Reding, Shawn Guo,
	Heiko Stuebner, Alexandre Courbot,
	linux-samsung-soc-u79uwXL29TY76Z2rM5mHXA, Florian Fainelli,
	Russell King, Emilio López, Viresh Kumar, Stephen Warren,
	Magnus Damm, Michal Simek, Wei Xu

On Sunday 15 November 2015 10:39:51 Masahiro Yamada wrote:
> 1/2: minor refactoring for mach-hisi
> 2/2: use const ... __initconst for smp_operations
> 
> I hope 2/2 will be reviewed by sub-arch maintainers.
> Please issue Acked-by if it is OK.
> 
> I hope this series will be applied to ARM-SOC.
> 
> 
> 
> Masahiro Yamada (2):
>   ARM: hisi: do not export smp_operations structures
>   ARM: use const and __initconst for smp_operations
> 
> 

Applied to next/cleanup with the 17 Acks, thanks!

	Arnd

^ permalink raw reply	[flat|nested] 24+ messages in thread

end of thread, other threads:[~2015-12-01 21:21 UTC | newest]

Thread overview: 24+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-11-15  1:39 [PATCH 0/2] ARM: use const and __initconst for smp_operations (with refactoring hisi) Masahiro Yamada
2015-11-15  1:39 ` [PATCH 1/2] ARM: hisi: do not export smp_operations structures Masahiro Yamada
2015-11-15  1:39   ` Masahiro Yamada
2015-11-19 16:50   ` Wei Xu
2015-11-19 16:50     ` Wei Xu
     [not found] ` <1447551593-22246-1-git-send-email-yamada.masahiro-uWyLwvC0a2jby3iVrkZq2A@public.gmane.org>
2015-11-15  1:39   ` [PATCH 2/2] ARM: use const and __initconst for smp_operations Masahiro Yamada
     [not found]     ` <1447551593-22246-3-git-send-email-yamada.masahiro-uWyLwvC0a2jby3iVrkZq2A@public.gmane.org>
2015-11-18  1:30       ` Stephen Boyd
2015-11-18  5:36       ` Viresh Kumar
2015-11-18  8:15       ` Patrice Chotard
2015-11-18 11:22       ` Heiko Stübner
2015-11-19 16:52       ` Wei Xu
2015-11-19 19:16       ` Florian Fainelli
2015-11-23 17:02       ` Gregory CLEMENT
2015-11-23 20:33       ` Dinh Nguyen
2015-11-24  8:56       ` Shawn Guo
2015-11-24  9:25       ` Matthias Brugger
2015-11-24 15:40       ` Thierry Reding
2015-11-24 18:19       ` Nicolas Pitre
2015-11-24 18:34       ` Liviu Dudau
2015-12-01  9:43       ` Linus Walleij
2015-11-19 19:58     ` Sebastian Hesselbarth
2015-11-19 19:58       ` Sebastian Hesselbarth
2015-11-17 17:57   ` [PATCH 0/2] ARM: use const and __initconst for smp_operations (with refactoring hisi) Simon Horman
2015-12-01 21:21   ` Arnd Bergmann

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.