| .. | .. |
|---|
| 1 | +/* SPDX-License-Identifier: GPL-2.0-only */ |
|---|
| 1 | 2 | /* |
|---|
| 2 | 3 | * 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. |
|---|
| 7 | 4 | * |
|---|
| 8 | 5 | * vineetg: June 2011 |
|---|
| 9 | 6 | * -"/proc/meminfo | grep PageTables" kept on increasing |
|---|
| .. | .. |
|---|
| 21 | 18 | * vineetg: April 2010 |
|---|
| 22 | 19 | * -Switched pgtable_t from being struct page * to unsigned long |
|---|
| 23 | 20 | * =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 |
|---|
| 25 | 22 | * multiple PG Tbls in one Page Frame |
|---|
| 26 | 23 | * =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) |
|---|
| 28 | 25 | * |
|---|
| 29 | 26 | * Amit Bhor, Sameer Dhavale: Codito Technologies 2004 |
|---|
| 30 | 27 | */ |
|---|
| .. | .. |
|---|
| 90 | 87 | return get_order(PTRS_PER_PTE * sizeof(pte_t)); |
|---|
| 91 | 88 | } |
|---|
| 92 | 89 | |
|---|
| 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) |
|---|
| 95 | 91 | { |
|---|
| 96 | 92 | pte_t *pte; |
|---|
| 97 | 93 | |
|---|
| .. | .. |
|---|
| 102 | 98 | } |
|---|
| 103 | 99 | |
|---|
| 104 | 100 | static inline pgtable_t |
|---|
| 105 | | -pte_alloc_one(struct mm_struct *mm, unsigned long address) |
|---|
| 101 | +pte_alloc_one(struct mm_struct *mm) |
|---|
| 106 | 102 | { |
|---|
| 107 | 103 | pgtable_t pte_pg; |
|---|
| 108 | 104 | struct page *page; |
|---|
| .. | .. |
|---|
| 112 | 108 | return 0; |
|---|
| 113 | 109 | memzero((void *)pte_pg, PTRS_PER_PTE * sizeof(pte_t)); |
|---|
| 114 | 110 | page = virt_to_page(pte_pg); |
|---|
| 115 | | - if (!pgtable_page_ctor(page)) { |
|---|
| 111 | + if (!pgtable_pte_page_ctor(page)) { |
|---|
| 116 | 112 | __free_page(page); |
|---|
| 117 | 113 | return 0; |
|---|
| 118 | 114 | } |
|---|
| .. | .. |
|---|
| 127 | 123 | |
|---|
| 128 | 124 | static inline void pte_free(struct mm_struct *mm, pgtable_t ptep) |
|---|
| 129 | 125 | { |
|---|
| 130 | | - pgtable_page_dtor(virt_to_page(ptep)); |
|---|
| 126 | + pgtable_pte_page_dtor(virt_to_page(ptep)); |
|---|
| 131 | 127 | free_pages((unsigned long)ptep, __get_order_pte()); |
|---|
| 132 | 128 | } |
|---|
| 133 | 129 | |
|---|
| 134 | 130 | #define __pte_free_tlb(tlb, pte, addr) pte_free((tlb)->mm, pte) |
|---|
| 135 | 131 | |
|---|
| 136 | | -#define check_pgt_cache() do { } while (0) |
|---|
| 137 | 132 | #define pmd_pgtable(pmd) ((pgtable_t) pmd_page_vaddr(pmd)) |
|---|
| 138 | 133 | |
|---|
| 139 | 134 | #endif /* _ASM_ARC_PGALLOC_H */ |
|---|