Remove pci_ats_enabled(). There are no callers outside the ATS code
itself. We don't need to check ats_cap, because if we don't find an ATS
capability, we'll never set ats_enabled.
Signed-off-by: Bjorn Helgaas
---
drivers/pci/ats.c |6 +++---
include/linux/pci.h |2 --
2 files change
Stop caching the Invalidate Queue Depth in struct pci_dev.
pci_ats_queue_depth() is typically called only once per device, and it
returns a fixed value per-device, so callers who need the value frequently
can cache it themselves.
Signed-off-by: Bjorn Helgaas
---
drivers/pci/ats.c |9 --
Move ATS declarations to linux/pci.h so they're all in one place.
Signed-off-by: Bjorn Helgaas
Reviewed-by: Joerg Roedel
---
include/linux/pci-ats.h | 41 -
include/linux/pci.h | 10 +-
2 files changed, 9 insertions(+), 42 deletions(-)
di
There's no need to BUG() if we enable ATS when it's already enabled. We
don't need to BUG() when disabling ATS on a device that doesn't support ATS
or if it's already disabled. If ATS is enabled, certainly we found an ATS
capability in the past, so it should still be there now.
Clean up these er
Use the pci_physfn() helper rather than looking up physfn by hand.
No functional change.
Signed-off-by: Bjorn Helgaas
Reviewed-by: Joerg Roedel
---
drivers/pci/ats.c |8
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/pci/ats.c b/drivers/pci/ats.c
index 95905f
The ATS setup code in ats_alloc_one() is only used by pci_ats_init(), so
inline it there. No functional change.
Signed-off-by: Bjorn Helgaas
Reviewed-by: Joerg Roedel
---
drivers/pci/ats.c |7 +--
1 file changed, 1 insertion(+), 6 deletions(-)
diff --git a/drivers/pci/ats.c b/drivers/
We previously returned -ENODEV for devices that don't support ATS (except
that we always returned 0 for VFs, whether or not they support ATS).
For consistency, always return -EINVAL (not -ENODEV) if the device doesn't
support ATS. Return zero for VFs that support ATS.
Signed-off-by: Bjorn Helgaa
The extended capabilities list is linked with 12-bit pointers, and the ATS
Smallest Translation Unit and Invalidate Queue Depth fields are both 5
bits.
Use u16 and u8 to hold the extended capability address and the stu and qdep
values. No functional change.
Signed-off-by: Bjorn Helgaas
Reviewed
The pci_ats struct is small and will get smaller, so I don't think it's
worth allocating it separately from the pci_dev struct.
Embed the ATS fields directly into struct pci_dev.
Signed-off-by: Bjorn Helgaas
---
drivers/pci/ats.c | 61 ---
dri
Previously, we allocated pci_ats structures when an IOMMU driver called
pci_enable_ats(). An SR-IOV VF shares the STU setting with its PF, so when
enabling ATS on the VF, we allocated a pci_ats struct for the PF if it
didn't already have one. We held the sriov->lock to serialize threads
concurren
We check the ATS state (enabled/disabled) and fetch the PCI ATS Invalidate
Queue Depth in performance-sensitive paths. It's easy to cache these,
which removes dependencies on PCI.
Remember the ATS enabled state. When enabling, read the queue depth once
and cache it in the device_domain_info stru
Gregor reported a deadlock [1] when enabling a VF that supports ATS.
This series is intended to fix that. The second patch should be enough to
fix the deadlock; the rest are simplification and cleanup.
These are based on v4.2-rc2.
[1] http://permalink.gmane.org/gmane.linux.kernel.iommu/9433
Cha
The OMAP IOMMU driver has been adapted to the IOMMU framework
for a while now, and it does not support being built as a
module anymore. So, remove all the module references from the
OMAP IOMMU driver.
While at it, also relocate a comment around the subsys_initcall
to avoid a checkpatch strict warn
Switch to using the BIT(x) macros in omap-iommu.h where
possible. This eliminates the following checkpatch check
warning:
"CHECK: Prefer using the BIT macro"
A couple of the warnings were ignored for better readability
of the bit-shift for the different values.
Signed-off-by: Suman Anna
---
The main OMAP IOMMU driver file has some helper functions used
by the OMAP IOMMU debugfs functionality, and there is already a
dedicated source file omap-iommu-debug.c dealing with these debugfs
routines. Move all these functions to the omap-iommu-debug.c file,
so that all the debugfs related routi
Protect the omap-pgtable.h header against double inclusion in
source code by using the standard include guard mechanism.
Signed-off-by: Suman Anna
---
drivers/iommu/omap-iopgtable.h | 5 +
1 file changed, 5 insertions(+)
diff --git a/drivers/iommu/omap-iopgtable.h b/drivers/iommu/omap-iopgt
Switch to using the BIT(x) macros in omap-iopgtable.h where
possible. This eliminates the following checkpatch check
warning:
"CHECK: Prefer using the BIT macro"
A couple of macros that used zero bit shifting are defined
directly to avoid the above warning on one of the macros.
Signed-off-by:
Remove the trailing semi-colon in the DEBUG_FOPS_RO macro
definition. This fixes the checking warning,
"WARNING: macros should not use a trailing semicolon"
Signed-off-by: Suman Anna
---
drivers/iommu/omap-iommu-debug.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/driv
Fix couple of checkpatch warnings of the type,
"WARNING: Possible unnecessary 'out of memory' message"
Signed-off-by: Suman Anna
---
drivers/iommu/omap-iommu.c | 8 ++--
1 file changed, 2 insertions(+), 6 deletions(-)
diff --git a/drivers/iommu/omap-iommu.c b/drivers/iommu/omap-iommu.c
Hi Joerg,
The following series includes minor cleanup patches and checkpatch
fixes to the OMAP IOMMU driver. The first 5 patches do some cleanup
and some debugfs code rearrangement, while the last 6 patches deal
with the stricter checkpatch warnings/checks.
The series is baselined on 4.2-rc3 and
The OMAP IOMMU bindings is updated to reflect the required #iommu-cells
property.
Signed-off-by: Suman Anna
---
Documentation/devicetree/bindings/iommu/ti,omap-iommu.txt | 6 ++
1 file changed, 6 insertions(+)
diff --git a/Documentation/devicetree/bindings/iommu/ti,omap-iommu.txt
b/Documen
There are couple of unions defined in the structures
iotlb_entry and cr_regs. There are no usage/references
to some of these union fields in the code, so clean
them up and simplify the structures.
Signed-off-by: Suman Anna
---
drivers/iommu/omap-iommu.h | 23 +++
1 file chang
Fix all the occurrences of the following check warning
generated with the checkpatch --strict option:
"CHECK: Alignment should match open parenthesis"
Signed-off-by: Suman Anna
---
drivers/iommu/omap-iommu.c | 23 +++
1 file changed, 11 insertions(+), 12 deletions(-)
dif
Use separate assignments for assigning the same value into
different variables. This fixes the following check warning
generated with the checkpatch --strict option:
"CHECK: multiple assignments should be avoided"
Signed-off-by: Suman Anna
---
drivers/iommu/omap-iommu.c | 6 --
1 file ch
Hi Joerg,
On 20/07/15 16:26, Joerg Roedel wrote:
On Thu, Jul 16, 2015 at 07:40:11PM +0100, Robin Murphy wrote:
arch/arm64/Kconfig | 1 +
arch/arm64/include/asm/dma-mapping.h | 15 +-
arch/arm64/mm/dma-mapping.c | 452 +
What happene
於 三,2015-07-01 於 03:32 +0800,Ting-Wei Lan 提到:
> Hardware:
> Intel Core i5 CPU 650 @ 3.20GHz
> Intel Ironlake Desktop
>
> In order to use VT-d on this computer, I have to use 'intel_iommu=on
> intel_iommu=igfx_off' to prevent graphics problems and system crash.
> This problem happens on Linux 3.7 a
On Thu, Jul 16, 2015 at 07:40:11PM +0100, Robin Murphy wrote:
> arch/arm64/Kconfig | 1 +
> arch/arm64/include/asm/dma-mapping.h | 15 +-
> arch/arm64/mm/dma-mapping.c | 452 +
What happened to the plan to merge this with the existing iommu
27 matches
Mail list logo