• Home
  • Raw
  • Download

Lines Matching refs:addr

61 static int ioremap_pte_range(pmd_t *pmd, unsigned long addr,  in ioremap_pte_range()  argument
68 pte = pte_alloc_kernel(pmd, addr); in ioremap_pte_range()
73 set_pte_at(&init_mm, addr, pte, pfn_pte(pfn, prot)); in ioremap_pte_range()
75 } while (pte++, addr += PAGE_SIZE, addr != end); in ioremap_pte_range()
79 static inline int ioremap_pmd_range(pud_t *pud, unsigned long addr, in ioremap_pmd_range() argument
85 phys_addr -= addr; in ioremap_pmd_range()
86 pmd = pmd_alloc(&init_mm, pud, addr); in ioremap_pmd_range()
90 next = pmd_addr_end(addr, end); in ioremap_pmd_range()
93 ((next - addr) == PMD_SIZE) && in ioremap_pmd_range()
94 IS_ALIGNED(phys_addr + addr, PMD_SIZE) && in ioremap_pmd_range()
95 pmd_free_pte_page(pmd, addr)) { in ioremap_pmd_range()
96 if (pmd_set_huge(pmd, phys_addr + addr, prot)) in ioremap_pmd_range()
100 if (ioremap_pte_range(pmd, addr, next, phys_addr + addr, prot)) in ioremap_pmd_range()
102 } while (pmd++, addr = next, addr != end); in ioremap_pmd_range()
106 static inline int ioremap_pud_range(p4d_t *p4d, unsigned long addr, in ioremap_pud_range() argument
112 phys_addr -= addr; in ioremap_pud_range()
113 pud = pud_alloc(&init_mm, p4d, addr); in ioremap_pud_range()
117 next = pud_addr_end(addr, end); in ioremap_pud_range()
120 ((next - addr) == PUD_SIZE) && in ioremap_pud_range()
121 IS_ALIGNED(phys_addr + addr, PUD_SIZE) && in ioremap_pud_range()
122 pud_free_pmd_page(pud, addr)) { in ioremap_pud_range()
123 if (pud_set_huge(pud, phys_addr + addr, prot)) in ioremap_pud_range()
127 if (ioremap_pmd_range(pud, addr, next, phys_addr + addr, prot)) in ioremap_pud_range()
129 } while (pud++, addr = next, addr != end); in ioremap_pud_range()
133 static inline int ioremap_p4d_range(pgd_t *pgd, unsigned long addr, in ioremap_p4d_range() argument
139 phys_addr -= addr; in ioremap_p4d_range()
140 p4d = p4d_alloc(&init_mm, pgd, addr); in ioremap_p4d_range()
144 next = p4d_addr_end(addr, end); in ioremap_p4d_range()
147 ((next - addr) == P4D_SIZE) && in ioremap_p4d_range()
148 IS_ALIGNED(phys_addr + addr, P4D_SIZE)) { in ioremap_p4d_range()
149 if (p4d_set_huge(p4d, phys_addr + addr, prot)) in ioremap_p4d_range()
153 if (ioremap_pud_range(p4d, addr, next, phys_addr + addr, prot)) in ioremap_p4d_range()
155 } while (p4d++, addr = next, addr != end); in ioremap_p4d_range()
159 int ioremap_page_range(unsigned long addr, in ioremap_page_range() argument
168 BUG_ON(addr >= end); in ioremap_page_range()
170 start = addr; in ioremap_page_range()
171 phys_addr -= addr; in ioremap_page_range()
172 pgd = pgd_offset_k(addr); in ioremap_page_range()
174 next = pgd_addr_end(addr, end); in ioremap_page_range()
175 err = ioremap_p4d_range(pgd, addr, next, phys_addr+addr, prot); in ioremap_page_range()
178 } while (pgd++, addr = next, addr != end); in ioremap_page_range()