Skip to content

Commit d17901e

Browse files
Thomas Richterhcahca
authored andcommitted
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>
1 parent b60d126 commit d17901e

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

arch/s390/kernel/perf_pai.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ struct paiext_cb { /* PAI extension 1 control block */
4848
u64 header; /* Not used */
4949
u64 reserved1;
5050
u64 acc; /* Addr to analytics counter control block */
51-
u8 reserved2[488];
51+
u8 reserved2[PAIE1_CTRBLOCK_SZ - 3 * sizeof(u64)];
5252
} __packed;
5353

5454
struct pai_map {

0 commit comments

Comments
 (0)