Skip to contentSkip to conversation

MIPS: Octeon: Fix wrong variable type in smp.c

PATCH In review Yang Shi 2 participants 4 messages Mar 9, 2010 – Mar 11, 2010 MIPS

lore
Share & tools
lore

Yang Shi

author
#0 lore raw

PATCH 1/1 MIPS: Octeon: Fix wrong variable type in smp.c

Change cvmx_ciu_wdogx_t type to "union cvmx_ciu_wdogx".

---
 arch/mips/cavium-octeon/smp.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
arch/mips/cavium-octeon/smp.c +1 -1
index 51e9802..52d61ba 100644
@@ -281,7 +281,7 @@ static void octeon_cpu_die(unsigned int cpu)
 
 #ifdef CONFIG_CAVIUM_OCTEON_WATCHDOG
 	/* Disable the watchdog */
-	cvmx_ciu_wdogx_t ciu_wdog;
+	union cvmx_ciu_wdogx ciu_wdog;
 	ciu_wdog.u64 = cvmx_read_csr(CVMX_CIU_WDOGX(cpu));
 	ciu_wdog.s.mode = 0;
 	cvmx_write_csr(CVMX_CIU_WDOGX(cpu), ciu_wdog.u64);
Signature · 1 line
1.6.3.3
#1 lore raw
Quoted 12 lines · Yang Shi

Change cvmx_ciu_wdogx_t type to "union cvmx_ciu_wdogx".

---
 arch/mips/cavium-octeon/smp.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
arch/mips/cavium-octeon/smp.c +0 -0
index 51e9802..52d61ba 100644

arch/mips/cavium-octeon/smp.c static void octeon_cpu_die(unsigned int cpu) · line 287

Quoted 8 lines
arch/mips/cavium-octeon/smp.c +1 -1
@@ -281,7 +281,7 @@ static void octeon_cpu_die(unsigned int cpu)
 
 #ifdef CONFIG_CAVIUM_OCTEON_WATCHDOG
 	/* Disable the watchdog */
-	cvmx_ciu_wdogx_t ciu_wdog;
+	union cvmx_ciu_wdogx ciu_wdog;
 	ciu_wdog.u64 = cvmx_read_csr(CVMX_CIU_WDOGX(cpu));
 	ciu_wdog.s.mode = 0;
 	cvmx_write_csr(CVMX_CIU_WDOGX(cpu), ciu_wdog.u64);

David,

I think this ifdef should be replaced by a notifier called from __cpu_die().

Ralf

#2 lore raw
Quoted 12 lines · Ralf Baechle

arch/mips/cavium-octeon/smp.c static void octeon_cpu_die(unsigned int cpu) · line 287

Quoted 9 lines
arch/mips/cavium-octeon/smp.c +1 -1
@@ -281,7 +281,7 @@ static void octeon_cpu_die(unsigned int cpu)
 
 #ifdef CONFIG_CAVIUM_OCTEON_WATCHDOG
 	/* Disable the watchdog */
-	cvmx_ciu_wdogx_t ciu_wdog;
+	union cvmx_ciu_wdogx ciu_wdog;
 	ciu_wdog.u64 = cvmx_read_csr(CVMX_CIU_WDOGX(cpu));
 	ciu_wdog.s.mode = 0;
 	cvmx_write_csr(CVMX_CIU_WDOGX(cpu), ciu_wdog.u64);

David,

Quoted 2 lines

I think this ifdef should be replaced by a notifier called from __cpu_die().

Since this is unused I'll just remove it for now.

Ralf

author
#3 lore raw
Quoted 15 lines · Ralf Baechle
Quoted 12 lines · Ralf Baechle

arch/mips/cavium-octeon/smp.c static void octeon_cpu_die(unsigned int cpu) · line 287

Quoted 10 lines
arch/mips/cavium-octeon/smp.c +1 -1
@@ -281,7 +281,7 @@ static void octeon_cpu_die(unsigned int cpu)
 
 #ifdef CONFIG_CAVIUM_OCTEON_WATCHDOG
 	/* Disable the watchdog */
-	cvmx_ciu_wdogx_t ciu_wdog;
+	union cvmx_ciu_wdogx ciu_wdog;
 	ciu_wdog.u64 = cvmx_read_csr(CVMX_CIU_WDOGX(cpu));
 	ciu_wdog.s.mode = 0;
 	cvmx_write_csr(CVMX_CIU_WDOGX(cpu), ciu_wdog.u64);

David,

Quoted 6 lines
Quoted 3 lines

I think this ifdef should be replaced by a notifier called from __cpu_die().

Since this is unused I'll just remove it for now.

This breaks kernel build when HOTPLUG_CPU is enabled.

Regards,
Yang

Quoted 3 lines

Ralf