Commit 394740d7 authored by Halil Pasic's avatar Halil Pasic Committed by Heiko Carstens

s390/ap: fix status returned by ap_aqic()

There function ap_aqic() tries to grab the status from the
wrong part of the register. Thus we always end up with
zeros. Which is wrong, among others, because we detect
failures via status.response_code.
Signed-off-by: default avatarHalil Pasic <pasic@linux.ibm.com>
Reported-by: default avatarJanosch Frank <frankja@linux.ibm.com>
Fixes: 159491f3 ("s390/ap: rework assembler functions to use unions for in/out register variables")
Reviewed-by: default avatarHarald Freudenberger <freude@linux.ibm.com>
Signed-off-by: default avatarHeiko Carstens <hca@linux.ibm.com>
parent a64a6d23
......@@ -239,7 +239,10 @@ static inline struct ap_queue_status ap_aqic(ap_qid_t qid,
union {
unsigned long value;
struct ap_qirq_ctrl qirqctrl;
struct ap_queue_status status;
struct {
u32 _pad;
struct ap_queue_status status;
};
} reg1;
unsigned long reg2 = pa_ind;
......@@ -253,7 +256,7 @@ static inline struct ap_queue_status ap_aqic(ap_qid_t qid,
" lgr %[reg1],1\n" /* gr1 (status) into reg1 */
: [reg1] "+&d" (reg1)
: [reg0] "d" (reg0), [reg2] "d" (reg2)
: "cc", "0", "1", "2");
: "cc", "memory", "0", "1", "2");
return reg1.status;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment