aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/char/agp/efficeon-agp.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/char/agp/efficeon-agp.c')
-rw-r--r--drivers/char/agp/efficeon-agp.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/drivers/char/agp/efficeon-agp.c b/drivers/char/agp/efficeon-agp.c
index d78cd09186a..cac0009cebc 100644
--- a/drivers/char/agp/efficeon-agp.c
+++ b/drivers/char/agp/efficeon-agp.c
@@ -221,7 +221,7 @@ static int efficeon_create_gatt_table(struct agp_bridge_data *bridge)
221 SetPageReserved(virt_to_page((char *)page)); 221 SetPageReserved(virt_to_page((char *)page));
222 222
223 for (offset = 0; offset < PAGE_SIZE; offset += clflush_chunk) 223 for (offset = 0; offset < PAGE_SIZE; offset += clflush_chunk)
224 asm volatile("clflush %0" : : "m" (*(char *)(page+offset))); 224 clflush((char *)page+offset);
225 225
226 efficeon_private.l1_table[index] = page; 226 efficeon_private.l1_table[index] = page;
227 227
@@ -268,15 +268,16 @@ static int efficeon_insert_memory(struct agp_memory * mem, off_t pg_start, int t
268 *page = insert; 268 *page = insert;
269 269
270 /* clflush is slow, so don't clflush until we have to */ 270 /* clflush is slow, so don't clflush until we have to */
271 if ( last_page && 271 if (last_page &&
272 ((unsigned long)page^(unsigned long)last_page) & clflush_mask ) 272 (((unsigned long)page^(unsigned long)last_page) &
273 asm volatile("clflush %0" : : "m" (*last_page)); 273 clflush_mask))
274 clflush(last_page);
274 275
275 last_page = page; 276 last_page = page;
276 } 277 }
277 278
278 if ( last_page ) 279 if ( last_page )
279 asm volatile("clflush %0" : : "m" (*last_page)); 280 clflush(last_page);
280 281
281 agp_bridge->driver->tlb_flush(mem); 282 agp_bridge->driver->tlb_flush(mem);
282 return 0; 283 return 0;