aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorCliff Wickman <cpw@sgi.com>2012-06-22 09:12:12 -0400
committerIngo Molnar <mingo@kernel.org>2012-06-25 08:45:04 -0400
commit11cab711f686893f2696a061dfca30454a624784 (patch)
tree0152bd0eafce559fcb6bacaae7b5a29461c9cd27 /arch
parent6b16351acbd415e66ba16bf7d473ece1574cf0bc (diff)
x86/uv: Fix the UV BAU destination timeout period
Correct the calculation of a destination timeout period, which is used to distinguish between a destination timeout and the situation where all the target software ack resources are full and a request is returned immediately. The problem is that integer arithmetic was overflowing, yielding a very large result. Without this fix destination timeouts are identified as resource 'plugged' events and an ipi method of resource releasing is unnecessarily employed. Signed-off-by: Cliff Wickman <cpw@sgi.com> Link: http://lkml.kernel.org/r/20120622131212.GA31884@sgi.com Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'arch')
-rw-r--r--arch/x86/platform/uv/tlb_uv.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/x86/platform/uv/tlb_uv.c b/arch/x86/platform/uv/tlb_uv.c
index 59880afa851f..0c48d438cbba 100644
--- a/arch/x86/platform/uv/tlb_uv.c
+++ b/arch/x86/platform/uv/tlb_uv.c
@@ -1811,8 +1811,8 @@ static int calculate_destination_timeout(void)
1811 index = (mmr_image >> BAU_URGENCY_7_SHIFT) & BAU_URGENCY_7_MASK; 1811 index = (mmr_image >> BAU_URGENCY_7_SHIFT) & BAU_URGENCY_7_MASK;
1812 mmr_image = uv_read_local_mmr(UVH_TRANSACTION_TIMEOUT); 1812 mmr_image = uv_read_local_mmr(UVH_TRANSACTION_TIMEOUT);
1813 mult2 = (mmr_image >> BAU_TRANS_SHIFT) & BAU_TRANS_MASK; 1813 mult2 = (mmr_image >> BAU_TRANS_SHIFT) & BAU_TRANS_MASK;
1814 base = timeout_base_ns[index]; 1814 ts_ns = timeout_base_ns[index];
1815 ts_ns = base * mult1 * mult2; 1815 ts_ns *= (mult1 * mult2);
1816 ret = ts_ns / 1000; 1816 ret = ts_ns / 1000;
1817 } else { 1817 } else {
1818 /* 4 bits 0/1 for 10/80us base, 3 bits of multiplier */ 1818 /* 4 bits 0/1 for 10/80us base, 3 bits of multiplier */