traps.c (ecd740c6f2f092b90b95fa35f757973589eaaca2) traps.c (3cfc096e4c4fbc234634cf8a30d40348a25fc9ba)
1/*
2 * arch/xtensa/kernel/traps.c
3 *
4 * Exception handling.
5 *
6 * Derived from code with the following copyrights:
7 * Copyright (C) 1994 - 1999 by Ralf Baechle
8 * Modified for R3000 by Paul M. Antoine, 1995, 1996

--- 87 unchanged lines hidden (view full) ---

96/* EXCCAUSE_LOAD_STORE_ERROR unhandled*/
97{ EXCCAUSE_LEVEL1_INTERRUPT, 0, do_interrupt },
98{ EXCCAUSE_ALLOCA, USER|KRNL, fast_alloca },
99/* EXCCAUSE_INTEGER_DIVIDE_BY_ZERO unhandled */
100/* EXCCAUSE_PRIVILEGED unhandled */
101#if XCHAL_UNALIGNED_LOAD_EXCEPTION || XCHAL_UNALIGNED_STORE_EXCEPTION
102#ifdef CONFIG_XTENSA_UNALIGNED_USER
103{ EXCCAUSE_UNALIGNED, USER, fast_unaligned },
1/*
2 * arch/xtensa/kernel/traps.c
3 *
4 * Exception handling.
5 *
6 * Derived from code with the following copyrights:
7 * Copyright (C) 1994 - 1999 by Ralf Baechle
8 * Modified for R3000 by Paul M. Antoine, 1995, 1996

--- 87 unchanged lines hidden (view full) ---

96/* EXCCAUSE_LOAD_STORE_ERROR unhandled*/
97{ EXCCAUSE_LEVEL1_INTERRUPT, 0, do_interrupt },
98{ EXCCAUSE_ALLOCA, USER|KRNL, fast_alloca },
99/* EXCCAUSE_INTEGER_DIVIDE_BY_ZERO unhandled */
100/* EXCCAUSE_PRIVILEGED unhandled */
101#if XCHAL_UNALIGNED_LOAD_EXCEPTION || XCHAL_UNALIGNED_STORE_EXCEPTION
102#ifdef CONFIG_XTENSA_UNALIGNED_USER
103{ EXCCAUSE_UNALIGNED, USER, fast_unaligned },
104#else
105{ EXCCAUSE_UNALIGNED, 0, do_unaligned_user },
106#endif
104#endif
105{ EXCCAUSE_UNALIGNED, 0, do_unaligned_user },
107{ EXCCAUSE_UNALIGNED, KRNL, fast_unaligned },
108#endif
109#ifdef CONFIG_MMU
110{ EXCCAUSE_ITLB_MISS, 0, do_page_fault },
111{ EXCCAUSE_ITLB_MISS, USER|KRNL, fast_second_level_miss},
112{ EXCCAUSE_ITLB_MULTIHIT, 0, do_multihit },
113{ EXCCAUSE_ITLB_PRIVILEGE, 0, do_page_fault },
114/* EXCCAUSE_SIZE_RESTRICTION unhandled */

--- 144 unchanged lines hidden (view full) ---

259/*
260 * Handle unaligned memory accesses from user space. Kill task.
261 *
262 * If CONFIG_UNALIGNED_USER is not set, we don't allow unaligned memory
263 * accesses causes from user space.
264 */
265
266#if XCHAL_UNALIGNED_LOAD_EXCEPTION || XCHAL_UNALIGNED_STORE_EXCEPTION
106{ EXCCAUSE_UNALIGNED, KRNL, fast_unaligned },
107#endif
108#ifdef CONFIG_MMU
109{ EXCCAUSE_ITLB_MISS, 0, do_page_fault },
110{ EXCCAUSE_ITLB_MISS, USER|KRNL, fast_second_level_miss},
111{ EXCCAUSE_ITLB_MULTIHIT, 0, do_multihit },
112{ EXCCAUSE_ITLB_PRIVILEGE, 0, do_page_fault },
113/* EXCCAUSE_SIZE_RESTRICTION unhandled */

--- 144 unchanged lines hidden (view full) ---

258/*
259 * Handle unaligned memory accesses from user space. Kill task.
260 *
261 * If CONFIG_UNALIGNED_USER is not set, we don't allow unaligned memory
262 * accesses causes from user space.
263 */
264
265#if XCHAL_UNALIGNED_LOAD_EXCEPTION || XCHAL_UNALIGNED_STORE_EXCEPTION
267#ifndef CONFIG_XTENSA_UNALIGNED_USER
268void
269do_unaligned_user (struct pt_regs *regs)
270{
271 siginfo_t info;
272
273 __die_if_kernel("Unhandled unaligned exception in kernel",
274 regs, SIGKILL);
275

--- 5 unchanged lines hidden (view full) ---

281 info.si_signo = SIGBUS;
282 info.si_errno = 0;
283 info.si_code = BUS_ADRALN;
284 info.si_addr = (void *) regs->excvaddr;
285 force_sig_info(SIGSEGV, &info, current);
286
287}
288#endif
266void
267do_unaligned_user (struct pt_regs *regs)
268{
269 siginfo_t info;
270
271 __die_if_kernel("Unhandled unaligned exception in kernel",
272 regs, SIGKILL);
273

--- 5 unchanged lines hidden (view full) ---

279 info.si_signo = SIGBUS;
280 info.si_errno = 0;
281 info.si_code = BUS_ADRALN;
282 info.si_addr = (void *) regs->excvaddr;
283 force_sig_info(SIGSEGV, &info, current);
284
285}
286#endif
289#endif
290
291void
292do_debug(struct pt_regs *regs)
293{
294#ifdef CONFIG_KGDB
295 /* If remote debugging is configured AND enabled, we give control to
296 * kgdb. Otherwise, we fall through, perhaps giving control to the
297 * native debugger.

--- 223 unchanged lines hidden ---
287
288void
289do_debug(struct pt_regs *regs)
290{
291#ifdef CONFIG_KGDB
292 /* If remote debugging is configured AND enabled, we give control to
293 * kgdb. Otherwise, we fall through, perhaps giving control to the
294 * native debugger.

--- 223 unchanged lines hidden ---