Messages in this thread Patch in this message |  | | | From | Konrad Rzeszutek Wilk <> | | Subject | [PATCH 04/23] agp: Make agp_generic_[alloc|destroy]_pages use the _agp_[alloc|free]_page macro. | | Date | Mon, 6 Dec 2010 18:24:16 -0500 |
| |
This way when we want to opt in a platform to use the PCI DMA it is just the matter of changing the implementation in arch/<platform>/include/asm/agp.h
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> --- drivers/char/agp/generic.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/char/agp/generic.c b/drivers/char/agp/generic.c index bcefc66..cf465b5 100644 --- a/drivers/char/agp/generic.c +++ b/drivers/char/agp/generic.c @@ -1233,7 +1233,7 @@ int agp_generic_alloc_pages(struct agp_bridge_data *bridge, struct agp_memory *m int i, ret = -ENOMEM; for (i = 0; i < num_pages; i++) { - page = alloc_page(GFP_KERNEL | GFP_DMA32 | __GFP_ZERO); + page = _agp_alloc_page(agp_bridge, &mem->dma_addr[i]); /* agp_free_memory() needs gart address */ if (page == NULL) goto out; @@ -1292,7 +1292,7 @@ void agp_generic_destroy_pages(struct agp_memory *mem) unmap_page_from_agp(page); #endif put_page(page); - __free_page(page); + _agp_free_page(agp_bridge, page, &mem->dma_addr[i]); atomic_dec(&agp_bridge->current_memory_agp); mem->pages[i] = NULL; } -- 1.7.1
|  |