1 # SPDX-License-Identifier: GPL-2.0
4 select ARCH_HAS_BINFMT_FLAT if !MMU
5 select ARCH_HAS_PTE_SPECIAL
6 select ARCH_HAS_TICK_BROADCAST if GENERIC_CLOCKEVENTS_BROADCAST
7 select ARCH_MIGHT_HAVE_PC_PARPORT
8 select HAVE_PATA_PLATFORM
10 select DMA_DECLARE_COHERENT
11 select HAVE_IDE if HAS_IOPORT_MAP
12 select HAVE_MEMBLOCK_NODE_MAP
14 select HAVE_ARCH_TRACEHOOK
15 select HAVE_PERF_EVENTS
16 select HAVE_DEBUG_BUGVERBOSE
17 select HAVE_FAST_GUP if MMU
18 select ARCH_HAVE_CUSTOM_GPIO_H
19 select ARCH_HAVE_NMI_SAFE_CMPXCHG if (GUSA_RB || CPU_SH4A)
20 select ARCH_HAS_GCOV_PROFILE_ALL
21 select PERF_USE_VMALLOC
22 select HAVE_DEBUG_KMEMLEAK
23 select HAVE_KERNEL_GZIP
24 select CPU_NO_EFFICIENT_FFS
25 select HAVE_KERNEL_BZIP2
26 select HAVE_KERNEL_LZMA
28 select HAVE_KERNEL_LZO
30 select ARCH_WANT_IPC_PARSE_VERSION
31 select HAVE_SYSCALL_TRACEPOINTS
32 select HAVE_REGS_AND_STACK_ACCESS_API
33 select MAY_HAVE_SPARSE_IRQ
34 select IRQ_FORCED_THREADING
36 select GENERIC_ATOMIC64
37 select GENERIC_IRQ_SHOW
38 select GENERIC_SMP_IDLE_THREAD
39 select GENERIC_IDLE_POLL_SETUP
40 select GENERIC_CLOCKEVENTS
41 select GENERIC_CMOS_UPDATE if SH_SH03 || SH_DREAMCAST
42 select GENERIC_PCI_IOMAP if PCI
43 select GENERIC_SCHED_CLOCK
44 select GENERIC_STRNCPY_FROM_USER
45 select GENERIC_STRNLEN_USER
46 select HAVE_MOD_ARCH_SPECIFIC if DWARF_UNWINDER
47 select MODULES_USE_ELF_RELA
48 select NO_GENERIC_PCI_IOPORT_MAP if PCI
51 select PCI_DOMAINS if PCI
52 select HAVE_ARCH_AUDITSYSCALL
53 select HAVE_FUTEX_CMPXCHG if FUTEX
55 select NEED_SG_DMA_LENGTH
56 select ARCH_HAS_GIGANTIC_PAGE
59 The SuperH is a RISC processor targeted for use in embedded systems
60 and consumer electronics; it was also used in the Sega Dreamcast
61 gaming console. The SuperH port has a home page at
62 <http://www.linux-sh.org/>.
65 def_bool "$(ARCH)" = "sh"
66 select ARCH_32BIT_OFF_T
67 select GUP_GET_PTE_LOW_HIGH if X2TLB
69 select HAVE_KRETPROBES
70 select HAVE_IOREMAP_PROT if MMU && !X2TLB
71 select HAVE_FUNCTION_TRACER
72 select HAVE_FTRACE_MCOUNT_RECORD
73 select HAVE_DYNAMIC_FTRACE
74 select ARCH_WANT_IPC_PARSE_VERSION
75 select HAVE_FUNCTION_GRAPH_TRACER
77 select HAVE_HW_BREAKPOINT
78 select HAVE_MIXED_BREAKPOINTS_REGS
80 select ARCH_HIBERNATION_POSSIBLE if MMU
82 select HAVE_STACKPROTECTOR
85 def_bool "$(ARCH)" = "sh64"
86 select HAVE_EXIT_THREAD
91 depends on BUG && SUPERH32
97 config GENERIC_HWEIGHT
100 config GENERIC_CALIBRATE_DELAY
103 config GENERIC_LOCKBREAK
105 depends on SMP && PREEMPTION
107 config ARCH_SUSPEND_POSSIBLE
110 config ARCH_HIBERNATION_POSSIBLE
113 config SYS_SUPPORTS_APM_EMULATION
115 select ARCH_SUSPEND_POSSIBLE
117 config SYS_SUPPORTS_HUGETLBFS
120 config SYS_SUPPORTS_SMP
123 config SYS_SUPPORTS_NUMA
126 config STACKTRACE_SUPPORT
129 config LOCKDEP_SUPPORT
132 config ARCH_HAS_ILOG2_U32
135 config ARCH_HAS_ILOG2_U64
140 depends on !SH_CAYMAN && !SH_SH4202_MICRODEV && !SH_SHMIN && \
141 !SH_HP6XX && !SH_SOLUTION_ENGINE
152 config DMA_NONCOHERENT
153 def_bool !DMA_COHERENT
154 select ARCH_HAS_SYNC_DMA_FOR_DEVICE
156 config PGTABLE_LEVELS
172 select UNCACHED_MAPPING
178 select OF_EARLY_FLATTREE
182 select CPU_HAS_INTEVT
185 select SYS_SUPPORTS_SH_TMU
189 select CPU_HAS_INTEVT
191 select CPU_HAS_FPU if !CPU_SH4AL_DSP
193 select SYS_SUPPORTS_SH_TMU
194 select SYS_SUPPORTS_HUGETLBFS if MMU
208 select SYS_SUPPORTS_SH_TMU
209 select SYS_SUPPORTS_HUGETLBFS if MMU
217 select SYS_SUPPORTS_SMP
218 select SYS_SUPPORTS_NUMA
222 select ARCH_SUSPEND_POSSIBLE
226 depends on CPU_SH4 || CPU_SH4A
233 prompt "Processor sub-type selection"
239 # SH-2 Processor Support
241 config CPU_SUBTYPE_SH7619
242 bool "Support SH7619 processor"
244 select SYS_SUPPORTS_SH_CMT
246 config CPU_SUBTYPE_J2
247 bool "Support J2 processor"
249 select SYS_SUPPORTS_SMP
250 select GENERIC_CLOCKEVENTS_BROADCAST if SMP
252 # SH-2A Processor Support
254 config CPU_SUBTYPE_SH7201
255 bool "Support SH7201 processor"
258 select SYS_SUPPORTS_SH_MTU2
260 config CPU_SUBTYPE_SH7203
261 bool "Support SH7203 processor"
264 select SYS_SUPPORTS_SH_CMT
265 select SYS_SUPPORTS_SH_MTU2
268 config CPU_SUBTYPE_SH7206
269 bool "Support SH7206 processor"
271 select SYS_SUPPORTS_SH_CMT
272 select SYS_SUPPORTS_SH_MTU2
274 config CPU_SUBTYPE_SH7263
275 bool "Support SH7263 processor"
278 select SYS_SUPPORTS_SH_CMT
279 select SYS_SUPPORTS_SH_MTU2
281 config CPU_SUBTYPE_SH7264
282 bool "Support SH7264 processor"
285 select SYS_SUPPORTS_SH_CMT
286 select SYS_SUPPORTS_SH_MTU2
289 config CPU_SUBTYPE_SH7269
290 bool "Support SH7269 processor"
293 select SYS_SUPPORTS_SH_CMT
294 select SYS_SUPPORTS_SH_MTU2
297 config CPU_SUBTYPE_MXG
298 bool "Support MX-G processor"
300 select SYS_SUPPORTS_SH_MTU2
302 Select MX-G if running on an R8A03022BG part.
304 # SH-3 Processor Support
306 config CPU_SUBTYPE_SH7705
307 bool "Support SH7705 processor"
310 config CPU_SUBTYPE_SH7706
311 bool "Support SH7706 processor"
314 Select SH7706 if you have a 133 Mhz SH-3 HD6417706 CPU.
316 config CPU_SUBTYPE_SH7707
317 bool "Support SH7707 processor"
320 Select SH7707 if you have a 60 Mhz SH-3 HD6417707 CPU.
322 config CPU_SUBTYPE_SH7708
323 bool "Support SH7708 processor"
326 Select SH7708 if you have a 60 Mhz SH-3 HD6417708S or
327 if you have a 100 Mhz SH-3 HD6417708R CPU.
329 config CPU_SUBTYPE_SH7709
330 bool "Support SH7709 processor"
333 Select SH7709 if you have a 80 Mhz SH-3 HD6417709 CPU.
335 config CPU_SUBTYPE_SH7710
336 bool "Support SH7710 processor"
340 Select SH7710 if you have a SH3-DSP SH7710 CPU.
342 config CPU_SUBTYPE_SH7712
343 bool "Support SH7712 processor"
347 Select SH7712 if you have a SH3-DSP SH7712 CPU.
349 config CPU_SUBTYPE_SH7720
350 bool "Support SH7720 processor"
353 select SYS_SUPPORTS_SH_CMT
354 select USB_OHCI_SH if USB_OHCI_HCD
357 Select SH7720 if you have a SH3-DSP SH7720 CPU.
359 config CPU_SUBTYPE_SH7721
360 bool "Support SH7721 processor"
363 select SYS_SUPPORTS_SH_CMT
364 select USB_OHCI_SH if USB_OHCI_HCD
366 Select SH7721 if you have a SH3-DSP SH7721 CPU.
368 # SH-4 Processor Support
370 config CPU_SUBTYPE_SH7750
371 bool "Support SH7750 processor"
374 Select SH7750 if you have a 200 Mhz SH-4 HD6417750 CPU.
376 config CPU_SUBTYPE_SH7091
377 bool "Support SH7091 processor"
380 Select SH7091 if you have an SH-4 based Sega device (such as
381 the Dreamcast, Naomi, and Naomi 2).
383 config CPU_SUBTYPE_SH7750R
384 bool "Support SH7750R processor"
387 config CPU_SUBTYPE_SH7750S
388 bool "Support SH7750S processor"
391 config CPU_SUBTYPE_SH7751
392 bool "Support SH7751 processor"
395 Select SH7751 if you have a 166 Mhz SH-4 HD6417751 CPU,
396 or if you have a HD6417751R CPU.
398 config CPU_SUBTYPE_SH7751R
399 bool "Support SH7751R processor"
402 config CPU_SUBTYPE_SH7760
403 bool "Support SH7760 processor"
406 config CPU_SUBTYPE_SH4_202
407 bool "Support SH4-202 processor"
410 # SH-4A Processor Support
412 config CPU_SUBTYPE_SH7723
413 bool "Support SH7723 processor"
417 select ARCH_SPARSEMEM_ENABLE
418 select SYS_SUPPORTS_SH_CMT
421 Select SH7723 if you have an SH-MobileR2 CPU.
423 config CPU_SUBTYPE_SH7724
424 bool "Support SH7724 processor"
428 select ARCH_SPARSEMEM_ENABLE
429 select SYS_SUPPORTS_SH_CMT
432 Select SH7724 if you have an SH-MobileR2R CPU.
434 config CPU_SUBTYPE_SH7734
435 bool "Support SH7734 processor"
440 Select SH7734 if you have a SH4A SH7734 CPU.
442 config CPU_SUBTYPE_SH7757
443 bool "Support SH7757 processor"
448 Select SH7757 if you have a SH4A SH7757 CPU.
450 config CPU_SUBTYPE_SH7763
451 bool "Support SH7763 processor"
453 select USB_OHCI_SH if USB_OHCI_HCD
455 Select SH7763 if you have a SH4A SH7763(R5S77631) CPU.
457 config CPU_SUBTYPE_SH7770
458 bool "Support SH7770 processor"
461 config CPU_SUBTYPE_SH7780
462 bool "Support SH7780 processor"
465 config CPU_SUBTYPE_SH7785
466 bool "Support SH7785 processor"
469 select ARCH_SPARSEMEM_ENABLE
470 select SYS_SUPPORTS_NUMA
473 config CPU_SUBTYPE_SH7786
474 bool "Support SH7786 processor"
477 select CPU_HAS_PTEAEX
478 select GENERIC_CLOCKEVENTS_BROADCAST if SMP
479 select USB_OHCI_SH if USB_OHCI_HCD
480 select USB_EHCI_SH if USB_EHCI_HCD
483 config CPU_SUBTYPE_SHX3
484 bool "Support SH-X3 processor"
487 select GENERIC_CLOCKEVENTS_BROADCAST if SMP
491 # SH4AL-DSP Processor Support
493 config CPU_SUBTYPE_SH7343
494 bool "Support SH7343 processor"
497 select SYS_SUPPORTS_SH_CMT
499 config CPU_SUBTYPE_SH7722
500 bool "Support SH7722 processor"
504 select ARCH_SPARSEMEM_ENABLE
505 select SYS_SUPPORTS_NUMA
506 select SYS_SUPPORTS_SH_CMT
509 config CPU_SUBTYPE_SH7366
510 bool "Support SH7366 processor"
514 select ARCH_SPARSEMEM_ENABLE
515 select SYS_SUPPORTS_NUMA
516 select SYS_SUPPORTS_SH_CMT
525 prompt "Processor sub-type selection"
527 # SH-5 Processor Support
529 config CPU_SUBTYPE_SH5_101
530 bool "Support SH5-101 processor"
533 config CPU_SUBTYPE_SH5_103
534 bool "Support SH5-103 processor"
541 source "arch/sh/mm/Kconfig"
543 source "arch/sh/Kconfig.cpu"
545 source "arch/sh/boards/Kconfig"
547 menu "Timer and clock configuration"
550 int "Peripheral clock frequency (in Hz)"
551 depends on SH_CLK_CPG_LEGACY
552 default "31250000" if CPU_SUBTYPE_SH7619
553 default "33333333" if CPU_SUBTYPE_SH7770 || \
554 CPU_SUBTYPE_SH7760 || \
555 CPU_SUBTYPE_SH7705 || \
556 CPU_SUBTYPE_SH7203 || \
557 CPU_SUBTYPE_SH7206 || \
558 CPU_SUBTYPE_SH7263 || \
560 default "60000000" if CPU_SUBTYPE_SH7751 || CPU_SUBTYPE_SH7751R
561 default "66000000" if CPU_SUBTYPE_SH4_202
564 This option is used to specify the peripheral clock frequency.
565 This is necessary for determining the reference clock value on
566 platforms lacking an RTC.
571 config SH_CLK_CPG_LEGACY
572 depends on SH_CLK_CPG
573 def_bool y if !CPU_SUBTYPE_SH7785 && !ARCH_SHMOBILE && \
574 !CPU_SHX3 && !CPU_SUBTYPE_SH7757 && \
575 !CPU_SUBTYPE_SH7734 && !CPU_SUBTYPE_SH7264 && \
580 menu "CPU Frequency scaling"
581 source "drivers/cpufreq/Kconfig"
584 source "arch/sh/drivers/Kconfig"
588 menu "Kernel features"
590 source "kernel/Kconfig.hz"
593 bool "kexec system call (EXPERIMENTAL)"
594 depends on SUPERH32 && MMU
597 kexec is a system call that implements the ability to shutdown your
598 current kernel, and to start another kernel. It is like a reboot
599 but it is independent of the system firmware. And like a reboot
600 you can start any kernel with it, not just Linux.
602 The name comes from the similarity to the exec system call.
604 It is an ongoing process to be certain the hardware in a machine
605 is properly shutdown, so do not be surprised if this code does not
606 initially work for you. As of this writing the exact hardware
607 interface is strongly in flux, so no good recommendation can be
611 bool "kernel crash dumps (EXPERIMENTAL)"
612 depends on SUPERH32 && BROKEN_ON_SMP
614 Generate crash dump after being started by kexec.
615 This should be normally only set in special crash dump kernels
616 which are loaded in the main kernel with kexec-tools into
617 a specially reserved region and then later executed after
618 a crash by kdump/kexec. The crash dump kernel must be compiled
619 to a memory address not used by the main kernel using
622 For more details see Documentation/admin-guide/kdump/kdump.rst
625 bool "kexec jump (EXPERIMENTAL)"
626 depends on SUPERH32 && KEXEC && HIBERNATION
628 Jump between original kernel and kexeced kernel and invoke
631 config PHYSICAL_START
632 hex "Physical address where the kernel is loaded" if (EXPERT || CRASH_DUMP)
635 This gives the physical address where the kernel is loaded
636 and is ordinarily the same as MEMORY_START.
638 Different values are primarily used in the case of kexec on panic
639 where the fail safe kernel needs to run at a different address
640 than the panic-ed kernel.
643 bool "Enable seccomp to safely compute untrusted bytecode"
646 This kernel feature is useful for number crunching applications
647 that may need to compute untrusted bytecode during their
648 execution. By using pipes or other transports made available to
649 the process as file descriptors supporting the read/write
650 syscalls, it's possible to isolate those applications in
651 their own address space using seccomp. Once seccomp is
652 enabled via prctl, it cannot be disabled and the task is only
653 allowed to execute a few safe syscalls defined by each seccomp
659 bool "Symmetric multi-processing support"
660 depends on SYS_SUPPORTS_SMP
662 This enables support for systems with more than one CPU. If you have
663 a system with only one CPU, say N. If you have a system with more
666 If you say N here, the kernel will run on uni- and multiprocessor
667 machines, but will use only one CPU of a multiprocessor machine. If
668 you say Y here, the kernel will run on many, but not all,
669 uniprocessor machines. On a uniprocessor machine, the kernel
670 will run faster if you say N here.
672 People using multiprocessor machines who say Y here should also say
673 Y to "Enhanced Real Time Clock Support", below.
675 See also <file:Documentation/admin-guide/lockup-watchdogs.rst> and the SMP-HOWTO
676 available at <http://www.tldp.org/docs.html#howto>.
678 If you don't know what to do here, say N.
681 int "Maximum number of CPUs (2-32)"
684 default "4" if CPU_SUBTYPE_SHX3
687 This allows you to specify the maximum number of CPUs which this
688 kernel will support. The maximum supported value is 32 and the
689 minimum value which makes sense is 2.
691 This is purely to save memory - each supported CPU adds
692 approximately eight kilobytes to the kernel image.
695 bool "Support for hot-pluggable CPUs (EXPERIMENTAL)"
698 Say Y here to experiment with turning CPUs off and on. CPUs
699 can be controlled through /sys/devices/system/cpu.
703 depends on !SMP && SUPERH32
705 This enables support for gUSA (general UserSpace Atomicity).
706 This is the default implementation for both UP and non-ll/sc
707 CPUs, and is used by the libc, amongst others.
709 For additional information, design information can be found
710 in <http://lc.linux.or.jp/lc2002/papers/niibe0919p.pdf>.
712 This should only be disabled for special cases where alternate
713 atomicity implementations exist.
716 bool "Implement atomic operations by roll-back (gRB) (EXPERIMENTAL)"
717 depends on GUSA && CPU_SH3 || (CPU_SH4 && !CPU_SH4A)
719 Enabling this option will allow the kernel to implement some
720 atomic operations using a software implementation of load-locked/
721 store-conditional (LLSC). On machines which do not have hardware
722 LLSC, this should be more efficient than the other alternative of
723 disabling interrupts around the atomic sequence.
725 config HW_PERF_EVENTS
726 bool "Enable hardware performance counter support for perf events"
727 depends on PERF_EVENTS && CPU_HAS_PMU
730 Enable hardware performance counter support for perf events. If
731 disabled, perf events will use software events only.
733 source "drivers/sh/Kconfig"
739 config USE_BUILTIN_DTB
740 bool "Use builtin DTB"
742 depends on SH_DEVICE_TREE
744 Link a device tree blob for particular hardware into the kernel,
745 suppressing use of the DTB pointer provided by the bootloader.
746 This option should only be used with legacy bootloaders that are
747 not capable of providing a DTB to the kernel, or for experimental
748 hardware without stable device tree bindings.
750 config BUILTIN_DTB_SOURCE
751 string "Source file for builtin DTB"
753 depends on USE_BUILTIN_DTB
755 Base name (without suffix, relative to arch/sh/boot/dts) for the
756 a DTS file that will be used to produce the DTB linked into the
759 config ZERO_PAGE_OFFSET
761 default "0x00010000" if PAGE_SIZE_64KB || SH_RTS7751R2D || \
762 SH_7751_SOLUTION_ENGINE
763 default "0x00004000" if PAGE_SIZE_16KB || SH_SH03
764 default "0x00002000" if PAGE_SIZE_8KB
767 This sets the default offset of zero page.
769 config BOOT_LINK_OFFSET
771 default "0x00210000" if SH_SHMIN
772 default "0x00400000" if SH_CAYMAN
773 default "0x00810000" if SH_7780_SOLUTION_ENGINE
774 default "0x009e0000" if SH_TITAN
775 default "0x01800000" if SH_SDK7780
776 default "0x02000000" if SH_EDOSK7760
779 This option allows you to set the link address offset of the zImage.
780 This can be useful if you are on a board which has a small amount of
785 default "0x00001000" if PAGE_SIZE_4KB
786 default "0x00002000" if PAGE_SIZE_8KB
787 default "0x00004000" if PAGE_SIZE_16KB
788 default "0x00010000" if PAGE_SIZE_64KB
791 config ROMIMAGE_MMCIF
792 bool "Include MMCIF loader in romImage (EXPERIMENTAL)"
793 depends on CPU_SUBTYPE_SH7724
795 Say Y here to include experimental MMCIF loading code in
796 romImage. With this enabled it is possible to write the romImage
797 kernel image to an MMC card and boot the kernel straight from
798 the reset vector. At reset the processor Mask ROM will load the
799 first part of the romImage which in turn loads the rest the kernel
800 image to RAM using the MMCIF hardware block.
803 prompt "Kernel command line"
805 default CMDLINE_OVERWRITE
807 Setting this option allows the kernel command line arguments
810 config CMDLINE_OVERWRITE
811 bool "Overwrite bootloader kernel arguments"
813 Given string will overwrite any arguments passed in by
816 config CMDLINE_EXTEND
817 bool "Extend bootloader kernel arguments"
819 Given string will be concatenated with arguments passed in
825 string "Kernel command line arguments string"
826 depends on CMDLINE_OVERWRITE || CMDLINE_EXTEND
827 default "console=ttySC1,115200"
834 tristate "SuperHyway Bus support"
835 depends on CPU_SUBTYPE_SH4_202
838 bool "Maple Bus support"
839 depends on SH_DREAMCAST
841 The Maple Bus is SEGA's serial communication bus for peripherals
842 on the Dreamcast. Without this bus support you won't be able to
843 get your Dreamcast keyboard etc to work, so most users
844 probably want to say 'Y' here, unless you are only using the
845 Dreamcast with a serial line terminal or a remote network
850 menu "Power management options (EXPERIMENTAL)"
852 source "kernel/power/Kconfig"
854 source "drivers/cpuidle/Kconfig"