xref: /linux/arch/sparc/Kconfig (revision 805185b7c7a1069e407b6f7b3bc98e44d415f484)
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 ARCH_HAS_PTE_SPECIAL
107	select PCI_DOMAINS if PCI
108	select ARCH_HAS_GIGANTIC_PAGE
109	select HAVE_SOFTIRQ_ON_OWN_STACK
110	select HAVE_SETUP_PER_CPU_AREA
111	select NEED_PER_CPU_EMBED_FIRST_CHUNK
112	select NEED_PER_CPU_PAGE_FIRST_CHUNK
113	select ARCH_SUPPORTS_SCHED_SMT if SMP
114	select ARCH_SUPPORTS_SCHED_MC  if SMP
115	select ARCH_HAS_LAZY_MMU_MODE
116	select HAVE_GENERIC_VDSO
117	select GENERIC_GETTIMEOFDAY
118
119config ARCH_PROC_KCORE_TEXT
120	def_bool y
121
122config CPU_BIG_ENDIAN
123	def_bool y
124
125config STACKTRACE_SUPPORT
126	bool
127	default y if SPARC64
128
129config LOCKDEP_SUPPORT
130	bool
131	default y if SPARC64
132
133config ARCH_HIBERNATION_POSSIBLE
134	def_bool y if SPARC64
135
136config AUDIT_ARCH
137	bool
138	default y
139
140config MMU
141	bool
142	default y
143
144config HIGHMEM
145	bool
146	default y if SPARC32
147	select KMAP_LOCAL
148
149config PGTABLE_LEVELS
150	default 4 if 64BIT
151	default 3
152
153config ARCH_SUPPORTS_UPROBES
154	def_bool y if SPARC64
155
156menu "Processor type and features"
157
158config SMP
159	bool "Symmetric multi-processing support"
160	help
161	  This enables support for systems with more than one CPU. If you have
162	  a system with only one CPU, say N. If you have a system with more
163	  than one CPU, say Y.
164
165	  If you say N here, the kernel will run on uni- and multiprocessor
166	  machines, but will use only one CPU of a multiprocessor machine. If
167	  you say Y here, the kernel will run on many, but not all,
168	  uniprocessor machines. On a uniprocessor machine, the kernel
169	  will run faster if you say N here.
170
171	  People using multiprocessor machines who say Y here should also say
172	  Y to "Enhanced Real Time Clock Support", below. The "Advanced Power
173	  Management" code will be disabled if you say Y here.
174
175	  See also <file:Documentation/admin-guide/lockup-watchdogs.rst> and the SMP-HOWTO
176	  available at <https://www.tldp.org/docs.html#howto>.
177
178	  If you don't know what to do here, say N.
179
180config NR_CPUS
181	int "Maximum number of CPUs"
182	depends on SMP
183	range 2 32 if SPARC32
184	range 2 4096 if SPARC64
185	default 32 if SPARC32
186	default 4096 if SPARC64
187
188source "kernel/Kconfig.hz"
189
190config GENERIC_HWEIGHT
191	bool
192	default y
193
194config GENERIC_CALIBRATE_DELAY
195	bool
196	default y
197
198config ARCH_MAY_HAVE_PC_FDC
199	bool
200	default y
201
202config EMULATED_CMPXCHG
203	bool
204	default y if SPARC32
205	help
206	  Sparc32 does not have a CAS instruction like sparc64. cmpxchg()
207	  is emulated, and therefore it is not completely atomic.
208
209# Makefile helpers
210config SPARC32_SMP
211	bool
212	default y
213	depends on SPARC32 && SMP
214
215config SPARC64_SMP
216	bool
217	default y
218	depends on SPARC64 && SMP
219
220config EARLYFB
221	bool "Support for early boot text console"
222	default y
223	depends on SPARC64
224	select FONT_SUN8x16
225	select FONT_SUPPORT
226	help
227	  Say Y here to enable a faster early framebuffer boot console.
228
229config HOTPLUG_CPU
230	bool "Support for hot-pluggable CPUs"
231	depends on SPARC64 && SMP
232	help
233	  Say Y here to experiment with turning CPUs off and on.  CPUs
234	  can be controlled through /sys/devices/system/cpu/cpu#.
235	  Say N if you want to disable CPU hotplug.
236
237if SPARC64
238source "drivers/cpufreq/Kconfig"
239endif
240
241config US3_MC
242	tristate "UltraSPARC-III Memory Controller driver"
243	depends on SPARC64
244	default y
245	help
246	  This adds a driver for the UltraSPARC-III memory controller.
247	  Loading this driver allows exact mnemonic strings to be
248	  printed in the event of a memory error, so that the faulty DIMM
249	  on the motherboard can be matched to the error.
250
251	  If in doubt, say Y, as this information can be very useful.
252
253# Global things across all Sun machines.
254config GENERIC_LOCKBREAK
255	bool
256	default y
257	depends on SPARC64 && SMP && PREEMPTION
258
259config NUMA
260	bool "NUMA support"
261	depends on SPARC64 && SMP
262
263config NODES_SHIFT
264	int "Maximum NUMA Nodes (as a power of 2)"
265	range 4 5 if SPARC64
266	default "5"
267	depends on NUMA
268	help
269	  Specify the maximum number of NUMA Nodes available on the target
270	  system.  Increases memory reserved to accommodate various tables.
271
272config ARCH_SPARSEMEM_ENABLE
273	def_bool y if SPARC64
274	select SPARSEMEM_VMEMMAP_ENABLE
275
276config ARCH_SPARSEMEM_DEFAULT
277	def_bool y if SPARC64
278
279config ARCH_FORCE_MAX_ORDER
280	int "Order of maximal physically contiguous allocations"
281	default "12"
282	help
283	  The kernel page allocator limits the size of maximal physically
284	  contiguous allocations. The limit is called MAX_PAGE_ORDER and it
285	  defines the maximal power of two of number of pages that can be
286	  allocated as a single contiguous block. This option allows
287	  overriding the default setting when ability to allocate very
288	  large blocks of physically contiguous memory is required.
289
290	  Don't change if unsure.
291
292if SPARC64 || COMPILE_TEST
293source "kernel/power/Kconfig"
294endif
295
296config CMDLINE_BOOL
297	bool "Default bootloader kernel arguments"
298	depends on SPARC64
299
300config CMDLINE
301	string "Initial kernel command string"
302	depends on CMDLINE_BOOL
303	default "console=ttyS0,9600 root=/dev/sda1"
304	help
305	  Say Y here if you want to be able to pass default arguments to
306	  the kernel. This will be overridden by the bootloader, if you
307	  use one (such as SILO). This is most useful if you want to boot
308	  a kernel from TFTP, and want default options to be available
309	  with having them passed on the command line.
310
311	  NOTE: This option WILL override the PROM bootargs setting!
312
313config SUN_PM
314	bool
315	default y if SPARC32
316	help
317	  Enable power management and CPU standby features on supported
318	  SPARC platforms.
319
320config SPARC_LED
321	tristate "Sun4m LED driver"
322	depends on SPARC32
323	help
324	  This driver toggles the front-panel LED on sun4m systems
325	  in a user-specifiable manner.  Its state can be probed
326	  by reading /proc/led and its blinking mode can be changed
327	  via writes to /proc/led
328
329config SPARC_LEON
330	bool "Sparc Leon processor family"
331	depends on SPARC32
332	select USB_EHCI_BIG_ENDIAN_MMIO
333	select USB_EHCI_BIG_ENDIAN_DESC
334	select USB_UHCI_BIG_ENDIAN_MMIO
335	select USB_UHCI_BIG_ENDIAN_DESC
336	help
337	  If you say Y here if you are running on a SPARC-LEON processor.
338	  The LEON processor is a synthesizable VHDL model of the
339	  SPARC-v8 standard. LEON is  part of the GRLIB collection of
340	  IP cores that are distributed under GPL. GRLIB can be downloaded
341	  from www.gaisler.com. You can download a sparc-linux cross-compilation
342	  toolchain at www.gaisler.com.
343
344if SPARC_LEON
345menu "U-Boot options"
346
347config UBOOT_LOAD_ADDR
348	hex "uImage Load Address"
349	default 0x40004000
350	help
351	 U-Boot kernel load address, the address in physical address space
352	 where u-boot will place the Linux kernel before booting it.
353	 This address is normally the base address of main memory + 0x4000.
354
355config UBOOT_FLASH_ADDR
356	hex "uImage.o Load Address"
357	default 0x00080000
358	help
359	 Optional setting only affecting the uImage.o ELF-image used to
360	 download the uImage file to the target using a ELF-loader other than
361	 U-Boot. It may for example be used to download an uImage to FLASH with
362	 the GRMON utility before even starting u-boot.
363
364config UBOOT_ENTRY_ADDR
365	hex "uImage Entry Address"
366	default 0xf0004000
367	help
368	 Do not change this unless you know what you're doing. This is
369	 hardcoded by the SPARC32 and LEON port.
370
371	 This is the virtual address u-boot jumps to when booting the Linux
372	 Kernel.
373
374endmenu
375endif
376
377endmenu
378
379menu "Bus options (PCI etc.)"
380config SBUS
381	bool
382	default y
383
384config SBUSCHAR
385	bool
386	default y
387
388config SUN_LDOMS
389	bool "Sun Logical Domains support"
390	depends on SPARC64
391	help
392	  Say Y here is you want to support virtual devices via
393	  Logical Domains.
394
395config PCIC_PCI
396	bool
397	depends on PCI && SPARC32 && !SPARC_LEON
398	default y
399
400config LEON_PCI
401	bool
402	depends on PCI && SPARC_LEON
403	default y
404
405config SPARC_GRPCI1
406	bool "GRPCI Host Bridge Support"
407	depends on LEON_PCI
408	default y
409	help
410	  Say Y here to include the GRPCI Host Bridge Driver. The GRPCI
411	  PCI host controller is typically found in GRLIB SPARC32/LEON
412	  systems. The driver has one property (all_pci_errors) controlled
413	  from the bootloader that makes the GRPCI to generate interrupts
414	  on detected PCI Parity and System errors.
415
416config SPARC_GRPCI2
417	bool "GRPCI2 Host Bridge Support"
418	depends on LEON_PCI
419	default y
420	help
421	  Say Y here to include the GRPCI2 Host Bridge Driver.
422
423config SUN_OPENPROMFS
424	tristate "Openprom tree appears in /proc/openprom"
425	help
426	  If you say Y, the OpenPROM device tree will be available as a
427	  virtual file system, which you can mount to /proc/openprom by "mount
428	  -t openpromfs none /proc/openprom".
429
430	  To compile the /proc/openprom support as a module, choose M here: the
431	  module will be called openpromfs.
432
433	  Only choose N if you know in advance that you will not need to modify
434	  OpenPROM settings on the running system.
435
436# Makefile helpers
437config SPARC64_PCI
438	bool
439	default y
440	depends on SPARC64 && PCI
441
442config SPARC64_PCI_MSI
443	bool
444	default y
445	depends on SPARC64_PCI && PCI_MSI
446
447endmenu
448
449config COMPAT
450	bool
451	depends on SPARC64
452	depends on !LD_IS_LLD
453	default y
454	select HAVE_UID16
455	select ARCH_WANT_OLD_COMPAT_IPC
456	select COMPAT_OLD_SIGACTION
457
458config ARCH_CC_CAN_LINK
459	bool
460	default $(cc_can_link_user,-m64) if 64BIT
461	default $(cc_can_link_user,-m32)
462
463config ARCH_USERFLAGS
464	string
465	default "-m64" if 64BIT
466	default "-m32"
467
468source "drivers/sbus/char/Kconfig"
469