[PATCH v2] iommu/arm-smmu-v3: limit reporting of MSI allocation failures

2018-01-20 Thread Nate Watterson
incapable of describing SMMU MSI topology (ACPI IORT prior to rev.C). Remedy this by checking msi_domain before attempting to allocate SMMU MSIs. Signed-off-by: Nate Watterson <nwatt...@codeaurora.org> Signed-off-by: Sinan Kaya <ok...@codeaurora.org> --- drivers/iommu/arm-smmu-v3.c | 7 +

[PATCH v2] iommu/arm-smmu-v3: limit reporting of MSI allocation failures

2018-01-20 Thread Nate Watterson
incapable of describing SMMU MSI topology (ACPI IORT prior to rev.C). Remedy this by checking msi_domain before attempting to allocate SMMU MSIs. Signed-off-by: Nate Watterson Signed-off-by: Sinan Kaya --- drivers/iommu/arm-smmu-v3.c | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-)

[PATCH] iommu/arm-smmu-v3: suppress MSI allocation failure message

2018-01-17 Thread Nate Watterson
arning and is causing support issues. Better reduce the message level. Signed-off-by: Sinan Kaya <ok...@codeaurora.org> Signed-off-by: Nate Watterson <nwatt...@codeaurora.org> --- drivers/iommu/arm-smmu-v3.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/iommu/arm-s

[PATCH] iommu/arm-smmu-v3: suppress MSI allocation failure message

2018-01-17 Thread Nate Watterson
. Better reduce the message level. Signed-off-by: Sinan Kaya Signed-off-by: Nate Watterson --- drivers/iommu/arm-smmu-v3.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/iommu/arm-smmu-v3.c b/drivers/iommu/arm-smmu-v3.c index 744592d..2118fda 100644 --- a/drivers/iommu

Re: [PATCH v2 0/3] arm-smmu: performance optimization

2017-09-18 Thread Nate Watterson
someone else. Tested-by: Nate Watterson <nwatt...@codeaurora.org> Thanks, Nate iommu/arm-smmu: add support for unmap a memory range with only one tlb sync drivers/iommu/arm-smmu-v3.c| 52 ++ drivers/iommu/arm-smmu.c | 10

Re: [PATCH v2 0/3] arm-smmu: performance optimization

2017-09-18 Thread Nate Watterson
someone else. Tested-by: Nate Watterson Thanks, Nate iommu/arm-smmu: add support for unmap a memory range with only one tlb sync drivers/iommu/arm-smmu-v3.c| 52 ++ drivers/iommu/arm-smmu.c | 10 drivers/iommu/io-pgtable-a

Re: [PATCH 1/1] iommu/iova: Make rcache flush optional on IOVA allocation failure

2017-09-18 Thread Nate Watterson
ue I reported in [1]!! Tested-by: Nate Watterson <nwatt...@codeaurora.org> Thanks, Nate Signed-off-by: Tomasz Nowicki <tomasz.nowi...@caviumnetworks.com> --- drivers/iommu/amd_iommu.c | 5 +++-- drivers/iommu/dma-iommu.c | 6 -- drivers/iommu/intel-iommu.c | 5 +++-- drivers/

Re: [PATCH 1/1] iommu/iova: Make rcache flush optional on IOVA allocation failure

2017-09-18 Thread Nate Watterson
to callers is probably simpler. One nit, can you document it in the kerneldoc comment too? With that: Reviewed-by: Robin Murphy Thanks, Robin. [1]:https://www.mail-archive.com/iommu@lists.linux-foundation.org/msg19758.html This patch completely resolves the issue I reported in [1]!! Tested-by:

Re: [PATCH v3 0/4] Optimise 64-bit IOVA allocations

2017-08-25 Thread Nate Watterson
% of passthrough mode. I also got similar results by altogether removing the 32-bit allocation from iommu_dma_alloc_iova() which makes me wonder why we even bother. What (PCIe) workloads have been shown to actually benefit from it? Tested-by: Nate Watterson <nwatt...@codeaurora.org> -Nate

Re: [PATCH v3 0/4] Optimise 64-bit IOVA allocations

