x86, UV: Handle missing blade-local memory correctly
UV blades may not have any blade-local memory. Add a field (nid) to the UV blade structure to indicates whether the node has local memory. This is needed by the GRU driver (pushed separately). Signed-off-by: Jack Steiner <steiner@sgi.com> Cc: linux-mm@kvack.org LKML-Reference: <20090727143507.GA7006@sgi.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
This commit is contained in:
committed by
Ingo Molnar
parent
f1f029c7bf
commit
6c7184b774
@ -327,6 +327,7 @@ struct uv_blade_info {
|
||||
unsigned short nr_possible_cpus;
|
||||
unsigned short nr_online_cpus;
|
||||
unsigned short pnode;
|
||||
short memory_nid;
|
||||
};
|
||||
extern struct uv_blade_info *uv_blade_info;
|
||||
extern short *uv_node_to_blade;
|
||||
@ -363,6 +364,12 @@ static inline int uv_blade_to_pnode(int bid)
|
||||
return uv_blade_info[bid].pnode;
|
||||
}
|
||||
|
||||
/* Nid of memory node on blade. -1 if no blade-local memory */
|
||||
static inline int uv_blade_to_memory_nid(int bid)
|
||||
{
|
||||
return uv_blade_info[bid].memory_nid;
|
||||
}
|
||||
|
||||
/* Determine the number of possible cpus on a blade */
|
||||
static inline int uv_blade_nr_possible_cpus(int bid)
|
||||
{
|
||||
|
Reference in New Issue
Block a user