From macro@ds2.pg.gda.pl  Tue Jan  2 19:20:58 2001
Received: (uucp@localhost) by guadalquivir.fnet.fr (8.8.8/97.02.12/Guadalquivir); id TAA07777; Tue, 2 Jan 2001 19:20:58 +0100 (MET)
Received-Date: Tue, 2 Jan 2001 19:20:58 +0100 (MET)
Received: from delta.ds2.pg.gda.pl(153.19.144.1)
 via SMTP by guadalquivir.fnet.fr, id smtpd007746; Tue Jan  2 19:20:37 2001
Received: from localhost by delta.ds2.pg.gda.pl (8.9.3/8.9.3) with SMTP id TAA24269;
	Tue, 2 Jan 2001 19:12:58 +0100 (MET)
Date: Tue, 2 Jan 2001 19:12:57 +0100 (MET)
From: "Maciej W. Rozycki" <macro@ds2.pg.gda.pl>
To: Harald Koerfgen <Harald.Koerfgen@home.ivm.de>
cc: ralf@uni-koblenz.de, linux-mips@fnet.fr, linux-mips@oss.sgi.com
Subject: Re: SGI/ARCS related fixes
In-Reply-To: <XFMail.001231124111.Harald.Koerfgen@home.ivm.de>
Message-ID: <Pine.GSO.3.96.1010102190251.22443B-100000@delta.ds2.pg.gda.pl>
Organization: Technical University of Gdansk
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Content-Length: 1815
Lines: 47

On Sun, 31 Dec 2000, Harald Koerfgen wrote:

> wanting to bring my O2 patches up to date I stumbled over some minor hickups.
[...]
> --- /nfs/cvs/linux-2.3/linux/arch/mips/arc/memory.c     Mon Dec 11 18:07:34 2000
> +++ linux/arch/mips/arc/memory.c        Sat Dec 30 21:49:32 2000
> @@ -124,7 +124,7 @@
>                 size = p->pages << PAGE_SHIFT;
>                 type = prom_memtype_classify(p->type);
>  
> -               add_memory_region(base, pages, type);
> +               add_memory_region(base, size, type);
>         }
>  }
>  

 That is fine.  I actually included the fix in my set of memory map
patches (patch-mips-2.4.0-test11-20001212-mem_map-37) I sent Ralf a few
days ago.  They still appear to wait to be applied.

> @@ -143,12 +143,13 @@
>                 addr = boot_mem_map.map[i].addr;
>                 while (addr < boot_mem_map.map[i].addr
>                               + boot_mem_map.map[i].size) {
> -                       ClearPageReserved(virt_to_page(__va(addr)));
> -                       set_page_count(virt_to_page(__va(addr)), 1);
> -                       free_page(__va(addr));
> +                       ClearPageReserved(virt_to_page(addr));
> +                       set_page_count(virt_to_page(addr), 1);
> +                       free_page(addr);
>                         addr += PAGE_SIZE;
>                         freed += PAGE_SIZE;
>                 }
>         }
>         printk("Freeing prom memory: %ldkb freed\n", freed >> 10);
>  }
> +

 That's probably incorrect.  These functions expect a virtual address
while "addr" is a physical address.

  Maciej

-- 
+  Maciej W. Rozycki, Technical University of Gdansk, Poland   +
+--------------------------------------------------------------+
+        e-mail: macro@ds2.pg.gda.pl, PGP key available        +

From ralf@oss.sgi.com  Wed Jan  3 19:18:40 2001
Received: (uucp@localhost) by guadalquivir.fnet.fr (8.8.8/97.02.12/Guadalquivir); id TAA20022; Wed, 3 Jan 2001 19:18:40 +0100 (MET)
Received-Date: Wed, 3 Jan 2001 19:18:40 +0100 (MET)
Received: from brutus.conectiva.com.br(200.250.58.146), claiming to be "dhcp046.distro.conectiva"
 via SMTP by guadalquivir.fnet.fr, id smtpd020020; Wed Jan  3 19:18:35 2001
Received: (ralf@lappi) by bacchus.dhis.org id <S867580AbRACSJx>;
	Wed, 3 Jan 2001 16:09:53 -0200
Date: Wed, 3 Jan 2001 16:09:53 -0200
From: Ralf Baechle <ralf@oss.sgi.com>
To: "Maciej W. Rozycki" <macro@ds2.pg.gda.pl>
Cc: Harald Koerfgen <Harald.Koerfgen@home.ivm.de>, linux-mips@fnet.fr,
        linux-mips@oss.sgi.com
Subject: Re: SGI/ARCS related fixes
Message-ID: <20010103160953.A3795@bacchus.dhis.org>
References: <XFMail.001231124111.Harald.Koerfgen@home.ivm.de> <Pine.GSO.3.96.1010102190251.22443B-100000@delta.ds2.pg.gda.pl>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
X-Mailer: Mutt 1.0.1i
In-Reply-To: <Pine.GSO.3.96.1010102190251.22443B-100000@delta.ds2.pg.gda.pl>; from macro@ds2.pg.gda.pl on Tue, Jan 02, 2001 at 07:12:57PM +0100
X-Accept-Language: de,en,fr
Content-Length: 800
Lines: 22

On Tue, Jan 02, 2001 at 07:12:57PM +0100, Maciej W. Rozycki wrote:

> > --- /nfs/cvs/linux-2.3/linux/arch/mips/arc/memory.c     Mon Dec 11 18:07:34 2000
> > +++ linux/arch/mips/arc/memory.c        Sat Dec 30 21:49:32 2000
> > @@ -124,7 +124,7 @@
> >                 size = p->pages << PAGE_SHIFT;
> >                 type = prom_memtype_classify(p->type);
> >  
> > -               add_memory_region(base, pages, type);
> > +               add_memory_region(base, size, type);
> >         }
> >  }
> >  
> 
>  That is fine.  I actually included the fix in my set of memory map
> patches (patch-mips-2.4.0-test11-20001212-mem_map-37) I sent Ralf a few
> days ago.  They still appear to wait to be applied.

I suspect your patch got lost from cvs in the recent disk crash.  I reapplied
it now.

  Ralf

From ralf@oss.sgi.com  Wed Jan  3 19:22:30 2001
Received: (uucp@localhost) by guadalquivir.fnet.fr (8.8.8/97.02.12/Guadalquivir); id TAA20090; Wed, 3 Jan 2001 19:22:30 +0100 (MET)
Received-Date: Wed, 3 Jan 2001 19:22:30 +0100 (MET)
Received: from brutus.conectiva.com.br(200.250.58.146), claiming to be "dhcp046.distro.conectiva"
 via SMTP by guadalquivir.fnet.fr, id smtpd020020; Wed Jan  3 19:22:19 2001
Received: (ralf@lappi) by bacchus.dhis.org id <S867580AbRACSNz>;
	Wed, 3 Jan 2001 16:13:55 -0200
Date: Wed, 3 Jan 2001 16:13:54 -0200
From: Ralf Baechle <ralf@oss.sgi.com>
To: Harald Koerfgen <Harald.Koerfgen@home.ivm.de>
Cc: linux-mips@fnet.fr, linux-mips@oss.sgi.com
Subject: Re: SGI/ARCS related fixes
Message-ID: <20010103161354.A3856@bacchus.dhis.org>
References: <XFMail.001231124111.Harald.Koerfgen@home.ivm.de>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
X-Mailer: Mutt 1.0.1i
In-Reply-To: <XFMail.001231124111.Harald.Koerfgen@home.ivm.de>; from Harald.Koerfgen@home.ivm.de on Sun, Dec 31, 2000 at 12:41:11PM +0100
X-Accept-Language: de,en,fr
Content-Length: 269
Lines: 10

On Sun, Dec 31, 2000 at 12:41:11PM +0100, Harald Koerfgen wrote:

> 
> wanting to bring my O2 patches up to date I stumbled over some minor hickups.
> 
> I don't have the appropriate hardware to test, ok to commit?

I've applied the sgialib.h and misc.c parts.

  Ralf

From christoph.martin@uni-mainz.de  Thu Jan  4 21:43:01 2001
Received: (uucp@localhost) by guadalquivir.fnet.fr (8.8.8/97.02.12/Guadalquivir); id VAA03164; Thu, 4 Jan 2001 21:43:01 +0100 (MET)
Received-Date: Thu, 4 Jan 2001 21:43:01 +0100 (MET)
Received: from mailgate1.zdv.Uni-Mainz.DE(134.93.8.56)
 via SMTP by guadalquivir.fnet.fr, id smtpd003162; Thu Jan  4 21:42:54 2001
Received: from arthur.zdv.Uni-Mainz.DE (arthur.zdv.Uni-Mainz.DE [134.93.8.145])
	by mailgate1.zdv.Uni-Mainz.DE (8.11.0/8.10.2) with ESMTP id f04KgkM22121;
	Thu, 4 Jan 2001 21:42:46 +0100 (MET)
Received: (from martin@localhost)
	by arthur.zdv.Uni-Mainz.DE (8.10.2/8.10.2) id f04Kgk522700;
	Thu, 4 Jan 2001 21:42:46 +0100 (MET)
From: Christoph Martin <martin@uni-mainz.de>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Message-ID: <14932.57412.617757.439688@arthur.zdv.Uni-Mainz.DE>
Date: Thu, 4 Jan 2001 21:42:44 +0100 (MET)
To: ralf@oss.sgi.com
Cc: Christoph.Martin@uni-mainz.de, linux-mips@oss.sgi.com, linux-mips@fnet.fr,
        debian-mips@lists.debian.org, Andreas Jaeger <aj@suse.de>
Subject: glibc 2.2 on MIPS
X-Mailer: VM 6.75 under Emacs 19.34.1
Organization: Johannes Gutenberg-Universitaet Mainz
Content-Length: 1322
Lines: 33

Hi Ralf,

On Thu, 12 Oct 2000 04:04:44 +0200, Ralf Baechle wrote:

> On Thu, Oct 12, 2000 at 12:24:21AM +0200, Florian Lohoff wrote:

> > We are trying :) I am currently basing all my Debian-mips(el) things
> > on glibc 2.0.6. It is the only stable solution right now. I am experimenting
> > with the glibc 2.1.94-3 debian source package which i managed to get
> > compiled with unmodified cvs binutils and gcc + the gcse patch.
> > 
> > Ralf reported bugs in the ld where he send me a patch. With that patch
> > i get a "Bus Error" from the ld.so within the glibc build.

> There patch is ok; you get those bus errors because there are bugs in
> both ld and binutils that in most cases compensate each other.  If you
> fix only one of them you get all sorts of funnies ...

I just tried to build glibc-2.2 (CVS-2000-12-28) for debian-mips and
it still has the "Bus Error" problem. We are currently using binutils
2.10.1.0.2 and gcc 2.95.2 + CVS from 2.95 branch. 

Can you please post both patches, so that we can verify which one is
missing in our build.

> Even with the fixes ld is not yet perfect - for example emacs and X still
> fail.

The gcc/binutils combination seams to work correctly as far as I can
see. I managed to compile xfree 4.0.2 linked agains 2.1.95-1.1. What
problems did you have with X?

Christoph

From macro@ds2.pg.gda.pl  Thu Jan  4 22:35:10 2001
Received: (uucp@localhost) by guadalquivir.fnet.fr (8.8.8/97.02.12/Guadalquivir); id WAA04447; Thu, 4 Jan 2001 22:35:10 +0100 (MET)
Received-Date: Thu, 4 Jan 2001 22:35:10 +0100 (MET)
Received: from delta.ds2.pg.gda.pl(153.19.144.1)
 via SMTP by guadalquivir.fnet.fr, id smtpd004445; Thu Jan  4 22:35:06 2001
Received: from localhost by delta.ds2.pg.gda.pl (8.9.3/8.9.3) with SMTP id WAA23098;
	Thu, 4 Jan 2001 22:34:40 +0100 (MET)
Date: Thu, 4 Jan 2001 22:34:40 +0100 (MET)
From: "Maciej W. Rozycki" <macro@ds2.pg.gda.pl>
To: Christoph Martin <martin@uni-mainz.de>
cc: ralf@oss.sgi.com, Christoph.Martin@uni-mainz.de, linux-mips@oss.sgi.com,
        linux-mips@fnet.fr, debian-mips@lists.debian.org,
        Andreas Jaeger <aj@suse.de>
Subject: Re: glibc 2.2 on MIPS
In-Reply-To: <14932.57412.617757.439688@arthur.zdv.Uni-Mainz.DE>
Message-ID: <Pine.GSO.3.96.1010104222312.17873C-100000@delta.ds2.pg.gda.pl>
Organization: Technical University of Gdansk
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Content-Length: 2241
Lines: 49

On Thu, 4 Jan 2001, Christoph Martin wrote:

> I just tried to build glibc-2.2 (CVS-2000-12-28) for debian-mips and
> it still has the "Bus Error" problem. We are currently using binutils
> 2.10.1.0.2 and gcc 2.95.2 + CVS from 2.95 branch. 
> 
> Can you please post both patches, so that we can verify which one is
> missing in our build.

 The 2.2 release of glibc needs no patches.  The current CVS version is
even better as a few unrelated fixes has been applied meanwhile.

 For binutils 2.10.1 the following fix makes binaries be built as ld.so
expects.  Other fixes might be needed for 2.10.1 to work at all -- they
are all available from: 
ftp://ftp.ds2.pg.gda.pl/pub/macro/SRPMS/binutils-2.10.1-3.src.rpm (or use
a mirror at: ftp://ftp.rfc822.org/pub/mirror/ftp.ds2.pg.gda.pl/...).

-- 
+  Maciej W. Rozycki, Technical University of Gdansk, Poland   +
+--------------------------------------------------------------+
+        e-mail: macro@ds2.pg.gda.pl, PGP key available        +

binutils-2.10-mips-dyn-addend.patch
diff -up --recursive --new-file binutils-2.10.macro/bfd/elf32-mips.c binutils-2.10/bfd/elf32-mips.c
--- binutils-2.10.macro/bfd/elf32-mips.c	Sat Mar 11 02:23:10 2000
+++ binutils-2.10/bfd/elf32-mips.c	Sat Oct 28 17:19:52 2000
@@ -5675,15 +5675,16 @@ mips_elf_create_dynamic_relocation (outp
 	  /* The relocation we're building is section-relative.
 	     Therefore, the original addend must be adjusted by the
 	     section offset.  */
-	  *addendp += symbol - sec->output_section->vma;
+	  *addendp += section_offset;
 	  /* Now, the relocation is just against the section.  */
 	  symbol = sec->output_section->vma;
 	}
       
-      /* If the relocation was previously an absolute relocation, we
-	 must adjust it by the value we give it in the dynamic symbol
-	 table.  */
-      if (r_type != R_MIPS_REL32)
+      /* If the relocation was previously an absolute relocation and
+	 this symbol will not be referred to by the relocation, we must
+	 adjust it by the value we give it in the dynamic symbol table.
+	 Otherwise leave the job up to the dynamic linker.  */
+      if (!indx && r_type != R_MIPS_REL32)
 	*addendp += symbol;
 
       /* The relocation is always an REL32 relocation because we don't

From christoph.martin@uni-mainz.de  Fri Jan  5 11:29:54 2001
Received: (uucp@localhost) by guadalquivir.fnet.fr (8.8.8/97.02.12/Guadalquivir); id LAA00215; Fri, 5 Jan 2001 11:29:54 +0100 (MET)
Received-Date: Fri, 5 Jan 2001 11:29:54 +0100 (MET)
Received: from mailgate1.zdv.Uni-Mainz.DE(134.93.8.56)
 via SMTP by guadalquivir.fnet.fr, id smtpd000213; Fri Jan  5 11:29:46 2001
Received: from arthur.zdv.Uni-Mainz.DE (arthur.zdv.Uni-Mainz.DE [134.93.8.145])
	by mailgate1.zdv.Uni-Mainz.DE (8.11.0/8.10.2) with ESMTP id f05ATXM27303;
	Fri, 5 Jan 2001 11:29:33 +0100 (MET)
Received: (from martin@localhost)
	by arthur.zdv.Uni-Mainz.DE (8.10.2/8.10.2) id f05ATW124161;
	Fri, 5 Jan 2001 11:29:32 +0100 (MET)
From: Christoph Martin <martin@uni-mainz.de>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Message-ID: <14933.41481.359719.747161@arthur.zdv.Uni-Mainz.DE>
Date: Fri, 5 Jan 2001 11:29:29 +0100 (MET)
To: Nicu Popovici <octavp@isratech.ro>
Cc: Christoph Martin <martin@uni-mainz.de>, linux-mips@oss.sgi.com,
        linux-mips@fnet.fr, debian-mips@lists.debian.org
Subject: Re: glibc 2.2 on MIPS
In-Reply-To: <3A55F882.4B693DE3@isratech.ro>
References: <14932.57412.617757.439688@arthur.zdv.Uni-Mainz.DE>
	<3A55F882.4B693DE3@isratech.ro>
X-Mailer: VM 6.75 under Emacs 19.34.1
Organization: Johannes Gutenberg-Universitaet Mainz
Content-Length: 586
Lines: 16

Nicu Popovici writes:
 > Hello all,
 > 
 > My question is somehow related on the problems showed in this email. Sorry if this
 > will bother you.
 > I am trying to setup a cross toolchain for mips and  I have to use binutils 2.10
 > and gcc 2.95.2 and glibc2.1.3. Currently I am trying to setup binutils 2.10 with
 > egcs1.0.3a and with glibc.2.0.6 . Do you have any patches for binutils 2.10 or for
 > gcc2.95.2 for mips ? If you have and if you have some ideeas please tell me ..
 > 

Look for the patches in the respective archives on:

ftp.ds2.pg.gda.pl/pub/macro/SRPMS/

Christoph

From christoph.martin@uni-mainz.de  Fri Jan  5 22:10:50 2001
Received: (uucp@localhost) by guadalquivir.fnet.fr (8.8.8/97.02.12/Guadalquivir); id WAA04737; Fri, 5 Jan 2001 22:10:50 +0100 (MET)
Received-Date: Fri, 5 Jan 2001 22:10:50 +0100 (MET)
Received: from mailgate2.zdv.Uni-Mainz.DE(134.93.8.57)
 via SMTP by guadalquivir.fnet.fr, id smtpd004735; Fri Jan  5 22:10:42 2001
Received: from arthur.zdv.Uni-Mainz.DE (arthur.zdv.Uni-Mainz.DE [134.93.8.145])
	by mailgate2.zdv.Uni-Mainz.DE (8.11.0/8.10.2) with ESMTP id f05LAW022811;
	Fri, 5 Jan 2001 22:10:32 +0100 (MET)
Received: (from martin@localhost)
	by arthur.zdv.Uni-Mainz.DE (8.10.2/8.10.2) id f05LAVD25800;
	Fri, 5 Jan 2001 22:10:31 +0100 (MET)
From: Christoph Martin <martin@uni-mainz.de>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Message-ID: <14934.14407.120130.469971@arthur.zdv.Uni-Mainz.DE>
Date: Fri, 5 Jan 2001 22:10:31 +0100 (MET)
To: Nicu Popovici <octavp@isratech.ro>
Cc: Christoph Martin <martin@uni-mainz.de>, linux-mips@oss.sgi.com,
        linux-mips@fnet.fr, debian-mips@lists.debian.org
Subject: Re: glibc 2.2 on MIPS
In-Reply-To: <3A5652B9.1D509038@isratech.ro>
References: <14932.57412.617757.439688@arthur.zdv.Uni-Mainz.DE>
	<3A5652B9.1D509038@isratech.ro>
X-Mailer: VM 6.75 under Emacs 19.34.1
Organization: Johannes Gutenberg-Universitaet Mainz
Content-Length: 504
Lines: 14

Nicu Popovici writes:
 > Hello ,
 > 
 > I am bothering you again.
 > Related to gcc 2.95.2 --- it has any patches for porting to mips or not ? I mean ,
 > where do I find the patches for gcc-2.95.2 for mips if there are some files. I saw
 > that you said something like that "gcc 2.95.2 + CVS from 2.95 branch." What do you
 > mean ?

"gcc 2.95.2 + CVS from 2.95 branch." is what debian has in its
gcc-2.95.2. The mips patches are - as I said - in the src.rpm's on
ftp.ds2.pg.gda.pl/pub/macro/SRPMS/ 

C

From jadb@redhat.com  Fri Jan 12 04:08:18 2001
Received: (uucp@localhost) by guadalquivir.fnet.fr (8.8.8/97.02.12/Guadalquivir); id EAA01813; Fri, 12 Jan 2001 04:08:18 +0100 (MET)
Received-Date: Fri, 12 Jan 2001 04:08:18 +0100 (MET)
Received: from blackdog.wirespeed.com(208.170.106.25)
 via SMTP by guadalquivir.fnet.fr, id smtpd001811; Fri Jan 12 04:08:11 2001
Received: from redhat.com (IDENT:joe@dhcp-249.wirespeed.com [172.16.17.249] (may be forged))
	by blackdog.wirespeed.com (8.9.3/8.9.3) with ESMTP id VAA15264;
	Thu, 11 Jan 2001 21:04:29 -0600
Message-ID: <3A5E75C4.2020203@redhat.com>
Date: Thu, 11 Jan 2001 21:11:00 -0600
From: Joe deBlaquiere <jadb@redhat.com>
Organization: Red Hat, Inc.
User-Agent: Mozilla/5.0 (X11; U; Linux 2.2.16-22 i686; en-US; m18) Gecko/20001107 Netscape6/6.0
X-Accept-Language: en
MIME-Version: 1.0
To: "'linux-mips@oss.sgi.com'" <linux-mips@oss.sgi.com>,
        linux-mips <linux-mips@fnet.fr>
Subject: strace package
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
Content-Length: 230
Lines: 9

Has anybody done a port of strace for linux/mips 2.4??? I'm trying to 
debug something and need something simple.
-- 
Joe deBlaquiere
Red Hat, Inc.
307 Wynn Drive
Huntsville AL, 35805
voice : (256)-704-9257
fax   : (256)-837-3839

From jsun@mvista.com  Fri Jan 12 04:51:28 2001
Received: (uucp@localhost) by guadalquivir.fnet.fr (8.8.8/97.02.12/Guadalquivir); id EAA03306; Fri, 12 Jan 2001 04:51:28 +0100 (MET)
Received-Date: Fri, 12 Jan 2001 04:51:28 +0100 (MET)
Received: from gateway-1237.mvista.com(12.44.186.158), claiming to be "hermes.mvista.com"
 via SMTP by guadalquivir.fnet.fr, id smtpd003304; Fri Jan 12 04:51:21 2001
Received: from mvista.com (IDENT:jsun@orion.mvista.com [10.0.0.75])
	by hermes.mvista.com (8.11.0/8.11.0) with ESMTP id f0C3mdC03560;
	Thu, 11 Jan 2001 19:48:39 -0800
Sender: jsun@hermes.mvista.com
Message-ID: <3A5E7F3A.4BD57AC5@mvista.com>
Date: Thu, 11 Jan 2001 19:51:22 -0800
From: Jun Sun <jsun@mvista.com>
X-Mailer: Mozilla 4.72 [en] (X11; U; Linux 2.2.14-5.0 i686)
X-Accept-Language: en
MIME-Version: 1.0
To: Joe deBlaquiere <jadb@redhat.com>
CC: "'linux-mips@oss.sgi.com'" <linux-mips@oss.sgi.com>,
        linux-mips <linux-mips@fnet.fr>
Subject: Re: strace package
References: <3A5E75C4.2020203@redhat.com>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Content-Length: 429
Lines: 16

Joe deBlaquiere wrote:
> 
> Has anybody done a port of strace for linux/mips 2.4??? I'm trying to
> debug something and need something simple.
> --
> Joe deBlaquiere
> Red Hat, Inc.
> 307 Wynn Drive
> Huntsville AL, 35805
> voice : (256)-704-9257
> fax   : (256)-837-3839

strace is included in the MontaVista HHL distribution.  You can find the rpm
and srpm under ftp.mvista.com/pub/CDK?? and/or ftp.mvista.com/pub/area51.

Jun

From christoph.martin@uni-mainz.de  Fri Jan 12 15:41:14 2001
Received: (uucp@localhost) by guadalquivir.fnet.fr (8.8.8/97.02.12/Guadalquivir); id PAA07800; Fri, 12 Jan 2001 15:41:14 +0100 (MET)
Received-Date: Fri, 12 Jan 2001 15:41:14 +0100 (MET)
Received: from mailgate1.zdv.Uni-Mainz.DE(134.93.8.56)
 via SMTP by guadalquivir.fnet.fr, id smtpd007798; Fri Jan 12 15:41:05 2001
Received: from arthur.zdv.Uni-Mainz.DE (arthur.zdv.Uni-Mainz.DE [134.93.8.145])
	by mailgate1.zdv.Uni-Mainz.DE (8.11.0/8.10.2) with ESMTP id f0CEf0M28592;
	Fri, 12 Jan 2001 15:41:00 +0100 (MET)
Received: (from martin@localhost)
	by arthur.zdv.Uni-Mainz.DE (8.10.2/8.10.2) id f0CEf0R09870;
	Fri, 12 Jan 2001 15:41:00 +0100 (MET)
Sender: christoph.martin@uni-mainz.de
To: Joe deBlaquiere <jadb@redhat.com>
Cc: "'linux-mips@oss.sgi.com'" <linux-mips@oss.sgi.com>,
        linux-mips <linux-mips@fnet.fr>
Subject: Re: strace package
References: <3A5E75C4.2020203@redhat.com>
From: Christoph Martin <martin@uni-mainz.de>
Date: 12 Jan 2001 15:40:59 +0100
In-Reply-To: Joe deBlaquiere's message of Thu, 11 Jan 2001 21:11:00 -0600
Message-ID: <wwgvgrkesuc.fsf@arthur.zdv.Uni-Mainz.DE>
X-Mailer: Gnus v5.3/Emacs 19.34
Content-Length: 904
Lines: 29

Joe deBlaquiere <jadb@redhat.com> writes:

> 
> Has anybody done a port of strace for linux/mips 2.4??? I'm trying to 
> debug something and need something simple.
> -- 
> Joe deBlaquiere
> Red Hat, Inc.
> 307 Wynn Drive
> Huntsville AL, 35805
> voice : (256)-704-9257
> fax   : (256)-837-3839
> 

There is a debian package of strace for mips in
ftp://ftp.rfc822.org/pub/local/debian-mips/packages/. It is working
with linux 2.4.

C

-- 
============================================================================
Christoph Martin, Uni-Mainz, Germany
 Internet-Mail:  Christoph.Martin@Uni-Mainz.DE
--------------export-a-crypto-system-sig -RSA-3-lines-PERL------------------
#!/usr/bin/perl -sp0777i<X+d*lMLa^*lN%0]dsXx++lMlN/dsM0<j]dsj
$/=unpack('H*',$_);$_=`echo 16dio\U$k"SK$/SM$n\EsN0p[lN*1
lK[d2%Sa2/d0$^Ixp"|dc`;s/\W//g;$_=pack('H*',/((..)*)$/)
#what's this? see http://www.dcs.ex.ac.uk/~aba/rsa/

From macro@ds2.pg.gda.pl  Mon Jan 15 21:05:46 2001
Received: (uucp@localhost) by guadalquivir.fnet.fr (8.8.8/97.02.12/Guadalquivir); id VAA04962; Mon, 15 Jan 2001 21:05:46 +0100 (MET)
Received-Date: Mon, 15 Jan 2001 21:05:46 +0100 (MET)
Received: from delta.ds2.pg.gda.pl(153.19.144.1)
 via SMTP by guadalquivir.fnet.fr, id smtpd004960; Mon Jan 15 21:05:45 2001
Received: from localhost by delta.ds2.pg.gda.pl (8.9.3/8.9.3) with SMTP id VAA10130;
	Mon, 15 Jan 2001 21:05:09 +0100 (MET)
Date: Mon, 15 Jan 2001 21:05:08 +0100 (MET)
From: "Maciej W. Rozycki" <macro@ds2.pg.gda.pl>
To: Jun Sun <jsun@mvista.com>
cc: Joe deBlaquiere <jadb@redhat.com>,
        "'linux-mips@oss.sgi.com'" <linux-mips@oss.sgi.com>,
        linux-mips <linux-mips@fnet.fr>
Subject: Re: strace package
In-Reply-To: <3A5E7F3A.4BD57AC5@mvista.com>
Message-ID: <Pine.GSO.3.96.1010115205136.16619W-100000@delta.ds2.pg.gda.pl>
Organization: Technical University of Gdansk
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Content-Length: 418
Lines: 11

On Thu, 11 Jan 2001, Jun Sun wrote:

> strace is included in the MontaVista HHL distribution.  You can find the rpm
> and srpm under ftp.mvista.com/pub/CDK?? and/or ftp.mvista.com/pub/area51.

 Thanks for the pointer.

-- 
+  Maciej W. Rozycki, Technical University of Gdansk, Poland   +
+--------------------------------------------------------------+
+        e-mail: macro@ds2.pg.gda.pl, PGP key available        +

From macro@ds2.pg.gda.pl  Mon Jan 15 21:11:46 2001
Received: (uucp@localhost) by guadalquivir.fnet.fr (8.8.8/97.02.12/Guadalquivir); id VAA05037; Mon, 15 Jan 2001 21:11:46 +0100 (MET)
Received-Date: Mon, 15 Jan 2001 21:11:46 +0100 (MET)
Received: from delta.ds2.pg.gda.pl(153.19.144.1)
 via SMTP by guadalquivir.fnet.fr, id smtpd005033; Mon Jan 15 21:11:38 2001
Received: from localhost by delta.ds2.pg.gda.pl (8.9.3/8.9.3) with SMTP id VAA10380;
	Mon, 15 Jan 2001 21:11:24 +0100 (MET)
Date: Mon, 15 Jan 2001 21:11:24 +0100 (MET)
From: "Maciej W. Rozycki" <macro@ds2.pg.gda.pl>
To: Christoph Martin <martin@uni-mainz.de>
cc: Joe deBlaquiere <jadb@redhat.com>,
        "'linux-mips@oss.sgi.com'" <linux-mips@oss.sgi.com>,
        linux-mips <linux-mips@fnet.fr>
Subject: Re: strace package
In-Reply-To: <wwgvgrkesuc.fsf@arthur.zdv.Uni-Mainz.DE>
Message-ID: <Pine.GSO.3.96.1010115210732.16619X-100000@delta.ds2.pg.gda.pl>
Organization: Technical University of Gdansk
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Content-Length: 408
Lines: 12

On 12 Jan 2001, Christoph Martin wrote:

> There is a debian package of strace for mips in
> ftp://ftp.rfc822.org/pub/local/debian-mips/packages/. It is working
> with linux 2.4.

 And the sources are at...?

-- 
+  Maciej W. Rozycki, Technical University of Gdansk, Poland   +
+--------------------------------------------------------------+
+        e-mail: macro@ds2.pg.gda.pl, PGP key available        +

From ralf@oss.sgi.com  Tue Jan 16 09:14:12 2001
Received: (uucp@localhost) by guadalquivir.fnet.fr (8.8.8/97.02.12/Guadalquivir); id JAA14343; Tue, 16 Jan 2001 09:14:12 +0100 (MET)
Received-Date: Tue, 16 Jan 2001 09:14:12 +0100 (MET)
Received: from brutus.conectiva.com.br(200.250.58.146), claiming to be "lappi.waldorf-gmbh.de"
 via SMTP by guadalquivir.fnet.fr, id smtpd014341; Tue Jan 16 09:14:01 2001
Received: (ralf@lappi.waldorf-gmbh.de) by bacchus.dhis.org
	id <S869538AbRAPIMw>; Tue, 16 Jan 2001 06:12:52 -0200
Date: Tue, 16 Jan 2001 06:12:52 -0200
From: Ralf Baechle <ralf@oss.sgi.com>
To: "Maciej W. Rozycki" <macro@ds2.pg.gda.pl>
Cc: Christoph Martin <martin@uni-mainz.de>, Joe deBlaquiere <jadb@redhat.com>,
        "'linux-mips@oss.sgi.com'" <linux-mips@oss.sgi.com>,
        linux-mips <linux-mips@fnet.fr>
Subject: Re: strace package
Message-ID: <20010116061252.B9752@bacchus.dhis.org>
References: <wwgvgrkesuc.fsf@arthur.zdv.Uni-Mainz.DE> <Pine.GSO.3.96.1010115210732.16619X-100000@delta.ds2.pg.gda.pl>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
User-Agent: Mutt/1.2.5i
In-Reply-To: <Pine.GSO.3.96.1010115210732.16619X-100000@delta.ds2.pg.gda.pl>; from macro@ds2.pg.gda.pl on Mon, Jan 15, 2001 at 09:11:24PM +0100
X-Accept-Language: de,en,fr
Content-Length: 282
Lines: 11

On Mon, Jan 15, 2001 at 09:11:24PM +0100, Maciej W. Rozycki wrote:

> > There is a debian package of strace for mips in
> > ftp://ftp.rfc822.org/pub/local/debian-mips/packages/. It is working
> > with linux 2.4.
> 
>  And the sources are at...?

See strace.sourceforge.net.

  Ralf

From macro@ds2.pg.gda.pl  Tue Jan 16 12:50:51 2001
Received: (uucp@localhost) by guadalquivir.fnet.fr (8.8.8/97.02.12/Guadalquivir); id MAA16742; Tue, 16 Jan 2001 12:50:51 +0100 (MET)
Received-Date: Tue, 16 Jan 2001 12:50:51 +0100 (MET)
Received: from delta.ds2.pg.gda.pl(153.19.144.1)
 via SMTP by guadalquivir.fnet.fr, id smtpd016740; Tue Jan 16 12:50:36 2001
Received: from localhost by delta.ds2.pg.gda.pl (8.9.3/8.9.3) with SMTP id MAA06661;
	Tue, 16 Jan 2001 12:40:12 +0100 (MET)
Date: Tue, 16 Jan 2001 12:40:11 +0100 (MET)
From: "Maciej W. Rozycki" <macro@ds2.pg.gda.pl>
To: Ralf Baechle <ralf@oss.sgi.com>
cc: Christoph Martin <martin@uni-mainz.de>, Joe deBlaquiere <jadb@redhat.com>,
        "'linux-mips@oss.sgi.com'" <linux-mips@oss.sgi.com>,
        linux-mips <linux-mips@fnet.fr>
Subject: Re: strace package
In-Reply-To: <20010116061252.B9752@bacchus.dhis.org>
Message-ID: <Pine.GSO.3.96.1010116123223.5546B-100000@delta.ds2.pg.gda.pl>
Organization: Technical University of Gdansk
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Content-Length: 634
Lines: 18

On Tue, 16 Jan 2001, Ralf Baechle wrote:

> > > There is a debian package of strace for mips in
> > > ftp://ftp.rfc822.org/pub/local/debian-mips/packages/. It is working
> > > with linux 2.4.
> > 
> >  And the sources are at...?
> 
> See strace.sourceforge.net.

 I mean patches for MIPS, of course.  Strace 4.2 does not work for MIPS
out of the box.  The proper source still appears to be
http://www.liacs.nl/~wichert/strace/, BTW. 

-- 
+  Maciej W. Rozycki, Technical University of Gdansk, Poland   +
+--------------------------------------------------------------+
+        e-mail: macro@ds2.pg.gda.pl, PGP key available        +

From ralf@oss.sgi.com  Tue Jan 16 16:46:20 2001
Received: (uucp@localhost) by guadalquivir.fnet.fr (8.8.8/97.02.12/Guadalquivir); id QAA19999; Tue, 16 Jan 2001 16:46:20 +0100 (MET)
Received-Date: Tue, 16 Jan 2001 16:46:20 +0100 (MET)
Received: from brutus.conectiva.com.br(200.250.58.146), claiming to be "lappi.waldorf-gmbh.de"
 via SMTP by guadalquivir.fnet.fr, id smtpd019996; Tue Jan 16 16:46:07 2001
Received: (ralf@lappi.waldorf-gmbh.de) by bacchus.dhis.org
	id <S869419AbRAPPoy>; Tue, 16 Jan 2001 13:44:54 -0200
Date: Tue, 16 Jan 2001 13:44:54 -0200
From: Ralf Baechle <ralf@oss.sgi.com>
To: "Maciej W. Rozycki" <macro@ds2.pg.gda.pl>
Cc: Christoph Martin <martin@uni-mainz.de>, Joe deBlaquiere <jadb@redhat.com>,
        "'linux-mips@oss.sgi.com'" <linux-mips@oss.sgi.com>,
        linux-mips <linux-mips@fnet.fr>
Subject: Re: strace package
Message-ID: <20010116134453.B12858@bacchus.dhis.org>
References: <20010116061252.B9752@bacchus.dhis.org> <Pine.GSO.3.96.1010116123223.5546B-100000@delta.ds2.pg.gda.pl>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
User-Agent: Mutt/1.2.5i
In-Reply-To: <Pine.GSO.3.96.1010116123223.5546B-100000@delta.ds2.pg.gda.pl>; from macro@ds2.pg.gda.pl on Tue, Jan 16, 2001 at 12:40:11PM +0100
X-Accept-Language: de,en,fr
Content-Length: 818
Lines: 21

On Tue, Jan 16, 2001 at 12:40:11PM +0100, Maciej W. Rozycki wrote:

> > > > There is a debian package of strace for mips in
> > > > ftp://ftp.rfc822.org/pub/local/debian-mips/packages/. It is working
> > > > with linux 2.4.
> > > 
> > >  And the sources are at...?
> > 
> > See strace.sourceforge.net.
> 
>  I mean patches for MIPS, of course.  Strace 4.2 does not work for MIPS
> out of the box.  The proper source still appears to be
> http://www.liacs.nl/~wichert/strace/, BTW. 

Wiggy somewhen gave me write access to the strace source some time ago, so
I assume that the stuff on sourceforge is now the official CVS.  For MIPS
I was using some CVS snapshot which was working for me out of the box
after I checked in some fixes.  But that's again already some time ago,
things may have changed since then.

  Ralf

From macro@ds2.pg.gda.pl  Tue Jan 16 17:44:00 2001
Received: (uucp@localhost) by guadalquivir.fnet.fr (8.8.8/97.02.12/Guadalquivir); id RAA21649; Tue, 16 Jan 2001 17:44:00 +0100 (MET)
Received-Date: Tue, 16 Jan 2001 17:44:00 +0100 (MET)
Received: from delta.ds2.pg.gda.pl(153.19.144.1)
 via SMTP by guadalquivir.fnet.fr, id smtpd021628; Tue Jan 16 17:43:49 2001
Received: from localhost by delta.ds2.pg.gda.pl (8.9.3/8.9.3) with SMTP id RAA17722;
	Tue, 16 Jan 2001 17:18:47 +0100 (MET)
Date: Tue, 16 Jan 2001 17:18:46 +0100 (MET)
From: "Maciej W. Rozycki" <macro@ds2.pg.gda.pl>
To: Ralf Baechle <ralf@oss.sgi.com>
cc: Christoph Martin <martin@uni-mainz.de>, Joe deBlaquiere <jadb@redhat.com>,
        "'linux-mips@oss.sgi.com'" <linux-mips@oss.sgi.com>,
        linux-mips <linux-mips@fnet.fr>
Subject: Re: strace package
In-Reply-To: <20010116134453.B12858@bacchus.dhis.org>
Message-ID: <Pine.GSO.3.96.1010116171558.5546M-100000@delta.ds2.pg.gda.pl>
Organization: Technical University of Gdansk
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Content-Length: 970
Lines: 24

On Tue, 16 Jan 2001, Ralf Baechle wrote:

> Wiggy somewhen gave me write access to the strace source some time ago, so
> I assume that the stuff on sourceforge is now the official CVS.  For MIPS
> I was using some CVS snapshot which was working for me out of the box
> after I checked in some fixes.  But that's again already some time ago,
> things may have changed since then.

 Well, here is most of the information available from the site...

                 Welcome to http://strace.sourceforge.net/

      We're Sorry but this Project hasn't yet uploaded their personal
                                webpage yet.
          Please check back soon for updates or visit SourceForge

 Where is the CVS you refer to?  A working strace would help me a lot.

  Maciej

-- 
+  Maciej W. Rozycki, Technical University of Gdansk, Poland   +
+--------------------------------------------------------------+
+        e-mail: macro@ds2.pg.gda.pl, PGP key available        +

From macro@ds2.pg.gda.pl  Mon Jan 22 20:43:13 2001
Received: (uucp@localhost) by guadalquivir.fnet.fr (8.8.8/97.02.12/Guadalquivir); id UAA01088; Mon, 22 Jan 2001 20:43:13 +0100 (MET)
Received-Date: Mon, 22 Jan 2001 20:43:13 +0100 (MET)
Received: from delta.ds2.pg.gda.pl(153.19.144.1)
 via SMTP by guadalquivir.fnet.fr, id smtpd001086; Mon Jan 22 20:43:06 2001
Received: from localhost by delta.ds2.pg.gda.pl (8.9.3/8.9.3) with SMTP id UAA23588;
	Mon, 22 Jan 2001 20:39:25 +0100 (MET)
Date: Mon, 22 Jan 2001 20:39:24 +0100 (MET)
From: "Maciej W. Rozycki" <macro@ds2.pg.gda.pl>
To: =?iso-8859-1?Q?Augusto_C=E9sar_Radtke?= <radtke@conectiva.com>
cc: Ralf Baechle <ralf@oss.sgi.com>, Christoph Martin <martin@uni-mainz.de>,
        Joe deBlaquiere <jadb@redhat.com>,
        "'linux-mips@oss.sgi.com'" <linux-mips@oss.sgi.com>,
        linux-mips <linux-mips@fnet.fr>
Subject: Re: strace package
In-Reply-To: <20010122171932.A2352@conectiva.com>
Message-ID: <Pine.GSO.3.96.1010122203550.15364G-100000@delta.ds2.pg.gda.pl>
Organization: Technical University of Gdansk
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=ISO-8859-2
Content-Transfer-Encoding: QUOTED-PRINTABLE
Content-Length: 467
Lines: 13

On Mon, 22 Jan 2001, [iso-8859-1] Augusto C=E9sar Radtke wrote:

> >  Where is the CVS you refer to?  A working strace would help me a lot.
>=20
> http://sourceforge.net/projects/strace
> http://sourceforge.net/cvs/?group_id=3D2861

 Thanks a lot -- these do work!

--=20
+  Maciej W. Rozycki, Technical University of Gdansk, Poland   +
+--------------------------------------------------------------+
+        e-mail: macro@ds2.pg.gda.pl, PGP key available        +

From macro@ds2.pg.gda.pl  Sat Jan 27 09:54:07 2001
Received: (uucp@localhost) by guadalquivir.fnet.fr (8.8.8/97.02.12/Guadalquivir); id JAA17607; Sat, 27 Jan 2001 09:54:07 +0100 (MET)
Received-Date: Sat, 27 Jan 2001 09:54:07 +0100 (MET)
Received: from delta.ds2.pg.gda.pl(153.19.144.1)
 via SMTP by guadalquivir.fnet.fr, id smtpd017605; Sat Jan 27 09:53:58 2001
Received: from localhost by delta.ds2.pg.gda.pl (8.9.3/8.9.3) with SMTP id JAA00612;
	Sat, 27 Jan 2001 09:54:11 +0100 (MET)
Date: Sat, 27 Jan 2001 09:54:10 +0100 (MET)
From: "Maciej W. Rozycki" <macro@ds2.pg.gda.pl>
To: Harald Koerfgen <Harald.Koerfgen@home.ivm.de>
cc: linux-mips@fnet.fr, linux-mips@oss.sgi.com
Subject: Z8530, LK201 fixes
Message-ID: <Pine.GSO.3.96.1010127090657.29150F-100000@delta.ds2.pg.gda.pl>
Organization: Technical University of Gdansk
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Content-Length: 23454
Lines: 729

Hi,

 After recent Z8530 and LK201 changes for the DECstation, modem lines do
not work anymore.  Also my keyboard timeouts on init, which results in a
hang. 

 I've been working on these issues during a few past days and following is
the result.  The list of changes:

- The LK201 driver may now be compiled with CONFIG_MAGIC_SYSRQ enabled (it
would not link before).  It doesn't support SysRq, though, as I haven't
decided how to do it, yet.  For LK443/444 we might do this
straightforward, but I'm not sure about others (<Compose> + <F13> is one
of options).

- The LK201 driver does not hang on a timeout upon init -- if one happens,
the driver breaks initialization.  I'm thinking on a hot plug support, but
that's not high-priority.

- There is some code to encourage people with unknown keyboard IDs to
report them here -- it would be nice to be able to identify LK421, LK443
and LK444 to map certain keys automatically for modifier keys and <Scroll
Lock> handling, for example. 

- Placeholders for scancodes existing on LK421, LK443 and LK444 has been
added.  I've yet to decide which codes to use -- I need to review
carefully the whole code path that is executed for scancode handling.

- The keyboard init timeout has been fixed -- Z8530 hooks need to be
installed earlier.

- Asynchronous speeds of 57600 and 115200 has been added.  They work very
nicely. 8-}

- DTR changes has been removed from rs_throttle/rs_unthrottle -- we don't
want to hang up on an overrun, do we? 

- Handling of modem lines as wired for the DECstation has been fixed. 
Some clown wired RTS and DTR incorrectly, limiting their functionality
somewhat -- the Z8530 is able to drive RTS synchronously, for example, but
this is broken for the DECstation.  I understand DEC needed a few
additional GPIO lines to wire synchronous RS232, but they could have wired
port B correctly and use spare lines of port A for GPIO instead, couldn't
they? 

 Harald, I'm afraid the last change breaks CONFIG_BAGET_MIPS.  I have no
idea how to share two configurations of drivers/tc/zs.c sanely with this
driver.  Until we have a unified Z8530 driver the only solution is to add
a bunch of ugly #ifdefs, I believe.

 I hope the patch is fine to apply.

  Maciej

-- 
+  Maciej W. Rozycki, Technical University of Gdansk, Poland   +
+--------------------------------------------------------------+
+        e-mail: macro@ds2.pg.gda.pl, PGP key available        +

patch-mips-2.4.0-test12-20010110-lk201-41
diff -up --recursive --new-file linux-mips-2.4.0-test12-20010110.macro/drivers/tc/lk201-remap.c linux-mips-2.4.0-test12-20010110/drivers/tc/lk201-remap.c
--- linux-mips-2.4.0-test12-20010110.macro/drivers/tc/lk201-remap.c	Sat Dec 30 15:55:57 2000
+++ linux-mips-2.4.0-test12-20010110/drivers/tc/lk201-remap.c	Fri Jan 26 20:50:39 2001
@@ -3,7 +3,7 @@
  * 
  * 17.05.99 Michael Engel (engel@unix-ag.org)
  *
- * DEC keyboard generate keycodes in the range 0x56 - 0xfb
+ * DEC US keyboards generate keycodes in the range 0x55 - 0xfb
  *
  * This conflicts with Linux scancode conventions which define 
  * 0x00-0x7f as "normal" and 0x80-0xff as "shifted" scancodes, so we
@@ -15,6 +15,28 @@
  * lk501*map[] arrays which define scancode -> Linux code mapping
  *
  * Oh man is this horrible ;-)
+ *
+ * Scancodes with dual labels exist for keyboards as follows:
+ *
+ * code:  left label          / right label
+ *
+ * 0x73:  LKx01, LK421        / LK443, LK444
+ * 0x74:  LKx01, LK421        / LK443, LK444
+ * 0x7c:  LKx01, LK421        / LK443, LK444
+ * 0x8a:  LKx01, LK421        / LK443, LK444
+ * 0x8b:  LKx01, LK421        / LK443, LK444
+ * 0x8c:  LKx01, LK421        / LK443, LK444
+ * 0x8d:  LKx01, LK421        / LK443, LK444
+ * 0x8e:  LKx01, LK421        / LK443, LK444
+ * 0x8f:  LKx01, LK421        / LK443, LK444
+ * 0x9c:  LKx01, LK421        / LK443, LK444
+ * 0xa1:  LKx01, LK421        / LK443, LK444
+ * 0xa2:  LKx01, LK421        / LK443, LK444
+ * 0xa3:  LKx01, LK421        / LK443, LK444
+ * 0xa4:  LKx01, LK421        / LK443, LK444
+ * 0xad:         LK421        / LK443, LK444
+ * 0xc9:  LKx01, LK421, LK443 /        LK444
+ * 0xf7:  LKx01,        LK443 /        LK444
  */
 
 unsigned char scancodeRemap[256] = {
@@ -60,35 +82,35 @@ unsigned char scancodeRemap[256] = {
 /* 4c */ 0,		0,		0,		0,
 /* ----- 								*/
 /* 50 */ 0,		0,		0,		0,
-/* ----- 	 			F1,		F2, 		*/
+/* ----- 	 	ESC		F1		F2 		*/
 /* 54 */ 0,		0,		0x01,  		0x02,
-/* ----- F3,		F4,		F5,				*/
+/* ----- F3		F4		F5				*/
 /* 58 */ 0x03,  	0x04,		0x05,		0,
 /* ----- 								*/
 /* 5c */ 0,		0,		0,		0,
 /* ----- 								*/
 /* 60 */ 0,		0,		0,		0,
-/* ----- F6,		F7,		F8,		F9,		*/
+/* ----- F6		F7		F8		F9		*/
 /* 64 */ 0x06,		0x07,		0x08,		0x09, 
-/* ----- F10,								*/
+/* ----- F10								*/
 /* 68 */ 0x0a,		0,		0,		0,
 /* ----- 								*/
 /* 6c */ 0,		0,		0,		0,
-/* ----- 		F11,   		F12,		F13,		*/
+/* ----- 		F11   		F12		F13/PRNT SCRN	*/
 /* 70 */ 0,		0x0b,  		0x0c,		0x0d,
-/* ----- F14								*/
+/* ----- F14/SCRL LCK							*/
 /* 74 */ 0x0e,		0,		0,		0,
 /* ----- 								*/
 /* 78 */ 0,		0,		0,		0,
-/* ----- HELP		DO						*/
+/* ----- HELP/PAUSE	DO						*/
 /* 7c */ 0x0f,		0x10,		0,		0,
 /* ----- F17		F18		F19		F20		*/
 /* 80 */ 0x11,		0x12,		0x13,		0x14,
 /* ----- 								*/
 /* 84 */ 0,		0,		0,		0,
-/* ----- 								*/
+/* ----- 				FIND/INSERT	INSERT/HOME	*/
 /* 88 */ 0,		0,		0x23,		0x24,
-/* ----- REMOVE		SELECT		PREVIOUS	NEXT		*/
+/* ----- REMOVE/PG UP	SELECT/DELETE	PREVIOUS/END	NEXT/PG DN	*/
 /* 8c */ 0x25,		0x38,		0x39,		0x3a,
 /* ----- 				KP 0				*/
 /* 90 */ 0,		0,		0x6b,		0,
@@ -96,17 +118,17 @@ unsigned char scancodeRemap[256] = {
 /* 94 */ 0x6c,		0x65,		0x62,		0x63,
 /* ----- KP 3		KP 4		KP 5		KP 6		*/
 /* 98 */ 0x64,		0x4e,		0x4f,		0x50,
-/* ----- KP ,		KP 7		KP 8		KP 9		*/
+/* ----- KP ,/KP +	KP 7		KP 8		KP 9		*/
 /* 9c */ 0x51,		0x3b,		0x3c,		0x3d,
-/* ----- KP -		KP F1		KP F2		KP F3		*/
+/* ----- KP -		KP F1/NUM LCK	KP F2/KP /	KP F3/KP *	*/
 /* a0 */ 0x3e,		0x26,		0x27,		0x28,
-/* ----- KP F4						LEFT		*/
+/* ----- KP F4/KP -					LEFT		*/
 /* a4 */ 0x29,		0,		0,		0x5f,
 /* ----- RIGHT		DOWN		UP		SHIFT Rt	*/
 /* a8 */ 0x61,		0x60, 		0x4d,		0x5e,
-/* ----- 				SHIFT		CONTROL		*/
+/* ----- ALT		COMP Rt/CTRL Rt	SHIFT		CONTROL		*/
 /* ac */ 0,		0,		0x52,		0x3f,
-/* ----- CAPS		ALT						*/
+/* ----- CAPS		COMPOSE		ALT Rt				*/
 /* b0 */ 0x40,		0x67,		0,		0,
 /* ----- 								*/
 /* b4 */ 0,		0,		0,		0,
@@ -118,7 +140,7 @@ unsigned char scancodeRemap[256] = {
 /* c0 */ 0x16,		0x2b,		0x41,		0x54,
 /* ----- 		2		w		s		*/
 /* c4 */ 0,		0x17,		0x2c,		0x42,
-/* ----- x		<				3		*/
+/* ----- x		</\\				3		*/
 /* c8 */ 0x55,		0x53,		0,		0x18,
 /* ----- e		d		c				*/
 /* cc */ 0x2d,		0x43,		0x56,		0,
@@ -134,13 +156,13 @@ unsigned char scancodeRemap[256] = {
 /* e0 */ 0x1c,		0x31,		0x47,		0x5a,
 /* ----- 		8		i		k		*/
 /* e4 */ 0,		0x1d,		0x32,		0x48,
-/* ----- ,				9		o	*/
+/* ----- ,				9		o		*/
 /* e8 */ 0x5b,		0,		0x1e,		0x33,
 /* ----- l		.				0		*/
 /* ec */ 0x49,		0x5c,		0,		0x1f,
 /* ----- p				;		/		*/
 /* f0 */ 0x34,		0,		0x4a,		0x5d,
-/* ----- 		=		]		\\		*/
+/* ----- 		=		]		\\/\'		*/
 /* f4 */ 0,		0x21,		0x36,		0x4c,
 /* ----- 		-		[		\'		*/
 /* f8 */ 0,		0x20,		0x35,		0x4b,
diff -up --recursive --new-file linux-mips-2.4.0-test12-20010110.macro/drivers/tc/lk201.c linux-mips-2.4.0-test12-20010110/drivers/tc/lk201.c
--- linux-mips-2.4.0-test12-20010110.macro/drivers/tc/lk201.c	Sat Dec 30 15:55:57 2000
+++ linux-mips-2.4.0-test12-20010110/drivers/tc/lk201.c	Fri Jan 26 21:31:36 2001
@@ -18,9 +18,20 @@
 #include "zs.h"
 #include "lk201.h"
 
+/* Simple translation table for the SysRq keys */
+
+#ifdef CONFIG_MAGIC_SYSRQ
+/*
+ * Actually no translation at all, at least until we figure out
+ * how to define SysRq for LK201 and friends. --macro
+ */
+unsigned char lk201_sysrq_xlate[128];
+unsigned char *kbd_sysrq_xlate = lk201_sysrq_xlate;
+#endif
+
 #define KEYB_LINE	3
 
-static void __init lk201_init(struct dec_serial *);
+static int __init lk201_init(struct dec_serial *);
 static void __init lk201_info(struct dec_serial *);
 static void lk201_kbd_rx_char(unsigned char, unsigned char);
 
@@ -60,13 +71,16 @@ static unsigned char lk201_reset_string[
 	LK_CMD_LEDS_OFF, LK_PARAM_LED_MASK(0xf)
 };
 
-static void __init lk201_reset(struct dec_serial *info)
+static int __init lk201_reset(struct dec_serial *info)
 {
 	int i;
 
 	for (i = 0; i < sizeof(lk201_reset_string); i++)
-		if(info->hook->poll_tx_char(info, lk201_reset_string[i]))
+		if (info->hook->poll_tx_char(info, lk201_reset_string[i])) {
 			printk(__FUNCTION__" transmit timeout\n");
+			return -EIO;
+		}
+	return 0;
 }
 
 void kbd_leds(unsigned char leds)
@@ -149,21 +163,24 @@ static void __init lk201_info(struct dec
 {
 }
 
-static void __init lk201_init(struct dec_serial *info)
+static int __init lk201_init(struct dec_serial *info)
 {
-	unsigned int ch, id;
+	unsigned int ch, id = 0;
+	int result;
 
 	printk("DECstation LK keyboard driver v0.04... ");
 
-	lk201_reset(info);
-	udelay(10000);
+	result = lk201_reset(info);
+	if (result)
+		return result;
+	mdelay(10);
 
 	/*
-	 * Detect wether there is an LK201 or an LK401
+	 * Detect whether there is an LK201 or an LK401
 	 * The LK401 has ALT keys...
 	 */
 	info->hook->poll_tx_char(info, LK_CMD_REQ_ID);
-	while((ch = info->hook->poll_rx_char(info)) > 0)
+	while ((ch = info->hook->poll_rx_char(info)) > 0)
 		id = ch;
 
 	switch (id) {
@@ -174,13 +191,16 @@ static void __init lk201_init(struct dec
 		printk("LK401 detected\n");
 		break;
 	default:
-		printk("unkown keyboard, ID %d\n", id);
+		printk("unknown keyboard, ID %d,\n", id);
+		printk("... please report to <linux-mips@oss.sgi.com>\n");
 	}
 
 	/*
 	 * now we're ready
 	 */
 	info->hook->rx_char = lk201_kbd_rx_char;
+
+	return 0;
 }
 
 void __init kbd_init_hw(void)
@@ -206,7 +226,7 @@ void __init kbd_init_hw(void)
 	} else {
 		/*
 		 * TODO: modify dz.c to allow similar hooks
-		 * for LK201 handling on DS2100, Ds3100, and DS5000/200
+		 * for LK201 handling on DS2100, DS3100, and DS5000/200
 		 */
 		printk("LK201 Support for DS3100 not yet ready ...\n");
 	}
diff -up --recursive --new-file linux-mips-2.4.0-test12-20010110.macro/drivers/tc/zs.c linux-mips-2.4.0-test12-20010110/drivers/tc/zs.c
--- linux-mips-2.4.0-test12-20010110.macro/drivers/tc/zs.c	Sun Dec 31 05:26:37 2000
+++ linux-mips-2.4.0-test12-20010110/drivers/tc/zs.c	Fri Jan 26 21:09:56 2001
@@ -1,17 +1,42 @@
 /*
- * decserial.c: Serial port driver for IOASIC DECsatations.
+ * decserial.c: Serial port driver for IOASIC DECstations.
  *
  * Derived from drivers/sbus/char/sunserial.c by Paul Mackerras.
  * Derived from drivers/macintosh/macserial.c by Harald Koerfgen.
  *
  * DECstation changes
  * Copyright (C) 1998-2000 Harald Koerfgen (Harald.Koerfgen@home.ivm.de)
- * Copyright (C) 2000 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
+ * Copyright (C) 2000,2001 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
  *
  * For the rest of the code the original Copyright applies:
  * Copyright (C) 1996 Paul Mackerras (Paul.Mackerras@cs.anu.edu.au)
  * Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu)
  *
+ *
+ * Note: for IOASIC systems the wiring is as follows:
+ *
+ * mouse/keyboard:
+ * DIN-7 MJ-4  signal        SCC
+ * 2     1     TxD       <-  A.TxD
+ * 3     4     RxD       ->  A.RxD
+ *
+ * EIA-232/EIA-423:
+ * DB-25 MMJ-6 signal        SCC
+ * 2     2     TxD       <-  B.TxD
+ * 3     5     RxD       ->  B.RxD
+ * 4           RTS       <- ~A.RTS
+ * 5           CTS       -> ~B.CTS
+ * 6     6     DSR       -> ~A.SYNC
+ * 8           CD        -> ~B.DCD
+ * 12          DSRS(DCE) -> ~A.CTS  (*)
+ * 15          TxC       ->  B.TxC
+ * 17          RxC       ->  B.RxC
+ * 20    1     DTR       <- ~A.DTR
+ * 22          RI        -> ~A.DCD
+ * 23          DSRS(DTE) <- ~B.RTS
+ *
+ * (*) EIA-232 defines the signal at this pin to be SCD, while DSRS(DCE)
+ *     is shared with DSRS(DTE) at pin 23.
  */
 
 #include <linux/config.h>
@@ -63,7 +88,6 @@ unsigned long system_base;
 
 #include "zs.h"
 
-
 /*
  * It would be nice to dynamically allocate everything that
  * depends on NUM_SERIAL, so we could support any number of
@@ -237,7 +261,7 @@ static inline int serial_paranoia_check(
  */
 static int baud_table[] = {
 	0, 50, 75, 110, 134, 150, 200, 300, 600, 1200, 1800, 2400, 4800,
-	9600, 19200, 38400, 57600, 0, 0 };
+	9600, 19200, 38400, 57600, 115200, 0 };
 
 /* 
  * Reading and writing Z8530 registers.
@@ -309,18 +333,21 @@ static inline void load_zsregs(struct de
 }
 
 /* Sets or clears DTR/RTS on the requested line */
-static inline void zs_rtsdtr(struct dec_serial *info, int set)
+static inline void zs_rtsdtr(struct dec_serial *info, int which, int set)
 {
         unsigned long flags;
 
-        save_flags(flags); cli();
-        if(set) {
-                info->zs_channel->curregs[5] |= (RTS | DTR);
-        } else {
-                info->zs_channel->curregs[5] &= ~(RTS | DTR);
+
+	save_flags(flags); cli();
+	if (info->zs_channel != info->zs_chan_a) {
+		if (set) {
+			info->zs_chan_a->curregs[5] |= (which & (RTS | DTR));
+		} else {
+			info->zs_chan_a->curregs[5] &= ~(which & (RTS | DTR));
+		}
+		write_zsreg(info->zs_chan_a, 5, info->zs_chan_a->curregs[5]);
 	}
-	write_zsreg(info->zs_channel, 5, info->zs_channel->curregs[5]);
-        restore_flags(flags);
+	restore_flags(flags);
 }
 
 /* Utility routines for the Zilog */
@@ -493,34 +520,31 @@ static _INLINE_ void status_handle(struc
 		tty_break = 1;
 	}
 
-	/* FIXEM: Check for DCD transitions */
-	if (((stat ^ info->read_reg_zero) & DCD) != 0
-	    && info->tty && !C_CLOCAL(info->tty)) {
-		if (stat & DCD) {
-			wake_up_interruptible(&info->open_wait);
-		} else if (!(info->flags & ZILOG_CALLOUT_ACTIVE)) {
-			tty_hangup(info->tty);
+	if (info->zs_channel != info->zs_chan_a) {
+
+		/* FIXEM: Check for DCD transitions */
+		if (((stat ^ info->read_reg_zero) & DCD) != 0
+		    && info->tty && !C_CLOCAL(info->tty)) {
+			if (stat & DCD) {
+				wake_up_interruptible(&info->open_wait);
+			} else if (!(info->flags & ZILOG_CALLOUT_ACTIVE)) {
+				tty_hangup(info->tty);
+			}
 		}
-	}
 
-	/* Check for CTS transitions */
-	if (info->tty && C_CRTSCTS(info->tty)) {
-		/*
-		 * For some reason, on the Power Macintosh,
-		 * it seems that the CTS bit is 1 when CTS is
-		 * *negated* and 0 when it is asserted.
-		 * The DCD bit doesn't seem to be inverted
-		 * like this.
-		 */
-		if ((stat & CTS) != 0) {
-			if (info->tx_stopped) {
-				info->tx_stopped = 0;
-				if (!info->tx_active)
-					transmit_chars(info);
+		/* Check for CTS transitions */
+		if (info->tty && C_CRTSCTS(info->tty)) {
+			if ((stat & CTS) != 0) {
+				if (info->tx_stopped) {
+					info->tx_stopped = 0;
+					if (!info->tx_active)
+						transmit_chars(info);
+				}
+			} else {
+				info->tx_stopped = 1;
 			}
-		} else {
-			info->tx_stopped = 1;
 		}
+
 	}
 
 	/* Clear status condition... */
@@ -708,7 +732,7 @@ int zs_startup(struct dec_serial * info)
 	/*
 	 * Turn on RTS and DTR.
 	 */
-	zs_rtsdtr(info, 1);
+	zs_rtsdtr(info, RTS | DTR, 1);
 
 	/*
 	 * Finally, enable sequencing and interrupts
@@ -779,7 +803,7 @@ static void shutdown(struct dec_serial *
 	info->zs_channel->curregs[5] &= ~TxENAB;
 	write_zsreg(info->zs_channel, 5, info->zs_channel->curregs[5]);
 	if (!info->tty || C_HUPCL(info->tty)) {
-		zs_rtsdtr(info, 0);
+		zs_rtsdtr(info, RTS | DTR, 0);
 	}
 
 	if (info->tty)
@@ -801,27 +825,39 @@ static void change_speed(struct dec_seri
 	unsigned long flags;
 
 	if (!info->hook) {
-	if (!info->tty || !info->tty->termios)
-		return;
-	cflag = info->tty->termios->c_cflag;
+		if (!info->tty || !info->tty->termios)
+			return;
+		cflag = info->tty->termios->c_cflag;
 		if (!info->port)
-		return;
+			return;
 	} else {
 		cflag = info->hook->cflags;
 	}
+
 	i = cflag & CBAUD;
+	if (i & CBAUDEX) {
+		i &= ~CBAUDEX;
+		if (i < 1 || i > 2) {
+			if (!info->hook)
+				info->tty->termios->c_cflag &= ~CBAUDEX;
+			else
+				info->hook->cflags &= ~CBAUDEX;
+		} else
+			i += 15;
+	}
+
 	save_flags(flags); cli();
 	info->zs_baud = baud_table[i];
 	info->clk_divisor = 16;
-        if (info->zs_baud) {
+	if (info->zs_baud) {
 		info->zs_channel->curregs[4] = X16CLK;
 		brg = BPS_TO_BRG(info->zs_baud, zs_parms->clock/info->clk_divisor);
 		info->zs_channel->curregs[12] = (brg & 255);
 		info->zs_channel->curregs[13] = ((brg >> 8) & 255);
-		zs_rtsdtr(info, 1); 
+		zs_rtsdtr(info, DTR, 1); 
 	} else {
-                zs_rtsdtr(info, 0);
-                return;
+		zs_rtsdtr(info, RTS | DTR, 0);
+		return;
 	}
 
 	/* byte size and parity */
@@ -875,7 +911,7 @@ static void change_speed(struct dec_seri
 		info->zs_channel->curregs[15] &= ~DCDIE;
 	if (cflag & CRTSCTS) {
 		info->zs_channel->curregs[15] |= CTSIE;
-		if ((read_zsreg(info->zs_channel, 0) & CTS) != 0)
+		if ((read_zsreg(info->zs_channel, 0) & CTS) == 0)
 			info->tx_stopped = 1;
 	} else {
 		info->zs_channel->curregs[15] &= ~CTSIE;
@@ -1020,7 +1056,7 @@ static void rs_throttle(struct tty_struc
 	}
 
 	if (C_CRTSCTS(tty)) {
-		zs_rtsdtr(info, 0);
+		zs_rtsdtr(info, RTS, 0);
 	}
 }
 
@@ -1052,7 +1088,7 @@ static void rs_unthrottle(struct tty_str
 	}
 
 	if (C_CRTSCTS(tty)) {
-		zs_rtsdtr(info, 1);
+		zs_rtsdtr(info, RTS, 1);
 	}
 }
 
@@ -1150,18 +1186,25 @@ static int get_lsr_info(struct dec_seria
 
 static int get_modem_info(struct dec_serial *info, unsigned int *value)
 {
-	unsigned char control, status;
+	unsigned char control, status_a, status_b;
 	unsigned int result;
 
-	cli();
-	control = info->zs_channel->curregs[5];
-	status = read_zsreg(info->zs_channel, 0);
-	sti();
-	result =  ((control & RTS) ? TIOCM_RTS: 0)
-		| ((control & DTR) ? TIOCM_DTR: 0)
-		| ((status  & DCD) ? TIOCM_CAR: 0)
-		| ((status  & CTS) ? 0: TIOCM_CTS);
-	put_user(result,value);
+	if (info->zs_channel == info->zs_chan_a)
+		result = 0;
+	else {
+		cli();
+		control = info->zs_chan_a->curregs[5];
+		status_a = read_zsreg(info->zs_chan_a, 0);
+		status_b = read_zsreg(info->zs_channel, 0);
+		sti();
+		result =  ((control  & RTS) ? TIOCM_RTS: 0)
+			| ((control  & DTR) ? TIOCM_DTR: 0)
+			| ((status_b & DCD) ? TIOCM_CAR: 0)
+			| ((status_a & DCD) ? TIOCM_RNG: 0)
+			| ((status_a & SYNC_HUNT) ? TIOCM_DSR: 0)
+			| ((status_b & CTS) ? TIOCM_CTS: 0);
+	}
+	put_user(result, value);
 	return 0;
 }
 
@@ -1174,25 +1217,29 @@ static int set_modem_info(struct dec_ser
 	error = verify_area(VERIFY_READ, value, sizeof(int));
 	if (error)
 		return error;
+
+	if (info->zs_channel == info->zs_chan_a)
+		return 0;
+
 	get_user(arg, value);
 	bits = (arg & TIOCM_RTS? RTS: 0) + (arg & TIOCM_DTR? DTR: 0);
 	cli();
 	switch (cmd) {
 	case TIOCMBIS:
-		info->zs_channel->curregs[5] |= bits;
+		info->zs_chan_a->curregs[5] |= bits;
 		break;
 	case TIOCMBIC:
-		info->zs_channel->curregs[5] &= ~bits;
+		info->zs_chan_a->curregs[5] &= ~bits;
 		break;
 	case TIOCMSET:
-		info->zs_channel->curregs[5] = 
-			(info->zs_channel->curregs[5] & ~(DTR | RTS)) | bits;
+		info->zs_chan_a->curregs[5] = 
+			(info->zs_chan_a->curregs[5] & ~(DTR | RTS)) | bits;
 		break;
 	default:
 		sti();
 		return -EINVAL;
 	}
-	write_zsreg(info->zs_channel, 5, info->zs_channel->curregs[5]);
+	write_zsreg(info->zs_chan_a, 5, info->zs_chan_a->curregs[5]);
 	sti();
 	return 0;
 }
@@ -1538,7 +1585,7 @@ static int block_til_ready(struct tty_st
 		cli();
 		if (!(info->flags & ZILOG_CALLOUT_ACTIVE) &&
 		    (tty->termios->c_cflag & CBAUD))
-			zs_rtsdtr(info, 1);
+			zs_rtsdtr(info, RTS | DTR, 1);
 		sti();
 		set_current_state(TASK_INTERRUPTIBLE);
 		if (tty_hung_up_p(filp) ||
@@ -1794,9 +1841,9 @@ static void __init probe_sccs(void)
 /*	save_and_cli(flags);
 	for (n = 0; n < zs_channels_found; n++) {
 		if (((int)zs_channels[n].control & 0xf) == 1) {
-			write_zsreg(zs_soft[channel].zs_chan_a, R9, FHWRES);
-			udelay(10000);
-			write_zsreg(zs_soft[channel].zs_chan_a, R9, 0);
+			write_zsreg(zs_soft[n].zs_chan_a, R9, FHWRES);
+			mdelay(10);
+			write_zsreg(zs_soft[n].zs_chan_a, R9, 0);
 		}
 		load_zsregs(zs_soft[n].zs_channel, zs_soft[n].zs_channel->curregs);
 	} 
@@ -1887,7 +1934,8 @@ int __init zs_init(void)
 	for (channel = 0; channel < zs_channels_found; ++channel) {
 		if (zs_soft[channel].hook &&
 		    zs_soft[channel].hook->init_channel)
-			(*zs_soft[channel].hook->init_channel)(&zs_soft[channel]);
+			(*zs_soft[channel].hook->init_channel)
+				(&zs_soft[channel]);
 
 		zs_soft[channel].clk_divisor = 16;
 		zs_soft[channel].zs_baud = get_zsbaud(&zs_soft[channel]);
@@ -1917,7 +1965,7 @@ int __init zs_init(void)
 		info->blocked_open = 0;
 		info->tqueue.routine = do_softint;
 		info->tqueue.data = info;
-		info->callout_termios =callout_driver.init_termios;
+		info->callout_termios = callout_driver.init_termios;
 		info->normal_termios = serial_driver.init_termios;
 		init_waitqueue_head(&info->open_wait);
 		init_waitqueue_head(&info->close_wait);
@@ -2016,23 +2064,24 @@ unsigned int register_zs_hook(unsigned i
 {
 	struct dec_serial *info = &zs_soft[channel];
 
-        if (info->hook) {
-                printk(__FUNCTION__": line %d has already a hook registered\n", channel);
+	if (info->hook) {
+		printk(__FUNCTION__": line %d has already a hook registered\n", channel);
+
+		return 0;
+	} else {
+		info->hook = hook;
 
-                return 0;
-        } else {
 		if (zs_chain == 0)
 			probe_sccs();
 
 		if (!(info->flags & ZILOG_INITIALIZED))
 			zs_startup(info);
 
-                hook->poll_rx_char = zs_poll_rx_char;
-                hook->poll_tx_char = zs_poll_tx_char;
-                info->hook = hook;
+		hook->poll_rx_char = zs_poll_rx_char;
+		hook->poll_tx_char = zs_poll_tx_char;
 
-                return 1;
-        }
+		return 1;
+	}
 }
 
 unsigned int unregister_zs_hook(unsigned int channel)
@@ -2184,7 +2233,7 @@ static int __init serial_console_setup(s
 	/*
 	 * Turn on RTS and DTR.
 	 */
-	zs_rtsdtr(info, 1);
+	zs_rtsdtr(info, RTS | DTR, 1);
 
 	/*
 	 * Finally, enable sequencing
@@ -2285,8 +2334,9 @@ void kgdb_interruptible(int yes)
 	write_zsreg(chan, 9, nine);
 }
 
-static void kgdbhook_init_channel(struct dec_serial* info) 
+static int kgdbhook_init_channel(struct dec_serial* info) 
 {
+	return 0;
 }
 
 static void kgdbhook_init_info(struct dec_serial* info)
diff -up --recursive --new-file linux-mips-2.4.0-test12-20010110.macro/drivers/tc/zs.h linux-mips-2.4.0-test12-20010110/drivers/tc/zs.h
--- linux-mips-2.4.0-test12-20010110.macro/drivers/tc/zs.h	Sun Dec 31 05:26:37 2000
+++ linux-mips-2.4.0-test12-20010110/drivers/tc/zs.h	Thu Jan 25 22:53:26 2001
@@ -92,7 +92,7 @@ struct dec_zschannel {
 struct dec_serial;
 
 struct zs_hook {
-	void (*init_channel)(struct dec_serial* info);
+	int (*init_channel)(struct dec_serial* info);
 	void (*init_info)(struct dec_serial* info);
 	void (*rx_char)(unsigned char ch, unsigned char stat);
 	int  (*poll_rx_char)(struct dec_serial* info);
diff -up --recursive --new-file linux-mips-2.4.0-test12-20010110.macro/include/asm-mips/keyboard.h linux-mips-2.4.0-test12-20010110/include/asm-mips/keyboard.h
--- linux-mips-2.4.0-test12-20010110.macro/include/asm-mips/keyboard.h	Tue Jan 16 09:55:31 2001
+++ linux-mips-2.4.0-test12-20010110/include/asm-mips/keyboard.h	Tue Jan 16 23:52:46 2001
@@ -47,6 +47,7 @@ extern int kbd_translate(unsigned char s
 extern char kbd_unexpected_up(unsigned char keycode);
 extern void kbd_leds(unsigned char leds);
 extern void kbd_init_hw(void);
+extern unsigned char *kbd_sysrq_xlate;
 
 #endif
 

From macro@ds2.pg.gda.pl  Sat Jan 27 09:58:17 2001
Received: (uucp@localhost) by guadalquivir.fnet.fr (8.8.8/97.02.12/Guadalquivir); id JAA17696; Sat, 27 Jan 2001 09:58:17 +0100 (MET)
Received-Date: Sat, 27 Jan 2001 09:58:17 +0100 (MET)
Received: from delta.ds2.pg.gda.pl(153.19.144.1)
 via SMTP by guadalquivir.fnet.fr, id smtpd017694; Sat Jan 27 09:58:15 2001
Received: from localhost by delta.ds2.pg.gda.pl (8.9.3/8.9.3) with SMTP id JAA00684;
	Sat, 27 Jan 2001 09:58:39 +0100 (MET)
Date: Sat, 27 Jan 2001 09:58:38 +0100 (MET)
From: "Maciej W. Rozycki" <macro@ds2.pg.gda.pl>
To: Ralf Baechle <ralf@uni-koblenz.de>
cc: linux-mips@fnet.fr, linux-mips@oss.sgi.com
Subject: A few memory map updates
Message-ID: <Pine.GSO.3.96.1010127095516.29150G-100000@delta.ds2.pg.gda.pl>
Organization: Technical University of Gdansk
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Content-Length: 4067
Lines: 105

Hi,

 Below is a patch that cleans-up a few remaining memory map bits.  Please
apply.  Thanks.

  Maciej

-- 
+  Maciej W. Rozycki, Technical University of Gdansk, Poland   +
+--------------------------------------------------------------+
+        e-mail: macro@ds2.pg.gda.pl, PGP key available        +

patch-mips-2.4.0-20010126-mem_map-42
diff -up --recursive --new-file linux-mips-2.4.0-20010126.macro/arch/mips/baget/prom/init.c linux-mips-2.4.0-20010126/arch/mips/baget/prom/init.c
--- linux-mips-2.4.0-20010126.macro/arch/mips/baget/prom/init.c	Thu Dec 14 05:26:23 2000
+++ linux-mips-2.4.0-20010126/arch/mips/baget/prom/init.c	Tue Jan 16 01:00:28 2001
@@ -4,16 +4,22 @@
  * Copyright (C) 1998 Gleb Raiko & Vladimir Roganov 
  */
 #include <linux/init.h>
+#include <asm/addrspace.h>
 #include <asm/bootinfo.h>
 
 char arcs_cmdline[COMMAND_LINE_SIZE];
 
 void __init prom_init(unsigned int mem_upper)
 {
-	mips_memory_upper = mem_upper;
+	mem_upper = PHYSADDR(mem_upper);
+
 	mips_machgroup  = MACH_GROUP_UNKNOWN;
 	mips_machtype   = MACH_UNKNOWN;
 	arcs_cmdline[0] = 0;
+
+	vac_memory_upper = mem_upper;
+
+	add_memory_region(0, mem_upper, BOOT_MEM_RAM);
 }
 
 void prom_free_prom_memory (void)
diff -up --recursive --new-file linux-mips-2.4.0-20010126.macro/arch/mips/baget/setup.c linux-mips-2.4.0-20010126/arch/mips/baget/setup.c
--- linux-mips-2.4.0-20010126.macro/arch/mips/baget/setup.c	Tue Mar 28 04:26:01 2000
+++ linux-mips-2.4.0-20010126/arch/mips/baget/setup.c	Tue Jan 16 01:43:10 2001
@@ -14,7 +14,7 @@
 
 #include <asm/baget/baget.h>
 
-extern long mips_memory_upper;
+long int vac_memory_upper;
 
 #define CACHEABLE_STR(val) ((val) ? "not cached" : "cached")
 #define MIN(a,b)           (((a)<(b)) ? (a):(b)) 
@@ -172,7 +172,7 @@ static void __init vac_show(void)
 
 static void __init vac_init(void)
 {
-	unsigned short mem_limit = ((mips_memory_upper-KSEG0) >> 16);
+	unsigned short mem_limit = (vac_memory_upper >> 16);
 
 	switch(vac_inw(VAC_ID)) {
 	case 0x1AC0:
diff -up --recursive --new-file linux-mips-2.4.0-20010126.macro/arch/mips/galileo-boards/ev64120/setup.c linux-mips-2.4.0-20010126/arch/mips/galileo-boards/ev64120/setup.c
--- linux-mips-2.4.0-20010126.macro/arch/mips/galileo-boards/ev64120/setup.c	Thu Jan  4 05:26:53 2001
+++ linux-mips-2.4.0-20010126/arch/mips/galileo-boards/ev64120/setup.c	Tue Jan 16 00:37:52 2001
@@ -133,7 +133,6 @@ void ev64120_setup(void)
 
 	board_time_init = galileo_time_init;
 	mips_io_port_base = KSEG1;
-	mips_memory_upper = 32 * 1024 * 1024 | KSEG0;
 	set_cp0_status(ST0_FR, 0);
 
 #ifdef CONFIG_L2_L3_CACHE
@@ -174,7 +173,6 @@ void SetUpBootInfo(int argc, char **argv
 	mips_machtype = MACH_EV64120A;
 }
 
-unsigned long mem_size;
 void __init prom_init(int a, char **b, char **c, int *d)
 {
 	unsigned long free_start, free_end, start_pfn, bootmap_size;
diff -up --recursive --new-file linux-mips-2.4.0-20010126.macro/arch/mips/galileo-boards/ev96100/setup.c linux-mips-2.4.0-20010126/arch/mips/galileo-boards/ev96100/setup.c
--- linux-mips-2.4.0-20010126.macro/arch/mips/galileo-boards/ev96100/setup.c	Mon Nov  6 22:59:55 2000
+++ linux-mips-2.4.0-20010126/arch/mips/galileo-boards/ev96100/setup.c	Tue Jan 16 00:35:49 2001
@@ -86,9 +86,6 @@ static void __init ev96100_irq_setup(voi
 void __init ev96100_setup(void)
 {
 
-	unsigned long mem_size, free_start, free_end, start_pfn,
-	    bootmap_size;
-
 #ifdef CONFIG_REMOTE_DEBUG
 	int rs_putDebugChar(char);
 	char rs_getDebugChar(void);
diff -up --recursive --new-file linux-mips-2.4.0-20010126.macro/arch/mips/mips-boards/generic/memory.c linux-mips-2.4.0-20010126/arch/mips/mips-boards/generic/memory.c
--- linux-mips-2.4.0-20010126.macro/arch/mips/mips-boards/generic/memory.c	Sat Dec 30 05:26:48 2000
+++ linux-mips-2.4.0-20010126/arch/mips/mips-boards/generic/memory.c	Fri Jan 26 22:04:35 2001
@@ -135,7 +135,7 @@ void __init prom_meminit(void)
 		long type;
 
 		type = prom_memtype_classify (p->type);
-		base = __pa(p->base);			/* Fix up from KSEG0 */
+		base = p->base;
 		size = p->size;
 
 		add_memory_region(base, size, type);

