* inverse mmap() available?
@ 2001-09-28 15:16 Norbert Roos
2001-09-28 15:28 ` Tommy Reynolds
2001-09-28 15:30 ` Christoph Hellwig
0 siblings, 2 replies; 5+ messages in thread
From: Norbert Roos @ 2001-09-28 15:16 UTC (permalink / raw)
To: linux-kernel
Hello!
Is there a way to map user space memory into kernel address space, e.g.
that i don't have to call get_user(var,...) but simply use var =
*user_space_ptr?
What i intend to do (as the next step) is to DMA-transfer data directly
between a PCI device and user space memory. The buffer in user space
should be allocated with malloc(), so allocating a buffer in kernel and
mmap()-ping it to user space is not the solution..
I guess this has been asked before, any links to further information
would be great.
Thanks
Norbert
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: inverse mmap() available?
2001-09-28 15:16 inverse mmap() available? Norbert Roos
@ 2001-09-28 15:28 ` Tommy Reynolds
2001-09-28 15:30 ` Christoph Hellwig
1 sibling, 0 replies; 5+ messages in thread
From: Tommy Reynolds @ 2001-09-28 15:28 UTC (permalink / raw)
To: Norbert Roos; +Cc: linux-kernel
Norbert Roos <n.roos@berlin.de> was pleased to say:
>
> Hello!
>
> Is there a way to map user space memory into kernel address space, e.g.
> that i don't have to call get_user(var,...) but simply use var =
> *user_space_ptr?
>
> What i intend to do (as the next step) is to DMA-transfer data directly
> between a PCI device and user space memory. The buffer in user space
> should be allocated with malloc(), so allocating a buffer in kernel and
> mmap()-ping it to user space is not the solution..
>
> I guess this has been asked before, any links to further information
> would be great.
Look at the KIOBUF stuff in <linux/iobuf.h> for how to do this.
---------------------------------------------+-----------------------------
Tommy Reynolds | mailto: <reynolds@redhat.com>
Red Hat, Inc., Embedded Development Services | Phone: +1.256.704.9286
307 Wynn Drive NW, Huntsville, AL 35805 USA | FAX: +1.236.837.3839
Senior Software Developer | Mobile: +1.919.641.2923
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: inverse mmap() available?
2001-09-28 15:16 inverse mmap() available? Norbert Roos
2001-09-28 15:28 ` Tommy Reynolds
@ 2001-09-28 15:30 ` Christoph Hellwig
2001-09-28 16:50 ` putting a user program to sleep till interrupted Anil Kumar
1 sibling, 1 reply; 5+ messages in thread
From: Christoph Hellwig @ 2001-09-28 15:30 UTC (permalink / raw)
To: Norbert Roos; +Cc: linux-kernel, kernelnewbies
In article <3BB49438.1F2C59B3@berlin.de> you wrote:
> Hello!
>
> Is there a way to map user space memory into kernel address space, e.g.
> that i don't have to call get_user(var,...) but simply use var =
> *user_space_ptr?
>
> What i intend to do (as the next step) is to DMA-transfer data directly
> between a PCI device and user space memory. The buffer in user space
> should be allocated with malloc(), so allocating a buffer in kernel and
> mmap()-ping it to user space is not the solution..
>
> I guess this has been asked before, any links to further information
> would be great.
map_user_kiobuf is what you want :) Some more explanation at:
ftp://ftp.openlinux.org/pub/people/hch/kio/kiobuf.txt
^ permalink raw reply [flat|nested] 5+ messages in thread
* putting a user program to sleep till interrupted
2001-09-28 15:30 ` Christoph Hellwig
@ 2001-09-28 16:50 ` Anil Kumar
2001-10-01 7:39 ` Martin Maletinsky
0 siblings, 1 reply; 5+ messages in thread
From: Anil Kumar @ 2001-09-28 16:50 UTC (permalink / raw)
To: linux-kernel, kernelnewbies
hi,
I wanted to know how a user program/process can be put
to sleep by using the functions given in the kernel. I
will be calling the function not from user space but
from kernel space, i.e. from inside the kernel. I also
want to be able to start it again whenever required.
I went thru sched.c but couldn't figure out how to
make my own wait list.
Thanx in advance.
Anil
__________________________________________________
Do You Yahoo!?
Listen to your Yahoo! Mail messages from any phone.
http://phone.yahoo.com
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: putting a user program to sleep till interrupted
2001-09-28 16:50 ` putting a user program to sleep till interrupted Anil Kumar
@ 2001-10-01 7:39 ` Martin Maletinsky
0 siblings, 0 replies; 5+ messages in thread
From: Martin Maletinsky @ 2001-10-01 7:39 UTC (permalink / raw)
To: Anil Kumar; +Cc: linux-kernel, kernelnewbies
Hello,
A good explanation is found in:
http://www.linuxdoc.org/LDP/lki/lki-2.html#ss2.5
and also in Chapter 5, 'Linux Device Drivers' from Alessandro Rubini & Jonathan Corbet
(you find an electronic version of the book in http://www.oreilly.com/catalog/linuxdrive2/)
regards
Martin
Anil Kumar wrote:
> hi,
> I wanted to know how a user program/process can be put
> to sleep by using the functions given in the kernel. I
> will be calling the function not from user space but
> from kernel space, i.e. from inside the kernel. I also
> want to be able to start it again whenever required.
> I went thru sched.c but couldn't figure out how to
> make my own wait list.
> Thanx in advance.
> Anil
>
> __________________________________________________
> Do You Yahoo!?
> Listen to your Yahoo! Mail messages from any phone.
> http://phone.yahoo.com
> -
> Kernelnewbies: Help each other learn about the Linux kernel.
> Archive: http://mail.nl.linux.org/kernelnewbies/
> IRC Channel: irc.openprojects.net / #kernelnewbies
> Web Page: http://www.kernelnewbies.org/
--
Supercomputing System AG email: maletinsky@scs.ch
Martin Maletinsky phone: +41 (0)1 445 16 05
Technoparkstrasse 1 fax: +41 (0)1 445 16 10
CH-8005 Zurich
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2001-10-01 7:39 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2001-09-28 15:16 inverse mmap() available? Norbert Roos
2001-09-28 15:28 ` Tommy Reynolds
2001-09-28 15:30 ` Christoph Hellwig
2001-09-28 16:50 ` putting a user program to sleep till interrupted Anil Kumar
2001-10-01 7:39 ` Martin Maletinsky
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox