[PATCH v13 9/9] iommu/arm-smmu: Get associated RMR info and install bypass SMR

2022-06-15 Thread Shameer Kolothum via iommu
: Steven Price Tested-by: Steven Price Tested-by: Laurentiu Tudor Signed-off-by: Shameer Kolothum --- drivers/iommu/arm/arm-smmu/arm-smmu.c | 52 +++ 1 file changed, 52 insertions(+) diff --git a/drivers/iommu/arm/arm-smmu/arm-smmu.c b/drivers/iommu/arm/arm-smmu/arm

[PATCH v13 8/9] iommu/arm-smmu-v3: Get associated RMR info and install bypass STE

2022-06-15 Thread Shameer Kolothum via iommu
Check if there is any RMR info associated with the devices behind the SMMUv3 and if any, install bypass STEs for them. This is to keep any ongoing traffic associated with these devices alive when we enable/reset SMMUv3 during probe(). Tested-by: Hanjun Guo Signed-off-by: Shameer Kolothum

[PATCH v13 7/9] iommu/arm-smmu-v3: Refactor arm_smmu_init_bypass_stes() to force bypass

2022-06-15 Thread Shameer Kolothum via iommu
cific SIDs. This will be useful in a follow-up patch to install bypass for IORT RMR SIDs. Tested-by: Hanjun Guo Signed-off-by: Shameer Kolothum --- drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c | 17 + 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/drivers/iommu/arm/a

[PATCH v13 5/9] ACPI/IORT: Add a helper to retrieve RMR info directly

2022-06-15 Thread Shameer Kolothum via iommu
This will provide a way for SMMU drivers to retrieve StreamIDs associated with IORT RMR nodes and use that to set bypass settings for those IDs. Tested-by: Steven Price Tested-by: Laurentiu Tudor Tested-by: Hanjun Guo Reviewed-by: Hanjun Guo Signed-off-by: Shameer Kolothum --- drivers/acpi

[PATCH v13 6/9] iommu/arm-smmu-v3: Introduce strtab init helper

2022-06-15 Thread Shameer Kolothum via iommu
Introduce a helper to check the sid range and to init the l2 strtab entries(bypass). This will be useful when we have to initialize the l2 strtab with bypass for RMR SIDs. Tested-by: Hanjun Guo Acked-by: Will Deacon Signed-off-by: Shameer Kolothum --- drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3

[PATCH v13 4/9] ACPI/IORT: Add support to retrieve IORT RMR reserved regions

2022-06-15 Thread Shameer Kolothum via iommu
Tudor Tested-by: Hanjun Guo Reviewed-by: Hanjun Guo Signed-off-by: Shameer Kolothum --- drivers/acpi/arm64/iort.c | 291 ++ include/linux/iommu.h | 8 ++ 2 files changed, 299 insertions(+) diff --git a/drivers/acpi/arm64/iort.c b/drivers/acpi/arm64

[PATCH v13 3/9] ACPI/IORT: Provide a generic helper to retrieve reserve regions

2022-06-15 Thread Shameer Kolothum via iommu
: Christoph Hellwig Tested-by: Steven Price Tested-by: Laurentiu Tudor Tested-by: Hanjun Guo Reviewed-by: Hanjun Guo Signed-off-by: Shameer Kolothum --- drivers/acpi/arm64/iort.c | 22 +++--- drivers/iommu/dma-iommu.c | 2 +- include/linux/acpi_iort.h | 4 ++-- 3 files changed

[PATCH v13 2/9] ACPI/IORT: Make iort_iommu_msi_get_resv_regions() return void

2022-06-15 Thread Shameer Kolothum via iommu
. Reviewed-by: Christoph Hellwig Tested-by: Steven Price Tested-by: Laurentiu Tudor Reviewed-by: Hanjun Guo Signed-off-by: Shameer Kolothum --- drivers/acpi/arm64/iort.c | 25 + include/linux/acpi_iort.h | 6 +++--- 2 files changed, 12 insertions(+), 19 deletions(-) diff

[PATCH v13 1/9] iommu: Introduce a callback to struct iommu_resv_region

2022-06-15 Thread Shameer Kolothum via iommu
: Hanjun Guo Signed-off-by: Shameer Kolothum --- drivers/iommu/iommu.c | 16 +++- include/linux/iommu.h | 2 ++ 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/drivers/iommu/iommu.c b/drivers/iommu/iommu.c index 847ad47a2dfd..298a8c060698 100644 --- a/drivers/iommu

[PATCH v13 0/9] ACPI/IORT: Support for IORT RMR node

2022-06-15 Thread Shameer Kolothum via iommu
Hi v12 --> v13 -No changes. Rebased to 5.19-rc1. -Picked up tags received from Laurentiu, Hanjun and Will. Thanks!. Thanks, Shameer From old: We have faced issues with 3408iMR RAID controller cards which fail to boot when SMMU is enabled. This is because these controllers make use of h

[PATCH v12 9/9] iommu/arm-smmu: Get associated RMR info and install bypass SMR

2022-05-03 Thread Shameer Kolothum via iommu
: Steven Price Tested-by: Steven Price Signed-off-by: Shameer Kolothum --- drivers/iommu/arm/arm-smmu/arm-smmu.c | 52 +++ 1 file changed, 52 insertions(+) diff --git a/drivers/iommu/arm/arm-smmu/arm-smmu.c b/drivers/iommu/arm/arm-smmu/arm-smmu.c index 568cce590ccc

[PATCH v12 8/9] iommu/arm-smmu-v3: Get associated RMR info and install bypass STE

