1# SPDX-License-Identifier: GPL-2.0
2config PARISC
3	def_bool y
4	select ALTERNATE_USER_ADDRESS_SPACE
5	select ARCH_32BIT_OFF_T if !64BIT
6	select ARCH_MIGHT_HAVE_PC_PARPORT
7	select HAVE_FUNCTION_TRACER
8	select HAVE_FUNCTION_GRAPH_TRACER
9	select HAVE_SYSCALL_TRACEPOINTS
10	select ARCH_WANT_FRAME_POINTERS
11	select ARCH_HAS_ELF_RANDOMIZE
12	select ARCH_HAS_STRICT_KERNEL_RWX
13	select ARCH_HAS_STRICT_MODULE_RWX
14	select ARCH_HAS_UBSAN_SANITIZE_ALL
15	select ARCH_HAS_PTE_SPECIAL
16	select ARCH_NO_SG_CHAIN
17	select ARCH_SUPPORTS_HUGETLBFS if PA20
18	select ARCH_SUPPORTS_MEMORY_FAILURE
19	select ARCH_STACKWALK
20	select ARCH_HAS_DEBUG_VM_PGTABLE
21	select HAVE_RELIABLE_STACKTRACE
22	select DMA_OPS
23	select RTC_CLASS
24	select RTC_DRV_GENERIC
25	select INIT_ALL_POSSIBLE
26	select BUG
27	select BUILDTIME_TABLE_SORT
28	select HAVE_PCI
29	select HAVE_PERF_EVENTS
30	select HAVE_KERNEL_BZIP2
31	select HAVE_KERNEL_GZIP
32	select HAVE_KERNEL_LZ4
33	select HAVE_KERNEL_LZMA
34	select HAVE_KERNEL_LZO
35	select HAVE_KERNEL_XZ
36	select GENERIC_ATOMIC64 if !64BIT
37	select GENERIC_IRQ_PROBE
38	select GENERIC_PCI_IOMAP
39	select ARCH_HAVE_NMI_SAFE_CMPXCHG
40	select GENERIC_SMP_IDLE_THREAD
41	select GENERIC_ARCH_TOPOLOGY if SMP
42	select GENERIC_CPU_DEVICES if !SMP
43	select GENERIC_LIB_DEVMEM_IS_ALLOWED
44	select SYSCTL_ARCH_UNALIGN_ALLOW
45	select SYSCTL_EXCEPTION_TRACE
46	select HAVE_MOD_ARCH_SPECIFIC
47	select VIRT_TO_BUS
48	select MODULES_USE_ELF_RELA
49	select CLONE_BACKWARDS
50	select TTY # Needed for pdc_cons.c
51	select HAVE_DEBUG_STACKOVERFLOW
52	select HAVE_ARCH_AUDITSYSCALL
53	select HAVE_ARCH_HASH
54	select HAVE_ARCH_JUMP_LABEL
55	select HAVE_ARCH_JUMP_LABEL_RELATIVE
56	select HAVE_ARCH_KFENCE
57	select HAVE_ARCH_SECCOMP_FILTER
58	select HAVE_ARCH_TRACEHOOK
59	select HAVE_REGS_AND_STACK_ACCESS_API
60	select GENERIC_SCHED_CLOCK
61	select GENERIC_IRQ_MIGRATION if SMP
62	select HAVE_UNSTABLE_SCHED_CLOCK if SMP
63	select LEGACY_TIMER_TICK
64	select CPU_NO_EFFICIENT_FFS
65	select THREAD_INFO_IN_TASK
66	select NEED_DMA_MAP_STATE
67	select NEED_SG_DMA_LENGTH
68	select HAVE_ARCH_KGDB
69	select HAVE_KPROBES
70	select HAVE_KRETPROBES
71	select HAVE_DYNAMIC_FTRACE if $(cc-option,-fpatchable-function-entry=1,1)
72	select HAVE_FTRACE_MCOUNT_RECORD if HAVE_DYNAMIC_FTRACE
73	select FTRACE_MCOUNT_USE_PATCHABLE_FUNCTION_ENTRY if DYNAMIC_FTRACE
74	select HAVE_KPROBES_ON_FTRACE
75	select HAVE_DYNAMIC_FTRACE_WITH_REGS
76	select HAVE_SOFTIRQ_ON_OWN_STACK if IRQSTACKS
77	select TRACE_IRQFLAGS_SUPPORT
78	select HAVE_FUNCTION_DESCRIPTORS if 64BIT
79
80	help
81	  The PA-RISC microprocessor is designed by Hewlett-Packard and used
82	  in many of their workstations & servers (HP9000 700 and 800 series,
83	  and later HP3000 series).  The PA-RISC Linux project home page is
84	  at <https://parisc.wiki.kernel.org>.
85
86config CPU_BIG_ENDIAN
87	def_bool y
88
89config MMU
90	def_bool y
91
92config STACK_GROWSUP
93	def_bool y
94
95config GENERIC_LOCKBREAK
96	bool
97	default y
98	depends on SMP && PREEMPTION
99
100config ARCH_HAS_ILOG2_U32
101	bool
102	default n
103
104config ARCH_HAS_ILOG2_U64
105	bool
106	default n
107
108config GENERIC_BUG
109	bool
110	default y
111	depends on BUG
112
113config GENERIC_HWEIGHT
114	bool
115	default y
116
117config GENERIC_CALIBRATE_DELAY
118	bool
119	default y
120
121config TIME_LOW_RES
122	bool
123	depends on SMP
124	default y
125
126# unless you want to implement ACPI on PA-RISC ... ;-)
127config PM
128	bool
129
130config STACKTRACE_SUPPORT
131	def_bool y
132
133config ISA_DMA_API
134	bool
135
136config ARCH_MAY_HAVE_PC_FDC
137	bool
138	depends on BROKEN
139	default y
140
141config PGTABLE_LEVELS
142	int
143	default 3 if 64BIT && PARISC_PAGE_SIZE_4KB
144	default 2
145
146menu "Processor type and features"
147
148choice
149	prompt "Processor type"
150	default PA7000 if "$(ARCH)" = "parisc"
151
152config PA7000
153	bool "PA7000/PA7100" if "$(ARCH)" = "parisc"
154	help
155	  This is the processor type of your CPU.  This information is
156	  used for optimizing purposes.  In order to compile a kernel
157	  that can run on all 32-bit PA CPUs (albeit not optimally fast),
158	  you can specify "PA7000" here.
159
160	  Specifying "PA8000" here will allow you to select a 64-bit kernel
161	  which is required on some machines.
162
163config PA7100LC
164	bool "PA7100LC" if "$(ARCH)" = "parisc"
165	help
166	  Select this option for the PCX-L processor, as used in the
167	  712, 715/64, 715/80, 715/100, 715/100XC, 725/100, 743, 748,
168	  D200, D210, D300, D310 and E-class
169
170config PA7200
171	bool "PA7200" if "$(ARCH)" = "parisc"
172	help
173	  Select this option for the PCX-T' processor, as used in the
174	  C100, C110, J100, J110, J210XC, D250, D260, D350, D360,
175	  K100, K200, K210, K220, K400, K410 and K420
176
177config PA7300LC
178	bool "PA7300LC" if "$(ARCH)" = "parisc"
179	help
180	  Select this option for the PCX-L2 processor, as used in the
181	  744, A180, B132L, B160L, B180L, C132L, C160L, C180L,
182	  D220, D230, D320 and D330.
183
184config PA8X00
185	bool "PA8000 and up"
186	help
187	  Select this option for PCX-U to PCX-W2 processors.
188
189endchoice
190
191# Define implied options from the CPU selection here
192
193config PA20
194	def_bool y
195	depends on PA8X00
196
197config PA11
198	def_bool y
199	depends on PA7000 || PA7100LC || PA7200 || PA7300LC
200	select ARCH_HAS_SYNC_DMA_FOR_CPU
201	select ARCH_HAS_SYNC_DMA_FOR_DEVICE
202
203config PREFETCH
204	def_bool y
205	depends on PA8X00 || PA7200
206
207config PARISC_HUGE_KERNEL
208	def_bool y if !MODULES || UBSAN || FTRACE || COMPILE_TEST
209
210config MLONGCALLS
211	def_bool y if PARISC_HUGE_KERNEL
212	bool "Enable the -mlong-calls compiler option for big kernels" if !PARISC_HUGE_KERNEL
213	depends on PA8X00
214	help
215	  If you configure the kernel to include many drivers built-in instead
216	  as modules, the kernel executable may become too big, so that the
217	  linker will not be able to resolve some long branches and fails to link
218	  your vmlinux kernel. In that case enabling this option will help you
219	  to overcome this limit by using the -mlong-calls compiler option.
220
221	  Usually you want to say N here, unless you e.g. want to build
222	  a kernel which includes all necessary drivers built-in and which can
223	  be used for TFTP booting without the need to have an initrd ramdisk.
224
225	  Enabling this option will probably slow down your kernel.
226
227config 64BIT
228	def_bool "$(ARCH)" = "parisc64"
229	depends on PA8X00
230
231choice
232	prompt "Kernel page size"
233	default PARISC_PAGE_SIZE_4KB
234
235config PARISC_PAGE_SIZE_4KB
236	bool "4KB"
237	help
238	  This lets you select the page size of the kernel.  For best
239	  performance, a page size of 16KB is recommended.  For best
240	  compatibility with 32bit applications, a page size of 4KB should be
241	  selected (the vast majority of 32bit binaries work perfectly fine
242	  with a larger page size).
243
244	  4KB                For best 32bit compatibility
245	  16KB               For best performance
246	  64KB               For best performance, might give more overhead.
247
248	  If you don't know what to do, choose 4KB.
249
250config PARISC_PAGE_SIZE_16KB
251	bool "16KB"
252	depends on PA8X00 && BROKEN && !KFENCE
253
254config PARISC_PAGE_SIZE_64KB
255	bool "64KB"
256	depends on PA8X00 && BROKEN && !KFENCE
257
258endchoice
259
260config SMP
261	bool "Symmetric multi-processing support"
262	help
263	  This enables support for systems with more than one CPU. If you have
264	  a system with only one CPU, say N. If you have a system with more
265	  than one CPU, say Y.
266
267	  If you say N here, the kernel will run on uni- and multiprocessor
268	  machines, but will use only one CPU of a multiprocessor machine.
269	  On a uniprocessor machine, the kernel will run faster if you say N.
270
271	  See also <file:Documentation/admin-guide/lockup-watchdogs.rst> and the SMP-HOWTO
272	  available at <https://www.tldp.org/docs.html#howto>.
273
274	  If you don't know what to do here, say N.
275
276config SCHED_MC
277	bool "Multi-core scheduler support"
278	depends on GENERIC_ARCH_TOPOLOGY && PA8X00
279	help
280	  Multi-core scheduler support improves the CPU scheduler's decision
281	  making when dealing with multi-core CPU chips at a cost of slightly
282	  increased overhead in some places. If unsure say N here.
283
284config IRQSTACKS
285	bool "Use separate kernel stacks when processing interrupts"
286	default y
287	help
288	  If you say Y here the kernel will use separate kernel stacks
289	  for handling hard and soft interrupts.  This can help avoid
290	  overflowing the process kernel stacks.
291
292config TLB_PTLOCK
293	bool "Use page table locks in TLB fault handler"
294	depends on SMP
295	default n
296	help
297	  Select this option to enable page table locking in the TLB
298	  fault handler. This ensures that page table entries are
299	  updated consistently on SMP machines at the expense of some
300	  loss in performance.
301
302config HOTPLUG_CPU
303	bool
304	default y if SMP
305
306config ARCH_SELECT_MEMORY_MODEL
307	def_bool y
308	depends on 64BIT
309
310config ARCH_SPARSEMEM_ENABLE
311	def_bool y
312	depends on 64BIT
313
314config ARCH_FLATMEM_ENABLE
315	def_bool y
316
317config ARCH_SPARSEMEM_DEFAULT
318	def_bool y
319	depends on ARCH_SPARSEMEM_ENABLE
320
321source "kernel/Kconfig.hz"
322
323config COMPAT
324	def_bool y
325	depends on 64BIT
326
327config AUDIT_ARCH
328	def_bool y
329
330config NR_CPUS
331	int "Maximum number of CPUs (2-32)"
332	range 2 32
333	depends on SMP
334	default "4" if 64BIT
335	default "16"
336
337config KEXEC
338	bool "Kexec system call"
339	select KEXEC_CORE
340	help
341	  kexec is a system call that implements the ability to shutdown your
342	  current kernel, and to start another kernel.  It is like a reboot
343	  but it is independent of the system firmware.   And like a reboot
344	  you can start any kernel with it, not just Linux.
345
346	  It is an ongoing process to be certain the hardware in a machine
347	  shutdown, so do not be surprised if this code does not
348	  initially work for you.
349
350config KEXEC_FILE
351	bool "kexec file based system call"
352	select KEXEC_CORE
353	select KEXEC_ELF
354	help
355	  This enables the kexec_file_load() System call. This is
356	  file based and takes file descriptors as system call argument
357	  for kernel and initramfs as opposed to list of segments as
358	  accepted by previous system call.
359
360endmenu
361
362source "drivers/parisc/Kconfig"
363