linux/arch/sh/include/asm
KAMEZAWA Hiroyuki c6830c2260 Fix node_start/end_pfn() definition for mm/page_cgroup.c
commit 21a3c96 uses node_start/end_pfn(nid) for detection start/end
of nodes. But, it's not defined in linux/mmzone.h but defined in
/arch/???/include/mmzone.h which is included only under
CONFIG_NEED_MULTIPLE_NODES=y.

Then, we see
  mm/page_cgroup.c: In function 'page_cgroup_init':
  mm/page_cgroup.c:308: error: implicit declaration of function 'node_start_pfn'
  mm/page_cgroup.c:309: error: implicit declaration of function 'node_end_pfn'

So, fixiing page_cgroup.c is an idea...

But node_start_pfn()/node_end_pfn() is a very generic macro and
should be implemented in the same manner for all archs.
(m32r has different implementation...)

This patch removes definitions of node_start/end_pfn() in each archs
and defines a unified one in linux/mmzone.h. It's not under
CONFIG_NEED_MULTIPLE_NODES, now.

A result of macro expansion is here (mm/page_cgroup.c)

for !NUMA
 start_pfn = ((&contig_page_data)->node_start_pfn);
  end_pfn = ({ pg_data_t *__pgdat = (&contig_page_data); __pgdat->node_start_pfn + __pgdat->node_spanned_pages;});

for NUMA (x86-64)
  start_pfn = ((node_data[nid])->node_start_pfn);
  end_pfn = ({ pg_data_t *__pgdat = (node_data[nid]); __pgdat->node_start_pfn + __pgdat->node_spanned_pages;});

Changelog:
 - fixed to avoid using "nid" twice in node_end_pfn() macro.

