*参照元 [#u31c4775] #backlinks *説明 [#af5dbeac] -パス: [[linux-4.4.1/lib/ioremap.c]] -FIXME: これは何? --説明 **引数 [#m86f43c8] -pgd_t *pgd -- --[[linux-4.4.1/pgd_t]] -unsigned long addr -- -unsigned long end -- -phys_addr_t phys_addr -- --[[linux-4.4.1/phys_addr_t]] -pgprot_t prot -- --[[linux-4.4.1/pgprot_t]] **返り値 [#xbad4430] -int -- **参考 [#ue483e50] *実装 [#gb521e01] static inline int ioremap_pud_range(pgd_t *pgd, unsigned long addr, unsigned long end, phys_addr_t phys_addr, pgprot_t prot) { pud_t *pud; unsigned long next; - --[[linux-4.4.1/pud_t]] phys_addr -= addr; pud = pud_alloc(&init_mm, pgd, addr); if (!pud) return -ENOMEM; - --[[linux-4.4.1/pud_alloc()]] --[[linux-4.4.1/init_mm(global)]] do { next = pud_addr_end(addr, end); - --[[linux-4.4.1/pud_addr_end()]] if (ioremap_pud_enabled() && ((next - addr) == PUD_SIZE) && IS_ALIGNED(phys_addr + addr, PUD_SIZE)) { - --[[linux-4.4.1/ioremap_pud_enabled()]] --[[linux-4.4.1/IS_ALIGNED()]] if (pud_set_huge(pud, phys_addr + addr, prot)) continue; - --[[linux-4.4.1/pud_set_huge()]] } if (ioremap_pmd_range(pud, addr, next, phys_addr + addr, prot)) return -ENOMEM; - --[[linux-4.4.1/ioremap_pmd_range()]] } while (pud++, addr = next, addr != end); return 0; } *コメント [#yc5fbd75]