]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
[PATCH] ppc32: fix build with oprofile
authorBenjamin Herrenschmidt <benh@kernel.crashing.org>
Fri, 23 Sep 2005 04:43:55 +0000 (21:43 -0700)
committerLinus Torvalds <torvalds@g5.osdl.org>
Fri, 23 Sep 2005 05:17:34 +0000 (22:17 -0700)
Current -git tree doesn't build when enabling oprofile on a non-bookE CPU
(like on a PowerMac for example).  While there is no performance counter
support for these CPUs implemented yet, it's still nice to be able to use
the timer based sampling, and that got broken.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
arch/ppc/kernel/Makefile
arch/ppc/kernel/perfmon.c

index 1fb92f16acd61efba7b3a1c641c13e485523b6d7..b1457a8a9c0f0eff8cf3cf130396076438d8d7e5 100644 (file)
@@ -15,9 +15,8 @@ extra-y                               += vmlinux.lds
 obj-y                          := entry.o traps.o irq.o idle.o time.o misc.o \
                                        process.o signal.o ptrace.o align.o \
                                        semaphore.o syscalls.o setup.o \
-                                       cputable.o ppc_htab.o
+                                       cputable.o ppc_htab.o perfmon.o
 obj-$(CONFIG_6xx)              += l2cr.o cpu_setup_6xx.o
-obj-$(CONFIG_E500)             += perfmon.o
 obj-$(CONFIG_SOFTWARE_SUSPEND) += swsusp.o
 obj-$(CONFIG_POWER4)           += cpu_setup_power4.o
 obj-$(CONFIG_MODULES)          += module.o ppc_ksyms.o
index fa1dad96b8309f1b44a4a40aef2748a36b4cf3e0..04c18788e85ff088c453985ac9b3aa86d231a318 100644 (file)
@@ -45,7 +45,7 @@ static void dummy_perf(struct pt_regs *regs)
        mtpmr(PMRN_PMGC0, pmgc0);
 }
 
-#else
+#elif CONFIG_6xx
 /* Ensure exceptions are disabled */
 
 static void dummy_perf(struct pt_regs *regs)
@@ -55,6 +55,10 @@ static void dummy_perf(struct pt_regs *regs)
        mmcr0 &= ~MMCR0_PMXE;
        mtspr(SPRN_MMCR0, mmcr0);
 }
+#else
+static void dummy_perf(struct pt_regs *regs)
+{
+}
 #endif
 
 void (*perf_irq)(struct pt_regs *) = dummy_perf;