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: Jack Steiner <steiner@sgi.com>
LKML-Reference: <20100112210904.GA24546@sgi.com>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>

authored by Jack Steiner and committed by H. Peter Anvin 7a1110e8 e68266b7

+18
+12
arch/x86/include/asm/uv/uv_hub.h
··· 495 495 uv_write_global_mmr64(pnode, UVH_IPI_INT, val); 496 496 } 497 497 498 + /* 499 + * Get the minimum revision number of the hub chips within the partition. 500 + * 1 - initial rev 1.0 silicon 501 + * 2 - rev 2.0 production silicon 502 + */ 503 + static inline int uv_get_min_hub_revision_id(void) 504 + { 505 + extern int uv_min_hub_revision_id; 506 + 507 + return uv_min_hub_revision_id; 508 + } 509 + 498 510 #endif /* CONFIG_X86_64 */ 499 511 #endif /* _ASM_X86_UV_UV_HUB_H */
+6
arch/x86/kernel/apic/x2apic_uv_x.c
··· 36 36 37 37 static enum uv_system_type uv_system_type; 38 38 static u64 gru_start_paddr, gru_end_paddr; 39 + int uv_min_hub_revision_id; 40 + EXPORT_SYMBOL_GPL(uv_min_hub_revision_id); 39 41 40 42 static inline bool is_GRU_range(u64 start, u64 end) 41 43 { ··· 57 55 mmr = early_ioremap(UV_LOCAL_MMR_BASE | UVH_NODE_ID, sizeof(*mmr)); 58 56 node_id.v = *mmr; 59 57 early_iounmap(mmr, sizeof(*mmr)); 58 + 59 + /* Currently, all blades have same revision number */ 60 + uv_min_hub_revision_id = node_id.s.revision; 61 + 60 62 return node_id.s.node_id; 61 63 } 62 64