|
@@ -57,7 +57,8 @@ int map_page_into_agp(struct page *page)
|
|
{
|
|
{
|
|
int i;
|
|
int i;
|
|
i = change_page_attr(page, 1, PAGE_KERNEL_NOCACHE);
|
|
i = change_page_attr(page, 1, PAGE_KERNEL_NOCACHE);
|
|
- global_flush_tlb();
|
|
|
|
|
|
+ /* Caller's responsibility to call global_flush_tlb() for
|
|
|
|
+ * performance reasons */
|
|
return i;
|
|
return i;
|
|
}
|
|
}
|
|
EXPORT_SYMBOL_GPL(map_page_into_agp);
|
|
EXPORT_SYMBOL_GPL(map_page_into_agp);
|
|
@@ -66,7 +67,8 @@ int unmap_page_from_agp(struct page *page)
|
|
{
|
|
{
|
|
int i;
|
|
int i;
|
|
i = change_page_attr(page, 1, PAGE_KERNEL);
|
|
i = change_page_attr(page, 1, PAGE_KERNEL);
|
|
- global_flush_tlb();
|
|
|
|
|
|
+ /* Caller's responsibility to call global_flush_tlb() for
|
|
|
|
+ * performance reasons */
|
|
return i;
|
|
return i;
|
|
}
|
|
}
|
|
EXPORT_SYMBOL_GPL(unmap_page_from_agp);
|
|
EXPORT_SYMBOL_GPL(unmap_page_from_agp);
|
|
@@ -153,6 +155,7 @@ void agp_free_memory(struct agp_memory *curr)
|
|
for (i = 0; i < curr->page_count; i++) {
|
|
for (i = 0; i < curr->page_count; i++) {
|
|
curr->bridge->driver->agp_destroy_page(gart_to_virt(curr->memory[i]));
|
|
curr->bridge->driver->agp_destroy_page(gart_to_virt(curr->memory[i]));
|
|
}
|
|
}
|
|
|
|
+ global_flush_tlb();
|
|
}
|
|
}
|
|
agp_free_key(curr->key);
|
|
agp_free_key(curr->key);
|
|
vfree(curr->memory);
|
|
vfree(curr->memory);
|
|
@@ -210,7 +213,9 @@ struct agp_memory *agp_allocate_memory(struct agp_bridge_data *bridge,
|
|
new->memory[i] = virt_to_gart(addr);
|
|
new->memory[i] = virt_to_gart(addr);
|
|
new->page_count++;
|
|
new->page_count++;
|
|
}
|
|
}
|
|
- new->bridge = bridge;
|
|
|
|
|
|
+ global_flush_tlb();
|
|
|
|
+
|
|
|
|
+ new->bridge = bridge;
|
|
|
|
|
|
flush_agp_mappings();
|
|
flush_agp_mappings();
|
|
|
|
|