2017-08-25 Thread Nate Watterson
% of passthrough mode. I also got similar results by altogether removing the 32-bit allocation from iommu_dma_alloc_iova() which makes me wonder why we even bother. What (PCIe) workloads have been shown to actually benefit from it? Tested-by: Nate Watterson -Nate Robin. [1] http

Re: [PATCH v2 3/4] iommu/iova: Extend rbtree node caching

2017-08-03 Thread Nate Watterson
Hi Robin, On 7/31/2017 7:42 AM, Robin Murphy wrote: Hi Nate, On 29/07/17 04:57, Nate Watterson wrote: Hi Robin, I am seeing a crash when performing very basic testing on this series with a Mellanox CX4 NIC. I dug into the crash a bit, and think this patch is the culprit, but this rcache

Re: [PATCH v2 3/4] iommu/iova: Extend rbtree node caching

2017-08-03 Thread Nate Watterson
Hi Robin, On 7/31/2017 7:42 AM, Robin Murphy wrote: Hi Nate, On 29/07/17 04:57, Nate Watterson wrote: Hi Robin, I am seeing a crash when performing very basic testing on this series with a Mellanox CX4 NIC. I dug into the crash a bit, and think this patch is the culprit, but this rcache

Re: [PATCH v3 0/5] ACPI: DMA ranges management

2017-08-03 Thread Nate Watterson
es and verified the configured masks matched the expected values. Tested-by: Nate Watterson <nwatt...@codeaurora.org> One general question I had while testing the patch is whether it is possible to define a complete 64-bit range using the _DMA method. For instance, to get a 64-bit dma

Re: [PATCH v3 0/5] ACPI: DMA ranges management

2017-08-03 Thread Nate Watterson
eletions(-) I tested with named components and with _DMA objects at a variety of sizes and verified the configured masks matched the expected values. Tested-by: Nate Watterson One general question I had while testing the patch is whether it is possible to define a complete 64-bit range using

Re: [PATCH v2 5/5] ACPI/IORT: Add IORT named component memory address limits

2017-08-02 Thread Nate Watterson
c: Robin Murphy <robin.mur...@arm.com> Cc: Nate Watterson <nwatt...@codeaurora.org> --- drivers/acpi/arm64/iort.c | 40 ++-- 1 file changed, 30 insertions(+), 10 deletions(-) diff --git a/drivers/acpi/arm64/iort.c b/drivers/acpi/arm64/iort.c in

Re: [PATCH v2 5/5] ACPI/IORT: Add IORT named component memory address limits

2017-08-02 Thread Nate Watterson
ven device is capable of generating to address memory. Add code to the kernel to retrieve memory address limits configuration for IORT named components and configure DMA masks accordingly. Signed-off-by: Lorenzo Pieralisi Cc: Will Deacon Cc: Robin Murphy Cc: Nate Watterson --- drivers/acpi/ar

Re: [PATCH v2 3/4] iommu/iova: Extend rbtree node caching

2017-07-28 Thread Nate Watterson
Hi Robin, I am seeing a crash when performing very basic testing on this series with a Mellanox CX4 NIC. I dug into the crash a bit, and think this patch is the culprit, but this rcache business is still mostly witchcraft to me. # ifconfig eth5 up # ifconfig eth5 down Unable to handle kernel

Re: [PATCH v2 3/4] iommu/iova: Extend rbtree node caching

2017-07-28 Thread Nate Watterson
Hi Robin, I am seeing a crash when performing very basic testing on this series with a Mellanox CX4 NIC. I dug into the crash a bit, and think this patch is the culprit, but this rcache business is still mostly witchcraft to me. # ifconfig eth5 up # ifconfig eth5 down Unable to handle kernel

Re: [PATCH 0/4] ACPI: DMA ranges management

2017-07-26 Thread Nate Watterson
On 7/26/2017 11:35 AM, Lorenzo Pieralisi wrote: On Wed, Jul 26, 2017 at 04:05:55PM +0100, Robin Murphy wrote: Hi Nate, On 26/07/17 15:46, Nate Watterson wrote: Hi Lorenzo, On 7/20/2017 10:45 AM, Lorenzo Pieralisi wrote: As reported in: http://lkml.kernel.org/r/cal85gma_sscwm80tkdkzqee

Re: [PATCH 0/4] ACPI: DMA ranges management

