Re: [GIT PULL] perf and breakpoints updates

From: Frederic Weisbecker
Date: Mon May 03 2010 - 09:41:15 EST


On Mon, May 03, 2010 at 09:00:59AM +0200, Ingo Molnar wrote:
>
> note, when merged into tip:master there's a new build failure with these
> changes:
>
> kernel/hw_breakpoint.c:58:1: error: pasting "__pcpu_scope_" and "*" does not give a valid preprocessing token
> kernel/hw_breakpoint.c:58:1: error: pasting "__pcpu_unique_" and "*" does not give a valid preprocessing token
> kernel/hw_breakpoint.c:58:1: error: pasting "__pcpu_unique_" and "*" does not give a valid preprocessing token
>
> config attached.
>
> Ingo


Ah indeed.

I can reproduce, it happens if CONFIG_DEBUG_FORCE_WEAK_PER_CPU,
because we concatenate someting with the name and we have the "*" in
the name.

The right fix seems to be the following, but I prefer to test it further before
submitting it, that said it builds:


diff --git a/kernel/hw_breakpoint.c b/kernel/hw_breakpoint.c
index 684b710..7a56b22 100644
--- a/kernel/hw_breakpoint.c
+++ b/kernel/hw_breakpoint.c
@@ -55,7 +55,7 @@
static DEFINE_PER_CPU(unsigned int, nr_cpu_bp_pinned[TYPE_MAX]);

/* Number of pinned task breakpoints in a cpu */
-static DEFINE_PER_CPU(unsigned int, *nr_task_bp_pinned[TYPE_MAX]);
+static DEFINE_PER_CPU(unsigned int *, nr_task_bp_pinned[TYPE_MAX]);

/* Number of non-pinned cpu/task breakpoints in a cpu */
static DEFINE_PER_CPU(unsigned int, nr_bp_flexible[TYPE_MAX]);


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