[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [linux-2.6.18-xen] [POWERPC][XEN][LINUX] Enable performance monitoring.



# HG changeset patch
# User Hollis Blanchard <hollisb@xxxxxxxxxx>
# Date 1184364852 18000
# Node ID 14c48f11619e4a1c8217cd029fece60e8a46798a
# Parent  696817986e686fd410605a4757f36814f294b2ed
[POWERPC][XEN][LINUX] Enable performance monitoring.
Signed-off-by: Christian Ehrhardt <ehrhardt@xxxxxxxxxxxxxxxxxx>
Signed-off-by: Hollis Blanchard <hollisb@xxxxxxxxxx>
---
 arch/powerpc/platforms/xen/setup.c |   13 +++++++++++++
 1 files changed, 13 insertions(+)

diff -r 696817986e68 -r 14c48f11619e arch/powerpc/platforms/xen/setup.c
--- a/arch/powerpc/platforms/xen/setup.c        Fri Jul 13 14:01:30 2007 -0500
+++ b/arch/powerpc/platforms/xen/setup.c        Fri Jul 13 17:14:12 2007 -0500
@@ -39,6 +39,7 @@
 #include <asm/machdep.h>
 #include <asm/hypervisor.h>
 #include <asm/time.h>
+#include <asm/pmc.h>
 #include "setup.h"
 
 #ifdef DEBUG
@@ -287,6 +288,17 @@ unsigned int xenppc_get_irq(struct pt_re
         * is nothing for do_IRQ() to do.
         * XXX This means we aren't using IRQ stacks. */
        return NO_IRQ;
+}
+
+static void xenppc_enable_pmcs(void)
+{
+       unsigned long set, reset;
+
+       power4_enable_pmcs();
+
+       set = 1UL << 63;
+       reset = 0;
+       plpar_hcall_norets(H_PERFMON, set, reset);
 }
 
 #ifdef CONFIG_KEXEC
@@ -316,6 +328,7 @@ define_machine(xen) {
        .calibrate_decr         = generic_calibrate_decr,
        .progress               = xenppc_progress,
        .power_save             = xenppc_power_save,
+       .enable_pmcs    = xenppc_enable_pmcs,
 #ifdef CONFIG_KEXEC
        .machine_kexec          = xen_machine_kexec,
        .machine_kexec_prepare  = xen_machine_kexec_prepare,

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.