diff options
author | Mark Goodwin <markgw@sgi.com> | 2005-04-25 16:21:54 -0400 |
---|---|---|
committer | Tony Luck <tony.luck@intel.com> | 2005-04-25 16:21:54 -0400 |
commit | 0985ea8f2db87d32b0b750229889e55fed7458ef (patch) | |
tree | 76e292f65c01b5f298a7a8d5a03287229c4be3a3 /include/asm-ia64/sn/geo.h | |
parent | a37d98f6a98254c05315e0bbf45c4602942d14b1 (diff) |
[IA64-SGI] Altix SN add support for slots in geoid_t locator
This patch against ia64-test-2.6.12 is needed for forthcoming
Altix chipsets. It renames geoid_any_t to geoid_common_t and
splits the 8bit 'slab' field into two 4bit fields for 'slab'
and 'slot'. Similar changes in the Altix SAL will retain backward
compatibility for old kernels.
Signed-off-by: Mark Goodwin <markgw@sgi.com>
Signed-off-by: Tony Luck <tony.luck@intel.com>
Diffstat (limited to 'include/asm-ia64/sn/geo.h')
-rw-r--r-- | include/asm-ia64/sn/geo.h | 45 |
1 files changed, 27 insertions, 18 deletions
diff --git a/include/asm-ia64/sn/geo.h b/include/asm-ia64/sn/geo.h index f566343d25f8..84b254603b8d 100644 --- a/include/asm-ia64/sn/geo.h +++ b/include/asm-ia64/sn/geo.h | |||
@@ -18,32 +18,34 @@ | |||
18 | #define GEOID_SIZE 8 /* Would 16 be better? The size can | 18 | #define GEOID_SIZE 8 /* Would 16 be better? The size can |
19 | be different on different platforms. */ | 19 | be different on different platforms. */ |
20 | 20 | ||
21 | #define MAX_SLABS 0xe /* slabs per module */ | 21 | #define MAX_SLOTS 0xf /* slots per module */ |
22 | #define MAX_SLABS 0xf /* slabs per slot */ | ||
22 | 23 | ||
23 | typedef unsigned char geo_type_t; | 24 | typedef unsigned char geo_type_t; |
24 | 25 | ||
25 | /* Fields common to all substructures */ | 26 | /* Fields common to all substructures */ |
26 | typedef struct geo_any_s { | 27 | typedef struct geo_common_s { |
27 | moduleid_t module; /* The module (box) this h/w lives in */ | 28 | moduleid_t module; /* The module (box) this h/w lives in */ |
28 | geo_type_t type; /* What type of h/w is named by this geoid_t */ | 29 | geo_type_t type; /* What type of h/w is named by this geoid_t */ |
29 | slabid_t slab; /* The logical assembly within the module */ | 30 | slabid_t slab:4; /* slab (ASIC), 0 .. 15 within slot */ |
30 | } geo_any_t; | 31 | slotid_t slot:4; /* slot (Blade), 0 .. 15 within module */ |
32 | } geo_common_t; | ||
31 | 33 | ||
32 | /* Additional fields for particular types of hardware */ | 34 | /* Additional fields for particular types of hardware */ |
33 | typedef struct geo_node_s { | 35 | typedef struct geo_node_s { |
34 | geo_any_t any; /* No additional fields needed */ | 36 | geo_common_t common; /* No additional fields needed */ |
35 | } geo_node_t; | 37 | } geo_node_t; |
36 | 38 | ||
37 | typedef struct geo_rtr_s { | 39 | typedef struct geo_rtr_s { |
38 | geo_any_t any; /* No additional fields needed */ | 40 | geo_common_t common; /* No additional fields needed */ |
39 | } geo_rtr_t; | 41 | } geo_rtr_t; |
40 | 42 | ||
41 | typedef struct geo_iocntl_s { | 43 | typedef struct geo_iocntl_s { |
42 | geo_any_t any; /* No additional fields needed */ | 44 | geo_common_t common; /* No additional fields needed */ |
43 | } geo_iocntl_t; | 45 | } geo_iocntl_t; |
44 | 46 | ||
45 | typedef struct geo_pcicard_s { | 47 | typedef struct geo_pcicard_s { |
46 | geo_iocntl_t any; | 48 | geo_iocntl_t common; |
47 | char bus; /* Bus/widget number */ | 49 | char bus; /* Bus/widget number */ |
48 | char slot; /* PCI slot number */ | 50 | char slot; /* PCI slot number */ |
49 | } geo_pcicard_t; | 51 | } geo_pcicard_t; |
@@ -62,14 +64,14 @@ typedef struct geo_mem_s { | |||
62 | 64 | ||
63 | 65 | ||
64 | typedef union geoid_u { | 66 | typedef union geoid_u { |
65 | geo_any_t any; | 67 | geo_common_t common; |
66 | geo_node_t node; | 68 | geo_node_t node; |
67 | geo_iocntl_t iocntl; | 69 | geo_iocntl_t iocntl; |
68 | geo_pcicard_t pcicard; | 70 | geo_pcicard_t pcicard; |
69 | geo_rtr_t rtr; | 71 | geo_rtr_t rtr; |
70 | geo_cpu_t cpu; | 72 | geo_cpu_t cpu; |
71 | geo_mem_t mem; | 73 | geo_mem_t mem; |
72 | char padsize[GEOID_SIZE]; | 74 | char padsize[GEOID_SIZE]; |
73 | } geoid_t; | 75 | } geoid_t; |
74 | 76 | ||
75 | 77 | ||
@@ -104,19 +106,26 @@ typedef union geoid_u { | |||
104 | #define INVALID_CNODEID ((cnodeid_t)-1) | 106 | #define INVALID_CNODEID ((cnodeid_t)-1) |
105 | #define INVALID_PNODEID ((pnodeid_t)-1) | 107 | #define INVALID_PNODEID ((pnodeid_t)-1) |
106 | #define INVALID_SLAB (slabid_t)-1 | 108 | #define INVALID_SLAB (slabid_t)-1 |
109 | #define INVALID_SLOT (slotid_t)-1 | ||
107 | #define INVALID_MODULE ((moduleid_t)-1) | 110 | #define INVALID_MODULE ((moduleid_t)-1) |
108 | #define INVALID_PARTID ((partid_t)-1) | 111 | #define INVALID_PARTID ((partid_t)-1) |
109 | 112 | ||
110 | static inline slabid_t geo_slab(geoid_t g) | 113 | static inline slabid_t geo_slab(geoid_t g) |
111 | { | 114 | { |
112 | return (g.any.type == GEO_TYPE_INVALID) ? | 115 | return (g.common.type == GEO_TYPE_INVALID) ? |
113 | INVALID_SLAB : g.any.slab; | 116 | INVALID_SLAB : g.common.slab; |
117 | } | ||
118 | |||
119 | static inline slotid_t geo_slot(geoid_t g) | ||
120 | { | ||
121 | return (g.common.type == GEO_TYPE_INVALID) ? | ||
122 | INVALID_SLOT : g.common.slot; | ||
114 | } | 123 | } |
115 | 124 | ||
116 | static inline moduleid_t geo_module(geoid_t g) | 125 | static inline moduleid_t geo_module(geoid_t g) |
117 | { | 126 | { |
118 | return (g.any.type == GEO_TYPE_INVALID) ? | 127 | return (g.common.type == GEO_TYPE_INVALID) ? |
119 | INVALID_MODULE : g.any.module; | 128 | INVALID_MODULE : g.common.module; |
120 | } | 129 | } |
121 | 130 | ||
122 | extern geoid_t cnodeid_get_geoid(cnodeid_t cnode); | 131 | extern geoid_t cnodeid_get_geoid(cnodeid_t cnode); |