2.1.34 build failure on sparc, patch enclosed

Simon Karpen (slk@teroknor.stu.rpi.edu)
Tue, 15 Apr 1997 08:35:53 -0400 (EDT)


2.1.34 fails to build on sparc. fairly minimal configuration, no modules.

it appears that wake_one_more is undefined in
include/asm-sparc/semaphore.h

this patch is in the 'seems-to-work' stage.
as far as I can tell, it works.

--- include/asm-sparc/semaphore.h.orig Tue Apr 15 00:06:03 1997
+++ include/asm-sparc/semaphore.h Tue Apr 15 00:47:10 1997
@@ -22,6 +22,21 @@

#define sema_init(sem, val) atomic_set(&((sem)->count), val)

+/* wake_one_more from i386 kludged to work here since it
+was missing. hopefully this works.
+done by Simon Karpen, karpes@rpi.edu on 4/15/97 */
+
+static inline void wake_one_more(struct semaphore *sem)
+{
+ unsigned long flags;
+
+ save_flags(flags);
+ cli();
+ atomic_inc(&sem->waking);
+ restore_flags(flags);
+}
+
+
static inline int waking_non_zero(struct semaphore *sem)
{
unsigned long flags;

make[1]: Leaving directory `/home/slk/dl/linux/lib'
make[1]: Entering directory `/home/slk/dl/linux/arch/sparc/kernel'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/home/slk/dl/linux/arch/sparc/kernel'
make[1]: Entering directory `/home/slk/dl/linux/arch/sparc/lib'
make[1]: `lib.a' is up to date.
make[1]: Leaving directory `/home/slk/dl/linux/arch/sparc/lib'
make[1]: Entering directory `/home/slk/dl/linux/arch/sparc/mm'
make all_targets
make[2]: Entering directory `/home/slk/dl/linux/arch/sparc/mm'
make[2]: Nothing to be done for `all_targets'.
make[2]: Leaving directory `/home/slk/dl/linux/arch/sparc/mm'
make[1]: Leaving directory `/home/slk/dl/linux/arch/sparc/mm'
make[1]: Entering directory `/home/slk/dl/linux/arch/sparc/prom'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/home/slk/dl/linux/arch/sparc/prom'
ld -T arch/sparc/vmlinux.lds arch/sparc/kernel/head.o init/main.o init/version.o \
arch/sparc/kernel/kernel.o arch/sparc/mm/mm.o kernel/kernel.o mm/mm.o fs/fs.o ipc/ipc.o \
fs/filesystems.a \
net/network.a \
drivers/block/block.a drivers/char/char.a drivers/net/net.a drivers/scsi/scsi.a drivers/sbus/sbus.a \
/home/slk/dl/linux/lib/lib.a /home/slk/dl/linux/lib/lib.a /home/slk/dl/linux/arch/sparc/prom/promlib.a /home/slk/dl/linux/arch/sparc/lib/lib.a \
-o vmlinux
kernel/kernel.o: In function `__up':
kernel/kernel.o(.text+0x8f4): undefined reference to `wake_one_more'
make: *** [vmlinux] Error 1
[root@teroknor linux]# exit
exit

Script done on Mon Apr 14 23:28:03 1997

Simon Karpen
karpes@rpi.edu, slk@acm.rpi.edu, slk@karpes.stu.rpi.edu
-rw-rw-rw- : the file permissions of the beast