Re: x86: cleanup - rename VM_MASK to X86_VM_MASK
From: Cyrill Gorcunov
Date: Wed Apr 23 2008 - 14:59:55 EST
[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@xxxxxxxxx>
Subject: [PATCH] reintroduce old VM86 flags for userlang backward compatibility
Signed-off-by: Cyrill Gorcunov <gorcunov@xxxxxxxxx>
---
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@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/