xref: /linux/arch/mips/Kconfig (revision 570f7e331f5febb30f1384817463c7e42b65ca7d)
1# SPDX-License-Identifier: GPL-2.0
2config MIPS
3	bool
4	default y
5	select ARCH_32BIT_OFF_T if !64BIT
6	select ARCH_BINFMT_ELF_STATE if MIPS_FP_SUPPORT
7	select ARCH_HAS_CC_CAN_LINK
8	select ARCH_HAS_CPU_CACHE_ALIASING
9	select ARCH_HAS_CPU_FINALIZE_INIT
10	select ARCH_HAS_CURRENT_STACK_POINTER
11	select ARCH_HAS_DEBUG_VIRTUAL if !64BIT
12	select ARCH_HAS_DMA_OPS if MACH_JAZZ
13	select ARCH_HAS_FORTIFY_SOURCE
14	select ARCH_HAS_KCOV
15	select ARCH_HAS_NON_OVERLAPPING_ADDRESS_SPACE if !EVA
16	select ARCH_HAS_PTE_SPECIAL if !(32BIT && CPU_HAS_RIXI)
17	select ARCH_HAS_STRNCPY_FROM_USER
18	select ARCH_HAS_STRNLEN_USER
19	select ARCH_HAS_TICK_BROADCAST if GENERIC_CLOCKEVENTS_BROADCAST
20	select ARCH_HAS_UBSAN
21	select ARCH_HAS_GCOV_PROFILE_ALL
22	select ARCH_KEEP_MEMBLOCK
23	select ARCH_USE_BUILTIN_BSWAP
24	select ARCH_USE_CMPXCHG_LOCKREF if 64BIT
25	select ARCH_USE_MEMTEST
26	select ARCH_USE_QUEUED_RWLOCKS
27	select ARCH_USE_QUEUED_SPINLOCKS
28	select ARCH_SUPPORTS_HUGETLBFS if CPU_SUPPORTS_HUGEPAGES
29	select ARCH_WANT_DEFAULT_TOPDOWN_MMAP_LAYOUT if MMU
30	select ARCH_WANT_IPC_PARSE_VERSION
31	select ARCH_WANT_LD_ORPHAN_WARN
32	select BUILDTIME_TABLE_SORT
33	select BUILTIN_DTB_ALL if BUILTIN_DTB
34	select CLONE_BACKWARDS
35	select CPU_NO_EFFICIENT_FFS if (TARGET_ISA_REV < 1)
36	select CPU_PM if CPU_IDLE || SUSPEND
37	select GENERIC_ATOMIC64 if !64BIT
38	select GENERIC_BUILTIN_DTB if BUILTIN_DTB
39	select GENERIC_CMOS_UPDATE
40	select GENERIC_CPU_AUTOPROBE
41	select GENERIC_IRQ_PROBE
42	select GENERIC_IRQ_SHOW
43	select GENERIC_ISA_DMA if EISA
44	select GENERIC_LIB_ASHLDI3
45	select GENERIC_LIB_ASHRDI3
46	select GENERIC_LIB_CMPDI2
47	select GENERIC_LIB_LSHRDI3
48	select GENERIC_LIB_UCMPDI2
49	select GENERIC_PCI_IOMAP
50	select GENERIC_SCHED_CLOCK if !CAVIUM_OCTEON_SOC
51	select GENERIC_SMP_IDLE_THREAD
52	select GENERIC_IDLE_POLL_SETUP
53	select GUP_GET_PXX_LOW_HIGH if CPU_MIPS32 && PHYS_ADDR_T_64BIT
54	select HAS_IOPORT if !NO_IOPORT_MAP || ISA
55	select HAVE_ARCH_COMPILER_H
56	select HAVE_ARCH_JUMP_LABEL
57	select HAVE_ARCH_KGDB if MIPS_FP_SUPPORT
58	select HAVE_ARCH_MMAP_RND_BITS if MMU
59	select HAVE_ARCH_MMAP_RND_COMPAT_BITS if MMU && COMPAT
60	select HAVE_ARCH_SECCOMP_FILTER
61	select HAVE_ARCH_TRACEHOOK
62	select HAVE_ARCH_TRANSPARENT_HUGEPAGE if CPU_SUPPORTS_HUGEPAGES
63	select HAVE_ASM_MODVERSIONS
64	select HAVE_CONTEXT_TRACKING_USER
65	select HAVE_TIF_NOHZ
66	select HAVE_C_RECORDMCOUNT
67	select HAVE_DEBUG_KMEMLEAK
68	select HAVE_DEBUG_STACKOVERFLOW
69	select HAVE_DMA_CONTIGUOUS
70	select HAVE_DYNAMIC_FTRACE
71	select HAVE_EBPF_JIT if !CPU_MICROMIPS
72	select HAVE_EXIT_THREAD
73	select HAVE_GUP_FAST
74	select HAVE_FUNCTION_GRAPH_TRACER
75	select HAVE_FUNCTION_TRACER
76	select HAVE_GCC_PLUGINS
77	select HAVE_IOREMAP_PROT
78	select HAVE_IRQ_EXIT_ON_IRQ_STACK
79	select HAVE_IRQ_TIME_ACCOUNTING
80	select HAVE_KPROBES
81	select HAVE_KRETPROBES
82	select HAVE_LD_DEAD_CODE_DATA_ELIMINATION
83	select HAVE_MOD_ARCH_SPECIFIC
84	select HAVE_NMI
85	select HAVE_PAGE_SIZE_4KB if !CPU_LOONGSON2EF && !CPU_LOONGSON64
86	select HAVE_PAGE_SIZE_16KB if !CPU_R3000
87	select HAVE_PAGE_SIZE_64KB if !CPU_R3000
88	select HAVE_PERF_EVENTS
89	select HAVE_PERF_REGS
90	select HAVE_PERF_USER_STACK_DUMP
91	select HAVE_REGS_AND_STACK_ACCESS_API
92	select HAVE_RSEQ
93	select HAVE_SPARSE_SYSCALL_NR
94	select HAVE_STACKPROTECTOR
95	select HAVE_SYSCALL_TRACEPOINTS
96	select HAVE_VIRT_CPU_ACCOUNTING_GEN if 64BIT || !SMP
97	select IRQ_FORCED_THREADING
98	select ISA if EISA
99	select LOCK_MM_AND_FIND_VMA
100	select MMU_GATHER_RCU_TABLE_FREE
101	select MODULES_USE_ELF_REL if MODULES
102	select MODULES_USE_ELF_RELA if MODULES && 64BIT
103	select PERF_USE_VMALLOC
104	select PCI_MSI_ARCH_FALLBACKS if PCI_MSI
105	select RTC_LIB
106	select SYSCTL_EXCEPTION_TRACE
107	select TRACE_IRQFLAGS_SUPPORT
108	select ARCH_HAS_ELFCORE_COMPAT
109	select HAVE_ARCH_KCSAN if 64BIT
110
111config MIPS_FIXUP_BIGPHYS_ADDR
112	bool
113
114config MIPS_GENERIC
115	bool
116
117config MACH_GENERIC_CORE
118	bool
119
120config MACH_INGENIC
121	bool
122	select SYS_SUPPORTS_32BIT_KERNEL
123	select SYS_SUPPORTS_LITTLE_ENDIAN
124	select SYS_SUPPORTS_ZBOOT
125	select DMA_NONCOHERENT
126	select IRQ_MIPS_CPU
127	select PINCTRL
128	select GPIOLIB
129	select COMMON_CLK
130	select GENERIC_IRQ_CHIP
131	select BUILTIN_DTB if MIPS_NO_APPENDED_DTB
132	select USE_OF
133	select CPU_SUPPORTS_CPUFREQ
134	select MIPS_EXTERNAL_TIMER
135
136menu "Machine selection"
137
138choice
139	prompt "System type"
140	default MIPS_GENERIC_KERNEL
141
142config MIPS_GENERIC_KERNEL
143	bool "Generic board-agnostic MIPS kernel"
144	select MIPS_GENERIC
145	select BOOT_RAW
146	select BUILTIN_DTB
147	select CEVT_R4K
148	select CLKSRC_MIPS_GIC
149	select COMMON_CLK
150	select CPU_MIPSR2_IRQ_EI
151	select CPU_MIPSR2_IRQ_VI
152	select CSRC_R4K
153	select DMA_NONCOHERENT
154	select HAVE_PCI
155	select IRQ_MIPS_CPU
156	select MACH_GENERIC_CORE
157	select MIPS_AUTO_PFN_OFFSET
158	select MIPS_CPU_SCACHE
159	select MIPS_GIC
160	select MIPS_L1_CACHE_SHIFT_7
161	select NO_EXCEPT_FILL
162	select PCI_DRIVERS_GENERIC
163	select SMP_UP if SMP
164	select SWAP_IO_SPACE
165	select SYS_HAS_CPU_MIPS32_R1
166	select SYS_HAS_CPU_MIPS32_R2
167	select SYS_HAS_CPU_MIPS32_R5
168	select SYS_HAS_CPU_MIPS32_R6
169	select SYS_HAS_CPU_MIPS64_R1
170	select SYS_HAS_CPU_MIPS64_R2
171	select SYS_HAS_CPU_MIPS64_R5
172	select SYS_HAS_CPU_MIPS64_R6
173	select SYS_SUPPORTS_32BIT_KERNEL
174	select SYS_SUPPORTS_64BIT_KERNEL
175	select SYS_SUPPORTS_BIG_ENDIAN
176	select SYS_SUPPORTS_HIGHMEM
177	select SYS_SUPPORTS_LITTLE_ENDIAN
178	select SYS_SUPPORTS_MICROMIPS
179	select SYS_SUPPORTS_MIPS16
180	select SYS_SUPPORTS_MIPS_CPS
181	select SYS_SUPPORTS_MULTITHREADING
182	select SYS_SUPPORTS_RELOCATABLE
183	select SYS_SUPPORTS_SMARTMIPS
184	select SYS_SUPPORTS_ZBOOT
185	select UHI_BOOT
186	select USB_EHCI_BIG_ENDIAN_DESC if CPU_BIG_ENDIAN
187	select USB_EHCI_BIG_ENDIAN_MMIO if CPU_BIG_ENDIAN
188	select USB_OHCI_BIG_ENDIAN_DESC if CPU_BIG_ENDIAN
189	select USB_OHCI_BIG_ENDIAN_MMIO if CPU_BIG_ENDIAN
190	select USB_UHCI_BIG_ENDIAN_DESC if CPU_BIG_ENDIAN
191	select USB_UHCI_BIG_ENDIAN_MMIO if CPU_BIG_ENDIAN
192	select USE_OF
193	help
194	  Select this to build a kernel which aims to support multiple boards,
195	  generally using a flattened device tree passed from the bootloader
196	  using the boot protocol defined in the UHI (Unified Hosting
197	  Interface) specification.
198
199config MIPS_ALCHEMY
200	bool "Alchemy processor based machines"
201	select PHYS_ADDR_T_64BIT
202	select CEVT_R4K
203	select CSRC_R4K
204	select IRQ_MIPS_CPU
205	select DMA_NONCOHERENT		# Au1000,1500,1100 aren't, rest is
206	select GPIOLIB
207	select GPIOLIB_LEGACY
208	select MIPS_FIXUP_BIGPHYS_ADDR if PCI
209	select SYS_HAS_CPU_MIPS32_R1
210	select SYS_SUPPORTS_32BIT_KERNEL
211	select SYS_SUPPORTS_APM_EMULATION
212	select GPIOLIB
213	select SYS_SUPPORTS_ZBOOT
214	select COMMON_CLK
215
216config ATH25
217	bool "Atheros AR231x/AR531x SoC support"
218	select CEVT_R4K
219	select CSRC_R4K
220	select DMA_NONCOHERENT
221	select IRQ_MIPS_CPU
222	select IRQ_DOMAIN
223	select SYS_HAS_CPU_MIPS32_R1
224	select SYS_SUPPORTS_BIG_ENDIAN
225	select SYS_SUPPORTS_32BIT_KERNEL
226	select SYS_HAS_EARLY_PRINTK
227	help
228	  Support for Atheros AR231x and Atheros AR531x based boards
229
230config ATH79
231	bool "Atheros AR71XX/AR724X/AR913X based boards"
232	select ARCH_HAS_RESET_CONTROLLER
233	select BOOT_RAW
234	select CEVT_R4K
235	select CSRC_R4K
236	select DMA_NONCOHERENT
237	select GPIOLIB
238	select PINCTRL
239	select COMMON_CLK
240	select IRQ_MIPS_CPU
241	select SYS_HAS_CPU_MIPS32_R2
242	select SYS_HAS_EARLY_PRINTK
243	select SYS_SUPPORTS_32BIT_KERNEL
244	select SYS_SUPPORTS_BIG_ENDIAN
245	select SYS_SUPPORTS_MIPS16
246	select SYS_SUPPORTS_ZBOOT_UART_PROM
247	select USE_OF
248	select USB_EHCI_ROOT_HUB_TT if USB_EHCI_HCD_PLATFORM
249	help
250	  Support for the Atheros AR71XX/AR724X/AR913X SoCs.
251
252config BMIPS_GENERIC
253	bool "Broadcom Generic BMIPS kernel"
254	select ARCH_HAS_RESET_CONTROLLER
255	select ARCH_HAS_SYNC_DMA_FOR_CPU_ALL
256	select BOOT_RAW
257	select NO_EXCEPT_FILL
258	select USE_OF
259	select CEVT_R4K
260	select CSRC_R4K
261	select SYNC_R4K
262	select COMMON_CLK
263	select BCM6345_L1_IRQ
264	select BCM7038_L1_IRQ
265	select BCM7120_L2_IRQ
266	select BRCMSTB_L2_IRQ
267	select IRQ_MIPS_CPU
268	select DMA_NONCOHERENT
269	select SYS_SUPPORTS_32BIT_KERNEL
270	select SYS_SUPPORTS_LITTLE_ENDIAN
271	select SYS_SUPPORTS_BIG_ENDIAN
272	select SYS_SUPPORTS_HIGHMEM
273	select SYS_HAS_CPU_BMIPS32_3300
274	select SYS_HAS_CPU_BMIPS4350
275	select SYS_HAS_CPU_BMIPS4380
276	select SYS_HAS_CPU_BMIPS5000
277	select SWAP_IO_SPACE
278	select USB_EHCI_BIG_ENDIAN_DESC if CPU_BIG_ENDIAN
279	select USB_EHCI_BIG_ENDIAN_MMIO if CPU_BIG_ENDIAN
280	select USB_OHCI_BIG_ENDIAN_DESC if CPU_BIG_ENDIAN
281	select USB_OHCI_BIG_ENDIAN_MMIO if CPU_BIG_ENDIAN
282	select HARDIRQS_SW_RESEND
283	select HAVE_PCI
284	select PCI_DRIVERS_GENERIC
285	select FW_CFE
286	help
287	  Build a generic DT-based kernel image that boots on select
288	  BCM33xx cable modem chips, BCM63xx DSL chips, and BCM7xxx set-top
289	  box chips.  Note that CONFIG_CPU_BIG_ENDIAN/CONFIG_CPU_LITTLE_ENDIAN
290	  must be set appropriately for your board.
291
292config BCM47XX
293	bool "Broadcom BCM47XX based boards"
294	select BOOT_RAW
295	select CEVT_R4K
296	select CSRC_R4K
297	select DMA_NONCOHERENT
298	select HAVE_PCI
299	select IRQ_MIPS_CPU
300	select SYS_HAS_CPU_MIPS32_R1
301	select NO_EXCEPT_FILL
302	select SYS_SUPPORTS_32BIT_KERNEL
303	select SYS_SUPPORTS_LITTLE_ENDIAN
304	select SYS_SUPPORTS_MIPS16
305	select SYS_SUPPORTS_ZBOOT
306	select SYS_HAS_EARLY_PRINTK
307	select USE_GENERIC_EARLY_PRINTK_8250
308	select GPIOLIB
309	select GPIOLIB_LEGACY
310	select LEDS_GPIO_REGISTER
311	select BCM47XX_NVRAM
312	select BCM47XX_SPROM
313	select BCM47XX_SSB if !BCM47XX_BCMA
314	help
315	  Support for BCM47XX based boards
316
317config BCM63XX
318	bool "Broadcom BCM63XX based boards"
319	select BOOT_RAW
320	select CEVT_R4K
321	select CSRC_R4K
322	select SYNC_R4K
323	select DMA_NONCOHERENT
324	select IRQ_MIPS_CPU
325	select SYS_SUPPORTS_32BIT_KERNEL
326	select SYS_SUPPORTS_BIG_ENDIAN
327	select SYS_HAS_EARLY_PRINTK
328	select SYS_HAS_CPU_BMIPS32_3300
329	select SYS_HAS_CPU_BMIPS4350
330	select SYS_HAS_CPU_BMIPS4380
331	select SWAP_IO_SPACE
332	select GPIOLIB
333	select GPIOLIB_LEGACY
334	select MIPS_L1_CACHE_SHIFT_4
335	select HAVE_LEGACY_CLK
336	help
337	  Support for BCM63XX based boards
338
339config MIPS_COBALT
340	bool "Cobalt Server"
341	select CEVT_R4K
342	select CSRC_R4K
343	select CEVT_GT641XX
344	select DMA_NONCOHERENT
345	select FORCE_PCI
346	select I8253
347	select I8259
348	select IRQ_MIPS_CPU
349	select IRQ_GT641XX
350	select PCI_GT64XXX_PCI0
351	select SYS_HAS_CPU_NEVADA
352	select SYS_HAS_EARLY_PRINTK
353	select SYS_SUPPORTS_32BIT_KERNEL
354	select SYS_SUPPORTS_64BIT_KERNEL
355	select SYS_SUPPORTS_LITTLE_ENDIAN
356	select USE_GENERIC_EARLY_PRINTK_8250
357
358config MACH_DECSTATION
359	bool "DECstations"
360	select BOOT_ELF32
361	select CEVT_DS1287
362	select CEVT_R4K if CPU_R4X00
363	select CSRC_IOASIC
364	select CSRC_R4K if CPU_R4X00
365	select CPU_DADDI_WORKAROUNDS if 64BIT
366	select CPU_R4000_WORKAROUNDS if 64BIT
367	select CPU_R4400_WORKAROUNDS if 64BIT
368	select DMA_NONCOHERENT
369	select NO_IOPORT_MAP
370	select IRQ_MIPS_CPU
371	select SYS_HAS_CPU_R3000
372	select SYS_HAS_CPU_R4X00
373	select SYS_SUPPORTS_32BIT_KERNEL
374	select SYS_SUPPORTS_64BIT_KERNEL
375	select SYS_SUPPORTS_LITTLE_ENDIAN
376	select SYS_SUPPORTS_128HZ
377	select SYS_SUPPORTS_256HZ
378	select SYS_SUPPORTS_1024HZ
379	select MIPS_L1_CACHE_SHIFT_4
380	help
381	  This enables support for DEC's MIPS based workstations.  For details
382	  see the Linux/MIPS FAQ on <http://www.linux-mips.org/> and the
383	  DECstation porting pages on <http://decstation.unix-ag.org/>.
384
385	  If you have one of the following DECstation Models you definitely
386	  want to choose R4xx0 for the CPU Type:
387
388		DECstation 5000/50
389		DECstation 5000/150
390		DECstation 5000/260
391		DECsystem 5900/260
392
393	  otherwise choose R3000.
394
395config ECONET
396	bool "EcoNet MIPS family"
397	select BOOT_RAW
398	select DEBUG_ZBOOT if DEBUG_KERNEL
399	select EARLY_PRINTK_8250
400	select ECONET_EN751221_TIMER
401	select SERIAL_8250
402	select SERIAL_OF_PLATFORM
403	select SYS_SUPPORTS_BIG_ENDIAN
404	select SYS_HAS_CPU_MIPS32_R1
405	select SYS_HAS_CPU_MIPS32_R2
406	select SYS_HAS_EARLY_PRINTK
407	select SYS_SUPPORTS_32BIT_KERNEL
408	select SYS_SUPPORTS_MIPS16
409	select SYS_SUPPORTS_ZBOOT_UART16550
410	select USE_GENERIC_EARLY_PRINTK_8250
411	select USE_OF
412	help
413	  EcoNet EN75xx MIPS devices are big endian MIPS machines used
414	  in XPON (fiber) and DSL applications. They have SPI, PCI, USB,
415	  GPIO, and Ethernet, with optional XPON, DSL, and VoIP DSP cores.
416	  Don't confuse these with the Airoha ARM devices sometimes referred
417	  to as "EcoNet", this family is for MIPS based devices only.
418
419config MACH_JAZZ
420	bool "Jazz family of machines"
421	select ARC_MEMORY
422	select ARC_PROMLIB
423	select ARCH_MIGHT_HAVE_PC_PARPORT
424	select ARCH_MIGHT_HAVE_PC_SERIO
425	select FW_ARC
426	select FW_ARC32
427	select ARCH_MAY_HAVE_PC_FDC
428	select CEVT_R4K
429	select CSRC_R4K
430	select DEFAULT_SGI_PARTITION if CPU_BIG_ENDIAN
431	select GENERIC_ISA_DMA
432	select HAVE_PCSPKR_PLATFORM
433	select IRQ_MIPS_CPU
434	select I8253
435	select I8259
436	select ISA
437	select SYS_HAS_CPU_R4X00
438	select SYS_SUPPORTS_32BIT_KERNEL
439	select SYS_SUPPORTS_64BIT_KERNEL
440	select SYS_SUPPORTS_100HZ
441	select SYS_SUPPORTS_LITTLE_ENDIAN
442	help
443	  This a family of machines based on the MIPS R4030 chipset which was
444	  used by several vendors to build RISC/os and Windows NT workstations.
445	  Members include the Acer PICA, MIPS Magnum 4000, MIPS Millennium and
446	  Olivetti M700-10 workstations.
447
448config MACH_INGENIC_SOC
449	bool "Ingenic SoC based machines"
450	select MIPS_GENERIC
451	select MACH_INGENIC
452	select MACH_GENERIC_CORE
453	select SYS_SUPPORTS_ZBOOT_UART16550
454	select CPU_SUPPORTS_CPUFREQ
455	select MIPS_EXTERNAL_TIMER
456
457config LANTIQ
458	bool "Lantiq based platforms"
459	select DMA_NONCOHERENT
460	select IRQ_MIPS_CPU
461	select CEVT_R4K
462	select CSRC_R4K
463	select NO_EXCEPT_FILL
464	select SYS_HAS_CPU_MIPS32_R1
465	select SYS_HAS_CPU_MIPS32_R2
466	select SYS_SUPPORTS_BIG_ENDIAN
467	select SYS_SUPPORTS_32BIT_KERNEL
468	select SYS_SUPPORTS_MIPS16
469	select SYS_SUPPORTS_MULTITHREADING
470	select SYS_SUPPORTS_VPE_LOADER
471	select SYS_HAS_EARLY_PRINTK
472	select GPIOLIB
473	select SWAP_IO_SPACE
474	select BOOT_RAW
475	select HAVE_LEGACY_CLK
476	select USE_OF
477	select PINCTRL
478	select PINCTRL_LANTIQ
479	select ARCH_HAS_RESET_CONTROLLER
480	select RESET_CONTROLLER
481
482config MACH_LOONGSON32
483	bool "Loongson 32-bit family of machines"
484	select MACH_GENERIC_CORE
485	select USE_OF
486	select BUILTIN_DTB
487	select BOOT_ELF32
488	select CEVT_R4K
489	select CSRC_R4K
490	select COMMON_CLK
491	select DMA_NONCOHERENT
492	select GENERIC_IRQ_SHOW_LEVEL
493	select IRQ_MIPS_CPU
494	select LS1X_IRQ
495	select SYS_HAS_CPU_LOONGSON32
496	select SYS_HAS_EARLY_PRINTK
497	select USE_GENERIC_EARLY_PRINTK_8250
498	select SYS_SUPPORTS_32BIT_KERNEL
499	select SYS_SUPPORTS_LITTLE_ENDIAN
500	select SYS_SUPPORTS_HIGHMEM
501	select SYS_SUPPORTS_ZBOOT
502	help
503	  This enables support for the Loongson-1 family of machines.
504
505	  Loongson-1 is a family of 32-bit MIPS-compatible SoCs developed by
506	  the Institute of Computing Technology (ICT), Chinese Academy of
507	  Sciences (CAS).
508
509config MACH_LOONGSON2EF
510	bool "Loongson-2E/F family of machines"
511	select SYS_SUPPORTS_ZBOOT
512	help
513	  This enables the support of early Loongson-2E/F family of machines.
514
515config MACH_LOONGSON64
516	bool "Loongson 64-bit family of machines"
517	select ARCH_DMA_DEFAULT_COHERENT
518	select ARCH_SPARSEMEM_ENABLE
519	select ARCH_MIGHT_HAVE_PC_PARPORT
520	select ARCH_MIGHT_HAVE_PC_SERIO
521	select GENERIC_ISA_DMA_SUPPORT_BROKEN
522	select BOOT_ELF32
523	select BOARD_SCACHE
524	select CSRC_R4K
525	select CEVT_R4K
526	select SYNC_R4K
527	select FORCE_PCI
528	select ISA
529	select I8259
530	select IRQ_MIPS_CPU
531	select NO_EXCEPT_FILL
532	select NR_CPUS_DEFAULT_64
533	select USE_GENERIC_EARLY_PRINTK_8250
534	select PCI_DRIVERS_GENERIC
535	select SYS_HAS_CPU_LOONGSON64
536	select SYS_HAS_EARLY_PRINTK
537	select SYS_SUPPORTS_SMP
538	select SYS_SUPPORTS_HOTPLUG_CPU
539	select SYS_SUPPORTS_NUMA
540	select SYS_SUPPORTS_64BIT_KERNEL
541	select SYS_SUPPORTS_HIGHMEM
542	select SYS_SUPPORTS_LITTLE_ENDIAN
543	select SYS_SUPPORTS_ZBOOT
544	select SYS_SUPPORTS_RELOCATABLE
545	select ZONE_DMA32
546	select COMMON_CLK
547	select USE_OF
548	select BUILTIN_DTB
549	select PCI_HOST_GENERIC
550	help
551	  This enables the support of Loongson-2/3 family of machines.
552
553	  Loongson-2 and Loongson-3 are 64-bit general-purpose processors with
554	  GS264/GS464/GS464E/GS464V microarchitecture (except old Loongson-2E
555	  and Loongson-2F which will be removed), developed by the Institute
556	  of Computing Technology (ICT), Chinese Academy of Sciences (CAS).
557
558config MIPS_MALTA
559	bool "MIPS Malta board"
560	select ARCH_MAY_HAVE_PC_FDC
561	select ARCH_MIGHT_HAVE_PC_PARPORT
562	select ARCH_MIGHT_HAVE_PC_SERIO
563	select BOOT_ELF32
564	select BOOT_RAW
565	select BUILTIN_DTB
566	select CEVT_R4K
567	select CLKSRC_MIPS_GIC
568	select COMMON_CLK
569	select CSRC_R4K
570	select DMA_NONCOHERENT
571	select GENERIC_ISA_DMA
572	select HAVE_PCSPKR_PLATFORM
573	select HAVE_PCI
574	select I8253
575	select I8259
576	select IRQ_MIPS_CPU
577	select MIPS_BONITO64
578	select MIPS_CPU_SCACHE
579	select MIPS_GIC
580	select MIPS_L1_CACHE_SHIFT_6
581	select MIPS_MSC
582	select PCI_GT64XXX_PCI0
583	select RTC_MC146818_LIB
584	select SMP_UP if SMP
585	select SWAP_IO_SPACE
586	select SYS_HAS_CPU_MIPS32_R1
587	select SYS_HAS_CPU_MIPS32_R2
588	select SYS_HAS_CPU_MIPS32_R3_5
589	select SYS_HAS_CPU_MIPS32_R5
590	select SYS_HAS_CPU_MIPS32_R6
591	select SYS_HAS_CPU_MIPS64_R1
592	select SYS_HAS_CPU_MIPS64_R2
593	select SYS_HAS_CPU_MIPS64_R6
594	select SYS_HAS_CPU_NEVADA
595	select SYS_HAS_CPU_RM7000
596	select SYS_SUPPORTS_32BIT_KERNEL
597	select SYS_SUPPORTS_64BIT_KERNEL
598	select SYS_SUPPORTS_BIG_ENDIAN
599	select SYS_SUPPORTS_HIGHMEM
600	select SYS_SUPPORTS_LITTLE_ENDIAN
601	select SYS_SUPPORTS_MICROMIPS
602	select SYS_SUPPORTS_MIPS16
603	select SYS_SUPPORTS_MIPS_CPS
604	select SYS_SUPPORTS_MULTITHREADING
605	select SYS_SUPPORTS_RELOCATABLE
606	select SYS_SUPPORTS_SMARTMIPS
607	select SYS_SUPPORTS_VPE_LOADER
608	select SYS_SUPPORTS_ZBOOT
609	select USE_OF
610	select WAR_ICACHE_REFILLS
611	select ZONE_DMA32 if 64BIT
612	help
613	  This enables support for the MIPS Technologies Malta evaluation
614	  board.
615
616config MACH_PIC32
617	bool "Microchip PIC32 Family"
618	help
619	  This enables support for the Microchip PIC32 family of platforms.
620
621	  Microchip PIC32 is a family of general-purpose 32 bit MIPS core
622	  microcontrollers.
623
624config EYEQ
625	bool "Mobileye EyeQ SoC"
626	select MACH_GENERIC_CORE
627	select ARM_AMBA
628	select PHYSICAL_START_BOOL
629	select ARCH_SPARSEMEM_DEFAULT if 64BIT
630	select BOOT_RAW
631	select BUILTIN_DTB
632	select CEVT_R4K
633	select CLKSRC_MIPS_GIC
634	select COMMON_CLK
635	select CPU_MIPSR2_IRQ_EI
636	select CPU_MIPSR2_IRQ_VI
637	select CSRC_R4K
638	select DMA_NONCOHERENT
639	select HAVE_PCI
640	select IRQ_MIPS_CPU
641	select MIPS_AUTO_PFN_OFFSET
642	select MIPS_CPU_SCACHE
643	select MIPS_GIC
644	select MIPS_L1_CACHE_SHIFT_7
645	select PCI_DRIVERS_GENERIC
646	select SMP_UP if SMP
647	select SWAP_IO_SPACE
648	select SYS_HAS_CPU_MIPS64_R6
649	select SYS_SUPPORTS_64BIT_KERNEL
650	select SYS_SUPPORTS_HIGHMEM
651	select SYS_SUPPORTS_LITTLE_ENDIAN
652	select SYS_SUPPORTS_MIPS_CPS
653	select SYS_SUPPORTS_RELOCATABLE
654	select SYS_SUPPORTS_ZBOOT
655	select UHI_BOOT
656	select USB_EHCI_BIG_ENDIAN_DESC if CPU_BIG_ENDIAN
657	select USB_EHCI_BIG_ENDIAN_MMIO if CPU_BIG_ENDIAN
658	select USB_OHCI_BIG_ENDIAN_DESC if CPU_BIG_ENDIAN
659	select USB_OHCI_BIG_ENDIAN_MMIO if CPU_BIG_ENDIAN
660	select USB_UHCI_BIG_ENDIAN_DESC if CPU_BIG_ENDIAN
661	select USB_UHCI_BIG_ENDIAN_MMIO if CPU_BIG_ENDIAN
662	select USE_OF
663	select HOTPLUG_PARALLEL if HOTPLUG_CPU
664	help
665	  Select this to build a kernel supporting EyeQ SoC from Mobileye.
666
667	bool
668
669config MACH_NINTENDO64
670	bool "Nintendo 64 console"
671	select CEVT_R4K
672	select CSRC_R4K
673	select SYS_HAS_CPU_R4300
674	select SYS_SUPPORTS_BIG_ENDIAN
675	select SYS_SUPPORTS_ZBOOT
676	select SYS_SUPPORTS_32BIT_KERNEL
677	select SYS_SUPPORTS_64BIT_KERNEL
678	select DMA_NONCOHERENT
679	select IRQ_MIPS_CPU
680
681config RALINK
682	bool "Ralink based machines"
683	select CEVT_R4K
684	select COMMON_CLK
685	select CSRC_R4K
686	select BOOT_RAW
687	select DMA_NONCOHERENT
688	select IRQ_MIPS_CPU
689	select USE_OF
690	select SYS_HAS_CPU_MIPS32_R2
691	select SYS_SUPPORTS_32BIT_KERNEL
692	select SYS_SUPPORTS_LITTLE_ENDIAN
693	select SYS_SUPPORTS_MIPS16
694	select SYS_SUPPORTS_ZBOOT
695	select SYS_HAS_EARLY_PRINTK
696	select ARCH_HAS_RESET_CONTROLLER
697	select RESET_CONTROLLER
698
699config MACH_REALTEK_RTL
700	bool "Realtek RTL838x/RTL839x based machines"
701	select MIPS_GENERIC
702	select MACH_GENERIC_CORE
703	select DMA_NONCOHERENT
704	select IRQ_MIPS_CPU
705	select CSRC_R4K
706	select CEVT_R4K
707	select SYS_HAS_CPU_MIPS32_R1
708	select SYS_HAS_CPU_MIPS32_R2
709	select SYS_SUPPORTS_BIG_ENDIAN
710	select SYS_SUPPORTS_32BIT_KERNEL
711	select SYS_SUPPORTS_MIPS16
712	select SYS_SUPPORTS_MULTITHREADING
713	select SYS_SUPPORTS_VPE_LOADER
714	select BOOT_RAW
715	select PINCTRL
716	select USE_OF
717	select REALTEK_OTTO_TIMER
718
719config SGI_IP22
720	bool "SGI IP22 (Indy/Indigo2)"
721	select ARC_MEMORY
722	select ARC_PROMLIB
723	select FW_ARC
724	select FW_ARC32
725	select ARCH_MIGHT_HAVE_PC_SERIO
726	select BOOT_ELF32
727	select CEVT_R4K
728	select CSRC_R4K
729	select DEFAULT_SGI_PARTITION
730	select DMA_NONCOHERENT
731	select HAVE_EISA
732	select I8253
733	select I8259
734	select IP22_CPU_SCACHE
735	select IRQ_MIPS_CPU
736	select GENERIC_ISA_DMA_SUPPORT_BROKEN
737	select SGI_HAS_I8042
738	select SGI_HAS_INDYDOG
739	select SGI_HAS_HAL2
740	select SGI_HAS_SEEQ
741	select SGI_HAS_WD93
742	select SGI_HAS_ZILOG
743	select SWAP_IO_SPACE
744	select SYS_HAS_CPU_R4X00
745	select SYS_HAS_CPU_R5000
746	select SYS_HAS_EARLY_PRINTK
747	select SYS_SUPPORTS_32BIT_KERNEL
748	select SYS_SUPPORTS_64BIT_KERNEL
749	select SYS_SUPPORTS_BIG_ENDIAN
750	select WAR_R4600_V1_INDEX_ICACHEOP
751	select WAR_R4600_V1_HIT_CACHEOP
752	select WAR_R4600_V2_HIT_CACHEOP
753	select MIPS_L1_CACHE_SHIFT_7
754	help
755	  This are the SGI Indy, Challenge S and Indigo2, as well as certain
756	  OEM variants like the Tandem CMN B006S. To compile a Linux kernel
757	  that runs on these, say Y here.
758
759config SGI_IP27
760	bool "SGI IP27 (Origin200/2000)"
761	select ARCH_HAS_PHYS_TO_DMA
762	select ARCH_SPARSEMEM_ENABLE
763	select FW_ARC
764	select FW_ARC64
765	select ARC_CMDLINE_ONLY
766	select BOOT_ELF64
767	select DEFAULT_SGI_PARTITION
768	select FORCE_PCI
769	select SYS_HAS_EARLY_PRINTK
770	select HAVE_PCI
771	select IRQ_MIPS_CPU
772	select IRQ_DOMAIN_HIERARCHY
773	select NR_CPUS_DEFAULT_64
774	select PCI_DRIVERS_GENERIC
775	select PCI_XTALK_BRIDGE
776	select SYS_HAS_CPU_R10000
777	select SYS_SUPPORTS_64BIT_KERNEL
778	select SYS_SUPPORTS_BIG_ENDIAN
779	select SYS_SUPPORTS_NUMA
780	select SYS_SUPPORTS_SMP
781	select WAR_R10000_LLSC
782	select MIPS_L1_CACHE_SHIFT_7
783	select NUMA
784	help
785	  This are the SGI Origin 200, Origin 2000 and Onyx 2 Graphics
786	  workstations.  To compile a Linux kernel that runs on these, say Y
787	  here.
788
789config SGI_IP28
790	bool "SGI IP28 (Indigo2 R10k)"
791	select ARC_MEMORY
792	select ARC_PROMLIB
793	select FW_ARC
794	select FW_ARC64
795	select ARCH_MIGHT_HAVE_PC_SERIO
796	select BOOT_ELF64
797	select CEVT_R4K
798	select CSRC_R4K
799	select DEFAULT_SGI_PARTITION
800	select DMA_NONCOHERENT
801	select GENERIC_ISA_DMA_SUPPORT_BROKEN
802	select IRQ_MIPS_CPU
803	select HAVE_EISA
804	select I8253
805	select I8259
806	select SGI_HAS_I8042
807	select SGI_HAS_INDYDOG
808	select SGI_HAS_HAL2
809	select SGI_HAS_SEEQ
810	select SGI_HAS_WD93
811	select SGI_HAS_ZILOG
812	select SWAP_IO_SPACE
813	select SYS_HAS_CPU_R10000
814	select SYS_HAS_EARLY_PRINTK
815	select SYS_SUPPORTS_64BIT_KERNEL
816	select SYS_SUPPORTS_BIG_ENDIAN
817	select WAR_R10000_LLSC
818	select MIPS_L1_CACHE_SHIFT_7
819	help
820	  This is the SGI Indigo2 with R10000 processor.  To compile a Linux
821	  kernel that runs on these, say Y here.
822
823config SGI_IP30
824	bool "SGI IP30 (Octane/Octane2)"
825	select ARCH_HAS_PHYS_TO_DMA
826	select FW_ARC
827	select FW_ARC64
828	select BOOT_ELF64
829	select CEVT_R4K
830	select CSRC_R4K
831	select FORCE_PCI
832	select SYNC_R4K if SMP
833	select ZONE_DMA32
834	select HAVE_PCI
835	select IRQ_MIPS_CPU
836	select IRQ_DOMAIN_HIERARCHY
837	select PCI_DRIVERS_GENERIC
838	select PCI_XTALK_BRIDGE
839	select SYS_HAS_EARLY_PRINTK
840	select SYS_HAS_CPU_R10000
841	select SYS_SUPPORTS_64BIT_KERNEL
842	select SYS_SUPPORTS_BIG_ENDIAN
843	select SYS_SUPPORTS_SMP
844	select WAR_R10000_LLSC
845	select MIPS_L1_CACHE_SHIFT_7
846	select ARC_MEMORY
847	help
848	  These are the SGI Octane and Octane2 graphics workstations.  To
849	  compile a Linux kernel that runs on these, say Y here.
850
851config SGI_IP32
852	bool "SGI IP32 (O2)"
853	select ARC_MEMORY
854	select ARC_PROMLIB
855	select ARCH_HAS_PHYS_TO_DMA
856	select FW_ARC
857	select FW_ARC32
858	select BOOT_ELF32
859	select CEVT_R4K
860	select CSRC_R4K
861	select DMA_NONCOHERENT
862	select HAVE_PCI
863	select IRQ_MIPS_CPU
864	select R5000_CPU_SCACHE
865	select RM7000_CPU_SCACHE
866	select SYS_HAS_CPU_R5000
867	select SYS_HAS_CPU_R10000 if BROKEN
868	select SYS_HAS_CPU_RM7000
869	select SYS_HAS_CPU_NEVADA
870	select SYS_SUPPORTS_64BIT_KERNEL
871	select SYS_SUPPORTS_BIG_ENDIAN
872	select WAR_ICACHE_REFILLS
873	help
874	  If you want this kernel to run on SGI O2 workstation, say Y here.
875
876config SIBYTE_CRHONE
877	bool "Sibyte BCM91125C-CRhone"
878	select BOOT_ELF32
879	select SIBYTE_BCM1125
880	select SWAP_IO_SPACE
881	select SYS_HAS_CPU_SB1
882	select SYS_SUPPORTS_BIG_ENDIAN
883	select SYS_SUPPORTS_HIGHMEM
884	select SYS_SUPPORTS_LITTLE_ENDIAN
885
886config SIBYTE_RHONE
887	bool "Sibyte BCM91125E-Rhone"
888	select BOOT_ELF32
889	select SIBYTE_SB1250
890	select SWAP_IO_SPACE
891	select SYS_HAS_CPU_SB1
892	select SYS_SUPPORTS_BIG_ENDIAN
893	select SYS_SUPPORTS_LITTLE_ENDIAN
894
895config SIBYTE_SWARM
896	bool "Sibyte BCM91250A-SWARM"
897	select BOOT_ELF32
898	select HAVE_PATA_PLATFORM
899	select SIBYTE_SB1250
900	select SWAP_IO_SPACE
901	select SYS_HAS_CPU_SB1
902	select SYS_SUPPORTS_BIG_ENDIAN
903	select SYS_SUPPORTS_HIGHMEM
904	select SYS_SUPPORTS_LITTLE_ENDIAN
905	select ZONE_DMA32 if 64BIT
906	select SWIOTLB if ARCH_DMA_ADDR_T_64BIT && PCI
907
908config SIBYTE_LITTLESUR
909	bool "Sibyte BCM91250C2-LittleSur"
910	select BOOT_ELF32
911	select HAVE_PATA_PLATFORM
912	select SIBYTE_SB1250
913	select SWAP_IO_SPACE
914	select SYS_HAS_CPU_SB1
915	select SYS_SUPPORTS_BIG_ENDIAN
916	select SYS_SUPPORTS_HIGHMEM
917	select SYS_SUPPORTS_LITTLE_ENDIAN
918	select ZONE_DMA32 if 64BIT
919
920config SIBYTE_SENTOSA
921	bool "Sibyte BCM91250E-Sentosa"
922	select BOOT_ELF32
923	select SIBYTE_SB1250
924	select SWAP_IO_SPACE
925	select SYS_HAS_CPU_SB1
926	select SYS_SUPPORTS_BIG_ENDIAN
927	select SYS_SUPPORTS_LITTLE_ENDIAN
928	select SWIOTLB if ARCH_DMA_ADDR_T_64BIT && PCI
929
930config SIBYTE_BIGSUR
931	bool "Sibyte BCM91480B-BigSur"
932	select BOOT_ELF32
933	select NR_CPUS_DEFAULT_4
934	select SIBYTE_BCM1x80
935	select SWAP_IO_SPACE
936	select SYS_HAS_CPU_SB1
937	select SYS_SUPPORTS_BIG_ENDIAN
938	select SYS_SUPPORTS_HIGHMEM
939	select SYS_SUPPORTS_LITTLE_ENDIAN
940	select ZONE_DMA32 if 64BIT
941	select SWIOTLB if ARCH_DMA_ADDR_T_64BIT && PCI
942
943config SNI_RM
944	bool "SNI RM200/300/400"
945	select ARC_MEMORY
946	select ARC_PROMLIB
947	select FW_ARC if CPU_LITTLE_ENDIAN
948	select FW_ARC32 if CPU_LITTLE_ENDIAN
949	select FW_SNIPROM if CPU_BIG_ENDIAN
950	select ARCH_MAY_HAVE_PC_FDC
951	select ARCH_MIGHT_HAVE_PC_PARPORT
952	select ARCH_MIGHT_HAVE_PC_SERIO
953	select BOOT_ELF32
954	select CEVT_R4K
955	select CSRC_R4K
956	select DEFAULT_SGI_PARTITION if CPU_BIG_ENDIAN
957	select DMA_NONCOHERENT
958	select GENERIC_ISA_DMA
959	select HAVE_EISA
960	select HAVE_PCSPKR_PLATFORM
961	select HAVE_PCI
962	select IRQ_MIPS_CPU
963	select I8253
964	select I8259
965	select ISA
966	select MIPS_L1_CACHE_SHIFT_6
967	select SWAP_IO_SPACE if CPU_BIG_ENDIAN
968	select SYS_HAS_CPU_R4X00
969	select SYS_HAS_CPU_R5000
970	select SYS_HAS_CPU_R10000
971	select R5000_CPU_SCACHE
972	select SYS_HAS_EARLY_PRINTK
973	select SYS_SUPPORTS_32BIT_KERNEL
974	select SYS_SUPPORTS_64BIT_KERNEL
975	select SYS_SUPPORTS_BIG_ENDIAN
976	select SYS_SUPPORTS_HIGHMEM
977	select SYS_SUPPORTS_LITTLE_ENDIAN
978	select WAR_R4600_V2_HIT_CACHEOP
979	help
980	  The SNI RM200/300/400 are MIPS-based machines manufactured by
981	  Siemens Nixdorf Informationssysteme (SNI), parent company of Pyramid
982	  Technology and now in turn merged with Fujitsu.  Say Y here to
983	  support this machine type.
984
985config MACH_TX49XX
986	bool "Toshiba TX49 series based machines"
987	select WAR_TX49XX_ICACHE_INDEX_INV
988
989config MIKROTIK_RB532
990	bool "Mikrotik RB532 boards"
991	select CEVT_R4K
992	select CSRC_R4K
993	select DMA_NONCOHERENT
994	select HAVE_PCI
995	select IRQ_MIPS_CPU
996	select SYS_HAS_CPU_MIPS32_R1
997	select SYS_SUPPORTS_32BIT_KERNEL
998	select SYS_SUPPORTS_LITTLE_ENDIAN
999	select SWAP_IO_SPACE
1000	select BOOT_RAW
1001	select GPIOLIB
1002	select GPIOLIB_LEGACY
1003	select MIPS_L1_CACHE_SHIFT_4
1004	help
1005	  Support the Mikrotik(tm) RouterBoard 532 series,
1006	  based on the IDT RC32434 SoC.
1007
1008config CAVIUM_OCTEON_SOC
1009	bool "Cavium Networks Octeon SoC based boards"
1010	select CEVT_R4K
1011	select ARCH_HAS_PHYS_TO_DMA
1012	select HAVE_RAPIDIO
1013	select PHYS_ADDR_T_64BIT
1014	select SYS_SUPPORTS_64BIT_KERNEL
1015	select SYS_SUPPORTS_BIG_ENDIAN
1016	select EDAC_SUPPORT
1017	select EDAC_ATOMIC_SCRUB
1018	select SYS_SUPPORTS_LITTLE_ENDIAN
1019	select SYS_SUPPORTS_HOTPLUG_CPU if CPU_BIG_ENDIAN
1020	select SYS_HAS_EARLY_PRINTK
1021	select SYS_HAS_CPU_CAVIUM_OCTEON
1022	select HAVE_PCI
1023	select HAVE_PLAT_DELAY
1024	select HAVE_PLAT_FW_INIT_CMDLINE
1025	select HAVE_PLAT_MEMCPY
1026	select ZONE_DMA32
1027	select GPIOLIB
1028	select USE_OF
1029	select ARCH_SPARSEMEM_ENABLE
1030	select SYS_SUPPORTS_SMP
1031	select NR_CPUS_DEFAULT_64
1032	select MIPS_NR_CPU_NR_MAP_1024
1033	select BUILTIN_DTB
1034	select MTD
1035	select MTD_COMPLEX_MAPPINGS
1036	select SWIOTLB
1037	select SYS_SUPPORTS_RELOCATABLE
1038	help
1039	  This option supports all of the Octeon reference boards from Cavium
1040	  Networks. It builds a kernel that dynamically determines the Octeon
1041	  CPU type and supports all known board reference implementations.
1042	  Some of the supported boards are:
1043		EBT3000
1044		EBH3000
1045		EBH3100
1046		Thunder
1047		Kodama
1048		Hikari
1049	  Say Y here for most Octeon reference boards.
1050
1051endchoice
1052
1053source "arch/mips/alchemy/Kconfig"
1054source "arch/mips/ath25/Kconfig"
1055source "arch/mips/ath79/Kconfig"
1056source "arch/mips/bcm47xx/Kconfig"
1057source "arch/mips/bcm63xx/Kconfig"
1058source "arch/mips/bmips/Kconfig"
1059source "arch/mips/econet/Kconfig"
1060source "arch/mips/generic/Kconfig"
1061source "arch/mips/ingenic/Kconfig"
1062source "arch/mips/jazz/Kconfig"
1063source "arch/mips/lantiq/Kconfig"
1064source "arch/mips/mobileye/Kconfig"
1065source "arch/mips/pic32/Kconfig"
1066source "arch/mips/ralink/Kconfig"
1067source "arch/mips/sgi-ip27/Kconfig"
1068source "arch/mips/sibyte/Kconfig"
1069source "arch/mips/txx9/Kconfig"
1070source "arch/mips/cavium-octeon/Kconfig"
1071source "arch/mips/loongson2ef/Kconfig"
1072source "arch/mips/loongson32/Kconfig"
1073source "arch/mips/loongson64/Kconfig"
1074
1075endmenu
1076
1077config GENERIC_HWEIGHT
1078	bool
1079	default y
1080
1081config GENERIC_CALIBRATE_DELAY
1082	bool
1083	default y
1084
1085config SCHED_OMIT_FRAME_POINTER
1086	bool
1087	default y
1088
1089#
1090# Select some configuration options automatically based on user selections.
1091#
1092config FW_ARC
1093	bool
1094
1095config ARCH_MAY_HAVE_PC_FDC
1096	bool
1097
1098config BOOT_RAW
1099	bool
1100
1101config CEVT_BCM1480
1102	bool
1103
1104config CEVT_DS1287
1105	bool
1106
1107config CEVT_GT641XX
1108	bool
1109
1110config CEVT_R4K
1111	bool
1112
1113config CEVT_SB1250
1114	bool
1115
1116config CEVT_TXX9
1117	bool
1118
1119config CSRC_BCM1480
1120	bool
1121
1122config CSRC_IOASIC
1123	bool
1124
1125config CSRC_R4K
1126	bool
1127
1128config CSRC_SB1250
1129	bool
1130
1131config GPIO_TXX9
1132	select GPIOLIB
1133	bool
1134
1135config FW_CFE
1136	bool
1137
1138config ARCH_SUPPORTS_UPROBES
1139	def_bool y
1140
1141config DMA_NONCOHERENT
1142	bool
1143	#
1144	# MIPS allows mixing "slightly different" Cacheability and Coherency
1145	# Attribute bits.  It is believed that the uncached access through
1146	# KSEG1 and the implementation specific "uncached accelerated" used
1147	# by pgprot_writcombine can be mixed, and the latter sometimes provides
1148	# significant advantages.
1149	#
1150	select ARCH_HAS_SETUP_DMA_OPS
1151	select ARCH_HAS_DMA_WRITE_COMBINE
1152	select ARCH_HAS_DMA_PREP_COHERENT
1153	select ARCH_HAS_SYNC_DMA_FOR_CPU
1154	select ARCH_HAS_SYNC_DMA_FOR_DEVICE
1155	select ARCH_HAS_DMA_SET_UNCACHED
1156	select DMA_NONCOHERENT_MMAP
1157	select NEED_DMA_MAP_STATE
1158
1159config SYS_HAS_EARLY_PRINTK
1160	bool
1161
1162config SYS_SUPPORTS_HOTPLUG_CPU
1163	bool
1164
1165config MIPS_BONITO64
1166	bool
1167
1168config MIPS_MSC
1169	bool
1170
1171config SYNC_R4K
1172	bool
1173
1174config NO_IOPORT_MAP
1175	def_bool n
1176
1177config GENERIC_CSUM
1178	def_bool CPU_NO_LOAD_STORE_LR
1179
1180config GENERIC_ISA_DMA
1181	bool
1182	select ZONE_DMA if GENERIC_ISA_DMA_SUPPORT_BROKEN=n
1183	select ISA_DMA_API
1184
1185config GENERIC_ISA_DMA_SUPPORT_BROKEN
1186	bool
1187	select GENERIC_ISA_DMA
1188
1189config HAVE_PLAT_DELAY
1190	bool
1191
1192config HAVE_PLAT_FW_INIT_CMDLINE
1193	bool
1194
1195config HAVE_PLAT_MEMCPY
1196	bool
1197
1198config ISA_DMA_API
1199	bool
1200
1201config SYS_SUPPORTS_RELOCATABLE
1202	bool
1203	help
1204	  Selected if the platform supports relocating the kernel.
1205	  The platform must provide plat_get_fdt() if it selects CONFIG_USE_OF
1206	  to allow access to command line and entropy sources.
1207
1208#
1209# Endianness selection.  Sufficiently obscure so many users don't know what to
1210# answer,so we try hard to limit the available choices.  Also the use of a
1211# choice statement should be more obvious to the user.
1212#
1213choice
1214	prompt "Endianness selection"
1215	help
1216	  Some MIPS machines can be configured for either little or big endian
1217	  byte order. These modes require different kernels and a different
1218	  Linux distribution.  In general there is one preferred byteorder for a
1219	  particular system but some systems are just as commonly used in the
1220	  one or the other endianness.
1221
1222config CPU_BIG_ENDIAN
1223	bool "Big endian"
1224	depends on SYS_SUPPORTS_BIG_ENDIAN
1225
1226config CPU_LITTLE_ENDIAN
1227	bool "Little endian"
1228	depends on SYS_SUPPORTS_LITTLE_ENDIAN
1229
1230endchoice
1231
1232config EXPORT_UASM
1233	bool
1234
1235config SYS_SUPPORTS_APM_EMULATION
1236	bool
1237
1238config SYS_SUPPORTS_BIG_ENDIAN
1239	bool
1240
1241config SYS_SUPPORTS_LITTLE_ENDIAN
1242	bool
1243
1244config MIPS_HUGE_TLB_SUPPORT
1245	def_bool HUGETLB_PAGE || TRANSPARENT_HUGEPAGE
1246
1247config IRQ_TXX9
1248	bool
1249
1250config IRQ_GT641XX
1251	bool
1252
1253config PCI_GT64XXX_PCI0
1254	bool
1255
1256config PCI_XTALK_BRIDGE
1257	bool
1258
1259config NO_EXCEPT_FILL
1260	bool
1261
1262config MIPS_SPRAM
1263	bool
1264
1265config SWAP_IO_SPACE
1266	bool
1267
1268config SGI_HAS_INDYDOG
1269	bool
1270
1271config SGI_HAS_HAL2
1272	bool
1273
1274config SGI_HAS_SEEQ
1275	bool
1276
1277config SGI_HAS_WD93
1278	bool
1279
1280config SGI_HAS_ZILOG
1281	bool
1282
1283config SGI_HAS_I8042
1284	bool
1285
1286config DEFAULT_SGI_PARTITION
1287	bool
1288
1289config FW_ARC32
1290	bool
1291
1292config FW_SNIPROM
1293	bool
1294
1295config BOOT_ELF32
1296	bool
1297
1298config MIPS_L1_CACHE_SHIFT_4
1299	bool
1300
1301config MIPS_L1_CACHE_SHIFT_5
1302	bool
1303
1304config MIPS_L1_CACHE_SHIFT_6
1305	bool
1306
1307config MIPS_L1_CACHE_SHIFT_7
1308	bool
1309
1310config MIPS_L1_CACHE_SHIFT
1311	int
1312	default "7" if MIPS_L1_CACHE_SHIFT_7
1313	default "6" if MIPS_L1_CACHE_SHIFT_6
1314	default "5" if MIPS_L1_CACHE_SHIFT_5
1315	default "4" if MIPS_L1_CACHE_SHIFT_4
1316	default "5"
1317
1318config ARC_CMDLINE_ONLY
1319	bool
1320
1321config ARC_CONSOLE
1322	bool "ARC console support"
1323	depends on SGI_IP22 || SGI_IP28 || (SNI_RM && CPU_LITTLE_ENDIAN)
1324
1325config ARC_MEMORY
1326	bool
1327
1328config ARC_PROMLIB
1329	bool
1330
1331config FW_ARC64
1332	bool
1333
1334config BOOT_ELF64
1335	bool
1336
1337menu "CPU selection"
1338
1339choice
1340	prompt "CPU type"
1341	default CPU_R4X00
1342
1343config CPU_LOONGSON64
1344	bool "Loongson 64-bit CPU"
1345	depends on SYS_HAS_CPU_LOONGSON64
1346	select ARCH_HAS_PHYS_TO_DMA
1347	select CPU_MIPSR2
1348	select CPU_HAS_PREFETCH
1349	select CPU_SUPPORTS_64BIT_KERNEL
1350	select CPU_SUPPORTS_HIGHMEM
1351	select CPU_SUPPORTS_HUGEPAGES
1352	select CPU_SUPPORTS_MSA
1353	select CPU_SUPPORTS_VZ
1354	select CPU_DIEI_BROKEN if !LOONGSON3_ENHANCEMENT
1355	select CPU_MIPSR2_IRQ_VI
1356	select DMA_NONCOHERENT
1357	select WEAK_ORDERING
1358	select WEAK_REORDERING_BEYOND_LLSC
1359	select MIPS_ASID_BITS_VARIABLE
1360	select MIPS_PGD_C0_CONTEXT
1361	select MIPS_L1_CACHE_SHIFT_6
1362	select MIPS_FP_SUPPORT
1363	select GPIOLIB
1364	select SWIOTLB
1365	help
1366	  The Loongson GSx64(GS264/GS464/GS464E/GS464V) series of processor
1367	  cores implements the MIPS64R2 instruction set with many extensions,
1368	  including most 64-bit Loongson-2 (2H, 2K) and Loongson-3 (3A1000,
1369	  3B1000, 3B1500, 3A2000, 3A3000 and 3A4000) processors. However, old
1370	  Loongson-2E/2F is not covered here and will be removed in future.
1371
1372config CPU_LOONGSON2E
1373	bool "Loongson 2E"
1374	depends on SYS_HAS_CPU_LOONGSON2E
1375	select CPU_LOONGSON2EF
1376	help
1377	  The Loongson 2E processor implements the MIPS III instruction set
1378	  with many extensions.
1379
1380	  It has an internal FPGA northbridge, which is compatible to
1381	  bonito64.
1382
1383config CPU_LOONGSON2F
1384	bool "Loongson 2F"
1385	depends on SYS_HAS_CPU_LOONGSON2F
1386	select CPU_LOONGSON2EF
1387	help
1388	  The Loongson 2F processor implements the MIPS III instruction set
1389	  with many extensions.
1390
1391	  Loongson2F have built-in DDR2 and PCIX controller. The PCIX controller
1392	  have a similar programming interface with FPGA northbridge used in
1393	  Loongson2E.
1394
1395config CPU_LOONGSON32
1396	bool "Loongson 32-bit CPU"
1397	depends on SYS_HAS_CPU_LOONGSON32
1398	select CPU_MIPS32
1399	select CPU_MIPSR2
1400	select CPU_HAS_PREFETCH
1401	select CPU_SUPPORTS_32BIT_KERNEL
1402	select CPU_SUPPORTS_HIGHMEM
1403	select CPU_SUPPORTS_CPUFREQ
1404	select LEDS_GPIO_REGISTER
1405	help
1406	  The Loongson GS232 microarchitecture implements the MIPS32 Release 1
1407	  instruction set and part of the MIPS32 Release 2 instruction set.
1408
1409config CPU_MIPS32_R1
1410	bool "MIPS32 Release 1"
1411	depends on SYS_HAS_CPU_MIPS32_R1
1412	select CPU_HAS_PREFETCH
1413	select CPU_SUPPORTS_32BIT_KERNEL
1414	select CPU_SUPPORTS_HIGHMEM
1415	help
1416	  Choose this option to build a kernel for release 1 or later of the
1417	  MIPS32 architecture.  Most modern embedded systems with a 32-bit
1418	  MIPS processor are based on a MIPS32 processor.  If you know the
1419	  specific type of processor in your system, choose those that one
1420	  otherwise CPU_MIPS32_R1 is a safe bet for any MIPS32 system.
1421	  Release 2 of the MIPS32 architecture is available since several
1422	  years so chances are you even have a MIPS32 Release 2 processor
1423	  in which case you should choose CPU_MIPS32_R2 instead for better
1424	  performance.
1425
1426config CPU_MIPS32_R2
1427	bool "MIPS32 Release 2"
1428	depends on SYS_HAS_CPU_MIPS32_R2
1429	select CPU_HAS_PREFETCH
1430	select CPU_SUPPORTS_32BIT_KERNEL
1431	select CPU_SUPPORTS_HIGHMEM
1432	select CPU_SUPPORTS_MSA
1433	help
1434	  Choose this option to build a kernel for release 2 or later of the
1435	  MIPS32 architecture.  Most modern embedded systems with a 32-bit
1436	  MIPS processor are based on a MIPS32 processor.  If you know the
1437	  specific type of processor in your system, choose those that one
1438	  otherwise CPU_MIPS32_R1 is a safe bet for any MIPS32 system.
1439
1440config CPU_MIPS32_R5
1441	bool "MIPS32 Release 5"
1442	depends on SYS_HAS_CPU_MIPS32_R5
1443	select CPU_HAS_PREFETCH
1444	select CPU_SUPPORTS_32BIT_KERNEL
1445	select CPU_SUPPORTS_HIGHMEM
1446	select CPU_SUPPORTS_MSA
1447	select CPU_SUPPORTS_VZ
1448	select MIPS_O32_FP64_SUPPORT
1449	help
1450	  Choose this option to build a kernel for release 5 or later of the
1451	  MIPS32 architecture.  New MIPS processors, starting with the Warrior
1452	  family, are based on a MIPS32r5 processor. If you own an older
1453	  processor, you probably need to select MIPS32r1 or MIPS32r2 instead.
1454
1455config CPU_MIPS32_R6
1456	bool "MIPS32 Release 6"
1457	depends on SYS_HAS_CPU_MIPS32_R6
1458	select CPU_HAS_PREFETCH
1459	select CPU_NO_LOAD_STORE_LR
1460	select CPU_SUPPORTS_32BIT_KERNEL
1461	select CPU_SUPPORTS_HIGHMEM
1462	select CPU_SUPPORTS_MSA
1463	select CPU_SUPPORTS_VZ
1464	select MIPS_O32_FP64_SUPPORT
1465	help
1466	  Choose this option to build a kernel for release 6 or later of the
1467	  MIPS32 architecture.  New MIPS processors, starting with the Warrior
1468	  family, are based on a MIPS32r6 processor. If you own an older
1469	  processor, you probably need to select MIPS32r1 or MIPS32r2 instead.
1470
1471config CPU_MIPS64_R1
1472	bool "MIPS64 Release 1"
1473	depends on SYS_HAS_CPU_MIPS64_R1
1474	select CPU_HAS_PREFETCH
1475	select CPU_SUPPORTS_32BIT_KERNEL
1476	select CPU_SUPPORTS_64BIT_KERNEL
1477	select CPU_SUPPORTS_HIGHMEM
1478	select CPU_SUPPORTS_HUGEPAGES
1479	help
1480	  Choose this option to build a kernel for release 1 or later of the
1481	  MIPS64 architecture.  Many modern embedded systems with a 64-bit
1482	  MIPS processor are based on a MIPS64 processor.  If you know the
1483	  specific type of processor in your system, choose those that one
1484	  otherwise CPU_MIPS64_R1 is a safe bet for any MIPS64 system.
1485	  Release 2 of the MIPS64 architecture is available since several
1486	  years so chances are you even have a MIPS64 Release 2 processor
1487	  in which case you should choose CPU_MIPS64_R2 instead for better
1488	  performance.
1489
1490config CPU_MIPS64_R2
1491	bool "MIPS64 Release 2"
1492	depends on SYS_HAS_CPU_MIPS64_R2
1493	select CPU_HAS_PREFETCH
1494	select CPU_SUPPORTS_32BIT_KERNEL
1495	select CPU_SUPPORTS_64BIT_KERNEL
1496	select CPU_SUPPORTS_HIGHMEM
1497	select CPU_SUPPORTS_HUGEPAGES
1498	select CPU_SUPPORTS_MSA
1499	help
1500	  Choose this option to build a kernel for release 2 or later of the
1501	  MIPS64 architecture.  Many modern embedded systems with a 64-bit
1502	  MIPS processor are based on a MIPS64 processor.  If you know the
1503	  specific type of processor in your system, choose those that one
1504	  otherwise CPU_MIPS64_R1 is a safe bet for any MIPS64 system.
1505
1506config CPU_MIPS64_R5
1507	bool "MIPS64 Release 5"
1508	depends on SYS_HAS_CPU_MIPS64_R5
1509	select CPU_HAS_PREFETCH
1510	select CPU_SUPPORTS_32BIT_KERNEL
1511	select CPU_SUPPORTS_64BIT_KERNEL
1512	select CPU_SUPPORTS_HIGHMEM
1513	select CPU_SUPPORTS_HUGEPAGES
1514	select CPU_SUPPORTS_MSA
1515	select MIPS_O32_FP64_SUPPORT if 32BIT || MIPS32_O32
1516	select CPU_SUPPORTS_VZ
1517	help
1518	  Choose this option to build a kernel for release 5 or later of the
1519	  MIPS64 architecture.  This is a intermediate MIPS architecture
1520	  release partly implementing release 6 features. Though there is no
1521	  any hardware known to be based on this release.
1522
1523config CPU_MIPS64_R6
1524	bool "MIPS64 Release 6"
1525	depends on SYS_HAS_CPU_MIPS64_R6
1526	select CPU_HAS_PREFETCH
1527	select CPU_NO_LOAD_STORE_LR
1528	select CPU_SUPPORTS_32BIT_KERNEL
1529	select CPU_SUPPORTS_64BIT_KERNEL
1530	select CPU_SUPPORTS_HIGHMEM
1531	select CPU_SUPPORTS_HUGEPAGES
1532	select CPU_SUPPORTS_MSA
1533	select MIPS_O32_FP64_SUPPORT if 32BIT || MIPS32_O32
1534	select CPU_SUPPORTS_VZ
1535	help
1536	  Choose this option to build a kernel for release 6 or later of the
1537	  MIPS64 architecture.  New MIPS processors, starting with the Warrior
1538	  family, are based on a MIPS64r6 processor. If you own an older
1539	  processor, you probably need to select MIPS64r1 or MIPS64r2 instead.
1540
1541config CPU_P5600
1542	bool "MIPS Warrior P5600"
1543	depends on SYS_HAS_CPU_P5600
1544	select CPU_HAS_PREFETCH
1545	select CPU_SUPPORTS_32BIT_KERNEL
1546	select CPU_SUPPORTS_HIGHMEM
1547	select CPU_SUPPORTS_MSA
1548	select CPU_SUPPORTS_CPUFREQ
1549	select CPU_SUPPORTS_VZ
1550	select CPU_MIPSR2_IRQ_VI
1551	select CPU_MIPSR2_IRQ_EI
1552	select MIPS_O32_FP64_SUPPORT
1553	help
1554	  Choose this option to build a kernel for MIPS Warrior P5600 CPU.
1555	  It's based on MIPS32r5 ISA with XPA, EVA, dual/quad issue exec pipes,
1556	  MMU with two-levels TLB, UCA, MSA, MDU core level features and system
1557	  level features like up to six P5600 calculation cores, CM2 with L2
1558	  cache, IOCU/IOMMU (though might be unused depending on the system-
1559	  specific IP core configuration), GIC, CPC, virtualisation module,
1560	  eJTAG and PDtrace.
1561
1562config CPU_R3000
1563	bool "R3000"
1564	depends on SYS_HAS_CPU_R3000
1565	select CPU_HAS_WB
1566	select CPU_R3K_TLB
1567	select CPU_SUPPORTS_32BIT_KERNEL
1568	select CPU_SUPPORTS_HIGHMEM
1569	help
1570	  Please make sure to pick the right CPU type. Linux/MIPS is not
1571	  designed to be generic, i.e. Kernels compiled for R3000 CPUs will
1572	  *not* work on R4000 machines and vice versa.  However, since most
1573	  of the supported machines have an R4000 (or similar) CPU, R4x00
1574	  might be a safe bet.  If the resulting kernel does not work,
1575	  try to recompile with R3000.
1576
1577config CPU_R4300
1578	bool "R4300"
1579	depends on SYS_HAS_CPU_R4300
1580	select CPU_SUPPORTS_32BIT_KERNEL
1581	select CPU_SUPPORTS_64BIT_KERNEL
1582	help
1583	  MIPS Technologies R4300-series processors.
1584
1585config CPU_R4X00
1586	bool "R4x00"
1587	depends on SYS_HAS_CPU_R4X00
1588	select CPU_SUPPORTS_32BIT_KERNEL
1589	select CPU_SUPPORTS_64BIT_KERNEL
1590	select CPU_SUPPORTS_HUGEPAGES
1591	help
1592	  MIPS Technologies R4000-series processors other than 4300, including
1593	  the R4000, R4400, R4600, and 4700.
1594
1595config CPU_TX49XX
1596	bool "R49XX"
1597	depends on SYS_HAS_CPU_TX49XX
1598	select CPU_HAS_PREFETCH
1599	select CPU_SUPPORTS_32BIT_KERNEL
1600	select CPU_SUPPORTS_64BIT_KERNEL
1601	select CPU_SUPPORTS_HUGEPAGES
1602
1603config CPU_R5000
1604	bool "R5000"
1605	depends on SYS_HAS_CPU_R5000
1606	select CPU_SUPPORTS_32BIT_KERNEL
1607	select CPU_SUPPORTS_64BIT_KERNEL
1608	select CPU_SUPPORTS_HUGEPAGES
1609	help
1610	  MIPS Technologies R5000-series processors other than the Nevada.
1611
1612config CPU_R5500
1613	bool "R5500"
1614	depends on SYS_HAS_CPU_R5500
1615	select CPU_SUPPORTS_32BIT_KERNEL
1616	select CPU_SUPPORTS_64BIT_KERNEL
1617	select CPU_SUPPORTS_HUGEPAGES
1618	help
1619	  NEC VR5500 and VR5500A series processors implement 64-bit MIPS IV
1620	  instruction set.
1621
1622config CPU_NEVADA
1623	bool "RM52xx"
1624	depends on SYS_HAS_CPU_NEVADA
1625	select CPU_SUPPORTS_32BIT_KERNEL
1626	select CPU_SUPPORTS_64BIT_KERNEL
1627	select CPU_SUPPORTS_HUGEPAGES
1628	help
1629	  QED / PMC-Sierra RM52xx-series ("Nevada") processors.
1630
1631config CPU_R10000
1632	bool "R10000"
1633	depends on SYS_HAS_CPU_R10000
1634	select CPU_HAS_PREFETCH
1635	select CPU_SUPPORTS_32BIT_KERNEL
1636	select CPU_SUPPORTS_64BIT_KERNEL
1637	select CPU_SUPPORTS_HIGHMEM
1638	select CPU_SUPPORTS_HUGEPAGES
1639	help
1640	  MIPS Technologies R10000-series processors.
1641
1642config CPU_RM7000
1643	bool "RM7000"
1644	depends on SYS_HAS_CPU_RM7000
1645	select CPU_HAS_PREFETCH
1646	select CPU_SUPPORTS_32BIT_KERNEL
1647	select CPU_SUPPORTS_64BIT_KERNEL
1648	select CPU_SUPPORTS_HIGHMEM
1649	select CPU_SUPPORTS_HUGEPAGES
1650
1651config CPU_SB1
1652	bool "SB1"
1653	depends on SYS_HAS_CPU_SB1
1654	select CPU_SUPPORTS_32BIT_KERNEL
1655	select CPU_SUPPORTS_64BIT_KERNEL
1656	select CPU_SUPPORTS_HIGHMEM
1657	select CPU_SUPPORTS_HUGEPAGES
1658	select WEAK_ORDERING
1659
1660config CPU_CAVIUM_OCTEON
1661	bool "Cavium Octeon processor"
1662	depends on SYS_HAS_CPU_CAVIUM_OCTEON
1663	select CPU_HAS_PREFETCH
1664	select CPU_SUPPORTS_64BIT_KERNEL
1665	select HAVE_PAGE_SIZE_8KB if !MIPS_VA_BITS_48
1666	select HAVE_PAGE_SIZE_32KB if !MIPS_VA_BITS_48
1667	select WEAK_ORDERING
1668	select CPU_SUPPORTS_HIGHMEM
1669	select CPU_SUPPORTS_HUGEPAGES
1670	select USB_EHCI_BIG_ENDIAN_MMIO if CPU_BIG_ENDIAN
1671	select USB_OHCI_BIG_ENDIAN_MMIO if CPU_BIG_ENDIAN
1672	select MIPS_L1_CACHE_SHIFT_7
1673	select CPU_SUPPORTS_VZ
1674	help
1675	  The Cavium Octeon processor is a highly integrated chip containing
1676	  many ethernet hardware widgets for networking tasks. The processor
1677	  can have up to 16 Mips64v2 cores and 8 integrated gigabit ethernets.
1678	  Full details can be found at http://www.caviumnetworks.com.
1679
1680config CPU_BMIPS
1681	bool "Broadcom BMIPS"
1682	depends on SYS_HAS_CPU_BMIPS
1683	select CPU_MIPS32
1684	select CPU_BMIPS32_3300 if SYS_HAS_CPU_BMIPS32_3300
1685	select CPU_BMIPS4350 if SYS_HAS_CPU_BMIPS4350
1686	select CPU_BMIPS4380 if SYS_HAS_CPU_BMIPS4380
1687	select CPU_BMIPS5000 if SYS_HAS_CPU_BMIPS5000
1688	select CPU_SUPPORTS_32BIT_KERNEL
1689	select DMA_NONCOHERENT
1690	select IRQ_MIPS_CPU
1691	select SWAP_IO_SPACE
1692	select WEAK_ORDERING
1693	select CPU_SUPPORTS_HIGHMEM
1694	select CPU_HAS_PREFETCH
1695	select CPU_SUPPORTS_CPUFREQ
1696	select MIPS_EXTERNAL_TIMER
1697	select GENERIC_IRQ_MIGRATION if HOTPLUG_CPU
1698	help
1699	  Support for BMIPS32/3300/4350/4380 and BMIPS5000 processors.
1700
1701endchoice
1702
1703config LOONGSON3_ENHANCEMENT
1704	bool "New Loongson-3 CPU Enhancements"
1705	default n
1706	depends on CPU_LOONGSON64
1707	help
1708	  New Loongson-3 cores (since Loongson-3A R2, as opposed to Loongson-3A
1709	  R1, Loongson-3B R1 and Loongson-3B R2) has many enhancements, such as
1710	  FTLB, L1-VCache, EI/DI/Wait/Prefetch instruction, DSP/DSPr2 ASE, User
1711	  Local register, Read-Inhibit/Execute-Inhibit, SFB (Store Fill Buffer),
1712	  Fast TLB refill support, etc.
1713
1714	  This option enable those enhancements which are not probed at run
1715	  time. If you want a generic kernel to run on all Loongson 3 machines,
1716	  please say 'N' here. If you want a high-performance kernel to run on
1717	  new Loongson-3 machines only, please say 'Y' here.
1718
1719config CPU_LOONGSON3_WORKAROUNDS
1720	bool "Loongson-3 LLSC Workarounds"
1721	default y if SMP
1722	depends on CPU_LOONGSON64
1723	help
1724	  Loongson-3 processors have the llsc issues which require workarounds.
1725	  Without workarounds the system may hang unexpectedly.
1726
1727	  Say Y, unless you know what you are doing.
1728
1729config CPU_LOONGSON3_CPUCFG_EMULATION
1730	bool "Emulate the CPUCFG instruction on older Loongson cores"
1731	default y
1732	depends on CPU_LOONGSON64
1733	help
1734	  Loongson-3A R4 and newer have the CPUCFG instruction available for
1735	  userland to query CPU capabilities, much like CPUID on x86. This
1736	  option provides emulation of the instruction on older Loongson
1737	  cores, back to Loongson-3A1000.
1738
1739	  If unsure, please say Y.
1740
1741config CPU_MIPS32_3_5_FEATURES
1742	bool "MIPS32 Release 3.5 Features"
1743	depends on SYS_HAS_CPU_MIPS32_R3_5
1744	depends on CPU_MIPS32_R2 || CPU_MIPS32_R5 || CPU_MIPS32_R6 || \
1745		   CPU_P5600
1746	help
1747	  Choose this option to build a kernel for release 2 or later of the
1748	  MIPS32 architecture including features from the 3.5 release such as
1749	  support for Enhanced Virtual Addressing (EVA).
1750
1751config CPU_MIPS32_3_5_EVA
1752	bool "Enhanced Virtual Addressing (EVA)"
1753	depends on CPU_MIPS32_3_5_FEATURES
1754	select EVA
1755	default y
1756	help
1757	  Choose this option if you want to enable the Enhanced Virtual
1758	  Addressing (EVA) on your MIPS32 core (such as proAptiv).
1759	  One of its primary benefits is an increase in the maximum size
1760	  of lowmem (up to 3GB). If unsure, say 'N' here.
1761
1762config CPU_MIPS32_R5_FEATURES
1763	bool "MIPS32 Release 5 Features"
1764	depends on SYS_HAS_CPU_MIPS32_R5
1765	depends on CPU_MIPS32_R2 || CPU_MIPS32_R5 || CPU_P5600
1766	help
1767	  Choose this option to build a kernel for release 2 or later of the
1768	  MIPS32 architecture including features from release 5 such as
1769	  support for Extended Physical Addressing (XPA).
1770
1771config CPU_MIPS32_R5_XPA
1772	bool "Extended Physical Addressing (XPA)"
1773	depends on CPU_MIPS32_R5_FEATURES
1774	depends on !EVA
1775	depends on !PAGE_SIZE_4KB
1776	depends on SYS_SUPPORTS_HIGHMEM
1777	select XPA
1778	select HIGHMEM
1779	select PHYS_ADDR_T_64BIT
1780	default n
1781	help
1782	  Choose this option if you want to enable the Extended Physical
1783	  Addressing (XPA) on your MIPS32 core (such as P5600 series). The
1784	  benefit is to increase physical addressing equal to or greater
1785	  than 40 bits. Note that this has the side effect of turning on
1786	  64-bit addressing which in turn makes the PTEs 64-bit in size.
1787	  If unsure, say 'N' here.
1788
1789if CPU_LOONGSON2F
1790config CPU_NOP_WORKAROUNDS
1791	bool
1792
1793config CPU_JUMP_WORKAROUNDS
1794	bool
1795
1796config CPU_LOONGSON2F_WORKAROUNDS
1797	bool "Loongson 2F Workarounds"
1798	default y
1799	select CPU_NOP_WORKAROUNDS
1800	select CPU_JUMP_WORKAROUNDS
1801	help
1802	  Loongson 2F01 / 2F02 processors have the NOP & JUMP issues which
1803	  require workarounds.  Without workarounds the system may hang
1804	  unexpectedly.  For more information please refer to the gas
1805	  -mfix-loongson2f-nop and -mfix-loongson2f-jump options.
1806
1807	  Loongson 2F03 and later have fixed these issues and no workarounds
1808	  are needed.  The workarounds have no significant side effect on them
1809	  but may decrease the performance of the system so this option should
1810	  be disabled unless the kernel is intended to be run on 2F01 or 2F02
1811	  systems.
1812
1813	  If unsure, please say Y.
1814endif # CPU_LOONGSON2F
1815
1816config SYS_SUPPORTS_ZBOOT
1817	bool
1818	select HAVE_KERNEL_GZIP
1819	select HAVE_KERNEL_BZIP2
1820	select HAVE_KERNEL_LZ4
1821	select HAVE_KERNEL_LZMA
1822	select HAVE_KERNEL_LZO
1823	select HAVE_KERNEL_XZ
1824	select HAVE_KERNEL_ZSTD
1825
1826config SYS_SUPPORTS_ZBOOT_UART16550
1827	bool
1828	select SYS_SUPPORTS_ZBOOT
1829
1830config SYS_SUPPORTS_ZBOOT_UART_PROM
1831	bool
1832	select SYS_SUPPORTS_ZBOOT
1833
1834config CPU_LOONGSON2EF
1835	bool
1836	select CPU_SUPPORTS_32BIT_KERNEL
1837	select CPU_SUPPORTS_64BIT_KERNEL
1838	select CPU_SUPPORTS_HIGHMEM
1839	select CPU_SUPPORTS_HUGEPAGES
1840	select RTC_MC146818_LIB
1841
1842config CPU_BMIPS32_3300
1843	select SMP_UP if SMP
1844	bool
1845
1846config CPU_BMIPS4350
1847	bool
1848	select SYS_SUPPORTS_SMP
1849	select SYS_SUPPORTS_HOTPLUG_CPU
1850
1851config CPU_BMIPS4380
1852	bool
1853	select MIPS_L1_CACHE_SHIFT_6
1854	select SYS_SUPPORTS_SMP
1855	select SYS_SUPPORTS_HOTPLUG_CPU
1856	select CPU_HAS_RIXI
1857
1858config CPU_BMIPS5000
1859	bool
1860	select MIPS_CPU_SCACHE
1861	select MIPS_L1_CACHE_SHIFT_7
1862	select SYS_SUPPORTS_SMP
1863	select SYS_SUPPORTS_HOTPLUG_CPU
1864	select CPU_HAS_RIXI
1865
1866config SYS_HAS_CPU_LOONGSON64
1867	bool
1868	select CPU_SUPPORTS_CPUFREQ
1869	select CPU_HAS_RIXI
1870
1871config SYS_HAS_CPU_LOONGSON2E
1872	bool
1873
1874config SYS_HAS_CPU_LOONGSON2F
1875	bool
1876	select CPU_SUPPORTS_CPUFREQ
1877	select CPU_SUPPORTS_ADDRWINCFG if 64BIT
1878
1879config SYS_HAS_CPU_LOONGSON32
1880	bool
1881
1882config SYS_HAS_CPU_MIPS32_R1
1883	bool
1884
1885config SYS_HAS_CPU_MIPS32_R2
1886	bool
1887
1888config SYS_HAS_CPU_MIPS32_R3_5
1889	bool
1890
1891config SYS_HAS_CPU_MIPS32_R5
1892	bool
1893
1894config SYS_HAS_CPU_MIPS32_R6
1895	bool
1896
1897config SYS_HAS_CPU_MIPS64_R1
1898	bool
1899
1900config SYS_HAS_CPU_MIPS64_R2
1901	bool
1902
1903config SYS_HAS_CPU_MIPS64_R5
1904	bool
1905
1906config SYS_HAS_CPU_MIPS64_R6
1907	bool
1908
1909config SYS_HAS_CPU_P5600
1910	bool
1911
1912config SYS_HAS_CPU_R3000
1913	bool
1914
1915config SYS_HAS_CPU_R4300
1916	bool
1917
1918config SYS_HAS_CPU_R4X00
1919	bool
1920
1921config SYS_HAS_CPU_TX49XX
1922	bool
1923
1924config SYS_HAS_CPU_R5000
1925	bool
1926
1927config SYS_HAS_CPU_R5500
1928	bool
1929
1930config SYS_HAS_CPU_NEVADA
1931	bool
1932
1933config SYS_HAS_CPU_R10000
1934	bool
1935
1936config SYS_HAS_CPU_RM7000
1937	bool
1938
1939config SYS_HAS_CPU_SB1
1940	bool
1941
1942config SYS_HAS_CPU_CAVIUM_OCTEON
1943	bool
1944
1945config SYS_HAS_CPU_BMIPS
1946	bool
1947
1948config SYS_HAS_CPU_BMIPS32_3300
1949	bool
1950	select SYS_HAS_CPU_BMIPS
1951
1952config SYS_HAS_CPU_BMIPS4350
1953	bool
1954	select SYS_HAS_CPU_BMIPS
1955
1956config SYS_HAS_CPU_BMIPS4380
1957	bool
1958	select SYS_HAS_CPU_BMIPS
1959
1960config SYS_HAS_CPU_BMIPS5000
1961	bool
1962	select SYS_HAS_CPU_BMIPS
1963
1964#
1965# CPU may reorder R->R, R->W, W->R, W->W
1966# Reordering beyond LL and SC is handled in WEAK_REORDERING_BEYOND_LLSC
1967#
1968config WEAK_ORDERING
1969	bool
1970
1971#
1972# CPU may reorder reads and writes beyond LL/SC
1973# CPU may reorder R->LL, R->LL, W->LL, W->LL, R->SC, R->SC, W->SC, W->SC
1974#
1975config WEAK_REORDERING_BEYOND_LLSC
1976	bool
1977endmenu
1978
1979#
1980# These two indicate any level of the MIPS32 and MIPS64 architecture
1981#
1982config CPU_MIPS32
1983	bool
1984	default y if CPU_MIPS32_R1 || CPU_MIPS32_R2 || CPU_MIPS32_R5 || \
1985		     CPU_MIPS32_R6 || CPU_P5600
1986
1987config CPU_MIPS64
1988	bool
1989	default y if CPU_MIPS64_R1 || CPU_MIPS64_R2 || CPU_MIPS64_R5 || \
1990		     CPU_MIPS64_R6 || CPU_LOONGSON64 || CPU_CAVIUM_OCTEON
1991
1992#
1993# These indicate the revision of the architecture
1994#
1995config CPU_MIPSR1
1996	bool
1997	default y if CPU_MIPS32_R1 || CPU_MIPS64_R1
1998
1999config CPU_MIPSR2
2000	bool
2001	default y if CPU_MIPS32_R2 || CPU_MIPS64_R2 || CPU_CAVIUM_OCTEON
2002	select CPU_HAS_RIXI
2003	select CPU_HAS_DIEI if !CPU_DIEI_BROKEN
2004	select MIPS_SPRAM
2005
2006config CPU_MIPSR5
2007	bool
2008	default y if CPU_MIPS32_R5 || CPU_MIPS64_R5 || CPU_P5600
2009	select CPU_HAS_RIXI
2010	select CPU_HAS_DIEI if !CPU_DIEI_BROKEN
2011	select MIPS_SPRAM
2012
2013config CPU_MIPSR6
2014	bool
2015	default y if CPU_MIPS32_R6 || CPU_MIPS64_R6
2016	select CPU_HAS_RIXI
2017	select CPU_HAS_DIEI if !CPU_DIEI_BROKEN
2018	select HAVE_ARCH_BITREVERSE if BITREVERSE
2019	select MIPS_ASID_BITS_VARIABLE
2020	select MIPS_SPRAM
2021
2022config TARGET_ISA_REV
2023	int
2024	default 1 if CPU_MIPSR1
2025	default 2 if CPU_MIPSR2
2026	default 5 if CPU_MIPSR5
2027	default 6 if CPU_MIPSR6
2028	default 0
2029	help
2030	  Reflects the ISA revision being targeted by the kernel build. This
2031	  is effectively the Kconfig equivalent of MIPS_ISA_REV.
2032
2033config EVA
2034	bool
2035
2036config XPA
2037	bool
2038
2039config SYS_SUPPORTS_32BIT_KERNEL
2040	bool
2041config SYS_SUPPORTS_64BIT_KERNEL
2042	bool
2043config CPU_SUPPORTS_32BIT_KERNEL
2044	bool
2045config CPU_SUPPORTS_64BIT_KERNEL
2046	bool
2047config CPU_SUPPORTS_CPUFREQ
2048	bool
2049config CPU_SUPPORTS_ADDRWINCFG
2050	bool
2051config CPU_SUPPORTS_HUGEPAGES
2052	bool
2053	depends on !(32BIT && (PHYS_ADDR_T_64BIT || EVA))
2054config CPU_SUPPORTS_VZ
2055	bool
2056config MIPS_PGD_C0_CONTEXT
2057	bool
2058	depends on 64BIT
2059	default y if (CPU_MIPSR2 || CPU_MIPSR6)
2060
2061#
2062# Set to y for ptrace access to watch registers.
2063#
2064config HARDWARE_WATCHPOINTS
2065	bool
2066	default y if CPU_MIPSR1 || CPU_MIPSR2 || CPU_MIPSR6
2067
2068menu "Kernel type"
2069
2070choice
2071	prompt "Kernel code model"
2072	help
2073	  You should only select this option if you have a workload that
2074	  actually benefits from 64-bit processing or if your machine has
2075	  large memory.  You will only be presented a single option in this
2076	  menu if your system does not support both 32-bit and 64-bit kernels.
2077
2078config 32BIT
2079	bool "32-bit kernel"
2080	depends on CPU_SUPPORTS_32BIT_KERNEL && SYS_SUPPORTS_32BIT_KERNEL
2081	select TRAD_SIGNALS
2082	help
2083	  Select this option if you want to build a 32-bit kernel.
2084
2085config 64BIT
2086	bool "64-bit kernel"
2087	depends on CPU_SUPPORTS_64BIT_KERNEL && SYS_SUPPORTS_64BIT_KERNEL
2088	help
2089	  Select this option if you want to build a 64-bit kernel.
2090
2091endchoice
2092
2093config MIPS_VA_BITS_48
2094	bool "48 bits virtual memory"
2095	depends on 64BIT
2096	help
2097	  Support a maximum at least 48 bits of application virtual
2098	  memory.  Default is 40 bits or less, depending on the CPU.
2099	  For page sizes 16k and above, this option results in a small
2100	  memory overhead for page tables.  For 4k page size, a fourth
2101	  level of page tables is added which imposes both a memory
2102	  overhead as well as slower TLB fault handling.
2103
2104	  If unsure, say N.
2105
2106config ZBOOT_LOAD_ADDRESS
2107	hex "Compressed kernel load address"
2108	default 0xffffffff80400000 if BCM47XX
2109	default 0x0
2110	depends on SYS_SUPPORTS_ZBOOT
2111	help
2112	  The address to load compressed kernel, aka vmlinuz.
2113
2114	  This is only used if non-zero.
2115
2116config ARCH_FORCE_MAX_ORDER
2117	int "Maximum zone order"
2118	default "13" if MIPS_HUGE_TLB_SUPPORT && PAGE_SIZE_64KB
2119	default "12" if MIPS_HUGE_TLB_SUPPORT && PAGE_SIZE_32KB
2120	default "11" if MIPS_HUGE_TLB_SUPPORT && PAGE_SIZE_16KB
2121	default "10"
2122	help
2123	  The kernel memory allocator divides physically contiguous memory
2124	  blocks into "zones", where each zone is a power of two number of
2125	  pages.  This option selects the largest power of two that the kernel
2126	  keeps in the memory allocator.  If you need to allocate very large
2127	  blocks of physically contiguous memory, then you may need to
2128	  increase this value.
2129
2130	  The page size is not necessarily 4KB.  Keep this in mind
2131	  when choosing a value for this option.
2132
2133config BOARD_SCACHE
2134	bool
2135
2136config IP22_CPU_SCACHE
2137	bool
2138	select BOARD_SCACHE
2139
2140#
2141# Support for a MIPS32 / MIPS64 style S-caches
2142#
2143config MIPS_CPU_SCACHE
2144	bool
2145	select BOARD_SCACHE
2146
2147config R5000_CPU_SCACHE
2148	bool
2149	select BOARD_SCACHE
2150
2151config RM7000_CPU_SCACHE
2152	bool
2153	select BOARD_SCACHE
2154
2155config SIBYTE_DMA_PAGEOPS
2156	bool "Use DMA to clear/copy pages"
2157	depends on CPU_SB1
2158	help
2159	  Instead of using the CPU to zero and copy pages, use a Data Mover
2160	  channel.  These DMA channels are otherwise unused by the standard
2161	  SiByte Linux port.  Seems to give a small performance benefit.
2162
2163config CPU_HAS_PREFETCH
2164	bool
2165
2166config CPU_GENERIC_DUMP_TLB
2167	bool
2168	default y if !CPU_R3000
2169
2170config MIPS_FP_SUPPORT
2171	bool "Floating Point support" if EXPERT
2172	default y
2173	help
2174	  Select y to include support for floating point in the kernel
2175	  including initialization of FPU hardware, FP context save & restore
2176	  and emulation of an FPU where necessary. Without this support any
2177	  userland program attempting to use floating point instructions will
2178	  receive a SIGILL.
2179
2180	  If you know that your userland will not attempt to use floating point
2181	  instructions then you can say n here to shrink the kernel a little.
2182
2183	  If unsure, say y.
2184
2185config CPU_R2300_FPU
2186	bool
2187	depends on MIPS_FP_SUPPORT
2188	default y if CPU_R3000
2189
2190config CPU_R3K_TLB
2191	bool
2192
2193config CPU_R4K_FPU
2194	bool
2195	depends on MIPS_FP_SUPPORT
2196	default y if !CPU_R2300_FPU
2197
2198config CPU_R4K_CACHE_TLB
2199	bool
2200	default y if !(CPU_R3K_TLB || CPU_SB1 || CPU_CAVIUM_OCTEON)
2201
2202config MIPS_MT_SMP
2203	bool "MIPS MT SMP support (1 TC on each available VPE)"
2204	default y
2205	depends on TARGET_ISA_REV > 0 && TARGET_ISA_REV < 6
2206	depends on SYS_SUPPORTS_MULTITHREADING && !CPU_MICROMIPS
2207	select CPU_MIPSR2_IRQ_VI
2208	select CPU_MIPSR2_IRQ_EI
2209	select SYNC_R4K
2210	select MIPS_MT
2211	select SMP
2212	select SMP_UP
2213	select SYS_SUPPORTS_SMP
2214	select ARCH_SUPPORTS_SCHED_SMT
2215	select MIPS_PERF_SHARED_TC_COUNTERS
2216	help
2217	  This is a kernel model which is known as SMVP. This is supported
2218	  on cores with the MT ASE and uses the available VPEs to implement
2219	  virtual processors which supports SMP. This is equivalent to the
2220	  Intel Hyperthreading feature. For further information go to
2221	  <http://www.imgtec.com/mips/mips-multithreading.asp>.
2222
2223config MIPS_MT
2224	bool
2225
2226config SYS_SUPPORTS_MULTITHREADING
2227	bool
2228
2229config MIPS_MT_FPAFF
2230	bool "Dynamic FPU affinity for FP-intensive threads"
2231	default y
2232	depends on MIPS_MT_SMP
2233
2234config MIPSR2_TO_R6_EMULATOR
2235	bool "MIPS R2-to-R6 emulator"
2236	depends on CPU_MIPSR6
2237	depends on MIPS_FP_SUPPORT
2238	default y
2239	help
2240	  Choose this option if you want to run non-R6 MIPS userland code.
2241	  Even if you say 'Y' here, the emulator will still be disabled by
2242	  default. You can enable it using the 'mipsr2emu' kernel option.
2243	  The only reason this is a build-time option is to save ~14K from the
2244	  final kernel image.
2245
2246config SYS_SUPPORTS_VPE_LOADER
2247	bool
2248	depends on SYS_SUPPORTS_MULTITHREADING
2249	help
2250	  Indicates that the platform supports the VPE loader, and provides
2251	  physical_memsize.
2252
2253config MIPS_VPE_LOADER
2254	bool "VPE loader support."
2255	depends on SYS_SUPPORTS_VPE_LOADER && MODULES
2256	select CPU_MIPSR2_IRQ_VI
2257	select CPU_MIPSR2_IRQ_EI
2258	select MIPS_MT
2259	help
2260	  Includes a loader for loading an elf relocatable object
2261	  onto another VPE and running it.
2262
2263config MIPS_VPE_LOADER_MT
2264	bool
2265	default "y"
2266	depends on MIPS_VPE_LOADER
2267
2268config MIPS_VPE_LOADER_TOM
2269	bool "Load VPE program into memory hidden from linux"
2270	depends on MIPS_VPE_LOADER
2271	default y
2272	help
2273	  The loader can use memory that is present but has been hidden from
2274	  Linux using the kernel command line option "mem=xxMB". It's up to
2275	  you to ensure the amount you put in the option and the space your
2276	  program requires is less or equal to the amount physically present.
2277
2278config MIPS_VPE_APSP_API
2279	bool "Enable support for AP/SP API (RTLX)"
2280	depends on MIPS_VPE_LOADER
2281
2282config MIPS_VPE_APSP_API_MT
2283	bool
2284	default "y"
2285	depends on MIPS_VPE_APSP_API
2286
2287config MIPS_CPS
2288	bool "MIPS Coherent Processing System support"
2289	depends on SYS_SUPPORTS_MIPS_CPS
2290	select MIPS_CM
2291	select MIPS_CPS_PM if HOTPLUG_CPU
2292	select SMP
2293	select HOTPLUG_SMT if HOTPLUG_PARALLEL
2294	select HOTPLUG_CORE_SYNC_DEAD if HOTPLUG_CPU
2295	select SYNC_R4K if (CEVT_R4K || CSRC_R4K)
2296	select SYS_SUPPORTS_HOTPLUG_CPU
2297	select ARCH_SUPPORTS_SCHED_SMT if CPU_MIPSR6
2298	select SYS_SUPPORTS_SMP
2299	select WEAK_ORDERING
2300	select GENERIC_IRQ_MIGRATION if HOTPLUG_CPU
2301	help
2302	  Select this if you wish to run an SMP kernel across multiple cores
2303	  within a MIPS Coherent Processing System. When this option is
2304	  enabled the kernel will probe for other cores and boot them with
2305	  no external assistance. It is safe to enable this when hardware
2306	  support is unavailable.
2307
2308config MIPS_CPS_PM
2309	depends on MIPS_CPS
2310	bool
2311
2312config MIPS_CM
2313	bool
2314	select MIPS_CPC
2315
2316config MIPS_CPC
2317	bool
2318
2319config SB1_PASS_2_WORKAROUNDS
2320	bool
2321	depends on CPU_SB1 && (CPU_SB1_PASS_2_2 || CPU_SB1_PASS_2)
2322	default y
2323
2324config SB1_PASS_2_1_WORKAROUNDS
2325	bool
2326	depends on CPU_SB1 && CPU_SB1_PASS_2
2327	default y
2328
2329choice
2330	prompt "SmartMIPS or microMIPS ASE support"
2331
2332config CPU_NEEDS_NO_SMARTMIPS_OR_MICROMIPS
2333	bool "None"
2334	help
2335	  Select this if you want neither microMIPS nor SmartMIPS support
2336
2337config CPU_HAS_SMARTMIPS
2338	depends on SYS_SUPPORTS_SMARTMIPS
2339	bool "SmartMIPS"
2340	help
2341	  SmartMIPS is a extension of the MIPS32 architecture aimed at
2342	  increased security at both hardware and software level for
2343	  smartcards.  Enabling this option will allow proper use of the
2344	  SmartMIPS instructions by Linux applications.  However a kernel with
2345	  this option will not work on a MIPS core without SmartMIPS core.  If
2346	  you don't know you probably don't have SmartMIPS and should say N
2347	  here.
2348
2349config CPU_MICROMIPS
2350	depends on 32BIT && SYS_SUPPORTS_MICROMIPS && !CPU_MIPSR6
2351	bool "microMIPS"
2352	help
2353	  When this option is enabled the kernel will be built using the
2354	  microMIPS ISA
2355
2356endchoice
2357
2358config CPU_HAS_MSA
2359	bool "Support for the MIPS SIMD Architecture"
2360	depends on CPU_SUPPORTS_MSA
2361	depends on MIPS_FP_SUPPORT
2362	depends on 64BIT || MIPS_O32_FP64_SUPPORT
2363	help
2364	  MIPS SIMD Architecture (MSA) introduces 128 bit wide vector registers
2365	  and a set of SIMD instructions to operate on them. When this option
2366	  is enabled the kernel will support allocating & switching MSA
2367	  vector register contexts. If you know that your kernel will only be
2368	  running on CPUs which do not support MSA or that your userland will
2369	  not be making use of it then you may wish to say N here to reduce
2370	  the size & complexity of your kernel.
2371
2372	  If unsure, say Y.
2373
2374config CPU_HAS_WB
2375	bool
2376
2377config XKS01
2378	bool
2379
2380config CPU_HAS_DIEI
2381	depends on !CPU_DIEI_BROKEN
2382	bool
2383
2384config CPU_DIEI_BROKEN
2385	bool
2386
2387config CPU_HAS_RIXI
2388	bool
2389
2390config CPU_NO_LOAD_STORE_LR
2391	bool
2392	help
2393	  CPU lacks support for unaligned load and store instructions:
2394	  LWL, LWR, SWL, SWR (Load/store word left/right).
2395	  LDL, LDR, SDL, SDR (Load/store doubleword left/right, for 64bit
2396	  systems).
2397
2398#
2399# Vectored interrupt mode is an R2 feature
2400#
2401config CPU_MIPSR2_IRQ_VI
2402	bool
2403
2404#
2405# Extended interrupt mode is an R2 feature
2406#
2407config CPU_MIPSR2_IRQ_EI
2408	bool
2409
2410config CPU_HAS_SYNC
2411	bool
2412	depends on !CPU_R3000
2413	default y
2414
2415#
2416# CPU non-features
2417#
2418
2419# Work around the "daddi" and "daddiu" CPU errata:
2420#
2421# - The `daddi' instruction fails to trap on overflow.
2422#   "MIPS R4000PC/SC Errata, Processor Revision 2.2 and 3.0",
2423#   erratum #23
2424#
2425# - The `daddiu' instruction can produce an incorrect result.
2426#   "MIPS R4000PC/SC Errata, Processor Revision 2.2 and 3.0",
2427#   erratum #41
2428#   "MIPS R4000MC Errata, Processor Revision 2.2 and 3.0", erratum
2429#   #15
2430#   "MIPS R4400PC/SC Errata, Processor Revision 1.0", erratum #7
2431#   "MIPS R4400MC Errata, Processor Revision 1.0", erratum #5
2432config CPU_DADDI_WORKAROUNDS
2433	bool
2434
2435# Work around certain R4000 CPU errata (as implemented by GCC):
2436#
2437# - A double-word or a variable shift may give an incorrect result
2438#   if executed immediately after starting an integer division:
2439#   "MIPS R4000PC/SC Errata, Processor Revision 2.2 and 3.0",
2440#   erratum #28
2441#   "MIPS R4000MC Errata, Processor Revision 2.2 and 3.0", erratum
2442#   #19
2443#
2444# - A double-word or a variable shift may give an incorrect result
2445#   if executed while an integer multiplication is in progress:
2446#   "MIPS R4000PC/SC Errata, Processor Revision 2.2 and 3.0",
2447#   errata #16 & #28
2448#
2449# - An integer division may give an incorrect result if started in
2450#   a delay slot of a taken branch or a jump:
2451#   "MIPS R4000PC/SC Errata, Processor Revision 2.2 and 3.0",
2452#   erratum #52
2453config CPU_R4000_WORKAROUNDS
2454	bool
2455	select CPU_R4400_WORKAROUNDS
2456
2457# Work around certain R4400 CPU errata (as implemented by GCC):
2458#
2459# - A double-word or a variable shift may give an incorrect result
2460#   if executed immediately after starting an integer division:
2461#   "MIPS R4400MC Errata, Processor Revision 1.0", erratum #10
2462#   "MIPS R4400MC Errata, Processor Revision 2.0 & 3.0", erratum #4
2463config CPU_R4400_WORKAROUNDS
2464	bool
2465
2466config CPU_R4X00_BUGS64
2467	bool
2468	default y if SYS_HAS_CPU_R4X00 && 64BIT && (TARGET_ISA_REV < 1)
2469
2470config MIPS_ASID_SHIFT
2471	int
2472	default 6 if CPU_R3000
2473	default 0
2474
2475config MIPS_ASID_BITS
2476	int
2477	default 0 if MIPS_ASID_BITS_VARIABLE
2478	default 6 if CPU_R3000
2479	default 8
2480
2481config MIPS_ASID_BITS_VARIABLE
2482	bool
2483
2484# R4600 erratum.  Due to the lack of errata information the exact
2485# technical details aren't known.  I've experimentally found that disabling
2486# interrupts during indexed I-cache flushes seems to be sufficient to deal
2487# with the issue.
2488config WAR_R4600_V1_INDEX_ICACHEOP
2489	bool
2490
2491# Pleasures of the R4600 V1.x.  Cite from the IDT R4600 V1.7 errata:
2492#
2493#  18. The CACHE instructions Hit_Writeback_Invalidate_D, Hit_Writeback_D,
2494#      Hit_Invalidate_D and Create_Dirty_Excl_D should only be
2495#      executed if there is no other dcache activity. If the dcache is
2496#      accessed for another instruction immediately preceding when these
2497#      cache instructions are executing, it is possible that the dcache
2498#      tag match outputs used by these cache instructions will be
2499#      incorrect. These cache instructions should be preceded by at least
2500#      four instructions that are not any kind of load or store
2501#      instruction.
2502#
2503#      This is not allowed:    lw
2504#                              nop
2505#                              nop
2506#                              nop
2507#                              cache       Hit_Writeback_Invalidate_D
2508#
2509#      This is allowed:        lw
2510#                              nop
2511#                              nop
2512#                              nop
2513#                              nop
2514#                              cache       Hit_Writeback_Invalidate_D
2515config WAR_R4600_V1_HIT_CACHEOP
2516	bool
2517
2518# Writeback and invalidate the primary cache dcache before DMA.
2519#
2520# R4600 v2.0 bug: "The CACHE instructions Hit_Writeback_Inv_D,
2521# Hit_Writeback_D, Hit_Invalidate_D and Create_Dirty_Exclusive_D will only
2522# operate correctly if the internal data cache refill buffer is empty.  These
2523# CACHE instructions should be separated from any potential data cache miss
2524# by a load instruction to an uncached address to empty the response buffer."
2525# (Revision 2.0 device errata from IDT available on https://www.idt.com/
2526# in .pdf format.)
2527config WAR_R4600_V2_HIT_CACHEOP
2528	bool
2529
2530# From TX49/H2 manual: "If the instruction (i.e. CACHE) is issued for
2531# the line which this instruction itself exists, the following
2532# operation is not guaranteed."
2533#
2534# Workaround: do two phase flushing for Index_Invalidate_I
2535config WAR_TX49XX_ICACHE_INDEX_INV
2536	bool
2537
2538# The RM7000 processors and the E9000 cores have a bug (though PMC-Sierra
2539# opposes it being called that) where invalid instructions in the same
2540# I-cache line worth of instructions being fetched may case spurious
2541# exceptions.
2542config WAR_ICACHE_REFILLS
2543	bool
2544
2545# On the R10000 up to version 2.6 (not sure about 2.7) there is a bug that
2546# may cause ll / sc and lld / scd sequences to execute non-atomically.
2547config WAR_R10000_LLSC
2548	bool
2549
2550# 34K core erratum: "Problems Executing the TLBR Instruction"
2551config WAR_MIPS34K_MISSED_ITLB
2552	bool
2553
2554#
2555# - Highmem only makes sense for the 32-bit kernel.
2556# - The current highmem code will only work properly on physically indexed
2557#   caches such as R3000, SB1, R7000 or those that look like they're virtually
2558#   indexed such as R4000/R4400 SC and MC versions or R10000.  So for the
2559#   moment we protect the user and offer the highmem option only on machines
2560#   where it's known to be safe.  This will not offer highmem on a few systems
2561#   such as MIPS32 and MIPS64 CPUs which may have virtual and physically
2562#   indexed CPUs but we're playing safe.
2563# - We use SYS_SUPPORTS_HIGHMEM to offer highmem only for systems where we
2564#   know they might have memory configurations that could make use of highmem
2565#   support.
2566#
2567config HIGHMEM
2568	bool "High Memory Support"
2569	depends on 32BIT && CPU_SUPPORTS_HIGHMEM && SYS_SUPPORTS_HIGHMEM && !CPU_MIPS32_3_5_EVA
2570	select KMAP_LOCAL
2571
2572config CPU_SUPPORTS_HIGHMEM
2573	bool
2574
2575config SYS_SUPPORTS_HIGHMEM
2576	bool
2577
2578config SYS_SUPPORTS_SMARTMIPS
2579	bool
2580
2581config SYS_SUPPORTS_MICROMIPS
2582	bool
2583
2584config SYS_SUPPORTS_MIPS16
2585	bool
2586	help
2587	  This option must be set if a kernel might be executed on a MIPS16-
2588	  enabled CPU even if MIPS16 is not actually being used.  In other
2589	  words, it makes the kernel MIPS16-tolerant.
2590
2591config CPU_SUPPORTS_MSA
2592	bool
2593
2594config ARCH_FLATMEM_ENABLE
2595	def_bool y
2596	depends on !NUMA && !CPU_LOONGSON2EF
2597
2598config ARCH_SPARSEMEM_ENABLE
2599	bool
2600
2601config NUMA
2602	bool "NUMA Support"
2603	depends on SYS_SUPPORTS_NUMA
2604	select SMP
2605	select HAVE_SETUP_PER_CPU_AREA
2606	select NEED_PER_CPU_EMBED_FIRST_CHUNK
2607	help
2608	  Say Y to compile the kernel to support NUMA (Non-Uniform Memory
2609	  Access).  This option improves performance on systems with more
2610	  than two nodes; on two node systems it is generally better to
2611	  leave it disabled; on single node systems leave this option
2612	  disabled.
2613
2614config SYS_SUPPORTS_NUMA
2615	bool
2616
2617config RELOCATABLE
2618	bool "Relocatable kernel"
2619	depends on SYS_SUPPORTS_RELOCATABLE
2620	depends on CPU_MIPS32_R2 || CPU_MIPS64_R2 || \
2621		   CPU_MIPS32_R5 || CPU_MIPS64_R5 || \
2622		   CPU_MIPS32_R6 || CPU_MIPS64_R6 || \
2623		   CPU_P5600 || CAVIUM_OCTEON_SOC || \
2624		   CPU_LOONGSON64
2625	select ARCH_VMLINUX_NEEDS_RELOCS
2626	help
2627	  This builds a kernel image that retains relocation information
2628	  so it can be loaded someplace besides the default 1MB.
2629	  The relocations make the kernel binary about 15% larger,
2630	  but are discarded at runtime
2631
2632config RELOCATION_TABLE_SIZE
2633	hex "Relocation table size"
2634	depends on RELOCATABLE
2635	range 0x0 0x01000000
2636	default "0x00200000" if CPU_LOONGSON64
2637	default "0x00100000"
2638	help
2639	  A table of relocation data will be appended to the kernel binary
2640	  and parsed at boot to fix up the relocated kernel.
2641
2642	  This option allows the amount of space reserved for the table to be
2643	  adjusted, although the default of 1Mb should be ok in most cases.
2644
2645	  The build will fail and a valid size suggested if this is too small.
2646
2647	  If unsure, leave at the default value.
2648
2649config RANDOMIZE_BASE
2650	bool "Randomize the address of the kernel image"
2651	depends on RELOCATABLE
2652	help
2653	  Randomizes the physical and virtual address at which the
2654	  kernel image is loaded, as a security feature that
2655	  deters exploit attempts relying on knowledge of the location
2656	  of kernel internals.
2657
2658	  Entropy is generated using any coprocessor 0 registers available.
2659
2660	  The kernel will be offset by up to RANDOMIZE_BASE_MAX_OFFSET.
2661
2662	  If unsure, say N.
2663
2664config RANDOMIZE_BASE_MAX_OFFSET
2665	hex "Maximum kASLR offset" if EXPERT
2666	depends on RANDOMIZE_BASE
2667	range 0x0 0x40000000 if EVA || 64BIT
2668	range 0x0 0x08000000
2669	default "0x01000000"
2670	help
2671	  When kASLR is active, this provides the maximum offset that will
2672	  be applied to the kernel image. It should be set according to the
2673	  amount of physical RAM available in the target system minus
2674	  PHYSICAL_START and must be a power of 2.
2675
2676	  This is limited by the size of KSEG0, 256Mb on 32-bit or 1Gb with
2677	  EVA or 64-bit. The default is 16Mb.
2678
2679config NODES_SHIFT
2680	int
2681	default "6"
2682	depends on NUMA
2683
2684config HW_PERF_EVENTS
2685	bool "Enable hardware performance counter support for perf events"
2686	depends on PERF_EVENTS && (CPU_MIPS32 || CPU_MIPS64 || CPU_R10000 || CPU_SB1 || CPU_CAVIUM_OCTEON || CPU_LOONGSON64)
2687	default y
2688	help
2689	  Enable hardware performance counter support for perf events. If
2690	  disabled, perf events will use software events only.
2691
2692config DMI
2693	bool "Enable DMI scanning"
2694	depends on MACH_LOONGSON64
2695	select DMI_SCAN_MACHINE_NON_EFI_FALLBACK
2696	default y
2697	help
2698	  Enabled scanning of DMI to identify machine quirks. Say Y
2699	  here unless you have verified that your setup is not
2700	  affected by entries in the DMI blacklist. Required by PNP
2701	  BIOS code.
2702
2703config SMP
2704	bool "Multi-Processing support"
2705	depends on SYS_SUPPORTS_SMP
2706	help
2707	  This enables support for systems with more than one CPU. If you have
2708	  a system with only one CPU, say N. If you have a system with more
2709	  than one CPU, say Y.
2710
2711	  If you say N here, the kernel will run on uni- and multiprocessor
2712	  machines, but will use only one CPU of a multiprocessor machine. If
2713	  you say Y here, the kernel will run on many, but not all,
2714	  uniprocessor machines. On a uniprocessor machine, the kernel
2715	  will run faster if you say N here.
2716
2717	  People using multiprocessor machines who say Y here should also say
2718	  Y to "Enhanced Real Time Clock Support", below.
2719
2720	  See also the SMP-HOWTO available at
2721	  <https://www.tldp.org/docs.html#howto>.
2722
2723	  If you don't know what to do here, say N.
2724
2725config HOTPLUG_CPU
2726	bool "Support for hot-pluggable CPUs"
2727	depends on SMP && SYS_SUPPORTS_HOTPLUG_CPU
2728	help
2729	  Say Y here to allow turning CPUs off and on. CPUs can be
2730	  controlled through /sys/devices/system/cpu.
2731	  (Note: power management support will enable this option
2732	    automatically on SMP systems. )
2733	  Say N if you want to disable CPU hotplug.
2734
2735config SMP_UP
2736	bool
2737
2738config SYS_SUPPORTS_MIPS_CPS
2739	bool
2740
2741config SYS_SUPPORTS_SMP
2742	bool
2743
2744config NR_CPUS_DEFAULT_4
2745	bool
2746
2747config NR_CPUS_DEFAULT_8
2748	bool
2749
2750config NR_CPUS_DEFAULT_16
2751	bool
2752
2753config NR_CPUS_DEFAULT_32
2754	bool
2755
2756config NR_CPUS_DEFAULT_64
2757	bool
2758
2759config NR_CPUS
2760	int "Maximum number of CPUs (2-256)"
2761	range 2 256
2762	depends on SMP
2763	default "4" if NR_CPUS_DEFAULT_4
2764	default "8" if NR_CPUS_DEFAULT_8
2765	default "16" if NR_CPUS_DEFAULT_16
2766	default "32" if NR_CPUS_DEFAULT_32
2767	default "64" if NR_CPUS_DEFAULT_64
2768	help
2769	  This allows you to specify the maximum number of CPUs which this
2770	  kernel will support.  The maximum supported value is 32 for 32-bit
2771	  kernel and 64 for 64-bit kernels; the minimum value which makes
2772	  sense is 1 for Qemu (useful only for kernel debugging purposes)
2773	  and 2 for all others.
2774
2775	  This is purely to save memory - each supported CPU adds
2776	  approximately eight kilobytes to the kernel image.  For best
2777	  performance should round up your number of processors to the next
2778	  power of two.
2779
2780config MIPS_PERF_SHARED_TC_COUNTERS
2781	bool
2782
2783config MIPS_NR_CPU_NR_MAP_1024
2784	bool
2785
2786config MIPS_NR_CPU_NR_MAP
2787	int
2788	depends on SMP
2789	default 1024 if MIPS_NR_CPU_NR_MAP_1024
2790	default NR_CPUS if !MIPS_NR_CPU_NR_MAP_1024
2791
2792#
2793# Timer Interrupt Frequency Configuration
2794#
2795
2796choice
2797	prompt "Timer frequency"
2798	default HZ_250
2799	help
2800	  Allows the configuration of the timer frequency.
2801
2802	config HZ_24
2803		bool "24 HZ" if SYS_SUPPORTS_24HZ || SYS_SUPPORTS_ARBIT_HZ
2804
2805	config HZ_48
2806		bool "48 HZ" if SYS_SUPPORTS_48HZ || SYS_SUPPORTS_ARBIT_HZ
2807
2808	config HZ_100
2809		bool "100 HZ" if SYS_SUPPORTS_100HZ || SYS_SUPPORTS_ARBIT_HZ
2810
2811	config HZ_128
2812		bool "128 HZ" if SYS_SUPPORTS_128HZ || SYS_SUPPORTS_ARBIT_HZ
2813
2814	config HZ_250
2815		bool "250 HZ" if SYS_SUPPORTS_250HZ || SYS_SUPPORTS_ARBIT_HZ
2816
2817	config HZ_256
2818		bool "256 HZ" if SYS_SUPPORTS_256HZ || SYS_SUPPORTS_ARBIT_HZ
2819
2820	config HZ_1000
2821		bool "1000 HZ" if SYS_SUPPORTS_1000HZ || SYS_SUPPORTS_ARBIT_HZ
2822
2823	config HZ_1024
2824		bool "1024 HZ" if SYS_SUPPORTS_1024HZ || SYS_SUPPORTS_ARBIT_HZ
2825
2826endchoice
2827
2828config SYS_SUPPORTS_24HZ
2829	bool
2830
2831config SYS_SUPPORTS_48HZ
2832	bool
2833
2834config SYS_SUPPORTS_100HZ
2835	bool
2836
2837config SYS_SUPPORTS_128HZ
2838	bool
2839
2840config SYS_SUPPORTS_250HZ
2841	bool
2842
2843config SYS_SUPPORTS_256HZ
2844	bool
2845
2846config SYS_SUPPORTS_1000HZ
2847	bool
2848
2849config SYS_SUPPORTS_1024HZ
2850	bool
2851
2852config SYS_SUPPORTS_ARBIT_HZ
2853	bool
2854	default y if !SYS_SUPPORTS_24HZ && \
2855		     !SYS_SUPPORTS_48HZ && \
2856		     !SYS_SUPPORTS_100HZ && \
2857		     !SYS_SUPPORTS_128HZ && \
2858		     !SYS_SUPPORTS_250HZ && \
2859		     !SYS_SUPPORTS_256HZ && \
2860		     !SYS_SUPPORTS_1000HZ && \
2861		     !SYS_SUPPORTS_1024HZ
2862
2863config HZ
2864	int
2865	default 24 if HZ_24
2866	default 48 if HZ_48
2867	default 100 if HZ_100
2868	default 128 if HZ_128
2869	default 250 if HZ_250
2870	default 256 if HZ_256
2871	default 1000 if HZ_1000
2872	default 1024 if HZ_1024
2873
2874config SCHED_HRTICK
2875	def_bool HIGH_RES_TIMERS
2876
2877config ARCH_SUPPORTS_KEXEC
2878	def_bool y
2879
2880config ARCH_SUPPORTS_CRASH_DUMP
2881	def_bool y
2882
2883config ARCH_DEFAULT_CRASH_DUMP
2884	def_bool y
2885
2886config PHYSICAL_START
2887	hex "Physical address where the kernel is loaded"
2888	default "0xffffffff84000000"
2889	depends on CRASH_DUMP
2890	help
2891	  This gives the CKSEG0 or KSEG0 address where the kernel is loaded.
2892	  If you plan to use kernel for capturing the crash dump change
2893	  this value to start of the reserved region (the "X" value as
2894	  specified in the "crashkernel=YM@XM" command line boot parameter
2895	  passed to the panic-ed kernel).
2896
2897config MIPS_O32_FP64_SUPPORT
2898	bool "Support for O32 binaries using 64-bit FP" if !CPU_MIPSR6
2899	depends on 32BIT || MIPS32_O32
2900	help
2901	  When this is enabled, the kernel will support use of 64-bit floating
2902	  point registers with binaries using the O32 ABI along with the
2903	  EF_MIPS_FP64 ELF header flag (typically built with -mfp64). On
2904	  32-bit MIPS systems this support is at the cost of increasing the
2905	  size and complexity of the compiled FPU emulator. Thus if you are
2906	  running a MIPS32 system and know that none of your userland binaries
2907	  will require 64-bit floating point, you may wish to reduce the size
2908	  of your kernel & potentially improve FP emulation performance by
2909	  saying N here.
2910
2911	  Although binutils currently supports use of this flag the details
2912	  concerning its effect upon the O32 ABI in userland are still being
2913	  worked on. In order to avoid userland becoming dependent upon current
2914	  behaviour before the details have been finalised, this option should
2915	  be considered experimental and only enabled by those working upon
2916	  said details.
2917
2918	  If unsure, say N.
2919
2920config USE_OF
2921	bool
2922	select OF
2923	select OF_EARLY_FLATTREE
2924	select IRQ_DOMAIN
2925
2926config UHI_BOOT
2927	bool
2928
2929config BUILTIN_DTB
2930	bool
2931
2932choice
2933	prompt "Kernel appended dtb support"
2934	depends on USE_OF
2935	default MIPS_NO_APPENDED_DTB
2936
2937	config MIPS_NO_APPENDED_DTB
2938		bool "None"
2939		help
2940		  Do not enable appended dtb support.
2941
2942	config MIPS_ELF_APPENDED_DTB
2943		bool "vmlinux"
2944		help
2945		  With this option, the boot code will look for a device tree binary
2946		  DTB) included in the vmlinux ELF section .appended_dtb. By default
2947		  it is empty and the DTB can be appended using binutils command
2948		  objcopy:
2949
2950		    objcopy --update-section .appended_dtb=<filename>.dtb vmlinux
2951
2952		  This is meant as a backward compatibility convenience for those
2953		  systems with a bootloader that can't be upgraded to accommodate
2954		  the documented boot protocol using a device tree.
2955
2956	config MIPS_RAW_APPENDED_DTB
2957		bool "vmlinux.bin or vmlinuz.bin"
2958		help
2959		  With this option, the boot code will look for a device tree binary
2960		  DTB) appended to raw vmlinux.bin or vmlinuz.bin.
2961		  (e.g. cat vmlinux.bin <filename>.dtb > vmlinux_w_dtb).
2962
2963		  This is meant as a backward compatibility convenience for those
2964		  systems with a bootloader that can't be upgraded to accommodate
2965		  the documented boot protocol using a device tree.
2966
2967		  Beware that there is very little in terms of protection against
2968		  this option being confused by leftover garbage in memory that might
2969		  look like a DTB header after a reboot if no actual DTB is appended
2970		  to vmlinux.bin.  Do not leave this option active in a production kernel
2971		  if you don't intend to always append a DTB.
2972endchoice
2973
2974choice
2975	prompt "Kernel command line type"
2976	depends on !CMDLINE_OVERRIDE
2977	default MIPS_CMDLINE_FROM_DTB if USE_OF && !ATH79 && !MACH_INGENIC && \
2978					 !MACH_LOONGSON64 && !MACH_LOONGSON32 && \
2979					 !MIPS_MALTA && !CAVIUM_OCTEON_SOC
2980	default MIPS_CMDLINE_FROM_BOOTLOADER
2981
2982	config MIPS_CMDLINE_FROM_DTB
2983		depends on USE_OF
2984		bool "Dtb kernel arguments if available"
2985
2986	config MIPS_CMDLINE_DTB_EXTEND
2987		depends on USE_OF
2988		bool "Extend dtb kernel arguments with bootloader arguments"
2989
2990	config MIPS_CMDLINE_FROM_BOOTLOADER
2991		bool "Bootloader kernel arguments if available"
2992
2993	config MIPS_CMDLINE_BUILTIN_EXTEND
2994		depends on CMDLINE_BOOL
2995		bool "Extend builtin kernel arguments with bootloader arguments"
2996endchoice
2997
2998endmenu
2999
3000config LOCKDEP_SUPPORT
3001	bool
3002	default y
3003
3004config STACKTRACE_SUPPORT
3005	bool
3006	default y
3007
3008config PGTABLE_LEVELS
3009	int
3010	default 4 if PAGE_SIZE_4KB && MIPS_VA_BITS_48
3011	default 3 if 64BIT && (!PAGE_SIZE_64KB || MIPS_VA_BITS_48)
3012	default 2
3013
3014config MIPS_AUTO_PFN_OFFSET
3015	bool
3016
3017menu "Bus options (PCI, PCMCIA, EISA, ISA, TC)"
3018
3019config PCI_DRIVERS_GENERIC
3020	select PCI_DOMAINS_GENERIC if PCI
3021	bool
3022
3023config PCI_DRIVERS_LEGACY
3024	def_bool !PCI_DRIVERS_GENERIC
3025	select NO_GENERIC_PCI_IOPORT_MAP
3026	select PCI_DOMAINS if PCI
3027
3028#
3029# ISA support is now enabled via select.  Too many systems still have the one
3030# or other ISA chip on the board that users don't know about so don't expect
3031# users to choose the right thing ...
3032#
3033config ISA
3034	bool
3035
3036config TC
3037	bool "TURBOchannel support"
3038	depends on MACH_DECSTATION
3039	help
3040	  TURBOchannel is a DEC (now Compaq (now HP)) bus for Alpha and MIPS
3041	  processors.  TURBOchannel programming specifications are available
3042	  at:
3043	  <ftp://ftp.hp.com/pub/alphaserver/archive/triadd/>
3044	  and:
3045	  <http://www.computer-refuge.org/classiccmp/ftp.digital.com/pub/DEC/TriAdd/>
3046	  Linux driver support status is documented at:
3047	  <http://www.linux-mips.org/wiki/DECstation>
3048
3049config MMU
3050	bool
3051	default y
3052
3053config ARCH_MMAP_RND_BITS_MIN
3054	default 12 if 64BIT
3055	default 8
3056
3057config ARCH_MMAP_RND_BITS_MAX
3058	default 18 if 64BIT
3059	default 15
3060
3061config ARCH_MMAP_RND_COMPAT_BITS_MIN
3062	default 8
3063
3064config ARCH_MMAP_RND_COMPAT_BITS_MAX
3065	default 15
3066
3067config I8253
3068	bool
3069	select CLKSRC_I8253
3070	select CLKEVT_I8253
3071	select MIPS_EXTERNAL_TIMER
3072endmenu
3073
3074config TRAD_SIGNALS
3075	bool
3076
3077config MIPS32_COMPAT
3078	bool
3079
3080config COMPAT
3081	bool
3082
3083config MIPS32_O32
3084	bool "Kernel support for o32 binaries"
3085	depends on 64BIT
3086	select ARCH_WANT_OLD_COMPAT_IPC
3087	select COMPAT
3088	select MIPS32_COMPAT
3089	help
3090	  Select this option if you want to run o32 binaries.  These are pure
3091	  32-bit binaries as used by the 32-bit Linux/MIPS port.  Most of
3092	  existing binaries are in this format.
3093
3094	  If unsure, say Y.
3095
3096config MIPS32_N32
3097	bool "Kernel support for n32 binaries"
3098	depends on 64BIT
3099	select ARCH_WANT_COMPAT_IPC_PARSE_VERSION
3100	select COMPAT
3101	select MIPS32_COMPAT
3102	help
3103	  Select this option if you want to run n32 binaries.  These are
3104	  64-bit binaries using 32-bit quantities for addressing and certain
3105	  data that would normally be 64-bit.  They are used in special
3106	  cases.
3107
3108	  If unsure, say N.
3109
3110config CC_HAS_MNO_BRANCH_LIKELY
3111	def_bool y
3112	depends on $(cc-option,-mno-branch-likely)
3113
3114# https://github.com/llvm/llvm-project/issues/61045
3115config CC_HAS_BROKEN_INLINE_COMPAT_BRANCH
3116	def_bool y if CC_IS_CLANG
3117
3118config ARCH_CC_CAN_LINK_N32
3119	bool
3120	default $(cc_can_link_user,-mabi=n32 -EL) if MIPS32_N32 && CPU_LITTLE_ENDIAN
3121	default $(cc_can_link_user,-mabi=n32 -EB) if MIPS32_N32 && CPU_BIG_ENDIAN
3122
3123config ARCH_CC_CAN_LINK_N64
3124	bool
3125	default $(cc_can_link_user,-mabi=64 -EL) if 64BIT && CPU_LITTLE_ENDIAN
3126	default $(cc_can_link_user,-mabi=64 -EB) if 64BIT && CPU_BIG_ENDIAN
3127
3128config ARCH_CC_CAN_LINK_O32
3129	bool
3130	default $(cc_can_link_user,-mabi=32 -EL) if (32BIT || MIPS32_O32) && CPU_LITTLE_ENDIAN
3131	default $(cc_can_link_user,-mabi=32 -EB) if (32BIT || MIPS32_O32) && CPU_BIG_ENDIAN
3132
3133config ARCH_CC_CAN_LINK
3134	def_bool ARCH_CC_CAN_LINK_N32 || ARCH_CC_CAN_LINK_N64 || ARCH_CC_CAN_LINK_O32
3135
3136config ARCH_USERFLAGS
3137	string
3138	default "-mabi=n32 -EL" if ARCH_CC_CAN_LINK_N32 && CPU_LITTLE_ENDIAN
3139	default "-mabi=n32 -EB" if ARCH_CC_CAN_LINK_N32 && CPU_BIG_ENDIAN
3140	default "-mabi=64 -EL" if ARCH_CC_CAN_LINK_N64 && CPU_LITTLE_ENDIAN
3141	default "-mabi=64 -EB" if ARCH_CC_CAN_LINK_N64 && CPU_BIG_ENDIAN
3142	default "-mabi=32 -EL" if ARCH_CC_CAN_LINK_O32 && CPU_LITTLE_ENDIAN
3143	default "-mabi=32 -EB" if ARCH_CC_CAN_LINK_O32 && CPU_BIG_ENDIAN
3144
3145menu "Power management options"
3146
3147config ARCH_HIBERNATION_POSSIBLE
3148	def_bool y
3149	depends on SYS_SUPPORTS_HOTPLUG_CPU || !SMP
3150
3151config ARCH_SUSPEND_POSSIBLE
3152	def_bool y
3153	depends on SYS_SUPPORTS_HOTPLUG_CPU || !SMP
3154
3155source "kernel/power/Kconfig"
3156
3157endmenu
3158
3159config MIPS_EXTERNAL_TIMER
3160	bool
3161
3162config MIPS_GENERIC_GETTIMEOFDAY
3163	def_bool y
3164	select GENERIC_GETTIMEOFDAY
3165	depends on CSRC_R4K || CLKSRC_MIPS_GIC
3166	# GCC (at least up to version 9.2) appears to emit function calls that make use
3167	# of the GOT when targeting microMIPS, which we can't use in the VDSO due to
3168	# the lack of relocations. As such, we disable the VDSO for microMIPS builds.
3169	depends on !(CPU_MICROMIPS && CC_IS_GCC && GCC_VERSION < 90300)
3170
3171menu "CPU Power Management"
3172
3173if CPU_SUPPORTS_CPUFREQ && MIPS_EXTERNAL_TIMER
3174source "drivers/cpufreq/Kconfig"
3175endif # CPU_SUPPORTS_CPUFREQ && MIPS_EXTERNAL_TIMER
3176
3177source "drivers/cpuidle/Kconfig"
3178
3179endmenu
3180
3181source "arch/mips/kvm/Kconfig"
3182