diff options
| author | Jack Steiner <steiner@sgi.com> | 2010-01-12 16:09:04 -0500 |
|---|---|---|
| committer | H. Peter Anvin <hpa@zytor.com> | 2010-01-15 14:08:55 -0500 |
| commit | 7a1110e861b2666ac09f5708d6fbe71d18ce64bb (patch) | |
| tree | 2958eb36de538330534c94ccfc5960133b3a4633 | |
| parent | e68266b7001a4e29af083716f0c36c0d6dbb1b39 (diff) | |
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>
| -rw-r--r-- | arch/x86/include/asm/uv/uv_hub.h | 12 | ||||
| -rw-r--r-- | arch/x86/kernel/apic/x2apic_uv_x.c | 6 |
2 files changed, 18 insertions, 0 deletions
diff --git a/arch/x86/include/asm/uv/uv_hub.h b/arch/x86/include/asm/uv/uv_hub.h index bc54fa965af3..40be813fefb1 100644 --- a/arch/x86/include/asm/uv/uv_hub.h +++ b/arch/x86/include/asm/uv/uv_hub.h | |||
| @@ -495,5 +495,17 @@ static inline void uv_hub_send_ipi(int pnode, int apicid, int vector) | |||
| 495 | uv_write_global_mmr64(pnode, UVH_IPI_INT, val); | 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 | #endif /* CONFIG_X86_64 */ | 510 | #endif /* CONFIG_X86_64 */ |
| 499 | #endif /* _ASM_X86_UV_UV_HUB_H */ | 511 | #endif /* _ASM_X86_UV_UV_HUB_H */ |
diff --git a/arch/x86/kernel/apic/x2apic_uv_x.c b/arch/x86/kernel/apic/x2apic_uv_x.c index b8bb869a6618..0e48de9ff864 100644 --- a/arch/x86/kernel/apic/x2apic_uv_x.c +++ b/arch/x86/kernel/apic/x2apic_uv_x.c | |||
| @@ -36,6 +36,8 @@ DEFINE_PER_CPU(int, x2apic_extra_bits); | |||
| 36 | 36 | ||
| 37 | static enum uv_system_type uv_system_type; | 37 | static enum uv_system_type uv_system_type; |
| 38 | static u64 gru_start_paddr, gru_end_paddr; | 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 | static inline bool is_GRU_range(u64 start, u64 end) | 42 | static inline bool is_GRU_range(u64 start, u64 end) |
| 41 | { | 43 | { |
| @@ -55,6 +57,10 @@ static int early_get_nodeid(void) | |||
| 55 | mmr = early_ioremap(UV_LOCAL_MMR_BASE | UVH_NODE_ID, sizeof(*mmr)); | 57 | mmr = early_ioremap(UV_LOCAL_MMR_BASE | UVH_NODE_ID, sizeof(*mmr)); |
| 56 | node_id.v = *mmr; | 58 | node_id.v = *mmr; |
| 57 | early_iounmap(mmr, sizeof(*mmr)); | 59 | early_iounmap(mmr, sizeof(*mmr)); |
| 60 | |||
| 61 | /* Currently, all blades have same revision number */ | ||
| 62 | uv_min_hub_revision_id = node_id.s.revision; | ||
| 63 | |||
| 58 | return node_id.s.node_id; | 64 | return node_id.s.node_id; |
| 59 | } | 65 | } |
| 60 | 66 | ||
