aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/char/agp/uninorth-agp.c
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2009-06-12 00:11:41 -0400
committerDave Airlie <airlied@redhat.com>2009-06-18 20:21:42 -0400
commit07613ba2f464f59949266f4337b75b91eb610795 (patch)
tree8e43a82571686492aba2269c2e7a49c323783af1 /drivers/char/agp/uninorth-agp.c
parent2908826d045a89805714e0a3055a99dc40565d41 (diff)
agp: switch AGP to use page array instead of unsigned long array
This switches AGP to use an array of pages for tracking the pages allocated to the GART. This should enable GEM on PAE to work a lot better as we can pass highmem pages to the PAT code and it will do the right thing with them. Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers/char/agp/uninorth-agp.c')
-rw-r--r--drivers/char/agp/uninorth-agp.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/char/agp/uninorth-agp.c b/drivers/char/agp/uninorth-agp.c
index 880d3f6d5b98..f192c3b9ad41 100644
--- a/drivers/char/agp/uninorth-agp.c
+++ b/drivers/char/agp/uninorth-agp.c
@@ -173,9 +173,9 @@ static int uninorth_insert_memory(struct agp_memory *mem, off_t pg_start,
173 173
174 for (i = 0, j = pg_start; i < mem->page_count; i++, j++) { 174 for (i = 0, j = pg_start; i < mem->page_count; i++, j++) {
175 agp_bridge->gatt_table[j] = 175 agp_bridge->gatt_table[j] =
176 cpu_to_le32((mem->memory[i] & 0xFFFFF000UL) | 0x1UL); 176 cpu_to_le32((page_to_phys(mem->pages[i]) & 0xFFFFF000UL) | 0x1UL);
177 flush_dcache_range((unsigned long)__va(mem->memory[i]), 177 flush_dcache_range((unsigned long)__va(page_to_phys(mem->pages[i])),
178 (unsigned long)__va(mem->memory[i])+0x1000); 178 (unsigned long)__va(page_to_phys(mem->pages[i]))+0x1000);
179 } 179 }
180 (void)in_le32((volatile u32*)&agp_bridge->gatt_table[pg_start]); 180 (void)in_le32((volatile u32*)&agp_bridge->gatt_table[pg_start]);
181 mb(); 181 mb();
@@ -219,9 +219,9 @@ static int u3_insert_memory(struct agp_memory *mem, off_t pg_start, int type)
219 } 219 }
220 220
221 for (i = 0; i < mem->page_count; i++) { 221 for (i = 0; i < mem->page_count; i++) {
222 gp[i] = (mem->memory[i] >> PAGE_SHIFT) | 0x80000000UL; 222 gp[i] = (page_to_phys(mem->pages[i]) >> PAGE_SHIFT) | 0x80000000UL;
223 flush_dcache_range((unsigned long)__va(mem->memory[i]), 223 flush_dcache_range((unsigned long)__va(page_to_phys(mem->pages[i])),
224 (unsigned long)__va(mem->memory[i])+0x1000); 224 (unsigned long)__va(page_to_phys(mem->pages[i]))+0x1000);
225 } 225 }
226 mb(); 226 mb();
227 flush_dcache_range((unsigned long)gp, (unsigned long) &gp[i]); 227 flush_dcache_range((unsigned long)gp, (unsigned long) &gp[i]);