aboutsummaryrefslogtreecommitdiffstats
path: root/arch/mips/mm
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>2012-01-11 09:37:16 -0500
committerRalf Baechle <ralf@linux-mips.org>2012-01-11 09:37:16 -0500
commitd7a887a73dec6c387b02a966a71aac767bbd9ce6 (patch)
treef32a5f2151b9fe4de1491b601db2e3587d3d52c0 /arch/mips/mm
parentc539ef7d355219c7b0e16cc302bf179fcad936b3 (diff)
MIPS: Delete unused function add_temporary_entry.
Only available for R4000 style TLBs anyway and proper ordering of initialization code made this crude interface unncecessary. Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'arch/mips/mm')
-rw-r--r--arch/mips/mm/tlb-r4k.c47
1 files changed, 0 insertions, 47 deletions
diff --git a/arch/mips/mm/tlb-r4k.c b/arch/mips/mm/tlb-r4k.c
index 88dc49cfa163..74d67c885743 100644
--- a/arch/mips/mm/tlb-r4k.c
+++ b/arch/mips/mm/tlb-r4k.c
@@ -376,51 +376,6 @@ void add_wired_entry(unsigned long entrylo0, unsigned long entrylo1,
376 EXIT_CRITICAL(flags); 376 EXIT_CRITICAL(flags);
377} 377}
378 378
379/*
380 * Used for loading TLB entries before trap_init() has started, when we
381 * don't actually want to add a wired entry which remains throughout the
382 * lifetime of the system
383 */
384
385static int temp_tlb_entry __cpuinitdata;
386
387__init int add_temporary_entry(unsigned long entrylo0, unsigned long entrylo1,
388 unsigned long entryhi, unsigned long pagemask)
389{
390 int ret = 0;
391 unsigned long flags;
392 unsigned long wired;
393 unsigned long old_pagemask;
394 unsigned long old_ctx;
395
396 ENTER_CRITICAL(flags);
397 /* Save old context and create impossible VPN2 value */
398 old_ctx = read_c0_entryhi();
399 old_pagemask = read_c0_pagemask();
400 wired = read_c0_wired();
401 if (--temp_tlb_entry < wired) {
402 printk(KERN_WARNING
403 "No TLB space left for add_temporary_entry\n");
404 ret = -ENOSPC;
405 goto out;
406 }
407
408 write_c0_index(temp_tlb_entry);
409 write_c0_pagemask(pagemask);
410 write_c0_entryhi(entryhi);
411 write_c0_entrylo0(entrylo0);
412 write_c0_entrylo1(entrylo1);
413 mtc0_tlbw_hazard();
414 tlb_write_indexed();
415 tlbw_use_hazard();
416
417 write_c0_entryhi(old_ctx);
418 write_c0_pagemask(old_pagemask);
419out:
420 EXIT_CRITICAL(flags);
421 return ret;
422}
423
424static int __cpuinitdata ntlb; 379static int __cpuinitdata ntlb;
425static int __init set_ntlb(char *str) 380static int __init set_ntlb(char *str)
426{ 381{
@@ -458,8 +413,6 @@ void __cpuinit tlb_init(void)
458 write_c0_pagegrain(pg); 413 write_c0_pagegrain(pg);
459 } 414 }
460 415
461 temp_tlb_entry = current_cpu_data.tlbsize - 1;
462
463 /* From this point on the ARC firmware is dead. */ 416 /* From this point on the ARC firmware is dead. */
464 local_flush_tlb_all(); 417 local_flush_tlb_all();
465 418