extable.c 510 B

123456789101112131415161718192021
  1. /*
  2. * Kernel exception handling table support. Derived from arch/alpha/mm/extable.c.
  3. *
  4. * Copyright (C) 1998, 1999, 2001-2002, 2004 Hewlett-Packard Co
  5. * David Mosberger-Tang <davidm@hpl.hp.com>
  6. */
  7. #include <asm/uaccess.h>
  8. void
  9. ia64_handle_exception (struct pt_regs *regs, const struct exception_table_entry *e)
  10. {
  11. long fix = (u64) &e->fixup + e->fixup;
  12. regs->r8 = -EFAULT;
  13. if (fix & 4)
  14. regs->r9 = 0;
  15. regs->cr_iip = fix & ~0xf;
  16. ia64_psr(regs)->ri = fix & 0x3; /* set continuation slot number */
  17. }