* Kernel Question
@ 2000-08-09 2:35 Assem Salama
0 siblings, 0 replies; only message in thread
From: Assem Salama @ 2000-08-09 2:35 UTC (permalink / raw)
To: linux-mm
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/
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2000-08-09 2:29 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-08-09 2:35 Kernel Question Assem Salama
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox