1/* $Id: arch.h,v 1.1.1.1 2008/10/15 03:29:03 james26_jang Exp $
2 *
3 * This file is subject to the terms and conditions of the GNU General Public
4 * License.  See the file "COPYING" in the main directory of this archive
5 * for more details.
6 *
7 * Copyright (C) 1992 - 1997, 2000-2002 Silicon Graphics, Inc. All rights reserved.
8 */
9#ifndef _ASM_IA64_SN_SN2_ARCH_H
10#define _ASM_IA64_SN_SN2_ARCH_H
11
12#include <asm/types.h>
13
14
15#define CPUS_PER_NODE           4       /* CPUs on a single hub */
16#define CPUS_PER_SUBNODE        4       /* CPUs on a single hub PI */
17
18
19/*
20 * This is the maximum number of NASIDS that can be present in a system.
21 * (Highest NASID plus one.)
22 */
23#define MAX_NASIDS              2048
24
25
26/*
27 * This is the maximum number of nodes that can be part of a kernel.
28 * Effectively, it's the maximum number of compact node ids (cnodeid_t).
29 * This is not necessarily the same as MAX_NASIDS.
30 */
31#define MAX_COMPACT_NODES       128
32
33/*
34 * MAX_REGIONS refers to the maximum number of hardware partitioned regions.
35 */
36#define	MAX_REGIONS		64
37#define MAX_NONPREMIUM_REGIONS  16
38#define MAX_PREMIUM_REGIONS     MAX_REGIONS
39
40
41/*
42 * MAX_PARITIONS refers to the maximum number of logically defined
43 * partitions the system can support.
44 */
45#define MAX_PARTITIONS		MAX_REGIONS
46
47
48#define NASID_MASK_BYTES	((MAX_NASIDS + 7) / 8)
49
50
51/*
52 * 1 FSB per SHUB, with up to 4 cpus per FSB.
53 */
54#define NUM_SUBNODES	1
55#define SUBNODE_SHFT	0
56#define SUBNODE_MASK	(0x0 << SUBNODE_SHFT)
57#define LOCALCPU_SHFT	0
58#define LOCALCPU_MASK	(0x3 << LOCALCPU_SHFT)
59#define SUBNODE(slice)	(((slice) & SUBNODE_MASK) >> SUBNODE_SHFT)
60#define LOCALCPU(slice)	(((slice) & LOCALCPU_MASK) >> LOCALCPU_SHFT)
61#define TO_SLICE(subn, local)	(((subn) << SUBNODE_SHFT) | \
62				 ((local) << LOCALCPU_SHFT))
63
64typedef u64 mmr_t;
65
66#endif /* _ASM_IA64_SN_SN2_ARCH_H */
67