Skip to content

Commit

Permalink
x86/platform/uv: Adjust GAM MMR references affected by UV5 updates
Browse files Browse the repository at this point in the history
Make modifications to the GAM MMR mappings to accommodate changes for UV5.

Signed-off-by: Mike Travis <[email protected]>
Signed-off-by: Borislav Petkov <[email protected]>
Reviewed-by: Dimitri Sivanich <[email protected]>
Reviewed-by: Steve Wahl <[email protected]>
Link: https://lkml.kernel.org/r/[email protected]
  • Loading branch information
mike-travis authored and suryasaimadhu committed Oct 7, 2020
1 parent ffe2feb commit 8540b2c
Showing 1 changed file with 25 additions and 5 deletions.
30 changes: 25 additions & 5 deletions arch/x86/kernel/apic/x2apic_uv_x.c
Original file line number Diff line number Diff line change
Expand Up @@ -927,12 +927,32 @@ static __init void map_gru_high(int max_pnode)

static __init void map_mmr_high(int max_pnode)
{
union uvh_rh_gam_mmr_overlay_config_u mmr;
int shift = UVH_RH_GAM_MMR_OVERLAY_CONFIG_BASE_SHFT;
unsigned long base;
int shift;
bool enable;

if (UVH_RH10_GAM_MMR_OVERLAY_CONFIG) {
union uvh_rh10_gam_mmr_overlay_config_u mmr;

mmr.v = uv_read_local_mmr(UVH_RH10_GAM_MMR_OVERLAY_CONFIG);
enable = mmr.s.enable;
base = mmr.s.base;
shift = UVH_RH10_GAM_MMR_OVERLAY_CONFIG_BASE_SHFT;
} else if (UVH_RH_GAM_MMR_OVERLAY_CONFIG) {
union uvh_rh_gam_mmr_overlay_config_u mmr;

mmr.v = uv_read_local_mmr(UVH_RH_GAM_MMR_OVERLAY_CONFIG);
enable = mmr.s.enable;
base = mmr.s.base;
shift = UVH_RH_GAM_MMR_OVERLAY_CONFIG_BASE_SHFT;
} else {
pr_err("UV:%s:RH_GAM_MMR_OVERLAY_CONFIG MMR undefined?\n",
__func__);
return;
}

mmr.v = uv_read_local_mmr(UVH_RH_GAM_MMR_OVERLAY_CONFIG);
if (mmr.s.enable)
map_high("MMR", mmr.s.base, shift, shift, max_pnode, map_uc);
if (enable)
map_high("MMR", base, shift, shift, max_pnode, map_uc);
else
pr_info("UV: MMR disabled\n");
}
Expand Down

0 comments on commit 8540b2c

Please sign in to comment.