public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@lst.de>
To: Florian Fainelli <f.fainelli@gmail.com>
Cc: linux-arm-kernel@lists.infradead.org,
	Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>,
	Christoph Hellwig <hch@lst.de>,
	Marek Szyprowski <m.szyprowski@samsung.com>,
	Robin Murphy <robin.murphy@arm.com>,
	"open list:SWIOTLB SUBSYSTEM" <iommu@lists.linux-foundation.org>,
	open list <linux-kernel@vger.kernel.org>,
	Russell King <linux@armlinux.org.uk>,
	Mike Rapoport <rppt@kernel.org>,
	Andrew Morton <akpm@linux-foundation.org>,
	Ard Biesheuvel <ardb@kernel.org>,
	Max Filippov <jcmvbkbc@gmail.com>,
	Catalin Marinas <catalin.marinas@arm.com>,
	opendmb@gmail.com
Subject: Re: [PATCH] ARM: Qualify enabling of swiotlb_init()
Date: Fri, 19 Mar 2021 14:07:31 +0100	[thread overview]
Message-ID: <20210319130731.GB2624@lst.de> (raw)
In-Reply-To: <20210319040333.183827-1-f.fainelli@gmail.com>

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.

  reply	other threads:[~2021-03-19 13:08 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 [this message]
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
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=20210319130731.GB2624@lst.de \
    --to=hch@lst.de \
    --cc=akpm@linux-foundation.org \
    --cc=ardb@kernel.org \
    --cc=catalin.marinas@arm.com \
    --cc=f.fainelli@gmail.com \
    --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=m.szyprowski@samsung.com \
    --cc=opendmb@gmail.com \
    --cc=robin.murphy@arm.com \
    --cc=rppt@kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox