Re: [PATCH] x86: Introduce REX prefix helper for kprobes

2007-12-30 Thread Harvey Harrison
On Sat, 2007-12-29 at 23:04 -0800, H. Peter Anvin wrote: > Masami Hiramatsu wrote: > > Hi Harvey, > > > > Harvey Harrison wrote: > >> Fold some small ifdefs into a helper function. > >> > >> Signed-off-by: Harvey Harrison <[EMAIL PROTECTED]> > >> --- > >> Masami, Ingo, I had this left in some unse

Re: [PATCH] x86: Introduce REX prefix helper for kprobes

2007-12-30 Thread Ingo Molnar
* Harvey Harrison <[EMAIL PROTECTED]> wrote: > Fold some small ifdefs into a helper function. > > Signed-off-by: Harvey Harrison <[EMAIL PROTECTED]> thanks, applied. Ingo -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTE

Re: [PATCH] x86: Introduce REX prefix helper for kprobes

2007-12-30 Thread Ingo Molnar
* Masami Hiramatsu <[EMAIL PROTECTED]> wrote: > > Why is a macro better than an inline, and why the odd mIXed case? > > I thought we can use macro because it just check a bit mask. And if we > use this as a macro, it will be defined in #ifdef block at the top of > kprobes.c. It is simple in th

Re: [PATCH] x86: Introduce REX prefix helper for kprobes

2007-12-30 Thread Masami Hiramatsu
Masami Hiramatsu wrote: > (in case of CONFIG_X86_64) > static inline int is_rex_prefix(int op) Oops, s/int op/kprobe_opcode_t opcode/ > About the name, I just used the previous inline function name. I re-think "is_REX_prefix" is better, because it is an architecture dependent notation(intel's so

Re: [PATCH] x86: Introduce REX prefix helper for kprobes

2007-12-30 Thread Masami Hiramatsu
Hi, H. Peter Anvin wrote: >> Could you use a macro same as the stack_addr() macro, like as below? >> >> #defile is_REX_prefix(insn) ((insn & 0xf0) == 0x40)) >> >> This is just a bit checker, so I think a macro is better to do that. >> > > Why is a macro better than an inline, and why the odd mIXe

Re: [PATCH] x86: Introduce REX prefix helper for kprobes

2007-12-29 Thread H. Peter Anvin
Masami Hiramatsu wrote: > Hi Harvey, > > Harvey Harrison wrote: >> Fold some small ifdefs into a helper function. >> >> Signed-off-by: Harvey Harrison <[EMAIL PROTECTED]> >> --- >> Masami, Ingo, I had this left in some unsent kprobes unification >> work. Depends on your tastes, but does reduce if

Re: [PATCH] x86: Introduce REX prefix helper for kprobes

2007-12-29 Thread Masami Hiramatsu
Hi Harvey, Harvey Harrison wrote: > Fold some small ifdefs into a helper function. > > Signed-off-by: Harvey Harrison <[EMAIL PROTECTED]> > --- > Masami, Ingo, I had this left in some unsent kprobes unification > work. Depends on your tastes, but does reduce ifdefs and is a bit > better about se