#
# For a description of the syntax of this configuration file,
# see Documentation/kbuild/kconfig-language.txt.
#

config E2K
	bool
	default y
	select ARCH_HAVE_NMI_SAFE_CMPXCHG
	select ARCH_HAS_GCOV_PROFILE_ALL
	select ARCH_SUPPORTS_ATOMIC_RMW
	select ARCH_SUPPORTS_NUMA_BALANCING
	select ARCH_USE_BUILTIN_BSWAP
	select ARCH_USE_CMPXCHG_LOCKREF
	select ARCH_WANT_COMPAT_IPC_PARSE_VERSION
	select ARCH_WANT_IPC_PARSE_VERSION
	select ARCH_WANT_OPTIONAL_GPIOLIB
	select ARCH_THREAD_STACK_ALLOCATOR
	select ARCH_TASK_STRUCT_ALLOCATOR
	select ARCH_SUPPORTS_MSI
	select ARCH_HAS_DEFAULT_IDLE
	select ARCH_HAS_CPU_IDLE_WAIT
	select ARCH_CACHES
	select GENERIC_ISA_DMA
	select GENERIC_IRQ_PROBE
	select GENERIC_IRQ_SHOW
	select GENERIC_PENDING_IRQ if SMP
	select HAVE_ALIGNED_STRUCT_PAGE
	select HAVE_ARCH_TRANSPARENT_HUGEPAGE
	#bug 98326 - disable 16-byte atomics on p9 until hardware is fixed
	select HAVE_CMPXCHG_DOUBLE if CPU_ISET >= 6
	#select HAVE_CMPXCHG_LOCAL #cost this_cpu_cmpxchg or local_irq_save?
	select HAVE_CONTEXT_TRACKING
	select HAVE_DEBUG_BUGVERBOSE
	select HAVE_DEBUG_KMEMLEAK
	select HAVE_DYNAMIC_FTRACE
	select HAVE_EFFICIENT_UNALIGNED_ACCESS
	select HAVE_FTRACE_MCOUNT_RECORD
	select HAVE_FUNCTION_TRACER
	select HAVE_FUNCTION_GRAPH_TRACER
	select HAVE_HW_BREAKPOINT # Always on as it is used to implement ptrace
	select HAVE_IDE
	#select HAVE_KERNEL_BZIP2 -- worse than XZ on e2k
	select HAVE_KERNEL_GZIP # Stands between LZ4 and XZ
	select HAVE_KERNEL_LZ4 # Fastest compression/decompression
	#select HAVE_KERNEL_LZMA -- worse than XZ on e2k
	#select HAVE_KERNEL_LZO -- worse than GZIP on e2k
	select HAVE_KERNEL_XZ # Smallest kernel
	select HAVE_PERF_EVENTS
	select HAVE_REGS_AND_STACK_ACCESS_API
	select HAVE_TRACE_CLOCK
	select HAVE_SYSCALL_TRACEPOINTS
	select HAVE_ARCH_AUDITSYSCALL
	select HAVE_KPROBES
	select HAVE_KRETPROBES
	select HAVE_EXIT_THREAD
	select IRQ_FORCED_THREADING
	select MODULES_USE_ELF_RELA
	select PANIC_ON_OOPS
	select PERF_EVENTS
	select RTC_CLASS
	select SPARSE_IRQ
	select SPARSEMEM_VMEMMAP_ENABLE
	select SYSCTL_EXCEPTION_TRACE
	select TTY
	select USER_STACKTRACE_SUPPORT
	select IRQ_DOMAIN
	select ARCH_HAS_SG_CHAIN
	select SWIOTLB
	select HAVE_MEMBLOCK
	select NO_BOOTMEM
	select HAVE_MEMBLOCK_NODE_MAP
	select ARCH_SUPPORTS_DEFERRED_STRUCT_PAGE_INIT
	select ARCH_HAS_ELF_RANDOMIZE
	select HAVE_ARCH_MMAP_RND_BITS
	select HAVE_ARCH_MMAP_RND_COMPAT_BITS if COMPAT
	help
	  This is a port of Linux on Elbrus microprocessor architecture.

config SWIOTLB
	def_bool y

config ARCH_SPARSEMEM_ENABLE
	def_bool y

config ARCH_HIBERNATION_POSSIBLE
	def_bool y

config 64BIT
	def_bool y

config MMU
	bool
	default y

config NEED_DMA_MAP_STATE
	def_bool y

config ZONE_DMA
	def_bool y

config ARCH_PROC_KCORE_TEXT
	def_bool y
	depends on PROC_KCORE

config GENERIC_FIND_FIRST_BIT
    def_bool y

config GENERIC_FIND_NEXT_BIT
    def_bool y

config GENERIC_CALIBRATE_DELAY
	bool
	default y

config GENERIC_BUG
	def_bool y if BUG

config GENERIC_BUG_RELATIVE_POINTERS
	def_bool y

config EARLY_PRINTK
	bool
	default y
	depends on EARLY_DUMP_CONSOLE

config ARCH_MAY_HAVE_PC_FDC
	bool
	default y
config GREGS_CONTEXT
	def_bool y

config GENERIC_IOMAP
	bool
	default y

config PGTABLE_LEVELS
	default 4

config HAVE_SETUP_PER_CPU_AREA
	def_bool y

