Patch "s390/pai: initialize event count once at initialization" has been added to the 6.1-stable tree

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

 



This is a note to let you know that I've just added the patch titled

    s390/pai: initialize event count once at initialization

to the 6.1-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     s390-pai-initialize-event-count-once-at-initializati.patch
and it can be found in the queue-6.1 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit 55b461e5f747fc1f06b6471715d60394d34dfb78
Author: Thomas Richter <tmricht@xxxxxxxxxxxxx>
Date:   Wed Oct 11 12:09:30 2023 +0200

    s390/pai: initialize event count once at initialization
    
    [ Upstream commit b286997e83dcf7b498329a66a8a22fc8a5bf50f0 ]
    
    Event count value is initialized and set to zero in function
    paicrypt_start().  This function is called once per CPU when an
    event is started on that CPU. This leads to event count value
    being set to zero as many times as there are online CPUs.
    This is not necessary. The event count value is bound to the event
    and it is sufficient to initialize the event counter once at
    event creation time. This is done when the event structure
    is dynamicly allocated with __GFP_ZERO flag. This sets
    member count to zero.
    
    Acked-by: Sumanth Korikkar <sumanthk@xxxxxxxxxxxxx>
    Signed-off-by: Thomas Richter <tmricht@xxxxxxxxxxxxx>
    Signed-off-by: Vasily Gorbik <gor@xxxxxxxxxxxxx>
    Stable-dep-of: e9f3af02f639 ("s390/pai: fix sampling event removal for PMU device driver")
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/arch/s390/kernel/perf_pai_crypto.c b/arch/s390/kernel/perf_pai_crypto.c
index a7e815563f411..7eb138b07e7be 100644
--- a/arch/s390/kernel/perf_pai_crypto.c
+++ b/arch/s390/kernel/perf_pai_crypto.c
@@ -250,7 +250,6 @@ static void paicrypt_start(struct perf_event *event, int flags)
 	if (!event->hw.last_tag) {
 		event->hw.last_tag = 1;
 		sum = paicrypt_getall(event);		/* Get current value */
-		local64_set(&event->count, 0);
 		local64_set(&event->hw.prev_count, sum);
 	}
 }
diff --git a/arch/s390/kernel/perf_pai_ext.c b/arch/s390/kernel/perf_pai_ext.c
index d6bc919530143..663cd37f8b293 100644
--- a/arch/s390/kernel/perf_pai_ext.c
+++ b/arch/s390/kernel/perf_pai_ext.c
@@ -333,7 +333,6 @@ static void paiext_start(struct perf_event *event, int flags)
 	event->hw.last_tag = 1;
 	sum = paiext_getall(event);		/* Get current value */
 	local64_set(&event->hw.prev_count, sum);
-	local64_set(&event->count, 0);
 }
 
 static int paiext_add(struct perf_event *event, int flags)




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux