* alpha patches for 2.1.36
@ 1997-04-27 2:20 Richard Henderson
0 siblings, 0 replies; 7+ messages in thread
From: Richard Henderson @ 1997-04-27 2:20 UTC (permalink / raw)
Whee. Two problems.
(1) Binutils 2.7.0.16 seems to have odd problems with the link
script. The problem being that I can't seem to catch it
doing anything in particular wrong. Nevertheless, it'll
hard-hang before getting going.
Oddly, the problem seems to go away when "-N" is removed.
I tested this solution successfully with both 2.7.0.2 and
2.7.0.16. Let me know if it goes awry for you.
(2) The gnifty ll/sc branch optimization I did hardcoded
changing back to .text, which really does bad things when
you start moving code to .text.init. Unfortunately the
assembler has a teeny bug in that you can't use .previous
after .text 2, so we simply have to back the change out
for now.
In any case, I'm currently running 2.1.36 and saving 16k worth
of initialization code and data. What fun!
r~
diff -up linux-2.1.36/include/asm-alpha/atomic.h.orig linux-2.1.36/include/asm-alpha/atomic.h
--- linux-2.1.36/include/asm-alpha/atomic.h.orig Sat Apr 26 20:23:46 1997
+++ linux-2.1.36/include/asm-alpha/atomic.h Sat Apr 26 20:27:22 1997
@@ -40,10 +40,7 @@ extern __inline__ void atomic_add(int i,
"1: ldl_l %0,%1\n"
" addl %0,%2,%0\n"
" stl_c %0,%1\n"
- " beq %0,2f\n"
- ".text 2\n"
- "2: br 1b\n"
- ".text"
+ " beq %0,1b\n"
:"=&r" (temp), "=m" (__atomic_fool_gcc(v))
:"Ir" (i), "m" (__atomic_fool_gcc(v)));
}
@@ -55,10 +52,7 @@ extern __inline__ void atomic_sub(int i,
"1: ldl_l %0,%1\n"
" subl %0,%2,%0\n"
" stl_c %0,%1\n"
- " beq %0,2f\n"
- ".text 2\n"
- "2: br 1b\n"
- ".text"
+ " beq %0,1b\n"
:"=&r" (temp), "=m" (__atomic_fool_gcc(v))
:"Ir" (i), "m" (__atomic_fool_gcc(v)));
}
@@ -74,10 +68,7 @@ extern __inline__ long atomic_add_return
" addl %0,%3,%0\n"
" mov %0,%2\n"
" stl_c %0,%1\n"
- " beq %0,2f\n"
- ".text 2\n"
- "2: br 1b\n"
- ".text"
+ " beq %0,1b\n"
:"=&r" (temp), "=m" (__atomic_fool_gcc(v)), "=&r" (result)
:"Ir" (i), "m" (__atomic_fool_gcc(v)));
return result;
@@ -91,10 +82,7 @@ extern __inline__ long atomic_sub_return
" subl %0,%3,%0\n"
" mov %0,%2\n"
" stl_c %0,%1\n"
- " beq %0,2f\n"
- ".text 2\n"
- "2: br 1b\n"
- ".text"
+ " beq %0,1b\n"
:"=&r" (temp), "=m" (__atomic_fool_gcc(v)), "=&r" (result)
:"Ir" (i), "m" (__atomic_fool_gcc(v)));
return result;
diff -up linux-2.1.36/include/asm-alpha/bitops.h.orig linux-2.1.36/include/asm-alpha/bitops.h
--- linux-2.1.36/include/asm-alpha/bitops.h.orig Sat Apr 26 20:23:54 1997
+++ linux-2.1.36/include/asm-alpha/bitops.h Sat Apr 26 20:28:07 1997
@@ -29,11 +29,8 @@ extern __inline__ unsigned long set_bit(
" bne %2,2f\n"
" xor %0,%3,%0\n"
" stl_c %0,%1\n"
- " beq %0,3f\n"
+ " beq %0,1b\n"
"2:\n"
- ".text 2\n"
- "3: br 1b\n"
- ".text"
:"=&r" (temp), "=m" (*m), "=&r" (oldbit)
:"Ir" (1UL << (nr & 31)), "m" (*m));
@@ -52,11 +49,8 @@ extern __inline__ unsigned long clear_bi
" beq %2,2f\n\t"
" xor %0,%3,%0\n\t"
" stl_c %0,%1\n\t"
- " beq %0,3f\n"
+ " beq %0,1b\n"
"2:\n"
- ".text 2\n"
- "3: br 1b\n"
- ".text"
:"=&r" (temp), "=m" (*m), "=&r" (oldbit)
:"Ir" (1UL << (nr & 31)), "m" (*m));
@@ -74,10 +68,7 @@ extern __inline__ unsigned long change_b
" and %0,%3,%2\n\t"
" xor %0,%3,%0\n\t"
" stl_c %0,%1\n\t"
- " beq %0,3f\n"
- ".text 2\n"
- "3: br 1b\n"
- ".text"
+ " beq %0,1b\n"
:"=&r" (temp), "=m" (*m), "=&r" (oldbit)
:"Ir" (1UL << (nr & 31)), "m" (*m));
diff -up linux-2.1.36/include/asm-alpha/semaphore.h.orig linux-2.1.36/include/asm-alpha/semaphore.h
--- linux-2.1.36/include/asm-alpha/semaphore.h.orig Sat Apr 26 20:23:59 1997
+++ linux-2.1.36/include/asm-alpha/semaphore.h Sat Apr 26 20:28:52 1997
@@ -45,11 +45,8 @@ static inline int waking_non_zero(struct
" ble %1,2f\n"
" subl %1,1,%0\n"
" stl_c %0,%2\n"
- " beq %0,3f\n"
+ " beq %0,1b\n"
"2:\n"
- ".text 2\n"
- "3: br 1b\n"
- ".text"
: "=r"(ret), "=r"(tmp), "=m"(__atomic_fool_gcc(&sem->waking))
: "0"(0));
diff -up linux-2.1.36/include/asm-alpha/softirq.h.orig linux-2.1.36/include/asm-alpha/softirq.h
--- linux-2.1.36/include/asm-alpha/softirq.h.orig Sat Apr 26 20:24:04 1997
+++ linux-2.1.36/include/asm-alpha/softirq.h Sat Apr 26 20:29:27 1997
@@ -16,10 +16,7 @@ static inline void clear_active_bhs(unsi
"1: ldq_l %0,%1\n"
" and %0,%2,%0\n"
" stq_c %0,%1\n"
- " beq %0,2f\n"
- ".text 2\n"
- "2: br 1b\n"
- ".text"
+ " beq %0,1b\n"
:"=&r" (temp), "=m" (bh_active)
:"Ir" (x), "m" (bh_active));
}
diff -up linux-2.1.36/include/asm-alpha/spinlock.h.orig linux-2.1.36/include/asm-alpha/spinlock.h
--- linux-2.1.36/include/asm-alpha/spinlock.h.orig Sat Apr 26 20:24:09 1997
+++ linux-2.1.36/include/asm-alpha/spinlock.h Sat Apr 26 20:30:10 1997
@@ -39,10 +39,10 @@ typedef struct { } rwlock_t;
#define write_lock_irq(lock) cli()
#define write_unlock_irq(lock) sti()
-#define read_lock_irqsave(lock, flags) save_and_cli(flags)
-#define read_unlock_irqrestore(lock, flags) restore_flags(flags)
-#define write_lock_irqsave(lock, flags) save_and_cli(flags)
-#define write_unlock_irqrestore(lock, flags) restore_flags(flags)
+#define read_lock_irqsave(lock, flags) swpipl(flags,7)
+#define read_unlock_irqrestore(lock, flags) setipl(flags)
+#define write_lock_irqsave(lock, flags) swpipl(flags,7)
+#define write_unlock_irqrestore(lock, flags) setipl(flags)
#else
diff -up linux-2.1.36/include/asm-alpha/system.h.orig linux-2.1.36/include/asm-alpha/system.h
--- linux-2.1.36/include/asm-alpha/system.h.orig Sat Apr 26 20:24:14 1997
+++ linux-2.1.36/include/asm-alpha/system.h Sat Apr 26 20:30:38 1997
@@ -128,10 +128,7 @@ extern __inline__ unsigned long xchg_u32
"1: ldl_l %0,%2\n"
" bis %3,%3,%1\n"
" stl_c %1,%2\n"
- " beq %1,2f\n"
- ".text 2\n"
- "2: br 1b\n"
- ".text"
+ " beq %1,1b\n"
: "=&r" (val), "=&r" (dummy), "=m" (*m)
: "r" (val), "m" (*m));
@@ -146,10 +143,7 @@ extern __inline__ unsigned long xchg_u64
"1: ldq_l %0,%2\n"
" bis %3,%3,%1\n"
" stq_c %1,%2\n"
- " beq %1,2f\n"
- ".text 2\n"
- "2: br 1b\n"
- ".text"
+ " beq %1,1b\n"
: "=&r" (val), "=&r" (dummy), "=m" (*m)
: "r" (val), "m" (*m));
diff -up linux-2.1.36/arch/alpha/Makefile.orig linux-2.1.36/arch/alpha/Makefile
--- linux-2.1.36/arch/alpha/Makefile.orig Sat Apr 26 20:23:23 1997
+++ linux-2.1.36/arch/alpha/Makefile Sat Apr 26 20:22:57 1997
@@ -10,7 +10,7 @@
NM := nm -B
-LINKFLAGS = -static -T arch/alpha/vmlinux.lds -N
+LINKFLAGS = -static -T arch/alpha/vmlinux.lds
CFLAGS := $(CFLAGS) -pipe -mno-fp-regs -ffixed-8
HEAD := arch/alpha/kernel/head.o
--
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] 7+ messages in thread[parent not found: <richard@stommel.tamu.edu>]
* Re: alpha patches for 2.1.36
[not found] <richard@stommel.tamu.edu>
@ 1997-04-27 5:19 ` Bryan W. Headley
1997-04-27 6:35 ` Richard Henderson
` (2 more replies)
1997-04-27 17:08 ` Bryan W. Headley
1 sibling, 3 replies; 7+ messages in thread
From: Bryan W. Headley @ 1997-04-27 5:19 UTC (permalink / raw)
On Apr 26, 9:20pm, Richard Henderson wrote:
> Subject: alpha patches for 2.1.36
> Whee. Two problems.
>
> (1) Binutils 2.7.0.16 seems to have odd problems with the link
> script. The problem being that I can't seem to catch it
> doing anything in particular wrong. Nevertheless, it'll
> hard-hang before getting going.
>
> Oddly, the problem seems to go away when "-N" is removed.
> I tested this solution successfully with both 2.7.0.2 and
> 2.7.0.16. Let me know if it goes awry for you.
>
> (2) The gnifty ll/sc branch optimization I did hardcoded
> changing back to .text, which really does bad things when
> you start moving code to .text.init. Unfortunately the
> assembler has a teeny bug in that you can't use .previous
> after .text 2, so we simply have to back the change out
> for now.
Rich,
On the UDB I keep cycling through MILO -- load 2.1.36, try to do a jump, end up
back at milo initialization. Any ideas? Should I pull some of your asm patches
back?
--
Bryan W. Headley Home: bheadley@interaccess.com
211 East Pineview Drive Office: bwh@abnamro.com
Round Lake Park, IL 60073 Phone: 847 740-1446
--
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] 7+ messages in thread* Re: alpha patches for 2.1.36
1997-04-27 5:19 ` Bryan W. Headley
@ 1997-04-27 6:35 ` Richard Henderson
1997-04-27 8:41 ` Matthew Geier
1997-04-27 18:56 ` D. Champion
2 siblings, 0 replies; 7+ messages in thread
From: Richard Henderson @ 1997-04-27 6:35 UTC (permalink / raw)
> On the UDB I keep cycling through MILO -- load 2.1.36, try to do a jump,
> end up back at milo initialization. Any ideas?
Er.. milo version? binutils version?
r~
--
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] 7+ messages in thread
* Re: alpha patches for 2.1.36
1997-04-27 5:19 ` Bryan W. Headley
1997-04-27 6:35 ` Richard Henderson
@ 1997-04-27 8:41 ` Matthew Geier
1997-04-27 18:56 ` D. Champion
2 siblings, 0 replies; 7+ messages in thread
From: Matthew Geier @ 1997-04-27 8:41 UTC (permalink / raw)
>
> On the UDB I keep cycling through MILO -- load 2.1.36, try to do a jump, end up
> back at milo initialization. Any ideas? Should I pull some of your asm patches
> back?
>
My noname does the same thing if its any consolation.
--
Matthew Geier, | Australian Public Access Network Association
matthew@sleeper.apana.org.au | +61 2 9587 9773
matthew@law.usyd.edu.au | 018 977 356
--
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] 7+ messages in thread
* Re: alpha patches for 2.1.36
1997-04-27 5:19 ` Bryan W. Headley
1997-04-27 6:35 ` Richard Henderson
1997-04-27 8:41 ` Matthew Geier
@ 1997-04-27 18:56 ` D. Champion
2 siblings, 0 replies; 7+ messages in thread
From: D. Champion @ 1997-04-27 18:56 UTC (permalink / raw)
>On the UDB I keep cycling through MILO -- load 2.1.36, try to do a jump, end up
>back at milo initialization.
I've frequently had the same problem on the UDB, using whatever MILO
comes with RH 4.0 (can't check now) and binutils 2.7.0.2. The only
think about it I've had chance to discover so far is that between
2.1.29, I think, and 2.1.32, disabling the sound and VFAT drivers
allows the rest of my configuration to build a bootable kernel. I
haven't tried anything since 2.1.32 yet, nor have I had an
opportunity to try with rth's binutils 2.7.0.16 (nor to upgrade
MILO). I didn't try isolating the problem at all before 2.1.29.
Hope that's useful. I'm trying to imply that there aren't other
config options that also invoke whatever bug prevents a kernel jump.
-D.
--
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] 7+ messages in thread
* Re: alpha patches for 2.1.36
[not found] <richard@stommel.tamu.edu>
1997-04-27 5:19 ` Bryan W. Headley
@ 1997-04-27 17:08 ` Bryan W. Headley
1997-04-27 20:44 ` Bryan W. Headley
1 sibling, 1 reply; 7+ messages in thread
From: Bryan W. Headley @ 1997-04-27 17:08 UTC (permalink / raw)
On Apr 27, 1:35am, Richard Henderson wrote:
> Subject: Re: alpha patches for 2.1.36
> > On the UDB I keep cycling through MILO -- load 2.1.36, try to do a jump,
> > end up back at milo initialization. Any ideas?
>
> Er.. milo version? binutils version?
>
milo 2.0.28; binutils 2.7.0.2. Got 2.8.1 lying around, but haven't built it.
--
Bryan W. Headley Home: bheadley@interaccess.com
211 East Pineview Drive Office: bwh@abnamro.com
Round Lake Park, IL 60073 Phone: 847 740-1446
--
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] 7+ messages in thread* Re: alpha patches for 2.1.36
1997-04-27 17:08 ` Bryan W. Headley
@ 1997-04-27 20:44 ` Bryan W. Headley
0 siblings, 0 replies; 7+ messages in thread
From: Bryan W. Headley @ 1997-04-27 20:44 UTC (permalink / raw)
On Apr 27, 12:08pm, Bryan W. Headley wrote:
> Subject: Re: alpha patches for 2.1.36
> On Apr 27, 1:35am, Richard Henderson wrote:
> > Subject: Re: alpha patches for 2.1.36
> > > On the UDB I keep cycling through MILO -- load 2.1.36, try to do a jump,
> > > end up back at milo initialization. Any ideas?
> >
> > Er.. milo version? binutils version?
> >
> milo 2.0.28; binutils 2.7.0.2. Got 2.8.1 lying around, but haven't built it.
Replying to myself (which is a sign of *something*), I upgraded milo to
2.0.29+,
binutils to 2.8.0.1 (an HJ special), and recompiled. No go. So I'm downloading
the alphabits binutils, and poking around. One thing which I note: there's
no definition of save_and_cli(flags), so I put this into
include/asm-alpha/system.h:
#define save_and_cli(flags) swipl(flags,7)
Yes, no, maybe some malfeasance occurs to you...? Well, it's back to 2.0.29 :-(
--
Bryan W. Headley Home: bheadley@interaccess.com
211 East Pineview Drive Office: bwh@abnamro.com
Round Lake Park, IL 60073 Phone: 847 740-1446
--
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] 7+ messages in thread
end of thread, other threads:[~1997-04-27 20:44 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1997-04-27 2:20 alpha patches for 2.1.36 Richard Henderson
[not found] <richard@stommel.tamu.edu>
1997-04-27 5:19 ` Bryan W. Headley
1997-04-27 6:35 ` Richard Henderson
1997-04-27 8:41 ` Matthew Geier
1997-04-27 18:56 ` D. Champion
1997-04-27 17:08 ` Bryan W. Headley
1997-04-27 20:44 ` Bryan W. Headley
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox