Pull define-node-cleanup into release branch
This commit is contained in:
commit
a1e78db3f5
13 changed files with 96 additions and 180 deletions
|
@ -17,6 +17,32 @@
|
|||
#include <asm/sn/types.h>
|
||||
#include <asm/sn/sn_cpuid.h>
|
||||
|
||||
/*
|
||||
* This is the maximum number of NUMALINK nodes that can be part of a single
|
||||
* SSI kernel. This number includes C-brick, M-bricks, and TIOs. Nodes in
|
||||
* remote partitions are NOT included in this number.
|
||||
* The number of compact nodes cannot exceed size of a coherency domain.
|
||||
* The purpose of this define is to specify a node count that includes
|
||||
* all C/M/TIO nodes in an SSI system.
|
||||
*
|
||||
* SGI system can currently support up to 256 C/M nodes plus additional TIO nodes.
|
||||
*
|
||||
* Note: ACPI20 has an architectural limit of 256 nodes. When we upgrade
|
||||
* to ACPI3.0, this limit will be removed. The notion of "compact nodes"
|
||||
* should be deleted and TIOs should be included in MAX_NUMNODES.
|
||||
*/
|
||||
#define MAX_COMPACT_NODES 512
|
||||
|
||||
/*
|
||||
* Maximum number of nodes in all partitions and in all coherency domains.
|
||||
* This is the total number of nodes accessible in the numalink fabric. It
|
||||
* includes all C & M bricks, plus all TIOs.
|
||||
*
|
||||
* This value is also the value of the maximum number of NASIDs in the numalink
|
||||
* fabric.
|
||||
*/
|
||||
#define MAX_NUMALINK_NODES 16384
|
||||
|
||||
/*
|
||||
* The following defines attributes of the HUB chip. These attributes are
|
||||
* frequently referenced. They are kept in the per-cpu data areas of each cpu.
|
||||
|
@ -40,15 +66,6 @@ DECLARE_PER_CPU(struct sn_hub_info_s, __sn_hub_info);
|
|||
#define enable_shub_wars_1_1() (sn_hub_info->shub_1_1_found)
|
||||
|
||||
|
||||
/*
|
||||
* This is the maximum number of nodes that can be part of a kernel.
|
||||
* Effectively, it's the maximum number of compact node ids (cnodeid_t).
|
||||
* This is not necessarily the same as MAX_NASIDS.
|
||||
*/
|
||||
#define MAX_COMPACT_NODES 2048
|
||||
#define CPUS_PER_NODE 4
|
||||
|
||||
|
||||
/*
|
||||
* Compact node ID to nasid mappings kept in the per-cpu data areas of each
|
||||
* cpu.
|
||||
|
@ -57,7 +74,6 @@ DECLARE_PER_CPU(short, __sn_cnodeid_to_nasid[MAX_NUMNODES]);
|
|||
#define sn_cnodeid_to_nasid (&__get_cpu_var(__sn_cnodeid_to_nasid[0]))
|
||||
|
||||
|
||||
|
||||
extern u8 sn_partition_id;
|
||||
extern u8 sn_system_size;
|
||||
extern u8 sn_sharing_domain_size;
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
extern void * sn_io_addr(unsigned long port) __attribute_const__; /* Forward definition */
|
||||
extern void __sn_mmiowb(void); /* Forward definition */
|
||||
|
||||
extern int numionodes;
|
||||
extern int num_cnodes;
|
||||
|
||||
#define __sn_mf_a() ia64_mfa()
|
||||
|
||||
|
|
|
@ -208,19 +208,6 @@ typedef struct lboard_s {
|
|||
klconf_off_t brd_next_same; /* Next BOARD with same nasid */
|
||||
} lboard_t;
|
||||
|
||||
#define KLCF_NUM_COMPS(_brd) ((_brd)->brd_numcompts)
|
||||
#define NODE_OFFSET_TO_KLINFO(n,off) ((klinfo_t*) TO_NODE_CAC(n,off))
|
||||
#define KLCF_NEXT(_brd) \
|
||||
((_brd)->brd_next_same ? \
|
||||
(NODE_OFFSET_TO_LBOARD((_brd)->brd_next_same_host, (_brd)->brd_next_same)): NULL)
|
||||
#define KLCF_NEXT_ANY(_brd) \
|
||||
((_brd)->brd_next_any ? \
|
||||
(NODE_OFFSET_TO_LBOARD(NASID_GET(_brd), (_brd)->brd_next_any)): NULL)
|
||||
#define KLCF_COMP(_brd, _ndx) \
|
||||
((((_brd)->brd_compts[(_ndx)]) == 0) ? 0 : \
|
||||
(NODE_OFFSET_TO_KLINFO(NASID_GET(_brd), (_brd)->brd_compts[(_ndx)])))
|
||||
|
||||
|
||||
/*
|
||||
* Generic info structure. This stores common info about a
|
||||
* component.
|
||||
|
@ -249,24 +236,11 @@ typedef struct klinfo_s { /* Generic info */
|
|||
} klinfo_t ;
|
||||
|
||||
|
||||
static inline lboard_t *find_lboard_any(lboard_t * start, unsigned char brd_type)
|
||||
static inline lboard_t *find_lboard_next(lboard_t * brd)
|
||||
{
|
||||
/* Search all boards stored on this node. */
|
||||
|
||||
while (start) {
|
||||
if (start->brd_type == brd_type)
|
||||
return start;
|
||||
start = KLCF_NEXT_ANY(start);
|
||||
}
|
||||
/* Didn't find it. */
|
||||
return (lboard_t *) NULL;
|
||||
if (brd && brd->brd_next_any)
|
||||
return NODE_OFFSET_TO_LBOARD(NASID_GET(brd), brd->brd_next_any);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
/* external declarations of Linux kernel functions. */
|
||||
|
||||
extern lboard_t *root_lboard[];
|
||||
extern klinfo_t *find_component(lboard_t *brd, klinfo_t *kli, unsigned char type);
|
||||
extern klinfo_t *find_first_component(lboard_t *brd, unsigned char type);
|
||||
|
||||
#endif /* _ASM_IA64_SN_KLCONFIG_H */
|
||||
|
|
|
@ -105,7 +105,6 @@ extern short physical_node_map[]; /* indexed by nasid to get cnode */
|
|||
#define cpuid_to_nasid(cpuid) (sn_nodepda->phys_cpuid[cpuid].nasid)
|
||||
#define cpuid_to_subnode(cpuid) (sn_nodepda->phys_cpuid[cpuid].subnode)
|
||||
#define cpuid_to_slice(cpuid) (sn_nodepda->phys_cpuid[cpuid].slice)
|
||||
#define cpuid_to_cnodeid(cpuid) (physical_node_map[cpuid_to_nasid(cpuid)])
|
||||
|
||||
|
||||
/*
|
||||
|
@ -113,8 +112,6 @@ extern short physical_node_map[]; /* indexed by nasid to get cnode */
|
|||
* of potentially large tables.
|
||||
*/
|
||||
extern int nasid_slice_to_cpuid(int, int);
|
||||
#define nasid_slice_to_cpu_physical_id(nasid, slice) \
|
||||
cpu_physical_id(nasid_slice_to_cpuid(nasid, slice))
|
||||
|
||||
/*
|
||||
* cnodeid_to_nasid - convert a cnodeid to a NASID
|
||||
|
|
|
@ -206,26 +206,16 @@ ia64_sn_get_master_baseio_nasid(void)
|
|||
return ret_stuff.v0;
|
||||
}
|
||||
|
||||
static inline char *
|
||||
static inline void *
|
||||
ia64_sn_get_klconfig_addr(nasid_t nasid)
|
||||
{
|
||||
struct ia64_sal_retval ret_stuff;
|
||||
int cnodeid;
|
||||
|
||||
cnodeid = nasid_to_cnodeid(nasid);
|
||||
ret_stuff.status = 0;
|
||||
ret_stuff.v0 = 0;
|
||||
ret_stuff.v1 = 0;
|
||||
ret_stuff.v2 = 0;
|
||||
SAL_CALL(ret_stuff, SN_SAL_GET_KLCONFIG_ADDR, (u64)nasid, 0, 0, 0, 0, 0, 0);
|
||||
|
||||
/*
|
||||
* We should panic if a valid cnode nasid does not produce
|
||||
* a klconfig address.
|
||||
*/
|
||||
if (ret_stuff.status != 0) {
|
||||
panic("ia64_sn_get_klconfig_addr: Returned error %lx\n", ret_stuff.status);
|
||||
}
|
||||
return ret_stuff.v0 ? __va(ret_stuff.v0) : NULL;
|
||||
}
|
||||
|
||||
|
|
|
@ -49,7 +49,7 @@
|
|||
* C-brick nasids, thus the need for bitmaps which don't account for
|
||||
* odd-numbered (non C-brick) nasids.
|
||||
*/
|
||||
#define XP_MAX_PHYSNODE_ID (MAX_PHYSNODE_ID / 2)
|
||||
#define XP_MAX_PHYSNODE_ID (MAX_NUMALINK_NODES / 2)
|
||||
#define XP_NASID_MASK_BYTES ((XP_MAX_PHYSNODE_ID + 7) / 8)
|
||||
#define XP_NASID_MASK_WORDS ((XP_MAX_PHYSNODE_ID + 63) / 64)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue