diff options
author | kaf24@freefall.cl.cam.ac.uk <kaf24@freefall.cl.cam.ac.uk> | 2004-11-16 11:56:15 +0000 |
---|---|---|
committer | kaf24@freefall.cl.cam.ac.uk <kaf24@freefall.cl.cam.ac.uk> | 2004-11-16 11:56:15 +0000 |
commit | 9f9af87611c442c4a587a02f8dbe4b4eee631204 (patch) | |
tree | 08517575c994c649f55b23e77863229eba655112 | |
parent | 7777720dbf54f01df426c258a6f18402535fe651 (diff) | |
download | xen-9f9af87611c442c4a587a02f8dbe4b4eee631204.tar.gz xen-9f9af87611c442c4a587a02f8dbe4b4eee631204.tar.bz2 xen-9f9af87611c442c4a587a02f8dbe4b4eee631204.zip |
bitkeeper revision 1.1159.174.3 (4199eadf9ra8mQPwvvr9Ke8eQfkfIg)
Fix CONFIG_DEBUG_PAGEALLOC. More generally, this fixes
__change_page_attr at the same time (incompatible with writable
pagetables).
-rw-r--r-- | linux-2.6.9-xen-sparse/arch/xen/i386/mm/pageattr.c | 5 | ||||
-rw-r--r-- | linux-2.6.9-xen-sparse/include/asm-xen/asm-i386/pgtable-2level.h | 9 |
2 files changed, 6 insertions, 8 deletions
diff --git a/linux-2.6.9-xen-sparse/arch/xen/i386/mm/pageattr.c b/linux-2.6.9-xen-sparse/arch/xen/i386/mm/pageattr.c index 19f9d9c525..74f3b150df 100644 --- a/linux-2.6.9-xen-sparse/arch/xen/i386/mm/pageattr.c +++ b/linux-2.6.9-xen-sparse/arch/xen/i386/mm/pageattr.c @@ -119,7 +119,7 @@ __change_page_attr(struct page *page, pgprot_t prot) if ((pte_val(*kpte) & _PAGE_PSE) == 0) { pte_t old = *kpte; pte_t standard = mk_pte(page, PAGE_KERNEL); - set_pte_atomic(kpte, mk_pte(page, prot)); + set_pte_batched(kpte, mk_pte(page, prot)); if (pte_same(old,standard)) get_page(kpte_page); } else { @@ -130,7 +130,7 @@ __change_page_attr(struct page *page, pgprot_t prot) set_pmd_pte(kpte,address,mk_pte(split, PAGE_KERNEL)); } } else if ((pte_val(*kpte) & _PAGE_PSE) == 0) { - set_pte_atomic(kpte, mk_pte(page, PAGE_KERNEL)); + set_pte_batched(kpte, mk_pte(page, PAGE_KERNEL)); __put_page(kpte_page); } @@ -171,6 +171,7 @@ int change_page_attr(struct page *page, int numpages, pgprot_t prot) if (err) break; } + flush_page_update_queue(); spin_unlock_irqrestore(&cpa_lock, flags); return err; } diff --git a/linux-2.6.9-xen-sparse/include/asm-xen/asm-i386/pgtable-2level.h b/linux-2.6.9-xen-sparse/include/asm-xen/asm-i386/pgtable-2level.h index aa23bd9d55..7000c5dbe8 100644 --- a/linux-2.6.9-xen-sparse/include/asm-xen/asm-i386/pgtable-2level.h +++ b/linux-2.6.9-xen-sparse/include/asm-xen/asm-i386/pgtable-2level.h @@ -23,13 +23,10 @@ static inline int pgd_present(pgd_t pgd) { return 1; } * within a page table are directly modified. Thus, the following * hook is made available. */ -#ifdef CONFIG_XEN_WRITABLE_PAGETABLES +#define set_pte_batched(pteptr, pteval) \ +queue_l1_entry_update(pteptr, (pteval).pte_low) #define set_pte(pteptr, pteval) (*(pteptr) = pteval) -#define set_pte_atomic(pteptr, pteval) (*(pteptr) = pteval) -#else -#define set_pte(pteptr, pteval) xen_l1_entry_update(pteptr, (pteval).pte_low) -#define set_pte_atomic(pteptr, pteval) xen_l1_entry_update(pteptr, (pteval).pte_low) -#endif +#define set_pte_atomic(pteptr, pteval) set_pte(pteptr,pteval) /* * (pmds are folded into pgds so this doesn't get actually called, * but the define is needed for a generic inline function.) |