Lines Matching full:fast
97 static inline size_t tlb_n_entries(CPUTLBDescFast *fast) in tlb_n_entries() argument
99 return (fast->mask >> CPU_TLB_ENTRY_BITS) + 1; in tlb_n_entries()
102 static inline size_t sizeof_tlb(CPUTLBDescFast *fast) in sizeof_tlb() argument
104 return fast->mask + (1 << CPU_TLB_ENTRY_BITS); in sizeof_tlb()
169 * @fast: The CPUTLBDescFast portion of the same TLB
206 static void tlb_mmu_resize_locked(CPUTLBDesc *desc, CPUTLBDescFast *fast, in tlb_mmu_resize_locked() argument
209 size_t old_size = tlb_n_entries(fast); in tlb_mmu_resize_locked()
250 g_free(fast->table); in tlb_mmu_resize_locked()
255 fast->mask = (new_size - 1) << CPU_TLB_ENTRY_BITS; in tlb_mmu_resize_locked()
256 fast->table = g_try_new(CPUTLBEntry, new_size); in tlb_mmu_resize_locked()
266 while (fast->table == NULL || desc->fulltlb == NULL) { in tlb_mmu_resize_locked()
272 fast->mask = (new_size - 1) << CPU_TLB_ENTRY_BITS; in tlb_mmu_resize_locked()
274 g_free(fast->table); in tlb_mmu_resize_locked()
276 fast->table = g_try_new(CPUTLBEntry, new_size); in tlb_mmu_resize_locked()
281 static void tlb_mmu_flush_locked(CPUTLBDesc *desc, CPUTLBDescFast *fast) in tlb_mmu_flush_locked() argument
287 memset(fast->table, -1, sizeof_tlb(fast)); in tlb_mmu_flush_locked()
295 CPUTLBDescFast *fast = &cpu->neg.tlb.f[mmu_idx]; in tlb_flush_one_mmuidx_locked() local
297 tlb_mmu_resize_locked(desc, fast, now); in tlb_flush_one_mmuidx_locked()
298 tlb_mmu_flush_locked(desc, fast); in tlb_flush_one_mmuidx_locked()
301 static void tlb_mmu_init(CPUTLBDesc *desc, CPUTLBDescFast *fast, int64_t now) in tlb_mmu_init() argument
307 fast->mask = (n_entries - 1) << CPU_TLB_ENTRY_BITS; in tlb_mmu_init()
308 fast->table = g_new(CPUTLBEntry, n_entries); in tlb_mmu_init()
310 tlb_mmu_flush_locked(desc, fast); in tlb_mmu_init()
345 CPUTLBDescFast *fast = &cpu->neg.tlb.f[i]; in tlb_destroy() local
347 g_free(fast->table); in tlb_destroy()
926 CPUTLBDescFast *fast = &cpu->neg.tlb.f[mmu_idx]; in tlb_reset_dirty() local
927 unsigned int n = tlb_n_entries(fast); in tlb_reset_dirty()
931 tlb_reset_dirty_range_locked(&desc->fulltlb[i], &fast->table[i], in tlb_reset_dirty()