Эх сурвалжийг харах

sh: Plug in support for ARCH=sh64 using sh SRCARCH.

This adds in support for building with ARCH=sh64 using the sh SRCARCH.
This tidies up the randconfig generation somewhat to make sure that we
don't end up with impossible configurations, and without having to rely
on things like KCONFIG_ALLCONFIG to detect the proper CPU support subset.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Paul Mundt 16 жил өмнө
parent
commit
3cc000b583
2 өөрчлөгдсөн 21 нэмэгдсэн , 3 устгасан
  1. 6 1
      Makefile
  2. 15 2
      arch/sh/Kconfig

+ 6 - 1
Makefile

@@ -169,7 +169,7 @@ SUBARCH := $(shell uname -m | sed -e s/i.86/i386/ -e s/sun4u/sparc64/ \
 				  -e s/arm.*/arm/ -e s/sa110/arm/ \
 				  -e s/arm.*/arm/ -e s/sa110/arm/ \
 				  -e s/s390x/s390/ -e s/parisc64/parisc/ \
 				  -e s/s390x/s390/ -e s/parisc64/parisc/ \
 				  -e s/ppc.*/powerpc/ -e s/mips.*/mips/ \
 				  -e s/ppc.*/powerpc/ -e s/mips.*/mips/ \
-				  -e s/sh.*/sh/ )
+				  -e s/sh[234].*/sh/ )
 
 
 # Cross compiling and selecting different set of gcc/bin-utils
 # Cross compiling and selecting different set of gcc/bin-utils
 # ---------------------------------------------------------------------------
 # ---------------------------------------------------------------------------
@@ -210,6 +210,11 @@ ifeq ($(ARCH),sparc64)
        SRCARCH := sparc
        SRCARCH := sparc
 endif
 endif
 
 
+# Additional ARCH settings for sh
+ifeq ($(ARCH),sh64)
+       SRCARCH := sh
+endif
+
 # Where to locate arch specific headers
 # Where to locate arch specific headers
 hdr-arch  := $(SRCARCH)
 hdr-arch  := $(SRCARCH)
 
 

+ 15 - 2
arch/sh/Kconfig

@@ -22,7 +22,7 @@ config SUPERH
 	  <http://www.linux-sh.org/>.
 	  <http://www.linux-sh.org/>.
 
 
 config SUPERH32
 config SUPERH32
-	def_bool !SUPERH64
+	def_bool ARCH = "sh"
 	select HAVE_KPROBES
 	select HAVE_KPROBES
 	select HAVE_KRETPROBES
 	select HAVE_KRETPROBES
 	select HAVE_FUNCTION_TRACER
 	select HAVE_FUNCTION_TRACER
@@ -32,7 +32,7 @@ config SUPERH32
 	select ARCH_HIBERNATION_POSSIBLE if MMU
 	select ARCH_HIBERNATION_POSSIBLE if MMU
 
 
 config SUPERH64
 config SUPERH64
-	def_bool y if CPU_SH5
+	def_bool ARCH = "sh64"
 
 
 config ARCH_DEFCONFIG
 config ARCH_DEFCONFIG
 	string
 	string
@@ -188,6 +188,8 @@ config ARCH_SHMOBILE
 	bool
 	bool
 	select ARCH_SUSPEND_POSSIBLE
 	select ARCH_SUSPEND_POSSIBLE
 
 
+if SUPERH32
+
 choice
 choice
 	prompt "Processor sub-type selection"
 	prompt "Processor sub-type selection"
 
 
@@ -409,6 +411,15 @@ config CPU_SUBTYPE_SH7366
 	select SYS_SUPPORTS_NUMA
 	select SYS_SUPPORTS_NUMA
 	select SYS_SUPPORTS_CMT
 	select SYS_SUPPORTS_CMT
 
 
+endchoice
+
+endif
+
+if SUPERH64
+
+choice
+	prompt "Processor sub-type selection"
+
 # SH-5 Processor Support
 # SH-5 Processor Support
 
 
 config CPU_SUBTYPE_SH5_101
 config CPU_SUBTYPE_SH5_101
@@ -421,6 +432,8 @@ config CPU_SUBTYPE_SH5_103
 
 
 endchoice
 endchoice
 
 
+endif
+
 source "arch/sh/mm/Kconfig"
 source "arch/sh/mm/Kconfig"
  
  
 source "arch/sh/Kconfig.cpu"
 source "arch/sh/Kconfig.cpu"