Lines Matching full:table

3  *  Page table allocation functions
21 unsigned long *table; in crst_table_alloc_noprof() local
28 table = ptdesc_address(ptdesc); in crst_table_alloc_noprof()
29 __arch_set_page_dat(table, 1UL << CRST_ALLOC_ORDER); in crst_table_alloc_noprof()
30 return table; in crst_table_alloc_noprof()
33 void crst_table_free(struct mm_struct *mm, unsigned long *table) in crst_table_free() argument
35 if (!table) in crst_table_free()
37 pagetable_free(virt_to_ptdesc(table)); in crst_table_free()
122 u64 *table; in page_table_alloc_pgste_noprof() local
126 table = (u64 *)ptdesc_address(ptdesc); in page_table_alloc_pgste_noprof()
127 __arch_set_page_dat(table, 1); in page_table_alloc_pgste_noprof()
128 memset64(table, _PAGE_INVALID, PTRS_PER_PTE); in page_table_alloc_pgste_noprof()
129 memset64(table + PTRS_PER_PTE, 0, PTRS_PER_PTE); in page_table_alloc_pgste_noprof()
145 unsigned long *table; in page_table_alloc_noprof() local
156 table = ptdesc_address(ptdesc); in page_table_alloc_noprof()
157 __arch_set_page_dat(table, 1); in page_table_alloc_noprof()
158 memset64((u64 *)table, _PAGE_INVALID, PTRS_PER_PTE); in page_table_alloc_noprof()
159 memset64((u64 *)table + PTRS_PER_PTE, 0, PTRS_PER_PTE); in page_table_alloc_noprof()
160 return table; in page_table_alloc_noprof()
163 void page_table_free(struct mm_struct *mm, unsigned long *table) in page_table_free() argument
165 struct ptdesc *ptdesc = virt_to_ptdesc(table); in page_table_free()
195 unsigned long *table; in base_pgt_alloc() local
197 table = kmem_cache_alloc(base_pgt_cache, GFP_KERNEL); in base_pgt_alloc()
198 if (table) in base_pgt_alloc()
199 memset64((u64 *)table, _PAGE_INVALID, PTRS_PER_PTE); in base_pgt_alloc()
200 return table; in base_pgt_alloc()
203 static void base_pgt_free(unsigned long *table) in base_pgt_free() argument
205 kmem_cache_free(base_pgt_cache, table); in base_pgt_free()
210 unsigned long *table; in base_crst_alloc() local
216 table = ptdesc_address(ptdesc); in base_crst_alloc()
217 crst_table_init(table, val); in base_crst_alloc()
218 return table; in base_crst_alloc()
221 static void base_crst_free(unsigned long *table) in base_crst_free() argument
223 if (!table) in base_crst_free()
225 pagetable_free(virt_to_ptdesc(table)); in base_crst_free()
272 unsigned long *ste, next, *table; in base_segment_walk() local
282 table = base_pgt_alloc(); in base_segment_walk()
283 if (!table) in base_segment_walk()
285 *ste = __pa(table) | _SEGMENT_ENTRY; in base_segment_walk()
287 table = __va(*ste & _SEGMENT_ENTRY_ORIGIN); in base_segment_walk()
288 rc = base_page_walk(table, addr, next, alloc); in base_segment_walk()
292 base_pgt_free(table); in base_segment_walk()
301 unsigned long *rtte, next, *table; in base_region3_walk() local
311 table = base_crst_alloc(_SEGMENT_ENTRY_EMPTY); in base_region3_walk()
312 if (!table) in base_region3_walk()
314 *rtte = __pa(table) | _REGION3_ENTRY; in base_region3_walk()
316 table = __va(*rtte & _REGION_ENTRY_ORIGIN); in base_region3_walk()
317 rc = base_segment_walk(table, addr, next, alloc); in base_region3_walk()
321 base_crst_free(table); in base_region3_walk()
329 unsigned long *rste, next, *table; in base_region2_walk() local
339 table = base_crst_alloc(_REGION3_ENTRY_EMPTY); in base_region2_walk()
340 if (!table) in base_region2_walk()
342 *rste = __pa(table) | _REGION2_ENTRY; in base_region2_walk()
344 table = __va(*rste & _REGION_ENTRY_ORIGIN); in base_region2_walk()
345 rc = base_region3_walk(table, addr, next, alloc); in base_region2_walk()
349 base_crst_free(table); in base_region2_walk()
357 unsigned long *rfte, next, *table; in base_region1_walk() local
367 table = base_crst_alloc(_REGION2_ENTRY_EMPTY); in base_region1_walk()
368 if (!table) in base_region1_walk()
370 *rfte = __pa(table) | _REGION1_ENTRY; in base_region1_walk()
372 table = __va(*rfte & _REGION_ENTRY_ORIGIN); in base_region1_walk()
373 rc = base_region2_walk(table, addr, next, alloc); in base_region1_walk()
377 base_crst_free(table); in base_region1_walk()
391 unsigned long *table = __va(asce & _ASCE_ORIGIN); in base_asce_free() local
397 base_segment_walk(table, 0, _REGION3_SIZE, 0); in base_asce_free()
400 base_region3_walk(table, 0, _REGION2_SIZE, 0); in base_asce_free()
403 base_region2_walk(table, 0, _REGION1_SIZE, 0); in base_asce_free()
406 base_region1_walk(table, 0, TASK_SIZE_MAX, 0); in base_asce_free()
409 base_crst_free(table); in base_asce_free()
443 unsigned long asce, *table, end; in base_asce_alloc() local
450 table = base_crst_alloc(_SEGMENT_ENTRY_EMPTY); in base_asce_alloc()
451 if (!table) in base_asce_alloc()
453 rc = base_segment_walk(table, addr, end, 1); in base_asce_alloc()
454 asce = __pa(table) | _ASCE_TYPE_SEGMENT | _ASCE_TABLE_LENGTH; in base_asce_alloc()
456 table = base_crst_alloc(_REGION3_ENTRY_EMPTY); in base_asce_alloc()
457 if (!table) in base_asce_alloc()
459 rc = base_region3_walk(table, addr, end, 1); in base_asce_alloc()
460 asce = __pa(table) | _ASCE_TYPE_REGION3 | _ASCE_TABLE_LENGTH; in base_asce_alloc()
462 table = base_crst_alloc(_REGION2_ENTRY_EMPTY); in base_asce_alloc()
463 if (!table) in base_asce_alloc()
465 rc = base_region2_walk(table, addr, end, 1); in base_asce_alloc()
466 asce = __pa(table) | _ASCE_TYPE_REGION2 | _ASCE_TABLE_LENGTH; in base_asce_alloc()
468 table = base_crst_alloc(_REGION1_ENTRY_EMPTY); in base_asce_alloc()
469 if (!table) in base_asce_alloc()
471 rc = base_region1_walk(table, addr, end, 1); in base_asce_alloc()
472 asce = __pa(table) | _ASCE_TYPE_REGION1 | _ASCE_TABLE_LENGTH; in base_asce_alloc()