linux/include/asm-generic
KAMEZAWA Hiroyuki a117e66ed4 [PATCH] unify pfn_to_page: generic functions
There are 3 memory models, FLATMEM, DISCONTIGMEM, SPARSEMEM.
Each arch has its own page_to_pfn(), pfn_to_page() for each models.
But most of them can use the same arithmetic.

This patch adds asm-generic/memory_model.h, which includes generic
page_to_pfn(), pfn_to_page() definitions for each memory model.

When CONFIG_OUT_OF_LINE_PFN_TO_PAGE=y, out-of-line functions are
used instead of macro. This is enabled by some archs and  reduces
text size.

Signed-off-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Cc: Hugh Dickins <hugh@veritas.com>
Cc: Andi Kleen <ak@muc.de>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Richard Henderson <rth@twiddle.net>
Cc: Ivan Kokshaysky <ink@jurassic.park.msu.ru>
Cc: Russell King <rmk@arm.linux.org.uk>
Cc: Ian Molton <spyro@f2s.com>
Cc: Mikael Starvik <starvik@axis.com>
Cc: David Howells <dhowells@redhat.com>
Cc: Yoshinori Sato <ysato@users.sourceforge.jp>
Cc: Hirokazu Takata <takata.hirokazu@renesas.com>
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: Kyle McMartin <kyle@mcmartin.ca>
Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
Cc: Paul Mundt <lethal@linux-sh.org>
Cc: Kazumoto Kojima <kkojima@rr.iij4u.or.jp>
Cc: Richard Curnow <rc@rc0.org.uk>
Cc: William Lee Irwin III <wli@holomorphy.com>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Jeff Dike <jdike@addtoit.com>
Cc: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Cc: Miles Bader <uclinux-v850@lsi.nec.co.jp>
Cc: Chris Zankel <chris@zankel.net>
Cc: "Luck, Tony" <tony.luck@intel.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-03-27 08:44:44 -08:00
..
bitops [PATCH] bitops: generic minix_{test,set,test_and_clear,test,find_first_zero}_bit() 2006-03-26 08:57:11 -08:00
4level-fixup.h [PATCH] mm: ptd_alloc inline and out 2005-10-29 21:40:40 -07:00
atomic.h [PATCH] Use atomic64_set for 64-bit case of atomic_long_set 2006-01-15 10:17:07 -08:00
bitops.h [PATCH] bitops: update include/asm-generic/bitops.h 2006-03-26 08:57:15 -08:00
bug.h [PATCH] make bug messages more consistent 2006-03-23 07:38:16 -08:00
cputime.h
div64.h
dma-mapping-broken.h [PATCH] gfp_t: dma-mapping (simple cases) 2005-10-28 08:16:49 -07:00
dma-mapping.h [PATCH] Kill L1_CACHE_SHIFT_MAX 2006-01-08 20:13:39 -08:00
emergency-restart.h [PATCH] Add emergency_restart() 2005-07-26 14:35:41 -07:00
errno-base.h
errno.h
fcntl.h [PATCH] Clean up struct flock64 definitions 2005-09-07 16:57:38 -07:00
futex.h [PATCH] consolidate asm/futex.h 2006-01-08 20:13:39 -08:00
ide_iops.h
ioctl.h [PATCH] Generic ioctl.h 2006-01-10 08:01:34 -08:00
iomap.h
ipc.h
local.h
memory_model.h [PATCH] unify pfn_to_page: generic functions 2006-03-27 08:44:44 -08:00
mman.h [PATCH] add asm-generic/mman.h 2006-02-15 15:32:22 -08:00
mutex-dec.h Fix mutex_trylock() copy-and-paste bug (x86, x86-64, generic mutex-dec.h) 2006-01-11 15:50:47 -08:00
mutex-null.h [PATCH] mutex subsystem, add asm-generic/mutex-[dec|xchg|null].h implementations 2006-01-09 15:59:17 -08:00
mutex-xchg.h [PATCH] mutex subsystem, add asm-generic/mutex-[dec|xchg|null].h implementations 2006-01-09 15:59:17 -08:00
page.h [PATCH] mm: consolidate get_order 2005-09-05 00:05:39 -07:00
pci-dma-compat.h
pci.h [PATCH] Make sparc64 use setup-res.c 2005-09-08 14:57:25 -07:00
percpu.h [PATCH] more for_each_cpu() conversions 2006-03-23 07:38:17 -08:00
pgtable-nopmd.h
pgtable-nopud.h
pgtable.h [PATCH] fix remaining missing includes 2005-11-07 07:53:41 -08:00
resource.h
rtc.h
sections.h [PATCH] x86_64: Only use asm/sections.h to declare section symbols 2005-11-14 19:55:14 -08:00
siginfo.h
signal.h [PATCH] asm/signal.h unification 2005-05-04 07:33:15 -07:00
statfs.h
termios.h
tlb.h [PATCH] mm: tlb_finish_mmu forget rss 2005-10-29 21:40:37 -07:00
topology.h [PATCH] x86/x86_64: pcibus_to_node 2005-06-23 09:45:08 -07:00
uaccess.h
unaligned.h [PATCH] __get_unaligned() gcc-4 fix 2006-03-08 14:14:00 -08:00
vmlinux.lds.h [PATCH] add EXPORT_SYMBOL_GPL_FUTURE() 2006-03-20 13:42:58 -08:00
xor.h