* Author: Scott Atchley <atchley at myri.com>
*/
+#include <asm/page.h>
#include "mxlnd.h"
mx_endpoint_addr_t MX_EPA_NULL; /* use to determine if an endpoint is NULL */
break;
} else if (ret == -EHOSTUNREACH && try < tries) {
/* add a little backoff */
- CDEBUG(D_NET, "sleeping for %d jiffies\n",
- HZ/4);
- mxlnd_sleep(HZ/4);
+ CDEBUG(D_NET, "sleeping for %lu jiffies\n",
+ msecs_to_jiffies(MSEC_PER_SEC / 4));
+ mxlnd_sleep(msecs_to_jiffies(MSEC_PER_SEC / 4));
}
}
} while (try++ < tries);
ctx->mxc_nseg = niov;
sum = 0;
for (i = 0; i < niov; i++) {
- seg[i].segment_ptr = lnet_page2phys(kiov[first_kiov + i].kiov_page);
+ seg[i].segment_ptr =
+ page_to_phys(kiov[first_kiov + i].kiov_page);
seg[i].segment_length = kiov[first_kiov + i].kiov_len;
if (i == 0) {
seg[i].segment_ptr += (u64) first_kiov_offset;
mxlnd_conn_decref(conn);
}
mx_set_request_timeout(kmxlnd_data.kmx_endpt, request,
- MXLND_CONNECT_TIMEOUT/HZ*1000);
+ jiffies_to_msecs(MXLND_CONNECT_TIMEOUT));
return;
}
#if MXLND_STATS
if (cfs_time_after(jiffies, last)) {
- last = jiffies + HZ;
+ last = jiffies + msecs_to_jiffies(MSEC_PER_SEC);
CDEBUG(D_NET, "status= %s credits= %d outstanding= %d ntx_msgs= %d "
"ntx_posted= %d ntx_data= %d data_posted= %d\n",
mxlnd_connstatus_to_str(conn->mxk_status), conn->mxk_credits,
long id = (long) arg;
unsigned long now = 0;
unsigned long next = 0;
- unsigned long delay = HZ;
+ unsigned long delay = msecs_to_jiffies(MSEC_PER_SEC);
kmx_peer_t *peer = NULL;
kmx_peer_t *temp = NULL;
kmx_conn_t *conn = NULL;
conn->mxk_status == MXLND_CONN_FAIL) &&
cfs_time_after(now,
conn->mxk_last_tx +
- HZ)) {
+ msecs_to_jiffies(MSEC_PER_SEC))) {
write_unlock(g_lock);
mxlnd_check_sends(peer);
write_lock(g_lock);