From: Arnd Bergmann <arnd-r2nGTMty4D4@public.gmane.org>
To: Leon Romanovsky <leon-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
Cc: netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
Arnd Bergmann <arnd-r2nGTMty4D4@public.gmane.org>,
Moni Shoua <monis-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>,
Doug Ledford <dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>,
Sean Hefty <sean.hefty-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>,
Hal Rosenstock
<hal.rosenstock-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
Amir Vadai <amirv-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>,
Kamal Heib <kamalh-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>,
linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: [PATCH 1/3] infiniband: rxe: avoid 64-bit division
Date: Mon, 13 Jun 2016 14:54:53 +0200 [thread overview]
Message-ID: <1465822509-4167617-1-git-send-email-arnd@arndb.de> (raw)
The rxe driver fails to build on 32-bit because of a 64-bit division:
In function `rxe_qp_from_attr':
:(.text+0x53158): undefined reference to `__aeabi_uldivmod'
We can easily avoid this division by converting the nanosecond value
into jiffies directly rather than converting to microseconds first.
Signed-off-by: Arnd Bergmann <arnd-r2nGTMty4D4@public.gmane.org>
---
drivers/infiniband/hw/rxe/rxe_qp.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/infiniband/hw/rxe/rxe_qp.c b/drivers/infiniband/hw/rxe/rxe_qp.c
index aa11ac3032b2..4e7b0985aab8 100644
--- a/drivers/infiniband/hw/rxe/rxe_qp.c
+++ b/drivers/infiniband/hw/rxe/rxe_qp.c
@@ -664,7 +664,7 @@ int rxe_qp_from_attr(struct rxe_qp *qp, struct ib_qp_attr *attr, int mask,
qp->qp_timeout_jiffies = 0;
} else {
/* According to the spec, timeout = 4.096 * 2 ^ attr->timeout [us] */
- int j = usecs_to_jiffies((4096ULL << attr->timeout) / 1000);
+ int j = nsecs_to_jiffies(4096ULL << attr->timeout);
qp->qp_timeout_jiffies = j ? j : 1;
}
--
2.7.0
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next reply other threads:[~2016-06-13 12:54 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-06-13 12:54 Arnd Bergmann [this message]
2016-06-13 12:54 ` [PATCH 2/3] infiniband: rxe: add UDP_TUNNEL dependency Arnd Bergmann
[not found] ` <1465822509-4167617-2-git-send-email-arnd-r2nGTMty4D4@public.gmane.org>
2016-06-13 15:28 ` Moni Shoua
2016-06-13 12:54 ` [PATCH 3/3] infiniband: rxe: fix 32-bit build warnings Arnd Bergmann
[not found] ` <1465822509-4167617-3-git-send-email-arnd-r2nGTMty4D4@public.gmane.org>
2016-06-13 15:29 ` Moni Shoua
2016-06-13 13:18 ` [PATCH 1/3] infiniband: rxe: avoid 64-bit division Leon Romanovsky
[not found] ` <20160613131840.GJ5408-2ukJVAZIZ/Y@public.gmane.org>
2016-06-13 15:27 ` Moni Shoua
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1465822509-4167617-1-git-send-email-arnd@arndb.de \
--to=arnd-r2ngtmty4d4@public.gmane.org \
--cc=amirv-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org \
--cc=dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
--cc=hal.rosenstock-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
--cc=kamalh-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org \
--cc=leon-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
--cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=monis-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org \
--cc=netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=sean.hefty-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).