aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/char/agp/amd-k7-agp.c
diff options
context:
space:
mode:
authorDavid Woodhouse <David.Woodhouse@intel.com>2009-07-27 05:27:29 -0400
committerDavid Woodhouse <David.Woodhouse@intel.com>2009-08-03 04:04:44 -0400
commit2a4ceb6d3e6a566cb4a9dc8f974177f031d27cd7 (patch)
treea21d2c5ad10522d9a1469e7cd985d5f1d8f5d17f /drivers/char/agp/amd-k7-agp.c
parented680c4ad478d0fee9740f7d029087f181346564 (diff)
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/amd-k7-agp.c')
-rw-r--r--drivers/char/agp/amd-k7-agp.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/char/agp/amd-k7-agp.c b/drivers/char/agp/amd-k7-agp.c
index ba9bde71eaaf..542a87895ae9 100644
--- a/drivers/char/agp/amd-k7-agp.c
+++ b/drivers/char/agp/amd-k7-agp.c
@@ -325,7 +325,9 @@ static int amd_insert_memory(struct agp_memory *mem, off_t pg_start, int type)
325 addr = (j * PAGE_SIZE) + agp_bridge->gart_bus_addr; 325 addr = (j * PAGE_SIZE) + agp_bridge->gart_bus_addr;
326 cur_gatt = GET_GATT(addr); 326 cur_gatt = GET_GATT(addr);
327 writel(agp_generic_mask_memory(agp_bridge, 327 writel(agp_generic_mask_memory(agp_bridge,
328 mem->pages[i], mem->type), cur_gatt+GET_GATT_OFF(addr)); 328 phys_to_gart(page_to_phys(mem->pages[i])),
329 mem->type),
330 cur_gatt+GET_GATT_OFF(addr));
329 readl(cur_gatt+GET_GATT_OFF(addr)); /* PCI Posting. */ 331 readl(cur_gatt+GET_GATT_OFF(addr)); /* PCI Posting. */
330 } 332 }
331 amd_irongate_tlbflush(mem); 333 amd_irongate_tlbflush(mem);