From: Assem Salama <assem@twcny.rr.com>
To: linux-mm@kvack.org
Subject: Kernel Question
Date: Tue, 08 Aug 2000 22:35:52 -0400 [thread overview]
Message-ID: <3990C388.64AE497D@twcny.rr.com> (raw)
I am runing RedHat 6.2, kernel version: 2.2.14-5.0
I have a couple of questions:
When I try to use ioremap, it gives me an undefined refernce. So, I
ended up using __ioremap. Is this the right way? Am I missing something?
same thing happened with memcpy, and virt_to_phys.
Also, I have a PCI board with 16MB of onboard memory. I got the
driver to probe the device and everything. I used __ioremap to remap the
PCI memory into virtual memory and I can read and write to it in kernel
space. Now, I want to be able to do that through user space. So, I
implemented mmap into my driver. I use remap_page_range with the
following arguments:
in init_mdoule()
myri_phys = (unsigned long) dev->base_address[0] &
PCI_BASE_ADDRESS_MEM_MASK;
...
in mydrv_mmap()
remap_page_range(vmP->vm_start, myri_phys,16*1024*1024 /* 16MB */,
vmP->vm_page_prot)
however, when I call mmap from user space, the machine either hangs or
completely reboots.
Any help would be greatly appreciated.
Sincerely,
Assem Salama
--
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.eu.org/Linux-MM/
reply other threads:[~2000-08-09 2:29 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=3990C388.64AE497D@twcny.rr.com \
--to=assem@twcny.rr.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox