diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2008-01-30 07:34:07 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-01-30 07:34:07 -0500 |
commit | d7c8f21a8cad0228c7c5ce2bb6dbd95d1ee49d13 (patch) | |
tree | d1e305bec62022a0bec82a3499a372c2c7c40583 /drivers/char/agp/intel-agp.c | |
parent | d1028a154c65d7fadd1b2d0276c077014d401ec7 (diff) |
x86: cpa: move flush to cpa
The set_memory_* and set_pages_* family of API's currently requires the
callers to do a global tlb flush after the function call; forgetting this is
a very nasty deathtrap. This patch moves the global tlb flush into
each of the callers
Signed-off-by: Arjan van de Ven <arjan@linux.intel.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'drivers/char/agp/intel-agp.c')
-rw-r--r-- | drivers/char/agp/intel-agp.c | 5 |
1 files changed, 0 insertions, 5 deletions
diff --git a/drivers/char/agp/intel-agp.c b/drivers/char/agp/intel-agp.c index c03a7143928f..189efb6ef970 100644 --- a/drivers/char/agp/intel-agp.c +++ b/drivers/char/agp/intel-agp.c | |||
@@ -212,11 +212,9 @@ static void *i8xx_alloc_pages(void) | |||
212 | 212 | ||
213 | if (set_pages_uc(page, 4) < 0) { | 213 | if (set_pages_uc(page, 4) < 0) { |
214 | set_pages_wb(page, 4); | 214 | set_pages_wb(page, 4); |
215 | global_flush_tlb(); | ||
216 | __free_pages(page, 2); | 215 | __free_pages(page, 2); |
217 | return NULL; | 216 | return NULL; |
218 | } | 217 | } |
219 | global_flush_tlb(); | ||
220 | get_page(page); | 218 | get_page(page); |
221 | atomic_inc(&agp_bridge->current_memory_agp); | 219 | atomic_inc(&agp_bridge->current_memory_agp); |
222 | return page_address(page); | 220 | return page_address(page); |
@@ -231,7 +229,6 @@ static void i8xx_destroy_pages(void *addr) | |||
231 | 229 | ||
232 | page = virt_to_page(addr); | 230 | page = virt_to_page(addr); |
233 | set_pages_wb(page, 4); | 231 | set_pages_wb(page, 4); |
234 | global_flush_tlb(); | ||
235 | put_page(page); | 232 | put_page(page); |
236 | __free_pages(page, 2); | 233 | __free_pages(page, 2); |
237 | atomic_dec(&agp_bridge->current_memory_agp); | 234 | atomic_dec(&agp_bridge->current_memory_agp); |
@@ -341,7 +338,6 @@ static struct agp_memory *alloc_agpphysmem_i8xx(size_t pg_count, int type) | |||
341 | 338 | ||
342 | switch (pg_count) { | 339 | switch (pg_count) { |
343 | case 1: addr = agp_bridge->driver->agp_alloc_page(agp_bridge); | 340 | case 1: addr = agp_bridge->driver->agp_alloc_page(agp_bridge); |
344 | global_flush_tlb(); | ||
345 | break; | 341 | break; |
346 | case 4: | 342 | case 4: |
347 | /* kludge to get 4 physical pages for ARGB cursor */ | 343 | /* kludge to get 4 physical pages for ARGB cursor */ |
@@ -404,7 +400,6 @@ static void intel_i810_free_by_type(struct agp_memory *curr) | |||
404 | else { | 400 | else { |
405 | agp_bridge->driver->agp_destroy_page(gart_to_virt(curr->memory[0]), | 401 | agp_bridge->driver->agp_destroy_page(gart_to_virt(curr->memory[0]), |
406 | AGP_PAGE_DESTROY_UNMAP); | 402 | AGP_PAGE_DESTROY_UNMAP); |
407 | global_flush_tlb(); | ||
408 | agp_bridge->driver->agp_destroy_page(gart_to_virt(curr->memory[0]), | 403 | agp_bridge->driver->agp_destroy_page(gart_to_virt(curr->memory[0]), |
409 | AGP_PAGE_DESTROY_FREE); | 404 | AGP_PAGE_DESTROY_FREE); |
410 | } | 405 | } |