From: Florian Fainelli <f.fainelli@gmail.com>
To: Stefano Stabellini <sstabellini@kernel.org>,
Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Cc: xen-devel@lists.xensource.com, Ard Biesheuvel <ardb@kernel.org>,
Catalin Marinas <catalin.marinas@arm.com>,
open list <linux-kernel@vger.kernel.org>,
Russell King <linux@armlinux.org.uk>,
Max Filippov <jcmvbkbc@gmail.com>,
"open list:SWIOTLB SUBSYSTEM" <iommu@lists.linux-foundation.org>,
opendmb@gmail.com, Mike Rapoport <rppt@kernel.org>,
Andrew Morton <akpm@linux-foundation.org>,
Robin Murphy <robin.murphy@arm.com>,
Christoph Hellwig <hch@lst.de>,
linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH] ARM: Qualify enabling of swiotlb_init()
Date: Mon, 29 Mar 2021 12:30:42 -0700 [thread overview]
Message-ID: <3db926f4-6047-cc62-8654-a965b8570e75@gmail.com> (raw)
In-Reply-To: <alpine.DEB.2.21.2103191718210.439@sstabellini-ThinkPad-T480s>
On 3/19/21 5:22 PM, Stefano Stabellini wrote:
> On Fri, 19 Mar 2021, Konrad Rzeszutek Wilk wrote:
>> On Fri, Mar 19, 2021 at 02:07:31PM +0100, Christoph Hellwig wrote:
>>> On Thu, Mar 18, 2021 at 09:03:33PM -0700, Florian Fainelli wrote:
>>>> #ifdef CONFIG_ARM_LPAE
>>>> + if (swiotlb_force == SWIOTLB_FORCE ||
>>>> + max_pfn > arm_dma_pfn_limit)
>>>
>>> Does arm_dma_pfn_limit do the right thing even with the weirdest
>>> remapping ranges? Maybe a commen here would be useful.
>>>
>>>> + swiotlb_init(1);
>>>> + else
>>>> + swiotlb_force = SWIOTLB_NO_FORCE;
>>>
>>> Konrad: what do you think of setting swiotlb_force to SWIOTLB_NO_FORCE
>>> and only switching it to SWIOTLB_NORMAL when swiotlb_init* is called?
>>> That kind makes more sense than forcing the callers to do it.
>>>
>>> While we're at it, I think swiotlb_force should probably be renamed to
>>> swiotlb_mode or somethng like that.
>>
>> swiotlb_mode sounds good.
>>
>> Also it got me thinking - ARM on Xen at some point was a bit strange, so not sure how
>> the logic works here, Stefano?
>
> There is nothing strange in regards to swiotlb_force. swiotlb_force is only used
> in swiotlb-xen map_page to figure out whether:
>
> - we actually have to use the swiotlb bounce buffer (this is the
> swiotlb_xen == SWIOTLB_FORCE case)
> - or we can use the provided page directly for dma if other conditions
> are met (dma_capable, !range_straddles_page_boundary, ...)
>
>
> I don't think that switching to "swiotlb_mode" would cause any issues.
>
Should I toss this in Russell's patch tracker or do you need me to make
some changes to the patch?
--
Florian
_______________________________________________
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu
next prev parent reply other threads:[~2021-03-29 19:30 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-03-19 4:03 [PATCH] ARM: Qualify enabling of swiotlb_init() Florian Fainelli
2021-03-19 13:07 ` Christoph Hellwig
2021-03-19 17:43 ` Florian Fainelli
2021-03-19 19:59 ` Konrad Rzeszutek Wilk
2021-03-20 0:22 ` Stefano Stabellini
2021-03-29 19:30 ` Florian Fainelli [this message]
2021-03-30 5:36 ` Christoph Hellwig
2021-04-01 17:33 ` Konrad Rzeszutek Wilk
2021-04-01 19:11 ` Florian Fainelli
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=3db926f4-6047-cc62-8654-a965b8570e75@gmail.com \
--to=f.fainelli@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=ardb@kernel.org \
--cc=catalin.marinas@arm.com \
--cc=hch@lst.de \
--cc=iommu@lists.linux-foundation.org \
--cc=jcmvbkbc@gmail.com \
--cc=konrad.wilk@oracle.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@armlinux.org.uk \
--cc=opendmb@gmail.com \
--cc=robin.murphy@arm.com \
--cc=rppt@kernel.org \
--cc=sstabellini@kernel.org \
--cc=xen-devel@lists.xensource.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).