All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alexey Kardashevskiy <aik@ozlabs.ru>
To: Christoph Hellwig <hch@lst.de>
Cc: "Carol Soto" <clsoto@us.ibm.com>,
	linuxppc-dev <linuxppc-dev@lists.ozlabs.org>,
	"Cédric Le Goater" <clg@kaod.org>,
	"Frederic Barrat" <fbarrat@linux.ibm.com>
Subject: Re: [PATCH kernel] powerpc/dma: Fix dma_map_ops::get_required_mask
Date: Wed, 29 Sep 2021 18:48:06 +1000	[thread overview]
Message-ID: <8bb9bfd4-f481-e9e6-34d1-fea78ace864f@ozlabs.ru> (raw)
In-Reply-To: <20200909075849.GA12282@lst.de>



On 09/09/2020 17:58, Christoph Hellwig wrote:
> On Tue, Sep 08, 2020 at 11:10:03PM +1000, Alexey Kardashevskiy wrote:
>>>> a-ha, this makes more sense, thanks. Then I guess we need to revert that
>>>> one bit from yours f1565c24b596, do not we?
>>>
>>> Why?  The was the original intent of the API, but now we also use
>>> internally to check the addressing capabilities.
>>
>> The bigger mask the better, no? As it is now, it's limited by the window 
>> size which happens to be bigger than 4GB but smaller then full 64bit (48bit 
>> on my system)
> 
> Yes, the bigger mask is better.  But I don't see why you'd want to
> revert the dma bypass code for that entirely.


Ok we have another victim of this change:

https://github.com/torvalds/linux/blob/master/drivers/scsi/mpt3sas/mpt3sas_base.c#L3007


It calls dma_get_required_mask() to know "the mask that the platform
requires to operate efficiently" (from dma-api.rst). The current
upstream returns 31 for pseries which in no way is efficient, we can do
better so we need this hunk back (but just this one):
https://github.com/torvalds/linux/commit/f1565c24b5965dfd2352f209c417ff160be04db9#diff-18e87e1863bf902c6388d72ad99467b7fcec0dd37084636d96ad5a35a3e59904L156
(well, almost, move it above the !tbl check).

This does not hit us on powernv/upstream as that returns 44 (or so) and
the mpt3sas driver (which does the right thing afaict) just assumes that
">32" == ">=63". What do I miss here? Thanks,

ps:
https://patchwork.ozlabs.org/project/linuxppc-dev/patch/20200908015106.79661-1-aik@ozlabs.ru/#2528801
is the rest of the thread I am replying to.


-- 
Alexey

  parent reply	other threads:[~2021-09-29  8:49 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-08  1:51 [PATCH kernel] powerpc/dma: Fix dma_map_ops::get_required_mask Alexey Kardashevskiy
2020-09-08  5:44 ` Christoph Hellwig
2020-09-08 12:06   ` Alexey Kardashevskiy
2020-09-08 12:19     ` Christoph Hellwig
     [not found]       ` <1746dd66810.27bb.1ca38dd7e845b990cd13d431eb58563d@ozlabs.ru>
     [not found]         ` <20200909075849.GA12282@lst.de>
2020-09-09  9:36           ` Alexey Kardashevskiy
2020-09-15  6:50             ` Christoph Hellwig
2020-09-22  2:26               ` Alexey Kardashevskiy
2020-09-23 14:10                 ` Christoph Hellwig
2020-09-24  7:03                   ` Alexey Kardashevskiy
2020-09-25  4:56                     ` Christoph Hellwig
2021-09-29  8:48           ` Alexey Kardashevskiy [this message]
2020-09-08  6:45 ` Michael Ellerman
2020-09-08 11:45 ` Cédric Le Goater
2020-09-10 12:55 ` Michael Ellerman

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=8bb9bfd4-f481-e9e6-34d1-fea78ace864f@ozlabs.ru \
    --to=aik@ozlabs.ru \
    --cc=clg@kaod.org \
    --cc=clsoto@us.ibm.com \
    --cc=fbarrat@linux.ibm.com \
    --cc=hch@lst.de \
    --cc=linuxppc-dev@lists.ozlabs.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 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.