kernel-ark/include
David Gibson 42b88befd6 [PATCH] hugepage: is_aligned_hugepage_range() cleanup
Quite a long time back, prepare_hugepage_range() replaced
is_aligned_hugepage_range() as the callback from mm/mmap.c to arch code to
verify if an address range is suitable for a hugepage mapping.
is_aligned_hugepage_range() stuck around, but only to implement
prepare_hugepage_range() on archs which didn't implement their own.

Most archs (everything except ia64 and powerpc) used the same
implementation of is_aligned_hugepage_range().  On powerpc, which
implements its own prepare_hugepage_range(), the custom version was never
used.

In addition, "is_aligned_hugepage_range()" was a bad name, because it
suggests it returns true iff the given range is a good hugepage range,
whereas in fact it returns 0-or-error (so the sense is reversed).

This patch cleans up by abolishing is_aligned_hugepage_range().  Instead
prepare_hugepage_range() is defined directly.  Most archs use the default
version, which simply checks the given region is aligned to the size of a
hugepage.  ia64 and powerpc define custom versions.  The ia64 one simply
checks that the range is in the correct address space region in addition to
being suitably aligned.  The powerpc version (just as previously) checks
for suitable addresses, and if necessary performs low-level MMU frobbing to
set up new areas for use by hugepages.

No libhugetlbfs testsuite regressions on ppc64 (POWER5 LPAR).

Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Signed-off-by: Zhang Yanmin <yanmin.zhang@intel.com>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: William Lee Irwin III <wli@holomorphy.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-03-22 07:54:04 -08:00
..
acpi
asm-alpha
asm-arm
asm-arm26
asm-cris
asm-frv
asm-generic
asm-h8300
asm-i386 [PATCH] Enable mprotect on huge pages 2006-03-22 07:54:03 -08:00
asm-ia64 [PATCH] hugepage: is_aligned_hugepage_range() cleanup 2006-03-22 07:54:04 -08:00
asm-m32r
asm-m68k
asm-m68knommu
asm-mips Merge master.kernel.org:/pub/scm/linux/kernel/git/gregkh/usb-2.6 2006-03-21 09:25:47 -08:00
asm-parisc
asm-powerpc [PATCH] hugepage: Fix hugepage logic in free_pgtables() 2006-03-22 07:54:03 -08:00
asm-ppc
asm-s390 [PATCH] mm: remove set_pgdir leftovers 2006-03-22 07:53:56 -08:00
asm-sh
asm-sh64 [PATCH] mm: remove set_pgdir leftovers 2006-03-22 07:53:56 -08:00
asm-sparc [SPARC]: Fixup SO_PEERSEC value on 32-bit sparc. 2006-03-20 22:53:42 -08:00
asm-sparc64
asm-um
asm-v850
asm-x86_64 [PATCH] Enable mprotect on huge pages 2006-03-22 07:54:03 -08:00
asm-xtensa
keys
linux [PATCH] hugepage: is_aligned_hugepage_range() cleanup 2006-03-22 07:54:04 -08:00
math-emu
media V4L/DVB (3513): Remove saa711x driver 2006-03-21 08:53:40 -08:00
mtd
net [LLC]: llc_mac_hdr_init const arguments 2006-03-20 22:59:36 -08:00
pcmcia
rdma
rxrpc
scsi
sound
video