aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-ia64/sn/sn_cpuid.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/asm-ia64/sn/sn_cpuid.h')
-rw-r--r--include/asm-ia64/sn/sn_cpuid.h25
1 files changed, 11 insertions, 14 deletions
diff --git a/include/asm-ia64/sn/sn_cpuid.h b/include/asm-ia64/sn/sn_cpuid.h
index 685435af170d..20b300187669 100644
--- a/include/asm-ia64/sn/sn_cpuid.h
+++ b/include/asm-ia64/sn/sn_cpuid.h
@@ -4,7 +4,7 @@
4 * License. See the file "COPYING" in the main directory of this archive 4 * License. See the file "COPYING" in the main directory of this archive
5 * for more details. 5 * for more details.
6 * 6 *
7 * Copyright (C) 2000-2004 Silicon Graphics, Inc. All rights reserved. 7 * Copyright (C) 2000-2005 Silicon Graphics, Inc. All rights reserved.
8 */ 8 */
9 9
10 10
@@ -92,24 +92,24 @@
92 * NOTE: on non-MP systems, only cpuid 0 exists 92 * NOTE: on non-MP systems, only cpuid 0 exists
93 */ 93 */
94 94
95extern short physical_node_map[]; /* indexed by nasid to get cnode */ 95extern short physical_node_map[]; /* indexed by nasid to get cnode */
96 96
97/* 97/*
98 * Macros for retrieving info about current cpu 98 * Macros for retrieving info about current cpu
99 */ 99 */
100#define get_nasid() (nodepda->phys_cpuid[smp_processor_id()].nasid) 100#define get_nasid() (sn_nodepda->phys_cpuid[smp_processor_id()].nasid)
101#define get_subnode() (nodepda->phys_cpuid[smp_processor_id()].subnode) 101#define get_subnode() (sn_nodepda->phys_cpuid[smp_processor_id()].subnode)
102#define get_slice() (nodepda->phys_cpuid[smp_processor_id()].slice) 102#define get_slice() (sn_nodepda->phys_cpuid[smp_processor_id()].slice)
103#define get_cnode() (nodepda->phys_cpuid[smp_processor_id()].cnode) 103#define get_cnode() (sn_nodepda->phys_cpuid[smp_processor_id()].cnode)
104#define get_sapicid() ((ia64_getreg(_IA64_REG_CR_LID) >> 16) & 0xffff) 104#define get_sapicid() ((ia64_getreg(_IA64_REG_CR_LID) >> 16) & 0xffff)
105 105
106/* 106/*
107 * Macros for retrieving info about an arbitrary cpu 107 * Macros for retrieving info about an arbitrary cpu
108 * cpuid - logical cpu id 108 * cpuid - logical cpu id
109 */ 109 */
110#define cpuid_to_nasid(cpuid) (nodepda->phys_cpuid[cpuid].nasid) 110#define cpuid_to_nasid(cpuid) (sn_nodepda->phys_cpuid[cpuid].nasid)
111#define cpuid_to_subnode(cpuid) (nodepda->phys_cpuid[cpuid].subnode) 111#define cpuid_to_subnode(cpuid) (sn_nodepda->phys_cpuid[cpuid].subnode)
112#define cpuid_to_slice(cpuid) (nodepda->phys_cpuid[cpuid].slice) 112#define cpuid_to_slice(cpuid) (sn_nodepda->phys_cpuid[cpuid].slice)
113#define cpuid_to_cnodeid(cpuid) (physical_node_map[cpuid_to_nasid(cpuid)]) 113#define cpuid_to_cnodeid(cpuid) (physical_node_map[cpuid_to_nasid(cpuid)])
114 114
115 115
@@ -123,11 +123,8 @@ extern int nasid_slice_to_cpuid(int, int);
123 123
124/* 124/*
125 * cnodeid_to_nasid - convert a cnodeid to a NASID 125 * cnodeid_to_nasid - convert a cnodeid to a NASID
126 * Macro relies on pg_data for a node being on the node itself.
127 * Just extract the NASID from the pointer.
128 *
129 */ 126 */
130#define cnodeid_to_nasid(cnodeid) pda->cnodeid_to_nasid_table[cnodeid] 127#define cnodeid_to_nasid(cnodeid) (sn_cnodeid_to_nasid[cnodeid])
131 128
132/* 129/*
133 * nasid_to_cnodeid - convert a NASID to a cnodeid 130 * nasid_to_cnodeid - convert a NASID to a cnodeid