Red Hat axp-list: Linux on Alpha (1995-2022)
 help / color / mirror / Atom feed
* 2.1.30
@ 1997-03-27 23:58 Philip Blundell
  0 siblings, 0 replies; 3+ messages in thread
From: Philip Blundell @ 1997-03-27 23:58 UTC (permalink / raw)


Here are some patches I made to get 2.1.30 to compile on the Alpha.  I
hope they're broadly right.

I'm finding that gcc aborts when it tries to compile slip.o.  I presume
this is a gcc bug - is there a fix?

phil

diff -u -r1.1.1.1 smp_lock.h
--- linux/include/asm-alpha/smp_lock.h	1997/03/21 17:39:42	1.1.1.1
+++ linux/include/asm-alpha/smp_lock.h	1997/03/27 21:01:07
@@ -5,6 +5,8 @@
 
 #define lock_kernel()		do { } while(0)
 #define unlock_kernel()		do { } while(0)
+#define release_kernel_lock(task, cpu, depth)  ((depth) = 1)
+#define reaquire_kernel_lock(task, cpu, depth) do {} while (0)
 
 #else
 
diff -u -r1.1.1.1 system.h
--- linux/include/asm-alpha/system.h	1997/03/21 17:39:41	1.1.1.1
+++ linux/include/asm-alpha/system.h	1997/03/27 22:25:48
@@ -97,10 +97,15 @@
 	: "$0", "$1", "$16", "$22", "$23", "$24", "$25", "memory"); \
 __old_ipl; })
 
-#define cli()			setipl(7)
-#define sti()			setipl(0)
-#define save_flags(flags)	do { flags = getipl(); } while (0)
-#define restore_flags(flags)	setipl(flags)
+#define __cli()			setipl(7)
+#define __sti()			setipl(0)
+#define __save_flags(flags)	do { flags = getipl(); } while (0)
+#define __restore_flags(flags)	setipl(flags)
+
+#define cli()			__cli()
+#define sti()			__sti()
+#define save_flags(flags)	__save_flags(flags)
+#define restore_flags(flags)	__restore_flags(flags)
 
 /*
  * TB routines..
diff -u -r1.1.1.1 termios.h
--- linux/include/asm-alpha/termios.h	1997/03/21 17:39:42	1.1.1.1
+++ linux/include/asm-alpha/termios.h	1997/03/27 21:33:24
@@ -92,22 +92,13 @@
 }
 
 #define user_termio_to_kernel_termios(termios, termio) \
-do { \
+({ \
 	SET_LOW_TERMIOS_BITS(termios, termio, c_iflag); \
 	SET_LOW_TERMIOS_BITS(termios, termio, c_oflag); \
 	SET_LOW_TERMIOS_BITS(termios, termio, c_cflag); \
 	SET_LOW_TERMIOS_BITS(termios, termio, c_lflag); \
-	get_user((termios)->c_cc[VINTR], &(termio)->c_cc[_VINTR]); \
-	get_user((termios)->c_cc[VQUIT], &(termio)->c_cc[_VQUIT]); \
-	get_user((termios)->c_cc[VERASE], &(termio)->c_cc[_VERASE]); \
-	get_user((termios)->c_cc[VKILL], &(termio)->c_cc[_VKILL]); \
-	get_user((termios)->c_cc[VEOF], &(termio)->c_cc[_VEOF]); \
-	get_user((termios)->c_cc[VMIN], &(termio)->c_cc[_VMIN]); \
-	get_user((termios)->c_cc[VEOL], &(termio)->c_cc[_VEOL]); \
-	get_user((termios)->c_cc[VTIME], &(termio)->c_cc[_VTIME]); \
-	get_user((termios)->c_cc[VEOL2], &(termio)->c_cc[_VEOL2]); \
-	get_user((termios)->c_cc[VSWTC], &(termio)->c_cc[_VSWTC]); \
-} while(0)
+	copy_from_user((termios)->c_cc, (termio)->c_cc, NCC); \
+})
 
 /*
  * Translate a "termios" structure into a "termio". Ugh.
@@ -115,25 +106,14 @@
  * Note the "fun" _VMIN overloading.
  */
 #define kernel_termios_to_user_termio(termio, termios) \
