Subject: Swap and 2.6

From: Brian Murphy <[email-masked]>
Date: Thu, 17 Jun 2004 22:08:22 +0200

Hi,
 I have been using the swap patch posted here by Kumba on 27/5/2004
and it seeems to work, why has it not been merged? Is it incorrect?
Without it swapon segfaults and enabling swap is impossible.

/Brian

---

From: Kumba <[email-masked]>
Date: Thu, 17 Jun 2004 17:47:56 -0400

> Without it swapon segfaults and enabling swap is impossible.

It does seem to work for me on my R5K machines.

My only oddity so far is I'm unsure if it runs on R4x00 machines or 
Indigo2's.  My I2 lacks a framebuffer, and ip22zilog is shot dead in 
2.6.x, so It's near impossible to tell whether I get a successful boot 
or not on the machine.  I'm confident Peter's patch works for the most 
part, but if anyone w/ an I2 R4x00 machine and Newport can test 
2.6.5/.6/.7 + patch and let me know if it boots or not, I'd be 
interested.  Right now, I'm not able to boot anything past 2.6.4 on said 
machine, and have no idea how to capture all the boot info from the 
kernel startup through userland (netconsole didn't seem to work when I 
last tried it).

--Kumba

-- 
"Such is oft the course of deeds that move the wheels of the world: 
small hands do them because they must, while the eyes of the great are 
elsewhere."  --Elrond

---

From: Peter Fuerst <[email-masked]>
Date: Mon, 21 Jun 2004 16:20:48 +0200 (CEST)

Hello !

Switch back the channels according to PROM/documentation/case numbering,
do some other small changes (patch attached), and you should have serial
console available again.

However, i couldn't test this fully. On my IP28, when entering userland
in 2.6 (no matter whether /sbin/init or /bin/sh), the output in the
console-window becomes slower and slower, asymptotically reaching a
standstill, before the login prompt appears (while the machine still can
be ping'ed over ethernet without degradation)  :-(

Good luck

peter

On Thu, 17 Jun 2004, Kumba wrote:

> Date: Thu, 17 Jun 2004 17:47:56 -0400
> From: Kumba <[email-masked]>
> To: [email-masked]
> Subject: Re: Swap and 2.6
> 
> ..., and ip22zilog is shot dead in 
> 2.6.x, ...
> 
> --Kumba

diff -Naur linux-2.6.x-cvsweb/arch/mips/sgi-ip22/ip22-setup.c linux-2.6.x-local/arch/mips/sgi-ip22/ip22-setup.c
--- linux-2.6.x-cvsweb/arch/mips/sgi-ip22/ip22-setup.c	Thu Apr 29 14:37:10 2004
+++ linux-2.6.x-local/arch/mips/sgi-ip22/ip22-setup.c	Wed Jun 16 23:23:07 2004
@@ -99,6 +99,9 @@
 			strcpy(options, baud);
 		add_preferred_console("ttyS", *(ctype + 1) == '2' ? 1 : 0,
 				      baud ? options : NULL);
+#ifdef CONFIG_SERIAL_IP22_ZILOG_CONSOLE
+		serial_console = *(ctype + 1) == '2' ? 2 : 1;
+#endif
 	} else if (!ctype || *ctype != 'g') {
 		/* Use ARC if we don't want serial ('d') or Newport ('g'). */
 		prom_flags |= PROM_FLAG_USE_AS_CONSOLE;
@@ -150,3 +153,7 @@
 }
 
 early_initcall(ip22_setup);
+/*
+ * Revision 1.38, Thu Apr 29 14:37:10 2004 UTC
+ * Wed Jun 16 23:23:07 2004
+ */
diff -Naur linux-2.6.x-cvsweb/drivers/serial/ip22zilog.c linux-2.6.x-local/drivers/serial/ip22zilog.c
--- linux-2.6.x-cvsweb/drivers/serial/ip22zilog.c	Tue Dec 23 16:02:13 2003
+++ linux-2.6.x-local/drivers/serial/ip22zilog.c	Wed Jun 16 23:22:37 2004
@@ -62,7 +62,7 @@
 #define NUM_IP22ZILOG	1
 #define NUM_CHANNELS	(NUM_IP22ZILOG * 2)
 
-#define ZS_CLOCK		4915200 /* Zilog input clock rate. */
+#define ZS_CLOCK		3672000	/* Zilog input clock rate */
 #define ZS_CLOCK_DIVISOR	16      /* Divisor this driver uses. */
 
 /*
@@ -955,6 +955,7 @@
 	.driver_name	=	"ttyS",
 	.devfs_name	=	"tty/",
 	.major		=	TTY_MAJOR,
+	.dev_name	=	"ttyS",
 };
 
 static void * __init alloc_one_table(unsigned long size)
@@ -1169,8 +1170,11 @@
 		if (!ip22zilog_chip_regs[chip]) {
 			ip22zilog_chip_regs[chip] = rp = get_zs(chip);
 
-			up[(chip * 2) + 0].port.membase = (char *) &rp->channelA;
-			up[(chip * 2) + 1].port.membase = (char *) &rp->channelB;
+			up[(chip * 2) + 0].port.membase = (char *) &rp->channelB;
+			up[(chip * 2) + 1].port.membase = (char *) &rp->channelA;
+
+			up[(chip * 2) + 0].port.mapbase = CPHYSADDR(&rp->channelB);
+			up[(chip * 2) + 1].port.mapbase = CPHYSADDR(&rp->channelA);
 		}
 
 		/* Channel A */
@@ -1305,3 +1309,7 @@
 MODULE_AUTHOR("Ralf Baechle <[email-masked]>");
 MODULE_DESCRIPTION("SGI Zilog serial port driver");
 MODULE_LICENSE("GPL");
+/*
+ * Revision 1.11, Tue Dec 23 16:02:13 2003 UTC
+ * Wed Jun 16 23:22:37 2004 (1087420957)
+ */