mirror of
https://github.com/torvalds/linux.git
synced 2026-04-18 14:53:58 -04:00
s390/cio: ensure that a chpid is registered only once
Improve locking in chp_new to make sure that we don't register the same chpid twice. Chpid registration was synchronized via the machine check handler thread but we also have codepaths to look for new chpids triggered independent of that thread (during IPL or resume from hibernate). Signed-off-by: Sebastian Ott <sebott@linux.ibm.com> Reviewed-by: Peter Oberparleiter <oberpar@linux.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
This commit is contained in:
committed by
Martin Schwidefsky
parent
306d6c49ac
commit
87dc8a0128
@@ -244,8 +244,7 @@ static void ssd_register_chpids(struct chsc_ssd_info *ssd)
|
||||
for (i = 0; i < 8; i++) {
|
||||
mask = 0x80 >> i;
|
||||
if (ssd->path_mask & mask)
|
||||
if (!chp_is_registered(ssd->chpid[i]))
|
||||
chp_new(ssd->chpid[i]);
|
||||
chp_new(ssd->chpid[i]);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user