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