-do { \
+({ \
 	put_user((termios)->c_iflag, &(termio)->c_iflag); \
 	put_user((termios)->c_oflag, &(termio)->c_oflag); \
 	put_user((termios)->c_cflag, &(termio)->c_cflag); \
 	put_user((termios)->c_lflag, &(termio)->c_lflag); \
 	put_user((termios)->c_line, &(termio)->c_line); \
-	put_user((termios)->c_cc[VINTR], &(termio)->c_cc[_VINTR]); \
-	put_user((termios)->c_cc[VQUIT], &(termio)->c_cc[_VQUIT]); \
-	put_user((termios)->c_cc[VERASE], &(termio)->c_cc[_VERASE]); \
-	put_user((termios)->c_cc[VKILL], &(termio)->c_cc[_VKILL]); \
-	put_user((termios)->c_cc[VEOF], &(termio)->c_cc[_VEOF]); \
-	put_user((termios)->c_cc[VEOL], &(termio)->c_cc[_VEOL]); \
-	put_user((termios)->c_cc[VEOL2], &(termio)->c_cc[_VEOL2]); \
-	put_user((termios)->c_cc[VSWTC], &(termio)->c_cc[_VSWTC]); \
-	if (!((termios)->c_lflag & ICANON)) { \
-		put_user((termios)->c_cc[VMIN], &(termio)->c_cc[_VMIN]); \
-		put_user((termios)->c_cc[VTIME], &(termio)->c_cc[_VTIME]); \
-	} \
-} while(0)
+	copy_to_user((termios)->c_cc, (termio)->c_cc, NCC); \
+})
 
 #define user_termios_to_kernel_termios(k, u) copy_from_user(k, u, sizeof(struct termios))
 #define kernel_termios_to_user_termios(u, k) copy_to_user(u, k, sizeof(struct termios))
--- /dev/null	Tue Jan  1 04:00:00 1980
+++ linux/include/asm-alpha/hardirq.h	Thu Mar 27 21:34:42 1997
@@ -0,0 +1,21 @@
+#ifndef __ASM_HARDIRQ_H
+#define __ASM_HARDIRQ_H
+
+extern unsigned int local_irq_count[NR_CPUS];
+#define in_interrupt()	(local_irq_count[smp_processor_id()] != 0)
+
+#ifndef __SMP__
+
+#define hardirq_trylock(cpu)	((cpu)==0)	/* always true */
+#define hardirq_endlock(cpu)	do { } while (0)
+
+#define hardirq_enter(cpu)	(local_irq_count[cpu]++)
+#define hardirq_exit(cpu)	(local_irq_count[cpu]--)
+
+#else
+
+#error No SMP on Alpha.
+
+#endif /* __SMP__ */
+
+#endif /* __ASM_HARDIRQ_H */
--- /dev/null	Tue Jan  1 04:00:00 1980
+++ linux/include/asm-alpha/softirq.h	Thu Mar 27 23:32:01 1997
@@ -0,0 +1,23 @@
+#ifndef __ASM_SOFTIRQ_H
+#define __ASM_SOFTIRQ_H
+
+/*
+ * Software interrupts..
+ */
+#define get_active_bhs()	(bh_mask & bh_active)
+#define clear_active_bhs(x)	(bh_active &= x)
+
+#ifdef __SMP__
+
+#error No SMP on Alpha.
+
+#else
+
+/* These are for the irq's testing the lock */
+#define softirq_trylock()	(intr_count ? 0 : ((intr_count=1),1))
+#define softirq_endlock()	(intr_count = 0)
+
+
+#endif
+
+#endif
--- /dev/null	Tue Jan  1 04:00:00 1980
+++ linux/include/asm-alpha/spinlock.h	Thu Mar 27 23:56:11 1997
@@ -0,0 +1,26 @@
+#ifndef __ASM_SPINLOCK_H
+#define __ASM_SPINLOCK_H
+
+#ifndef __SMP__
+
+typedef struct { } spinlock_t;
+#define SPIN_LOCK_UNLOCKED { }
+
+#define spin_lock_init(lock)	do { } while(0)
+#define spin_lock(lock)		do { } while(0)
+#define spin_trylock(lock)	do { } while(0)
+#define spin_unlock(lock)	do { } while(0)
+#define spin_lock_irq(lock)	cli()
+#define spin_unlock_irq(lock)	sti()
+
+#define spin_lock_irqsave(lock, flags) \
+	do { save_flags(flags); cli(); } while (0)
+#define spin_unlock_irqrestore(lock, flags) \
+	restore_flags(flags)
+
+#else
+
+#error _Still_ no SMP on Alpha. :-)
+
+#endif /* SMP */
+#endif /* __ASM_SPINLOCK_H */

