Linux IOMMU Development
 help / color / mirror / Atom feed
From: Laurent Pinchart <laurent.pinchart-ryLnwIuWjnjg/C1BVhZhaw@public.gmane.org>
To: Arnd Bergmann <arnd-r2nGTMty4D4@public.gmane.org>
Cc: Rob Herring <robh-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>,
	"linux-samsung-soc-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
	<linux-samsung-soc-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
	Shaik Ameer Basha
	<shaik.ameer-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>,
	David Wodhouse <dwmw2-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org>,
	Will Deacon <will.deacon-5wv7dgnIgG8@public.gmane.org>,
	Tomasz Figa <tomasz.figa-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
	Inki Dae <inki.dae-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>,
	"iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org"
	<iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org>,
	Kukjin Kim <kgene.kim-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>,
	Kyungmin Park
	<kyungmin.park-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>,
	Thierry Reding <treding-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>,
	Cho KyongHo <pullip.cho-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>,
	linaro-mm-sig-cunTk1MwBs8s++Sfvej+rw@public.gmane.org,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org,
	Lucas Stach <l.stach-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
Subject: Re: [Linaro-mm-sig] [PATCH v3 18/19] iommu: exynos: init from dt-specific callback instead of initcall
Date: Thu, 18 Dec 2014 22:36:14 +0200	[thread overview]
Message-ID: <1518515.QutUfiWrAf@avalon> (raw)
In-Reply-To: <5219064.gvW43bShnl@wuerfel>

Hi Arnd,

On Wednesday 17 December 2014 16:56:53 Arnd Bergmann wrote:
> On Wednesday 17 December 2014 15:53:25 Lucas Stach wrote:
> > Am Mittwoch, den 17.12.2014, 15:27 +0100 schrieb Arnd Bergmann:
> >> On Wednesday 17 December 2014 01:24:42 Laurent Pinchart wrote:
> >>> If we forbid the IOMMU driver from being compiled as a module can't we
> >>> just rely on deferred probing ? The bus master driver will just be
> >>> reprobed after the IOMMU gets probed, like for other devices.
> >>> 
> >>> This could fail in case the IOMMU device permanently fails to probe.
> >>> There would be something very wrong in the system in that case,
> >>> Enabling the bus masters totally transparently without IOMMU support
> >>> could not be such a good idea.
> >> 
> >> I believe in the majority of cases today, the IOMMU is entirely
> >> optional. There are valid reasons for not including the IOMMU driver in
> >> the kernel, e.g. when you know that all the machines with that driver
> >> can DMA to all of their RAM and you want to avoid the overhead of IOTLB
> >> misses.
> > 
> > This is similar to the problems we discussed with the componentized
> > device framework and in the end everybody agreed on a simple rule:
> > if the device node is enabled in the DT there must be a driver bound to
> > it before other devices depending on this node can be probed.
> > 
> > If we apply the same logic to the IOMMU situation we get two
> > possibilities to allow bypassing the IOMMU:
> > 1. completely disable the IOMMU node in the DT
> > 2. leave node enabled in DT, but add a bypass property
> > 
> > Obviously the second option still requires to have the IOMMU driver
> > available, but is more flexible. Right now everything depends on the
> > IOMMU being in passthrough mode at reset with no driver bound. If a
> > device comes around where this isn't the case thing will break with the
> > current assumptions or the first option.
> > 
> > Having the IOMMU node enabled in DT with no driver available to the
> > kernel seems like an invalid configuration which should be expected to
> > break. Exactly the same thing as with componentized devices...
> 
> One differences here is that for the IOMMU, we should generally be able
> to fall back to swiotlb

Or to nothing at all if the device can DMA to the allocated memory directly.

> (currently only on ARM64, not ARM32, until someone adds support). I can see
> your point regarding machines that have a mandatory IOMMU with no fallback
> when there is no driver, but we can support them by making the iommu driver
> selected through Kconfig for that platform, while still allowing other
> platforms to work with drivers left out of the kernel.

