From: Chuck Ebbert <76306.1226@compuserve.com>
To: linux-kernel <linux-kernel@vger.kernel.org>
Cc: Andrew Morton <akpm@osdl.org>, Linus Torvalds <torvalds@osdl.org>,
Vincent Hanquez <vincent.hanquez@cl.cam.ac.uk>,
Andi Kleen <ak@suse.de>
Subject: [patch 2.6.13-rc3] i386: clean up user_mode macros
Date: Mon, 25 Jul 2005 18:59:19 -0400 [thread overview]
Message-ID: <200507251901_MC3-1-A589-A433@compuserve.com> (raw)
Recent patches from the Xen group changed the X86 user_mode macros.
This patch does the following:
1. Makes the new user_mode() return 0 or 1 (same as x86_64)
2. Removes conditional jump from user_mode_vm()
(it's called every timer tick on each CPU on SMP)
I've been running this patch for a while now. Please apply.
Signed-off-by: Chuck Ebbert <76306.1226@compuserve.com>
Index: 2.6.13-rc3a/include/asm-i386/ptrace.h
===================================================================
--- 2.6.13-rc3a.orig/include/asm-i386/ptrace.h 2005-07-13 16:20:26.000000000 -0400
+++ 2.6.13-rc3a/include/asm-i386/ptrace.h 2005-07-14 02:47:51.000000000 -0400
@@ -57,8 +57,8 @@
#ifdef __KERNEL__
struct task_struct;
extern void send_sigtrap(struct task_struct *tsk, struct pt_regs *regs, int error_code);
-#define user_mode(regs) (3 & (regs)->xcs)
-#define user_mode_vm(regs) ((VM_MASK & (regs)->eflags) || user_mode(regs))
+#define user_mode(regs) (!!(3 & (regs)->xcs))
+#define user_mode_vm(regs) (!!((VM_MASK & (regs)->eflags) | (3 & (regs)->xcs)))
#define instruction_pointer(regs) ((regs)->eip)
#if defined(CONFIG_SMP) && defined(CONFIG_FRAME_POINTER)
extern unsigned long profile_pc(struct pt_regs *regs);
__
Chuck
next reply other threads:[~2005-07-25 23:03 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-07-25 22:59 Chuck Ebbert [this message]
2005-07-25 23:13 ` Linus Torvalds
2005-07-26 0:20 ` Steven Rostedt
2005-07-26 2:45 ` Lee Revell
2005-07-26 1:28 ` Miles Bader
2005-07-26 1:34 ` Andrew Morton
2005-07-26 2:31 ` randy_dunlap
2005-07-27 1:57 Chuck Ebbert
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=200507251901_MC3-1-A589-A433@compuserve.com \
--to=76306.1226@compuserve.com \
--cc=ak@suse.de \
--cc=akpm@osdl.org \
--cc=linux-kernel@vger.kernel.org \
--cc=torvalds@osdl.org \
--cc=vincent.hanquez@cl.cam.ac.uk \
/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 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®