[PATCH 08/20] X86_64, UV: Update MMIOH setup function to work for both UV3 and UV4

From: Mike Travis
Date: Tue May 03 2016 - 11:28:37 EST


Since UV3 and UV4 MMIOH regions are setup the same, we can use a common
function to setup both.

Signed-off-by: Mike Travis <travis@xxxxxxx>
Reviewed-by: Dimitri Sivanich <sivanich@xxxxxxx>
Tested-by: John Estabrook <estabrook@xxxxxxx>
Tested-by: Gary Kroening <gfk@xxxxxxx>
Tested-by: Nathan Zimmer <nzimmer@xxxxxxx>
---
arch/x86/kernel/apic/x2apic_uv_x.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)

--- linux.orig/arch/x86/kernel/apic/x2apic_uv_x.c
+++ linux/arch/x86/kernel/apic/x2apic_uv_x.c
@@ -601,6 +601,7 @@ static __initdata struct mmioh_config mm
},
};

+/* UV3 & UV4 have identical MMIOH overlay configs */
static __init void map_mmioh_high_uv3(int index, int min_pnode, int max_pnode)
{
union uv3h_rh_gam_mmioh_overlay_config0_mmr_u overlay;
@@ -680,7 +681,7 @@ static __init void map_mmioh_high(int mi
unsigned long mmr, base;
int shift, enable, m_io, n_io;

- if (is_uv3_hub()) {
+ if (is_uv3_hub() || is_uv4_hub()) {
/* Map both MMIOH Regions */
map_mmioh_high_uv3(0, min_pnode, max_pnode);
map_mmioh_high_uv3(1, min_pnode, max_pnode);

--