All of lore.kernel.org
 help / color / mirror / Atom feed
From: Cyrill Gorcunov <gorcunov@gmail.com>
To: "H. Peter Anvin" <hpa@zytor.com>
Cc: David Woodhouse <dwmw2@infradead.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Ingo Molnar <mingo@elte.hu>
Subject: Re: x86: cleanup - rename VM_MASK to X86_VM_MASK
Date: Wed, 23 Apr 2008 22:58:59 +0400	[thread overview]
Message-ID: <20080423185859.GB7713@cvg> (raw)
In-Reply-To: <480F7C11.8040302@zytor.com>

[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@gmail.com>
Subject: [PATCH] reintroduce old VM86 flags for userlang backward compatibility

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.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

  parent reply	other threads:[~2008-04-23 18:59 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <200804181856.m3IIuKd4007403@hera.kernel.org>
2008-04-23  2:17 ` x86: cleanup - rename VM_MASK to X86_VM_MASK David Woodhouse
2008-04-23  4:18   ` Cyrill Gorcunov
2008-04-23  4:59     ` Cyrill Gorcunov
2008-04-23 18:12       ` H. Peter Anvin
2008-04-23 18:26         ` Cyrill Gorcunov
2008-04-23 18:58         ` Cyrill Gorcunov [this message]
2008-04-23 22:38           ` H. Peter Anvin
2008-04-23 22:48             ` David Woodhouse
2008-04-24  3:25               ` Cyrill Gorcunov
2008-04-24  5:31                 ` David Woodhouse
2008-04-24  5:34                   ` H. Peter Anvin
2008-04-24  8:38                     ` Cyrill Gorcunov
2008-04-27 10:09         ` Pavel Machek
2008-04-27 11:31           ` Rafael J. Wysocki
2008-04-27 11:55             ` Matthew Garrett
2008-04-27 15:46               ` Cyrill Gorcunov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20080423185859.GB7713@cvg \
    --to=gorcunov@gmail.com \
    --cc=dwmw2@infradead.org \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.