* Suman Anna [150724 09:27]:
> Hi Tony,
>
> On 07/23/2015 11:30 PM, Tony Lindgren wrote:
> > * Suman Anna [150723 09:25]:
> >> Hi Tony,
> >>
> >> On 07/23/2015 02:24 AM, Tony Lindgren wrote:
> >>> * Suman Anna [150722 09:25]:
> On 07/22/2015 12:26 AM, Tony Lindgren wrote:
> >
> > I
On Mon, 2015-07-27 at 15:11 +0100, Will Deacon wrote:
> On Mon, Jul 27, 2015 at 03:05:38PM +0100, Robin Murphy wrote:
> > On 27/07/15 05:21, Yong Wu wrote:
> > > + } else {/* page or largepage */
> > > + if (quirk & IO_PGTABLE_QUIRK_SHORT_MTK) {
> > > +
so we can cover !flags and IORESOURCE_DISABLED both.
Cc: linux-al...@vger.kernel.org
Cc: linux-i...@vger.kernel.org
Cc: linux-am33-l...@redhat.com
Cc: linuxppc-...@lists.ozlabs.org
Cc: linux-s...@vger.kernel.org
Cc: sparcli...@vger.kernel.org
Cc: linux-...@vger.kernel.org
Cc: linux-xte...@linux-xt
On 07/27/2015 06:27 PM, Bjorn Helgaas wrote:
Hi Don,
On Mon, Jul 27, 2015 at 10:00:53AM -0400, Don Dutile wrote:
On 07/20/2015 08:15 PM, Bjorn Helgaas wrote:
Stop caching the Invalidate Queue Depth in struct pci_dev.
pci_ats_queue_depth() is typically called only once per device, and it
return
Hi Joerg,
Thanks for all your help reviewing this!
On Mon, Jul 27, 2015 at 03:08:10PM +0200, Joerg Roedel wrote:
> On Mon, Jul 20, 2015 at 07:13:57PM -0500, Bjorn Helgaas wrote:
> > We check the ATS state (enabled/disabled) and fetch the PCI ATS Invalidate
> > Queue Depth in performance-sensitive
Hi Don,
On Mon, Jul 27, 2015 at 10:00:53AM -0400, Don Dutile wrote:
> On 07/20/2015 08:15 PM, Bjorn Helgaas wrote:
> >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
With the correct DMA API calls now integrated into the io-pgtable code,
let that handle the flushing of non-coherent page table updates.
Signed-off-by: Robin Murphy
---
drivers/iommu/arm-smmu.c | 23 +++
1 file changed, 7 insertions(+), 16 deletions(-)
diff --git a/drivers/i
Currently we detect the whether the SMMU has coherent page table walk
capability from the IDR0.CTTW field, and base our cache maintenance
decisions on that. In preparation for fixing the bogus DMA API usage,
however, we need to ensure that the DMA API agrees about this, which
necessitates deferring
With the correct DMA API calls now integrated into the io-pgtable code,
let that handle the flushing of non-coherent page table updates.
Signed-off-by: Robin Murphy
---
drivers/iommu/ipmmu-vmsa.c | 19 +--
1 file changed, 5 insertions(+), 14 deletions(-)
diff --git a/drivers/iom
Currently, users of the LPAE page table code are (ab)using dma_map_page()
as a means to flush page table updates for non-coherent IOMMUs. Since
from the CPU's point of view, creating IOMMU page tables *is* passing
DMA buffers to a device (the IOMMU's page table walker), there's little
reason not to
With the correct DMA API calls now integrated into the io-pgtable code,
let that handle the flushing of non-coherent page table updates.
Signed-off-by: Robin Murphy
---
drivers/iommu/arm-smmu-v3.c | 19 ---
1 file changed, 4 insertions(+), 15 deletions(-)
diff --git a/drivers/io
On 27/07/15 16:31, Russell King - ARM Linux wrote:
On Mon, Jul 27, 2015 at 02:23:26PM +0100, Robin Murphy wrote:
On 16/07/15 10:04, Yong Wu wrote:
This patch adds support for mediatek m4u (MultiMedia Memory Management
Unit).
Signed-off-by: Yong Wu
[...]
+static void mtk_iommu_flush_pgtable(
On Mon, Jul 27, 2015 at 05:24:31AM +0100, Yong Wu wrote:
> On Fri, 2015-07-24 at 17:55 +0100, Will Deacon wrote:
> > On Fri, Jul 24, 2015 at 06:43:13AM +0100, Yong Wu wrote:
> > > On Tue, 2015-07-21 at 15:59 +0100, Will Deacon wrote:
> > > > On Thu, Jul 16, 2015 at 10:04:34AM +0100, Yong Wu wrote:
Remove the unnecessary manipulation of the PageReserved flags in the
Tegra SMMU driver. None of this is required as the page(s) remain
private to the SMMU driver.
Signed-off-by: Russell King
---
drivers/iommu/tegra-smmu.c | 5 -
1 file changed, 5 deletions(-)
diff --git a/drivers/iommu/teg
Signed-off-by: Russell King
---
drivers/iommu/tegra-smmu.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/drivers/iommu/tegra-smmu.c b/drivers/iommu/tegra-smmu.c
index e5d6bc45c58f..4a8b66f05d8f 100644
--- a/drivers/iommu/tegra-smmu.c
+++ b/drivers/iommu/tegra-smmu.c
@@ -16,8 +16,6 @@
#inc
The Tegra SMMU unmap path has several problems:
1. as_pte_put() can perform a write-after-free
2. tegra_smmu_unmap() can perform cache maintanence on a page we have
just freed.
3. when a page table is unmapped, there is no CPU cache maintanence of
the write clearing the page directory entry,
Signed-off-by: Russell King
---
drivers/iommu/tegra-smmu.c | 49 ++
1 file changed, 28 insertions(+), 21 deletions(-)
diff --git a/drivers/iommu/tegra-smmu.c b/drivers/iommu/tegra-smmu.c
index 8bf38b95cdd5..e5d6bc45c58f 100644
--- a/drivers/iommu/tegra
The dmac_* functions are private to the ARM DMA API implementation, and
should not be used by drivers. In order to discourage their use, remove
their prototypes and macros from asm/*.h.
We have to leave dmac_flush_range() behind as Exynos and MSM IOMMU code
use these; once these sites are fixed,
Pass smmu_flush_ptc() the device address rather than struct page
poiner.
Signed-off-by: Russell King
---
drivers/iommu/tegra-smmu.c | 11 +--
1 file changed, 5 insertions(+), 6 deletions(-)
diff --git a/drivers/iommu/tegra-smmu.c b/drivers/iommu/tegra-smmu.c
index 89e7961f4848..c54b0afd
Rather than explicitly zeroing pages allocated via alloc_page(), add
__GFP_ZERO to the gfp mask to ask the allocator for zeroed pages.
Signed-off-by: Russell King
---
drivers/iommu/tegra-smmu.c | 18 ++
1 file changed, 2 insertions(+), 16 deletions(-)
diff --git a/drivers/iommu/
Signed-off-by: Russell King
---
drivers/iommu/tegra-smmu.c | 17 +++--
1 file changed, 11 insertions(+), 6 deletions(-)
diff --git a/drivers/iommu/tegra-smmu.c b/drivers/iommu/tegra-smmu.c
index bc179c759805..8bf38b95cdd5 100644
--- a/drivers/iommu/tegra-smmu.c
+++ b/drivers/iommu/te
smmu_flush_ptc() is used in two modes: one is to flush an individual
entry, the other is to flush all entries. We know at the call site
which we require. Split the function into smmu_flush_ptc_all() and
smmu_flush_ptc().
Signed-off-by: Russell King
---
drivers/iommu/tegra-smmu.c | 26 +
Fix the page table lookup in the unmap and iova_to_phys methods.
Neither of these methods should allocate a page table; a missing page
table should be treated the same as no mapping present.
More importantly, using as_get_pte() for an IOVA corresponding with a
non-present page table entry incremen
Use the DMA API instead of calling architecture internal functions in
the Tegra SMMU driver.
Signed-off-by: Russell King
---
drivers/iommu/tegra-smmu.c | 129 +
1 file changed, 84 insertions(+), 45 deletions(-)
diff --git a/drivers/iommu/tegra-smmu.c
Factor out the common pte setting code into a separate function.
Signed-off-by: Russell King
---
drivers/iommu/tegra-smmu.c | 37 +
1 file changed, 17 insertions(+), 20 deletions(-)
diff --git a/drivers/iommu/tegra-smmu.c b/drivers/iommu/tegra-smmu.c
index a7
Drivers should not be using __cpuc_* functions nor outer_cache_flush()
directly. This change partly cleans up tegra-smmu.c.
The only difference between cache handling of the tegra variants is
Denver, which omits the call to outer_cache_flush(). This is due to
Denver being an ARM64 CPU, and the A
Store the struct page pointer for the second level page tables, rather
than working back from the page directory entry. This is necessary as
we want to eliminate the use of physical addresses used with
arch-private functions, switching instead to use the streaming DMA API.
Signed-off-by: Russell
Signed-off-by: Russell King
---
arch/arm/include/asm/cacheflush.h | 17 +
drivers/firmware/qcom_scm-32.c| 4 +---
2 files changed, 18 insertions(+), 3 deletions(-)
diff --git a/arch/arm/include/asm/cacheflush.h
b/arch/arm/include/asm/cacheflush.h
index c5230a44eeca..d5525bf
Use kcalloc() to allocate the use-counter array for the page directory
entries/page tables. Using kcalloc() allows us to be provided with
zero-initialised memory from the allocators, rather than initialising
it ourselves.
Signed-off-by: Russell King
---
drivers/iommu/tegra-smmu.c | 21 ++---
Add a pair of helpers to get the page directory and page table indexes.
Signed-off-by: Russell King
---
drivers/iommu/tegra-smmu.c | 16 +---
1 file changed, 13 insertions(+), 3 deletions(-)
diff --git a/drivers/iommu/tegra-smmu.c b/drivers/iommu/tegra-smmu.c
index 53d0f15dac6f..4c4
iova_to_phys() has several problems:
(a) iova_to_phys() is supposed to return 0 if there is no entry present
for the iova.
(b) if as_get_pte() fails, we oops the kernel by dereferencing a NULL
pointer. Really, we should not even be trying to allocate a page
table at all, but should onl
On Mon, Jul 27, 2015 at 02:23:26PM +0100, Robin Murphy wrote:
> On 16/07/15 10:04, Yong Wu wrote:
> >This patch adds support for mediatek m4u (MultiMedia Memory Management
> >Unit).
> >
> >Signed-off-by: Yong Wu
> [...]
> >+static void mtk_iommu_flush_pgtable(void *ptr, size_t size, void *cookie)
Am Montag, 27. Juli 2015, 15:13:13 schrieb Joerg Roedel:
> [+ Heiko for comment on Rockchip IOMMU]
adding also Daniel Kurtz and Tomasz Figa who did most of the iommu stuff if I
remember correctly.
While I'm not this versed in the iommu world I see the issue Russell pointed
out, as especially t
On Mon, Jul 27, 2015 at 03:16:54PM +0100, Russell King - ARM Linux wrote:
> On Mon, Jul 27, 2015 at 04:09:06PM +0200, Thierry Reding wrote:
> > On Mon, Jul 27, 2015 at 01:28:24PM +0100, Russell King - ARM Linux wrote:
> > > This series of patches attempts to clean up the use of architecture
> > > i
On Mon, Jul 27, 2015 at 04:09:06PM +0200, Thierry Reding wrote:
> On Mon, Jul 27, 2015 at 01:28:24PM +0100, Russell King - ARM Linux wrote:
> > This series of patches attempts to clean up the use of architecture
> > internal functions in drivers, and removes some functions from view
> > in the asm/
On Mon, Jul 27, 2015 at 01:30:17PM +0100, Russell King wrote:
> Signed-off-by: Russell King
> ---
> drivers/iommu/tegra-smmu.c | 2 --
> 1 file changed, 2 deletions(-)
>
> diff --git a/drivers/iommu/tegra-smmu.c b/drivers/iommu/tegra-smmu.c
> index e5d6bc45c58f..4a8b66f05d8f 100644
> --- a/drive
On Mon, Jul 27, 2015 at 01:30:12PM +0100, Russell King wrote:
> Signed-off-by: Russell King
> ---
> drivers/iommu/tegra-smmu.c | 49
> ++
> 1 file changed, 28 insertions(+), 21 deletions(-)
Same here.
Thierry
signature.asc
Description: PGP signatur
On Mon, Jul 27, 2015 at 01:30:07PM +0100, Russell King wrote:
> Signed-off-by: Russell King
> ---
> drivers/iommu/tegra-smmu.c | 17 +++--
> 1 file changed, 11 insertions(+), 6 deletions(-)
Joerg may want to have a proper commit message here. If you're too busy
I can probably come up
On Mon, Jul 27, 2015 at 03:05:38PM +0100, Robin Murphy wrote:
> On 27/07/15 05:21, Yong Wu wrote:
> > + } else {/* page or largepage */
> > + if (quirk & IO_PGTABLE_QUIRK_SHORT_MTK) {
> > + if (large) { /* special Bit */
>
> Th
On Mon, Jul 27, 2015 at 01:28:24PM +0100, Russell King - ARM Linux wrote:
> This series of patches attempts to clean up the use of architecture
> internal functions in drivers, and removes some functions from view
> in the asm/ headers. I'm also considering whether we need to add
> some linker mag
On 27/07/15 05:21, Yong Wu wrote:
[...]
+static arm_short_iopte
+__arm_short_pte_prot(struct arm_short_io_pgtable *data, int prot, bool large)
+{
+ arm_short_iopte pteprot;
+
+ pteprot = ARM_SHORT_PTE_S | ARM_SHORT_PTE_nG;
+ pteprot |= large ? ARM_SHORT_PTE_TYPE_LARGE :
+
On 07/20/2015 08:15 PM, Bjorn Helgaas wrote:
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
On 16/07/15 10:04, Yong Wu wrote:
This patch adds support for mediatek m4u (MultiMedia Memory Management
Unit).
Signed-off-by: Yong Wu
[...]
+static void mtk_iommu_flush_pgtable(void *ptr, size_t size, void *cookie)
+{
+ struct mtk_iommu_domain *domain = cookie;
+ unsigned long of
[+ Heiko for comment on Rockchip IOMMU]
On Mon, Jul 27, 2015 at 01:28:24PM +0100, Russell King - ARM Linux wrote:
> This series of patches attempts to clean up the use of architecture
> internal functions in drivers, and removes some functions from view
> in the asm/ headers. I'm also considering
On Mon, Jul 20, 2015 at 07:13:57PM -0500, Bjorn Helgaas wrote:
> 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 enabli
On Mon, Jul 20, 2015 at 07:15:19PM -0500, Bjorn Helgaas wrote:
> 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
> ---
> dri
On Mon, Jul 20, 2015 at 07:15:11PM -0500, Bjorn Helgaas wrote:
> 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
On Mon, Jul 20, 2015 at 07:14:54PM -0500, Bjorn Helgaas wrote:
> 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
> capa
On Mon, Jul 20, 2015 at 07:14:13PM -0500, Bjorn Helgaas wrote:
> 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
> ---
> driv
On Mon, Jul 20, 2015 at 07:14:05PM -0500, Bjorn Helgaas wrote:
> 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 al
This series of patches attempts to clean up the use of architecture
internal functions in drivers, and removes some functions from view
in the asm/ headers. I'm also considering whether we need to add
some linker magic to hide symbols when building the built-in.o files.
This was triggered by 3rd
On Mon, Jul 27, 2015 at 09:02:46AM +0100, Marc Zyngier wrote:
> Hi Mark,
Hi,
> On 23/07/15 17:52, Mark Rutland wrote:
> > Currently msi-parent is used in a couple of drivers despite being fairly
> > underspecified. This patch adds a generic binding for MSIs (including
> > the existing msi-parent
> > +Example (5)
> > +===
> > +
> > +/ {
> > + #address-cells = <1>;
> > + #size-cells = <1>;
> > +
> > + msi_a: msi-controller@a {
> > + reg = <0xa 0x1>;
> > + compatible = "vendor,some-controller";
> > + msi-controller;
> > + #msi-cells = <1>;
On 23/07/15 17:52, Mark Rutland wrote:
> Currently msi-parent is used by a few bindings to describe the
> relationship between a PCI root complex and a single MSI controller, but
> this property does not have a generic binding document.
>
> Additionally, msi-parent is insufficient to describe more
Hi Mark,
On 23/07/15 17:52, Mark Rutland wrote:
> Currently msi-parent is used in a couple of drivers despite being fairly
> underspecified. This patch adds a generic binding for MSIs (including
> the existing msi-parent property) enabling the description of platform
> devices capable of using MSI
55 matches
Mail list logo