All of lore.kernel.org
 help / color / mirror / Atom feed
From: gorcunov@gmail.com
To: hpa@zytor.com, mingo@elte.hu, tglx@linutronix.de
Cc: gorcunov@gmail.com, linux-kernel@vger.kernel.org
Subject: [patch 2/2] x86: cleanup - rename VM_MASK to X86_VM_MASK
Date: Fri, 28 Mar 2008 17:56:57 +0300	[thread overview]
Message-ID: <20080328150050.993920179@gmail.com> (raw)
In-Reply-To: 20080328145655.076024373@gmail.com

[-- Attachment #1: x86-vm86-vm-mask --]
[-- Type: text/plain, Size: 2790 bytes --]

This patch renames VM_MASK to X86_VM_MASK (which
in turn defined as alias to X86_EFLAGS_VM) to better
distinguish from virtual memory flags. We can't just
use X86_EFLAGS_VM instead because it is also used
for conditional compilation

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
---

Index: linux-2.6.git/arch/x86/kernel/traps_32.c
===================================================================
--- linux-2.6.git.orig/arch/x86/kernel/traps_32.c	2008-03-27 22:14:40.000000000 +0300
+++ linux-2.6.git/arch/x86/kernel/traps_32.c	2008-03-27 22:59:24.000000000 +0300
@@ -499,7 +499,7 @@ do_trap(int trapnr, int signr, char *str
 {
 	struct task_struct *tsk = current;
 
-	if (regs->flags & VM_MASK) {
+	if (regs->flags & X86_VM_MASK) {
 		if (vm86)
 			goto vm86_trap;
 		goto trap_signal;
Index: linux-2.6.git/arch/x86/mm/fault.c
===================================================================
--- linux-2.6.git.orig/arch/x86/mm/fault.c	2008-03-27 21:41:05.000000000 +0300
+++ linux-2.6.git/arch/x86/mm/fault.c	2008-03-27 23:00:40.000000000 +0300
@@ -667,7 +667,7 @@ void __kprobes do_page_fault(struct pt_r
 #ifdef CONFIG_X86_32
 	/* It's safe to allow irq's after cr2 has been saved and the vmalloc
 	   fault has been handled. */
-	if (regs->flags & (X86_EFLAGS_IF|VM_MASK))
+	if (regs->flags & (X86_EFLAGS_IF | X86_VM_MASK))
 		local_irq_enable();
 
 	/*
Index: linux-2.6.git/include/asm-x86/ptrace.h
===================================================================
--- linux-2.6.git.orig/include/asm-x86/ptrace.h	2008-03-27 21:41:05.000000000 +0300
+++ linux-2.6.git/include/asm-x86/ptrace.h	2008-03-27 22:59:09.000000000 +0300
@@ -170,7 +170,7 @@ static inline int user_mode(struct pt_re
 static inline int user_mode_vm(struct pt_regs *regs)
 {
 #ifdef CONFIG_X86_32
-	return ((regs->cs & SEGMENT_RPL_MASK) | (regs->flags & VM_MASK)) >=
+	return ((regs->cs & SEGMENT_RPL_MASK) | (regs->flags & X86_VM_MASK)) >=
 		USER_RPL;
 #else
 	return user_mode(regs);
@@ -180,7 +180,7 @@ static inline int user_mode_vm(struct pt
 static inline int v8086_mode(struct pt_regs *regs)
 {
 #ifdef CONFIG_X86_32
-	return (regs->flags & VM_MASK);
+	return (regs->flags & X86_VM_MASK);
 #else
 	return 0;	/* No V86 mode support in long mode */
 #endif
Index: linux-2.6.git/include/asm-x86/vm86.h
===================================================================
--- linux-2.6.git.orig/include/asm-x86/vm86.h	2008-03-27 21:44:15.000000000 +0300
+++ linux-2.6.git/include/asm-x86/vm86.h	2008-03-27 22:58:34.000000000 +0300
@@ -15,9 +15,9 @@
 #include <asm/processor-flags.h>
 
 #ifdef CONFIG_VM86
-#define VM_MASK		0x00020000
+#define X86_VM_MASK	X86_EFLAGS_VM
 #else
-#define VM_MASK		0 /* ignored */
+#define X86_VM_MASK	0 /* No VM86 support */
 #endif
 
 #define BIOSSEG		0x0f000

-- 

  parent reply	other threads:[~2008-03-28 15:01 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-03-28 14:56 [patch 0/2] x86 flags cleanup gorcunov
2008-03-28 14:56 ` [patch 1/2] x86: cleanup - replace most VM86 flags with flags from processor-flags.h gorcunov
2008-03-28 14:56 ` gorcunov [this message]
2008-03-28 16:42 ` [patch 0/2] x86 flags cleanup Ingo Molnar

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=20080328150050.993920179@gmail.com \
    --to=gorcunov@gmail.com \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=tglx@linutronix.de \
    /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.