Lines Matching refs:regs
40 static __always_inline bool do_syscall_x64(struct pt_regs *regs, int nr) in do_syscall_x64() argument
50 regs->ax = sys_call_table[unr](regs); in do_syscall_x64()
56 static __always_inline bool do_syscall_x32(struct pt_regs *regs, int nr) in do_syscall_x32() argument
67 regs->ax = x32_sys_call_table[xnr](regs); in do_syscall_x32()
73 __visible noinstr void do_syscall_64(struct pt_regs *regs, int nr) in do_syscall_64() argument
76 nr = syscall_enter_from_user_mode(regs, nr); in do_syscall_64()
80 if (!do_syscall_x64(regs, nr) && !do_syscall_x32(regs, nr) && nr != -1) { in do_syscall_64()
82 regs->ax = __x64_sys_ni_syscall(regs); in do_syscall_64()
86 syscall_exit_to_user_mode(regs); in do_syscall_64()
91 static __always_inline int syscall_32_enter(struct pt_regs *regs) in syscall_32_enter() argument
96 return (int)regs->orig_ax; in syscall_32_enter()
102 static __always_inline void do_syscall_32_irqs_on(struct pt_regs *regs, int nr) in do_syscall_32_irqs_on() argument
112 regs->ax = ia32_sys_call_table[unr](regs); in do_syscall_32_irqs_on()
114 regs->ax = __ia32_sys_ni_syscall(regs); in do_syscall_32_irqs_on()
119 __visible noinstr void do_int80_syscall_32(struct pt_regs *regs) in do_int80_syscall_32() argument
121 int nr = syscall_32_enter(regs); in do_int80_syscall_32()
129 nr = syscall_enter_from_user_mode(regs, nr); in do_int80_syscall_32()
132 do_syscall_32_irqs_on(regs, nr); in do_int80_syscall_32()
135 syscall_exit_to_user_mode(regs); in do_int80_syscall_32()
138 static noinstr bool __do_fast_syscall_32(struct pt_regs *regs) in __do_fast_syscall_32() argument
140 int nr = syscall_32_enter(regs); in __do_fast_syscall_32()
149 syscall_enter_from_user_mode_prepare(regs); in __do_fast_syscall_32()
158 res = __get_user(*(u32 *)®s->bp, in __do_fast_syscall_32()
159 (u32 __user __force *)(unsigned long)(u32)regs->sp); in __do_fast_syscall_32()
161 res = get_user(*(u32 *)®s->bp, in __do_fast_syscall_32()
162 (u32 __user __force *)(unsigned long)(u32)regs->sp); in __do_fast_syscall_32()
167 regs->ax = -EFAULT; in __do_fast_syscall_32()
171 irqentry_exit_to_user_mode(regs); in __do_fast_syscall_32()
175 nr = syscall_enter_from_user_mode_work(regs, nr); in __do_fast_syscall_32()
178 do_syscall_32_irqs_on(regs, nr); in __do_fast_syscall_32()
181 syscall_exit_to_user_mode(regs); in __do_fast_syscall_32()
186 __visible noinstr long do_fast_syscall_32(struct pt_regs *regs) in do_fast_syscall_32() argument
200 regs->ip = landing_pad; in do_fast_syscall_32()
203 if (!__do_fast_syscall_32(regs)) in do_fast_syscall_32()
216 return regs->cs == __USER32_CS && regs->ss == __USER_DS && in do_fast_syscall_32()
217 regs->ip == landing_pad && in do_fast_syscall_32()
218 (regs->flags & (X86_EFLAGS_RF | X86_EFLAGS_TF)) == 0; in do_fast_syscall_32()
231 regs->cs == __USER_CS && regs->ss == __USER_DS && in do_fast_syscall_32()
232 regs->ip == landing_pad && in do_fast_syscall_32()
233 (regs->flags & (X86_EFLAGS_RF | X86_EFLAGS_TF | X86_EFLAGS_VM)) == 0; in do_fast_syscall_32()
238 __visible noinstr long do_SYSENTER_32(struct pt_regs *regs) in do_SYSENTER_32() argument
241 regs->sp = regs->bp; in do_SYSENTER_32()
244 regs->flags |= X86_EFLAGS_IF; in do_SYSENTER_32()
246 return do_fast_syscall_32(regs); in do_SYSENTER_32()
291 static void __xen_pv_evtchn_do_upcall(struct pt_regs *regs) in __xen_pv_evtchn_do_upcall() argument
293 struct pt_regs *old_regs = set_irq_regs(regs); in __xen_pv_evtchn_do_upcall()
302 __visible noinstr void xen_pv_evtchn_do_upcall(struct pt_regs *regs) in xen_pv_evtchn_do_upcall() argument
304 irqentry_state_t state = irqentry_enter(regs); in xen_pv_evtchn_do_upcall()
308 run_sysvec_on_irqstack_cond(__xen_pv_evtchn_do_upcall, regs); in xen_pv_evtchn_do_upcall()
317 irqentry_exit(regs, state); in xen_pv_evtchn_do_upcall()