Skip to contentSkip to conversation

MIPS: Fix duplicate instances of ARCH_SPARSEMEM_ENABLE

PATCH NAK Kevin Cernekee 2 participants 3 messages Jan 28, 2012 – Jan 30, 2012 MIPS

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 MIPS: Fix duplicate instances of ARCH_SPARSEMEM_ENABLE

"config ARCH_SPARSEMEM_ENABLE" exists in both arch/mips/Kconfig and arch/mips/cavium-octeon/Kconfig, but the dependencies are not the same. This results in warnings when a non-Cavium platform tries to select ARCH_SPARSEMEM_ENABLE:

    $ make lemote2f_defconfig ARCH=mips
    warning: (LEMOTE_FULOONG2E && LEMOTE_MACH2F) selects ARCH_SPARSEMEM_ENABLE which has unmet direct dependencies (CPU_CAVIUM_OCTEON)
    warning: (LEMOTE_FULOONG2E && LEMOTE_MACH2F) selects ARCH_SPARSEMEM_ENABLE which has unmet direct dependencies (CPU_CAVIUM_OCTEON)
    #
    # configuration written to .config
    #

Proposed workaround is to use a Cavium-specific config option which "select"s the desired options.

---
 arch/mips/cavium-octeon/Kconfig |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
arch/mips/cavium-octeon/Kconfig +2 -1
index f9e275a..eda8266 100644
@@ -82,8 +82,9 @@ config CAVIUM_OCTEON_LOCK_L2_MEMCPY
 	help
 	  Lock the kernel's implementation of memcpy() into L2.
 
-config ARCH_SPARSEMEM_ENABLE
+config CAVIUM_OCTEON_SPARSEMEM_ENABLE
 	def_bool y
+	select ARCH_SPARSEMEM_ENABLE
 	select SPARSEMEM_STATIC
 
 config IOMMU_HELPER
Signature · 1 line
1.7.6.3
#1 lore raw
Quoted 25 lines · Kevin Cernekee

"config ARCH_SPARSEMEM_ENABLE" exists in both arch/mips/Kconfig and arch/mips/cavium-octeon/Kconfig, but the dependencies are not the same. This results in warnings when a non-Cavium platform tries to select ARCH_SPARSEMEM_ENABLE:

     $ make lemote2f_defconfig ARCH=mips
     warning: (LEMOTE_FULOONG2E&&  LEMOTE_MACH2F) selects ARCH_SPARSEMEM_ENABLE which has unmet direct dependencies (CPU_CAVIUM_OCTEON)
     warning: (LEMOTE_FULOONG2E&&  LEMOTE_MACH2F) selects ARCH_SPARSEMEM_ENABLE which has unmet direct dependencies (CPU_CAVIUM_OCTEON)
     #
     # configuration written to .config
     #

Proposed workaround is to use a Cavium-specific config option which "select"s the desired options.

---
  arch/mips/cavium-octeon/Kconfig |    3 ++-
  1 files changed, 2 insertions(+), 1 deletions(-)
arch/mips/cavium-octeon/Kconfig +0 -0
index f9e275a..eda8266 100644

arch/mips/cavium-octeon/Kconfig config CAVIUM_OCTEON_LOCK_L2_MEMCPY · line 90

Quoted 10 lines
arch/mips/cavium-octeon/Kconfig +2 -1
@@ -82,8 +82,9 @@ config CAVIUM_OCTEON_LOCK_L2_MEMCPY
  	help
  	  Lock the kernel's implementation of memcpy() into L2.
 
-config ARCH_SPARSEMEM_ENABLE
+config CAVIUM_OCTEON_SPARSEMEM_ENABLE
  	def_bool y
+	select ARCH_SPARSEMEM_ENABLE
  	select SPARSEMEM_STATIC
 
  config IOMMU_HELPER

NAK!

A cleaner patch for this was already done here:

http://patchwork.linux-mips.org/patch/3285/

#2 lore raw
Quoted 5 lines · David Daney

NAK!

A cleaner patch for this was already done here:

http://patchwork.linux-mips.org/patch/3285/

This patch fixed the problem for me, but it doesn't apply cleanly to the current head of tree since the context (CAVIUM_OCTEON_HELPER) has changed.

Lluis, do you want to go ahead and submit a V2?

Thanks.