diff options
author | Keir Fraser <Keir.Fraser@cl.cam.ac.uk> | 2005-03-30 16:17:04 -0500 |
---|---|---|
committer | Dave Jones <davej@redhat.com> | 2005-06-07 15:35:43 -0400 |
commit | 07eee78ea8ba2d0b7b20551c35a3e7dd158d50bb (patch) | |
tree | a11d2e705253faaa9779cfd83bb8ca9de311b195 /drivers/char/agp/intel-agp.c | |
parent | e29b545cb153f230fbd8ff4c19bc98ab950f9f5c (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/intel-agp.c')
-rw-r--r-- | drivers/char/agp/intel-agp.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/char/agp/intel-agp.c b/drivers/char/agp/intel-agp.c index 6a5047e0d333..51266d6b4d78 100644 --- a/drivers/char/agp/intel-agp.c +++ b/drivers/char/agp/intel-agp.c | |||
@@ -286,7 +286,7 @@ static struct agp_memory *alloc_agpphysmem_i8xx(size_t pg_count, int type) | |||
286 | if (new == NULL) | 286 | if (new == NULL) |
287 | return NULL; | 287 | return NULL; |
288 | 288 | ||
289 | new->memory[0] = virt_to_phys(addr); | 289 | new->memory[0] = virt_to_gart(addr); |
290 | if (pg_count == 4) { | 290 | if (pg_count == 4) { |
291 | /* kludge to get 4 physical pages for ARGB cursor */ | 291 | /* kludge to get 4 physical pages for ARGB cursor */ |
292 | new->memory[1] = new->memory[0] + PAGE_SIZE; | 292 | new->memory[1] = new->memory[0] + PAGE_SIZE; |
@@ -329,10 +329,10 @@ static void intel_i810_free_by_type(struct agp_memory *curr) | |||
329 | agp_free_key(curr->key); | 329 | agp_free_key(curr->key); |
330 | if(curr->type == AGP_PHYS_MEMORY) { | 330 | if(curr->type == AGP_PHYS_MEMORY) { |
331 | if (curr->page_count == 4) | 331 | if (curr->page_count == 4) |
332 | i8xx_destroy_pages(phys_to_virt(curr->memory[0])); | 332 | i8xx_destroy_pages(gart_to_virt(curr->memory[0])); |
333 | else | 333 | else |
334 | agp_bridge->driver->agp_destroy_page( | 334 | agp_bridge->driver->agp_destroy_page( |
335 | phys_to_virt(curr->memory[0])); | 335 | gart_to_virt(curr->memory[0])); |
336 | vfree(curr->memory); | 336 | vfree(curr->memory); |
337 | } | 337 | } |
338 | kfree(curr); | 338 | kfree(curr); |