public inbox for linux-ia64@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] - Update SN2 code for running on simulator
@ 2005-01-04 14:24 Jack Steiner
  2005-01-04 16:24 ` Jesse Barnes
  2005-01-04 17:09 ` [PATCH] - Update SN2 code for running on simulator (2nd try) Jack Steiner
  0 siblings, 2 replies; 3+ messages in thread
From: Jack Steiner @ 2005-01-04 14:24 UTC (permalink / raw)
  To: linux-ia64


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.



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] - Update SN2 code for running on simulator
  2005-01-04 14:24 [PATCH] - Update SN2 code for running on simulator Jack Steiner
@ 2005-01-04 16:24 ` Jesse Barnes
  2005-01-04 17:09 ` [PATCH] - Update SN2 code for running on simulator (2nd try) Jack Steiner
  1 sibling, 0 replies; 3+ messages in thread
From: Jesse Barnes @ 2005-01-04 16:24 UTC (permalink / raw)
  To: linux-ia64

On Tuesday, January 4, 2005 6:24 am, Jack Steiner wrote:
> +  addr = (is_shub2() ? 0xc00000028c000000 : 0xc0000087cc000000) | ((port
> >> 2) << 12); +  if ((port >= 0x1f0 && port <= 0x1f7) || port = 0x3f6 ||
> port = 0x3f7) +   addr |= port;
>    return (void *)addr;
>   }
>  }

Can we keep the UL specifiers in there?  It helps silence sparse and is a 
little more correct.

Thanks,
Jesse

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH] - Update SN2 code for running on simulator (2nd try)
  2005-01-04 14:24 [PATCH] - Update SN2 code for running on simulator Jack Steiner
  2005-01-04 16:24 ` Jesse Barnes
@ 2005-01-04 17:09 ` Jack Steiner
  1 sibling, 0 replies; 3+ messages in thread
From: Jack Steiner @ 2005-01-04 17:09 UTC (permalink / raw)
  To: linux-ia64


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 11:06:59.394846071 -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() ? 0xc00000028c000000UL : 0xc0000087cc000000UL) | ((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.



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2005-01-04 17:09 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-01-04 14:24 [PATCH] - Update SN2 code for running on simulator Jack Steiner
2005-01-04 16:24 ` Jesse Barnes
2005-01-04 17:09 ` [PATCH] - Update SN2 code for running on simulator (2nd try) Jack Steiner

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