diff options
author | Hoang-Nam Nguyen <hnguyen@linux.vnet.ibm.com> | 2007-02-15 17:06:33 +0100 |
---|---|---|
committer | Roland Dreier <rolandd@cisco.com> | 2007-02-16 13:57:34 -0800 |
commit | 78d8d5f9ef8d6179e92b94481cfdfc45d396992f (patch) | |
tree | 55ee3cecd4c0d59f418b59870cec2ac33b1b70e7 /drivers/infiniband/hw/ehca/ipz_pt_fn.h | |
parent | 551fd6122d247d76124c4fdb6eb898cc8e3d74aa (diff) | |
download | lwn-78d8d5f9ef8d6179e92b94481cfdfc45d396992f.tar.gz lwn-78d8d5f9ef8d6179e92b94481cfdfc45d396992f.zip |
IB/ehca: Rework irq handler
Rework ehca interrupt handling to avoid/reduce missed irq events.
Signed-off-by: Hoang-Nam Nguyen <hnguyen@de.ibm.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
Diffstat (limited to 'drivers/infiniband/hw/ehca/ipz_pt_fn.h')
-rw-r--r-- | drivers/infiniband/hw/ehca/ipz_pt_fn.h | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/drivers/infiniband/hw/ehca/ipz_pt_fn.h b/drivers/infiniband/hw/ehca/ipz_pt_fn.h index dc3bda2634b7..8199c45768a3 100644 --- a/drivers/infiniband/hw/ehca/ipz_pt_fn.h +++ b/drivers/infiniband/hw/ehca/ipz_pt_fn.h @@ -79,7 +79,7 @@ static inline void *ipz_qeit_calc(struct ipz_queue *queue, u64 q_offset) if (q_offset >= queue->queue_length) return NULL; current_page = (queue->queue_pages)[q_offset >> EHCA_PAGESHIFT]; - return ¤t_page->entries[q_offset & (EHCA_PAGESIZE - 1)]; + return ¤t_page->entries[q_offset & (EHCA_PAGESIZE - 1)]; } /* @@ -247,6 +247,15 @@ static inline void *ipz_eqit_eq_get_inc_valid(struct ipz_queue *queue) return ret; } +static inline void *ipz_eqit_eq_peek_valid(struct ipz_queue *queue) +{ + void *ret = ipz_qeit_get(queue); + u32 qe = *(u8 *) ret; + if ((qe >> 7) != (queue->toggle_state & 1)) + return NULL; + return ret; +} + /* returns address (GX) of first queue entry */ static inline u64 ipz_qpt_get_firstpage(struct ipz_qpt *qpt) { |