Lines Matching +full:- +full:v

71 			regs->pc, regs->regs[30], regs->pstate);  in show_regs()
72 printf("sp : %016lx\n", regs->sp); in show_regs()
74 for (i = 29; i >= 0; --i) { in show_regs()
75 printf("x%-2d: %016lx ", i, regs->regs[i]); in show_regs()
105 static void bad_exception(enum vector v, struct pt_regs *regs, in bad_exception() argument
115 (uintptr_t)regs->pc, (uintptr_t)regs->pc - text); in bad_exception()
118 if (v < VECTOR_MAX) in bad_exception()
119 printf("Unhandled vector %d (%s)\n", v, in bad_exception()
120 vector_names[v]); in bad_exception()
122 printf("Got bad vector=%d\n", v); in bad_exception()
131 printf("Vector: %d (%s)\n", v, vector_names[v]); in bad_exception()
136 dump_frame_stack((void *)regs->pc, (void *)regs->regs[29]); in bad_exception()
140 void install_exception_handler(enum vector v, unsigned int ec, exception_fn fn) in install_exception_handler() argument
144 if (v < VECTOR_MAX && ec < EC_MAX) in install_exception_handler()
145 ti->exception_handlers[v][ec] = fn; in install_exception_handler()
148 void install_irq_handler(enum vector v, irq_handler_fn fn) in install_irq_handler() argument
152 if (v < VECTOR_MAX) in install_irq_handler()
153 ti->exception_handlers[v][0] = (exception_fn)fn; in install_irq_handler()
156 void default_vector_sync_handler(enum vector v, struct pt_regs *regs, in default_vector_sync_handler() argument
159 struct thread_info *ti = thread_info_sp(regs->sp); in default_vector_sync_handler()
162 if (ti->flags & TIF_USER_MODE) { in default_vector_sync_handler()
163 if (ec < EC_MAX && ti->exception_handlers[v][ec]) { in default_vector_sync_handler()
164 ti->exception_handlers[v][ec](regs, esr); in default_vector_sync_handler()
170 if (ec < EC_MAX && ti->exception_handlers[v][ec]) in default_vector_sync_handler()
171 ti->exception_handlers[v][ec](regs, esr); in default_vector_sync_handler()
173 bad_exception(v, regs, esr, true, false); in default_vector_sync_handler()
176 void default_vector_irq_handler(enum vector v, struct pt_regs *regs, in default_vector_irq_handler() argument
179 struct thread_info *ti = thread_info_sp(regs->sp); in default_vector_irq_handler()
181 (irq_handler_fn)ti->exception_handlers[v][0]; in default_vector_irq_handler()
183 if (ti->flags & TIF_USER_MODE) { in default_vector_irq_handler()
189 irq_handler = (irq_handler_fn)ti->exception_handlers[v][0]; in default_vector_irq_handler()
195 bad_exception(v, regs, esr, false, false); in default_vector_irq_handler()
206 /* Needed to compile with -Wmissing-prototypes */
207 void do_handle_exception(enum vector v, struct pt_regs *regs, unsigned int esr);
209 void do_handle_exception(enum vector v, struct pt_regs *regs, unsigned int esr) in do_handle_exception() argument
211 struct thread_info *ti = thread_info_sp(regs->sp); in do_handle_exception()
213 if (ti->flags & TIF_USER_MODE) { in do_handle_exception()
214 if (v < VECTOR_MAX && ti->vector_handlers[v]) { in do_handle_exception()
215 ti->vector_handlers[v](v, regs, esr); in do_handle_exception()
221 if (v < VECTOR_MAX && ti->vector_handlers[v]) in do_handle_exception()
222 ti->vector_handlers[v](v, regs, esr); in do_handle_exception()
224 bad_exception(v, regs, esr, true, true); in do_handle_exception()
227 void install_vector_handler(enum vector v, vector_fn fn) in install_vector_handler() argument
231 if (v < VECTOR_MAX) in install_vector_handler()
232 ti->vector_handlers[v] = fn; in install_vector_handler()
238 ti->cpu = mpidr_to_cpu(get_mpidr()); in __thread_info_init()
239 ti->flags = flags; in __thread_info_init()
245 vector_handlers_default_init(ti->vector_handlers); in thread_info_init()
250 sp_usr &= (~15UL); /* stack ptr needs 16-byte alignment */ in start_usr()
253 thread_info_sp(sp_usr)->pgtable = current_thread_info()->pgtable; in start_usr()
267 return current_thread_info()->flags & TIF_USER_MODE; in is_user()