2022-05-03 Thread Shameer Kolothum via iommu
Check if there is any RMR info associated with the devices behind the SMMUv3 and if any, install bypass STEs for them. This is to keep any ongoing traffic associated with these devices alive when we enable/reset SMMUv3 during probe(). Signed-off-by: Shameer Kolothum --- drivers/iommu/arm/arm

[PATCH v12 7/9] iommu/arm-smmu-v3: Refactor arm_smmu_init_bypass_stes() to force bypass

2022-05-03 Thread Shameer Kolothum via iommu
cific SIDs. This will be useful in a follow-up patch to install bypass for IORT RMR SIDs. Signed-off-by: Shameer Kolothum --- drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c | 17 + 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c

[PATCH v12 6/9] iommu/arm-smmu-v3: Introduce strtab init helper

2022-05-03 Thread Shameer Kolothum via iommu
Introduce a helper to check the sid range and to init the l2 strtab entries(bypass). This will be useful when we have to initialize the l2 strtab with bypass for RMR SIDs. Signed-off-by: Shameer Kolothum --- drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c | 28 +++-- 1 file changed

[PATCH v12 5/9] ACPI/IORT: Add a helper to retrieve RMR info directly

2022-05-03 Thread Shameer Kolothum via iommu
This will provide a way for SMMU drivers to retrieve StreamIDs associated with IORT RMR nodes and use that to set bypass settings for those IDs. Tested-by: Steven Price Signed-off-by: Shameer Kolothum --- drivers/acpi/arm64/iort.c | 28 include/linux/acpi_iort.h

[PATCH v12 4/9] ACPI/IORT: Add support to retrieve IORT RMR reserved regions

2022-05-03 Thread Shameer Kolothum via iommu
Parse through the IORT RMR nodes and populate the reserve region list corresponding to a given IOMMU and device(optional). Also, go through the ID mappings of the RMR node and retrieve all the SIDs associated with it. Reviewed-by: Lorenzo Pieralisi Tested-by: Steven Price Signed-off-by: Shameer

[PATCH v12 3/9] ACPI/IORT: Provide a generic helper to retrieve reserve regions

2022-05-03 Thread Shameer Kolothum via iommu
: Christoph Hellwig Tested-by: Steven Price Signed-off-by: Shameer Kolothum --- drivers/acpi/arm64/iort.c | 22 +++--- drivers/iommu/dma-iommu.c | 2 +- include/linux/acpi_iort.h | 4 ++-- 3 files changed, 18 insertions(+), 10 deletions(-) diff --git a/drivers/acpi/arm64/iort.c b

[PATCH v12 2/9] ACPI/IORT: Make iort_iommu_msi_get_resv_regions() return void

2022-05-03 Thread Shameer Kolothum via iommu
. Reviewed-by: Christoph Hellwig Tested-by: Steven Price Signed-off-by: Shameer Kolothum --- drivers/acpi/arm64/iort.c | 25 + include/linux/acpi_iort.h | 6 +++--- 2 files changed, 12 insertions(+), 19 deletions(-) diff --git a/drivers/acpi/arm64/iort.c b/drivers/acpi/arm64

[PATCH v12 1/9] iommu: Introduce a callback to struct iommu_resv_region

2022-05-03 Thread Shameer Kolothum via iommu
A callback is introduced to struct iommu_resv_region to free memory allocations associated with the reserved region. This will be useful when we introduce support for IORT RMR based reserved regions. Reviewed-by: Christoph Hellwig Tested-by: Steven Price Signed-off-by: Shameer Kolothum

[PATCH v12 0/9] ACPI/IORT: Support for IORT RMR node

2022-05-03 Thread Shameer Kolothum via iommu
tch here[1]. Please take a look and let me know. Thanks, Shameer [1] https://lore.kernel.org/all/44610361.fMDQidcC6G@kreacher/ From old: We have faced issues with 3408iMR RAID controller cards which fail to boot when SMMU is enabled. This is because these controllers make use of host memory

[PATCH v11 9/9] iommu/arm-smmu: Get associated RMR info and install bypass SMR

2022-04-22 Thread Shameer Kolothum via iommu
: Steven Price Signed-off-by: Shameer Kolothum --- drivers/iommu/arm/arm-smmu/arm-smmu.c | 52 +++ 1 file changed, 52 insertions(+) diff --git a/drivers/iommu/arm/arm-smmu/arm-smmu.c b/drivers/iommu/arm/arm-smmu/arm-smmu.c index 568cce590ccc..e02cc2d4fb4e 100644 --- a

[PATCH v11 8/9] iommu/arm-smmu-v3: Get associated RMR info and install bypass STE

2022-04-22 Thread Shameer Kolothum via iommu
Check if there is any RMR info associated with the devices behind the SMMUv3 and if any, install bypass STEs for them. This is to keep any ongoing traffic associated with these devices alive when we enable/reset SMMUv3 during probe(). Signed-off-by: Shameer Kolothum --- drivers/iommu/arm/arm

[PATCH v11 7/9] iommu/arm-smmu-v3: Refactor arm_smmu_init_bypass_stes() to force bypass

2022-04-22 Thread Shameer Kolothum via iommu
cific SIDs. This will be useful in a follow-up patch to install bypass for IORT RMR SIDs. Signed-off-by: Shameer Kolothum --- drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c | 17 + 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c

[PATCH v11 6/9] iommu/arm-smmu-v3: Introduce strtab init helper

2022-04-22 Thread Shameer Kolothum via iommu
Introduce a helper to check the sid range and to init the l2 strtab entries(bypass). This will be useful when we have to initialize the l2 strtab with bypass for RMR SIDs. Signed-off-by: Shameer Kolothum --- drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c | 28 +++-- 1 file changed

