1 // SPDX-License-Identifier: GPL-2.0
3 * From split of dump_linuxpagetables.c
4 * Copyright 2016, Rashmica Gupta, IBM Corp.
7 #include <linux/kernel.h>
8 #include <linux/pgtable.h>
12 static const struct flag_info flag_array
[] = {
14 .mask
= _PAGE_PRIVILEGED
,
39 .mask
= _PAGE_PRESENT
,
44 .mask
= _PAGE_PRESENT
| _PAGE_INVALID
,
49 .mask
= H_PAGE_HASHPTE
,
50 .val
= H_PAGE_HASHPTE
,
59 .mask
= _PAGE_ACCESSED
,
60 .val
= _PAGE_ACCESSED
,
64 .mask
= _PAGE_NON_IDEMPOTENT
,
65 .val
= _PAGE_NON_IDEMPOTENT
,
66 .set
= "non-idempotent",
69 .mask
= _PAGE_TOLERANT
,
70 .val
= _PAGE_TOLERANT
,
78 #ifdef CONFIG_PPC_64K_PAGES
83 .mask
= H_PAGE_4K_PFN
,
87 #else /* CONFIG_PPC_64K_PAGES */
92 .shift
= H_PAGE_F_GIX_SHIFT
,
94 .mask
= H_PAGE_F_SECOND
,
95 .val
= H_PAGE_F_SECOND
,
98 #endif /* CONFIG_PPC_64K_PAGES */
99 .mask
= _PAGE_SPECIAL
,
100 .val
= _PAGE_SPECIAL
,
105 struct pgtable_level pg_level
[5] = {
109 .num
= ARRAY_SIZE(flag_array
),
112 .num
= ARRAY_SIZE(flag_array
),
115 .num
= ARRAY_SIZE(flag_array
),
118 .num
= ARRAY_SIZE(flag_array
),