aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/char/agp/ali-agp.c
diff options
context:
space:
mode:
authorKeir Fraser <Keir.Fraser@cl.cam.ac.uk>2005-03-30 16:17:04 -0500
committerDave Jones <davej@redhat.com>2005-06-07 15:35:43 -0400
commit07eee78ea8ba2d0b7b20551c35a3e7dd158d50bb (patch)
treea11d2e705253faaa9779cfd83bb8ca9de311b195 /drivers/char/agp/ali-agp.c
parente29b545cb153f230fbd8ff4c19bc98ab950f9f5c (diff)
[PATCH] AGP fix for Xen VMM
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>
Diffstat (limited to 'drivers/char/agp/ali-agp.c')
-rw-r--r--drivers/char/agp/ali-agp.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/char/agp/ali-agp.c b/drivers/char/agp/ali-agp.c
index 0212febda654..9c9c9c2247ce 100644
--- a/drivers/char/agp/ali-agp.c
+++ b/drivers/char/agp/ali-agp.c
@@ -150,7 +150,7 @@ static void *m1541_alloc_page(struct agp_bridge_data *bridge)
150 pci_read_config_dword(agp_bridge->dev, ALI_CACHE_FLUSH_CTRL, &temp); 150 pci_read_config_dword(agp_bridge->dev, ALI_CACHE_FLUSH_CTRL, &temp);
151 pci_write_config_dword(agp_bridge->dev, ALI_CACHE_FLUSH_CTRL, 151 pci_write_config_dword(agp_bridge->dev, ALI_CACHE_FLUSH_CTRL,
152 (((temp & ALI_CACHE_FLUSH_ADDR_MASK) | 152 (((temp & ALI_CACHE_FLUSH_ADDR_MASK) |
153 virt_to_phys(addr)) | ALI_CACHE_FLUSH_EN )); 153 virt_to_gart(addr)) | ALI_CACHE_FLUSH_EN ));
154 return addr; 154 return addr;
155} 155}
156 156
@@ -174,7 +174,7 @@ static void m1541_destroy_page(void * addr)
174 pci_read_config_dword(agp_bridge->dev, ALI_CACHE_FLUSH_CTRL, &temp); 174 pci_read_config_dword(agp_bridge->dev, ALI_CACHE_FLUSH_CTRL, &temp);
175 pci_write_config_dword(agp_bridge->dev, ALI_CACHE_FLUSH_CTRL, 175 pci_write_config_dword(agp_bridge->dev, ALI_CACHE_FLUSH_CTRL,
176 (((temp & ALI_CACHE_FLUSH_ADDR_MASK) | 176 (((temp & ALI_CACHE_FLUSH_ADDR_MASK) |
177 virt_to_phys(addr)) | ALI_CACHE_FLUSH_EN)); 177 virt_to_gart(addr)) | ALI_CACHE_FLUSH_EN));
178 agp_generic_destroy_page(addr); 178 agp_generic_destroy_page(addr);
179} 179}
180 180