Lines Matching refs:table

20 	unsigned long *table;  in crst_table_alloc()  local
24 table = ptdesc_to_virt(ptdesc); in crst_table_alloc()
25 __arch_set_page_dat(table, 1UL << CRST_ALLOC_ORDER); in crst_table_alloc()
26 return table; in crst_table_alloc()
29 void crst_table_free(struct mm_struct *mm, unsigned long *table) in crst_table_free() argument
31 if (!table) in crst_table_free()
33 pagetable_free(virt_to_ptdesc(table)); in crst_table_free()
118 u64 *table; in page_table_alloc_pgste() local
122 table = (u64 *)ptdesc_to_virt(ptdesc); in page_table_alloc_pgste()
123 __arch_set_page_dat(table, 1); in page_table_alloc_pgste()
124 memset64(table, _PAGE_INVALID, PTRS_PER_PTE); in page_table_alloc_pgste()
125 memset64(table + PTRS_PER_PTE, 0, PTRS_PER_PTE); in page_table_alloc_pgste()
140 unsigned long *table; in page_table_alloc() local
149 table = ptdesc_to_virt(ptdesc); in page_table_alloc()
150 __arch_set_page_dat(table, 1); in page_table_alloc()
151 memset64((u64 *)table, _PAGE_INVALID, PTRS_PER_PTE); in page_table_alloc()
152 memset64((u64 *)table + PTRS_PER_PTE, 0, PTRS_PER_PTE); in page_table_alloc()
153 return table; in page_table_alloc()
156 void page_table_free(struct mm_struct *mm, unsigned long *table) in page_table_free() argument
158 struct ptdesc *ptdesc = virt_to_ptdesc(table); in page_table_free()
188 unsigned long *table; in base_pgt_alloc() local
190 table = kmem_cache_alloc(base_pgt_cache, GFP_KERNEL); in base_pgt_alloc()
191 if (table) in base_pgt_alloc()
192 memset64((u64 *)table, _PAGE_INVALID, PTRS_PER_PTE); in base_pgt_alloc()
193 return table; in base_pgt_alloc()
196 static void base_pgt_free(unsigned long *table) in base_pgt_free() argument
198 kmem_cache_free(base_pgt_cache, table); in base_pgt_free()
203 unsigned long *table; in base_crst_alloc() local
209 table = ptdesc_address(ptdesc); in base_crst_alloc()
210 crst_table_init(table, val); in base_crst_alloc()
211 return table; in base_crst_alloc()
214 static void base_crst_free(unsigned long *table) in base_crst_free() argument
216 if (!table) in base_crst_free()
218 pagetable_free(virt_to_ptdesc(table)); in base_crst_free()
265 unsigned long *ste, next, *table; in base_segment_walk() local
275 table = base_pgt_alloc(); in base_segment_walk()
276 if (!table) in base_segment_walk()
278 *ste = __pa(table) | _SEGMENT_ENTRY; in base_segment_walk()
280 table = __va(*ste & _SEGMENT_ENTRY_ORIGIN); in base_segment_walk()
281 rc = base_page_walk(table, addr, next, alloc); in base_segment_walk()
285 base_pgt_free(table); in base_segment_walk()
294 unsigned long *rtte, next, *table; in base_region3_walk() local
304 table = base_crst_alloc(_SEGMENT_ENTRY_EMPTY); in base_region3_walk()
305 if (!table) in base_region3_walk()
307 *rtte = __pa(table) | _REGION3_ENTRY; in base_region3_walk()
309 table = __va(*rtte & _REGION_ENTRY_ORIGIN); in base_region3_walk()
310 rc = base_segment_walk(table, addr, next, alloc); in base_region3_walk()
314 base_crst_free(table); in base_region3_walk()
322 unsigned long *rste, next, *table; in base_region2_walk() local
332 table = base_crst_alloc(_REGION3_ENTRY_EMPTY); in base_region2_walk()
333 if (!table) in base_region2_walk()
335 *rste = __pa(table) | _REGION2_ENTRY; in base_region2_walk()
337 table = __va(*rste & _REGION_ENTRY_ORIGIN); in base_region2_walk()
338 rc = base_region3_walk(table, addr, next, alloc); in base_region2_walk()
342 base_crst_free(table); in base_region2_walk()
350 unsigned long *rfte, next, *table; in base_region1_walk() local
360 table = base_crst_alloc(_REGION2_ENTRY_EMPTY); in base_region1_walk()
361 if (!table) in base_region1_walk()
363 *rfte = __pa(table) | _REGION1_ENTRY; in base_region1_walk()
365 table = __va(*rfte & _REGION_ENTRY_ORIGIN); in base_region1_walk()
366 rc = base_region2_walk(table, addr, next, alloc); in base_region1_walk()
370 base_crst_free(table); in base_region1_walk()
384 unsigned long *table = __va(asce & _ASCE_ORIGIN); in base_asce_free() local
390 base_segment_walk(table, 0, _REGION3_SIZE, 0); in base_asce_free()
393 base_region3_walk(table, 0, _REGION2_SIZE, 0); in base_asce_free()
396 base_region2_walk(table, 0, _REGION1_SIZE, 0); in base_asce_free()
399 base_region1_walk(table, 0, TASK_SIZE_MAX, 0); in base_asce_free()
402 base_crst_free(table); in base_asce_free()
436 unsigned long asce, *table, end; in base_asce_alloc() local
443 table = base_crst_alloc(_SEGMENT_ENTRY_EMPTY); in base_asce_alloc()
444 if (!table) in base_asce_alloc()
446 rc = base_segment_walk(table, addr, end, 1); in base_asce_alloc()
447 asce = __pa(table) | _ASCE_TYPE_SEGMENT | _ASCE_TABLE_LENGTH; in base_asce_alloc()
449 table = base_crst_alloc(_REGION3_ENTRY_EMPTY); in base_asce_alloc()
450 if (!table) in base_asce_alloc()
452 rc = base_region3_walk(table, addr, end, 1); in base_asce_alloc()
453 asce = __pa(table) | _ASCE_TYPE_REGION3 | _ASCE_TABLE_LENGTH; in base_asce_alloc()
455 table = base_crst_alloc(_REGION2_ENTRY_EMPTY); in base_asce_alloc()
456 if (!table) in base_asce_alloc()
458 rc = base_region2_walk(table, addr, end, 1); in base_asce_alloc()
459 asce = __pa(table) | _ASCE_TYPE_REGION2 | _ASCE_TABLE_LENGTH; in base_asce_alloc()
461 table = base_crst_alloc(_REGION1_ENTRY_EMPTY); in base_asce_alloc()
462 if (!table) in base_asce_alloc()
464 rc = base_region1_walk(table, addr, end, 1); in base_asce_alloc()
465 asce = __pa(table) | _ASCE_TYPE_REGION1 | _ASCE_TABLE_LENGTH; in base_asce_alloc()