Messages in this thread | | | Date | Thu, 9 Dec 1999 08:55:47 -0500 (EST) | From | "Richard B. Johnson" <> | Subject | Re: 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/
| |