]> git.baikalelectronics.ru Git - kernel.git/commit
s390/ap: Rework ap_dqap to deal with messages greater than recv buffer
authorHarald Freudenberger <freude@linux.ibm.com>
Wed, 30 Jun 2021 14:10:56 +0000 (16:10 +0200)
committerVasily Gorbik <gor@linux.ibm.com>
Thu, 8 Jul 2021 13:37:27 +0000 (15:37 +0200)
commita6d4cbca66d4ffa7a3a4f0ab08d6f7b5f10ef194
tree2d5596036c3cdb260d56cc3b7902490f72ba25a2
parent5a67ab47896c12bd7fb9cdd18ea1ba4cf5e09adf
s390/ap: Rework ap_dqap to deal with messages greater than recv buffer

Rework of the ap_dqap() inline function with the dqap inline assembler
invocation and the caller code in ap_queue.c to be able to handle
replies which exceed the receive buffer size.

ap_dqap() now provides two additional parameters to handle together
with the caller the case where a reply in the firmware queue entry
exceeds the given message buffer size. It depends on the caller how to
exactly handle this. The behavior implemented now by ap_sm_recv() in
ap_queue.c is to simple purge this entry from the firmware queue and
let the caller 'receive' a -EMSGSIZE for the request without
delivering any reply data - not even a truncated reply message.

However, the reworked ap_dqap() could now get invoked in a way that
the message is received in multiple parts and the caller assembles the
parts into one reply message.

Signed-off-by: Harald Freudenberger <freude@linux.ibm.com>
Suggested-by: Juergen Christ <jchrist@linux.ibm.com>
Reviewed-by: Juergen Christ <jchrist@linux.ibm.com>
Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
arch/s390/include/asm/ap.h
drivers/s390/crypto/ap_queue.c