RE: [PATCH v2 1/2] IOMMU: arm-smmu-v3: Fix broken STE.VALID check in Broadcom Vulcan

2015-12-18 Thread Prem (Premachandra) Mallappa
Hi Will, > > Is this workaround only needed for bypass STEs? If not, we have a problem > when we install a stage-1 entry, because we'll clear the EATS bits as it > stands. > Yes, this _was_ needed only in Bypass STEs, AFAIK. However, the h/w fixes that were committed recently has this worked o

Re: [PATCH v7 1/5] dt-bindings: iommu: Add binding for mediatek IOMMU

2015-12-18 Thread Rob Herring
On Fri, Dec 18, 2015 at 04:09:39PM +0800, Yong Wu wrote: > This patch add mediatek iommu dts binding document. > > Signed-off-by: Yong Wu Acked-by: Rob Herring ___ iommu mailing list iommu@lists.linux-foundation.org https://lists.linuxfoundation.org/m

Re: [PATCH 3/3] iommu/dma: Avoid unlikely high-order allocations

2015-12-18 Thread Doug Anderson
Robin, On Fri, Dec 18, 2015 at 9:01 AM, Robin Murphy wrote: > Doug reports that the equivalent page allocator on 32-bit ARM exhibits > particularly pathalogical behaviour under memory pressure when > fragmentation is high, where allocating a 4MB buffer takes tens of > seconds and the number of ca

[PATCH 2/2] iommu/arm-smmu: Tidy up 64-bit/atomic I/O accesses

2015-12-18 Thread Robin Murphy
With {read,write}q_relaxed now able to fall back to the common nonatomic-hi-lo helper, make use of that so that we don't have to open-code our own. In the process, also convert the other remaining split accesses, and repurpose the custom accessor to smooth out the couple of troublesome instances wh

[PATCH 1/2] io-64-nonatomic: Add relaxed accessor variants

2015-12-18 Thread Robin Murphy
Whilst commit 9439eb3ab9d1 ("asm-generic: io: implement relaxed accessor macros as conditional wrappers") makes the *_relaxed forms of I/O accessors universally available to drivers, in cases where writeq() is implemented via the io-64-nonatomic helpers, writeq_relaxed() will end up falling back to

Re: [PATCH v7 4/5] iommu/mediatek: Add mt8173 IOMMU driver

2015-12-18 Thread Robin Murphy
On 18/12/15 08:09, Yong Wu wrote: This patch adds support for mediatek m4u (MultiMedia Memory Management Unit). Signed-off-by: Yong Wu --- drivers/iommu/Kconfig | 14 + drivers/iommu/Makefile| 1 + drivers/iommu/mtk_iommu.c | 734 ++ 3

[PATCH 3/3] iommu/dma: Avoid unlikely high-order allocations

2015-12-18 Thread Robin Murphy
Doug reports that the equivalent page allocator on 32-bit ARM exhibits particularly pathalogical behaviour under memory pressure when fragmentation is high, where allocating a 4MB buffer takes tens of seconds and the number of calls to alloc_pages() is over 9000![1] We can drastically improve that

[PATCH 2/3] iommu/dma: Use correct offset in map_sg

2015-12-18 Thread Robin Murphy
When mapping a non-page-aligned scatterlist entry, we copy the original offset to the output DMA address before aligning it to hand off to iommu_map_sg(), then later adding the IOVA page address portion to get the final mapped address. However, when the IOVA page size is smaller than the CPU page s

[PATCH 1/3] iommu/dma: Add some missing #includes

2015-12-18 Thread Robin Murphy
dma-iommu.c was naughtily relying on an implicit transitive #include of linux/vmalloc.h, which is apparently not present on some architectures. Add that, plus a couple more headers for other functions which are used similarly. Reported-by: kbuild test robot Signed-off-by: Robin Murphy --- Hi Jo

[git pull] IOMMU Fixes for Linux v4.4-rc5

2015-12-18 Thread Joerg Roedel
Hi Linus, The following changes since commit 9f9499ae8e6415cefc4fe0a96ad0e27864353c89: Linux 4.4-rc5 (2015-12-13 17:42:58 -0800) are available in the git repository at: git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu.git tags/iommu-fixes-v4.4-rc5 for you to fetch changes up to 7f

Re: [PATCH v7 4/5] iommu/mediatek: Add mt8173 IOMMU driver

2015-12-18 Thread kbuild test robot
Hi Yong, [auto build test ERROR on tegra/for-next] [also build test ERROR on v4.4-rc5] [cannot apply to iommu/next next-20151217] url: https://github.com/0day-ci/linux/commits/Yong-Wu/MT8173-IOMMU-SUPPORT/20151218-161550 base: https://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux for

[PATCH v7 2/5] dt-bindings: mediatek: Add smi dts binding

2015-12-18 Thread Yong Wu
This patch add smi binding document and smi local arbiter header file. Signed-off-by: Yong Wu --- Hi Rob, Because I move the header file(dt-bindings/memory/mt8173-larb-port.h) from our patch[1/5] into here. I am not sure you agree with this, so don't add your Ack above. Acked-by: Rob Herring

[PATCH v7 3/5] memory: mediatek: Add SMI driver

2015-12-18 Thread Yong Wu
This patch add SMI(Smart Multimedia Interface) driver. This driver is responsible to enable/disable iommu and control the power domain and clocks of each local arbiter. Signed-off-by: Yong Wu --- drivers/memory/Kconfig | 8 ++ drivers/memory/Makefile| 1 + drivers/memory/mtk-smi.c

[PATCH v7 4/5] iommu/mediatek: Add mt8173 IOMMU driver

2015-12-18 Thread Yong Wu
This patch adds support for mediatek m4u (MultiMedia Memory Management Unit). Signed-off-by: Yong Wu --- drivers/iommu/Kconfig | 14 + drivers/iommu/Makefile| 1 + drivers/iommu/mtk_iommu.c | 734 ++ 3 files changed, 749 insertions(+) creat

[PATCH v7 5/5] dts: mt8173: Add iommu/smi nodes for mt8173

2015-12-18 Thread Yong Wu
This patch add the iommu/larbs nodes for mt8173 Signed-off-by: Yong Wu --- arch/arm64/boot/dts/mediatek/mt8173.dtsi | 81 1 file changed, 81 insertions(+) diff --git a/arch/arm64/boot/dts/mediatek/mt8173.dtsi b/arch/arm64/boot/dts/mediatek/mt8173.dtsi index 4dd

[PATCH v7 0/5] MT8173 IOMMU SUPPORT

2015-12-18 Thread Yong Wu
This patch set adds support for m4u(Multimedia Memory Management Unit), Currently it only support the m4u with 2 levels of pagetable on mt8173. It's based on Robin Murphy's reposting Short-descriptor v2[1]. Please check the hardware block diagram of Mediatek IOMMU. m4u (Mul

[PATCH v7 1/5] dt-bindings: iommu: Add binding for mediatek IOMMU

2015-12-18 Thread Yong Wu
This patch add mediatek iommu dts binding document. Signed-off-by: Yong Wu --- .../devicetree/bindings/iommu/mediatek,iommu.txt | 68 ++ 1 file changed, 68 insertions(+) create mode 100644 Documentation/devicetree/bindings/iommu/mediatek,iommu.txt diff --git a/Documentati