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