forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-05-10 61598093bbdd283a7edc367d900f223070ead8d2
kernel/arch/arm64/include/asm/kernel-pgtable.h
....@@ -1,25 +1,14 @@
1
+/* SPDX-License-Identifier: GPL-2.0-only */
12 /*
23 * Kernel page table mapping
34 *
45 * Copyright (C) 2015 ARM Ltd.
5
- *
6
- * This program is free software; you can redistribute it and/or modify
7
- * it under the terms of the GNU General Public License version 2 as
8
- * published by the Free Software Foundation.
9
- *
10
- * This program is distributed in the hope that it will be useful,
11
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
12
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
- * GNU General Public License for more details.
14
- *
15
- * You should have received a copy of the GNU General Public License
16
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
176 */
187
198 #ifndef __ASM_KERNEL_PGTABLE_H
209 #define __ASM_KERNEL_PGTABLE_H
2110
22
-#include <asm/pgtable.h>
11
+#include <asm/pgtable-hwdef.h>
2312 #include <asm/sparsemem.h>
2413
2514 /*
....@@ -97,14 +86,8 @@
9786 + EARLY_PGDS((vstart), (vend)) /* each PGDIR needs a next level page table */ \
9887 + EARLY_PUDS((vstart), (vend)) /* each PUD needs a next level page table */ \
9988 + EARLY_PMDS((vstart), (vend))) /* each PMD needs a next level page table */
100
-#define SWAPPER_DIR_SIZE (PAGE_SIZE * EARLY_PAGES(KIMAGE_VADDR + TEXT_OFFSET, _end))
89
+#define INIT_DIR_SIZE (PAGE_SIZE * EARLY_PAGES(KIMAGE_VADDR, _end))
10190 #define IDMAP_DIR_SIZE (IDMAP_PGTABLE_LEVELS * PAGE_SIZE)
102
-
103
-#ifdef CONFIG_ARM64_SW_TTBR0_PAN
104
-#define RESERVED_TTBR0_SIZE (PAGE_SIZE)
105
-#else
106
-#define RESERVED_TTBR0_SIZE (0)
107
-#endif
10891
10992 /* Initial memory map size */
11093 #if ARM64_SWAPPER_USES_SECTION_MAPS