config NEED_PER_CPU_EMBED_FIRST_CHUNK
	def_bool y
	
config NEED_PER_CPU_PAGE_FIRST_CHUNK
	def_bool y

config NEED_SG_DMA_LENGTH
	def_bool y

config SYS_SUPPORTS_HUGETLBFS
	def_bool y

config ARCH_SUSPEND_POSSIBLE
	def_bool y

config ARCH_BOOT_TRACE_POSSIBLE
	def_bool y

config HOTPLUG_CPU
	def_bool y
	depends on SMP
	select E2S_CLK_GATE
	---help---
	  Say Y here to allow turning CPUs off and on. CPUs can be
	  controlled through /sys/devices/system/cpu.
	  ( Note: power management support will enable this option
	    automatically on SMP systems. )
	  Say N if you want to disable CPU hotplug.

config GENERIC_GPIO
	def_bool y

config ARCH_DMA_ADDR_T_64BIT
	def_bool y

config OF_IRQ
	bool
	default n

config OF_NET
	bool
	default n

config DEBUG_RODATA
	def_bool y

# Set loadable kernel module data as NX and text as RO.
# e2k uses physical addresses in ftrace and kprobe, thus this option
# does not conflict with them and can be enabled by default.
config DEBUG_SET_MODULE_RONX
	depends on MODULES
	def_bool y

config ARCH_ENABLE_MEMORY_HOTPLUG
	def_bool y

config MEMORY_HOTPLUG
	def_bool y

config DEFERRED_STRUCT_PAGE_INIT
	def_bool y

config HOLES_IN_ZONE
	def_bool y

config ARCH_MMAP_RND_BITS_MIN
	default 28

config ARCH_MMAP_RND_BITS_MAX
	default 32

config ARCH_MMAP_RND_COMPAT_BITS_MIN
	default 8

config ARCH_MMAP_RND_COMPAT_BITS_MAX
	default 16

source "init/Kconfig"
source "kernel/Kconfig.freezer"

menu "Processor type and features"

config E2K_MACHINE_SIC
	def_bool y

config E2K_MACHINE_IOHUB
	def_bool y

config LOCKDEP_SUPPORT
	def_bool y

config STACKTRACE_SUPPORT
	def_bool y

config HAVE_LATENCYTOP_SUPPORT
	def_bool y

config E2K_MACHINE
	bool "E2K machines support"
	default n
	help
	  Support  only specified E2K machine type 
	  If you say Y only one specified machine type will be supported
	  by this kernel.
	  The better way here say N to support all range of machines

config E2K_SIMULATOR
	bool "E2K simulator"
	depends on E2K_MACHINE
	default n
	help
	  You can choose this when you are working on a machine simulator.

config CPU_ES2
	def_bool !E2K_MACHINE

config CPU_E2S
	def_bool !E2K_MACHINE

config CPU_E8C
	def_bool !E2K_MACHINE

config CPU_E1CP
	def_bool !E2K_MACHINE

config CPU_E8C2
	def_bool !E2K_MACHINE

config CPU_E12C
	def_bool !E2K_MACHINE

config CPU_E16C
	def_bool !E2K_MACHINE

config CPU_E2C3
	def_bool !E2K_MACHINE

config CPU_ISET
	int
	range 0 6
	default 0 if !E2K_MACHINE
	default 2 if E2K_ES2_DSP || E2K_ES2_RU
	default 3 if E2K_E2S
	default 4 if E2K_E8C || E2K_E1CP
	default 5 if E2K_E8C2
	default 6 if E2K_E16C || E2K_E12C || E2K_E2C3

choice
	prompt "Subarchitecture Type"
        depends on E2K_MACHINE
	default 2


config E2K_ES2_DSP
	bool "Elbrus e2c+ (Cubic, NUMA, 2 core, DSP, IOHUB, SIC)"
	select CPU_ES2
	help
	  Support for Elbrus e2c+ (Cubic) systems.
	  Say 'Y' here if this kernel is supposed to run on
	  an Elbrus S2 (Cubic) system.
	  Only choose this option if you have such a system and cannot run
	  the kernel on other machines types,
	  otherwise you should say N here.

config E2K_ES2_RU
	bool "Elbrus e2c (Micron, NUMA, 2 core, IOHUB, SIC)"
	select CPU_ES2
	help
	  Support for Elbrus e2c (Micron) systems.
	  Say 'Y' here if this kernel is supposed to run on
	  an Elbrus e2c (Micron) system.
	  Only choose this option if you have such a system and cannot run
	  the kernel on other machines types,
	  otherwise you should say N here.

config E2K_E2S
	bool "Elbrus 2S (NUMA, 4 core, IOHUB, SIC)"
	select CPU_E2S
	help
	  Support for Elbrus 2S systems.  Say 'Y' here if this kernel is
	  supposed to run on an Elbrus 2S system.
	  Only choose this option if you have such a system and cannot run
	  the kernel on other machines types,
	  otherwise you should say N here.

config E2K_E8C
	bool "Elbrus 8C (NUMA, 8 core, IOHUB-2, SIC)"
	select CPU_E8C
	help
	  Support for Elbrus 8C systems.  Say 'Y' here if this kernel is
	  supposed to run on an Elbrus 8C system.
	  Only choose this option if you have such a system and cannot run
	  the kernel on other machines types,
	  otherwise you should say N here.

