Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 11cab711 authored by Cliff Wickman's avatar Cliff Wickman Committed by Ingo Molnar
Browse files

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: default avatarCliff Wickman <cpw@sgi.com>
Link: http://lkml.kernel.org/r/20120622131212.GA31884@sgi.com


Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
parent 6b16351a
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -1811,8 +1811,8 @@ static int calculate_destination_timeout(void)
		index = (mmr_image >> BAU_URGENCY_7_SHIFT) & BAU_URGENCY_7_MASK;
		mmr_image = uv_read_local_mmr(UVH_TRANSACTION_TIMEOUT);
		mult2 = (mmr_image >> BAU_TRANS_SHIFT) & BAU_TRANS_MASK;
		base = timeout_base_ns[index];
		ts_ns = base * mult1 * mult2;
		ts_ns = timeout_base_ns[index];
		ts_ns *= (mult1 * mult2);
		ret = ts_ns / 1000;
	} else {
		/* 4 bits  0/1 for 10/80us base, 3 bits of multiplier */