hc
2024-05-10 10ebd8556b7990499c896a550e3d416b444211e6
kernel/arch/arc/include/asm/pgalloc.h
....@@ -1,9 +1,6 @@
1
+/* SPDX-License-Identifier: GPL-2.0-only */
12 /*
23 * Copyright (C) 2004, 2007-2010, 2011-2012 Synopsys, Inc. (www.synopsys.com)
3
- *
4
- * This program is free software; you can redistribute it and/or modify
5
- * it under the terms of the GNU General Public License version 2 as
6
- * published by the Free Software Foundation.
74 *
85 * vineetg: June 2011
96 * -"/proc/meminfo | grep PageTables" kept on increasing
....@@ -21,10 +18,10 @@
2118 * vineetg: April 2010
2219 * -Switched pgtable_t from being struct page * to unsigned long
2320 * =Needed so that Page Table allocator (pte_alloc_one) is not forced to
24
- * to deal with struct page. Thay way in future we can make it allocate
21
+ * deal with struct page. That way in future we can make it allocate
2522 * multiple PG Tbls in one Page Frame
2623 * =sweet side effect is avoiding calls to ugly page_address( ) from the
27
- * pg-tlb allocator sub-sys (pte_alloc_one, ptr_free, pmd_populate
24
+ * pg-tlb allocator sub-sys (pte_alloc_one, ptr_free, pmd_populate)
2825 *
2926 * Amit Bhor, Sameer Dhavale: Codito Technologies 2004
3027 */
....@@ -90,8 +87,7 @@
9087 return get_order(PTRS_PER_PTE * sizeof(pte_t));
9188 }
9289
93
-static inline pte_t *pte_alloc_one_kernel(struct mm_struct *mm,
94
- unsigned long address)
90
+static inline pte_t *pte_alloc_one_kernel(struct mm_struct *mm)
9591 {
9692 pte_t *pte;
9793
....@@ -102,7 +98,7 @@
10298 }
10399
104100 static inline pgtable_t
105
-pte_alloc_one(struct mm_struct *mm, unsigned long address)
101
+pte_alloc_one(struct mm_struct *mm)
106102 {
107103 pgtable_t pte_pg;
108104 struct page *page;
....@@ -112,7 +108,7 @@
112108 return 0;
113109 memzero((void *)pte_pg, PTRS_PER_PTE * sizeof(pte_t));
114110 page = virt_to_page(pte_pg);
115
- if (!pgtable_page_ctor(page)) {
111
+ if (!pgtable_pte_page_ctor(page)) {
116112 __free_page(page);
117113 return 0;
118114 }
....@@ -127,13 +123,12 @@
127123
128124 static inline void pte_free(struct mm_struct *mm, pgtable_t ptep)
129125 {
130
- pgtable_page_dtor(virt_to_page(ptep));
126
+ pgtable_pte_page_dtor(virt_to_page(ptep));
131127 free_pages((unsigned long)ptep, __get_order_pte());
132128 }
133129
134130 #define __pte_free_tlb(tlb, pte, addr) pte_free((tlb)->mm, pte)
135131
136
-#define check_pgt_cache() do { } while (0)
137132 #define pmd_pgtable(pmd) ((pgtable_t) pmd_page_vaddr(pmd))
138133
139134 #endif /* _ASM_ARC_PGALLOC_H */