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/amd64-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/amd64-agp.c')
-rw-r--r-- | drivers/char/agp/amd64-agp.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/char/agp/amd64-agp.c b/drivers/char/agp/amd64-agp.c index 399c042f68f0..1407945a5892 100644 --- a/drivers/char/agp/amd64-agp.c +++ b/drivers/char/agp/amd64-agp.c | |||
@@ -219,7 +219,7 @@ static struct aper_size_info_32 amd_8151_sizes[7] = | |||
219 | 219 | ||
220 | static int amd_8151_configure(void) | 220 | static int amd_8151_configure(void) |
221 | { | 221 | { |
222 | unsigned long gatt_bus = virt_to_phys(agp_bridge->gatt_table_real); | 222 | unsigned long gatt_bus = virt_to_gart(agp_bridge->gatt_table_real); |
223 | 223 | ||
224 | /* Configure AGP regs in each x86-64 host bridge. */ | 224 | /* Configure AGP regs in each x86-64 host bridge. */ |
225 | for_each_nb() { | 225 | for_each_nb() { |
@@ -591,7 +591,7 @@ static void __devexit agp_amd64_remove(struct pci_dev *pdev) | |||
591 | { | 591 | { |
592 | struct agp_bridge_data *bridge = pci_get_drvdata(pdev); | 592 | struct agp_bridge_data *bridge = pci_get_drvdata(pdev); |
593 | 593 | ||
594 | release_mem_region(virt_to_phys(bridge->gatt_table_real), | 594 | release_mem_region(virt_to_gart(bridge->gatt_table_real), |
595 | amd64_aperture_sizes[bridge->aperture_size_idx].size); | 595 | amd64_aperture_sizes[bridge->aperture_size_idx].size); |
596 | agp_remove_bridge(bridge); | 596 | agp_remove_bridge(bridge); |
597 | agp_put_bridge(bridge); | 597 | agp_put_bridge(bridge); |