aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-ia64/sn/nodepda.h
diff options
context:
space:
mode:
authorDean Nelson <dcn@sgi.com>2005-03-22 18:00:00 -0500
committerTony Luck <tony.luck@intel.com>2005-05-04 13:18:32 -0400
commit9b48b46678989b67cd00658ea88964163eaab616 (patch)
tree4b6362a239422144b4fe9d669ba2f5eefbb1374b /include/asm-ia64/sn/nodepda.h
parentc4b07b7b3693228c7b848c00a9d4bbb49506a45f (diff)
[IA64-SGI] move nodepda pointer out of pda
Remove the p_nodepda and p_subnodepda pointers from the pda_s structure. And then define a new per-cpu pointer to the nodepda and export it so that it can be accessed by kernel modules. Signed-off-by: Dean Nelson <dcn@sgi.com> Signed-off-by: Tony Luck <tony.luck@intel.com>
Diffstat (limited to 'include/asm-ia64/sn/nodepda.h')
-rw-r--r--include/asm-ia64/sn/nodepda.h15
1 files changed, 6 insertions, 9 deletions
diff --git a/include/asm-ia64/sn/nodepda.h b/include/asm-ia64/sn/nodepda.h
index 13cc1002b294..7138b1eafd6b 100644
--- a/include/asm-ia64/sn/nodepda.h
+++ b/include/asm-ia64/sn/nodepda.h
@@ -13,7 +13,6 @@
13#include <asm/irq.h> 13#include <asm/irq.h>
14#include <asm/sn/arch.h> 14#include <asm/sn/arch.h>
15#include <asm/sn/intr.h> 15#include <asm/sn/intr.h>
16#include <asm/sn/pda.h>
17#include <asm/sn/bte.h> 16#include <asm/sn/bte.h>
18 17
19/* 18/*
@@ -67,20 +66,18 @@ typedef struct nodepda_s nodepda_t;
67 * The next set of definitions provides this. 66 * The next set of definitions provides this.
68 * Routines are expected to use 67 * Routines are expected to use
69 * 68 *
70 * nodepda -> to access node PDA for the node on which code is running 69 * sn_nodepda - to access node PDA for the node on which code is running
71 * subnodepda -> to access subnode PDA for the subnode on which code is running 70 * NODEPDA(cnodeid) - to access node PDA for cnodeid
72 *
73 * NODEPDA(cnode) -> to access node PDA for cnodeid
74 * SUBNODEPDA(cnode,sn) -> to access subnode PDA for cnodeid/subnode
75 */ 71 */
76 72
77#define nodepda pda->p_nodepda /* Ptr to this node's PDA */ 73DECLARE_PER_CPU(struct nodepda_s *, __sn_nodepda);
78#define NODEPDA(cnode) (nodepda->pernode_pdaindr[cnode]) 74#define sn_nodepda (__get_cpu_var(__sn_nodepda))
75#define NODEPDA(cnodeid) (sn_nodepda->pernode_pdaindr[cnodeid])
79 76
80/* 77/*
81 * Check if given a compact node id the corresponding node has all the 78 * Check if given a compact node id the corresponding node has all the
82 * cpus disabled. 79 * cpus disabled.
83 */ 80 */
84#define is_headless_node(cnode) (nr_cpus_node(cnode) == 0) 81#define is_headless_node(cnodeid) (nr_cpus_node(cnodeid) == 0)
85 82
86#endif /* _ASM_IA64_SN_NODEPDA_H */ 83#endif /* _ASM_IA64_SN_NODEPDA_H */