diff options
author | Cliff Wickman <cpw@sgi.com> | 2012-01-16 16:18:48 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2012-01-17 03:09:53 -0500 |
commit | d059f9fa84a30e04279c6ff615e9e2cf3b260191 (patch) | |
tree | 8b64df55c35953cc1f41a55fd8a2bdb309ebc623 /arch | |
parent | da87c937e5a2374686edd58df06cfd5050b125fa (diff) |
x86/UV2: Fix BAU destination timeout initialization
Move the call to enable_timeouts() forward so that
BAU_MISC_CONTROL is initialized before using it in
calculate_destination_timeout().
Fix the calculation of a BAU destination timeout
for UV2 (in calculate_destination_timeout()).
Signed-off-by: Cliff Wickman <cpw@sgi.com>
Link: http://lkml.kernel.org/r/20120116211848.GB5767@sgi.com
Cc: <stable@kernel.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/x86/platform/uv/tlb_uv.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/arch/x86/platform/uv/tlb_uv.c b/arch/x86/platform/uv/tlb_uv.c index 1341a2e06542..c425ff1a9cc3 100644 --- a/arch/x86/platform/uv/tlb_uv.c +++ b/arch/x86/platform/uv/tlb_uv.c | |||
@@ -1617,14 +1617,14 @@ static int calculate_destination_timeout(void) | |||
1617 | ts_ns = base * mult1 * mult2; | 1617 | ts_ns = base * mult1 * mult2; |
1618 | ret = ts_ns / 1000; | 1618 | ret = ts_ns / 1000; |
1619 | } else { | 1619 | } else { |
1620 | /* 4 bits 0/1 for 10/80us, 3 bits of multiplier */ | 1620 | /* 4 bits 0/1 for 10/80us base, 3 bits of multiplier */ |
1621 | mmr_image = uv_read_local_mmr(UVH_AGING_PRESCALE_SEL); | 1621 | mmr_image = uv_read_local_mmr(UVH_LB_BAU_MISC_CONTROL); |
1622 | mmr_image = (mmr_image & UV_SA_MASK) >> UV_SA_SHFT; | 1622 | mmr_image = (mmr_image & UV_SA_MASK) >> UV_SA_SHFT; |
1623 | if (mmr_image & (1L << UV2_ACK_UNITS_SHFT)) | 1623 | if (mmr_image & (1L << UV2_ACK_UNITS_SHFT)) |
1624 | mult1 = 80; | 1624 | base = 80; |
1625 | else | 1625 | else |
1626 | mult1 = 10; | 1626 | base = 10; |
1627 | base = mmr_image & UV2_ACK_MASK; | 1627 | mult1 = mmr_image & UV2_ACK_MASK; |
1628 | ret = mult1 * base; | 1628 | ret = mult1 * base; |
1629 | } | 1629 | } |
1630 | return ret; | 1630 | return ret; |
@@ -1886,6 +1886,8 @@ static int __init uv_bau_init(void) | |||
1886 | uv_base_pnode = uv_blade_to_pnode(uvhub); | 1886 | uv_base_pnode = uv_blade_to_pnode(uvhub); |
1887 | } | 1887 | } |
1888 | 1888 | ||
1889 | enable_timeouts(); | ||
1890 | |||
1889 | if (init_per_cpu(nuvhubs, uv_base_pnode)) { | 1891 | if (init_per_cpu(nuvhubs, uv_base_pnode)) { |
1890 | nobau = 1; | 1892 | nobau = 1; |
1891 | return 0; | 1893 | return 0; |
@@ -1896,7 +1898,6 @@ static int __init uv_bau_init(void) | |||
1896 | if (uv_blade_nr_possible_cpus(uvhub)) | 1898 | if (uv_blade_nr_possible_cpus(uvhub)) |
1897 | init_uvhub(uvhub, vector, uv_base_pnode); | 1899 | init_uvhub(uvhub, vector, uv_base_pnode); |
1898 | 1900 | ||
1899 | enable_timeouts(); | ||
1900 | alloc_intr_gate(vector, uv_bau_message_intr1); | 1901 | alloc_intr_gate(vector, uv_bau_message_intr1); |
1901 | 1902 | ||
1902 | for_each_possible_blade(uvhub) { | 1903 | for_each_possible_blade(uvhub) { |