aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86
diff options
context:
space:
mode:
authorMike Travis <travis@sgi.com>2010-01-08 15:13:54 -0500
committerIngo Molnar <mingo@elte.hu>2010-01-13 04:56:27 -0500
commitfcfbb2b5facd65efa7284cc315225bfe3d1856c2 (patch)
tree2732cee9ce39ed6035d162dff9d3967c857f3c14 /arch/x86
parentdf39a2e48f99e2d706e8fa4dc99fd148eb59449d (diff)
x86: SGI UV: Fix mapping of MMIO registers
This fixes the problem of the initialization code not correctly mapping the entire MMIO space on a UV system. A side effect is the map_high() interface needed to be changed to accommodate different address and size shifts. Signed-off-by: Mike Travis <travis@sgi.com> Reviewed-by: Mike Habeck <habeck@sgi.com> Cc: <stable@kernel.org> Cc: Jack Steiner <steiner@sgi.com> Cc: Linus Torvalds <torvalds@linux-foundation.org> LKML-Reference: <4B479202.7080705@sgi.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch/x86')
-rw-r--r--arch/x86/kernel/apic/x2apic_uv_x.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/arch/x86/kernel/apic/x2apic_uv_x.c b/arch/x86/kernel/apic/x2apic_uv_x.c
index 5f92494dab6..b8bb869a661 100644
--- a/arch/x86/kernel/apic/x2apic_uv_x.c
+++ b/arch/x86/kernel/apic/x2apic_uv_x.c
@@ -374,13 +374,13 @@ static __init void get_lowmem_redirect(unsigned long *base, unsigned long *size)
374 374
375enum map_type {map_wb, map_uc}; 375enum map_type {map_wb, map_uc};
376 376
377static __init void map_high(char *id, unsigned long base, int shift, 377static __init void map_high(char *id, unsigned long base, int pshift,
378 int max_pnode, enum map_type map_type) 378 int bshift, int max_pnode, enum map_type map_type)
379{ 379{
380 unsigned long bytes, paddr; 380 unsigned long bytes, paddr;
381 381
382 paddr = base << shift; 382 paddr = base << pshift;
383 bytes = (1UL << shift) * (max_pnode + 1); 383 bytes = (1UL << bshift) * (max_pnode + 1);
384 printk(KERN_INFO "UV: Map %s_HI 0x%lx - 0x%lx\n", id, paddr, 384 printk(KERN_INFO "UV: Map %s_HI 0x%lx - 0x%lx\n", id, paddr,
385 paddr + bytes); 385 paddr + bytes);
386 if (map_type == map_uc) 386 if (map_type == map_uc)
@@ -396,7 +396,7 @@ static __init void map_gru_high(int max_pnode)
396 396
397 gru.v = uv_read_local_mmr(UVH_RH_GAM_GRU_OVERLAY_CONFIG_MMR); 397 gru.v = uv_read_local_mmr(UVH_RH_GAM_GRU_OVERLAY_CONFIG_MMR);
398 if (gru.s.enable) { 398 if (gru.s.enable) {
399 map_high("GRU", gru.s.base, shift, max_pnode, map_wb); 399 map_high("GRU", gru.s.base, shift, shift, max_pnode, map_wb);
400 gru_start_paddr = ((u64)gru.s.base << shift); 400 gru_start_paddr = ((u64)gru.s.base << shift);
401 gru_end_paddr = gru_start_paddr + (1UL << shift) * (max_pnode + 1); 401 gru_end_paddr = gru_start_paddr + (1UL << shift) * (max_pnode + 1);
402 402
@@ -410,7 +410,7 @@ static __init void map_mmr_high(int max_pnode)
410 410
411 mmr.v = uv_read_local_mmr(UVH_RH_GAM_MMR_OVERLAY_CONFIG_MMR); 411 mmr.v = uv_read_local_mmr(UVH_RH_GAM_MMR_OVERLAY_CONFIG_MMR);
412 if (mmr.s.enable) 412 if (mmr.s.enable)
413 map_high("MMR", mmr.s.base, shift, max_pnode, map_uc); 413 map_high("MMR", mmr.s.base, shift, shift, max_pnode, map_uc);
414} 414}
415 415
416static __init void map_mmioh_high(int max_pnode) 416static __init void map_mmioh_high(int max_pnode)
@@ -420,7 +420,8 @@ static __init void map_mmioh_high(int max_pnode)
420 420
421 mmioh.v = uv_read_local_mmr(UVH_RH_GAM_MMIOH_OVERLAY_CONFIG_MMR); 421 mmioh.v = uv_read_local_mmr(UVH_RH_GAM_MMIOH_OVERLAY_CONFIG_MMR);
422 if (mmioh.s.enable) 422 if (mmioh.s.enable)
423 map_high("MMIOH", mmioh.s.base, shift, max_pnode, map_uc); 423 map_high("MMIOH", mmioh.s.base, shift, mmioh.s.m_io,
424 max_pnode, map_uc);
424} 425}
425 426
426static __init void map_low_mmrs(void) 427static __init void map_low_mmrs(void)