Re: [PATCH 3/5] jump label: x86 support

From: Jason Baron
Date: Mon Mar 22 2010 - 16:41:42 EST


On Mon, Mar 22, 2010 at 12:40:25PM -0400, Steven Rostedt wrote:
> > add x86 support for jump label. I'm keeping this patch separate so its clear to
> > arch maintainers what was required for x86 support this new feature. hopefully,
> > it wouldn't be too painful for other arches.
> >
> > Signed-off-by: Jason Baron <jbaron@xxxxxxxxxx>
>
>
> > +#ifdef __HAVE_ARCH_JUMP_LABEL
> > +
> > +# ifdef CONFIG_X86_64
> > +# define JUMP_LABEL_NOP P6_NOP5
> > +# else
> > +# define JUMP_LABEL_NOP ".byte 0xe9 \n\t .long 0\n\t"
> > +# endif
>
> Are you sure P6_NOP5 can't happen on non 64bit? Just because it is not
> configured does not mean that the CPU can not handle it. Look at the
> code I did in arch/x86/kernel/ftrace.c to determine what nop to use.
> Maybe we can make that generic and have at boot up, the kernel determine
> a proper 5byte nop.
>

indeed, i've looked at the ftrace nop code...I think was concerned that
I would need a baseline nop that would work for all boxes. But I guess a
jmp + 5 would be it?

-Jason
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/