diff options
| -rw-r--r-- | Documentation/vm/Makefile | 2 | ||||
| -rw-r--r-- | tools/vm/Makefile | 11 | ||||
| -rw-r--r-- | tools/vm/page-types.c (renamed from Documentation/vm/page-types.c) | 6 |
3 files changed, 15 insertions, 4 deletions
diff --git a/Documentation/vm/Makefile b/Documentation/vm/Makefile index 3fa4d0668864..e538864bfc63 100644 --- a/Documentation/vm/Makefile +++ b/Documentation/vm/Makefile | |||
| @@ -2,7 +2,7 @@ | |||
| 2 | obj- := dummy.o | 2 | obj- := dummy.o |
| 3 | 3 | ||
| 4 | # List of programs to build | 4 | # List of programs to build |
| 5 | hostprogs-y := page-types hugepage-mmap hugepage-shm map_hugetlb | 5 | hostprogs-y := hugepage-mmap hugepage-shm map_hugetlb |
| 6 | 6 | ||
| 7 | # Tell kbuild to always build the programs | 7 | # Tell kbuild to always build the programs |
| 8 | always := $(hostprogs-y) | 8 | always := $(hostprogs-y) |
diff --git a/tools/vm/Makefile b/tools/vm/Makefile new file mode 100644 index 000000000000..3823d4b1fa75 --- /dev/null +++ b/tools/vm/Makefile | |||
| @@ -0,0 +1,11 @@ | |||
| 1 | # Makefile for vm tools | ||
| 2 | |||
| 3 | CC = $(CROSS_COMPILE)gcc | ||
| 4 | CFLAGS = -Wall -Wextra | ||
| 5 | |||
| 6 | all: page-types | ||
| 7 | %: %.c | ||
| 8 | $(CC) $(CFLAGS) -o $@ $^ | ||
| 9 | |||
| 10 | clean: | ||
| 11 | $(RM) page-types | ||
diff --git a/Documentation/vm/page-types.c b/tools/vm/page-types.c index 0b13f02d4059..7dab7b25b5c6 100644 --- a/Documentation/vm/page-types.c +++ b/tools/vm/page-types.c | |||
| @@ -124,7 +124,7 @@ | |||
| 124 | #define BIT(name) (1ULL << KPF_##name) | 124 | #define BIT(name) (1ULL << KPF_##name) |
| 125 | #define BITS_COMPOUND (BIT(COMPOUND_HEAD) | BIT(COMPOUND_TAIL)) | 125 | #define BITS_COMPOUND (BIT(COMPOUND_HEAD) | BIT(COMPOUND_TAIL)) |
| 126 | 126 | ||
| 127 | static const char *page_flag_names[] = { | 127 | static const char * const page_flag_names[] = { |
| 128 | [KPF_LOCKED] = "L:locked", | 128 | [KPF_LOCKED] = "L:locked", |
| 129 | [KPF_ERROR] = "E:error", | 129 | [KPF_ERROR] = "E:error", |
| 130 | [KPF_REFERENCED] = "R:referenced", | 130 | [KPF_REFERENCED] = "R:referenced", |
| @@ -166,7 +166,7 @@ static const char *page_flag_names[] = { | |||
| 166 | }; | 166 | }; |
| 167 | 167 | ||
| 168 | 168 | ||
| 169 | static const char *debugfs_known_mountpoints[] = { | 169 | static const char * const debugfs_known_mountpoints[] = { |
| 170 | "/sys/kernel/debug", | 170 | "/sys/kernel/debug", |
| 171 | "/debug", | 171 | "/debug", |
| 172 | 0, | 172 | 0, |
| @@ -215,7 +215,7 @@ static int hwpoison_forget_fd; | |||
| 215 | 215 | ||
| 216 | static unsigned long total_pages; | 216 | static unsigned long total_pages; |
| 217 | static unsigned long nr_pages[HASH_SIZE]; | 217 | static unsigned long nr_pages[HASH_SIZE]; |
| 218 | static uint64_t page_flags[HASH_SIZE]; | 218 | static uint64_t page_flags[HASH_SIZE]; |
| 219 | 219 | ||
| 220 | 220 | ||
| 221 | /* | 221 | /* |
