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 HAVE_FTRACE_NMI_ENTER if DYNAMIC_FTRACE
75 select ARCH_WANT_IPC_PARSE_VERSION
76 select HAVE_FUNCTION_GRAPH_TRACER
78 select HAVE_HW_BREAKPOINT
79 select HAVE_MIXED_BREAKPOINTS_REGS
81 select ARCH_HIBERNATION_POSSIBLE if MMU
83 select HAVE_STACKPROTECTOR
86 def_bool "$(ARCH)" = "sh64"
87 select HAVE_EXIT_THREAD
92 default "arch/sh/configs/shx3_defconfig" if SUPERH32
93 default "arch/sh/configs/cayman_defconfig" if SUPERH64
97 depends on BUG && SUPERH32
103 config GENERIC_HWEIGHT
106 config GENERIC_CALIBRATE_DELAY
109 config GENERIC_LOCKBREAK
111 depends on SMP && PREEMPTION
113 config ARCH_SUSPEND_POSSIBLE
116 config ARCH_HIBERNATION_POSSIBLE
119 config SYS_SUPPORTS_APM_EMULATION
121 select ARCH_SUSPEND_POSSIBLE
123 config SYS_SUPPORTS_HUGETLBFS
126 config SYS_SUPPORTS_SMP
129 config SYS_SUPPORTS_NUMA
132 config STACKTRACE_SUPPORT
135 config LOCKDEP_SUPPORT
138 config ARCH_HAS_ILOG2_U32
141 config ARCH_HAS_ILOG2_U64
146 depends on !SH_CAYMAN && !SH_SH4202_MICRODEV && !SH_SHMIN && \
147 !SH_HP6XX && !SH_SOLUTION_ENGINE
158 config DMA_NONCOHERENT
159 def_bool !DMA_COHERENT
160 select ARCH_HAS_SYNC_DMA_FOR_DEVICE
162 config PGTABLE_LEVELS
178 select UNCACHED_MAPPING
184 select OF_EARLY_FLATTREE
188 select CPU_HAS_INTEVT
191 select SYS_SUPPORTS_SH_TMU
195 select CPU_HAS_INTEVT
197 select CPU_HAS_FPU if !CPU_SH4AL_DSP
199 select SYS_SUPPORTS_SH_TMU
200 select SYS_SUPPORTS_HUGETLBFS if MMU
214 select SYS_SUPPORTS_SH_TMU
215 select SYS_SUPPORTS_HUGETLBFS if MMU
223 select SYS_SUPPORTS_SMP
224 select SYS_SUPPORTS_NUMA
228 select ARCH_SUSPEND_POSSIBLE
232 depends on CPU_SH4 || CPU_SH4A
239 prompt "Processor sub-type selection"
245 # SH-2 Processor Support
247 config CPU_SUBTYPE_SH7619
248 bool "Support SH7619 processor"
250 select SYS_SUPPORTS_SH_CMT
252 config CPU_SUBTYPE_J2
253 bool "Support J2 processor"
255 select SYS_SUPPORTS_SMP
256 select GENERIC_CLOCKEVENTS_BROADCAST if SMP
258 # SH-2A Processor Support
260 config CPU_SUBTYPE_SH7201
261 bool "Support SH7201 processor"
264 select SYS_SUPPORTS_SH_MTU2
266 config CPU_SUBTYPE_SH7203
267 bool "Support SH7203 processor"
270 select SYS_SUPPORTS_SH_CMT
271 select SYS_SUPPORTS_SH_MTU2
274 config CPU_SUBTYPE_SH7206
275 bool "Support SH7206 processor"
277 select SYS_SUPPORTS_SH_CMT
278 select SYS_SUPPORTS_SH_MTU2
280 config CPU_SUBTYPE_SH7263
281 bool "Support SH7263 processor"
284 select SYS_SUPPORTS_SH_CMT
285 select SYS_SUPPORTS_SH_MTU2
287 config CPU_SUBTYPE_SH7264
288 bool "Support SH7264 processor"
291 select SYS_SUPPORTS_SH_CMT
292 select SYS_SUPPORTS_SH_MTU2
295 config CPU_SUBTYPE_SH7269
296 bool "Support SH7269 processor"
299 select SYS_SUPPORTS_SH_CMT
300 select SYS_SUPPORTS_SH_MTU2
303 config CPU_SUBTYPE_MXG
304 bool "Support MX-G processor"
306 select SYS_SUPPORTS_SH_MTU2
308 Select MX-G if running on an R8A03022BG part.
310 # SH-3 Processor Support
312 config CPU_SUBTYPE_SH7705
313 bool "Support SH7705 processor"
316 config CPU_SUBTYPE_SH7706
317 bool "Support SH7706 processor"
320 Select SH7706 if you have a 133 Mhz SH-3 HD6417706 CPU.
322 config CPU_SUBTYPE_SH7707
323 bool "Support SH7707 processor"
326 Select SH7707 if you have a 60 Mhz SH-3 HD6417707 CPU.
328 config CPU_SUBTYPE_SH7708
329 bool "Support SH7708 processor"
332 Select SH7708 if you have a 60 Mhz SH-3 HD6417708S or
333 if you have a 100 Mhz SH-3 HD6417708R CPU.
335 config CPU_SUBTYPE_SH7709
336 bool "Support SH7709 processor"
339 Select SH7709 if you have a 80 Mhz SH-3 HD6417709 CPU.
341 config CPU_SUBTYPE_SH7710
342 bool "Support SH7710 processor"
346 Select SH7710 if you have a SH3-DSP SH7710 CPU.
348 config CPU_SUBTYPE_SH7712
349 bool "Support SH7712 processor"
353 Select SH7712 if you have a SH3-DSP SH7712 CPU.
355 config CPU_SUBTYPE_SH7720
356 bool "Support SH7720 processor"
359 select SYS_SUPPORTS_SH_CMT
360 select USB_OHCI_SH if USB_OHCI_HCD
363 Select SH7720 if you have a SH3-DSP SH7720 CPU.
365 config CPU_SUBTYPE_SH7721
366 bool "Support SH7721 processor"
369 select SYS_SUPPORTS_SH_CMT
370 select USB_OHCI_SH if USB_OHCI_HCD
372 Select SH7721 if you have a SH3-DSP SH7721 CPU.
374 # SH-4 Processor Support
376 config CPU_SUBTYPE_SH7750
377 bool "Support SH7750 processor"
380 Select SH7750 if you have a 200 Mhz SH-4 HD6417750 CPU.
382 config CPU_SUBTYPE_SH7091
383 bool "Support SH7091 processor"
386 Select SH7091 if you have an SH-4 based Sega device (such as
387 the Dreamcast, Naomi, and Naomi 2).
389 config CPU_SUBTYPE_SH7750R
390 bool "Support SH7750R processor"
393 config CPU_SUBTYPE_SH7750S
394 bool "Support SH7750S processor"
397 config CPU_SUBTYPE_SH7751
398 bool "Support SH7751 processor"
401 Select SH7751 if you have a 166 Mhz SH-4 HD6417751 CPU,
402 or if you have a HD6417751R CPU.
404 config CPU_SUBTYPE_SH7751R
405 bool "Support SH7751R processor"
408 config CPU_SUBTYPE_SH7760
409 bool "Support SH7760 processor"
412 config CPU_SUBTYPE_SH4_202
413 bool "Support SH4-202 processor"
416 # SH-4A Processor Support
418 config CPU_SUBTYPE_SH7723
419 bool "Support SH7723 processor"
423 select ARCH_SPARSEMEM_ENABLE
424 select SYS_SUPPORTS_SH_CMT
427 Select SH7723 if you have an SH-MobileR2 CPU.
429 config CPU_SUBTYPE_SH7724
430 bool "Support SH7724 processor"
434 select ARCH_SPARSEMEM_ENABLE
435 select SYS_SUPPORTS_SH_CMT
438 Select SH7724 if you have an SH-MobileR2R CPU.
440 config CPU_SUBTYPE_SH7734
441 bool "Support SH7734 processor"
446 Select SH7734 if you have a SH4A SH7734 CPU.
448 config CPU_SUBTYPE_SH7757
449 bool "Support SH7757 processor"
454 Select SH7757 if you have a SH4A SH7757 CPU.
456 config CPU_SUBTYPE_SH7763
457 bool "Support SH7763 processor"
459 select USB_OHCI_SH if USB_OHCI_HCD
461 Select SH7763 if you have a SH4A SH7763(R5S77631) CPU.
463 config CPU_SUBTYPE_SH7770
464 bool "Support SH7770 processor"
467 config CPU_SUBTYPE_SH7780
468 bool "Support SH7780 processor"
471 config CPU_SUBTYPE_SH7785
472 bool "Support SH7785 processor"
475 select ARCH_SPARSEMEM_ENABLE
476 select SYS_SUPPORTS_NUMA
479 config CPU_SUBTYPE_SH7786
480 bool "Support SH7786 processor"
483 select CPU_HAS_PTEAEX
484 select GENERIC_CLOCKEVENTS_BROADCAST if SMP
485 select USB_OHCI_SH if USB_OHCI_HCD
486 select USB_EHCI_SH if USB_EHCI_HCD
489 config CPU_SUBTYPE_SHX3
490 bool "Support SH-X3 processor"
493 select GENERIC_CLOCKEVENTS_BROADCAST if SMP
497 # SH4AL-DSP Processor Support
499 config CPU_SUBTYPE_SH7343
500 bool "Support SH7343 processor"
503 select SYS_SUPPORTS_SH_CMT
505 config CPU_SUBTYPE_SH7722
506 bool "Support SH7722 processor"
510 select ARCH_SPARSEMEM_ENABLE
511 select SYS_SUPPORTS_NUMA
512 select SYS_SUPPORTS_SH_CMT
515 config CPU_SUBTYPE_SH7366
516 bool "Support SH7366 processor"
520 select ARCH_SPARSEMEM_ENABLE
521 select SYS_SUPPORTS_NUMA
522 select SYS_SUPPORTS_SH_CMT
531 prompt "Processor sub-type selection"
533 # SH-5 Processor Support
535 config CPU_SUBTYPE_SH5_101
536 bool "Support SH5-101 processor"
539 config CPU_SUBTYPE_SH5_103
540 bool "Support SH5-103 processor"
547 source "arch/sh/mm/Kconfig"
549 source "arch/sh/Kconfig.cpu"
551 source "arch/sh/boards/Kconfig"
553 menu "Timer and clock configuration"
556 int "Peripheral clock frequency (in Hz)"
557 depends on SH_CLK_CPG_LEGACY
558 default "31250000" if CPU_SUBTYPE_SH7619
559 default "33333333" if CPU_SUBTYPE_SH7770 || \
560 CPU_SUBTYPE_SH7760 || \
561 CPU_SUBTYPE_SH7705 || \
562 CPU_SUBTYPE_SH7203 || \
563 CPU_SUBTYPE_SH7206 || \
564 CPU_SUBTYPE_SH7263 || \
566 default "60000000" if CPU_SUBTYPE_SH7751 || CPU_SUBTYPE_SH7751R
567 default "66000000" if CPU_SUBTYPE_SH4_202
570 This option is used to specify the peripheral clock frequency.
571 This is necessary for determining the reference clock value on
572 platforms lacking an RTC.
577 config SH_CLK_CPG_LEGACY
578 depends on SH_CLK_CPG
579 def_bool y if !CPU_SUBTYPE_SH7785 && !ARCH_SHMOBILE && \
580 !CPU_SHX3 && !CPU_SUBTYPE_SH7757 && \
581 !CPU_SUBTYPE_SH7734 && !CPU_SUBTYPE_SH7264 && \
586 menu "CPU Frequency scaling"
587 source "drivers/cpufreq/Kconfig"
590 source "arch/sh/drivers/Kconfig"
594 menu "Kernel features"
596 source "kernel/Kconfig.hz"
599 bool "kexec system call (EXPERIMENTAL)"
600 depends on SUPERH32 && MMU
603 kexec is a system call that implements the ability to shutdown your
604 current kernel, and to start another kernel. It is like a reboot
605 but it is independent of the system firmware. And like a reboot
606 you can start any kernel with it, not just Linux.
608 The name comes from the similarity to the exec system call.
610 It is an ongoing process to be certain the hardware in a machine
611 is properly shutdown, so do not be surprised if this code does not
612 initially work for you. As of this writing the exact hardware
613 interface is strongly in flux, so no good recommendation can be
617 bool "kernel crash dumps (EXPERIMENTAL)"
618 depends on SUPERH32 && BROKEN_ON_SMP
620 Generate crash dump after being started by kexec.
621 This should be normally only set in special crash dump kernels
622 which are loaded in the main kernel with kexec-tools into
623 a specially reserved region and then later executed after
624 a crash by kdump/kexec. The crash dump kernel must be compiled
625 to a memory address not used by the main kernel using
628 For more details see Documentation/admin-guide/kdump/kdump.rst
631 bool "kexec jump (EXPERIMENTAL)"
632 depends on SUPERH32 && KEXEC && HIBERNATION
634 Jump between original kernel and kexeced kernel and invoke
637 config PHYSICAL_START
638 hex "Physical address where the kernel is loaded" if (EXPERT || CRASH_DUMP)
641 This gives the physical address where the kernel is loaded
642 and is ordinarily the same as MEMORY_START.
644 Different values are primarily used in the case of kexec on panic
645 where the fail safe kernel needs to run at a different address
646 than the panic-ed kernel.
649 bool "Enable seccomp to safely compute untrusted bytecode"
652 This kernel feature is useful for number crunching applications
653 that may need to compute untrusted bytecode during their
654 execution. By using pipes or other transports made available to
655 the process as file descriptors supporting the read/write
656 syscalls, it's possible to isolate those applications in
657 their own address space using seccomp. Once seccomp is
658 enabled via prctl, it cannot be disabled and the task is only
659 allowed to execute a few safe syscalls defined by each seccomp
665 bool "Symmetric multi-processing support"
666 depends on SYS_SUPPORTS_SMP
668 This enables support for systems with more than one CPU. If you have
669 a system with only one CPU, say N. If you have a system with more
672 If you say N here, the kernel will run on uni- and multiprocessor
673 machines, but will use only one CPU of a multiprocessor machine. If
674 you say Y here, the kernel will run on many, but not all,
675 uniprocessor machines. On a uniprocessor machine, the kernel
676 will run faster if you say N here.
678 People using multiprocessor machines who say Y here should also say
679 Y to "Enhanced Real Time Clock Support", below.
681 See also <file:Documentation/admin-guide/lockup-watchdogs.rst> and the SMP-HOWTO
682 available at <http://www.tldp.org/docs.html#howto>.
684 If you don't know what to do here, say N.
687 int "Maximum number of CPUs (2-32)"
690 default "4" if CPU_SUBTYPE_SHX3
693 This allows you to specify the maximum number of CPUs which this
694 kernel will support. The maximum supported value is 32 and the
695 minimum value which makes sense is 2.
697 This is purely to save memory - each supported CPU adds
698 approximately eight kilobytes to the kernel image.
701 bool "Support for hot-pluggable CPUs (EXPERIMENTAL)"
704 Say Y here to experiment with turning CPUs off and on. CPUs
705 can be controlled through /sys/devices/system/cpu.
709 depends on !SMP && SUPERH32
711 This enables support for gUSA (general UserSpace Atomicity).
712 This is the default implementation for both UP and non-ll/sc
713 CPUs, and is used by the libc, amongst others.
715 For additional information, design information can be found
716 in <http://lc.linux.or.jp/lc2002/papers/niibe0919p.pdf>.
718 This should only be disabled for special cases where alternate
719 atomicity implementations exist.
722 bool "Implement atomic operations by roll-back (gRB) (EXPERIMENTAL)"
723 depends on GUSA && CPU_SH3 || (CPU_SH4 && !CPU_SH4A)
725 Enabling this option will allow the kernel to implement some
726 atomic operations using a software implementation of load-locked/
727 store-conditional (LLSC). On machines which do not have hardware
728 LLSC, this should be more efficient than the other alternative of
729 disabling interrupts around the atomic sequence.
731 config HW_PERF_EVENTS
732 bool "Enable hardware performance counter support for perf events"
733 depends on PERF_EVENTS && CPU_HAS_PMU
736 Enable hardware performance counter support for perf events. If
737 disabled, perf events will use software events only.
739 source "drivers/sh/Kconfig"
745 config USE_BUILTIN_DTB
746 bool "Use builtin DTB"
748 depends on SH_DEVICE_TREE
750 Link a device tree blob for particular hardware into the kernel,
751 suppressing use of the DTB pointer provided by the bootloader.
752 This option should only be used with legacy bootloaders that are
753 not capable of providing a DTB to the kernel, or for experimental
754 hardware without stable device tree bindings.
756 config BUILTIN_DTB_SOURCE
757 string "Source file for builtin DTB"
759 depends on USE_BUILTIN_DTB
761 Base name (without suffix, relative to arch/sh/boot/dts) for the
762 a DTS file that will be used to produce the DTB linked into the
765 config ZERO_PAGE_OFFSET
767 default "0x00010000" if PAGE_SIZE_64KB || SH_RTS7751R2D || \
768 SH_7751_SOLUTION_ENGINE
769 default "0x00004000" if PAGE_SIZE_16KB || SH_SH03
770 default "0x00002000" if PAGE_SIZE_8KB
773 This sets the default offset of zero page.
775 config BOOT_LINK_OFFSET
777 default "0x00210000" if SH_SHMIN
778 default "0x00400000" if SH_CAYMAN
779 default "0x00810000" if SH_7780_SOLUTION_ENGINE
780 default "0x009e0000" if SH_TITAN
781 default "0x01800000" if SH_SDK7780
782 default "0x02000000" if SH_EDOSK7760
785 This option allows you to set the link address offset of the zImage.
786 This can be useful if you are on a board which has a small amount of
791 default "0x00001000" if PAGE_SIZE_4KB
792 default "0x00002000" if PAGE_SIZE_8KB
793 default "0x00004000" if PAGE_SIZE_16KB
794 default "0x00010000" if PAGE_SIZE_64KB
797 config ROMIMAGE_MMCIF
798 bool "Include MMCIF loader in romImage (EXPERIMENTAL)"
799 depends on CPU_SUBTYPE_SH7724
801 Say Y here to include experimental MMCIF loading code in
802 romImage. With this enabled it is possible to write the romImage
803 kernel image to an MMC card and boot the kernel straight from
804 the reset vector. At reset the processor Mask ROM will load the
805 first part of the romImage which in turn loads the rest the kernel
806 image to RAM using the MMCIF hardware block.
809 prompt "Kernel command line"
811 default CMDLINE_OVERWRITE
813 Setting this option allows the kernel command line arguments
816 config CMDLINE_OVERWRITE
817 bool "Overwrite bootloader kernel arguments"
819 Given string will overwrite any arguments passed in by
822 config CMDLINE_EXTEND
823 bool "Extend bootloader kernel arguments"
825 Given string will be concatenated with arguments passed in
831 string "Kernel command line arguments string"
832 depends on CMDLINE_OVERWRITE || CMDLINE_EXTEND
833 default "console=ttySC1,115200"
840 tristate "SuperHyway Bus support"
841 depends on CPU_SUBTYPE_SH4_202
844 bool "Maple Bus support"
845 depends on SH_DREAMCAST
847 The Maple Bus is SEGA's serial communication bus for peripherals
848 on the Dreamcast. Without this bus support you won't be able to
849 get your Dreamcast keyboard etc to work, so most users
850 probably want to say 'Y' here, unless you are only using the
851 Dreamcast with a serial line terminal or a remote network
856 menu "Power management options (EXPERIMENTAL)"
858 source "kernel/power/Kconfig"
860 source "drivers/cpuidle/Kconfig"