ia64/xen-unstable
changeset 9287:f00e257d200c
There is no need to pin page tables when XENFEAT_writable_page_tables
is enabled.
Signed-off-by: Ian Campbell <ian.campbell@xensource.com>
is enabled.
Signed-off-by: Ian Campbell <ian.campbell@xensource.com>
author | Ian.Campbell@xensource.com |
---|---|
date | Wed Mar 15 10:33:43 2006 +0000 (2006-03-15) |
parents | 06e3c5ef2979 |
children | 890fa761ba82 |
files | linux-2.6-xen-sparse/arch/i386/mm/pgtable-xen.c linux-2.6-xen-sparse/arch/x86_64/mm/pageattr-xen.c |
line diff
1.1 --- a/linux-2.6-xen-sparse/arch/i386/mm/pgtable-xen.c Wed Mar 15 11:09:20 2006 +0100 1.2 +++ b/linux-2.6-xen-sparse/arch/i386/mm/pgtable-xen.c Wed Mar 15 10:33:43 2006 +0000 1.3 @@ -587,6 +587,8 @@ static void pgd_test_and_unpin(pgd_t *pg 1.4 1.5 void mm_pin(struct mm_struct *mm) 1.6 { 1.7 + if (xen_feature(XENFEAT_writable_page_tables)) 1.8 + return; 1.9 spin_lock(&mm->page_table_lock); 1.10 __pgd_pin(mm->pgd); 1.11 spin_unlock(&mm->page_table_lock); 1.12 @@ -594,6 +596,8 @@ void mm_pin(struct mm_struct *mm) 1.13 1.14 void mm_unpin(struct mm_struct *mm) 1.15 { 1.16 + if (xen_feature(XENFEAT_writable_page_tables)) 1.17 + return; 1.18 spin_lock(&mm->page_table_lock); 1.19 __pgd_unpin(mm->pgd); 1.20 spin_unlock(&mm->page_table_lock); 1.21 @@ -602,6 +606,8 @@ void mm_unpin(struct mm_struct *mm) 1.22 void mm_pin_all(void) 1.23 { 1.24 struct page *page; 1.25 + if (xen_feature(XENFEAT_writable_page_tables)) 1.26 + return; 1.27 for (page = pgd_list; page; page = (struct page *)page->index) { 1.28 if (!test_bit(PG_pinned, &page->flags)) 1.29 __pgd_pin((pgd_t *)page_address(page));
2.1 --- a/linux-2.6-xen-sparse/arch/x86_64/mm/pageattr-xen.c Wed Mar 15 11:09:20 2006 +0100 2.2 +++ b/linux-2.6-xen-sparse/arch/x86_64/mm/pageattr-xen.c Wed Mar 15 10:33:43 2006 +0000 2.3 @@ -71,6 +71,9 @@ static void mm_walk(struct mm_struct *mm 2.4 2.5 void mm_pin(struct mm_struct *mm) 2.6 { 2.7 + if (xen_feature(XENFEAT_writable_page_tables)) 2.8 + return; 2.9 + 2.10 spin_lock(&mm->page_table_lock); 2.11 2.12 mm_walk(mm, PAGE_KERNEL_RO); 2.13 @@ -94,6 +97,9 @@ void mm_pin(struct mm_struct *mm) 2.14 2.15 void mm_unpin(struct mm_struct *mm) 2.16 { 2.17 + if (xen_feature(XENFEAT_writable_page_tables)) 2.18 + return; 2.19 + 2.20 spin_lock(&mm->page_table_lock); 2.21 2.22 xen_pgd_unpin(__pa(mm->pgd)); 2.23 @@ -116,6 +122,9 @@ void mm_unpin(struct mm_struct *mm) 2.24 2.25 void mm_pin_all(void) 2.26 { 2.27 + if (xen_feature(XENFEAT_writable_page_tables)) 2.28 + return; 2.29 + 2.30 while (!list_empty(&mm_unpinned)) 2.31 mm_pin(list_entry(mm_unpinned.next, struct mm_struct, 2.32 context.unpinned));