diff --git a/arch/i386/kernel/process.c b/arch/i386/kernel/process.c index 36145efc61b5e7aeb6da9360942152b08f449c0d..b2203e21acb3844c597f770c8cef894f805a38b6 100644 --- a/arch/i386/kernel/process.c +++ b/arch/i386/kernel/process.c @@ -558,13 +558,6 @@ handle_io_bitmap(struct thread_struct *next, struct tss_struct *tss) */ tss->io_bitmap_base = INVALID_IO_BITMAP_OFFSET_LAZY; } -/* - * This special macro can be used to load a debugging register - */ -#define loaddebug(thread,register) \ - __asm__("movl %0,%%db" #register \ - : /* no output */ \ - :"r" (thread->debugreg[register])) /* * switch_to(x,yn) should switch tasks from x to y. diff --git a/arch/i386/kernel/signal.c b/arch/i386/kernel/signal.c index ef3602e1c05222449c2d20eefa91e82023e3d4e1..ea46d028af0872f5df65188503fcd9f71f3004e1 100644 --- a/arch/i386/kernel/signal.c +++ b/arch/i386/kernel/signal.c @@ -618,7 +618,7 @@ int fastcall do_signal(struct pt_regs *regs, sigset_t *oldset) * inside the kernel. */ if (unlikely(current->thread.debugreg[7])) { - __asm__("movl %0,%%db7" : : "r" (current->thread.debugreg[7])); + loaddebug(¤t->thread, 7); } /* Whee! Actually deliver the signal. */ diff --git a/include/asm-i386/processor.h b/include/asm-i386/processor.h index be258b0e5a5fb65e64da508e7a84fbc5eaa6cd45..7149784ed40bbde077e6ff0dbc68fc8cabead1b6 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 regs->esp = new_esp; \ } while (0) +/* + * This special macro can be used to load a debugging register + */ +#define loaddebug(thread,register) \ + __asm__("movl %0,%%db" #register \ + : /* no output */ \ + :"r" ((thread)->debugreg[register])) + /* Forward declaration, a strange C thing */ struct task_struct; struct mm_struct; diff --git a/include/asm-i386/suspend.h b/include/asm-i386/suspend.h index dfc1114c1b6f86f5d4b596cc9fef14336fbe332b..08be1e5009d4d773dbb77078674450ceb117f6ba 100644 --- a/include/asm-i386/suspend.h +++ b/include/asm-i386/suspend.h @@ -36,11 +36,6 @@ struct saved_context { unsigned long return_address; } __attribute__((packed)); -#define loaddebug(thread,register) \ - __asm__("movl %0,%%db" #register \ - : /* no output */ \ - :"r" ((thread)->debugreg[register])) - #ifdef CONFIG_ACPI_SLEEP extern unsigned long saved_eip; extern unsigned long saved_esp;