--
To unsubscribe: send e-mail to axp-list-request@redhat.com with
'unsubscribe' as the subject.  Do not send it to axp-list@redhat.com

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: 2.1.30
       [not found] <Pine.LNX.3.95.970327235717.31338A-100000@kensington.london.uk.eu.org>
@ 1997-03-28  1:18 ` Matthew Geier
  0 siblings, 0 replies; 3+ messages in thread
From: Matthew Geier @ 1997-03-28  1:18 UTC (permalink / raw)


> 
> Here are some patches I made to get 2.1.30 to compile on the Alpha.  I
> hope they're broadly right.
> 

 I dont get past make dep..
sleeper:/usr/src/linux> make dep
gcc -O2 -fomit-frame-pointer -o scripts/mkdep scripts/mkdep.c
scripts/mkdep.c: In function `do_depend':
scripts/mkdep.c:247: `errno' undeclared (first use this function)
scripts/mkdep.c:247: (Each undeclared identifier is reported only once
scripts/mkdep.c:247: for each function it appears in.)
scripts/mkdep.c:247: `ENOENT' undeclared (first use this function)
make: *** [scripts/mkdep] Error 1
sleeper:/usr/src/linux> 

 Havent had a chance yet to engage brain and see what ive busted.

-- 
Matthew Geier,                 | Australian Public Access Network Association
matthew@sleeper.apana.org.au   | +61 2 9587 9773  
matthew@law.usyd.edu.au        |   018 977 356

    'There are worlds out there where the sky is burning, the seas
sleep, and the rivers dream; people made of smoke, and cities made of
song.  Somewhere there's danger, somewhere there's injustice, and somewhere
else the tea is getting cold.  Come on Ace, we've got work to do!'
                (Last words of the last Dr Who)

--
To unsubscribe: send e-mail to axp-list-request@redhat.com with
'unsubscribe' as the subject.  Do not send it to axp-list@redhat.com

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: 2.1.30
       [not found] <199703280118.MAA06055@sleeper.apana.org.au>
@ 1997-03-28 11:08 ` Philip Blundell
  0 siblings, 0 replies; 3+ messages in thread
From: Philip Blundell @ 1997-03-28 11:08 UTC (permalink / raw)


On Fri, 28 Mar 1997, Matthew Geier wrote:

>  I dont get past make dep..
> sleeper:/usr/src/linux> make dep
> gcc -O2 -fomit-frame-pointer -o scripts/mkdep scripts/mkdep.c
> scripts/mkdep.c: In function `do_depend':
> scripts/mkdep.c:247: `errno' undeclared (first use this function)
> scripts/mkdep.c:247: (Each undeclared identifier is reported only once
> scripts/mkdep.c:247: for each function it appears in.)
> scripts/mkdep.c:247: `ENOENT' undeclared (first use this function)
> make: *** [scripts/mkdep] Error 1
> sleeper:/usr/src/linux> 

Oh yeah.  You need to slap "#include <errno.h>" at the top of mkdep.c as
well.

P.

--
To unsubscribe: send e-mail to axp-list-request@redhat.com with
'unsubscribe' as the subject.  Do not send it to axp-list@redhat.com

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~1997-03-28 11:08 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <199703280118.MAA06055@sleeper.apana.org.au>
1997-03-28 11:08 ` 2.1.30 Philip Blundell
     [not found] <Pine.LNX.3.95.970327235717.31338A-100000@kensington.london.uk.eu.org>
1997-03-28  1:18 ` 2.1.30 Matthew Geier
1997-03-27 23:58 2.1.30 Philip Blundell

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox