staging/lustre/lnet: fix build error on i386
make ARCH=i386 allyesconfig gave bellow errors: drivers/built-in.o: In function `kiblnd_create_conn': >> (.text+0x1a74425): undefined reference to `__umoddi3' Reported-by: Wu Fengguang <fengguang.wu@intel.com> Signed-off-by: Peng Tao <tao.peng@emc.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
5aaf4c27f3
commit
5f43264c53
@ -39,6 +39,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include "o2iblnd.h"
|
#include "o2iblnd.h"
|
||||||
|
#include <asm/div64.h>
|
||||||
|
|
||||||
lnd_t the_o2iblnd = {
|
lnd_t the_o2iblnd = {
|
||||||
.lnd_type = O2IBLND,
|
.lnd_type = O2IBLND,
|
||||||
@ -694,6 +695,7 @@ kiblnd_get_completion_vector(kib_conn_t *conn, int cpt)
|
|||||||
int vectors;
|
int vectors;
|
||||||
int off;
|
int off;
|
||||||
int i;
|
int i;
|
||||||
|
lnet_nid_t nid = conn->ibc_peer->ibp_nid;
|
||||||
|
|
||||||
vectors = conn->ibc_cmid->device->num_comp_vectors;
|
vectors = conn->ibc_cmid->device->num_comp_vectors;
|
||||||
if (vectors <= 1)
|
if (vectors <= 1)
|
||||||
@ -702,7 +704,7 @@ kiblnd_get_completion_vector(kib_conn_t *conn, int cpt)
|
|||||||
mask = cfs_cpt_cpumask(lnet_cpt_table(), cpt);
|
mask = cfs_cpt_cpumask(lnet_cpt_table(), cpt);
|
||||||
|
|
||||||
/* hash NID to CPU id in this partition... */
|
/* hash NID to CPU id in this partition... */
|
||||||
off = conn->ibc_peer->ibp_nid % cpus_weight(*mask);
|
off = do_div(nid, cpus_weight(*mask));
|
||||||
for_each_cpu_mask(i, *mask) {
|
for_each_cpu_mask(i, *mask) {
|
||||||
if (off-- == 0)
|
if (off-- == 0)
|
||||||
return i % vectors;
|
return i % vectors;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user