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