xref: /openbmc/linux/arch/sparc/Kconfig (revision f77d1a49)
1# SPDX-License-Identifier: GPL-2.0-only
2config 64BIT
3	bool "64-bit kernel" if "$(ARCH)" = "sparc"
4	default "$(ARCH)" = "sparc64"
5	help
6	  SPARC is a family of RISC microprocessors designed and marketed by
7	  Sun Microsystems, incorporated.  They are very widely found in Sun
8	  workstations and clones.
9
10	  Say yes to build a 64-bit kernel - formerly known as sparc64
11	  Say no to build a 32-bit kernel - formerly known as sparc
12
13config SPARC
14	bool
15	default y
16	select ARCH_MIGHT_HAVE_PC_PARPORT if SPARC64 && PCI
17	select ARCH_MIGHT_HAVE_PC_SERIO
18	select DMA_OPS
19	select OF
20	select OF_PROMTREE
21	select HAVE_ASM_MODVERSIONS
22	select HAVE_ARCH_KGDB if !SMP || SPARC64
23	select HAVE_ARCH_TRACEHOOK
24	select HAVE_ARCH_SECCOMP if SPARC64
25	select HAVE_EXIT_THREAD
26	select HAVE_PCI
27	select SYSCTL_EXCEPTION_TRACE
28	select RTC_CLASS
29	select RTC_DRV_M48T59
30	select RTC_SYSTOHC
31	select HAVE_ARCH_JUMP_LABEL if SPARC64
32	select GENERIC_IRQ_SHOW
33	select ARCH_WANT_IPC_PARSE_VERSION
34	select GENERIC_PCI_IOMAP
35	select HAS_IOPORT
36	select HAVE_HARDLOCKUP_DETECTOR_SPARC64 if SPARC64
37	select HAVE_CBPF_JIT if SPARC32
38	select HAVE_EBPF_JIT if SPARC64
39	select HAVE_DEBUG_BUGVERBOSE
40	select GENERIC_SMP_IDLE_THREAD
41	select MODULES_USE_ELF_RELA
42	select PCI_SYSCALL if PCI
43	select PCI_MSI_ARCH_FALLBACKS if PCI_MSI
44	select ODD_RT_SIGACTION
45	select OLD_SIGSUSPEND
46	select CPU_NO_EFFICIENT_FFS
47	select LOCKDEP_SMALL if LOCKDEP
48	select NEED_DMA_MAP_STATE
49	select NEED_SG_DMA_LENGTH
50	select TRACE_IRQFLAGS_SUPPORT
51
52config SPARC32
53	def_bool !64BIT
54	select ARCH_32BIT_OFF_T
55	select ARCH_HAS_CPU_FINALIZE_INIT if !SMP
56	select ARCH_HAS_SYNC_DMA_FOR_CPU
57	select CLZ_TAB
58	select DMA_DIRECT_REMAP
59	select GENERIC_ATOMIC64
60	select HAVE_UID16
61	select LOCK_MM_AND_FIND_VMA
62	select OLD_SIGACTION
63	select ZONE_DMA
64
65config SPARC64
66	def_bool 64BIT
67	select ALTERNATE_USER_ADDRESS_SPACE
68	select HAVE_FUNCTION_TRACER
69	select HAVE_FUNCTION_GRAPH_TRACER
70	select HAVE_KRETPROBES
71	select HAVE_KPROBES
72	select MMU_GATHER_RCU_TABLE_FREE if SMP
73	select MMU_GATHER_MERGE_VMAS
74	select MMU_GATHER_NO_FLUSH_CACHE
75	select HAVE_ARCH_TRANSPARENT_HUGEPAGE
76	select HAVE_DYNAMIC_FTRACE
77	select HAVE_FTRACE_MCOUNT_RECORD
78	select HAVE_SYSCALL_TRACEPOINTS
79	select HAVE_CONTEXT_TRACKING_USER
80	select HAVE_TIF_NOHZ
81	select HAVE_DEBUG_KMEMLEAK
82	select IOMMU_HELPER
83	select SPARSE_IRQ
84	select RTC_DRV_CMOS
85	select RTC_DRV_BQ4802
86	select RTC_DRV_SUN4V
87	select RTC_DRV_STARFIRE
88	select HAVE_PERF_EVENTS
89	select PERF_USE_VMALLOC
90	select ARCH_HAVE_NMI_SAFE_CMPXCHG
91	select HAVE_C_RECORDMCOUNT
92	select HAVE_ARCH_AUDITSYSCALL
93	select ARCH_SUPPORTS_ATOMIC_RMW
94	select ARCH_SUPPORTS_DEBUG_PAGEALLOC
95	select HAVE_NMI
96	select HAVE_REGS_AND_STACK_ACCESS_API
97	select ARCH_USE_QUEUED_RWLOCKS
98	select ARCH_USE_QUEUED_SPINLOCKS
99	select GENERIC_TIME_VSYSCALL
100	select ARCH_CLOCKSOURCE_DATA
101	select ARCH_HAS_PTE_SPECIAL
102	select PCI_DOMAINS if PCI
103	select ARCH_HAS_GIGANTIC_PAGE
104	select HAVE_SOFTIRQ_ON_OWN_STACK
105	select HAVE_SETUP_PER_CPU_AREA
106	select NEED_PER_CPU_EMBED_FIRST_CHUNK
107	select NEED_PER_CPU_PAGE_FIRST_CHUNK
108
109config ARCH_PROC_KCORE_TEXT
110	def_bool y
111
112config CPU_BIG_ENDIAN
113	def_bool y
114
115config ARCH_ATU
116	bool
117	default y if SPARC64
118
119config STACKTRACE_SUPPORT
120	bool
121	default y if SPARC64
122
123config LOCKDEP_SUPPORT
124	bool
125	default y if SPARC64
126
127config ARCH_HIBERNATION_POSSIBLE
128	def_bool y if SPARC64
129
130config AUDIT_ARCH
131	bool
132	default y
133
134config MMU
135	bool
136	default y
137
138config HIGHMEM
139	bool
140	default y if SPARC32
141	select KMAP_LOCAL
142
143config GENERIC_ISA_DMA
144	bool
145	default y if SPARC32
146
147config PGTABLE_LEVELS
148	default 4 if 64BIT
149	default 3
150
151config ARCH_SUPPORTS_UPROBES
152	def_bool y if SPARC64
153
154menu "Processor type and features"
155
156config SMP
157	bool "Symmetric multi-processing support"
158	help
159	  This enables support for systems with more than one CPU. If you have
160	  a system with only one CPU, say N. If you have a system with more
161	  than one CPU, say Y.
162
163	  If you say N here, the kernel will run on uni- and multiprocessor
164	  machines, but will use only one CPU of a multiprocessor machine. If
165	  you say Y here, the kernel will run on many, but not all,
166	  uniprocessor machines. On a uniprocessor machine, the kernel
167	  will run faster if you say N here.
168
169	  People using multiprocessor machines who say Y here should also say
170	  Y to "Enhanced Real Time Clock Support", below. The "Advanced Power
171	  Management" code will be disabled if you say Y here.
172
173	  See also <file:Documentation/admin-guide/lockup-watchdogs.rst> and the SMP-HOWTO
174	  available at <https://www.tldp.org/docs.html#howto>.
175
176	  If you don't know what to do here, say N.
177
178config NR_CPUS
179	int "Maximum number of CPUs"
180	depends on SMP
181	range 2 32 if SPARC32
182	range 2 4096 if SPARC64
183	default 32 if SPARC32
184	default 4096 if SPARC64
185
186source "kernel/Kconfig.hz"
187
188config GENERIC_HWEIGHT
189	bool
190	default y
191
192config GENERIC_CALIBRATE_DELAY
193	bool
194	default y
195
196config ARCH_MAY_HAVE_PC_FDC
197	bool
198	default y
199
200config EMULATED_CMPXCHG
201	bool
202	default y if SPARC32
203	help
204	  Sparc32 does not have a CAS instruction like sparc64. cmpxchg()
205	  is emulated, and therefore it is not completely atomic.
206
207# Makefile helpers
208config SPARC32_SMP
209	bool
210	default y
211	depends on SPARC32 && SMP
212
213config SPARC64_SMP
214	bool
215	default y
216	depends on SPARC64 && SMP
217
218config EARLYFB
219	bool "Support for early boot text console"
220	default y
221	depends on SPARC64
222	help
223	  Say Y here to enable a faster early framebuffer boot console.
224
225config HOTPLUG_CPU
226	bool "Support for hot-pluggable CPUs"
227	depends on SPARC64 && SMP
228	help
229	  Say Y here to experiment with turning CPUs off and on.  CPUs
230	  can be controlled through /sys/devices/system/cpu/cpu#.
231	  Say N if you want to disable CPU hotplug.
232
233if SPARC64
234source "drivers/cpufreq/Kconfig"
235endif
236
237config US3_MC
238	tristate "UltraSPARC-III Memory Controller driver"
239	depends on SPARC64
240	default y
241	help
242	  This adds a driver for the UltraSPARC-III memory controller.
243	  Loading this driver allows exact mnemonic strings to be
244	  printed in the event of a memory error, so that the faulty DIMM
245	  on the motherboard can be matched to the error.
246
247	  If in doubt, say Y, as this information can be very useful.
248
249# Global things across all Sun machines.
250config GENERIC_LOCKBREAK
251	bool
252	default y
253	depends on SPARC64 && SMP && PREEMPTION
254
255config NUMA
256	bool "NUMA support"
257	depends on SPARC64 && SMP
258
259config NODES_SHIFT
260	int "Maximum NUMA Nodes (as a power of 2)"
261	range 4 5 if SPARC64
262	default "5"
263	depends on NUMA
264	help
265	  Specify the maximum number of NUMA Nodes available on the target
266	  system.  Increases memory reserved to accommodate various tables.
267
268config ARCH_SPARSEMEM_ENABLE
269	def_bool y if SPARC64
270	select SPARSEMEM_VMEMMAP_ENABLE
271
272config ARCH_SPARSEMEM_DEFAULT
273	def_bool y if SPARC64
274
275config ARCH_FORCE_MAX_ORDER
276	int "Order of maximal physically contiguous allocations"
277	default "12"
278	help
279	  The kernel page allocator limits the size of maximal physically
280	  contiguous allocations. The limit is called MAX_ORDER and it
281	  defines the maximal power of two of number of pages that can be
282	  allocated as a single contiguous block. This option allows
283	  overriding the default setting when ability to allocate very
284	  large blocks of physically contiguous memory is required.
285
286	  Don't change if unsure.
287
288if SPARC64 || COMPILE_TEST
289source "kernel/power/Kconfig"
290endif
291
292config SCHED_SMT
293	bool "SMT (Hyperthreading) scheduler support"
294	depends on SPARC64 && SMP
295	default y
296	help
297	  SMT scheduler support improves the CPU scheduler's decision making
298	  when dealing with SPARC cpus at a cost of slightly increased overhead
299	  in some places. If unsure say N here.
300
301config SCHED_MC
302	bool "Multi-core scheduler support"
303	depends on SPARC64 && SMP
304	default y
305	help
306	  Multi-core scheduler support improves the CPU scheduler's decision
307	  making when dealing with multi-core CPU chips at a cost of slightly
308	  increased overhead in some places. If unsure say N here.
309
310config CMDLINE_BOOL
311	bool "Default bootloader kernel arguments"
312	depends on SPARC64
313
314config CMDLINE
315	string "Initial kernel command string"
316	depends on CMDLINE_BOOL
317	default "console=ttyS0,9600 root=/dev/sda1"
318	help
319	  Say Y here if you want to be able to pass default arguments to
320	  the kernel. This will be overridden by the bootloader, if you
321	  use one (such as SILO). This is most useful if you want to boot
322	  a kernel from TFTP, and want default options to be available
323	  with having them passed on the command line.
324
325	  NOTE: This option WILL override the PROM bootargs setting!
326
327config SUN_PM
328	bool
329	default y if SPARC32
330	help
331	  Enable power management and CPU standby features on supported
332	  SPARC platforms.
333
334config SPARC_LED
335	tristate "Sun4m LED driver"
336	depends on SPARC32
337	help
338	  This driver toggles the front-panel LED on sun4m systems
339	  in a user-specifiable manner.  Its state can be probed
340	  by reading /proc/led and its blinking mode can be changed
341	  via writes to /proc/led
342
343config SERIAL_CONSOLE
344	bool
345	depends on SPARC32
346	default y
347	help
348	  If you say Y here, it will be possible to use a serial port as the
349	  system console (the system console is the device which receives all
350	  kernel messages and warnings and which allows logins in single user
351	  mode). This could be useful if some terminal or printer is connected
352	  to that serial port.
353
354	  Even if you say Y here, the currently visible virtual console
355	  (/dev/tty0) will still be used as the system console by default, but
356	  you can alter that using a kernel command line option such as
357	  "console=ttyS1". (Try "man bootparam" or see the documentation of
358	  your boot loader (silo) about how to pass options to the kernel at
359	  boot time.)
360
361	  If you don't have a graphics card installed and you say Y here, the
362	  kernel will automatically use the first serial line, /dev/ttyS0, as
363	  system console.
364
365	  If unsure, say N.
366
367config SPARC_LEON
368	bool "Sparc Leon processor family"
369	depends on SPARC32
370	select USB_EHCI_BIG_ENDIAN_MMIO
371	select USB_EHCI_BIG_ENDIAN_DESC
372	select USB_UHCI_BIG_ENDIAN_MMIO
373	select USB_UHCI_BIG_ENDIAN_DESC
374	help
375	  If you say Y here if you are running on a SPARC-LEON processor.
376	  The LEON processor is a synthesizable VHDL model of the
377	  SPARC-v8 standard. LEON is  part of the GRLIB collection of
378	  IP cores that are distributed under GPL. GRLIB can be downloaded
379	  from www.gaisler.com. You can download a sparc-linux cross-compilation
380	  toolchain at www.gaisler.com.
381
382if SPARC_LEON
383menu "U-Boot options"
384
385config UBOOT_LOAD_ADDR
386	hex "uImage Load Address"
387	default 0x40004000
388	help
389	 U-Boot kernel load address, the address in physical address space
390	 where u-boot will place the Linux kernel before booting it.
391	 This address is normally the base address of main memory + 0x4000.
392
393config UBOOT_FLASH_ADDR
394	hex "uImage.o Load Address"
395	default 0x00080000
396	help
397	 Optional setting only affecting the uImage.o ELF-image used to
398	 download the uImage file to the target using a ELF-loader other than
399	 U-Boot. It may for example be used to download an uImage to FLASH with
400	 the GRMON utility before even starting u-boot.
401
402config UBOOT_ENTRY_ADDR
403	hex "uImage Entry Address"
404	default 0xf0004000
405	help
406	 Do not change this unless you know what you're doing. This is
407	 hardcoded by the SPARC32 and LEON port.
408
409	 This is the virtual address u-boot jumps to when booting the Linux
410	 Kernel.
411
412endmenu
413endif
414
415endmenu
416
417menu "Bus options (PCI etc.)"
418config SBUS
419	bool
420	default y
421
422config SBUSCHAR
423	bool
424	default y
425
426config SUN_LDOMS
427	bool "Sun Logical Domains support"
428	depends on SPARC64
429	help
430	  Say Y here is you want to support virtual devices via
431	  Logical Domains.
432
433config PCIC_PCI
434	bool
435	depends on PCI && SPARC32 && !SPARC_LEON
436	default y
437
438config LEON_PCI
439	bool
440	depends on PCI && SPARC_LEON
441	default y
442
443config SPARC_GRPCI1
444	bool "GRPCI Host Bridge Support"
445	depends on LEON_PCI
446	default y
447	help
448	  Say Y here to include the GRPCI Host Bridge Driver. The GRPCI
449	  PCI host controller is typically found in GRLIB SPARC32/LEON
450	  systems. The driver has one property (all_pci_errors) controlled
451	  from the bootloader that makes the GRPCI to generate interrupts
452	  on detected PCI Parity and System errors.
453
454config SPARC_GRPCI2
455	bool "GRPCI2 Host Bridge Support"
456	depends on LEON_PCI
457	default y
458	help
459	  Say Y here to include the GRPCI2 Host Bridge Driver.
460
461config SUN_OPENPROMFS
462	tristate "Openprom tree appears in /proc/openprom"
463	help
464	  If you say Y, the OpenPROM device tree will be available as a
465	  virtual file system, which you can mount to /proc/openprom by "mount
466	  -t openpromfs none /proc/openprom".
467
468	  To compile the /proc/openprom support as a module, choose M here: the
469	  module will be called openpromfs.
470
471	  Only choose N if you know in advance that you will not need to modify
472	  OpenPROM settings on the running system.
473
474# Makefile helpers
475config SPARC64_PCI
476	bool
477	default y
478	depends on SPARC64 && PCI
479
480config SPARC64_PCI_MSI
481	bool
482	default y
483	depends on SPARC64_PCI && PCI_MSI
484
485endmenu
486
487config COMPAT
488	bool
489	depends on SPARC64
490	default y
491	select HAVE_UID16
492	select ARCH_WANT_OLD_COMPAT_IPC
493	select COMPAT_OLD_SIGACTION
494
495source "drivers/sbus/char/Kconfig"
496