]> git.baikalelectronics.ru Git - kernel.git/commit
[AGP] Allocate AGP pages with GFP_DMA32 by default
authorLinus Torvalds <torvalds@woody.osdl.org>
Wed, 22 Nov 2006 22:55:29 +0000 (14:55 -0800)
committerLinus Torvalds <torvalds@woody.osdl.org>
Wed, 22 Nov 2006 22:55:29 +0000 (14:55 -0800)
commit77dfdb39e750841e909d01473020535f5f8b03e2
tree8839924101a47a08d9da70f9bfcd8abb4023e466
parent1458fd7a0e8049b1e5f1dbd9bbe42fe940cdba8b
[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>
drivers/char/agp/generic.c
drivers/char/agp/intel-agp.c