aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/i386/kernel/process.c7
-rw-r--r--arch/i386/kernel/signal.c2
-rw-r--r--include/asm-i386/processor.h8
-rw-r--r--include/asm-i386/suspend.h5
4 files changed, 9 insertions, 13 deletions
diff --git a/arch/i386/kernel/process.c b/arch/i386/kernel/process.c
index 36145efc61b5..b2203e21acb3 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)
558 */ 558 */
559 tss->io_bitmap_base = INVALID_IO_BITMAP_OFFSET_LAZY; 559 tss->io_bitmap_base = INVALID_IO_BITMAP_OFFSET_LAZY;
560} 560}
561/*
562 * This special macro can be used to load a debugging register
563 */
564#define loaddebug(thread,register) \
565 __asm__("movl %0,%%db" #register \
566 : /* no output */ \
567 :"r" (thread->debugreg[register]))
568 561
569/* 562/*
570 * switch_to(x,yn) should switch tasks from x to y. 563 * 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 ef3602e1c052..ea46d028af08 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)
618 * inside the kernel. 618 * inside the kernel.
619 */ 619 */
620 if (unlikely(current->thread.debugreg[7])) { 620 if (unlikely(current->thread.debugreg[7])) {
621 __asm__("movl %0,%%db7" : : "r" (current->thread.debugreg[7])); 621 loaddebug(&current->thread, 7);
622 } 622 }
623 623
624 /* Whee! Actually deliver the signal. */ 624 /* Whee! Actually deliver the signal. */
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;
diff --git a/include/asm-i386/suspend.h b/include/asm-i386/suspend.h
index dfc1114c1b6f..08be1e5009d4 100644
--- a/include/asm-i386/suspend.h
+++ b/include/asm-i386/suspend.h
@@ -36,11 +36,6 @@ struct saved_context {
36 unsigned long return_address; 36 unsigned long return_address;
37} __attribute__((packed)); 37} __attribute__((packed));
38 38
39#define loaddebug(thread,register) \
40 __asm__("movl %0,%%db" #register \
41 : /* no output */ \
42 :"r" ((thread)->debugreg[register]))
43
44#ifdef CONFIG_ACPI_SLEEP 39#ifdef CONFIG_ACPI_SLEEP
45extern unsigned long saved_eip; 40extern unsigned long saved_eip;
46extern unsigned long saved_esp; 41extern unsigned long saved_esp;