mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [RFC] VM86 patch
@ 2003-01-05 10:47 Kasper Dupont
  0 siblings, 0 replies; only message in thread
From: Kasper Dupont @ 2003-01-05 10:47 UTC (permalink / raw)
  To: Linux-Kernel

[-- Attachment #1: Type: text/plain, Size: 343 bytes --]

Is there some reason for not applying
http://dosemu.sourceforge.net/stas/traps.diff
to the 2.5 kernel? Or was it just forgotten?

I have attached a version that applies cleanly
to 2.5.54.

-- 
Kasper Dupont -- der bruger for meget tid på usenet.
For sending spam use mailto:aaarep@daimi.au.dk
for(_=52;_;(_%5)||(_/=5),(_%5)&&(_-=2))putchar(_);

[-- Attachment #2: vm86.2.5.54.patch --]
[-- Type: text/plain, Size: 571 bytes --]

diff -Nur linux.old/arch/i386/kernel/traps.c linux.new/arch/i386/kernel/traps.c
--- linux.old/arch/i386/kernel/traps.c	Sun Jan  5 11:26:56 2003
+++ linux.new/arch/i386/kernel/traps.c	Sun Jan  5 11:28:20 2003
@@ -320,8 +320,12 @@
 static inline void do_trap(int trapnr, int signr, char *str, int vm86,
 			   struct pt_regs * regs, long error_code, siginfo_t *info)
 {
-	if (vm86 && regs->eflags & VM_MASK)
-		goto vm86_trap;
+	if (regs->eflags & VM_MASK) {
+		if (vm86)
+			goto vm86_trap;
+		else
+			goto trap_signal;
+	}
 
 	if (!(regs->xcs & 3))
 		goto kernel_trap;

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2003-01-05 10:39 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-01-05 10:47 [RFC] VM86 patch Kasper Dupont

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®