[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1291677875-30493-5-git-send-email-konrad.wilk@oracle.com>
Date: Mon, 6 Dec 2010 18:24:16 -0500
From: Konrad Rzeszutek Wilk <konrad.wilk@...cle.com>
To: airlied@...ux.ie, tglx@...utronix.de, hpa@...or.com,
airlied@...hat.com, linux-kernel@...r.kernel.org, konrad@...nel.org
Cc: Jeremy Fitzhardinge <jeremy@...p.org>,
Konrad Rzeszutek Wilk <konrad.wilk@...cle.com>
Subject: [PATCH 04/23] agp: Make agp_generic_[alloc|destroy]_pages use the _agp_[alloc|free]_page macro.
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@...cle.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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists