Commit eb1e3461 authored by Mike Travis's avatar Mike Travis Committed by Ingo Molnar

x86/platform/UV: Add Initial UV4 definitions

Add preliminary UV4 defines.
Tested-by: default avatarJohn Estabrook <estabrook@sgi.com>
Tested-by: default avatarGary Kroening <gfk@sgi.com>
Tested-by: default avatarNathan Zimmer <nzimmer@sgi.com>
Signed-off-by: default avatarMike Travis <travis@sgi.com>
Cc: Andrew Banman <abanman@sgi.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Andy Lutomirski <luto@amacapital.net>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Brian Gerst <brgerst@gmail.com>
Cc: Denys Vlasenko <dvlasenk@redhat.com>
Cc: Dimitri Sivanich <sivanich@sgi.com>
Cc: H. Peter Anvin <hpa@zytor.com>
Cc: Len Brown <len.brown@intel.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Russ Anderson <rja@sgi.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Link: http://lkml.kernel.org/r/20160429215402.703593187@asylum.americas.sgi.comSigned-off-by: default avatarIngo Molnar <mingo@kernel.org>
parent d63c214b
...@@ -176,6 +176,7 @@ DECLARE_PER_CPU(struct uv_hub_info_s, __uv_hub_info); ...@@ -176,6 +176,7 @@ DECLARE_PER_CPU(struct uv_hub_info_s, __uv_hub_info);
#define UV1_HUB_REVISION_BASE 1 #define UV1_HUB_REVISION_BASE 1
#define UV2_HUB_REVISION_BASE 3 #define UV2_HUB_REVISION_BASE 3
#define UV3_HUB_REVISION_BASE 5 #define UV3_HUB_REVISION_BASE 5
#define UV4_HUB_REVISION_BASE 7
static inline int is_uv1_hub(void) static inline int is_uv1_hub(void)
{ {
...@@ -190,15 +191,28 @@ static inline int is_uv2_hub(void) ...@@ -190,15 +191,28 @@ static inline int is_uv2_hub(void)
static inline int is_uv3_hub(void) static inline int is_uv3_hub(void)
{ {
return uv_hub_info->hub_revision >= UV3_HUB_REVISION_BASE; return ((uv_hub_info->hub_revision >= UV3_HUB_REVISION_BASE) &&
(uv_hub_info->hub_revision < UV4_HUB_REVISION_BASE));
} }
#ifdef UV4_HUB_IS_SUPPORTED
static inline int is_uv4_hub(void)
{
return uv_hub_info->hub_revision >= UV4_HUB_REVISION_BASE;
}
#else
static inline int is_uv4_hub(void)
{
return 0;
}
#endif
static inline int is_uv_hub(void) static inline int is_uv_hub(void)
{ {
return uv_hub_info->hub_revision; return uv_hub_info->hub_revision;
} }
/* code common to uv2 and uv3 only */ /* code common to uv2/3/4 only */
static inline int is_uvx_hub(void) static inline int is_uvx_hub(void)
{ {
return uv_hub_info->hub_revision >= UV2_HUB_REVISION_BASE; return uv_hub_info->hub_revision >= UV2_HUB_REVISION_BASE;
...@@ -243,18 +257,35 @@ union uvh_apicid { ...@@ -243,18 +257,35 @@ union uvh_apicid {
#define UV3_LOCAL_MMR_SIZE (32UL * 1024 * 1024) #define UV3_LOCAL_MMR_SIZE (32UL * 1024 * 1024)
#define UV3_GLOBAL_MMR32_SIZE (32UL * 1024 * 1024) #define UV3_GLOBAL_MMR32_SIZE (32UL * 1024 * 1024)
#define UV_LOCAL_MMR_BASE (is_uv1_hub() ? UV1_LOCAL_MMR_BASE : \ #define UV4_LOCAL_MMR_BASE 0xfa000000UL
(is_uv2_hub() ? UV2_LOCAL_MMR_BASE : \ #define UV4_GLOBAL_MMR32_BASE 0xfc000000UL
UV3_LOCAL_MMR_BASE)) #define UV4_LOCAL_MMR_SIZE (32UL * 1024 * 1024)
#define UV_GLOBAL_MMR32_BASE (is_uv1_hub() ? UV1_GLOBAL_MMR32_BASE :\ #define UV4_GLOBAL_MMR32_SIZE (16UL * 1024 * 1024)
(is_uv2_hub() ? UV2_GLOBAL_MMR32_BASE :\
UV3_GLOBAL_MMR32_BASE)) #define UV_LOCAL_MMR_BASE ( \
#define UV_LOCAL_MMR_SIZE (is_uv1_hub() ? UV1_LOCAL_MMR_SIZE : \ is_uv1_hub() ? UV1_LOCAL_MMR_BASE : \
(is_uv2_hub() ? UV2_LOCAL_MMR_SIZE : \ is_uv2_hub() ? UV2_LOCAL_MMR_BASE : \
UV3_LOCAL_MMR_SIZE)) is_uv3_hub() ? UV3_LOCAL_MMR_BASE : \
#define UV_GLOBAL_MMR32_SIZE (is_uv1_hub() ? UV1_GLOBAL_MMR32_SIZE :\ /*is_uv4_hub*/ UV4_LOCAL_MMR_BASE)
(is_uv2_hub() ? UV2_GLOBAL_MMR32_SIZE :\
UV3_GLOBAL_MMR32_SIZE)) #define UV_GLOBAL_MMR32_BASE ( \
is_uv1_hub() ? UV1_GLOBAL_MMR32_BASE : \
is_uv2_hub() ? UV2_GLOBAL_MMR32_BASE : \
is_uv3_hub() ? UV3_GLOBAL_MMR32_BASE : \
/*is_uv4_hub*/ UV4_GLOBAL_MMR32_BASE)
#define UV_LOCAL_MMR_SIZE ( \
is_uv1_hub() ? UV1_LOCAL_MMR_SIZE : \
is_uv2_hub() ? UV2_LOCAL_MMR_SIZE : \
is_uv3_hub() ? UV3_LOCAL_MMR_SIZE : \
/*is_uv4_hub*/ UV4_LOCAL_MMR_SIZE)
#define UV_GLOBAL_MMR32_SIZE ( \
is_uv1_hub() ? UV1_GLOBAL_MMR32_SIZE : \
is_uv2_hub() ? UV2_GLOBAL_MMR32_SIZE : \
is_uv3_hub() ? UV3_GLOBAL_MMR32_SIZE : \
/*is_uv4_hub*/ UV4_GLOBAL_MMR32_SIZE)
#define UV_GLOBAL_MMR64_BASE (uv_hub_info->global_mmr_base) #define UV_GLOBAL_MMR64_BASE (uv_hub_info->global_mmr_base)
#define UV_GLOBAL_GRU_MMR_BASE 0x4000000 #define UV_GLOBAL_GRU_MMR_BASE 0x4000000
...@@ -666,10 +697,7 @@ static inline void uv_hub_send_ipi(int pnode, int apicid, int vector) ...@@ -666,10 +697,7 @@ static inline void uv_hub_send_ipi(int pnode, int apicid, int vector)
/* /*
* Get the minimum revision number of the hub chips within the partition. * Get the minimum revision number of the hub chips within the partition.
* 1 - UV1 rev 1.0 initial silicon * (See UVx_HUB_REVISION_BASE above for specific values.)
* 2 - UV1 rev 2.0 production silicon
* 3 - UV2 rev 1.0 initial silicon
* 5 - UV3 rev 1.0 initial silicon
*/ */
static inline int uv_get_min_hub_revision_id(void) static inline int uv_get_min_hub_revision_id(void)
{ {
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
* *
* SGI UV MMR definitions * SGI UV MMR definitions
* *
* Copyright (C) 2007-2014 Silicon Graphics, Inc. All rights reserved. * Copyright (C) 2007-2015 Silicon Graphics, Inc. All rights reserved.
*/ */
#ifndef _ASM_X86_UV_UV_MMRS_H #ifndef _ASM_X86_UV_UV_MMRS_H
...@@ -18,10 +18,11 @@ ...@@ -18,10 +18,11 @@
* grouped by architecture types. * grouped by architecture types.
* *
* UVH - definitions common to all UV hub types. * UVH - definitions common to all UV hub types.
* UVXH - definitions common to all UV eXtended hub types (currently 2 & 3). * UVXH - definitions common to all UV eXtended hub types (currently 2, 3, 4).
* UV1H - definitions specific to UV type 1 hub. * UV1H - definitions specific to UV type 1 hub.
* UV2H - definitions specific to UV type 2 hub. * UV2H - definitions specific to UV type 2 hub.
* UV3H - definitions specific to UV type 3 hub. * UV3H - definitions specific to UV type 3 hub.
* UV4H - definitions specific to UV type 4 hub.
* *
* So in general, MMR addresses and structures are identical on all hubs types. * So in general, MMR addresses and structures are identical on all hubs types.
* These MMRs are identified as: * These MMRs are identified as:
...@@ -36,15 +37,19 @@ ...@@ -36,15 +37,19 @@
* #define UV1Hxxx a * #define UV1Hxxx a
* #define UV2Hxxx b * #define UV2Hxxx b
* #define UV3Hxxx c * #define UV3Hxxx c
* #define UV4Hxxx d
* #define UVHxxx (is_uv1_hub() ? UV1Hxxx : * #define UVHxxx (is_uv1_hub() ? UV1Hxxx :
* (is_uv2_hub() ? UV2Hxxx : * (is_uv2_hub() ? UV2Hxxx :
* UV3Hxxx)) * (is_uv3_hub() ? UV3Hxxx :
* UV4Hxxx))
* *
* If the MMR exists on all hub types > 1 but have different addresses: * If the MMR exists on all hub types > 1 but have different addresses:
* #define UV2Hxxx b * #define UV2Hxxx b
* #define UV3Hxxx c * #define UV3Hxxx c
* #define UVXHxxx (is_uv2_hub() ? UV2Hxxx : * #define UV4Hxxx d
* UV3Hxxx)) * #define UVHxxx (is_uv2_hub() ? UV2Hxxx :
* (is_uv3_hub() ? UV3Hxxx :
* UV4Hxxx))
* *
* union uvh_xxx { * union uvh_xxx {
* unsigned long v; * unsigned long v;
...@@ -56,6 +61,8 @@ ...@@ -56,6 +61,8 @@
* } s2; * } s2;
* struct uv3h_xxx_s { # Full UV3 definition (*) * struct uv3h_xxx_s { # Full UV3 definition (*)
* } s3; * } s3;
* struct uv4h_xxx_s { # Full UV4 definition (*)
* } s4;
* }; * };
* (* - if present and different than the common struct) * (* - if present and different than the common struct)
* *
...@@ -73,7 +80,7 @@ ...@@ -73,7 +80,7 @@
* } sn; * } sn;
* }; * };
* *
* (GEN Flags: mflags_opt= undefs=0 UV23=UVXH) * (GEN Flags: mflags_opt= undefs=1 UV234=UVXH)
*/ */
#define UV_MMR_ENABLE (1UL << 63) #define UV_MMR_ENABLE (1UL << 63)
...@@ -83,10 +90,13 @@ ...@@ -83,10 +90,13 @@
#define UV2_HUB_PART_NUMBER_X 0x1111 #define UV2_HUB_PART_NUMBER_X 0x1111
#define UV3_HUB_PART_NUMBER 0x9578 #define UV3_HUB_PART_NUMBER 0x9578
#define UV3_HUB_PART_NUMBER_X 0x4321 #define UV3_HUB_PART_NUMBER_X 0x4321
#define UV4_HUB_PART_NUMBER 0x99a1
/* Compat: Indicate which UV Hubs are supported. */ /* Compat: Indicate which UV Hubs are supported. */
#define UV1_HUB_IS_SUPPORTED 1
#define UV2_HUB_IS_SUPPORTED 1 #define UV2_HUB_IS_SUPPORTED 1
#define UV3_HUB_IS_SUPPORTED 1 #define UV3_HUB_IS_SUPPORTED 1
/* #define UV4_HUB_IS_SUPPORTED 1 (not yet) */
/* ========================================================================= */ /* ========================================================================= */
/* UVH_BAU_DATA_BROADCAST */ /* UVH_BAU_DATA_BROADCAST */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment