Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c6dd897f authored by Dave Young's avatar Dave Young Committed by Linus Torvalds
Browse files

mm: move page-types.c from Documentation to tools/vm



tools/ is the better place for vm tools which are used by many people.
Moving them to tools also make them open to more users instead of hide in
Documentation folder.

This patch moves page-types.c to tools/vm/page-types.c.  Also add a
Makefile in tools/vm and fix two coding style problems: a) change const
arrary to 'const char * const', b) change a space to tab for indent.

Signed-off-by: default avatarDave Young <dyoung@redhat.com>
Acked-by: default avatarWu Fengguang <fengguang.wu@intel.com>
Cc: Christoph Lameter <cl@linux.com>
Cc: Pekka Enberg <penberg@cs.helsinki.fi>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent cab6b056
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -2,7 +2,7 @@
obj- := dummy.o

# List of programs to build
hostprogs-y := page-types hugepage-mmap hugepage-shm map_hugetlb
hostprogs-y := hugepage-mmap hugepage-shm map_hugetlb

# Tell kbuild to always build the programs
always := $(hostprogs-y)

tools/vm/Makefile

0 → 100644
+11 −0
Original line number Diff line number Diff line
# Makefile for vm tools

CC = $(CROSS_COMPILE)gcc
CFLAGS = -Wall -Wextra

all: page-types
%: %.c
	$(CC) $(CFLAGS) -o $@ $^

clean:
	$(RM) page-types
+3 −3
Original line number Diff line number Diff line
@@ -124,7 +124,7 @@
#define BIT(name)		(1ULL << KPF_##name)
#define BITS_COMPOUND		(BIT(COMPOUND_HEAD) | BIT(COMPOUND_TAIL))

static const char *page_flag_names[] = {
static const char * const page_flag_names[] = {
	[KPF_LOCKED]		= "L:locked",
	[KPF_ERROR]		= "E:error",
	[KPF_REFERENCED]	= "R:referenced",
@@ -166,7 +166,7 @@ static const char *page_flag_names[] = {
};


static const char *debugfs_known_mountpoints[] = {
static const char * const debugfs_known_mountpoints[] = {
	"/sys/kernel/debug",
	"/debug",
	0,