Re: [PATCH] ARM: Qualify enabling of swiotlb_init()

2021-04-01 Thread Florian Fainelli
On 4/1/21 10:33 AM, Konrad Rzeszutek Wilk wrote: > On Tue, Mar 30, 2021 at 07:36:07AM +0200, Christoph Hellwig wrote: >> On Mon, Mar 29, 2021 at 12:30:42PM -0700, Florian Fainelli wrote: >>> Should I toss this in Russell's patch tracker or do you need me to make >>> some changes to the patch? >> >>

Re: [PATCH] ARM: Qualify enabling of swiotlb_init()

2021-04-01 Thread Konrad Rzeszutek Wilk
On Tue, Mar 30, 2021 at 07:36:07AM +0200, Christoph Hellwig wrote: > On Mon, Mar 29, 2021 at 12:30:42PM -0700, Florian Fainelli wrote: > > Should I toss this in Russell's patch tracker or do you need me to make > > some changes to the patch? > > Due to all the other changes in this area I don't th

Re: [PATCH] ARM: Qualify enabling of swiotlb_init()

2021-03-29 Thread Christoph Hellwig
On Mon, Mar 29, 2021 at 12:30:42PM -0700, Florian Fainelli wrote: > Should I toss this in Russell's patch tracker or do you need me to make > some changes to the patch? Due to all the other changes in this area I don't think anything but the swiotlb tree makes much sense here.

Re: [PATCH] ARM: Qualify enabling of swiotlb_init()

2021-03-29 Thread Florian Fainelli
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 == SWI

Re: [PATCH] ARM: Qualify enabling of swiotlb_init()

2021-03-19 Thread Stefano Stabellini
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_

Re: [PATCH] ARM: Qualify enabling of swiotlb_init()

2021-03-19 Thread Konrad Rzeszutek Wilk
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 ev

Re: [PATCH] ARM: Qualify enabling of swiotlb_init()

2021-03-19 Thread Florian Fainelli
On 3/19/2021 6:07 AM, 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 weirde

Re: [PATCH] ARM: Qualify enabling of swiotlb_init()

2021-03-19 Thread Christoph Hellwig
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

[PATCH] ARM: Qualify enabling of swiotlb_init()

2021-03-18 Thread Florian Fainelli
We do not need a SWIOTLB unless we have DRAM that is addressable beyond the arm_dma_limit. Compare max_pfn with arm_dma_pfn_limit to determine whether we do need a SWIOTLB to be initialized. Fixes: ad3c7b18c5b3 ("arm: use swiotlb for bounce buffering on LPAE configs") Signed-off-by: Florian Fainel