config E2K_E1CP
	bool "Elbrus 1C+ (1 core + GC, IOHUB-2, Legacy SIC)"
	select CPU_E1CP
	help
	  Support for Elbrus 1C+ systems.  Say 'Y' here if this kernel is
	  supposed to run on an Elbrus 1C+ system.
	  Only choose this option if you have such a system and cannot run
	  the kernel on other machines types,
	  otherwise you should say N here.

config E2K_E8C2
	bool "Elbrus 8C2 (NUMA, 8 core, IOHUB-2, SIC)"
	select CPU_E8C2
	help
	  Support for Elbrus 8C systems.  Say 'Y' here if this kernel is
	  supposed to run on an Elbrus 8C2 system.
	  Only choose this option if you have such a system and cannot run
	  the kernel on other machines types,
	  otherwise you should say N here.

config E2K_E12C
	bool "Elbrus 12C (NUMA, 12 core, IOHUB-2 , SOC)"
	select CPU_E12C
	help
	  Support for Elbrus 12C systems.  Say 'Y' here if this kernel is
	  supposed to run on an Elbrus 12C System On Chip
	  Only choose this option if you have such a system and cannot run
	  the kernel on other machines types,
	  otherwise you should say N here.

config E2K_E16C
	bool "Elbrus 16C (NUMA, 16 core, IOHUB-2 , SOC)"
	select CPU_E16C
	help
	  Support for Elbrus 16C systems.  Say 'Y' here if this kernel is
	  supposed to run on an Elbrus 16C System On Chip
	  Only choose this option if you have such a system and cannot run
	  the kernel on other machines types,
	  otherwise you should say N here.

config E2K_E2C3
	bool "Elbrus 2C3 (NUMA, 2 core + GPU, IOHUB-2 , SOC)"
	select CPU_E2C3
	help
	  Support for Elbrus 2C3 systems.  Say 'Y' here if this kernel is
	  supposed to run on an Elbrus 2C + embeded GPU, System On Chip
	  Only choose this option if you have such a system and cannot run
	  the kernel on other machines types,
	  otherwise you should say N here.

endchoice

menu "MMU Page Tables features"

config MMU_PT_V6
	bool "MMU Page Table V6 basic mode"
	depends on (CPU_E16C || !E2K_MACHINE)
	default y if CPU_E12C || CPU_E16C || CPU_E2C3
	help
	  Support for basic (new) structure of Page Tables entries.
	  Say 'Y' here if this kernel is supposed to run on
	  an Elbrus 12C/2C3/16C Systems and should use new structures of
	  Page Tables. Say 'N' if kernel should be run only on legacy mode of
	  Page Tables

endmenu

config ENABLE_EXTMEM
	def_bool y
	---help---
	  E2K can use more than 4 Gigabytes of physical memory.
	  However, the address space of e2k processors has two regions with
	  hole between them:

	     low region from 0 up to 2 Gigabytes            0 -        8000 0000
	     high region from 2**32 up to 2**48   n 0000 0000 - 1 0000 0000 0000

config EPIC
	bool "Elbrus PIC support"
	default n
	help
	  Elbrus Programmable Interrupt Controller supports multiprocessor
	  systems with up to 1024 cores and uses 10 bit vectors for
	  masked interrupts.
	  Controller implements hardware support for interrupt virtualization.
	  Consists of CEPIC (per core), PREPIC (per processor) and IOEPIC.
	  Currently only supported in boot and p2v, so 'N' by default.

config E16_CORE_SUPPORT
	bool "New processors based on e16 core support"
	depends on !E2K_MACHINE
	default y if CPU_E16C
	help
	   To support new family of processors based on e16 core
	   it need compilator lcc-23, which is not now on the staff
	   Say N to compule without new processors support, in this case
	   can use compilator lcc-21 and kernel can be compiled in generic
	   mode
	   If you say Y then need compile only by lcc-23

# Unknown bug of hardware or software while compiler lift up some operations
# of load of data before call of spinlock function when data can be acceessed
# only after call completion. In this case compiler use DAM to detect that data
# were updated while spinlock completion and reload them if updated.
# Turn off compiler optimization while bug is not detected and fixed.

config SMP_DAM_BUG
	bool
	default SMP && CPU_ES2

config HZ
	int "Timer frequency"
	range 4 1000
	default 100
	help
	 Allows the configuration of the timer frequency. It is customary
	 to have the timer interrupt run at range 4-1000 HZ
	 but 100 HZ is more beneficial


config GLOBAL_CONTEXT
	bool "Map kernel virtual space to global context"
	default y
	help
	  Choose this option to map virtual space of kernel to
	  global context, so all kernel virtual pages and
	  page tables will be global for all processes.
	  It should reduce TLB and caches missing

config MLT_STORAGE
	bool
	default n

config SECONDARY_SPACE_SUPPORT
	bool "Support Secondary Space feature in OS"
	select MLT_STORAGE
	default y
	help
	  Type 'y' if you are going to run native Linux-i386 code under
	  this OS.

config ONLY_HIGH_PHYS_MEM
	bool "Use only high region of address space of physical memory"
	depends on !E2K_E1CP
	default y
	help
	  Physical memory of e2k machines can be mapped into two addresses
	  regions:
		low region  (below 2**32)
		high region (above 2**32)
	  Low memory cut out some area from high region
	  If you say here Y then only high region addresses will be used
	  to access to physical memory.
	  It allows to extend the low MMIO and PCI addresses areas
	  and map physical memory to virtual pages of max order

