aboutsummaryrefslogtreecommitdiffstats
path: root/arch/mips/mm/tlbex.c
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>2005-07-15 11:23:23 -0400
committerRalf Baechle <ralf@linux-mips.org>2005-10-29 14:31:54 -0400
commit1d40cfcd3442a53e98468cdb3e6d4d9a568d76cf (patch)
tree76d3ba7ac251389194b74c4343d7c46231442044 /arch/mips/mm/tlbex.c
parentbdf21b18b4abf983db38f04ef7fec88f47389867 (diff)
Avoid SMP cacheflushes. This is a minor optimization of startup but
will also avoid smp_call_function from doing stupid things when called from a CPU that is not yet marked online. Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'arch/mips/mm/tlbex.c')
-rw-r--r--arch/mips/mm/tlbex.c30
1 files changed, 10 insertions, 20 deletions
diff --git a/arch/mips/mm/tlbex.c b/arch/mips/mm/tlbex.c
index a876ed6cde24..c3c75a234f50 100644
--- a/arch/mips/mm/tlbex.c
+++ b/arch/mips/mm/tlbex.c
@@ -743,7 +743,6 @@ static void __init build_r3000_tlb_refill_handler(void)
743#endif 743#endif
744 744
745 memcpy((void *)CAC_BASE, tlb_handler, 0x80); 745 memcpy((void *)CAC_BASE, tlb_handler, 0x80);
746 flush_icache_range(CAC_BASE, CAC_BASE + 0x80);
747} 746}
748 747
749/* 748/*
@@ -1258,7 +1257,6 @@ static void __init build_r4000_tlb_refill_handler(void)
1258#endif 1257#endif
1259 1258
1260 memcpy((void *)CAC_BASE, final_handler, 0x100); 1259 memcpy((void *)CAC_BASE, final_handler, 0x100);
1261 flush_icache_range(CAC_BASE, CAC_BASE + 0x100);
1262} 1260}
1263 1261
1264/* 1262/*
@@ -1519,9 +1517,6 @@ static void __init build_r3000_tlb_load_handler(void)
1519 printk("%08x\n", handle_tlbl[i]); 1517 printk("%08x\n", handle_tlbl[i]);
1520 } 1518 }
1521#endif 1519#endif
1522
1523 flush_icache_range((unsigned long)handle_tlbl,
1524 (unsigned long)handle_tlbl + FASTPATH_SIZE * sizeof(u32));
1525} 1520}
1526 1521
1527static void __init build_r3000_tlb_store_handler(void) 1522static void __init build_r3000_tlb_store_handler(void)
@@ -1559,9 +1554,6 @@ static void __init build_r3000_tlb_store_handler(void)
1559 printk("%08x\n", handle_tlbs[i]); 1554 printk("%08x\n", handle_tlbs[i]);
1560 } 1555 }
1561#endif 1556#endif
1562
1563 flush_icache_range((unsigned long)handle_tlbs,
1564 (unsigned long)handle_tlbs + FASTPATH_SIZE * sizeof(u32));
1565} 1557}
1566 1558
1567static void __init build_r3000_tlb_modify_handler(void) 1559static void __init build_r3000_tlb_modify_handler(void)
@@ -1599,9 +1591,6 @@ static void __init build_r3000_tlb_modify_handler(void)
1599 printk("%08x\n", handle_tlbm[i]); 1591 printk("%08x\n", handle_tlbm[i]);
1600 } 1592 }
1601#endif 1593#endif
1602
1603 flush_icache_range((unsigned long)handle_tlbm,
1604 (unsigned long)handle_tlbm + FASTPATH_SIZE * sizeof(u32));
1605} 1594}
1606 1595
1607/* 1596/*
@@ -1691,9 +1680,6 @@ static void __init build_r4000_tlb_load_handler(void)
1691 printk("%08x\n", handle_tlbl[i]); 1680 printk("%08x\n", handle_tlbl[i]);
1692 } 1681 }
1693#endif 1682#endif
1694
1695 flush_icache_range((unsigned long)handle_tlbl,
1696 (unsigned long)handle_tlbl + FASTPATH_SIZE * sizeof(u32));
1697} 1683}
1698 1684
1699static void __init build_r4000_tlb_store_handler(void) 1685static void __init build_r4000_tlb_store_handler(void)
@@ -1730,9 +1716,6 @@ static void __init build_r4000_tlb_store_handler(void)
1730 printk("%08x\n", handle_tlbs[i]); 1716 printk("%08x\n", handle_tlbs[i]);
1731 } 1717 }
1732#endif 1718#endif
1733
1734 flush_icache_range((unsigned long)handle_tlbs,
1735 (unsigned long)handle_tlbs + FASTPATH_SIZE * sizeof(u32));
1736} 1719}
1737 1720
1738static void __init build_r4000_tlb_modify_handler(void) 1721static void __init build_r4000_tlb_modify_handler(void)
@@ -1770,9 +1753,6 @@ static void __init build_r4000_tlb_modify_handler(void)
1770 printk("%08x\n", handle_tlbm[i]); 1753 printk("%08x\n", handle_tlbm[i]);
1771 } 1754 }
1772#endif 1755#endif
1773
1774 flush_icache_range((unsigned long)handle_tlbm,
1775 (unsigned long)handle_tlbm + FASTPATH_SIZE * sizeof(u32));
1776} 1756}
1777 1757
1778void __init build_tlb_refill_handler(void) 1758void __init build_tlb_refill_handler(void)
@@ -1820,3 +1800,13 @@ void __init build_tlb_refill_handler(void)
1820 } 1800 }
1821 } 1801 }
1822} 1802}
1803
1804void __init flush_tlb_handlers(void)
1805{
1806 flush_icache_range((unsigned long)handle_tlbl,
1807 (unsigned long)handle_tlbl + sizeof(handle_tlbl));
1808 flush_icache_range((unsigned long)handle_tlbs,
1809 (unsigned long)handle_tlbs + sizeof(handle_tlbs));
1810 flush_icache_range((unsigned long)handle_tlbm,
1811 (unsigned long)handle_tlbm + sizeof(handle_tlbm));
1812}