aboutsummaryrefslogtreecommitdiffstats
path: root/arch/mips/mm
diff options
context:
space:
mode:
authorPaul Mackerras <paulus@samba.org>2006-07-31 20:37:25 -0400
committerPaul Mackerras <paulus@samba.org>2006-07-31 20:37:25 -0400
commit57cad8084e0837e0f2c97da789ec9b3f36809be9 (patch)
treee9c790afb4286f78cb08d9664f58baa7e876fe55 /arch/mips/mm
parentcb18bd40030c879cd93fef02fd579f74dbab473d (diff)
parent49b1e3ea19b1c95c2f012b8331ffb3b169e4c042 (diff)
Merge branch 'merge'
Diffstat (limited to 'arch/mips/mm')
-rw-r--r--arch/mips/mm/c-r4k.c21
-rw-r--r--arch/mips/mm/init.c65
-rw-r--r--arch/mips/mm/pgtable.c2
-rw-r--r--arch/mips/mm/tlbex.c159
4 files changed, 124 insertions, 123 deletions
diff --git a/arch/mips/mm/c-r4k.c b/arch/mips/mm/c-r4k.c
index 857b726f4d41..069803f58f3b 100644
--- a/arch/mips/mm/c-r4k.c
+++ b/arch/mips/mm/c-r4k.c
@@ -578,7 +578,7 @@ static inline void local_r4k_flush_icache_page(void *args)
578 * secondary cache will result in any entries in the primary caches 578 * secondary cache will result in any entries in the primary caches
579 * also getting invalidated which hopefully is a bit more economical. 579 * also getting invalidated which hopefully is a bit more economical.
580 */ 580 */
581 if (cpu_has_subset_pcaches) { 581 if (cpu_has_inclusive_pcaches) {
582 unsigned long addr = (unsigned long) page_address(page); 582 unsigned long addr = (unsigned long) page_address(page);
583 583
584 r4k_blast_scache_page(addr); 584 r4k_blast_scache_page(addr);
@@ -634,7 +634,7 @@ static void r4k_dma_cache_wback_inv(unsigned long addr, unsigned long size)
634 /* Catch bad driver code */ 634 /* Catch bad driver code */
635 BUG_ON(size == 0); 635 BUG_ON(size == 0);
636 636
637 if (cpu_has_subset_pcaches) { 637 if (cpu_has_inclusive_pcaches) {
638 if (size >= scache_size) 638 if (size >= scache_size)
639 r4k_blast_scache(); 639 r4k_blast_scache();
640 else 640 else
@@ -662,7 +662,7 @@ static void r4k_dma_cache_inv(unsigned long addr, unsigned long size)
662 /* Catch bad driver code */ 662 /* Catch bad driver code */
663 BUG_ON(size == 0); 663 BUG_ON(size == 0);
664 664
665 if (cpu_has_subset_pcaches) { 665 if (cpu_has_inclusive_pcaches) {
666 if (size >= scache_size) 666 if (size >= scache_size)
667 r4k_blast_scache(); 667 r4k_blast_scache();
668 else 668 else
@@ -862,15 +862,18 @@ static void __init probe_pcache(void)
862 break; 862 break;
863 863
864 case CPU_VR4133: 864 case CPU_VR4133:
865 write_c0_config(config & ~CONF_EB); 865 write_c0_config(config & ~VR41_CONF_P4K);
866 case CPU_VR4131: 866 case CPU_VR4131:
867 /* Workaround for cache instruction bug of VR4131 */ 867 /* Workaround for cache instruction bug of VR4131 */
868 if (c->processor_id == 0x0c80U || c->processor_id == 0x0c81U || 868 if (c->processor_id == 0x0c80U || c->processor_id == 0x0c81U ||
869 c->processor_id == 0x0c82U) { 869 c->processor_id == 0x0c82U) {
870 config &= ~0x00000030U; 870 config |= 0x00400000U;
871 config |= 0x00410000U; 871 if (c->processor_id == 0x0c80U)
872 config |= VR41_CONF_BP;
872 write_c0_config(config); 873 write_c0_config(config);
873 } 874 } else
875 c->options |= MIPS_CPU_CACHE_CDEX_P;
876
874 icache_size = 1 << (10 + ((config & CONF_IC) >> 9)); 877 icache_size = 1 << (10 + ((config & CONF_IC) >> 9));
875 c->icache.linesz = 16 << ((config & CONF_IB) >> 5); 878 c->icache.linesz = 16 << ((config & CONF_IB) >> 5);
876 c->icache.ways = 2; 879 c->icache.ways = 2;
@@ -880,8 +883,6 @@ static void __init probe_pcache(void)
880 c->dcache.linesz = 16 << ((config & CONF_DB) >> 4); 883 c->dcache.linesz = 16 << ((config & CONF_DB) >> 4);
881 c->dcache.ways = 2; 884 c->dcache.ways = 2;
882 c->dcache.waybit = __ffs(dcache_size/2); 885 c->dcache.waybit = __ffs(dcache_size/2);
883
884 c->options |= MIPS_CPU_CACHE_CDEX_P;
885 break; 886 break;
886 887
887 case CPU_VR41XX: 888 case CPU_VR41XX:
@@ -1192,7 +1193,7 @@ static void __init setup_scache(void)
1192 printk("Unified secondary cache %ldkB %s, linesize %d bytes.\n", 1193 printk("Unified secondary cache %ldkB %s, linesize %d bytes.\n",
1193 scache_size >> 10, way_string[c->scache.ways], c->scache.linesz); 1194 scache_size >> 10, way_string[c->scache.ways], c->scache.linesz);
1194 1195
1195 c->options |= MIPS_CPU_SUBSET_CACHES; 1196 c->options |= MIPS_CPU_INCLUSIVE_CACHES;
1196} 1197}
1197 1198
1198void au1x00_fixup_config_od(void) 1199void au1x00_fixup_config_od(void)
diff --git a/arch/mips/mm/init.c b/arch/mips/mm/init.c
index 802bdd32aa2b..c52497bb102a 100644
--- a/arch/mips/mm/init.c
+++ b/arch/mips/mm/init.c
@@ -139,10 +139,36 @@ void __init fixrange_init(unsigned long start, unsigned long end,
139#ifndef CONFIG_NEED_MULTIPLE_NODES 139#ifndef CONFIG_NEED_MULTIPLE_NODES
140extern void pagetable_init(void); 140extern void pagetable_init(void);
141 141
142static int __init page_is_ram(unsigned long pagenr)
143{
144 int i;
145
146 for (i = 0; i < boot_mem_map.nr_map; i++) {
147 unsigned long addr, end;
148
149 if (boot_mem_map.map[i].type != BOOT_MEM_RAM)
150 /* not usable memory */
151 continue;
152
153 addr = PFN_UP(boot_mem_map.map[i].addr);
154 end = PFN_DOWN(boot_mem_map.map[i].addr +
155 boot_mem_map.map[i].size);
156
157 if (pagenr >= addr && pagenr < end)
158 return 1;
159 }
160
161 return 0;
162}
163
142void __init paging_init(void) 164void __init paging_init(void)
143{ 165{
144 unsigned long zones_size[MAX_NR_ZONES] = {0, 0, 0}; 166 unsigned long zones_size[] = { [0 ... MAX_NR_ZONES - 1] = 0 };
145 unsigned long max_dma, high, low; 167 unsigned long max_dma, high, low;
168#ifndef CONFIG_FLATMEM
169 unsigned long zholes_size[] = { [0 ... MAX_NR_ZONES - 1] = 0 };
170 unsigned long i, j, pfn;
171#endif
146 172
147 pagetable_init(); 173 pagetable_init();
148 174
@@ -174,29 +200,16 @@ void __init paging_init(void)
174 zones_size[ZONE_HIGHMEM] = high - low; 200 zones_size[ZONE_HIGHMEM] = high - low;
175#endif 201#endif
176 202
203#ifdef CONFIG_FLATMEM
177 free_area_init(zones_size); 204 free_area_init(zones_size);
178} 205#else
179 206 pfn = 0;
180static inline int page_is_ram(unsigned long pagenr) 207 for (i = 0; i < MAX_NR_ZONES; i++)
181{ 208 for (j = 0; j < zones_size[i]; j++, pfn++)
182 int i; 209 if (!page_is_ram(pfn))
183 210 zholes_size[i]++;
184 for (i = 0; i < boot_mem_map.nr_map; i++) { 211 free_area_init_node(0, NODE_DATA(0), zones_size, 0, zholes_size);
185 unsigned long addr, end; 212#endif
186
187 if (boot_mem_map.map[i].type != BOOT_MEM_RAM)
188 /* not usable memory */
189 continue;
190
191 addr = PFN_UP(boot_mem_map.map[i].addr);
192 end = PFN_DOWN(boot_mem_map.map[i].addr +
193 boot_mem_map.map[i].size);
194
195 if (pagenr >= addr && pagenr < end)
196 return 1;
197 }
198
199 return 0;
200} 213}
201 214
202static struct kcore_list kcore_mem, kcore_vmalloc; 215static struct kcore_list kcore_mem, kcore_vmalloc;
@@ -213,9 +226,9 @@ void __init mem_init(void)
213#ifdef CONFIG_DISCONTIGMEM 226#ifdef CONFIG_DISCONTIGMEM
214#error "CONFIG_HIGHMEM and CONFIG_DISCONTIGMEM dont work together yet" 227#error "CONFIG_HIGHMEM and CONFIG_DISCONTIGMEM dont work together yet"
215#endif 228#endif
216 max_mapnr = num_physpages = highend_pfn; 229 max_mapnr = highend_pfn;
217#else 230#else
218 max_mapnr = num_physpages = max_low_pfn; 231 max_mapnr = max_low_pfn;
219#endif 232#endif
220 high_memory = (void *) __va(max_low_pfn << PAGE_SHIFT); 233 high_memory = (void *) __va(max_low_pfn << PAGE_SHIFT);
221 234
@@ -229,6 +242,7 @@ void __init mem_init(void)
229 if (PageReserved(pfn_to_page(tmp))) 242 if (PageReserved(pfn_to_page(tmp)))
230 reservedpages++; 243 reservedpages++;
231 } 244 }
245 num_physpages = ram;
232 246
233#ifdef CONFIG_HIGHMEM 247#ifdef CONFIG_HIGHMEM
234 for (tmp = highstart_pfn; tmp < highend_pfn; tmp++) { 248 for (tmp = highstart_pfn; tmp < highend_pfn; tmp++) {
@@ -247,6 +261,7 @@ void __init mem_init(void)
247 totalhigh_pages++; 261 totalhigh_pages++;
248 } 262 }
249 totalram_pages += totalhigh_pages; 263 totalram_pages += totalhigh_pages;
264 num_physpages += totalhigh_pages;
250#endif 265#endif
251 266
252 codesize = (unsigned long) &_etext - (unsigned long) &_text; 267 codesize = (unsigned long) &_etext - (unsigned long) &_text;
diff --git a/arch/mips/mm/pgtable.c b/arch/mips/mm/pgtable.c
index 792c6eb44232..c93aa6cbcaca 100644
--- a/arch/mips/mm/pgtable.c
+++ b/arch/mips/mm/pgtable.c
@@ -15,6 +15,8 @@ void show_mem(void)
15 printk("Free swap: %6ldkB\n", nr_swap_pages<<(PAGE_SHIFT-10)); 15 printk("Free swap: %6ldkB\n", nr_swap_pages<<(PAGE_SHIFT-10));
16 pfn = max_mapnr; 16 pfn = max_mapnr;
17 while (pfn-- > 0) { 17 while (pfn-- > 0) {
18 if (!pfn_valid(pfn))
19 continue;
18 page = pfn_to_page(pfn); 20 page = pfn_to_page(pfn);
19 total++; 21 total++;
20 if (PageHighMem(page)) 22 if (PageHighMem(page))
diff --git a/arch/mips/mm/tlbex.c b/arch/mips/mm/tlbex.c
index e1a8139fc8fb..375e0991505d 100644
--- a/arch/mips/mm/tlbex.c
+++ b/arch/mips/mm/tlbex.c
@@ -5,7 +5,7 @@
5 * 5 *
6 * Synthesize TLB refill handlers at runtime. 6 * Synthesize TLB refill handlers at runtime.
7 * 7 *
8 * Copyright (C) 2004,2005 by Thiemo Seufer 8 * Copyright (C) 2004,2005,2006 by Thiemo Seufer
9 * Copyright (C) 2005 Maciej W. Rozycki 9 * Copyright (C) 2005 Maciej W. Rozycki
10 * Copyright (C) 2006 Ralf Baechle (ralf@linux-mips.org) 10 * Copyright (C) 2006 Ralf Baechle (ralf@linux-mips.org)
11 * 11 *
@@ -35,8 +35,6 @@
35#include <asm/smp.h> 35#include <asm/smp.h>
36#include <asm/war.h> 36#include <asm/war.h>
37 37
38/* #define DEBUG_TLB */
39
40static __init int __attribute__((unused)) r45k_bvahwbug(void) 38static __init int __attribute__((unused)) r45k_bvahwbug(void)
41{ 39{
42 /* XXX: We should probe for the presence of this bug, but we don't. */ 40 /* XXX: We should probe for the presence of this bug, but we don't. */
@@ -728,6 +726,7 @@ static void __init build_r3000_tlb_refill_handler(void)
728{ 726{
729 long pgdc = (long)pgd_current; 727 long pgdc = (long)pgd_current;
730 u32 *p; 728 u32 *p;
729 int i;
731 730
732 memset(tlb_handler, 0, sizeof(tlb_handler)); 731 memset(tlb_handler, 0, sizeof(tlb_handler));
733 p = tlb_handler; 732 p = tlb_handler;
@@ -753,16 +752,14 @@ static void __init build_r3000_tlb_refill_handler(void)
753 if (p > tlb_handler + 32) 752 if (p > tlb_handler + 32)
754 panic("TLB refill handler space exceeded"); 753 panic("TLB refill handler space exceeded");
755 754
756 printk("Synthesized TLB refill handler (%u instructions).\n", 755 pr_info("Synthesized TLB refill handler (%u instructions).\n",
757 (unsigned int)(p - tlb_handler)); 756 (unsigned int)(p - tlb_handler));
758#ifdef DEBUG_TLB
759 {
760 int i;
761 757
762 for (i = 0; i < (p - tlb_handler); i++) 758 pr_debug("\t.set push\n");
763 printk("%08x\n", tlb_handler[i]); 759 pr_debug("\t.set noreorder\n");
764 } 760 for (i = 0; i < (p - tlb_handler); i++)
765#endif 761 pr_debug("\t.word 0x%08x\n", tlb_handler[i]);
762 pr_debug("\t.set pop\n");
766 763
767 memcpy((void *)ebase, tlb_handler, 0x80); 764 memcpy((void *)ebase, tlb_handler, 0x80);
768} 765}
@@ -1175,6 +1172,7 @@ static void __init build_r4000_tlb_refill_handler(void)
1175 struct reloc *r = relocs; 1172 struct reloc *r = relocs;
1176 u32 *f; 1173 u32 *f;
1177 unsigned int final_len; 1174 unsigned int final_len;
1175 int i;
1178 1176
1179 memset(tlb_handler, 0, sizeof(tlb_handler)); 1177 memset(tlb_handler, 0, sizeof(tlb_handler));
1180 memset(labels, 0, sizeof(labels)); 1178 memset(labels, 0, sizeof(labels));
@@ -1272,24 +1270,21 @@ static void __init build_r4000_tlb_refill_handler(void)
1272#endif /* CONFIG_64BIT */ 1270#endif /* CONFIG_64BIT */
1273 1271
1274 resolve_relocs(relocs, labels); 1272 resolve_relocs(relocs, labels);
1275 printk("Synthesized TLB refill handler (%u instructions).\n", 1273 pr_info("Synthesized TLB refill handler (%u instructions).\n",
1276 final_len); 1274 final_len);
1277
1278#ifdef DEBUG_TLB
1279 {
1280 int i;
1281 1275
1282 f = final_handler; 1276 f = final_handler;
1283#ifdef CONFIG_64BIT 1277#ifdef CONFIG_64BIT
1284 if (final_len > 32) 1278 if (final_len > 32)
1285 final_len = 64; 1279 final_len = 64;
1286 else 1280 else
1287 f = final_handler + 32; 1281 f = final_handler + 32;
1288#endif /* CONFIG_64BIT */ 1282#endif /* CONFIG_64BIT */
1289 for (i = 0; i < final_len; i++) 1283 pr_debug("\t.set push\n");
1290 printk("%08x\n", f[i]); 1284 pr_debug("\t.set noreorder\n");
1291 } 1285 for (i = 0; i < final_len; i++)
1292#endif 1286 pr_debug("\t.word 0x%08x\n", f[i]);
1287 pr_debug("\t.set pop\n");
1293 1288
1294 memcpy((void *)ebase, final_handler, 0x100); 1289 memcpy((void *)ebase, final_handler, 0x100);
1295} 1290}
@@ -1522,6 +1517,7 @@ static void __init build_r3000_tlb_load_handler(void)
1522 u32 *p = handle_tlbl; 1517 u32 *p = handle_tlbl;
1523 struct label *l = labels; 1518 struct label *l = labels;
1524 struct reloc *r = relocs; 1519 struct reloc *r = relocs;
1520 int i;
1525 1521
1526 memset(handle_tlbl, 0, sizeof(handle_tlbl)); 1522 memset(handle_tlbl, 0, sizeof(handle_tlbl));
1527 memset(labels, 0, sizeof(labels)); 1523 memset(labels, 0, sizeof(labels));
@@ -1541,17 +1537,14 @@ static void __init build_r3000_tlb_load_handler(void)
1541 panic("TLB load handler fastpath space exceeded"); 1537 panic("TLB load handler fastpath space exceeded");
1542 1538
1543 resolve_relocs(relocs, labels); 1539 resolve_relocs(relocs, labels);
1544 printk("Synthesized TLB load handler fastpath (%u instructions).\n", 1540 pr_info("Synthesized TLB load handler fastpath (%u instructions).\n",
1545 (unsigned int)(p - handle_tlbl)); 1541 (unsigned int)(p - handle_tlbl));
1546
1547#ifdef DEBUG_TLB
1548 {
1549 int i;
1550 1542
1551 for (i = 0; i < (p - handle_tlbl); i++) 1543 pr_debug("\t.set push\n");
1552 printk("%08x\n", handle_tlbl[i]); 1544 pr_debug("\t.set noreorder\n");
1553 } 1545 for (i = 0; i < (p - handle_tlbl); i++)
1554#endif 1546 pr_debug("\t.word 0x%08x\n", handle_tlbl[i]);
1547 pr_debug("\t.set pop\n");
1555} 1548}
1556 1549
1557static void __init build_r3000_tlb_store_handler(void) 1550static void __init build_r3000_tlb_store_handler(void)
@@ -1559,6 +1552,7 @@ static void __init build_r3000_tlb_store_handler(void)
1559 u32 *p = handle_tlbs; 1552 u32 *p = handle_tlbs;
1560 struct label *l = labels; 1553 struct label *l = labels;
1561 struct reloc *r = relocs; 1554 struct reloc *r = relocs;
1555 int i;
1562 1556
1563 memset(handle_tlbs, 0, sizeof(handle_tlbs)); 1557 memset(handle_tlbs, 0, sizeof(handle_tlbs));
1564 memset(labels, 0, sizeof(labels)); 1558 memset(labels, 0, sizeof(labels));
@@ -1578,17 +1572,14 @@ static void __init build_r3000_tlb_store_handler(void)
1578 panic("TLB store handler fastpath space exceeded"); 1572 panic("TLB store handler fastpath space exceeded");
1579 1573
1580 resolve_relocs(relocs, labels); 1574 resolve_relocs(relocs, labels);
1581 printk("Synthesized TLB store handler fastpath (%u instructions).\n", 1575 pr_info("Synthesized TLB store handler fastpath (%u instructions).\n",
1582 (unsigned int)(p - handle_tlbs)); 1576 (unsigned int)(p - handle_tlbs));
1583 1577
1584#ifdef DEBUG_TLB 1578 pr_debug("\t.set push\n");
1585 { 1579 pr_debug("\t.set noreorder\n");
1586 int i; 1580 for (i = 0; i < (p - handle_tlbs); i++)
1587 1581 pr_debug("\t.word 0x%08x\n", handle_tlbs[i]);
1588 for (i = 0; i < (p - handle_tlbs); i++) 1582 pr_debug("\t.set pop\n");
1589 printk("%08x\n", handle_tlbs[i]);
1590 }
1591#endif
1592} 1583}
1593 1584
1594static void __init build_r3000_tlb_modify_handler(void) 1585static void __init build_r3000_tlb_modify_handler(void)
@@ -1596,6 +1587,7 @@ static void __init build_r3000_tlb_modify_handler(void)
1596 u32 *p = handle_tlbm; 1587 u32 *p = handle_tlbm;
1597 struct label *l = labels; 1588 struct label *l = labels;
1598 struct reloc *r = relocs; 1589 struct reloc *r = relocs;
1590 int i;
1599 1591
1600 memset(handle_tlbm, 0, sizeof(handle_tlbm)); 1592 memset(handle_tlbm, 0, sizeof(handle_tlbm));
1601 memset(labels, 0, sizeof(labels)); 1593 memset(labels, 0, sizeof(labels));
@@ -1615,17 +1607,14 @@ static void __init build_r3000_tlb_modify_handler(void)
1615 panic("TLB modify handler fastpath space exceeded"); 1607 panic("TLB modify handler fastpath space exceeded");
1616 1608
1617 resolve_relocs(relocs, labels); 1609 resolve_relocs(relocs, labels);
1618 printk("Synthesized TLB modify handler fastpath (%u instructions).\n", 1610 pr_info("Synthesized TLB modify handler fastpath (%u instructions).\n",
1619 (unsigned int)(p - handle_tlbm)); 1611 (unsigned int)(p - handle_tlbm));
1620 1612
1621#ifdef DEBUG_TLB 1613 pr_debug("\t.set push\n");
1622 { 1614 pr_debug("\t.set noreorder\n");
1623 int i; 1615 for (i = 0; i < (p - handle_tlbm); i++)
1624 1616 pr_debug("\t.word 0x%08x\n", handle_tlbm[i]);
1625 for (i = 0; i < (p - handle_tlbm); i++) 1617 pr_debug("\t.set pop\n");
1626 printk("%08x\n", handle_tlbm[i]);
1627 }
1628#endif
1629} 1618}
1630 1619
1631/* 1620/*
@@ -1677,6 +1666,7 @@ static void __init build_r4000_tlb_load_handler(void)
1677 u32 *p = handle_tlbl; 1666 u32 *p = handle_tlbl;
1678 struct label *l = labels; 1667 struct label *l = labels;
1679 struct reloc *r = relocs; 1668 struct reloc *r = relocs;
1669 int i;
1680 1670
1681 memset(handle_tlbl, 0, sizeof(handle_tlbl)); 1671 memset(handle_tlbl, 0, sizeof(handle_tlbl));
1682 memset(labels, 0, sizeof(labels)); 1672 memset(labels, 0, sizeof(labels));
@@ -1704,17 +1694,14 @@ static void __init build_r4000_tlb_load_handler(void)
1704 panic("TLB load handler fastpath space exceeded"); 1694 panic("TLB load handler fastpath space exceeded");
1705 1695
1706 resolve_relocs(relocs, labels); 1696 resolve_relocs(relocs, labels);
1707 printk("Synthesized TLB load handler fastpath (%u instructions).\n", 1697 pr_info("Synthesized TLB load handler fastpath (%u instructions).\n",
1708 (unsigned int)(p - handle_tlbl)); 1698 (unsigned int)(p - handle_tlbl));
1709
1710#ifdef DEBUG_TLB
1711 {
1712 int i;
1713 1699
1714 for (i = 0; i < (p - handle_tlbl); i++) 1700 pr_debug("\t.set push\n");
1715 printk("%08x\n", handle_tlbl[i]); 1701 pr_debug("\t.set noreorder\n");
1716 } 1702 for (i = 0; i < (p - handle_tlbl); i++)
1717#endif 1703 pr_debug("\t.word 0x%08x\n", handle_tlbl[i]);
1704 pr_debug("\t.set pop\n");
1718} 1705}
1719 1706
1720static void __init build_r4000_tlb_store_handler(void) 1707static void __init build_r4000_tlb_store_handler(void)
@@ -1722,6 +1709,7 @@ static void __init build_r4000_tlb_store_handler(void)
1722 u32 *p = handle_tlbs; 1709 u32 *p = handle_tlbs;
1723 struct label *l = labels; 1710 struct label *l = labels;
1724 struct reloc *r = relocs; 1711 struct reloc *r = relocs;
1712 int i;
1725 1713
1726 memset(handle_tlbs, 0, sizeof(handle_tlbs)); 1714 memset(handle_tlbs, 0, sizeof(handle_tlbs));
1727 memset(labels, 0, sizeof(labels)); 1715 memset(labels, 0, sizeof(labels));
@@ -1740,17 +1728,14 @@ static void __init build_r4000_tlb_store_handler(void)
1740 panic("TLB store handler fastpath space exceeded"); 1728 panic("TLB store handler fastpath space exceeded");
1741 1729
1742 resolve_relocs(relocs, labels); 1730 resolve_relocs(relocs, labels);
1743 printk("Synthesized TLB store handler fastpath (%u instructions).\n", 1731 pr_info("Synthesized TLB store handler fastpath (%u instructions).\n",
1744 (unsigned int)(p - handle_tlbs)); 1732 (unsigned int)(p - handle_tlbs));
1745
1746#ifdef DEBUG_TLB
1747 {
1748 int i;
1749 1733
1750 for (i = 0; i < (p - handle_tlbs); i++) 1734 pr_debug("\t.set push\n");
1751 printk("%08x\n", handle_tlbs[i]); 1735 pr_debug("\t.set noreorder\n");
1752 } 1736 for (i = 0; i < (p - handle_tlbs); i++)
1753#endif 1737 pr_debug("\t.word 0x%08x\n", handle_tlbs[i]);
1738 pr_debug("\t.set pop\n");
1754} 1739}
1755 1740
1756static void __init build_r4000_tlb_modify_handler(void) 1741static void __init build_r4000_tlb_modify_handler(void)
@@ -1758,6 +1743,7 @@ static void __init build_r4000_tlb_modify_handler(void)
1758 u32 *p = handle_tlbm; 1743 u32 *p = handle_tlbm;
1759 struct label *l = labels; 1744 struct label *l = labels;
1760 struct reloc *r = relocs; 1745 struct reloc *r = relocs;
1746 int i;
1761 1747
1762 memset(handle_tlbm, 0, sizeof(handle_tlbm)); 1748 memset(handle_tlbm, 0, sizeof(handle_tlbm));
1763 memset(labels, 0, sizeof(labels)); 1749 memset(labels, 0, sizeof(labels));
@@ -1777,17 +1763,14 @@ static void __init build_r4000_tlb_modify_handler(void)
1777 panic("TLB modify handler fastpath space exceeded"); 1763 panic("TLB modify handler fastpath space exceeded");
1778 1764
1779 resolve_relocs(relocs, labels); 1765 resolve_relocs(relocs, labels);
1780 printk("Synthesized TLB modify handler fastpath (%u instructions).\n", 1766 pr_info("Synthesized TLB modify handler fastpath (%u instructions).\n",
1781 (unsigned int)(p - handle_tlbm)); 1767 (unsigned int)(p - handle_tlbm));
1782 1768
1783#ifdef DEBUG_TLB 1769 pr_debug("\t.set push\n");
1784 { 1770 pr_debug("\t.set noreorder\n");
1785 int i; 1771 for (i = 0; i < (p - handle_tlbm); i++)
1786 1772 pr_debug("\t.word 0x%08x\n", handle_tlbm[i]);
1787 for (i = 0; i < (p - handle_tlbm); i++) 1773 pr_debug("\t.set pop\n");
1788 printk("%08x\n", handle_tlbm[i]);
1789 }
1790#endif
1791} 1774}
1792 1775
1793void __init build_tlb_refill_handler(void) 1776void __init build_tlb_refill_handler(void)