1b2441318SGreg Kroah-Hartman# SPDX-License-Identifier: GPL-2.0 2cad82448SPaul Mundtmenu "Memory management options" 3cad82448SPaul Mundt 4cad82448SPaul Mundtconfig MMU 5cad82448SPaul Mundt bool "Support for memory management hardware" 6cad82448SPaul Mundt depends on !CPU_SH2 7cad82448SPaul Mundt default y 8cad82448SPaul Mundt help 9cad82448SPaul Mundt Some SH processors (such as SH-2/SH-2A) lack an MMU. In order to 10cad82448SPaul Mundt boot on these systems, this option must not be set. 11cad82448SPaul Mundt 12cad82448SPaul Mundt On other systems (such as the SH-3 and 4) where an MMU exists, 13cad82448SPaul Mundt turning this off will boot the kernel on these machines with the 14cad82448SPaul Mundt MMU implicitly switched off. 15cad82448SPaul Mundt 16e7f93a35SPaul Mundtconfig PAGE_OFFSET 17e7f93a35SPaul Mundt hex 1837744feeSArnd Bergmann default "0x80000000" if MMU 19e7f93a35SPaul Mundt default "0x00000000" 20e7f93a35SPaul Mundt 210192445cSZi Yanconfig ARCH_FORCE_MAX_ORDER 22*b2a37fb2SMike Rapoport (IBM) int "Order of maximal physically contiguous allocations" 2323baf831SKirill A. Shutemov default "8" if PAGE_SIZE_16KB 2423baf831SKirill A. Shutemov default "6" if PAGE_SIZE_64KB 2523baf831SKirill A. Shutemov default "13" if !MMU 2623baf831SKirill A. Shutemov default "10" 27ad3256e3SPaul Mundt help 28*b2a37fb2SMike Rapoport (IBM) The kernel page allocator limits the size of maximal physically 29*b2a37fb2SMike Rapoport (IBM) contiguous allocations. The limit is called MAX_ORDER and it 30*b2a37fb2SMike Rapoport (IBM) defines the maximal power of two of number of pages that can be 31*b2a37fb2SMike Rapoport (IBM) allocated as a single contiguous block. This option allows 32*b2a37fb2SMike Rapoport (IBM) overriding the default setting when ability to allocate very 33*b2a37fb2SMike Rapoport (IBM) large blocks of physically contiguous memory is required. 34ad3256e3SPaul Mundt 35ad3256e3SPaul Mundt The page size is not necessarily 4KB. Keep this in mind when 36ad3256e3SPaul Mundt choosing a value for this option. 37ad3256e3SPaul Mundt 38*b2a37fb2SMike Rapoport (IBM) Don't change if unsure. 39*b2a37fb2SMike Rapoport (IBM) 40e7f93a35SPaul Mundtconfig MEMORY_START 41e7f93a35SPaul Mundt hex "Physical memory start address" 42e7f93a35SPaul Mundt default "0x08000000" 43a7f7f624SMasahiro Yamada help 44e7f93a35SPaul Mundt Computers built with Hitachi SuperH processors always 45e7f93a35SPaul Mundt map the ROM starting at address zero. But the processor 46e7f93a35SPaul Mundt does not specify the range that RAM takes. 47e7f93a35SPaul Mundt 48e7f93a35SPaul Mundt The physical memory (RAM) start address will be automatically 49e7f93a35SPaul Mundt set to 08000000. Other platforms, such as the Solution Engine 50e7f93a35SPaul Mundt boards typically map RAM at 0C000000. 51e7f93a35SPaul Mundt 52e7f93a35SPaul Mundt Tweak this only when porting to a new machine which does not 53e7f93a35SPaul Mundt already have a defconfig. Changing it from the known correct 54e7f93a35SPaul Mundt value on any of the known systems will only lead to disaster. 55e7f93a35SPaul Mundt 56e7f93a35SPaul Mundtconfig MEMORY_SIZE 57e7f93a35SPaul Mundt hex "Physical memory size" 58711fe436SPaul Mundt default "0x04000000" 59e7f93a35SPaul Mundt help 60e7f93a35SPaul Mundt This sets the default memory size assumed by your SH kernel. It can 61e7f93a35SPaul Mundt be overridden as normal by the 'mem=' argument on the kernel command 62e7f93a35SPaul Mundt line. If unsure, consult your board specifications or just leave it 63711fe436SPaul Mundt as 0x04000000 which was the default value before this became 64e7f93a35SPaul Mundt configurable. 65e7f93a35SPaul Mundt 6636bcd39dSPaul Mundt# Physical addressing modes 6736bcd39dSPaul Mundt 6836bcd39dSPaul Mundtconfig 29BIT 6936bcd39dSPaul Mundt def_bool !32BIT 70b0f3ae03SPaul Mundt select UNCACHED_MAPPING 7136bcd39dSPaul Mundt 72cad82448SPaul Mundtconfig 32BIT 7336bcd39dSPaul Mundt bool 7437744feeSArnd Bergmann default !MMU 7536bcd39dSPaul Mundt 76a0ab3668SPaul Mundtconfig PMB 77cad82448SPaul Mundt bool "Support 32-bit physical addressing through PMB" 780d57af1eSKees Cook depends on MMU && CPU_SH4A && !CPU_SH4AL_DSP 79a0ab3668SPaul Mundt select 32BIT 80b0f3ae03SPaul Mundt select UNCACHED_MAPPING 81cad82448SPaul Mundt help 82cad82448SPaul Mundt If you say Y here, physical addressing will be extended to 83cad82448SPaul Mundt 32-bits through the SH-4A PMB. If this is not set, legacy 84cad82448SPaul Mundt 29-bit physical addressing will be used. 85cad82448SPaul Mundt 8621440cf0SPaul Mundtconfig X2TLB 87782bb5a5SPaul Mundt def_bool y 88782bb5a5SPaul Mundt depends on (CPU_SHX2 || CPU_SHX3) && MMU 8921440cf0SPaul Mundt 9019f9a34fSPaul Mundtconfig VSYSCALL 9119f9a34fSPaul Mundt bool "Support vsyscall page" 92a09063daSPaul Mundt depends on MMU && (CPU_SH3 || CPU_SH4) 9319f9a34fSPaul Mundt default y 9419f9a34fSPaul Mundt help 9519f9a34fSPaul Mundt This will enable support for the kernel mapping a vDSO page 9619f9a34fSPaul Mundt in process space, and subsequently handing down the entry point 9719f9a34fSPaul Mundt to the libc through the ELF auxiliary vector. 9819f9a34fSPaul Mundt 9919f9a34fSPaul Mundt From the kernel side this is used for the signal trampoline. 10019f9a34fSPaul Mundt For systems with an MMU that can afford to give up a page, 10119f9a34fSPaul Mundt (the default value) say Y. 10219f9a34fSPaul Mundt 103b241cb0cSPaul Mundtconfig NUMA 1047fb0a1a5SRandy Dunlap bool "Non-Uniform Memory Access (NUMA) Support" 1050d57af1eSKees Cook depends on MMU && SYS_SUPPORTS_NUMA 106cbee9f88SPeter Zijlstra select ARCH_WANT_NUMA_VARIABLE_LOCALITY 107b241cb0cSPaul Mundt default n 108b241cb0cSPaul Mundt help 109b241cb0cSPaul Mundt Some SH systems have many various memories scattered around 110b241cb0cSPaul Mundt the address space, each with varying latencies. This enables 111b241cb0cSPaul Mundt support for these blocks by binding them to nodes and allowing 112b241cb0cSPaul Mundt memory policies to be used for prioritizing and controlling 113b241cb0cSPaul Mundt allocation behaviour. 114b241cb0cSPaul Mundt 11501066625SPaul Mundtconfig NODES_SHIFT 11601066625SPaul Mundt int 1179904494dSPaul Mundt default "3" if CPU_SUBTYPE_SHX3 11801066625SPaul Mundt default "1" 119a9ee6cf5SMike Rapoport depends on NUMA 12001066625SPaul Mundt 12101066625SPaul Mundtconfig ARCH_FLATMEM_ENABLE 12201066625SPaul Mundt def_bool y 123357d5946SPaul Mundt depends on !NUMA 12401066625SPaul Mundt 125dfbb9042SPaul Mundtconfig ARCH_SPARSEMEM_ENABLE 126dfbb9042SPaul Mundt def_bool y 127dfbb9042SPaul Mundt select SPARSEMEM_STATIC 128dfbb9042SPaul Mundt 129dfbb9042SPaul Mundtconfig ARCH_SPARSEMEM_DEFAULT 130dfbb9042SPaul Mundt def_bool y 131dfbb9042SPaul Mundt 132dfbb9042SPaul Mundtconfig ARCH_SELECT_MEMORY_MODEL 133dfbb9042SPaul Mundt def_bool y 134dfbb9042SPaul Mundt 13533d63bd8SPaul Mundtconfig ARCH_MEMORY_PROBE 13633d63bd8SPaul Mundt def_bool y 13733d63bd8SPaul Mundt depends on MEMORY_HOTPLUG 13833d63bd8SPaul Mundt 1394d35b93aSMatt Flemingconfig IOREMAP_FIXED 1404d35b93aSMatt Fleming def_bool y 14137744feeSArnd Bergmann depends on X2TLB 1424d35b93aSMatt Fleming 143b0f3ae03SPaul Mundtconfig UNCACHED_MAPPING 144b0f3ae03SPaul Mundt bool 145b0f3ae03SPaul Mundt 146c993487eSPaul Mundtconfig HAVE_SRAM_POOL 147c993487eSPaul Mundt bool 148c993487eSPaul Mundt select GENERIC_ALLOCATOR 149c993487eSPaul Mundt 150cad82448SPaul Mundtchoice 15121440cf0SPaul Mundt prompt "Kernel page size" 15221440cf0SPaul Mundt default PAGE_SIZE_4KB 15321440cf0SPaul Mundt 15421440cf0SPaul Mundtconfig PAGE_SIZE_4KB 15521440cf0SPaul Mundt bool "4kB" 15621440cf0SPaul Mundt help 15721440cf0SPaul Mundt This is the default page size used by all SuperH CPUs. 15821440cf0SPaul Mundt 15921440cf0SPaul Mundtconfig PAGE_SIZE_8KB 16021440cf0SPaul Mundt bool "8kB" 1613f5ab768SMatt Fleming depends on !MMU || X2TLB 16221440cf0SPaul Mundt help 16321440cf0SPaul Mundt This enables 8kB pages as supported by SH-X2 and later MMUs. 16421440cf0SPaul Mundt 16566dfe181SPaul Mundtconfig PAGE_SIZE_16KB 16666dfe181SPaul Mundt bool "16kB" 16766dfe181SPaul Mundt depends on !MMU 16866dfe181SPaul Mundt help 16966dfe181SPaul Mundt This enables 16kB pages on MMU-less SH systems. 17066dfe181SPaul Mundt 17121440cf0SPaul Mundtconfig PAGE_SIZE_64KB 17221440cf0SPaul Mundt bool "64kB" 17337744feeSArnd Bergmann depends on !MMU || CPU_SH4 17421440cf0SPaul Mundt help 17521440cf0SPaul Mundt This enables support for 64kB pages, possible on all SH-4 1764d2cab7cSPaul Mundt CPUs and later. 17721440cf0SPaul Mundt 17821440cf0SPaul Mundtendchoice 17921440cf0SPaul Mundt 18021440cf0SPaul Mundtchoice 181cad82448SPaul Mundt prompt "HugeTLB page size" 182ffb4a73dSPaul Mundt depends on HUGETLB_PAGE 18368b7c24cSPaul Mundt default HUGETLB_PAGE_SIZE_1MB if PAGE_SIZE_64KB 184cad82448SPaul Mundt default HUGETLB_PAGE_SIZE_64K 185cad82448SPaul Mundt 186cad82448SPaul Mundtconfig HUGETLB_PAGE_SIZE_64K 18721440cf0SPaul Mundt bool "64kB" 18868b7c24cSPaul Mundt depends on !PAGE_SIZE_64KB 18921440cf0SPaul Mundt 19021440cf0SPaul Mundtconfig HUGETLB_PAGE_SIZE_256K 19121440cf0SPaul Mundt bool "256kB" 19221440cf0SPaul Mundt depends on X2TLB 193cad82448SPaul Mundt 194cad82448SPaul Mundtconfig HUGETLB_PAGE_SIZE_1MB 195cad82448SPaul Mundt bool "1MB" 196cad82448SPaul Mundt 19721440cf0SPaul Mundtconfig HUGETLB_PAGE_SIZE_4MB 19821440cf0SPaul Mundt bool "4MB" 19921440cf0SPaul Mundt depends on X2TLB 20021440cf0SPaul Mundt 20121440cf0SPaul Mundtconfig HUGETLB_PAGE_SIZE_64MB 20221440cf0SPaul Mundt bool "64MB" 20321440cf0SPaul Mundt depends on X2TLB 20421440cf0SPaul Mundt 205cad82448SPaul Mundtendchoice 206cad82448SPaul Mundt 207896f0c0eSPaul Mundtconfig SCHED_MC 208896f0c0eSPaul Mundt bool "Multi-core scheduler support" 209896f0c0eSPaul Mundt depends on SMP 210896f0c0eSPaul Mundt default y 211896f0c0eSPaul Mundt help 212896f0c0eSPaul Mundt Multi-core scheduler support improves the CPU scheduler's decision 213896f0c0eSPaul Mundt making when dealing with multi-core CPU chips at a cost of slightly 214896f0c0eSPaul Mundt increased overhead in some places. If unsure say N here. 215896f0c0eSPaul Mundt 216cad82448SPaul Mundtendmenu 217cad82448SPaul Mundt 218cad82448SPaul Mundtmenu "Cache configuration" 219cad82448SPaul Mundt 220cad82448SPaul Mundtconfig SH7705_CACHE_32KB 221cad82448SPaul Mundt bool "Enable 32KB cache size for SH7705" 222cad82448SPaul Mundt depends on CPU_SUBTYPE_SH7705 223cad82448SPaul Mundt default y 224cad82448SPaul Mundt 225e7bd34a1SPaul Mundtchoice 226e7bd34a1SPaul Mundt prompt "Cache mode" 22737744feeSArnd Bergmann default CACHE_WRITEBACK if CPU_SH2A || CPU_SH3 || CPU_SH4 228e7bd34a1SPaul Mundt default CACHE_WRITETHROUGH if (CPU_SH2 && !CPU_SH2A) 229e7bd34a1SPaul Mundt 230e7bd34a1SPaul Mundtconfig CACHE_WRITEBACK 231e7bd34a1SPaul Mundt bool "Write-back" 232e7bd34a1SPaul Mundt 233e7bd34a1SPaul Mundtconfig CACHE_WRITETHROUGH 234e7bd34a1SPaul Mundt bool "Write-through" 235cad82448SPaul Mundt help 236cad82448SPaul Mundt Selecting this option will configure the caches in write-through 237cad82448SPaul Mundt mode, as opposed to the default write-back configuration. 238cad82448SPaul Mundt 239cad82448SPaul Mundt Since there's sill some aliasing issues on SH-4, this option will 240cad82448SPaul Mundt unfortunately still require the majority of flushing functions to 241cad82448SPaul Mundt be implemented to deal with aliasing. 242cad82448SPaul Mundt 243cad82448SPaul Mundt If unsure, say N. 244cad82448SPaul Mundt 245e7bd34a1SPaul Mundtconfig CACHE_OFF 246e7bd34a1SPaul Mundt bool "Off" 247e7bd34a1SPaul Mundt 248e7bd34a1SPaul Mundtendchoice 249e7bd34a1SPaul Mundt 250cad82448SPaul Mundtendmenu 251