Skip to contentSkip to conversation

ARM: bcm2836: include local platsmp.h for bcm2836_smp_ops

PATCH Applied Ben Dooks 3 participants 15 messages Oct 8, 2019 – Oct 15, 2019

Subsystems (9)
lore
Share & tools
lore

Ben Dooks

author
#0 lore raw

PATCH 1/11 ARM: bcm2836: include local platsmp.h for bcm2836_smp_ops

Include platsmp.h for the definition of bcm2836_smp_ops to fix the following warning:

arch/arm/mach-bcm/platsmp.c:334:29: warning: symbol 'bcm2836_smp_ops' was not declared. Should it be static?

---
Cc: Florian Fainelli <[email protected]>
Cc: Ray Jui <[email protected]>
Cc: Scott Branden <[email protected]>
Cc: [email protected]

---
 arch/arm/mach-bcm/platsmp.c | 2 ++
 1 file changed, 2 insertions(+)
arch/arm/mach-bcm/platsmp.c +2 -0
index 47f8053d0240..21400b3fa5fe 100644
@@ -22,6 +22,8 @@
 #include <asm/smp_plat.h>
 #include <asm/smp_scu.h>
 
+#include "platsmp.h"
+
 /* Size of mapped Cortex A9 SCU address space */
 #define CORTEX_A9_SCU_SIZE	0x58
 
Signature · 7 lines
2.23.0


_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
author
#1 lore raw

PATCH 2/11 ARM: bcm: fix missing __iomem in bcm_kona_smc.c

Fix the following sparse warnings from a missing __iomem in __bcm_kona_smc() function by adding __iomem attriubte.

arch/arm/mach-bcm/bcm_kona_smc.c:143:21: warning: incorrect type in initializer (different address spaces)
arch/arm/mach-bcm/bcm_kona_smc.c:143:21: expected unsigned int [usertype] *args
arch/arm/mach-bcm/bcm_kona_smc.c:143:21: got void [noderef] <asn:2> *static [toplevel] [assigned] bcm_smc
_buffer
arch/arm/mach-bcm/bcm_kona_smc.c:149:9: warning: incorrect type in argument 2 (different address spaces)
arch/arm/mach-bcm/bcm_kona_smc.c:149:9: expected void volatile [noderef] <asn:2> *addr
arch/arm/mach-bcm/bcm_kona_smc.c:149:9: got unsigned int [usertype] *
arch/arm/mach-bcm/bcm_kona_smc.c:150:9: warning: incorrect type in argument 2 (different address spaces)
arch/arm/mach-bcm/bcm_kona_smc.c:150:9: expected void volatile [noderef] <asn:2> *addr
arch/arm/mach-bcm/bcm_kona_smc.c:150:9: got unsigned int [usertype] *
arch/arm/mach-bcm/bcm_kona_smc.c:151:9: warning: incorrect type in argument 2 (different address spaces)
arch/arm/mach-bcm/bcm_kona_smc.c:151:9: expected void volatile [noderef] <asn:2> *addr
arch/arm/mach-bcm/bcm_kona_smc.c:151:9: got unsigned int [usertype] *
arch/arm/mach-bcm/bcm_kona_smc.c:152:9: warning: incorrect type in argument 2 (different address spaces)
arch/arm/mach-bcm/bcm_kona_smc.c:152:9: expected void volatile [noderef] <asn:2> *addr
arch/arm/mach-bcm/bcm_kona_smc.c:152:9: got unsigned int [usertype] *[assigned] args

---
Cc: Florian Fainelli <[email protected]>
Cc: Ray Jui <[email protected]>
Cc: Scott Branden <[email protected]>
Cc: [email protected]

---
 arch/arm/mach-bcm/bcm_kona_smc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/mach-bcm/bcm_kona_smc.c +1 -1
