Skip to contentSkip to conversation

mips:Remove unneeded duplicate declaration of cpu_callin_map in smp.h

PATCH In review Nicholas Krause 2 participants 3 messages May 8, 2015 MIPS

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 mips:Remove unneeded duplicate declaration of cpu_callin_map in smp.h

This removes the unneeded duplicate declaration of cpu_callin_map in smp.h due to use already declaring it in the file,smp.c that already uses it internally for functions required this variable for their various internal work.

---
 arch/mips/include/asm/smp.h | 2 --
 1 file changed, 2 deletions(-)
arch/mips/include/asm/smp.h +0 -2
index bb02fac..7752011 100644
@@ -45,8 +45,6 @@ extern int __cpu_logical_map[NR_CPUS];
 #define SMP_DUMP		0x8
 #define SMP_ASK_C0COUNT		0x10
 
-extern volatile cpumask_t cpu_callin_map;
-
 /* Mask of CPUs which are currently definitely operating coherently */
 extern cpumask_t cpu_coherent_mask;
 
Signature · 1 line
2.1.4
#1 lore raw
Quoted 2 lines · Nicholas Krause

This removes the unneeded duplicate declaration of cpu_callin_map in smp.h due to use already declaring it in the file,smp.c that

No, it isn't declared in arch/mips/kernel/smp.c, its *defined* there (no "extern"). It's referenced by:
arch/mips/cavium-octeon/smp.c
arch/mips/kernel/process.c
arch/mips/kernel/smp-bmips.c
arch/mips/kernel/smp-cps.c arch/mips/loongson/loongson-3/smp.c
as well as arch/mips/kernel/smp.c, which is why the declaration is needed in a header.

If you're attempting to fix the build errors in this area, please see:
http://patchwork.linux-mips.org/patch/9970/

Cheers
James

Quoted 22 lines

already uses it internally for functions required this variable for their various internal work.

---
 arch/mips/include/asm/smp.h | 2 --
 1 file changed, 2 deletions(-)
arch/mips/include/asm/smp.h +0 -2
index bb02fac..7752011 100644
@@ -45,8 +45,6 @@ extern int __cpu_logical_map[NR_CPUS];
 #define SMP_DUMP		0x8
 #define SMP_ASK_C0COUNT		0x10
 
-extern volatile cpumask_t cpu_callin_map;
-
 /* Mask of CPUs which are currently definitely operating coherently */
 extern cpumask_t cpu_coherent_mask;
 
author
#2 lore raw
Quoted 36 lines · James Hogan
Quoted 2 lines · Nicholas Krause

This removes the unneeded duplicate declaration of cpu_callin_map in smp.h due to use already declaring it in the file,smp.c that

No, it isn't declared in arch/mips/kernel/smp.c, its *defined* there (no "extern"). It's referenced by:
arch/mips/cavium-octeon/smp.c
arch/mips/kernel/process.c
arch/mips/kernel/smp-bmips.c
arch/mips/kernel/smp-cps.c arch/mips/loongson/loongson-3/smp.c
as well as arch/mips/kernel/smp.c, which is why the declaration is needed in a header.

If you're attempting to fix the build errors in this area, please see:
http://patchwork.linux-mips.org/patch/9970/

Cheers
James

Quoted 16 lines

already uses it internally for functions required this variable for their various internal work.

---
 arch/mips/include/asm/smp.h | 2 --
 1 file changed, 2 deletions(-)
arch/mips/include/asm/smp.h +0 -0
index bb02fac..7752011 100644
@@ -45,8 +45,6 @@ extern int __cpu_logical_map[NR_CPUS];
 #define SMP_DUMP		0x8
 #define SMP_ASK_C0COUNT		0x10
 
Quoted 7 lines

arch/mips/include/asm/smp.h extern int __cpu_logical_map[NR_CPUS]; · line 50

Quoted 6 lines
arch/mips/include/asm/smp.h +0 -2
-extern volatile cpumask_t cpu_callin_map;
-
 /* Mask of CPUs which are currently definitely operating coherently */
 extern cpumask_t cpu_coherent_mask;
 

James,

Your patch is 100% percent I missed that it hit all those files and therefore just removed it from the header file. After looking at it further this was easy break the build on other configurations,please NAK this patch.
Nick