Lines Matching +full:step +full:- +full:up
2 * arch/sh/mm/tlb-sh5.c
4 * Copyright (C) 2003 Paul Mundt <lethal@linux-sh.org>
18 * sh64_tlb_init - Perform initial setup for the DTLB and ITLB.
23 cpu_data->dtlb.entries = 64; in sh64_tlb_init()
24 cpu_data->dtlb.step = 0x10; in sh64_tlb_init()
26 cpu_data->dtlb.first = DTLB_FIXED | cpu_data->dtlb.step; in sh64_tlb_init()
27 cpu_data->dtlb.next = cpu_data->dtlb.first; in sh64_tlb_init()
29 cpu_data->dtlb.last = DTLB_FIXED | in sh64_tlb_init()
30 ((cpu_data->dtlb.entries - 1) * in sh64_tlb_init()
31 cpu_data->dtlb.step); in sh64_tlb_init()
34 cpu_data->itlb.entries = 64; in sh64_tlb_init()
35 cpu_data->itlb.step = 0x10; in sh64_tlb_init()
37 cpu_data->itlb.first = ITLB_FIXED | cpu_data->itlb.step; in sh64_tlb_init()
38 cpu_data->itlb.next = cpu_data->itlb.first; in sh64_tlb_init()
39 cpu_data->itlb.last = ITLB_FIXED | in sh64_tlb_init()
40 ((cpu_data->itlb.entries - 1) * in sh64_tlb_init()
41 cpu_data->itlb.step); in sh64_tlb_init()
47 * sh64_next_free_dtlb_entry - Find the next available DTLB entry
51 return cpu_data->dtlb.next; in sh64_next_free_dtlb_entry()
55 * sh64_get_wired_dtlb_entry - Allocate a wired (locked-in) entry in the DTLB
61 cpu_data->dtlb.first += cpu_data->dtlb.step; in sh64_get_wired_dtlb_entry()
62 cpu_data->dtlb.next += cpu_data->dtlb.step; in sh64_get_wired_dtlb_entry()
68 * sh64_put_wired_dtlb_entry - Free a wired (locked-in) entry in the DTLB.
93 return -EINVAL; in sh64_put_wired_dtlb_entry()
99 if (entry < (cpu_data->dtlb.first - cpu_data->dtlb.step)) in sh64_put_wired_dtlb_entry()
100 return -EINVAL; in sh64_put_wired_dtlb_entry()
103 cpu_data->dtlb.first -= cpu_data->dtlb.step; in sh64_put_wired_dtlb_entry()
104 cpu_data->dtlb.next = entry; in sh64_put_wired_dtlb_entry()
110 * sh64_setup_tlb_slot - Load up a translation in a wired slot.
117 * Load up a virtual<->physical translation for @eaddr<->@paddr in the
118 * pre-allocated TLB slot @config_addr (see sh64_get_wired_dtlb_entry).
138 * sh64_teardown_tlb_slot - Teardown a translation.
178 entry = dtlb_entries[dtlb_entry--]; in tlb_unwire_entry()
210 tlbp = &cpu_data->itlb; in __update_tlb()
212 tlbp = &cpu_data->dtlb; in __update_tlb()
214 next = tlbp->next; in __update_tlb()
221 if (next > tlbp->last) in __update_tlb()
222 next = tlbp->first; in __update_tlb()
223 tlbp->next = next; in __update_tlb()