Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 7a1110e8 authored by Jack Steiner's avatar Jack Steiner Committed by H. Peter Anvin
Browse files

x86, uv: Add function retrieving node controller revision number



Add function for determining the revision id of the SGI UV
node controller chip (HUB). This function is needed in a
subsequent patch.

Signed-off-by: default avatarJack Steiner <steiner@sgi.com>
LKML-Reference: <20100112210904.GA24546@sgi.com>
Signed-off-by: default avatarH. Peter Anvin <hpa@zytor.com>
parent e68266b7
Loading
Loading
Loading
Loading
+12 −0
Original line number Diff line number Diff line
@@ -495,5 +495,17 @@ static inline void uv_hub_send_ipi(int pnode, int apicid, int vector)
	uv_write_global_mmr64(pnode, UVH_IPI_INT, val);
}

/*
 * Get the minimum revision number of the hub chips within the partition.
 *     1 - initial rev 1.0 silicon
 *     2 - rev 2.0 production silicon
 */
static inline int uv_get_min_hub_revision_id(void)
{
	extern int uv_min_hub_revision_id;

	return uv_min_hub_revision_id;
}

#endif /* CONFIG_X86_64 */
#endif /* _ASM_X86_UV_UV_HUB_H */
+6 −0
Original line number Diff line number Diff line
@@ -36,6 +36,8 @@ DEFINE_PER_CPU(int, x2apic_extra_bits);

static enum uv_system_type uv_system_type;
static u64 gru_start_paddr, gru_end_paddr;
int uv_min_hub_revision_id;
EXPORT_SYMBOL_GPL(uv_min_hub_revision_id);

static inline bool is_GRU_range(u64 start, u64 end)
{
@@ -55,6 +57,10 @@ static int early_get_nodeid(void)
	mmr = early_ioremap(UV_LOCAL_MMR_BASE | UVH_NODE_ID, sizeof(*mmr));
	node_id.v = *mmr;
	early_iounmap(mmr, sizeof(*mmr));

	/* Currently, all blades have same revision number */
	uv_min_hub_revision_id = node_id.s.revision;

	return node_id.s.node_id;
}