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()
121 unsigned long *table; in page_table_alloc_noprof() local
132 table = ptdesc_address(ptdesc); in page_table_alloc_noprof()
133 __arch_set_page_dat(table, 1); in page_table_alloc_noprof()
134 memset64((u64 *)table, _PAGE_INVALID, PTRS_PER_PTE); in page_table_alloc_noprof()
135 memset64((u64 *)table + PTRS_PER_PTE, 0, PTRS_PER_PTE); in page_table_alloc_noprof()
136 return table; in page_table_alloc_noprof()
139 void page_table_free(struct mm_struct *mm, unsigned long *table) in page_table_free() argument
141 struct ptdesc *ptdesc = virt_to_ptdesc(table); in page_table_free()
173 unsigned long *table; in base_pgt_alloc() local
175 table = kmem_cache_alloc(base_pgt_cache, GFP_KERNEL); in base_pgt_alloc()
176 if (table) in base_pgt_alloc()
177 memset64((u64 *)table, _PAGE_INVALID, PTRS_PER_PTE); in base_pgt_alloc()
178 return table; in base_pgt_alloc()
181 static void base_pgt_free(unsigned long *table) in base_pgt_free() argument
183 kmem_cache_free(base_pgt_cache, table); in base_pgt_free()
188 unsigned long *table; in base_crst_alloc() local
194 table = ptdesc_address(ptdesc); in base_crst_alloc()
195 crst_table_init(table, val); in base_crst_alloc()
196 return table; in base_crst_alloc()
199 static void base_crst_free(unsigned long *table) in base_crst_free() argument
201 if (!table) in base_crst_free()
203 pagetable_free(virt_to_ptdesc(table)); in base_crst_free()
250 unsigned long *ste, next, *table; in base_segment_walk() local
260 table = base_pgt_alloc(); in base_segment_walk()
261 if (!table) in base_segment_walk()
263 *ste = __pa(table) | _SEGMENT_ENTRY; in base_segment_walk()
265 table = __va(*ste & _SEGMENT_ENTRY_ORIGIN); in base_segment_walk()
266 rc = base_page_walk(table, addr, next, alloc); in base_segment_walk()
270 base_pgt_free(table); in base_segment_walk()
279 unsigned long *rtte, next, *table; in base_region3_walk() local
289 table = base_crst_alloc(_SEGMENT_ENTRY_EMPTY); in base_region3_walk()
290 if (!table) in base_region3_walk()
292 *rtte = __pa(table) | _REGION3_ENTRY; in base_region3_walk()
294 table = __va(*rtte & _REGION_ENTRY_ORIGIN); in base_region3_walk()
295 rc = base_segment_walk(table, addr, next, alloc); in base_region3_walk()
299 base_crst_free(table); in base_region3_walk()
307 unsigned long *rste, next, *table; in base_region2_walk() local
317 table = base_crst_alloc(_REGION3_ENTRY_EMPTY); in base_region2_walk()
318 if (!table) in base_region2_walk()
320 *rste = __pa(table) | _REGION2_ENTRY; in base_region2_walk()
322 table = __va(*rste & _REGION_ENTRY_ORIGIN); in base_region2_walk()
323 rc = base_region3_walk(table, addr, next, alloc); in base_region2_walk()
327 base_crst_free(table); in base_region2_walk()
335 unsigned long *rfte, next, *table; in base_region1_walk() local
345 table = base_crst_alloc(_REGION2_ENTRY_EMPTY); in base_region1_walk()
346 if (!table) in base_region1_walk()
348 *rfte = __pa(table) | _REGION1_ENTRY; in base_region1_walk()
350 table = __va(*rfte & _REGION_ENTRY_ORIGIN); in base_region1_walk()
351 rc = base_region2_walk(table, addr, next, alloc); in base_region1_walk()
355 base_crst_free(table); in base_region1_walk()
369 unsigned long *table = __va(asce & _ASCE_ORIGIN); in base_asce_free() local
375 base_segment_walk(table, 0, _REGION3_SIZE, 0); in base_asce_free()
378 base_region3_walk(table, 0, _REGION2_SIZE, 0); in base_asce_free()
381 base_region2_walk(table, 0, _REGION1_SIZE, 0); in base_asce_free()
384 base_region1_walk(table, 0, TASK_SIZE_MAX, 0); in base_asce_free()
387 base_crst_free(table); in base_asce_free()
421 unsigned long asce, *table, end; in base_asce_alloc() local
428 table = base_crst_alloc(_SEGMENT_ENTRY_EMPTY); in base_asce_alloc()
429 if (!table) in base_asce_alloc()
431 rc = base_segment_walk(table, addr, end, 1); in base_asce_alloc()
432 asce = __pa(table) | _ASCE_TYPE_SEGMENT | _ASCE_TABLE_LENGTH; in base_asce_alloc()
434 table = base_crst_alloc(_REGION3_ENTRY_EMPTY); in base_asce_alloc()
435 if (!table) in base_asce_alloc()
437 rc = base_region3_walk(table, addr, end, 1); in base_asce_alloc()
438 asce = __pa(table) | _ASCE_TYPE_REGION3 | _ASCE_TABLE_LENGTH; in base_asce_alloc()
440 table = base_crst_alloc(_REGION2_ENTRY_EMPTY); in base_asce_alloc()
441 if (!table) in base_asce_alloc()
443 rc = base_region2_walk(table, addr, end, 1); in base_asce_alloc()
444 asce = __pa(table) | _ASCE_TYPE_REGION2 | _ASCE_TABLE_LENGTH; in base_asce_alloc()
446 table = base_crst_alloc(_REGION1_ENTRY_EMPTY); in base_asce_alloc()
447 if (!table) in base_asce_alloc()
449 rc = base_region1_walk(table, addr, end, 1); in base_asce_alloc()
450 asce = __pa(table) | _ASCE_TYPE_REGION1 | _ASCE_TABLE_LENGTH; in base_asce_alloc()