aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-i386/processor.h
diff options
context:
space:
mode:
authorRoland McGrath <roland@redhat.com>2005-04-16 18:24:46 -0400
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-04-16 18:24:46 -0400
commitecd02dddd1d5bfc2141cbd0e205a53fb9d849c9e (patch)
tree06660dbabc1df1a5c6ee23d48bb07e09e2960a88 /include/asm-i386/processor.h
parentb0a70b57f909647d79e0cc30772a0664fbf9830a (diff)
[PATCH] i386: Use loaddebug macro consistently
This moves the macro loaddebug from asm-i386/suspend.h to asm-i386/processor.h, which is the place that makes sense for it to be defined, removes the extra copy of the same macro in arch/i386/kernel/process.c, and makes arch/i386/kernel/signal.c use the macro in place of its expansion. This is a purely cosmetic cleanup for the normal i386 kernel. However, it is handy for Xen to be able to just redefine the loaddebug macro once instead of also changing the signal.c code. Signed-off-by: Roland McGrath <roland@redhat.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'include/asm-i386/processor.h')
-rw-r--r--include/asm-i386/processor.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/include/asm-i386/processor.h b/include/asm-i386/processor.h
index be258b0e5a5f..7149784ed40b 100644
--- a/include/asm-i386/processor.h
+++ b/include/asm-i386/processor.h
@@ -499,6 +499,14 @@ static inline void load_esp0(struct tss_struct *tss, struct thread_struct *threa
499 regs->esp = new_esp; \ 499 regs->esp = new_esp; \
500} while (0) 500} while (0)
501 501
502/*
503 * This special macro can be used to load a debugging register
504 */
505#define loaddebug(thread,register) \
506 __asm__("movl %0,%%db" #register \
507 : /* no output */ \
508 :"r" ((thread)->debugreg[register]))
509
502/* Forward declaration, a strange C thing */ 510/* Forward declaration, a strange C thing */
503struct task_struct; 511struct task_struct;
504struct mm_struct; 512struct mm_struct;