blob: 54958d6cae0440353ade0ff8a73f8668a52e5bac [file] [log] [blame]
Linus Torvalds1da177e2005-04-16 15:20:36 -07001/*
2 * Written by Kanoj Sarcar (kanoj@sgi.com) Aug 99
3 *
4 * PowerPC64 port:
5 * Copyright (C) 2002 Anton Blanchard, IBM Corp.
6 */
7#ifndef _ASM_MMZONE_H_
8#define _ASM_MMZONE_H_
9
10#include <linux/config.h>
Linus Torvalds1da177e2005-04-16 15:20:36 -070011
Anton Blanchard45fb6ce2005-11-11 14:22:35 +110012/*
13 * generic non-linear memory support:
Andy Whitcroft145e6642005-06-23 00:08:03 -070014 *
15 * 1) we will not split memory into more chunks than will fit into the
16 * flags field of the struct page
17 */
18
Andy Whitcroft145e6642005-06-23 00:08:03 -070019#ifdef CONFIG_NEED_MULTIPLE_NODES
Linus Torvalds1da177e2005-04-16 15:20:36 -070020
21extern struct pglist_data *node_data[];
Andy Whitcroft145e6642005-06-23 00:08:03 -070022/*
23 * Return a pointer to the node data for node n.
24 */
25#define NODE_DATA(nid) (node_data[nid])
Linus Torvalds1da177e2005-04-16 15:20:36 -070026
27/*
28 * Following are specific to this numa platform.
29 */
30
31extern int numa_cpu_lookup_table[];
Linus Torvalds1da177e2005-04-16 15:20:36 -070032extern cpumask_t numa_cpumask_lookup_table[];
Mike Kravetz82dd26a2005-11-04 15:20:24 -080033#ifdef CONFIG_MEMORY_HOTPLUG
34extern unsigned long max_pfn;
35#endif
Linus Torvalds1da177e2005-04-16 15:20:36 -070036
Linus Torvalds1da177e2005-04-16 15:20:36 -070037/*
38 * Following are macros that each numa implmentation must define.
39 */
40
Linus Torvalds1da177e2005-04-16 15:20:36 -070041#define node_start_pfn(nid) (NODE_DATA(nid)->node_start_pfn)
42#define node_end_pfn(nid) (NODE_DATA(nid)->node_end_pfn)
43
Andy Whitcroft145e6642005-06-23 00:08:03 -070044#endif /* CONFIG_NEED_MULTIPLE_NODES */
45
Andy Whitcroft510f8fa2005-06-23 00:08:01 -070046#ifdef CONFIG_HAVE_ARCH_EARLY_PFN_TO_NID
Anton Blanchard45fb6ce2005-11-11 14:22:35 +110047extern int __init early_pfn_to_nid(unsigned long pfn);
Andy Whitcroft510f8fa2005-06-23 00:08:01 -070048#endif
49
Linus Torvalds1da177e2005-04-16 15:20:36 -070050#endif /* _ASM_MMZONE_H_ */