pda.h 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. /*
  2. * Copyright 2007-2009 Analog Devices Inc.
  3. * Philippe Gerum <rpm@xenomai.org>
  4. *
  5. * Licensed under the GPL-2 or later.
  6. */
  7. #ifndef _ASM_BLACKFIN_PDA_H
  8. #define _ASM_BLACKFIN_PDA_H
  9. #include <mach/anomaly.h>
  10. #ifndef __ASSEMBLY__
  11. struct blackfin_pda { /* Per-processor Data Area */
  12. #ifdef CONFIG_SMP
  13. struct blackfin_pda *next;
  14. #endif
  15. unsigned long syscfg;
  16. #ifdef CONFIG_SMP
  17. unsigned long imask; /* Current IMASK value */
  18. #endif
  19. unsigned long *ipdt; /* Start of switchable I-CPLB table */
  20. unsigned long *ipdt_swapcount; /* Number of swaps in ipdt */
  21. unsigned long *dpdt; /* Start of switchable D-CPLB table */
  22. unsigned long *dpdt_swapcount; /* Number of swaps in dpdt */
  23. /*
  24. * Single instructions can have multiple faults, which
  25. * need to be handled by traps.c, in irq5. We store
  26. * the exception cause to ensure we don't miss a
  27. * double fault condition
  28. */
  29. unsigned long ex_iptr;
  30. unsigned long ex_optr;
  31. unsigned long ex_buf[4];
  32. unsigned long ex_imask; /* Saved imask from exception */
  33. unsigned long ex_ipend; /* Saved IPEND from exception */
  34. unsigned long *ex_stack; /* Exception stack space */
  35. #ifdef ANOMALY_05000261
  36. unsigned long last_cplb_fault_retx;
  37. #endif
  38. unsigned long dcplb_fault_addr;
  39. unsigned long icplb_fault_addr;
  40. unsigned long retx;
  41. unsigned long seqstat;
  42. unsigned int __nmi_count; /* number of times NMI asserted on this CPU */
  43. #ifdef CONFIG_DEBUG_DOUBLEFAULT
  44. unsigned long dcplb_doublefault_addr;
  45. unsigned long icplb_doublefault_addr;
  46. unsigned long retx_doublefault;
  47. unsigned long seqstat_doublefault;
  48. #endif
  49. };
  50. struct blackfin_initial_pda {
  51. void *retx;
  52. #ifdef CONFIG_DEBUG_DOUBLEFAULT
  53. void *dcplb_doublefault_addr;
  54. void *icplb_doublefault_addr;
  55. void *retx_doublefault;
  56. unsigned seqstat_doublefault;
  57. #endif
  58. };
  59. extern struct blackfin_pda cpu_pda[];
  60. #endif /* __ASSEMBLY__ */
  61. #endif /* _ASM_BLACKFIN_PDA_H */