Lines Matching refs:address
22 static inline void remap_area_pte(pte_t *pte, unsigned long address, in remap_area_pte() argument
31 address &= ~PMD_MASK; in remap_area_pte()
32 end = address + size; in remap_area_pte()
35 if (address >= end) in remap_area_pte()
44 address += PAGE_SIZE; in remap_area_pte()
47 } while (address && (address < end)); in remap_area_pte()
50 static inline int remap_area_pmd(pmd_t *pmd, unsigned long address, in remap_area_pmd() argument
56 address &= ~PGDIR_MASK; in remap_area_pmd()
57 end = address + size; in remap_area_pmd()
60 phys_addr -= address; in remap_area_pmd()
61 if (address >= end) in remap_area_pmd()
64 pte_t *pte = pte_alloc_kernel(pmd, address); in remap_area_pmd()
68 remap_area_pte(pte, address, end - address, address + phys_addr, in remap_area_pmd()
70 address = (address + PMD_SIZE) & PMD_MASK; in remap_area_pmd()
72 } while (address && (address < end)); in remap_area_pmd()
76 static int remap_area_pages(unsigned long address, unsigned long phys_addr, in remap_area_pages() argument
81 unsigned long end = address + size; in remap_area_pages()
83 phys_addr -= address; in remap_area_pages()
84 dir = pgd_offset(&init_mm, address); in remap_area_pages()
86 if (address >= end) in remap_area_pages()
94 p4d = p4d_alloc(&init_mm, dir, address); in remap_area_pages()
97 pud = pud_alloc(&init_mm, p4d, address); in remap_area_pages()
100 pmd = pmd_alloc(&init_mm, pud, address); in remap_area_pages()
103 if (remap_area_pmd(pmd, address, end - address, in remap_area_pages()
104 phys_addr + address, flags)) in remap_area_pages()
107 address = (address + PGDIR_SIZE) & PGDIR_MASK; in remap_area_pages()
109 } while (address && (address < end)); in remap_area_pages()