From: John Fusco <fusco_john@yahoo.com>
To: linux-mm@kvack.org
Subject: Problem with remap_page_range on IA32 with more than 4GB RAM
Date: Thu, 23 Sep 2004 18:22:22 -0500 [thread overview]
Message-ID: <41535AAE.6090700@yahoo.com> (raw)
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
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.
I chose to work around this by patching the kernel. I changed the
unsigned long parameters used for physical address in mm/memory.c to
'dma64_addr_t'. This seems to work and I don't see any holes in the
approach, but I would appreciate any comments (or better solutions).
I can post the patch here if anyone would like to see it. It seems that
Linux could use a unique typedef for a physical address. Right now I
think dma64_addr_t fits the bill.
Thanks,
John
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"aart@kvack.org"> aart@kvack.org </a>
next reply other threads:[~2004-09-23 23:22 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-09-23 23:22 John Fusco [this message]
2004-09-23 23:27 ` Problem with remap_page_range on IA32 with more than 4GB RAM William Lee Irwin III
2004-09-24 2:17 ` [vm 0/4] replace remap_page_range() with remap_pfn_range() William Lee Irwin III
2004-09-24 2:19 ` [vm 1/4] convert remap_page_range() to remap_pfn_range() William Lee Irwin III
2004-09-24 2:21 ` [vm 2/4] convert io_remap_page_range() to call remap_pfn_range() William Lee Irwin III
2004-09-24 2:23 ` [vm 3/4] convert direct callers of remap_page_range() William Lee Irwin III
2004-09-24 2:25 ` [vm 4/4] remove remap_page_range() William Lee Irwin III
2004-09-24 2:27 ` [vm 3/4] convert direct callers of remap_page_range() William Lee Irwin III
2004-09-24 3:29 ` [vm 0/4] replace remap_page_range() with remap_pfn_range() William Lee Irwin III
2004-09-24 3:22 ` Is there a node-affinity memory allocation benchmark? Annie
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=41535AAE.6090700@yahoo.com \
--to=fusco_john@yahoo.com \
--cc=linux-mm@kvack.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.