Re: [patch 5/8] Immediate Values - kprobe header fix

From: Christoph Hellwig
Date: Sat Jul 14 2007 - 12:26:33 EST


On Fri, Jul 13, 2007 at 09:24:44PM -0400, Mathieu Desnoyers wrote:
> Since the immediate values depend on the same int3 handler as kprobes implements
> for i386, we have to get architecture specific defines available for the kprobes
> trap handler (especially restore_interrupts()) wven when CONFIG_KPROBES is not
> selected.
>
> That kind of ifdef around a whole header does not make sense in the first place
> anyway.
>
> Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@xxxxxxxxxx>
> CC: prasanna@xxxxxxxxxx
> CC: ananth@xxxxxxxxxx
> CC: anil.s.keshavamurthy@xxxxxxxxx
> CC: davem@xxxxxxxxxxxxx
> ---
> include/linux/kprobes.h | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> Index: linux-2.6-lttng/include/linux/kprobes.h
> ===================================================================
> --- linux-2.6-lttng.orig/include/linux/kprobes.h 2007-07-13 18:47:57.000000000 -0400
> +++ linux-2.6-lttng/include/linux/kprobes.h 2007-07-13 18:48:45.000000000 -0400
> @@ -36,9 +36,9 @@
> #include <linux/spinlock.h>
> #include <linux/rcupdate.h>
>
> -#ifdef CONFIG_KPROBES
> #include <asm/kprobes.h>

but this one isn't available on architectures that don't have kprobes,
so you can't include linux/kprobes.h in generic code without ifdef
protection anymore.

I'd say move the code to asm/kdebug.h if it's need by more than just
kprobes.

-
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/