On 03.01.19 13:58, Thomas Huth wrote: > On 2019-01-03 11:08, Janosch Frank wrote: >> We need to properly implement interrupt handling for SCLP, because on >> z/VM and LPAR SCLP calls are not synchronous! >> >> Signed-off-by: Janosch Frank <frankja@xxxxxxxxxxxxx> [...] >> + >> static void sclp_read_scp_info(ReadInfo *ri, int length) >> { >> unsigned int commands[] = { SCLP_CMDW_READ_SCP_INFO_FORCED, >> SCLP_CMDW_READ_SCP_INFO }; >> - int i; >> + int i, cc; >> >> for (i = 0; i < ARRAY_SIZE(commands); i++) { >> memset(&ri->h, 0, sizeof(ri->h)); >> ri->h.length = length; >> >> - if (sclp_service_call(commands[i], ri)) >> + sclp_mark_busy(); >> + cc = sclp_service_call(commands[i], ri); >> + sclp_wait_busy(); > > You already do the sclp_wait_busy() in sclp_service_call now, so I think > you don't need the sclp_wait_busy() here anymore? Yeah, that has to go. > > Also, what about moving the sclp_mark_busy() calls to the beginning of > sclp_service_call() instead? Wouldn't that create a race on the data of __sccb and we could end with garbled scb commands?
Attachment:
signature.asc
Description: OpenPGP digital signature