config	ONLY_BSP_MEMORY
	bool "Only specified nodes memory can be used by other CPUs"
	default n
	---help---
	  CPUs can have own memory and access to memory of other CPUs.
	  If you see Y then all CPUs can use only memory of nodes from
	  following config parametr
	  and ignore own

config MEMORY_PRES_MAP
	int "Specify mask of nodes with memory"
	default 1
	depends on ONLY_BSP_MEMORY
	range 1 65536

config FORCE_MAX_ZONEORDER
	int "Maximum zone order"

	range 11 64
	default "15"
	help
	  The kernel memory allocator divides physically contiguous memory
	  blocks into "zones", where each zone is a power of two number of
	  pages.  This option selects the largest power of two that the kernel
	  keeps in the memory allocator.  If you need to allocate very large
	  blocks of physically contiguous memory, then you may need to
	  increase this value.

	  This config option is actually maximum order plus one. For example,
	  a value of 11 means that the largest free memory block is 2^10 pages.

	  The page size is not necessarily 4KB. Keep
	  this in mind when choosing a value for this option.

# Max 8 Nodes now limited by BOOT_MAX_MEM_NUMNODES to confirm
# to boot_info structure size
config NODES_SHIFT
	int "Maximum memory (NUMA) Nodes (as a power of 2)"
	range 0 3
	default "3" if SMP
	default "0"
	depends on NEED_MULTIPLE_NODES
	---help---
	  Specify the maximum number of memory (NUMA) Nodes available on the target
	  system.  Increases memory reserved to accommodate various tables.

# Some NUMA nodes can have memory ranges that span
# other nodes.  Even though a pfn is valid and
# between a node's start and end pfns, it may not
# reside on that node.
# For example while a few nodes have memory in low and high range

config NODES_SPAN_OTHER_NODES
	def_bool y

config NUMA
	bool "NUMA support"
	default n
	depends on SMP

config COPY_USER_PGD_TO_KERNEL_ROOT_PT
	bool "Copy user process PGD entries to kernel root page table"
	default y
	depends on NUMA
	help
		If say Y then each CPU has own kernel PGD copy
		User process PGD entries are copied to this kernel
		PGD table while the process is activated on this CPU

config KTHREAD_ON_CPU
	bool "Create kernel threads on specified CPU"
	default n
	depends on NUMA
	help
		Support creation of kernel threads on cpecified CPU
		to allocate memory resources on the node of this CPU

config BOUNCE_BUFFERS_ON_CPU
	bool "Get bounce buffer on specified node"
	default n
	depends on NUMA
	help
		Create DMA bounce buffers on each node
		to enable allocation on specified node

config SERIAL_BOOT_PRINTK
	bool "boot_printk() support"
	default y
	help
	  boot_printk() outputs directly to serial port bypassing all
	  buffers and locks and can work both before and after the switch
	  to virtual memory addressing. It is useful for hardware debugging.

	  Only two devices are supported currently: ns16550 (== 8550)
	  and l_zilog (== am85c30).

	  On simulator boot_printk() also outputs to LMS console.

config SERIAL_AM85C30_BOOT_CONSOLE
	bool "Boot-time serial console on Am85c30 zilog and compatible devices"
	depends on SERIAL_BOOT_PRINTK
	default y
	help
	  Sey Y to support boot-time console based on Am85c30 serial
	  PCI device.

config BOOT_SERIAL_BAUD
	int "Boot printk serial rate (4800-115200)"
	range 4800 115200
	depends on SERIAL_BOOT_PRINTK || SERIAL_PRINTK
	default "115200"
	help
	  Speed rate for boot printk console

config EARLY_VIRTIO_CONSOLE
	bool "Early VIRTIO console on guest kernel"
	depends on VIRTIO_CONSOLE && (PARAVIRT_GUEST || KVM_GUEST_KERNEL)
	select HVC_L
	default y
	help
	  Sey Y to support early console based on VIRTIO
	  and HVC interface

config ILLEGAL_POINTER_VALUE
       hex
       default 0xdead000000000000


source "mm/Kconfig"

config MEMLIMIT
	int "Physical memory probing range (main region of RAM)"
	range 0 2048
	default 64

config EXT_MEMLIMIT
	int "Extended physical memory probing range (Megabytes)"
	depends on ENABLE_EXTMEM
	range 0 61440
	default 2048

choice
	prompt "Embeded Video RAM size"
	default VRAM_SIZE_128
	help
		Embeded graphical controller video ram size
		Option is usfull only for e2k internal boot loader on simulator

config VRAM_SIZE_128
	bool "128 Mb"
	help
		Embeded graphical controller video ram size
		is 128 Mb
		Option is usfull only for e2k internal boot loader on simulator

config VRAM_SIZE_256
	bool "256 Mb"
	help
		Embeded graphical controller video ram size
		is 256 Mb
		Option is usfull only for e2k internal boot loader on simulator

config VRAM_SIZE_512
	bool "512 Mb"
	help
		Embeded graphical controller video ram size
		is 512 Mb
		Option is usfull only for e2k internal boot loader on simulator

config VRAM_SIZE_1024
	bool "1 Gb"
	help
		Embeded graphical controller video ram size
		is 1 Gb
		Option is usfull only for e2k internal boot loader on simulator

