traps.h 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  1. /*
  2. * Copyright 2010 Tilera Corporation. All Rights Reserved.
  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, version 2.
  7. *
  8. * This program is distributed in the hope that it will be useful, but
  9. * WITHOUT ANY WARRANTY; without even the implied warranty of
  10. * MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE, GOOD TITLE or
  11. * NON INFRINGEMENT. See the GNU General Public License for
  12. * more details.
  13. */
  14. #ifndef _ASM_TILE_TRAPS_H
  15. #define _ASM_TILE_TRAPS_H
  16. #ifndef __ASSEMBLY__
  17. #include <arch/chip.h>
  18. /* mm/fault.c */
  19. void do_page_fault(struct pt_regs *, int fault_num,
  20. unsigned long address, unsigned long write);
  21. #if CHIP_HAS_TILE_DMA()
  22. void do_async_page_fault(struct pt_regs *);
  23. #endif
  24. #ifndef __tilegx__
  25. /*
  26. * We return this structure in registers to avoid having to write
  27. * additional save/restore code in the intvec.S caller.
  28. */
  29. struct intvec_state {
  30. void *handler;
  31. unsigned long vecnum;
  32. unsigned long fault_num;
  33. unsigned long info;
  34. unsigned long retval;
  35. };
  36. struct intvec_state do_page_fault_ics(struct pt_regs *regs, int fault_num,
  37. unsigned long address,
  38. unsigned long info);
  39. #endif
  40. /* kernel/traps.c */
  41. void do_trap(struct pt_regs *, int fault_num, unsigned long reason);
  42. void kernel_double_fault(int dummy, ulong pc, ulong lr, ulong sp, ulong r52);
  43. /* kernel/time.c */
  44. void do_timer_interrupt(struct pt_regs *, int fault_num);
  45. /* kernel/messaging.c */
  46. void hv_message_intr(struct pt_regs *, int intnum);
  47. #define TILE_NMI_DUMP_STACK 1 /* Dump stack for sysrq+'l' */
  48. /* kernel/process.c */
  49. void do_nmi_dump_stack(struct pt_regs *regs);
  50. /* kernel/traps.c */
  51. void do_nmi(struct pt_regs *, int fault_num, unsigned long reason);
  52. /* kernel/irq.c */
  53. void tile_dev_intr(struct pt_regs *, int intnum);
  54. #ifdef CONFIG_HARDWALL
  55. /* kernel/hardwall.c */
  56. void do_hardwall_trap(struct pt_regs *, int fault_num);
  57. #endif
  58. /* kernel/ptrace.c */
  59. void do_breakpoint(struct pt_regs *, int fault_num);
  60. #ifdef __tilegx__
  61. /* kernel/single_step.c */
  62. void gx_singlestep_handle(struct pt_regs *, int fault_num);
  63. /* kernel/intvec_64.S */
  64. void fill_ra_stack(void);
  65. /* Handle unalign data fixup. */
  66. extern void do_unaligned(struct pt_regs *regs, int vecnum);
  67. #endif
  68. #endif /* __ASSEMBLY__ */
  69. #ifdef __tilegx__
  70. /* 128 byte JIT per unalign fixup. */
  71. #define UNALIGN_JIT_SHIFT 7
  72. #endif
  73. #endif /* _ASM_TILE_TRAPS_H */