Messages in this thread | | | Date | Tue, 21 Jul 1998 18:58:11 +0200 | From | ralf@uni-kobl ... | Subject | Re: [PATCH] New phys_addr() syscall |
| |
On Tue, Jul 21, 1998 at 02:25:23PM +0200, Inaky Perez Gonzalez wrote:
> Richard> Hi, all. I've implemented a simple new system call called > Richard> phys_addr() which converts a virtual address to a physical > Richard> address. > > Cool. I needed some of this for the USB Stack; I've been using > something I found at linux/drivers/char/bttv.c, as I wanted to be able > to directly do PCI read and writes to user space.
That's what get_user() / put_user() are for. Use them if you want to do I/O from/to userspace without DMA. Don't even think about translating the addresses into kernel addresses or on certain architectures all hell will break loose.
If you want to do DMA then you'll need additional facilities which aren't yet in place in Linus' kernel release.
Ralf
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.altern.org/andrebalsa/doc/lkml-faq.html
| |