lkml.org 
[lkml]   [2005]   [Aug]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Date
    From
    SubjectRe: [PATCH] Fix mmap_kmem (was: [question] What's the difference between /dev/kmem and /dev/mem)


    On Mon, 15 Aug 2005, Olaf Hering wrote:
    >
    > ARCH=um doesnt like your version, but mine.

    Yours is broken. As is arch-um.

    The fix would _seem_ to be something like the appended. Can you verify?

    Linus
    ----
    diff --git a/include/asm-um/page.h b/include/asm-um/page.h
    --- a/include/asm-um/page.h
    +++ b/include/asm-um/page.h
    @@ -104,8 +104,8 @@ extern void *to_virt(unsigned long phys)
    * casting is the right thing, but 32-bit UML can't have 64-bit virtual
    * addresses
    */
    -#define __pa(virt) to_phys((void *) (unsigned long) virt)
    -#define __va(phys) to_virt((unsigned long) phys)
    +#define __pa(virt) to_phys((void *) (unsigned long) (virt))
    +#define __va(phys) to_virt((unsigned long) (phys))

    #define page_to_pfn(page) ((page) - mem_map)
    #define pfn_to_page(pfn) (mem_map + (pfn))
    -
    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/
    \
     
     \ /
      Last update: 2009-11-18 23:46    [W:0.031 / U:0.236 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site