Lines Matching full:addr

92 static void __ref zero_pte_populate(pmd_t *pmd, unsigned long addr,
95 pte_t *pte = pte_offset_kernel(pmd, addr);
102 while (addr + PAGE_SIZE <= end) {
103 set_pte_at(&init_mm, addr, pte, zero_pte);
104 addr += PAGE_SIZE;
105 pte = pte_offset_kernel(pmd, addr);
109 static int __ref zero_pmd_populate(pud_t *pud, unsigned long addr,
112 pmd_t *pmd = pmd_offset(pud, addr);
116 next = pmd_addr_end(addr, end);
118 if (IS_ALIGNED(addr, PMD_SIZE) && end - addr >= PMD_SIZE) {
138 zero_pte_populate(pmd, addr, next);
139 } while (pmd++, addr = next, addr != end);
144 static int __ref zero_pud_populate(p4d_t *p4d, unsigned long addr,
147 pud_t *pud = pud_offset(p4d, addr);
151 next = pud_addr_end(addr, end);
152 if (IS_ALIGNED(addr, PUD_SIZE) && end - addr >= PUD_SIZE) {
157 pmd = pmd_offset(pud, addr);
167 p = pmd_alloc(&init_mm, pud, addr);
176 zero_pmd_populate(pud, addr, next);
177 } while (pud++, addr = next, addr != end);
182 static int __ref zero_p4d_populate(pgd_t *pgd, unsigned long addr,
185 p4d_t *p4d = p4d_offset(pgd, addr);
189 next = p4d_addr_end(addr, end);
190 if (IS_ALIGNED(addr, P4D_SIZE) && end - addr >= P4D_SIZE) {
196 pud = pud_offset(p4d, addr);
199 pmd = pmd_offset(pud, addr);
209 p = pud_alloc(&init_mm, p4d, addr);
218 zero_pud_populate(p4d, addr, next);
219 } while (p4d++, addr = next, addr != end);
233 unsigned long addr = (unsigned long)shadow_start;
235 pgd_t *pgd = pgd_offset_k(addr);
239 next = pgd_addr_end(addr, end);
241 if (IS_ALIGNED(addr, PGDIR_SIZE) && end - addr >= PGDIR_SIZE) {
256 p4d = p4d_offset(pgd, addr);
259 pud = pud_offset(p4d, addr);
262 pmd = pmd_offset(pud, addr);
272 p = p4d_alloc(&init_mm, pgd, addr);
280 zero_p4d_populate(pgd, addr, next);
281 } while (pgd++, addr = next, addr != end);
346 static void kasan_remove_pte_table(pte_t *pte, unsigned long addr,
352 for (; addr < end; addr = next, pte++) {
353 next = (addr + PAGE_SIZE) & PAGE_MASK;
364 pte_clear(&init_mm, addr, pte);
368 static void kasan_remove_pmd_table(pmd_t *pmd, unsigned long addr,
373 for (; addr < end; addr = next, pmd++) {
376 next = pmd_addr_end(addr, end);
382 if (IS_ALIGNED(addr, PMD_SIZE) &&
388 pte = pte_offset_kernel(pmd, addr);
389 kasan_remove_pte_table(pte, addr, next);
394 static void kasan_remove_pud_table(pud_t *pud, unsigned long addr,
399 for (; addr < end; addr = next, pud++) {
402 next = pud_addr_end(addr, end);
408 if (IS_ALIGNED(addr, PUD_SIZE) &&
414 pmd = pmd_offset(pud, addr);
416 kasan_remove_pmd_table(pmd, addr, next);
421 static void kasan_remove_p4d_table(p4d_t *p4d, unsigned long addr,
426 for (; addr < end; addr = next, p4d++) {
429 next = p4d_addr_end(addr, end);
435 if (IS_ALIGNED(addr, P4D_SIZE) &&
441 pud = pud_offset(p4d, addr);
442 kasan_remove_pud_table(pud, addr, next);
449 unsigned long addr, end, next;
452 addr = (unsigned long)kasan_mem_to_shadow(start);
453 end = addr + (size >> KASAN_SHADOW_SCALE_SHIFT);
459 for (; addr < end; addr = next) {
462 next = pgd_addr_end(addr, end);
464 pgd = pgd_offset_k(addr);
469 if (IS_ALIGNED(addr, PGDIR_SIZE) &&
476 p4d = p4d_offset(pgd, addr);
477 kasan_remove_p4d_table(p4d, addr, next);