ia64/xen-unstable

view linux-2.6-xen-sparse/include/asm-xen/asm-i386/agp.h @ 8534:da7873110bbb

Tiny bootstrap cleanup.

Signed-off-by: Keir Fraser <keir@xensource.com>
author kaf24@firebug.cl.cam.ac.uk
date Mon Jan 09 19:46:46 2006 +0100 (2006-01-09)
parents 06d84bf87159
children
line source
1 #ifndef AGP_H
2 #define AGP_H 1
4 #include <asm/pgtable.h>
5 #include <asm/cacheflush.h>
6 #include <asm/system.h>
8 /*
9 * Functions to keep the agpgart mappings coherent with the MMU.
10 * The GART gives the CPU a physical alias of pages in memory. The alias region is
11 * mapped uncacheable. Make sure there are no conflicting mappings
12 * with different cachability attributes for the same page. This avoids
13 * data corruption on some CPUs.
14 */
16 int map_page_into_agp(struct page *page);
17 int unmap_page_from_agp(struct page *page);
18 #define flush_agp_mappings() global_flush_tlb()
20 /* Could use CLFLUSH here if the cpu supports it. But then it would
21 need to be called for each cacheline of the whole page so it may not be
22 worth it. Would need a page for it. */
23 #define flush_agp_cache() wbinvd()
25 /* Convert a physical address to an address suitable for the GART. */
26 #define phys_to_gart(x) phys_to_machine(x)
27 #define gart_to_phys(x) machine_to_phys(x)
29 /* GATT allocation. Returns/accepts GATT kernel virtual address. */
30 #define alloc_gatt_pages(order) ({ \
31 char *_t; dma_addr_t _d; \
32 _t = dma_alloc_coherent(NULL,PAGE_SIZE<<(order),&_d,GFP_KERNEL); \
33 _t; })
34 #define free_gatt_pages(table, order) \
35 dma_free_coherent(NULL,PAGE_SIZE<<(order),(table),virt_to_bus(table))
37 #endif