aboutsummaryrefslogtreecommitdiffstats
path: root/arch/blackfin/mach-common/cplbmgr.S
diff options
context:
space:
mode:
Diffstat (limited to 'arch/blackfin/mach-common/cplbmgr.S')
-rw-r--r--arch/blackfin/mach-common/cplbmgr.S15
1 files changed, 13 insertions, 2 deletions
diff --git a/arch/blackfin/mach-common/cplbmgr.S b/arch/blackfin/mach-common/cplbmgr.S
index 6f909cbfac7b..faca1ab344d2 100644
--- a/arch/blackfin/mach-common/cplbmgr.S
+++ b/arch/blackfin/mach-common/cplbmgr.S
@@ -75,6 +75,15 @@ ENTRY(_cplb_mgr)
75 * from the configuration table. 75 * from the configuration table.
76 */ 76 */
77 77
78 /* A multi-word instruction can cross a page boundary. This means the
79 * first part of the instruction can be in a valid page, but the
80 * second part is not, and hence generates the instruction miss.
81 * However, the fault address is for the start of the instruction,
82 * not the part that's in the bad page. Therefore, we have to check
83 * whether the fault address applies to a page that is already present
84 * in the table.
85 */
86
78 P4.L = LO(ICPLB_FAULT_ADDR); 87 P4.L = LO(ICPLB_FAULT_ADDR);
79 P4.H = HI(ICPLB_FAULT_ADDR); 88 P4.H = HI(ICPLB_FAULT_ADDR);
80 89
@@ -87,7 +96,7 @@ ENTRY(_cplb_mgr)
87 R4 = [P4]; /* Get faulting address*/ 96 R4 = [P4]; /* Get faulting address*/
88 R6 = 64; /* Advance past the fault address, which*/ 97 R6 = 64; /* Advance past the fault address, which*/
89 R6 = R6 + R4; /* we'll use if we find a match*/ 98 R6 = R6 + R4; /* we'll use if we find a match*/
90 R3 = ((16 << 8) | 2); /* Extract mask, bits 16 and 17.*/ 99 R3 = ((16 << 8) | 2); /* Extract mask, two bits at posn 16 */
91 100
92 R5 = 0; 101 R5 = 0;
93.Lisearch: 102.Lisearch:
@@ -125,7 +134,9 @@ ENTRY(_cplb_mgr)
125 P4.L = LO(IMEM_CONTROL); 134 P4.L = LO(IMEM_CONTROL);
126 P4.H = HI(IMEM_CONTROL); 135 P4.H = HI(IMEM_CONTROL);
127 136
128 /* disable cplbs */ 137 /* Turn off CPLBs while we work, necessary according to HRM before
138 * modifying CPLB descriptors
139 */
129 R5 = [P4]; /* Control Register*/ 140 R5 = [P4]; /* Control Register*/
130 BITCLR(R5,ENICPLB_P); 141 BITCLR(R5,ENICPLB_P);
131 CLI R1; 142 CLI R1;