aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/char
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@woody.osdl.org>2006-11-22 17:55:29 -0500
committerLinus Torvalds <torvalds@woody.osdl.org>2006-11-22 17:55:29 -0500
commit66c669baa7d70b8d135da67f36c8dba12cea71b8 (patch)
tree8839924101a47a08d9da70f9bfcd8abb4023e466 /drivers/char
parent7d915a38985d2826acbdc9dc9cca8a93e23e5278 (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 ] Acked-by: Andi Kleen <ak@suse.de> Acked-by: Dave Jones <davej@redhat.com> Cc: Eric Anholt <eric@anholt.net> Cc: Keith Packard <keithp@keithp.com> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/char')
-rw-r--r--drivers/char/agp/generic.c2
-rw-r--r--drivers/char/agp/intel-agp.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/drivers/char/agp/generic.c b/drivers/char/agp/generic.c
index c39200161688..5ff457b41efb 100644
--- a/drivers/char/agp/generic.c
+++ b/drivers/char/agp/generic.c
@@ -1054,7 +1054,7 @@ void *agp_generic_alloc_page(struct agp_bridge_data *bridge)
1054{ 1054{
1055 struct page * page; 1055 struct page * page;
1056 1056
1057 page = alloc_page(GFP_KERNEL); 1057 page = alloc_page(GFP_KERNEL | GFP_DMA32);
1058 if (page == NULL) 1058 if (page == NULL)
1059 return NULL; 1059 return NULL;
1060 1060
diff --git a/drivers/char/agp/intel-agp.c b/drivers/char/agp/intel-agp.c
index aceece71a85d..555b3a8ab49c 100644
--- a/drivers/char/agp/intel-agp.c
+++ b/drivers/char/agp/intel-agp.c
@@ -169,7 +169,7 @@ static void *i8xx_alloc_pages(void)
169{ 169{
170 struct page * page; 170 struct page * page;
171 171
172 page = alloc_pages(GFP_KERNEL, 2); 172 page = alloc_pages(GFP_KERNEL | GFP_DMA32, 2);
173 if (page == NULL) 173 if (page == NULL)
174 return NULL; 174 return NULL;
175 175