提交 ea3c4185 编写于 作者: H Harald Freudenberger 提交者: Martin Schwidefsky

s390/zcrypt: Add ZAPQ inline function.

Added new inline function ap_pqap_zapq()
which is a C inline function wrapper for
the AP PQAP(ZAPQ) instruction.
Signed-off-by: NHarald Freudenberger <freude@de.ibm.com>
Signed-off-by: NMartin Schwidefsky <schwidefsky@de.ibm.com>
上级 7daf201d
...@@ -69,6 +69,25 @@ static inline struct ap_queue_status ap_rapq(ap_qid_t qid) ...@@ -69,6 +69,25 @@ static inline struct ap_queue_status ap_rapq(ap_qid_t qid)
return reg1; return reg1;
} }
/**
* ap_pqap_zapq(): Reset and zeroize adjunct processor queue.
* @qid: The AP queue number
*
* Returns AP queue status structure.
*/
static inline struct ap_queue_status ap_zapq(ap_qid_t qid)
{
register unsigned long reg0 asm ("0") = qid | (2UL << 24);
register struct ap_queue_status reg1 asm ("1");
asm volatile(
".long 0xb2af0000" /* PQAP(ZAPQ) */
: "=d" (reg1)
: "d" (reg0)
: "cc");
return reg1;
}
/** /**
* ap_aqic(): Control interruption for a specific AP. * ap_aqic(): Control interruption for a specific AP.
* @qid: The AP queue number * @qid: The AP queue number
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册