aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/char/agp/intel-agp.c
diff options
context:
space:
mode:
authorJan Beulich <jbeulich@novell.com>2008-06-18 04:28:00 -0400
committerDave Airlie <airlied@redhat.com>2008-06-18 19:56:16 -0400
commitda503fa60b84d5945deb3ab74efdd0bec61df4a1 (patch)
tree9883d28cabdab419567a2c0689d06c938460eaa1 /drivers/char/agp/intel-agp.c
parentdcd981a77b2b35d169656d4b9cee208096ed7ccf (diff)
agp: two-stage page destruction issue
besides it apparently being useful only in 2.6.24 (the changes in 2.6.25 really mean that it could be converted back to a single-stage mechanism), I'm seeing an issue in Xen Dom0 kernels, which is caused by the calling of gart_to_virt() in the second stage invocations of the destroy function. I think that besides this being a real issue with Xen (where unmap_page_from_agp() is not just a page table attribute change), this also is invalid from a theoretical perspective: One should not assume that gart_to_virt() is still valid after unmapping a page. So minimally (keeping the 2-stage mechanism) a patch like the one below would be needed. Jan Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers/char/agp/intel-agp.c')
-rw-r--r--drivers/char/agp/intel-agp.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/char/agp/intel-agp.c b/drivers/char/agp/intel-agp.c
index eeea50a1d22a..01b03402ea92 100644
--- a/drivers/char/agp/intel-agp.c
+++ b/drivers/char/agp/intel-agp.c
@@ -418,9 +418,11 @@ static void intel_i810_free_by_type(struct agp_memory *curr)
418 if (curr->page_count == 4) 418 if (curr->page_count == 4)
419 i8xx_destroy_pages(gart_to_virt(curr->memory[0])); 419 i8xx_destroy_pages(gart_to_virt(curr->memory[0]));
420 else { 420 else {
421 agp_bridge->driver->agp_destroy_page(gart_to_virt(curr->memory[0]), 421 void *va = gart_to_virt(curr->memory[0]);
422
423 agp_bridge->driver->agp_destroy_page(va,
422 AGP_PAGE_DESTROY_UNMAP); 424 AGP_PAGE_DESTROY_UNMAP);
423 agp_bridge->driver->agp_destroy_page(gart_to_virt(curr->memory[0]), 425 agp_bridge->driver->agp_destroy_page(va,
424 AGP_PAGE_DESTROY_FREE); 426 AGP_PAGE_DESTROY_FREE);
425 } 427 }
426 agp_free_page_array(curr); 428 agp_free_page_array(curr);