Title: [3926] trunk/arch/blackfin/mach-common/cplbmgr.S: [#3719]
When the CPLBs get a miss, we do:
- Revision
- 3926
- Author
- rgetz
- Date
- 2007-11-23 05:41:54 -0600 (Fri, 23 Nov 2007)
Log Message
[#3719] When the CPLBs get a miss, we do:
- find a victim in the HW table
- remove the victim
- find the replacement in the software table
- put it into the HW table.
If we can't find a replacement in the software table, we accidently
leave a duplicate in the HW table. This patch ensures that duplicate
is marked as not valid.
What we should do is find the replacement in the software table, before
we find a victim in the HW table - but its too late in the release cycle
to do that much restructuring of this code.
Diffstat
cplbmgr.S | 22 +++++++++++++++++++---
1 files changed, 19 insertions(+), 3 deletions(-)
Modified Paths
Diff
Modified: trunk/arch/blackfin/mach-common/cplbmgr.S (3925 => 3926)
--- trunk/arch/blackfin/mach-common/cplbmgr.S 2007-11-23 10:29:56 UTC (rev 3925)
+++ trunk/arch/blackfin/mach-common/cplbmgr.S 2007-11-23 11:41:54 UTC (rev 3926)
@@ -190,8 +190,15 @@
[P0 - 4] = R0;
R0 = [P0 - 0x100];
[P0-0x104] = R0;
-.Lie_move:P0+=4;
+.Lie_move:
+ P0+=4;
+ /* Clear ICPLB_DATA15, in case we don't find a replacement
+ * otherwise, we would have a duplicate entry, and will crash
+ */
+ R0 = 0;
+ [P0 - 4] = R0;
+
/* We've made space in the ICPLB table, so that ICPLB15
* is now free to be overwritten. Next, we have to determine
* which CPLB we need to install, from the configuration
@@ -515,14 +522,23 @@
R0 = [P0++]; /* move data */
[P0 - 8] = R0;
R0 = [P0-0x104] /* move address */
-.Lde_move: [P0-0x108] = R0;
+.Lde_move:
+ [P0-0x108] = R0;
+.Lde_moved:
+ NOP;
+
+ /* Clear DCPLB_DATA15, in case we don't find a replacement
+ * otherwise, we would have a duplicate entry, and will crash
+ */
+ R0 = 0;
+ [P0 - 0x4] = R0;
+
/* We've now made space in DCPLB15 for the new CPLB to be
* installed. The next stage is to locate a CPLB in the
* config table that covers the faulting address.
*/
-.Lde_moved:NOP;
R0 = I0; /* Our faulting address */
P2.L = _dpdt_table;
_______________________________________________
Linux-kernel-commits mailing list
[email protected]
http://blackfin.uclinux.org/mailman/listinfo/linux-kernel-commits