]> err.no Git - linux-2.6/commitdiff
agp: don't lock pages
authorNick Piggin <npiggin@suse.de>
Wed, 25 Jul 2007 11:19:22 +0000 (13:19 +0200)
committerDave Airlie <airlied@redhat.com>
Fri, 27 Jul 2007 00:46:26 +0000 (10:46 +1000)
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>
drivers/char/agp/generic.c
drivers/char/agp/intel-agp.c
drivers/char/agp/sgi-agp.c

index d535c406b3192512433130cc3109a4d3cd77bfe2..3db4f4076ed4dae4292d8802b170efff796a036c 100644 (file)
@@ -1170,7 +1170,6 @@ void *agp_generic_alloc_page(struct agp_bridge_data *bridge)
        map_page_into_agp(page);
 
        get_page(page);
-       SetPageLocked(page);
        atomic_inc(&agp_bridge->current_memory_agp);
        return page_address(page);
 }
@@ -1187,7 +1186,6 @@ void agp_generic_destroy_page(void *addr)
        page = virt_to_page(addr);
        unmap_page_from_agp(page);
        put_page(page);
-       unlock_page(page);
        free_page((unsigned long)addr);
        atomic_dec(&agp_bridge->current_memory_agp);
 }
index a1240603912c2608f0137fa73ded8aa86a00e9e1..2f319f474f7090799ba1b31a28c842f5ac8d6fb1 100644 (file)
@@ -213,7 +213,6 @@ static void *i8xx_alloc_pages(void)
        }
        global_flush_tlb();
        get_page(page);
-       SetPageLocked(page);
        atomic_inc(&agp_bridge->current_memory_agp);
        return page_address(page);
 }
@@ -229,7 +228,6 @@ static void i8xx_destroy_pages(void *addr)
        change_page_attr(page, 4, PAGE_KERNEL);
        global_flush_tlb();
        put_page(page);
-       unlock_page(page);
        __free_pages(page, 2);
        atomic_dec(&agp_bridge->current_memory_agp);
 }
index cda608c42bea35e9fd7ed8f79f50ef1e9b8412ad..98cf8abb3e57f59ab3055934f4f460b3352d9c49 100644 (file)
@@ -51,7 +51,6 @@ static void *sgi_tioca_alloc_page(struct agp_bridge_data *bridge)
                return NULL;
 
        get_page(page);
-       SetPageLocked(page);
        atomic_inc(&agp_bridge->current_memory_agp);
        return page_address(page);
 }