[PATCH] change_page_attr and AGP update
[linux-2.6/history.git] / include / asm-x86_64 / agp.h
blob8c2fabe8041992b05cbf52476f446dc433b295b6
1 #ifndef AGP_H
2 #define AGP_H 1
4 #include <asm/cacheflush.h>
6 /*
7 * Functions to keep the agpgart mappings coherent.
8 * The GART gives the CPU a physical alias of memory. The alias is
9 * mapped uncacheable. Make sure there are no conflicting mappings
10 * with different cachability attributes for the same page.
13 #define map_page_into_agp(page) \
14 change_page_attr(page, __pgprot(__PAGE_KERNEL | _PAGE_PCD))
15 #define unmap_page_from_agp(page) change_page_attr(page, PAGE_KERNEL)
16 #define flush_agp_mappings() global_flush_tlb()
18 /* Could use CLFLUSH here if the cpu supports it. But then it would
19 need to be called for each cacheline of the whole page so it may not be
20 worth it. Would need a page for it. */
21 #define flush_agp_cache() asm volatile("wbinvd":::"memory")
23 #endif