Skip to contentSkip to conversation

use-generic-bug-for-ppc

PATCH In review Judith Lebzelter 2 participants 3 messages Oct 4, 2006

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 use-generic-bug-for-ppc

For 2.6.18-mm3, the 32-bit 'ppc' architectures won't compile due to errors:

arch/ppc/kernel/built-in.o: In function `find_bug':
arch/ppc/kernel/traps.c:582: undefined reference to module_find_bug' arch/powerpc/kernel/built-in.o: In function module_arch_cleanup':
arch/powerpc/kernel/module_32.c:282: undefined reference to module_bug_cleanup' arch/powerpc/kernel/built-in.o: In function module_finalize':
arch/powerpc/kernel/module_32.c:277: undefined reference to `module_bug_finalize'
make: [.tmp_vmlinux3] Error 1 (ignored)
KSYM .tmp_kallsyms3.S
powerpc-750-linux-gnu-nm: '.tmp_vmlinux3': No such file
No valid symbol.
make: [.tmp_kallsyms3.S] Error 1 (ignored)
AS .tmp_kallsyms3.o
LD vmlinux
arch/ppc/kernel/built-in.o: In function `find_bug':
arch/ppc/kernel/traps.c:582: undefined reference to module_find_bug' arch/powerpc/kernel/built-in.o: In function module_arch_cleanup':
arch/powerpc/kernel/module_32.c:282: undefined reference to module_bug_cleanup' arch/powerpc/kernel/built-in.o: In function module_finalize':
arch/powerpc/kernel/module_32.c:277: undefined reference to `module_bug_finalize'
make: [vmlinux] Error 1 (ignored)

These changes match changes for using the generic bug libraries as in 'use-generic-bug-for-powerpc.patch' and gets rid of the compile errors.

---

Files Edited:
arch/ppc/kernel/traps.c
arch/ppc/Kconfig

arch/ppc/Kconfig +5 -0
Index: linux/arch/ppc/Kconfig
===================================================================
@@ -52,6 +52,11 @@
 	bool
 	default y
 
+config GENERIC_BUG
+	bool
+	default y
+	depends on BUG
+
 source "init/Kconfig"
 
 menu "Processor"
arch/ppc/kernel/traps.c +6 -49

74 lines not on this page · raw message

#1 lore raw
Quoted 13 lines · Judith Lebzelter

Index: linux/arch/ppc/kernel/traps.c
===================================================================

arch/ppc/kernel/traps.c +1 -0
@@ -28,6 +28,7 @@
 #include <linux/init.h>
 #include <linux/module.h>
 #include <linux/prctl.h>
+#include <linux/bug.h>
 
 #include <asm/pgtable.h>
 #include <asm/uaccess.h>

arch/ppc/kernel/traps.c line 572

Quoted 7 lines
arch/ppc/kernel/traps.c +0 -3
@@ -568,55 +569,9 @@
  */
 extern struct bug_entry __start___bug_table[], __stop___bug_table[];
 
-#ifndef CONFIG_MODULES
-#define module_find_bug(x)	NULL
-#endif
 

Looks like you need to delete a bit more here - the extern struct bug_entry, and the comment above.
J

#2 lore raw

Re: [PATCH] use-generic-bug-for-ppc resubmitted

Quoted 18 lines · Jeremy Fitzhardinge
Quoted 17 lines · Judith Lebzelter

Index: linux/arch/ppc/kernel/traps.c
===================================================================
--- linux.orig/arch/ppc/kernel/traps.c 2006-10-03
16:11:26.461653713 -0700
+++ linux/arch/ppc/kernel/traps.c 2006-10-04 10:00:21.198907987 -0700

(quoted diff) +1 -0
@@ -28,6 +28,7 @@
 #include <linux/init.h>
 #include <linux/module.h>
 #include <linux/prctl.h>
+#include <linux/bug.h>
 
 #include <asm/pgtable.h>
 #include <asm/uaccess.h>
@@ -568,55 +569,9 @@
 */
 extern struct bug_entry __start___bug_table[], __stop___bug_table[];
 
Quoted 7 lines

Review line 572

Quoted 4 lines
(quoted diff) +0 -3
-#ifndef CONFIG_MODULES
-#define module_find_bug(x)	NULL
-#endif
 

Looks like you need to delete a bit more here - the extern struct bug_entry, and the comment above.
J

Here is the generic bug ppc patch with the suggested change. It compiles without error.

---

arch/ppc/kernel/traps.c
arch/ppc/Kconfig

arch/ppc/Kconfig +5 -0
Index: linux/arch/ppc/Kconfig
===================================================================
@@ -52,6 +52,11 @@
 	bool
 	default y
 
+config GENERIC_BUG
+	bool
+	default y
+	depends on BUG
+
 source "init/Kconfig"
 
 menu "Processor"
arch/ppc/kernel/traps.c +6 -58

83 lines not on this page · raw message