summaryrefslogtreecommitdiffstats
path: root/drivers/s390/cio/chp.h
diff options
context:
space:
mode:
authorSebastian Ott <sebott@linux.vnet.ibm.com>2010-10-25 16:10:27 +0200
committerMartin Schwidefsky <sky@mschwide.boeblingen.de.ibm.com>2010-10-25 16:10:18 +0200
commitb730f3a933958362ee1080c257f2cc158149310a (patch)
treea86a6f49209447fafa866f846ed5258690892b79 /drivers/s390/cio/chp.h
parent74b6127e6c35abf06364468636dd261850639f8b (diff)
downloadblackbird-op-linux-b730f3a933958362ee1080c257f2cc158149310a.tar.gz
blackbird-op-linux-b730f3a933958362ee1080c257f2cc158149310a.zip
[S390] cio: add lock to struct channel_path
Serialize access to members of struct channel_path with a mutex. Signed-off-by: Sebastian Ott <sebott@linux.vnet.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'drivers/s390/cio/chp.h')
-rw-r--r--drivers/s390/cio/chp.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/s390/cio/chp.h b/drivers/s390/cio/chp.h
index 26c3d2246176..695ec20f1c59 100644
--- a/drivers/s390/cio/chp.h
+++ b/drivers/s390/cio/chp.h
@@ -1,7 +1,7 @@
/*
* drivers/s390/cio/chp.h
*
- * Copyright IBM Corp. 2007
+ * Copyright IBM Corp. 2007,2010
* Author(s): Peter Oberparleiter <peter.oberparleiter@de.ibm.com>
*/
@@ -10,6 +10,7 @@
#include <linux/types.h>
#include <linux/device.h>
+#include <linux/mutex.h>
#include <asm/chpid.h>
#include "chsc.h"
#include "css.h"
@@ -40,14 +41,15 @@ static inline int chp_test_bit(u8 *bitmap, int num)
struct channel_path {
+ struct device dev;
struct chp_id chpid;
+ struct mutex lock; /* Serialize access to below members. */
int state;
struct channel_path_desc desc;
/* Channel-measurement related stuff: */
int cmg;
int shared;
void *cmg_chars;
- struct device dev;
};
int chp_get_status(struct chp_id chpid);
OpenPOWER on IntegriCloud