Re: 2.1.36 patch needs --new-file

Miguel de Icaza (miguel@nuclecu.unam.mx)
24 Apr 1997 11:15:55 -0500


> 8-(
> And I thought 2.1.36 would work out of the box on Sparc finally...
> ho hum...

It won't work on some Sparcs with some hardware without this little
patch included.

Miguel.

Index: system.h
===================================================================
RCS file: /usr/x/cvs/linux/include/asm-sparc/system.h,v
retrieving revision 1.58
diff -u -r1.58 system.h
--- system.h 1997/04/18 05:44:54 1.58
+++ system.h 1997/04/24 00:00:12
@@ -136,9 +138,14 @@

__asm__ __volatile__("
rd %%psr, %0
- or %0, %1, %0
- wr %0, 0x0, %%psr
- nop; nop; nop
+ andcc %0, %1, %%g0
+ bne 1f
+ nop
+ wr %0, %1, %%psr
+ nop
+ nop
+ nop
+1:
" : "=r" (tmp)
: "i" (PSR_PIL)
: "memory");
@@ -150,9 +157,14 @@

__asm__ __volatile__("
rd %%psr, %0
- andn %0, %1, %0
- wr %0, 0x0, %%psr
- nop; nop; nop
+ andcc %0, %1, %%g0
+ be 1f
+ nop
+ wr %0, %1, %%psr
+ nop
+ nop
+ nop
+1:
" : "=r" (tmp)
: "i" (PSR_PIL)
: "memory");
@@ -177,7 +189,7 @@
xorcc %1, %2, %%g0
be 1f
nop
- wr %0, %4, %%psr
+ wr %0, %4, %%psr
nop
nop
nop
@@ -195,9 +207,14 @@

__asm__ __volatile__("
rd %%psr, %0
- or %0, %1, %%g1
- wr %%g1, 0x0, %%psr
- nop; nop; nop
+ andcc %0, %1, %%g0
+ bne 1f
+ nop
+ wr %0, %1, %%psr
+ nop
+ nop
+ nop
+1:
" : "=r" (retval)
: "i" (PSR_PIL)
: "g1", "memory");

-- 
miguel@roxanne.nuclecu.unam.mx     
The GNU Midnight Commander: http://mc.blackdown.org/mc
Linux/SPARC project:        http://www.geog.ubc.ca/sparclinux.html