@@ -4,6 +4,7 @@ config MIPS
44 default y
55 select ARCH_32BIT_OFF_T if !64BIT
66 select ARCH_BINFMT_ELF_STATE if MIPS_FP_SUPPORT
7+ select ARCH_HAS_CURRENT_STACK_POINTER if !CC_IS_CLANG || CLANG_VERSION >= 140000
78 select ARCH_HAS_DEBUG_VIRTUAL if !64BIT
89 select ARCH_HAS_FORTIFY_SOURCE
910 select ARCH_HAS_KCOV
@@ -101,6 +102,7 @@ config MIPS
101102 select TRACE_IRQFLAGS_SUPPORT
102103 select VIRT_TO_BUS
103104 select ARCH_HAS_ELFCORE_COMPAT
105+ select HAVE_ARCH_KCSAN if 64BIT
104106
105107config MIPS_FIXUP_BIGPHYS_ADDR
106108 bool
@@ -511,6 +513,7 @@ config MACH_LOONGSON64
511513 select USE_OF
512514 select BUILTIN_DTB
513515 select PCI_HOST_GENERIC
516+ select HAVE_ARCH_NODEDATA_EXTENSION if NUMA
514517 help
515518 This enables the support of Loongson-2/3 family of machines.
516519
@@ -707,6 +710,7 @@ config SGI_IP27
707710 select WAR_R10000_LLSC
708711 select MIPS_L1_CACHE_SHIFT_7
709712 select NUMA
713+ select HAVE_ARCH_NODEDATA_EXTENSION
710714 help
711715 This are the SGI Origin 200, Origin 2000 and Onyx 2 Graphics
712716 workstations. To compile a Linux kernel that runs on these, say Y
@@ -926,9 +930,6 @@ config SNI_RM
926930 Technology and now in turn merged with Fujitsu. Say Y here to
927931 support this machine type.
928932
929- config MACH_TX39XX
930- bool "Toshiba TX39 series based machines"
931-
932933config MACH_TX49XX
933934 bool "Toshiba TX49 series based machines"
934935 select WAR_TX49XX_ICACHE_INDEX_INV
@@ -1343,19 +1344,14 @@ config LOONGSON3_ENHANCEMENT
13431344 new Loongson-3 machines only, please say 'Y' here.
13441345
13451346config CPU_LOONGSON3_WORKAROUNDS
1346- bool "Old Loongson-3 LLSC Workarounds"
1347+ bool "Loongson-3 LLSC Workarounds"
13471348 default y if SMP
13481349 depends on CPU_LOONGSON64
13491350 help
13501351 Loongson-3 processors have the llsc issues which require workarounds.
13511352 Without workarounds the system may hang unexpectedly.
13521353
1353- Newer Loongson-3 will fix these issues and no workarounds are needed.
1354- The workarounds have no significant side effect on them but may
1355- decrease the performance of the system so this option should be
1356- disabled unless the kernel is intended to be run on old systems.
1357-
1358- If unsure, please say Y.
1354+ Say Y, unless you know what you are doing.
13591355
13601356config CPU_LOONGSON3_CPUCFG_EMULATION
13611357 bool "Emulate the CPUCFG instruction on older Loongson cores"
@@ -1583,12 +1579,6 @@ config CPU_R3000
15831579 might be a safe bet. If the resulting kernel does not work,
15841580 try to recompile with R3000.
15851581
1586- config CPU_TX39XX
1587- bool "R39XX"
1588- depends on SYS_HAS_CPU_TX39XX
1589- select CPU_SUPPORTS_32BIT_KERNEL
1590- select CPU_R3K_TLB
1591-
15921582config CPU_VR41XX
15931583 bool "R41xx"
15941584 depends on SYS_HAS_CPU_VR41XX
@@ -1915,9 +1905,6 @@ config SYS_HAS_CPU_P5600
19151905config SYS_HAS_CPU_R3000
19161906 bool
19171907
1918- config SYS_HAS_CPU_TX39XX
1919- bool
1920-
19211908config SYS_HAS_CPU_VR41XX
19221909 bool
19231910
@@ -2148,7 +2135,7 @@ config PAGE_SIZE_8KB
21482135
21492136config PAGE_SIZE_16KB
21502137 bool "16kB"
2151- depends on !CPU_R3000 && !CPU_TX39XX
2138+ depends on !CPU_R3000
21522139 help
21532140 Using 16kB page size will result in higher performance kernel at
21542141 the price of higher memory consumption. This option is available on
@@ -2167,7 +2154,7 @@ config PAGE_SIZE_32KB
21672154
21682155config PAGE_SIZE_64KB
21692156 bool "64kB"
2170- depends on !CPU_R3000 && !CPU_TX39XX
2157+ depends on !CPU_R3000
21712158 help
21722159 Using 64kB page size will result in higher performance kernel at
21732160 the price of higher memory consumption. This option is available on
@@ -2235,7 +2222,7 @@ config CPU_HAS_PREFETCH
22352222
22362223config CPU_GENERIC_DUMP_TLB
22372224 bool
2238- default y if !( CPU_R3000 || CPU_TX39XX)
2225+ default y if !CPU_R3000
22392226
22402227config MIPS_FP_SUPPORT
22412228 bool "Floating Point support" if EXPERT
@@ -2255,7 +2242,7 @@ config MIPS_FP_SUPPORT
22552242config CPU_R2300_FPU
22562243 bool
22572244 depends on MIPS_FP_SUPPORT
2258- default y if CPU_R3000 || CPU_TX39XX
2245+ default y if CPU_R3000
22592246
22602247config CPU_R3K_TLB
22612248 bool
@@ -2520,13 +2507,51 @@ config CPU_HAS_SYNC
25202507#
25212508# CPU non-features
25222509#
2510+
2511+ # Work around the "daddi" and "daddiu" CPU errata:
2512+ #
2513+ # - The `daddi' instruction fails to trap on overflow.
2514+ # "MIPS R4000PC/SC Errata, Processor Revision 2.2 and 3.0",
2515+ # erratum #23
2516+ #
2517+ # - The `daddiu' instruction can produce an incorrect result.
2518+ # "MIPS R4000PC/SC Errata, Processor Revision 2.2 and 3.0",
2519+ # erratum #41
2520+ # "MIPS R4000MC Errata, Processor Revision 2.2 and 3.0", erratum
2521+ # #15
2522+ # "MIPS R4400PC/SC Errata, Processor Revision 1.0", erratum #7
2523+ # "MIPS R4400MC Errata, Processor Revision 1.0", erratum #5
25232524config CPU_DADDI_WORKAROUNDS
25242525 bool
25252526
2527+ # Work around certain R4000 CPU errata (as implemented by GCC):
2528+ #
2529+ # - A double-word or a variable shift may give an incorrect result
2530+ # if executed immediately after starting an integer division:
2531+ # "MIPS R4000PC/SC Errata, Processor Revision 2.2 and 3.0",
2532+ # erratum #28
2533+ # "MIPS R4000MC Errata, Processor Revision 2.2 and 3.0", erratum
2534+ # #19
2535+ #
2536+ # - A double-word or a variable shift may give an incorrect result
2537+ # if executed while an integer multiplication is in progress:
2538+ # "MIPS R4000PC/SC Errata, Processor Revision 2.2 and 3.0",
2539+ # errata #16 & #28
2540+ #
2541+ # - An integer division may give an incorrect result if started in
2542+ # a delay slot of a taken branch or a jump:
2543+ # "MIPS R4000PC/SC Errata, Processor Revision 2.2 and 3.0",
2544+ # erratum #52
25262545config CPU_R4000_WORKAROUNDS
25272546 bool
25282547 select CPU_R4400_WORKAROUNDS
25292548
2549+ # Work around certain R4400 CPU errata (as implemented by GCC):
2550+ #
2551+ # - A double-word or a variable shift may give an incorrect result
2552+ # if executed immediately after starting an integer division:
2553+ # "MIPS R4400MC Errata, Processor Revision 1.0", erratum #10
2554+ # "MIPS R4400MC Errata, Processor Revision 2.0 & 3.0", erratum #4
25302555config CPU_R4400_WORKAROUNDS
25312556 bool
25322557
@@ -2536,13 +2561,13 @@ config CPU_R4X00_BUGS64
25362561
25372562config MIPS_ASID_SHIFT
25382563 int
2539- default 6 if CPU_R3000 || CPU_TX39XX
2564+ default 6 if CPU_R3000
25402565 default 0
25412566
25422567config MIPS_ASID_BITS
25432568 int
25442569 default 0 if MIPS_ASID_BITS_VARIABLE
2545- default 6 if CPU_R3000 || CPU_TX39XX
2570+ default 6 if CPU_R3000
25462571 default 8
25472572
25482573config MIPS_ASID_BITS_VARIABLE
@@ -2685,6 +2710,9 @@ config NUMA
26852710config SYS_SUPPORTS_NUMA
26862711 bool
26872712
2713+ config HAVE_ARCH_NODEDATA_EXTENSION
2714+ bool
2715+
26882716config RELOCATABLE
26892717 bool "Relocatable kernel"
26902718 depends on SYS_SUPPORTS_RELOCATABLE
@@ -3202,6 +3230,10 @@ config MIPS32_N32
32023230
32033231 If unsure, say N.
32043232
3233+ config CC_HAS_MNO_BRANCH_LIKELY
3234+ def_bool y
3235+ depends on $(cc-option,-mno-branch-likely)
3236+
32053237menu "Power management options"
32063238
32073239config ARCH_HIBERNATION_POSSIBLE
0 commit comments