diff options
author | Mike Frysinger <vapier@gentoo.org> | 2011-05-29 23:12:51 -0400 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2011-07-23 01:10:43 -0400 |
commit | fb1d9be5967fff0a3c93b06304fd992e3c438b7f (patch) | |
tree | 0c1c8a2fe6ad2b9c52bdc4a58e0f396058dc75c3 /arch/blackfin/mach-common/head.S | |
parent | 072a5cff2fcaa4648c98bea6d549fac7ee4174fe (diff) |
Blackfin: optimize double fault boot checking
This moves the double fault data used at boot time into a single struct
which can then easily be addressed with indexed loads rather than having
to explicitly load multiple addresses.
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Diffstat (limited to 'arch/blackfin/mach-common/head.S')
-rw-r--r-- | arch/blackfin/mach-common/head.S | 36 |
1 files changed, 12 insertions, 24 deletions
diff --git a/arch/blackfin/mach-common/head.S b/arch/blackfin/mach-common/head.S index 76de5724c1e..8b4d9885440 100644 --- a/arch/blackfin/mach-common/head.S +++ b/arch/blackfin/mach-common/head.S | |||
@@ -85,37 +85,25 @@ ENTRY(__start) | |||
85 | SSYNC; | 85 | SSYNC; |
86 | 86 | ||
87 | /* in case of double faults, save a few things */ | 87 | /* in case of double faults, save a few things */ |
88 | p0.l = _init_retx; | 88 | p1.l = _initial_pda; |
89 | p0.h = _init_retx; | 89 | p1.h = _initial_pda; |
90 | R0 = RETX; | 90 | r4 = RETX; |
91 | [P0] = R0; | ||
92 | |||
93 | #ifdef CONFIG_DEBUG_DOUBLEFAULT | 91 | #ifdef CONFIG_DEBUG_DOUBLEFAULT |
94 | /* Only save these if we are storing them, | 92 | /* Only save these if we are storing them, |
95 | * This happens here, since L1 gets clobbered | 93 | * This happens here, since L1 gets clobbered |
96 | * below | 94 | * below |
97 | */ | 95 | */ |
98 | GET_PDA(p0, r0); | 96 | GET_PDA(p0, r0); |
99 | r5 = [p0 + PDA_DF_RETX]; | 97 | r0 = [p0 + PDA_DF_RETX]; |
100 | p1.l = _init_saved_retx; | 98 | r1 = [p0 + PDA_DF_DCPLB]; |
101 | p1.h = _init_saved_retx; | 99 | r2 = [p0 + PDA_DF_ICPLB]; |
102 | [p1] = r5; | 100 | r3 = [p0 + PDA_DF_SEQSTAT]; |
103 | 101 | [p1 + PDA_INIT_DF_RETX] = r0; | |
104 | r5 = [p0 + PDA_DF_DCPLB]; | 102 | [p1 + PDA_INIT_DF_DCPLB] = r1; |
105 | p1.l = _init_saved_dcplb_fault_addr; | 103 | [p1 + PDA_INIT_DF_ICPLB] = r2; |
106 | p1.h = _init_saved_dcplb_fault_addr; | 104 | [p1 + PDA_INIT_DF_SEQSTAT] = r3; |
107 | [p1] = r5; | ||
108 | |||
109 | r5 = [p0 + PDA_DF_ICPLB]; | ||
110 | p1.l = _init_saved_icplb_fault_addr; | ||
111 | p1.h = _init_saved_icplb_fault_addr; | ||
112 | [p1] = r5; | ||
113 | |||
114 | r5 = [p0 + PDA_DF_SEQSTAT]; | ||
115 | p1.l = _init_saved_seqstat; | ||
116 | p1.h = _init_saved_seqstat; | ||
117 | [p1] = r5; | ||
118 | #endif | 105 | #endif |
106 | [p1 + PDA_INIT_RETX] = r4; | ||
119 | 107 | ||
120 | /* Initialize stack pointer */ | 108 | /* Initialize stack pointer */ |
121 | sp.l = _init_thread_union + THREAD_SIZE; | 109 | sp.l = _init_thread_union + THREAD_SIZE; |