Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

mm: arch: remove duplicate definitions of MADV_FREE

Commits 21f55b018ba5 ("arch/*/include/uapi/asm/mman.h: : let MADV_FREE
have same value for all architectures") and ef58978f1eaa ("mm: define
MADV_FREE for some arches") both defined MADV_FREE, but did not use the
same values. This results in build errors such as

./arch/alpha/include/uapi/asm/mman.h:53:0: error: "MADV_FREE" redefined
./arch/alpha/include/uapi/asm/mman.h:50:0: note: this is the location of the previous definition

for the affected architectures.

Fixes: 21f55b018ba5 ("arch/*/include/uapi/asm/mman.h: : let MADV_FREE have same value for all architectures")
Fixes: ef58978f1eaa ("mm: define MADV_FREE for some arches")
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Cc: Chen Gang <gang.chen.5i5j@gmail.com>
Cc: Minchan Kim <minchan@kernel.org>
Acked-by: Helge Deller <deller@gmx.de> [parisc]
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

authored by

Guenter Roeck and committed by
Linus Torvalds
dcd6c87c f4be6153

-4
-1
arch/alpha/include/uapi/asm/mman.h
··· 47 47 #define MADV_WILLNEED 3 /* will need these pages */ 48 48 #define MADV_SPACEAVAIL 5 /* ensure resources are available */ 49 49 #define MADV_DONTNEED 6 /* don't need these pages */ 50 - #define MADV_FREE 7 /* free pages only if memory pressure */ 51 50 52 51 /* common/generic parameters */ 53 52 #define MADV_FREE 8 /* free pages only if memory pressure */
-1
arch/mips/include/uapi/asm/mman.h
··· 73 73 #define MADV_SEQUENTIAL 2 /* expect sequential page references */ 74 74 #define MADV_WILLNEED 3 /* will need these pages */ 75 75 #define MADV_DONTNEED 4 /* don't need these pages */ 76 - #define MADV_FREE 5 /* free pages only if memory pressure */ 77 76 78 77 /* common parameters: try to keep these consistent across architectures */ 79 78 #define MADV_FREE 8 /* free pages only if memory pressure */
-1
arch/parisc/include/uapi/asm/mman.h
··· 43 43 #define MADV_SPACEAVAIL 5 /* insure that resources are reserved */ 44 44 #define MADV_VPS_PURGE 6 /* Purge pages from VM page cache */ 45 45 #define MADV_VPS_INHERIT 7 /* Inherit parents page size */ 46 - #define MADV_FREE 8 /* free pages only if memory pressure */ 47 46 48 47 /* common/generic parameters */ 49 48 #define MADV_FREE 8 /* free pages only if memory pressure */
-1
arch/xtensa/include/uapi/asm/mman.h
··· 86 86 #define MADV_SEQUENTIAL 2 /* expect sequential page references */ 87 87 #define MADV_WILLNEED 3 /* will need these pages */ 88 88 #define MADV_DONTNEED 4 /* don't need these pages */ 89 - #define MADV_FREE 5 /* free pages only if memory pressure */ 90 89 91 90 /* common parameters: try to keep these consistent across architectures */ 92 91 #define MADV_FREE 8 /* free pages only if memory pressure */