diff options
author | Linus Torvalds <torvalds@osdl.org> | 2006-12-15 01:56:30 +0100 |
---|---|---|
committer | Adrian Bunk <bunk@stusta.de> | 2006-12-15 01:56:30 +0100 |
commit | dcc6e343ff0463b005ca0488be90b8d0025de3e4 (patch) | |
tree | bff451f473aa2ed6fd1528c6a8c6b27d04c9edd8 /drivers/char | |
parent | 75ba82c65d55099a0af5aba1075f8bdcaf566b56 (diff) |
AGP: Allocate AGP pages with GFP_DMA32 by default
Not all graphic page remappers support physical addresses over the 4GB
mark for remapping, so while some do (the AMD64 GART always did, and I
just fixed the i965 to do so properly), we're safest off just forcing
GFP_DMA32 allocations to make sure graphics pages get allocated in the
low 32-bit address space by default.
AGP sub-drivers that really care, and can do better, could just choose
to implement their own allocator (or we could add another "64-bit safe"
default allocator for their use), but quite frankly, you're not likely
to care in practice.
So for now, this trivial change means that we won't be allocating pages
that we can't map correctly by mistake on x86-64.
[ On traditional 32-bit x86, this could never happen, because GFP_KERNEL
would never allocate any highmem memory anyway ]
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
Diffstat (limited to 'drivers/char')
-rw-r--r-- | drivers/char/agp/generic.c | 2 | ||||
-rw-r--r-- | drivers/char/agp/intel-agp.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/drivers/char/agp/generic.c b/drivers/char/agp/generic.c index 5567ce8d72b..37e10ff3b53 100644 --- a/drivers/char/agp/generic.c +++ b/drivers/char/agp/generic.c @@ -1045,7 +1045,7 @@ void *agp_generic_alloc_page(struct agp_bridge_data *bridge) { struct page * page; - page = alloc_page(GFP_KERNEL); + page = alloc_page(GFP_KERNEL | GFP_DMA32); if (page == NULL) return NULL; diff --git a/drivers/char/agp/intel-agp.c b/drivers/char/agp/intel-agp.c index 631531fd97a..867f353b38f 100644 --- a/drivers/char/agp/intel-agp.c +++ b/drivers/char/agp/intel-agp.c @@ -160,7 +160,7 @@ static void *i8xx_alloc_pages(void) { struct page * page; - page = alloc_pages(GFP_KERNEL, 2); + page = alloc_pages(GFP_KERNEL | GFP_DMA32, 2); if (page == NULL) return NULL; |