traps.c (89713ed10815401a1bfe12e3a076b64048381b56) | traps.c (172ae2e7f8ff9053905a36672453a6d2ff95b182) |
---|---|
1/* 2 * Copyright (C) 1995-1996 Gary Thomas (gdt@linuxppc.org) 3 * 4 * This program is free software; you can redistribute it and/or 5 * modify it under the terms of the GNU General Public License 6 * as published by the Free Software Foundation; either version 7 * 2 of the License, or (at your option) any later version. 8 * --- 285 unchanged lines hidden (view full) --- 294 regs->nip = entry->fixup; 295 return 1; 296 } 297 } 298#endif /* CONFIG_PPC32 */ 299 return 0; 300} 301 | 1/* 2 * Copyright (C) 1995-1996 Gary Thomas (gdt@linuxppc.org) 3 * 4 * This program is free software; you can redistribute it and/or 5 * modify it under the terms of the GNU General Public License 6 * as published by the Free Software Foundation; either version 7 * 2 of the License, or (at your option) any later version. 8 * --- 285 unchanged lines hidden (view full) --- 294 regs->nip = entry->fixup; 295 return 1; 296 } 297 } 298#endif /* CONFIG_PPC32 */ 299 return 0; 300} 301 |
302#if defined(CONFIG_4xx) || defined(CONFIG_BOOKE) | 302#ifdef CONFIG_PPC_ADV_DEBUG_REGS |
303/* On 4xx, the reason for the machine check or program exception 304 is in the ESR. */ 305#define get_reason(regs) ((regs)->dsisr) 306#ifndef CONFIG_FSL_BOOKE 307#define get_mc_reason(regs) ((regs)->dsisr) 308#else 309#define get_mc_reason(regs) (mfspr(SPRN_MCSR) & MCSR_MASK) 310#endif --- 717 unchanged lines hidden (view full) --- 1028 return; 1029 } 1030#else 1031 _exception(SIGILL, regs, ILL_ILLOPC, regs->nip); 1032#endif 1033} 1034#endif /* CONFIG_8xx */ 1035 | 303/* On 4xx, the reason for the machine check or program exception 304 is in the ESR. */ 305#define get_reason(regs) ((regs)->dsisr) 306#ifndef CONFIG_FSL_BOOKE 307#define get_mc_reason(regs) ((regs)->dsisr) 308#else 309#define get_mc_reason(regs) (mfspr(SPRN_MCSR) & MCSR_MASK) 310#endif --- 717 unchanged lines hidden (view full) --- 1028 return; 1029 } 1030#else 1031 _exception(SIGILL, regs, ILL_ILLOPC, regs->nip); 1032#endif 1033} 1034#endif /* CONFIG_8xx */ 1035 |
1036#if defined(CONFIG_40x) || defined(CONFIG_BOOKE) | 1036#ifdef CONFIG_PPC_ADV_DEBUG_REGS |
1037 1038void __kprobes DebugException(struct pt_regs *regs, unsigned long debug_status) 1039{ 1040 /* Hack alert: On BookE, Branch Taken stops on the branch itself, while 1041 * on server, it stops on the target of the branch. In order to simulate 1042 * the server behaviour, we thus restart right away with a single step 1043 * instead of stopping here when hitting a BT 1044 */ --- 52 unchanged lines hidden (view full) --- 1097 1098 /* Clear the DAC event */ 1099 mtspr(SPRN_DBSR, (DBSR_DAC1R | DBSR_DAC1W)); 1100 } 1101 /* Setup and send the trap to the handler */ 1102 do_dabr(regs, mfspr(SPRN_DAC1), debug_status); 1103 } 1104} | 1037 1038void __kprobes DebugException(struct pt_regs *regs, unsigned long debug_status) 1039{ 1040 /* Hack alert: On BookE, Branch Taken stops on the branch itself, while 1041 * on server, it stops on the target of the branch. In order to simulate 1042 * the server behaviour, we thus restart right away with a single step 1043 * instead of stopping here when hitting a BT 1044 */ --- 52 unchanged lines hidden (view full) --- 1097 1098 /* Clear the DAC event */ 1099 mtspr(SPRN_DBSR, (DBSR_DAC1R | DBSR_DAC1W)); 1100 } 1101 /* Setup and send the trap to the handler */ 1102 do_dabr(regs, mfspr(SPRN_DAC1), debug_status); 1103 } 1104} |
1105#endif /* CONFIG_4xx || CONFIG_BOOKE */ | 1105#endif /* CONFIG_PPC_ADV_DEBUG_REGS */ |
1106 1107#if !defined(CONFIG_TAU_INT) 1108void TAUException(struct pt_regs *regs) 1109{ 1110 printk("TAU trap at PC: %lx, MSR: %lx, vector=%lx %s\n", 1111 regs->nip, regs->msr, regs->trap, print_tainted()); 1112} 1113#endif /* CONFIG_INT_TAU */ --- 289 unchanged lines hidden --- | 1106 1107#if !defined(CONFIG_TAU_INT) 1108void TAUException(struct pt_regs *regs) 1109{ 1110 printk("TAU trap at PC: %lx, MSR: %lx, vector=%lx %s\n", 1111 regs->nip, regs->msr, regs->trap, print_tainted()); 1112} 1113#endif /* CONFIG_INT_TAU */ --- 289 unchanged lines hidden --- |