24 Jun, 2016
1 commit
-
The of_iommu_init() is called multiple times by arch code,
make it postcore_initcall_sync, then we can drop relevant
calls fully.Note, the IOMMUs should have a chance to perform some basic
initialisation before we start adding masters to them. So
postcore_initcall_sync is good choice, it ensures of_iommu_init()
called before of_platform_populate.Acked-by: Rich Felker
Tested-by: Marek Szyprowski
Cc: Arnd Bergmann
Cc: Catalin Marinas
Cc: Marek Szyprowski
Cc: Rich Felker
Cc: Rob Herring
Cc: Robin Murphy
Cc: Will Deacon
Signed-off-by: Kefeng Wang
Acked-by: Joerg Roedel
Signed-off-by: Rob Herring
09 May, 2016
1 commit
-
As a set of driver-provided callbacks and static data, there is no
compelling reason for struct iommu_ops to be mutable in core code, so
enforce const-ness throughout.Acked-by: Thierry Reding
Signed-off-by: Robin Murphy
Acked-by: Will Deacon
Signed-off-by: Joerg Roedel
18 Feb, 2016
1 commit
-
We are saving pointer to iommu DT node in of_iommu_set_ops()
hence we should increment DT node ref count.Reviewed-by: Ray Jui
Reviewed-by: Scott Branden
Reviewed-by: Robin Murphy
Signed-off-by: Anup Patel
Signed-off-by: Will Deacon
03 Aug, 2015
1 commit
-
Printing "IOMMU is currently not supported for PCI" for
every PCI device probed on a DT-based system proves to be
both irritatingly noisy and confusing to users who have
misinterpreted it to mean they can no longer use VFIO device
assignment.Since configuring DMA masks for PCI devices via
of_dma_configure() has not in fact changed anything with
regard to IOMMUs there really is nothing to warn about here;
shut it up.Signed-off-by: Robin Murphy
Acked-by: Marc Zyngier
Signed-off-by: Joerg Roedel
04 Mar, 2015
1 commit
-
of_iommu_configure() is called from of_dma_configure() to setup iommu ops
using DT property. This API is currently used for platform devices for
which DMA configuration (including IOMMU ops) may come from the device's
parent. To extend this functionality for PCI devices, this API needs to
take a parent node ptr as an argument instead of assuming device's parent.
This is needed since for PCI, the DMA configuration may be defined in the
DT node of the root bus bridge's parent device. Currently only dma-range
is used for PCI and IOMMU is not supported. Return error if the device is
PCI.Add "parent" parameter (a struct device_node *) to of_iommu_configure().
Tested-by: Suravee Suthikulpanit (AMD Seattle)
Signed-off-by: Murali Karicheri
Signed-off-by: Bjorn Helgaas
Reviewed-by: Catalin Marinas
Acked-by: Rob Herring
Acked-by: Will Deacon
CC: Joerg Roedel
CC: Grant Likely
CC: Russell King
CC: Arnd Bergmann
05 Dec, 2014
1 commit
-
Since the data pointer in the DT node is public and may be overwritten
by conflicting code, move the DT-probed IOMMU ops to a private list
where they will be safe.Acked-by: Grant Likely
Signed-off-by: Robin Murphy
[will: added missing #include and missing ')']
Signed-off-by: Will Deacon
02 Dec, 2014
2 commits
-
The generic IOMMU device-tree bindings can be used to add arbitrary OF
masters to an IOMMU with a compliant binding.This patch introduces of_iommu_configure, which does exactly that.
Acked-by: Arnd Bergmann
Acked-by: Joerg Roedel
Acked-by: Marek Szyprowski
Tested-by: Robin Murphy
Signed-off-by: Will Deacon -
IOMMU drivers must be initialised before any of their upstream devices,
otherwise the relevant iommu_ops won't be configured for the bus in
question. To solve this, a number of IOMMU drivers use initcalls to
initialise the driver before anything has a chance to be probed.Whilst this solves the immediate problem, it leaves the job of probing
the IOMMU completely separate from the iommu_ops to configure the IOMMU,
which are called on a per-bus basis and require the driver to figure out
exactly which instance of the IOMMU is being requested. In particular,
the add_device callback simply passes a struct device to the driver,
which then has to parse firmware tables or probe buses to identify the
relevant IOMMU instance.This patch takes the first step in addressing this problem by adding an
early initialisation pass for IOMMU drivers, giving them the ability to
store some per-instance data in their iommu_ops structure and store that
in their of_node. This can later be used when parsing OF masters to
identify the IOMMU instance in question.Acked-by: Arnd Bergmann
Acked-by: Joerg Roedel
Acked-by: Marek Szyprowski
Tested-by: Robin Murphy
Signed-off-by: Will Deacon
07 Jan, 2014
1 commit
-
Fix a warning in of_iommu.c:
drivers/iommu/of_iommu.c:38:5: warning: no previous prototype for 'of_get_dma_window' [-Wmissing-prototypes]
Signed-off-by: Brian Norris
Cc: Hiroshi DOYU
Signed-off-by: Joerg Roedel
25 Jun, 2012
1 commit
-
This code was based on:
"arch/microblaze/kernel/prom_parse.c"
"arch/powerpc/kernel/prom_parse.c"Can replace "of_parse_dma_window()" in the above. This supports
different formats flexibly. "prefix" can be configured if any. "busno"
and "index" are optionally specified. Set NULL and 0 if not used.Signed-off-by: Hiroshi DOYU
Acked-by: Stephen Warren
Signed-off-by: Joerg Roedel