Fix AGP compile on non-x86 architectures

AGP shouldn't use "global_flush_tlb()" to flush the AGP mappings, that i
spurely an x86'ism.  The proper AGP mapping flusher that should be used
is "flush_agp_mappings()", which on x86 obviously happens to do a global
TLB flush.

This makes AGP (or at least the config _I_ happen to use) compile again
on ppc64.

Signed-off-by: Linus Torvalds <torvalds@osdl.org>
This commit is contained in:
Linus Torvalds 2005-11-09 14:56:00 -08:00
parent 969780f807
commit 6730c3c144
2 changed files with 4 additions and 6 deletions

View File

@ -147,7 +147,7 @@ static int agp_backend_initialize(struct agp_bridge_data *bridge)
printk(KERN_ERR PFX "unable to get memory for scratch page.\n"); printk(KERN_ERR PFX "unable to get memory for scratch page.\n");
return -ENOMEM; return -ENOMEM;
} }
global_flush_tlb(); flush_agp_mappings();
bridge->scratch_page_real = virt_to_gart(addr); bridge->scratch_page_real = virt_to_gart(addr);
bridge->scratch_page = bridge->scratch_page =
@ -191,7 +191,7 @@ static int agp_backend_initialize(struct agp_bridge_data *bridge)
if (bridge->driver->needs_scratch_page) { if (bridge->driver->needs_scratch_page) {
bridge->driver->agp_destroy_page( bridge->driver->agp_destroy_page(
gart_to_virt(bridge->scratch_page_real)); gart_to_virt(bridge->scratch_page_real));
global_flush_tlb(); flush_agp_mappings();
} }
if (got_gatt) if (got_gatt)
bridge->driver->free_gatt_table(bridge); bridge->driver->free_gatt_table(bridge);
@ -217,7 +217,7 @@ static void agp_backend_cleanup(struct agp_bridge_data *bridge)
bridge->driver->needs_scratch_page) { bridge->driver->needs_scratch_page) {
bridge->driver->agp_destroy_page( bridge->driver->agp_destroy_page(
gart_to_virt(bridge->scratch_page_real)); gart_to_virt(bridge->scratch_page_real));
global_flush_tlb(); flush_agp_mappings();
} }
} }

View File

@ -155,7 +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(); flush_agp_mappings();
} }
agp_free_key(curr->key); agp_free_key(curr->key);
vfree(curr->memory); vfree(curr->memory);
@ -213,8 +213,6 @@ 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++;
} }
global_flush_tlb();
new->bridge = bridge; new->bridge = bridge;
flush_agp_mappings(); flush_agp_mappings();