extable.c 620 B

123456789101112131415161718192021222324
  1. // SPDX-License-Identifier: GPL-2.0
  2. /*
  3. * Kernel exception handling table support. Derived from arch/alpha/mm/extable.c.
  4. *
  5. * Copyright (C) 1998, 1999, 2001-2002, 2004 Hewlett-Packard Co
  6. * David Mosberger-Tang <[email protected]>
  7. */
  8. #include <asm/ptrace.h>
  9. #include <asm/extable.h>
  10. #include <asm/errno.h>
  11. #include <asm/processor.h>
  12. void
  13. ia64_handle_exception (struct pt_regs *regs, const struct exception_table_entry *e)
  14. {
  15. long fix = (u64) &e->fixup + e->fixup;
  16. regs->r8 = -EFAULT;
  17. if (fix & 4)
  18. regs->r9 = 0;
  19. regs->cr_iip = fix & ~0xf;
  20. ia64_psr(regs)->ri = fix & 0x3; /* set continuation slot number */
  21. }