mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-09-18 22:14:16 +00:00
[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>
This commit is contained in:
parent
893efca927
commit
2b514e74f4
4 changed files with 8 additions and 16 deletions
|
|
@ -508,7 +508,7 @@ out:
|
||||||
/*
|
/*
|
||||||
* This special macro can be used to load a debugging register
|
* 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.
|
* switch_to(x,y) should switch tasks from x to y.
|
||||||
|
|
|
||||||
|
|
@ -281,12 +281,12 @@ void __cpuinit cpu_init (void)
|
||||||
* Clear all 6 debug registers:
|
* Clear all 6 debug registers:
|
||||||
*/
|
*/
|
||||||
|
|
||||||
set_debug(0UL, 0);
|
set_debugreg(0UL, 0);
|
||||||
set_debug(0UL, 1);
|
set_debugreg(0UL, 1);
|
||||||
set_debug(0UL, 2);
|
set_debugreg(0UL, 2);
|
||||||
set_debug(0UL, 3);
|
set_debugreg(0UL, 3);
|
||||||
set_debug(0UL, 6);
|
set_debugreg(0UL, 6);
|
||||||
set_debug(0UL, 7);
|
set_debugreg(0UL, 7);
|
||||||
|
|
||||||
fpu_init();
|
fpu_init();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -39,9 +39,7 @@ extern unsigned long saved_context_r12, saved_context_r13, saved_context_r14, sa
|
||||||
extern unsigned long saved_context_eflags;
|
extern unsigned long saved_context_eflags;
|
||||||
|
|
||||||
#define loaddebug(thread,register) \
|
#define loaddebug(thread,register) \
|
||||||
__asm__("movq %0,%%db" #register \
|
set_debugreg((thread)->debugreg##register, register)
|
||||||
: /* no output */ \
|
|
||||||
:"r" ((thread)->debugreg##register))
|
|
||||||
|
|
||||||
extern void fix_processor_context(void);
|
extern void fix_processor_context(void);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -70,12 +70,6 @@ extern void load_gs_index(unsigned);
|
||||||
".previous" \
|
".previous" \
|
||||||
: :"r" (value), "r" (0))
|
: :"r" (value), "r" (0))
|
||||||
|
|
||||||
#define set_debug(value,register) \
|
|
||||||
__asm__("movq %0,%%db" #register \
|
|
||||||
: /* no output */ \
|
|
||||||
:"r" ((unsigned long) value))
|
|
||||||
|
|
||||||
|
|
||||||
#ifdef __KERNEL__
|
#ifdef __KERNEL__
|
||||||
struct alt_instr {
|
struct alt_instr {
|
||||||
__u8 *instr; /* original instruction */
|
__u8 *instr; /* original instruction */
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue