Update ia64 patch to 2.5.69-030521, throwing away the parts included
[linux-flexiantxendom0-3.2.10.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 /*
24  * Page-protection value to be used for AGP memory mapped into kernel space.  For
25  * platforms which use coherent AGP DMA, this can be PAGE_KERNEL.  For others, it needs to
26  * be an uncached mapping (such as write-combining).
27  */
28 #define PAGE_AGP                        PAGE_KERNEL_NOCACHE
29
30 #endif