All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jason Gunthorpe <jgg@ziepe.ca>
To: Bernard Metzler <BMT@zurich.ibm.com>
Cc: Tom Seewald <tseewald@gmail.com>,
	linux-rdma@vger.kernel.org, Doug Ledford <dledford@redhat.com>
Subject: Re: Re: [PATCH next] siw: Fix pointer-to-int-cast warning in siw_rx_pbl()
Date: Thu, 11 Jun 2020 14:05:42 -0300	[thread overview]
Message-ID: <20200611170542.GY6578@ziepe.ca> (raw)
In-Reply-To: <OFD3ED6A67.BCC6E1B8-ON00258584.00526201-00258584.0052F73E@notes.na.collabserv.com>

On Thu, Jun 11, 2020 at 03:06:12PM +0000, Bernard Metzler wrote:
> >> It initially comes from the scatterlist provided by the
> >> kernel user via drivers .map_mr_sg() method. There we get a
> >> dma_addr_t describing the users buffer.
> >
> >For the SW dma maps you have to convert the dma_addr_t to a kva using
> >kmap, it cannot just be casted.
> >
> True for a real dma addr. But here the user initially came
> with an address it got from dma_virt_ops.dma_virt_map_page(),
> which provides the virtual address of the page referenced,
> casted to dma_addr_t.

Oh, that's curiously broken on highmem systems, but OK siw is fine
with it like that, though I think it would have been better to have
some helper function connected to dma_virt do this cast.

Jason

  reply	other threads:[~2020-06-11 17:05 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-10 17:47 [PATCH next] siw: Fix pointer-to-int-cast warning in siw_rx_pbl() Tom Seewald
2020-06-10 17:50 ` Jason Gunthorpe
2020-06-10 18:21   ` Tom Seewald
2020-06-11 10:21   ` Bernard Metzler
2020-06-11 11:35     ` Jason Gunthorpe
2020-06-11 14:11       ` Bernard Metzler
2020-06-11 14:23         ` Jason Gunthorpe
2020-06-11 15:06           ` Bernard Metzler
2020-06-11 17:05             ` Jason Gunthorpe [this message]
2020-06-12 15:56               ` Bernard Metzler
2020-06-16 14:03 ` Jason Gunthorpe

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=20200611170542.GY6578@ziepe.ca \
    --to=jgg@ziepe.ca \
    --cc=BMT@zurich.ibm.com \
    --cc=dledford@redhat.com \
    --cc=linux-rdma@vger.kernel.org \
    --cc=tseewald@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.