From b7cb091859b916fa3e69f04bbe6c280461a2076b Mon Sep 17 00:00:00 2001 From: pjkirner Date: Thu, 22 Sep 2005 15:42:27 +0000 Subject: [PATCH] * Remove non compatible irqs_diabled(). Basically backing out the changes from last night introducing this. --- lnet/include/libcfs/darwin/darwin-prim.h | 1 - lnet/include/libcfs/user-prim.h | 1 - lnet/lnet/api-ni.c | 2 +- lnet/lnet/lib-move.c | 16 ++++++++-------- lnet/lnet/lib-msg.c | 10 +++++----- 5 files changed, 14 insertions(+), 16 deletions(-) diff --git a/lnet/include/libcfs/darwin/darwin-prim.h b/lnet/include/libcfs/darwin/darwin-prim.h index 0fb3c5b..63dbad3 100644 --- a/lnet/include/libcfs/darwin/darwin-prim.h +++ b/lnet/include/libcfs/darwin/darwin-prim.h @@ -518,7 +518,6 @@ struct __dummy_ ## name ## _struct {} #define NR_IRQS 512 #define in_interrupt() (0) -#define irqs_disabled() (0) #define KERN_EMERG "<0>" /* system is unusable */ #define KERN_ALERT "<1>" /* action must be taken immediately */ diff --git a/lnet/include/libcfs/user-prim.h b/lnet/include/libcfs/user-prim.h index 4c54315..40b15b5 100644 --- a/lnet/include/libcfs/user-prim.h +++ b/lnet/include/libcfs/user-prim.h @@ -155,7 +155,6 @@ cfs_time_t cfs_timer_deadline(struct cfs_timer *t); #endif #define in_interrupt() (0) -#define irqs_disabled() (0) static inline void cfs_pause(cfs_duration_t d) { diff --git a/lnet/lnet/api-ni.c b/lnet/lnet/api-ni.c index 01ac73b..112dc40 100644 --- a/lnet/lnet/api-ni.c +++ b/lnet/lnet/api-ni.c @@ -764,7 +764,7 @@ lnet_shutdown_lndnis (void) islo = ni->ni_lnd->lnd_type == LOLND; - LASSERT (!irqs_disabled ()); + LASSERT (!in_interrupt ()); (ni->ni_lnd->lnd_shutdown)(ni); /* can't deref lnd anymore now; it might have unregistered diff --git a/lnet/lnet/lib-move.c b/lnet/lnet/lib-move.c index 87e2626..fa73aba 100644 --- a/lnet/lnet/lib-move.c +++ b/lnet/lnet/lib-move.c @@ -444,7 +444,7 @@ lnet_copy_kiov2kiov (unsigned int ndiov, lnet_kiov_t *diov, unsigned int doffset if (nob == 0) return; - LASSERT (!irqs_disabled ()); + LASSERT (!in_interrupt ()); LASSERT (ndiov > 0); while (doffset > diov->kiov_len) { @@ -524,7 +524,7 @@ lnet_copy_kiov2iov (unsigned int niov, struct iovec *iov, unsigned int iovoffset if (nob == 0) return; - LASSERT (!irqs_disabled ()); + LASSERT (!in_interrupt ()); LASSERT (niov > 0); while (iovoffset > iov->iov_len) { @@ -593,7 +593,7 @@ lnet_copy_iov2kiov (unsigned int nkiov, lnet_kiov_t *kiov, unsigned int kiovoffs if (nob == 0) return; - LASSERT (!irqs_disabled ()); + LASSERT (!in_interrupt ()); LASSERT (nkiov > 0); while (kiovoffset > kiov->kiov_len) { @@ -708,7 +708,7 @@ lnet_ni_recv(lnet_ni_t *ni, void *private, lnet_msg_t *msg, int delayed, lnet_kiov_t *kiov = NULL; int rc; - LASSERT (!irqs_disabled ()); + LASSERT (!in_interrupt ()); LASSERT (mlen == 0 || msg != NULL); if (msg != NULL) { @@ -728,7 +728,7 @@ lnet_ni_recv(lnet_ni_t *ni, void *private, lnet_msg_t *msg, int delayed, rc = (ni->ni_lnd->lnd_recv)(ni, private, msg, delayed, niov, iov, kiov, offset, mlen, rlen); - LASSERT(!irqs_disabled()); + LASSERT(!in_interrupt()); if (rc < 0) lnet_finalize(ni, msg, rc); } @@ -801,7 +801,7 @@ lnet_ni_send(lnet_ni_t *ni, lnet_msg_t *msg) int delayed = msg->msg_delayed; int rc; - LASSERT (!irqs_disabled ()); + LASSERT (!in_interrupt ()); /* On GET, call lnet_ni_recv() right after the send. The recv gets * delayed until after the send to ensure the LND still has any RDMA @@ -818,7 +818,7 @@ lnet_ni_send(lnet_ni_t *ni, lnet_msg_t *msg) (msg->msg_txcredit && msg->msg_peertxcredit)); rc = (ni->ni_lnd->lnd_send)(ni, priv, msg); - LASSERT(!irqs_disabled()); + LASSERT(!in_interrupt()); if (rc < 0) lnet_finalize(ni, msg, rc); @@ -1668,7 +1668,7 @@ lnet_parse(lnet_ni_t *ni, lnet_hdr_t *hdr, lnet_nid_t from_nid, void *private) __u32 payload_length; __u32 type; - LASSERT (!irqs_disabled ()); + LASSERT (!in_interrupt ()); type = le32_to_cpu(hdr->type); src_nid = le64_to_cpu(hdr->src_nid); diff --git a/lnet/lnet/lib-msg.c b/lnet/lnet/lib-msg.c index 5add0df..ace7f9b 100644 --- a/lnet/lnet/lib-msg.c +++ b/lnet/lnet/lib-msg.c @@ -69,7 +69,7 @@ lnet_finalize (lnet_ni_t *ni, lnet_msg_t *msg, int status) int unlink; int rc; - LASSERT (!irqs_disabled ()); + LASSERT (!in_interrupt ()); if (msg == NULL) return; @@ -143,9 +143,9 @@ lnet_finalize (lnet_ni_t *ni, lnet_msg_t *msg, int status) msg->msg_hdr.msg.ack.match_bits = msg->msg_ev.match_bits; msg->msg_hdr.msg.ack.mlength = cpu_to_le32(msg->msg_ev.mlength); - LASSERT(!irqs_disabled()); + LASSERT(!in_interrupt()); rc = lnet_send(ni, msg); - LASSERT(!irqs_disabled()); + LASSERT(!in_interrupt()); if (rc == 0) return; @@ -158,9 +158,9 @@ lnet_finalize (lnet_ni_t *ni, lnet_msg_t *msg, int status) LNET_UNLOCK(); - LASSERT(!irqs_disabled()); + LASSERT(!in_interrupt()); rc = lnet_send(NULL, msg); - LASSERT(!irqs_disabled()); + LASSERT(!in_interrupt()); if (rc == 0) return; -- 1.8.3.1