Skip to content

replace remap_page_range() with remap_pfn_range()

William Lee Irwin III linux-mm lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest4 patches 2 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4convert remap_page_range() to remap_pfn_range()Documentation/IO-mapping.txt include/linux/mm.h mm/memory.c +1 more+24 -180 replies
2/4convert io_remap_page_range() to call remap_pfn_range()include/asm-alpha/pgtable.h include/asm-arm/pgtable.h include/asm-arm26/pgtable.h +13 more+30 -160 replies
3/4convert direct callers of remap_page_range()arch/arm/kernel/bios32.c arch/i386/pci/i386.c arch/ia64/kernel/perfmon.c +55 more+147 -2331 reply
4/4remove remap_page_range()include/linux/mm.h+0 -80 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [vm 0/4] replace remap_page_range() with remap_pfn_range()
Quoted 5 lines · John Fusco

I have a problem and I would like some comments on how to fix it. I have a custom PCI-X device installed in an IA32 system. The device expects to see a flat contiguous address space on the host, from which it reads and sends its data. The technique I used is right out of the O'Reilly Device Drivers book, which is to hide memory from the kernel

Quoted 8 lines

with the 'mem=YYY' boot parameter. I then provide a mmap method to map the contiguous (hidden) memory into user space via a call to 'remap_page_range'.
Everything worked great until we decided that we needed to install 6GB in this system. The problem is that remap_page_range() uses an unsigned long as the parameter for a physical address. On IA32, an unsigned long is 32-bits, but the IA32 is capable of addressing well over 4GB of RAM. So physical addresses on IA32 must be larger than 32 bits.

Do these patches work for you? Compiletested on sparc64.

-- wli