doubt in fb_mmap()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi

  What do these lines do in fb_mmap() in file
drivers/video/fbmem.c
  1)  start = fix.smem_start;
        len = PAGE_ALIGN((start &
~PAGE_MASK)+fix.smem_len);
        if (off >= len) {
                /* memory mapped io */
  >>> if off >= len how do we suppose it is mem mapped
io
  >>> here offset is; off = vma->vm_pgoff <<
PAGE_SHIFT;


  2)  start &= PAGE_MASK;
        if ((vma->vm_end - vma->vm_start + off) > len)
                return -EINVAL;
        off += start;

 >>> what is relation between offset and length, why
do we keep comparing them ???

wld appreciate if someone throws some light on this.

regards
Amit



  

________________________________________________________________________
Yahoo! India Matrimony: Find your life partner online
Go to: http://yahoo.shaadi.com/india-matrimony

--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           http://kernelnewbies.org/faq/


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux