aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kernel/genx2apic_uv_x.c
diff options
context:
space:
mode:
authorJack Steiner <steiner@sgi.com>2008-09-25 08:52:10 -0400
committerIngo Molnar <mingo@elte.hu>2008-10-13 04:22:46 -0400
commitd2f904bb9a1ba88a58a03612abd8c6c54bdaf73a (patch)
treed90f162f7d552aa5282a8c8b47cdde052a50166f /arch/x86/kernel/genx2apic_uv_x.c
parent9b658f6f8bd30b91aec527325e398771511ea61b (diff)
x86, uv: fix for size of hub mappings
Fix the size of the mappings of UV hub registers. Size must be a function of the maximum node number within the SSI. Signed-off-by: Jack Steiner <steiner@sgi.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch/x86/kernel/genx2apic_uv_x.c')
-rw-r--r--arch/x86/kernel/genx2apic_uv_x.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/arch/x86/kernel/genx2apic_uv_x.c b/arch/x86/kernel/genx2apic_uv_x.c
index ae2ffc8a400..8cf4ec2a37d 100644
--- a/arch/x86/kernel/genx2apic_uv_x.c
+++ b/arch/x86/kernel/genx2apic_uv_x.c
@@ -286,12 +286,13 @@ static __init void map_low_mmrs(void)
286 286
287enum map_type {map_wb, map_uc}; 287enum map_type {map_wb, map_uc};
288 288
289static __init void map_high(char *id, unsigned long base, int shift, enum map_type map_type) 289static __init void map_high(char *id, unsigned long base, int shift,
290 int max_pnode, enum map_type map_type)
290{ 291{
291 unsigned long bytes, paddr; 292 unsigned long bytes, paddr;
292 293
293 paddr = base << shift; 294 paddr = base << shift;
294 bytes = (1UL << shift); 295 bytes = (1UL << shift) * (max_pnode + 1);
295 printk(KERN_INFO "UV: Map %s_HI 0x%lx - 0x%lx\n", id, paddr, 296 printk(KERN_INFO "UV: Map %s_HI 0x%lx - 0x%lx\n", id, paddr,
296 paddr + bytes); 297 paddr + bytes);
297 if (map_type == map_uc) 298 if (map_type == map_uc)
@@ -307,7 +308,7 @@ static __init void map_gru_high(int max_pnode)
307 308
308 gru.v = uv_read_local_mmr(UVH_RH_GAM_GRU_OVERLAY_CONFIG_MMR); 309 gru.v = uv_read_local_mmr(UVH_RH_GAM_GRU_OVERLAY_CONFIG_MMR);
309 if (gru.s.enable) 310 if (gru.s.enable)
310 map_high("GRU", gru.s.base, shift, map_wb); 311 map_high("GRU", gru.s.base, shift, max_pnode, map_wb);
311} 312}
312 313
313static __init void map_config_high(int max_pnode) 314static __init void map_config_high(int max_pnode)
@@ -317,7 +318,7 @@ static __init void map_config_high(int max_pnode)
317 318
318 cfg.v = uv_read_local_mmr(UVH_RH_GAM_CFG_OVERLAY_CONFIG_MMR); 319 cfg.v = uv_read_local_mmr(UVH_RH_GAM_CFG_OVERLAY_CONFIG_MMR);
319 if (cfg.s.enable) 320 if (cfg.s.enable)
320 map_high("CONFIG", cfg.s.base, shift, map_uc); 321 map_high("CONFIG", cfg.s.base, shift, max_pnode, map_uc);
321} 322}
322 323
323static __init void map_mmr_high(int max_pnode) 324static __init void map_mmr_high(int max_pnode)
@@ -327,7 +328,7 @@ static __init void map_mmr_high(int max_pnode)
327 328
328 mmr.v = uv_read_local_mmr(UVH_RH_GAM_MMR_OVERLAY_CONFIG_MMR); 329 mmr.v = uv_read_local_mmr(UVH_RH_GAM_MMR_OVERLAY_CONFIG_MMR);
329 if (mmr.s.enable) 330 if (mmr.s.enable)
330 map_high("MMR", mmr.s.base, shift, map_uc); 331 map_high("MMR", mmr.s.base, shift, max_pnode, map_uc);
331} 332}
332 333
333static __init void map_mmioh_high(int max_pnode) 334static __init void map_mmioh_high(int max_pnode)
@@ -337,7 +338,7 @@ static __init void map_mmioh_high(int max_pnode)
337 338
338 mmioh.v = uv_read_local_mmr(UVH_RH_GAM_MMIOH_OVERLAY_CONFIG_MMR); 339 mmioh.v = uv_read_local_mmr(UVH_RH_GAM_MMIOH_OVERLAY_CONFIG_MMR);
339 if (mmioh.s.enable) 340 if (mmioh.s.enable)
340 map_high("MMIOH", mmioh.s.base, shift, map_uc); 341 map_high("MMIOH", mmioh.s.base, shift, max_pnode, map_uc);
341} 342}
342 343
343static __init void uv_rtc_init(void) 344static __init void uv_rtc_init(void)