summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Richter <tmricht@linux.ibm.com>2025-11-06 14:23:33 +0100
committerHeiko Carstens <hca@linux.ibm.com>2025-11-14 11:34:27 +0100
commitd17901e8e8ddef130222c5e087854811d9fdaff4 (patch)
tree51d95451ed084dee1cb43f07d56c62bcc8e442a6
parentb60d126c8ea3444d8c1f29538542d5c03d219e3e (diff)
s390/pai: Calculate size of reserved PAI extension control block area
The PAI extension 1 control block area is 512 bytes in total. It currently contains three address pointer which refer to counter memory blocks followed by a reserved area. Calculate the reserved area instead of hardcoding its size. This makes the code more readable and maintainable. No functional chance. Signed-off-by: Thomas Richter <tmricht@linux.ibm.com> Suggested-by: Jan Polensky <japo@linux.ibm.com> Reviewed-by: Jan Polensky <japo@linux.ibm.com> Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
-rw-r--r--arch/s390/kernel/perf_pai.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/s390/kernel/perf_pai.c b/arch/s390/kernel/perf_pai.c
index 1fac41a0aa09..c79864628582 100644
--- a/arch/s390/kernel/perf_pai.c
+++ b/arch/s390/kernel/perf_pai.c
@@ -48,7 +48,7 @@ struct paiext_cb { /* PAI extension 1 control block */
u64 header; /* Not used */
u64 reserved1;
u64 acc; /* Addr to analytics counter control block */
- u8 reserved2[488];
+ u8 reserved2[PAIE1_CTRBLOCK_SZ - 3 * sizeof(u64)];
} __packed;
struct pai_map {