[PATCH v11 5/9] ACPI/IORT: Add a helper to retrieve RMR info directly

2022-04-22 Thread Shameer Kolothum via iommu
This will provide a way for SMMU drivers to retrieve StreamIDs associated with IORT RMR nodes and use that to set bypass settings for those IDs. Signed-off-by: Shameer Kolothum --- drivers/acpi/arm64/iort.c | 28 include/linux/acpi_iort.h | 8 2 files

[PATCH v11 3/9] ACPI/IORT: Provide a generic helper to retrieve reserve regions

2022-04-22 Thread Shameer Kolothum via iommu
: Christoph Hellwig Signed-off-by: Shameer Kolothum --- drivers/acpi/arm64/iort.c | 22 +++--- drivers/iommu/dma-iommu.c | 2 +- include/linux/acpi_iort.h | 4 ++-- 3 files changed, 18 insertions(+), 10 deletions(-) diff --git a/drivers/acpi/arm64/iort.c b/drivers/acpi/arm64/iort.c

[PATCH v11 4/9] ACPI/IORT: Add support to retrieve IORT RMR reserved regions

2022-04-22 Thread Shameer Kolothum via iommu
Parse through the IORT RMR nodes and populate the reserve region list corresponding to a given IOMMU and device(optional). Also, go through the ID mappings of the RMR node and retrieve all the SIDs associated with it. Signed-off-by: Shameer Kolothum --- drivers/acpi/arm64/iort.c | 290

[PATCH v11 2/9] ACPI/IORT: Make iort_iommu_msi_get_resv_regions() return void

2022-04-22 Thread Shameer Kolothum via iommu
. Reviewed-by: Christoph Hellwig Signed-off-by: Shameer Kolothum --- drivers/acpi/arm64/iort.c | 25 + include/linux/acpi_iort.h | 6 +++--- 2 files changed, 12 insertions(+), 19 deletions(-) diff --git a/drivers/acpi/arm64/iort.c b/drivers/acpi/arm64/iort.c index f2f8f05662de

[PATCH v11 1/9] iommu: Introduce a callback to struct iommu_resv_region

2022-04-22 Thread Shameer Kolothum via iommu
A callback is introduced to struct iommu_resv_region to free memory allocations associated with the reserved region. This will be useful when we introduce support for IORT RMR based reserved regions. Signed-off-by: Shameer Kolothum --- drivers/iommu/iommu.c | 16 +++- include/linux

[PATCH v11 0/9] ACPI/IORT: Support for IORT RMR node

2022-04-22 Thread Shameer Kolothum via iommu
he ACPICA header patch here[1]. Please take a look and let me know. Thanks, Shameer [1] https://lore.kernel.org/all/44610361.fMDQidcC6G@kreacher/ From old: We have faced issues with 3408iMR RAID controller cards which fail to boot when SMMU is enabled. This is because these controllers make use of

[PATCH v10 9/9] iommu/arm-smmu: Get associated RMR info and install bypass SMR

2022-04-20 Thread Shameer Kolothum via iommu
: Steven Price Tested-by: Steven Price Tested-by: Laurentiu Tudor Signed-off-by: Shameer Kolothum --- drivers/iommu/arm/arm-smmu/arm-smmu.c | 52 +++ 1 file changed, 52 insertions(+) diff --git a/drivers/iommu/arm/arm-smmu/arm-smmu.c b/drivers/iommu/arm/arm-smmu/arm

[PATCH v10 8/9] iommu/arm-smmu-v3: Get associated RMR info and install bypass STE

2022-04-20 Thread Shameer Kolothum via iommu
Check if there is any RMR info associated with the devices behind the SMMUv3 and if any, install bypass STEs for them. This is to keep any ongoing traffic associated with these devices alive when we enable/reset SMMUv3 during probe(). Signed-off-by: Shameer Kolothum --- drivers/iommu/arm/arm

[PATCH v10 7/9] iommu/arm-smmu-v3: Refactor arm_smmu_init_bypass_stes() to force bypass

2022-04-20 Thread Shameer Kolothum via iommu
cific SIDs. This will be useful in a follow-up patch to install bypass for IORT RMR SIDs. Signed-off-by: Shameer Kolothum --- drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c | 17 + 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c

[PATCH v10 6/9] iommu/arm-smmu-v3: Introduce strtab init helper

2022-04-20 Thread Shameer Kolothum via iommu
Introduce a helper to check the sid range and to init the l2 strtab entries(bypass). This will be useful when we have to initialize the l2 strtab with bypass for RMR SIDs. Signed-off-by: Shameer Kolothum --- drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c | 28 +++-- 1 file changed

[PATCH v10 5/9] ACPI/IORT: Add a helper to retrieve RMR info directly

2022-04-20 Thread Shameer Kolothum via iommu
This will provide a way for SMMU drivers to retrieve StreamIDs associated with IORT RMR nodes and use that to set bypass settings for those IDs. Reviewed-by: Lorenzo Pieralisi Tested-by: Steven Price Tested-by: Laurentiu Tudor Signed-off-by: Shameer Kolothum --- drivers/acpi/arm64/iort.c

[PATCH v10 4/9] ACPI/IORT: Add support to retrieve IORT RMR reserved regions

2022-04-20 Thread Shameer Kolothum via iommu
resv_region_free_fw_data() callback to free up any RMR related memory allocation.  [Lorenzo: For ACPI IORT] Reviewed-by: Lorenzo Pieralisi Tested-by: Steven Price Tested-by: Laurentiu Tudor Signed-off-by: Shameer Kolothum --- drivers/acpi/arm64/iort.c | 264 ++ drivers

