1
linux/arch/sparc/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
..
agp.h agp: kill phys_to_gart() and gart_to_phys() 2009-08-03 09:05:00 +01:00
apb.h
apc.h
asi.h sparc,leon: Redefine MMU register access asi if CONFIG_LEON 2009-08-17 18:32:09 -07:00
asm-offsets.h kbuild: move asm-offsets.h to include/generated 2009-12-12 13:08:14 +01:00
asm.h sparc: Add asm/asm.h 2008-12-09 00:50:13 -08:00
asmmacro.h sparc: remove CONFIG_SUN4 2008-08-31 20:59:37 -07:00
atomic_32.h atomic_t: Cast to volatile when accessing atomic variables 2010-05-17 07:57:27 -07:00
atomic_64.h sparc64: Really fix atomic64_t interface types. 2010-08-17 21:44:13 -07:00
atomic.h
auxio_32.h
auxio_64.h
auxio.h
auxvec.h
backoff.h sparc64: Make lock backoff really a NOP on UP builds. 2010-08-18 22:53:26 -07:00
bbc.h
bitext.h
bitops_32.h bitops: remove minix bitops from asm/bitops.h 2011-03-23 19:46:22 -07:00
bitops_64.h bitops: remove minix bitops from asm/bitops.h 2011-03-23 19:46:22 -07:00
bitops.h
bitsperlong.h asm-generic: introduce asm/bitsperlong.h 2009-06-11 21:02:14 +02:00
btext.h sparc64: Faster early-boot framebuffer console. 2009-11-27 17:33:43 -08:00
btfixup.h
bug.h
bugs.h sparc64: Implement SSTATE purely using notifiers and initcalls. 2008-09-02 00:49:38 -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 sparc: remove homegrown L1_CACHE_ALIGN macro 2010-06-29 00:38:02 -07:00
cacheflush_32.h block: add helpers to run flush_dcache_page() against a bio and a request's pages 2009-11-26 09:16:19 +01:00
cacheflush_64.h block: add helpers to run flush_dcache_page() against a bio and a request's pages 2009-11-26 09:16:19 +01:00
cacheflush.h
chafsr.h
checksum_32.h
checksum_64.h
checksum.h
chmctrl.h
clock.h
cmt.h
compat_signal.h
compat.h compat: Make compat_alloc_user_space() incorporate the access_ok() 2010-09-14 16:08:45 -07:00
contregs.h
cpudata_32.h sparc32: implement SMP IPIs using the generic functions 2011-05-16 13:07:43 -07:00
cpudata_64.h sparc64: Use a seperate counter for timer interrupts and NMI checks, like x86. 2010-04-12 22:37:07 -07:00
cpudata.h
cputime.h
current.h
cypress.h
dcr.h
dcu.h
delay_32.h
delay_64.h
delay.h
device.h of: remove asm/of_device.h 2010-07-24 09:57:52 -06:00
display7seg.h
div64.h
dma-mapping.h dma-mapping: remove dma_is_consistent API 2010-08-11 08:59:21 -07:00
dma.h sparc: Kill now spurious includes of sbus.h 2008-08-29 02:15:23 -07:00
ebus_dma.h sparc: Move EBUS DMA interfaces into seperate header file. 2008-08-29 23:10:21 -07:00
ecc.h
eeprom.h
elf_32.h elf: kill USE_ELF_CORE_DUMP 2009-12-16 07:20:12 -08:00
elf_64.h sparc: TIF_ABI_PENDING bit removal 2010-01-29 08:22:01 -08:00
elf.h
emergency-restart.h
envctrl.h
errno.h mm: make __get_user_pages return -EHWPOISON for HWPOISON page optionally 2011-03-17 13:08:27 -03:00
estate.h
fb.h sparc: Really fix "console=" for serial consoles. 2010-08-16 12:26:09 -07:00
fbio.h tree-wide: s/widht/width/g typo in comments 2010-02-05 12:22:42 +01:00
fcntl.h vfs: add nonconflicting values for O_PATH 2011-03-16 09:54:02 -04:00
fhc.h sparc64: Rewrite central driver. 2008-08-31 20:56:15 -07:00
fixmap.h
floppy_32.h sparc: Remove unnecessary semicolons 2011-06-07 16:06:34 -07:00
floppy_64.h sparc: Remove unnecessary semicolons 2011-06-07 16:06:34 -07:00
floppy.h
fpumacro.h
ftrace.h sparc64: Add proper dynamic ftrace support. 2009-06-16 04:56:53 -07:00
futex_32.h
futex_64.h futex: Sanitize futex ops argument types 2011-03-11 12:23:31 +01:00
futex.h
gpio.h sparc: Add GPIO layer support. 2008-08-24 20:33:56 -07:00
hardirq_32.h sparc32: convert to asm-generic/hardirq.h 2009-10-01 13:45:13 -07:00
hardirq_64.h
hardirq.h
head_32.h
head_64.h
head.h
highmem.h mm: stack based kmap_atomic() 2010-10-26 16:52:08 -07:00
hugetlb.h
hvtramp.h
hw_irq.h
hypervisor.h Fix common misspellings 2011-03-31 11:26:23 -03:00
ide.h
idprom.h
intr_queue.h
io_32.h fbmem: fix fb_read, fb_write unaligned accesses 2010-10-27 18:03:08 -07:00
io_64.h fbmem: fix fb_read, fb_write unaligned accesses 2010-10-27 18:03:08 -07:00
io-unit.h sparc32: Kill iounit_map_dma_*(). 2008-08-29 02:15:23 -07:00
io.h sparc: add {read,write}*_be routines 2011-05-12 13:44:29 -07:00
ioctl.h
ioctls.h tty: add TIOCVHANGUP to allow clean tty shutdown of all ttys 2011-02-17 14:16:30 -08:00
iommu_32.h sparc: Remove generic SBUS probing layer. 2008-08-29 02:15:21 -07:00
iommu_64.h sparc64: Get rid of pci_controller_info. 2008-09-10 23:07:41 -07:00
iommu.h
ipcbuf.h sparc: unify ipcbuf.h 2009-01-04 15:44:52 -08:00
irq_32.h sparc32: genirq support 2011-04-19 22:11:40 -07:00
irq_64.h sparc: Provide NO_IRQ definition. 2011-03-18 15:03:16 -07:00
irq_regs.h
irq.h
irqflags_32.h Fix IRQ flag handling naming 2010-10-07 14:08:55 +01:00
irqflags_64.h Fix IRQ flag handling naming 2010-10-07 14:08:55 +01:00
irqflags.h
jsflash.h sparc: fix warning in userspace header jsflash.h 2009-01-02 21:31:13 -08:00
jump_label.h jump label: Introduce static_branch() interface 2011-04-04 12:48:08 -04:00
Kbuild sparc: stop exporting openprom.h header 2010-10-08 13:04:00 -06:00
kdebug_32.h sparc32: kernel/trace/trace.c wants DIE_OOPS 2008-11-01 21:44:01 -07:00
kdebug_64.h sparc64: Implement NMI watchdog on capable cpus. 2009-01-30 00:03:53 -08:00
kdebug.h
kgdb.h
kmap_types.h kmap_types: make most arches use generic header file 2009-06-16 19:47:51 -07:00
kprobes.h
ldc.h
leon_amba.h SPARC/LEON: power down instruction different of different LEONs 2011-03-16 18:19:04 -07:00
leon_pci.h sparc32,leon: added LEON-common low-level PCI routines 2011-06-02 14:32:37 -07:00
leon.h sparc32,leon: add GRPCI2 PCI Host driver 2011-06-02 14:32:38 -07:00
linkage.h
local64.h arch: Implement local64_t 2010-06-09 11:12:36 +02:00
local.h
lsu.h
machines.h sparc,leon: Introduce the sparc-leon CPU type. 2009-08-17 18:32:10 -07:00
mbus.h
mc146818rtc_32.h
mc146818rtc_64.h sparc64: Use generic CMOS driver. 2008-08-29 14:16:48 -07:00
mc146818rtc.h
mdesc.h sparc64: Make mdesc_fill_in_cpu_data take a cpumask_t pointer. 2009-06-16 04:56:21 -07:00
memblock.h memblock: Introduce default allocation limit and use it to replace explicit ones 2010-08-05 12:56:07 +10:00
memctrl.h sparc64: Add generic interface for registering a dimm printing handler. 2008-08-24 22:08:34 -07:00
memreg.h
mman.h mm: add MAP_HUGETLB for mmaping pseudo-anonymous huge page regions 2009-09-22 07:17:41 -07:00
mmu_32.h sparc32: add irq + smp declarations to headers 2011-03-16 18:19:08 -07:00
mmu_64.h
mmu_context_32.h
mmu_context_64.h cpumask: use mm_cpumask() wrapper: sparc 2009-03-16 14:40:39 +10:30
mmu_context.h
mmu.h
mmzone.h Fix node_start/end_pfn() definition for mm/page_cgroup.c 2011-06-27 14:13:09 -07:00
module.h sparc: unify module.h 2008-12-26 15:35:41 -08:00
mpmbox.h
msgbuf.h
msi.h
mutex.h
mxcc.h
nmi.h sparc64: Initial hw perf counter support. 2009-09-10 06:28:20 -07:00
ns87303.h Fix common misspellings 2011-03-31 11:26:23 -03:00
obio.h sparc32: Move sun4d show_leds() out of asm/obio.h 2008-09-08 15:40:45 -07:00
openprom.h sparc: Pass buffer pointer all the way down to prom_{get,put}char(). 2010-11-30 14:33:29 -08:00
openpromio.h
oplib_32.h sparc: fix sparse warnings in arch/sparc/prom for 32 bit build 2011-01-03 12:15:12 -08:00
oplib_64.h sparc: Eliminate prom_stdin. 2010-12-12 14:57:53 -08:00
oplib.h
page_32.h sparc32: Fix page_to_phys(). 2010-01-14 03:14:53 -08:00
page_64.h asm-generic: rename page.h and uaccess.h 2009-06-11 21:02:17 +02:00
page.h
param.h sparc: Simplify param.h by simply including <asm-generic/param.h> 2010-01-12 02:46:16 -08:00
parport.h dt/sparc: Eliminate users of of_platform_{,un}register_driver 2011-02-28 01:36:39 -07:00
pbm.h
pci_32.h sparc32,leon: added LEON-common low-level PCI routines 2011-06-02 14:32:37 -07:00
pci_64.h sparc: remove dma64_addr_t usage 2010-10-27 18:03:17 -07:00
pci.h pci-dma: add linux/pci-dma.h to linux/pci.h 2010-03-12 15:52:42 -08:00
pcic.h sparc32: added CONFIG_PCIC_PCI Kconfig setting 2011-06-02 14:32:37 -07:00
pcr.h Fix common misspellings 2011-03-31 11:26:23 -03:00
percpu_32.h
percpu_64.h sparc64: Get rid of real_setup_per_cpu_areas(). 2009-06-16 04:56:23 -07:00
percpu.h
perf_event.h perf, arch: Cleanup perf-pmu init vs lockup-detector 2010-11-26 15:14:56 +01:00
perfctr.h sparc64: Kill off old sys_perfctr system call and state. 2010-03-03 08:08:49 -08:00
pgalloc_32.h mm: Pass virtual address to [__]p{te,ud,md}_free_tlb() 2009-07-27 12:10:38 -07:00
pgalloc_64.h sparc: mmu_gather rework 2011-05-25 08:39:13 -07:00
pgalloc.h
pgtable_32.h sparc32: avoid build warning at mm/percpu.c:1647 2011-04-21 15:48:39 -07:00
pgtable_64.h sparc: mmu_gather rework 2011-05-25 08:39:13 -07:00
pgtable.h
pgtsrmmu.h sparc,leon: Introduce the sparc-leon CPU type. 2009-08-17 18:32:10 -07:00
pgtsun4.h
pgtsun4c.h
pil.h sparc64: Reschedule KGDB capture to a software interrupt. 2009-03-18 23:51:57 -07:00
poll.h
posix_types.h sparc: unify posix_types.h 2009-01-02 18:35:29 -08:00
processor_32.h sparc: add '32' suffix to reg_window, sigcontext, __siginfo_t 2009-01-02 19:32:59 -08:00
processor_64.h sparc64: Kill annoying warning when building compat_binfmt_elf.o 2008-11-02 00:15:38 -07:00
processor.h
prom.h of/promtree: make drivers/of/pdt.c no longer sparc-only 2010-10-10 21:53:30 -06:00
psr.h
psrcompat.h
pstate.h
ptrace.h Fix common misspellings 2011-03-31 11:26:23 -03:00
resource.h
ross.h
rwsem.h rwsem: Move duplicate function prototypes to linux/rwsem.h 2011-01-27 12:30:39 +01:00
sbi.h
scatterlist.h remove needless ISA_DMA_THRESHOLD 2010-08-07 18:15:50 +02:00
scratchpad.h
seccomp.h x86-64: seccomp: fix 32/64 syscall hole 2009-03-02 15:41:30 -08:00
sections.h sparc: unify sections.h 2008-12-27 00:35:12 -08:00
sembuf.h
serial.h serial: allow 8250 to be used on sparc 2008-10-13 09:51:40 -07:00
setup.h sparc32: always define boot_cpu_id 2011-04-21 16:44:44 -07:00
sfafsr.h
sfp-machine_32.h
sfp-machine_64.h
sfp-machine.h
shmbuf.h
shmparam_32.h
shmparam_64.h
shmparam.h
sigcontext.h sparc: unify sigcontext.h 2009-01-02 19:34:46 -08:00
siginfo.h sparc: unify siginfo.h 2009-01-02 21:10:04 -08:00
signal.h asm-generic: rename termios.h, signal.h and mman.h 2009-06-11 21:01:52 +02:00
smp_32.h sparc: convert old cpumask API into new one 2011-05-16 13:38:07 -07:00
smp_64.h sparc: consolidate show_cpuinfo in cpu.c 2011-04-21 15:45:45 -07:00
smp.h
smpprim.h
socket.h net: Generalize socket rx gap / receive queue overflow cmsg 2009-10-12 13:26:31 -07:00
sockios.h
sparsemem.h
spinlock_32.h sparc32: fix build, fix missing cpu_relax declaration 2011-05-22 21:41:35 -07:00
spinlock_64.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
spinlock.h
spitfire.h sparc: unify kernel/cpu 2008-12-07 00:04:30 -08:00
stacktrace.h
starfire.h sparc64: Delete starfire_cpu_setup(). 2008-08-31 01:40:12 -07:00
stat.h sparc: Fix use of uid16_t and gid16_t in asm/stat.h 2010-03-27 08:36:18 -07:00
statfs.h SPARC: Use <asm-generic/statfs.h> 2008-09-06 19:30:17 +01:00
string_32.h sparc: Stop trying to be so fancy and use __builtin_{memcpy,memset}() 2009-12-10 23:32:10 -08:00
string_64.h sparc: Stop trying to be so fancy and use __builtin_{memcpy,memset}() 2009-12-10 23:32:10 -08:00
string.h
sunbpp.h
swab.h sparc: introduce asm/swab.h 2009-01-06 18:10:27 -08:00
swift.h
syscall.h tracing: Unify arch_syscall_addr() implementations 2010-02-17 13:07:21 +01:00
syscalls.h
sysen.h
system_32.h sparc: Remove unnecessary semicolons 2011-06-07 16:06:34 -07:00
system_64.h sparc: Remove unnecessary semicolons 2011-06-07 16:06:34 -07:00
system.h
termbits.h tty: Add EXTPROC support for LINEMODE 2010-08-10 13:47:39 -07:00
termios.h
thread_info_32.h mm: NUMA aware alloc_thread_info_node() 2011-03-22 17:44:01 -07:00
thread_info_64.h mm: NUMA aware alloc_thread_info_node() 2011-03-22 17:44:01 -07:00
thread_info.h
timer_32.h sparc32: Delete master_l10_limit. 2008-09-19 21:18:03 -07:00
timer_64.h sparc64: Use unsigned long long for u64. 2009-01-06 13:19:28 -08:00
timer.h
timex_32.h sparc: convert to arch_gettimeoffset() 2010-01-15 01:34:28 -08:00
timex_64.h
timex.h
tlb_32.h
tlb_64.h sparc: mmu_gather rework 2011-05-25 08:39:13 -07:00
tlb.h
tlbflush_32.h
tlbflush_64.h sparc: mmu_gather rework 2011-05-25 08:39:13 -07:00
tlbflush.h
topology_32.h
topology_64.h sched, sparc64: Turn cpu_coregroup_mask() into a real function 2011-04-12 08:46:41 +02:00
topology.h
trap_block.h sparc64: Store per-cpu offset in trap_block[] 2009-06-16 04:56:11 -07:00
traps.h sparc: drop get_tbr() in traps.h 2009-01-02 21:33:05 -08:00
tsb.h sparc64: Stop using memory barriers for atomics and locks. 2008-12-04 09:16:47 -08:00
tsunami.h
ttable.h sparc64: Make special trap return path for TRAP_NMI(). 2008-12-04 09:17:03 -08:00
turbosparc.h
types.h remove dma64_addr_t 2011-03-23 19:47:18 -07:00
uaccess_32.h sparc: Kill user copy check code. 2010-08-09 00:45:46 -07:00
uaccess_64.h sparc: Kill user copy check code. 2010-08-09 00:45:46 -07:00
uaccess.h
uctx.h
unaligned.h
unistd.h ns: Wire up the setns system call 2011-05-28 10:48:39 -07:00
upa.h
user.h
utrap.h
vac-ops.h sparc: remove CONFIG_SUN4 2008-08-31 20:59:37 -07:00
vaddrs.h
vga.h
viking.h
vio.h BUILD_BUG_ON(): fix it and a couple of bogus uses of it 2009-09-23 07:39:29 -07:00
visasm.h sparc64: Fix sparse warnings in visemul.c 2008-09-11 23:46:40 -07:00
watchdog.h
winmacro.h sparc32,leon: added some SMP comments 2011-05-16 13:03:28 -07:00
xor_32.h
xor_64.h
xor.h