Re: [PATCH] x86: perf: Clean up perf_event cpu code

From: Peter Zijlstra
Date: Mon Sep 19 2011 - 06:28:12 EST


On Fri, 2011-09-02 at 15:32 +0200, Peter Zijlstra wrote:
> On Tue, 2011-08-30 at 20:41 -0300, Kevin Winchester wrote:
> > The CPU support for perf events on x86 was implemented via included C files
> > with #ifdefs. Clean this up by creating a new header file and compiling
> > the vendor-specific files as needed.
> >
> > Signed-off-by: Kevin Winchester <kjwinchester@xxxxxxxxx>
> > ---
> >
> > This is now against the tip tree. I left it all as one big commit for now,
> > although I can break it up if necessary. I'm just not sure it would gain much.
> >
> > Again, this is by far the largest out of the handful of patches I have ever
> > submitted, so please let me know if I am doing anything wrong.
> >
>
> I've stuck it in the queue,. seems to work so far.
>
> If Ingo doesn't complain, it ought to show up for the next release
> someplace ;-)

Ingo found that it failed to build on i386-up, the below delta (already
folded in the patch) cured things:


---
Index: linux-2.6/arch/x86/kernel/cpu/perf_event_intel.c
===================================================================
--- linux-2.6.orig/arch/x86/kernel/cpu/perf_event_intel.c
+++ linux-2.6/arch/x86/kernel/cpu/perf_event_intel.c
@@ -11,6 +11,7 @@
#include <linux/slab.h>

#include <asm/hardirq.h>
+#include <asm/apic.h>

#include "perf_event.h"

Index: linux-2.6/arch/x86/kernel/cpu/perf_event_p4.c
===================================================================
--- linux-2.6.orig/arch/x86/kernel/cpu/perf_event_p4.c
+++ linux-2.6/arch/x86/kernel/cpu/perf_event_p4.c
@@ -11,6 +11,7 @@

#include <asm/perf_event_p4.h>
#include <asm/hardirq.h>
+#include <asm/apic.h>

#include "perf_event.h"


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