[PATCH v10 3/9] ACPI/IORT: Provide a generic helper to retrieve reserve regions

2022-04-20 Thread Shameer Kolothum via iommu
: Steven Price Tested-by: Laurentiu Tudor Signed-off-by: Shameer Kolothum --- drivers/acpi/arm64/iort.c | 22 +++--- drivers/iommu/dma-iommu.c | 2 +- include/linux/acpi_iort.h | 4 ++-- 3 files changed, 18 insertions(+), 10 deletions(-) diff --git a/drivers/acpi/arm64/iort.c b

[PATCH v10 2/9] ACPI/IORT: Make iort_iommu_msi_get_resv_regions() return void

2022-04-20 Thread Shameer Kolothum via iommu
. Tested-by: Steven Price Tested-by: Laurentiu Tudor Signed-off-by: Shameer Kolothum --- drivers/acpi/arm64/iort.c | 25 + include/linux/acpi_iort.h | 6 +++--- 2 files changed, 12 insertions(+), 19 deletions(-) diff --git a/drivers/acpi/arm64/iort.c b/drivers/acpi/arm64

[PATCH v10 1/9] iommu: Introduce a union to struct iommu_resv_region

2022-04-20 Thread Shameer Kolothum via iommu
: Steven Price Tested-by: Laurentiu Tudor Signed-off-by: Shameer Kolothum --- include/linux/iommu.h | 13 + 1 file changed, 13 insertions(+) diff --git a/include/linux/iommu.h b/include/linux/iommu.h index 9208eca4b0d1..38f1e043dfaa 100644 --- a/include/linux/iommu.h +++ b/include

[PATCH v10 0/9] ACPI/IORT: Support for IORT RMR node

2022-04-20 Thread Shameer Kolothum via iommu
that to free RMR specific memory allocations. Though there is a small change from v9 with respect to how we free up the FW specific data, I have taken the liberty to pick up the R-by and T-by tags from Lorenzo, Steve and Laurentiu. But please do take a look again and let me know. Thanks, Sham

[PATCH v9 11/11] iommu/arm-smmu: Get associated RMR info and install bypass SMR

2022-04-04 Thread Shameer Kolothum via iommu
: Steven Price Signed-off-by: Shameer Kolothum --- drivers/iommu/arm/arm-smmu/arm-smmu.c | 52 +++ 1 file changed, 52 insertions(+) diff --git a/drivers/iommu/arm/arm-smmu/arm-smmu.c b/drivers/iommu/arm/arm-smmu/arm-smmu.c index 9a5b785d28fd..d1d0473b8b88 100644 --- a

[PATCH v9 10/11] iommu/arm-smmu-v3: Get associated RMR info and install bypass STE

2022-04-04 Thread Shameer Kolothum via iommu
Check if there is any RMR info associated with the devices behind the SMMUv3 and if any, install bypass STEs for them. This is to keep any ongoing traffic associated with these devices alive when we enable/reset SMMUv3 during probe(). Signed-off-by: Shameer Kolothum --- drivers/iommu/arm/arm

[PATCH v9 09/11] iommu/arm-smmu-v3: Refactor arm_smmu_init_bypass_stes() to force bypass

2022-04-04 Thread Shameer Kolothum via iommu
cific SIDs. This will be useful in a follow-up patch to install bypass for IORT RMR SIDs. Signed-off-by: Shameer Kolothum --- drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c | 17 + 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c

[PATCH v9 08/11] iommu/arm-smmu-v3: Introduce strtab init helper

2022-04-04 Thread Shameer Kolothum via iommu
Introduce a helper to check the sid range and to init the l2 strtab entries(bypass). This will be useful when we have to initialize the l2 strtab with bypass for RMR SIDs. Signed-off-by: Shameer Kolothum --- drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c | 28 +++-- 1 file changed

[PATCH v9 07/11] ACPI/IORT: Add a helper to retrieve RMR info directly

2022-04-04 Thread Shameer Kolothum via iommu
This will provide a way for SMMU drivers to retrieve StreamIDs associated with IORT RMR nodes and use that to set bypass settings for those IDs. Signed-off-by: Shameer Kolothum --- drivers/acpi/arm64/iort.c | 29 + include/linux/acpi_iort.h | 8 2 files

[PATCH v9 06/11] ACPI/IORT: Add support to retrieve IORT RMR reserved regions

2022-04-04 Thread Shameer Kolothum via iommu
to include the RMR reserve regions. Signed-off-by: Shameer Kolothum --- drivers/acpi/arm64/iort.c | 275 ++ drivers/iommu/dma-iommu.c | 3 + include/linux/acpi_iort.h | 4 + 3 files changed, 282 insertions(+) diff --git a/drivers/acpi/arm64/iort.c b/drivers

[PATCH v9 05/11] iommu/dma: Introduce a helper to remove reserved regions

2022-04-04 Thread Shameer Kolothum via iommu
to be freed. Also update current users of iommu_dma_get_resv_regions() to use iommu_dma_put_resv_regions() for removal. Signed-off-by: Shameer Kolothum --- drivers/iommu/apple-dart.c | 2 +- drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c | 2 +- drivers/iommu/arm/arm-smmu/arm

[PATCH v9 04/11] ACPI/IORT: Provide a generic helper to retrieve reserve regions

2022-04-04 Thread Shameer Kolothum via iommu
Currently IORT provides a helper to retrieve HW MSI reserve regions. Change this to a generic helper to retrieve any IORT related reserve regions. This will be useful when we add support for RMR nodes in subsequent patches. Signed-off-by: Shameer Kolothum --- drivers/acpi/arm64/iort.c | 23

