All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mike Travis <travis@sgi.com>
To: Ingo Molnar <mingo@redhat.com>, "H. Peter Anvin" <hpa@zytor.com>,
	Thomas Gleixner <tglx@linutronix.de>,
	Andrew Morton <akpm@linux-foundation.org>,
	Dimitri Sivanich <sivanich@sgi.com>
Cc: Russ Anderson <rja@sgi.com>, John Estabrook <estabrook@sgi.com>,
	Andrew Banman <abanman@sgi.com>, Nathan Zimmer <nzimmer@sgi.com>,
	Alex Thorlton <athorlton@sgi.com>,
	x86@kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH 1/4] x86/platform/UV: Fix problem with UV4 Socket IDs not being contiguous
Date: Mon, 01 Aug 2016 13:40:50 -0500	[thread overview]
Message-ID: <20160801184050.048755337@asylum.americas.sgi.com> (raw)
In-Reply-To: 20160801184049.811754120@asylum.americas.sgi.com

[-- Attachment #1: uv4_fix_gam_range_lookup_table --]
[-- Type: text/plain, Size: 1680 bytes --]

The UV4 Socket IDs are not guaranteed to equate to Node values which
can cause the GAM (Global Addressable Memory) table lookups to fail.
Fix this by using an independent index into the GAM table instead of
the Socket ID to reference the base address.

Reviewed-by: Dimitri Sivanich <sivanich@sgi.com>
Reviewed-by: Nathan Zimmer <nzimmer@sgi.com>
Tested-by: Frank Ramsay <framsay@sgi.com>
Tested-by: John Estabrook <estabrook@sgi.com>
Signed-off-by: Mike Travis <travis@sgi.com>
---
 arch/x86/kernel/apic/x2apic_uv_x.c |    9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

--- linux-3.12.orig/arch/x86/kernel/apic/x2apic_uv_x.c
+++ linux-3.12/arch/x86/kernel/apic/x2apic_uv_x.c
@@ -325,7 +325,7 @@ static __init void build_uv_gr_table(voi
 	struct uv_gam_range_entry *gre = uv_gre_table;
 	struct uv_gam_range_s *grt;
 	unsigned long last_limit = 0, ram_limit = 0;
-	int bytes, i, sid, lsid = -1;
+	int bytes, i, sid, lsid = -1, indx = 0, lindx = -1;
 
 	if (!gre)
 		return;
@@ -356,11 +356,12 @@ static __init void build_uv_gr_table(voi
 		}
 		sid = gre->sockid - _min_socket;
 		if (lsid < sid) {		/* new range */
-			grt = &_gr_table[sid];
-			grt->base = lsid;
+			grt = &_gr_table[indx];
+			grt->base = lindx;
 			grt->nasid = gre->nasid;
 			grt->limit = last_limit = gre->limit;
 			lsid = sid;
+			lindx = indx++;
 			continue;
 		}
 		if (lsid == sid && !ram_limit) {	/* update range */
@@ -371,7 +372,7 @@ static __init void build_uv_gr_table(voi
 		}
 		if (!ram_limit) {		/* non-contiguous ram range */
 			grt++;
-			grt->base = sid - 1;
+			grt->base = lindx;
 			grt->nasid = gre->nasid;
 			grt->limit = last_limit = gre->limit;
 			continue;

-- 

  reply	other threads:[~2016-08-01 19:07 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-01 18:40 [PATCH 0/4] x86/platform/UV: SGI UV4 Kernel Fixes Mike Travis
2016-08-01 18:40 ` Mike Travis [this message]
2016-08-10 18:11   ` [tip:x86/urgent] x86/platform/UV: Fix problem with UV4 Socket IDs not being contiguous tip-bot for Mike Travis
2016-08-01 18:40 ` [PATCH 2/4] x86/platform/UV: Fix problem with iounmap UV4 EFI System Table causing panic Mike Travis
2016-08-10 18:11   ` [tip:x86/urgent] x86/platform/UV: Fix bug with iounmap() of the UV4 EFI System Table causing a crash tip-bot for Mike Travis
2016-08-01 18:40 ` [PATCH 3/4] x86/platform/UV: Fix problem with UV4 BIOS providing incorrect PXM values Mike Travis
2016-08-10 18:12   ` [tip:x86/urgent] " tip-bot for Mike Travis
2016-08-01 18:40 ` [PATCH 4/4] x86/platform/UV: Fix kernel panic running RHEL kdump kernel on UV Mike Travis
2016-08-10 18:12   ` [tip:x86/urgent] x86/platform/UV: Fix kernel panic running RHEL kdump kernel on UV systems tip-bot for Mike Travis
  -- strict thread matches above, loose matches on Subject: below --
2016-07-27 17:33 [PATCH 0/4] x86/platform/UV: SGI UV4 Kernel Fixes Mike Travis
2016-07-27 17:33 ` [PATCH 1/4] x86/platform/UV: Fix problem with UV4 Socket IDs not being contiguous Mike Travis

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=20160801184050.048755337@asylum.americas.sgi.com \
    --to=travis@sgi.com \
    --cc=abanman@sgi.com \
    --cc=akpm@linux-foundation.org \
    --cc=athorlton@sgi.com \
    --cc=estabrook@sgi.com \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=nzimmer@sgi.com \
    --cc=rja@sgi.com \
    --cc=sivanich@sgi.com \
    --cc=tglx@linutronix.de \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.