ftp://ftp.kernel.org/pub/linux/kernel/v2.6/linux-2.6.6.tar.bz2
[linux-2.6.git] / include / asm-ia64 / sn / sn2 / arch.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) 1992 - 1997, 2000-2003 Silicon Graphics, Inc. All rights reserved.
7  */
8 #ifndef _ASM_IA64_SN_SN2_ARCH_H
9 #define _ASM_IA64_SN_SN2_ARCH_H
10
11 #define CPUS_PER_NODE           4       /* CPUs on a single hub */
12 #define CPUS_PER_SUBNODE        4       /* CPUs on a single hub PI */
13
14
15 /*
16  * This is the maximum number of NASIDS that can be present in a system.
17  * (Highest NASID plus one.)
18  */
19 #define MAX_NASIDS              2048
20
21
22 /*
23  * This is the maximum number of nodes that can be part of a kernel.
24  * Effectively, it's the maximum number of compact node ids (cnodeid_t).
25  * This is not necessarily the same as MAX_NASIDS.
26  */
27 #define MAX_COMPACT_NODES       2048
28
29 /*
30  * MAX_REGIONS refers to the maximum number of hardware partitioned regions.
31  */
32 #define MAX_REGIONS             64
33 #define MAX_NONPREMIUM_REGIONS  16
34 #define MAX_PREMIUM_REGIONS     MAX_REGIONS
35
36
37 /*
38  * MAX_PARITIONS refers to the maximum number of logically defined 
39  * partitions the system can support.
40  */
41 #define MAX_PARTITIONS          MAX_REGIONS
42
43
44 #define NASID_MASK_BYTES        ((MAX_NASIDS + 7) / 8)
45 #define CNASID_MASK_BYTES       (NASID_MASK_BYTES / 2)
46
47
48 /*
49  * 1 FSB per SHUB, with up to 4 cpus per FSB.
50  */
51 #define NUM_SUBNODES    1
52 #define SUBNODE_SHFT    0
53 #define SUBNODE_MASK    (0x0 << SUBNODE_SHFT)
54 #define LOCALCPU_SHFT   0
55 #define LOCALCPU_MASK   (0x3 << LOCALCPU_SHFT)
56 #define SUBNODE(slice)  (((slice) & SUBNODE_MASK) >> SUBNODE_SHFT)
57 #define LOCALCPU(slice) (((slice) & LOCALCPU_MASK) >> LOCALCPU_SHFT)
58 #define TO_SLICE(subn, local)   (((subn) << SUBNODE_SHFT) | \
59                                  ((local) << LOCALCPU_SHFT))
60
61 #endif /* _ASM_IA64_SN_SN2_ARCH_H */