Skip to content

Commit ef6458b

Browse files
pccMarc Zyngier
authored andcommitted
mm: Add PG_arch_3 page flag
As with PG_arch_2, this flag is only allowed on 64-bit architectures due to the shortage of bits available. It will be used by the arm64 MTE code in subsequent patches. Signed-off-by: Peter Collingbourne <[email protected]> Cc: Will Deacon <[email protected]> Cc: Marc Zyngier <[email protected]> Cc: Steven Price <[email protected]> [[email protected]: added flag preserving in __split_huge_page_tail()] Signed-off-by: Catalin Marinas <[email protected]> Reviewed-by: Steven Price <[email protected]> Signed-off-by: Marc Zyngier <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent 2dbf12a commit ef6458b

File tree

5 files changed

+5
-0
lines changed

5 files changed

+5
-0
lines changed

fs/proc/page.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -221,6 +221,7 @@ u64 stable_page_flags(struct page *page)
221221
u |= kpf_copy_bit(k, KPF_ARCH, PG_arch_1);
222222
#ifdef CONFIG_ARCH_USES_PG_ARCH_X
223223
u |= kpf_copy_bit(k, KPF_ARCH_2, PG_arch_2);
224+
u |= kpf_copy_bit(k, KPF_ARCH_3, PG_arch_3);
224225
#endif
225226

226227
return u;

include/linux/kernel-page-flags.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,5 +18,6 @@
1818
#define KPF_UNCACHED 39
1919
#define KPF_SOFTDIRTY 40
2020
#define KPF_ARCH_2 41
21+
#define KPF_ARCH_3 42
2122

2223
#endif /* LINUX_KERNEL_PAGE_FLAGS_H */

include/linux/page-flags.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,7 @@ enum pageflags {
134134
#endif
135135
#ifdef CONFIG_ARCH_USES_PG_ARCH_X
136136
PG_arch_2,
137+
PG_arch_3,
137138
#endif
138139
#ifdef CONFIG_KASAN_HW_TAGS
139140
PG_skip_kasan_poison,

include/trace/events/mmflags.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,7 @@ IF_HAVE_PG_HWPOISON(PG_hwpoison, "hwpoison" ) \
131131
IF_HAVE_PG_IDLE(PG_young, "young" ) \
132132
IF_HAVE_PG_IDLE(PG_idle, "idle" ) \
133133
IF_HAVE_PG_ARCH_X(PG_arch_2, "arch_2" ) \
134+
IF_HAVE_PG_ARCH_X(PG_arch_3, "arch_3" ) \
134135
IF_HAVE_PG_SKIP_KASAN_POISON(PG_skip_kasan_poison, "skip_kasan_poison")
135136

136137
#define show_page_flags(flags) \

mm/huge_memory.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2446,6 +2446,7 @@ static void __split_huge_page_tail(struct page *head, int tail,
24462446
(1L << PG_unevictable) |
24472447
#ifdef CONFIG_ARCH_USES_PG_ARCH_X
24482448
(1L << PG_arch_2) |
2449+
(1L << PG_arch_3) |
24492450
#endif
24502451
(1L << PG_dirty) |
24512452
LRU_GEN_MASK | LRU_REFS_MASK));

0 commit comments

Comments
 (0)