Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 130377
b: refs/heads/master
c: 252523e
h: refs/heads/master
i:
  130375: 9e041a2
v: v3
  • Loading branch information
Robin Holt authored and Linus Torvalds committed Jan 30, 2009
1 parent 1f28054 commit c1cd8f9
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 8 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 17e2161654da4e6bdfd8d53d4f52e820ee93f423
refs/heads/master: 252523ef2421b803de4810876223e4d695f23ec6
3 changes: 0 additions & 3 deletions trunk/drivers/misc/sgi-xp/xpc_channel.c
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,6 @@ xpc_process_connect(struct xpc_channel *ch, unsigned long *irq_flags)

if (ch->flags & (XPC_C_CONNECTED | XPC_C_DISCONNECTING))
return;

DBUG_ON(ch->local_msgqueue == NULL);
DBUG_ON(ch->remote_msgqueue == NULL);
}

if (!(ch->flags & XPC_C_OPENREPLY)) {
Expand Down
15 changes: 11 additions & 4 deletions trunk/drivers/misc/sgi-xp/xpc_sn2.c
Original file line number Diff line number Diff line change
Expand Up @@ -1106,8 +1106,6 @@ xpc_process_activate_IRQ_rcvd_sn2(void)
int n_IRQs_expected;
int n_IRQs_detected;

DBUG_ON(xpc_activate_IRQ_rcvd == 0);

spin_lock_irqsave(&xpc_activate_IRQ_rcvd_lock, irq_flags);
n_IRQs_expected = xpc_activate_IRQ_rcvd;
xpc_activate_IRQ_rcvd = 0;
Expand Down Expand Up @@ -1726,6 +1724,7 @@ xpc_clear_local_msgqueue_flags_sn2(struct xpc_channel *ch)
msg = (struct xpc_msg_sn2 *)((u64)ch_sn2->local_msgqueue +
(get % ch->local_nentries) *
ch->entry_size);
DBUG_ON(!(msg->flags & XPC_M_SN2_READY));
msg->flags = 0;
} while (++get < ch_sn2->remote_GP.get);
}
Expand All @@ -1740,11 +1739,18 @@ xpc_clear_remote_msgqueue_flags_sn2(struct xpc_channel *ch)
struct xpc_msg_sn2 *msg;
s64 put;

put = ch_sn2->w_remote_GP.put;
/* flags are zeroed when the buffer is allocated */
if (ch_sn2->remote_GP.put < ch->remote_nentries)
return;

put = max(ch_sn2->w_remote_GP.put, ch->remote_nentries);
do {
msg = (struct xpc_msg_sn2 *)((u64)ch_sn2->remote_msgqueue +
(put % ch->remote_nentries) *
ch->entry_size);
DBUG_ON(!(msg->flags & XPC_M_SN2_READY));
DBUG_ON(!(msg->flags & XPC_M_SN2_DONE));
DBUG_ON(msg->number != put - ch->remote_nentries);
msg->flags = 0;
} while (++put < ch_sn2->remote_GP.put);
}
Expand Down Expand Up @@ -2280,8 +2286,9 @@ xpc_received_payload_sn2(struct xpc_channel *ch, void *payload)
dev_dbg(xpc_chan, "msg=0x%p, msg_number=%ld, partid=%d, channel=%d\n",
(void *)msg, msg_number, ch->partid, ch->number);

DBUG_ON((((u64)msg - (u64)ch->remote_msgqueue) / ch->entry_size) !=
DBUG_ON((((u64)msg - (u64)ch->sn.sn2.remote_msgqueue) / ch->entry_size) !=
msg_number % ch->remote_nentries);
DBUG_ON(!(msg->flags & XPC_M_SN2_READY));
DBUG_ON(msg->flags & XPC_M_SN2_DONE);

msg->flags |= XPC_M_SN2_DONE;
Expand Down

0 comments on commit c1cd8f9

Please sign in to comment.