summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorAlexandre Bounine <alexandre.bounine@idt.com>2016-03-22 14:26:35 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2016-03-22 15:36:02 -0700
commita7b4c636d83034f0e89d58651ef2e9b96564489a (patch)
tree19e8ec4da76c040166f31a1d42265af5605dcb34 /include
parentb7dfca8bd446721cbc23f4a7cf3c407eb42175dc (diff)
downloadlinux-a7b4c636d83034f0e89d58651ef2e9b96564489a.tar.bz2
rapidio: add lock protection for doorbell list
Add lock protection around doorbell list handling to prevent list corruption on SMP platforms. Signed-off-by: Alexandre Bounine <alexandre.bounine@idt.com> Cc: Matt Porter <mporter@kernel.crashing.org> Cc: Aurelien Jacquiot <a-jacquiot@ti.com> Cc: Andre van Herk <andre.van.herk@prodrive-technologies.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include')
-rw-r--r--include/linux/rio.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/rio.h b/include/linux/rio.h
index f833773cdc68..948f60550ae5 100644
--- a/include/linux/rio.h
+++ b/include/linux/rio.h
@@ -248,6 +248,7 @@ enum rio_phy_type {
* @node: Node in global list of master ports
* @nnode: Node in network list of master ports
* @net: RIO net this mport is attached to
+ * @lock: lock to synchronize lists manipulations
* @iores: I/O mem resource that this master port interface owns
* @riores: RIO resources that this master port interfaces owns
* @inb_msg: RIO inbound message event descriptors
@@ -271,6 +272,7 @@ struct rio_mport {
struct list_head node; /* node in global list of ports */
struct list_head nnode; /* node in net list of ports */
struct rio_net *net; /* RIO net this mport is attached to */
+ struct mutex lock;
struct resource iores;
struct resource riores[RIO_MAX_MPORT_RESOURCES];
struct rio_msg inb_msg[RIO_MAX_MBOX];