[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20210319130731.GB2624@lst.de>
Date: Fri, 19 Mar 2021 14:07:31 +0100
From: Christoph Hellwig <hch@....de>
To: Florian Fainelli <f.fainelli@...il.com>
Cc: linux-arm-kernel@...ts.infradead.org,
Konrad Rzeszutek Wilk <konrad.wilk@...cle.com>,
Christoph Hellwig <hch@....de>,
Marek Szyprowski <m.szyprowski@...sung.com>,
Robin Murphy <robin.murphy@....com>,
"open list:SWIOTLB SUBSYSTEM" <iommu@...ts.linux-foundation.org>,
open list <linux-kernel@...r.kernel.org>,
Russell King <linux@...linux.org.uk>,
Mike Rapoport <rppt@...nel.org>,
Andrew Morton <akpm@...ux-foundation.org>,
Ard Biesheuvel <ardb@...nel.org>,
Max Filippov <jcmvbkbc@...il.com>,
Catalin Marinas <catalin.marinas@....com>, opendmb@...il.com
Subject: Re: [PATCH] ARM: Qualify enabling of swiotlb_init()
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.
Powered by blists - more mailing lists