[PATCH] - Update SN2 code for running on simulator

From: Jack Steiner <steiner_at_sgi.com>
Date: 2005-01-05 01:24:12
Update the hack in sn_io_addr() that is used when running on the
system simulator. The change is needed for running on systems with 
the new shub2 chipset.

Note that this change affects simulator runs only.

	Signed-off-by: Jack Steiner <steiner@sgi.com>



Index: linux/arch/ia64/sn/kernel/iomv.c
===================================================================
--- linux.orig/arch/ia64/sn/kernel/iomv.c	2005-01-03 19:53:47.745120404 -0600
+++ linux/arch/ia64/sn/kernel/iomv.c	2005-01-04 08:20:27.550257092 -0600
@@ -32,7 +32,6 @@ void *sn_io_addr(unsigned long port)
 		return ((void *)(port | __IA64_UNCACHED_OFFSET));
 	} else {
 		/* but the simulator uses them... */
-		unsigned long io_base;
 		unsigned long addr;
 
 		/*
@@ -40,13 +39,9 @@ void *sn_io_addr(unsigned long port)
 		 * for accessing registers in bedrock local block
 		 * (so we don't do port&0xfff)
 		 */
-		if ((port >= 0x1f0 && port <= 0x1f7) ||
-		    port == 0x3f6 || port == 0x3f7) {
-			io_base = GLOBAL_MMR_ADDR(get_nasid(), 0xfcc000000UL);
-			addr = io_base | ((port >> 2) << 12) | (port & 0xfff);
-		} else {
-			addr = __ia64_get_io_port_base() | ((port >> 2) << 2);
-		}
+		addr = (is_shub2() ? 0xc00000028c000000 : 0xc0000087cc000000) | ((port >> 2) << 12);
+		if ((port >= 0x1f0 && port <= 0x1f7) || port == 0x3f6 || port == 0x3f7)
+			addr |= port;
 		return (void *)addr;
 	}
 }
-- 
Thanks

Jack Steiner (steiner@sgi.com)          651-683-5302
Principal Engineer                      SGI - Silicon Graphics, Inc.


-
To unsubscribe from this list: send the line "unsubscribe linux-ia64" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Received on Tue Jan 4 09:24:58 2005

This archive was generated by hypermail 2.1.8 : 2005-08-02 09:20:33 EST