Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Hexagon: change arch version config to allow comparisons

Signed-off-by: Richard Kuo <rkuo@codeaurora.org>

+10 -31
+4 -14
arch/hexagon/Kconfig
··· 33 33 Qualcomm Hexagon is a processor architecture designed for high 34 34 performance and low power across a wide variety of applications. 35 35 36 - 37 - config HEXAGON_ARCH_V1 38 - bool 39 - 40 - config HEXAGON_ARCH_V2 41 - bool 42 - 43 - config HEXAGON_ARCH_V3 44 - bool 45 - 46 - config HEXAGON_ARCH_V4 47 - bool 48 - 49 36 config HEXAGON_PHYS_OFFSET 50 37 def_bool y 51 38 ---help--- ··· 96 109 97 110 config HEXAGON_COMET 98 111 bool "Comet Board" 99 - select HEXAGON_ARCH_V2 100 112 ---help--- 101 113 Support for the Comet platform. 102 114 103 115 endchoice 116 + 117 + config HEXAGON_ARCH_VERSION 118 + int "Architecture version" 119 + default 2 104 120 105 121 config HEXAGON_VM 106 122 def_bool y
+3 -14
arch/hexagon/Makefile
··· 15 15 # LDFLAGS_MODULE += -shared 16 16 CFLAGS_MODULE += -mlong-calls 17 17 18 - cflags-$(CONFIG_HEXAGON_ARCH_V1) += $(call cc-option,-mv1) 19 - cflags-$(CONFIG_HEXAGON_ARCH_V2) += $(call cc-option,-mv2) 20 - cflags-$(CONFIG_HEXAGON_ARCH_V3) += $(call cc-option,-mv3) 21 - cflags-$(CONFIG_HEXAGON_ARCH_V4) += $(call cc-option,-mv4) 22 - 23 - aflags-$(CONFIG_HEXAGON_ARCH_V1) += $(call cc-option,-mv1) 24 - aflags-$(CONFIG_HEXAGON_ARCH_V2) += $(call cc-option,-mv2) 25 - aflags-$(CONFIG_HEXAGON_ARCH_V3) += $(call cc-option,-mv3) 26 - aflags-$(CONFIG_HEXAGON_ARCH_V4) += $(call cc-option,-mv4) 27 - 28 - ldflags-$(CONFIG_HEXAGON_ARCH_V1) += $(call cc-option,-mv1) 29 - ldflags-$(CONFIG_HEXAGON_ARCH_V2) += $(call cc-option,-mv2) 30 - ldflags-$(CONFIG_HEXAGON_ARCH_V3) += $(call cc-option,-mv3) 31 - ldflags-$(CONFIG_HEXAGON_ARCH_V4) += $(call cc-option,-mv4) 18 + cflags-y += $(call cc-option,-mv${CONFIG_HEXAGON_ARCH_VERSION}) 19 + aflags-y += $(call cc-option,-mv${CONFIG_HEXAGON_ARCH_VERSION}) 20 + ldflags-y += $(call cc-option,-mv${CONFIG_HEXAGON_ARCH_VERSION}) 32 21 33 22 KBUILD_CFLAGS += $(cflags-y) 34 23 KBUILD_AFLAGS += $(aflags-y)
+3 -3
arch/hexagon/include/asm/elf.h
··· 168 168 #define ELF_DATA ELFDATA2LSB 169 169 #define ELF_ARCH EM_HEXAGON 170 170 171 - #ifdef CONFIG_HEXAGON_ARCH_V2 171 + #if CONFIG_HEXAGON_ARCH_VERSION == 2 172 172 #define ELF_CORE_EFLAGS 0x1 173 173 #endif 174 174 175 - #ifdef CONFIG_HEXAGON_ARCH_V3 175 + #if CONFIG_HEXAGON_ARCH_VERSION == 3 176 176 #define ELF_CORE_EFLAGS 0x2 177 177 #endif 178 178 179 - #ifdef CONFIG_HEXAGON_ARCH_V4 179 + #if CONFIG_HEXAGON_ARCH_VERSION == 4 180 180 #define ELF_CORE_EFLAGS 0x3 181 181 #endif 182 182