pgtable-frag.c (4b4193256c8d3bc3a5397b5cd9494c2ad386317d) | pgtable-frag.c (1fd02f6605b855b4af2883f29a2abc88bdf17857) |
---|---|
1// SPDX-License-Identifier: GPL-2.0 2 3/* 4 * Handling Page Tables through page fragments 5 * 6 */ 7 8#include <linux/kernel.h> --- 69 unchanged lines hidden (view full) --- 78 * if we support only one fragment just return the 79 * allocated page. 80 */ 81 if (PTE_FRAG_NR == 1) 82 return ret; 83 spin_lock(&mm->page_table_lock); 84 /* 85 * If we find pgtable_page set, we return | 1// SPDX-License-Identifier: GPL-2.0 2 3/* 4 * Handling Page Tables through page fragments 5 * 6 */ 7 8#include <linux/kernel.h> --- 69 unchanged lines hidden (view full) --- 78 * if we support only one fragment just return the 79 * allocated page. 80 */ 81 if (PTE_FRAG_NR == 1) 82 return ret; 83 spin_lock(&mm->page_table_lock); 84 /* 85 * If we find pgtable_page set, we return |
86 * the allocated page with single fragement | 86 * the allocated page with single fragment |
87 * count. 88 */ 89 if (likely(!pte_frag_get(&mm->context))) { 90 atomic_set(&page->pt_frag_refcount, PTE_FRAG_NR); 91 pte_frag_set(&mm->context, ret + PTE_FRAG_SIZE); 92 } 93 spin_unlock(&mm->page_table_lock); 94 --- 28 unchanged lines hidden --- | 87 * count. 88 */ 89 if (likely(!pte_frag_get(&mm->context))) { 90 atomic_set(&page->pt_frag_refcount, PTE_FRAG_NR); 91 pte_frag_set(&mm->context, ret + PTE_FRAG_SIZE); 92 } 93 spin_unlock(&mm->page_table_lock); 94 --- 28 unchanged lines hidden --- |