blob: 68d6f6618f2aecfa7af15a194bb5d29581000809 [file] [log] [blame]
Graf Yang6b3087c2009-01-07 23:14:39 +08001/*
Robin Getz96f10502009-09-24 14:11:24 +00002 * Copyright 2007-2009 Analog Devices Inc.
3 * Philippe Gerum <rpm@xenomai.org>
Graf Yang6b3087c2009-01-07 23:14:39 +08004 *
Robin Getz96f10502009-09-24 14:11:24 +00005 * Licensed under the GPL-2 or later.
Graf Yang6b3087c2009-01-07 23:14:39 +08006 */
7
8#ifndef _ASM_BLACKFIN_PDA_H
9#define _ASM_BLACKFIN_PDA_H
10
Mike Frysingerb6070572008-11-18 17:48:22 +080011#include <mach/anomaly.h>
Graf Yang6b3087c2009-01-07 23:14:39 +080012
13#ifndef __ASSEMBLY__
14
15struct blackfin_pda { /* Per-processor Data Area */
Steven Miao8db08132012-04-28 15:54:17 +080016#ifdef CONFIG_SMP
Graf Yang6b3087c2009-01-07 23:14:39 +080017 struct blackfin_pda *next;
Steven Miao8db08132012-04-28 15:54:17 +080018#endif
Graf Yang6b3087c2009-01-07 23:14:39 +080019
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 Getzae4f0732009-06-22 02:02:16 +000040 unsigned long ex_ipend; /* Saved IPEND from exception */
Graf Yang6b3087c2009-01-07 23:14:39 +080041 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 Getz3605fb02009-02-04 16:49:45 +080050 unsigned int __nmi_count; /* number of times NMI asserted on this CPU */
Graf Yang01b9f4b2009-07-22 11:56:24 +000051#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 Yang6b3087c2009-01-07 23:14:39 +080057};
58
Mike Frysingerfb1d9be2011-05-29 23:12:51 -040059struct 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 Yang6b3087c2009-01-07 23:14:39 +080069extern struct blackfin_pda cpu_pda[];
70
Graf Yang6b3087c2009-01-07 23:14:39 +080071#endif /* __ASSEMBLY__ */
72
73#endif /* _ASM_BLACKFIN_PDA_H */