a patch for 2.0.33/gcc-2.8.1

Sergei Ivanov (svivanov@pdmi.ras.ru)
Wed, 1 Apr 1998 14:09:28 +0400 (MSD)


Hello

Sorry if I'm not the first guy talking about this.
I had to do the following patch after upgrading to gcc-2.8.1 (from 2.7.2.3)
-------------------
diff -urp linux-2.0.33/arch/i386/kernel/ioport.c linux/arch/i386/kernel/ioport.c
--- linux-2.0.33/arch/i386/kernel/ioport.c Wed Jan 11 22:10:53 1995
+++ linux/arch/i386/kernel/ioport.c Wed Apr 1 11:07:56 1998
@@ -76,7 +76,7 @@ unsigned int *stack;
asmlinkage int sys_iopl(long ebx,long ecx,long edx,
long esi, long edi, long ebp, long eax, long ds,
long es, long fs, long gs, long orig_eax,
- long eip,long cs,long eflags,long esp,long ss)
+ long eip,long cs,volatile long eflags,long esp,long ss)
{
unsigned int level = ebx;
--------------------
Reason: sys_iopl() has `*(&eflags)=...' at the end, and gcc-2.8.1
optimizes this to absolutely nothing, unless eflags is volatile.
On my system, this caused an X server to crash at probing the videocard.

Sergei

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu