[PATCH v5 5/6] dmaengine: pl330: Make sure microcode is privileged

2016-07-27 Thread Mitchel Humpherys
ur...@arm.com> Signed-off-by: Mitchel Humpherys <mitch...@codeaurora.org> --- Notes: v3..v4 - Reworked against the new dma attrs format. drivers/dma/pl330.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/dma/pl330.c b/drivers/dma/pl330.c in

[PATCH v5 5/6] dmaengine: pl330: Make sure microcode is privileged

2016-07-27 Thread Mitchel Humpherys
the DMA_ATTR_PRIVILEGED attribute, which will ensure that the microcode IOMMU mapping is only accessible to the privileged level. Cc: Dan Williams Cc: Vinod Koul Reviewed-by: Robin Murphy Tested-by: Robin Murphy Signed-off-by: Mitchel Humpherys --- Notes: v3..v4 - Reworked against the new dma

[PATCH v5 6/6] Revert "iommu/arm-smmu: Treat all device transactions as unprivileged"

2016-07-27 Thread Mitchel Humpherys
This reverts commit d346180e70b9 ("iommu/arm-smmu: Treat all device transactions as unprivileged") since some platforms actually make use of privileged transactions. Reviewed-by: Robin Murphy <robin.mur...@arm.com> Tested-by: Robin Murphy <robin.mur...@arm.com> Signed-off

[PATCH v5 1/6] iommu: add IOMMU_PRIV attribute

2016-07-27 Thread Mitchel Humpherys
Add the IOMMU_PRIV attribute, which is used to indicate privileged mappings. Reviewed-by: Robin Murphy <robin.mur...@arm.com> Tested-by: Robin Murphy <robin.mur...@arm.com> Signed-off-by: Mitchel Humpherys <mitch...@codeaurora.org> --- Notes: v2..v3 - Added comme

[PATCH v5 2/6] iommu/io-pgtable-arm: add support for the IOMMU_PRIV flag

2016-07-27 Thread Mitchel Humpherys
From: Jeremy Gebben Allow the creation of privileged mode mappings, for stage 1 only. Reviewed-by: Robin Murphy Tested-by: Robin Murphy Signed-off-by: Jeremy Gebben --- Notes: v2..v3 -

[PATCH v5 6/6] Revert "iommu/arm-smmu: Treat all device transactions as unprivileged"

2016-07-27 Thread Mitchel Humpherys
This reverts commit d346180e70b9 ("iommu/arm-smmu: Treat all device transactions as unprivileged") since some platforms actually make use of privileged transactions. Reviewed-by: Robin Murphy Tested-by: Robin Murphy Signed-off-by: Mitchel Humpherys --- Notes: v2..v3

[PATCH v5 1/6] iommu: add IOMMU_PRIV attribute

2016-07-27 Thread Mitchel Humpherys
Add the IOMMU_PRIV attribute, which is used to indicate privileged mappings. Reviewed-by: Robin Murphy Tested-by: Robin Murphy Signed-off-by: Mitchel Humpherys --- Notes: v2..v3 - Added comment include/linux/iommu.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include

[PATCH v5 2/6] iommu/io-pgtable-arm: add support for the IOMMU_PRIV flag

2016-07-27 Thread Mitchel Humpherys
From: Jeremy Gebben Allow the creation of privileged mode mappings, for stage 1 only. Reviewed-by: Robin Murphy Tested-by: Robin Murphy Signed-off-by: Jeremy Gebben --- Notes: v2..v3 - Use existing bit definitions. drivers/iommu/io-pgtable-arm.c | 5 - 1 file changed, 4

[PATCH v5 4/6] arm64/dma-mapping: Implement DMA_ATTR_PRIVILEGED

2016-07-27 Thread Mitchel Humpherys
robin.mur...@arm.com> Signed-off-by: Mitchel Humpherys <mitch...@codeaurora.org> --- Notes: v4..v5 - Simplified (suggested by Robin Murphy) v3..v4 - Reworked against the new dma attrs format v2..v3 - Renamed and redocumented dma_direction_to_pro

[PATCH v5 0/6] Add support for privileged mappings

2016-07-27 Thread Mitchel Humpherys
in the pl330 driver (suggested by Will). Jeremy Gebben (1): iommu/io-pgtable-arm: add support for the IOMMU_PRIV flag Mitchel Humpherys (5): iommu: add IOMMU_PRIV attribute common: DMA-mapping: add DMA_ATTR_PRIVILEGED attribute arm64/dma-mapping: Implement DMA_ATTR_PRIVILEGED dmaengin

[PATCH v5 3/6] common: DMA-mapping: add DMA_ATTR_PRIVILEGED attribute

2016-07-27 Thread Mitchel Humpherys
in.mur...@arm.com> Signed-off-by: Mitchel Humpherys <mitch...@codeaurora.org> --- Notes: v2..v3 - Not worrying about executability. Documentation/DMA-attributes.txt | 10 ++ include/linux/dma-mapping.h | 6 ++ 2 files changed, 16 insertions(+) diff --gi

[PATCH v5 4/6] arm64/dma-mapping: Implement DMA_ATTR_PRIVILEGED

2016-07-27 Thread Mitchel Humpherys
The newly added DMA_ATTR_PRIVILEGED is useful for creating mappings that are only accessible to privileged DMA engines. Implement it in dma-iommu.c so that the ARM64 DMA IOMMU mapper can make use of it. Reviewed-by: Robin Murphy Tested-by: Robin Murphy Signed-off-by: Mitchel Humpherys

[PATCH v5 0/6] Add support for privileged mappings

2016-07-27 Thread Mitchel Humpherys
er (suggested by Will). Jeremy Gebben (1): iommu/io-pgtable-arm: add support for the IOMMU_PRIV flag Mitchel Humpherys (5): iommu: add IOMMU_PRIV attribute common: DMA-mapping: add DMA_ATTR_PRIVILEGED attribute arm64/dma-mapping: Implement DMA_ATTR_PRIVILEGED dmaengine: pl330: Make sure microcode

[PATCH v5 3/6] common: DMA-mapping: add DMA_ATTR_PRIVILEGED attribute

2016-07-27 Thread Mitchel Humpherys
e to the DMA-mapping subsystem that the buffer is fully accessible at the elevated privilege level (and ideally inaccessible or at least read-only at the lesser-privileged levels). Cc: linux-...@vger.kernel.org Reviewed-by: Robin Murphy Tested-by: Robin Murphy Signed-off-by: Mitchel Humpherys --

Re: [PATCH v4 4/6] arm64/dma-mapping: Implement DMA_ATTR_PRIVILEGED

2016-07-27 Thread Mitchel Humpherys
On Tue, Jul 26 2016 at 04:05:17 PM, Robin Murphy wrote: > + if (attrs & DMA_ATTR_PRIVILEGED) > + prot |= IOMMU_PRIV; > + > > then drop the rest of the changes to the switch statement below. It's > taken me an embarrassingly long time to work out why things

Re: [PATCH v4 4/6] arm64/dma-mapping: Implement DMA_ATTR_PRIVILEGED

2016-07-27 Thread Mitchel Humpherys
On Tue, Jul 26 2016 at 04:05:17 PM, Robin Murphy wrote: > + if (attrs & DMA_ATTR_PRIVILEGED) > + prot |= IOMMU_PRIV; > + > > then drop the rest of the changes to the switch statement below. It's > taken me an embarrassingly long time to work out why things were blowing > up in

[PATCH v4 5/6] dmaengine: pl330: Make sure microcode is privileged

2016-07-25 Thread Mitchel Humpherys
the DMA_ATTR_PRIVILEGED attribute, which will ensure that the microcode IOMMU mapping is only accessible to the privileged level. Cc: Dan Williams <dan.j.willi...@intel.com> Cc: Jassi Brar <jassi.b...@samsung.com> Signed-off-by: Mitchel Humpherys <mitch...@codeaurora.org> ---

[PATCH v4 5/6] dmaengine: pl330: Make sure microcode is privileged

2016-07-25 Thread Mitchel Humpherys
the DMA_ATTR_PRIVILEGED attribute, which will ensure that the microcode IOMMU mapping is only accessible to the privileged level. Cc: Dan Williams Cc: Jassi Brar Signed-off-by: Mitchel Humpherys --- Notes: v3..v4 - Reworked against the new dma attrs format. drivers/dma/pl330.c | 6 -- 1

[PATCH v4 6/6] Revert "iommu/arm-smmu: Treat all device transactions as unprivileged"

2016-07-25 Thread Mitchel Humpherys
This reverts commit d346180e70b9 ("iommu/arm-smmu: Treat all device transactions as unprivileged") since some platforms actually make use of privileged transactions. Signed-off-by: Mitchel Humpherys <mitch...@codeaurora.org> --- Notes: v2..v3 - Moved to the e

[PATCH v4 6/6] Revert "iommu/arm-smmu: Treat all device transactions as unprivileged"

2016-07-25 Thread Mitchel Humpherys
This reverts commit d346180e70b9 ("iommu/arm-smmu: Treat all device transactions as unprivileged") since some platforms actually make use of privileged transactions. Signed-off-by: Mitchel Humpherys --- Notes: v2..v3 - Moved to the end of the series. drivers/iommu/

[PATCH v4 1/6] iommu: add IOMMU_PRIV attribute

2016-07-25 Thread Mitchel Humpherys
Add the IOMMU_PRIV attribute, which is used to indicate privileged mappings. Signed-off-by: Mitchel Humpherys <mitch...@codeaurora.org> --- Notes: v2..v3 - Added comment include/linux/iommu.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/linux/iommu.h b/i

[PATCH v4 1/6] iommu: add IOMMU_PRIV attribute

2016-07-25 Thread Mitchel Humpherys
Add the IOMMU_PRIV attribute, which is used to indicate privileged mappings. Signed-off-by: Mitchel Humpherys --- Notes: v2..v3 - Added comment include/linux/iommu.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/linux/iommu.h b/include/linux/iommu.h index

[PATCH v4 2/6] iommu/io-pgtable-arm: add support for the IOMMU_PRIV flag

2016-07-25 Thread Mitchel Humpherys
From: Jeremy Gebben Allow the creation of privileged mode mappings, for stage 1 only. Signed-off-by: Jeremy Gebben --- Notes: v2..v3 - Use existing bit definitions. drivers/iommu/io-pgtable-arm.c | 5 - 1 file changed, 4

[PATCH v4 4/6] arm64/dma-mapping: Implement DMA_ATTR_PRIVILEGED

2016-07-25 Thread Mitchel Humpherys
The newly added DMA_ATTR_PRIVILEGED is useful for creating mappings that are only accessible to privileged DMA engines. Implement it in dma-iommu.c so that the ARM64 DMA IOMMU mapper can make use of it. Signed-off-by: Mitchel Humpherys <mitch...@codeaurora.org> --- Notes:

[PATCH v4 3/6] common: DMA-mapping: add DMA_ATTR_PRIVILEGED attribute

2016-07-25 Thread Mitchel Humpherys
e to the DMA-mapping subsystem that the buffer is fully accessible at the elevated privilege level (and ideally inaccessible or at least read-only at the lesser-privileged levels). Cc: linux-...@vger.kernel.org Signed-off-by: Mitchel Humpherys <mitch...@codeaurora.org> --- Notes: v3..v4

[PATCH v4 0/6] Add support for privileged mappings

2016-07-25 Thread Mitchel Humpherys
privileged mappings work, and use that in the pl330 driver (suggested by Will). Jeremy Gebben (1): iommu/io-pgtable-arm: add support for the IOMMU_PRIV flag Mitchel Humpherys (5): iommu: add IOMMU_PRIV attribute common: DMA-mapping: add DMA_ATTR_PRIVILEGED attribute arm64/dma

[PATCH v4 2/6] iommu/io-pgtable-arm: add support for the IOMMU_PRIV flag

2016-07-25 Thread Mitchel Humpherys
From: Jeremy Gebben Allow the creation of privileged mode mappings, for stage 1 only. Signed-off-by: Jeremy Gebben --- Notes: v2..v3 - Use existing bit definitions. drivers/iommu/io-pgtable-arm.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git

[PATCH v4 4/6] arm64/dma-mapping: Implement DMA_ATTR_PRIVILEGED

2016-07-25 Thread Mitchel Humpherys
The newly added DMA_ATTR_PRIVILEGED is useful for creating mappings that are only accessible to privileged DMA engines. Implement it in dma-iommu.c so that the ARM64 DMA IOMMU mapper can make use of it. Signed-off-by: Mitchel Humpherys --- Notes: v3..v4 - Reworked against

[PATCH v4 3/6] common: DMA-mapping: add DMA_ATTR_PRIVILEGED attribute

2016-07-25 Thread Mitchel Humpherys
e to the DMA-mapping subsystem that the buffer is fully accessible at the elevated privilege level (and ideally inaccessible or at least read-only at the lesser-privileged levels). Cc: linux-...@vger.kernel.org Signed-off-by: Mitchel Humpherys --- Notes: v3..v4 - Reworked against the

[PATCH v4 0/6] Add support for privileged mappings

2016-07-25 Thread Mitchel Humpherys
work, and use that in the pl330 driver (suggested by Will). Jeremy Gebben (1): iommu/io-pgtable-arm: add support for the IOMMU_PRIV flag Mitchel Humpherys (5): iommu: add IOMMU_PRIV attribute common: DMA-mapping: add DMA_ATTR_PRIVILEGED attribute arm64/dma-mapping: Implement DMA_ATTR_PRIVILEGED dma

Re: [PATCH v3 0/6] Add support for privileged mappings

2016-07-25 Thread Mitchel Humpherys
On Mon, Jul 25 2016 at 10:50:13 AM, Will Deacon <will.dea...@arm.com> wrote: > On Fri, Jul 22, 2016 at 01:39:45PM -0700, Mitchel Humpherys wrote: >> On Fri, Jul 22 2016 at 05:51:07 PM, Will Deacon <will.dea...@arm.com> wrote: >> > On Tue, Jul 19, 2016 at 01:36:49PM

Re: [PATCH v3 0/6] Add support for privileged mappings

2016-07-25 Thread Mitchel Humpherys
On Mon, Jul 25 2016 at 10:50:13 AM, Will Deacon wrote: > On Fri, Jul 22, 2016 at 01:39:45PM -0700, Mitchel Humpherys wrote: >> On Fri, Jul 22 2016 at 05:51:07 PM, Will Deacon wrote: >> > On Tue, Jul 19, 2016 at 01:36:49PM -0700, Mitchel Humpherys wrote: >> >> The f

Re: [PATCH v3 0/6] Add support for privileged mappings

2016-07-22 Thread Mitchel Humpherys
On Fri, Jul 22 2016 at 05:51:07 PM, Will Deacon <will.dea...@arm.com> wrote: > On Tue, Jul 19, 2016 at 01:36:49PM -0700, Mitchel Humpherys wrote: >> The following patch to the ARM SMMU driver: >> >> commit d346180e70b91b3d5a1ae7e5603e65593d4622bc >>

Re: [PATCH v3 0/6] Add support for privileged mappings

2016-07-22 Thread Mitchel Humpherys
On Fri, Jul 22 2016 at 05:51:07 PM, Will Deacon wrote: > On Tue, Jul 19, 2016 at 01:36:49PM -0700, Mitchel Humpherys wrote: >> The following patch to the ARM SMMU driver: >> >> commit d346180e70b91b3d5a1ae7e5603e65593d4622bc >> Author: Robin Murphy >>

[PATCH v3 0/6] Add support for privileged mappings

2016-07-19 Thread Mitchel Humpherys
a_direction_to_prot. * Don't worry about executability in new DMA attr. v1..v2 - Added a new DMA attribute to make executable privileged mappings work, and use that in the pl330 driver (suggested by Will). Jeremy Gebben (1): iommu/io-pgtable-arm: add support for the IOMMU_PRIV flag M

[PATCH v3 2/6] iommu/io-pgtable-arm: add support for the IOMMU_PRIV flag

2016-07-19 Thread Mitchel Humpherys
From: Jeremy Gebben Allow the creation of privileged mode mappings, for stage 1 only. Signed-off-by: Jeremy Gebben --- Notes: v2..v3 - Use existing bit definitions. drivers/iommu/io-pgtable-arm.c | 5 - 1 file changed, 4

[PATCH v3 0/6] Add support for privileged mappings

2016-07-19 Thread Mitchel Humpherys
t worry about executability in new DMA attr. v1..v2 - Added a new DMA attribute to make executable privileged mappings work, and use that in the pl330 driver (suggested by Will). Jeremy Gebben (1): iommu/io-pgtable-arm: add support for the IOMMU_PRIV flag Mitchel Humpherys (5): iommu: a

[PATCH v3 2/6] iommu/io-pgtable-arm: add support for the IOMMU_PRIV flag

2016-07-19 Thread Mitchel Humpherys
From: Jeremy Gebben Allow the creation of privileged mode mappings, for stage 1 only. Signed-off-by: Jeremy Gebben --- Notes: v2..v3 - Use existing bit definitions. drivers/iommu/io-pgtable-arm.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git

[PATCH v3 5/6] dmaengine: pl330: Make sure microcode is privileged

2016-07-19 Thread Mitchel Humpherys
the DMA_ATTR_PRIVILEGED attribute, which will ensure that the microcode IOMMU mapping is only accessible to the privileged level. Cc: Dan Williams <dan.j.willi...@intel.com> Cc: Jassi Brar <jassi.b...@samsung.com> Signed-off-by: Mitchel Humpherys <mitch...@codeaurora.org> --- drivers/dma/pl33

[PATCH v3 4/6] arm64/dma-mapping: Implement DMA_ATTR_PRIVILEGED

2016-07-19 Thread Mitchel Humpherys
The newly added DMA_ATTR_PRIVILEGED is useful for creating mappings that are only accessible to privileged DMA engines. Implement it in dma-iommu.c so that the ARM64 DMA IOMMU mapper can make use of it. Signed-off-by: Mitchel Humpherys <mitch...@codeaurora.org> --- Notes:

[PATCH v3 5/6] dmaengine: pl330: Make sure microcode is privileged

2016-07-19 Thread Mitchel Humpherys
the DMA_ATTR_PRIVILEGED attribute, which will ensure that the microcode IOMMU mapping is only accessible to the privileged level. Cc: Dan Williams Cc: Jassi Brar Signed-off-by: Mitchel Humpherys --- drivers/dma/pl330.c | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/drivers/dma/pl330

[PATCH v3 4/6] arm64/dma-mapping: Implement DMA_ATTR_PRIVILEGED

2016-07-19 Thread Mitchel Humpherys
The newly added DMA_ATTR_PRIVILEGED is useful for creating mappings that are only accessible to privileged DMA engines. Implement it in dma-iommu.c so that the ARM64 DMA IOMMU mapper can make use of it. Signed-off-by: Mitchel Humpherys --- Notes: v2..v3 - Renamed

[PATCH v3 3/6] common: DMA-mapping: add DMA_ATTR_PRIVILEGED attribute

2016-07-19 Thread Mitchel Humpherys
e to the DMA-mapping subsystem that the buffer is fully accessible at the elevated privilege level (and ideally inaccessible or at least read-only at the lesser-privileged levels). Cc: linux-...@vger.kernel.org Signed-off-by: Mitchel Humpherys <mitch...@codeaurora.org> --- Notes: v2..v3

[PATCH v3 6/6] Revert "iommu/arm-smmu: Treat all device transactions as unprivileged"

2016-07-19 Thread Mitchel Humpherys
This reverts commit d346180e70b9 ("iommu/arm-smmu: Treat all device transactions as unprivileged") since some platforms actually make use of privileged transactions. Signed-off-by: Mitchel Humpherys <mitch...@codeaurora.org> --- Notes: v2..v3 - Moved to the e

[PATCH v3 3/6] common: DMA-mapping: add DMA_ATTR_PRIVILEGED attribute

2016-07-19 Thread Mitchel Humpherys
e to the DMA-mapping subsystem that the buffer is fully accessible at the elevated privilege level (and ideally inaccessible or at least read-only at the lesser-privileged levels). Cc: linux-...@vger.kernel.org Signed-off-by: Mitchel Humpherys --- Notes: v2..v3 - Not worrying

[PATCH v3 6/6] Revert "iommu/arm-smmu: Treat all device transactions as unprivileged"

2016-07-19 Thread Mitchel Humpherys
This reverts commit d346180e70b9 ("iommu/arm-smmu: Treat all device transactions as unprivileged") since some platforms actually make use of privileged transactions. Signed-off-by: Mitchel Humpherys --- Notes: v2..v3 - Moved to the end of the series. drivers/iommu/

[PATCH v3 1/6] iommu: add IOMMU_PRIV attribute

2016-07-19 Thread Mitchel Humpherys
Add the IOMMU_PRIV attribute, which is used to indicate privileged mappings. Signed-off-by: Mitchel Humpherys <mitch...@codeaurora.org> --- Notes: v2..v3 - Added comment include/linux/iommu.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/linux/iommu.h b/i

[PATCH v3 1/6] iommu: add IOMMU_PRIV attribute

2016-07-19 Thread Mitchel Humpherys
Add the IOMMU_PRIV attribute, which is used to indicate privileged mappings. Signed-off-by: Mitchel Humpherys --- Notes: v2..v3 - Added comment include/linux/iommu.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/linux/iommu.h b/include/linux/iommu.h index

[PATCH v2 2/6] iommu/io-pgtable-arm: add support for the IOMMU_PRIV flag

2016-07-08 Thread Mitchel Humpherys
From: Jeremy Gebben Allow the creation of privileged mode mappings, for stage 1 only. Signed-off-by: Jeremy Gebben --- drivers/iommu/io-pgtable-arm.c | 16 +++- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git

[PATCH v2 3/6] Revert "iommu/arm-smmu: Treat all device transactions as unprivileged"

2016-07-08 Thread Mitchel Humpherys
This reverts commit d346180e70b9 ("iommu/arm-smmu: Treat all device transactions as unprivileged") since some platforms actually make use of privileged transactions. Signed-off-by: Mitchel Humpherys <mitch...@codeaurora.org> --- drivers/iommu/arm-smmu.c | 5 + 1 file chan

[PATCH v2 5/6] arm64/dma-mapping: Implement DMA_ATTR_PRIVILEGED_EXECUTABLE

2016-07-08 Thread Mitchel Humpherys
The newly added DMA_ATTR_PRIVILEGED_EXECUTABLE is useful for creating mappings that are executable by privileged DMA engines. Implement it in dma-iommu.c so that the ARM64 DMA IOMMU mapper can make use of it. Signed-off-by: Mitchel Humpherys <mitch...@codeaurora.org> --- arch/arm64/

[PATCH v2 4/6] common: DMA-mapping: add DMA_ATTR_PRIVILEGED_EXECUTABLE attribute

2016-07-08 Thread Mitchel Humpherys
is necessary to ensure that the buffer is executable at an elevated privilege level (by making it read-only at the lesser-privileged levels, for example). Cc: linux-...@vger.kernel.org Signed-off-by: Mitchel Humpherys <mitch...@codeaurora.org> --- Documentation/DMA-attributes.t

[PATCH v2 2/6] iommu/io-pgtable-arm: add support for the IOMMU_PRIV flag

2016-07-08 Thread Mitchel Humpherys
From: Jeremy Gebben Allow the creation of privileged mode mappings, for stage 1 only. Signed-off-by: Jeremy Gebben --- drivers/iommu/io-pgtable-arm.c | 16 +++- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/drivers/iommu/io-pgtable-arm.c

[PATCH v2 3/6] Revert "iommu/arm-smmu: Treat all device transactions as unprivileged"

2016-07-08 Thread Mitchel Humpherys
This reverts commit d346180e70b9 ("iommu/arm-smmu: Treat all device transactions as unprivileged") since some platforms actually make use of privileged transactions. Signed-off-by: Mitchel Humpherys --- drivers/iommu/arm-smmu.c | 5 + 1 file changed, 1 insertion(+), 4 deletion

[PATCH v2 5/6] arm64/dma-mapping: Implement DMA_ATTR_PRIVILEGED_EXECUTABLE

2016-07-08 Thread Mitchel Humpherys
The newly added DMA_ATTR_PRIVILEGED_EXECUTABLE is useful for creating mappings that are executable by privileged DMA engines. Implement it in dma-iommu.c so that the ARM64 DMA IOMMU mapper can make use of it. Signed-off-by: Mitchel Humpherys --- arch/arm64/mm/dma-mapping.c | 6 +++--- drivers

[PATCH v2 4/6] common: DMA-mapping: add DMA_ATTR_PRIVILEGED_EXECUTABLE attribute

2016-07-08 Thread Mitchel Humpherys
is necessary to ensure that the buffer is executable at an elevated privilege level (by making it read-only at the lesser-privileged levels, for example). Cc: linux-...@vger.kernel.org Signed-off-by: Mitchel Humpherys --- Documentation/DMA-attributes.txt | 9 + include/linux/dma-attrs.h

[PATCH v2 1/6] iommu: add IOMMU_PRIV attribute

2016-07-08 Thread Mitchel Humpherys
Add the IOMMU_PRIV attribute, which is used to indicate privileged mappings. Signed-off-by: Mitchel Humpherys <mitch...@codeaurora.org> --- include/linux/iommu.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/linux/iommu.h b/include/linux/iommu.h index 664683aedcce..01c9f2

[PATCH v2 1/6] iommu: add IOMMU_PRIV attribute

2016-07-08 Thread Mitchel Humpherys
Add the IOMMU_PRIV attribute, which is used to indicate privileged mappings. Signed-off-by: Mitchel Humpherys --- include/linux/iommu.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/linux/iommu.h b/include/linux/iommu.h index 664683aedcce..01c9f2667f2b 100644 --- a/include/linux

[PATCH v2 0/6] Add support for privileged mappings

2016-07-08 Thread Mitchel Humpherys
com/robclark/kilroy Changelog: v1..v2 - Added a new DMA attribute to make executable privileged mappings work, and use that in the pl330 driver (suggested by Will). Jeremy Gebben (1): iommu/io-pgtable-arm: add support for the IOMMU_PRIV flag Mitchel Humpherys (5): iommu: add I

[PATCH v2 6/6] dmaengine: pl330: Make sure microcode is privileged-executable

2016-07-08 Thread Mitchel Humpherys
the DMA_ATTR_PRIVILEGED_EXECUTABLE attribute, which will ensure that the microcode IOMMU mapping is not writeable. Cc: Dan Williams <dan.j.willi...@intel.com> Cc: Jassi Brar <jassi.b...@samsung.com> Signed-off-by: Mitchel Humpherys <mitch...@codeaurora.org> --- drivers/dma/pl330.c | 7 +--

[PATCH v2 0/6] Add support for privileged mappings

2016-07-08 Thread Mitchel Humpherys
og: v1..v2 - Added a new DMA attribute to make executable privileged mappings work, and use that in the pl330 driver (suggested by Will). Jeremy Gebben (1): iommu/io-pgtable-arm: add support for the IOMMU_PRIV flag Mitchel Humpherys (5): iommu: add IOMMU_PRIV attribute Revert &q

[PATCH v2 6/6] dmaengine: pl330: Make sure microcode is privileged-executable

2016-07-08 Thread Mitchel Humpherys
the DMA_ATTR_PRIVILEGED_EXECUTABLE attribute, which will ensure that the microcode IOMMU mapping is not writeable. Cc: Dan Williams Cc: Jassi Brar Signed-off-by: Mitchel Humpherys --- drivers/dma/pl330.c | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/drivers/dma/pl330.c b/drivers

Re: [PATCH v2] of: Check for overlap in reserved memory regions

2015-12-04 Thread Mitchel Humpherys
On Thu, Nov 12 2015 at 01:19:59 PM, Michael Ellerman wrote: > On Tue, 2015-09-15 at 18:30 -0700, Mitchel Humpherys wrote: > >> Any overlap in the reserved memory regions (those specified in the >> reserved-memory DT node) is a bug. > > Can you expand a bit on why you th

Re: [PATCH] of: Fix comparison of reserved memory regions

2015-12-04 Thread Mitchel Humpherys
: ae1add247bf8 ("of: Check for overlap in reserved memory regions") > Signed-off-by: Michael Ellerman > --- > drivers/of/of_reserved_mem.c | 8 +++- > 1 file changed, 7 insertions(+), 1 deletion(-) Woops, thanks. Tested-by: Mitchel Humpherys -Mitch -- Qualcomm Innov

Re: [PATCH v2] of: Check for overlap in reserved memory regions

2015-12-04 Thread Mitchel Humpherys
On Thu, Nov 12 2015 at 01:19:59 PM, Michael Ellerman <m...@ellerman.id.au> wrote: > On Tue, 2015-09-15 at 18:30 -0700, Mitchel Humpherys wrote: > >> Any overlap in the reserved memory regions (those specified in the >> reserved-memory DT node) is a bug. > > Can you

Re: [PATCH] of: Fix comparison of reserved memory regions

2015-12-04 Thread Mitchel Humpherys
0 logic. > > Fixes: ae1add247bf8 ("of: Check for overlap in reserved memory regions") > Signed-off-by: Michael Ellerman <m...@ellerman.id.au> > --- > drivers/of/of_reserved_mem.c | 8 +++- > 1 file changed, 7 insertions(+), 1 deletion(-) Woops, thanks. Tes

Re: [RFC][PATCH 1/2] WIP: Devicetree bindings for Ion

2015-10-20 Thread Mitchel Humpherys
On Tue, Oct 13 2015 at 11:14:23 AM, Andrew wrote: > On 2015-10-12 21:39, Mitchel Humpherys wrote: >> On Tue, Oct 06 2015 at 05:35:41 PM, Rob Herring >> wrote: >>> On Tue, Oct 6, 2015 at 3:47 PM, Laura Abbott >>> wrote: >> >> [.

Re: [RFC][PATCH 1/2] WIP: Devicetree bindings for Ion

2015-10-20 Thread Mitchel Humpherys
On Tue, Oct 13 2015 at 11:14:23 AM, Andrew <and...@ncrmnt.org> wrote: > On 2015-10-12 21:39, Mitchel Humpherys wrote: >> On Tue, Oct 06 2015 at 05:35:41 PM, Rob Herring <robherri...@gmail.com> >> wrote: >>> On Tue, Oct 6, 2015 at 3:47 PM, Laura Abbott &

Re: [RFC][PATCH 1/2] WIP: Devicetree bindings for Ion

2015-10-12 Thread Mitchel Humpherys
On Tue, Oct 06 2015 at 05:35:41 PM, Rob Herring wrote: > On Tue, Oct 6, 2015 at 3:47 PM, Laura Abbott > wrote: [...] >> +Example: >> + >> + ion { >> + compatbile = "linux,ion"; >> + #address-cells = <1>; >> + #size-cells = <0>; >> + >> +

Re: [RFC][PATCH 1/2] WIP: Devicetree bindings for Ion

2015-10-12 Thread Mitchel Humpherys
On Tue, Oct 06 2015 at 05:35:41 PM, Rob Herring wrote: > On Tue, Oct 6, 2015 at 3:47 PM, Laura Abbott > wrote: [...] >> +Example: >> + >> + ion { >> + compatbile = "linux,ion"; >> + #address-cells = <1>; >> +

[PATCH v2] of: Check for overlap in reserved memory regions

2015-09-15 Thread Mitchel Humpherys
during boot if overlap is detected. Signed-off-by: Mitchel Humpherys --- v1..v2: - Suggestions from Rob Herring (remove superfluous array and print statement) --- drivers/of/of_reserved_mem.c | 43 ++- 1 file changed, 42 insertions(+), 1 deletion

[PATCH v2] of: Check for overlap in reserved memory regions

2015-09-15 Thread Mitchel Humpherys
during boot if overlap is detected. Signed-off-by: Mitchel Humpherys <mitch...@codeaurora.org> --- v1..v2: - Suggestions from Rob Herring (remove superfluous array and print statement) --- drivers/of/of_reserved_mem.c | 43 ++- 1 file chang

Re: [PATCH] of: Check for overlap in reserved memory regions

2015-09-14 Thread Mitchel Humpherys
On Mon, Sep 14 2015 at 02:21:04 PM, Rob Herring wrote: > On Fri, Sep 11, 2015 at 12:31 PM, Mitchel Humpherys > wrote: >> Any overlap in the reserved memory regions (those specified in the >> reserved-memory DT node) is a bug. These bugs might go undetected as >> long

Re: [PATCH] of: Check for overlap in reserved memory regions

2015-09-14 Thread Mitchel Humpherys
On Mon, Sep 14 2015 at 02:21:04 PM, Rob Herring <r...@kernel.org> wrote: > On Fri, Sep 11, 2015 at 12:31 PM, Mitchel Humpherys > <mitch...@codeaurora.org> wrote: >> Any overlap in the reserved memory regions (those specified in the >> reserved-memory DT node)

[PATCH] of: Check for overlap in reserved memory regions

2015-09-11 Thread Mitchel Humpherys
during boot if overlap is detected. Signed-off-by: Mitchel Humpherys --- drivers/of/of_reserved_mem.c | 45 +++- 1 file changed, 44 insertions(+), 1 deletion(-) diff --git a/drivers/of/of_reserved_mem.c b/drivers/of/of_reserved_mem.c index 726ebe792813

[PATCH] of: Check for overlap in reserved memory regions

2015-09-11 Thread Mitchel Humpherys
during boot if overlap is detected. Signed-off-by: Mitchel Humpherys <mitch...@codeaurora.org> --- drivers/of/of_reserved_mem.c | 45 +++- 1 file changed, 44 insertions(+), 1 deletion(-) diff --git a/drivers/of/of_reserved_mem.c b/drivers/of/of_reserved

Re: [PATCH v2 2/2] staging: ion: chunk_heap: use %pad for printing dma_addr_t's

2015-05-05 Thread Mitchel Humpherys
On Mon, May 04 2015 at 01:05:50 PM, Colin Cross wrote: > On Mon, May 4, 2015 at 1:22 AM, Dan Carpenter > wrote: >> On Thu, Apr 09, 2015 at 06:10:04PM -0700, Mitchel Humpherys wrote: >>> We're currently using %lu and %ld to print some variables of type >>

Re: [PATCH v2 2/2] staging: ion: chunk_heap: use %pad for printing dma_addr_t's

2015-05-05 Thread Mitchel Humpherys
On Mon, May 04 2015 at 01:05:50 PM, Colin Cross ccr...@android.com wrote: On Mon, May 4, 2015 at 1:22 AM, Dan Carpenter dan.carpen...@oracle.com wrote: On Thu, Apr 09, 2015 at 06:10:04PM -0700, Mitchel Humpherys wrote: We're currently using %lu and %ld to print some variables of type

[PATCH] ion: improve ion_phys error message

2015-03-10 Thread Mitchel Humpherys
Clients often get confused when ion_phys errors out due to some heap being used that they didn't expect. Add the heap name and heap type to the error message to make it more obvious. Signed-off-by: Mitchel Humpherys --- drivers/staging/android/ion/ion.c | 4 ++-- 1 file changed, 2 insertions

[PATCH] ion: improve ion_phys error message

2015-03-10 Thread Mitchel Humpherys
Clients often get confused when ion_phys errors out due to some heap being used that they didn't expect. Add the heap name and heap type to the error message to make it more obvious. Signed-off-by: Mitchel Humpherys mitch...@codeaurora.org --- drivers/staging/android/ion/ion.c | 4 ++-- 1 file

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

2015-03-09 Thread Mitchel Humpherys
On Mon, Mar 09 2015 at 05:16:26 AM, Yong Wu wrote: > Dear Mitchel, > Thanks very much for your review. > > On Fri, 2015-03-06 at 09:15 -0800, Mitchel Humpherys wrote: >> On Fri, Mar 06 2015 at 02:48:17 AM, wrote: >> > From: Yong Wu >> > >>

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

2015-03-09 Thread Mitchel Humpherys
On Mon, Mar 09 2015 at 05:16:26 AM, Yong Wu yong...@mediatek.com wrote: Dear Mitchel, Thanks very much for your review. On Fri, 2015-03-06 at 09:15 -0800, Mitchel Humpherys wrote: On Fri, Mar 06 2015 at 02:48:17 AM, yong...@mediatek.com wrote: From: Yong Wu yong...@mediatek.com

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

2015-03-06 Thread Mitchel Humpherys
On Fri, Mar 06 2015 at 02:48:17 AM, wrote: > From: Yong Wu > > This patch adds support for mediatek m4u (MultiMedia Memory Management Unit). > Currently this only supports m4u gen 2 with 2 levels of page table on mt8173. [...] > +static int mtk_iommu_invalidate_tlb(const struct mtk_iommu_info

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

2015-03-06 Thread Mitchel Humpherys
On Fri, Mar 06 2015 at 02:48:17 AM, yong...@mediatek.com wrote: From: Yong Wu yong...@mediatek.com This patch adds support for mediatek m4u (MultiMedia Memory Management Unit). Currently this only supports m4u gen 2 with 2 levels of page table on mt8173. [...] +static int

[PATCH] ion: improve ion_phys error message

2015-02-13 Thread Mitchel Humpherys
Clients often get confused when ion_phys errors out due to some heap being used that they didn't expect. Add the heap name and heap type to the error message to make it more obvious. Signed-off-by: Mitchel Humpherys --- drivers/staging/android/ion/ion.c | 4 ++-- 1 file changed, 2 insertions

[PATCH] ion: improve ion_phys error message

2015-02-13 Thread Mitchel Humpherys
Clients often get confused when ion_phys errors out due to some heap being used that they didn't expect. Add the heap name and heap type to the error message to make it more obvious. Signed-off-by: Mitchel Humpherys mitch...@codeaurora.org --- drivers/staging/android/ion/ion.c | 4 ++-- 1 file

Re: [PATCH v10] iopoll: Introduce memory-mapped IO polling macros

2015-01-14 Thread Mitchel Humpherys
On Tue, Dec 16 2014 at 01:45:27 AM, Will Deacon wrote: > On Mon, Dec 15, 2014 at 11:47:23PM +0000, Mitchel Humpherys wrote: >> From: Matt Wagantall >> >> It is sometimes necessary to poll a memory-mapped register until its value >> satisfies some condition. Introd

Re: [PATCH v10] iopoll: Introduce memory-mapped IO polling macros

2015-01-14 Thread Mitchel Humpherys
On Tue, Dec 16 2014 at 01:45:27 AM, Will Deacon will.dea...@arm.com wrote: On Mon, Dec 15, 2014 at 11:47:23PM +, Mitchel Humpherys wrote: From: Matt Wagantall ma...@codeaurora.org It is sometimes necessary to poll a memory-mapped register until its value satisfies some condition

[PATCH] staging: ion: always initialize the free list parameters

2015-01-08 Thread Mitchel Humpherys
in ion_device_add_heap, which is always called no matter which heap features are being used. Signed-off-by: Mitchel Humpherys --- drivers/staging/android/ion/ion.c | 3 +++ drivers/staging/android/ion/ion_heap.c | 2 -- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/staging/android/ion

[PATCH] staging: ion: always initialize the free list parameters

2015-01-08 Thread Mitchel Humpherys
in ion_device_add_heap, which is always called no matter which heap features are being used. Signed-off-by: Mitchel Humpherys mitch...@codeaurora.org --- drivers/staging/android/ion/ion.c | 3 +++ drivers/staging/android/ion/ion_heap.c | 2 -- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git

[PATCH v10] iopoll: Introduce memory-mapped IO polling macros

2014-12-15 Thread Mitchel Humpherys
: Will Deacon Cc: Arnd Bergmann Cc: Andrew Morton Cc: Robert Elliott Signed-off-by: Matt Wagantall Signed-off-by: Mitchel Humpherys --- v9..10: - Actually added the comments mentioned in v8..v9 (doh!) v8..v9: - Added note in comments about max sleep time (Rob Elliott) v7..v8: - sorted helper

Re: [PATCH v9] iopoll: Introduce memory-mapped IO polling macros

2014-12-15 Thread Mitchel Humpherys
On Mon, Dec 15 2014 at 03:31:20 PM, Mitchel Humpherys wrote: > From: Matt Wagantall > > It is sometimes necessary to poll a memory-mapped register until its value > satisfies some condition. Introduce a family of convenience macros that do > this. Tight-looping, sleeping, and tim

[PATCH v9] iopoll: Introduce memory-mapped IO polling macros

2014-12-15 Thread Mitchel Humpherys
: Will Deacon Cc: Arnd Bergmann Cc: Andrew Morton Cc: Robert Elliott Signed-off-by: Matt Wagantall Signed-off-by: Mitchel Humpherys --- v8..v9: - Added note in comments about max sleep time (Rob Elliott) v7..v8: - sorted helper macros by size (b, w, l, q) - removed some of the more esoteric

[PATCH v9] iopoll: Introduce memory-mapped IO polling macros

2014-12-15 Thread Mitchel Humpherys
Reding thierry.red...@gmail.com Cc: Will Deacon will.dea...@arm.com Cc: Arnd Bergmann a...@arndb.de Cc: Andrew Morton a...@linux-foundation.org Cc: Robert Elliott elli...@hp.com Signed-off-by: Matt Wagantall ma...@codeaurora.org Signed-off-by: Mitchel Humpherys mitch...@codeaurora.org --- v8..v9

Re: [PATCH v9] iopoll: Introduce memory-mapped IO polling macros

2014-12-15 Thread Mitchel Humpherys
On Mon, Dec 15 2014 at 03:31:20 PM, Mitchel Humpherys mitch...@codeaurora.org wrote: From: Matt Wagantall ma...@codeaurora.org It is sometimes necessary to poll a memory-mapped register until its value satisfies some condition. Introduce a family of convenience macros that do this. Tight

[PATCH v10] iopoll: Introduce memory-mapped IO polling macros

2014-12-15 Thread Mitchel Humpherys
Reding thierry.red...@gmail.com Cc: Will Deacon will.dea...@arm.com Cc: Arnd Bergmann a...@arndb.de Cc: Andrew Morton a...@linux-foundation.org Cc: Robert Elliott elli...@hp.com Signed-off-by: Matt Wagantall ma...@codeaurora.org Signed-off-by: Mitchel Humpherys mitch...@codeaurora.org --- v9..10

Re: [PATCH RESEND v8] iopoll: Introduce memory-mapped IO polling macros

2014-11-24 Thread Mitchel Humpherys
On Mon, Nov 24 2014 at 04:53:19 PM, "Elliott, Robert (Server Storage)" wrote: >> -Original Message- >> From: linux-kernel-ow...@vger.kernel.org [mailto:linux-kernel- >> ow...@vger.kernel.org] On Behalf Of Mitchel Humpherys >> Sent: Monday, 24 November

[PATCH RESEND v8] iopoll: Introduce memory-mapped IO polling macros

2014-11-24 Thread Mitchel Humpherys
: Will Deacon Cc: Arnd Bergmann Cc: Andrew Morton Signed-off-by: Matt Wagantall Signed-off-by: Mitchel Humpherys --- This patch was originally part of a series [1] for adding support for IOMMU address translations through an ARM SMMU hardware register. The other patch in the series (the one that actually

[PATCH RESEND v8] iopoll: Introduce memory-mapped IO polling macros

2014-11-24 Thread Mitchel Humpherys
Reding thierry.red...@gmail.com Cc: Will Deacon will.dea...@arm.com Cc: Arnd Bergmann a...@arndb.de Cc: Andrew Morton a...@linux-foundation.org Signed-off-by: Matt Wagantall ma...@codeaurora.org Signed-off-by: Mitchel Humpherys mitch...@codeaurora.org --- This patch was originally part of a series [1

Re: [PATCH RESEND v8] iopoll: Introduce memory-mapped IO polling macros

2014-11-24 Thread Mitchel Humpherys
On Mon, Nov 24 2014 at 04:53:19 PM, Elliott, Robert (Server Storage) elli...@hp.com wrote: -Original Message- From: linux-kernel-ow...@vger.kernel.org [mailto:linux-kernel- ow...@vger.kernel.org] On Behalf Of Mitchel Humpherys Sent: Monday, 24 November, 2014 2:15 PM ... From: Matt

  1   2   >