All of lore.kernel.org
 help / color / mirror / Atom feed
From: Randy Dunlap <randy.dunlap@oracle.com>
To: Steve Wise <swise@opengridcomputing.com>
Cc: rdreier@cisco.com, general@lists.openfabrics.org,
	linux-next@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2.6.30] RDMA/cxgb3: Remove modulo math.
Date: Tue, 10 Feb 2009 11:12:27 -0800	[thread overview]
Message-ID: <4991D19B.5050307@oracle.com> (raw)
In-Reply-To: <4991D12A.8090309@opengridcomputing.com>

Steve Wise wrote:
> 
> Randy Dunlap wrote:
>> Steve Wise wrote:
>>  
>>> From: Steve Wise <swise@opengridcomputing.com>
>>>
>>> Removes the need for special u64 math on i386 systems.
>>>
>>> Fixes i386 build break in linux-next introduced by commit
>>> 1e27e8cee0698259ccb1fe6abeaf4b48969c0945.
>>>
>>> Signed-off-by: Steve Wise <swise@opengridcomputing.com>
>>>     
>>
>> Yes, that works, thanks.  But this patch should go into 2.6.29, not
>> just 2.6.30.
>>
>>
>>   
> I thought the commit that caused this was:
> 
> 1e27e8cee0698259ccb1fe6abeaf4b48969c0945
> 
> And that was going in 2.6.30.  (I thought).

Oh, OK.  If that's the case, then you are obviously correct
about [2.6.30].

Thanks.

>>> ---
>>>
>>>  drivers/infiniband/hw/cxgb3/iwch_qp.c |    8 ++++----
>>>  1 files changed, 4 insertions(+), 4 deletions(-)
>>>
>>> diff --git a/drivers/infiniband/hw/cxgb3/iwch_qp.c
>>> b/drivers/infiniband/hw/cxgb3/iwch_qp.c
>>> index 2cf6f13..5bb299a 100644
>>> --- a/drivers/infiniband/hw/cxgb3/iwch_qp.c
>>> +++ b/drivers/infiniband/hw/cxgb3/iwch_qp.c
>>> @@ -232,8 +232,8 @@ static int iwch_sgl2pbl_map(struct iwch_dev *rhp,
>>> struct ib_sge *sg_list,
>>>              return -EINVAL;
>>>          }
>>>          offset = sg_list[i].addr - mhp->attr.va_fbo;
>>> -        offset += ((u64) mhp->attr.va_fbo) %
>>> -                  (1UL << (12 + mhp->attr.page_size));
>>> +        offset += mhp->attr.va_fbo &
>>> +              ((1UL << (12 + mhp->attr.page_size)) - 1);
>>>          pbl_addr[i] = ((mhp->attr.pbl_addr -
>>>                      rhp->rdev.rnic_info.pbl_base) >> 3) +
>>>                    (offset >> (12 + mhp->attr.page_size));
>>> @@ -263,8 +263,8 @@ static int build_rdma_recv(struct iwch_qp *qhp,
>>> union t3_wr *wqe,
>>>          wqe->recv.sgl[i].len = cpu_to_be32(wr->sg_list[i].length);
>>>  
>>>          /* to in the WQE == the offset into the page */
>>> -        wqe->recv.sgl[i].to = cpu_to_be64(((u32) wr->sg_list[i].addr) %
>>> -                (1UL << (12 + page_size[i])));
>>> +        wqe->recv.sgl[i].to = cpu_to_be64(((u64) wr->sg_list[i].addr) &
>>> +                ((1UL << (12 + page_size[i]))-1));
>>>  
>>>          /* pbl_addr is the adapters address in the PBL */
>>>          wqe->recv.pbl_addr[i] = cpu_to_be32(pbl_addr[i]);


-- 
~Randy

  reply	other threads:[~2009-02-10 19:23 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-02-10 18:44 [PATCH 2.6.30] RDMA/cxgb3: Remove modulo math Steve Wise
2009-02-10 18:44 ` [ofa-general] " Steve Wise
2009-02-10 19:04 ` Randy Dunlap
2009-02-10 19:04   ` [ofa-general] " Randy Dunlap
2009-02-10 19:10   ` Steve Wise
2009-02-10 19:10     ` [ofa-general] " Steve Wise
2009-02-10 19:12     ` Randy Dunlap [this message]
2009-02-11  0:38 ` [ofa-general] " Roland Dreier
2009-02-11  1:03   ` Steve Wise
2009-02-11  1:07     ` David Miller
2009-02-11  1:18       ` Roland Dreier
2009-02-11  1:18         ` Roland Dreier
2009-02-11  1:23         ` David Miller
2009-02-11  1:23           ` David Miller
2009-02-11  7:20           ` Roland Dreier
2009-02-11  7:20             ` Roland Dreier
2009-02-11  8:00             ` David Miller
2009-02-11  1:03   ` Steve Wise
2009-02-11 15:44   ` Steve Wise
2009-02-11 18:12     ` Roland Dreier
2009-02-11 18:32       ` Steve Wise
2009-02-11 18:36         ` Roland Dreier
2009-02-11 18:44           ` Steve Wise

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=4991D19B.5050307@oracle.com \
    --to=randy.dunlap@oracle.com \
    --cc=general@lists.openfabrics.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-next@vger.kernel.org \
    --cc=rdreier@cisco.com \
    --cc=swise@opengridcomputing.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.