Re: can device drivers return non-ram via vm_ops->nopage?

From: Russell King (rmk+lkml_at_arm.linux.org.uk)
Date: 03/22/04

  • Next message: William Lee Irwin III: "Re: can device drivers return non-ram via vm_ops->nopage?"
    Date:	Mon, 22 Mar 2004 00:20:41 +0000
    To: Jeff Garzik <jgarzik@pobox.com>
    
    

    On Sun, Mar 21, 2004 at 07:10:53PM -0500, Jeff Garzik wrote:
    > For the first kind, please read fb_mmap in drivers/video/fbmem.c. Look
    > at the _horror_ of ifdefs in exporting the framebuffer. And that horror
    > is what's often needed when letting userspace mmap(2) PCI memory IO regions.

    Most of this:

    #if defined(__mc68000__)
    ...
    #elif defined(__mips__)
            pgprot_val(vma->vm_page_prot) &= ~_CACHE_MASK;
            pgprot_val(vma->vm_page_prot) |= _CACHE_UNCACHED;
    #elif defined(__sh__)
            pgprot_val(vma->vm_page_prot) &= ~_PAGE_CACHABLE;
    #elif defined(__hppa__)
            pgprot_val(vma->vm_page_prot) |= _PAGE_NO_CACHE;
    #elif defined(__ia64__) || defined(__arm__)
            vma->vm_page_prot = pgprot_writecombine(vma->vm_page_prot);
    #else
    #warning What do we have to do here??
    #endif

    exists because architectures haven't defined their private
    pgprot_writecombine() implementations, preferring instead to add
    to the preprocessor junk instead.

    -- 
    Russell King
     Linux kernel    2.6 ARM Linux   - http://www.arm.linux.org.uk/
     maintainer of:  2.6 PCMCIA      - http://pcmcia.arm.linux.org.uk/
                     2.6 Serial core
    -
    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: William Lee Irwin III: "Re: can device drivers return non-ram via vm_ops->nopage?"

    Relevant Pages

    • Re: [PATCH] Fix i8042 PS/2 mouse on ARM
      ... here's the updated patch. ... +#elif defined ... #undef RTC_IRQ ... 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/ ...
      (Linux-Kernel)
    • [PATCH 31/44] Fix i8042 PS/2 mouse on ARM
      ... Fix i8042 PS/2 mouse on ARM. ... +#elif defined ... #undef RTC_IRQ ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • [PATCH 2.6.14-rc2-mm2] m32r: fix #if warnings
      ... seq_printf(m, "cpu family\t: VDEC2\n" ... +#elif defined ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • [TRIVIAL] include/asm-i386/module.h defined() fix
      ... #define MODULE_PROC_FAMILY "PENTIUMII " ... +#elif defined ... #define MODULE_PROC_FAMILY "WINCHIPC6 " ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • early_cpu_init
      ... #ifdef CONFIG_MCYRIXIII ... #elif defined CONFIG_MGODE6X1 ... Acesso Grátis - Internet rápida e grátis. ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)