Reported-and-acked-by: Randy Dunlap <randy.dunlap@oracle.com>
Reported-and-tested-by: Ingo Molnar <mingo@elte.hu>
Acked-by: Mel Gorman <mgorman@suse.de>
Signed-off-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2011-06-27 14:13:09 -07:00
..
Kbuild
adc.h
addrspace.h sh: nommu: use 32-bit phys mode. 2010-11-04 12:32:24 +09:00
alignment.h
asm-offsets.h
atomic-grb.h
atomic-irq.h
atomic-llsc.h
atomic.h
auxvec.h
bitops-grb.h
bitops-llsc.h
bitops-op32.h
bitops.h bitops: remove minix bitops from asm/bitops.h 2011-03-23 19:46:22 -07:00
bitsperlong.h
bug.h
bugs.h
byteorder.h
cache.h
cachectl.h
cacheflush.h sh: Assume new page cache pages have dirty dcache lines. 2010-12-01 15:39:51 +09:00
checksum.h
checksum_32.h
clkdev.h ARM: 6483/1: arm & sh: factorised duplicated clkdev.c 2010-11-26 10:51:04 +00:00
clock.h
cmpxchg-grb.h sh: Fix up xchg/cmpxchg corruption with gUSA RB. 2011-06-08 15:22:39 +09:00
cmpxchg-irq.h
cmpxchg-llsc.h
cpu-features.h
cputime.h
current.h
delay.h
device.h
div64.h
dma-mapping.h
dma-register.h
dma-sh.h
dma.h
dmabrg.h
dwarf.h
elf.h
emergency-restart.h
entry-macros.S
errno.h
fb.h
fcntl.h
fixmap.h
flat.h
fpu.h
freq.h
ftrace.h
futex-irq.h futex: Sanitize futex ops argument types 2011-03-11 12:23:31 +01:00
futex.h futex: Sanitize futex ops argument types 2011-03-11 12:23:31 +01:00
gpio.h sh: Allow GPIO chips to register IRQ mappings. 2010-10-03 03:55:39 +09:00
hardirq.h
hd64461.h
heartbeat.h
hugetlb.h
hw_breakpoint.h
hw_irq.h
hwblk.h
i2c-sh7760.h
io.h sh: Fix up legacy PTEA space attribute mapping. 2011-01-11 15:02:59 +09:00
io_generic.h sh: machvec IO death. 2010-11-01 09:49:04 -04:00
io_trapped.h
ioctl.h
ioctls.h tty: add TIOCVHANGUP to allow clean tty shutdown of all ttys 2011-02-17 14:16:30 -08:00
ipcbuf.h
irq.h
irq_regs.h
irqflags.h Fix IRQ flag handling naming 2010-10-07 14:08:55 +01:00
kdebug.h
kexec.h
kgdb.h kgdbts: unify/generalize gdb breakpoint adjustment 2011-05-26 17:12:36 -07:00
kmap_types.h
kprobes.h
linkage.h
local.h
local64.h
machvec.h sh: Add a machvec callback for early memblock reservations. 2011-01-11 13:04:57 +09:00
mc146818rtc.h
memblock.h
mman.h
mmu.h
mmu_context.h
mmu_context_32.h
mmu_context_64.h
mmzone.h Fix node_start/end_pfn() definition for mm/page_cgroup.c 2011-06-27 14:13:09 -07:00
module.h
msgbuf.h
mutex-llsc.h
mutex.h
page.h Fix common misspellings 2011-03-31 11:26:23 -03:00
param.h
parport.h
pci.h sh: pci: Use a generic raw spinlock for PCI config access locking. 2010-09-20 18:56:13 +09:00
percpu.h
perf_event.h irq_work: Add generic hardirq context callbacks 2010-10-18 19:58:50 +02:00
pgalloc.h
pgtable-2level.h
pgtable-3level.h
pgtable.h sh64: asm/pgtable.h needs asm/mmu.h 2011-05-31 14:37:44 +09:00
pgtable_32.h Fix common misspellings 2011-03-31 11:26:23 -03:00
pgtable_64.h Merge git://git.kernel.org/pub/scm/linux/kernel/git/lethal/sh-2.6 2010-10-28 12:06:51 -07:00
poll.h
posix_types.h
posix_types_32.h
posix_types_64.h
processor.h sh: sh7372 SH4AL-DSP probe support 2011-01-13 15:20:40 +09:00
processor_32.h sh: constify prefetch pointers. 2011-01-11 14:39:35 +09:00
processor_64.h sh, exec: remove redundant set_fs(USER_DS) 2011-06-14 15:15:58 +09:00
ptrace.h sh: Fix up asm-generic/ptrace.h fallout. 2011-05-31 14:39:49 +09:00
ptrace_32.h sh: correct definitions to access stack pointers 2011-01-05 16:58:19 +09:00
ptrace_64.h sh: correct definitions to access stack pointers 2011-01-05 16:58:19 +09:00
push-switch.h
reboot.h
resource.h
romimage-macros.h
rtc.h
rwsem.h rwsem: Move duplicate function prototypes to linux/rwsem.h 2011-01-27 12:30:39 +01:00
scatterlist.h
seccomp.h
sections.h sh: Change __nosave_XXX symbols to long 2011-02-15 16:24:54 +09:00
segment.h
sembuf.h
serial.h
setup.h
sfp-machine.h
sh7760fb.h
sh_bios.h
sh_eth.h net: sh_eth: add set_mdio_gate in bb_info 2011-03-14 14:10:16 -07:00
shmbuf.h
shmparam.h
sigcontext.h
siginfo.h
signal.h
siu.h
sizes.h sh: Conver to asm-generic/sizes.h. 2011-03-22 22:43:09 +09:00
smc37c93x.h
smp-ops.h
smp.h
socket.h
sockios.h
sparsemem.h
spi.h
spinlock.h
spinlock_types.h
sram.h sh: Provide a generic SRAM pool for tiny memories. 2010-10-15 02:09:00 +09:00
stacktrace.h sh: remove warning and warning_symbol from struct stacktrace_ops 2011-05-23 14:42:15 +09:00
stat.h
statfs.h
string.h
string_32.h
string_64.h
suspend.h PM / Hibernate: Remove arch_prepare_suspend() 2011-05-24 23:35:55 +02:00
swab.h
syscall.h
syscall_32.h
syscall_64.h
syscalls.h
syscalls_32.h SH: Add missing consts to sys_execve() declaration 2010-10-07 14:08:52 +01:00
syscalls_64.h
system.h sh: nommu: Support building without an uncached mapping. 2010-11-04 12:46:19 +09:00
system_32.h sh: nommu: Support building without an uncached mapping. 2010-11-04 12:46:19 +09:00
system_64.h sh: nommu: Support building without an uncached mapping. 2010-11-04 12:46:19 +09:00
termbits.h
termios.h
thread_info.h mm: NUMA aware alloc_thread_info_node() 2011-03-22 17:44:01 -07:00
timex.h
tlb.h sh: asm/tlb.h needs linux/swap.h 2011-05-31 13:27:41 +09:00
tlb_64.h
tlbflush.h
topology.h
types.h
uaccess.h
uaccess_32.h
uaccess_64.h
ucontext.h
unaligned-sh4a.h Fix common misspellings 2011-03-31 11:26:23 -03:00
unaligned.h
uncached.h sh: nommu: Support building without an uncached mapping. 2010-11-04 12:46:19 +09:00
unistd.h
unistd_32.h ns: Wire up the setns system call 2011-05-28 10:48:39 -07:00
unistd_64.h ns: Wire up the setns system call 2011-05-28 10:48:39 -07:00
unwinder.h
user.h
vga.h
vmlinux.lds.h
watchdog.h
xor.h