diff options
author | David Woodhouse <David.Woodhouse@intel.com> | 2009-07-27 05:27:29 -0400 |
---|---|---|
committer | David Woodhouse <David.Woodhouse@intel.com> | 2009-08-03 04:04:44 -0400 |
commit | 2a4ceb6d3e6a566cb4a9dc8f974177f031d27cd7 (patch) | |
tree | a21d2c5ad10522d9a1469e7cd985d5f1d8f5d17f /drivers/char/agp/sgi-agp.c | |
parent | ed680c4ad478d0fee9740f7d029087f181346564 (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/sgi-agp.c')
-rw-r--r-- | drivers/char/agp/sgi-agp.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/char/agp/sgi-agp.c b/drivers/char/agp/sgi-agp.c index d3ea2e4226b5..0d47fa847404 100644 --- a/drivers/char/agp/sgi-agp.c +++ b/drivers/char/agp/sgi-agp.c | |||
@@ -70,10 +70,9 @@ static void sgi_tioca_tlbflush(struct agp_memory *mem) | |||
70 | * entry. | 70 | * entry. |
71 | */ | 71 | */ |
72 | static unsigned long | 72 | static unsigned long |
73 | sgi_tioca_mask_memory(struct agp_bridge_data *bridge, | 73 | sgi_tioca_mask_memory(struct agp_bridge_data *bridge, dma_addr_t addr, |
74 | struct page *page, int type) | 74 | int type) |
75 | { | 75 | { |
76 | unsigned long addr = phys_to_gart(page_to_phys(page)); | ||
77 | return tioca_physpage_to_gart(addr); | 76 | return tioca_physpage_to_gart(addr); |
78 | } | 77 | } |
79 | 78 | ||
@@ -190,7 +189,8 @@ static int sgi_tioca_insert_memory(struct agp_memory *mem, off_t pg_start, | |||
190 | 189 | ||
191 | for (i = 0, j = pg_start; i < mem->page_count; i++, j++) { | 190 | for (i = 0, j = pg_start; i < mem->page_count; i++, j++) { |
192 | table[j] = | 191 | table[j] = |
193 | bridge->driver->mask_memory(bridge, mem->pages[i], | 192 | bridge->driver->mask_memory(bridge, |
193 | phys_to_gart(page_to_phys(mem->pages[i])), | ||
194 | mem->type); | 194 | mem->type); |
195 | } | 195 | } |
196 | 196 | ||