ftp://ftp.kernel.org/pub/linux/kernel/v2.6/linux-2.6.6.tar.bz2
[linux-2.6.git] / include / asm-x86_64 / agp.h
1 #ifndef AGP_H
2 #define AGP_H 1
3
4 #include <asm/cacheflush.h>
5
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.
11  */
12
13 #define map_page_into_agp(page) \
14       change_page_attr(page, 1, PAGE_KERNEL_NOCACHE)
15 #define unmap_page_from_agp(page) change_page_attr(page, 1, PAGE_KERNEL)
16 #define flush_agp_mappings() global_flush_tlb()
17
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")
22
23 #endif