Re: [PATCH 1/4] io_remap_pfn_range: add for all arch-es

Paul Mackerras
2005-03-18T22:55:49Z

Randy.Dunlap writes:

> diff -Naurp -X /home/rddunlap/doc/dontdiff-osdl linux-2611-bk3-pv/include/asm-ppc/pgtable.h linux-2611-bk3-pfn/include/asm-ppc/pgtable.h
> --- linux-2611-bk3-pv/include/asm-ppc/pgtable.h 2005-03-07 11:02:18.000000000 -0800
> +++ linux-2611-bk3-pfn/include/asm-ppc/pgtable.h 2005-03-07 11:04:59.000000000 -0800
> @@ -735,11 +735,27 @@ static inline int io_remap_page_range(st
> phys_addr_t paddr64 = fixup_bigphys_addr(paddr, size);
> return remap_pfn_range(vma, vaddr, paddr64 >> PAGE_SHIFT, size, prot);
> }
> +
> +static inline int io_remap_pfn_range(struct vm_area_struct *vma,
> + unsigned long vaddr,
> + unsigned long pfn,
> + unsigned long size,
> + pgprot_t prot)
> +{
> + phys_addr_t paddr64 = fixup_bigphys_addr(pfn << PAGE_SHIFT, size);
> + return remap_pfn_range(vma, vaddr, pfn, size, prot);

Just by inspection, this looks like pfn should be changed to
paddr64 >> PAGE_SHIFT in that last line.

Paul.