Messages in this thread | | | Date | Thu, 23 Sep 1999 00:03:11 +0200 | From | Jens Axboe <> | Subject | Re: Fixed address device-shared kernel memory |
| |
On Wed, Sep 22 1999, Richard B. Johnson wrote: > ptr = phys_to_vert(0xcc000); > > ... which is a shared memory window in kernel space. > > This works for about 20 seconds. Then (it appears as though) > the kernel unmaps this virtual address, resulting in > data observed at this address to not be the data from the > shared-memory device. > > The problem with the disappearing mapping seems to correspond > with the wakeup of kswapd or kflushd. > > I looked through kernel drivers and didn't get a clue as > to how to prevent this. Many drivers, which use shared memory, > don't even use the phys_to_vert macro. If I try that, the > result is a panic with Unable to handle kernel paging request > of 0x000cc000. So, the physical to virual mapping is obviously > required in a kernel module. > > So, the question is; "How do I prevent the kernel from unmapping > the physical-to-virtual translated pages?" > > Was I supposed to call do_mmap(); and later do_munmap(); in > the kernel driver?
You can't just access the memory directly, you have to remap it first.
-- * Jens Axboe <axboe@image.dk> * Linux CD-ROM Maintainer * http://www.kernel.dk
- 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/
| |