blob: a6f95695731d99ebda1cb14e5823f362f53b5d26 [file] [log] [blame]
Graf Yang6b3087c2009-01-07 23:14:39 +08001/*
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
23#ifndef _ASM_BLACKFIN_PDA_H
24#define _ASM_BLACKFIN_PDA_H
25
Mike Frysingerb6070572008-11-18 17:48:22 +080026#include <mach/anomaly.h>
Graf Yang6b3087c2009-01-07 23:14:39 +080027
28#ifndef __ASSEMBLY__
29
30struct blackfin_pda { /* Per-processor Data Area */
31 struct blackfin_pda *next;
32
33 unsigned long syscfg;
34#ifdef CONFIG_SMP
35 unsigned long imask; /* Current IMASK value */
36#endif
37
38 unsigned long *ipdt; /* Start of switchable I-CPLB table */
39 unsigned long *ipdt_swapcount; /* Number of swaps in ipdt */
40 unsigned long *dpdt; /* Start of switchable D-CPLB table */
41 unsigned long *dpdt_swapcount; /* Number of swaps in dpdt */
42
43 /*
44 * Single instructions can have multiple faults, which
45 * need to be handled by traps.c, in irq5. We store
46 * the exception cause to ensure we don't miss a
47 * double fault condition
48 */
49 unsigned long ex_iptr;
50 unsigned long ex_optr;
51 unsigned long ex_buf[4];
52 unsigned long ex_imask; /* Saved imask from exception */
Robin Getzae4f0732009-06-22 02:02:16 +000053 unsigned long ex_ipend; /* Saved IPEND from exception */
Graf Yang6b3087c2009-01-07 23:14:39 +080054 unsigned long *ex_stack; /* Exception stack space */
55
56#ifdef ANOMALY_05000261
57 unsigned long last_cplb_fault_retx;
58#endif
59 unsigned long dcplb_fault_addr;
60 unsigned long icplb_fault_addr;
61 unsigned long retx;
62 unsigned long seqstat;
Robin Getz3605fb02009-02-04 16:49:45 +080063 unsigned int __nmi_count; /* number of times NMI asserted on this CPU */
Graf Yang01b9f4b2009-07-22 11:56:24 +000064#ifdef CONFIG_DEBUG_DOUBLEFAULT
65 unsigned long dcplb_doublefault_addr;
66 unsigned long icplb_doublefault_addr;
67 unsigned long retx_doublefault;
68 unsigned long seqstat_doublefault;
69#endif
Graf Yang6b3087c2009-01-07 23:14:39 +080070};
71
72extern struct blackfin_pda cpu_pda[];
73
Graf Yang6b3087c2009-01-07 23:14:39 +080074#endif /* __ASSEMBLY__ */
75
76#endif /* _ASM_BLACKFIN_PDA_H */