From 6d238cc4dc8a36a3915c26202fe49f58a0683fb9 Mon Sep 17 00:00:00 2001 From: Arjan van de Ven Date: Wed, 30 Jan 2008 13:34:06 +0100 Subject: x86: convert CPA users to the new set_page_ API This patch converts various users of change_page_attr() to the new, more intent driven set_page_*/set_memory_* API set. Signed-off-by: Arjan van de Ven Signed-off-by: Thomas Gleixner Signed-off-by: Ingo Molnar --- include/asm-x86/agp.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'include/asm-x86/agp.h') diff --git a/include/asm-x86/agp.h b/include/asm-x86/agp.h index 62df2a9e713..f6df7256183 100644 --- a/include/asm-x86/agp.h +++ b/include/asm-x86/agp.h @@ -16,8 +16,8 @@ * Caller's responsibility to call global_flush_tlb() for performance * reasons */ -#define map_page_into_agp(page) change_page_attr(page, 1, PAGE_KERNEL_NOCACHE) -#define unmap_page_from_agp(page) change_page_attr(page, 1, PAGE_KERNEL) +#define map_page_into_agp(page) set_pages_uc(page, 1) +#define unmap_page_from_agp(page) set_pages_wb(page, 1) #define flush_agp_mappings() global_flush_tlb() /* -- cgit v1.2.3 From d7c8f21a8cad0228c7c5ce2bb6dbd95d1ee49d13 Mon Sep 17 00:00:00 2001 From: Thomas Gleixner Date: Wed, 30 Jan 2008 13:34:07 +0100 Subject: x86: cpa: move flush to cpa The set_memory_* and set_pages_* family of API's currently requires the callers to do a global tlb flush after the function call; forgetting this is a very nasty deathtrap. This patch moves the global tlb flush into each of the callers Signed-off-by: Arjan van de Ven Signed-off-by: Ingo Molnar Signed-off-by: Thomas Gleixner --- include/asm-x86/agp.h | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'include/asm-x86/agp.h') diff --git a/include/asm-x86/agp.h b/include/asm-x86/agp.h index f6df7256183..0c309b9a521 100644 --- a/include/asm-x86/agp.h +++ b/include/asm-x86/agp.h @@ -12,13 +12,9 @@ * page. This avoids data corruption on some CPUs. */ -/* - * Caller's responsibility to call global_flush_tlb() for performance - * reasons - */ #define map_page_into_agp(page) set_pages_uc(page, 1) #define unmap_page_from_agp(page) set_pages_wb(page, 1) -#define flush_agp_mappings() global_flush_tlb() +#define flush_agp_mappings() do { } while (0) /* * Could use CLFLUSH here if the cpu supports it. But then it would -- cgit v1.2.3 From 5398f9854f60d670e8ef1ea08c0e0310f253eeb1 Mon Sep 17 00:00:00 2001 From: Ingo Molnar Date: Wed, 30 Jan 2008 13:34:07 +0100 Subject: x86: remove flush_agp_mappings() Signed-off-by: Ingo Molnar Signed-off-by: Thomas Gleixner --- include/asm-x86/agp.h | 1 - 1 file changed, 1 deletion(-) (limited to 'include/asm-x86/agp.h') diff --git a/include/asm-x86/agp.h b/include/asm-x86/agp.h index 0c309b9a521..e4004a9f6a9 100644 --- a/include/asm-x86/agp.h +++ b/include/asm-x86/agp.h @@ -14,7 +14,6 @@ #define map_page_into_agp(page) set_pages_uc(page, 1) #define unmap_page_from_agp(page) set_pages_wb(page, 1) -#define flush_agp_mappings() do { } while (0) /* * Could use CLFLUSH here if the cpu supports it. But then it would -- cgit v1.2.3