[PATCH v9 03/11] ACPI/IORT: Make iort_iommu_msi_get_resv_regions() return void

2022-04-04 Thread Shameer Kolothum via iommu
. Signed-off-by: Shameer Kolothum --- drivers/acpi/arm64/iort.c | 26 ++ include/linux/acpi_iort.h | 6 +++--- 2 files changed, 13 insertions(+), 19 deletions(-) diff --git a/drivers/acpi/arm64/iort.c b/drivers/acpi/arm64/iort.c index fd06cf43ba31..c5ebb2be9a19 100644 --- a

[PATCH v9 02/11] iommu: Introduce a union to struct iommu_resv_region

2022-04-04 Thread Shameer Kolothum via iommu
A union is introduced to struct iommu_resv_region to hold any firmware specific data. This is in preparation to add support for IORT RMR reserve regions and the union now holds the RMR specific information. Signed-off-by: Shameer Kolothum --- include/linux/iommu.h | 9 + 1 file changed

[PATCH v9 01/11] ACPI/IORT: Add temporary RMR node flag definitions

2022-04-04 Thread Shameer Kolothum via iommu
IORT rev E.d introduces more details into the RMR node Flags field. Add temporary definitions to describe and access these Flags field until ACPICA header is updated to support E.d. This patch can be reverted once the include/acpi/actbl2.h has all the relevant definitions. Signed-off-by: Shameer

[PATCH v9 00/11] ACPI/IORT: Support for IORT RMR node

2022-04-04 Thread Shameer Kolothum via iommu
anks for that). Appreciate it if you could give this a spin and let me know. (The revised ACPICA pull request for IORT E.d related changes is here[1] and this is now merged to acpica:master.) Please take a look and let me know your thoughts. Thanks, Shameer [0] https://lore.kernel.org/linux-ar

[PATCH v8 11/11] iommu/arm-smmu: Reserve any RMR regions associated with a dev

2022-02-21 Thread Shameer Kolothum via iommu
Get ACPI IORT RMR regions associated with a dev reserved so that there is a unity mapping for them in SMMU. Signed-off-by: Shameer Kolothum --- drivers/iommu/arm/arm-smmu/arm-smmu.c | 13 - 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/drivers/iommu/arm/arm-smmu/arm

[PATCH v8 10/11] iommu/arm-smmu-v3: Reserve any RMR regions associated with a dev

2022-02-21 Thread Shameer Kolothum via iommu
Get ACPI IORT RMR regions associated with a dev reserved so that there is a unity mapping for them in SMMU. Signed-off-by: Shameer Kolothum --- drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c | 13 - 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/drivers/iommu/arm/arm

[PATCH v8 09/11] iommu/arm-smmu: Get associated RMR info and install bypass SMR

2022-02-21 Thread Shameer Kolothum via iommu
: Steven Price Signed-off-by: Shameer Kolothum --- drivers/iommu/arm/arm-smmu/arm-smmu.c | 52 +++ 1 file changed, 52 insertions(+) diff --git a/drivers/iommu/arm/arm-smmu/arm-smmu.c b/drivers/iommu/arm/arm-smmu/arm-smmu.c index 4bc75c4ce402..19dcae41d1aa 100644 --- a

[PATCH v8 08/11] iommu/arm-smmu-v3: Get associated RMR info and install bypass STE

2022-02-21 Thread Shameer Kolothum via iommu
Check if there is any RMR info associated with the devices behind the SMMUv3 and if any, install bypass STEs for them. This is to keep any ongoing traffic associated with these devices alive when we enable/reset SMMUv3 during probe(). Signed-off-by: Shameer Kolothum --- drivers/iommu/arm/arm

[PATCH v8 07/11] iommu/arm-smmu-v3: Refactor arm_smmu_init_bypass_stes() to force bypass

2022-02-21 Thread Shameer Kolothum via iommu
cific SIDs. This will be useful in follow-up patch to install bypass for IORT RMR SIDs. Signed-off-by: Shameer Kolothum --- drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c | 17 + 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c

[PATCH v8 06/11] iommu/arm-smmu-v3: Introduce strtab init helper

2022-02-21 Thread Shameer Kolothum via iommu
Introduce a helper to check the sid range and to init the l2 strtab entries(bypass). This will be useful when we have to initialize the l2 strtab with bypass for RMR SIDs. Signed-off-by: Shameer Kolothum --- drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c | 28 +++-- 1 file changed

[PATCH v8 05/11] ACPI/IORT: Add a helper to retrieve RMR memory regions

2022-02-21 Thread Shameer Kolothum via iommu
Add helper functions (iort_iommu_get/put_rmrs()) that retrieves/releases RMR memory descriptors associated with a given IOMMU. This will be used by IOMMU drivers to set up necessary mappings. Invoke it from the generic iommu helper functions. Signed-off-by: Shameer Kolothum --- drivers/acpi

[PATCH v8 04/11] iommu/dma: Introduce generic helper to retrieve RMR info

2022-02-21 Thread Shameer Kolothum via iommu
Reserved Memory Regions(RMR) associated with an IOMMU can be described through ACPI IORT tables in systems with devices that require a unity mapping or bypass for those regions. Introduce a generic interface so that IOMMU drivers can retrieve and set up necessary mappings. Signed-off-by: Shameer

[PATCH v8 03/11] ACPI/IORT: Add helper functions to parse RMR nodes

2022-02-21 Thread Shameer Kolothum via iommu
The helper functions here parse through the IORT RMR nodes and populate a reserved region list corresponding to a given iommu and device(optional). These also go through the ID mappings of the RMR node and retrieves all the SIDs associated with a RMR descriptor. Signed-off-by: Shameer Kolothum

