OpenCloudOS-Kernel/arch/powerpc
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] powerpc: correct cacheflush loop in zImage 2006-03-16 16:54:57 +11:00
configs powerpc: update defconfigs 2006-03-16 16:55:08 +11:00
kernel [PATCH] powerpc: properly configure DDR/P5IOC children devs 2006-03-16 16:55:07 +11:00
lib [PATCH] powerpc: Remove lppaca structure from the PACA 2006-01-13 21:17:39 +11:00
mm [PATCH] hugepage: is_aligned_hugepage_range() cleanup 2006-03-22 07:54:04 -08:00
oprofile [PATCH] powerpc: disable OProfile for iSeries 2006-02-24 11:36:27 +11:00
platforms [PATCH] remove set_page_count() outside mm/ 2006-03-22 07:54:02 -08:00
sysdev [PATCH] powerpc: Fix some MPIC + HT APIC buglets 2006-02-24 11:36:37 +11:00
xmon [PATCH] powerpc: xmon namespace cleanups 2006-01-12 20:39:14 +11:00
Kconfig [PATCH] powerpc: Clarify wording for CRASH_DUMP Kconfig option 2006-03-16 16:55:00 +11:00
Kconfig.debug [PATCH] powerpc: Make early debugging configurable via Kconfig 2006-01-11 14:48:26 +11:00
Makefile Merge git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc-merge 2006-02-10 14:52:31 -08:00