On 7/3/06, Manisha Maheshwari <maheshwari.manisha@xxxxxxxxx> wrote:
At last, i found i that it was because of remap_pfn_range() which we was used for building page table. The problem got resolved once we switched to nopage VMA for building page table.
Refer : chapter 15 Linux Device Driver by O'Reilly.
-Manisha
I am having problem reading file if the file is opened with O_DIERCT flag.The error given by read system call is 'Bad Address'.The buffer where i am trying to read is a device that is mapped into the process address space.I have checked that buffer is mapped by looking into the proc/<pid of my process>/maps.I am using ext2 filesysytem with blocksize is 2048.The address where i am trying to read is block aligned(i.e 2048 byte aligned) and the number of bytes i am trying to read is also multiple of 2048.I am using kernel release:2.6.XXX.I couldn't understand why it's creating problem with O_DIRECT because the program works if i open file without O_DIRECT.
At last, i found i that it was because of remap_pfn_range() which we was used for building page table. The problem got resolved once we switched to nopage VMA for building page table.
Refer : chapter 15 Linux Device Driver by O'Reilly.
-Manisha
-manisha