]> git.proxmox.com Git - mirror_ubuntu-disco-kernel.git/blame - arch/x86/include/asm/pgtable-3level_types.h
License cleanup: add SPDX GPL-2.0 license identifier to files with no license
[mirror_ubuntu-disco-kernel.git] / arch / x86 / include / asm / pgtable-3level_types.h
CommitLineData
b2441318 1/* SPDX-License-Identifier: GPL-2.0 */
1965aae3
PA
2#ifndef _ASM_X86_PGTABLE_3LEVEL_DEFS_H
3#define _ASM_X86_PGTABLE_3LEVEL_DEFS_H
1da177e4 4
54321d94
JF
5#ifndef __ASSEMBLY__
6#include <linux/types.h>
7
8typedef u64 pteval_t;
9typedef u64 pmdval_t;
10typedef u64 pudval_t;
fe1e8c3e 11typedef u64 p4dval_t;
54321d94
JF
12typedef u64 pgdval_t;
13typedef u64 pgprotval_t;
14
15typedef union {
16 struct {
17 unsigned long pte_low, pte_high;
18 };
19 pteval_t pte;
20} pte_t;
21#endif /* !__ASSEMBLY__ */
22
5311ab62 23#ifdef CONFIG_PARAVIRT
93b1eab3 24#define SHARED_KERNEL_PMD (pv_info.shared_kernel_pmd)
5311ab62
JF
25#else
26#define SHARED_KERNEL_PMD 1
27#endif
28
1da177e4
LT
29/*
30 * PGDIR_SHIFT determines what a top-level page table entry can map
31 */
32#define PGDIR_SHIFT 30
33#define PTRS_PER_PGD 4
34
35/*
36 * PMD_SHIFT determines the size of the area a middle-level
37 * page table can map
38 */
39#define PMD_SHIFT 21
40#define PTRS_PER_PMD 512
41
42/*
43 * entries per page directory level
44 */
45#define PTRS_PER_PTE 512
46
54321d94 47
1965aae3 48#endif /* _ASM_X86_PGTABLE_3LEVEL_DEFS_H */