From: Jason Gunthorpe <jgg@nvidia.com>
To: jianghaoran <jianghaoran@kylinos.cn>
Cc: bmt@zurich.ibm.com, leon@kernel.org, linux-rdma@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] RDMA/siw: Solve the error of compiling the 32BIT mips kernel when enable CONFIG_RDMA_SIW
Date: Thu, 22 Sep 2022 14:02:57 -0300 [thread overview]
Message-ID: <YyyVQcbFCinWT8Z8@nvidia.com> (raw)
In-Reply-To: <20220901055138.1704755-1-jianghaoran@kylinos.cn>
On Thu, Sep 01, 2022 at 01:51:38PM +0800, jianghaoran wrote:
> cross-compilation environment:
> ubuntu 20.04
> mips-linux-gnu-gcc (Ubuntu 10.3.0-1ubuntu1~20.04) 10.3.0
>
> generate a configuration file by make randconfig:
> CONFIG_32BIT=y
> CONFIG_RDMA_SIW=y
>
> the error message as follows:
> In file included from ../arch/mips/include/asm/page.h:270,
> from ../arch/mips/include/asm/io.h:29,
> from ../arch/mips/include/asm/mmiowb.h:5,
> from ../include/linux/spinlock.h:64,
> from ../include/linux/wait.h:9,
> from ../include/linux/net.h:19,
> from ../drivers/infiniband/sw/siw/siw_qp_tx.c:8:
> ../drivers/infiniband/sw/siw/siw_qp_tx.c: In function ‘siw_tx_hdt’:
> ../arch/mips/include/asm/page.h:255:53: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast]
> 255 | #define virt_to_pfn(kaddr) PFN_DOWN(virt_to_phys((void *)(kaddr)))
> | ^
> ../include/asm-generic/memory_model.h:18:41: note: in definition of macro ‘__pfn_to_page’
> 18 | #define __pfn_to_page(pfn) (mem_map + ((pfn) - ARCH_PFN_OFFSET))
> | ^~~
> ../arch/mips/include/asm/page.h:255:31: note: in expansion of macro ‘PFN_DOWN’
> 255 | #define virt_to_pfn(kaddr) PFN_DOWN(virt_to_phys((void *)(kaddr)))
> | ^~~~~~~~
> ../arch/mips/include/asm/page.h:256:41: note: in expansion of macro ‘virt_to_pfn’
> 256 | #define virt_to_page(kaddr) pfn_to_page(virt_to_pfn(kaddr))
> | ^~~~~~~~~~~
> ../drivers/infiniband/sw/siw/siw_qp_tx.c:538:23: note: in expansion of macro ‘virt_to_page’
> 538 | page_array[seg] = virt_to_page(va & PAGE_MASK);
> | ^~~~~~~~~~~~
> cc1: all warnings being treated as errors
> make[5]: *** [../scripts/Makefile.build:249: drivers/infiniband/sw/siw/siw_qp_tx.o] Error 1
> make[4]: *** [../scripts/Makefile.build:465: drivers/infiniband/sw/siw] Error 2
> make[3]: *** [../scripts/Makefile.build:465: drivers/infiniband/sw] Error 2
> make[3]: *** Waiting for unfinished jobs....
>
> Reported-by: k2ci <kernel-bot@kylinos.cn>
> Signed-off-by: jianghaoran <jianghaoran@kylinos.cn>
> ---
> drivers/infiniband/sw/siw/siw_qp_tx.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/infiniband/sw/siw/siw_qp_tx.c b/drivers/infiniband/sw/siw/siw_qp_tx.c
> index 1f4e60257700..55ed0c27f449 100644
> --- a/drivers/infiniband/sw/siw/siw_qp_tx.c
> +++ b/drivers/infiniband/sw/siw/siw_qp_tx.c
> @@ -533,7 +533,7 @@ static int siw_tx_hdt(struct siw_iwarp_tx *c_tx, struct socket *s)
> kunmap_local(kaddr);
> }
> } else {
> - u64 va = sge->laddr + sge_off;
> + unsigned long va = sge->laddr + sge_off;
The compiler is saying it should be a void * not an unsigned long.
Jason
next prev parent reply other threads:[~2022-09-22 17:03 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-01 5:51 [PATCH] RDMA/siw: Solve the error of compiling the 32BIT mips kernel when enable CONFIG_RDMA_SIW jianghaoran
2022-09-22 17:02 ` Jason Gunthorpe [this message]
-- strict thread matches above, loose matches on Subject: below --
2022-09-01 7:05 Bernard Metzler
2022-09-01 11:26 ` jianghaoran
2022-09-01 12:35 ` Leon Romanovsky
2022-09-01 13:32 ` Linus Walleij
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=YyyVQcbFCinWT8Z8@nvidia.com \
--to=jgg@nvidia.com \
--cc=bmt@zurich.ibm.com \
--cc=jianghaoran@kylinos.cn \
--cc=leon@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rdma@vger.kernel.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