diff options
Diffstat (limited to 'drivers/char/agp/sgi-agp.c')
-rw-r--r-- | drivers/char/agp/sgi-agp.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/drivers/char/agp/sgi-agp.c b/drivers/char/agp/sgi-agp.c index b972d83bb1b2..d3ea2e4226b5 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[] = { | |||
38 | {0, 0, 0}, | 38 | {0, 0, 0}, |
39 | }; | 39 | }; |
40 | 40 | ||
41 | static void *sgi_tioca_alloc_page(struct agp_bridge_data *bridge) | 41 | static struct page *sgi_tioca_alloc_page(struct agp_bridge_data *bridge) |
42 | { | 42 | { |
43 | struct page *page; | 43 | struct page *page; |
44 | int nid; | 44 | int nid; |
@@ -52,7 +52,7 @@ static void *sgi_tioca_alloc_page(struct agp_bridge_data *bridge) | |||
52 | 52 | ||
53 | get_page(page); | 53 | get_page(page); |
54 | atomic_inc(&agp_bridge->current_memory_agp); | 54 | atomic_inc(&agp_bridge->current_memory_agp); |
55 | return page_address(page); | 55 | return page; |
56 | } | 56 | } |
57 | 57 | ||
58 | /* | 58 | /* |
@@ -71,8 +71,9 @@ static void sgi_tioca_tlbflush(struct agp_memory *mem) | |||
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, |
74 | unsigned long addr, int type) | 74 | struct page *page, int type) |
75 | { | 75 | { |
76 | unsigned long addr = phys_to_gart(page_to_phys(page)); | ||
76 | return tioca_physpage_to_gart(addr); | 77 | return tioca_physpage_to_gart(addr); |
77 | } | 78 | } |
78 | 79 | ||
@@ -189,7 +190,7 @@ static int sgi_tioca_insert_memory(struct agp_memory *mem, off_t pg_start, | |||
189 | 190 | ||
190 | for (i = 0, j = pg_start; i < mem->page_count; i++, j++) { | 191 | for (i = 0, j = pg_start; i < mem->page_count; i++, j++) { |
191 | table[j] = | 192 | table[j] = |
192 | bridge->driver->mask_memory(bridge, mem->memory[i], | 193 | bridge->driver->mask_memory(bridge, mem->pages[i], |
193 | mem->type); | 194 | mem->type); |
194 | } | 195 | } |
195 | 196 | ||