Skip to contentSkip to conversation

sparc: fix compile failure in kgdb_64.c

PATCH In review Paul Gortmaker 3 participants 5 messages Mar 30, 2012 SPARC + UltraSPARC (sparc/sparc64)

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 sparc: fix compile failure in kgdb_64.c

To fix:

CC arch/sparc/kernel/kgdb_64.o
arch/sparc/kernel/kgdb_64.c: In function 'smp_kgdb_capture_client':
arch/sparc/kernel/kgdb_64.c:121: error: implicit declaration of function 'flushw_all' make[2]: *** [arch/sparc/kernel/kgdb_64.o] Error 1

---

[tested on linux-next; presumably caused by the asm/system.h split]

arch/sparc/kernel/kgdb_64.c +1 -0
index 768290a..e916169 100644
@@ -8,6 +8,7 @@
 #include <linux/ftrace.h>
 
 #include <asm/kdebug.h>
+#include <asm/cacheflush.h>
 #include <asm/ptrace.h>
 #include <asm/irq.h>
 
Signature · 1 line
1.7.9.1
#1 lore raw
Quoted 17 lines · Paul Gortmaker

To fix:

CC arch/sparc/kernel/kgdb_64.o
arch/sparc/kernel/kgdb_64.c: In function 'smp_kgdb_capture_client':
arch/sparc/kernel/kgdb_64.c:121: error: implicit declaration of function 'flushw_all' make[2]: *** [arch/sparc/kernel/kgdb_64.o] Error 1

---

[tested on linux-next; presumably caused by the asm/system.h split]

arch/sparc/kernel/kgdb_64.c +0 -0
index 768290a..e916169 100644

arch/sparc/kernel/kgdb_64.c line 13

Quoted 6 lines
arch/sparc/kernel/kgdb_64.c +1 -0
@@ -8,6 +8,7 @@
 #include <linux/ftrace.h>
 
 #include <asm/kdebug.h>
+#include <asm/cacheflush.h>
 #include <asm/ptrace.h>
 #include <asm/irq.h>

David already fixed this in the sparc tree and sent a pull request to Linus. You can see his patch here:
https://git.kernel.org/?p=linux/kernel/git/davem/sparc.git;a=commitdiff;h‹efc9f23c695395de011ced289c611fada22f35

Please note a small difference...
The include is placed in the top to maintain the "inverse christmas tree" order. Longest includes first - and these with equal length are sorted alphabetically.

This is used for all new sparc code.

Sam

maintainer
#3 lore raw
In reply to Paul Gortmaker

From: Paul Gortmaker <[email protected]>
Date: Fri, 30 Mar 2012 15:31:24 -0400

Quoted 8 lines

To fix:

CC arch/sparc/kernel/kgdb_64.o
arch/sparc/kernel/kgdb_64.c: In function 'smp_kgdb_capture_client':
arch/sparc/kernel/kgdb_64.c:121: error: implicit declaration of function 'flushw_all' make[2]: *** [arch/sparc/kernel/kgdb_64.o] Error 1

I already pushed this fix to Linus last night.

#4 lore raw
In reply to Paul Gortmaker
Quoted 5 lines · David Miller

From: Paul Gortmaker <[email protected]>
Date: Fri, 30 Mar 2012 15:31:24 -0400

Quoted 2 lines

To fix:

Quoted 8 lines
Quoted 6 lines

CC arch/sparc/kernel/kgdb_64.o
arch/sparc/kernel/kgdb_64.c: In function 'smp_kgdb_capture_client':
arch/sparc/kernel/kgdb_64.c:121: error: implicit declaration of function 'flushw_all' make[2]: *** [arch/sparc/kernel/kgdb_64.o] Error 1

I already pushed this fix to Linus last night.

Sorry for the noise. One of those moment where you hit enter and *then* realize that you forgot to check if it was already reported/fixed.

P.