From: Jan Beulich Date: Sat, 25 Mar 2006 15:29:22 +0000 (+0100) Subject: [PATCH] x86_64: eliminate set_debug() X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=2b514e74f4e59e3b8e54891580fef2c9ff6c7bd0;p=GitHub%2Fexynos8895%2Fandroid_kernel_samsung_universal8895.git [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 Signed-off-by: Andi Kleen Signed-off-by: Linus Torvalds --- 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: /* * This special macro can be used to load a debugging register */ -#define loaddebug(thread,r) set_debug(thread->debugreg ## r, r) +#define loaddebug(thread,r) set_debugreg(thread->debugreg ## r, r) /* * 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) * Clear all 6 debug registers: */ - set_debug(0UL, 0); - set_debug(0UL, 1); - set_debug(0UL, 2); - set_debug(0UL, 3); - set_debug(0UL, 6); - set_debug(0UL, 7); + set_debugreg(0UL, 0); + set_debugreg(0UL, 1); + set_debugreg(0UL, 2); + set_debugreg(0UL, 3); + set_debugreg(0UL, 6); + set_debugreg(0UL, 7); fpu_init(); } 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 extern unsigned long saved_context_eflags; #define loaddebug(thread,register) \ - __asm__("movq %0,%%db" #register \ - : /* no output */ \ - :"r" ((thread)->debugreg##register)) + set_debugreg((thread)->debugreg##register, register) extern void fix_processor_context(void); 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); ".previous" \ : :"r" (value), "r" (0)) -#define set_debug(value,register) \ - __asm__("movq %0,%%db" #register \ - : /* no output */ \ - :"r" ((unsigned long) value)) - - #ifdef __KERNEL__ struct alt_instr { __u8 *instr; /* original instruction */