linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Catalin Marinas <catalin.marinas@arm.com>
To: Jisheng Zhang <jszhang@marvell.com>
Cc: will.deacon@arm.com, linux-kernel@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	Arnd Bergmann <arnd@arndb.de>
Subject: Re: [PATCH] arm64: mm: only initialize swiotlb when necessary
Date: Wed, 8 Jun 2016 13:08:29 +0100	[thread overview]
Message-ID: <20160608120829.GB16322@e104818-lin.cambridge.arm.com> (raw)
In-Reply-To: <1465372426-4077-1-git-send-email-jszhang@marvell.com>

On Wed, Jun 08, 2016 at 03:53:46PM +0800, Jisheng Zhang wrote:
>  static int __init arm64_dma_init(void)
>  {
> +	if (swiotlb_force || max_pfn > (arm64_dma_phys_limit >> PAGE_SHIFT))
> +		swiotlb = 1;
> +
>  	return atomic_pool_init();
>  }

So any platform with RAM larger than 4GB would still initialise swiotlb.
I wouldn't say it's an issue, 64MB is not a significant loss on such
systems.

An alternative would be to defer the freeing until we are aware of all
possible dma masks for the populated devices (e.g. from DT), though I'm
not sure that's enough, drivers may try to change such masks when
probed.

-- 
Catalin

  parent reply	other threads:[~2016-06-08 12:08 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-08  7:53 [PATCH] arm64: mm: only initialize swiotlb when necessary Jisheng Zhang
2016-06-08  8:01 ` Jisheng Zhang
2016-06-08 12:08 ` Catalin Marinas [this message]
2016-06-08 15:49   ` Arnd Bergmann
2016-06-21 16:06     ` Catalin Marinas
2016-06-21 20:13       ` Arnd Bergmann
2016-06-22 16:56         ` Catalin Marinas
2016-06-08 12:13 ` Catalin Marinas
2016-06-12  7:14   ` Jisheng Zhang

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=20160608120829.GB16322@e104818-lin.cambridge.arm.com \
    --to=catalin.marinas@arm.com \
    --cc=arnd@arndb.de \
    --cc=jszhang@marvell.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=will.deacon@arm.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).