2017-07-26 Thread Nate Watterson
On 7/26/2017 11:35 AM, Lorenzo Pieralisi wrote: On Wed, Jul 26, 2017 at 04:05:55PM +0100, Robin Murphy wrote: Hi Nate, On 26/07/17 15:46, Nate Watterson wrote: Hi Lorenzo, On 7/20/2017 10:45 AM, Lorenzo Pieralisi wrote: As reported in: http://lkml.kernel.org/r/cal85gma_sscwm80tkdkzqee

Re: [PATCH 0/4] ACPI: DMA ranges management

2017-07-26 Thread Nate Watterson
Hi Lorenzo, On 7/20/2017 10:45 AM, Lorenzo Pieralisi wrote: As reported in: http://lkml.kernel.org/r/cal85gma_sscwm80tkdkzqee+s1bewzdevdki1kpkmutdrms...@mail.gmail.com the bus connecting devices to an IOMMU bus can be smaller in size than the IOMMU input address bits which results in devices

Re: [PATCH 0/4] ACPI: DMA ranges management

2017-07-26 Thread Nate Watterson
Hi Lorenzo, On 7/20/2017 10:45 AM, Lorenzo Pieralisi wrote: As reported in: http://lkml.kernel.org/r/cal85gma_sscwm80tkdkzqee+s1bewzdevdki1kpkmutdrms...@mail.gmail.com the bus connecting devices to an IOMMU bus can be smaller in size than the IOMMU input address bits which results in devices

[PATCH] ata: ahci_platform: Add shutdown handler

2017-07-20 Thread Nate Watterson
The newly introduced ahci_platform_shutdown() method is called during system shutdown to disable host controller DMA and interrupts in order to avoid potentially corrupting or otherwise interfering with a new kernel being started with kexec. Signed-off-by: Nate Watterson <nwatt...@codeaurora.

[PATCH] ata: ahci_platform: Add shutdown handler

2017-07-20 Thread Nate Watterson
The newly introduced ahci_platform_shutdown() method is called during system shutdown to disable host controller DMA and interrupts in order to avoid potentially corrupting or otherwise interfering with a new kernel being started with kexec. Signed-off-by: Nate Watterson --- drivers/ata

Re: [PATCH 1/5] iommu/arm-smmu-v3: put off the execution of TLBI* to reduce lock confliction

2017-07-20 Thread Nate Watterson
Hi Jonathan, [...] Hi All, I'm a bit of late entry to this discussion. Just been running some more detailed tests on our d05 boards and wanted to bring some more numbers to the discussion. All tests against 4.12 with the following additions: * Robin's series removing the io-pgtable

Re: [PATCH 1/5] iommu/arm-smmu-v3: put off the execution of TLBI* to reduce lock confliction

2017-07-20 Thread Nate Watterson
Hi Jonathan, [...] Hi All, I'm a bit of late entry to this discussion. Just been running some more detailed tests on our d05 boards and wanted to bring some more numbers to the discussion. All tests against 4.12 with the following additions: * Robin's series removing the io-pgtable

Re: [PATCH 1/5] iommu/arm-smmu-v3: put off the execution of TLBI* to reduce lock confliction

2017-07-17 Thread Nate Watterson
Hi Jonathan, On 7/17/2017 10:23 AM, Jonathan Cameron wrote: On Mon, 17 Jul 2017 14:06:42 +0100 John Garry wrote: + On 29/06/2017 03:08, Leizhen (ThunderTown) wrote: On 2017/6/28 17:32, Will Deacon wrote: Hi Zhen Lei, Nate (CC'd), Robin and I have been working on

Re: [PATCH 1/5] iommu/arm-smmu-v3: put off the execution of TLBI* to reduce lock confliction

2017-07-17 Thread Nate Watterson
Hi Jonathan, On 7/17/2017 10:23 AM, Jonathan Cameron wrote: On Mon, 17 Jul 2017 14:06:42 +0100 John Garry wrote: + On 29/06/2017 03:08, Leizhen (ThunderTown) wrote: On 2017/6/28 17:32, Will Deacon wrote: Hi Zhen Lei, Nate (CC'd), Robin and I have been working on something very similar

[PATCH 2/2] ata: ahci_platform: Handle shutdown with ata_platform_shutdown_one()

2017-07-03 Thread Nate Watterson
To avoid interfering with a new kernel started using kexec, quiesce host controller DMA interrupts during driver shutdown with ata_platform_remove_one(). Change-Id: Iedee7f7ba12172b3d34796a3e3b92dbb72d4ed9c Signed-off-by: Nate Watterson <nwatt...@codeaurora.org> --- drivers/ata/ahci_plat

[PATCH 2/2] ata: ahci_platform: Handle shutdown with ata_platform_shutdown_one()

2017-07-03 Thread Nate Watterson
To avoid interfering with a new kernel started using kexec, quiesce host controller DMA interrupts during driver shutdown with ata_platform_remove_one(). Change-Id: Iedee7f7ba12172b3d34796a3e3b92dbb72d4ed9c Signed-off-by: Nate Watterson --- drivers/ata/ahci_platform.c | 1 + 1 file changed, 1

[PATCH 1/2] libata: Introduce ata_platform_shutdown_one()

2017-07-03 Thread Nate Watterson
In similar fashion to how ata_platform_remove_one() is used, this newly introduced method can be used by platform ata drivers to get basic shutdown functionality (stopping host DMA and interrupts). Signed-off-by: Nate Watterson <nwatt...@codeaurora.org> --- drivers/ata/libata-core.

[PATCH 1/2] libata: Introduce ata_platform_shutdown_one()

2017-07-03 Thread Nate Watterson
In similar fashion to how ata_platform_remove_one() is used, this newly introduced method can be used by platform ata drivers to get basic shutdown functionality (stopping host DMA and interrupts). Signed-off-by: Nate Watterson --- drivers/ata/libata-core.c | 20 include

Re: [PATCH v2] iommu/arm-smmu-v3: Implement shutdown method

2017-06-29 Thread Nate Watterson
I should have removed the '-v3' since this revision of the patch adds shutdown to arm-smmu.c as well. I'll fix that in a subsequent version after waiting to see if there are additional changes that need to be made. On 6/29/2017 6:18 PM, Nate Watterson wrote: The shutdown method disables

Re: [PATCH v2] iommu/arm-smmu-v3: Implement shutdown method

2017-06-29 Thread Nate Watterson
I should have removed the '-v3' since this revision of the patch adds shutdown to arm-smmu.c as well. I'll fix that in a subsequent version after waiting to see if there are additional changes that need to be made. On 6/29/2017 6:18 PM, Nate Watterson wrote: The shutdown method disables

[PATCH v2] iommu/arm-smmu-v3: Implement shutdown method

2017-06-29 Thread Nate Watterson
The shutdown method disables the SMMU to avoid corrupting a new kernel started with kexec. Signed-off-by: Nate Watterson <nwatt...@codeaurora.org> --- drivers/iommu/arm-smmu-v3.c | 7 +++ drivers/iommu/arm-smmu.c| 6 ++ 2 files changed, 13 insertions(+) diff --git a/drivers

[PATCH v2] iommu/arm-smmu-v3: Implement shutdown method

2017-06-29 Thread Nate Watterson
The shutdown method disables the SMMU to avoid corrupting a new kernel started with kexec. Signed-off-by: Nate Watterson --- drivers/iommu/arm-smmu-v3.c | 7 +++ drivers/iommu/arm-smmu.c| 6 ++ 2 files changed, 13 insertions(+) diff --git a/drivers/iommu/arm-smmu-v3.c b/drivers

Re: [PATCH] iommu/arm-smmu-v3: Implement shutdown method

2017-06-29 Thread Nate Watterson
On 6/29/2017 2:34 PM, Will Deacon wrote: On Thu, Jun 29, 2017 at 01:40:15PM -0400, Nate Watterson wrote: The shutdown method disables the SMMU and its interrupts to avoid potentially corrupting a new kernel started with kexec. Signed-off-by: Nate Watterson <nwatt...@codeaurora.

Re: [PATCH] iommu/arm-smmu-v3: Implement shutdown method

2017-06-29 Thread Nate Watterson
On 6/29/2017 2:34 PM, Will Deacon wrote: On Thu, Jun 29, 2017 at 01:40:15PM -0400, Nate Watterson wrote: The shutdown method disables the SMMU and its interrupts to avoid potentially corrupting a new kernel started with kexec. Signed-off-by: Nate Watterson --- drivers/iommu/arm-smmu-v3.c

[PATCH] iommu/arm-smmu-v3: Implement shutdown method

2017-06-29 Thread Nate Watterson
The shutdown method disables the SMMU and its interrupts to avoid potentially corrupting a new kernel started with kexec. Signed-off-by: Nate Watterson <nwatt...@codeaurora.org> --- drivers/iommu/arm-smmu-v3.c | 11 +++ 1 file changed, 11 insertions(+) diff --git a/drivers/iom

[PATCH] iommu/arm-smmu-v3: Implement shutdown method

2017-06-29 Thread Nate Watterson
The shutdown method disables the SMMU and its interrupts to avoid potentially corrupting a new kernel started with kexec. Signed-off-by: Nate Watterson --- drivers/iommu/arm-smmu-v3.c | 11 +++ 1 file changed, 11 insertions(+) diff --git a/drivers/iommu/arm-smmu-v3.c b/drivers/iommu

Re: [PATCH V11 08/11] drivers: acpi: Handle IOMMU lookup failure with deferred probing or error

2017-05-23 Thread Nate Watterson
Hi Lorenzo, On 5/23/2017 5:26 AM, Lorenzo Pieralisi wrote: On Tue, May 23, 2017 at 02:31:17PM +0530, Sricharan R wrote: Hi Lorenzo, On 5/23/2017 2:22 PM, Lorenzo Pieralisi wrote: On Tue, May 23, 2017 at 02:26:10AM -0400, Nate Watterson wrote: Hi Sricharan, On 4/10/2017 7:21 AM, Sricharan R

Re: [PATCH V11 08/11] drivers: acpi: Handle IOMMU lookup failure with deferred probing or error

2017-05-23 Thread Nate Watterson
Hi Lorenzo, On 5/23/2017 5:26 AM, Lorenzo Pieralisi wrote: On Tue, May 23, 2017 at 02:31:17PM +0530, Sricharan R wrote: Hi Lorenzo, On 5/23/2017 2:22 PM, Lorenzo Pieralisi wrote: On Tue, May 23, 2017 at 02:26:10AM -0400, Nate Watterson wrote: Hi Sricharan, On 4/10/2017 7:21 AM, Sricharan R

Re: [PATCH V11 08/11] drivers: acpi: Handle IOMMU lookup failure with deferred probing or error

2017-05-23 Thread Nate Watterson
Hi Sricharan, On 4/10/2017 7:21 AM, Sricharan R wrote: This is an equivalent to the DT's handling of the iommu master's probe with deferred probing when the corrsponding iommu is not probed yet. The lack of a registered IOMMU can be caused by the lack of a driver for the IOMMU, the IOMMU device

Re: [PATCH V11 08/11] drivers: acpi: Handle IOMMU lookup failure with deferred probing or error

2017-05-23 Thread Nate Watterson
Hi Sricharan, On 4/10/2017 7:21 AM, Sricharan R wrote: This is an equivalent to the DT's handling of the iommu master's probe with deferred probing when the corrsponding iommu is not probed yet. The lack of a registered IOMMU can be caused by the lack of a driver for the IOMMU, the IOMMU device

Re: [PATCH] iommu/dma: Setup iova_domain granule for IOMMU_DMA_MSI cookies

2017-05-16 Thread Nate Watterson
On 5/16/2017 3:55 PM, Auger Eric wrote: Hi, On 13/04/2017 21:38, Nate Watterson wrote: Hi Robin, On 4/13/2017 7:21 AM, Robin Murphy wrote: Hi Nate, On 13/04/17 09:55, Nate Watterson wrote: Currently, the __iommu_dma_{map/free} functions call iova_{offset/align} making them unsuitable

Re: [PATCH] iommu/dma: Setup iova_domain granule for IOMMU_DMA_MSI cookies

2017-05-16 Thread Nate Watterson
On 5/16/2017 3:55 PM, Auger Eric wrote: Hi, On 13/04/2017 21:38, Nate Watterson wrote: Hi Robin, On 4/13/2017 7:21 AM, Robin Murphy wrote: Hi Nate, On 13/04/17 09:55, Nate Watterson wrote: Currently, the __iommu_dma_{map/free} functions call iova_{offset/align} making them unsuitable

Re: [PATCH] iommu/dma: Setup iova_domain granule for IOMMU_DMA_MSI cookies

2017-04-13 Thread Nate Watterson
Hi Robin, On 4/13/2017 7:21 AM, Robin Murphy wrote: Hi Nate, On 13/04/17 09:55, Nate Watterson wrote: Currently, the __iommu_dma_{map/free} functions call iova_{offset/align} making them unsuitable for use with iommu_domains having an IOMMU_DMA_MSI cookie since the cookie's iova_domain member

Re: [PATCH] iommu/dma: Setup iova_domain granule for IOMMU_DMA_MSI cookies

2017-04-13 Thread Nate Watterson
Hi Robin, On 4/13/2017 7:21 AM, Robin Murphy wrote: Hi Nate, On 13/04/17 09:55, Nate Watterson wrote: Currently, the __iommu_dma_{map/free} functions call iova_{offset/align} making them unsuitable for use with iommu_domains having an IOMMU_DMA_MSI cookie since the cookie's iova_domain member

[PATCH] iommu/dma: Setup iova_domain granule for IOMMU_DMA_MSI cookies

2017-04-13 Thread Nate Watterson
IOVA allocation") Signed-off-by: Nate Watterson <nwatt...@codeaurora.org> --- drivers/iommu/dma-iommu.c | 10 ++ 1 file changed, 10 insertions(+) diff --git a/drivers/iommu/dma-iommu.c b/drivers/iommu/dma-iommu.c index 8348f366..d7b0816 100644 --- a/drivers/iommu/dma-iommu.c +++

[PATCH] iommu/dma: Setup iova_domain granule for IOMMU_DMA_MSI cookies

2017-04-13 Thread Nate Watterson
IOVA allocation") Signed-off-by: Nate Watterson --- drivers/iommu/dma-iommu.c | 10 ++ 1 file changed, 10 insertions(+) diff --git a/drivers/iommu/dma-iommu.c b/drivers/iommu/dma-iommu.c index 8348f366..d7b0816 100644 --- a/drivers/iommu/dma-iommu.c +++ b/drivers/iommu/dma-iommu.c

[PATCH] iommu/iova: fix underflow bug in __alloc_and_insert_iova_range

2017-04-06 Thread Nate Watterson
{0, 0} /* Expected */ *good_iova == {2, 3} /* Expected */ *bad_iova == {-2, -1} /* Oh no... */ After the patch, bad_iova is NULL as expected since inadequate space remains between limit_pfn and start_pfn after allocating good_iova. Signed-off-by: Nate Watterson <nwatt...@codeaurora.

[PATCH] iommu/iova: fix underflow bug in __alloc_and_insert_iova_range

2017-04-06 Thread Nate Watterson
{0, 0} /* Expected */ *good_iova == {2, 3} /* Expected */ *bad_iova == {-2, -1} /* Oh no... */ After the patch, bad_iova is NULL as expected since inadequate space remains between limit_pfn and start_pfn after allocating good_iova. Signed-off-by: Nate Watterson --- drivers/iommu/i

[PATCH 2/2] arm64/dma-mapping: validate dma_masks against IORT defined limits

2017-01-31 Thread Nate Watterson
memory. This information, when present, is used to supplement the checks already being done in dma_supported() to avoid setting overly generous dma_masks. Signed-off-by: Nate Watterson <nwatt...@codeaurora.org> --- arch/arm64/mm/dma-mapping.c | 20 +++- 1 file chang

[PATCH 2/2] arm64/dma-mapping: validate dma_masks against IORT defined limits

2017-01-31 Thread Nate Watterson
memory. This information, when present, is used to supplement the checks already being done in dma_supported() to avoid setting overly generous dma_masks. Signed-off-by: Nate Watterson --- arch/arm64/mm/dma-mapping.c | 20 +++- 1 file changed, 19 insertions(+), 1 deletion

[PATCH 1/2] ACPI/IORT: add iort_get_memory_address_limit function

2017-01-31 Thread Nate Watterson
. Signed-off-by: Nate Watterson <nwatt...@codeaurora.org> --- drivers/acpi/arm64/iort.c | 25 + include/linux/acpi_iort.h | 3 +++ 2 files changed, 28 insertions(+) diff --git a/drivers/acpi/arm64/iort.c b/drivers/acpi/arm64/iort.c index e0d2e6e..cd5d5f4 100644 --- a/d

[PATCH 1/2] ACPI/IORT: add iort_get_memory_address_limit function

2017-01-31 Thread Nate Watterson
. Signed-off-by: Nate Watterson --- drivers/acpi/arm64/iort.c | 25 + include/linux/acpi_iort.h | 3 +++ 2 files changed, 28 insertions(+) diff --git a/drivers/acpi/arm64/iort.c b/drivers/acpi/arm64/iort.c index e0d2e6e..cd5d5f4 100644 --- a/drivers/acpi/arm64/iort.c +++ b

[PATCH] iommu/arm-smmu-v3: limit use of 2-level stream tables

2017-01-10 Thread Nate Watterson
the feature and whose first level table can possibly contain more than a single entry. Signed-off-by: Nate Watterson <nwatt...@codeaurora.org> --- drivers/iommu/arm-smmu-v3.c | 21 ++--- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/drivers/iommu/arm-smmu-v3.c b/d

[PATCH] iommu/arm-smmu-v3: limit use of 2-level stream tables

2017-01-10 Thread Nate Watterson
the feature and whose first level table can possibly contain more than a single entry. Signed-off-by: Nate Watterson --- drivers/iommu/arm-smmu-v3.c | 21 ++--- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/drivers/iommu/arm-smmu-v3.c b/drivers/iommu/arm-smmu-v3.c

[PATCH] iommu/arm-smmu-v3: Clear prior settings when updating STEs

2016-12-20 Thread Nate Watterson
To prevent corruption of the stage-1 context pointer field when updating STEs, rebuild the entire containing dword instead of clearing individual fields. Signed-off-by: Nate Watterson <nwatt...@codeaurora.org> --- drivers/iommu/arm-smmu-v3.c | 10 ++ 1 file changed, 2 insertions

[PATCH] iommu/arm-smmu-v3: Clear prior settings when updating STEs

2016-12-20 Thread Nate Watterson
To prevent corruption of the stage-1 context pointer field when updating STEs, rebuild the entire containing dword instead of clearing individual fields. Signed-off-by: Nate Watterson --- drivers/iommu/arm-smmu-v3.c | 10 ++ 1 file changed, 2 insertions(+), 8 deletions(-) diff --git

[PATCH] iommu/arm-smmu-v3: prevent corruption of ste stage-1 context ptr

2016-12-19 Thread Nate Watterson
To ensure that the stage-1 context ptr for an ste points to the intended context descriptor, this patch adds code to clear away the stale context ptr value prior to or'ing in the new one. Signed-off-by: Nate Watterson <nwatt...@codeaurora.org> --- drivers/iommu/arm-smmu-v3.c | 2 ++

[PATCH] iommu/arm-smmu-v3: prevent corruption of ste stage-1 context ptr

2016-12-19 Thread Nate Watterson
To ensure that the stage-1 context ptr for an ste points to the intended context descriptor, this patch adds code to clear away the stale context ptr value prior to or'ing in the new one. Signed-off-by: Nate Watterson --- drivers/iommu/arm-smmu-v3.c | 2 ++ 1 file changed, 2 insertions(+) diff

[PATCH] iommu/arm-smmu-v3: avoid over allocating for l2 stream tables

2016-12-19 Thread Nate Watterson
e smmu to which it belongs. Signed-off-by: Nate Watterson <nwatt...@codeaurora.org> --- drivers/iommu/arm-smmu-v3.c | 10 +++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/drivers/iommu/arm-smmu-v3.c b/drivers/iommu/arm-smmu-v3.c index 4d6ec44..5dca671 100644 --- a/drivers/io

[PATCH] iommu/arm-smmu-v3: avoid over allocating for l2 stream tables

2016-12-19 Thread Nate Watterson
Currently, all l2 stream tables are being allocated with space for (1< --- drivers/iommu/arm-smmu-v3.c | 10 +++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/drivers/iommu/arm-smmu-v3.c b/drivers/iommu/arm-smmu-v3.c index 4d6ec44..5dca671 100644 ---

Re: [PATCH v5 14/14] drivers: acpi: iort: introduce iort_iommu_configure

2016-09-13 Thread Nate Watterson
On 2016-09-09 10:23, Lorenzo Pieralisi wrote: DT based systems have a generic kernel API to configure IOMMUs for devices (ie of_iommu_configure()). On ARM based ACPI systems, the of_iommu_configure() equivalent can be implemented atop ACPI IORT kernel API, with the corresponding functions to

Re: [PATCH v5 14/14] drivers: acpi: iort: introduce iort_iommu_configure

2016-09-13 Thread Nate Watterson
On 2016-09-09 10:23, Lorenzo Pieralisi wrote: DT based systems have a generic kernel API to configure IOMMUs for devices (ie of_iommu_configure()). On ARM based ACPI systems, the of_iommu_configure() equivalent can be implemented atop ACPI IORT kernel API, with the corresponding functions to

[PATCH] iommu/iova: validate iova_domain input to put_iova_domain

2016-07-13 Thread Nate Watterson
. The granule can be used to check if the domain was properly initialized because calling init_iova_domain with a granule of zero would have already triggered a BUG statement crashing the kernel. Signed-off-by: Nate Watterson <nwatt...@codeaurora.org> --- drivers/iommu/iova.c | 4 1 file c

[PATCH] iommu/iova: validate iova_domain input to put_iova_domain

2016-07-13 Thread Nate Watterson
. The granule can be used to check if the domain was properly initialized because calling init_iova_domain with a granule of zero would have already triggered a BUG statement crashing the kernel. Signed-off-by: Nate Watterson --- drivers/iommu/iova.c | 4 1 file changed, 4 insertions(+) diff

[PATCH] iommu/dma-iommu: respect established iova region limits

2016-07-13 Thread Nate Watterson
, this patch adds logic in __alloc_iova to clip input dma_limit values that are out of bounds. Signed-off-by: Nate Watterson <nwatt...@codeaurora.org> --- drivers/iommu/dma-iommu.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/iommu/dma-iommu.c b/drivers/iom

[PATCH] iommu/dma-iommu: respect established iova region limits

2016-07-13 Thread Nate Watterson
, this patch adds logic in __alloc_iova to clip input dma_limit values that are out of bounds. Signed-off-by: Nate Watterson --- drivers/iommu/dma-iommu.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/iommu/dma-iommu.c b/drivers/iommu/dma-iommu.c index ea5a9eb

[PATCH v2] iommu/arm-smmu-v3: limit use of 2-level stream tables

2016-07-12 Thread Nate Watterson
the feature and whose first level table can possibly contain more than a single entry. Signed-off-by: Nate Watterson <nwatt...@codeaurora.org> --- drivers/iommu/arm-smmu-v3.c | 21 ++--- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/drivers/iommu/arm-smmu-v3.c b/d

[PATCH v2] iommu/arm-smmu-v3: limit use of 2-level stream tables

2016-07-12 Thread Nate Watterson
the feature and whose first level table can possibly contain more than a single entry. Signed-off-by: Nate Watterson --- drivers/iommu/arm-smmu-v3.c | 21 ++--- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/drivers/iommu/arm-smmu-v3.c b/drivers/iommu/arm-smmu-v3.c

[PATCH] iommu/arm-smmu-v3: limit use of 2-level stream tables

2016-07-11 Thread Nate Watterson
the feature and whose first level table can possibly contain more than a single entry. Signed-off-by: Nate Watterson <nwatt...@codeaurora.org> --- drivers/iommu/arm-smmu-v3.c | 11 +++ 1 file changed, 11 insertions(+) diff --git a/drivers/iommu/arm-smmu-v3.c b/drivers/iommu/arm-smmu-v3.c

[PATCH] iommu/arm-smmu-v3: limit use of 2-level stream tables

2016-07-11 Thread Nate Watterson
the feature and whose first level table can possibly contain more than a single entry. Signed-off-by: Nate Watterson --- drivers/iommu/arm-smmu-v3.c | 11 +++ 1 file changed, 11 insertions(+) diff --git a/drivers/iommu/arm-smmu-v3.c b/drivers/iommu/arm-smmu-v3.c index 5f6b3bc..742254c 100644