hc
2023-12-09 b22da3d8526a935aa31e086e63f60ff3246cb61c
kernel/arch/arm64/mm/pgd.c
....@@ -1,20 +1,9 @@
1
+// SPDX-License-Identifier: GPL-2.0-only
12 /*
23 * PGD allocation/freeing
34 *
45 * Copyright (C) 2012 ARM Ltd.
56 * Author: Catalin Marinas <catalin.marinas@arm.com>
6
- *
7
- * This program is free software; you can redistribute it and/or modify
8
- * it under the terms of the GNU General Public License version 2 as
9
- * published by the Free Software Foundation.
10
- *
11
- * This program is distributed in the hope that it will be useful,
12
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
13
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
- * GNU General Public License for more details.
15
- *
16
- * You should have received a copy of the GNU General Public License
17
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
187 */
198
209 #include <linux/mm.h>
....@@ -30,10 +19,12 @@
3019
3120 pgd_t *pgd_alloc(struct mm_struct *mm)
3221 {
22
+ gfp_t gfp = GFP_PGTABLE_USER;
23
+
3324 if (PGD_SIZE == PAGE_SIZE)
34
- return (pgd_t *)__get_free_page(PGALLOC_GFP);
25
+ return (pgd_t *)__get_free_page(gfp);
3526 else
36
- return kmem_cache_alloc(pgd_cache, PGALLOC_GFP);
27
+ return kmem_cache_alloc(pgd_cache, gfp);
3728 }
3829
3930 void pgd_free(struct mm_struct *mm, pgd_t *pgd)
....@@ -44,7 +35,7 @@
4435 kmem_cache_free(pgd_cache, pgd);
4536 }
4637
47
-void __init pgd_cache_init(void)
38
+void __init pgtable_cache_init(void)
4839 {
4940 if (PGD_SIZE == PAGE_SIZE)
5041 return;