kernel-ark/arch/i386
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
..
boot [PATCH] x86: gitignore some autogenerated files for i386 2006-02-14 16:09:35 -08:00
crypto [CRYPTO] aes-i586: Remove unused variable ls_tab 2006-01-09 14:15:53 -08:00
kernel [PATCH] Uninline sys_mmap common code (reduce binary size) 2006-03-22 07:54:02 -08:00
lib
mach-default [PATCH] Fix topology.c location 2006-02-24 14:31:39 -08:00
mach-es7000 [PATCH] ES7000 platform update 2005-10-30 17:37:12 -08:00
mach-generic
mach-visws
mach-voyager [PATCH] fix voyager after topology.c move 2006-02-26 19:10:30 -08:00
math-emu
mm [PATCH] hugepage: is_aligned_hugepage_range() cleanup 2006-03-22 07:54:04 -08:00
oprofile [PATCH] x86: fix oprofile kernel callgraph regression 2006-02-14 08:25:29 -08:00
pci [PATCH] PCI: handle bogus MCFG entries 2006-01-31 18:00:13 -08:00
power [PATCH] x86: add MCE resume 2005-11-07 07:53:30 -08:00
defconfig update the i386 defconfig 2006-03-20 20:14:06 +01:00
Kconfig Make Kprobes depend on modules 2006-02-26 20:24:40 -08:00
Kconfig.cpu [PATCH] Base support for AMD Geode GX/LX processors 2006-01-06 08:33:38 -08:00
Kconfig.debug [PATCH] x86/x86_64: mark rodata section read only: x86 parts 2006-01-06 08:33:36 -08:00
Makefile [PATCH] i386: remove gcc version check for CONFIG_REGPARM 2006-01-16 23:15:25 -08:00
Makefile.cpu [PATCH] remove gcc-2 checks 2006-01-08 20:14:02 -08:00