Skip to contentSkip to conversation

iommu/exynos: prevent building on big-endian kernels

PATCH Applied Arnd Bergmann 3 participants 3 messages Jul 28, 2017 – Aug 4, 2017

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 iommu/exynos: prevent building on big-endian kernels

Since we print the correct warning, an allmodconfig build is no longer clean but always prints it, which defeats compile-testing:

drivers/iommu/exynos-iommu.c:58:2: error: #warning "revisit driver if we can enable big-endian ptes" [-Werror=cpp]

This replaces the #warning with a dependency, moving warning text into a comment.

Fixes 1f59adb1766d ("iommu/exynos: Replace non-existing big-endian Kconfig option")
---
 drivers/iommu/Kconfig        | 1 +
 drivers/iommu/exynos-iommu.c | 4 ----
 2 files changed, 1 insertion(+), 4 deletions(-)
drivers/iommu/Kconfig +1 -0
index f73ff28f77e2..c5d80fe3dab9 100644
@@ -253,6 +253,7 @@ config TEGRA_IOMMU_SMMU
 config EXYNOS_IOMMU
 	bool "Exynos IOMMU Support"
 	depends on ARCH_EXYNOS && MMU
+	depends on !CPU_BIG_ENDIAN # revisit driver if we can enable big-endian ptes
 	select IOMMU_API
 	select ARM_DMA_USE_IOMMU
 	help
drivers/iommu/exynos-iommu.c +0 -4
index b7aebaf28b82..c6b69e91132b 100644
@@ -54,10 +54,6 @@ typedef u32 sysmmu_pte_t;
 #define lv2ent_small(pent) ((*(pent) & 2) == 2)
 #define lv2ent_large(pent) ((*(pent) & 3) == 1)
 
-#ifdef CONFIG_CPU_BIG_ENDIAN
-#warning "revisit driver if we can enable big-endian ptes"
-#endif
-
 /*
  * v1.x - v3.x SYSMMU supports 32bit physical and 32bit virtual address spaces
  * v5.0 introduced support for 36bit physical address space by shifting
Signature · 1 line
2.9.0
maintainer Reviewed-by on v1 1/1
#1 lore raw
Quoted 8 lines · Arnd Bergmann

Since we print the correct warning, an allmodconfig build is no longer clean but always prints it, which defeats compile-testing:

drivers/iommu/exynos-iommu.c:58:2: error: #warning "revisit driver if we can enable big-endian ptes" [-Werror=cpp]

This replaces the #warning with a dependency, moving warning text into a comment.

Quoted 7 lines
Fixes 1f59adb1766d ("iommu/exynos: Replace non-existing big-endian Kconfig option")
---
 drivers/iommu/Kconfig        | 1 +
 drivers/iommu/exynos-iommu.c | 4 ----
 2 files changed, 1 insertion(+), 4 deletions(-)

Makes sense, although there is no error to fix (for fixes tag). If there was an error, then probably the one bringing warning and wrong kconfig option (6ae5343c26f9cba5e9ef8 "iommu/exynos: update to use iommu big-endian")?

Best regards,
Krzysztof

maintainer Applied
#2 lore raw
In reply to Arnd Bergmann
Quoted 10 lines · Arnd Bergmann

Since we print the correct warning, an allmodconfig build is no longer clean but always prints it, which defeats compile-testing:

drivers/iommu/exynos-iommu.c:58:2: error: #warning "revisit driver if we can enable big-endian ptes" [-Werror=cpp]

This replaces the #warning with a dependency, moving warning text into a comment.

Fixes 1f59adb1766d ("iommu/exynos: Replace non-existing big-endian Kconfig option")

Applied, thanks.