config VRAM_DISABLE
	bool "Disable embeded graphic support"
	help
		Embeded graphical controller video ram can be disabled
		Option is usfull only for e2k internal boot loader on simulator

endchoice

config ACCESS_CONTROL
	bool
	default N

config USR_CONTROL_INTERRUPTS
	bool "USER can control interrupts"
	default N
	help
		USER can use UPSR register to control interrupts
                 (only for hardware debugging)
                To control interrupts in user mode it needs to call:
                e2k_syswork(USER_CONTROL_INTERRUPT, 1, 0); // start
                e2k_syswork(USER_CONTROL_INTERRUPT, 0, 0); // stop

config KERNEL_TIMES_ACCOUNT
	bool "Collect kernel traps and system calls clock time info"
	default N

config MAX_KERNEL_TIMES_NUM
	depends on KERNEL_TIMES_ACCOUNT
	int "Max Number of last events to collect (1-1024)"
	range 1 1024
	default 20

config CLI_CHECK_TIME
	bool "CLI check time"

choice
	depends on SWAP
	prompt "Software swap tags"
	default SOFTWARE_SWAP_TAGS_V3

config SOFTWARE_SWAP_NONE
	bool "Off"

config SOFTWARE_SWAP_TAGS
	bool "version 1"

config SOFTWARE_SWAP_TAGS_V3
	bool "version 3"
	help
	The tags of date are written immediately after the data

endchoice

# bool 'Symmetric multi-processing support' CONFIG_SMP

config CMDLINE_PROMPT
	bool "Enable prompt for kernel command string"
	default n

config MAKE_ALL_PAGES_VALID
	bool "Make all virtual pages valid"
	default y

config SET_STACKS_SIZE
	bool "Define max hardware and user data stacks size"
	default y

config PSP_STACK_SIZE
	int "Size of (MBytes) hardware procedure stack (PSP) (PCSP size will be PSP size / 16)"
	depends on SET_STACKS_SIZE
	range 1 2048
	default 1024

config PSP_WIN_SIZE
	int "Size of (pages number) active window of hardware procedure stack (PSP) (PCSP size will be PSP size / 16)"
	depends on SET_STACKS_SIZE
	range 1 512
	default 32

config UPS_AREA_SIZE
	int "Number of pages in user p stack area"
	depends on SET_STACKS_SIZE
	default 32

config UPCS_AREA_SIZE
	int "Number of pages in user pc stack area"
	depends on SET_STACKS_SIZE
	default 2

config USER_STACK_INCR
	int "User local data stack (USD) increment value (number of 4K pages)"
	depends on ALLOC_MAX_STACK = n
	range 1 4096
	default 4
	help
	  You can here define number of pages to increment user local
	  data stack size when stack overflow occures.

config USE_AAU
	def_bool y

config STACK_REG_WINDOW
	bool "Enable local registers window show while fancy stack listing"
	default y
	help
	    Say Y here to enable printing of local registers while
	    stack's printing.

	    Do "echo 1 > /proc/sys/debug/userstack" to show user's registers.

config DATA_STACK_WINDOW
	bool "Enable kernel data stack show while fancy stack listing"
	default y
	help
	    Say Y here to enable printing of data stack while stack's
	    printing.

	    Do "echo 1 > /proc/sys/debug/datastack" to show the stack.

config BINFMT_ELF32
	tristate "Kernel support for 32-bit ELF binaries"
	default y
	select COMPAT_BINFMT_ELF

config COMPAT
	def_bool y
	depends on BINFMT_ELF32
	select ARCH_WANT_OLD_COMPAT_IPC

config PROTECTED_MODE
	tristate "Security mode"
	default y

config DBG_RTL_TRACE
	bool "Enable printing rtl messages in security mode"
	depends on PROTECTED_MODE
	default n

config CLW_ENABLE
	bool "Enable clean of user stack window"
        depends on PROTECTED_MODE
        default y

config IPD_DISABLE
	bool "Disable Instruction Cache prefetch for kernel"
	help
	   If you say 'Y' then Instruction Cache prefetch will be
	   disable for kernel threads
	   Otherwise two line of ICACHE prefetch will be set
	default n

config TC_STORAGE
	bool "Store Table Cache default line"
	help
	   Flushing Table Cashe and storing default string of TC
	   when tasks switch
	default y

config IGNORE_MEM_LOCK_AS
	bool "Ignore exc_mem_lock_as"
	help
	   Ignore mem_lock_as exception in binary compiler task
	default n

config RECOVERY
	bool "Enable system recovery"
	select PM
	help
	   Enable mode to support Suspend to RAM
	default y

config MONITORS
	bool "Hardware monitor counters support"
	depends on PROC_FS
	default y
	help
	   Say Y here to enable the monitors supporting mechanism used
	   for counting of variuos hardware events

config E2K_KEXEC
	bool "kexec for E2K"
	default y
	help
	  Say Y here to enable support of kexec implementation for E2K.

config DUMP_ALL_STACKS
	bool "Enable dump of all stacks"
	default y

config CMDLINE
	string "Initial kernel command string"
	default "root=/dev/hda3 console=ttyLMS "

#
# Define implied options from the CPU selection here
#

