diff mbox series

[Xen-devel,v2,6/6] xen/smmu: Add a new config define for legacy SMMU

Message ID 20180524004620.23828-7-sameer.goel@linaro.org
State Superseded
Headers show
Series SMMUv3 driver | expand

Commit Message

Sameer Goel May 24, 2018, 12:46 a.m. UTC
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

Jan Beulich May 24, 2018, 7:59 a.m. UTC | #1
>>> On 24.05.18 at 02:46, <sameer.goel@linaro.org> wrote:
> --- 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

Same question as to Stefano the other day: What use if iommu.o when both
config options are off?

Jan
Julien Grall May 24, 2018, 8:52 a.m. UTC | #2
Hi Jan,

On 24/05/18 08:59, Jan Beulich wrote:
>>>> On 24.05.18 at 02:46, <sameer.goel@linaro.org> wrote:
>> --- 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
> 
> Same question as to Stefano the other day: What use if iommu.o when both
> config options are off?

The answer has not changed here. So I will just copy his answer:

"Things like iommu_domain_init are called unconditionally from ARM code
at the moment, it is not quite possible to skip compilation today. Also,
it is small, so it is not worth it I think."

Cheers,

> 
> Jan
> 
>
diff mbox series

Patch

diff --git a/xen/drivers/passthrough/arm/Kconfig b/xen/drivers/passthrough/arm/Kconfig
index cda899f608..e888a78312 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
+	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