pda.h 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. /*
  2. * File: arch/blackfin/include/asm/pda.h
  3. * Author: Philippe Gerum <rpm@xenomai.org>
  4. *
  5. * Copyright 2007 Analog Devices Inc.
  6. *
  7. * This program is free software; you can redistribute it and/or modify
  8. * it under the terms of the GNU General Public License as published by
  9. * the Free Software Foundation; either version 2 of the License, or
  10. * (at your option) any later version.
  11. *
  12. * This program is distributed in the hope that it will be useful,
  13. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  14. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  15. * GNU General Public License for more details.
  16. *
  17. * You should have received a copy of the GNU General Public License
  18. * along with this program; if not, see the file COPYING, or write
  19. * to the Free Software Foundation, Inc.,
  20. * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
  21. */
  22. #ifndef _ASM_BLACKFIN_PDA_H
  23. #define _ASM_BLACKFIN_PDA_H
  24. #include <mach/anomaly.h>
  25. #ifndef __ASSEMBLY__
  26. struct blackfin_pda { /* Per-processor Data Area */
  27. struct blackfin_pda *next;
  28. unsigned long syscfg;
  29. #ifdef CONFIG_SMP
  30. unsigned long imask; /* Current IMASK value */
  31. #endif
  32. unsigned long *ipdt; /* Start of switchable I-CPLB table */
  33. unsigned long *ipdt_swapcount; /* Number of swaps in ipdt */
  34. unsigned long *dpdt; /* Start of switchable D-CPLB table */
  35. unsigned long *dpdt_swapcount; /* Number of swaps in dpdt */
  36. /*
  37. * Single instructions can have multiple faults, which
  38. * need to be handled by traps.c, in irq5. We store
  39. * the exception cause to ensure we don't miss a
  40. * double fault condition
  41. */
  42. unsigned long ex_iptr;
  43. unsigned long ex_optr;
  44. unsigned long ex_buf[4];
  45. unsigned long ex_imask; /* Saved imask from exception */
  46. unsigned long *ex_stack; /* Exception stack space */
  47. #ifdef ANOMALY_05000261
  48. unsigned long last_cplb_fault_retx;
  49. #endif
  50. unsigned long dcplb_fault_addr;
  51. unsigned long icplb_fault_addr;
  52. unsigned long retx;
  53. unsigned long seqstat;
  54. unsigned int __nmi_count; /* number of times NMI asserted on this CPU */
  55. };
  56. extern struct blackfin_pda cpu_pda[];
  57. void reserve_pda(void);
  58. #endif /* __ASSEMBLY__ */
  59. #endif /* _ASM_BLACKFIN_PDA_H */