diff options
author | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-04-16 18:20:36 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-04-16 18:20:36 -0400 |
commit | 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 (patch) | |
tree | 0bba044c4ce775e45a88a51686b5d9f90697ea9d /include/asm-ia64/sn/nodepda.h |
Linux-2.6.12-rc2v2.6.12-rc2
Initial git repository build. I'm not bothering with the full history,
even though we have it. We can create a separate "historical" git
archive of that later if we want to, and in the meantime it's about
3.2GB when imported into git - space that would just make the early
git days unnecessarily complicated, when we don't have a lot of good
infrastructure for it.
Let it rip!
Diffstat (limited to 'include/asm-ia64/sn/nodepda.h')
-rw-r--r-- | include/asm-ia64/sn/nodepda.h | 86 |
1 files changed, 86 insertions, 0 deletions
diff --git a/include/asm-ia64/sn/nodepda.h b/include/asm-ia64/sn/nodepda.h new file mode 100644 index 000000000000..2fbde33656e6 --- /dev/null +++ b/include/asm-ia64/sn/nodepda.h | |||
@@ -0,0 +1,86 @@ | |||
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-2004 Silicon Graphics, Inc. All rights reserved. | ||
7 | */ | ||
8 | #ifndef _ASM_IA64_SN_NODEPDA_H | ||
9 | #define _ASM_IA64_SN_NODEPDA_H | ||
10 | |||
11 | |||
12 | #include <asm/semaphore.h> | ||
13 | #include <asm/irq.h> | ||
14 | #include <asm/sn/arch.h> | ||
15 | #include <asm/sn/intr.h> | ||
16 | #include <asm/sn/pda.h> | ||
17 | #include <asm/sn/bte.h> | ||
18 | |||
19 | /* | ||
20 | * NUMA Node-Specific Data structures are defined in this file. | ||
21 | * In particular, this is the location of the node PDA. | ||
22 | * A pointer to the right node PDA is saved in each CPU PDA. | ||
23 | */ | ||
24 | |||
25 | /* | ||
26 | * Node-specific data structure. | ||
27 | * | ||
28 | * One of these structures is allocated on each node of a NUMA system. | ||
29 | * | ||
30 | * This structure provides a convenient way of keeping together | ||
31 | * all per-node data structures. | ||
32 | */ | ||
33 | struct phys_cpuid { | ||
34 | short nasid; | ||
35 | char subnode; | ||
36 | char slice; | ||
37 | }; | ||
38 | |||
39 | struct nodepda_s { | ||
40 | void *pdinfo; /* Platform-dependent per-node info */ | ||
41 | spinlock_t bist_lock; | ||
42 | |||
43 | /* | ||
44 | * The BTEs on this node are shared by the local cpus | ||
45 | */ | ||
46 | struct bteinfo_s bte_if[BTES_PER_NODE]; /* Virtual Interface */ | ||
47 | struct timer_list bte_recovery_timer; | ||
48 | spinlock_t bte_recovery_lock; | ||
49 | |||
50 | /* | ||
51 | * Array of pointers to the nodepdas for each node. | ||
52 | */ | ||
53 | struct nodepda_s *pernode_pdaindr[MAX_COMPACT_NODES]; | ||
54 | |||
55 | /* | ||
56 | * Array of physical cpu identifiers. Indexed by cpuid. | ||
57 | */ | ||
58 | struct phys_cpuid phys_cpuid[NR_CPUS]; | ||
59 | }; | ||
60 | |||
61 | typedef struct nodepda_s nodepda_t; | ||
62 | |||
63 | /* | ||
64 | * Access Functions for node PDA. | ||
65 | * Since there is one nodepda for each node, we need a convenient mechanism | ||
66 | * to access these nodepdas without cluttering code with #ifdefs. | ||
67 | * The next set of definitions provides this. | ||
68 | * Routines are expected to use | ||
69 | * | ||
70 | * 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 | ||
72 | * | ||
73 | * NODEPDA(cnode) -> to access node PDA for cnodeid | ||
74 | * SUBNODEPDA(cnode,sn) -> to access subnode PDA for cnodeid/subnode | ||
75 | */ | ||
76 | |||
77 | #define nodepda pda->p_nodepda /* Ptr to this node's PDA */ | ||
78 | #define NODEPDA(cnode) (nodepda->pernode_pdaindr[cnode]) | ||
79 | |||
80 | /* | ||
81 | * Check if given a compact node id the corresponding node has all the | ||
82 | * cpus disabled. | ||
83 | */ | ||
84 | #define is_headless_node(cnode) (nr_cpus_node(cnode) == 0) | ||
85 | |||
86 | #endif /* _ASM_IA64_SN_NODEPDA_H */ | ||