lkml.org 
[lkml]   [2006]   [Sep]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Subject[PATCH] [6/6] Fix userspace build of asm-mips/page.h
    From
    Date
    MIPS asm/page.h unconditionally includes <asm-generic/memory_model.h>,
    which doesn't exist in userspace. Move an #endif /* __KERNEL__ */ down a
    few lines to prevent that.

    Also, remove the broken definition of PAGE_SIZE which is never going to
    be correct -- in the absence of PAGE_SIZE, non-broken userspace will
    fall back to using sysconf() or getpagesize() instead.

    Signed-off-by: David Woodhouse <dwmw2@infradead.org>

    diff --git a/include/asm-mips/page.h b/include/asm-mips/page.h
    index 6ed1151..219d359 100644
    --- a/include/asm-mips/page.h
    +++ b/include/asm-mips/page.h
    @@ -14,8 +14,6 @@ #ifdef __KERNEL__

    #include <spaces.h>

    -#endif
    -
    /*
    * PAGE_SHIFT determines the page size
    */
    @@ -34,8 +32,6 @@ #endif
    #define PAGE_SIZE (1UL << PAGE_SHIFT)
    #define PAGE_MASK (~((1 << PAGE_SHIFT) - 1))

    -
    -#ifdef __KERNEL__
    #ifndef __ASSEMBLY__

    extern void clear_page(void * page);
    @@ -168,8 +164,6 @@ #define VM_DATA_DEFAULT_FLAGS (VM_READ |
    #define UNCAC_ADDR(addr) ((addr) - PAGE_OFFSET + UNCAC_BASE)
    #define CAC_ADDR(addr) ((addr) - UNCAC_BASE + PAGE_OFFSET)

    -#endif /* defined (__KERNEL__) */
    -
    #ifdef CONFIG_LIMITED_DMA
    #define WANT_PAGE_VIRTUAL
    #endif
    @@ -177,4 +171,6 @@ #endif
    #include <asm-generic/memory_model.h>
    #include <asm-generic/page.h>

    +#endif /* defined (__KERNEL__) */
    +
    #endif /* _ASM_PAGE_H */
    --
    dwmw2

    -
    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: 2006-09-09 13:39    [W:0.022 / U:30.560 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site