summaryrefslogtreecommitdiffstats
path: root/drivers/misc/hpilo.h
diff options
context:
space:
mode:
authorDavid Altobelli <david.altobelli@hp.com>2009-09-18 12:46:26 -0700
committerGreg Kroah-Hartman <gregkh@suse.de>2009-12-11 11:24:51 -0800
commit68ea809af47d8a4dd92dd3a8720882767fdf51b6 (patch)
tree3844a706dabb83fb6535181471cccde7beba489e /drivers/misc/hpilo.h
parentd71cb81af3817193bc605de061da0499934263a6 (diff)
downloadtalos-op-linux-68ea809af47d8a4dd92dd3a8720882767fdf51b6.tar.gz
talos-op-linux-68ea809af47d8a4dd92dd3a8720882767fdf51b6.zip
hpilo: add locking comment
Add explanation about lock nesting and purpose of each lock in hpilo. Signed-off-by: David Altobelli <david.altobelli@hp.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/misc/hpilo.h')
-rw-r--r--drivers/misc/hpilo.h13
1 files changed, 12 insertions, 1 deletions
diff --git a/drivers/misc/hpilo.h b/drivers/misc/hpilo.h
index 38576050776a..247eb386a973 100644
--- a/drivers/misc/hpilo.h
+++ b/drivers/misc/hpilo.h
@@ -44,9 +44,20 @@ struct ilo_hwinfo {
struct pci_dev *ilo_dev;
+ /*
+ * open_lock serializes ccb_cnt during open and close
+ * [ irq disabled ]
+ * -> alloc_lock used when adding/removing/searching ccb_alloc,
+ * which represents all ccbs open on the device
+ * --> fifo_lock controls access to fifo queues shared with hw
+ *
+ * Locks must be taken in this order, but open_lock and alloc_lock
+ * are optional, they do not need to be held in order to take a
+ * lower level lock.
+ */
+ spinlock_t open_lock;
spinlock_t alloc_lock;
spinlock_t fifo_lock;
- spinlock_t open_lock;
struct cdev cdev;
};
OpenPOWER on IntegriCloud