lkml.org 
[lkml]   [2015]   [Nov]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH v5 02/12] mm: define MADV_FREE for some arches
    Date
    Most architectures use asm-generic, but alpha, mips, parisc, xtensa
    need their own definitions.

    This patch defines MADV_FREE for them so it should fix build break
    for their architectures.

    Maybe, I should split and feed piecies to arch maintainers but
    included here for mmotm convenience.

    Cc: Michael Kerrisk <mtk.manpages@gmail.com>
    Cc: Richard Henderson <rth@twiddle.net>
    Cc: Ivan Kokshaysky <ink@jurassic.park.msu.ru>
    Cc: "James E.J. Bottomley" <jejb@parisc-linux.org>
    Cc: Helge Deller <deller@gmx.de>
    Cc: Ralf Baechle <ralf@linux-mips.org>
    Cc: Chris Zankel <chris@zankel.net>
    Acked-by: Max Filippov <jcmvbkbc@gmail.com>
    Reported-by: kbuild test robot <fengguang.wu@intel.com>
    Signed-off-by: Minchan Kim <minchan@kernel.org>
    ---
    arch/alpha/include/uapi/asm/mman.h | 1 +
    arch/mips/include/uapi/asm/mman.h | 1 +
    arch/parisc/include/uapi/asm/mman.h | 1 +
    arch/xtensa/include/uapi/asm/mman.h | 1 +
    4 files changed, 4 insertions(+)

    diff --git a/arch/alpha/include/uapi/asm/mman.h b/arch/alpha/include/uapi/asm/mman.h
    index f2f949671798..d828beb5e69b 100644
    --- a/arch/alpha/include/uapi/asm/mman.h
    +++ b/arch/alpha/include/uapi/asm/mman.h
    @@ -47,6 +47,7 @@
    #define MADV_WILLNEED 3 /* will need these pages */
    #define MADV_SPACEAVAIL 5 /* ensure resources are available */
    #define MADV_DONTNEED 6 /* don't need these pages */
    +#define MADV_FREE 7 /* free pages only if memory pressure */

    /* common/generic parameters */
    #define MADV_REMOVE 9 /* remove these pages & resources */
    diff --git a/arch/mips/include/uapi/asm/mman.h b/arch/mips/include/uapi/asm/mman.h
    index 97c03f468924..a6f8daff8e3b 100644
    --- a/arch/mips/include/uapi/asm/mman.h
    +++ b/arch/mips/include/uapi/asm/mman.h
    @@ -73,6 +73,7 @@
    #define MADV_SEQUENTIAL 2 /* expect sequential page references */
    #define MADV_WILLNEED 3 /* will need these pages */
    #define MADV_DONTNEED 4 /* don't need these pages */
    +#define MADV_FREE 5 /* free pages only if memory pressure */

    /* common parameters: try to keep these consistent across architectures */
    #define MADV_REMOVE 9 /* remove these pages & resources */
    diff --git a/arch/parisc/include/uapi/asm/mman.h b/arch/parisc/include/uapi/asm/mman.h
    index dd4d1876a020..bda94f0d0b94 100644
    --- a/arch/parisc/include/uapi/asm/mman.h
    +++ b/arch/parisc/include/uapi/asm/mman.h
    @@ -43,6 +43,7 @@
    #define MADV_SPACEAVAIL 5 /* insure that resources are reserved */
    #define MADV_VPS_PURGE 6 /* Purge pages from VM page cache */
    #define MADV_VPS_INHERIT 7 /* Inherit parents page size */
    +#define MADV_FREE 8 /* free pages only if memory pressure */

    /* common/generic parameters */
    #define MADV_REMOVE 9 /* remove these pages & resources */
    diff --git a/arch/xtensa/include/uapi/asm/mman.h b/arch/xtensa/include/uapi/asm/mman.h
    index 360944e1da52..83c5150b06f9 100644
    --- a/arch/xtensa/include/uapi/asm/mman.h
    +++ b/arch/xtensa/include/uapi/asm/mman.h
    @@ -86,6 +86,7 @@
    #define MADV_SEQUENTIAL 2 /* expect sequential page references */
    #define MADV_WILLNEED 3 /* will need these pages */
    #define MADV_DONTNEED 4 /* don't need these pages */
    +#define MADV_FREE 5 /* free pages only if memory pressure */

    /* common parameters: try to keep these consistent across architectures */
    #define MADV_REMOVE 9 /* remove these pages & resources */
    --
    1.9.1


    \
     
     \ /
      Last update: 2015-11-30 08:01    [W:4.654 / U:0.024 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site