From 24a25c7541d663e1b3cf20e5fc52d6dda2adf4f9 Mon Sep 17 00:00:00 2001 From: Eldad Zinger Date: Tue, 21 Sep 2010 19:21:50 +0200 Subject: [PATCH] sdp: BUG2138 - 32bit hosts can't devide 64bit variables Signed-off-by: Eldad Zinger --- drivers/infiniband/ulp/sdp/sdp_main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/infiniband/ulp/sdp/sdp_main.c b/drivers/infiniband/ulp/sdp/sdp_main.c index 66853898da3c..aefd386a8c35 100644 --- a/drivers/infiniband/ulp/sdp/sdp_main.c +++ b/drivers/infiniband/ulp/sdp/sdp_main.c @@ -1373,7 +1373,7 @@ static inline cycles_t sdp_usec_to_cycles(int usecs) #endif } -static inline unsigned sdp_cycles_to_usecs(cycles_t c) +static inline unsigned sdp_cycles_to_usecs(unsigned long c) { #ifdef CONFIG_PPC return c / tb_ticks_per_usec; @@ -1398,7 +1398,7 @@ static inline int poll_recv_cq(struct sock *sk) if (sdp_poll_rx_cq(sdp_sk(sk))) { SDPSTATS_COUNTER_INC(rx_poll_hit); SDPSTATS_HIST(poll_hit_usec, sdp_cycles_to_usecs( - (get_cycles() - start))); + (unsigned long)(get_cycles() - start))); return 0; } } while (cycles_before(get_cycles(), end)); -- 2.50.1