Re: Process VM Addr to Kernel VM Addr at Interrupt Time.

Alan Cox (alan@lxorguk.ukuu.org.uk)
Wed, 28 Apr 1999 15:04:19 +0100 (BST)


> peripheral card. The application give the peripheral device an address
> within the applications address space. Some time later, the peripheral

Thats the first mistake

> back the address given to the peripheral device earlier. The ISR
> now needs to access the data at the memory location read back, but

It can't

> knows the process ID of the applicaiton in question, but since it
> is not executing with the context of that application, how can it
> convert the address in the applications address space, to its
> own virtual address space?

The page might even be on disk.

The sound drivers may be the most instructive example here. They
DMA to/from buffers and a program can handle them but what is done is

kernel allocates buffers
marks the pages reserved

process does mmap
pages are mapped into application space

interrupt occurs
interrupt handler writes to the kernel address

Those pages being kernel space are always available, but via mmap also
part of the user space

Alan

-
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.tux.org/lkml/