direct-io.hg

view linux-2.6-xen-sparse/include/asm-i386/mach-xen/asm/agp.h @ 11509:2e6c10dc7c0b

[POWERPC][XEN] make sure put_domain() is called in case of allocate_rma() failuer

Signed-off-by: Jimi Xenidis <jimix@watson.ibm.com>
Signed-off-by: Hollis Blanchard <hollisb@us.ibm.com>
author Jimi Xenidis <jimix@watson.ibm.com>
date Tue Sep 12 10:53:46 2006 -0400 (2006-09-12)
parents fd9b2c1bb577
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