config SMP
	bool "Symmetric multi-processing support"
	default n
	---help---
	  This enables support for systems with more than one CPU. If you have
	  a system with only one CPU, like most personal computers, say N. If
	  you have a system with more than one CPU, say Y.

	  If you say N here, the kernel will run on single and multiprocessor
	  machines, but will use only one CPU of a multiprocessor machine. If
	  you say Y here, the kernel will run on many, but not all,
	  singleprocessor machines. On a singleprocessor machine, the kernel
	  will run faster if you say N here.

	  Note that if you say Y here and choose architecture "586" or
	  "Pentium" under "Processor family", the kernel will not work on 486
	  architectures. Similarly, multiprocessor kernels for the "PPro"
	  architecture may not work on all Pentium based boards.

	  People using multiprocessor machines who say Y here should also say
	  Y to "Enhanced Real Time Clock Support", below. The "Advanced Power
	  Management" code will be disabled if you say Y here.

	  See also the <file:Documentation/smp.txt>,
	  <file:Documentation/i386/IO-APIC.txt>,
	  <file:Documentation/nmi_watchdog.txt> and the SMP-HOWTO available at
	  <http://www.tldp.org/docs.html#howto>.

	  If you don't know what to do here, say N.

config NR_CPUS
	int "Maximum number of CPUs (2-255)"
	range 2 255
	depends on SMP
	default "2"
	help
	  This allows you to specify the maximum number of CPUs which this
	  kernel will support.  The maximum supported value is 255 and the
	  minimum value which makes sense is 2.

	  This is purely to save memory - each supported CPU adds
	  approximately eight kilobytes to the kernel image.

config SCHED_MC
	def_bool y
	depends on SMP
	---help---
	  Multi-core scheduler support improves the CPU scheduler's decision
	  making when dealing with multi-core CPU chips at a cost of slightly
	  increased overhead in some places.

config MCST
	bool "MCST additions"
	default y

source "kernel/Kconfig.preempt"

config RWSEM_GENERIC_SPINLOCK
	def_bool PREEMPT_RT_FULL

config RWSEM_XCHGADD_ALGORITHM
	def_bool !RWSEM_GENERIC_SPINLOCK && !PREEMPT_RT_FULL

config GENERIC_TIME
	def_bool y

config GENERIC_TIME_VSYSCALL
	def_bool y

config GENERIC_CMOS_UPDATE
	def_bool y

config GENERIC_CLOCKEVENTS
	def_bool y

config SCLKR_CLOCKSOURCE
	def_bool y

config SECCOMP
	bool "Enable seccomp to safely compute untrusted bytecode"
	depends on PROC_FS
	default y
	help
	  This kernel feature is useful for number crunching applications
	  that may need to compute untrusted bytecode during their
	  execution. By using pipes or other transports made available to
	  the process as file descriptors supporting the read/write
	  syscalls, it's possible to isolate those applications in
	  their own address space using seccomp. Once seccomp is
	  enabled via /proc/<pid>/seccomp, it cannot be disabled
	  and the task is only allowed to execute a few safe syscalls
	  defined by each seccomp mode.

	  If unsure, say Y. Only embedded should say N here.

source "kernel/time/Kconfig"

config BIOS
	bool "Enable bios chipset settings"
	default y
	help
	  Enable bios chipset settings such as io apic serial ports
	  keyboard, mouse etc.

config ENABLE_BIOS_MPTABLE
	bool "Set mptable"
	depends on BIOS && L_IO_APIC
	default y
	help
	  Constructing bios MP configuration table.

config ENABLE_ELBRUS_PCIBIOS
	bool "Enable pcibios"
	depends on BIOS
	default y
	help
	  Enable pci initialization in bios.

config ENABLE_IDE
	bool "Enable hard drive"
	depends on BIOS
	default y
	help
	  Enable ide in southbridge chip.

config ENABLE_KEYBOARD
	bool "Enable keyboard"
	depends on BIOS
	default y
	help
	  Enable keyboard in superio chip.
	  
config ENABLE_MOUSE
	bool "Enable mouse"
	depends on BIOS
	default y
	help
	  Enable mouse in superio chip.
	  
config ENABLE_FLOPPY
	bool "Enable floppy"
	depends on BIOS
	default y
	help
	  Enable fdc in superio chip.

config ENABLE_MGA
	bool "Enable MGA"
	depends on BIOS
	default y
	  
  
config ENABLE_RTC
	bool "Enable rtc"
	depends on BIOS
	default y
	help
	  Enable rtc in southbridge chip.
	  
config ENABLE_SERIAL
	bool "Enable serial ports"
	depends on BIOS
	default y
	help
	  Enable com1 com2 in superio chip.
	  
config ENABLE_PARALLEL_PORT
	bool "Enable parallel port"
	depends on BIOS
	default y
	help
	  Enable lpt in superio chip.

config ENABLE_IOAPIC
	bool "Enable IO APIC"
	depends on BIOS
	default y
	help
	  Set southbridge XBCS register io apic enable.

config ADC_DISABLE
	bool "Disable second IO-link on e2c+ connected to ADC"
	depends on BIOS
	default n
	help
	  In some case second link is not connected to anywhere
	  or not work properly

config OPTIMIZE_REGISTERS_ACCESS
	bool "Optimize registers access"
	default y
	help
	  Disabling this option will prohibit lcc from optimizing
	  registers access instructions (rr/rw).

