lkml.org 
[lkml]   [1999]   [Dec]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: linux-2.3.31: drivers/char/drm/drmP.h does not allow 386 build
On Thu, 9 Dec 1999, Martin Mares wrote:

> Hello,
>
> > The best solution is to modify the illegal instruction trap to
> > emulate the missing insn on x86 via cli+sti. This would be useful
> > from userland as well. It doesn't win speed awards, but it's easy
> > correctness without punishing Real Computers.
>
> I've not looked at the code yet, but I guess it does use cmpxchg
> to avoid races with card DMA, not with interrupts, hence cli+sti
> won't help.
>
> Have a nice fortnight

Sure. The trap never accesses data off the stack so a simple:

pushf
cli
...emulate
popf

Does it all whether or not it was entered with the interrupts off. The
illegal instruction trap will occur even if the interrupts are off.
This is because the interrupt flag only affects the CPUs response to
the INTR pin on the processor, not internally generated faults, traps,
interrupts, or aborts. Note you can execute a software interrupt with
the interrupts disabled.

Cheers,
Dick Johnson

Penguin : Linux version 2.3.13 on an i686 machine (400.59 BogoMips).
Warning : The end of the world as we know it requires a new calendar.
Seconds : 1955053 (until Y2K)


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:55    [W:0.049 / U:0.396 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site