Haavard Skinnemoen writes:

> This patch moves the i386 implementation of ioremap_page_range() into
> lib/ioremap.c for use by other architectures.

[snip]

> +static int ioremap_pte_range(pmd_t *pmd, unsigned long addr,
> +             unsigned long end, unsigned long phys_addr, pgprot_t prot)
> +{
> +     pte_t *pte;
> +     unsigned long pfn;
> +
> +     pfn = phys_addr >> PAGE_SHIFT;
> +     pte = pte_alloc_kernel(pmd, addr);
> +     if (!pte)
> +             return -ENOMEM;
> +     do {
> +             BUG_ON(!pte_none(*pte));
> +             set_pte(pte, pfn_pte(pfn, prot));

This would need to be set_pte_at(...) for this to be useful on
PowerPC.

Paul.
-
To unsubscribe from this list: send the line "unsubscribe linux-arch" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to