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>
This commit is contained in:
Joachim Fenkes
2007-07-09 15:30:39 +02:00
committed by Roland Dreier
parent 9844b71baa
commit 28db6beb42
5 changed files with 29 additions and 39 deletions

View File

@@ -59,6 +59,7 @@
#include <linux/cpu.h>
#include <linux/device.h>
#include <asm/atomic.h>
#include <asm/abs_addr.h>
#include <asm/ibmebus.h>
#include <asm/io.h>