|
1 | 1 | # SPDX-License-Identifier: GPL-2.0 |
2 | 2 | source "arch/powerpc/platforms/Kconfig.cputype" |
3 | 3 |
|
| 4 | +config CC_HAS_ELFV2 |
| 5 | + def_bool PPC64 && $(cc-option, -mabi=elfv2) |
| 6 | + |
4 | 7 | config 32BIT |
5 | 8 | bool |
6 | 9 | default y if PPC32 |
@@ -96,7 +99,7 @@ config LOCKDEP_SUPPORT |
96 | 99 | config GENERIC_LOCKBREAK |
97 | 100 | bool |
98 | 101 | default y |
99 | | - depends on SMP && PREEMPTION |
| 102 | + depends on SMP && PREEMPTION && !PPC_QUEUED_SPINLOCKS |
100 | 103 |
|
101 | 104 | config GENERIC_HWEIGHT |
102 | 105 | bool |
@@ -155,7 +158,6 @@ config PPC |
155 | 158 | select ARCH_USE_CMPXCHG_LOCKREF if PPC64 |
156 | 159 | select ARCH_USE_MEMTEST |
157 | 160 | select ARCH_USE_QUEUED_RWLOCKS if PPC_QUEUED_SPINLOCKS |
158 | | - select ARCH_USE_QUEUED_SPINLOCKS if PPC_QUEUED_SPINLOCKS |
159 | 161 | select ARCH_WANT_DEFAULT_TOPDOWN_MMAP_LAYOUT |
160 | 162 | select ARCH_WANT_IPC_PARSE_VERSION |
161 | 163 | select ARCH_WANT_IRQS_OFF_ACTIVATE_MM |
@@ -239,6 +241,8 @@ config PPC |
239 | 241 | select HAVE_MOD_ARCH_SPECIFIC |
240 | 242 | select HAVE_NMI if PERF_EVENTS || (PPC64 && PPC_BOOK3S) |
241 | 243 | select HAVE_OPTPROBES |
| 244 | + select HAVE_OBJTOOL if PPC32 || MPROFILE_KERNEL |
| 245 | + select HAVE_OBJTOOL_MCOUNT if HAVE_OBJTOOL |
242 | 246 | select HAVE_PERF_EVENTS |
243 | 247 | select HAVE_PERF_EVENTS_NMI if PPC64 |
244 | 248 | select HAVE_PERF_REGS |
@@ -294,6 +298,9 @@ config PPC_BARRIER_NOSPEC |
294 | 298 | default y |
295 | 299 | depends on PPC_BOOK3S_64 || PPC_E500 |
296 | 300 |
|
| 301 | +config PPC_HAS_LBARX_LHARX |
| 302 | + bool |
| 303 | + |
297 | 304 | config EARLY_PRINTK |
298 | 305 | bool |
299 | 306 | default y |
@@ -529,6 +536,15 @@ config HOTPLUG_CPU |
529 | 536 |
|
530 | 537 | Say N if you are unsure. |
531 | 538 |
|
| 539 | +config INTERRUPT_SANITIZE_REGISTERS |
| 540 | + bool "Clear gprs on interrupt arrival" |
| 541 | + depends on PPC64 && ARCH_HAS_SYSCALL_WRAPPER |
| 542 | + default PPC_BOOK3E_64 || PPC_PSERIES || PPC_POWERNV |
| 543 | + help |
| 544 | + Reduce the influence of user register state on interrupt handlers and |
| 545 | + syscalls through clearing user state from registers before handling |
| 546 | + the exception. |
| 547 | + |
532 | 548 | config PPC_QUEUED_SPINLOCKS |
533 | 549 | bool "Queued spinlocks" if EXPERT |
534 | 550 | depends on SMP |
@@ -583,6 +599,24 @@ config KEXEC_FILE |
583 | 599 | config ARCH_HAS_KEXEC_PURGATORY |
584 | 600 | def_bool KEXEC_FILE |
585 | 601 |
|
| 602 | +config PPC64_BIG_ENDIAN_ELF_ABI_V2 |
| 603 | + bool "Build big-endian kernel using ELF ABI V2 (EXPERIMENTAL)" |
| 604 | + depends on PPC64 && CPU_BIG_ENDIAN |
| 605 | + depends on CC_HAS_ELFV2 |
| 606 | + depends on LD_IS_BFD && LD_VERSION >= 22400 |
| 607 | + default n |
| 608 | + help |
| 609 | + This builds the kernel image using the "Power Architecture 64-Bit ELF |
| 610 | + V2 ABI Specification", which has a reduced stack overhead and faster |
| 611 | + function calls. This internal kernel ABI option does not affect |
| 612 | + userspace compatibility. |
| 613 | + |
| 614 | + The V2 ABI is standard for 64-bit little-endian, but for big-endian |
| 615 | + it is less well tested by kernel and toolchain. However some distros |
| 616 | + build userspace this way, and it can produce a functioning kernel. |
| 617 | + |
| 618 | + This requires GCC and binutils 2.24 or newer. |
| 619 | + |
586 | 620 | config RELOCATABLE |
587 | 621 | bool "Build a relocatable kernel" |
588 | 622 | depends on PPC64 || (FLATMEM && (44x || PPC_85xx)) |
@@ -1012,19 +1046,6 @@ config PPC_SECVAR_SYSFS |
1012 | 1046 | read/write operations on these variables. Say Y if you have |
1013 | 1047 | secure boot enabled and want to expose variables to userspace. |
1014 | 1048 |
|
1015 | | -config PPC_RTAS_FILTER |
1016 | | - bool "Enable filtering of RTAS syscalls" |
1017 | | - default y |
1018 | | - depends on PPC_RTAS |
1019 | | - help |
1020 | | - The RTAS syscall API has security issues that could be used to |
1021 | | - compromise system integrity. This option enforces restrictions on the |
1022 | | - RTAS calls and arguments passed by userspace programs to mitigate |
1023 | | - these issues. |
1024 | | - |
1025 | | - Say Y unless you know what you are doing and the filter is causing |
1026 | | - problems for you. |
1027 | | - |
1028 | 1049 | endmenu |
1029 | 1050 |
|
1030 | 1051 | config ISA_DMA_API |
|
0 commit comments