diff options
author | Ralf Baechle <ralf@linux-mips.org> | 2014-04-28 19:49:24 -0400 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2014-05-23 09:12:37 -0400 |
commit | 377cb1b6c16a17e2560a9288f9c8ed5dcdbeba39 (patch) | |
tree | 90d60a8ccc380a330ebceb21dfcc0abbeb4b0a39 /arch | |
parent | e0cc3a42eb50593a50e2b99d9dc92b4279f2efda (diff) |
MIPS: Disable MIPS16/microMIPS crap for platforms not supporting these ASEs.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/mips/Kconfig | 17 | ||||
-rw-r--r-- | arch/mips/include/asm/mipsregs.h | 9 | ||||
-rw-r--r-- | arch/mips/loongson1/Kconfig | 1 |
3 files changed, 26 insertions, 1 deletions
diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig index 5cd695f905a1..45e75b6173b5 100644 --- a/arch/mips/Kconfig +++ b/arch/mips/Kconfig | |||
@@ -83,6 +83,7 @@ config AR7 | |||
83 | select SYS_HAS_EARLY_PRINTK | 83 | select SYS_HAS_EARLY_PRINTK |
84 | select SYS_SUPPORTS_32BIT_KERNEL | 84 | select SYS_SUPPORTS_32BIT_KERNEL |
85 | select SYS_SUPPORTS_LITTLE_ENDIAN | 85 | select SYS_SUPPORTS_LITTLE_ENDIAN |
86 | select SYS_SUPPORTS_MIPS16 | ||
86 | select SYS_SUPPORTS_ZBOOT_UART16550 | 87 | select SYS_SUPPORTS_ZBOOT_UART16550 |
87 | select ARCH_REQUIRE_GPIOLIB | 88 | select ARCH_REQUIRE_GPIOLIB |
88 | select VLYNQ | 89 | select VLYNQ |
@@ -106,6 +107,7 @@ config ATH79 | |||
106 | select SYS_HAS_EARLY_PRINTK | 107 | select SYS_HAS_EARLY_PRINTK |
107 | select SYS_SUPPORTS_32BIT_KERNEL | 108 | select SYS_SUPPORTS_32BIT_KERNEL |
108 | select SYS_SUPPORTS_BIG_ENDIAN | 109 | select SYS_SUPPORTS_BIG_ENDIAN |
110 | select SYS_SUPPORTS_MIPS16 | ||
109 | help | 111 | help |
110 | Support for the Atheros AR71XX/AR724X/AR913X SoCs. | 112 | Support for the Atheros AR71XX/AR724X/AR913X SoCs. |
111 | 113 | ||
@@ -122,6 +124,7 @@ config BCM47XX | |||
122 | select NO_EXCEPT_FILL | 124 | select NO_EXCEPT_FILL |
123 | select SYS_SUPPORTS_32BIT_KERNEL | 125 | select SYS_SUPPORTS_32BIT_KERNEL |
124 | select SYS_SUPPORTS_LITTLE_ENDIAN | 126 | select SYS_SUPPORTS_LITTLE_ENDIAN |
127 | select SYS_SUPPORTS_MIPS16 | ||
125 | select SYS_HAS_EARLY_PRINTK | 128 | select SYS_HAS_EARLY_PRINTK |
126 | select USE_GENERIC_EARLY_PRINTK_8250 | 129 | select USE_GENERIC_EARLY_PRINTK_8250 |
127 | help | 130 | help |
@@ -248,6 +251,7 @@ config LANTIQ | |||
248 | select SYS_HAS_CPU_MIPS32_R2 | 251 | select SYS_HAS_CPU_MIPS32_R2 |
249 | select SYS_SUPPORTS_BIG_ENDIAN | 252 | select SYS_SUPPORTS_BIG_ENDIAN |
250 | select SYS_SUPPORTS_32BIT_KERNEL | 253 | select SYS_SUPPORTS_32BIT_KERNEL |
254 | select SYS_SUPPORTS_MIPS16 | ||
251 | select SYS_SUPPORTS_MULTITHREADING | 255 | select SYS_SUPPORTS_MULTITHREADING |
252 | select SYS_HAS_EARLY_PRINTK | 256 | select SYS_HAS_EARLY_PRINTK |
253 | select ARCH_REQUIRE_GPIOLIB | 257 | select ARCH_REQUIRE_GPIOLIB |
@@ -330,6 +334,7 @@ config MIPS_MALTA | |||
330 | select SYS_SUPPORTS_LITTLE_ENDIAN | 334 | select SYS_SUPPORTS_LITTLE_ENDIAN |
331 | select SYS_SUPPORTS_MIPS_CMP | 335 | select SYS_SUPPORTS_MIPS_CMP |
332 | select SYS_SUPPORTS_MIPS_CPS | 336 | select SYS_SUPPORTS_MIPS_CPS |
337 | select SYS_SUPPORTS_MIPS16 | ||
333 | select SYS_SUPPORTS_MULTITHREADING | 338 | select SYS_SUPPORTS_MULTITHREADING |
334 | select SYS_SUPPORTS_SMARTMIPS | 339 | select SYS_SUPPORTS_SMARTMIPS |
335 | select SYS_SUPPORTS_ZBOOT | 340 | select SYS_SUPPORTS_ZBOOT |
@@ -361,6 +366,7 @@ config MIPS_SEAD3 | |||
361 | select SYS_SUPPORTS_LITTLE_ENDIAN | 366 | select SYS_SUPPORTS_LITTLE_ENDIAN |
362 | select SYS_SUPPORTS_SMARTMIPS | 367 | select SYS_SUPPORTS_SMARTMIPS |
363 | select SYS_SUPPORTS_MICROMIPS | 368 | select SYS_SUPPORTS_MICROMIPS |
369 | select SYS_SUPPORTS_MIPS16 | ||
364 | select USB_EHCI_BIG_ENDIAN_DESC | 370 | select USB_EHCI_BIG_ENDIAN_DESC |
365 | select USB_EHCI_BIG_ENDIAN_MMIO | 371 | select USB_EHCI_BIG_ENDIAN_MMIO |
366 | select USE_OF | 372 | select USE_OF |
@@ -380,6 +386,7 @@ config MACH_VR41XX | |||
380 | select CEVT_R4K | 386 | select CEVT_R4K |
381 | select CSRC_R4K | 387 | select CSRC_R4K |
382 | select SYS_HAS_CPU_VR41XX | 388 | select SYS_HAS_CPU_VR41XX |
389 | select SYS_SUPPORTS_MIPS16 | ||
383 | select ARCH_REQUIRE_GPIOLIB | 390 | select ARCH_REQUIRE_GPIOLIB |
384 | 391 | ||
385 | config NXP_STB220 | 392 | config NXP_STB220 |
@@ -407,6 +414,7 @@ config PMC_MSP | |||
407 | select SYS_HAS_CPU_MIPS32_R2 | 414 | select SYS_HAS_CPU_MIPS32_R2 |
408 | select SYS_SUPPORTS_32BIT_KERNEL | 415 | select SYS_SUPPORTS_32BIT_KERNEL |
409 | select SYS_SUPPORTS_BIG_ENDIAN | 416 | select SYS_SUPPORTS_BIG_ENDIAN |
417 | select SYS_SUPPORTS_MIPS16 | ||
410 | select IRQ_CPU | 418 | select IRQ_CPU |
411 | select SERIAL_8250 | 419 | select SERIAL_8250 |
412 | select SERIAL_8250_CONSOLE | 420 | select SERIAL_8250_CONSOLE |
@@ -430,6 +438,7 @@ config RALINK | |||
430 | select SYS_HAS_CPU_MIPS32_R2 | 438 | select SYS_HAS_CPU_MIPS32_R2 |
431 | select SYS_SUPPORTS_32BIT_KERNEL | 439 | select SYS_SUPPORTS_32BIT_KERNEL |
432 | select SYS_SUPPORTS_LITTLE_ENDIAN | 440 | select SYS_SUPPORTS_LITTLE_ENDIAN |
441 | select SYS_SUPPORTS_MIPS16 | ||
433 | select SYS_HAS_EARLY_PRINTK | 442 | select SYS_HAS_EARLY_PRINTK |
434 | select HAVE_MACH_CLKDEV | 443 | select HAVE_MACH_CLKDEV |
435 | select CLKDEV_LOOKUP | 444 | select CLKDEV_LOOKUP |
@@ -1059,6 +1068,7 @@ config SOC_PNX833X | |||
1059 | select SYS_SUPPORTS_32BIT_KERNEL | 1068 | select SYS_SUPPORTS_32BIT_KERNEL |
1060 | select SYS_SUPPORTS_LITTLE_ENDIAN | 1069 | select SYS_SUPPORTS_LITTLE_ENDIAN |
1061 | select SYS_SUPPORTS_BIG_ENDIAN | 1070 | select SYS_SUPPORTS_BIG_ENDIAN |
1071 | select SYS_SUPPORTS_MIPS16 | ||
1062 | select CPU_MIPSR2_IRQ_VI | 1072 | select CPU_MIPSR2_IRQ_VI |
1063 | 1073 | ||
1064 | config SOC_PNX8335 | 1074 | config SOC_PNX8335 |
@@ -2199,6 +2209,13 @@ config SYS_SUPPORTS_SMARTMIPS | |||
2199 | config SYS_SUPPORTS_MICROMIPS | 2209 | config SYS_SUPPORTS_MICROMIPS |
2200 | bool | 2210 | bool |
2201 | 2211 | ||
2212 | config SYS_SUPPORTS_MIPS16 | ||
2213 | bool | ||
2214 | help | ||
2215 | This option must be set if a kernel might be executed on a MIPS16- | ||
2216 | enabled CPU even if MIPS16 is not actually being used. In other | ||
2217 | words, it makes the kernel MIPS16-tolerant. | ||
2218 | |||
2202 | config CPU_SUPPORTS_MSA | 2219 | config CPU_SUPPORTS_MSA |
2203 | bool | 2220 | bool |
2204 | 2221 | ||
diff --git a/arch/mips/include/asm/mipsregs.h b/arch/mips/include/asm/mipsregs.h index 3e025b5311db..88e30d5022b3 100644 --- a/arch/mips/include/asm/mipsregs.h +++ b/arch/mips/include/asm/mipsregs.h | |||
@@ -709,11 +709,18 @@ | |||
709 | #ifndef __ASSEMBLY__ | 709 | #ifndef __ASSEMBLY__ |
710 | 710 | ||
711 | /* | 711 | /* |
712 | * Macros for handling the ISA mode bit for microMIPS. | 712 | * Macros for handling the ISA mode bit for MIPS16 and microMIPS. |
713 | */ | 713 | */ |
714 | #if defined(CONFIG_SYS_SUPPORTS_MIPS16) || \ | ||
715 | defined(CONFIG_SYS_SUPPORTS_MICROMIPS) | ||
714 | #define get_isa16_mode(x) ((x) & 0x1) | 716 | #define get_isa16_mode(x) ((x) & 0x1) |
715 | #define msk_isa16_mode(x) ((x) & ~0x1) | 717 | #define msk_isa16_mode(x) ((x) & ~0x1) |
716 | #define set_isa16_mode(x) do { (x) |= 0x1; } while(0) | 718 | #define set_isa16_mode(x) do { (x) |= 0x1; } while(0) |
719 | #else | ||
720 | #define get_isa16_mode(x) 0 | ||
721 | #define msk_isa16_mode(x) (x) | ||
722 | #define set_isa16_mode(x) do { } while(0) | ||
723 | #endif | ||
717 | 724 | ||
718 | /* | 725 | /* |
719 | * microMIPS instructions can be 16-bit or 32-bit in length. This | 726 | * microMIPS instructions can be 16-bit or 32-bit in length. This |
diff --git a/arch/mips/loongson1/Kconfig b/arch/mips/loongson1/Kconfig index fbf75f635798..e23c25d09963 100644 --- a/arch/mips/loongson1/Kconfig +++ b/arch/mips/loongson1/Kconfig | |||
@@ -14,6 +14,7 @@ config LOONGSON1_LS1B | |||
14 | select SYS_SUPPORTS_32BIT_KERNEL | 14 | select SYS_SUPPORTS_32BIT_KERNEL |
15 | select SYS_SUPPORTS_LITTLE_ENDIAN | 15 | select SYS_SUPPORTS_LITTLE_ENDIAN |
16 | select SYS_SUPPORTS_HIGHMEM | 16 | select SYS_SUPPORTS_HIGHMEM |
17 | select SYS_SUPPORTS_MIPS16 | ||
17 | select SYS_HAS_EARLY_PRINTK | 18 | select SYS_HAS_EARLY_PRINTK |
18 | select COMMON_CLK | 19 | select COMMON_CLK |
19 | 20 | ||