RE: Re: Re: [PATCH] RDMA/siw: Solve the error of compiling the 32BIT mips kernel when enable CONFIG_RDMA_SIW

From: Bernard Metzler
Date: Thu Sep 22 2022 - 15:08:18 EST




> -----Original Message-----
> From: Jason Gunthorpe <jgg@xxxxxxxxxx>
> Sent: Thursday, 22 September 2022 19:48
> To: Bernard Metzler <BMT@xxxxxxxxxxxxxx>
> Cc: jianghaoran <jianghaoran@xxxxxxxxxx>; leon@xxxxxxxxxx; linux-
> rdma@xxxxxxxxxxxxxxx; linux-kernel@xxxxxxxxxxxxxxx; Linus Walleij
> <linus.walleij@xxxxxxxxxx>
> Subject: [EXTERNAL] Re: Re: [PATCH] RDMA/siw: Solve the error of compiling
> the 32BIT mips kernel when enable CONFIG_RDMA_SIW
>
> On Thu, Sep 22, 2022 at 05:17:24PM +0000, Bernard Metzler wrote:
>
> > > The compiler is saying it should be a void * not an unsigned long.
> >
> > Linus' [Patch v3] was moving it to uintptr_t which I think is
> > the right solution. We went for that afaik.
>
> That isn't what I saw in merged patches:
>
> INVALID URI REMOVED
> 3A__lore.kernel.org_all_20220913140416.280860971-
> 40linuxfoundation.org_&d=DwIBAg&c=jf_iaSHvJObTbx-siA1ZOg&r=2TaYXQ0T-
> r8ZO1PP1alNwU_QJcRRLfmYTAgd3QCvqSc&m=Rvcp-
> EvvdOCENMF2s1l1j5ky3WQqSiJ0_by31NFDnrQ_iDO6zegGgLPy4OiQmkCO&s=FZOBbAPo0wCJJ
> R0_062_zc6iE6WyRszu3Q9eUwvA6o0&e=
>

Looks good. It's the right patch from Linus W. which got
merged, as your lore link points at. You seem to have looked
at Jianghaoran's patch for the same issue, which came
in almost same time, but was not taken.

What was applied is Linus'
[PATCH v3] RDMA/siw: Pass a pointer to virt_to_page()

Best,
Bernard.

...
@@ -533,13 +533,23 @@ static int siw_tx_hdt(struct siw_iwarp_tx *c_tx, struct socket *s)
kunmap_local(kaddr);
}
} else {
- u64 va = sge->laddr + sge_off;
+ /*
+ * Cast to an uintptr_t to preserve all 64 bits
+ * in sge->laddr.
+ */
+ uintptr_t va = (uintptr_t)(sge->laddr + sge_off);
...


> I'm confused??
>
> Jason