[3.16.y-ckt stable] Patch "sparc: perf: Remove redundant perf_pmu_{en|dis}able calls" has been added to staging queue

Luis Henriques luis.henriques at canonical.com
Tue Mar 24 15:35:26 UTC 2015

This is a note to let you know that I have just added a patch titled

    sparc: perf: Remove redundant perf_pmu_{en|dis}able calls

to the linux-3.16.y-queue branch of the 3.16.y-ckt extended stable tree 
which can be found at:


This patch is scheduled to be released in version 3.16.7-ckt9.

If you, or anyone else, feels it should not be added to this tree, please 
reply to this email.

For more information about the 3.16.y-ckt tree, see



>From 5c02c268719f666d5991b791c42f8181c67ca5a1 Mon Sep 17 00:00:00 2001
From: David Ahern <david.ahern at oracle.com>
Date: Thu, 19 Mar 2015 16:05:57 -0400
Subject: sparc: perf: Remove redundant perf_pmu_{en|dis}able calls

commit 5b0d4b5514bbcce69b516d0742f2cfc84ebd6db3 upstream.

perf_pmu_disable is called by core perf code before pmu->del and the
enable function is called by core perf code afterwards. No need to
call again within sparc_pmu_del.

Ditto for pmu->add and sparc_pmu_add.

Signed-off-by: David Ahern <david.ahern at oracle.com>
Acked-by: Bob Picco <bob.picco at oracle.com>
Signed-off-by: David S. Miller <davem at davemloft.net>
Signed-off-by: Luis Henriques <luis.henriques at canonical.com>
 arch/sparc/kernel/perf_event.c | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/arch/sparc/kernel/perf_event.c b/arch/sparc/kernel/perf_event.c
index c9759ad3f34a..f5e76cf3f54e 100644
--- a/arch/sparc/kernel/perf_event.c
+++ b/arch/sparc/kernel/perf_event.c
@@ -1101,7 +1101,6 @@ static void sparc_pmu_del(struct perf_event *event, int _flags)
 	int i;

-	perf_pmu_disable(event->pmu);

 	for (i = 0; i < cpuc->n_events; i++) {
 		if (event == cpuc->event[i]) {
@@ -1127,7 +1126,6 @@ static void sparc_pmu_del(struct perf_event *event, int _flags)

-	perf_pmu_enable(event->pmu);

@@ -1361,7 +1359,6 @@ static int sparc_pmu_add(struct perf_event *event, int ef_flags)
 	unsigned long flags;

-	perf_pmu_disable(event->pmu);

 	n0 = cpuc->n_events;
 	if (n0 >= sparc_pmu->max_hw_events)
@@ -1394,7 +1391,6 @@ nocheck:

 	ret = 0;
-	perf_pmu_enable(event->pmu);
 	return ret;

More information about the kernel-team mailing list