From: Mikael Pettersson <mikpe@csd.uu.se>

ppc64 perfctr driver from David Gibson <david@gibson.dropbear.id.au>:
- perfctr common updates: Makefile, version
- perfctr virtual quirk: the ppc64 low-level driver is unable to
  prevent all stray overflow interrupts, on ppc64 (and only ppc64)
  the right action in this case is to ignore the interrupt and resume

Signed-off-by: Mikael Pettersson <mikpe@csd.uu.se>
Signed-off-by: Andrew Morton <akpm@osdl.org>
---

 25-akpm/drivers/perfctr/Makefile  |    5 ++++-
 25-akpm/drivers/perfctr/version.h |    2 +-
 25-akpm/drivers/perfctr/virtual.c |   11 ++++++++++-
 3 files changed, 15 insertions(+), 3 deletions(-)

diff -puN drivers/perfctr/Makefile~perfctr-common-updates-for-ppc64 drivers/perfctr/Makefile
--- 25/drivers/perfctr/Makefile~perfctr-common-updates-for-ppc64	Thu Mar 31 15:10:21 2005
+++ 25-akpm/drivers/perfctr/Makefile	Thu Mar 31 15:10:21 2005
@@ -1,4 +1,4 @@
-# $Id: Makefile,v 1.26 2004/05/30 23:02:14 mikpe Exp $
+# $Id: Makefile,v 1.27 2005/03/23 01:29:34 mikpe Exp $
 # Makefile for the Performance-monitoring counters driver.
 
 # This also covers x86_64.
@@ -8,6 +8,9 @@ tests-objs-$(CONFIG_X86) := x86_tests.o
 perfctr-objs-$(CONFIG_PPC32) := ppc.o
 tests-objs-$(CONFIG_PPC32) := ppc_tests.o
 
+perfctr-objs-$(CONFIG_PPC64) := ppc64.o
+tests-objs-$(CONFIG_PPC64) := ppc64_tests.o
+
 perfctr-objs-y += init.o
 perfctr-objs-$(CONFIG_PERFCTR_INIT_TESTS) += $(tests-objs-y)
 perfctr-objs-$(CONFIG_PERFCTR_VIRTUAL) += virtual.o
diff -puN drivers/perfctr/version.h~perfctr-common-updates-for-ppc64 drivers/perfctr/version.h
--- 25/drivers/perfctr/version.h~perfctr-common-updates-for-ppc64	Thu Mar 31 15:10:21 2005
+++ 25-akpm/drivers/perfctr/version.h	Thu Mar 31 15:10:21 2005
@@ -1 +1 @@
-#define VERSION "2.7.14"
+#define VERSION "2.7.15"
diff -puN drivers/perfctr/virtual.c~perfctr-common-updates-for-ppc64 drivers/perfctr/virtual.c
--- 25/drivers/perfctr/virtual.c~perfctr-common-updates-for-ppc64	Thu Mar 31 15:10:21 2005
+++ 25-akpm/drivers/perfctr/virtual.c	Thu Mar 31 15:10:21 2005
@@ -1,4 +1,4 @@
-/* $Id: virtual.c,v 1.111 2005/02/20 11:56:44 mikpe Exp $
+/* $Id: virtual.c,v 1.115 2005/03/28 22:39:02 mikpe Exp $
  * Virtual per-process performance counters.
  *
  * Copyright (C) 1999-2005  Mikael Pettersson
@@ -272,8 +272,17 @@ static void vperfctr_handle_overflow(str
 
 	pmc_mask = perfctr_cpu_identify_overflow(&perfctr->cpu_state);
 	if (!pmc_mask) {
+#ifdef CONFIG_PPC64
+		/* On some hardware (ppc64, in particular) it's
+		 * impossible to control interrupts finely enough to
+		 * eliminate overflows on counters we don't care
+		 * about.  So in this case just restart the counters
+		 * and keep going. */
+		vperfctr_resume(perfctr);
+#else
 		printk(KERN_ERR "%s: BUG! pid %d has unidentifiable overflow source\n",
 		       __FUNCTION__, tsk->pid);
+#endif
 		return;
 	}
 	perfctr->ireload_needed = 1;
_