aboutsummaryrefslogtreecommitdiff
path: root/drivers/char/agp/sgi-agp.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/char/agp/sgi-agp.c')
-rw-r--r--drivers/char/agp/sgi-agp.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/drivers/char/agp/sgi-agp.c b/drivers/char/agp/sgi-agp.c
index b972d83bb1b..d3ea2e4226b 100644
--- a/drivers/char/agp/sgi-agp.c
+++ b/drivers/char/agp/sgi-agp.c
@@ -38,7 +38,7 @@ static struct aper_size_info_fixed sgi_tioca_sizes[] = {
{0, 0, 0},
};
-static void *sgi_tioca_alloc_page(struct agp_bridge_data *bridge)
+static struct page *sgi_tioca_alloc_page(struct agp_bridge_data *bridge)
{
struct page *page;
int nid;
@@ -52,7 +52,7 @@ static void *sgi_tioca_alloc_page(struct agp_bridge_data *bridge)
get_page(page);
atomic_inc(&agp_bridge->current_memory_agp);
- return page_address(page);
+ return page;
}
/*
@@ -71,8 +71,9 @@ static void sgi_tioca_tlbflush(struct agp_memory *mem)
*/
static unsigned long
sgi_tioca_mask_memory(struct agp_bridge_data *bridge,
- unsigned long addr, int type)
+ struct page *page, int type)
{
+ unsigned long addr = phys_to_gart(page_to_phys(page));
return tioca_physpage_to_gart(addr);
}
@@ -189,7 +190,7 @@ static int sgi_tioca_insert_memory(struct agp_memory *mem, off_t pg_start,
for (i = 0, j = pg_start; i < mem->page_count; i++, j++) {
table[j] =
- bridge->driver->mask_memory(bridge, mem->memory[i],
+ bridge->driver->mask_memory(bridge, mem->pages[i],
mem->type);
}