diff options
author | Nick Piggin <npiggin@suse.de> | 2007-07-25 07:19:22 -0400 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2007-07-26 20:46:26 -0400 |
commit | a51b34593f691a0837d752a1394dcee19483c607 (patch) | |
tree | 1e87c0139aa6c5a96e73f3664e5c3856f2369c48 /drivers | |
parent | c99c108ac362f5cc37f79fad7e9897bd9d033bcc (diff) |
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 d00806b183152af6d24f46f0c33f14162ca1262a.
Signed-off-by: Nick Piggin <npiggin@suse.de>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/char/agp/generic.c | 2 | ||||
-rw-r--r-- | drivers/char/agp/intel-agp.c | 2 | ||||
-rw-r--r-- | drivers/char/agp/sgi-agp.c | 1 |
3 files changed, 0 insertions, 5 deletions
diff --git a/drivers/char/agp/generic.c b/drivers/char/agp/generic.c index d535c406b319..3db4f4076ed4 100644 --- a/drivers/char/agp/generic.c +++ b/drivers/char/agp/generic.c | |||
@@ -1170,7 +1170,6 @@ void *agp_generic_alloc_page(struct agp_bridge_data *bridge) | |||
1170 | map_page_into_agp(page); | 1170 | map_page_into_agp(page); |
1171 | 1171 | ||
1172 | get_page(page); | 1172 | get_page(page); |
1173 | SetPageLocked(page); | ||
1174 | atomic_inc(&agp_bridge->current_memory_agp); | 1173 | atomic_inc(&agp_bridge->current_memory_agp); |
1175 | return page_address(page); | 1174 | return page_address(page); |
1176 | } | 1175 | } |
@@ -1187,7 +1186,6 @@ void agp_generic_destroy_page(void *addr) | |||
1187 | page = virt_to_page(addr); | 1186 | page = virt_to_page(addr); |
1188 | unmap_page_from_agp(page); | 1187 | unmap_page_from_agp(page); |
1189 | put_page(page); | 1188 | put_page(page); |
1190 | unlock_page(page); | ||
1191 | free_page((unsigned long)addr); | 1189 | free_page((unsigned long)addr); |
1192 | atomic_dec(&agp_bridge->current_memory_agp); | 1190 | atomic_dec(&agp_bridge->current_memory_agp); |
1193 | } | 1191 | } |
diff --git a/drivers/char/agp/intel-agp.c b/drivers/char/agp/intel-agp.c index a1240603912c..2f319f474f70 100644 --- a/drivers/char/agp/intel-agp.c +++ b/drivers/char/agp/intel-agp.c | |||
@@ -213,7 +213,6 @@ static void *i8xx_alloc_pages(void) | |||
213 | } | 213 | } |
214 | global_flush_tlb(); | 214 | global_flush_tlb(); |
215 | get_page(page); | 215 | get_page(page); |
216 | SetPageLocked(page); | ||
217 | atomic_inc(&agp_bridge->current_memory_agp); | 216 | atomic_inc(&agp_bridge->current_memory_agp); |
218 | return page_address(page); | 217 | return page_address(page); |
219 | } | 218 | } |
@@ -229,7 +228,6 @@ static void i8xx_destroy_pages(void *addr) | |||
229 | change_page_attr(page, 4, PAGE_KERNEL); | 228 | change_page_attr(page, 4, PAGE_KERNEL); |
230 | global_flush_tlb(); | 229 | global_flush_tlb(); |
231 | put_page(page); | 230 | put_page(page); |
232 | unlock_page(page); | ||
233 | __free_pages(page, 2); | 231 | __free_pages(page, 2); |
234 | atomic_dec(&agp_bridge->current_memory_agp); | 232 | atomic_dec(&agp_bridge->current_memory_agp); |
235 | } | 233 | } |
diff --git a/drivers/char/agp/sgi-agp.c b/drivers/char/agp/sgi-agp.c index cda608c42bea..98cf8abb3e57 100644 --- a/drivers/char/agp/sgi-agp.c +++ b/drivers/char/agp/sgi-agp.c | |||
@@ -51,7 +51,6 @@ static void *sgi_tioca_alloc_page(struct agp_bridge_data *bridge) | |||
51 | return NULL; | 51 | return NULL; |
52 | 52 | ||
53 | get_page(page); | 53 | get_page(page); |
54 | SetPageLocked(page); | ||
55 | atomic_inc(&agp_bridge->current_memory_agp); | 54 | atomic_inc(&agp_bridge->current_memory_agp); |
56 | return page_address(page); | 55 | return page_address(page); |
57 | } | 56 | } |