diff options
author | David Woodhouse <David.Woodhouse@intel.com> | 2009-07-27 11:27:29 +0200 |
---|---|---|
committer | David Woodhouse <David.Woodhouse@intel.com> | 2009-08-03 10:04:44 +0200 |
commit | 2a4ceb6d3e6a566cb4a9dc8f974177f031d27cd7 (patch) | |
tree | a21d2c5ad10522d9a1469e7cd985d5f1d8f5d17f /drivers/char/agp/ati-agp.c | |
parent | Linux 2.6.31-rc5 (diff) | |
download | linux-2a4ceb6d3e6a566cb4a9dc8f974177f031d27cd7.tar.xz linux-2a4ceb6d3e6a566cb4a9dc8f974177f031d27cd7.zip |
agp: Switch mask_memory() method to take address argument again, not page
In commit 07613ba2 ("agp: switch AGP to use page array instead of
unsigned long array") we switched the mask_memory() method to take a
'struct page *' instead of an address. This is painful, because in some
cases it has to be an IOMMU-mapped virtual bus address (in fact,
shouldn't it _always_ be a dma_addr_t returned from pci_map_xxx(), and
we just happen to get lucky most of the time?)
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Diffstat (limited to 'drivers/char/agp/ati-agp.c')
-rw-r--r-- | drivers/char/agp/ati-agp.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/char/agp/ati-agp.c b/drivers/char/agp/ati-agp.c index 33656e144cc5..59ebd60c1b60 100644 --- a/drivers/char/agp/ati-agp.c +++ b/drivers/char/agp/ati-agp.c @@ -302,7 +302,8 @@ static int ati_insert_memory(struct agp_memory * mem, addr = (j * PAGE_SIZE) + agp_bridge->gart_bus_addr; cur_gatt = GET_GATT(addr); writel(agp_bridge->driver->mask_memory(agp_bridge, - mem->pages[i], mem->type), + phys_to_gart(page_to_phys(mem->pages[i])), + mem->type), cur_gatt+GET_GATT_OFF(addr)); } readl(GET_GATT(agp_bridge->gart_bus_addr)); /* PCI posting */ |