diff options
Diffstat (limited to 'arch/ppc/kernel/traps.c')
-rw-r--r-- | arch/ppc/kernel/traps.c | 121 |
1 files changed, 0 insertions, 121 deletions
diff --git a/arch/ppc/kernel/traps.c b/arch/ppc/kernel/traps.c index 25a1085fbd01..a467a429c2fe 100644 --- a/arch/ppc/kernel/traps.c +++ b/arch/ppc/kernel/traps.c | |||
@@ -194,11 +194,7 @@ static inline int check_io_access(struct pt_regs *regs) | |||
194 | /* On 4xx, the reason for the machine check or program exception | 194 | /* On 4xx, the reason for the machine check or program exception |
195 | is in the ESR. */ | 195 | is in the ESR. */ |
196 | #define get_reason(regs) ((regs)->dsisr) | 196 | #define get_reason(regs) ((regs)->dsisr) |
197 | #ifndef CONFIG_FSL_BOOKE | ||
198 | #define get_mc_reason(regs) ((regs)->dsisr) | 197 | #define get_mc_reason(regs) ((regs)->dsisr) |
199 | #else | ||
200 | #define get_mc_reason(regs) (mfspr(SPRN_MCSR)) | ||
201 | #endif | ||
202 | #define REASON_FP ESR_FP | 198 | #define REASON_FP ESR_FP |
203 | #define REASON_ILLEGAL (ESR_PIL | ESR_PUO) | 199 | #define REASON_ILLEGAL (ESR_PIL | ESR_PUO) |
204 | #define REASON_PRIVILEGED ESR_PPR | 200 | #define REASON_PRIVILEGED ESR_PPR |
@@ -281,66 +277,6 @@ int machine_check_440A(struct pt_regs *regs) | |||
281 | } | 277 | } |
282 | return 0; | 278 | return 0; |
283 | } | 279 | } |
284 | #elif defined(CONFIG_E500) | ||
285 | int machine_check_e500(struct pt_regs *regs) | ||
286 | { | ||
287 | unsigned long reason = get_mc_reason(regs); | ||
288 | |||
289 | printk("Machine check in kernel mode.\n"); | ||
290 | printk("Caused by (from MCSR=%lx): ", reason); | ||
291 | |||
292 | if (reason & MCSR_MCP) | ||
293 | printk("Machine Check Signal\n"); | ||
294 | if (reason & MCSR_ICPERR) | ||
295 | printk("Instruction Cache Parity Error\n"); | ||
296 | if (reason & MCSR_DCP_PERR) | ||
297 | printk("Data Cache Push Parity Error\n"); | ||
298 | if (reason & MCSR_DCPERR) | ||
299 | printk("Data Cache Parity Error\n"); | ||
300 | if (reason & MCSR_BUS_IAERR) | ||
301 | printk("Bus - Instruction Address Error\n"); | ||
302 | if (reason & MCSR_BUS_RAERR) | ||
303 | printk("Bus - Read Address Error\n"); | ||
304 | if (reason & MCSR_BUS_WAERR) | ||
305 | printk("Bus - Write Address Error\n"); | ||
306 | if (reason & MCSR_BUS_IBERR) | ||
307 | printk("Bus - Instruction Data Error\n"); | ||
308 | if (reason & MCSR_BUS_RBERR) | ||
309 | printk("Bus - Read Data Bus Error\n"); | ||
310 | if (reason & MCSR_BUS_WBERR) | ||
311 | printk("Bus - Read Data Bus Error\n"); | ||
312 | if (reason & MCSR_BUS_IPERR) | ||
313 | printk("Bus - Instruction Parity Error\n"); | ||
314 | if (reason & MCSR_BUS_RPERR) | ||
315 | printk("Bus - Read Parity Error\n"); | ||
316 | |||
317 | return 0; | ||
318 | } | ||
319 | #elif defined(CONFIG_E200) | ||
320 | int machine_check_e200(struct pt_regs *regs) | ||
321 | { | ||
322 | unsigned long reason = get_mc_reason(regs); | ||
323 | |||
324 | printk("Machine check in kernel mode.\n"); | ||
325 | printk("Caused by (from MCSR=%lx): ", reason); | ||
326 | |||
327 | if (reason & MCSR_MCP) | ||
328 | printk("Machine Check Signal\n"); | ||
329 | if (reason & MCSR_CP_PERR) | ||
330 | printk("Cache Push Parity Error\n"); | ||
331 | if (reason & MCSR_CPERR) | ||
332 | printk("Cache Parity Error\n"); | ||
333 | if (reason & MCSR_EXCP_ERR) | ||
334 | printk("ISI, ITLB, or Bus Error on first instruction fetch for an exception handler\n"); | ||
335 | if (reason & MCSR_BUS_IRERR) | ||
336 | printk("Bus - Read Bus Error on instruction fetch\n"); | ||
337 | if (reason & MCSR_BUS_DRERR) | ||
338 | printk("Bus - Read Bus Error on data load\n"); | ||
339 | if (reason & MCSR_BUS_WRERR) | ||
340 | printk("Bus - Write Bus Error on buffered store or cache line push\n"); | ||
341 | |||
342 | return 0; | ||
343 | } | ||
344 | #else | 280 | #else |
345 | int machine_check_generic(struct pt_regs *regs) | 281 | int machine_check_generic(struct pt_regs *regs) |
346 | { | 282 | { |
@@ -866,63 +802,6 @@ void altivec_assist_exception(struct pt_regs *regs) | |||
866 | } | 802 | } |
867 | #endif /* CONFIG_ALTIVEC */ | 803 | #endif /* CONFIG_ALTIVEC */ |
868 | 804 | ||
869 | #ifdef CONFIG_E500 | ||
870 | void performance_monitor_exception(struct pt_regs *regs) | ||
871 | { | ||
872 | perf_irq(regs); | ||
873 | } | ||
874 | #endif | ||
875 | |||
876 | #ifdef CONFIG_FSL_BOOKE | ||
877 | void CacheLockingException(struct pt_regs *regs, unsigned long address, | ||
878 | unsigned long error_code) | ||
879 | { | ||
880 | /* We treat cache locking instructions from the user | ||
881 | * as priv ops, in the future we could try to do | ||
882 | * something smarter | ||
883 | */ | ||
884 | if (error_code & (ESR_DLK|ESR_ILK)) | ||
885 | _exception(SIGILL, regs, ILL_PRVOPC, regs->nip); | ||
886 | return; | ||
887 | } | ||
888 | #endif /* CONFIG_FSL_BOOKE */ | ||
889 | |||
890 | #ifdef CONFIG_SPE | ||
891 | void SPEFloatingPointException(struct pt_regs *regs) | ||
892 | { | ||
893 | unsigned long spefscr; | ||
894 | int fpexc_mode; | ||
895 | int code = 0; | ||
896 | |||
897 | spefscr = current->thread.spefscr; | ||
898 | fpexc_mode = current->thread.fpexc_mode; | ||
899 | |||
900 | /* Hardware does not necessarily set sticky | ||
901 | * underflow/overflow/invalid flags */ | ||
902 | if ((spefscr & SPEFSCR_FOVF) && (fpexc_mode & PR_FP_EXC_OVF)) { | ||
903 | code = FPE_FLTOVF; | ||
904 | spefscr |= SPEFSCR_FOVFS; | ||
905 | } | ||
906 | else if ((spefscr & SPEFSCR_FUNF) && (fpexc_mode & PR_FP_EXC_UND)) { | ||
907 | code = FPE_FLTUND; | ||
908 | spefscr |= SPEFSCR_FUNFS; | ||
909 | } | ||
910 | else if ((spefscr & SPEFSCR_FDBZ) && (fpexc_mode & PR_FP_EXC_DIV)) | ||
911 | code = FPE_FLTDIV; | ||
912 | else if ((spefscr & SPEFSCR_FINV) && (fpexc_mode & PR_FP_EXC_INV)) { | ||
913 | code = FPE_FLTINV; | ||
914 | spefscr |= SPEFSCR_FINVS; | ||
915 | } | ||
916 | else if ((spefscr & (SPEFSCR_FG | SPEFSCR_FX)) && (fpexc_mode & PR_FP_EXC_RES)) | ||
917 | code = FPE_FLTRES; | ||
918 | |||
919 | current->thread.spefscr = spefscr; | ||
920 | |||
921 | _exception(SIGFPE, regs, code, regs->nip); | ||
922 | return; | ||
923 | } | ||
924 | #endif | ||
925 | |||
926 | #ifdef CONFIG_BOOKE_WDT | 805 | #ifdef CONFIG_BOOKE_WDT |
927 | /* | 806 | /* |
928 | * Default handler for a Watchdog exception, | 807 | * Default handler for a Watchdog exception, |