debuggers.hg

view xen/include/asm-ia64/linux-xen/asm/sn/arch.h @ 0:7d21f7218375

Exact replica of unstable on 051908 + README-this
author Mukesh Rathor
date Mon May 19 15:34:57 2008 -0700 (2008-05-19)
parents
children
line source
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 * SGI specific setup.
7 *
8 * Copyright (C) 1995-1997,1999,2001-2005 Silicon Graphics, Inc. All rights reserved.
9 * Copyright (C) 1999 Ralf Baechle (ralf@gnu.org)
10 */
11 #ifndef _ASM_IA64_SN_ARCH_H
12 #define _ASM_IA64_SN_ARCH_H
14 #ifndef XEN
15 #include <linux/numa.h>
16 #include <asm/types.h>
17 #include <asm/percpu.h>
18 #include <asm/sn/types.h>
19 #endif
20 #include <asm/sn/sn_cpuid.h>
22 /*
23 * This is the maximum number of NUMALINK nodes that can be part of a single
24 * SSI kernel. This number includes C-brick, M-bricks, and TIOs. Nodes in
25 * remote partitions are NOT included in this number.
26 * The number of compact nodes cannot exceed size of a coherency domain.
27 * The purpose of this define is to specify a node count that includes
28 * all C/M/TIO nodes in an SSI system.
29 *
30 * SGI system can currently support up to 256 C/M nodes plus additional TIO nodes.
31 *
32 * Note: ACPI20 has an architectural limit of 256 nodes. When we upgrade
33 * to ACPI3.0, this limit will be removed. The notion of "compact nodes"
34 * should be deleted and TIOs should be included in MAX_NUMNODES.
35 */
36 #define MAX_TIO_NODES MAX_NUMNODES
37 #define MAX_COMPACT_NODES (MAX_NUMNODES + MAX_TIO_NODES)
39 /*
40 * Maximum number of nodes in all partitions and in all coherency domains.
41 * This is the total number of nodes accessible in the numalink fabric. It
42 * includes all C & M bricks, plus all TIOs.
43 *
44 * This value is also the value of the maximum number of NASIDs in the numalink
45 * fabric.
46 */
47 #define MAX_NUMALINK_NODES 16384
49 /*
50 * The following defines attributes of the HUB chip. These attributes are
51 * frequently referenced. They are kept in the per-cpu data areas of each cpu.
52 * They are kept together in a struct to minimize cache misses.
53 */
54 struct sn_hub_info_s {
55 u8 shub2;
56 u8 nasid_shift;
57 u8 as_shift;
58 u8 shub_1_1_found;
59 u16 nasid_bitmask;
60 };
61 DECLARE_PER_CPU(struct sn_hub_info_s, __sn_hub_info);
62 #define sn_hub_info (&__get_cpu_var(__sn_hub_info))
63 #ifndef XEN
64 #define is_shub2() (sn_hub_info->shub2)
65 #define is_shub1() (sn_hub_info->shub2 == 0)
66 #else
67 #define is_shub2() 0
68 #define is_shub1() 1
69 #endif
71 /*
72 * Use this macro to test if shub 1.1 wars should be enabled
73 */
74 #define enable_shub_wars_1_1() (sn_hub_info->shub_1_1_found)
77 /*
78 * Compact node ID to nasid mappings kept in the per-cpu data areas of each
79 * cpu.
80 */
81 DECLARE_PER_CPU(short, __sn_cnodeid_to_nasid[MAX_COMPACT_NODES]);
82 #define sn_cnodeid_to_nasid (&__get_cpu_var(__sn_cnodeid_to_nasid[0]))
84 #ifndef XEN
85 extern u8 sn_partition_id;
86 extern u8 sn_system_size;
87 extern u8 sn_sharing_domain_size;
88 extern u8 sn_region_size;
90 extern void sn_flush_all_caches(long addr, long bytes);
91 #endif
92 #endif /* _ASM_IA64_SN_ARCH_H */