traps.c (ca31fef11dc83e672415d5925a134749761329bd) traps.c (01fcac8e4dfc112f420dcaeb70056a74e326cacf)
1// SPDX-License-Identifier: GPL-2.0-or-later
2/*
3 * Copyright (C) 1995-1996 Gary Thomas (gdt@linuxppc.org)
4 * Copyright 2007-2010 Freescale Semiconductor, Inc.
5 *
6 * Modified by Cort Dougan (cort@cs.nmt.edu)
7 * and Paul Mackerras (paulus@samba.org)
8 */

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

1099 _exception(SIGTRAP, regs, TRAP_BRKPT, regs->nip);
1100}
1101
1102DEFINE_INTERRUPT_HANDLER(RunModeException)
1103{
1104 _exception(SIGTRAP, regs, TRAP_UNK, 0);
1105}
1106
1// SPDX-License-Identifier: GPL-2.0-or-later
2/*
3 * Copyright (C) 1995-1996 Gary Thomas (gdt@linuxppc.org)
4 * Copyright 2007-2010 Freescale Semiconductor, Inc.
5 *
6 * Modified by Cort Dougan (cort@cs.nmt.edu)
7 * and Paul Mackerras (paulus@samba.org)
8 */

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

1099 _exception(SIGTRAP, regs, TRAP_BRKPT, regs->nip);
1100}
1101
1102DEFINE_INTERRUPT_HANDLER(RunModeException)
1103{
1104 _exception(SIGTRAP, regs, TRAP_UNK, 0);
1105}
1106
1107DEFINE_INTERRUPT_HANDLER(single_step_exception)
1107static void __single_step_exception(struct pt_regs *regs)
1108{
1109 clear_single_step(regs);
1110 clear_br_trace(regs);
1111
1112 if (kprobe_post_handler(regs))
1113 return;
1114
1115 if (notify_die(DIE_SSTEP, "single_step", regs, 5,
1116 5, SIGTRAP) == NOTIFY_STOP)
1117 return;
1118 if (debugger_sstep(regs))
1119 return;
1120
1121 _exception(SIGTRAP, regs, TRAP_TRACE, regs->nip);
1122}
1123
1108{
1109 clear_single_step(regs);
1110 clear_br_trace(regs);
1111
1112 if (kprobe_post_handler(regs))
1113 return;
1114
1115 if (notify_die(DIE_SSTEP, "single_step", regs, 5,
1116 5, SIGTRAP) == NOTIFY_STOP)
1117 return;
1118 if (debugger_sstep(regs))
1119 return;
1120
1121 _exception(SIGTRAP, regs, TRAP_TRACE, regs->nip);
1122}
1123
1124DEFINE_INTERRUPT_HANDLER(single_step_exception)
1125{
1126 __single_step_exception(regs);
1127}
1128
1124/*
1125 * After we have successfully emulated an instruction, we have to
1126 * check if the instruction was being single-stepped, and if so,
1127 * pretend we got a single-step exception. This was pointed out
1128 * by Kumar Gala. -- paulus
1129 */
1130static void emulate_single_step(struct pt_regs *regs)
1131{
1132 if (single_stepping(regs))
1129/*
1130 * After we have successfully emulated an instruction, we have to
1131 * check if the instruction was being single-stepped, and if so,
1132 * pretend we got a single-step exception. This was pointed out
1133 * by Kumar Gala. -- paulus
1134 */
1135static void emulate_single_step(struct pt_regs *regs)
1136{
1137 if (single_stepping(regs))
1133 single_step_exception(regs);
1138 __single_step_exception(regs);
1134}
1135
1136static inline int __parse_fpscr(unsigned long fpscr)
1137{
1138 int ret = FPE_FLTUNK;
1139
1140 /* Invalid operation */
1141 if ((fpscr & FPSCR_VE) && (fpscr & FPSCR_VX))

--- 1142 unchanged lines hidden ---
1139}
1140
1141static inline int __parse_fpscr(unsigned long fpscr)
1142{
1143 int ret = FPE_FLTUNK;
1144
1145 /* Invalid operation */
1146 if ((fpscr & FPSCR_VE) && (fpscr & FPSCR_VX))

--- 1142 unchanged lines hidden ---