pda.h 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  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. struct blackfin_pda *next;
  13. unsigned long syscfg;
  14. #ifdef CONFIG_SMP
  15. unsigned long imask; /* Current IMASK value */
  16. #endif
  17. unsigned long *ipdt; /* Start of switchable I-CPLB table */
  18. unsigned long *ipdt_swapcount; /* Number of swaps in ipdt */
  19. unsigned long *dpdt; /* Start of switchable D-CPLB table */
  20. unsigned long *dpdt_swapcount; /* Number of swaps in dpdt */
  21. /*
  22. * Single instructions can have multiple faults, which
  23. * need to be handled by traps.c, in irq5. We store
  24. * the exception cause to ensure we don't miss a
  25. * double fault condition
  26. */
  27. unsigned long ex_iptr;
  28. unsigned long ex_optr;
  29. unsigned long ex_buf[4];
  30. unsigned long ex_imask; /* Saved imask from exception */
  31. unsigned long ex_ipend; /* Saved IPEND from exception */
  32. unsigned long *ex_stack; /* Exception stack space */
  33. #ifdef ANOMALY_05000261
  34. unsigned long last_cplb_fault_retx;
  35. #endif
  36. unsigned long dcplb_fault_addr;
  37. unsigned long icplb_fault_addr;
  38. unsigned long retx;
  39. unsigned long seqstat;
  40. unsigned int __nmi_count; /* number of times NMI asserted on this CPU */
  41. #ifdef CONFIG_DEBUG_DOUBLEFAULT
  42. unsigned long dcplb_doublefault_addr;
  43. unsigned long icplb_doublefault_addr;
  44. unsigned long retx_doublefault;
  45. unsigned long seqstat_doublefault;
  46. #endif
  47. };
  48. struct blackfin_initial_pda {
  49. void *retx;
  50. #ifdef CONFIG_DEBUG_DOUBLEFAULT
  51. void *dcplb_doublefault_addr;
  52. void *icplb_doublefault_addr;
  53. void *retx_doublefault;
  54. unsigned seqstat_doublefault;
  55. #endif
  56. };
  57. extern struct blackfin_pda cpu_pda[];
  58. #endif /* __ASSEMBLY__ */
  59. #endif /* _ASM_BLACKFIN_PDA_H */