WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-ppc-devel

[XenPPC] [ppc/linux-2.6.18-xen.hg] [POWERPC][XEN][LINUX] Enable performa

Changeset 14c48f11619e : 
http://xenbits.xensource.com/ext/ppc/linux-2.6.18-xen.hg?cmd=changeset;node=14c48f11619e

        [POWERPC][XEN][LINUX] Enable performance monitoring.
        Signed-off-by: Christian Ehrhardt <ehrhardt@xxxxxxxxxxxxxxxxxx>
        Signed-off-by: Hollis Blanchard <hollisb@xxxxxxxxxx>

diffstat:

1 files changed, 13 insertions(+)
arch/powerpc/platforms/xen/setup.c |   13 +++++++++++++

diffs (37 lines):

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-ppc-devel mailing list
Xen-ppc-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-ppc-devel

<Prev in Thread] Current Thread [Next in Thread>
  • [XenPPC] [ppc/linux-2.6.18-xen.hg] [POWERPC][XEN][LINUX] Enable performan..., patchbot <=