diff options
author | Jan Beulich <jbeulich@novell.com> | 2006-03-25 10:29:22 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-03-25 12:10:52 -0500 |
commit | 2b514e74f4e59e3b8e54891580fef2c9ff6c7bd0 (patch) | |
tree | 106ddc876df761c2b3d9aa3ef27c576ad15ed54b | |
parent | 893efca9279d7a78bae6532de0524e53370819d5 (diff) |
[PATCH] x86_64: eliminate set_debug()
For consistency and to have only a single place of definition, replace
set_debug() uses with set_debugreg(), and eliminate the definition of
thj former.
Signed-off-by: Jan Beulich <jbeulich@novell.com>
Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-rw-r--r-- | arch/x86_64/kernel/process.c | 2 | ||||
-rw-r--r-- | arch/x86_64/kernel/setup64.c | 12 | ||||
-rw-r--r-- | include/asm-x86_64/suspend.h | 4 | ||||
-rw-r--r-- | include/asm-x86_64/system.h | 6 |
4 files changed, 8 insertions, 16 deletions
diff --git a/arch/x86_64/kernel/process.c b/arch/x86_64/kernel/process.c index 80a8f3079178..0cb93abbf564 100644 --- a/arch/x86_64/kernel/process.c +++ b/arch/x86_64/kernel/process.c | |||
@@ -508,7 +508,7 @@ out: | |||
508 | /* | 508 | /* |
509 | * This special macro can be used to load a debugging register | 509 | * This special macro can be used to load a debugging register |
510 | */ | 510 | */ |
511 | #define loaddebug(thread,r) set_debug(thread->debugreg ## r, r) | 511 | #define loaddebug(thread,r) set_debugreg(thread->debugreg ## r, r) |
512 | 512 | ||
513 | /* | 513 | /* |
514 | * switch_to(x,y) should switch tasks from x to y. | 514 | * switch_to(x,y) should switch tasks from x to y. |
diff --git a/arch/x86_64/kernel/setup64.c b/arch/x86_64/kernel/setup64.c index 349d55c2ac4e..044587812b05 100644 --- a/arch/x86_64/kernel/setup64.c +++ b/arch/x86_64/kernel/setup64.c | |||
@@ -281,12 +281,12 @@ void __cpuinit cpu_init (void) | |||
281 | * Clear all 6 debug registers: | 281 | * Clear all 6 debug registers: |
282 | */ | 282 | */ |
283 | 283 | ||
284 | set_debug(0UL, 0); | 284 | set_debugreg(0UL, 0); |
285 | set_debug(0UL, 1); | 285 | set_debugreg(0UL, 1); |
286 | set_debug(0UL, 2); | 286 | set_debugreg(0UL, 2); |
287 | set_debug(0UL, 3); | 287 | set_debugreg(0UL, 3); |
288 | set_debug(0UL, 6); | 288 | set_debugreg(0UL, 6); |
289 | set_debug(0UL, 7); | 289 | set_debugreg(0UL, 7); |
290 | 290 | ||
291 | fpu_init(); | 291 | fpu_init(); |
292 | } | 292 | } |
diff --git a/include/asm-x86_64/suspend.h b/include/asm-x86_64/suspend.h index bb9f40597d09..bc7f81715e5e 100644 --- a/include/asm-x86_64/suspend.h +++ b/include/asm-x86_64/suspend.h | |||
@@ -39,9 +39,7 @@ extern unsigned long saved_context_r12, saved_context_r13, saved_context_r14, sa | |||
39 | extern unsigned long saved_context_eflags; | 39 | extern unsigned long saved_context_eflags; |
40 | 40 | ||
41 | #define loaddebug(thread,register) \ | 41 | #define loaddebug(thread,register) \ |
42 | __asm__("movq %0,%%db" #register \ | 42 | set_debugreg((thread)->debugreg##register, register) |
43 | : /* no output */ \ | ||
44 | :"r" ((thread)->debugreg##register)) | ||
45 | 43 | ||
46 | extern void fix_processor_context(void); | 44 | extern void fix_processor_context(void); |
47 | 45 | ||
diff --git a/include/asm-x86_64/system.h b/include/asm-x86_64/system.h index b7f66034ae7a..397598980228 100644 --- a/include/asm-x86_64/system.h +++ b/include/asm-x86_64/system.h | |||
@@ -70,12 +70,6 @@ extern void load_gs_index(unsigned); | |||
70 | ".previous" \ | 70 | ".previous" \ |
71 | : :"r" (value), "r" (0)) | 71 | : :"r" (value), "r" (0)) |
72 | 72 | ||
73 | #define set_debug(value,register) \ | ||
74 | __asm__("movq %0,%%db" #register \ | ||
75 | : /* no output */ \ | ||
76 | :"r" ((unsigned long) value)) | ||
77 | |||
78 | |||
79 | #ifdef __KERNEL__ | 73 | #ifdef __KERNEL__ |
80 | struct alt_instr { | 74 | struct alt_instr { |
81 | __u8 *instr; /* original instruction */ | 75 | __u8 *instr; /* original instruction */ |