xref: /linux/arch/sparc/Kconfig (revision 3774fd535fc2e54cdc4e915050f787a8b0bc6f8c)
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 SPARC_LEON
331	bool "Sparc Leon processor family"
332	depends on SPARC32
333	select USB_EHCI_BIG_ENDIAN_MMIO
334	select USB_EHCI_BIG_ENDIAN_DESC
335	select USB_UHCI_BIG_ENDIAN_MMIO
336	select USB_UHCI_BIG_ENDIAN_DESC
337	help
338	  If you say Y here if you are running on a SPARC-LEON processor.
339	  The LEON processor is a synthesizable VHDL model of the
340	  SPARC-v8 standard. LEON is  part of the GRLIB collection of
341	  IP cores that are distributed under GPL. GRLIB can be downloaded
342	  from www.gaisler.com. You can download a sparc-linux cross-compilation
343	  toolchain at www.gaisler.com.
344
345if SPARC_LEON
346menu "U-Boot options"
347
348config UBOOT_LOAD_ADDR
349	hex "uImage Load Address"
350	default 0x40004000
351	help
352	 U-Boot kernel load address, the address in physical address space
353	 where u-boot will place the Linux kernel before booting it.
354	 This address is normally the base address of main memory + 0x4000.
355
356config UBOOT_FLASH_ADDR
357	hex "uImage.o Load Address"
358	default 0x00080000
359	help
360	 Optional setting only affecting the uImage.o ELF-image used to
361	 download the uImage file to the target using a ELF-loader other than
362	 U-Boot. It may for example be used to download an uImage to FLASH with
363	 the GRMON utility before even starting u-boot.
364
365config UBOOT_ENTRY_ADDR
366	hex "uImage Entry Address"
367	default 0xf0004000
368	help
369	 Do not change this unless you know what you're doing. This is
370	 hardcoded by the SPARC32 and LEON port.
371
372	 This is the virtual address u-boot jumps to when booting the Linux
373	 Kernel.
374
375endmenu
376endif
377
378endmenu
379
380menu "Bus options (PCI etc.)"
381config SBUS
382	bool
383	default y
384
385config SBUSCHAR
386	bool
387	default y
388
389config SUN_LDOMS
390	bool "Sun Logical Domains support"
391	depends on SPARC64
392	help
393	  Say Y here is you want to support virtual devices via
394	  Logical Domains.
395
396config PCIC_PCI
397	bool
398	depends on PCI && SPARC32 && !SPARC_LEON
399	default y
400
401config LEON_PCI
402	bool
403	depends on PCI && SPARC_LEON
404	default y
405
406config SPARC_GRPCI1
407	bool "GRPCI Host Bridge Support"
408	depends on LEON_PCI
409	default y
410	help
411	  Say Y here to include the GRPCI Host Bridge Driver. The GRPCI
412	  PCI host controller is typically found in GRLIB SPARC32/LEON
413	  systems. The driver has one property (all_pci_errors) controlled
414	  from the bootloader that makes the GRPCI to generate interrupts
415	  on detected PCI Parity and System errors.
416
417config SPARC_GRPCI2
418	bool "GRPCI2 Host Bridge Support"
419	depends on LEON_PCI
420	default y
421	help
422	  Say Y here to include the GRPCI2 Host Bridge Driver.
423
424config SUN_OPENPROMFS
425	tristate "Openprom tree appears in /proc/openprom"
426	help
427	  If you say Y, the OpenPROM device tree will be available as a
428	  virtual file system, which you can mount to /proc/openprom by "mount
429	  -t openpromfs none /proc/openprom".
430
431	  To compile the /proc/openprom support as a module, choose M here: the
432	  module will be called openpromfs.
433
434	  Only choose N if you know in advance that you will not need to modify
435	  OpenPROM settings on the running system.
436
437# Makefile helpers
438config SPARC64_PCI
439	bool
440	default y
441	depends on SPARC64 && PCI
442
443config SPARC64_PCI_MSI
444	bool
445	default y
446	depends on SPARC64_PCI && PCI_MSI
447
448endmenu
449
450config COMPAT
451	bool
452	depends on SPARC64
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