Skip to content

Commit 6730c3c

Browse files
author
Linus Torvalds
committed
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>
1 parent 969780f commit 6730c3c

File tree

2 files changed

+4
-6
lines changed

2 files changed

+4
-6
lines changed

drivers/char/agp/backend.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ static int agp_backend_initialize(struct agp_bridge_data *bridge)
147147
printk(KERN_ERR PFX "unable to get memory for scratch page.\n");
148148
return -ENOMEM;
149149
}
150-
global_flush_tlb();
150+
flush_agp_mappings();
151151

152152
bridge->scratch_page_real = virt_to_gart(addr);
153153
bridge->scratch_page =
@@ -191,7 +191,7 @@ static int agp_backend_initialize(struct agp_bridge_data *bridge)
191191
if (bridge->driver->needs_scratch_page) {
192192
bridge->driver->agp_destroy_page(
193193
gart_to_virt(bridge->scratch_page_real));
194-
global_flush_tlb();
194+
flush_agp_mappings();
195195
}
196196
if (got_gatt)
197197
bridge->driver->free_gatt_table(bridge);
@@ -217,7 +217,7 @@ static void agp_backend_cleanup(struct agp_bridge_data *bridge)
217217
bridge->driver->needs_scratch_page) {
218218
bridge->driver->agp_destroy_page(
219219
gart_to_virt(bridge->scratch_page_real));
220-
global_flush_tlb();
220+
flush_agp_mappings();
221221
}
222222
}
223223

drivers/char/agp/generic.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ void agp_free_memory(struct agp_memory *curr)
155155
for (i = 0; i < curr->page_count; i++) {
156156
curr->bridge->driver->agp_destroy_page(gart_to_virt(curr->memory[i]));
157157
}
158-
global_flush_tlb();
158+
flush_agp_mappings();
159159
}
160160
agp_free_key(curr->key);
161161
vfree(curr->memory);
@@ -213,8 +213,6 @@ struct agp_memory *agp_allocate_memory(struct agp_bridge_data *bridge,
213213
new->memory[i] = virt_to_gart(addr);
214214
new->page_count++;
215215
}
216-
global_flush_tlb();
217-
218216
new->bridge = bridge;
219217

220218
flush_agp_mappings();

0 commit comments

Comments
 (0)