Update ia64 patch to 2.5.69-030521, throwing away the parts included
[linux-flexiantxendom0-3.2.10.git] / include / asm-ia64 / nodedata.h
1 /*
2  * This file is subject to the terms and conditions of the GNU General Public
3  * License.  See the file "COPYING" in the main directory of this archive
4  * for more details.
5  *
6  * Copyright (c) 2000 Silicon Graphics, Inc.  All rights reserved.
7  * Copyright (c) 2002 NEC Corp.
8  * Copyright (c) 2002 Erich Focht <efocht@ess.nec.de>
9  * Copyright (c) 2002 Kimio Suganuma <k-suganuma@da.jp.nec.com>
10  */
11
12
13 #ifndef _ASM_IA64_NODEDATA_H
14 #define _ASM_IA64_NODEDATA_H
15
16
17 #include <asm/mmzone.h>
18
19 /*
20  * Node Data. One of these structures is located on each node of a NUMA system.
21  */
22
23 struct pglist_data;
24 struct ia64_node_data {
25         short                   active_cpu_count;
26         short                   node;
27         struct pglist_data      *pg_data_ptrs[NR_NODES];
28         struct page             *bank_mem_map_base[NR_BANKS];
29         struct ia64_node_data   *node_data_ptrs[NR_NODES];
30         short                   node_id_map[NR_BANKS];
31 };
32
33
34 /*
35  * Return a pointer to the node_data structure for the executing cpu.
36  */
37 #define local_node_data         (local_cpu_data->node_data)
38
39
40 /*
41  * Return a pointer to the node_data structure for the specified node.
42  */
43 #define node_data(node) (local_node_data->node_data_ptrs[node])
44
45 /*
46  * Get a pointer to the node_id/node_data for the current cpu.
47  *    (boot time only)
48  */
49 extern int boot_get_local_nodeid(void);
50 extern struct ia64_node_data *get_node_data_ptr(void);
51
52 /*
53  * Given a node id, return a pointer to the pg_data_t for the node.
54  * The following 2 macros are similar. 
55  *
56  * NODE_DATA    - should be used in all code not related to system
57  *                initialization. It uses pernode data structures to minimize
58  *                offnode memory references. However, these structure are not 
59  *                present during boot. This macro can be used once cpu_init
60  *                completes.
61  *
62  * BOOT_NODE_DATA
63  *              - should be used during system initialization 
64  *                prior to freeing __initdata. It does not depend on the percpu
65  *                area being present.
66  *
67  * NOTE:   The names of these macros are misleading but are difficult to change
68  *         since they are used in generic linux & on other architecures.
69  */
70 #define NODE_DATA(nid)          (local_node_data->pg_data_ptrs[nid])
71 #define BOOT_NODE_DATA(nid)     boot_get_pg_data_ptr((long)(nid))
72
73 struct pglist_data;
74 extern struct pglist_data * __init boot_get_pg_data_ptr(long);
75
76 #endif /* _ASM_IA64_NODEDATA_H */