entry.h 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. #ifndef __BFIN_ENTRY_H
  2. #define __BFIN_ENTRY_H
  3. #include <asm/setup.h>
  4. #include <asm/page.h>
  5. #ifdef __ASSEMBLY__
  6. #define LFLUSH_I_AND_D 0x00000808
  7. #define LSIGTRAP 5
  8. /* process bits for task_struct.flags */
  9. #define PF_TRACESYS_OFF 3
  10. #define PF_TRACESYS_BIT 5
  11. #define PF_PTRACED_OFF 3
  12. #define PF_PTRACED_BIT 4
  13. #define PF_DTRACE_OFF 1
  14. #define PF_DTRACE_BIT 5
  15. /* This one is used for exceptions, emulation, and NMI. It doesn't push
  16. RETI and doesn't do cli. */
  17. #define SAVE_ALL_SYS save_context_no_interrupts
  18. /* This is used for all normal interrupts. It saves a minimum of registers
  19. to the stack, loads the IRQ number, and jumps to common code. */
  20. #define INTERRUPT_ENTRY(N) \
  21. [--sp] = SYSCFG; \
  22. \
  23. [--sp] = P0; /*orig_p0*/ \
  24. [--sp] = R0; /*orig_r0*/ \
  25. [--sp] = (R7:0,P5:0); \
  26. R0 = (N); \
  27. jump __common_int_entry;
  28. /* For timer interrupts, we need to save IPEND, since the user_mode
  29. macro accesses it to determine where to account time. */
  30. #define TIMER_INTERRUPT_ENTRY(N) \
  31. [--sp] = SYSCFG; \
  32. \
  33. [--sp] = P0; /*orig_p0*/ \
  34. [--sp] = R0; /*orig_r0*/ \
  35. [--sp] = (R7:0,P5:0); \
  36. p0.l = lo(IPEND); \
  37. p0.h = hi(IPEND); \
  38. r1 = [p0]; \
  39. R0 = (N); \
  40. jump __common_int_entry;
  41. /* This one pushes RETI without using CLI. Interrupts are enabled. */
  42. #define SAVE_CONTEXT_SYSCALL save_context_syscall
  43. #define SAVE_CONTEXT save_context_with_interrupts
  44. #define RESTORE_ALL_SYS restore_context_no_interrupts
  45. #define RESTORE_CONTEXT restore_context_with_interrupts
  46. #endif /* __ASSEMBLY__ */
  47. #endif /* __BFIN_ENTRY_H */