config E2K_STACKS_TRACER
	bool "Trace kernel stacks usage"
	default n
	depends on !STACK_TRACER
	select FUNCTION_TRACER
	select STACKTRACE
	select KALLSYMS
	help
	  This special tracer records the maximum stack footprint of the
	  kernel and displays it in /sys/kernel/debug/tracing/stack_trace.
	  You can use 'stack_trace_filter' file to select which functions
	  to check the stacks on.

	  This tracer works by hooking into every function call that the
	  kernel executes, and keeping a maximum stack depth value and
	  stack-trace saved.  If this is configured with DYNAMIC_FTRACE
	  then it will not have any overhead while the stack tracer
	  is disabled.

	  To enable the stack tracer on bootup, pass in 'stacktrace'
	  on the kernel command line.  You can pass 'stacktrace=kernel'
	  to trace only kernel part of hardware stacks.

	  The stack tracer can also be enabled or disabled via the
	  sysctl kernel.stack_tracer_enabled

	  There is also sysctl kernel.stack_tracer_kernel_only knob
	  for controlling which threads to trace.

	  Pass stacktrace_filter= to the kernel command line to set
	  specific functions to check the stacks on.

	  Say N if unsure.

# Needed to initialize "fp" field which is used to correct fp stack
# in longjmp/copy_thread
#
# Also used to work around problems with leaf call optimization
# (for details see comments in _mcount()).
config HAVE_FUNCTION_GRAPH_FP_TEST
	def_bool y
	depends on FUNCTION_GRAPH_TRACER

config EPROF_KERNEL
	bool "Enable libeprof-based kernel profiling"
	default n
	---help---
	This option enables libeprof-based branch profiling in kernel.

	If unsure, say N.
endmenu

source "arch/l/Kconfig"

menu "Power management options (ACPI, APM)"

source kernel/power/Kconfig
source "drivers/acpi/Kconfig"
source "drivers/cpufreq/Kconfig"

menu "APM (Advanced Power Management) BIOS Support"
depends on PM

config APM
	tristate "APM (Advanced Power Management) BIOS support"
	depends on PM
	---help---
	  APM is a BIOS specification for saving power using several different
	  techniques. This is mostly useful for battery powered laptops with
	  APM compliant BIOSes. If you say Y here, the system time will be
	  reset after a RESUME operation, the /proc/apm device will provide
	  battery status information, and user-space programs will receive
	  notification of APM "events" (e.g. battery status change).

	  If you select "Y" here, you can disable actual use of the APM
	  BIOS by passing the "apm=off" option to the kernel at boot time.

	  Note that the APM support is almost completely disabled for
	  machines with more than one CPU.

	  In order to use APM, you will need supporting software. For location
	  and more information, read <file:Documentation/pm.txt> and the
	  Battery Powered Linux mini-HOWTO, available from
	  <http://www.tldp.org/docs.html#howto>.

	  This driver does not spin down disk drives (see the hdparm(8)
	  manpage ("man 8 hdparm") for that), and it doesn't turn off
	  VESA-compliant "green" monitors.

	  This driver does not support the TI 4000M TravelMate and the ACER
	  486/DX4/75 because they don't have compliant BIOSes. Many "green"
	  desktop machines also don't have compliant BIOSes, and this driver
	  may cause those machines to panic during the boot phase.

	  Generally, if you don't have a battery in your machine, there isn't
	  much point in using this driver and you should say N. If you get
	  random kernel OOPSes or reboots that don't seem to be related to
	  anything, try disabling/enabling this option (or disabling/enabling
	  APM in your BIOS).

	  Some other things you should try when experiencing seemingly random,
	  "weird" problems:

	  1) make sure that you have enough swap space and that it is
	  enabled.
	  2) pass the "no-hlt" option to the kernel
	  3) switch on floating point emulation in the kernel and pass
	  the "no387" option to the kernel
	  4) pass the "floppy=nodma" option to the kernel
	  5) pass the "mem=4M" option to the kernel (thereby disabling
	  all but the first 4 MB of RAM)
	  6) make sure that the CPU is not over clocked.
	  7) read the sig11 FAQ at <http://www.bitwizard.nl/sig11/>
	  8) disable the cache from your BIOS settings
	  9) install a fan for the video card or exchange video RAM
	  10) install a better fan for the CPU
	  11) exchange RAM chips
	  12) exchange the motherboard.

	  To compile this driver as a module, choose M here: the
	  module will be called apm.

config APM_IGNORE_USER_SUSPEND
	bool "Ignore USER SUSPEND"
	depends on APM
	help
	  This option will ignore USER SUSPEND requests. On machines with a
	  compliant APM BIOS, you want to say N. However, on the NEC Versa M
	  series notebooks, it is necessary to say Y because of a BIOS bug.

config APM_DO_ENABLE
	bool "Enable PM at boot time"
	depends on APM
	---help---
	  Enable APM features at boot time. From page 36 of the APM BIOS
	  specification: "When disabled, the APM BIOS does not automatically
	  power manage devices, enter the Standby State, enter the Suspend
	  State, or take power saving steps in response to CPU Idle calls."
	  This driver will make CPU Idle calls when Linux is idle (unless this
	  feature is turned off -- see "Do CPU IDLE calls", below). This
	  should always save battery power, but more complicated APM features
	  will be dependent on your BIOS implementation. You may need to turn
	  this option off if your computer hangs at boot time when using APM
	  support, or if it beeps continuously instead of suspending. Turn
	  this off if you have a NEC UltraLite Versa 33/C or a Toshiba
	  T400CDT. This is off by default since most machines do fine without
	  this feature.

