[Linux-ia64] kernel 2.5.69 doesn't compile for UP

From: Eric Piel <Eric.Piel_at_Bull.Net>
Date: 2003-05-14 23:31:08
Hello,
There is a compile error if not compiling for SMP:

  gcc -Wp,-MD,arch/ia64/kernel/.mca.o.d -D__KERNEL__ -Iinclude -Wall
-Wstrict-prototypes -Wno-trigraphs -g -O2 -fno-strict-aliasing
-fno-common -pipe  -ffixed-r13 -mfixed-range=f10-f15,f32-f127
-falign-functions=32 -fomit-frame-pointer -nostdinc -iwithprefix include
-mconstant-gp   -DKBUILD_BASENAME=mca -DKBUILD_MODNAME=mca -c -o
arch/ia64/kernel/mca.o arch/ia64/kernel/mca.c
arch/ia64/kernel/mca.c: In function `init_handler_platform':
arch/ia64/kernel/mca.c:347: structure has no member named `write_lock'
arch/ia64/kernel/mca.c:359: structure has no member named `write_lock'
make[1]: *** [arch/ia64/kernel/mca.o] Error 1
make: *** [arch/ia64/kernel] Error 2

It's a bit obvious, in UP tasklist_lock doesn't contain any member :-(
The attached patch let the compilation go. However I don't think it
looks good, there is probably a cleaner way to solve this problem but my
knowledge about the locks is really too little...

Eric
--- linux-2.5.69-ia64-perfmon/arch/ia64/kernel/mca.c	2003-05-12 13:21:54.000000000 +0200
+++ linux-2.5.69-ia64-030509.orig/arch/ia64/kernel/mca.c	2003-05-14 14:16:48.000000000 +0200
@@ -344,7 +344,9 @@
 	unw_init_from_interruption(&info, current, pt, sw);
 	ia64_do_show_stack(&info, NULL);
 
+#ifdef CONFIG_SMP
 	if (!tasklist_lock.write_lock)
+#endif
 		read_lock(&tasklist_lock);
 	{
 		struct task_struct *g, *t;
@@ -356,7 +358,9 @@
 			show_stack(t);
 		} while_each_thread (g, t);
 	}
+#ifdef CONFIG_SMP
 	if (!tasklist_lock.write_lock)
+#endif
 		read_unlock(&tasklist_lock);
 
 	printk("\nINIT dump complete.  Please reboot now.\n");
Received on Wed May 14 06:32:32 2003

This archive was generated by hypermail 2.1.8 : 2005-08-02 09:20:14 EST