summaryrefslogtreecommitdiff
path: root/arch/s390/mm
diff options
context:
space:
mode:
authorHeiko Carstens <hca@linux.ibm.com>2021-04-09 11:34:43 +0300
committerHeiko Carstens <hca@linux.ibm.com>2021-04-12 13:46:42 +0300
commit17a363dcd2f7455d8661a7b2f9ba7cfb85bbc7e4 (patch)
tree15b3c8c49de3ed353e3b7f5a6ff41ee50fd725b1 /arch/s390/mm
parent61311e32892b008886478bdba4ce2a34f4d938f8 (diff)
downloadlinux-17a363dcd2f7455d8661a7b2f9ba7cfb85bbc7e4.tar.xz
s390/traps,mm: add conditional trap handlers
Add conditional trap handlers similar to conditional system calls (COND_SYSCALL), to reduce the number of ifdefs. Trap handlers which may or may not exist depending on config options are supposed to have a COND_TRAP entry, which redirects to default_trap_handler() for non-existent trap handlers during link time. This allows to get rid of the secure execution trap handlers for the !PGSTE case. Reviewed-by: Vasily Gorbik <gor@linux.ibm.com> Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
Diffstat (limited to 'arch/s390/mm')
-rw-r--r--arch/s390/mm/fault.c18
1 files changed, 2 insertions, 16 deletions
diff --git a/arch/s390/mm/fault.c b/arch/s390/mm/fault.c
index e30c7c781172..826d01777361 100644
--- a/arch/s390/mm/fault.c
+++ b/arch/s390/mm/fault.c
@@ -783,6 +783,7 @@ early_initcall(pfault_irq_init);
#endif /* CONFIG_PFAULT */
#if IS_ENABLED(CONFIG_PGSTE)
+
void do_secure_storage_access(struct pt_regs *regs)
{
unsigned long addr = regs->int_parm_long & __FAIL_ADDR_MASK;
@@ -859,19 +860,4 @@ void do_secure_storage_violation(struct pt_regs *regs)
send_sig(SIGSEGV, current, 0);
}
-#else
-void do_secure_storage_access(struct pt_regs *regs)
-{
- default_trap_handler(regs);
-}
-
-void do_non_secure_storage_access(struct pt_regs *regs)
-{
- default_trap_handler(regs);
-}
-
-void do_secure_storage_violation(struct pt_regs *regs)
-{
- default_trap_handler(regs);
-}
-#endif
+#endif /* CONFIG_PGSTE */