xref: /linux/arch/s390/kernel/entry.h (revision 570f7e331f5febb30f1384817463c7e42b65ca7d)
1 /* SPDX-License-Identifier: GPL-2.0 */
2 #ifndef _ENTRY_H
3 #define _ENTRY_H
4 
5 #define PGM_FLAG_GUEST_FAULT	1
6 #define SYSCALL_FLAG_PER_TRAP	1
7 
8 #ifndef __ASSEMBLER__
9 
10 #include <linux/percpu.h>
11 #include <linux/types.h>
12 #include <linux/signal.h>
13 #include <asm/extable.h>
14 #include <asm/ptrace.h>
15 #include <asm/idle.h>
16 
17 extern void *restart_stack;
18 
19 void system_call(void);
20 void pgm_check_handler(void);
21 void ext_int_handler(void);
22 void io_int_handler(void);
23 void mcck_int_handler(void);
24 void restart_int_handler(void);
25 void early_pgm_check_handler(void);
26 
27 struct task_struct *__switch_to_asm(struct task_struct *prev, struct task_struct *next);
28 void __ret_from_fork(struct task_struct *prev, struct pt_regs *regs);
29 void __do_pgm_check(struct pt_regs *regs, unsigned long flags);
30 void __do_syscall(struct pt_regs *regs, unsigned long flags);
31 void __do_early_pgm_check(struct pt_regs *regs);
32 
33 void do_protection_exception(struct pt_regs *regs);
34 void do_dat_exception(struct pt_regs *regs);
35 void do_secure_storage_access(struct pt_regs *regs);
36 void do_non_secure_storage_access(struct pt_regs *regs);
37 void do_secure_storage_violation(struct pt_regs *regs);
38 void do_report_trap(struct pt_regs *regs, int si_signo, int si_code, char *str);
39 void kernel_stack_invalid(struct pt_regs *regs);
40 void handle_signal32(struct ksignal *ksig, sigset_t *oldset,
41 		     struct pt_regs *regs);
42 
43 void do_io_irq(struct pt_regs *regs);
44 void do_ext_irq(struct pt_regs *regs);
45 void do_restart(void *arg);
46 void __init startup_init(void);
47 void die(struct pt_regs *regs, const char *str);
48 int setup_profiling_timer(unsigned int multiplier);
49 
50 struct s390_mmap_arg_struct;
51 struct fadvise64_64_args;
52 struct old_sigaction;
53 
54 long sys_rt_sigreturn(void);
55 long sys_sigreturn(void);
56 
57 long sys_s390_personality(unsigned int personality);
58 long sys_s390_runtime_instr(int command, int signum);
59 long sys_s390_guarded_storage(int command, struct gs_cb __user *);
60 long sys_s390_pci_mmio_write(unsigned long, const void __user *, size_t);
61 long sys_s390_pci_mmio_read(unsigned long, void __user *, size_t);
62 long sys_s390_sthyi(unsigned long function_code, void __user *buffer, u64 __user *return_code, unsigned long flags);
63 
64 unsigned long stack_alloc(void);
65 void stack_free(unsigned long stack);
66 
67 extern char kprobes_insn_page[];
68 
69 extern char _samode31[], _eamode31[];
70 extern char _stext_amode31[], _etext_amode31[];
71 extern struct exception_table_entry _start_amode31_ex_table[];
72 extern struct exception_table_entry _stop_amode31_ex_table[];
73 
74 #define __amode31_data __section(".amode31.data")
75 #define __amode31_ref __section(".amode31.refs")
76 extern long _start_amode31_refs[], _end_amode31_refs[];
77 
78 #endif /* __ASSEMBLER__ */
79 #endif /* _ENTRY_H */
80