mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Cliff Wickman <cpw@sgi.com>
To: linux-kernel@vger.kernel.org
Cc: mingo@elte.hu, x86@kernel.org
Subject: [PATCH 1/3] x86: UV BAU destination timeout period
Date: Fri, 22 Jun 2012 08:12:12 -0500	[thread overview]
Message-ID: <20120622131212.GA31884@sgi.com> (raw)
In-Reply-To: <E1Si3c5-0008I6-CG@eag09.americas.sgi.com>

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>
---
 arch/x86/platform/uv/tlb_uv.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Index: linux/arch/x86/platform/uv/tlb_uv.c
===================================================================
--- linux.orig/arch/x86/platform/uv/tlb_uv.c
+++ linux/arch/x86/platform/uv/tlb_uv.c
@@ -1811,8 +1811,8 @@ static int calculate_destination_timeout
 		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 */

  reply	other threads:[~2012-06-22 13:12 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-06-22 13:09 [PATCH 0/3] x86, UV: BAU additions and fixes Cliff Wickman
2012-06-22 13:12 ` Cliff Wickman [this message]
2012-06-26  5:59   ` [tip:x86/uv] x86/uv: Fix the UV BAU destination timeout period tip-bot for Cliff Wickman
2012-06-22 13:13 ` [PATCH 2/3] x86: UV BAU runtime enable and disable Cliff Wickman
2012-06-26  5:59   ` [tip:x86/uv] x86/uv: Implement UV BAU runtime enable and disable control via /proc/sgi_uv/ tip-bot for Cliff Wickman
2012-06-22 13:14 ` [PATCH 3/3] x86: UV2 BAU hang workarounds Cliff Wickman
2012-06-25 10:03   ` Ingo Molnar
2012-06-25 12:36     ` Cliff Wickman
2012-06-25 12:40       ` Ingo Molnar
2012-06-26  6:00   ` [tip:x86/uv] x86/uv: Work around UV2 BAU hangs tip-bot for Cliff Wickman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20120622131212.GA31884@sgi.com \
    --to=cpw@sgi.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=x86@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®