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
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>
13 #ifndef _ASM_IA64_NODEDATA_H
14 #define _ASM_IA64_NODEDATA_H
17 #include <asm/mmzone.h>
20 * Node Data. One of these structures is located on each node of a NUMA system.
24 struct ia64_node_data {
25 short active_cpu_count;
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];
35 * Return a pointer to the node_data structure for the executing cpu.
37 #define local_node_data (local_cpu_data->node_data)
41 * Return a pointer to the node_data structure for the specified node.
43 #define node_data(node) (local_node_data->node_data_ptrs[node])
46 * Get a pointer to the node_id/node_data for the current cpu.
49 extern int boot_get_local_nodeid(void);
50 extern struct ia64_node_data *get_node_data_ptr(void);
53 * Given a node id, return a pointer to the pg_data_t for the node.
54 * The following 2 macros are similar.
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
63 * - should be used during system initialization
64 * prior to freeing __initdata. It does not depend on the percpu
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.
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))
74 extern struct pglist_data * __init boot_get_pg_data_ptr(long);
76 #endif /* _ASM_IA64_NODEDATA_H */