machine_check.c 620 B

1234567891011121314151617181920212223242526
  1. /*
  2. * This program is free software; you can redistribute it and/or
  3. * modify it under the terms of the GNU General Public License
  4. * as published by the Free Software Foundation; either version
  5. * 2 of the License, or (at your option) any later version.
  6. */
  7. #include <linux/kernel.h>
  8. #include <linux/printk.h>
  9. #include <linux/ptrace.h>
  10. #include <asm/reg.h>
  11. int machine_check_4xx(struct pt_regs *regs)
  12. {
  13. unsigned long reason = regs->dsisr;
  14. if (reason & ESR_IMCP) {
  15. printk("Instruction");
  16. mtspr(SPRN_ESR, reason & ~ESR_IMCP);
  17. } else
  18. printk("Data");
  19. printk(" machine check in kernel mode.\n");
  20. return 0;
  21. }