Commit a51b3459 authored by Nick Piggin's avatar Nick Piggin Committed by Dave Airlie

agp: don't lock pages

AGP should not need to lock pages. They are not protecting any race
because there is no lock_page calls, only SetPageLocked.

This is causing hangs with d00806b1.
Signed-off-by: default avatarNick Piggin <npiggin@suse.de>
Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
parent c99c108a
...@@ -1170,7 +1170,6 @@ void *agp_generic_alloc_page(struct agp_bridge_data *bridge) ...@@ -1170,7 +1170,6 @@ void *agp_generic_alloc_page(struct agp_bridge_data *bridge)
map_page_into_agp(page); map_page_into_agp(page);
get_page(page); get_page(page);
SetPageLocked(page);
atomic_inc(&agp_bridge->current_memory_agp); atomic_inc(&agp_bridge->current_memory_agp);
return page_address(page); return page_address(page);
} }
...@@ -1187,7 +1186,6 @@ void agp_generic_destroy_page(void *addr) ...@@ -1187,7 +1186,6 @@ void agp_generic_destroy_page(void *addr)
page = virt_to_page(addr); page = virt_to_page(addr);
unmap_page_from_agp(page); unmap_page_from_agp(page);
put_page(page); put_page(page);
unlock_page(page);
free_page((unsigned long)addr); free_page((unsigned long)addr);
atomic_dec(&agp_bridge->current_memory_agp); atomic_dec(&agp_bridge->current_memory_agp);
} }
......
...@@ -213,7 +213,6 @@ static void *i8xx_alloc_pages(void) ...@@ -213,7 +213,6 @@ static void *i8xx_alloc_pages(void)
} }
global_flush_tlb(); global_flush_tlb();
get_page(page); get_page(page);
SetPageLocked(page);
atomic_inc(&agp_bridge->current_memory_agp); atomic_inc(&agp_bridge->current_memory_agp);
return page_address(page); return page_address(page);
} }
...@@ -229,7 +228,6 @@ static void i8xx_destroy_pages(void *addr) ...@@ -229,7 +228,6 @@ static void i8xx_destroy_pages(void *addr)
change_page_attr(page, 4, PAGE_KERNEL); change_page_attr(page, 4, PAGE_KERNEL);
global_flush_tlb(); global_flush_tlb();
put_page(page); put_page(page);
unlock_page(page);
__free_pages(page, 2); __free_pages(page, 2);
atomic_dec(&agp_bridge->current_memory_agp); atomic_dec(&agp_bridge->current_memory_agp);
} }
......
...@@ -51,7 +51,6 @@ static void *sgi_tioca_alloc_page(struct agp_bridge_data *bridge) ...@@ -51,7 +51,6 @@ static void *sgi_tioca_alloc_page(struct agp_bridge_data *bridge)
return NULL; return NULL;
get_page(page); get_page(page);
SetPageLocked(page);
atomic_inc(&agp_bridge->current_memory_agp); atomic_inc(&agp_bridge->current_memory_agp);
return page_address(page); return page_address(page);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment