[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [linux-2.6.18-xen] linux: revert arch_free_page() change
# HG changeset patch # User Keir Fraser <keir@xxxxxxxxxxxxx> # Date 1193325019 -3600 # Node ID c8002e78cb1b8369427b5350a8334cb3da142469 # Parent 68398c665b33c052eb1460efc98d80f86312a641 linux: revert arch_free_page() change Since mm/page_alloc.c needs to be changed in two places anyway, the same effect can (now) be achieved with less modifications elsewhere. Signed-off-by: Jan Beulich <jbeulich@xxxxxxxxxx> --- arch/um/kernel/physmem.c | 4 +--- include/asm-i386/mach-xen/asm/page.h | 8 -------- include/asm-ia64/page.h | 9 --------- include/asm-powerpc/page.h | 9 --------- include/asm-um/page.h | 2 +- include/asm-x86_64/mach-xen/asm/page.h | 8 -------- include/linux/gfp.h | 6 +----- mm/page_alloc.c | 14 ++++++++++++-- 8 files changed, 15 insertions(+), 45 deletions(-) diff -r 68398c665b33 -r c8002e78cb1b arch/um/kernel/physmem.c --- a/arch/um/kernel/physmem.c Thu Oct 25 16:07:39 2007 +0100 +++ b/arch/um/kernel/physmem.c Thu Oct 25 16:10:19 2007 +0100 @@ -226,7 +226,7 @@ EXPORT_SYMBOL(physmem_remove_mapping); EXPORT_SYMBOL(physmem_remove_mapping); EXPORT_SYMBOL(physmem_subst_mapping); -int arch_free_page(struct page *page, int order) +void arch_free_page(struct page *page, int order) { void *virt; int i; @@ -235,8 +235,6 @@ int arch_free_page(struct page *page, in virt = __va(page_to_phys(page + i)); physmem_remove_mapping(virt); } - - return 0; } int is_remapped(void *virt) diff -r 68398c665b33 -r c8002e78cb1b include/asm-i386/mach-xen/asm/page.h --- a/include/asm-i386/mach-xen/asm/page.h Thu Oct 25 16:07:39 2007 +0100 +++ b/include/asm-i386/mach-xen/asm/page.h Thu Oct 25 16:10:19 2007 +0100 @@ -36,14 +36,6 @@ #include <asm/bug.h> #include <xen/interface/xen.h> #include <xen/features.h> - -#define arch_free_page(_page,_order) \ -({ int foreign = PageForeign(_page); \ - if (foreign) \ - PageForeignDestructor(_page); \ - foreign; \ -}) -#define HAVE_ARCH_FREE_PAGE #ifdef CONFIG_X86_USE_3DNOW diff -r 68398c665b33 -r c8002e78cb1b include/asm-ia64/page.h --- a/include/asm-ia64/page.h Thu Oct 25 16:07:39 2007 +0100 +++ b/include/asm-ia64/page.h Thu Oct 25 16:10:19 2007 +0100 @@ -239,15 +239,6 @@ get_order (unsigned long size) #include <asm/maddr.h> -#define arch_free_page(_page, _order) \ -({ \ - int foreign = PageForeign(_page); \ - if (foreign) \ - PageForeignDestructor(_page); \ - foreign; \ -}) -#define HAVE_ARCH_FREE_PAGE - #endif /* CONFIG_XEN */ #endif /* __ASSEMBLY__ */ diff -r 68398c665b33 -r c8002e78cb1b include/asm-powerpc/page.h --- a/include/asm-powerpc/page.h Thu Oct 25 16:07:39 2007 +0100 +++ b/include/asm-powerpc/page.h Thu Oct 25 16:10:19 2007 +0100 @@ -194,15 +194,6 @@ struct vm_area_struct; struct vm_area_struct; extern const char *arch_vma_name(struct vm_area_struct *vma); -#define arch_free_page(_page, _order) \ -({ \ - int foreign = PageForeign(_page); \ - if (foreign) \ - PageForeignDestructor(_page); \ - foreign; \ -}) -#define HAVE_ARCH_FREE_PAGE - #include <asm-generic/memory_model.h> #endif /* __ASSEMBLY__ */ diff -r 68398c665b33 -r c8002e78cb1b include/asm-um/page.h --- a/include/asm-um/page.h Thu Oct 25 16:07:39 2007 +0100 +++ b/include/asm-um/page.h Thu Oct 25 16:10:19 2007 +0100 @@ -114,7 +114,7 @@ extern struct page *arch_validate(struct extern struct page *arch_validate(struct page *page, gfp_t mask, int order); #define HAVE_ARCH_VALIDATE -extern int arch_free_page(struct page *page, int order); +extern void arch_free_page(struct page *page, int order); #define HAVE_ARCH_FREE_PAGE #include <asm-generic/memory_model.h> diff -r 68398c665b33 -r c8002e78cb1b include/asm-x86_64/mach-xen/asm/page.h --- a/include/asm-x86_64/mach-xen/asm/page.h Thu Oct 25 16:07:39 2007 +0100 +++ b/include/asm-x86_64/mach-xen/asm/page.h Thu Oct 25 16:10:19 2007 +0100 @@ -15,14 +15,6 @@ * below. The preprocessor will warn if the two definitions aren't identical. */ #define _PAGE_PRESENT 0x001 - -#define arch_free_page(_page,_order) \ -({ int foreign = PageForeign(_page); \ - if (foreign) \ - PageForeignDestructor(_page); \ - foreign; \ -}) -#define HAVE_ARCH_FREE_PAGE /* PAGE_SHIFT determines the page size */ #define PAGE_SHIFT 12 diff -r 68398c665b33 -r c8002e78cb1b include/linux/gfp.h --- a/include/linux/gfp.h Thu Oct 25 16:07:39 2007 +0100 +++ b/include/linux/gfp.h Thu Oct 25 16:10:19 2007 +0100 @@ -99,11 +99,7 @@ static inline int gfp_zone(gfp_t gfp) */ #ifndef HAVE_ARCH_FREE_PAGE -/* - * If arch_free_page returns non-zero then the generic free_page code can - * immediately bail: the arch-specific function has done all the work. - */ -static inline int arch_free_page(struct page *page, int order) { return 0; } +static inline void arch_free_page(struct page *page, int order) { } #endif extern struct page * diff -r 68398c665b33 -r c8002e78cb1b mm/page_alloc.c --- a/mm/page_alloc.c Thu Oct 25 16:07:39 2007 +0100 +++ b/mm/page_alloc.c Thu Oct 25 16:10:19 2007 +0100 @@ -451,8 +451,13 @@ static void __free_pages_ok(struct page int i; int reserved = 0; - if (arch_free_page(page, order)) +#ifdef CONFIG_XEN + if (PageForeign(page)) { + PageForeignDestructor(page); return; + } +#endif + arch_free_page(page, order); if (!PageHighMem(page)) debug_check_no_locks_freed(page_address(page), PAGE_SIZE<<order); @@ -730,8 +735,13 @@ static void fastcall free_hot_cold_page( struct per_cpu_pages *pcp; unsigned long flags; - if (arch_free_page(page, 0)) +#ifdef CONFIG_XEN + if (PageForeign(page)) { + PageForeignDestructor(page); return; + } +#endif + arch_free_page(page, 0); if (PageAnon(page)) page->mapping = NULL; _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |