aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/char/agp/parisc-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/parisc-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/parisc-agp.c')
-rw-r--r--drivers/char/agp/parisc-agp.c12
1 files changed, 2 insertions, 10 deletions
diff --git a/drivers/char/agp/parisc-agp.c b/drivers/char/agp/parisc-agp.c
index f4bb43fb8016..1c129211302d 100644
--- a/drivers/char/agp/parisc-agp.c
+++ b/drivers/char/agp/parisc-agp.c
@@ -32,7 +32,7 @@
32#define AGP8X_MODE (1 << AGP8X_MODE_BIT) 32#define AGP8X_MODE (1 << AGP8X_MODE_BIT)
33 33
34static unsigned long 34static unsigned long
35parisc_agp_mask_memory(struct agp_bridge_data *bridge, unsigned long addr, 35parisc_agp_mask_memory(struct agp_bridge_data *bridge, dma_addr_t addr,
36 int type); 36 int type);
37 37
38static struct _parisc_agp_info { 38static struct _parisc_agp_info {
@@ -189,20 +189,12 @@ parisc_agp_remove_memory(struct agp_memory *mem, off_t pg_start, int type)
189} 189}
190 190
191static unsigned long 191static unsigned long
192parisc_agp_mask_memory(struct agp_bridge_data *bridge, unsigned long addr, 192parisc_agp_mask_memory(struct agp_bridge_data *bridge, dma_addr_t addr,
193 int type) 193 int type)
194{ 194{
195 return SBA_PDIR_VALID_BIT | addr; 195 return SBA_PDIR_VALID_BIT | addr;
196} 196}
197 197
198static unsigned long
199parisc_agp_page_mask_memory(struct agp_bridge_data *bridge, struct page *page,
200 int type)
201{
202 unsigned long addr = phys_to_gart(page_to_phys(page));
203 return SBA_PDIR_VALID_BIT | addr;
204}
205
206static void 198static void
207parisc_agp_enable(struct agp_bridge_data *bridge, u32 mode) 199parisc_agp_enable(struct agp_bridge_data *bridge, u32 mode)
208{ 200{