[v8,2/7] iommu/arm-smmu-v3: support ops registration for CDX bus

Message ID 20230217132830.3140439-3-nipun.gupta@amd.com
State New
Headers
Series add support for CDX bus |

Commit Message

Gupta, Nipun Feb. 17, 2023, 1:28 p.m. UTC
  With new CDX bus supported for AMD FPGA devices on ARM
platform, the bus requires registration for the SMMU v3
driver.

Signed-off-by: Nipun Gupta <nipun.gupta@amd.com>
Tested-by: Nikhil Agarwal <nikhil.agarwal@amd.com>
---
 drivers/iommu/iommu.c | 4 ++++
 1 file changed, 4 insertions(+)
  

Comments

Robin Murphy Feb. 21, 2023, 11:56 a.m. UTC | #1
On 2023-02-17 13:28, Nipun Gupta wrote:

Nit: subject should be "iommu: Support ops registration for CDX bus", 
since this is no longer a driver-specific thing.

Thanks,
Robin.

> With new CDX bus supported for AMD FPGA devices on ARM
> platform, the bus requires registration for the SMMU v3
> driver.
> 
> Signed-off-by: Nipun Gupta <nipun.gupta@amd.com>
> Tested-by: Nikhil Agarwal <nikhil.agarwal@amd.com>
> ---
>   drivers/iommu/iommu.c | 4 ++++
>   1 file changed, 4 insertions(+)
> 
> diff --git a/drivers/iommu/iommu.c b/drivers/iommu/iommu.c
> index 1fbe53354532..c2ff7754a4b3 100644
> --- a/drivers/iommu/iommu.c
> +++ b/drivers/iommu/iommu.c
> @@ -28,6 +28,7 @@
>   #include <linux/fsl/mc.h>
>   #include <linux/module.h>
>   #include <linux/cc_platform.h>
> +#include <linux/cdx/cdx_bus.h>
>   #include <trace/events/iommu.h>
>   #include <linux/sched/mm.h>
>   #include <linux/msi.h>
> @@ -129,6 +130,9 @@ static struct bus_type * const iommu_buses[] = {
>   #ifdef CONFIG_TEGRA_HOST1X_CONTEXT_BUS
>   	&host1x_context_device_bus_type,
>   #endif
> +#ifdef CONFIG_CDX_BUS
> +	&cdx_bus_type,
> +#endif
>   };
>   
>   /*
  
Gupta, Nipun Feb. 22, 2023, 5:40 a.m. UTC | #2
On 2/21/2023 5:26 PM, Robin Murphy wrote:
> Caution: This message originated from an External Source. Use proper 
> caution when opening attachments, clicking links, or responding.
> 
> 
> On 2023-02-17 13:28, Nipun Gupta wrote:
> 
> Nit: subject should be "iommu: Support ops registration for CDX bus",
> since this is no longer a driver-specific thing.

Sure, will update the subject in the next spin.

Thanks,
Nipun

> 
> Thanks,
> Robin.
> 
>> With new CDX bus supported for AMD FPGA devices on ARM
>> platform, the bus requires registration for the SMMU v3
>> driver.
>>
>> Signed-off-by: Nipun Gupta <nipun.gupta@amd.com>
>> Tested-by: Nikhil Agarwal <nikhil.agarwal@amd.com>
>> ---
>>   drivers/iommu/iommu.c | 4 ++++
>>   1 file changed, 4 insertions(+)
>>
>> diff --git a/drivers/iommu/iommu.c b/drivers/iommu/iommu.c
>> index 1fbe53354532..c2ff7754a4b3 100644
>> --- a/drivers/iommu/iommu.c
>> +++ b/drivers/iommu/iommu.c
>> @@ -28,6 +28,7 @@
>>   #include <linux/fsl/mc.h>
>>   #include <linux/module.h>
>>   #include <linux/cc_platform.h>
>> +#include <linux/cdx/cdx_bus.h>
>>   #include <trace/events/iommu.h>
>>   #include <linux/sched/mm.h>
>>   #include <linux/msi.h>
>> @@ -129,6 +130,9 @@ static struct bus_type * const iommu_buses[] = {
>>   #ifdef CONFIG_TEGRA_HOST1X_CONTEXT_BUS
>>       &host1x_context_device_bus_type,
>>   #endif
>> +#ifdef CONFIG_CDX_BUS
>> +     &cdx_bus_type,
>> +#endif
>>   };
>>
>>   /*
  

Patch

diff --git a/drivers/iommu/iommu.c b/drivers/iommu/iommu.c
index 1fbe53354532..c2ff7754a4b3 100644
--- a/drivers/iommu/iommu.c
+++ b/drivers/iommu/iommu.c
@@ -28,6 +28,7 @@ 
 #include <linux/fsl/mc.h>
 #include <linux/module.h>
 #include <linux/cc_platform.h>
+#include <linux/cdx/cdx_bus.h>
 #include <trace/events/iommu.h>
 #include <linux/sched/mm.h>
 #include <linux/msi.h>
@@ -129,6 +130,9 @@  static struct bus_type * const iommu_buses[] = {
 #ifdef CONFIG_TEGRA_HOST1X_CONTEXT_BUS
 	&host1x_context_device_bus_type,
 #endif
+#ifdef CONFIG_CDX_BUS
+	&cdx_bus_type,
+#endif
 };
 
 /*