Skip to contentSkip to conversation

-git compile fixes for MIPS

PATCH In review Manuel Lauss 3 participants 4 messages Jun 17, 2009 MIPS

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 -git compile fixes for MIPS

Quick fixes for some compile failures which have cropped up in linus-git in the last 24 hours:

CC arch/mips/kernel/time.o
In file included from linux-2.6.git/include/linux/bug.h:4,

                 from linux-2.6.git/arch/mips/kernel/time.c:13:

linux-2.6.git/arch/mips/include/asm/bug.h:10: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'BUG' linux-2.6.git/arch/mips/include/asm/bug.h: In function '__BUG_ON':
linux-2.6.git/arch/mips/include/asm/bug.h:26: error: implicit declaration of function 'BUG'

CC arch/mips/mm/uasm.o
In file included from linux-2.6.git/arch/mips/mm/uasm.c:21:
linux-2.6.git/arch/mips/include/asm/bugs.h: In function 'check_bugs':
linux-2.6.git/arch/mips/include/asm/bugs.h:34: error: implicit declaration of function 'smp_processor_id' linux-2.6.git/arch/mips/mm/uasm.c: In function 'uasm_copy_handler':
linux-2.6.git/arch/mips/mm/uasm.c:514: error: implicit declaration of function 'memcpy'

---
 arch/mips/include/asm/bug.h  |    2 +-
 arch/mips/include/asm/bugs.h |    1 +
 arch/mips/mm/uasm.c          |    1 +
 3 files changed, 3 insertions(+), 1 deletions(-)
arch/mips/include/asm/bug.h +1 -1
index 08ea468..92b372a 100644
@@ -7,7 +7,7 @@
 
 #include <asm/break.h>
 
-static inline void __noreturn BUG(void)
+static inline void __attribute__((noreturn)) BUG(void)
 {
 	__asm__ __volatile__("break %0" : : "i" (BRK_BUG));
 	/* Fool GCC into thinking the function doesn't return. */
arch/mips/include/asm/bugs.h +1 -0
index 9dc10df..b160a70 100644
@@ -11,6 +11,7 @@
 
 #include <linux/bug.h>
 #include <linux/delay.h>
+#include <linux/smp.h>
 
 #include <asm/cpu.h>
 #include <asm/cpu-info.h>
arch/mips/mm/uasm.c +1 -0
index f467199..ba538f7 100644
@@ -15,6 +15,7 @@
 #include <linux/kernel.h>
 #include <linux/types.h>
 #include <linux/init.h>
+#include <linux/string.h>
 
 #include <asm/inst.h>
 #include <asm/elf.h>
Signature · 1 line
1.6.3.1
Tested-by on v1 1/1
#1 lore raw

Hi Manuel,

Le Wednesday 17 June 2009 09:55:31 Manuel Lauss, vous avez écrit :

Quoted 20 lines

Quick fixes for some compile failures which have cropped up in linus-git in the last 24 hours:

CC arch/mips/kernel/time.o
In file included from linux-2.6.git/include/linux/bug.h:4,

                  from linux-2.6.git/arch/mips/kernel/time.c:13:

linux-2.6.git/arch/mips/include/asm/bug.h:10: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'BUG' linux-2.6.git/arch/mips/include/asm/bug.h: In function '__BUG_ON':
linux-2.6.git/arch/mips/include/asm/bug.h:26: error: implicit declaration of function 'BUG'

CC arch/mips/mm/uasm.o
In file included from linux-2.6.git/arch/mips/mm/uasm.c:21:
linux-2.6.git/arch/mips/include/asm/bugs.h: In function 'check_bugs':
linux-2.6.git/arch/mips/include/asm/bugs.h:34: error: implicit declaration of function 'smp_processor_id' linux-2.6.git/arch/mips/mm/uasm.c: In function 'uasm_copy_handler': linux-2.6.git/arch/mips/mm/uasm.c:514: error:
implicit declaration of function 'memcpy'

Quoted 1 line

Thanks for fixing this !

#2 lore raw
In reply to Manuel Lauss
Quoted 30 lines · Manuel Lauss

Quick fixes for some compile failures which have cropped up in linus-git in the last 24 hours:

CC arch/mips/kernel/time.o
In file included from linux-2.6.git/include/linux/bug.h:4,

                 from linux-2.6.git/arch/mips/kernel/time.c:13:

linux-2.6.git/arch/mips/include/asm/bug.h:10: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'BUG' linux-2.6.git/arch/mips/include/asm/bug.h: In function '__BUG_ON':
linux-2.6.git/arch/mips/include/asm/bug.h:26: error: implicit declaration of function 'BUG'

CC arch/mips/mm/uasm.o
In file included from linux-2.6.git/arch/mips/mm/uasm.c:21:
linux-2.6.git/arch/mips/include/asm/bugs.h: In function 'check_bugs':
linux-2.6.git/arch/mips/include/asm/bugs.h:34: error: implicit declaration of function 'smp_processor_id' linux-2.6.git/arch/mips/mm/uasm.c: In function 'uasm_copy_handler':
linux-2.6.git/arch/mips/mm/uasm.c:514: error: implicit declaration of function 'memcpy'

---
 arch/mips/include/asm/bug.h  |    2 +-
 arch/mips/include/asm/bugs.h |    1 +
 arch/mips/mm/uasm.c          |    1 +
 3 files changed, 3 insertions(+), 1 deletions(-)
arch/mips/include/asm/bug.h +0 -0
index 08ea468..92b372a 100644

arch/mips/include/asm/bug.h line 10

Quoted 5 lines
arch/mips/include/asm/bug.h +1 -1
@@ -7,7 +7,7 @@
 
 #include <asm/break.h>
 
-static inline void __noreturn BUG(void)
+static inline void __attribute__((noreturn)) BUG(void)

That isn't correct.

__noreturn is defined in linux/compiler.h You should figure out why that definition is not being used.

David Daney

#3 lore raw
Quoted 38 lines · David Daney
Quoted 37 lines · Manuel Lauss

Quick fixes for some compile failures which have cropped up in linus-git in the last 24 hours:

 CC      arch/mips/kernel/time.o
In file included from linux-2.6.git/include/linux/bug.h:4, from linux-2.6.git/arch/mips/kernel/time.c:13:
linux-2.6.git/arch/mips/include/asm/bug.h:10: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'BUG' linux-2.6.git/arch/mips/include/asm/bug.h: In function '__BUG_ON':
linux-2.6.git/arch/mips/include/asm/bug.h:26: error: implicit declaration of function 'BUG'

 CC      arch/mips/mm/uasm.o
In file included from linux-2.6.git/arch/mips/mm/uasm.c:21:
linux-2.6.git/arch/mips/include/asm/bugs.h: In function 'check_bugs':
linux-2.6.git/arch/mips/include/asm/bugs.h:34: error: implicit declaration of function 'smp_processor_id' linux-2.6.git/arch/mips/mm/uasm.c: In function 'uasm_copy_handler':
linux-2.6.git/arch/mips/mm/uasm.c:514: error: implicit declaration of function 'memcpy'

---
 arch/mips/include/asm/bug.h  |    2 +-
 arch/mips/include/asm/bugs.h |    1 +
 arch/mips/mm/uasm.c          |    1 +

 3 files changed, 3 insertions(+), 1 deletions(-)
arch/mips/include/asm/bug.h +0 -0
index 08ea468..92b372a 100644
@@ -7,7 +7,7 @@
 
  #include <asm/break.h>
 
Quoted 7 lines

arch/mips/include/asm/bug.h line 10

Quoted 2 lines
arch/mips/include/asm/bug.h +1 -1
-static inline void __noreturn BUG(void)
+static inline void __attribute__((noreturn)) BUG(void)

That isn't correct.

__noreturn is defined in linux/compiler.h  You should figure out why that definition is not being used.

I did a quick check, seems to be an include ordering problem; bug.h is included before compiler.h... I don't know what exactly changed or whether the fact that it worked previously was purely by accident. The "right" thing to do I think is to include compiler.h in asm/bug.h.

Manuel Lauss