s390/pai_ext: rework function paiext_copy argments

Change the function paiext_copy() parameter from a pointer to a
structure to two pointers to memory areas referenced. The other
members of that structure are not needed.

Signed-off-by: Thomas Richter <tmricht@linux.ibm.com>
Acked-by: Mete Durlu <meted@linux.ibm.com>
Signed-off-by: Alexander Gordeev <agordeev@linux.ibm.com>
This commit is contained in:
Thomas Richter 2023-11-16 10:43:14 +01:00 committed by Alexander Gordeev
parent cb1259b7b5
commit 0dade41d16

View File

@ -384,13 +384,12 @@ static void paiext_del(struct perf_event *event, int flags)
* 2 bytes: Number of counter
* 8 bytes: Value of counter
*/
static size_t paiext_copy(struct paiext_map *cpump)
static size_t paiext_copy(struct pai_userdata *userdata, unsigned long *area)
{
struct pai_userdata *userdata = cpump->save;
int i, outidx = 0;
for (i = 1; i <= paiext_cnt; i++) {
u64 val = paiext_getctr(cpump->area, i);
u64 val = paiext_getctr(area, i);
if (val) {
userdata[outidx].num = i;
@ -427,7 +426,7 @@ static int paiext_push_sample(void)
size_t rawsize;
int overflow;
rawsize = paiext_copy(cpump);
rawsize = paiext_copy(cpump->save, cpump->area);
if (!rawsize) /* No incremented counters */
return 0;