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