csky: Add kprobes supported
[linux-2.6-microblaze.git] / arch / csky / Kconfig
1 # SPDX-License-Identifier: GPL-2.0-only
2 config CSKY
3         def_bool y
4         select ARCH_32BIT_OFF_T
5         select ARCH_HAS_DMA_PREP_COHERENT
6         select ARCH_HAS_GCOV_PROFILE_ALL
7         select ARCH_HAS_SYNC_DMA_FOR_CPU
8         select ARCH_HAS_SYNC_DMA_FOR_DEVICE
9         select ARCH_USE_BUILTIN_BSWAP
10         select ARCH_USE_QUEUED_RWLOCKS if NR_CPUS>2
11         select COMMON_CLK
12         select CLKSRC_MMIO
13         select CSKY_MPINTC if CPU_CK860
14         select CSKY_MP_TIMER if CPU_CK860
15         select CSKY_APB_INTC
16         select DMA_DIRECT_REMAP
17         select IRQ_DOMAIN
18         select HANDLE_DOMAIN_IRQ
19         select DW_APB_TIMER_OF
20         select GENERIC_IOREMAP
21         select GENERIC_LIB_ASHLDI3
22         select GENERIC_LIB_ASHRDI3
23         select GENERIC_LIB_LSHRDI3
24         select GENERIC_LIB_MULDI3
25         select GENERIC_LIB_CMPDI2
26         select GENERIC_LIB_UCMPDI2
27         select GENERIC_ALLOCATOR
28         select GENERIC_ATOMIC64
29         select GENERIC_CLOCKEVENTS
30         select GENERIC_CPU_DEVICES
31         select GENERIC_IRQ_CHIP
32         select GENERIC_IRQ_PROBE
33         select GENERIC_IRQ_SHOW
34         select GENERIC_IRQ_MULTI_HANDLER
35         select GENERIC_SCHED_CLOCK
36         select GENERIC_SMP_IDLE_THREAD
37         select GX6605S_TIMER if CPU_CK610
38         select HAVE_ARCH_TRACEHOOK
39         select HAVE_ARCH_AUDITSYSCALL
40         select HAVE_COPY_THREAD_TLS
41         select HAVE_DYNAMIC_FTRACE
42         select HAVE_DYNAMIC_FTRACE_WITH_REGS
43         select HAVE_FUNCTION_TRACER
44         select HAVE_FUNCTION_GRAPH_TRACER
45         select HAVE_FTRACE_MCOUNT_RECORD
46         select HAVE_KERNEL_GZIP
47         select HAVE_KERNEL_LZO
48         select HAVE_KERNEL_LZMA
49         select HAVE_KPROBES if !CPU_CK610
50         select HAVE_KPROBES_ON_FTRACE if !CPU_CK610
51         select HAVE_KRETPROBES if !CPU_CK610
52         select HAVE_PERF_EVENTS
53         select HAVE_PERF_REGS
54         select HAVE_PERF_USER_STACK_DUMP
55         select HAVE_DMA_CONTIGUOUS
56         select HAVE_REGS_AND_STACK_ACCESS_API
57         select HAVE_RSEQ
58         select HAVE_STACKPROTECTOR
59         select HAVE_SYSCALL_TRACEPOINTS
60         select MAY_HAVE_SPARSE_IRQ
61         select MODULES_USE_ELF_RELA if MODULES
62         select OF
63         select OF_EARLY_FLATTREE
64         select PERF_USE_VMALLOC if CPU_CK610
65         select RTC_LIB
66         select TIMER_OF
67         select USB_ARCH_HAS_EHCI
68         select USB_ARCH_HAS_OHCI
69         select GENERIC_PCI_IOMAP
70         select HAVE_PCI
71         select PCI_DOMAINS_GENERIC if PCI
72         select PCI_SYSCALL if PCI
73         select PCI_MSI if PCI
74
75 config LOCKDEP_SUPPORT
76         def_bool y
77
78 config CPU_HAS_CACHEV2
79         bool
80
81 config CPU_HAS_FPUV2
82         bool
83
84 config CPU_HAS_HILO
85         bool
86
87 config CPU_HAS_TLBI
88         bool
89
90 config CPU_HAS_LDSTEX
91         bool
92         help
93           For SMP, CPU needs "ldex&stex" instructions for atomic operations.
94
95 config CPU_NEED_TLBSYNC
96         bool
97
98 config CPU_NEED_SOFTALIGN
99         bool
100
101 config CPU_NO_USER_BKPT
102         bool
103         help
104           For abiv2 we couldn't use "trap 1" as user space bkpt in gdbserver, because
105           abiv2 is 16/32bit instruction set and "trap 1" is 32bit.
106           So we need a 16bit instruction as user space bkpt, and it will cause an illegal
107           instruction exception.
108           In kernel we parse the *regs->pc to determine whether to send SIGTRAP or not.
109
110 config GENERIC_CALIBRATE_DELAY
111         def_bool y
112
113 config GENERIC_CSUM
114         def_bool y
115
116 config GENERIC_HWEIGHT
117         def_bool y
118
119 config MMU
120         def_bool y
121
122 config STACKTRACE_SUPPORT
123         def_bool y
124
125 config TIME_LOW_RES
126         def_bool y
127
128 config TRACE_IRQFLAGS_SUPPORT
129         def_bool y
130
131 config CPU_TLB_SIZE
132         int
133         default "128"   if (CPU_CK610 || CPU_CK807 || CPU_CK810)
134         default "1024"  if (CPU_CK860)
135
136 config CPU_ASID_BITS
137         int
138         default "8"     if (CPU_CK610 || CPU_CK807 || CPU_CK810)
139         default "12"    if (CPU_CK860)
140
141 config L1_CACHE_SHIFT
142         int
143         default "4"     if (CPU_CK610)
144         default "5"     if (CPU_CK807 || CPU_CK810)
145         default "6"     if (CPU_CK860)
146
147 menu "Processor type and features"
148
149 choice
150         prompt "CPU MODEL"
151         default CPU_CK807
152
153 config CPU_CK610
154         bool "CSKY CPU ck610"
155         select CPU_NEED_TLBSYNC
156         select CPU_NEED_SOFTALIGN
157         select CPU_NO_USER_BKPT
158
159 config CPU_CK810
160         bool "CSKY CPU ck810"
161         select CPU_HAS_HILO
162         select CPU_NEED_TLBSYNC
163
164 config CPU_CK807
165         bool "CSKY CPU ck807"
166         select CPU_HAS_HILO
167
168 config CPU_CK860
169         bool "CSKY CPU ck860"
170         select CPU_HAS_TLBI
171         select CPU_HAS_CACHEV2
172         select CPU_HAS_LDSTEX
173         select CPU_HAS_FPUV2
174 endchoice
175
176 choice
177         prompt "C-SKY PMU type"
178         depends on PERF_EVENTS
179         depends on CPU_CK807 || CPU_CK810 || CPU_CK860
180
181 config CPU_PMU_NONE
182         bool "None"
183
184 config CSKY_PMU_V1
185         bool "Performance Monitoring Unit Ver.1"
186
187 endchoice
188
189 choice
190         prompt "Power Manager Instruction (wait/doze/stop)"
191         default CPU_PM_NONE
192
193 config CPU_PM_NONE
194         bool "None"
195
196 config CPU_PM_WAIT
197         bool "wait"
198
199 config CPU_PM_DOZE
200         bool "doze"
201
202 config CPU_PM_STOP
203         bool "stop"
204 endchoice
205
206 menuconfig HAVE_TCM
207         bool "Tightly-Coupled/Sram Memory"
208         select GENERIC_ALLOCATOR
209         help
210           The implementation are not only used by TCM (Tightly-Coupled Meory)
211           but also used by sram on SOC bus. It follow existed linux tcm
212           software interface, so that old tcm application codes could be
213           re-used directly.
214
215 if HAVE_TCM
216 config ITCM_RAM_BASE
217         hex "ITCM ram base"
218         default 0xffffffff
219
220 config ITCM_NR_PAGES
221         int "Page count of ITCM size: NR*4KB"
222         range 1 256
223         default 32
224
225 config HAVE_DTCM
226         bool "DTCM Support"
227
228 config DTCM_RAM_BASE
229         hex "DTCM ram base"
230         depends on HAVE_DTCM
231         default 0xffffffff
232
233 config DTCM_NR_PAGES
234         int "Page count of DTCM size: NR*4KB"
235         depends on HAVE_DTCM
236         range 1 256
237         default 32
238 endif
239
240 config CPU_HAS_VDSP
241         bool "CPU has VDSP coprocessor"
242         depends on CPU_HAS_FPU && CPU_HAS_FPUV2
243
244 config CPU_HAS_FPU
245         bool "CPU has FPU coprocessor"
246         depends on CPU_CK807 || CPU_CK810 || CPU_CK860
247
248 config CPU_HAS_ICACHE_INS
249         bool "CPU has Icache invalidate instructions"
250         depends on CPU_HAS_CACHEV2
251
252 config CPU_HAS_TEE
253         bool "CPU has Trusted Execution Environment"
254         depends on CPU_CK810
255
256 config SMP
257         bool "Symmetric Multi-Processing (SMP) support for C-SKY"
258         depends on CPU_CK860
259         default n
260
261 config NR_CPUS
262         int "Maximum number of CPUs (2-32)"
263         range 2 32
264         depends on SMP
265         default "2"
266
267 config HIGHMEM
268         bool "High Memory Support"
269         depends on !CPU_CK610
270         default y
271
272 config FORCE_MAX_ZONEORDER
273         int "Maximum zone order"
274         default "11"
275
276 config RAM_BASE
277         hex "DRAM start addr (the same with memory-section in dts)"
278         default 0x0
279
280 config HOTPLUG_CPU
281         bool "Support for hot-pluggable CPUs"
282         select GENERIC_IRQ_MIGRATION
283         depends on SMP
284         help
285           Say Y here to allow turning CPUs off and on. CPUs can be
286           controlled through /sys/devices/system/cpu/cpu1/hotplug/target.
287
288           Say N if you want to disable CPU hotplug.
289 endmenu
290
291 source "arch/csky/Kconfig.platforms"
292
293 source "kernel/Kconfig.hz"