Fix the length of the qd field of the TAPQ response
Subsystems (2)
cover Fix the length of the qd field of the TAPQ response
====== CHANGELOG ======
v1:
- initial version
- review from Harald
Finn Callies (1):
s390/ap: Fix queue depth field length
arch/s390/include/asm/ap.h | 4 ++-- drivers/s390/crypto/ap_bus.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-)
Signature · 2 lines
Finn Callies <[email protected]> Linux on Z - crypto
PATCH 1/1 s390/ap: Fix queue depth field length
The queue depth field is defined as a 5 bit field in the Z architecture instead of a 4 bit field.
The queue depth (qd) can be in range 0-31 and is reported in bits 59-63 of the TAPQ response. Currently this has no effect as all CEX generations report a queue depth of 7, which fits into 4 bits. However, future CEX generations reporting a value >15 would not be properly reflected by the ap bus and therefore all user space applications relying on it.
--- arch/s390/include/asm/ap.h | 4 ++-- drivers/s390/crypto/ap_bus.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-)
arch/s390/include/asm/ap.h +2 -2
@@ -125,8 +125,8 @@ struct ap_tapq_hwinfo { unsigned int nd : 8; /* nr of domains */ unsigned int : 4; unsigned int ml : 4; /* apxl ml */ - unsigned int : 4; - unsigned int qd : 4; /* queue depth */ + unsigned int : 3; + unsigned int qd : 5; /* queue depth */ }; }; };
drivers/s390/crypto/ap_bus.h +1 -1
@@ -181,7 +181,7 @@ struct ap_card {bool chkstop;/* checkstop state */ }; -#define TAPQ_CARD_HWINFO_MASK 0xFFFF0000FFFF0F0FUL +#define TAPQ_CARD_HWINFO_MASK 0xFFFF0000FFFF0F1FUL#define ASSOC_IDX_INVALID 0x10000#define to_ap_card (x) container_of((x), struct ap_card, ap_dev.device)
Signature · 2 lines
Finn Callies <[email protected]> Linux on Z - crypto
[email protected]
AI reviewRe: [PATCH v1 1/1] s390/ap: Fix queue depth field length
Sashiko has reviewed this patch and found no issues. It looks great!
Quoted 11 lines
The queue depth field is defined as a 5 bit field in the Z architecture instead of a 4 bit field.
The queue depth (qd) can be in range 0-31 and is reported in bits 59-63 of the TAPQ response. Currently this has no effect as all CEX generations report a queue depth of 7, which fits into 4 bits. However, future CEX generations reporting a value >15 would not be properly reflected by the ap bus and therefore all user space applications relying on it.
Reviewed-by Harald Freudenberger <[email protected]>Signed-off-by Finn Callies <[email protected]>
Sashiko has reviewed this patch and found no issues. It looks great!
Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=1
Quoted 6 lines · Finn Callies
====== CHANGELOG ======
v1:
- initial version
- review from Harald
Quoted 6 lines
Finn Callies (1):
s390/ap: Fix queue depth field lengtharch/s390/include/asm/ap.h | 4 ++-- drivers/s390/crypto/ap_bus.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-)
Applied, thank you!