The question is how to tell the kernel not to wait for an IOMMU that will 
never be there. Would a kernel command line argument be an acceptable solution 
or do we need something more automatic ?

-- 
Regards,

Laurent Pinchart

  reply	other threads:[~2014-12-18 20:36 UTC|newest]

Thread overview: 63+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-19 11:15 [PATCH v3 00/19] Exynos SYSMMU (IOMMU) integration with DT and DMA-mapping subsystem Marek Szyprowski
     [not found] ` <1416395748-10731-1-git-send-email-m.szyprowski-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
2014-11-19 11:15   ` [PATCH v3 01/19] iommu: fix const qualifier in of_iommu_set_ops Marek Szyprowski
2014-11-19 11:15 ` [PATCH v3 02/19] iommu: fix initialization without 'add_device' callback Marek Szyprowski
2014-11-19 11:15 ` [PATCH v3 03/19] arm: dma-mapping: add missing check for iommu Marek Szyprowski
2014-11-19 11:15 ` [PATCH v3 04/19] drm: exynos: detach from default dma-mapping domain on init Marek Szyprowski
2014-11-19 11:15 ` [PATCH v3 05/19] arm: exynos: pm_domains: add support for devices registered before arch_initcall Marek Szyprowski
2014-11-19 11:15 ` [PATCH v3 06/19] ARM: dts: exynos4: add sysmmu nodes Marek Szyprowski
2014-11-19 11:15 ` [PATCH v3 07/19] iommu: exynos: don't read version register on every tlb operation Marek Szyprowski
2014-11-19 11:15 ` [PATCH v3 08/19] iommu: exynos: remove unused functions Marek Szyprowski
2014-11-19 11:15 ` [PATCH v3 09/19] iommu: exynos: remove useless spinlock Marek Szyprowski
2014-11-19 11:15 ` [PATCH v3 10/19] iommu: exynos: refactor function parameters to simplify code Marek Szyprowski
2014-11-19 11:15 ` [PATCH v3 11/19] iommu: exynos: remove unused functions, part 2 Marek Szyprowski
2014-11-19 11:15 ` [PATCH v3 12/19] iommu: exynos: remove useless device_add/remove callbacks Marek Szyprowski
2014-11-19 11:15 ` [PATCH v3 13/19] iommu: exynos: add support for binding more than one sysmmu to master device Marek Szyprowski
2014-11-19 11:15 ` [PATCH v3 14/19] iommu: exynos: add support for runtime_pm Marek Szyprowski
2014-11-19 11:15 ` [PATCH v3 15/19] iommu: exynos: rename variables to reflect their purpose Marek Szyprowski
2014-11-19 11:15 ` [PATCH v3 16/19] iommu: exynos: document internal structures Marek Szyprowski
2014-11-19 11:15 ` [PATCH v3 17/19] iommu: exynos: remove excessive includes and sort others alphabetically Marek Szyprowski
2014-11-19 11:15 ` [PATCH v3 18/19] iommu: exynos: init from dt-specific callback instead of initcall Marek Szyprowski
2014-12-14 12:45   ` Laurent Pinchart
2014-12-15  9:47     ` Thierry Reding
2014-12-15 17:17     ` Will Deacon
     [not found]       ` <20141215171700.GP20738-5wv7dgnIgG8@public.gmane.org>
2014-12-15 17:27         ` Laurent Pinchart
2014-12-15 17:43           ` Will Deacon
2014-12-15 17:53             ` Laurent Pinchart
2014-12-15 18:13               ` Will Deacon
2014-12-15 18:19                 ` Laurent Pinchart
2014-12-16 10:58                   ` Marek Szyprowski
2014-12-16 11:40                 ` Arnd Bergmann
2014-12-16 12:07                   ` Laurent Pinchart
2014-12-16 12:10                     ` [Linaro-mm-sig] " Arnd Bergmann
2014-12-16 23:24                       ` Laurent Pinchart
2014-12-17 14:27                         ` Arnd Bergmann
2014-12-17 14:39                           ` Laurent Pinchart
2014-12-17 15:41                             ` Arnd Bergmann
2014-12-17 16:02                               ` Laurent Pinchart
2014-12-17 21:58                                 ` Arnd Bergmann
2014-12-17 22:38                                   ` Laurent Pinchart
2014-12-17 14:53                           ` Lucas Stach
     [not found]                             ` <1418828005.3347.7.camel-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
2014-12-17 15:56                               ` Arnd Bergmann
2014-12-18 20:36                                 ` Laurent Pinchart [this message]
2014-12-18 23:21                                   ` Arnd Bergmann
2014-11-19 11:15 ` [PATCH v3 19/19] iommu: exynos: add callback for initializing devices from device tree Marek Szyprowski
2014-12-02  9:59 ` [PATCH v3 00/19] Exynos SYSMMU (IOMMU) integration with DT and DMA-mapping subsystem Sjoerd Simons
2014-12-05 10:22   ` Marek Szyprowski
2015-01-06  9:49     ` Javier Martinez Canillas
2015-01-07  2:03       ` Joonyoung Shim
2015-01-07  9:33         ` Javier Martinez Canillas
2015-01-07  9:55           ` Joonyoung Shim
     [not found]             ` <54AD0293.70909-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
