From: Jason Gunthorpe <jgg@nvidia.com>
To: Linus Walleij <linus.walleij@linaro.org>
Cc: kernel test robot <lkp@intel.com>,
Bernard Metzler <bmt@zurich.ibm.com>,
Leon Romanovsky <leon@kernel.org>,
linux-rdma@vger.kernel.org, Zhu Yanjun <zyjzyj2000@gmail.com>,
oe-kbuild-all@lists.linux.dev
Subject: Re: [PATCH] RDMA: Add ib_virt_dma_to_page()
Date: Thu, 30 Mar 2023 19:37:18 -0300 [thread overview]
Message-ID: <ZCYPHgV5riNGE0rS@nvidia.com> (raw)
In-Reply-To: <CACRpkdYpob6Si2ghXHqSD=6f_PO_gPbJhE_u4jNEcu1VbxO4pQ@mail.gmail.com>
On Thu, Mar 30, 2023 at 11:53:52PM +0200, Linus Walleij wrote:
> On Thu, Mar 30, 2023 at 9:02 PM kernel test robot <lkp@intel.com> wrote:
>
> > 0d1b756acf60da Linus Walleij 2022-09-02 536 /*
> > 0d1b756acf60da Linus Walleij 2022-09-02 537 * Cast to an uintptr_t to preserve all 64 bits
> > 0d1b756acf60da Linus Walleij 2022-09-02 538 * in sge->laddr.
> > 0d1b756acf60da Linus Walleij 2022-09-02 539 */
> > a10308d393288b Jason Gunthorpe 2023-03-30 540 u64 va = (uintptr_t)(sge->laddr + sge_off);
>
> Oh now that becomes an u64
>
> > b9be6f18cf9ed0 Bernard Metzler 2019-06-20 541
> > a10308d393288b Jason Gunthorpe 2023-03-30 542 page_array[seg] = ib_virt_dma_to_page(va);
> > b9be6f18cf9ed0 Bernard Metzler 2019-06-20 543 if (do_crc)
> > b9be6f18cf9ed0 Bernard Metzler 2019-06-20 544 crypto_shash_update(
> > b9be6f18cf9ed0 Bernard Metzler 2019-06-20 545 c_tx->mpa_crc_hd,
> > 0d1b756acf60da Linus Walleij 2022-09-02 @546 (void *)va,
>
> Then this cast needs to be (void *)(uintptr_t) again.
>
> Not very elegant, possibly something more smooth can be done.
It needs another similar helper function to from dma_addr to kva void *
Jason
prev parent reply other threads:[~2023-03-30 22:37 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-30 14:26 [PATCH] RDMA: Add ib_virt_dma_to_page() Jason Gunthorpe
2023-03-30 18:24 ` Linus Walleij
2023-03-30 19:01 ` kernel test robot
2023-03-30 21:53 ` Linus Walleij
2023-03-30 22:37 ` Jason Gunthorpe [this message]
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=ZCYPHgV5riNGE0rS@nvidia.com \
--to=jgg@nvidia.com \
--cc=bmt@zurich.ibm.com \
--cc=leon@kernel.org \
--cc=linus.walleij@linaro.org \
--cc=linux-rdma@vger.kernel.org \
--cc=lkp@intel.com \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=zyjzyj2000@gmail.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.