s390/cio: ensure that a chpid is registered only once
authorSebastian Ott <sebott@linux.ibm.com>
Wed, 13 Jun 2018 14:26:23 +0000 (16:26 +0200)
committerMartin Schwidefsky <schwidefsky@de.ibm.com>
Tue, 17 Jul 2018 05:27:51 +0000 (07:27 +0200)
commit87dc8a01281a4543ed25c367dace6e0f267e0dd1
treee190bcc45782fcfc87e49a0900aa181fba302590
parent306d6c49ac9ded11114cb53b0925da52f2c2ada1
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>
drivers/s390/cio/chp.c
drivers/s390/cio/css.c