linux/arch/alpha/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
..
8253pit.h time: move PIT_TICK_RATE to linux/timex.h 2009-06-16 19:47:27 -07:00
Kbuild archs: replace unifdef-y with header-y 2010-08-14 22:26:51 +02:00
a.out-core.h alpha: move include/asm-alpha to arch/alpha/include/asm 2008-08-15 09:19:40 -07:00
a.out.h alpha: introduce field 'taso' into struct linux_binprm 2008-10-16 11:21:38 -07:00
agp.h agp: kill phys_to_gart() and gart_to_phys() 2009-08-03 09:05:00 +01:00
agp_backend.h alpha: move include/asm-alpha to arch/alpha/include/asm 2008-08-15 09:19:40 -07:00
asm-offsets.h kbuild: move asm-offsets.h to include/generated 2009-12-12 13:08:14 +01:00
atomic.h atomic_t: Cast to volatile when accessing atomic variables 2010-05-17 07:57:27 -07:00
auxvec.h alpha: move include/asm-alpha to arch/alpha/include/asm 2008-08-15 09:19:40 -07:00
barrier.h alpha: futex implementation 2009-05-02 15:36:10 -07:00
bitops.h bitops: remove minix bitops from asm/bitops.h 2011-03-23 19:46:22 -07:00
bitsperlong.h asm-generic: introduce asm/bitsperlong.h 2009-06-11 21:02:14 +02:00
bug.h alpha: Convert BUG() to use unreachable() 2009-12-18 01:14:52 -05:00
bugs.h alpha: move include/asm-alpha to arch/alpha/include/asm 2008-08-15 09:19:40 -07:00
byteorder.h byteorder: make swab.h include asm/swab.h like a regular header 2009-01-14 19:56:50 -08:00
cache.h alpha: remove homegrown L1_CACHE_ALIGN macro 2010-08-31 22:45:31 -04:00
cacheflush.h mm: Fix out-of-date comments which refers non-existent functions 2011-02-17 16:54:39 +01:00
checksum.h alpha: move include/asm-alpha to arch/alpha/include/asm 2008-08-15 09:19:40 -07:00
compiler.h alpha: move include/asm-alpha to arch/alpha/include/asm 2008-08-15 09:19:40 -07:00
console.h alpha: move include/asm-alpha to arch/alpha/include/asm 2008-08-15 09:19:40 -07:00
core_apecs.h alpha: move include/asm-alpha to arch/alpha/include/asm 2008-08-15 09:19:40 -07:00
core_cia.h alpha: move include/asm-alpha to arch/alpha/include/asm 2008-08-15 09:19:40 -07:00
core_irongate.h alpha: move include/asm-alpha to arch/alpha/include/asm 2008-08-15 09:19:40 -07:00
core_lca.h alpha: move include/asm-alpha to arch/alpha/include/asm 2008-08-15 09:19:40 -07:00
core_marvel.h alpha: fix compile errors in dma-mapping-common.h 2010-03-18 22:35:28 -04:00
core_mcpcia.h alpha: use single HAE window on T2 core logic (gamma, sable) 2010-10-26 16:52:12 -07:00
core_polaris.h alpha: move include/asm-alpha to arch/alpha/include/asm 2008-08-15 09:19:40 -07:00
core_t2.h alpha: use single HAE window on T2 core logic (gamma, sable) 2010-10-26 16:52:12 -07:00
core_titan.h alpha: fix compile errors in dma-mapping-common.h 2010-03-18 22:35:28 -04:00
core_tsunami.h alpha: fix compile errors in dma-mapping-common.h 2010-03-18 22:35:28 -04:00
core_wildfire.h alpha: move include/asm-alpha to arch/alpha/include/asm 2008-08-15 09:19:40 -07:00
cputime.h alpha: move include/asm-alpha to arch/alpha/include/asm 2008-08-15 09:19:40 -07:00
current.h alpha: move include/asm-alpha to arch/alpha/include/asm 2008-08-15 09:19:40 -07:00
delay.h alpha: move include/asm-alpha to arch/alpha/include/asm 2008-08-15 09:19:40 -07:00
device.h alpha: move include/asm-alpha to arch/alpha/include/asm 2008-08-15 09:19:40 -07:00
div64.h alpha: move include/asm-alpha to arch/alpha/include/asm 2008-08-15 09:19:40 -07:00
dma-mapping.h dma-mapping: remove dma_is_consistent API 2010-08-11 08:59:21 -07:00
dma.h alpha: move include/asm-alpha to arch/alpha/include/asm 2008-08-15 09:19:40 -07:00
elf.h Fix common misspellings 2011-03-31 11:26:23 -03:00
emergency-restart.h alpha: move include/asm-alpha to arch/alpha/include/asm 2008-08-15 09:19:40 -07:00
err_common.h alpha: move include/asm-alpha to arch/alpha/include/asm 2008-08-15 09:19:40 -07:00
err_ev6.h alpha: move include/asm-alpha to arch/alpha/include/asm 2008-08-15 09:19:40 -07:00
err_ev7.h alpha: move include/asm-alpha to arch/alpha/include/asm 2008-08-15 09:19:40 -07:00
errno.h mm: make __get_user_pages return -EHWPOISON for HWPOISON page optionally 2011-03-17 13:08:27 -03:00
fb.h alpha: move include/asm-alpha to arch/alpha/include/asm 2008-08-15 09:19:40 -07:00
fcntl.h vfs: add nonconflicting values for O_PATH 2011-03-16 09:54:02 -04:00
floppy.h alpha: move include/asm-alpha to arch/alpha/include/asm 2008-08-15 09:19:40 -07:00
fpu.h alpha: move include/asm-alpha to arch/alpha/include/asm 2008-08-15 09:19:40 -07:00
ftrace.h tracing: make CALLER_ADDRx overwriteable 2009-03-02 16:49:37 -05:00
futex.h futex: Sanitize futex ops argument types 2011-03-11 12:23:31 +01:00
gct.h alpha: move include/asm-alpha to arch/alpha/include/asm 2008-08-15 09:19:40 -07:00
gentrap.h alpha: move include/asm-alpha to arch/alpha/include/asm 2008-08-15 09:19:40 -07:00
gpio.h alpha: hook up gpiolib support 2011-05-25 08:39:38 -07:00
hardirq.h alpha: convert to asm-generic/hardirq.h 2009-09-22 07:17:43 -07:00
hw_irq.h alpha: add performance monitor interrupt counter 2010-08-09 20:45:03 -07:00
hwrpb.h alpha: move include/asm-alpha to arch/alpha/include/asm 2008-08-15 09:19:40 -07:00
io.h alpha: fix breakage caused by df9ee29270 2011-01-17 05:42:15 +01:00
io_trivial.h alpha: move include/asm-alpha to arch/alpha/include/asm 2008-08-15 09:19:40 -07:00
ioctl.h alpha: move include/asm-alpha to arch/alpha/include/asm 2008-08-15 09:19:40 -07:00
ioctls.h tty: add TIOCVHANGUP to allow clean tty shutdown of all ttys 2011-02-17 14:16:30 -08:00
ipcbuf.h alpha: move include/asm-alpha to arch/alpha/include/asm 2008-08-15 09:19:40 -07:00
irq.h alpha: kill off alpha_do_IRQ 2011-01-17 05:42:13 +01:00
irq_regs.h alpha: move include/asm-alpha to arch/alpha/include/asm 2008-08-15 09:19:40 -07:00
irqflags.h Fix IRQ flag handling naming 2010-10-07 14:08:55 +01:00
jensen.h alpha: move include/asm-alpha to arch/alpha/include/asm 2008-08-15 09:19:40 -07:00
kdebug.h alpha: move include/asm-alpha to arch/alpha/include/asm 2008-08-15 09:19:40 -07:00
kmap_types.h kmap_types: make most arches use generic header file 2009-06-16 19:47:51 -07:00
linkage.h alpha: move include/asm-alpha to arch/alpha/include/asm 2008-08-15 09:19:40 -07:00
local.h local_t: Remove cpu_local_xx macros 2010-01-05 15:34:49 +09:00
local64.h arch: Implement local64_t 2010-06-09 11:12:36 +02:00
machvec.h alpha: convert u64 to unsigned long long 2009-04-01 08:59:16 -07:00
mc146818rtc.h alpha: move include/asm-alpha to arch/alpha/include/asm 2008-08-15 09:19:40 -07:00
mman.h thp: mm: define MADV_NOHUGEPAGE 2011-01-13 17:32:47 -08:00
mmu.h alpha: move include/asm-alpha to arch/alpha/include/asm 2008-08-15 09:19:40 -07:00
mmu_context.h alpha: move include/asm-alpha to arch/alpha/include/asm 2008-08-15 09:19:40 -07:00
mmzone.h Fix node_start/end_pfn() definition for mm/page_cgroup.c 2011-06-27 14:13:09 -07:00
module.h alpha: move include/asm-alpha to arch/alpha/include/asm 2008-08-15 09:19:40 -07:00
msgbuf.h alpha: move include/asm-alpha to arch/alpha/include/asm 2008-08-15 09:19:40 -07:00
mutex.h alpha: move include/asm-alpha to arch/alpha/include/asm 2008-08-15 09:19:40 -07:00
page.h asm-generic: rename page.h and uaccess.h 2009-06-11 21:02:17 +02:00
pal.h alpha: move include/asm-alpha to arch/alpha/include/asm 2008-08-15 09:19:40 -07:00
param.h alpha: move include/asm-alpha to arch/alpha/include/asm 2008-08-15 09:19:40 -07:00
parport.h alpha: move include/asm-alpha to arch/alpha/include/asm 2008-08-15 09:19:40 -07:00
pci.h dma-mapping: alpha: use include/linux/pci-dma-compat.h 2010-03-12 15:52:42 -08:00
percpu.h alpha: fix percpu build breakage 2009-06-30 18:55:59 -07:00
perf_event.h perf, arch: Cleanup perf-pmu init vs lockup-detector 2010-11-26 15:14:56 +01:00
pgalloc.h alpha: make pte_alloc_one_kernel() inline 2009-01-15 16:39:40 -08:00
pgtable.h mm: remove pte_*map_nested() 2010-10-26 16:52:08 -07:00
poll.h alpha: move include/asm-alpha to arch/alpha/include/asm 2008-08-15 09:19:40 -07:00
posix_types.h alpha: move include/asm-alpha to arch/alpha/include/asm 2008-08-15 09:19:40 -07:00
processor.h alpha: move include/asm-alpha to arch/alpha/include/asm 2008-08-15 09:19:40 -07:00
ptrace.h alpha: use generic ptrace_resume code 2010-03-12 15:52:38 -08:00
reg.h alpha: move include/asm-alpha to arch/alpha/include/asm 2008-08-15 09:19:40 -07:00
regdef.h alpha: move include/asm-alpha to arch/alpha/include/asm 2008-08-15 09:19:40 -07:00
resource.h alpha: move include/asm-alpha to arch/alpha/include/asm 2008-08-15 09:19:40 -07:00
rtc.h alpha: fix RTC on marvel 2009-01-15 16:39:40 -08:00
rwsem.h rwsem: Move duplicate function prototypes to linux/rwsem.h 2011-01-27 12:30:39 +01:00
scatterlist.h remove needless ISA_DMA_THRESHOLD 2010-08-07 18:15:50 +02:00
sections.h alpha: move include/asm-alpha to arch/alpha/include/asm 2008-08-15 09:19:40 -07:00
segment.h alpha: move include/asm-alpha to arch/alpha/include/asm 2008-08-15 09:19:40 -07:00
sembuf.h alpha: move include/asm-alpha to arch/alpha/include/asm 2008-08-15 09:19:40 -07:00
serial.h alpha: move include/asm-alpha to arch/alpha/include/asm 2008-08-15 09:19:40 -07:00
setup.h alpha: move include/asm-alpha to arch/alpha/include/asm 2008-08-15 09:19:40 -07:00
sfp-machine.h alpha: move include/asm-alpha to arch/alpha/include/asm 2008-08-15 09:19:40 -07:00
shmbuf.h alpha: move include/asm-alpha to arch/alpha/include/asm 2008-08-15 09:19:40 -07:00
shmparam.h alpha: move include/asm-alpha to arch/alpha/include/asm 2008-08-15 09:19:40 -07:00
sigcontext.h alpha: move include/asm-alpha to arch/alpha/include/asm 2008-08-15 09:19:40 -07:00
siginfo.h alpha: move include/asm-alpha to arch/alpha/include/asm 2008-08-15 09:19:40 -07:00
signal.h asm-generic: rename termios.h, signal.h and mman.h 2009-06-11 21:01:52 +02:00
smp.h Remove unused PROC_CHANGE_PENALTY constant 2011-05-25 08:39:43 -07:00
socket.h net: Generalize socket rx gap / receive queue overflow cmsg 2009-10-12 13:26:31 -07:00
sockios.h alpha: move include/asm-alpha to arch/alpha/include/asm 2008-08-15 09:19:40 -07:00
spinlock.h locking: Convert raw_rwlock functions to arch_rwlock 2009-12-14 23:55:32 +01:00
spinlock_types.h locking: Convert raw_rwlock to arch_rwlock 2009-12-14 23:55:32 +01:00
stat.h alpha: move include/asm-alpha to arch/alpha/include/asm 2008-08-15 09:19:40 -07:00
statfs.h headers_check fix: alpha, statfs.h 2009-02-01 11:01:22 +05:30
string.h alpha: move include/asm-alpha to arch/alpha/include/asm 2008-08-15 09:19:40 -07:00
swab.h headers_check fix: alpha, swab.h 2009-02-01 11:01:22 +05:30
sysinfo.h alpha: move include/asm-alpha to arch/alpha/include/asm 2008-08-15 09:19:40 -07:00
system.h Fix IRQ flag handling naming 2010-10-07 14:08:55 +01:00
termbits.h tty: Add EXTPROC support for LINEMODE 2010-08-10 13:47:39 -07:00
termios.h alpha: move include/asm-alpha to arch/alpha/include/asm 2008-08-15 09:19:40 -07:00
thread_info.h add descriptive comment for TIF_MEMDIE task flag declaration. 2010-05-14 11:13:27 +02:00
timex.h alpha: move include/asm-alpha to arch/alpha/include/asm 2008-08-15 09:19:40 -07:00
tlb.h mm: Pass virtual address to [__]p{te,ud,md}_free_tlb() 2009-07-27 12:10:38 -07:00
tlbflush.h alpha: switch to dynamic percpu allocator 2009-06-24 15:13:52 +09:00
topology.h alpha: cpumask_of_node() should handle -1 as a node 2010-01-14 13:21:35 -05:00
types.h remove dma64_addr_t 2011-03-23 19:47:18 -07:00
uaccess.h alpha: exception table sorting 2009-05-02 15:36:10 -07:00
ucontext.h alpha: move include/asm-alpha to arch/alpha/include/asm 2008-08-15 09:19:40 -07:00
unaligned.h alpha: move include/asm-alpha to arch/alpha/include/asm 2008-08-15 09:19:40 -07:00
unistd.h ns: Wire up the setns system call 2011-05-28 10:48:39 -07:00
user.h alpha: move include/asm-alpha to arch/alpha/include/asm 2008-08-15 09:19:40 -07:00
vga.h alpha: move include/asm-alpha to arch/alpha/include/asm 2008-08-15 09:19:40 -07:00
wrperfmon.h alpha: add wrperfmon.h header file to aid use of wrperfmon PALcall 2010-08-09 20:45:04 -07:00
xchg.h alpha: xchg/cmpxchg cleanup and fixes 2009-04-01 08:59:16 -07:00
xor.h alpha: move include/asm-alpha to arch/alpha/include/asm 2008-08-15 09:19:40 -07:00