2015-01-08 16:42               ` Javier Martinez Canillas
     [not found]                 ` <54AEB384.2040005-ZGY8ohtN/8pPYcu2f3hruQ@public.gmane.org>
2015-01-12  6:40                   ` Joonyoung Shim
2015-01-12  9:43                     ` Joonyoung Shim
     [not found]                     ` <54B36C5A.6050109-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
2015-01-12 16:09                       ` Javier Martinez Canillas
2015-01-13  5:24                         ` Joonyoung Shim
2015-01-13  8:40                           ` Joonyoung Shim
     [not found]                             ` <54B4D9E1.10400-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
2015-01-13  9:43                               ` Javier Martinez Canillas
2015-01-13  9:21                           ` Javier Martinez Canillas
2015-01-14  0:19                           ` Javier Martinez Canillas
     [not found]                             ` <54B5B5F6.3030607-ZGY8ohtN/8pPYcu2f3hruQ@public.gmane.org>
2015-01-14  0:24                               ` Javier Martinez Canillas
2015-01-20 11:12                                 ` Joonyoung Shim
     [not found]                                   ` <54BE383B.5030505-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
2015-01-20 14:05                                     ` Javier Martinez Canillas
     [not found]   ` <1417514366.21830.22.camel-ZGY8ohtN/8pPYcu2f3hruQ@public.gmane.org>
2015-01-16 10:33     ` Marek Szyprowski
     [not found]       ` <54B8E904.6090107-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
2015-01-16 15:44         ` Sjoerd Simons

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=1518515.QutUfiWrAf@avalon \
    --to=laurent.pinchart-rylnwiuwjnjg/c1bvhzhaw@public.gmane.org \
    --cc=arnd-r2nGTMty4D4@public.gmane.org \
    --cc=dwmw2-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org \
    --cc=inki.dae-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org \
    --cc=iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org \
    --cc=kgene.kim-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org \
    --cc=kyungmin.park-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org \
    --cc=l.stach-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org \
    --cc=linaro-mm-sig-cunTk1MwBs8s++Sfvej+rw@public.gmane.org \
    --cc=linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org \
    --cc=linux-samsung-soc-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=pullip.cho-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org \
    --cc=robh-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
    --cc=shaik.ameer-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org \
    --cc=tomasz.figa-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    --cc=treding-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org \
    --cc=will.deacon-5wv7dgnIgG8@public.gmane.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