[PATCH v8 02/11] iommu: Introduce a union to struct iommu_resv_region

2022-02-21 Thread Shameer Kolothum via iommu
A union is introduced to struct iommu_resv_region to hold any firmware specific data. This is in preparation to add support for IORT RMR reserve regions and the union now holds the RMR specific information. Signed-off-by: Shameer Kolothum --- include/linux/iommu.h | 9 + 1 file changed

[PATCH v8 01/11] ACPI/IORT: Add temporary RMR node flag definitions

2022-02-21 Thread Shameer Kolothum via iommu
IORT rev E.d introduces more details into the RMR node Flags field. Add temporary definitions to describe and access these Flags field until ACPICA header is updated to support E.d. This patch can be reverted once the include/acpi/actbl2.h has all the relevant definitions. Signed-off-by: Shameer

[PATCH v8 00/11] ACPI/IORT: Support for IORT RMR node

2022-02-21 Thread Shameer Kolothum via iommu
RMR descriptor shared by multiple stream IDs. Please take a look and let me know your thoughts. Thanks, Shameer [0] https://developer.arm.com/documentation/den0049/ed/ [1] https://lore.kernel.org/linux-acpi/20210805160319.GB23085@lpieralisi/ >From old: We have faced issues with 3408iMR RAID cont

[PATCH v7 9/9] iommu/dma: Reserve any RMR regions associated with a dev

2021-08-05 Thread Shameer Kolothum
Get ACPI IORT RMR regions associated with a dev reserved so that there is a unity mapping for them in SMMU. Signed-off-by: Shameer Kolothum --- drivers/iommu/dma-iommu.c | 56 +++ 1 file changed, 51 insertions(+), 5 deletions(-) diff --git a/drivers/iommu

[PATCH v7 8/9] iommu/arm-smmu: Get associated RMR info and install bypass SMR

2021-08-05 Thread Shameer Kolothum
: Steven Price Signed-off-by: Shameer Kolothum --- drivers/iommu/arm/arm-smmu/arm-smmu.c | 48 +++ 1 file changed, 48 insertions(+) diff --git a/drivers/iommu/arm/arm-smmu/arm-smmu.c b/drivers/iommu/arm/arm-smmu/arm-smmu.c index f22dbeb1e510..315feab9e85b 100644 --- a

[PATCH v7 7/9] iommu/arm-smmu-v3: Get associated RMR info and install bypass STE

2021-08-05 Thread Shameer Kolothum
Check if there is any RMR info associated with the devices behind the SMMUv3 and if any, install bypass STEs for them. This is to keep any ongoing traffic associated with these devices alive when we enable/reset SMMUv3 during probe(). Signed-off-by: Shameer Kolothum --- drivers/iommu/arm/arm

[PATCH v7 6/9] iommu/arm-smmu-v3: Refactor arm_smmu_init_bypass_stes() to force bypass

2021-08-05 Thread Shameer Kolothum
cific SIDs. This will be useful in follow-up patch to install bypass for IORT RMR SIDs. Signed-off-by: Shameer Kolothum --- drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c | 17 + 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c

[PATCH v7 5/9] iommu/arm-smmu-v3: Introduce strtab init helper

2021-08-05 Thread Shameer Kolothum
Introduce a helper to check the sid range and to init the l2 strtab entries(bypass). This will be useful when we have to initialize the l2 strtab with bypass for RMR SIDs. Signed-off-by: Shameer Kolothum --- drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c | 28 +++-- 1 file changed

[PATCH v7 4/9] ACPI/IORT: Add a helper to retrieve RMR memory regions

2021-08-05 Thread Shameer Kolothum
Add a helper function (iort_iommu_get_rmrs()) that retrieves RMR memory descriptors associated with a given IOMMU. This will be used by IOMMU drivers to setup necessary mappings. Invoke it from the generic helper iommu_dma_get_rmrs(). Signed-off-by: Shameer Kolothum --- drivers/acpi/arm64

[PATCH v7 3/9] iommu/dma: Introduce generic helper to retrieve RMR info

2021-08-05 Thread Shameer Kolothum
Reserved Memory Regions(RMR) associated with an IOMMU can be described through ACPI IORT tables in systems with devices that require a unity mapping or bypass for those regions. Introduce a generic interface so that IOMMU drivers can retrieve and set up necessary mappings. Signed-off-by: Shameer

[PATCH v7 2/9] ACPI/IORT: Add support for RMR node parsing

2021-08-05 Thread Shameer Kolothum
Add support for parsing RMR node information from ACPI. Find the associated streamid and smmu node info from the RMR node and populate a linked list with RMR memory descriptors. Signed-off-by: Shameer Kolothum --- drivers/acpi/arm64/iort.c | 134 +- 1 file

[PATCH v7 1/9] iommu: Introduce a union to struct iommu_resv_region

2021-08-05 Thread Shameer Kolothum
A union is introduced to struct iommu_resv_region to hold any firmware specific data. This is in preparation to add support for IORT RMR reserve regions and the union now holds the RMR specific information. Signed-off-by: Shameer Kolothum --- include/linux/iommu.h | 11 +++ 1 file

[PATCH v7 0/9] ACPI/IORT: Support for IORT RMR node

2021-08-05 Thread Shameer Kolothum
CHE, IOMMU_MMIO) based on Type of RMR region. Suggested by Jon N. Thanks, Shameer [0] https://developer.arm.com/documentation/den0049/latest/ [1] https://lore.kernel.org/linux-acpi/20210716083442.1708-1-shameerali.kolothum.th...@huawei.com/T/#m043c95b869973a834b2fd57f3e1ed0325c84f3b7 -- v4 -

