aboutsummaryrefslogtreecommitdiffstats
path: root/arch/mips/mm/tlbex.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/mips/mm/tlbex.c')
-rw-r--r--arch/mips/mm/tlbex.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/arch/mips/mm/tlbex.c b/arch/mips/mm/tlbex.c
index e7149290d1c..4ec0964b839 100644
--- a/arch/mips/mm/tlbex.c
+++ b/arch/mips/mm/tlbex.c
@@ -893,6 +893,7 @@ static __init void build_tlb_write_entry(u32 **p, struct label **l,
893 case CPU_4KSC: 893 case CPU_4KSC:
894 case CPU_20KC: 894 case CPU_20KC:
895 case CPU_25KF: 895 case CPU_25KF:
896 case CPU_LOONGSON2:
896 tlbw(p); 897 tlbw(p);
897 break; 898 break;
898 899
@@ -1276,7 +1277,8 @@ static void __init build_r4000_tlb_refill_handler(void)
1276 * need three, with the second nop'ed and the third being 1277 * need three, with the second nop'ed and the third being
1277 * unused. 1278 * unused.
1278 */ 1279 */
1279#ifdef CONFIG_32BIT 1280 /* Loongson2 ebase is different than r4k, we have more space */
1281#if defined(CONFIG_32BIT) || defined(CONFIG_CPU_LOONGSON2)
1280 if ((p - tlb_handler) > 64) 1282 if ((p - tlb_handler) > 64)
1281 panic("TLB refill handler space exceeded"); 1283 panic("TLB refill handler space exceeded");
1282#else 1284#else
@@ -1289,7 +1291,7 @@ static void __init build_r4000_tlb_refill_handler(void)
1289 /* 1291 /*
1290 * Now fold the handler in the TLB refill handler space. 1292 * Now fold the handler in the TLB refill handler space.
1291 */ 1293 */
1292#ifdef CONFIG_32BIT 1294#if defined(CONFIG_32BIT) || defined(CONFIG_CPU_LOONGSON2)
1293 f = final_handler; 1295 f = final_handler;
1294 /* Simplest case, just copy the handler. */ 1296 /* Simplest case, just copy the handler. */
1295 copy_handler(relocs, labels, tlb_handler, p, f); 1297 copy_handler(relocs, labels, tlb_handler, p, f);
@@ -1336,7 +1338,7 @@ static void __init build_r4000_tlb_refill_handler(void)
1336 final_len); 1338 final_len);
1337 1339
1338 f = final_handler; 1340 f = final_handler;
1339#ifdef CONFIG_64BIT 1341#if defined(CONFIG_64BIT) && !defined(CONFIG_CPU_LOONGSON2)
1340 if (final_len > 32) 1342 if (final_len > 32)
1341 final_len = 64; 1343 final_len = 64;
1342 else 1344 else