x86/platform/uv: Update UV5 MMR references in UV GRU
Make modifications to the GRU mappings to accommodate changes for UV5. Signed-off-by: Mike Travis <mike.travis@hpe.com> Signed-off-by: Borislav Petkov <bp@suse.de> Reviewed-by: Dimitri Sivanich <dimitri.sivanich@hpe.com> Reviewed-by: Steve Wahl <steve.wahl@hpe.com> Link: https://lkml.kernel.org/r/20201005203929.148656-10-mike.travis@hpe.com
This commit is contained in:
committed by
Borislav Petkov
parent
8540b2cf0d
commit
a74a7e992c
@@ -82,6 +82,9 @@ static unsigned long __init uv_early_read_mmr(unsigned long addr)
|
|||||||
|
|
||||||
static inline bool is_GRU_range(u64 start, u64 end)
|
static inline bool is_GRU_range(u64 start, u64 end)
|
||||||
{
|
{
|
||||||
|
if (!gru_start_paddr)
|
||||||
|
return false;
|
||||||
|
|
||||||
return start >= gru_start_paddr && end <= gru_end_paddr;
|
return start >= gru_start_paddr && end <= gru_end_paddr;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -909,13 +912,24 @@ static __init void map_high(char *id, unsigned long base, int pshift, int bshift
|
|||||||
static __init void map_gru_high(int max_pnode)
|
static __init void map_gru_high(int max_pnode)
|
||||||
{
|
{
|
||||||
union uvh_rh_gam_gru_overlay_config_u gru;
|
union uvh_rh_gam_gru_overlay_config_u gru;
|
||||||
int shift = UVH_RH_GAM_GRU_OVERLAY_CONFIG_BASE_SHFT;
|
unsigned long mask, base;
|
||||||
unsigned long mask = UVH_RH_GAM_GRU_OVERLAY_CONFIG_BASE_MASK;
|
int shift;
|
||||||
unsigned long base;
|
|
||||||
|
|
||||||
|
if (UVH_RH_GAM_GRU_OVERLAY_CONFIG) {
|
||||||
gru.v = uv_read_local_mmr(UVH_RH_GAM_GRU_OVERLAY_CONFIG);
|
gru.v = uv_read_local_mmr(UVH_RH_GAM_GRU_OVERLAY_CONFIG);
|
||||||
|
shift = UVH_RH_GAM_GRU_OVERLAY_CONFIG_BASE_SHFT;
|
||||||
|
mask = UVH_RH_GAM_GRU_OVERLAY_CONFIG_BASE_MASK;
|
||||||
|
} else if (UVH_RH10_GAM_GRU_OVERLAY_CONFIG) {
|
||||||
|
gru.v = uv_read_local_mmr(UVH_RH10_GAM_GRU_OVERLAY_CONFIG);
|
||||||
|
shift = UVH_RH10_GAM_GRU_OVERLAY_CONFIG_BASE_SHFT;
|
||||||
|
mask = UVH_RH10_GAM_GRU_OVERLAY_CONFIG_BASE_MASK;
|
||||||
|
} else {
|
||||||
|
pr_err("UV: GRU unavailable (no MMR)\n");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (!gru.s.enable) {
|
if (!gru.s.enable) {
|
||||||
pr_info("UV: GRU disabled\n");
|
pr_info("UV: GRU disabled (by BIOS)\n");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1288,7 +1302,11 @@ static void __init uv_init_hub_info(struct uv_hub_info_s *hi)
|
|||||||
/* Show system specific info: */
|
/* Show system specific info: */
|
||||||
pr_info("UV: N:%d M:%d m_shift:%d n_lshift:%d\n", hi->n_val, hi->m_val, hi->m_shift, hi->n_lshift);
|
pr_info("UV: N:%d M:%d m_shift:%d n_lshift:%d\n", hi->n_val, hi->m_val, hi->m_shift, hi->n_lshift);
|
||||||
pr_info("UV: gpa_mask/shift:0x%lx/%d pnode_mask:0x%x apic_pns:%d\n", hi->gpa_mask, hi->gpa_shift, hi->pnode_mask, hi->apic_pnode_shift);
|
pr_info("UV: gpa_mask/shift:0x%lx/%d pnode_mask:0x%x apic_pns:%d\n", hi->gpa_mask, hi->gpa_shift, hi->pnode_mask, hi->apic_pnode_shift);
|
||||||
pr_info("UV: mmr_base/shift:0x%lx/%ld gru_base/shift:0x%lx/%ld\n", hi->global_mmr_base, hi->global_mmr_shift, hi->global_gru_base, hi->global_gru_shift);
|
pr_info("UV: mmr_base/shift:0x%lx/%ld\n", hi->global_mmr_base, hi->global_mmr_shift);
|
||||||
|
if (hi->global_gru_base)
|
||||||
|
pr_info("UV: gru_base/shift:0x%lx/%ld\n",
|
||||||
|
hi->global_gru_base, hi->global_gru_shift);
|
||||||
|
|
||||||
pr_info("UV: gnode_upper:0x%lx gnode_extra:0x%x\n", hi->gnode_upper, hi->gnode_extra);
|
pr_info("UV: gnode_upper:0x%lx gnode_extra:0x%x\n", hi->gnode_upper, hi->gnode_extra);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user