]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
s390/pai_crypto: Rename structure paicrypt_mapptr to pai_mapptr
authorThomas Richter <tmricht@linux.ibm.com>
Wed, 5 Nov 2025 14:38:42 +0000 (15:38 +0100)
committerHeiko Carstens <hca@linux.ibm.com>
Fri, 14 Nov 2025 10:30:04 +0000 (11:30 +0100)
To support one common PAI PMU device driver which handles
both PMUs pai_crypto and pai_ext, use a common naming scheme
for structures and variables suitable for both device drivers.
Rename structure paicrypt_mapptr to pai_mapptr.
No functional change.

Signed-off-by: Thomas Richter <tmricht@linux.ibm.com>
Reviewed-by: Jan Polensky <japo@linux.ibm.com>
Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
arch/s390/kernel/perf_pai_crypto.c

index dd5b32c4dd44eb4709c13b95d2e13ca9755d3a56..1c855391ac8e45c5fd6b30a9b9a7a52d809d3fea 100644 (file)
@@ -39,13 +39,13 @@ struct paicrypt_map {
        struct list_head syswide_list;  /* List system-wide sampling events */
 };
 
-struct paicrypt_mapptr {
+struct pai_mapptr {
        struct paicrypt_map *mapptr;
 };
 
 static struct paicrypt_root {          /* Anchor to per CPU data */
        refcount_t refcnt;              /* Overall active events */
-       struct paicrypt_mapptr __percpu *mapptr;
+       struct pai_mapptr __percpu *mapptr;
 } paicrypt_root;
 
 /* Free per CPU data when the last event is removed. */
@@ -69,7 +69,7 @@ static int paicrypt_root_alloc(void)
 {
        if (!refcount_inc_not_zero(&paicrypt_root.refcnt)) {
                /* The memory is already zeroed. */
-               paicrypt_root.mapptr = alloc_percpu(struct paicrypt_mapptr);
+               paicrypt_root.mapptr = alloc_percpu(struct pai_mapptr);
                if (!paicrypt_root.mapptr)
                        return -ENOMEM;
                refcount_set(&paicrypt_root.refcnt, 1);
@@ -81,7 +81,7 @@ static int paicrypt_root_alloc(void)
 static DEFINE_MUTEX(pai_reserve_mutex);
 
 /* Free all memory allocated for event counting/sampling setup */
-static void paicrypt_free(struct paicrypt_mapptr *mp)
+static void paicrypt_free(struct pai_mapptr *mp)
 {
        free_page((unsigned long)mp->mapptr->area);
        kvfree(mp->mapptr->save);
@@ -94,7 +94,7 @@ static void paicrypt_free(struct paicrypt_mapptr *mp)
  */
 static void paicrypt_event_destroy_cpu(struct perf_event *event, int cpu)
 {
-       struct paicrypt_mapptr *mp = per_cpu_ptr(paicrypt_root.mapptr, cpu);
+       struct pai_mapptr *mp = per_cpu_ptr(paicrypt_root.mapptr, cpu);
        struct paicrypt_map *cpump = mp->mapptr;
 
        mutex_lock(&pai_reserve_mutex);
@@ -137,7 +137,7 @@ static u64 paicrypt_getctr(unsigned long *page, int nr, bool kernel)
  */
 static u64 paicrypt_getdata(struct perf_event *event, bool kernel)
 {
-       struct paicrypt_mapptr *mp = this_cpu_ptr(paicrypt_root.mapptr);
+       struct pai_mapptr *mp = this_cpu_ptr(paicrypt_root.mapptr);
        struct paicrypt_map *cpump = mp->mapptr;
        u64 sum = 0;
        int i;
@@ -180,7 +180,7 @@ static u64 paicrypt_getall(struct perf_event *event)
 static int paicrypt_alloc_cpu(struct perf_event *event, int cpu)
 {
        struct paicrypt_map *cpump = NULL;
-       struct paicrypt_mapptr *mp;
+       struct pai_mapptr *mp;
        int rc;
 
        mutex_lock(&pai_reserve_mutex);
@@ -326,7 +326,7 @@ static void paicrypt_read(struct perf_event *event)
 
 static void paicrypt_start(struct perf_event *event, int flags)
 {
-       struct paicrypt_mapptr *mp = this_cpu_ptr(paicrypt_root.mapptr);
+       struct pai_mapptr *mp = this_cpu_ptr(paicrypt_root.mapptr);
        struct paicrypt_map *cpump = mp->mapptr;
        u64 sum;
 
@@ -347,7 +347,7 @@ static void paicrypt_start(struct perf_event *event, int flags)
 
 static int paicrypt_add(struct perf_event *event, int flags)
 {
-       struct paicrypt_mapptr *mp = this_cpu_ptr(paicrypt_root.mapptr);
+       struct pai_mapptr *mp = this_cpu_ptr(paicrypt_root.mapptr);
        struct paicrypt_map *cpump = mp->mapptr;
        unsigned long ccd;
 
@@ -365,7 +365,7 @@ static int paicrypt_add(struct perf_event *event, int flags)
 static void paicrypt_have_sample(struct perf_event *, struct paicrypt_map *);
 static void paicrypt_stop(struct perf_event *event, int flags)
 {
-       struct paicrypt_mapptr *mp = this_cpu_ptr(paicrypt_root.mapptr);
+       struct pai_mapptr *mp = this_cpu_ptr(paicrypt_root.mapptr);
        struct paicrypt_map *cpump = mp->mapptr;
 
        if (!event->attr.sample_period) {       /* Counting */
@@ -384,7 +384,7 @@ static void paicrypt_stop(struct perf_event *event, int flags)
 
 static void paicrypt_del(struct perf_event *event, int flags)
 {
-       struct paicrypt_mapptr *mp = this_cpu_ptr(paicrypt_root.mapptr);
+       struct pai_mapptr *mp = this_cpu_ptr(paicrypt_root.mapptr);
        struct paicrypt_map *cpump = mp->mapptr;
 
        paicrypt_stop(event, PERF_EF_UPDATE);
@@ -488,7 +488,7 @@ static void paicrypt_have_sample(struct perf_event *event,
 /* Check if there is data to be saved on schedule out of a task. */
 static void paicrypt_have_samples(void)
 {
-       struct paicrypt_mapptr *mp = this_cpu_ptr(paicrypt_root.mapptr);
+       struct pai_mapptr *mp = this_cpu_ptr(paicrypt_root.mapptr);
        struct paicrypt_map *cpump = mp->mapptr;
        struct perf_event *event;