Re: pci-sysfs resource mmap broken (and PATCH)

From: David S. Miller (davem_at_davemloft.net)
Date: 04/29/05

  • Next message: Venkatesan, Ganesh: "msleep_interruptible() in ethtool ioctl and keyboard input"
    Date:	Fri, 29 Apr 2005 08:42:42 -0700
    To: Grant Grundler <grundler@parisc-linux.org>
    
    

    On Thu, 28 Apr 2005 17:38:28 -0600
    Grant Grundler <grundler@parisc-linux.org> wrote:

    > I suspect the MAP_* attribute/hint needs to be passed in together
    > with the mmap call if any arch (ia64?) would return a different
    > virtual address depending the attribute (e.g cached vs uncached).

    The only problem could me getting the generic mmap() code to
    properly pass the flag down into the driver, I seem to recall
    that it either does an -EINVAL or masks out any flags which
    are not in the standard set.

    But then again this conflicts with what I remember seeing in the
    XFree86 PCI support, in that IA64 passed in such a mmap() flag
    to indicate a framebuffer like mapping that didn't need a guard-like
    bit to be set.

    Someone should look at the code to make sure :-)

    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/


  • Next message: Venkatesan, Ganesh: "msleep_interruptible() in ethtool ioctl and keyboard input"

    Relevant Pages

    • remap_page_range64() for PPC
      ... and I want to make device registers for our custom ... hardware accessable from user space with mmap(). ... would give the following code a short "code review", ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • Re: mlockall and mmap of IO devices dont mix
      ... > Just in cast is isn't clear, it should be defined that anything ... > as a side effect of such a mmap() request. ... Putting this check for "forbidden VMAs" into follow_pages is also a good ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • Re: UTF-8 and case-insensitivity
      ... > mmap, so I went with the mmap. ... so the kernel and the CPU cache works quite well on the large table as ... Wouldn't work in kernel space, ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • Re: dont let mmap allocate down to zero
      ... You know that the return value of mmap is to be ... Obviously having mallocreturn NULL for a successful allocation would ... but I guess I don't see why you'd reserve more than ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • Re: [RFC] Per-architecture randomization
      ... randomization just shifted the mmap() base around at process start? ... entropy, and for stacks that grow up and down. ... I haven't handled are stacks that grow up and down at the same time, ... ok so you haven't dealt with ia64 yet;) ...
      (Linux-Kernel)