[PATCH v6 9/9] iommu/dma: Reserve any RMR regions associated with a dev

2021-07-16 Thread Shameer Kolothum
Get ACPI IORT RMR regions associated with a dev reserved so that there is a unity mapping for them in SMMU. Signed-off-by: Shameer Kolothum --- drivers/iommu/dma-iommu.c | 56 +++ 1 file changed, 51 insertions(+), 5 deletions(-) diff --git a/drivers/iommu

[PATCH v6 8/9] iommu/arm-smmu: Get associated RMR info and install bypass SMR

2021-07-16 Thread Shameer Kolothum
: Steven Price Signed-off-by: Shameer Kolothum --- drivers/iommu/arm/arm-smmu/arm-smmu.c | 48 +++ 1 file changed, 48 insertions(+) diff --git a/drivers/iommu/arm/arm-smmu/arm-smmu.c b/drivers/iommu/arm/arm-smmu/arm-smmu.c index f22dbeb1e510..e9fb3d962a86 100644 --- a

[PATCH v6 7/9] iommu/arm-smmu-v3: Get associated RMR info and install bypass STE

2021-07-16 Thread Shameer Kolothum
Check if there is any RMR info associated with the devices behind the SMMUv3 and if any, install bypass STEs for them. This is to keep any ongoing traffic associated with these devices alive when we enable/reset SMMUv3 during probe(). Signed-off-by: Shameer Kolothum --- drivers/iommu/arm/arm

[PATCH v6 6/9] iommu/arm-smmu-v3: Refactor arm_smmu_init_bypass_stes() to force bypass

2021-07-16 Thread Shameer Kolothum
cific SIDs. This will be useful in follow-up patch to install bypass for IORT RMR SIDs. Signed-off-by: Shameer Kolothum --- drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c | 17 + 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c

[PATCH v6 5/9] iommu/arm-smmu-v3: Introduce strtab init helper

2021-07-16 Thread Shameer Kolothum
Introduce a helper to check the sid range and to init the l2 strtab entries(bypass). This will be useful when we have to initialize the l2 strtab with bypass for RMR SIDs. Signed-off-by: Shameer Kolothum --- drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c | 28 +++-- 1 file changed

[PATCH v6 4/9] ACPI/IORT: Add a helper to retrieve RMR memory regions

2021-07-16 Thread Shameer Kolothum
Add a helper function (iort_iommu_get_rmrs()) that retrieves RMR memory descriptors associated with a given IOMMU. This will be used by IOMMU drivers to setup necessary mappings. Invoke it from the generic helper iommu_dma_get_rmrs(). Signed-off-by: Shameer Kolothum --- drivers/acpi/arm64

[PATCH v6 3/9] iommu/dma: Introduce generic helper to retrieve RMR info

2021-07-16 Thread Shameer Kolothum
Reserved Memory Regions(RMR) associated with an IOMMU can be described through ACPI IORT tables in systems with devices that require a unity mapping or bypass for those regions. Introduce a generic interface so that IOMMU drivers can retrieve and set up necessary mappings. Signed-off-by: Shameer

[PATCH v6 2/9] ACPI/IORT: Add support for RMR node parsing

2021-07-16 Thread Shameer Kolothum
Add support for parsing RMR node information from ACPI. Find the associated streamid and smmu node info from the RMR node and populate a linked list with RMR memory descriptors. Signed-off-by: Shameer Kolothum --- drivers/acpi/arm64/iort.c | 134 +- 1 file

[PATCH v6 1/9] iommu: Introduce a union to struct iommu_resv_region

2021-07-16 Thread Shameer Kolothum
A union is introduced to struct iommu_resv_region to hold any firmware specific data. This is in preparation to add support for IORT RMR reserve regions and the union now holds the RMR specific information. Signed-off-by: Shameer Kolothum --- include/linux/iommu.h | 11 +++ 1 file

[PATCH v6 0/9] ACPI/IORT: Support for IORT RMR node

2021-07-16 Thread Shameer Kolothum
MUv3). Further testing and feedback is greatly appreciated. Thanks, Shameer -- v4 --> v5 -Added a fw_data union to struct iommu_resv_region and removed struct iommu_rmr (Based on comments from Joerg/Robin). -Added iommu_put_rmrs() to release mem. -Thanks to Steve for verifying on SMMU

[PATCH v5 8/8] iommu/dma: Reserve any RMR regions associated with a dev

2021-05-24 Thread Shameer Kolothum
Get ACPI IORT RMR regions associated with a dev reserved so that there is a unity mapping for them in SMMU. Signed-off-by: Shameer Kolothum --- drivers/iommu/dma-iommu.c | 56 +++ 1 file changed, 51 insertions(+), 5 deletions(-) diff --git a/drivers/iommu

[PATCH v5 7/8] iommu/arm-smmu: Get associated RMR info and install bypass SMR

2021-05-24 Thread Shameer Kolothum
: Steven Price Signed-off-by: Shameer Kolothum --- drivers/iommu/arm/arm-smmu/arm-smmu.c | 65 +++ 1 file changed, 65 insertions(+) diff --git a/drivers/iommu/arm/arm-smmu/arm-smmu.c b/drivers/iommu/arm/arm-smmu/arm-smmu.c index 6f72c4d208ca..56db3d3238fc 100644 --- a

[PATCH v5 6/8] iommu/arm-smmu-v3: Get associated RMR info and install

2021-05-24 Thread Shameer Kolothum
Check if there is any RMR info associated with the devices behind the SMMUv3 and if any, install bypass STEs for them. This is to keep any ongoing traffic associated with these devices alive when we enable/reset SMMUv3 during probe(). Signed-off-by: Shameer Kolothum --- drivers/iommu/arm/arm

[PATCH v5 5/8] iommu/arm-smmu-v3: Add bypass flag to arm_smmu_write_strtab_ent()

2021-05-24 Thread Shameer Kolothum
w up patch to install bypass for IORT RMR SIDs. Signed-off-by: Shameer Kolothum --- drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c b/drivers/iommu/arm/arm-smmu-v3/arm-smmu-

[PATCH v5 3/8] ACPI/IORT: Add a helper to retrieve RMR memory regions

2021-05-24 Thread Shameer Kolothum
Add a helper function that retrieves RMR memory descriptors associated with a given IOMMU. This will be used by IOMMU drivers to setup necessary mappings. Now that we have this, invoke it from the generic helper interface. Signed-off-by: Shameer Kolothum --- drivers/acpi/arm64/iort.c | 50

[PATCH v5 4/8] iommu/arm-smmu-v3: Introduce strtab init helper

2021-05-24 Thread Shameer Kolothum
Introduce a helper to check the sid range and to init the l2 strtab entries(bypass). This will be useful when we have to initialize the l2 strtab with bypass for RMR SIDs. Signed-off-by: Shameer Kolothum --- drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c | 28 +++-- 1 file changed

[PATCH v5 2/8] iommu/dma: Introduce generic helper to retrieve RMR info

2021-05-24 Thread Shameer Kolothum
to struct iommu_resv_region to hold any firmware specific data(eg:RMR specific info). Signed-off-by: Shameer Kolothum --- drivers/iommu/dma-iommu.c | 29 + include/linux/dma-iommu.h | 13 + include/linux/iommu.h | 10 ++ 3 files changed, 52

[PATCH v5 1/8] ACPI/IORT: Add support for RMR node parsing

2021-05-24 Thread Shameer Kolothum
Add support for parsing RMR node information from ACPI. Find associated stream id and smmu node info from the RMR node and populate a linked list with RMR memory descriptors. Signed-off-by: Shameer Kolothum --- drivers/acpi/arm64/iort.c | 104 +- 1 file

[PATCH v5 0/8] ACPI/IORT: Support for IORT RMR node

2021-05-24 Thread Shameer Kolothum
MUv2(Thanks to Jon Nettleton!) Sanity tested on a HiSilicon D06. Further testing and feedback is greatly appreciated. The whole series can be found here, https://github.com/hisilicon/kernel-dev/tree/private-v5.12-rc8-rmr-v3 Thanks, Shameer [0] https://lore.kernel.org/linux-acpi/2021040621

[PATCH v4 8/8] iommu/dma: Reserve any RMR regions associated with a dev

2021-05-13 Thread Shameer Kolothum
Get ACPI IORT RMR regions associated with a dev reserved so that there is a unity mapping for them in SMMU. Signed-off-by: Shameer Kolothum --- drivers/iommu/dma-iommu.c | 66 --- 1 file changed, 61 insertions(+), 5 deletions(-) diff --git a/drivers/iommu

[PATCH v4 7/8] iommu/arm-smmu: Get associated RMR info and install bypass SMR

2021-05-13 Thread Shameer Kolothum
: Steven Price Signed-off-by: Shameer Kolothum --- drivers/iommu/arm/arm-smmu/arm-smmu.c | 64 +++ 1 file changed, 64 insertions(+) diff --git a/drivers/iommu/arm/arm-smmu/arm-smmu.c b/drivers/iommu/arm/arm-smmu/arm-smmu.c index 6f72c4d208ca..f67aeb30b5ef 100644 --- a

[PATCH v4 6/8] iommu/arm-smmu-v3: Get associated RMR info and install bypass STE

2021-05-13 Thread Shameer Kolothum
Check if there is any RMR info associated with the devices behind the SMMUv3 and if any, install bypass STEs for them. This is to keep any ongoing traffic associated with these devices alive when we enable/reset SMMUv3 during probe(). Signed-off-by: Shameer Kolothum --- drivers/iommu/arm/arm

[PATCH v4 5/8] iommu/arm-smmu-v3: Add bypass flag to arm_smmu_write_strtab_ent()

2021-05-13 Thread Shameer Kolothum
w up patch to install bypass for IORT RMR SIDs. Signed-off-by: Shameer Kolothum --- drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c b/drivers/iommu/arm/arm-smmu-v3/arm-smmu-

[PATCH v4 4/8] iommu/arm-smmu-v3: Introduce strtab init helper

2021-05-13 Thread Shameer Kolothum
Introduce a helper to check the sid range and to init the l2 strtab entries(bypass). This will be useful when we have to initialize the l2 strtab with bypass for RMR SIDs. Signed-off-by: Shameer Kolothum --- drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c | 28 +++-- 1 file changed

[PATCH v4 3/8] ACPI/IORT: Add a helper to retrieve RMR memory regions

2021-05-13 Thread Shameer Kolothum
Add a helper function that retrieves RMR memory descriptors associated with a given IOMMU. This will be used by IOMMU drivers to setup necessary mappings. Now that we have this, invoke it from the generic helper interface. Signed-off-by: Shameer Kolothum --- drivers/acpi/arm64/iort.c | 40

[PATCH v4 2/8] iommu/dma: Introduce generic helper to retrieve RMR info

2021-05-13 Thread Shameer Kolothum
Reserved Memory Regions(RMR) associated with an IOMMU can be described through ACPI IORT tables in systems with devices that require a unity mapping or bypass for those regions. Introduce a generic interface so that IOMMU drivers can retrieve and set up necessary mappings. Signed-off-by: Shameer

  1   2   3   >