public inbox for linux-ia64@vger.kernel.org
 help / color / mirror / Atom feed
* [patch] paddr_to_nid fixup
@ 2003-08-25 13:56 Martin Hicks
  0 siblings, 0 replies; only message in thread
From: Martin Hicks @ 2003-08-25 13:56 UTC (permalink / raw)
  To: linux-ia64


David,

Here is a small patch for paddr_to_nid().  This fix is already in 2.4
and is used in the case where a NUMA kernel is running on a machine
without a SRAT ACPI table.  Without this patch the node info is not
correctly located.

mh

-- 
Wild Open Source Inc.                  mort@wildopensource.com


# This is a BitKeeper generated patch for the following project:
# Project Name: Linux kernel tree
# This patch format is intended for GNU patch command version 2.5 or higher.
# This patch includes the following deltas:
#	           ChangeSet	1.1149  -> 1.1150 
#	 arch/ia64/mm/numa.c	1.2     -> 1.3    
#
# The following is the BitKeeper ChangeSet Log
# --------------------------------------------
# 03/08/21	mort@green.i.bork.org	1.1150
# This fixes paddr_to_nid() for the case where there is no
# ACPI SRAT table, and thus num_memblks = 0.
# --------------------------------------------
#
diff -Nru a/arch/ia64/mm/numa.c b/arch/ia64/mm/numa.c
--- a/arch/ia64/mm/numa.c	Thu Aug 21 12:02:28 2003
+++ b/arch/ia64/mm/numa.c	Thu Aug 21 12:02:28 2003
@@ -43,5 +43,5 @@
 		    paddr < node_memblk[i].start_paddr + node_memblk[i].size)
 			break;
 
-	return (i < num_memblks) ? node_memblk[i].nid : -1;
+	return (i < num_memblks) ? node_memblk[i].nid : (num_memblks ? -1 : 0);
 }

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2003-08-25 13:56 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-08-25 13:56 [patch] paddr_to_nid fixup Martin Hicks

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox