aboutsummaryrefslogtreecommitdiff
path: root/include/asm-x86
diff options
context:
space:
mode:
authorShaohua Li2008-08-04 14:51:30 +0800
committerIngo Molnar2008-08-15 16:30:48 +0200
commit466ae837424dcc538b1af2a0eaf53be32edcdbe7 (patch)
treefb19282470b844aa6e1affc52b65dd707196d223 /include/asm-x86
parent1ac2f7d55b7ee1613c90631e87fea22ec06781e5 (diff)
reduce tlb/cache flush times of agpgart memory allocation
To reduce tlb/cache flush, makes agp memory allocation do one flush after all pages in a region are changed to uc. All agp drivers except agp-sgi uses agp_generic_alloc_page() for .agp_alloc_page, so the patch should work for them. agp-sgi is only for ia64, so not a problem too. Signed-off-by: Shaohua Li <shaohua.li@intel.com> Cc: airlied@linux.ie Cc: Andrew Morton <akpm@linux-foundation.org> Cc: Arjan van de Ven <arjan@infradead.org> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'include/asm-x86')
-rw-r--r--include/asm-x86/agp.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/asm-x86/agp.h b/include/asm-x86/agp.h
index e4004a9f6a9a..181b9e984b3a 100644
--- a/include/asm-x86/agp.h
+++ b/include/asm-x86/agp.h
@@ -15,6 +15,9 @@
#define map_page_into_agp(page) set_pages_uc(page, 1)
#define unmap_page_from_agp(page) set_pages_wb(page, 1)
+#define map_page_into_agp_noflush(page) set_pages_uc_noflush(page, 1)
+#define map_page_into_agp_global_flush() set_memory_flush_all()
+
/*
* Could use CLFLUSH here if the cpu supports it. But then it would
* need to be called for each cacheline of the whole page so it may