[Xen-devel,RFC,v4,7/8] xen/smmu: Add a new config define for legacy SMMU

Message ID 20171219031703.23420-8-sameer.goel@linaro.org
State Superseded
Headers show
Series
  • SMMUv3 driver
Related show

Commit Message

Sameer Goel Dec. 19, 2017, 3:17 a.m.
Add a new config item to control compilation for legacy arm SMMU.

Signed-off-by: Sameer Goel <sameer.goel@linaro.org>
---
 xen/drivers/passthrough/arm/Kconfig  | 6 ++++++
 xen/drivers/passthrough/arm/Makefile | 2 +-
 2 files changed, 7 insertions(+), 1 deletion(-)

Comments

Julien Grall Jan. 23, 2018, 3:26 p.m. | #1
Hi Sameer,

On 19/12/17 03:17, Sameer Goel wrote:
> Add a new config item to control compilation for legacy arm SMMU.
> 
> Signed-off-by: Sameer Goel <sameer.goel@linaro.org>
> ---
>   xen/drivers/passthrough/arm/Kconfig  | 6 ++++++
>   xen/drivers/passthrough/arm/Makefile | 2 +-
>   2 files changed, 7 insertions(+), 1 deletion(-)
> 
> diff --git a/xen/drivers/passthrough/arm/Kconfig b/xen/drivers/passthrough/arm/Kconfig
> index cda899f608..597f58f10b 100644
> --- a/xen/drivers/passthrough/arm/Kconfig
> +++ b/xen/drivers/passthrough/arm/Kconfig
> @@ -6,3 +6,9 @@ config ARM_SMMU_v3
>   	 Support for implementations of the ARM System MMU architecture
>   	 version 3.
>   
> +config ARM_SMMU
> +	bool "ARM Legacy SMMU Support"
> +	depends on (ARM_64 || ARM)

ARM_64 will select ARM. So ARM is enough here.

Cheers,

> +	help
> +	 Support for implementations of the ARM System MMU architecture
> +	 version 1 and 2.
> diff --git a/xen/drivers/passthrough/arm/Makefile b/xen/drivers/passthrough/arm/Makefile
> index e14732b55c..5b3eb1545e 100644
> --- a/xen/drivers/passthrough/arm/Makefile
> +++ b/xen/drivers/passthrough/arm/Makefile
> @@ -1,3 +1,3 @@
>   obj-y += iommu.o
> -obj-y += smmu.o
> +obj-$(CONFIG_ARM_SMMU) += smmu.o
>   obj-$(CONFIG_ARM_SMMU_v3) += smmu-v3.o
>

Patch

diff --git a/xen/drivers/passthrough/arm/Kconfig b/xen/drivers/passthrough/arm/Kconfig
index cda899f608..597f58f10b 100644
--- a/xen/drivers/passthrough/arm/Kconfig
+++ b/xen/drivers/passthrough/arm/Kconfig
@@ -6,3 +6,9 @@  config ARM_SMMU_v3
 	 Support for implementations of the ARM System MMU architecture
 	 version 3.
 
+config ARM_SMMU
+	bool "ARM Legacy SMMU Support"
+	depends on (ARM_64 || ARM)
+	help
+	 Support for implementations of the ARM System MMU architecture
+	 version 1 and 2.
diff --git a/xen/drivers/passthrough/arm/Makefile b/xen/drivers/passthrough/arm/Makefile
index e14732b55c..5b3eb1545e 100644
--- a/xen/drivers/passthrough/arm/Makefile
+++ b/xen/drivers/passthrough/arm/Makefile
@@ -1,3 +1,3 @@ 
 obj-y += iommu.o
-obj-y += smmu.o
+obj-$(CONFIG_ARM_SMMU) += smmu.o
 obj-$(CONFIG_ARM_SMMU_v3) += smmu-v3.o