mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-12-16 15:34:48 +08:00
07eee78ea8
When Linux is running on the Xen virtual machine monitor, physical addresses are virtualised and cannot be directly referenced by the AGP GART. This patch fixes the GART driver for Xen by adding a layer of abstraction between physical addresses and 'GART addresses'. Architecture-specific functions are also defined for allocating and freeing the GATT. Xen requires this to ensure that table really is contiguous from the point of view of the GART. These extra interface functions are defined as 'no-ops' for all existing architectures that use the GART driver. Signed-off-by: Keir Fraser <keir@xensource.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Dave Jones <davej@redhat.com>
32 lines
989 B
C
32 lines
989 B
C
#ifndef _ASM_IA64_AGP_H
|
|
#define _ASM_IA64_AGP_H
|
|
|
|
/*
|
|
* IA-64 specific AGP definitions.
|
|
*
|
|
* Copyright (C) 2002-2003 Hewlett-Packard Co
|
|
* David Mosberger-Tang <davidm@hpl.hp.com>
|
|
*/
|
|
|
|
/*
|
|
* To avoid memory-attribute aliasing issues, we require that the AGPGART engine operate
|
|
* in coherent mode, which lets us map the AGP memory as normal (write-back) memory
|
|
* (unlike x86, where it gets mapped "write-coalescing").
|
|
*/
|
|
#define map_page_into_agp(page) /* nothing */
|
|
#define unmap_page_from_agp(page) /* nothing */
|
|
#define flush_agp_mappings() /* nothing */
|
|
#define flush_agp_cache() mb()
|
|
|
|
/* Convert a physical address to an address suitable for the GART. */
|
|
#define phys_to_gart(x) (x)
|
|
#define gart_to_phys(x) (x)
|
|
|
|
/* GATT allocation. Returns/accepts GATT kernel virtual address. */
|
|
#define alloc_gatt_pages(order) \
|
|
((char *)__get_free_pages(GFP_KERNEL, (order)))
|
|
#define free_gatt_pages(table, order) \
|
|
free_pages((unsigned long)(table), (order))
|
|
|
|
#endif /* _ASM_IA64_AGP_H */
|