IB/ehca: Refactor sync between completions and destroy_cq using atomic_t
authorJoachim Fenkes <fenkes@de.ibm.com>
Mon, 9 Jul 2007 13:30:39 +0000 (15:30 +0200)
committerRoland Dreier <rolandd@cisco.com>
Tue, 10 Jul 2007 03:12:27 +0000 (20:12 -0700)
commit28db6beb420c756c61dd44d9f2786a0677159e74
tree3d5b7cfdfcfe80268bf47d84404d2d9a2034cc65
parent9844b71baa60270110eabaa9589d3260443d1a71
IB/ehca: Refactor sync between completions and destroy_cq using atomic_t

- ehca_cq.nr_events is made an atomic_t, eliminating a lot of locking.
- The CQ is removed from the CQ idr first now to make sure no more
  completions are scheduled on that CQ. The "wait for all completions to
  end" code becomes much simpler this way.

Signed-off-by: Joachim Fenkes <fenkes@de.ibm.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
drivers/infiniband/hw/ehca/ehca_classes.h
drivers/infiniband/hw/ehca/ehca_cq.c
drivers/infiniband/hw/ehca/ehca_irq.c
drivers/infiniband/hw/ehca/ehca_irq.h
drivers/infiniband/hw/ehca/ehca_tools.h