config APM_CPU_IDLE
	bool "Make CPU Idle calls when idle"
	depends on APM
	help
	  Enable calls to APM CPU Idle/CPU Busy inside the kernel's idle loop.
	  On some machines, this can activate improved power savings, such as
	  a slowed CPU clock rate, when the machine is idle. These idle calls
	  are made after the idle loop has run for some length of time (e.g.,
	  333 mS). On some machines, this will cause a hang at boot time or
	  whenever the CPU becomes idle. (On machines with more than one CPU,
	  this option does nothing.)

config APM_DISPLAY_BLANK
	bool "Enable console blanking using APM"
	depends on APM
	help
	  Enable console blanking using the APM. Some laptops can use this to
	  turn off the LCD backlight when the screen blanker of the Linux
	  virtual console blanks the screen. Note that this is only used by
	  the virtual console screen blanker, and won't turn off the backlight
	  when using the X Window system. This also doesn't have anything to
	  do with your VESA-compliant power-saving monitor. Further, this
	  option doesn't work for all laptops -- it might not turn off your
	  backlight at all, or it might print a lot of errors to the console,
	  especially if you are using gpm.

config APM_RTC_IS_GMT
	bool "RTC stores time in GMT"
	depends on APM
	help
	  Say Y here if your RTC (Real Time Clock a.k.a. hardware clock)
	  stores the time in GMT (Greenwich Mean Time). Say N if your RTC
	  stores localtime.

	  It is in fact recommended to store GMT in your RTC, because then you
	  don't have to worry about daylight savings time changes. The only
	  reason not to use GMT in your RTC is if you also run a broken OS
	  that doesn't understand GMT.

config APM_ALLOW_INTS
	bool "Allow interrupts during APM BIOS calls"
	depends on APM
	help
	  Normally we disable external interrupts while we are making calls to
	  the APM BIOS as a measure to lessen the effects of a badly behaving
	  BIOS implementation.  The BIOS should reenable interrupts if it
	  needs to.  Unfortunately, some BIOSes do not -- especially those in
	  many of the newer IBM Thinkpads.  If you experience hangs when you
	  suspend, try setting this to Y.  Otherwise, say N.

config APM_REAL_MODE_POWER_OFF
	bool "Use real mode APM BIOS call to power off"
	depends on APM
	help
	  Use real mode APM BIOS calls to switch off the computer. This is
	  a work-around for a number of buggy BIOSes. Switch this option on if
	  your computer crashes instead of powering off properly.

endmenu

source "drivers/cpuidle/Kconfig"

endmenu


menu "Bus options (PCI, PCMCIA, EISA, MCA, ISA)"

source "arch/l/pci/Kconfig" # should be set allways for e2k #

config PCI
	bool "PCI support"
	default y
	select PCI_ELBRUS # should be set allways for e2k #
	help
	  Find out whether you have a PCI motherboard. PCI is the name of a
	  bus system, i.e. the way the CPU talks to the other stuff inside
	  your box. Other bus systems are ISA, EISA, MicroChannel (MCA) or
	  VESA. If you have PCI, say Y, otherwise N.

	  The PCI-HOWTO, available from
	  <http://www.tldp.org/docs.html#howto>, contains valuable
	  information about which PCI hardware does work under Linux and which
	  doesn't.

config PCI_USE_VECTOR
	bool "Vector-based interrupt indexing (MSI)"
	depends on L_LOCAL_APIC && L_IO_APIC
	default n
	help
	   This replaces the current existing IRQ-based index interrupt scheme
	   with the vector-base index scheme. The advantages of vector base
	   over IRQ base are listed below:
	   1) Support MSI implementation.
	   2) Support future IOxAPIC hotplug

	   Note that this allows the device drivers to enable MSI, Message
	   Signaled Interrupt, on all MSI capable device functions detected.
	   Message Signal Interrupt enables an MSI-capable hardware device to
	   send an inbound Memory Write on its PCI bus instead of asserting
	   IRQ signal on device IRQ pin.

	   If you don't know what to do here, say N.

source "drivers/pci/pcie/Kconfig"
source "drivers/pci/Kconfig"

config ISA
	bool "ISA support"
	help
	  Find out whether you have ISA slots on your motherboard.  ISA is the
	  name of a bus system, i.e. the way the CPU talks to the other stuff
	  inside your box.  Other bus systems are PCI, EISA, MicroChannel
	  (MCA) or VESA.  ISA is an older system, now being displaced by PCI;
	  newer boards don't support it.  If you have ISA, say Y, otherwise N.


source "drivers/pcmcia/Kconfig"
source "drivers/pci/hotplug/Kconfig"

endmenu


menu "Executable file formats"

source "fs/Kconfig.binfmt"

endmenu

source "net/Kconfig"

source "drivers/Kconfig"

source "fs/Kconfig"

source "arch/e2k/Kconfig.debug"

source "security/Kconfig"

config SYSVIPC_COMPAT
	def_bool y
	depends on SYSVIPC

source "crypto/Kconfig"

source "arch/e2k/Kconfig.virt"

source "lib/Kconfig"