index 541e850a736c..43a16f922b53 100644
@@ -140,7 +140,7 @@ static int bcm_kona_do_smc(u32 service_id, u32 buffer_phys)
 static void __bcm_kona_smc(void *info)
 {
 	struct bcm_kona_smc_data *data = info;
-	u32 *args = bcm_smc_buffer;
+	u32 __iomem *args = bcm_smc_buffer;
 
 	BUG_ON(smp_processor_id() != 0);
 	BUG_ON(!args);
Signature · 7 lines
2.23.0


_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Acked-by on v1 2/11
#2 lore raw

Re: [PATCH 02/11] ARM: bcm: fix missing __iomem in bcm_kona_smc.c

Quoted 20 lines · Ben Dooks

Fix the following sparse warnings from a missing __iomem in __bcm_kona_smc() function by adding __iomem attriubte.

arch/arm/mach-bcm/bcm_kona_smc.c:143:21: warning: incorrect type in initializer (different address spaces)
arch/arm/mach-bcm/bcm_kona_smc.c:143:21: expected unsigned int [usertype] *args
arch/arm/mach-bcm/bcm_kona_smc.c:143:21: got void [noderef] <asn:2> *static [toplevel] [assigned] bcm_smc
_buffer
arch/arm/mach-bcm/bcm_kona_smc.c:149:9: warning: incorrect type in argument 2 (different address spaces)
arch/arm/mach-bcm/bcm_kona_smc.c:149:9: expected void volatile [noderef] <asn:2> *addr
arch/arm/mach-bcm/bcm_kona_smc.c:149:9: got unsigned int [usertype] *
arch/arm/mach-bcm/bcm_kona_smc.c:150:9: warning: incorrect type in argument 2 (different address spaces)
arch/arm/mach-bcm/bcm_kona_smc.c:150:9: expected void volatile [noderef] <asn:2> *addr
arch/arm/mach-bcm/bcm_kona_smc.c:150:9: got unsigned int [usertype] *
arch/arm/mach-bcm/bcm_kona_smc.c:151:9: warning: incorrect type in argument 2 (different address spaces)
arch/arm/mach-bcm/bcm_kona_smc.c:151:9: expected void volatile [noderef] <asn:2> *addr
arch/arm/mach-bcm/bcm_kona_smc.c:151:9: got unsigned int [usertype] *
arch/arm/mach-bcm/bcm_kona_smc.c:152:9: warning: incorrect type in argument 2 (different address spaces)
arch/arm/mach-bcm/bcm_kona_smc.c:152:9: expected void volatile [noderef] <asn:2> *addr
arch/arm/mach-bcm/bcm_kona_smc.c:152:9: got unsigned int [usertype] *[assigned] args

Quoted 1 line
Quoted 14 lines

---
Cc: Florian Fainelli <[email protected]>
Cc: Ray Jui <[email protected]>
Cc: Scott Branden <[email protected]>
Cc: [email protected]

---
  arch/arm/mach-bcm/bcm_kona_smc.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/mach-bcm/bcm_kona_smc.c +0 -0
index 541e850a736c..43a16f922b53 100644

arch/arm/mach-bcm/bcm_kona_smc.c static int bcm_kona_do_smc(u32 service_id, u32 buffer_phys) · line 146

Quoted 8 lines
arch/arm/mach-bcm/bcm_kona_smc.c +1 -1
@@ -140,7 +140,7 @@ static int bcm_kona_do_smc(u32 service_id, u32 buffer_phys)
  static void __bcm_kona_smc(void *info)
  {
  	struct bcm_kona_smc_data *data = info;
-	u32 *args = bcm_smc_buffer;
+	u32 __iomem *args = bcm_smc_buffer;
 
  	BUG_ON(smp_processor_id() != 0);
  	BUG_ON(!args);

_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

#3 lore raw

Re: [PATCH 02/11] ARM: bcm: fix missing __iomem in bcm_kona_smc.c

In reply to Ben Dooks
Quoted 20 lines · Ben Dooks

Fix the following sparse warnings from a missing __iomem in __bcm_kona_smc() function by adding __iomem attriubte.

arch/arm/mach-bcm/bcm_kona_smc.c:143:21: warning: incorrect type in initializer (different address spaces)
arch/arm/mach-bcm/bcm_kona_smc.c:143:21: expected unsigned int [usertype] *args
arch/arm/mach-bcm/bcm_kona_smc.c:143:21: got void [noderef] <asn:2> *static [toplevel] [assigned] bcm_smc
_buffer
arch/arm/mach-bcm/bcm_kona_smc.c:149:9: warning: incorrect type in argument 2 (different address spaces)
arch/arm/mach-bcm/bcm_kona_smc.c:149:9: expected void volatile [noderef] <asn:2> *addr
arch/arm/mach-bcm/bcm_kona_smc.c:149:9: got unsigned int [usertype] *
arch/arm/mach-bcm/bcm_kona_smc.c:150:9: warning: incorrect type in argument 2 (different address spaces)
arch/arm/mach-bcm/bcm_kona_smc.c:150:9: expected void volatile [noderef] <asn:2> *addr
arch/arm/mach-bcm/bcm_kona_smc.c:150:9: got unsigned int [usertype] *
arch/arm/mach-bcm/bcm_kona_smc.c:151:9: warning: incorrect type in argument 2 (different address spaces)
arch/arm/mach-bcm/bcm_kona_smc.c:151:9: expected void volatile [noderef] <asn:2> *addr
arch/arm/mach-bcm/bcm_kona_smc.c:151:9: got unsigned int [usertype] *
arch/arm/mach-bcm/bcm_kona_smc.c:152:9: warning: incorrect type in argument 2 (different address spaces)
arch/arm/mach-bcm/bcm_kona_smc.c:152:9: expected void volatile [noderef] <asn:2> *addr
arch/arm/mach-bcm/bcm_kona_smc.c:152:9: got unsigned int [usertype] *[assigned] args

Quoted 2 lines

---

Applied to soc/next, thanks!
--
Florian

_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

author
#4 lore raw

PATCH 3/11 ARM: highbank: include local core.h for highbank_pm_init

In reply to Ben Dooks

Fix missing declaration of highbank_pm_init by including core.h.

arch/arm/mach-highbank/pm.c:43:13: warning: symbol 'highbank_pm_init' was not declared. Should it be static?

---
Cc: Rob Herring <[email protected]>

---
 arch/arm/mach-highbank/pm.c | 2 ++
 1 file changed, 2 insertions(+)
arch/arm/mach-highbank/pm.c +2 -0
index 561941baeda9..3fdbdb83113b 100644
@@ -12,6 +12,8 @@
 
 #include <uapi/linux/psci.h>
 
+#include "core.h"
+
 #define HIGHBANK_SUSPEND_PARAM \
 	((0 << PSCI_0_2_POWER_STATE_ID_SHIFT) | \
 	 (1 << PSCI_0_2_POWER_STATE_AFFL_SHIFT) | \
Signature · 7 lines
2.23.0


_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
author
#5 lore raw

PATCH 4/11 ARM: meson: use NULL instead of 0 for pointer

In reply to Ben Dooks

Fix the second argument of of_get_cpu_node which is a pointer being passed a plain 0 by using NULL instead. Fixes the following warning:

arch/arm/mach-meson/platsmp.c:40:55: warning: Using plain integer as NULL pointer

---
CC: Kevin Hilman <[email protected]>
CC: [email protected]

---
 arch/arm/mach-meson/platsmp.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/mach-meson/platsmp.c +1 -1
index 4b8ad728bb42..f992c436d3ed 100644
@@ -37,7 +37,7 @@ static struct regmap *pmu;
 
 static struct reset_control *meson_smp_get_core_reset(int cpu)
 {
-	struct device_node *np = of_get_cpu_node(cpu, 0);
+	struct device_node *np = of_get_cpu_node(cpu, NULL);
 
 	return of_reset_control_get_exclusive(np, NULL);
 }
Signature · 7 lines
2.23.0


_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
author
#6 lore raw

PATCH 5/11 arm: mediatek: force type of mtk_smp_base

In reply to Ben Dooks

In __mtk_smp_prepare_cpus force the return of phys_to_virt() to have __iomem on it to avoid the following sparse warning:

arch/arm/mach-mediatek/platsmp.c:105:30: warning: incorrect type in assignment (different address spaces)
arch/arm/mach-mediatek/platsmp.c:105:30: expected void [noderef] <asn:2> *static [toplevel] mtk_smp_base
arch/arm/mach-mediatek/platsmp.c:105:30: got void *

---
Cc: Matthias Brugger <[email protected]>
Cc: [email protected]

---
 arch/arm/mach-mediatek/platsmp.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/mach-mediatek/platsmp.c +1 -1
index 16a4ee6c9590..3717b960618d 100644
@@ -102,7 +102,7 @@ static void __init __mtk_smp_prepare_cpus(unsigned int max_cpus, int trustzone)
 
 	if (trustzone) {
 		/* smp_base(trustzone-bootinfo) is reserved by device tree */
-		mtk_smp_base = phys_to_virt(mtk_smp_info->smp_base);
+		mtk_smp_base = (void __force __iomem *)phys_to_virt(mtk_smp_info->smp_base);
 	} else {
 		mtk_smp_base = ioremap(mtk_smp_info->smp_base, MTK_SMP_REG_SIZE);
 		if (!mtk_smp_base) {
Signature · 1 line
2.23.0
author
#7 lore raw

PATCH 6/11 ARM: OMAP2+: do not export am43xx_control functions

In reply to Ben Dooks

Do not export am43xx_control_{save,restore}_context to avoid the foloowing warnings:

arch/arm/mach-omap2/control.c:687:6: warning: symbol 'am43xx_control_save_context' was not declared. Should it be static? arch/arm/mach-omap2/control.c:701:6: warning: symbol 'am43xx_control_restore_context' was not declared. Should it be static?

---
Cc: Tony Lindgren <[email protected]>
Cc: [email protected]

---
 arch/arm/mach-omap2/control.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
arch/arm/mach-omap2/control.c +2 -2
index c84b5e260617..73338cf80d76 100644
@@ -684,7 +684,7 @@ static u32 am33xx_control_vals[ARRAY_SIZE(am43xx_control_reg_offsets)];
  *
  * Save the wkup domain registers
  */
-void am43xx_control_save_context(void)
+static void am43xx_control_save_context(void)
 {
 	int i;
 
@@ -698,7 +698,7 @@ void am43xx_control_save_context(void)
  *
  * Restore the wkup domain registers
  */
-void am43xx_control_restore_context(void)
+static void am43xx_control_restore_context(void)
 {
 	int i;
 
Signature · 1 line
2.23.0
author
#8 lore raw

PATCH 7/11 ARM: OMAP2+: prm44xx: make prm_{save, restore}_context static

In reply to Ben Dooks

The prm_{save,restore}_context functions are not exported so make them static to avoid the following warnings:

arch/arm/mach-omap2/prm44xx.c:748:6: warning: symbol 'prm_save_context' was not declared. Should it be static? arch/arm/mach-omap2/prm44xx.c:759:6: warning: symbol 'prm_restore_context' was not declared. Should it be static?

---
Cc: [email protected]
Cc: Tony Lindgren <[email protected]>

---
 arch/arm/mach-omap2/prm44xx.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
arch/arm/mach-omap2/prm44xx.c +2 -2
index 1d9346f2a4ae..25093c1e5b9a 100644
@@ -745,7 +745,7 @@ struct pwrdm_ops omap4_pwrdm_operations = {
 
 static int omap44xx_prm_late_init(void);
 
-void prm_save_context(void)
+static void prm_save_context(void)
 {
 	omap_prm_context.irq_enable =
 			omap4_prm_read_inst_reg(AM43XX_PRM_OCP_SOCKET_INST,
@@ -756,7 +756,7 @@ void prm_save_context(void)
 						omap4_prcm_irq_setup.pm_ctrl);
 }
 
-void prm_restore_context(void)
+static void prm_restore_context(void)
 {
 	omap4_prm_write_inst_reg(omap_prm_context.irq_enable,
 				 OMAP4430_PRM_OCP_SOCKET_INST,
Signature · 1 line
2.23.0
author
#9 lore raw

PATCH 8/11 ARM: mach-prima2: include common.h for sirfsoc_pm_init

In reply to Ben Dooks

Include the common.h header for the definition of sirfsoc_pm_init to avoid the following warning:

arch/arm/mach-prima2/pm.c:147:12: warning: symbol 'sirfsoc_pm_init' was not declared. Should it be static?

---
Cc: Barry Song <[email protected]>

---
 arch/arm/mach-prima2/pm.c | 1 +
 1 file changed, 1 insertion(+)
arch/arm/mach-prima2/pm.c +1 -0
index c24bc89f320b..f31e3b6b9e00 100644
@@ -19,6 +19,7 @@
 #include <asm/suspend.h>
 #include <asm/hardware/cache-l2x0.h>
 
+#include "common.h"
 #include "pm.h"
 
 /*
Signature · 7 lines
2.23.0


_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
author
#10 lore raw

PATCH 9/11 ARM: mach-prima2: make sirfsoc_rtc_iobrg_wait_sync static

In reply to Ben Dooks

The sirfsoc_rtc_iobrg_wait_sync is not used outside of this file so make it static to avoid the following warning:

arch/arm/mach-prima2/rtciobrg.c:34:6: warning: symbol 'sirfsoc_rtc_iobrg_wait_sync' was not declared. Should it be static?

---
Cc: Barry Song <[email protected]

---
 arch/arm/mach-prima2/rtciobrg.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/mach-prima2/rtciobrg.c +1 -1
index 97c0e333e3b9..f5177219732a 100644
@@ -31,7 +31,7 @@ static DEFINE_SPINLOCK(rtciobrg_lock);
  * symbols without lock are only used by suspend asm codes
  * and these symbols are not exported too
  */
-void sirfsoc_rtc_iobrg_wait_sync(void)
+static void sirfsoc_rtc_iobrg_wait_sync(void)
 {
 	while (readl_relaxed(sirfsoc_rtciobrg_base + SIRFSOC_CPUIOBRG_CTRL))
 		cpu_relax();
Signature · 7 lines
2.23.0


_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
author
#11 lore raw

PATCH 10/11 ARM: mach-prima2: include linux/rtc/sirfsoc_rtciobrg.h

In reply to Ben Dooks

A numbre of the rtciobrg.c functions are declared in the <linux/rtc/sirfsoc_rtciobrg.h> so include it to silence the following warnings:

arch/arm/mach-prima2/rtciobrg.c:40:6: warning: symbol 'sirfsoc_rtc_iobrg_besyncing' was not declared. Should it be static? arch/arm/mach-prima2/rtciobrg.c:65:5: warning: symbol 'sirfsoc_rtc_iobrg_readl' was not declared. Should it be static? arch/arm/mach-prima2/rtciobrg.c:90:6: warning: symbol 'sirfsoc_rtc_iobrg_writel' was not declared. Should it be static? arch/arm/mach-prima2/rtciobrg.c:137:15: warning: symbol 'devm_regmap_init_iobg' was not declared. Should it be static?

---
Cc: Barry Song <[email protected]>

---
 arch/arm/mach-prima2/rtciobrg.c | 2 ++
 1 file changed, 2 insertions(+)
arch/arm/mach-prima2/rtciobrg.c +2 -0
index f5177219732a..ba6aee0aadce 100644
@@ -15,6 +15,8 @@
 #include <linux/of_device.h>
 #include <linux/of_platform.h>
 
+#include <linux/rtc/sirfsoc_rtciobrg.h>
+
 #define SIRFSOC_CPUIOBRG_CTRL           0x00
 #define SIRFSOC_CPUIOBRG_WRBE           0x04
 #define SIRFSOC_CPUIOBRG_ADDR           0x08
Signature · 7 lines
2.23.0


_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
author
#12 lore raw

PATCH 11/11 ARM: ux500: make ux500_cpu_die static

In reply to Ben Dooks

The ux500_cpu_die function is not exported so make it static to avoid the following warning:

arch/arm/mach-ux500/platsmp.c:89:6: warning: symbol 'ux500_cpu_die' was not declared. Should it be static?

---
Cc: Linus Walleij <[email protected]>

---
 arch/arm/mach-ux500/platsmp.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/mach-ux500/platsmp.c +1 -1
index 0810f3abd810..415d8ad2a3c1 100644
@@ -86,7 +86,7 @@ static int ux500_boot_secondary(unsigned int cpu, struct task_struct *idle)
 }
 
 #ifdef CONFIG_HOTPLUG_CPU
-void ux500_cpu_die(unsigned int cpu)
+static void ux500_cpu_die(unsigned int cpu)
 {
 	wfi();
 }
Signature · 7 lines
2.23.0


_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Acked-by on v1 1/11
#13 lore raw
In reply to Ben Dooks
Quoted 6 lines · Ben Dooks

Include platsmp.h for the definition of bcm2836_smp_ops to fix the following warning:

arch/arm/mach-bcm/platsmp.c:334:29: warning: symbol 'bcm2836_smp_ops' was not declared. Should it be static?

Quoted 14 lines

---
Cc: Florian Fainelli <[email protected]>
Cc: Ray Jui <[email protected]>
Cc: Scott Branden <[email protected]>
Cc: [email protected]

---
  arch/arm/mach-bcm/platsmp.c | 2 ++
  1 file changed, 2 insertions(+)
arch/arm/mach-bcm/platsmp.c +0 -0
index 47f8053d0240..21400b3fa5fe 100644

arch/arm/mach-bcm/platsmp.c line 29

Quoted 8 lines
arch/arm/mach-bcm/platsmp.c +2 -0
@@ -22,6 +22,8 @@
  #include <asm/smp_plat.h>
  #include <asm/smp_scu.h>
 
+#include "platsmp.h"
+
  /* Size of mapped Cortex A9 SCU address space */
  #define CORTEX_A9_SCU_SIZE	0x58
 

_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

#14 lore raw
In reply to Ben Dooks
Quoted 7 lines · Ben Dooks

Include platsmp.h for the definition of bcm2836_smp_ops to fix the following warning:

arch/arm/mach-bcm/platsmp.c:334:29: warning: symbol 'bcm2836_smp_ops' was not declared. Should it be static?

---

Applied to soc/next, thanks!
--
Florian

_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel