Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 200712
b: refs/heads/master
c: da931a9
h: refs/heads/master
v: v3
  • Loading branch information
Dave Airlie committed Jun 14, 2010
1 parent c0255b1 commit b531d09
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: f5c5f040b565435e9a85898dc87ab365395e0603
refs/heads/master: da931a931da85218add949266238c54b5fecd37f
4 changes: 1 addition & 3 deletions trunk/drivers/char/agp/generic.c
Original file line number Diff line number Diff line change
Expand Up @@ -97,20 +97,18 @@ EXPORT_SYMBOL(agp_flush_chipset);
void agp_alloc_page_array(size_t size, struct agp_memory *mem)
{
mem->pages = NULL;
mem->vmalloc_flag = false;

if (size <= 2*PAGE_SIZE)
mem->pages = kmalloc(size, GFP_KERNEL | __GFP_NORETRY);
if (mem->pages == NULL) {
mem->pages = vmalloc(size);
mem->vmalloc_flag = true;
}
}
EXPORT_SYMBOL(agp_alloc_page_array);

void agp_free_page_array(struct agp_memory *mem)
{
if (mem->vmalloc_flag) {
if (is_vmalloc_addr(mem->pages)) {
vfree(mem->pages);
} else {
kfree(mem->pages);
Expand Down
1 change: 0 additions & 1 deletion trunk/include/linux/agp_backend.h
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,6 @@ struct agp_memory {
u32 physical;
bool is_bound;
bool is_flushed;
bool vmalloc_flag;
/* list of agp_memory mapped to the aperture */
struct list_head mapped_list;
/* DMA-mapped addresses */
Expand Down

0 comments on commit b531d09

Please sign in to comment.