[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20080423185859.GB7713@cvg>
Date: Wed, 23 Apr 2008 22:58:59 +0400
From: Cyrill Gorcunov <gorcunov@...il.com>
To: "H. Peter Anvin" <hpa@...or.com>
Cc: David Woodhouse <dwmw2@...radead.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
Ingo Molnar <mingo@...e.hu>
Subject: Re: x86: cleanup - rename VM_MASK to X86_VM_MASK
[H. Peter Anvin - Wed, Apr 23, 2008 at 11:12:33AM -0700]
> Cyrill Gorcunov wrote:
>> Hi David,
>> actually, this CONFIG_VM86 was there even before the renaming was done.
>> The main questions (imo) - is there any user space application who uses
>> these flags? If they are - then even the idea of this patch was a bit
>> bogus,
>> and I should *not* remove all these VM86 specific flags but better define
>> them
>> as aliases on flags from processor-flags.h.
>
> Hard to know. VM86 is only used by a handful of applications (DOSEMU,
> X.org, others?) but it's hard to know what exactly they are.
>
> The fact that noone hollered when that CONFIG_VM86 went in is probably a
> good hint that they don't matter, but it's hard to say for sure.
>
> -hpa
>
Peter, Ingo,
any objections on the patch like that?
---
From: Cyrill Gorcunov <gorcunov@...il.com>
Subject: [PATCH] reintroduce old VM86 flags for userlang backward compatibility
Signed-off-by: Cyrill Gorcunov <gorcunov@...il.com>
---
Index: linux-2.6.git/include/asm-x86/vm86.h
===================================================================
--- linux-2.6.git.orig/include/asm-x86/vm86.h 2008-04-23 22:38:58.000000000 +0400
+++ linux-2.6.git/include/asm-x86/vm86.h 2008-04-23 22:41:06.000000000 +0400
@@ -14,6 +14,18 @@
#include <asm/processor-flags.h>
+/* backward compatibility for userland */
+#ifndef __KERNEL__
+#define TF_MASK X86_EFLAGS_TF
+#define IF_MASK X86_EFLAGS_IF
+#define IOPL_MASK X86_EFLAGS_IOPL
+#define NT_MASK X86_EFLAGS_NT
+#define AC_MASK X86_EFLAGS_AC
+#define VIF_MASK X86_EFLAGS_VIF
+#define VIP_MASK X86_EFLAGS_VIP
+#define ID_MASK X86_EFLAGS_ID
+#endif
+
#ifdef CONFIG_VM86
#define X86_VM_MASK X86_EFLAGS_VM
#else
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists