From wd@denx.de Fri Apr  1 01:30:06 2005
Received: with ECARTIS (v1.0.0; list linux-mips); Fri, 01 Apr 2005 01:30:21 +0100 (BST)
Received: from mailout08.sul.t-online.com ([IPv6:::ffff:194.25.134.20]:61656
	"EHLO mailout08.sul.t-online.com") by linux-mips.org with ESMTP
	id <S8226064AbVDAAaG>; Fri, 1 Apr 2005 01:30:06 +0100
Received: from fwd34.aul.t-online.de 
	by mailout08.sul.t-online.com with smtp 
	id 1DHA32-0002dK-01; Fri, 01 Apr 2005 02:30:04 +0200
Received: from denx.de (rIHcdiZFQeT1kfTcfYpqOApzGeaO7YV5W-QWJmFNr7t3ewELuUDyQZ@[84.150.111.124]) by fwd34.sul.t-online.de
	with esmtp id 1DHA2z-1M5OEa0; Fri, 1 Apr 2005 02:30:01 +0200
Received: from atlas.denx.de (atlas.denx.de [10.0.0.14])
	by denx.de (Postfix) with ESMTP
	id 62E3D42CBC; Fri,  1 Apr 2005 02:30:00 +0200 (MEST)
Received: by atlas.denx.de (Postfix, from userid 15)
	id 282DDC108D; Fri,  1 Apr 2005 02:30:00 +0200 (MEST)
Received: from atlas.denx.de (localhost [127.0.0.1])
	by atlas.denx.de (Postfix) with ESMTP
	id 26E2113D94A; Fri,  1 Apr 2005 02:30:00 +0200 (MEST)
To:	dfsd df <tomcs163@yahoo.com.cn>
Cc:	linux-mips@linux-mips.org
From:	Wolfgang Denk <wd@denx.de>
Subject: Re: Some questions about kernel tailoring 
Mime-version: 1.0
Content-type: text/plain; charset=ISO-8859-1
Content-transfer-encoding: 8bit
In-reply-to: Your message of "Thu, 31 Mar 2005 17:41:15 +0800."
             <20050331094116.66254.qmail@web15805.mail.cnb.yahoo.com> 
Date:	Fri, 01 Apr 2005 02:29:55 +0200
Message-Id: <20050401003000.282DDC108D@atlas.denx.de>
X-ID:	rIHcdiZFQeT1kfTcfYpqOApzGeaO7YV5W-QWJmFNr7t3ewELuUDyQZ@t-dialin.net
X-TOI-MSGID: eba8126e-db7e-484c-b9cb-17350d24cfbf
Return-Path: <wd@denx.de>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 7557
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: wd@denx.de
Precedence: bulk
X-list: linux-mips

In message <20050331094116.66254.qmail@web15805.mail.cnb.yahoo.com> you wrote:
>  
> So I want to write a very simple bootloader and make a self-decompressed kernel.

Don't re-invent the wheel. Consider using (porting) U-Boot.

Best regards,

Wolfgang Denk

-- 
Software Engineering:  Embedded and Realtime Systems,  Embedded Linux
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd@denx.de
A supercomputer is a machine that runs an endless loop in 2 seconds.

From tomcs163@yahoo.com.cn Fri Apr  1 02:08:54 2005
Received: with ECARTIS (v1.0.0; list linux-mips); Fri, 01 Apr 2005 02:09:09 +0100 (BST)
Received: from web15806.mail.cnb.yahoo.com ([IPv6:::ffff:202.165.102.86]:20815
	"HELO web15806.mail.cnb.yahoo.com") by linux-mips.org with SMTP
	id <S8226072AbVDABIy>; Fri, 1 Apr 2005 02:08:54 +0100
Message-ID: <20050401010839.66832.qmail@web15806.mail.cnb.yahoo.com>
Received: from [210.76.108.109] by web15806.mail.cnb.yahoo.com via HTTP; Fri, 01 Apr 2005 09:08:39 CST
Date:	Fri, 1 Apr 2005 09:08:39 +0800 (CST)
From:	dfsd df <tomcs163@yahoo.com.cn>
Subject: Re: Some questions about kernel tailoring
To:	linux-mips@linux-mips.org
In-Reply-To: 6667
MIME-Version: 1.0
Content-Type: text/plain; charset=gb2312
Content-Transfer-Encoding: 8bit
Return-Path: <tomcs163@yahoo.com.cn>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 7558
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: tomcs163@yahoo.com.cn
Precedence: bulk
X-list: linux-mips

Sorry, I used YAHOO web e-mail.I'm not familiar with
it.and I have set the edit mode to plain text. Pls
help me to check whether the e-mail is still on HTML,
thanks!

Now, I have 4M flash memory and 8M SDRAM can use.any
suggestion?

Thanks again!

--- Stuart Longland <stuartl@longlandclan.hopto.org>
wrote:
> dfsd df wrote:
> > Thanks again!
> 
> BTW: Your mail client has just switched back to its
> fixation on HTML.
> Could you please have a close look at the settings
> and disable HTML mail
> composition?  (at least for this email
> address/domain)
> 
> > Because of the limitation of memory, I don't want
> to use YAMON.
> > Using gzip -9, I can get a kernel more small than
> the kernel made by
> > "make zImage".
> > So I want to write a very simple bootloader and
> make a self-decompressed
> > kernel.
> 
> AFAIK the bootloader is only resident during the
> initial bootup, and is
> normally gone by the time userland kicks in.  (Think
> about it -- what's
>  the point in it sticking around, its job is done
> ;-)
> 
> If you've got at least 8MB RAM you should be okay. 
> (And lets face it --
> Linux on 4MB *IS NOT PRETTY* -- Been there, done
> that)  How much RAM are
> you working with?
> -- 
>
+-------------------------------------------------------------+
> | Stuart Longland -oOo-
> http://stuartl.longlandclan.hopto.org |
> | Atomic Linux Project     -oOo-   
> http://atomicl.berlios.de |
> | - - - - - - - - - - - - - - - - - - - - - - - - -
> - - - - - |
> | I haven't lost my mind - it's backed up on a tape
> somewhere |
>
+-------------------------------------------------------------+
> 

_________________________________________________________
Do You Yahoo!?
150ÍòÇúMP3·è¿ñËÑ£¬´øÄú´³ÈëÒôÀÖµîÌÃ
http://music.yisou.com/
ÃÀÅ®Ã÷ÐÇÓ¦ÓÐ¾¡ÓÐ£¬ËÑ±éÃÀÍ¼¡¢ÑÞÍ¼ºÍ¿áÍ¼
http://image.yisou.com
1G¾ÍÊÇ1000Õ×£¬ÑÅ»¢µçÓÊ×ÔÖúÀ©ÈÝ£¡
http://cn.rd.yahoo.com/mail_cn/tag/1g/*http://cn.mail.yahoo.com/event/mail_1g/

From francis_moreau2000@yahoo.fr Fri Apr  1 08:16:06 2005
Received: with ECARTIS (v1.0.0; list linux-mips); Fri, 01 Apr 2005 08:16:22 +0100 (BST)
Received: from web25109.mail.ukl.yahoo.com ([IPv6:::ffff:217.12.10.57]:44453
	"HELO web25109.mail.ukl.yahoo.com") by linux-mips.org with SMTP
	id <S8225467AbVDAHQG>; Fri, 1 Apr 2005 08:16:06 +0100
Received: (qmail 69836 invoked by uid 60001); 1 Apr 2005 07:15:59 -0000
Message-ID: <20050401071559.69834.qmail@web25109.mail.ukl.yahoo.com>
Received: from [80.14.198.143] by web25109.mail.ukl.yahoo.com via HTTP; Fri, 01 Apr 2005 09:15:59 CEST
Date:	Fri, 1 Apr 2005 09:15:59 +0200 (CEST)
From:	moreau francis <francis_moreau2000@yahoo.fr>
Subject: Re: [Fwd: Re: Some questions about kernel tailoring]
To:	wd@denx.de
Cc:	linux-mips@linux-mips.org
In-Reply-To: 6667
MIME-Version: 1.0
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: 8bit
Return-Path: <francis_moreau2000@yahoo.fr>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 7559
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: francis_moreau2000@yahoo.fr
Precedence: bulk
X-list: linux-mips

Wolfgang Denk wrote:
> 
> Don't re-invent the wheel. Consider using (porting)
> U-Boot.
> 

BTW, do you know how big is U-Boot ?

thanks,

     Francis


	

	
		
__________________________________________________________________
Découvrez le nouveau Yahoo! Mail : 250 Mo d'espace de stockage pour vos mails ! 
Créez votre Yahoo! Mail sur http://fr.mail.yahoo.com/

From francis_moreau2000@yahoo.fr Fri Apr  1 08:34:13 2005
Received: with ECARTIS (v1.0.0; list linux-mips); Fri, 01 Apr 2005 08:34:28 +0100 (BST)
Received: from web25102.mail.ukl.yahoo.com ([IPv6:::ffff:217.12.10.50]:51070
	"HELO web25102.mail.ukl.yahoo.com") by linux-mips.org with SMTP
	id <S8225478AbVDAHeN>; Fri, 1 Apr 2005 08:34:13 +0100
Received: (qmail 46079 invoked by uid 60001); 1 Apr 2005 07:34:05 -0000
Message-ID: <20050401073405.46077.qmail@web25102.mail.ukl.yahoo.com>
Received: from [80.14.198.143] by web25102.mail.ukl.yahoo.com via HTTP; Fri, 01 Apr 2005 09:34:05 CEST
Date:	Fri, 1 Apr 2005 09:34:05 +0200 (CEST)
From:	moreau francis <francis_moreau2000@yahoo.fr>
Subject: How to keep uptodate a mips-linux port
To:	linux-mips@linux-mips.org
MIME-Version: 1.0
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: 8bit
Return-Path: <francis_moreau2000@yahoo.fr>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 7560
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: francis_moreau2000@yahoo.fr
Precedence: bulk
X-list: linux-mips

Hi,

I plan to keep uptodate a port that I realized during
last months. But I don't know how to proceed...

Explanation: I used "linux-2.6.10-rc2-mips" snapshot
as starting point. I did some minor changes on generic
files (files which are not part of mips branch) as
well as mips specific files and added specific board
files.

Now, let say I would like to update my customized
"linux-2.6.10-rc2-mips" to "Linux 2.6.11-mips".
What is the best approach ?

Thanks for your advices

      Francis



	

	
		
__________________________________________________________________
Découvrez le nouveau Yahoo! Mail : 250 Mo d'espace de stockage pour vos mails ! 
Créez votre Yahoo! Mail sur http://fr.mail.yahoo.com/

From jbglaw@lug-owl.de Fri Apr  1 08:37:50 2005
Received: with ECARTIS (v1.0.0; list linux-mips); Fri, 01 Apr 2005 08:38:06 +0100 (BST)
Received: from lug-owl.de ([IPv6:::ffff:195.71.106.12]:57015 "EHLO lug-owl.de")
	by linux-mips.org with ESMTP id <S8225489AbVDAHhu>;
	Fri, 1 Apr 2005 08:37:50 +0100
Received: by lug-owl.de (Postfix, from userid 1001)
	id A41AA1901AC; Fri,  1 Apr 2005 09:37:42 +0200 (CEST)
Date:	Fri, 1 Apr 2005 09:37:42 +0200
From:	Jan-Benedict Glaw <jbglaw@lug-owl.de>
To:	moreau francis <francis_moreau2000@yahoo.fr>
Cc:	linux-mips@linux-mips.org
Subject: Re: How to keep uptodate a mips-linux port
Message-ID: <20050401073742.GO21175@lug-owl.de>
Mail-Followup-To: moreau francis <francis_moreau2000@yahoo.fr>,
	linux-mips@linux-mips.org
References: <20050401073405.46077.qmail@web25102.mail.ukl.yahoo.com>
Mime-Version: 1.0
Content-Type: multipart/signed; micalg=pgp-sha1;
	protocol="application/pgp-signature"; boundary="aiCxlS1GuupXjEh3"
Content-Disposition: inline
In-Reply-To: <20050401073405.46077.qmail@web25102.mail.ukl.yahoo.com>
X-Operating-System: Linux mail 2.6.10-rc2-bk5lug-owl 
X-gpg-fingerprint: 250D 3BCF 7127 0D8C A444  A961 1DBD 5E75 8399 E1BB
X-gpg-key: wwwkeys.de.pgp.net
User-Agent: Mutt/1.5.6+20040907i
Return-Path: <jbglaw@lug-owl.de>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 7561
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: jbglaw@lug-owl.de
Precedence: bulk
X-list: linux-mips


--aiCxlS1GuupXjEh3
Content-Type: text/plain; charset=utf-8
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Fri, 2005-04-01 09:34:05 +0200, moreau francis <francis_moreau2000@yahoo=
=2Efr>
wrote in message <20050401073405.46077.qmail@web25102.mail.ukl.yahoo.com>:

> Now, let say I would like to update my customized
> "linux-2.6.10-rc2-mips" to "Linux 2.6.11-mips".
> What is the best approach ?

The best approach is to cleanly break out all your changes into
semantical patches and submit them to the prople who care about the
individual files. The MIPS-specific patches go to this list.

MfG, JBG

--=20
Jan-Benedict Glaw       jbglaw@lug-owl.de    . +49-172-7608481             =
_ O _
"Eine Freie Meinung in  einem Freien Kopf    | Gegen Zensur | Gegen Krieg  =
_ _ O
 fuer einen Freien Staat voll Freier B=C3=BCrger" | im Internet! |   im Ira=
k!   O O O
ret =3D do_actions((curr | FREE_SPEECH) & ~(NEW_COPYRIGHT_LAW | DRM | TCPA)=
);

--aiCxlS1GuupXjEh3
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: Digital signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (GNU/Linux)

iD8DBQFCTPpGHb1edYOZ4bsRAulmAKCF7cs3SJkjcRY+h5qx3jCarOnLYwCbBf8a
gsboQor9qYA1n7shxG40Wf4=
=SP14
-----END PGP SIGNATURE-----

--aiCxlS1GuupXjEh3--

From francis_moreau2000@yahoo.fr Fri Apr  1 08:54:23 2005
Received: with ECARTIS (v1.0.0; list linux-mips); Fri, 01 Apr 2005 08:54:38 +0100 (BST)
Received: from web25106.mail.ukl.yahoo.com ([IPv6:::ffff:217.12.10.54]:14446
	"HELO web25106.mail.ukl.yahoo.com") by linux-mips.org with SMTP
	id <S8225525AbVDAHyX>; Fri, 1 Apr 2005 08:54:23 +0100
Received: (qmail 14598 invoked by uid 60001); 1 Apr 2005 07:54:17 -0000
Message-ID: <20050401075417.14596.qmail@web25106.mail.ukl.yahoo.com>
Received: from [80.14.198.143] by web25106.mail.ukl.yahoo.com via HTTP; Fri, 01 Apr 2005 09:54:17 CEST
Date:	Fri, 1 Apr 2005 09:54:17 +0200 (CEST)
From:	moreau francis <francis_moreau2000@yahoo.fr>
Subject: Re: How to keep uptodate a mips-linux port
To:	Jan-Benedict Glaw <jbglaw@lug-owl.de>
Cc:	linux-mips@linux-mips.org
In-Reply-To: 6667
MIME-Version: 1.0
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: 8bit
Return-Path: <francis_moreau2000@yahoo.fr>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 7562
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: francis_moreau2000@yahoo.fr
Precedence: bulk
X-list: linux-mips


--- Jan-Benedict Glaw <jbglaw@lug-owl.de> wrote:
> The best approach is to cleanly break out all your
> changes into
> semantical patches and submit them to the prople who
> care about the
> individual files. The MIPS-specific patches go to
> this list.

I already tried this one, and it doens't seem to be
the best one: I sent a patch a couple of months ago
to the list, but I didn't get any answers...so I beg
for Ralf to look at it on IRC, but he seems to have 
not time for it...So now I'm trying to find out a new
approach....
Futhermore, this solution can take several months
before every patches have been submitted and accepted.
During this while I'll need to be synchronised with
CVS tree.

regards,

         Francis




	

	
		
__________________________________________________________________
Découvrez le nouveau Yahoo! Mail : 250 Mo d'espace de stockage pour vos mails ! 
Créez votre Yahoo! Mail sur http://fr.mail.yahoo.com/

From eckhardt@satorlaser.com Fri Apr  1 09:28:40 2005
Received: with ECARTIS (v1.0.0; list linux-mips); Fri, 01 Apr 2005 09:28:55 +0100 (BST)
Received: from moutng.kundenserver.de ([IPv6:::ffff:212.227.126.171]:20171
	"EHLO moutng.kundenserver.de") by linux-mips.org with ESMTP
	id <S8225507AbVDAI2k>; Fri, 1 Apr 2005 09:28:40 +0100
Received: from [213.39.254.66] (helo=tuxator.satorlaser-intern.com)
	by mrelayeu.kundenserver.de with ESMTP (Nemesis),
	id 0ML25U-1DHHVF2lXV-0002RA; Fri, 01 Apr 2005 10:27:41 +0200
From:	Ulrich Eckhardt <eckhardt@satorlaser.com>
Organization: Sator Laser GmbH
To:	linux-mips@linux-mips.org
Subject: conflicting declaration of prom_getcmdline()
Date:	Fri, 1 Apr 2005 10:28:04 +0200
User-Agent: KMail/1.7.1
MIME-Version: 1.0
Content-Type: text/plain;
  charset="utf-8"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
Message-Id: <200504011028.04244.eckhardt@satorlaser.com>
X-Provags-ID: kundenserver.de abuse@kundenserver.de login:e35cee35a663f5c944b9750a965814ae
Return-Path: <eckhardt@satorlaser.com>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 7563
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: eckhardt@satorlaser.com
Precedence: bulk
X-list: linux-mips

Greetings!

I just stumbled over arch/mips/au1000/common/prom.c, which contains a function 
defined like this:
  char* prom_getcmdline(void);
  EXPORT_SYMBOL(prom_getcmdline);
while there are implementations that define the function as
  char* __init prom_getcmdline();
Further, there are several declarations throughout sourcefiles and in 
include/asm-mips/mips-boards/prom.h and include/asm-mips/sgialib.h. Just grep 
for it and you'll see the mess.

If anyone tells me which one is right and cares to explain why I hereby 
volunteer to create a patch. ;)

Apart from that, some code in arch/mips/au1000/common/prom.c is unnecessarily 
complicated.

cheers

Uli

From jbglaw@lug-owl.de Fri Apr  1 09:31:48 2005
Received: with ECARTIS (v1.0.0; list linux-mips); Fri, 01 Apr 2005 09:32:03 +0100 (BST)
Received: from lug-owl.de ([IPv6:::ffff:195.71.106.12]:47800 "EHLO lug-owl.de")
	by linux-mips.org with ESMTP id <S8225507AbVDAIbs>;
	Fri, 1 Apr 2005 09:31:48 +0100
Received: by lug-owl.de (Postfix, from userid 1001)
	id 9AF0A1901BB; Fri,  1 Apr 2005 10:31:47 +0200 (CEST)
Date:	Fri, 1 Apr 2005 10:31:47 +0200
From:	Jan-Benedict Glaw <jbglaw@lug-owl.de>
To:	linux-mips@linux-mips.org
Cc:	moreau francis <francis_moreau2000@yahoo.fr>
Subject: Re: How to keep uptodate a mips-linux port
Message-ID: <20050401083147.GQ21175@lug-owl.de>
Mail-Followup-To: linux-mips@linux-mips.org,
	moreau francis <francis_moreau2000@yahoo.fr>
References: <20050401075417.14596.qmail@web25106.mail.ukl.yahoo.com>
Mime-Version: 1.0
Content-Type: multipart/signed; micalg=pgp-sha1;
	protocol="application/pgp-signature"; boundary="6zipuvUKAEymKn2g"
Content-Disposition: inline
In-Reply-To: <20050401075417.14596.qmail@web25106.mail.ukl.yahoo.com>
X-Operating-System: Linux mail 2.6.10-rc2-bk5lug-owl
X-gpg-fingerprint: 250D 3BCF 7127 0D8C A444  A961 1DBD 5E75 8399 E1BB
X-gpg-key: wwwkeys.de.pgp.net
User-Agent: Mutt/1.5.6+20040907i
Return-Path: <jbglaw@lug-owl.de>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 7564
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: jbglaw@lug-owl.de
Precedence: bulk
X-list: linux-mips


--6zipuvUKAEymKn2g
Content-Type: text/plain; charset=utf-8
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Fri, 2005-04-01 09:54:17 +0200, moreau francis <francis_moreau2000@yahoo=
=2Efr>
wrote in message <20050401075417.14596.qmail@web25106.mail.ukl.yahoo.com>:
> --- Jan-Benedict Glaw <jbglaw@lug-owl.de> wrote:
> > The best approach is to cleanly break out all your
> > changes into
> > semantical patches and submit them to the prople who
> > care about the
> > individual files. The MIPS-specific patches go to
> > this list.
>=20
> I already tried this one, and it doens't seem to be
> the best one: I sent a patch a couple of months ago
> to the list, but I didn't get any answers...so I beg
> for Ralf to look at it on IRC, but he seems to have=20
> not time for it...So now I'm trying to find out a new
> approach....

Don't expect that sending a patch once always leads to it's prompt
acceptance. Pushing a patch *can* involve resending it multiple times,
over a long period of time. However, if a patch is in acceptable state
(that is, a half-way readable coding style, no superfluous debugging
output, ...), Ralf usually takes it quite fast.

> Futhermore, this solution can take several months
> before every patches have been submitted and accepted.
> During this while I'll need to be synchronised with
> CVS tree.

That isn't all that easy, especially with CVS and especially if you want
to keep patches in nicely separated changesets. With CVS, this
unfortunately involves some manual work, or clever scripting. But SCM
systems are a totally different topic. "quilt" may work for you, though.

(And yes, we all search for the solution[tm] to SCM. RFC 1925 comes to
mind, modified to "Easy to use, technically working and politically
correct: Pick any two (you can't have all three)." )

MfG, JBG

--=20
Jan-Benedict Glaw       jbglaw@lug-owl.de    . +49-172-7608481             =
_ O _
"Eine Freie Meinung in  einem Freien Kopf    | Gegen Zensur | Gegen Krieg  =
_ _ O
 fuer einen Freien Staat voll Freier B=C3=BCrger" | im Internet! |   im Ira=
k!   O O O
ret =3D do_actions((curr | FREE_SPEECH) & ~(NEW_COPYRIGHT_LAW | DRM | TCPA)=
);

--6zipuvUKAEymKn2g
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: Digital signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (GNU/Linux)

iD8DBQFCTQbzHb1edYOZ4bsRAoc0AJ95ceZcwpi9b9IWZecz1UeHmob/8QCfVpAx
oc12V7cOTvs/bOBqHX3XD10=
=cM6M
-----END PGP SIGNATURE-----

--6zipuvUKAEymKn2g--

From jaypee@hotpop.com Fri Apr  1 10:06:03 2005
Received: with ECARTIS (v1.0.0; list linux-mips); Fri, 01 Apr 2005 10:06:19 +0100 (BST)
Received: from smtp-out.hotpop.com ([IPv6:::ffff:38.113.3.61]:6346 "EHLO
	smtp-out.hotpop.com") by linux-mips.org with ESMTP
	id <S8225507AbVDAJGD>; Fri, 1 Apr 2005 10:06:03 +0100
Received: from hotpop.com (kubrick.hotpop.com [38.113.3.103])
	by smtp-out.hotpop.com (Postfix) with SMTP id 3A186FC40C1
	for <linux-mips@linux-mips.org>; Fri,  1 Apr 2005 09:05:49 +0000 (UTC)
Received: from [192.168.0.85] (unknown [83.104.11.251])
	by smtp-1.hotpop.com (Postfix) with ESMTP
	id A03F11A0093; Fri,  1 Apr 2005 09:05:46 +0000 (UTC)
Subject: Re: Compressed Kernels
From:	JP <jaypee@hotpop.com>
To:	ppopov@embeddedalley.com
Cc:	"Robin H. Johnson" <robbat2@orbis-terrarum.net>,
	linux-mips <linux-mips@linux-mips.org>
In-Reply-To: <424C2450.4030406@embeddedalley.com>
References: <1112258126.28438.16.camel@localhost.localdomain>
	 <20050331084207.GA8346@curie-int.orbis-terrarum.net>
	 <424C2450.4030406@embeddedalley.com>
Content-Type: text/plain
Date:	Fri, 01 Apr 2005 10:05:55 +0100
Message-Id: <1112346356.30390.9.camel@localhost.localdomain>
Mime-Version: 1.0
X-Mailer: Evolution 2.2.1.1 
Content-Transfer-Encoding: 7bit
X-HotPOP: -----------------------------------------------
                   Sent By HotPOP.com FREE Email
             Get your FREE POP email at www.HotPOP.com
          -----------------------------------------------
Return-Path: <jaypee@hotpop.com>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 7565
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: jaypee@hotpop.com
Precedence: bulk
X-list: linux-mips

> Should be easy to update if if doesn't apply cleanly anymore. I think the 
> complaint about that patch is that it duplicates some code from other 
> architectures and a more common solution is needed. Since I don't have time to 
> work on something more common, the patch remains stand alone.

Fair enough I'd agree with that as the code I used was straight outta
i386. Other archs use the same arm sh etc. I'll apply your patch for our
boards rather than duplicate the effort. This I guess is a problem for
all arches and really should be addressed at the kernel.org level.

-- 
mailto:jaypee@hotpop.com
http://jaypee.org.uk




From wd@denx.de Fri Apr  1 16:48:11 2005
Received: with ECARTIS (v1.0.0; list linux-mips); Fri, 01 Apr 2005 16:48:28 +0100 (BST)
Received: from mailout03.sul.t-online.com ([IPv6:::ffff:194.25.134.81]:43681
	"EHLO mailout03.sul.t-online.com") by linux-mips.org with ESMTP
	id <S8226121AbVDAPsL>; Fri, 1 Apr 2005 16:48:11 +0100
Received: from fwd26.aul.t-online.de 
	by mailout03.sul.t-online.com with smtp 
	id 1DHONW-0006Bg-01; Fri, 01 Apr 2005 17:48:10 +0200
Received: from denx.de (ZB7vNEZQ8eZAiBtlsjafTBsXcAHZ9FKzvJV7zZZgNlPINfBYRoWB6M@[84.150.103.19]) by fwd26.sul.t-online.de
	with esmtp id 1DHONN-0k6iRM0; Fri, 1 Apr 2005 17:48:01 +0200
Received: from atlas.denx.de (atlas.denx.de [10.0.0.14])
	by denx.de (Postfix) with ESMTP
	id A660A42BA4; Fri,  1 Apr 2005 17:48:00 +0200 (MEST)
Received: by atlas.denx.de (Postfix, from userid 15)
	id 5984BC108D; Fri,  1 Apr 2005 17:48:00 +0200 (MEST)
Received: from atlas.denx.de (localhost [127.0.0.1])
	by atlas.denx.de (Postfix) with ESMTP
	id 56F0313D94A; Fri,  1 Apr 2005 17:48:00 +0200 (MEST)
To:	moreau francis <francis_moreau2000@yahoo.fr>
Cc:	linux-mips@linux-mips.org
From:	Wolfgang Denk <wd@denx.de>
Subject: Re: [Fwd: Re: Some questions about kernel tailoring] 
Mime-version: 1.0
Content-type: text/plain; charset=ISO-8859-1
Content-transfer-encoding: 8bit
In-reply-to: Your message of "Fri, 01 Apr 2005 09:15:59 +0200."
             <20050401071559.69834.qmail@web25109.mail.ukl.yahoo.com> 
Date:	Fri, 01 Apr 2005 17:47:55 +0200
Message-Id: <20050401154800.5984BC108D@atlas.denx.de>
X-ID:	ZB7vNEZQ8eZAiBtlsjafTBsXcAHZ9FKzvJV7zZZgNlPINfBYRoWB6M@t-dialin.net
X-TOI-MSGID: c482d187-0be4-4b2a-82ec-7ab20a127027
Return-Path: <wd@denx.de>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 7566
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: wd@denx.de
Precedence: bulk
X-list: linux-mips

In message <20050401071559.69834.qmail@web25109.mail.ukl.yahoo.com> you wrote:
> > Don't re-invent the wheel. Consider using (porting)
> > U-Boot.
> 
> BTW, do you know how big is U-Boot ?

Sure :-)

This depends on which features you have on your board  and  configure
into  U-Boot. Typical image sizes are 150...200 kB with most features
enabled (network support including TFTP, DHCP, NFS; hush  shell  with
the  capability  to  run shell scripts; support for IDE, CompactFlash
cards, USB (memory sticks), NAND flash; support  for  DOS,  ext2  and
JFFS2  filesystems;  graphical display on LCD/VGA, splash screen etc.
etc.). The biggest configuration I am  aware  of  at  the  moment  is
280kB; small configurations can be fit in 128 kB; if you really throw
out everything you can get rid of you may even make it fit into 64kB.
As  mentioned  before:  this  depends  on  architecture  and hardware
features that have to be supported.


And referring to the original question:  of  course  U-Boot  supports
booting  of  compressed images (kernel, ramdisk, other) uzing gzip or
gzip2 compression.

Best regards,

Wolfgang Denk

-- 
Software Engineering:  Embedded and Realtime Systems,  Embedded Linux
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd@denx.de
Respect is a rational process
	-- McCoy, "The Galileo Seven", stardate 2822.3

From tomcs163@yahoo.com.cn Sat Apr  2 04:03:33 2005
Received: with ECARTIS (v1.0.0; list linux-mips); Sat, 02 Apr 2005 04:03:54 +0100 (BST)
Received: from web15804.mail.cnb.yahoo.com ([IPv6:::ffff:202.165.102.84]:15018
	"HELO web15804.mail.cnb.yahoo.com") by linux-mips.org with SMTP
	id <S8224937AbVDBDDd>; Sat, 2 Apr 2005 04:03:33 +0100
Message-ID: <20050402030325.93348.qmail@web15804.mail.cnb.yahoo.com>
Received: from [61.51.73.251] by web15804.mail.cnb.yahoo.com via HTTP; Sat, 02 Apr 2005 11:03:25 CST
Date:	Sat, 2 Apr 2005 11:03:25 +0800 (CST)
From:	dfsd df <tomcs163@yahoo.com.cn>
Subject: Re: [Fwd: Re: Some questions about kernel tailoring] 
To:	linux-mips@linux-mips.org
In-Reply-To: 6667
MIME-Version: 1.0
Content-Type: text/plain; charset=gb2312
Content-Transfer-Encoding: 8bit
Return-Path: <tomcs163@yahoo.com.cn>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 7567
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: tomcs163@yahoo.com.cn
Precedence: bulk
X-list: linux-mips

Thanks! I will take a look at U-BOOT.

BTW: Could you please tell me what's the diffence
among U-BOOT, REDBOOT, and YAMON?

Thanks again! 

> --- Wolfgang Denk <wd@denx.de> wrote:
> > In message
> >
>
<20050401071559.69834.qmail@web25109.mail.ukl.yahoo.com>
> > you wrote:
> > > > Don't re-invent the wheel. Consider using
> > (porting)
> > > > U-Boot.
> > > 
> > > BTW, do you know how big is U-Boot ?
> > 
> > Sure :-)
> > 
> > This depends on which features you have on your
> > board  and  configure
> > into  U-Boot. Typical image sizes are 150...200 kB
> > with most features
> > enabled (network support including TFTP, DHCP,
> NFS;
> > hush  shell  with
> > the  capability  to  run shell scripts; support
> for
> > IDE, CompactFlash
> > cards, USB (memory sticks), NAND flash; support 
> for
> >  DOS,  ext2  and
> > JFFS2  filesystems;  graphical display on LCD/VGA,
> > splash screen etc.
> > etc.). The biggest configuration I am  aware  of 
> at
> >  the  moment  is
> > 280kB; small configurations can be fit in 128 kB;
> if
> > you really throw
> > out everything you can get rid of you may even
> make
> > it fit into 64kB.
> > As  mentioned  before:  this  depends  on 
> > architecture  and hardware
> > features that have to be supported.
> > 
> > 
> > And referring to the original question:  of 
> course 
> > U-Boot  supports
> > booting  of  compressed images (kernel, ramdisk,
> > other) uzing gzip or
> > gzip2 compression.
> > 
> > Best regards,
> > 
> > Wolfgang Denk
> > 
> > -- 
> > Software Engineering:  Embedded and Realtime
> > Systems,  Embedded Linux
> > Phone: (+49)-8142-66989-10 Fax:
> (+49)-8142-66989-80
> > Email: wd@denx.de
> > Respect is a rational process
> > 	-- McCoy, "The Galileo Seven", stardate 2822.3
> > 
> > 
> 
>
_________________________________________________________
> Do You Yahoo!?
> 150ÍòÇúMP3·è¿ñËÑ£¬´øÄú´³ÈëÒôÀÖµîÌÃ
> http://music.yisou.com/
> ÃÀÅ®Ã÷ÐÇÓ¦ÓÐ¾¡ÓÐ£¬ËÑ±éÃÀÍ¼¡¢ÑÞÍ¼ºÍ¿áÍ¼
> http://image.yisou.com
> 1G¾ÍÊÇ1000Õ×£¬ÑÅ»¢µçÓÊ×ÔÖúÀ©ÈÝ£¡
>
http://cn.rd.yahoo.com/mail_cn/tag/1g/*http://cn.mail.yahoo.com/event/mail_1g/
> 

_________________________________________________________
Do You Yahoo!?
150ÍòÇúMP3·è¿ñËÑ£¬´øÄú´³ÈëÒôÀÖµîÌÃ
http://music.yisou.com/
ÃÀÅ®Ã÷ÐÇÓ¦ÓÐ¾¡ÓÐ£¬ËÑ±éÃÀÍ¼¡¢ÑÞÍ¼ºÍ¿áÍ¼
http://image.yisou.com
1G¾ÍÊÇ1000Õ×£¬ÑÅ»¢µçÓÊ×ÔÖúÀ©ÈÝ£¡
http://cn.rd.yahoo.com/mail_cn/tag/1g/*http://cn.mail.yahoo.com/event/mail_1g/

From maillist@jg555.com Sat Apr  2 05:39:25 2005
Received: with ECARTIS (v1.0.0; list linux-mips); Sat, 02 Apr 2005 05:39:42 +0100 (BST)
Received: from 64-30-195-78.dsl.linkline.com ([IPv6:::ffff:64.30.195.78]:51412
	"EHLO jg555.com") by linux-mips.org with ESMTP id <S8224948AbVDBEjZ>;
	Sat, 2 Apr 2005 05:39:25 +0100
Received: from [172.16.0.150] (w2rz8l4s02.jg555.com [::ffff:172.16.0.150])
  (AUTH: PLAIN root, TLS: TLSv1/SSLv3,256bits,AES256-SHA)
  by jg555.com with esmtp; Fri, 01 Apr 2005 20:39:22 -0800
  id 0000846A.424E21FA.000053E0
Message-ID: <424E21F0.5080308@jg555.com>
Date:	Fri, 01 Apr 2005 20:39:12 -0800
From:	Jim Gifford <maillist@jg555.com>
User-Agent: Mozilla Thunderbird 1.0 (Windows/20041206)
X-Accept-Language: en-us, en
Mime-Version: 1.0
Content-Type: multipart/mixed; boundary="=_server-21472-1112416762-0001-2"
To:	Peter Horton <pdh@colonel-panic.org>
CC:	Linux MIPS List <linux-mips@linux-mips.org>
Subject: Re: Build 64bit on RaQ2
References: <42449F47.8010002@jg555.com> <20050326091218.GA2471@skeleton-jack> <42488DFC.20408@jg555.com> <20050329214641.GA5152@skeleton-jack>
In-Reply-To: <20050329214641.GA5152@skeleton-jack>
Return-Path: <maillist@jg555.com>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 7568
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: maillist@jg555.com
Precedence: bulk
X-list: linux-mips

This is a MIME-formatted message.  If you see this text it means that your
E-mail software does not support MIME-formatted messages.

--=_server-21472-1112416762-0001-2
Content-Type: text/plain; charset=iso-8859-1; format=flowed
Content-Transfer-Encoding: 7bit

Peter Horton wrote:

>
>Tulip driver gave me problems also. I landed up inserting a printk()
>which made it work, see the patch. I didn't get round to debugging it
>any further, sorry.
>
>P.
>
>  
>
Peter here is the fix for the linux-mips version of kernel and the tulip 
driver. Thanx again for you help



-- 
----
Jim Gifford
maillist@jg555.com


--=_server-21472-1112416762-0001-2
Content-Type: text/x-diff; name="tulip-mips[1].patch"; charset=iso-8859-1
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
 filename="tulip-mips[1].patch"

diff -Naurp linux.orig/drivers/net/tulip/de2104x.c linux/drivers/net/tulip/de2104x.c
--- linux.orig/drivers/net/tulip/de2104x.c	2005-03-18 09:37:38.000000000 -0800
+++ linux/drivers/net/tulip/de2104x.c	2005-04-01 20:10:25.323550440 -0800
@@ -1787,15 +1787,10 @@ static void __init de21041_get_srom_info
 	/* DEC now has a specification but early board makers
 	   just put the address in the first EEPROM locations. */
 	/* This does  memcmp(eedata, eedata+16, 8) */
-
-#ifndef CONFIG_MIPS_COBALT
-
 	for (i = 0; i < 8; i ++)
 		if (ee_data[i] != ee_data[16+i])
 			sa_offset = 20;
 
-#endif
-
 	/* store MAC address */
 	for (i = 0; i < 6; i ++)
 		de->dev->dev_addr[i] = ee_data[i + sa_offset];
@@ -1932,7 +1927,7 @@ bad_srom:
 	goto fill_defaults;
 }
 
-static int __init de_init_one (struct pci_dev *pdev,
+static int __devinit de_init_one (struct pci_dev *pdev,
 				  const struct pci_device_id *ent)
 {
 	struct net_device *dev;
diff -Naurp linux.orig/drivers/net/tulip/de4x5.c linux/drivers/net/tulip/de4x5.c
--- linux.orig/drivers/net/tulip/de4x5.c	2005-03-18 09:37:38.000000000 -0800
+++ linux/drivers/net/tulip/de4x5.c	2005-04-01 20:10:25.854469728 -0800
@@ -2124,7 +2124,6 @@ static struct eisa_driver de4x5_eisa_dri
                 .remove  = __devexit_p (de4x5_eisa_remove),
         }
 };
-MODULE_DEVICE_TABLE(eisa, de4x5_eisa_ids);
 #endif
 
 #ifdef CONFIG_PCI
diff -Naurp linux.orig/drivers/net/tulip/media.c linux/drivers/net/tulip/media.c
--- linux.orig/drivers/net/tulip/media.c	2005-03-18 09:37:38.000000000 -0800
+++ linux/drivers/net/tulip/media.c	2005-04-01 20:10:26.553363480 -0800
@@ -44,8 +44,10 @@ static const unsigned char comet_miireg2
 
 /* MII transceiver control section.
    Read and write the MII registers using software-generated serial
-   MDIO protocol.  See the MII specifications or DP83840A data sheet
-   for details. */
+   MDIO protocol.
+   See IEEE 802.3-2002.pdf (Section 2, Chapter "22.2.4 Management functions")
+   or DP83840A data sheet for more details.
+   */
 
 int tulip_mdio_read(struct net_device *dev, int phy_id, int location)
 {
@@ -307,13 +309,29 @@ void tulip_select_media(struct net_devic
 				int reset_length = p[2 + init_length];
 				misc_info = (u16*)(reset_sequence + reset_length);
 				if (startup) {
+					int timeout = 10;	/* max 1 ms */
 					iowrite32(mtable->csr12dir | 0x100, ioaddr + CSR12);
 					for (i = 0; i < reset_length; i++)
 						iowrite32(reset_sequence[i], ioaddr + CSR12);
+
+					/* flush posted writes */
+					ioread32(ioaddr + CSR12);
+
+					/* Sect 3.10.3 in DP83840A.pdf (p39) */
+					udelay(500);
+
+					/* Section 4.2 in DP83840A.pdf (p43) */
+					/* and IEEE 802.3 "22.2.4.1.1 Reset" */
+					while (timeout-- &&
+						(tulip_mdio_read (dev, phy_num, MII_BMCR) & BMCR_RESET))
+						udelay(100);
 				}
 				for (i = 0; i < init_length; i++)
 					iowrite32(init_sequence[i], ioaddr + CSR12);
+
+				ioread32(ioaddr + CSR12);	/* flush posted writes */
 			}
+
 			tmp_info = get_u16(&misc_info[1]);
 			if (tmp_info)
 				tp->advertising[phy_num] = tmp_info | 1;
@@ -399,9 +417,6 @@ void tulip_select_media(struct net_devic
 	}
 
 	tp->csr6 = new_csr6 | (tp->csr6 & 0xfdff) | (tp->full_duplex ? 0x0200 : 0);
-
-	udelay(1000);
-
 	return;
 }
 
diff -Naurp linux.orig/drivers/net/tulip/tulip_core.c linux/drivers/net/tulip/tulip_core.c
--- linux.orig/drivers/net/tulip/tulip_core.c	2005-03-18 09:37:38.000000000 -0800
+++ linux/drivers/net/tulip/tulip_core.c	2005-04-01 20:10:27.003295080 -0800
@@ -22,7 +22,7 @@
 #else
 #define DRV_VERSION	"1.1.13"
 #endif
-#define DRV_RELDATE	"May 11, 2002"
+#define DRV_RELDATE	"December 15, 2004"
 
 
 #include <linux/module.h>
@@ -1514,8 +1514,8 @@ static int __devinit tulip_init_one (str
                     (PCI_SLOT(pdev->devfn) == 12))) {
                        /* Cobalt MAC address in first EEPROM locations. */
                        sa_offset = 0;
-		       /* Ensure our media table fixup get's applied */
-		       memcpy(ee_data + 16, ee_data, 8);
+                       /* No media table either */
+                       tp->flags &= ~HAS_MEDIA_TABLE;
                }
 #endif
 #ifdef CONFIG_GSC
diff -Naurp linux.orig/drivers/net/tulip/tulip.h linux/drivers/net/tulip/tulip.h
--- linux.orig/drivers/net/tulip/tulip.h	2005-03-18 09:37:38.000000000 -0800
+++ linux/drivers/net/tulip/tulip.h	2005-04-01 20:10:26.851318184 -0800
@@ -475,8 +475,11 @@ static inline void tulip_stop_rxtx(struc
 			udelay(10);
 
 		if (!i)
-			printk(KERN_DEBUG "%s: tulip_stop_rxtx() failed\n",
-					pci_name(tp->pdev));
+			printk(KERN_DEBUG "%s: tulip_stop_rxtx() failed"
+					" (CSR5 0x%x CSR6 0x%x)\n",
+					pci_name(tp->pdev),
+					ioread32(ioaddr + CSR5),
+					ioread32(ioaddr + CSR6));
 	}
 }
 

--=_server-21472-1112416762-0001-2--

From ths@networkno.de Sat Apr  2 11:11:42 2005
Received: with ECARTIS (v1.0.0; list linux-mips); Sat, 02 Apr 2005 11:11:58 +0100 (BST)
Received: from mx01.qsc.de ([IPv6:::ffff:213.148.129.14]:47828 "EHLO
	mx01.qsc.de") by linux-mips.org with ESMTP id <S8225213AbVDBKLm>;
	Sat, 2 Apr 2005 11:11:42 +0100
Received: from port-195-158-169-58.dynamic.qsc.de ([195.158.169.58] helo=hattusa.textio)
	by mx01.qsc.de with esmtp (Exim 3.35 #1)
	id 1DHfbM-0001F5-00; Sat, 02 Apr 2005 12:11:36 +0200
Received: from ths by hattusa.textio with local (Exim 4.50)
	id 1DHfbM-0008AG-3X; Sat, 02 Apr 2005 12:11:36 +0200
Date:	Sat, 2 Apr 2005 12:11:36 +0200
To:	macro@linux-mips.org
Cc:	linux-mips@linux-mips.org
Subject: Re: CVS Update@linux-mips.org: linux
Message-ID: <20050402101135.GB1641@hattusa.textio>
References: <20050401175340Z8226142-1340+5040@linux-mips.org>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <20050401175340Z8226142-1340+5040@linux-mips.org>
User-Agent: Mutt/1.5.8i
From:	Thiemo Seufer <ths@networkno.de>
Return-Path: <ths@networkno.de>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 7569
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: ths@networkno.de
Precedence: bulk
X-list: linux-mips

macro@linux-mips.org wrote:
> 
> CVSROOT:	/home/cvs
> Module name:	linux
> Changes by:	macro@ftp.linux-mips.org	05/04/01 18:53:33
> 
> Modified files:
> 	arch/mips/mm   : pg-sb1.c 
> 
> Log message:
> 	Remove useless casts.  Fix formatting.

This patch leads for 64bit kernels to:

  CC      arch/mips/mm/pg-sb1.o
arch/mips/mm/pg-sb1.c: In function `sb1_dma_init':
arch/mips/mm/pg-sb1.c:220: warning: cast from pointer to integer of different size
arch/mips/mm/pg-sb1.c:225: warning: passing arg 2 of `__raw_writeq' discards qualifiers from pointer target type
arch/mips/mm/pg-sb1.c:226: warning: passing arg 2 of `__raw_writeq' discards qualifiers from pointer target type
arch/mips/mm/pg-sb1.c:227: warning: passing arg 2 of `__raw_writeq' discards qualifiers from pointer target type
arch/mips/mm/pg-sb1.c: In function `clear_page':
arch/mips/mm/pg-sb1.c:233: warning: cast from pointer to integer of different size
arch/mips/mm/pg-sb1.c:237: warning: cast from pointer to integer of different size
arch/mips/mm/pg-sb1.c: In function `copy_page':
arch/mips/mm/pg-sb1.c:257: warning: cast from pointer to integer of different size
arch/mips/mm/pg-sb1.c:258: warning: cast from pointer to integer of different size
arch/mips/mm/pg-sb1.c:262: warning: cast from pointer to integer of different size
arch/mips/mm/pg-sb1.c:263: warning: cast from pointer to integer of different size

From atl@unixsol.org Sat Apr  2 11:52:22 2005
Received: with ECARTIS (v1.0.0; list linux-mips); Sat, 02 Apr 2005 11:52:37 +0100 (BST)
Received: from ns.unixsol.org ([IPv6:::ffff:193.110.159.2]:64653 "HELO
	ns.unixsol.org") by linux-mips.org with SMTP id <S8225225AbVDBKwW>;
	Sat, 2 Apr 2005 11:52:22 +0100
Received: (qmail 22958 invoked by uid 0); 2 Apr 2005 13:52:19 +0300
Received: from atl.unixsol.bg (HELO ?10.0.1.33?) (10.0.1.33)
  by ns.unixsol.bg with SMTP; 2 Apr 2005 13:52:19 +0300
Message-ID: <424E7A38.7020104@unixsol.org>
Date:	Sat, 02 Apr 2005 13:55:52 +0300
From:	Anton Tinchev <atl@unixsol.org>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.5) Gecko/20041217
X-Accept-Language: en-us, en
MIME-Version: 1.0
To:	Linux MIPS List <linux-mips@linux-mips.org>
Subject: Idt processors evaluation board
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
Return-Path: <atl@unixsol.org>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 7570
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: atl@unixsol.org
Precedence: bulk
X-list: linux-mips

 From where to buy IDT evaluation board?
Thanks.

From michael@cubic.org Sat Apr  2 11:58:06 2005
Received: with ECARTIS (v1.0.0; list linux-mips); Sat, 02 Apr 2005 11:58:21 +0100 (BST)
Received: from d062149.adsl.hansenet.de ([IPv6:::ffff:80.171.62.149]:11535
	"EHLO gruft.cubic.org") by linux-mips.org with ESMTP
	id <S8225228AbVDBK6G>; Sat, 2 Apr 2005 11:58:06 +0100
Received: from cubic.org (starbase [192.168.10.1])
	by gruft.cubic.org (8.12.2/8.12.2) with ESMTP id j32Aw3m9015883
	for <linux-mips@linux-mips.org>; Sat, 2 Apr 2005 12:58:04 +0200
Message-ID: <424E650F.7010002@cubic.org>
Date:	Sat, 02 Apr 2005 11:25:35 +0200
From:	Michael Stickel <michael@cubic.org>
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.2.1) Gecko/20030225
X-Accept-Language: en-us, en
MIME-Version: 1.0
To:	linux-mips@linux-mips.org
Subject: Re: Idt processors evaluation board
References: <424E7A38.7020104@unixsol.org>
In-Reply-To: <424E7A38.7020104@unixsol.org>
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
Return-Path: <michael@cubic.org>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 7571
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: michael@cubic.org
Precedence: bulk
X-list: linux-mips

Anton Tinchev wrote:

> From where to buy IDT evaluation board?
> Thanks.
>
Go to www.idt.com. In the top menu go to "Support"->"Sales Support" and 
select your region.



From drow@nevyn.them.org Sat Apr  2 23:23:58 2005
Received: with ECARTIS (v1.0.0; list linux-mips); Sat, 02 Apr 2005 23:24:14 +0100 (BST)
Received: from nevyn.them.org ([IPv6:::ffff:66.93.172.17]:36562 "EHLO
	nevyn.them.org") by linux-mips.org with ESMTP id <S8225436AbVDBWX6>;
	Sat, 2 Apr 2005 23:23:58 +0100
Received: from drow by nevyn.them.org with local (Exim 4.50 #1 (Debian))
	id 1DHr22-0004ta-0G
	for <linux-mips@linux-mips.org>; Sat, 02 Apr 2005 17:23:54 -0500
Date:	Sat, 2 Apr 2005 17:23:53 -0500
From:	Daniel Jacobowitz <dan@debian.org>
To:	linux-mips@linux-mips.org
Subject: ptrace and floating point related kernel crash
Message-ID: <20050402222353.GA18450@nevyn.them.org>
Mime-Version: 1.0
Content-Type: multipart/mixed; boundary="XsQoSWH+UP9D9v3l"
Content-Disposition: inline
User-Agent: Mutt/1.5.8i
Return-Path: <drow@nevyn.them.org>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 7572
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: dan@debian.org
Precedence: bulk
X-list: linux-mips


--XsQoSWH+UP9D9v3l
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline

Here's a nasty little bug I encountered while debugging some related
problems in GDB.

Compile and run the attached program; I'm not sure if it will demonstrate
the problem on anything with hardware FPU, but at least it works on an SB-1
(using a 32-bit kernel).  The program itself runs fine.  Debug it with GDB,
and set a breakpoint on the ctc1 instruction.  Before it executes, print out
$fsr; it will probably be 0.  After trying to copy 0xf0102 into FSR, print
$fsr again; it will be 0x102.  The program will still complete OK.

Now try again.  After the ctc1 instruction, tell gdb "set $fsr = 0xf0102".
Then continue; the kernel locks up before the program is done.

The extra bits are two bits in the cause field, and two bits in the
reserved-write-as-zero field.  I'm not sure whether setting the reserved
bits is to blame, or whether setting the cause bits raises a floating point
exception in the kernel during context switching.  In any case, it looks
like we ought to be masking out some bits before saving the fcr31 value in
ptrace.

-- 
Daniel Jacobowitz
CodeSourcery, LLC

--XsQoSWH+UP9D9v3l
Content-Type: text/x-csrc; charset=us-ascii
Content-Disposition: attachment; filename="mips-crash.c"

/* This testcase is part of GDB, the GNU debugger.

   Copyright 2004 Free Software Foundation, Inc.

   This program is free software; you can redistribute it and/or modify
   it under the terms of the GNU General Public License as published by
   the Free Software Foundation; either version 2 of the License, or
   (at your option) any later version.

   This program is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   GNU General Public License for more details.
 
   You should have received a copy of the GNU General Public License
   along with this program; if not, write to the Free Software
   Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.

*/

#include <stdio.h>
#include <string.h>
#include <signal.h>
#include <sys/time.h>
#include <setjmp.h>

static volatile int done;

static jmp_buf env;

static void
handler (int sig)
{
  done = 1;
  /* NOTE: Don't try this at home; always use siglongjmp to leave
     a signal handler.  */
  longjmp (env, 1);
} /* handler */

struct itimerval itime;
struct sigaction action;

/* The enum is so that GDB can easily see these macro values.  */
enum {
  itimer_real = ITIMER_REAL,
  itimer_virtual = ITIMER_VIRTUAL
} itimer = ITIMER_VIRTUAL;

main ()
{
  /* Set up the signal handler.  */
  memset (&action, 0, sizeof (action));
  action.sa_handler = handler;
  sigaction (SIGVTALRM, &action, NULL);
  sigaction (SIGALRM, &action, NULL);

  /* The values needed for the itimer.  This needs to be at least long
     enough for the setitimer() call to return.  */
  memset (&itime, 0, sizeof (itime));
  itime.it_value.tv_usec = 250 * 1000;

  
  while (setjmp (env) == 0)
    {
      /* Set up a one-off timer.  A timer, rather than SIGSEGV, is
	 used as after a timer handler finishes the interrupted code
	 can safely resume.  */
      setitimer (itimer, &itime, NULL);
      /* Wait.  */
      while (!done);
      done = 0;
    }

  done = 0;
  itimer = itimer_real;

  asm volatile ("ctc1 %0, $31" : : "r" (0x000f0102));

  while (setjmp (env) == 0)
    {
      /* Set up a one-off timer.  A timer, rather than SIGSEGV, is
	 used as after a timer handler finishes the interrupted code
	 can safely resume.  */
      setitimer (itimer, &itime, NULL);
      /* Wait.  */
      while (!done);
      done = 0;
    }
}

--XsQoSWH+UP9D9v3l--

From tomcs163@yahoo.com.cn Mon Apr  4 05:50:13 2005
Received: with ECARTIS (v1.0.0; list linux-mips); Mon, 04 Apr 2005 05:50:29 +0100 (BST)
Received: from web15808.mail.cnb.yahoo.com ([IPv6:::ffff:202.165.102.88]:38294
	"HELO web15808.mail.cnb.yahoo.com") by linux-mips.org with SMTP
	id <S8225984AbVDDEuN>; Mon, 4 Apr 2005 05:50:13 +0100
Message-ID: <20050404044953.86817.qmail@web15808.mail.cnb.yahoo.com>
Received: from [210.76.108.109] by web15808.mail.cnb.yahoo.com via HTTP; Mon, 04 Apr 2005 12:49:53 CST
Date:	Mon, 4 Apr 2005 12:49:53 +0800 (CST)
From:	dfsd df <tomcs163@yahoo.com.cn>
Subject: questions about early-printk
To:	linux-mips@linux-mips.org
MIME-Version: 1.0
Content-Type: text/plain; charset=gb2312
Content-Transfer-Encoding: 8bit
Return-Path: <tomcs163@yahoo.com.cn>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 7573
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: tomcs163@yahoo.com.cn
Precedence: bulk
X-list: linux-mips

Hi:
  Had somebody used early-printk? Now, I'm porting
linux to a MIPS machine under instructions of "Linux
MIPS Porting Guide" from junsun.net.

But at the first step, I want to modify the source
code of the barebone program to display "helloworld".

The program uses memory map addr as the UART device's
"base addr",and access the UART by adding offset to
this "base addr".

The "base addr" is assigned to a constant value. and
from the other early-printk patchs, the value of "base
addr" are not equals. So I want to know can I assign
the right value to this "base addr"?

Thanks!

_________________________________________________________
Do You Yahoo!?
150ÍòÇúMP3·è¿ñËÑ£¬´øÄú´³ÈëÒôÀÖµîÌÃ
http://music.yisou.com/
ÃÀÅ®Ã÷ÐÇÓ¦ÓÐ¾¡ÓÐ£¬ËÑ±éÃÀÍ¼¡¢ÑÞÍ¼ºÍ¿áÍ¼
http://image.yisou.com
1G¾ÍÊÇ1000Õ×£¬ÑÅ»¢µçÓÊ×ÔÖúÀ©ÈÝ£¡
http://cn.rd.yahoo.com/mail_cn/tag/1g/*http://cn.mail.yahoo.com/event/mail_1g/

From francis_moreau2000@yahoo.fr Mon Apr  4 08:19:35 2005
Received: with ECARTIS (v1.0.0; list linux-mips); Mon, 04 Apr 2005 08:19:51 +0100 (BST)
Received: from web25102.mail.ukl.yahoo.com ([IPv6:::ffff:217.12.10.50]:7053
	"HELO web25102.mail.ukl.yahoo.com") by linux-mips.org with SMTP
	id <S8225995AbVDDHTf>; Mon, 4 Apr 2005 08:19:35 +0100
Received: (qmail 21953 invoked by uid 60001); 4 Apr 2005 07:19:29 -0000
Message-ID: <20050404071929.21951.qmail@web25102.mail.ukl.yahoo.com>
Received: from [80.14.198.143] by web25102.mail.ukl.yahoo.com via HTTP; Mon, 04 Apr 2005 09:19:29 CEST
Date:	Mon, 4 Apr 2005 09:19:29 +0200 (CEST)
From:	moreau francis <francis_moreau2000@yahoo.fr>
Subject: Re: [Fwd: Re: Some questions about kernel tailoring] 
To:	Wolfgang Denk <wd@denx.de>
Cc:	linux-mips@linux-mips.org
In-Reply-To: 6667
MIME-Version: 1.0
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: 8bit
Return-Path: <francis_moreau2000@yahoo.fr>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 7574
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: francis_moreau2000@yahoo.fr
Precedence: bulk
X-list: linux-mips

Wolfgang Denk <wd@denx.de> wrote:
> This depends on which features you have on your
> board  and  configure into  U-Boot. Typical image 
> sizes are 150...200 kB with most features enabled.

Thanks for your accurate figures. I'm going to try it
soon. Are there any security features implemnented in
U-Boot ?

Thanks.

           Francis.


	

	
		
__________________________________________________________________
Découvrez le nouveau Yahoo! Mail : 250 Mo d'espace de stockage pour vos mails ! 
Créez votre Yahoo! Mail sur http://fr.mail.yahoo.com/

From francis_moreau2000@yahoo.fr Mon Apr  4 08:37:24 2005
Received: with ECARTIS (v1.0.0; list linux-mips); Mon, 04 Apr 2005 08:37:39 +0100 (BST)
Received: from web25110.mail.ukl.yahoo.com ([IPv6:::ffff:217.12.10.58]:31159
	"HELO web25110.mail.ukl.yahoo.com") by linux-mips.org with SMTP
	id <S8225996AbVDDHhY>; Mon, 4 Apr 2005 08:37:24 +0100
Received: (qmail 12910 invoked by uid 60001); 4 Apr 2005 07:37:18 -0000
Message-ID: <20050404073718.12908.qmail@web25110.mail.ukl.yahoo.com>
Received: from [80.14.198.143] by web25110.mail.ukl.yahoo.com via HTTP; Mon, 04 Apr 2005 09:37:18 CEST
Date:	Mon, 4 Apr 2005 09:37:18 +0200 (CEST)
From:	moreau francis <francis_moreau2000@yahoo.fr>
Subject: Re: How to keep uptodate a mips-linux port
To:	Jan-Benedict Glaw <jbglaw@lug-owl.de>, linux-mips@linux-mips.org
Cc:	moreau francis <francis_moreau2000@yahoo.fr>
In-Reply-To: 6667
MIME-Version: 1.0
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: 8bit
Return-Path: <francis_moreau2000@yahoo.fr>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 7575
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: francis_moreau2000@yahoo.fr
Precedence: bulk
X-list: linux-mips


Jan-Benedict Glaw <jbglaw@lug-owl.de> wrote:
> Don't expect that sending a patch once always leads
> to it's prompt
> acceptance. Pushing a patch *can* involve resending
> it multiple times,
> over a long period of time. However, if a patch is
> in acceptable state
> (that is, a half-way readable coding style, no
> superfluous debugging
> output, ...), Ralf usually takes it quite fast.

Ok, I'll retry.

> That isn't all that easy, especially with CVS and
> especially if you want
> to keep patches in nicely separated changesets. With
> CVS, this
> unfortunately involves some manual work, or clever
> scripting. 

Actually that's what I was looking for...

Cheers.

         Francis



	
	
		
___________________________________________________________________________________________________
Le nouveau Yahoo! Messenger est arrivé ! Découvrez toutes les nouveautés pour dialoguer instantanément avec vos amis. A télécharger gratuitement sur http://fr.messenger.yahoo.com 


From ralf@linux-mips.org Mon Apr  4 11:14:27 2005
Received: with ECARTIS (v1.0.0; list linux-mips); Mon, 04 Apr 2005 11:14:42 +0100 (BST)
Received: from extgw-uk.mips.com ([IPv6:::ffff:62.254.210.129]:36103 "EHLO
	mail.linux-mips.net") by linux-mips.org with ESMTP
	id <S8226014AbVDDKO1>; Mon, 4 Apr 2005 11:14:27 +0100
Received: from dea.linux-mips.net (localhost.localdomain [127.0.0.1])
	by mail.linux-mips.net (8.13.1/8.13.1) with ESMTP id j34AEIXd003795;
	Mon, 4 Apr 2005 11:14:18 +0100
Received: (from ralf@localhost)
	by dea.linux-mips.net (8.13.1/8.13.1/Submit) id j346L6Lh007225;
	Mon, 4 Apr 2005 07:21:06 +0100
Date:	Mon, 4 Apr 2005 07:21:05 +0100
From:	Ralf Baechle <ralf@linux-mips.org>
To:	Ulrich Eckhardt <eckhardt@satorlaser.com>
Cc:	linux-mips@linux-mips.org
Subject: Re: conflicting declaration of prom_getcmdline()
Message-ID: <20050404062105.GA4975@linux-mips.org>
References: <200504011028.04244.eckhardt@satorlaser.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <200504011028.04244.eckhardt@satorlaser.com>
User-Agent: Mutt/1.4.1i
Return-Path: <ralf@linux-mips.org>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 7576
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: ralf@linux-mips.org
Precedence: bulk
X-list: linux-mips

On Fri, Apr 01, 2005 at 10:28:04AM +0200, Ulrich Eckhardt wrote:

> I just stumbled over arch/mips/au1000/common/prom.c, which contains a function 
> defined like this:
>   char* prom_getcmdline(void);
>   EXPORT_SYMBOL(prom_getcmdline);
> while there are implementations that define the function as
>   char* __init prom_getcmdline();
> Further, there are several declarations throughout sourcefiles and in 
> include/asm-mips/mips-boards/prom.h and include/asm-mips/sgialib.h. Just grep 
> for it and you'll see the mess.
> 
> If anyone tells me which one is right and cares to explain why I hereby 
> volunteer to create a patch. ;)

__init was introduced long after prom_getcmdline() and not all definitions
ever got updated.  For prototypes where __init doesn't server any useful
purpose other than for the human reader so we generally don't use it.

You've herewith been volunteered ;-)

  Ralf

From ralf@linux-mips.org Mon Apr  4 12:02:03 2005
Received: with ECARTIS (v1.0.0; list linux-mips); Mon, 04 Apr 2005 12:02:19 +0100 (BST)
Received: from extgw-uk.mips.com ([IPv6:::ffff:62.254.210.129]:18458 "EHLO
	mail.linux-mips.net") by linux-mips.org with ESMTP
	id <S8226016AbVDDLCD>; Mon, 4 Apr 2005 12:02:03 +0100
Received: from dea.linux-mips.net (localhost.localdomain [127.0.0.1])
	by mail.linux-mips.net (8.13.1/8.13.1) with ESMTP id j34B1uIU008104;
	Mon, 4 Apr 2005 12:01:56 +0100
Received: (from ralf@localhost)
	by dea.linux-mips.net (8.13.1/8.13.1/Submit) id j34B1qHB008077;
	Mon, 4 Apr 2005 12:01:52 +0100
Date:	Mon, 4 Apr 2005 12:01:52 +0100
From:	Ralf Baechle <ralf@linux-mips.org>
To:	dfsd df <tomcs163@yahoo.com.cn>
Cc:	linux-mips@linux-mips.org
Subject: Re: questions about early-printk
Message-ID: <20050404110152.GF6016@linux-mips.org>
References: <20050404044953.86817.qmail@web15808.mail.cnb.yahoo.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <20050404044953.86817.qmail@web15808.mail.cnb.yahoo.com>
User-Agent: Mutt/1.4.1i
Return-Path: <ralf@linux-mips.org>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 7577
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: ralf@linux-mips.org
Precedence: bulk
X-list: linux-mips

On Mon, Apr 04, 2005 at 12:49:53PM +0800, dfsd df wrote:

> Hi:
>   Had somebody used early-printk? Now, I'm porting
> linux to a MIPS machine under instructions of "Linux
> MIPS Porting Guide" from junsun.net.

There's an updated version in the www.linux-mips.org wiki.

> But at the first step, I want to modify the source
> code of the barebone program to display "helloworld".
> 
> The program uses memory map addr as the UART device's
> "base addr",and access the UART by adding offset to
> this "base addr".
> 
> The "base addr" is assigned to a constant value. and
> from the other early-printk patchs, the value of "base
> addr" are not equals. So I want to know can I assign
> the right value to this "base addr"?

You haven't even mentioned what hardware you're using so don't expect
answer ...

  Ralf

From geert@linux-m68k.org Mon Apr  4 12:20:20 2005
Received: with ECARTIS (v1.0.0; list linux-mips); Mon, 04 Apr 2005 12:20:36 +0100 (BST)
Received: from witte.sonytel.be ([IPv6:::ffff:80.88.33.193]:34455 "EHLO
	witte.sonytel.be") by linux-mips.org with ESMTP id <S8226016AbVDDLUU>;
	Mon, 4 Apr 2005 12:20:20 +0100
Received: from numbat.sonytel.be (mail.sonytel.be [43.221.60.197])
	by witte.sonytel.be (8.12.10/8.12.10) with ESMTP id j34BKIGU005292;
	Mon, 4 Apr 2005 13:20:18 +0200 (MEST)
Date:	Mon, 4 Apr 2005 13:20:15 +0200 (CEST)
From:	Geert Uytterhoeven <geert@linux-m68k.org>
To:	Ralf Baechle <ralf@linux-mips.org>
cc:	Ulrich Eckhardt <eckhardt@satorlaser.com>,
	Linux/MIPS Development <linux-mips@linux-mips.org>
Subject: Re: conflicting declaration of prom_getcmdline()
In-Reply-To: <20050404062105.GA4975@linux-mips.org>
Message-ID: <Pine.LNX.4.62.0504041318590.14107@numbat.sonytel.be>
References: <200504011028.04244.eckhardt@satorlaser.com>
 <20050404062105.GA4975@linux-mips.org>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Return-Path: <geert@linux-m68k.org>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 7578
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: geert@linux-m68k.org
Precedence: bulk
X-list: linux-mips

On Mon, 4 Apr 2005, Ralf Baechle wrote:
> On Fri, Apr 01, 2005 at 10:28:04AM +0200, Ulrich Eckhardt wrote:
> > I just stumbled over arch/mips/au1000/common/prom.c, which contains a function 
> > defined like this:
> >   char* prom_getcmdline(void);
> >   EXPORT_SYMBOL(prom_getcmdline);
> > while there are implementations that define the function as
> >   char* __init prom_getcmdline();
> > Further, there are several declarations throughout sourcefiles and in 
> > include/asm-mips/mips-boards/prom.h and include/asm-mips/sgialib.h. Just grep 
> > for it and you'll see the mess.
> > 
> > If anyone tells me which one is right and cares to explain why I hereby 
> > volunteer to create a patch. ;)
> 
> __init was introduced long after prom_getcmdline() and not all definitions
> ever got updated.  For prototypes where __init doesn't server any useful
> purpose other than for the human reader so we generally don't use it.

IIRC, there are architectures (alpha?) where __init does matter for prototypes
because a different jump type is used depending on the sections of the caller
and callee.

Gr{oetje,eeting}s,

						Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
							    -- Linus Torvalds

From macro@linux-mips.org Mon Apr  4 12:26:45 2005
Received: with ECARTIS (v1.0.0; list linux-mips); Mon, 04 Apr 2005 12:27:04 +0100 (BST)
Received: from pollux.ds.pg.gda.pl ([IPv6:::ffff:153.19.208.7]:35334 "EHLO
	pollux.ds.pg.gda.pl") by linux-mips.org with ESMTP
	id <S8226016AbVDDL0p>; Mon, 4 Apr 2005 12:26:45 +0100
Received: from localhost (localhost [127.0.0.1])
	by pollux.ds.pg.gda.pl (Postfix) with ESMTP
	id 4DEB2E1C95; Mon,  4 Apr 2005 13:26:30 +0200 (CEST)
Received: from pollux.ds.pg.gda.pl ([127.0.0.1])
 by localhost (pollux [127.0.0.1]) (amavisd-new, port 10024) with ESMTP
 id 24609-07; Mon,  4 Apr 2005 13:26:30 +0200 (CEST)
Received: from piorun.ds.pg.gda.pl (piorun.ds.pg.gda.pl [153.19.208.8])
	by pollux.ds.pg.gda.pl (Postfix) with ESMTP
	id F0FCBE1C88; Mon,  4 Apr 2005 13:26:29 +0200 (CEST)
Received: from blysk.ds.pg.gda.pl (macro@blysk.ds.pg.gda.pl [153.19.208.6])
	by piorun.ds.pg.gda.pl (8.13.1/8.13.1) with ESMTP id j34BQWHf016682;
	Mon, 4 Apr 2005 13:26:32 +0200
Date:	Mon, 4 Apr 2005 12:26:38 +0100 (BST)
From:	"Maciej W. Rozycki" <macro@linux-mips.org>
To:	Thiemo Seufer <ths@networkno.de>
Cc:	linux-mips@linux-mips.org
Subject: Re: CVS Update@linux-mips.org: linux
In-Reply-To: <20050402101135.GB1641@hattusa.textio>
Message-ID: <Pine.LNX.4.61L.0504041214570.20089@blysk.ds.pg.gda.pl>
References: <20050401175340Z8226142-1340+5040@linux-mips.org>
 <20050402101135.GB1641@hattusa.textio>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Virus-Scanned: ClamAV 0.83/804/Mon Apr  4 16:38:58 2005 on piorun.ds.pg.gda.pl
X-Virus-Status:	Clean
X-Virus-Scanned: by amavisd-new at pollux.ds.pg.gda.pl
Return-Path: <macro@linux-mips.org>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 7579
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: macro@linux-mips.org
Precedence: bulk
X-list: linux-mips

On Sat, 2 Apr 2005, Thiemo Seufer wrote:

> > Log message:
> > 	Remove useless casts.  Fix formatting.
> 
> This patch leads for 64bit kernels to:
> 
>   CC      arch/mips/mm/pg-sb1.o
> arch/mips/mm/pg-sb1.c: In function `sb1_dma_init':
> arch/mips/mm/pg-sb1.c:220: warning: cast from pointer to integer of different size
> arch/mips/mm/pg-sb1.c:225: warning: passing arg 2 of `__raw_writeq' discards qualifiers from pointer target type
> arch/mips/mm/pg-sb1.c:226: warning: passing arg 2 of `__raw_writeq' discards qualifiers from pointer target type
> arch/mips/mm/pg-sb1.c:227: warning: passing arg 2 of `__raw_writeq' discards qualifiers from pointer target type

 Thanks for pointing this out.  That "const" shouldn't be on "base_reg" 
there, of course.  I'm committing a fix right now.  My apologies for 
inadequate testing.

> arch/mips/mm/pg-sb1.c: In function `clear_page':
> arch/mips/mm/pg-sb1.c:233: warning: cast from pointer to integer of different size
> arch/mips/mm/pg-sb1.c:237: warning: cast from pointer to integer of different size
> arch/mips/mm/pg-sb1.c: In function `copy_page':
> arch/mips/mm/pg-sb1.c:257: warning: cast from pointer to integer of different size
> arch/mips/mm/pg-sb1.c:258: warning: cast from pointer to integer of different size
> arch/mips/mm/pg-sb1.c:262: warning: cast from pointer to integer of different size
> arch/mips/mm/pg-sb1.c:263: warning: cast from pointer to integer of different size

 These are unrelated.  Essentially "CPHYSADDR(foo)" expands to 
"(int)(foo)" (that is, after having removed some unrelated bits) and it's 
not going to work in a portable way if "foo" is a pointer...  Thanks for 
your report though -- this code needs a rewrite for a proper 64-bit 
support and I'll try to have a look at it.

  Maciej

From ralf@linux-mips.org Mon Apr  4 12:37:15 2005
Received: with ECARTIS (v1.0.0; list linux-mips); Mon, 04 Apr 2005 12:37:50 +0100 (BST)
Received: from extgw-uk.mips.com ([IPv6:::ffff:62.254.210.129]:63774 "EHLO
	mail.linux-mips.net") by linux-mips.org with ESMTP
	id <S8226023AbVDDLhP>; Mon, 4 Apr 2005 12:37:15 +0100
Received: from dea.linux-mips.net (localhost.localdomain [127.0.0.1])
	by mail.linux-mips.net (8.13.1/8.13.1) with ESMTP id j34Bb4bc009362;
	Mon, 4 Apr 2005 12:37:04 +0100
Received: (from ralf@localhost)
	by dea.linux-mips.net (8.13.1/8.13.1/Submit) id j34Bb3VP009360;
	Mon, 4 Apr 2005 12:37:03 +0100
Date:	Mon, 4 Apr 2005 12:37:03 +0100
From:	Ralf Baechle <ralf@linux-mips.org>
To:	Geert Uytterhoeven <geert@linux-m68k.org>
Cc:	Ulrich Eckhardt <eckhardt@satorlaser.com>,
	Linux/MIPS Development <linux-mips@linux-mips.org>
Subject: Re: conflicting declaration of prom_getcmdline()
Message-ID: <20050404113703.GA8538@linux-mips.org>
References: <200504011028.04244.eckhardt@satorlaser.com> <20050404062105.GA4975@linux-mips.org> <Pine.LNX.4.62.0504041318590.14107@numbat.sonytel.be>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <Pine.LNX.4.62.0504041318590.14107@numbat.sonytel.be>
User-Agent: Mutt/1.4.1i
Return-Path: <ralf@linux-mips.org>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 7580
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: ralf@linux-mips.org
Precedence: bulk
X-list: linux-mips

On Mon, Apr 04, 2005 at 01:20:15PM +0200, Geert Uytterhoeven wrote:

> IIRC, there are architectures (alpha?) where __init does matter for prototypes
> because a different jump type is used depending on the sections of the caller
> and callee.

MIPS gcc doesn't do such optimizations - and we'd expect no advantage from
it either because the range of R_MIPS_26 relocations used for jump
instructions is 256MB - unless somebody hits the special case where this
256MB boundary is going straight through the kernel in which case
-mlong-jump would be required anyway, __init or not.

  Ralf

From ralf@linux-mips.org Mon Apr  4 12:52:01 2005
Received: with ECARTIS (v1.0.0; list linux-mips); Mon, 04 Apr 2005 12:52:17 +0100 (BST)
Received: from extgw-uk.mips.com ([IPv6:::ffff:62.254.210.129]:2318 "EHLO
	mail.linux-mips.net") by linux-mips.org with ESMTP
	id <S8226018AbVDDLwB>; Mon, 4 Apr 2005 12:52:01 +0100
Received: from dea.linux-mips.net (localhost.localdomain [127.0.0.1])
	by mail.linux-mips.net (8.13.1/8.13.1) with ESMTP id j34Bptdu009847;
	Mon, 4 Apr 2005 12:51:55 +0100
Received: (from ralf@localhost)
	by dea.linux-mips.net (8.13.1/8.13.1/Submit) id j34Bptau009846;
	Mon, 4 Apr 2005 12:51:55 +0100
Date:	Mon, 4 Apr 2005 12:51:55 +0100
From:	Ralf Baechle <ralf@linux-mips.org>
To:	linux-mips@linux-mips.org,
	moreau francis <francis_moreau2000@yahoo.fr>
Subject: Re: How to keep uptodate a mips-linux port
Message-ID: <20050404115155.GI6016@linux-mips.org>
References: <20050401075417.14596.qmail@web25106.mail.ukl.yahoo.com> <20050401083147.GQ21175@lug-owl.de>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <20050401083147.GQ21175@lug-owl.de>
User-Agent: Mutt/1.4.1i
Return-Path: <ralf@linux-mips.org>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 7581
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: ralf@linux-mips.org
Precedence: bulk
X-list: linux-mips

On Fri, Apr 01, 2005 at 10:31:47AM +0200, Jan-Benedict Glaw wrote:

> > I already tried this one, and it doens't seem to be
> > the best one: I sent a patch a couple of months ago
> > to the list, but I didn't get any answers...so I beg
> > for Ralf to look at it on IRC, but he seems to have 
> > not time for it...So now I'm trying to find out a new
> > approach....
> 
> Don't expect that sending a patch once always leads to it's prompt
> acceptance. Pushing a patch *can* involve resending it multiple times,
> over a long period of time. However, if a patch is in acceptable state
> (that is, a half-way readable coding style, no superfluous debugging
> output, ...), Ralf usually takes it quite fast.

Unless he's on vacation and tries to be a happy man by avoiding email
software ;-)

> > Futhermore, this solution can take several months
> > before every patches have been submitted and accepted.
> > During this while I'll need to be synchronised with
> > CVS tree.
> 
> That isn't all that easy, especially with CVS and especially if you want
> to keep patches in nicely separated changesets. With CVS, this
> unfortunately involves some manual work, or clever scripting. But SCM
> systems are a totally different topic. "quilt" may work for you, though.

I recommend Quilt which is availalble from Savannah.  It's done a great
job for me in developping and maintaining a bunch of patches independant
of each other.

  Ralf

From greg.weeks@timesys.com Mon Apr  4 14:28:54 2005
Received: with ECARTIS (v1.0.0; list linux-mips); Mon, 04 Apr 2005 14:29:11 +0100 (BST)
Received: from mail.timesys.com ([IPv6:::ffff:65.117.135.102]:18781 "EHLO
	exchange.timesys.com") by linux-mips.org with ESMTP
	id <S8226024AbVDDN2y>; Mon, 4 Apr 2005 14:28:54 +0100
Received: from [192.168.2.27] ([192.168.2.27]) by exchange.timesys.com with Microsoft SMTPSVC(5.0.2195.6713);
	 Mon, 4 Apr 2005 09:24:50 -0400
Message-ID: <42514113.9060902@timesys.com>
Date:	Mon, 04 Apr 2005 09:28:51 -0400
From:	Greg Weeks <greg.weeks@timesys.com>
User-Agent: Mozilla Thunderbird 1.0 (X11/20041206)
X-Accept-Language: en-us, en
MIME-Version: 1.0
To:	linux-mips@linux-mips.org
Subject: malta 4kc machine check
Content-Type: multipart/mixed;
 boundary="------------060304000905080105090008"
X-OriginalArrivalTime: 04 Apr 2005 13:24:50.0640 (UTC) FILETIME=[AE042500:01C53919]
Return-Path: <greg.weeks@timesys.com>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 7582
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: greg.weeks@timesys.com
Precedence: bulk
X-list: linux-mips

This is a multi-part message in MIME format.
--------------060304000905080105090008
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit

I'm getting a machine check on a malta 4kc when userland starts up. This 
was built from a copy of the malta tree from Friday. Has anyone else ran 
into this?

Greg Weeks

--------------060304000905080105090008
Content-Type: text/plain;
 name="malta.fail.txt"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
 filename="malta.fail.txt"

YAMON ROM Monitor, Revision 02.06.
Copyright (c) 1999-2004 MIPS Technologies, Inc. - All Rights Reserved.
 
For a list of available commands, type 'help'.
 
Compilation time =              Mar 23 2004  16:50:44
Board type/revision =           0x02 (Malta) / 0x00
Core board type/revision =      0x01 (CoreLV) / 0x01
System controller/revision =    Galileo / GT_64120A-B-1
FPGA revision =                 0x0001
MAC address =                   00.d0.a0.00.01.9a
Board S/N =                     0000000162
PCI bus frequency =             33.33 MHz
Processor Company ID/options =  0x01 (MIPS Technologies, Inc.) / 0x00
Processor ID/revision =         0x80 (MIPS 4Kc) / 0x01
Endianness =                    Little
CPU/Bus frequency =             80 MHz / 40 MHz
Flash memory size =             4 MByte
SDRAM size =                    64 MByte
First free SDRAM address =      0x800b3850
 
YAMON> load
About to load tftp://192.168.25.2/vmlinux.srec
Press Ctrl-C to break
........................................
........................................
........................................
........................................
........................................
........................................
........................................
........................................
........................................
..............
Start = 0x803cc000, range = (0x80100000,0x803ee084), format = SREC
YAMON> go . ip=dhcp
 
LINUX started...
Config serial console: console=ttyS0,38400n8r
Linux version 2.6.12-rc1 (gweeks@tanith.timesys.com) (gcc version 3.4.1 20040714 (TimeSys 3.4.1-7)) #2 Mon Apr 4 09:15:04 EDT 2005
CPU revision is: 00018001
Determined physical RAM map:
 memory: 00001000 @ 00000000 (reserved)
 memory: 000ef000 @ 00001000 (ROM data)
 memory: 00322000 @ 000f0000 (reserved)
 memory: 03bee000 @ 00412000 (usable)
Built 1 zonelists
Kernel command line: ip=dhcp console=ttyS0,38400n8r
Primary instruction cache 16kB, physically tagged, 4-way, linesize 16 bytes.
Primary data cache 16kB, 4-way, linesize 16 bytes.
Synthesized TLB refill handler (19 instructions).
3c1b8041
401a4000
8f7b1018
001ad582
001ad080
037ad821
401a2000
8f7b0000
001ad042
335a0ff8
037ad821
8f7a0000
8f7b0004
001ad182
409a1000
001bd982
409b1800
42000006
42000018
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
Synthesized TLB load handler fastpath (31 instructions).
3c1b8041
401a4000
8f7b1018
001ad582
001ad080
037ad821
401a4000
8f7b0000
001ad282
335a0ffc
037ad821
8f7a0000
42000008
335a0003
3b5a0003
1740000d
8f7a0000
375a0088
af7a0000
377b0004
3b7b0004
8f7a0000
8f7b0004
001ad182
409a1000
001bd982
409b1800
42000002
42000018
08042e6c
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
Synthesized TLB store handler fastpath (31 instructions).
3c1b8041
401a4000
8f7b1018
001ad582
001ad080
037ad821
401a4000
8f7b0000
001ad282
335a0ffc
037ad821
8f7a0000
42000008
335a0005
3b5a0005
1740000d
8f7a0000
375a0198
af7a0000
377b0004
3b7b0004
8f7a0000
8f7b0004
001ad182
409a1000
001bd982
409b1800
42000002
42000018
08042eaf
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
Synthesized TLB modify handler fastpath (30 instructions).
3c1b8041
401a4000
8f7b1018
001ad582
001ad080
037ad821
401a4000
8f7b0000
001ad282
335a0ffc
037ad821
8f7a0000
42000008
335a0004
1340000d
8f7a0000
375a0198
af7a0000
377b0004
3b7b0004
8f7a0000
8f7b0004
001ad182
409a1000
001bd982
409b1800
42000002
42000018
08042eaf
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
PID hash table entries: 512 (order: 9, 8192 bytes)
CPU frequency 80.00 MHz
Using 40.001 MHz high precision timer.
Console: colour dummy device 80x25
Dentry cache hash table entries: 16384 (order: 4, 65536 bytes)
Inode-cache hash table entries: 8192 (order: 3, 32768 bytes)
Memory: 60672k/61368k available (2206k kernel code, 628k reserved, 653k data, 140k init, 0k highmem)
Mount-cache hash table entries: 512
Checking for 'wait' instruction...  available.
NET: Registered protocol family 16
VFS: Disk quotas dquot_6.5.1
Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
Installing knfsd (copyright (C) 1996 okir@monad.swb.de).
Initializing Cryptographic API
Real Time Clock Driver v1.12a
Serial: 8250/16550 driver $Revision: 1.90 $ 8 ports, IRQ sharing disabled
ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A
ttyS1 at I/O 0x2f8 (irq = 3) is a 16550A
io scheduler noop registered
io scheduler anticipatory registered
io scheduler deadline registered
io scheduler cfq registered
RAMDISK driver initialized: 16 RAM disks of 4096K size 1024 blocksize
pcnet32.c:v1.30i 06.28.2004 tsbogend@alpha.franken.de
pcnet32: PCnet/FAST III 79C973 at 0x1060, 00 d0 a0 00 01 9a assigned IRQ 10.
eth0: registered as PCnet/FAST III 79C973
pcnet32: 1 cards_found.
Uniform Multi-Platform E-IDE driver Revision: 7.00alpha2
ide: Assuming 33MHz system bus speed for PIO modes; override with idebus=xx
PIIX4: IDE controller at PCI slot 0000:00:0a.1
PIIX4: chipset revision 1
PIIX4: not 100% native mode: will probe irqs later
    ide0: BM-DMA at 0x1080-0x1087, BIOS settings: hda:pio, hdb:pio
    ide1: BM-DMA at 0x1088-0x108f, BIOS settings: hdc:pio, hdd:pio
mice: PS/2 mouse device common for all mice
NET: Registered protocol family 2
IP: routing cache hash table of 512 buckets, 4Kbytes
TCP established hash table entries: 4096 (order: 3, 32768 bytes)
TCP bind hash table entries: 4096 (order: 2, 16384 bytes)
TCP: Hash tables configured (established 4096 bind 4096)
NET: Registered protocol family 1
NET: Registered protocol family 17
NET: Registered protocol family 15
eth0: link up, 100Mbps, half-duplex, lpa 0x40A1
Sending DHCP requests ., OK
IP-Config: Got DHCP answer from 192.168.25.2, my address is 192.168.25.4
IP-Config: Complete:
      device=eth0, addr=192.168.25.4, mask=255.255.255.0, gw=255.255.255.255,
     host=192.168.25.4, domain=, nis-domain=(none),
     bootserver=192.168.25.2, rootserver=192.168.25.2, rootpath=/opt/timesys/linux/6.0/mipsel-std/rfs
Looking up port of RPC 100003/2 on 192.168.25.2
Looking up port of RPC 100005/1 on 192.168.25.2
VFS: Mounted root (nfs filesystem) readonly.
Freeing prom memory: 956kb freed
Freeing unused kernel memory: 1096k freed
Algorithmics/MIPS FPU Emulator v1.5
INIT: version 2.84 booting
Executing first boot commands
Got mcheck at 2ac5abbc
Cpu 0
$ 0   : 00000000 1000fc01 100119cc 10010000
$ 4   : 000000ff ffffffe0 100115b0 100115a8
$ 8   : 2ad24d90 00000048 00000021 ffffffec
$12   : fffffffe 00000000 00000048 2ad23d40
$16   : 10000d60 000002ca 10012320 00000000
$20   : ffffffff 00000000 ffffffff 00000000
$24   : 00000000 2ac5abac
$28   : 2ad2a0a0 7f8fa988 100120b8 004123cc
Hi    : ffa1c549
Lo    : a17c6bd5
epc   : 2ac5abbc 0x2ac5abbc     Not tainted
ra    : 004123cc 0x4123cc
Status: 0020fc13    USER EXL IE
Cause : 00800060
PrId  : 00018001
                 
Index:  0 pgmask=4kb va=2ab90000 asid=10
                        [pa=00036000 c=3 d=0 v=1 g=0]
                        [pa=00037000 c=3 d=0 v=1 g=0]
                                                      
Index:  1 pgmask=4kb va=2ab96000 asid=10
                        [pa=00023000 c=3 d=0 v=1 g=0]
                        [pa=00024000 c=3 d=0 v=1 g=0]
                                                      
Index:  2 pgmask=4kb va=80004000 asid=00
                        [pa=00000000 c=0 d=0 v=0 g=0]
                        [pa=00000000 c=0 d=0 v=0 g=0]
                                                      
Index:  3 pgmask=4kb va=1000a000 asid=12
                        [pa=011dc000 c=3 d=0 v=1 g=0]
                        [pa=011cc000 c=3 d=0 v=0 g=0]
                                                      
Index:  4 pgmask=4kb va=2ac5a000 asid=12
                        [pa=000a6000 c=3 d=0 v=1 g=0]
                        [pa=000a7000 c=3 d=0 v=0 g=0]
                                                      
Index:  5 pgmask=4kb va=2ad22000 asid=12
                        [pa=011bf000 c=3 d=0 v=1 g=0]
                        [pa=005b7000 c=3 d=1 v=1 g=0]
                                                      
Index:  6 pgmask=4kb va=7f8fa000 asid=10
                        [pa=0116d000 c=3 d=1 v=1 g=0]
                        [pa=00000000 c=0 d=0 v=0 g=0]
                                                      
Index:  7 pgmask=4kb va=2ac02000 asid=12
                        [pa=01131000 c=3 d=0 v=1 g=0]
                        [pa=01132000 c=3 d=0 v=0 g=0]
                                                      
Index:  8 pgmask=4kb va=10010000 asid=12
                        [pa=00514000 c=3 d=0 v=0 g=0]
                        [pa=005b8000 c=3 d=1 v=1 g=0]
                                                      
Index:  9 pgmask=4kb va=80012000 asid=00
                        [pa=00000000 c=0 d=0 v=0 g=0]
                        [pa=00000000 c=0 d=0 v=0 g=0]
                                                      
Index: 10 pgmask=4kb va=10006000 asid=12
                        [pa=011c9000 c=3 d=0 v=1 g=0]
                        [pa=0115c000 c=3 d=0 v=1 g=0]
                                                      
Index: 11 pgmask=4kb va=2abfc000 asid=12
                        [pa=00086000 c=3 d=0 v=0 g=0]
                        [pa=00087000 c=3 d=0 v=1 g=0]
                                                      
Index: 12 pgmask=4kb va=2ad24000 asid=12
                        [pa=011ca000 c=3 d=0 v=0 g=0]
                        [pa=00553000 c=3 d=0 v=1 g=0]
                                                      
Index: 13 pgmask=4kb va=10004000 asid=12
                        [pa=00000000 c=0 d=0 v=0 g=0]
                        [pa=011be000 c=3 d=0 v=1 g=0]
                                                      
Index: 14 pgmask=4kb va=00410000 asid=10
                        [pa=011b0000 c=3 d=0 v=1 g=0]
                        [pa=011b1000 c=3 d=0 v=1 g=0]
                                                      
Index: 15 pgmask=4kb va=7f8fa000 asid=12
                        [pa=005b6000 c=3 d=1 v=1 g=0]
                        [pa=00000000 c=0 d=0 v=0 g=0]
                                                      
Kernel panic - not syncing: Caught Machine Check exception - caused by multiple matching entries in the TLB.
                             


--------------060304000905080105090008--

From macro@linux-mips.org Mon Apr  4 14:42:28 2005
Received: with ECARTIS (v1.0.0; list linux-mips); Mon, 04 Apr 2005 14:42:43 +0100 (BST)
Received: from pollux.ds.pg.gda.pl ([IPv6:::ffff:153.19.208.7]:15622 "EHLO
	pollux.ds.pg.gda.pl") by linux-mips.org with ESMTP
	id <S8226027AbVDDNm2>; Mon, 4 Apr 2005 14:42:28 +0100
Received: from localhost (localhost [127.0.0.1])
	by pollux.ds.pg.gda.pl (Postfix) with ESMTP
	id 74719E1C95; Mon,  4 Apr 2005 15:42:19 +0200 (CEST)
Received: from pollux.ds.pg.gda.pl ([127.0.0.1])
 by localhost (pollux [127.0.0.1]) (amavisd-new, port 10024) with ESMTP
 id 26912-07; Mon,  4 Apr 2005 15:42:19 +0200 (CEST)
Received: from piorun.ds.pg.gda.pl (piorun.ds.pg.gda.pl [153.19.208.8])
	by pollux.ds.pg.gda.pl (Postfix) with ESMTP
	id 386E9E1C6D; Mon,  4 Apr 2005 15:42:19 +0200 (CEST)
Received: from blysk.ds.pg.gda.pl (macro@blysk.ds.pg.gda.pl [153.19.208.6])
	by piorun.ds.pg.gda.pl (8.13.1/8.13.1) with ESMTP id j34DgHtx022483;
	Mon, 4 Apr 2005 15:42:22 +0200
Date:	Mon, 4 Apr 2005 14:42:25 +0100 (BST)
From:	"Maciej W. Rozycki" <macro@linux-mips.org>
To:	Greg Weeks <greg.weeks@timesys.com>
Cc:	linux-mips@linux-mips.org
Subject: Re: malta 4kc machine check
In-Reply-To: <42514113.9060902@timesys.com>
Message-ID: <Pine.LNX.4.61L.0504041437441.20089@blysk.ds.pg.gda.pl>
References: <42514113.9060902@timesys.com>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Virus-Scanned: ClamAV 0.83/804/Mon Apr  4 16:38:58 2005 on piorun.ds.pg.gda.pl
X-Virus-Status:	Clean
X-Virus-Scanned: by amavisd-new at pollux.ds.pg.gda.pl
Return-Path: <macro@linux-mips.org>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 7583
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: macro@linux-mips.org
Precedence: bulk
X-list: linux-mips

On Mon, 4 Apr 2005, Greg Weeks wrote:

> I'm getting a machine check on a malta 4kc when userland starts up. This was
> built from a copy of the malta tree from Friday. Has anyone else ran into
> this?

 This is being resolved -- please try this patch for now.

  Maciej

diff -up --recursive --new-file linux-mips-2.6.11-rc2-20050202.macro/arch/mips/mm/tlbex.c linux-mips-2.6.11-rc2-20050202/arch/mips/mm/tlbex.c
--- linux-mips-2.6.11-rc2-20050202.macro/arch/mips/mm/tlbex.c	2005-01-13 19:15:04.000000000 +0000
+++ linux-mips-2.6.11-rc2-20050202/arch/mips/mm/tlbex.c	2005-02-05 01:35:00.000000000 +0000
@@ -1621,7 +1620,6 @@ build_r4000_tlbchange_handler_head(u32 *
 	l_smp_pgtable_change(l, *p);
 # endif
 	iPTE_LW(p, l, pte, 0, ptr); /* get even pte */
-	build_tlb_probe_entry(p);
 }
 
 static void __init
@@ -1662,6 +1660,7 @@ static void __init build_r4000_tlb_load_
 
 	build_r4000_tlbchange_handler_head(&p, &l, &r, K0, K1);
 	build_pte_present(&p, &l, &r, K0, K1, label_nopage_tlbl);
+	build_tlb_probe_entry(&p);
 	build_make_valid(&p, &r, K0, K1);
 	build_r4000_tlbchange_handler_tail(&p, &l, &r, K0, K1);
 
@@ -1701,6 +1700,7 @@ static void __init build_r4000_tlb_store
 
 	build_r4000_tlbchange_handler_head(&p, &l, &r, K0, K1);
 	build_pte_writable(&p, &l, &r, K0, K1, label_nopage_tlbs);
+	build_tlb_probe_entry(&p);
 	build_make_write(&p, &r, K0, K1);
 	build_r4000_tlbchange_handler_tail(&p, &l, &r, K0, K1);
 
@@ -1740,6 +1740,7 @@ static void __init build_r4000_tlb_modif
 
 	build_r4000_tlbchange_handler_head(&p, &l, &r, K0, K1);
 	build_pte_modifiable(&p, &l, &r, K0, K1, label_nopage_tlbm);
+	build_tlb_probe_entry(&p);
 	/* Present and writable bits set, set accessed and dirty bits. */
 	build_make_write(&p, &r, K0, K1);
 	build_r4000_tlbchange_handler_tail(&p, &l, &r, K0, K1);

From tomcs163@yahoo.com.cn Mon Apr  4 14:49:30 2005
Received: with ECARTIS (v1.0.0; list linux-mips); Mon, 04 Apr 2005 14:49:44 +0100 (BST)
Received: from web15804.mail.cnb.yahoo.com ([IPv6:::ffff:202.165.102.84]:27264
	"HELO web15804.mail.cnb.yahoo.com") by linux-mips.org with SMTP
	id <S8226027AbVDDNta>; Mon, 4 Apr 2005 14:49:30 +0100
Message-ID: <20050404134918.29726.qmail@web15804.mail.cnb.yahoo.com>
Received: from [221.218.14.94] by web15804.mail.cnb.yahoo.com via HTTP; Mon, 04 Apr 2005 21:49:18 CST
Date:	Mon, 4 Apr 2005 21:49:18 +0800 (CST)
From:	dfsd df <tomcs163@yahoo.com.cn>
Subject: Re: questions about early-printk
To:	linux-mips@linux-mips.org
In-Reply-To: 6667
MIME-Version: 1.0
Content-Type: text/plain; charset=gb2312
Content-Transfer-Encoding: 8bit
Return-Path: <tomcs163@yahoo.com.cn>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 7584
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: tomcs163@yahoo.com.cn
Precedence: bulk
X-list: linux-mips

Sorry, It's still Malta board, MIPS4Kc cpu. the UART
is ti16c550c.

The source code at junsun.net is :
------------------------------------------------------
#include "uart16550.h" 

/* === CONFIG === */ 

#define BASE 0xb0000080
------------------------------------------------------

From the MALTA board manual, I can get "BASE"'s
physical addr is 0x1f000900.
What I want to know is how to get "BASE"'s memory
mapped virtual addr correctly?for this example: the
virtual addr is 0xb0000080.

Thanks!

--- Ralf Baechle <ralf@linux-mips.org> wrote:
> On Mon, Apr 04, 2005 at 12:49:53PM +0800, dfsd df
> wrote:
> 
> > Hi:
> >   Had somebody used early-printk? Now, I'm porting
> > linux to a MIPS machine under instructions of
> "Linux
> > MIPS Porting Guide" from junsun.net.
> 
> There's an updated version in the www.linux-mips.org
> wiki.
> 
> > But at the first step, I want to modify the source
> > code of the barebone program to display
> "helloworld".
> > 
> > The program uses memory map addr as the UART
> device's
> > "base addr",and access the UART by adding offset
> to
> > this "base addr".
> > 
> > The "base addr" is assigned to a constant value.
> and
> > from the other early-printk patchs, the value of
> "base
> > addr" are not equals. So I want to know can I
> assign
> > the right value to this "base addr"?
> 
> You haven't even mentioned what hardware you're
> using so don't expect
> answer ...
> 
>   Ralf
> 
> 

_________________________________________________________
Do You Yahoo!?
150ÍòÇúMP3·è¿ñËÑ£¬´øÄú´³ÈëÒôÀÖµîÌÃ
http://music.yisou.com/
ÃÀÅ®Ã÷ÐÇÓ¦ÓÐ¾¡ÓÐ£¬ËÑ±éÃÀÍ¼¡¢ÑÞÍ¼ºÍ¿áÍ¼
http://image.yisou.com
1G¾ÍÊÇ1000Õ×£¬ÑÅ»¢µçÓÊ×ÔÖúÀ©ÈÝ£¡
http://cn.rd.yahoo.com/mail_cn/tag/1g/*http://cn.mail.yahoo.com/event/mail_1g/

From greg.weeks@timesys.com Mon Apr  4 14:54:27 2005
Received: with ECARTIS (v1.0.0; list linux-mips); Mon, 04 Apr 2005 14:54:41 +0100 (BST)
Received: from mail.timesys.com ([IPv6:::ffff:65.117.135.102]:52002 "EHLO
	exchange.timesys.com") by linux-mips.org with ESMTP
	id <S8226027AbVDDNy1>; Mon, 4 Apr 2005 14:54:27 +0100
Received: from [192.168.2.27] ([192.168.2.27]) by exchange.timesys.com with Microsoft SMTPSVC(5.0.2195.6713);
	 Mon, 4 Apr 2005 09:50:20 -0400
Message-ID: <4251470C.4050901@timesys.com>
Date:	Mon, 04 Apr 2005 09:54:20 -0400
From:	Greg Weeks <greg.weeks@timesys.com>
User-Agent: Mozilla Thunderbird 1.0 (X11/20041206)
X-Accept-Language: en-us, en
MIME-Version: 1.0
To:	"Maciej W. Rozycki" <macro@linux-mips.org>
CC:	linux-mips@linux-mips.org
Subject: Re: malta 4kc machine check
References: <42514113.9060902@timesys.com> <Pine.LNX.4.61L.0504041437441.20089@blysk.ds.pg.gda.pl>
In-Reply-To: <Pine.LNX.4.61L.0504041437441.20089@blysk.ds.pg.gda.pl>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-OriginalArrivalTime: 04 Apr 2005 13:50:20.0593 (UTC) FILETIME=[3DF07210:01C5391D]
Return-Path: <greg.weeks@timesys.com>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 7585
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: greg.weeks@timesys.com
Precedence: bulk
X-list: linux-mips

Maciej W. Rozycki wrote:

>On Mon, 4 Apr 2005, Greg Weeks wrote:
>
>  
>
>>I'm getting a machine check on a malta 4kc when userland starts up. This was
>>built from a copy of the malta tree from Friday. Has anyone else ran into
>>this?
>>    
>>
>
> This is being resolved -- please try this patch for now.
>
>  
>
Pretty much the same problem. I can post the log if it's useful.

Greg Weeks

From gill.robles@exterity.co.uk Mon Apr  4 15:38:41 2005
Received: with ECARTIS (v1.0.0; list linux-mips); Mon, 04 Apr 2005 15:38:55 +0100 (BST)
Received: from no-dns-yet.demon.co.uk ([IPv6:::ffff:83.104.11.251]:65185 "EHLO
	exterity.co.uk") by linux-mips.org with ESMTP id <S8226026AbVDDOil> convert rfc822-to-8bit;
	Mon, 4 Apr 2005 15:38:41 +0100
Received: from gillpc ([192.168.0.32]) by exterity.co.uk with Microsoft SMTPSVC(6.0.3790.211);
	 Mon, 4 Apr 2005 15:40:19 +0100
From:	"Gill" <gill.robles@exterity.co.uk>
To:	<linux-mips@linux-mips.org>
Subject: No PCI memory response
Date:	Mon, 4 Apr 2005 15:44:51 +0100
Organization: Exterity
Message-ID: <000001c53924$db7c75e0$2000a8c0@gillpc>
MIME-Version: 1.0
Content-Type: text/plain;
	charset="us-ascii"
Content-Transfer-Encoding: 8BIT
X-Priority: 3 (Normal)
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook, Build 10.0.6626
Importance: Normal
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
X-OriginalArrivalTime: 04 Apr 2005 14:40:19.0656 (UTC) FILETIME=[39852480:01C53924]
Return-Path: <gill.robles@exterity.co.uk>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 7586
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: gill.robles@exterity.co.uk
Precedence: bulk
X-list: linux-mips

Can anyone help?  We're trying to talk to a RealTek RTL8139 device across
the PCI bus, and, although linux can access configuration registers on the
device, it does not access memory space correctly, and we are unable to read
back any sensible values from the RTL8139 registers. 

We are using the latest 2.6 linux on an Alchemy DB1550 board.

Any help would be much appreciated!


Gill


From greg.weeks@timesys.com Mon Apr  4 15:51:37 2005
Received: with ECARTIS (v1.0.0; list linux-mips); Mon, 04 Apr 2005 15:51:51 +0100 (BST)
Received: from mail.timesys.com ([IPv6:::ffff:65.117.135.102]:31856 "EHLO
	exchange.timesys.com") by linux-mips.org with ESMTP
	id <S8226044AbVDDOvh>; Mon, 4 Apr 2005 15:51:37 +0100
Received: from [192.168.2.27] ([192.168.2.27]) by exchange.timesys.com with Microsoft SMTPSVC(5.0.2195.6713);
	 Mon, 4 Apr 2005 10:47:33 -0400
Message-ID: <42515476.4060501@timesys.com>
Date:	Mon, 04 Apr 2005 10:51:34 -0400
From:	Greg Weeks <greg.weeks@timesys.com>
User-Agent: Mozilla Thunderbird 1.0 (X11/20041206)
X-Accept-Language: en-us, en
MIME-Version: 1.0
To:	Greg Weeks <greg.weeks@timesys.com>
CC:	"Maciej W. Rozycki" <macro@linux-mips.org>,
	linux-mips@linux-mips.org
Subject: Re: malta 4kc machine check
References: <42514113.9060902@timesys.com> <Pine.LNX.4.61L.0504041437441.20089@blysk.ds.pg.gda.pl> <4251470C.4050901@timesys.com>
In-Reply-To: <4251470C.4050901@timesys.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-OriginalArrivalTime: 04 Apr 2005 14:47:33.0593 (UTC) FILETIME=[3C2AAC90:01C53925]
Return-Path: <greg.weeks@timesys.com>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 7587
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: greg.weeks@timesys.com
Precedence: bulk
X-list: linux-mips

Greg Weeks wrote:

> Maciej W. Rozycki wrote:
>
>> On Mon, 4 Apr 2005, Greg Weeks wrote:
>>
>>  
>>
>>> I'm getting a machine check on a malta 4kc when userland starts up. 
>>> This was
>>> built from a copy of the malta tree from Friday. Has anyone else ran 
>>> into
>>> this?
>>>   
>>
>>
>> This is being resolved -- please try this patch for now.
>>
>>  
>>
> Pretty much the same problem. I can post the log if it's useful.

For some reason it didn't get rebuilt. Another try seems to work with 
this patch.

Greg Weeks

From eckhardt@satorlaser.com Mon Apr  4 15:52:13 2005
Received: with ECARTIS (v1.0.0; list linux-mips); Mon, 04 Apr 2005 15:52:33 +0100 (BST)
Received: from moutng.kundenserver.de ([IPv6:::ffff:212.227.126.190]:4093 "EHLO
	moutng.kundenserver.de") by linux-mips.org with ESMTP
	id <S8226049AbVDDOwI>; Mon, 4 Apr 2005 15:52:08 +0100
Received: from [212.227.126.205] (helo=mrelayng.kundenserver.de)
	by moutng.kundenserver.de with esmtp (Exim 3.35 #1)
	id 1DISvv-0007ey-00
	for linux-mips@linux-mips.org; Mon, 04 Apr 2005 16:52:07 +0200
Received: from [213.39.254.66] (helo=tuxator.satorlaser-intern.com)
	by mrelayng.kundenserver.de with asmtp (TLSv1:RC4-MD5:128)
	(Exim 3.35 #1)
	id 1DISvu-0005J8-00
	for linux-mips@linux-mips.org; Mon, 04 Apr 2005 16:52:06 +0200
From:	Ulrich Eckhardt <eckhardt@satorlaser.com>
Organization: Sator Laser GmbH
To:	linux-mips@linux-mips.org
Subject: Re: No PCI memory response
Date:	Mon, 4 Apr 2005 16:52:33 +0200
User-Agent: KMail/1.7.1
References: <000001c53924$db7c75e0$2000a8c0@gillpc>
In-Reply-To: <000001c53924$db7c75e0$2000a8c0@gillpc>
MIME-Version: 1.0
Content-Type: text/plain;
  charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
Message-Id: <200504041652.33950.eckhardt@satorlaser.com>
X-Provags-ID: kundenserver.de abuse@kundenserver.de auth:e35cee35a663f5c944b9750a965814ae
Return-Path: <eckhardt@satorlaser.com>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 7588
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: eckhardt@satorlaser.com
Precedence: bulk
X-list: linux-mips

Gill wrote:
> Can anyone help?  We're trying to talk to a RealTek RTL8139 device across
> the PCI bus, and, although linux can access configuration registers on the
> device, it does not access memory space correctly, and we are unable to
> read back any sensible values from the RTL8139 registers.
>
> We are using the latest 2.6 linux on an Alchemy DB1550 board.

Random reads, discarded data after writing? I had the same problem and solved 
it by simply configuring the static bus controller of my Au1100 properly (of 
which before I didn't even know it existed...).

hth

Uli

From priya@procsys.com Mon Apr  4 15:55:49 2005
Received: with ECARTIS (v1.0.0; list linux-mips); Mon, 04 Apr 2005 15:56:03 +0100 (BST)
Received: from dsl-KK-026.199.95.61.touchtelindia.net ([IPv6:::ffff:61.95.199.26]:33930
	"EHLO trishul.procsys.com") by linux-mips.org with ESMTP
	id <S8226049AbVDDOzt>; Mon, 4 Apr 2005 15:55:49 +0100
Received: from procsys.com ([192.168.1.128])
	by trishul.procsys.com (8.12.10/8.12.10) with ESMTP id j34EY5Co018367
	for <linux-mips@linux-mips.org>; Mon, 4 Apr 2005 20:04:05 +0530
Message-ID: <42515544.A25E860@procsys.com>
Date:	Mon, 04 Apr 2005 20:25:00 +0530
From:	priya <priya@procsys.com>
X-Mailer: Mozilla 4.7 [en] (WinNT; I)
X-Accept-Language: en
MIME-Version: 1.0
To:	linux-mips@linux-mips.org
Subject: Porting davicom driver to pmon
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-ProcSys-Com-Anti-Virus-Mail-Filter-Virus-Found: no
Return-Path: <priya@procsys.com>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 7589
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: priya@procsys.com
Precedence: bulk
X-list: linux-mips

Hi,
I am using a custom board which has mips
processor and davicom ethernet chip. Iam
using pmon bootloader. Has anyone ported
davicom driver for pmon. Iam facing a
lot of problem in sending even a set up
frame

regards
priya


From eckhardt@satorlaser.com Mon Apr  4 16:17:02 2005
Received: with ECARTIS (v1.0.0; list linux-mips); Mon, 04 Apr 2005 16:17:18 +0100 (BST)
Received: from moutng.kundenserver.de ([IPv6:::ffff:212.227.126.185]:9214 "EHLO
	moutng.kundenserver.de") by linux-mips.org with ESMTP
	id <S8226053AbVDDPRC>; Mon, 4 Apr 2005 16:17:02 +0100
Received: from [212.227.126.161] (helo=mrelayng.kundenserver.de)
	by moutng.kundenserver.de with esmtp (Exim 3.35 #1)
	id 1DITK0-0000QK-00
	for linux-mips@linux-mips.org; Mon, 04 Apr 2005 17:17:00 +0200
Received: from [213.39.254.66] (helo=tuxator.satorlaser-intern.com)
	by mrelayng.kundenserver.de with asmtp (TLSv1:RC4-MD5:128)
	(Exim 3.35 #1)
	id 1DITK0-0004jD-00
	for linux-mips@linux-mips.org; Mon, 04 Apr 2005 17:17:00 +0200
From:	Ulrich Eckhardt <eckhardt@satorlaser.com>
Organization: Sator Laser GmbH
To:	linux-mips@linux-mips.org
Subject: Au1100 FB driver uplift for 2.6
Date:	Mon, 4 Apr 2005 17:17:28 +0200
User-Agent: KMail/1.7.1
MIME-Version: 1.0
Content-Type: text/plain;
  charset="utf-8"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
Message-Id: <200504041717.29098.eckhardt@satorlaser.com>
X-Provags-ID: kundenserver.de abuse@kundenserver.de auth:e35cee35a663f5c944b9750a965814ae
Return-Path: <eckhardt@satorlaser.com>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 7590
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: eckhardt@satorlaser.com
Precedence: bulk
X-list: linux-mips

Greetings!

I'm just looking at these changes and I'm delighted to finally see them in. 
However, I have one small problem: the old version allowed to program EXTCLK1 
and the LCD controller clock via 'mode_toyclksrc' in the panel configuration 
database[1], but this has been removed (also the 'mode_backlight' member, 
btw).
FYI, on the TTP1100[2], the pixelclock for some displays types is created via 
EXTCLK1 which doesn't work anymore, which is why I'm asking.

Am I on the wrong way or should I just reimplement it and send a patch?

Uli

[1] I have a few nits on that, too: IMHO it could be made constant and marked 
as '__initdata' so it is discarded after initialization.
[2] Based on DB1100. Are there any pointers on how to port to a new board, 
btw?

From Brad_Larson@pmc-sierra.com Mon Apr  4 18:39:07 2005
Received: with ECARTIS (v1.0.0; list linux-mips); Mon, 04 Apr 2005 18:39:24 +0100 (BST)
Received: from mother.pmc-sierra.com ([IPv6:::ffff:216.241.224.12]:61869 "HELO
	mother.pmc-sierra.bc.ca") by linux-mips.org with SMTP
	id <S8226056AbVDDRjH>; Mon, 4 Apr 2005 18:39:07 +0100
Received: (qmail 28937 invoked by uid 101); 4 Apr 2005 17:38:54 -0000
Received: from unknown (HELO ogyruan.pmc-sierra.bc.ca) (216.241.226.236)
  by mother.pmc-sierra.com with SMTP; 4 Apr 2005 17:38:54 -0000
Received: from bby1exi01.pmc_nt.nt.pmc-sierra.bc.ca (bby1exi01.pmc-sierra.bc.ca [216.241.231.251])
	by ogyruan.pmc-sierra.bc.ca (8.13.3/8.12.7) with ESMTP id j34HcsOn013654;
	Mon, 4 Apr 2005 10:38:54 -0700
Received: by bby1exi01.pmc_nt.nt.pmc-sierra.bc.ca with Internet Mail Service (5.5.2656.59)
	id <H2DN3VP2>; Mon, 4 Apr 2005 10:38:54 -0700
Message-ID: <04781D450CFF604A9628C8107A62FCCF013DDE1D@sjc1exm01.pmc_nt.nt.pmc-sierra.bc.ca>
From:	Brad Larson <Brad_Larson@pmc-sierra.com>
To:	"'priya'" <priya@procsys.com>, linux-mips@linux-mips.org
Subject: RE: Porting davicom driver to pmon
Date:	Mon, 4 Apr 2005 10:38:19 -0700 
MIME-Version: 1.0
X-Mailer: Internet Mail Service (5.5.2656.59)
Content-Type: text/plain
Return-Path: <Brad_Larson@pmc-sierra.com>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 7591
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: Brad_Larson@pmc-sierra.com
Precedence: bulk
X-list: linux-mips

It's a DEC Tulip type chip handled by the dc driver. Should work with "dc* at pci ?".
Should because I have no own experience with that particular chip.

-----Original Message-----
From: linux-mips-bounce@linux-mips.org
[mailto:linux-mips-bounce@linux-mips.org]On Behalf Of priya
Sent: Monday, April 04, 2005 7:55 AM
To: linux-mips@linux-mips.org
Subject: Porting davicom driver to pmon


Hi,
I am using a custom board which has mips
processor and davicom ethernet chip. Iam
using pmon bootloader. Has anyone ported
davicom driver for pmon. Iam facing a
lot of problem in sending even a set up
frame

regards
priya


From priya@procsys.com Tue Apr  5 05:36:10 2005
Received: with ECARTIS (v1.0.0; list linux-mips); Tue, 05 Apr 2005 05:36:25 +0100 (BST)
Received: from dsl-KK-026.199.95.61.touchtelindia.net ([IPv6:::ffff:61.95.199.26]:53429
	"EHLO trishul.procsys.com") by linux-mips.org with ESMTP
	id <S8225195AbVDEEgK>; Tue, 5 Apr 2005 05:36:10 +0100
Received: from procsys.com ([192.168.1.128])
	by trishul.procsys.com (8.12.10/8.12.10) with ESMTP id j354EMCo029166;
	Tue, 5 Apr 2005 09:44:22 +0530
Message-ID: <42521588.D671F6EE@procsys.com>
Date:	Tue, 05 Apr 2005 10:05:20 +0530
From:	priya <priya@procsys.com>
X-Mailer: Mozilla 4.7 [en] (WinNT; I)
X-Accept-Language: en
MIME-Version: 1.0
To:	Brad Larson <Brad_Larson@pmc-sierra.com>
CC:	linux-mips@linux-mips.org
Subject: Re: Porting davicom driver to pmon
References: <04781D450CFF604A9628C8107A62FCCF013DDE1D@sjc1exm01.pmc_nt.nt.pmc-sierra.bc.ca>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-ProcSys-Com-Anti-Virus-Mail-Filter-Virus-Found: no
Return-Path: <priya@procsys.com>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 7592
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: priya@procsys.com
Precedence: bulk
X-list: linux-mips

Hi Brad,
Its a davicom chip. I tried porting the linux driver to pmon - but still iam facing
problems sending the set up frame - actually in the linux the set up frame is sent 5
times. Iam doing the same thing out here too. But while trying to send the setup frame
for the second time the network status report register(cr5) value is 0xfc200007 (which
indicates - move setup frame from host memory, transmit buffer un-available, and transmit
process complete)

Also the network operation mode (register cr6) gets set to hash filtering, while i have
enabled perfect filtering mode in the transmit descriptor. Any idea why this corruption
is happening?

regards
priya

Brad Larson wrote:

> It's a DEC Tulip type chip handled by the dc driver. Should work with "dc* at pci ?".
> Should because I have no own experience with that particular chip.
>
> -----Original Message-----
> From: linux-mips-bounce@linux-mips.org
> [mailto:linux-mips-bounce@linux-mips.org]On Behalf Of priya
> Sent: Monday, April 04, 2005 7:55 AM
> To: linux-mips@linux-mips.org
> Subject: Porting davicom driver to pmon
>
> Hi,
> I am using a custom board which has mips
> processor and davicom ethernet chip. Iam
> using pmon bootloader. Has anyone ported
> davicom driver for pmon. Iam facing a
> lot of problem in sending even a set up
> frame
>
> regards
> priya


From gill.robles@exterity.co.uk Tue Apr  5 09:09:45 2005
Received: with ECARTIS (v1.0.0; list linux-mips); Tue, 05 Apr 2005 09:10:00 +0100 (BST)
Received: from no-dns-yet.demon.co.uk ([IPv6:::ffff:83.104.11.251]:18896 "EHLO
	exterity.co.uk") by linux-mips.org with ESMTP id <S8225248AbVDEIJp> convert rfc822-to-8bit;
	Tue, 5 Apr 2005 09:09:45 +0100
Content-class: urn:content-classes:message
Subject: RE: No PCI memory response
MIME-Version: 1.0
Content-Type: text/plain;
	charset="us-ascii"
Content-Transfer-Encoding: 8BIT
Date:	Tue, 5 Apr 2005 09:11:24 +0100
X-MimeOLE: Produced By Microsoft Exchange V6.5.7226.0
Message-ID: <CEA5455795C8AA44AA1E18EF32379B2105CF5E@exterity-serv1.Exterity.local>
X-MS-Has-Attach: 
X-MS-TNEF-Correlator: 
Thread-Topic: No PCI memory response
thread-index: AcU5JwDTMZSDHp4oTCW7UNSAOaWfyQAkJsqg
From:	"Gill Robles-Thome" <gill.robles@exterity.co.uk>
To:	<linux-mips@linux-mips.org>
Return-Path: <gill.robles@exterity.co.uk>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 7593
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: gill.robles@exterity.co.uk
Precedence: bulk
X-list: linux-mips

Hi -

I'm certainly seeing what looks like random reads...however, is the
static bus controller actually implicated in PCI bus operations?  The
product brief for the Au1100 doesn't mention PCI, so I'm not sure that
we're looking at the same problem.

Thanks,
Gill

-----Original Message-----
From: linux-mips-bounce@linux-mips.org
[mailto:linux-mips-bounce@linux-mips.org] On Behalf Of Ulrich Eckhardt
Sent: 04 April 2005 15:53
To: linux-mips@linux-mips.org
Subject: Re: No PCI memory response


Gill wrote:
> Can anyone help?  We're trying to talk to a RealTek RTL8139 device 
> across the PCI bus, and, although linux can access configuration 
> registers on the device, it does not access memory space correctly, 
> and we are unable to read back any sensible values from the RTL8139 
> registers.
>
> We are using the latest 2.6 linux on an Alchemy DB1550 board.

Random reads, discarded data after writing? I had the same problem and
solved 
it by simply configuring the static bus controller of my Au1100 properly
(of 
which before I didn't even know it existed...).

hth

Uli



From greg.weeks@timesys.com Tue Apr  5 12:34:12 2005
Received: with ECARTIS (v1.0.0; list linux-mips); Tue, 05 Apr 2005 12:34:30 +0100 (BST)
Received: from mail.timesys.com ([IPv6:::ffff:65.117.135.102]:53844 "EHLO
	exchange.timesys.com") by linux-mips.org with ESMTP
	id <S8225268AbVDELeM>; Tue, 5 Apr 2005 12:34:12 +0100
Received: from [192.168.2.27] ([192.168.2.27]) by exchange.timesys.com with Microsoft SMTPSVC(5.0.2195.6713);
	 Tue, 5 Apr 2005 07:30:06 -0400
Message-ID: <425277B1.7080501@timesys.com>
Date:	Tue, 05 Apr 2005 07:34:09 -0400
From:	Greg Weeks <greg.weeks@timesys.com>
User-Agent: Mozilla Thunderbird 1.0 (X11/20041206)
X-Accept-Language: en-us, en
MIME-Version: 1.0
To:	linux-mips@linux-mips.org
Subject: malta 4kc bus error
Content-Type: multipart/mixed;
 boundary="------------010002090203000601090901"
X-OriginalArrivalTime: 05 Apr 2005 11:30:06.0656 (UTC) FILETIME=[D1414C00:01C539D2]
Return-Path: <greg.weeks@timesys.com>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 7594
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: greg.weeks@timesys.com
Precedence: bulk
X-list: linux-mips

This is a multi-part message in MIME format.
--------------010002090203000601090901
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit

Now I'm seeing a bus error on the Malta. This is the same set-up. 4kc 
processor and the tree is a sync against the Malta tree on Friday with 
the tlb patch from Monday.

Greg Weeks

--------------010002090203000601090901
Content-Type: text/plain;
 name="malta.oops.be.txt"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
 filename="malta.oops.be.txt"

YAMON ROM Monitor, Revision 02.06.
Copyright (c) 1999-2004 MIPS Technologies, Inc. - All Rights Reserved.
 
For a list of available commands, type 'help'.
 
Compilation time =              Mar 23 2004  16:50:44
Board type/revision =           0x02 (Malta) / 0x00
Core board type/revision =      0x01 (CoreLV) / 0x01
System controller/revision =    Galileo / GT_64120A-B-1
FPGA revision =                 0x0001
MAC address =                   00.d0.a0.00.01.9a
Board S/N =                     0000000162
PCI bus frequency =             33.33 MHz
Processor Company ID/options =  0x01 (MIPS Technologies, Inc.) / 0x00
Processor ID/revision =         0x80 (MIPS 4Kc) / 0x01
Endianness =                    Little
CPU/Bus frequency =             80 MHz / 40 MHz
Flash memory size =             4 MByte
SDRAM size =                    64 MByte
First free SDRAM address =      0x800b3850
 
YAMON> load
About to load tftp://192.168.25.2/vmlinux.srec
Press Ctrl-C to break
........................................
........................................
........................................
........................................
........................................
........................................
........................................
........................................
........................................
.................
Start = 0x803d2000, range = (0x80100000,0x803f5085), format = SREC
YAMON> go . ip=dhcp
 
LINUX started...
Config serial console: console=ttyS0,38400n8r
Linux version 2.6.12-rc1 (gweeks@tanith.timesys.com) (gcc version 3.4.1 20040714 (TimeSys 3.4.1-7)) #1 Mon Apr 4 15:21:59 EDT 2005
CPU revision is: 00018001
Determined physical RAM map:
 memory: 00001000 @ 00000000 (reserved)
 memory: 000ef000 @ 00001000 (ROM data)
 memory: 00329000 @ 000f0000 (reserved)
 memory: 03be7000 @ 00419000 (usable)
Built 1 zonelists
Kernel command line: ip=dhcp console=ttyS0,38400n8r
Primary instruction cache 16kB, physically tagged, 4-way, linesize 16 bytes.
Primary data cache 16kB, 4-way, linesize 16 bytes.
Synthesized TLB refill handler (19 instructions).
Synthesized TLB load handler fastpath (31 instructions).
Synthesized TLB store handler fastpath (31 instructions).
Synthesized TLB modify handler fastpath (30 instructions).
PID hash table entries: 512 (order: 9, 8192 bytes)
CPU frequency 80.00 MHz
Using 40.001 MHz high precision timer.
Console: colour dummy device 80x25
Dentry cache hash table entries: 16384 (order: 4, 65536 bytes)
Inode-cache hash table entries: 8192 (order: 3, 32768 bytes)
Memory: 60672k/61340k available (2227k kernel code, 628k reserved, 656k data, 144k init, 0k highmem)
Mount-cache hash table entries: 512
Checking for 'wait' instruction...  available.
NET: Registered protocol family 16
VFS: Disk quotas dquot_6.5.1
Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
devfs: 2004-01-31 Richard Gooch (rgooch@atnf.csiro.au)
devfs: boot_options: 0x0
Installing knfsd (copyright (C) 1996 okir@monad.swb.de).
Initializing Cryptographic API
rtc: SRM (post-2000) epoch (2000) detected
Real Time Clock Driver v1.12a
Serial: 8250/16550 driver $Revision: 1.90 $ 8 ports, IRQ sharing disabled
ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A
ttyS1 at I/O 0x2f8 (irq = 3) is a 16550A
io scheduler noop registered
io scheduler anticipatory registered
io scheduler deadline registered
io scheduler cfq registered
RAMDISK driver initialized: 16 RAM disks of 4096K size 1024 blocksize
pcnet32.c:v1.30i 06.28.2004 tsbogend@alpha.franken.de
pcnet32: PCnet/FAST III 79C973 at 0x1060, 00 d0 a0 00 01 9a assigned IRQ 10.
eth0: registered as PCnet/FAST III 79C973
pcnet32: 1 cards_found.
Uniform Multi-Platform E-IDE driver Revision: 7.00alpha2
ide: Assuming 33MHz system bus speed for PIO modes; override with idebus=xx
PIIX4: IDE controller at PCI slot 0000:00:0a.1
PIIX4: chipset revision 1
PIIX4: not 100% native mode: will probe irqs later
    ide0: BM-DMA at 0x1080-0x1087, BIOS settings: hda:pio, hdb:pio
    ide1: BM-DMA at 0x1088-0x108f, BIOS settings: hdc:pio, hdd:pio
hda: IBM-DTLA-307075, ATA DISK drive
ide0 at 0x1f0-0x1f7,0x3f6 on irq 14
hda: max request size: 128KiB
hda: 150136560 sectors (76869 MB) w/1916KiB Cache, CHS=65535/16/63, UDMA(33)
hda: cache flushes not supported
 /dev/ide/host0/bus0/target0/lun0: p1 p2 p3
mice: PS/2 mouse device common for all mice
NET: Registered protocol family 2
IP: routing cache hash table of 512 buckets, 4Kbytes
TCP established hash table entries: 4096 (order: 3, 32768 bytes)
TCP bind hash table entries: 4096 (order: 2, 16384 bytes)
TCP: Hash tables configured (established 4096 bind 4096)
NET: Registered protocol family 1
NET: Registered protocol family 17
NET: Registered protocol family 15
eth0: link up, 100Mbps, half-duplex, lpa 0x40A1
Sending DHCP requests ., OK
IP-Config: Got DHCP answer from 192.168.25.2, my address is 192.168.25.4
IP-Config: Complete:
      device=eth0, addr=192.168.25.4, mask=255.255.255.0, gw=255.255.255.255,
     host=192.168.25.4, domain=, nis-domain=(none),
     bootserver=192.168.25.2, rootserver=192.168.25.2, rootpath=/opt/timesys/linux/6.0/mipsel-std/rfs
Looking up port of RPC 100003/2 on 192.168.25.2
Looking up port of RPC 100005/1 on 192.168.25.2
VFS: Mounted root (nfs filesystem) readonly.
Freeing prom memory: 956kb freed
Freeing unused kernel memory: 1100k freed
Algorithmics/MIPS FPU Emulator v1.5
INIT: version 2.84 booting
Executing first boot commands
mount: directory to mount not in host:dir format
mount: directory to mount not in host:dir format
 
                Welcome to TimeSys release 1.0 (distbuilder)
 
Making extra nodes:  [  OK  ][  OK  ]
Starting udev:  [  OK  ]
Initializing hardware...  storage network audio done[  OK  ]
raidautorun: failed to open /dev/md0: 6
Configuring kernel parameters:  [  OK  ]
Setting clock : Mon Apr  4 20:28:54 UTC 2005 [  OK  ]
Setting hostname timesys-bsp:  [  OK  ]
Remounting root filesystem in read-write mode:  [  OK  ]
Checking filesystems
Checking all file systems.
[  OK  ]
Mounting local filesystems:  [  OK  ]
Enabling swap space:  [  OK  ]
INIT: Entering runlevel: 3
Entering non-interactive startup
Setting network parameters:  [  OK  ]
Bringing up loopback interface:  Data bus error, epc == 80228860, ra == 80177ce4Oops in arch/mips/kernel/traps.c::do_be, line 336[#1]:
Cpu 0
$ 0   : 00000000 1000e94b 1000e96b 00000000
$ 4   : 83ffffa0 1000e929 00000012 1000e94b
$ 8   : 003d4457 00637465 00000001 3d445750
$12   : 00000001 83c21d68 00000080 70000000
$16   : 00000023 00000f9f 83ffff9f 00000023
$20   : 1000e928 0001ff9f 00000000 10013af4
$24   : 00000002 8107a600
$28   : 83c20000 83c21ea0 83fff000 80177ce4
Hi    : 10624430
Lo    : 4fdf32f6
epc   : 80228860 src_unaligned_dst_aligned+0x20/0x5c     Not tainted
ra    : 80177ce4 copy_strings+0xf8/0x24c
Status: 1000fc03    KERNEL EXL IE
Cause : 0080201c
PrId  : 00018001
Modules linked in:
Process ifup (pid: 1610, threadinfo=83c20000, task=806f8b78)
Stack : 80000000 10013ad8 81273200 00000080 8107ffe0 83c21f30 8111e000 10013ad8
        81273200 00000000 10014800 83c21f30 ffffffff 10013ad8 10013e80 80179404
        00000007 8012897c 81273200 8017b4b8 8111e000 8111e000 10013ad8 10014150
        00000000 10014150 8010631c 801062f4 0000006a 10006fec 00000000 10014150
        10014150 10014800 8010a060 80100f50 10014150 10014800 10013ad8 2ad23d94
        ...
Call Trace:
 [<80179404>] do_execve+0x118/0x224
 [<8012897c>] __do_softirq+0x8c/0x14c
 [<8017b4b8>] getname+0x28/0xf8
 [<8010631c>] sys_execve+0x50/0x7c
 [<801062f4>] sys_execve+0x28/0x7c
 [<8010a060>] stack_done+0x20/0x3c
 [<80100f50>] mipsIRQ+0x110/0x180
                                  
 
Code: 98a80000  98a90004  24c6fff0 <88a80003> 88a90007  98aa0008  98ab000c  88aa000b  88ab000f
CoreHI interrupt, shouldn't happen, so we die here!!!
epc   : 80128944
Status: 1000fc03
Cause : 10802000
badVaddr : 80107248
GT_INTRCAUSE = 40000009
GT_CPUERR_ADDR = 0004000000
CoreHi interrupt in arch/mips/mips-boards/malta/malta_int.c::corehi_irqdispatch, line 180[#2]:
Cpu 0
$ 0   : 00000000 1000fc01 00000100 00000002
$ 4   : 00000000 00000000 00000078 00000059
$ 8   : 06f4c980 000f4237 806f8b78 80400000
$12   : 80400000 fffffffe ffffffff 00000010
$16   : 00000002 1000fc00 83c21df0 00000004
$20   : 0000000a 80400000 80400000 10013af4
$24   : 00000007 83c21c08
$28   : 83c20000 83c21ca8 83fff000 80128ac8
Hi    : 00000000
Lo    : 00000000
epc   : 80128944 __do_softirq+0x54/0x14c     Not tainted
ra    : 80128ac8 do_softirq+0x8c/0xb8
Status: 1000fc03    KERNEL EXL IE
Cause : 10802000
PrId  : 00018001
Modules linked in:
Process ifup (pid: 1610, threadinfo=83c20000, task=806f8b78)
Stack : 80330000 803f8a36 1000a000 1000fc00 1000fc00 1000fc00 83c21df0 00000004
        1000e928 0001ff9f 00000000 80128ac8 1000e928 0001ff9f 1000a000 1000fc00
        1000a000 80100f50 3b9aca00 00000001 80370000 1000fc00 80370000 80123528
        00000000 1000fc01 00000001 8036c0b8 8036c0b8 8036c0d0 00000001 804042d4
        00001816 8036c0a8 80400000 80400000 80400000 fffffffe ffffffff 00000010
        ...
Call Trace:
 [<80128ac8>] do_softirq+0x8c/0xb8
 [<80100f50>] mipsIRQ+0x110/0x180
 [<80123528>] vprintk+0x334/0x404
 [<80107e9c>] __die+0xb0/0xc8
 [<80107eac>] __die+0xc0/0xc8
 [<80108090>] do_be+0x1b0/0x1f4
 [<80228860>] src_unaligned_dst_aligned+0x20/0x5c
 [<80177ce4>] copy_strings+0xf8/0x24c
 [<801025d4>] handle_dbe_int+0x2c/0x38
 [<80177ce4>] copy_strings+0xf8/0x24c
 [<8016b26c>] vfs_read+0xbc/0x178
 [<80228860>] src_unaligned_dst_aligned+0x20/0x5c
 [<80179404>] do_execve+0x118/0x224
 [<8012897c>] __do_softirq+0x8c/0x14c
 [<8017b4b8>] getname+0x28/0xf8
 [<8010631c>] sys_execve+0x50/0x7c
 [<801062f4>] sys_execve+0x28/0x7c
 [<8010a060>] stack_done+0x20/0x3c
 [<80100f50>] mipsIRQ+0x110/0x180
                                  
 
Code: 3421001f  3821001e  40816000 <3c028040> 2453ea50  26d1cf48  0804a258  24120001  1200000a
Kernel panic - not syncing: Aiee, killing interrupt handler!
                                                             


--------------010002090203000601090901--

From gill.robles@exterity.co.uk Tue Apr  5 16:22:49 2005
Received: with ECARTIS (v1.0.0; list linux-mips); Tue, 05 Apr 2005 16:23:05 +0100 (BST)
Received: from no-dns-yet.demon.co.uk ([IPv6:::ffff:83.104.11.251]:52495 "EHLO
	exterity.co.uk") by linux-mips.org with ESMTP id <S8225291AbVDEPWt> convert rfc822-to-8bit;
	Tue, 5 Apr 2005 16:22:49 +0100
Content-class: urn:content-classes:message
Subject: RE: No PCI memory response
MIME-Version: 1.0
Content-Type: text/plain;
	charset="us-ascii"
Content-Transfer-Encoding: 8BIT
Date:	Tue, 5 Apr 2005 16:28:37 +0100
X-MimeOLE: Produced By Microsoft Exchange V6.5.7226.0
Message-ID: <CEA5455795C8AA44AA1E18EF32379B2105CF93@exterity-serv1.Exterity.local>
X-MS-Has-Attach: 
X-MS-TNEF-Correlator: 
Thread-Topic: No PCI memory response
thread-index: AcU5JwDTMZSDHp4oTCW7UNSAOaWfyQAkJsqgAA8O+MA=
From:	"Gill Robles-Thome" <gill.robles@exterity.co.uk>
To:	<linux-mips@linux-mips.org>
Return-Path: <gill.robles@exterity.co.uk>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 7595
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: gill.robles@exterity.co.uk
Precedence: bulk
X-list: linux-mips

...we found the cause of the problem!  Need to select "Support for
64-bit physical address space" option!

Gill

-----Original Message-----
From: linux-mips-bounce@linux-mips.org
[mailto:linux-mips-bounce@linux-mips.org] On Behalf Of Gill Robles-Thome
Sent: 05 April 2005 09:11
To: linux-mips@linux-mips.org
Subject: RE: No PCI memory response


Hi -

I'm certainly seeing what looks like random reads...however, is the
static bus controller actually implicated in PCI bus operations?  The
product brief for the Au1100 doesn't mention PCI, so I'm not sure that
we're looking at the same problem.

Thanks,
Gill

-----Original Message-----
From: linux-mips-bounce@linux-mips.org
[mailto:linux-mips-bounce@linux-mips.org] On Behalf Of Ulrich Eckhardt
Sent: 04 April 2005 15:53
To: linux-mips@linux-mips.org
Subject: Re: No PCI memory response


Gill wrote:
> Can anyone help?  We're trying to talk to a RealTek RTL8139 device
> across the PCI bus, and, although linux can access configuration 
> registers on the device, it does not access memory space correctly, 
> and we are unable to read back any sensible values from the RTL8139 
> registers.
>
> We are using the latest 2.6 linux on an Alchemy DB1550 board.

Random reads, discarded data after writing? I had the same problem and
solved 
it by simply configuring the static bus controller of my Au1100 properly
(of 
which before I didn't even know it existed...).

hth

Uli





From ppopov@embeddedalley.com Tue Apr  5 17:27:30 2005
Received: with ECARTIS (v1.0.0; list linux-mips); Tue, 05 Apr 2005 17:27:46 +0100 (BST)
Received: from smtp002.bizmail.yahoo.com ([IPv6:::ffff:216.136.172.126]:46983
	"HELO smtp002.bizmail.yahoo.com") by linux-mips.org with SMTP
	id <S8225304AbVDEQ1a>; Tue, 5 Apr 2005 17:27:30 +0100
Received: from unknown (HELO ?192.168.1.101?) (ppopov@embeddedalley.com@63.194.214.47 with plain)
  by smtp002.bizmail.yahoo.com with SMTP; 5 Apr 2005 16:27:27 -0000
Message-ID: <4252BC7C.6060806@embeddedalley.com>
Date:	Tue, 05 Apr 2005 09:27:40 -0700
From:	Pete Popov <ppopov@embeddedalley.com>
Reply-To:  ppopov@embeddedalley.com
Organization: Embedded Alley Solutions, Inc
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.3) Gecko/20041020
X-Accept-Language: en-us, en
MIME-Version: 1.0
To:	Gill Robles-Thome <gill.robles@exterity.co.uk>
CC:	linux-mips@linux-mips.org
Subject: Re: No PCI memory response
References: <CEA5455795C8AA44AA1E18EF32379B2105CF93@exterity-serv1.Exterity.local>
In-Reply-To: <CEA5455795C8AA44AA1E18EF32379B2105CF93@exterity-serv1.Exterity.local>
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
Return-Path: <ppopov@embeddedalley.com>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 7596
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: ppopov@embeddedalley.com
Precedence: bulk
X-list: linux-mips

Gill Robles-Thome wrote:
> ...we found the cause of the problem!  Need to select "Support for
> 64-bit physical address space" option!

That option should be in the defconfig already - was it not?

I should just hardcode that option and get it over with.

Pete

> 
> Gill
> 
> -----Original Message-----
> From: linux-mips-bounce@linux-mips.org
> [mailto:linux-mips-bounce@linux-mips.org] On Behalf Of Gill Robles-Thome
> Sent: 05 April 2005 09:11
> To: linux-mips@linux-mips.org
> Subject: RE: No PCI memory response
> 
> 
> Hi -
> 
> I'm certainly seeing what looks like random reads...however, is the
> static bus controller actually implicated in PCI bus operations?  The
> product brief for the Au1100 doesn't mention PCI, so I'm not sure that
> we're looking at the same problem.
> 
> Thanks,
> Gill
> 
> -----Original Message-----
> From: linux-mips-bounce@linux-mips.org
> [mailto:linux-mips-bounce@linux-mips.org] On Behalf Of Ulrich Eckhardt
> Sent: 04 April 2005 15:53
> To: linux-mips@linux-mips.org
> Subject: Re: No PCI memory response
> 
> 
> Gill wrote:
> 
>>Can anyone help?  We're trying to talk to a RealTek RTL8139 device
>>across the PCI bus, and, although linux can access configuration 
>>registers on the device, it does not access memory space correctly, 
>>and we are unable to read back any sensible values from the RTL8139 
>>registers.
>>
>>We are using the latest 2.6 linux on an Alchemy DB1550 board.
> 
> 
> Random reads, discarded data after writing? I had the same problem and
> solved 
> it by simply configuring the static bus controller of my Au1100 properly
> (of 
> which before I didn't even know it existed...).
> 
> hth
> 
> Uli
> 
> 
> 
> 
> 
> 


From dan@embeddededge.com Tue Apr  5 17:49:47 2005
Received: with ECARTIS (v1.0.0; list linux-mips); Tue, 05 Apr 2005 17:50:02 +0100 (BST)
Received: from embeddededge.com ([IPv6:::ffff:209.113.146.155]:24331 "EHLO
	penguin.netx4.com") by linux-mips.org with ESMTP
	id <S8225308AbVDEQtr>; Tue, 5 Apr 2005 17:49:47 +0100
Received: from [192.168.87.101] (pool-151-203-225-221.bos.east.verizon.net [151.203.225.221])
	by penguin.netx4.com (8.12.8/8.12.9) with ESMTP id j35GkTqB008058;
	Tue, 5 Apr 2005 12:46:29 -0400
In-Reply-To: <200504041717.29098.eckhardt@satorlaser.com>
References: <200504041717.29098.eckhardt@satorlaser.com>
Mime-Version: 1.0 (Apple Message framework v619.2)
Content-Type: text/plain; charset=US-ASCII; format=flowed
Message-Id: <de11cd376cdc88e9c292ae7e204e2de9@embeddededge.com>
Content-Transfer-Encoding: 7bit
Cc:	linux-mips@linux-mips.org
From:	Dan Malek <dan@embeddededge.com>
Subject: Re: Au1100 FB driver uplift for 2.6
Date:	Tue, 5 Apr 2005 12:49:41 -0400
To:	Ulrich Eckhardt <eckhardt@satorlaser.com>
X-Mailer: Apple Mail (2.619.2)
Return-Path: <dan@embeddededge.com>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 7597
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: dan@embeddededge.com
Precedence: bulk
X-list: linux-mips


On Apr 4, 2005, at 11:17 AM, Ulrich Eckhardt wrote:

> Am I on the wrong way or should I just reimplement it and send a patch?

If you an test it, do it and send a patch.

> [2] Based on DB1100. Are there any pointers on how to port to a new 
> board,
> btw?

One of the discussion items is always how to keep a "generic"
driver and still provide unique setup/control for different types of
boards.  I guess if we can discuss other board ports, it will be
more clear how to do this.

Thanks.


	-- Dan


From greg.weeks@timesys.com Tue Apr  5 18:41:11 2005
Received: with ECARTIS (v1.0.0; list linux-mips); Tue, 05 Apr 2005 18:41:26 +0100 (BST)
Received: from mail.timesys.com ([IPv6:::ffff:65.117.135.102]:55528 "EHLO
	exchange.timesys.com") by linux-mips.org with ESMTP
	id <S8225296AbVDERlL>; Tue, 5 Apr 2005 18:41:11 +0100
Received: from [192.168.2.27] ([192.168.2.27]) by exchange.timesys.com with Microsoft SMTPSVC(5.0.2195.6713);
	 Tue, 5 Apr 2005 13:37:01 -0400
Message-ID: <4252CDB1.9060809@timesys.com>
Date:	Tue, 05 Apr 2005 13:41:05 -0400
From:	Greg Weeks <greg.weeks@timesys.com>
User-Agent: Mozilla Thunderbird 1.0 (X11/20041206)
X-Accept-Language: en-us, en
MIME-Version: 1.0
To:	Ralf Baechle <ralf@linux-mips.org>
CC:	linux-mips@linux-mips.org
Subject: Re: malta 4kc bus error
References: <425277B1.7080501@timesys.com> <20050405162725.GB16601@linux-mips.org> <4252C51F.6040907@timesys.com> <20050405172933.GH16601@linux-mips.org>
In-Reply-To: <20050405172933.GH16601@linux-mips.org>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-OriginalArrivalTime: 05 Apr 2005 17:37:01.0609 (UTC) FILETIME=[13308990:01C53A06]
Return-Path: <greg.weeks@timesys.com>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 7598
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: greg.weeks@timesys.com
Precedence: bulk
X-list: linux-mips

Ralf Baechle wrote:

>On Tue, Apr 05, 2005 at 01:04:31PM -0400, Greg Weeks wrote:
>
>  
>
>>It appears to be turned on always now.
>>    
>>
>
>Correct.
>
>  
>
>>From arch/mips/Kconfig
>>
>>config CPU_MIPS32
>>   bool "MIPS32"
>>   select CPU_SUPPORTS_32BIT_KERNEL
>>   select CPU_HAS_PREFETCH
>>
>>I'll try turning it off directly in the memcpy function.
>>    
>>
>
>That's certainly a hack - but likely to result in the best performance.
>  
>
It's the quickest way to find out if it's the problem I'm seeing. It 
appears to be. Now, what's the best way to fix this for real?

Greg Weeks

From greg.weeks@timesys.com Tue Apr  5 20:28:29 2005
Received: with ECARTIS (v1.0.0; list linux-mips); Tue, 05 Apr 2005 20:28:45 +0100 (BST)
Received: from mail.timesys.com ([IPv6:::ffff:65.117.135.102]:62831 "EHLO
	exchange.timesys.com") by linux-mips.org with ESMTP
	id <S8225322AbVDET23>; Tue, 5 Apr 2005 20:28:29 +0100
Received: from [192.168.2.27] ([192.168.2.27]) by exchange.timesys.com with Microsoft SMTPSVC(5.0.2195.6713);
	 Tue, 5 Apr 2005 15:24:23 -0400
Message-ID: <4252E6DB.7050307@timesys.com>
Date:	Tue, 05 Apr 2005 15:28:27 -0400
From:	Greg Weeks <greg.weeks@timesys.com>
User-Agent: Mozilla Thunderbird 1.0 (X11/20041206)
X-Accept-Language: en-us, en
MIME-Version: 1.0
To:	linux-mips@linux-mips.org
Subject: [patch] malta bus error
Content-Type: multipart/mixed;
 boundary="------------000908010005020703080706"
X-OriginalArrivalTime: 05 Apr 2005 19:24:23.0359 (UTC) FILETIME=[12C594F0:01C53A15]
Return-Path: <greg.weeks@timesys.com>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 7599
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: greg.weeks@timesys.com
Precedence: bulk
X-list: linux-mips

This is a multi-part message in MIME format.
--------------000908010005020703080706
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit

Here's the ugly hack I used to get around the bus error on the malta 
board because of the memcpy prefetch bug. I'm still looking at the 
memcpy.S code to figure out how to get it to stop prefetching past the 
end of the copy.

Signed-off-by: Greg Weeks <greg.weeks@timesys.com>



--------------000908010005020703080706
Content-Type: text/x-patch;
 name="malta.memcpy.prefetch.hack.patch"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
 filename="malta.memcpy.prefetch.hack.patch"

--- mips/arch/mips/Kconfig-orig
+++ mips/arch/mips/Kconfig

@@ -46,6 +46,7 @@
 	select SYS_SUPPORTS_64BIT_KERNEL
 	select SYS_SUPPORTS_BIG_ENDIAN
 	select SYS_SUPPORTS_LITTLE_ENDIAN
+        select BOARD_HAS_MEMCPY_PREFETCH_BUG
 	help
 	  This enables support for the MIPS Technologies Malta evaluation
 	  board.
@@ -777,6 +778,10 @@
 config CPU_HAS_PREFETCH
 	bool
 
+config BOARD_HAS_MEMCPY_PREFETCH_BUG
+	bool
+	default n
+
 config SB1_PASS_1_WORKAROUNDS
 	bool
 	depends on CPU_SB1_PASS_1

--- mips/arch/mips/lib/memcpy.S-orig
+++ mips/arch/mips/lib/memcpy.S

@@ -17,6 +17,11 @@
 #include <asm/offset.h>
 #include <asm/regdef.h>
 
+#ifdef CONFIG_BOARD_HAS_MEMCPY_PREFETCH_BUG
+#undef PREF
+#define PREF(hint,addr)
+#endif
+	
 #define dst a0
 #define src a1
 #define len a2

--------------000908010005020703080706--

From b.srinivas@conexant.com Wed Apr  6 03:46:02 2005
Received: with ECARTIS (v1.0.0; list linux-mips); Wed, 06 Apr 2005 03:46:20 +0100 (BST)
Received: from cnxtsmtp8.conexant.com ([IPv6:::ffff:216.89.70.36]:51212 "EHLO
	mime-nj.bbnet.ad") by linux-mips.org with ESMTP id <S8224769AbVDFCqC>;
	Wed, 6 Apr 2005 03:46:02 +0100
Received: Conexant Mail
Received: Conexant Mail
Content-class: urn:content-classes:message
MIME-Version: 1.0
Content-Type: multipart/alternative; 
    boundary="----_=_NextPart_001_01C53A52.D9177C15"
Subject: Cross compile
Date:	Wed, 6 Apr 2005 08:16:33 +0530
Message-ID: <4D6E93075B31154298572E6B73CA849D72EC03@noida-mail.bbnet.ad>
X-MS-Has-Attach: 
X-MS-TNEF-Correlator: 
Thread-Topic: Cross compile
Thread-Index: AcU6UteoiX38l1tITmKuprCVhpo9Dw==
From:	"B Srinivas " <b.srinivas@conexant.com>
To:	<linux-mips@linux-mips.org>
X-OriginalArrivalTime: 06 Apr 2005 02:46:43.0833 (UTC) 
    FILETIME=[DE208690:01C53A52]
Return-Path: <b.srinivas@conexant.com>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 7600
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: b.srinivas@conexant.com
Precedence: bulk
X-list: linux-mips

This is a multi-part message in MIME format.

------_=_NextPart_001_01C53A52.D9177C15
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: quoted-printable

Hi,

     Iam trying to build a crosscompiler for MIPS64 big endian. Host
system being i686.

I have downloaded gcc 3.4.2 , binutils 2.15 and glibc 2.3.3 with kernel
2.4.20.

Iam following steps given below :

                     =20

    tar -xvf binutils-2.15.tar

    cd binutils-2.15

     ./configure - - prefix=3D/opt/cross  - - target=3Dmips3-linux=20

     make=20

     make install

=20

  =20

=20

   tar -xvf gcc-3.4.2.tar

   cd gcc-3.4.2

   ./configure - - prefix=3D/opt/cross - - target=3Dmips3-linux  - -
with-headers=3D../linux/include -enable-languages=3Dc -disable-threads

(I have my untarred linux directory in the parent directory.)

=20

   cd gcc

    vi tconfig.h

   =20

   I edit at the end #ifndef inhibit_libc

                           #define inhibit_libc

                           #endif

=20

    make

=20

    here I get the following errors :

=20

                                    sys/types.h , unistd.h , errno.h ,
time.h  no such file or directory !!!

=20

can anybody please direct me where iam goin wrong or is it that I need
patches for this ??

=20

=20

Regards

Srinivas

------------------------------------------------------------------------
------------

=20

=20

B.Srinivas

Software Engineer

Conexant Systems Inc. , Noida

Email : b.srinivas@conexant.com

=20





********************** Legal Disclaimer ****************************
"This email may contain confidential and privileged material for the sole u=
se of the intended recipient.  Any unauthorized review, use or distribution=
 by others is strictly prohibited.  If you have received the message in err=
or, please advise the sender by reply email and delete the message. Thank y=
ou."
**********************************************************************


------_=_NextPart_001_01C53A52.D9177C15
Content-Type: text/html; charset="us-ascii"
Content-Transfer-Encoding: quoted-printable

<html xmlns:o=3D"urn:schemas-microsoft-com:office:office" xmlns:w=3D"urn:sc=
hemas-microsoft-com:office:word" xmlns=3D"http://www.w3.org/TR/REC-html40">

<head>
<meta http-equiv=3DContent-Type content=3D"text/html; charset=3Dus-ascii">
<meta name=3DGenerator content=3D"Microsoft Word 11 (filtered medium)">
<style>
<!--
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
	{margin:0in;
	margin-bottom:.0001pt;
	font-size:12.0pt;
	font-family:"Times New Roman";}
a:link, span.MsoHyperlink
	{color:blue;
	text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
	{color:purple;
	text-decoration:underline;}
span.EmailStyle17
	{mso-style-type:personal-compose;
	font-family:Arial;
	color:windowtext;}
@page Section1
	{size:8.5in 11.0in;
	margin:1.0in 1.25in 1.0in 1.25in;}
div.Section1
	{page:Section1;}
-->
</style>

</head>

<body lang=3DEN-US link=3Dblue vlink=3Dpurple>

<div class=3DSection1>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span style=3D'font-size:1=
0.0pt;
font-family:Arial'>Hi,<o:p></o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span style=3D'font-size:1=
0.0pt;
font-family:Arial'>&nbsp;&nbsp;&nbsp;&nbsp; Iam trying to build a crosscomp=
iler
for MIPS64 big endian. Host system being i686.<o:p></o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span style=3D'font-size:1=
0.0pt;
font-family:Arial'>I have downloaded gcc 3.4.2 , binutils 2.15 and glibc 2.=
3.3
with kernel 2.4.20.<o:p></o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span style=3D'font-size:1=
0.0pt;
font-family:Arial'>Iam following steps given below :<o:p></o:p></span></fon=
t></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span style=3D'font-size:1=
0.0pt;
font-family:Arial'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n=
bsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<o:p></o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span style=3D'font-size:1=
0.0pt;
font-family:Arial'>&nbsp;&nbsp;&nbsp; tar &#8211;xvf binutils-2.15.tar<o:p>=
</o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span style=3D'font-size:1=
0.0pt;
font-family:Arial'>&nbsp;&nbsp;&nbsp; cd binutils-2.15<o:p></o:p></span></f=
ont></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span style=3D'font-size:1=
0.0pt;
font-family:Arial'>&nbsp;&nbsp;&nbsp;&nbsp; ./configure - - prefix=3D/opt/c=
ross &nbsp;-
- target=3Dmips3-linux <o:p></o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span style=3D'font-size:1=
0.0pt;
font-family:Arial'>&nbsp;&nbsp;&nbsp;&nbsp; make <o:p></o:p></span></font><=
/p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span style=3D'font-size:1=
0.0pt;
font-family:Arial'>&nbsp;&nbsp;&nbsp;&nbsp; make install<o:p></o:p></span><=
/font></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span style=3D'font-size:1=
0.0pt;
font-family:Arial'><o:p>&nbsp;</o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span style=3D'font-size:1=
0.0pt;
font-family:Arial'>&nbsp;&nbsp; <o:p></o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span style=3D'font-size:1=
0.0pt;
font-family:Arial'><o:p>&nbsp;</o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span style=3D'font-size:1=
0.0pt;
font-family:Arial'>&nbsp;&nbsp; tar &#8211;xvf gcc-3.4.2.tar<o:p></o:p></sp=
an></font></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span style=3D'font-size:1=
0.0pt;
font-family:Arial'>&nbsp;&nbsp; cd gcc-3.4.2<o:p></o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span style=3D'font-size:1=
0.0pt;
font-family:Arial'>&nbsp;&nbsp; ./configure - - prefix=3D/opt/cross - - tar=
get=3Dmips3-linux
&nbsp;- - with-headers=3D../linux/include &#8211;enable-languages=3Dc &#821=
1;disable-threads<o:p></o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span style=3D'font-size:1=
0.0pt;
font-family:Arial'>(I have my untarred linux directory in the parent
directory.)<o:p></o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span style=3D'font-size:1=
0.0pt;
font-family:Arial'><o:p>&nbsp;</o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span style=3D'font-size:1=
0.0pt;
font-family:Arial'>&nbsp;&nbsp; cd gcc<o:p></o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span style=3D'font-size:1=
0.0pt;
font-family:Arial'>&nbsp;&nbsp;&nbsp; vi tconfig.h<o:p></o:p></span></font>=
</p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span style=3D'font-size:1=
0.0pt;
font-family:Arial'>&nbsp;&nbsp;&nbsp; <o:p></o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span style=3D'font-size:1=
0.0pt;
font-family:Arial'>&nbsp;&nbsp; I edit at the end #ifndef inhibit_libc<o:p>=
</o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span style=3D'font-size:1=
0.0pt;
font-family:Arial'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n=
bsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp=
;&nbsp;&nbsp;&nbsp;&nbsp;
#define inhibit_libc<o:p></o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span style=3D'font-size:1=
0.0pt;
font-family:Arial'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n=
bsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp=
;&nbsp;&nbsp;&nbsp;&nbsp;
#endif<o:p></o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span style=3D'font-size:1=
0.0pt;
font-family:Arial'><o:p>&nbsp;</o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span style=3D'font-size:1=
0.0pt;
font-family:Arial'>&nbsp;&nbsp; &nbsp;make<o:p></o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span style=3D'font-size:1=
0.0pt;
font-family:Arial'>&nbsp;<o:p></o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span style=3D'font-size:1=
0.0pt;
font-family:Arial'>&nbsp;&nbsp;&nbsp; here I get the following errors :<o:p=
></o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span style=3D'font-size:1=
0.0pt;
font-family:Arial'><o:p>&nbsp;</o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span style=3D'font-size:1=
0.0pt;
font-family:Arial'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n=
bsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp=
;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n=
bsp;
sys/types.h , unistd.h , errno.h , time.h&nbsp; no such file or directory !=
!!<o:p></o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span style=3D'font-size:1=
0.0pt;
font-family:Arial'><o:p>&nbsp;</o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span style=3D'font-size:1=
0.0pt;
font-family:Arial'>can anybody please direct me where iam goin wrong or is =
it
that I need patches for this ??<o:p></o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span style=3D'font-size:1=
0.0pt;
font-family:Arial'><o:p>&nbsp;</o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span style=3D'font-size:1=
0.0pt;
font-family:Arial'><o:p>&nbsp;</o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span style=3D'font-size:1=
0.0pt;
font-family:Arial'>Regards</span></font><o:p></o:p></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span style=3D'font-size:1=
0.0pt;
font-family:Arial'>Srinivas</span></font><o:p></o:p></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span style=3D'font-size:1=
0.0pt;
font-family:Arial'>--------------------------------------------------------=
----------------------------</span></font><o:p></o:p></p>

<p class=3DMsoNormal><font size=3D3 face=3D"Times New Roman"><span style=3D=
'font-size:
12.0pt'>&nbsp;<o:p></o:p></span></font></p>

<p class=3DMsoNormal><font size=3D3 face=3D"Times New Roman"><span style=3D=
'font-size:
12.0pt'>&nbsp;<o:p></o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span style=3D'font-size:1=
0.0pt;
font-family:Arial'>B.Srinivas</span></font><o:p></o:p></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span style=3D'font-size:1=
0.0pt;
font-family:Arial'>Software Engineer</span></font><o:p></o:p></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span style=3D'font-size:1=
0.0pt;
font-family:Arial'>Conexant Systems Inc. , Noida</span></font><o:p></o:p></=
p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span style=3D'font-size:1=
0.0pt;
font-family:Arial'>Email : b.srinivas@conexant.com</span></font><o:p></o:p>=
</p>

<p class=3DMsoNormal><font size=3D3 face=3D"Times New Roman"><span style=3D=
'font-size:
12.0pt'><o:p>&nbsp;</o:p></span></font></p>

</div>


<P STYLE=3D"margin-top: 0pt;margin-bottom: 0pt;"><SPAN STYLE=3D"FONT-FAMILY=
:'Arial';FONT-SIZE:8pt;"> </SPAN>
</P>
<P STYLE=3D"margin-top: 0pt;margin-bottom: 0pt;"><SPAN STYLE=3D"FONT-FAMILY=
:'Arial';FONT-SIZE:8pt;"> </SPAN>
</P>
<P STYLE=3D"margin-top: 0pt;margin-bottom: 0pt;"><SPAN STYLE=3D"FONT-FAMILY=
:'Arial';FONT-SIZE:8pt;">********************** Legal Disclaimer **********=
****************** </SPAN>
</P>
<P STYLE=3D"margin-top: 0pt;margin-bottom: 0pt;"><SPAN STYLE=3D"FONT-FAMILY=
:'Arial';FONT-SIZE:8pt;">&quot;This email may contain confidential and priv=
ileged material for the sole use of the intended recipient.  Any unauthoriz=
ed review, use or distribution by others is strictly prohibited.  If you ha=
ve received the message in error, please advise the sender by reply email a=
nd delete the message. Thank you.&quot; </SPAN>
</P>
<P STYLE=3D"margin-top: 0pt;margin-bottom: 0pt;"><SPAN STYLE=3D"FONT-FAMILY=
:'Arial';FONT-SIZE:8pt;">**************************************************=
******************** </SPAN> </P></body>

</html>

------_=_NextPart_001_01C53A52.D9177C15--

From eckhardt@satorlaser.com Wed Apr  6 08:13:14 2005
Received: with ECARTIS (v1.0.0; list linux-mips); Wed, 06 Apr 2005 08:13:30 +0100 (BST)
Received: from moutng.kundenserver.de ([IPv6:::ffff:212.227.126.185]:37099
	"EHLO moutng.kundenserver.de") by linux-mips.org with ESMTP
	id <S8224905AbVDFHNO>; Wed, 6 Apr 2005 08:13:14 +0100
Received: from [212.227.126.162] (helo=mrelayng.kundenserver.de)
	by moutng.kundenserver.de with esmtp (Exim 3.35 #1)
	id 1DJ4iu-0006Oq-00
	for linux-mips@linux-mips.org; Wed, 06 Apr 2005 09:13:12 +0200
Received: from [213.39.254.66] (helo=tuxator.satorlaser-intern.com)
	by mrelayng.kundenserver.de with asmtp (TLSv1:RC4-MD5:128)
	(Exim 3.35 #1)
	id 1DJ4iu-0002o8-00
	for linux-mips@linux-mips.org; Wed, 06 Apr 2005 09:13:12 +0200
From:	Ulrich Eckhardt <eckhardt@satorlaser.com>
Organization: Sator Laser GmbH
To:	linux-mips@linux-mips.org
Subject: Porting to new board [was: Re: Au1100 FB driver uplift for 2.6]
Date:	Wed, 6 Apr 2005 09:13:43 +0200
User-Agent: KMail/1.7.2
References: <200504041717.29098.eckhardt@satorlaser.com> <de11cd376cdc88e9c292ae7e204e2de9@embeddededge.com>
In-Reply-To: <de11cd376cdc88e9c292ae7e204e2de9@embeddededge.com>
MIME-Version: 1.0
Content-Type: text/plain;
  charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
Message-Id: <200504060913.43780.eckhardt@satorlaser.com>
X-Provags-ID: kundenserver.de abuse@kundenserver.de auth:e35cee35a663f5c944b9750a965814ae
Return-Path: <eckhardt@satorlaser.com>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 7601
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: eckhardt@satorlaser.com
Precedence: bulk
X-list: linux-mips

Dan Malek wrote:
> On Apr 4, 2005, at 11:17 AM, Ulrich Eckhardt wrote:
> > [2] Based on DB1100. Are there any pointers on how to port to a new
> > board, btw?
>
> One of the discussion items is always how to keep a "generic"
> driver and still provide unique setup/control for different types of
> boards.  I guess if we can discuss other board ports, it will be
> more clear how to do this.

OK, I'll be more concrete:
The board I'm talking about has different peripherals than the DB1100. In 
particular, it doesn't have any BCSRs, it only has a single flash-chip with 2 
MB RAM on board, a CAN bus interface and a rather peculiar way to generate 
the clocks for attached displays. 
 Most of this is easily remedied by only compiling a selected driver in and 
I'm doing rather fine loading a DB1100 config and modifying it a bit to get 
the board running. There are a few things though where I could really use a 
preprocessor check for that board:
- the layout table for the on-board flash RAM. The current driver only checks 
for a handful of layouts supported by the DB1x/PB1x boards, but those don't 
fit. This needs more research though.
- a default configuration file would be nice, but optional.
- the mentioned BCSRs are used to control some peripherals. Code that uses 
them needs to be changed.

All in all, I'd just write a different board_setup() routine than the one for 
DB1100 and have a few #ifdef HAVE_DB1x00_BCSR and be done. I'd even make this 
a subtype of the 'standard' DB1100 configuration, because of its strong 
similarities, but there are a few cases where I simply need to determine the 
type in the code.

I'd send a patch for discussion, but I'm far from finished yet. If there are 
any pitfalls I should watch out for or you have any suggestion how to tackle 
this problem, I'm all open ears.

thanks

Uli

From ask4adam@rogers.com Wed Apr  6 08:17:26 2005
Received: with ECARTIS (v1.0.0; list linux-mips); Wed, 06 Apr 2005 08:17:49 +0100 (BST)
Received: from smtp103.rog.mail.re2.yahoo.com ([IPv6:::ffff:206.190.36.81]:24747
	"HELO smtp103.rog.mail.re2.yahoo.com") by linux-mips.org with SMTP
	id <S8224850AbVDFHR0>; Wed, 6 Apr 2005 08:17:26 +0100
Received: from unknown (HELO hugeboy) (ask4adam@24.100.66.33 with login)
  by smtp103.rog.mail.re2.yahoo.com with SMTP; 6 Apr 2005 07:17:18 -0000
From:	"Adam S. Kozlowski" <ask4adam@rogers.com>
To:	<linux-mips@linux-mips.org>
Subject: Can someone help with IBM Z-50?
Date:	Wed, 6 Apr 2005 03:16:57 -0400
MIME-Version: 1.0
Content-Type: multipart/alternative;
	boundary="----=_NextPart_000_0004_01C53A57.176AD410"
X-Mailer: Microsoft Office Outlook, Build 11.0.6353
Thread-Index: AcU6eJ4aPoTj+rWMTv2iWd8+1JH2og==
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.224
Message-Id: <20050406071726Z8224850-1340+5294@linux-mips.org>
Return-Path: <ask4adam@rogers.com>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 7602
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: ask4adam@rogers.com
Precedence: bulk
X-list: linux-mips

This is a multi-part message in MIME format.

------=_NextPart_000_0004_01C53A57.176AD410
Content-Type: text/plain;
	charset="Windows-1252"
Content-Transfer-Encoding: 7bit

Hi there,
 
I have tried to compile the kernel for Z-50 (both 2.4.x and 2.6.x) for IBM
Z-50 and just am not be able to do it successfully.
 
Has someone a linux kernel available for this device that I could download?
 
I have been running netbsd - but would prefer to move to Linux.
 
I believe that if I could boot it - I should be able to use the Debian for
mips, or Gentoo mips distro - right?
 
If necessary, I could offer few bucks for some assistance.
I just want to try it, and I spent weeks on it with no luck (was able to
boot the old kernel from linux-vr days).
 
Regards,
 
netc

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.859 / Virus Database: 585 - Release Date: 2/14/2005
 

------=_NextPart_000_0004_01C53A57.176AD410
Content-Type: text/html;
	charset="Windows-1252"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META HTTP-EQUIV=3D"Content-Type" CONTENT=3D"text/html; =
charset=3DWindows-1252">


<META content=3D"MSHTML 6.00.3790.259" name=3DGENERATOR></HEAD>
<BODY>
<DIV><FONT face=3DArial size=3D2><SPAN class=3D156521007-06042005>Hi=20
there,</SPAN></FONT></DIV>
<DIV><FONT face=3DArial size=3D2><SPAN=20
class=3D156521007-06042005></SPAN></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2><SPAN class=3D156521007-06042005>I have =
tried to=20
compile the kernel for Z-50 (both 2.4.x and 2.6.x) for IBM Z-50 and =
just&nbsp;am=20
not&nbsp;be able to do it successfully.</SPAN></FONT></DIV>
<DIV><FONT face=3DArial size=3D2><SPAN=20
class=3D156521007-06042005></SPAN></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2><SPAN class=3D156521007-06042005>Has =
someone a linux=20
kernel available for this device that I could =
download?</SPAN></FONT></DIV>
<DIV><FONT face=3DArial size=3D2><SPAN=20
class=3D156521007-06042005></SPAN></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2><SPAN class=3D156521007-06042005>I have =
been running=20
netbsd - but would prefer to move to Linux.</SPAN></FONT></DIV>
<DIV><FONT face=3DArial size=3D2><SPAN=20
class=3D156521007-06042005></SPAN></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2><SPAN class=3D156521007-06042005>I =
believe that if I=20
could boot it - I should be able to use the Debian for mips, or Gentoo =
mips=20
distro - right?</SPAN></FONT></DIV>
<DIV><FONT face=3DArial size=3D2><SPAN=20
class=3D156521007-06042005></SPAN></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2><SPAN class=3D156521007-06042005>If =
necessary, I=20
could offer few bucks for some assistance.</SPAN></FONT></DIV>
<DIV><FONT face=3DArial size=3D2><SPAN class=3D156521007-06042005>I just =
want to try=20
it, and I spent weeks on it with no luck (was able to boot the old =
kernel from=20
linux-vr days).</SPAN></FONT></DIV>
<DIV><FONT face=3DArial size=3D2><SPAN=20
class=3D156521007-06042005></SPAN></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2><SPAN=20
class=3D156521007-06042005>Regards,</SPAN></FONT></DIV>
<DIV><FONT face=3DArial size=3D2><SPAN=20
class=3D156521007-06042005></SPAN></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2><SPAN=20
class=3D156521007-06042005>netc</SPAN></FONT></DIV></BODY></HTML>
<BR>

<P><FONT SIZE=3D2>---<BR>
Outgoing mail is certified Virus Free.<BR>
Checked by AVG anti-virus system (http://www.grisoft.com).<BR>
Version: 6.0.859 / Virus Database: 585 - Release Date: 2/14/2005<BR>
</FONT> </P>

------=_NextPart_000_0004_01C53A57.176AD410--


From eckhardt@satorlaser.com Wed Apr  6 10:31:08 2005
Received: with ECARTIS (v1.0.0; list linux-mips); Wed, 06 Apr 2005 10:31:27 +0100 (BST)
Received: from moutng.kundenserver.de ([IPv6:::ffff:212.227.126.188]:26346
	"EHLO moutng.kundenserver.de") by linux-mips.org with ESMTP
	id <S8224850AbVDFJbI>; Wed, 6 Apr 2005 10:31:08 +0100
Received: from [212.227.126.162] (helo=mrelayng.kundenserver.de)
	by moutng.kundenserver.de with esmtp (Exim 3.35 #1)
	id 1DJ6sM-0005Bh-00
	for linux-mips@linux-mips.org; Wed, 06 Apr 2005 11:31:06 +0200
Received: from [213.39.254.66] (helo=tuxator.satorlaser-intern.com)
	by mrelayng.kundenserver.de with asmtp (TLSv1:RC4-MD5:128)
	(Exim 3.35 #1)
	id 1DJ6sM-0002YL-00
	for linux-mips@linux-mips.org; Wed, 06 Apr 2005 11:31:07 +0200
From:	Ulrich Eckhardt <eckhardt@satorlaser.com>
Organization: Sator Laser GmbH
To:	linux-mips@linux-mips.org
Subject: Re: Au1100 FB driver uplift for 2.6
Date:	Wed, 6 Apr 2005 11:31:37 +0200
User-Agent: KMail/1.7.2
References: <200504041717.29098.eckhardt@satorlaser.com> <de11cd376cdc88e9c292ae7e204e2de9@embeddededge.com>
In-Reply-To: <de11cd376cdc88e9c292ae7e204e2de9@embeddededge.com>
MIME-Version: 1.0
Content-Type: text/plain;
  charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
Message-Id: <200504061131.38457.eckhardt@satorlaser.com>
X-Provags-ID: kundenserver.de abuse@kundenserver.de auth:e35cee35a663f5c944b9750a965814ae
Return-Path: <eckhardt@satorlaser.com>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 7603
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: eckhardt@satorlaser.com
Precedence: bulk
X-list: linux-mips

Dan Malek wrote:
> On Apr 4, 2005, at 11:17 AM, Ulrich Eckhardt wrote:
> > Am I on the wrong way or should I just reimplement it and send a patch?
>
> If you an test it, do it and send a patch.

There will be two patches, this one doesn't reimplement the mentioned 
feature but fixes a few other bugs. 

There are two questions left in that patch, apart from the handling of the 
WWPC display as mentioned in the header. One is, if there was a reason to 
use a fixed-size char array for the panelname. 

The other is about the use of au1100fb_fix and au1100fb_var. Is the 
explanation in the patch accurate? Would it make more sense to write 
directly into fbdev->info.var and fbdev->info.fixed? Also, couldn't 
au1100fb_drv_probe() be declared as __init? After all, a late call to 
au1100fb_drv_probe() will probably have fatal consequences anyway because 
it depends on the above and they are declared __initdata.

Uli

Changes:
 * fixed typos, inconsistent formatting and trailing whitespace
 * added a check to a kalloc() call
 * fixed possible resource leak in au1100fb_drv_probe()
 * replaced the fixed-size panel name with a char pointer 
 * added a few 'const'
 * added display data for PrimeView PD104SL5

---
Index: drivers/video/au1100fb.c
===================================================================
RCS file: /home/cvs/linux/drivers/video/au1100fb.c,v
retrieving revision 1.6
diff -u -r1.6 au1100fb.c
--- drivers/video/au1100fb.c 4 Apr 2005 01:06:20 -0000 1.6
+++ drivers/video/au1100fb.c 6 Apr 2005 09:03:54 -0000
@@ -3,7 +3,7 @@
  * Au1100 LCD Driver.
  *
  * Rewritten for 2.6 by Embedded Alley Solutions
- *  <source@embeddedalley.com>, based on submissions by 
+ *  <source@embeddedalley.com>, based on submissions by
  *   Karl Lessard <klessard@sunrisetelecom.com>
  *   <c.pellegrin@exadron.com>
  *
@@ -56,7 +56,7 @@
 
 #include "au1100fb.h"
 
-/* 
+/*
  * Sanity check. If this is a new Au1100 based board, search for
  * the PB1100 ifdefs to make sure you modify the code accordingly.
  */
@@ -74,11 +74,11 @@
 #define to_au1100fb_device(_info) \
    (_info ? container_of(_info, struct au1100fb_device, info) : NULL);
 
-/* Bitfields format supported by the controller. Note that the order of formats 
+/* Bitfields format supported by the controller. Note that the order of formats
  * SHOULD be the same as in the LCD_CONTROL_SBPPF field, so we can retrieve the
  * right pixel format by doing rgb_bitfields[LCD_CONTROL_SBPPF_XXX >> LCD_CONTROL_SBPPF]
  */
-struct fb_bitfield rgb_bitfields[][4] = 
+struct fb_bitfield rgb_bitfields[][4] =
 {
    /*     Red,     Green,   Blue,       Transp   */
  { { 10, 6, 0 }, { 5, 5, 0 }, { 0, 5, 0 }, { 0, 0, 0 } },
@@ -91,6 +91,8 @@
  { { 8, 4, 0 },  { 4, 4, 0 }, { 0, 4, 0 }, { 0, 0, 0 } },
 };
 
+/* au1100fb_fix and au1100fb_var are local vars of au1100fb_drv_probe() but
+defined here in order to not exhaust the stack. */
 static struct fb_fix_screeninfo au1100fb_fix __initdata = {
  .id  = "AU1100 FB",
  .xpanstep  = 1,
@@ -111,7 +113,7 @@
 /*
  * Set hardware with var settings. This will enable the controller with a specific
  * mode, normally validated with the fb_check_var method
-  */
+ */
 int au1100fb_setmode(struct au1100fb_device *fbdev)
 {
  struct fb_info *info = &fbdev->info;
@@ -142,7 +144,7 @@
    info->var.transp.msb_right = 0;
 
    info->fix.visual = FB_VISUAL_PSEUDOCOLOR;
-   info->fix.line_length = info->var.xres_virtual / 
+   info->fix.line_length = info->var.xres_virtual /
        (8/info->var.bits_per_pixel);
   } else {
    /* non-palettized */
@@ -154,7 +156,7 @@
 
    info->fix.visual = FB_VISUAL_TRUECOLOR;
    info->fix.line_length = info->var.xres_virtual << 1; /* depth=16 */
- }
+  }
  } else {
   /* mono */
   info->fix.visual = FB_VISUAL_MONO10;
@@ -162,7 +164,7 @@
  }
 
  info->screen_size = info->fix.line_length * info->var.yres_virtual;
- 
+
  /* Determine BPP mode and format */
  fbdev->regs->lcd_control = fbdev->panel->control_base |
        ((info->var.rotate/90) << LCD_CONTROL_SM_BIT);
@@ -183,8 +185,8 @@
    * otherwise display the same as the first panel */
   if (info->var.yres_virtual >= (info->var.yres << 1)) {
    fbdev->regs->lcd_dmaaddr1 = LCD_DMA_SA_N(fbdev->fb_phys +
-         (info->fix.line_length * 
-                (info->var.yres_virtual >> 1)));
+         (info->fix.line_length *
+         (info->var.yres_virtual >> 1)));
   } else {
    fbdev->regs->lcd_dmaaddr1 = LCD_DMA_SA_N(fbdev->fb_phys);
   }
@@ -201,7 +203,7 @@
 
  fbdev->regs->lcd_pwmdiv = 0;
  fbdev->regs->lcd_pwmhi = 0;
-   
+
  /* Resume controller */
  fbdev->regs->lcd_control |= LCD_CONTROL_GO;
 
@@ -222,22 +224,22 @@
 
  if (fbi->var.grayscale) {
   /* Convert color to grayscale */
-  red = green = blue = 
+  red = green = blue =
    (19595 * red + 38470 * green + 7471 * blue) >> 16;
  }
-   
+
  if (fbi->fix.visual == FB_VISUAL_TRUECOLOR) {
   /* Place color in the pseudopalette */
   if (regno > 16)
    return -EINVAL;
-   
+
   palette = (u32*)fbi->pseudo_palette;
 
   red   >>= (16 - fbi->var.red.length);
   green >>= (16 - fbi->var.green.length);
   blue  >>= (16 - fbi->var.blue.length);
- 
-  value = (red   << fbi->var.red.offset)  | 
+
+  value = (red   << fbi->var.red.offset)  |
    (green << fbi->var.green.offset)|
    (blue  << fbi->var.blue.offset);
   value &= 0xFFFF;
@@ -249,8 +251,8 @@
 
  } else if (panel_is_color(fbdev->panel)) {
   /* COLOR STN MODE */
-  value = (((panel_swap_rgb(fbdev->panel) ? blue : red) >> 12) & 0x000F) | 
-   ((green >> 8) & 0x00F0) | 
+  value = (((panel_swap_rgb(fbdev->panel) ? blue : red) >> 12) & 0x000F) |
+   ((green >> 8) & 0x00F0) |
    (((panel_swap_rgb(fbdev->panel) ? red : blue) >> 4) & 0x0F00);
   value &= 0xFFF;
  } else {
@@ -260,7 +262,7 @@
  }
 
  palette[regno] = value;
- 
+
  return 0;
 }
 
@@ -277,14 +279,14 @@
  switch (blank_mode) {
 
  case VESA_NO_BLANKING:
-   /* Turn on panel */
-   fbdev->regs->lcd_control |= LCD_CONTROL_GO;
+  /* Turn on panel */
+  fbdev->regs->lcd_control |= LCD_CONTROL_GO;
 #ifdef CONFIG_MIPS_PB1100
-   if (drv_info.panel_idx == 1) {
-    au_writew(au_readw(PB1100_G_CONTROL) 
-       | (PB1100_G_CONTROL_BL | PB1100_G_CONTROL_VDD), 
-   PB1100_G_CONTROL);
-   }
+  if (drv_info.panel_idx == 1) {
+   au_writew(au_readw(PB1100_G_CONTROL)
+     | (PB1100_G_CONTROL_BL | PB1100_G_CONTROL_VDD),
+    PB1100_G_CONTROL);
+  }
 #endif
   au_sync();
   break;
@@ -292,20 +294,20 @@
  case VESA_VSYNC_SUSPEND:
  case VESA_HSYNC_SUSPEND:
  case VESA_POWERDOWN:
-   /* Turn off panel */
-   fbdev->regs->lcd_control &= ~LCD_CONTROL_GO;
+  /* Turn off panel */
+  fbdev->regs->lcd_control &= ~LCD_CONTROL_GO;
 #ifdef CONFIG_MIPS_PB1100
-   if (drv_info.panel_idx == 1) {
-    au_writew(au_readw(PB1100_G_CONTROL) 
-         & ~(PB1100_G_CONTROL_BL | PB1100_G_CONTROL_VDD),
-   PB1100_G_CONTROL);
-   }
+  if (drv_info.panel_idx == 1) {
+   au_writew(au_readw(PB1100_G_CONTROL)
+     & ~(PB1100_G_CONTROL_BL | PB1100_G_CONTROL_VDD),
+    PB1100_G_CONTROL);
+  }
 #endif
   au_sync();
   break;
- default: 
-  break;
 
+ default:
+  break;
  }
  return 0;
 }
@@ -328,7 +330,7 @@
   /* No support for X panning for now! */
   return -EINVAL;
  }
-   
+
  print_dbg("fb_pan_display 2 %p %p", var, fbi);
  dy = var->yoffset - fbi->var.yoffset;
  if (dy) {
@@ -340,14 +342,14 @@
   dmaaddr = fbdev->regs->lcd_dmaaddr0;
   dmaaddr += (fbi->fix.line_length * dy);
 
-  /* TODO: Wait for current frame to finished */
+  /* TODO: Wait for current frame to be finished */
   fbdev->regs->lcd_dmaaddr0 = LCD_DMA_SA_N(dmaaddr);
 
   if (panel_is_dual(fbdev->panel)) {
    dmaaddr = fbdev->regs->lcd_dmaaddr1;
    dmaaddr += (fbi->fix.line_length * dy);
    fbdev->regs->lcd_dmaaddr0 = LCD_DMA_SA_N(dmaaddr);
- }
+  }
  }
  print_dbg("fb_pan_display 3 %p %p", var, fbi);
 
@@ -388,7 +390,7 @@
  if (vma->vm_pgoff > (~0UL >> PAGE_SHIFT)) {
   return -EINVAL;
  }
-    
+
  start = fbdev->fb_phys & PAGE_MASK;
  len = PAGE_ALIGN((start & ~PAGE_MASK) + fbdev->fb_len);
 
@@ -405,7 +407,7 @@
  pgprot_val(vma->vm_page_prot) |= (6 << 9); //CCA=6
 
  vma->vm_flags |= VM_IO;
-    
+
  if (io_remap_page_range(vma, vma->vm_start, off,
     vma->vm_end - vma->vm_start,
     vma->vm_page_prot)) {
@@ -415,7 +417,7 @@
  return 0;
 }
 
-static struct fb_ops au1100fb_ops = 
+static struct fb_ops au1100fb_ops =
 {
  .owner   = THIS_MODULE,
  .fb_setcolreg  = au1100fb_fb_setcolreg,
@@ -440,13 +442,14 @@
  struct resource *regs_res;
  unsigned long page;
  u32 sys_clksrc;
+ int res = 0;
 
  if (!dev)
-   return -EINVAL;
+  return -EINVAL;
 
  /* Allocate new device private */
  if (!(fbdev = kmalloc(sizeof(struct au1100fb_device), GFP_KERNEL))) {
-  print_err("fail to allocate device private record");
+  print_err("failed to allocate device private record");
   return -ENOMEM;
  }
  memset((void*)fbdev, 0, sizeof(struct au1100fb_device));
@@ -456,20 +459,22 @@
  dev_set_drvdata(dev, (void*)fbdev);
 
  /* Allocate region for our registers and map them */
- if (!(regs_res = platform_get_resource(to_platform_device(dev), 
+ if (!(regs_res = platform_get_resource(to_platform_device(dev),
      IORESOURCE_MEM, 0))) {
-  print_err("fail to retrieve registers resource");
-  return -EFAULT;
+  print_err("failed to retrieve registers resource");
+  res = -EFAULT;
+  goto failed;
  }
 
  au1100fb_fix.mmio_start = regs_res->start;
  au1100fb_fix.mmio_len = regs_res->end - regs_res->start + 1;
 
- if (!request_mem_region(au1100fb_fix.mmio_start, au1100fb_fix.mmio_len, 
+ if (!request_mem_region(au1100fb_fix.mmio_start, au1100fb_fix.mmio_len,
     DRIVER_NAME)) {
-  print_err("fail to lock memory region at 0x%08x", 
+  print_err("failed to lock memory region at 0x%08x",
     au1100fb_fix.mmio_start);
-  return -EBUSY;
+  res = -EBUSY;
+  goto failed;
  }
 
  fbdev->regs = (struct au1100fb_regs*)KSEG1ADDR(au1100fb_fix.mmio_start);
@@ -478,17 +483,17 @@
  print_dbg("phys=0x%08x, size=%d", fbdev->regs_phys, fbdev->regs_len);
 
 
-
  /* Allocate the framebuffer to the maximum screen size * nbr of video buffers */
  fbdev->fb_len = fbdev->panel->xres * fbdev->panel->yres *
      (fbdev->panel->bpp >> 3) * AU1100FB_NBR_VIDEO_BUFFERS;
- 
- fbdev->fb_mem = dma_alloc_coherent(dev, PAGE_ALIGN(fbdev->fb_len), 
+
+ fbdev->fb_mem = dma_alloc_coherent(dev, PAGE_ALIGN(fbdev->fb_len),
      &fbdev->fb_phys, GFP_KERNEL);
  if (!fbdev->fb_mem) {
-  print_err("fail to allocate frambuffer (size: %dK))", 
+  print_err("failed to allocate frambuffer (size: %dKiB))",
      fbdev->fb_len / 1024);
-  return -ENOMEM;
+  res = -ENOMEM;
+  goto failed;
  }
 
  au1100fb_fix.smem_start = fbdev->fb_phys;
@@ -499,7 +504,7 @@
   * since we'll be remapping normal memory.
   */
  for (page = (unsigned long)fbdev->fb_mem;
-      page < PAGE_ALIGN((unsigned long)fbdev->fb_mem + fbdev->fb_len); 
+      page < PAGE_ALIGN((unsigned long)fbdev->fb_mem + fbdev->fb_len);
       page += PAGE_SIZE) {
 #if CONFIG_DMA_NONCOHERENT
   SetPageReserved(virt_to_page(CAC_ADDR(page)));
@@ -527,15 +532,17 @@
  fbdev->info.fix = au1100fb_fix;
 
  if (!(fbdev->info.pseudo_palette = kmalloc(sizeof(u32) * 16, GFP_KERNEL))) {
-  return -ENOMEM;
+  print_err("failed to allocate pseudo palette");
+  res = -ENOMEM;
+  goto failed;
  }
  memset(fbdev->info.pseudo_palette, 0, sizeof(u32) * 16);
 
  if (fb_alloc_cmap(&fbdev->info.cmap, AU1100_LCD_NBR_PALETTE_ENTRIES, 0) < 0) {
-  print_err("Fail to allocate colormap (%d entries)",
+  print_err("failed to allocate colormap (%d entries)",
       AU1100_LCD_NBR_PALETTE_ENTRIES);
-  kfree(fbdev->info.pseudo_palette);
-  return -EFAULT;
+  res = -EFAULT;
+  goto failed;
  }
 
  fbdev->info.var = au1100fb_var;
@@ -546,25 +553,30 @@
  /* Register new framebuffer */
  if (register_framebuffer(&fbdev->info) < 0) {
   print_err("cannot register new framebuffer");
+  res = -EFAULT;
   goto failed;
  }
 
  return 0;
 
 failed:
- if (fbdev->regs) {
-  release_mem_region(fbdev->regs_phys, fbdev->regs_len);
+ /** Failure. Release all resources in opposite order of allocation. */
+ if (fbdev->info.cmap.len != 0) {
+  fb_dealloc_cmap(&fbdev->info.cmap);
+ }
+ if (fbdev->info.pseudo_palette){
+  kfree(fbdev->info.pseudo_palette);
  }
  if (fbdev->fb_mem) {
   dma_free_noncoherent(dev, fbdev->fb_len, fbdev->fb_mem, fbdev->fb_phys);
  }
- if (fbdev->info.cmap.len != 0) {
-  fb_dealloc_cmap(&fbdev->info.cmap);
+ if (fbdev->regs) {
+  release_mem_region(fbdev->regs_phys, fbdev->regs_len);
  }
- kfree(fbdev);
  dev_set_drvdata(dev, NULL);
+ kfree(fbdev);
 
- return 0;
+ return res;
 }
 
 int au1100fb_drv_remove(struct device *dev)
@@ -610,17 +622,16 @@
 static struct device_driver au1100fb_driver = {
  .name  = "au1100-lcd",
  .bus  = &platform_bus_type,
-
  .probe  = au1100fb_drv_probe,
-        .remove  = au1100fb_drv_remove,
+ .remove  = au1100fb_drv_remove,
  .suspend = au1100fb_drv_suspend,
-        .resume  = au1100fb_drv_resume,
+ .resume  = au1100fb_drv_resume,
 };
-    
+
 /*-------------------------------------------------------------------------*/
 
 /* Kernel driver */
-    
+
 int au1100fb_setup(char *options)
 {
  char* this_opt;
@@ -631,44 +642,48 @@
  if (num_panels <= 0) {
   print_err("No LCD panels supported by driver!");
   return -EFAULT;
-   }
+ }
 
  if (options) {
   while ((this_opt = strsep(&options,",")) != NULL) {
+   size_t len = strlen(this_opt);
    /* Panel option */
-  if (!strncmp(this_opt, "panel:", 6)) {
+   if (!strncmp(this_opt, "panel:", 6)) {
     int i;
     this_opt += 6;
     for (i = 0; i < num_panels; i++) {
      if (!strncmp(this_opt,
-                 known_lcd_panels[i].name, 
-       strlen(this_opt))) {
+                 known_lcd_panels[i].name,
+                  len)) {
       panel_idx = i;
-     break;
+      break;
+     }
     }
-   }
     if (i >= num_panels) {
       print_warn("Panel %s not supported!", this_opt);
+     return -ENOTSUPP;
     }
    }
    /* Mode option (only option that start with digit) */
    else if (isdigit(this_opt[0])) {
-    mode = kmalloc(strlen(this_opt) + 1, GFP_KERNEL);
-    strncpy(mode, this_opt, strlen(this_opt) + 1);
+    mode = kmalloc(len+1, GFP_KERNEL);
+    if(!mode)
+     return -ENOMEM;
+    strncpy(mode, this_opt, len);
    }
    /* Unsupported option */
    else {
     print_warn("Unsupported option \"%s\"", this_opt);
+   }
   }
-  }
- } 
+ }
 
  drv_info.panel_idx = panel_idx;
  drv_info.opt_mode = mode;
 
  print_info("Panel=%s Mode=%s",
    known_lcd_panels[drv_info.panel_idx].name,
-         drv_info.opt_mode ? drv_info.opt_mode : "default");
+   drv_info.opt_mode ? drv_info.opt_mode : "default");
 
  return 0;
 }
@@ -677,9 +692,9 @@
 {
  char* options;
  int ret;
- 
+
  print_info("" DRIVER_DESC "");
- 
+
  memset(&drv_info, 0, sizeof(drv_info));
 
  if (fb_get_options(DRIVER_NAME, &options))
@@ -688,7 +703,7 @@
  /* Setup driver with options */
  ret = au1100fb_setup(options);
  if (ret < 0) {
-  print_err("Fail to setup driver");
+  print_err("Failed to setup driver");
   return ret;
  }
 
Index: drivers/video/au1100fb.h
===================================================================
RCS file: /home/cvs/linux/drivers/video/au1100fb.h,v
retrieving revision 1.2
diff -u -r1.2 au1100fb.h
--- drivers/video/au1100fb.h 4 Apr 2005 01:06:20 -0000 1.2
+++ drivers/video/au1100fb.h 6 Apr 2005 09:03:54 -0000
@@ -65,20 +65,20 @@
 
 struct au1100fb_panel
 {
- const char name[25];  /* Full name <vendor>_<model> */
+ const char* name;  /* Full name <vendor>_<model> */
 
- u32    control_base;  /* Mode-independent control values */
+ u32 control_base;  /* Mode-independent control values */
  u32 clkcontrol_base; /* Panel pixclock preferences */
 
  u32 horztiming;
  u32 verttiming;
 
  u32 xres;  /* Maximum horizontal resolution */
- u32  yres;  /* Maximum vertical resolution */
- u32  bpp;  /* Maximum depth supported */
+ u32 yres;  /* Maximum vertical resolution */
+ u32 bpp;  /* Maximum depth supported */
 };
 
-struct au1100fb_regs 
+struct au1100fb_regs
 {
  u32  lcd_control;
  u32  lcd_intstatus;
@@ -99,7 +99,7 @@
 
  struct fb_info info;   /* FB driver info record */
 
- struct au1100fb_panel  *panel;  /* Panel connected to this device */
+ const struct au1100fb_panel  *panel;  /* Panel connected to this device */
 
  struct au1100fb_regs*  regs;  /* Registers memory map */
  size_t         regs_len;
@@ -255,7 +255,7 @@
 
 /* List of panels known to work with the AU1100 LCD controller.
  * To add a new panel, enter the same specifications as the
- * Generic_TFT one, and MAKE SURE that it doesn't conflicts 
+ * Generic_TFT one, and MAKE SURE that it doesn't conflicts
  * with the controller restrictions. Restrictions are:
  *
  * STN color panels: max_bpp <= 12
@@ -264,7 +264,7 @@
  * max_xres <= 800
  * max_yres <= 600
  */
-static struct au1100fb_panel known_lcd_panels[] =
+static const struct au1100fb_panel known_lcd_panels[] =
 {
  /* 800x600x16bpp CRT */
  [0] = {
@@ -272,14 +272,24 @@
   .xres = 800,
   .yres = 600,
   .bpp = 16,
-  .control_base = 0x0004886A | 
+  .control_base = 0x0004886A |
    LCD_CONTROL_DEFAULT_PO | LCD_CONTROL_DEFAULT_SBPPF |
    LCD_CONTROL_BPP_16,
   .clkcontrol_base = 0x00020000,
   .horztiming = 0x005aff1f,
   .verttiming = 0x16000e57,
  },
- /* just the standard LCD */
+
+ /* just the standard LCD
+ TODO: There is only one case where the index in this array is checked,
+ and that also only on PB1100 boards. Clarify when exactly this is used
+ and why, and possibly integrate this differently.
+
+ Also, I'm not sure the code is right: in older versions, WWPC had this
+ display hard-coded in, and for PB1100 and DB1100, there was a way to
+ select a display by reading the BCSR. Now, there seems to be a special
+ way of blanking/unblanking this particular display.
+ */
  [1] = {
   .name = "WWPC LCD",
   .xres = 240,
@@ -290,6 +300,7 @@
   .verttiming = 0x0301013F,
   .clkcontrol_base = 0x00018001,
  },
+
  /* Sharp 320x240 TFT panel */
  [2] = {
   .name = "Sharp_LQ038Q5DR01",
@@ -351,7 +362,7 @@
   .clkcontrol_base = LCD_CLKCONTROL_PCD_N(1),
  },
 
-  /* Pb1100 LCDB 640x480 PrimeView TFT panel */
+ /* Pb1100 LCDB 640x480 PrimeView TFT panel */
  [5] = {
   .name = "PrimeView_640x480_16",
   .xres = 640,
@@ -362,6 +373,37 @@
   .verttiming = 0x210805df,
   .clkcontrol_base = 0x00038001,
  },
+
+ /* PrimeView PD104SL5 , a 800x600 16BPP color LCD */
+ [6] = {
+  .name = "PrimeView_PD104SL5",
+  .xres = 800,
+  .yres = 640,
+  .bpp = 16,
+  .control_base =
+   ( LCD_CONTROL_SBPPF_565
+   | LCD_CONTROL_C
+   | LCD_CONTROL_SM_0
+   | LCD_CONTROL_DEFAULT_PO
+   | LCD_CONTROL_CCO
+   | LCD_CONTROL_PT
+   | LCD_CONTROL_PC
+   | LCD_CONTROL_BPP_16 ),
+  .horztiming =
+   ( LCD_HORZTIMING_HN2_N(30)
+   | LCD_HORZTIMING_HN1_N(30)
+   | LCD_HORZTIMING_HPW_N(60)
+   | LCD_HORZTIMING_PPL_N(800) ),
+  .verttiming =
+   ( LCD_VERTTIMING_VN2_N(1)
+   | LCD_VERTTIMING_VN1_N(1)
+   | LCD_VERTTIMING_VPW_N(2)
+   | LCD_VERTTIMING_LPP_N(600) ),
+  .clkcontrol_base =
+   ( LCD_CLKCONTROL_IH
+   | LCD_CLKCONTROL_IV
+   | LCD_CLKCONTROL_PCD_N(1)),
+ }
 };
 
 struct au1100fb_drv_info {

From bvacaliuc@firefly.mv.com Wed Apr  6 12:01:41 2005
Received: with ECARTIS (v1.0.0; list linux-mips); Wed, 06 Apr 2005 12:01:57 +0100 (BST)
Received: from mercury.mv.net ([IPv6:::ffff:199.125.85.40]:13811 "HELO
	mercury.mv.net") by linux-mips.org with SMTP id <S8224850AbVDFLBl>;
	Wed, 6 Apr 2005 12:01:41 +0100
Received: (qmail 2939 invoked from network); 6 Apr 2005 07:01:39 -0400
Received: from 24-234-116-82.ptp.lvcm.net (HELO lithium) (firefly-bv@24.234.116.82)
  by mercury.mv.net with SMTP; 6 Apr 2005 07:01:39 -0400
X-Peer-Info: remote-ip 24.234.116.82 local-ip 199.125.85.40
  local-name mercury.mv.net
Reply-To: <bvacaliuc@ngit.com>
From:	"Bogdan Vacaliuc" <bvacaliuc@firefly.mv.com>
To:	"'Dan Malek'" <dan@embeddededge.com>,
	"'Gilad Rom'" <gilad@romat.com>
Cc:	<linux-mips@linux-mips.org>
Subject: RE: Gigabit Ethernet
Date:	Wed, 6 Apr 2005 07:01:25 -0400
Organization: NGI Technology, LLC
Message-ID: <002b01c53a98$0211ad00$0b03a8c0@lithium>
MIME-Version: 1.0
Content-Type: text/plain;
	charset="US-ASCII"
Content-Transfer-Encoding: 7bit
X-Priority: 3 (Normal)
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook, Build 10.0.6626
In-Reply-To: <62642b91fa50ac5f881ed8fa9400deed@embeddededge.com>
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1441
Importance: Normal
Return-Path: <bvacaliuc@firefly.mv.com>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 7604
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: bvacaliuc@firefly.mv.com
Precedence: bulk
X-list: linux-mips

On Tuesday, March 22, 2005 4:04 PM, Dan Malek wrote:

> On Mar 22, 2005, at 11:56 AM, Gilad Rom wrote:
> 
>> Has anyone ever tried using a Gigabit PCI
>> adapter with one of the Au1x00 boards? Any success?
> 
> Just remember that the Au1x00 boards are 32-bit , 33 MHz,
> 3.3V PCI, so choose your boards accordingly.  Please don't expect the
> Au1x00 to run the TCP/IP stack anywhere near Gigabit speeds ..... :-)

We have researching this topic for a little while, particularly from the FPGA standpoint.  Although not specific to MIPS, I offer a
few links which discuss the considerations for successfully sustaining gigabit ethernet transport.

The "Gigabit System Reference Design", pg. 49 offers some benchmarks obtained using MontaVista Linux on a PowerPC 405.  Key
takeaways are that the data payload must not be handled by the stack (DMA direct from framebuffer/fifo/sdram) and must use jumbo
(5000,9000) ethernet frames.

Best Regards,

-bogdan

---

EE Times, "Altera Demonstrates FPGA for video-over-IP", March 2005,
http://www.embedded.com/showArticle.jhtml?articleID=159903648 

Altera, "Video Over IP Reference Design", March 2005,
http://www.altera.com/solutions/refdesigns/sys-sol/broadcast/ref-video.html

Xilinx, "Gigabit System Reference Design", June 2004,
http://direct.xilinx.com/bvdocs/appnotes/xapp536.pdf 

Xilinx, "Considerations for High-Bandwidth TCP/IP PowerPC Applications", XCell Journal pg.14-16, Winter 2004,
http://www.xilinx.com/publications/xcellonline/xcell_51/xc_pdf/xc_xcell51.pdf 

Marco Riccioli, Xilinx "Getting the most TCP/IP from your Embedded Processor", Embedded World 2005,
http://www.treck.com/xilinx.pdf


From greg.weeks@timesys.com Wed Apr  6 13:30:55 2005
Received: with ECARTIS (v1.0.0; list linux-mips); Wed, 06 Apr 2005 13:31:09 +0100 (BST)
Received: from mail.timesys.com ([IPv6:::ffff:65.117.135.102]:15015 "EHLO
	exchange.timesys.com") by linux-mips.org with ESMTP
	id <S8224914AbVDFMay>; Wed, 6 Apr 2005 13:30:54 +0100
Received: from [192.168.2.27] ([192.168.2.27]) by exchange.timesys.com with Microsoft SMTPSVC(5.0.2195.6713);
	 Wed, 6 Apr 2005 08:26:45 -0400
Message-ID: <4253D67C.4010705@timesys.com>
Date:	Wed, 06 Apr 2005 08:30:52 -0400
From:	Greg Weeks <greg.weeks@timesys.com>
User-Agent: Mozilla Thunderbird 1.0 (X11/20041206)
X-Accept-Language: en-us, en
MIME-Version: 1.0
To:	linux-mips@linux-mips.org
Subject: memcpy prefetch
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-OriginalArrivalTime: 06 Apr 2005 12:26:45.0937 (UTC) FILETIME=[E5CC2A10:01C53AA3]
Return-Path: <greg.weeks@timesys.com>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 7605
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: greg.weeks@timesys.com
Precedence: bulk
X-list: linux-mips

In trying to understand the prefetch code in memcpy it looks like it's 
prefetching too far out in front of the loop. In the main aligned loop 
the loop copies 32 or 64 bytes of data and the prefetch is trying to 
prefetch 256 bytes ahead of the current copy. The prefetches should also 
pay attention to cache line size and they currently don't. If the line 
size is less than the copy size we are skipping prefetches that should 
be done. For the 4kc the line size is only 16 bytes. We should be doing 
a prefetch for each line. The src_unaligned_dst_aligned loop is even 
worse as it prefetches 288 bytes ahead of the copy and only copies 16 or 
32 bytes at a time.

Have I totally misunderstood the code?

Greg Weeks

From yuasa@hh.iij4u.or.jp Wed Apr  6 14:11:59 2005
Received: with ECARTIS (v1.0.0; list linux-mips); Wed, 06 Apr 2005 14:12:13 +0100 (BST)
Received: from mo00.iij4u.or.jp ([IPv6:::ffff:210.130.0.19]:5088 "EHLO
	mo00.iij4u.or.jp") by linux-mips.org with ESMTP id <S8224914AbVDFNL7>;
	Wed, 6 Apr 2005 14:11:59 +0100
Received: MO(mo00)id j36DBuYO008105; Wed, 6 Apr 2005 22:11:56 +0900 (JST)
Received: MDO(mdo01) id j36DBtm3004302; Wed, 6 Apr 2005 22:11:55 +0900 (JST)
Received: 4UMRO00 id j36DBsWb000190; Wed, 6 Apr 2005 22:11:54 +0900 (JST)
	from stratos (localhost [127.0.0.1]) (authenticated)
Date:	Wed, 6 Apr 2005 22:11:54 +0900
From:	Yoichi Yuasa <yuasa@hh.iij4u.or.jp>
To:	"Adam S. Kozlowski" <ask4adam@rogers.com>
Cc:	linux-mips@linux-mips.org
Subject: Re: Can someone help with IBM Z-50?
Message-Id: <20050406221154.7bee61d8.yuasa@hh.iij4u.or.jp>
In-Reply-To: <20050406071726Z8224850-1340+5294@linux-mips.org>
References: <20050406071726Z8224850-1340+5294@linux-mips.org>
X-Mailer: Sylpheed version 1.0.4 (GTK+ 1.2.10; i386-pc-linux-gnu)
Mime-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Return-Path: <yuasa@hh.iij4u.or.jp>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 7606
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: yuasa@hh.iij4u.or.jp
Precedence: bulk
X-list: linux-mips

Hi,

On Wed, 6 Apr 2005 03:16:57 -0400
"Adam S. Kozlowski" <ask4adam@rogers.com> wrote:

> Hi there,
>  
> I have tried to compile the kernel for Z-50 (both 2.4.x and 2.6.x) for IBM
> Z-50 and just am not be able to do it successfully.

What's your problem on z50?

kernel compile?
boot?

Yoichi

From b.srinivas@conexant.com Wed Apr  6 14:34:29 2005
Received: with ECARTIS (v1.0.0; list linux-mips); Wed, 06 Apr 2005 14:34:43 +0100 (BST)
Received: from cnxtsmtp8.conexant.com ([IPv6:::ffff:216.89.70.36]:43277 "EHLO
	mime-nj.bbnet.ad") by linux-mips.org with ESMTP id <S8224914AbVDFNe3>;
	Wed, 6 Apr 2005 14:34:29 +0100
Received: Conexant Mail
Received: Conexant Mail
Content-class: urn:content-classes:message
MIME-Version: 1.0
Content-Type: multipart/alternative; 
    boundary="----_=_NextPart_001_01C53AAD.700E8EAF"
Subject: cross compiling
Date:	Wed, 6 Apr 2005 19:05:04 +0530
Message-ID: <4D6E93075B31154298572E6B73CA849D72F496@noida-mail.bbnet.ad>
X-MS-Has-Attach: 
X-MS-TNEF-Correlator: 
Thread-Topic: cross compiling
Thread-Index: AcU6rXDE7LHF7ctJSHmLcg0QF+aegQ==
From:	"B Srinivas " <b.srinivas@conexant.com>
To:	<linux-mips@linux-mips.org>
X-OriginalArrivalTime: 06 Apr 2005 13:35:11.0637 (UTC) 
    FILETIME=[74FC4450:01C53AAD]
Return-Path: <b.srinivas@conexant.com>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 7607
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: b.srinivas@conexant.com
Precedence: bulk
X-list: linux-mips

This is a multi-part message in MIME format.

------_=_NextPart_001_01C53AAD.700E8EAF
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: quoted-printable

Hi,

     Iam trying to set up a cross compiler tool chain for mips 64 bit
big endian.

Iam fixed in a chicken-egg kind of situation ......  during the
compilation the linker doesn't find the crti.o which is built using the
glibc but I still don't have glibc which need the compiler !!!. can
anybody point me to a solution.

=20

Regards

Srinivas

------------------------------------------------------------------------
------------

=20

=20

B.Srinivas

Software Engineer

Conexant Systems Inc. , Noida

Email : b.srinivas@conexant.com

=20





********************** Legal Disclaimer ****************************
"This email may contain confidential and privileged material for the sole u=
se of the intended recipient.  Any unauthorized review, use or distribution=
 by others is strictly prohibited.  If you have received the message in err=
or, please advise the sender by reply email and delete the message. Thank y=
ou."
**********************************************************************


------_=_NextPart_001_01C53AAD.700E8EAF
Content-Type: text/html; charset="us-ascii"
Content-Transfer-Encoding: quoted-printable

<html xmlns:o=3D"urn:schemas-microsoft-com:office:office" xmlns:w=3D"urn:sc=
hemas-microsoft-com:office:word" xmlns=3D"http://www.w3.org/TR/REC-html40">

<head>
<META HTTP-EQUIV=3D"Content-Type" CONTENT=3D"text/html; charset=3Dus-ascii">
<meta name=3DGenerator content=3D"Microsoft Word 11 (filtered medium)">
<style>
<!--
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
	{margin:0in;
	margin-bottom:.0001pt;
	font-size:12.0pt;
	font-family:"Times New Roman";}
a:link, span.MsoHyperlink
	{color:blue;
	text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
	{color:purple;
	text-decoration:underline;}
span.EmailStyle17
	{mso-style-type:personal-compose;
	font-family:Arial;
	color:windowtext;}
@page Section1
	{size:8.5in 11.0in;
	margin:1.0in 1.25in 1.0in 1.25in;}
div.Section1
	{page:Section1;}
-->
</style>

</head>

<body lang=3DEN-US link=3Dblue vlink=3Dpurple>

<div class=3DSection1>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span style=3D'font-size:1=
0.0pt;
font-family:Arial'>Hi,<o:p></o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span style=3D'font-size:1=
0.0pt;
font-family:Arial'>&nbsp;&nbsp;&nbsp;&nbsp; Iam trying to set up a cross co=
mpiler tool chain for
mips 64 bit big endian.<o:p></o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span style=3D'font-size:1=
0.0pt;
font-family:Arial'>Iam fixed in a chicken-egg kind of situation &#8230;&#82=
30;&nbsp;
during the compilation the linker doesn&#8217;t find the crti.o which is bu=
ilt
using the glibc but I still don&#8217;t have glibc which need the compiler =
!!!.
can anybody point me to a solution.<o:p></o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span style=3D'font-size:1=
0.0pt;
font-family:Arial'><o:p>&nbsp;</o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span style=3D'font-size:1=
0.0pt;
font-family:Arial'>Regards</span></font><o:p></o:p></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span style=3D'font-size:1=
0.0pt;
font-family:Arial'>Srinivas</span></font><o:p></o:p></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span style=3D'font-size:1=
0.0pt;
font-family:Arial'>--------------------------------------------------------=
----------------------------</span></font><o:p></o:p></p>

<p class=3DMsoNormal><font size=3D3 face=3D"Times New Roman"><span style=3D=
'font-size:
12.0pt'>&nbsp;<o:p></o:p></span></font></p>

<p class=3DMsoNormal><font size=3D3 face=3D"Times New Roman"><span style=3D=
'font-size:
12.0pt'>&nbsp;<o:p></o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span style=3D'font-size:1=
0.0pt;
font-family:Arial'>B.Srinivas</span></font><o:p></o:p></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span style=3D'font-size:1=
0.0pt;
font-family:Arial'>Software Engineer</span></font><o:p></o:p></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span style=3D'font-size:1=
0.0pt;
font-family:Arial'>Conexant Systems Inc. , Noida</span></font><o:p></o:p></=
p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span style=3D'font-size:1=
0.0pt;
font-family:Arial'>Email : b.srinivas@conexant.com</span></font><o:p></o:p>=
</p>

<p class=3DMsoNormal><font size=3D3 face=3D"Times New Roman"><span style=3D=
'font-size:
12.0pt'><o:p>&nbsp;</o:p></span></font></p>

</div>


<P STYLE=3D"margin-top: 0pt;margin-bottom: 0pt;"><SPAN STYLE=3D"FONT-FAMILY=
:'Arial';FONT-SIZE:8pt;"> </SPAN>
</P>
<P STYLE=3D"margin-top: 0pt;margin-bottom: 0pt;"><SPAN STYLE=3D"FONT-FAMILY=
:'Arial';FONT-SIZE:8pt;"> </SPAN>
</P>
<P STYLE=3D"margin-top: 0pt;margin-bottom: 0pt;"><SPAN STYLE=3D"FONT-FAMILY=
:'Arial';FONT-SIZE:8pt;">********************** Legal Disclaimer **********=
****************** </SPAN>
</P>
<P STYLE=3D"margin-top: 0pt;margin-bottom: 0pt;"><SPAN STYLE=3D"FONT-FAMILY=
:'Arial';FONT-SIZE:8pt;">&quot;This email may contain confidential and priv=
ileged material for the sole use of the intended recipient.  Any unauthoriz=
ed review, use or distribution by others is strictly prohibited.  If you ha=
ve received the message in error, please advise the sender by reply email a=
nd delete the message. Thank you.&quot; </SPAN>
</P>
<P STYLE=3D"margin-top: 0pt;margin-bottom: 0pt;"><SPAN STYLE=3D"FONT-FAMILY=
:'Arial';FONT-SIZE:8pt;">**************************************************=
******************** </SPAN> </P></body>

</html>

------_=_NextPart_001_01C53AAD.700E8EAF--

From philippedeswert@scarlet.be Wed Apr  6 15:26:25 2005
Received: with ECARTIS (v1.0.0; list linux-mips); Wed, 06 Apr 2005 15:26:40 +0100 (BST)
Received: from xizor.is.scarlet.be ([IPv6:::ffff:193.74.71.21]:2473 "EHLO
	xizor.is.scarlet.be") by linux-mips.org with ESMTP
	id <S8224914AbVDFO0Z> convert rfc822-to-8bit; Wed, 6 Apr 2005 15:26:25 +0100
Received: from (fuji.is.scarlet.be [193.74.71.41]) 
	by xizor.is.scarlet.be  with ESMTP id j36EQJ202801; 
	Wed, 6 Apr 2005 16:26:19 +0200
Date:	Wed,  6 Apr 2005 15:26:19 +0100
Message-Id: <IEJ43V$0C5BA57403CC7EFC09D35453D3E9129E@scarlet.be>
Subject: Re:cross compiling
MIME-Version: 1.0
X-Sensitivity: 3
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: 8BIT
From:	"Philippe De Swert" <philippedeswert@scarlet.be>
To:	"b\.srinivas" <b.srinivas@conexant.com>
Cc:	"linux-mips" <linux-mips@linux-mips.org>
X-XaM3-API-Version: 4.1 (B54)
X-type:	0
X-SenderIP: 195.144.76.34
Return-Path: <philippedeswert@scarlet.be>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-Envid: <IEJ43V$0C5BA57403CC7EFC09D35453D3E9129E
Envelope-Id: <IEJ43V$0C5BA57403CC7EFC09D35453D3E9129E
X-archive-position: 7608
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: philippedeswert@scarlet.be
Precedence: bulk
X-list: linux-mips

Hello,


>      Iam trying to set up a cross compiler tool chain for mips 64 bit
> big endian.
> 
> Iam fixed in a chicken-egg kind of situation ......  during the
> compilation the linker doesn't find the crti.o which is built using the
> glibc but I still don't have glibc which need the compiler !!!. can
> anybody point me to a solution.

As you seem quite unexperienced I would recommend using Dan Kegel's crosstool
at www.kegel.com/crosstool. And if you really need help after trying that or
reading up on resources, we will need a more detailed description of your
problem. Error output, versions, procedure you are using, etc....

You do realize that the --without-headers option is broken from gcc-3.2.x
onwards....?

regards,

Philippe 
 
| Philippe De Swert       
|      
| Stag developer http://stag.mind.be/  
| Emdebian developer: http://www.emdebian.org  
|   
| Please do not send me documents in a closed 
| format.(*.doc,*.xls,*.ppt)    
| Use the open alternatives. (*.pdf,*.ps,*.html,*.txt)    
| http://www.gnu.org/philosophy/no-word-attachments.html  

-------------------------------------------------------
NOTE! My email address is changing to ... @scarlet.be
Please make the necessary changes in your address book. 




From eckhardt@satorlaser.com Wed Apr  6 15:34:00 2005
Received: with ECARTIS (v1.0.0; list linux-mips); Wed, 06 Apr 2005 15:34:15 +0100 (BST)
Received: from moutng.kundenserver.de ([IPv6:::ffff:212.227.126.171]:26818
	"EHLO moutng.kundenserver.de") by linux-mips.org with ESMTP
	id <S8224914AbVDFOeA>; Wed, 6 Apr 2005 15:34:00 +0100
Received: from [213.39.254.66] (helo=tuxator.satorlaser-intern.com)
	by mrelayeu.kundenserver.de with ESMTP (Nemesis),
	id 0MKxQS-1DJBbS31yA-0003YW; Wed, 06 Apr 2005 16:33:58 +0200
From:	Ulrich Eckhardt <eckhardt@satorlaser.com>
Organization: Sator Laser GmbH
To:	linux-mips@linux-mips.org
Subject: Re: Au1100 FB driver uplift for 2.6
Date:	Wed, 6 Apr 2005 16:34:29 +0200
User-Agent: KMail/1.7.2
References: <200504041717.29098.eckhardt@satorlaser.com> <de11cd376cdc88e9c292ae7e204e2de9@embeddededge.com> <200504061131.38457.eckhardt@satorlaser.com>
In-Reply-To: <200504061131.38457.eckhardt@satorlaser.com>
MIME-Version: 1.0
Content-Type: text/plain;
  charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
Message-Id: <200504061634.29993.eckhardt@satorlaser.com>
X-Provags-ID: kundenserver.de abuse@kundenserver.de login:e35cee35a663f5c944b9750a965814ae
Return-Path: <eckhardt@satorlaser.com>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 7609
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: eckhardt@satorlaser.com
Precedence: bulk
X-list: linux-mips

Ulrich Eckhardt wrote:
> Dan Malek wrote:
> > On Apr 4, 2005, at 11:17 AM, Ulrich Eckhardt wrote:
> > > Am I on the wrong way or should I just reimplement it and send a patch?
> >
> > If you an test it, do it and send a patch.
>
> There will be two patches, this one doesn't reimplement the mentioned
> feature but fixes a few other bugs.

I'm currently preparing the second part, but I stumbled across something 
puzzling: the number and configuration of the displays differ a lot to 
previous versions. Here's a list of displays and their mode_toyclksrc values:

Old driver:
Sharp_320x240_16      (1 << SYS_CS_ML_BIT) | SYS_CS_DL | SYS_CS_CL)
Generic_640x480_16    (1 << SYS_CS_ML_BIT) | SYS_CS_DL
PrimeView_640x480_16  (1 << SYS_CS_ML_BIT) | SYS_CS_DL
NEON_800x600_16       (1 << SYS_CS_ML_BIT) | SYS_CS_DL
NEON_640x480_16       (1 << SYS_CS_ML_BIT) | SYS_CS_DL

New driver:
CRT_800x600_16        (1 << SYS_CS_ML_BIT)
WWPC LCD              (1 << SYS_CS_ML_BIT)
Sharp_LQ038Q5DR01      (1 << SYS_CS_ML_BIT)
Hitachi_SP14Qxxx      (1 << SYS_CS_ML_BIT)
TFT_640x480_16        (1 << SYS_CS_ML_BIT)
PrimeView_640x480_16  (1 << SYS_CS_ML_BIT)

Changed names:
Sharp_320x240_16    =   Sharp_LQ038Q5DR01
Generic_640x480_16  =   TFT_640x480_16
NEON_800x600_16         (~CRT_800x600_16)
NEON_640x480_16         (missing)

Notes:
- The SYS_CS_DL flag is only evaluated when the SYS_CS_CL flag is also set. 
IOW, setting the flag was useless except for the Sharp_320x240_16 panel in 
the old configuration.
- 'WWPC LCD' contains a space, meaning you can't possibly specify it on the 
kernel commandline - that's obviously a bug.
- The NEON_640x480_16 panel is missing. The other NEON also has no 100% 
equivalent, the CRT panel mostly matches though.
- The parameters for the Sharp display have effectively changed. I don't know 
if this was intentional and I don't have such a display for testing.
- I have an Hitachi SP14Q and a PrimeView PD104SL5 here for testing on a 
- In the old header was the comment that "The fb driver assumes that AUX PLL 
is at 48MHz." This can't be true, because the minimum multiplier is 8 and the 
external clock should be 12MHz, making this 96MHz.
- You can change some frequency for the LCD controller with the divider in 
SYS_CLKSRC and via the LCD_CLKCONTROL, is it possible that you can change one 
frequency and make up for it via another? 
In fact, I'm currently pretty puzzled, because it might be that the 
differences are rather in the board and not in the panels. Also, I fail to 
find where the AUX PLL is started (the default is off), which puzzles me even 
further...

regards,

Uli

From sjhill@realitydiluted.com Wed Apr  6 15:39:21 2005
Received: with ECARTIS (v1.0.0; list linux-mips); Wed, 06 Apr 2005 15:39:35 +0100 (BST)
Received: from eth13.com-link.com ([IPv6:::ffff:208.242.241.164]:5858 "EHLO
	real.realitydiluted.com") by linux-mips.org with ESMTP
	id <S8224914AbVDFOjV>; Wed, 6 Apr 2005 15:39:21 +0100
Received: from sjhill by real.realitydiluted.com with local (Exim 4.50 #1 (Debian))
	id 1DJBgc-00074g-7S; Wed, 06 Apr 2005 09:39:18 -0500
Subject: Re: cross compiling
In-Reply-To: <4D6E93075B31154298572E6B73CA849D72F496@noida-mail.bbnet.ad>
To:	B Srinivas <b.srinivas@conexant.com>
Date:	Wed, 6 Apr 2005 09:39:18 -0500 (CDT)
CC:	linux-mips@linux-mips.org
X-Mailer: ELM [version 2.4ME+ PL100 (25)]
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Type: text/plain; charset=US-ASCII
Message-Id: <E1DJBgc-00074g-7S@real.realitydiluted.com>
From:	sjhill@realitydiluted.com
Return-Path: <sjhill@realitydiluted.com>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 7610
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: sjhill@realitydiluted.com
Precedence: bulk
X-list: linux-mips

>      Iam trying to set up a cross compiler tool chain for mips 64 bit
> big endian.
> 
You should go to the main Linux/MIPS page <http://www.linux-mips.org/>
and then to <http://www.linux-mips.org/wiki/index.php/Toolchains>. After
you have read through all of that and explored everything, the please
come back here and ask your question.

-Steve

From eckhardt@satorlaser.com Wed Apr  6 16:00:28 2005
Received: with ECARTIS (v1.0.0; list linux-mips); Wed, 06 Apr 2005 16:00:45 +0100 (BST)
Received: from moutng.kundenserver.de ([IPv6:::ffff:212.227.126.186]:25025
	"EHLO moutng.kundenserver.de") by linux-mips.org with ESMTP
	id <S8224925AbVDFPA2>; Wed, 6 Apr 2005 16:00:28 +0100
Received: from [213.39.254.66] (helo=tuxator.satorlaser-intern.com)
	by mrelayeu.kundenserver.de with ESMTP (Nemesis),
	id 0MKwtQ-1DJC0z2xxE-000150; Wed, 06 Apr 2005 17:00:21 +0200
From:	Ulrich Eckhardt <eckhardt@satorlaser.com>
Organization: Sator Laser GmbH
To:	linux-mips@linux-mips.org
Subject: When code and comments disagree...
Date:	Wed, 6 Apr 2005 17:00:53 +0200
User-Agent: KMail/1.7.2
MIME-Version: 1.0
Content-Type: text/plain;
  charset="utf-8"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
Message-Id: <200504061700.53764.eckhardt@satorlaser.com>
X-Provags-ID: kundenserver.de abuse@kundenserver.de login:e35cee35a663f5c944b9750a965814ae
Return-Path: <eckhardt@satorlaser.com>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 7611
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: eckhardt@satorlaser.com
Precedence: bulk
X-list: linux-mips

... both are probably wrong, as the saying goes. I stumbled across this line 
in arch/mips/au1000/common/reset.c:

   au_writel(0x00, 0xb1900100); /* sys_pininputen */

However, 0xb1900100 is SYS_TRIOUTCLR, while SYS_PININPUTEN is 0xb1900110... 
Which one is right now?

Also, does the switch statement in that file make sense at all? I mean is it 
possible to compile a kernel that runs on several Alchemy systems?

Uli


From ppopov@embeddedalley.com Wed Apr  6 16:53:05 2005
Received: with ECARTIS (v1.0.0; list linux-mips); Wed, 06 Apr 2005 16:53:25 +0100 (BST)
Received: from smtp001.bizmail.yahoo.com ([IPv6:::ffff:216.136.172.125]:53368
	"HELO smtp001.bizmail.yahoo.com") by linux-mips.org with SMTP
	id <S8224923AbVDFPxF>; Wed, 6 Apr 2005 16:53:05 +0100
Received: from unknown (HELO ?192.168.1.101?) (ppopov@embeddedalley.com@63.194.214.47 with plain)
  by smtp001.bizmail.yahoo.com with SMTP; 6 Apr 2005 15:52:56 -0000
Message-ID: <425405E7.5060003@embeddedalley.com>
Date:	Wed, 06 Apr 2005 08:53:11 -0700
From:	Pete Popov <ppopov@embeddedalley.com>
Reply-To:  ppopov@embeddedalley.com
Organization: Embedded Alley Solutions, Inc
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.3) Gecko/20041020
X-Accept-Language: en-us, en
MIME-Version: 1.0
To:	Ulrich Eckhardt <eckhardt@satorlaser.com>
CC:	linux-mips@linux-mips.org
Subject: Re: Au1100 FB driver uplift for 2.6
References: <200504041717.29098.eckhardt@satorlaser.com> <de11cd376cdc88e9c292ae7e204e2de9@embeddededge.com> <200504061131.38457.eckhardt@satorlaser.com>
In-Reply-To: <200504061131.38457.eckhardt@satorlaser.com>
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
Return-Path: <ppopov@embeddedalley.com>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 7612
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: ppopov@embeddedalley.com
Precedence: bulk
X-list: linux-mips

Ulrich Eckhardt wrote:
> Dan Malek wrote:
> 
>>On Apr 4, 2005, at 11:17 AM, Ulrich Eckhardt wrote:
>>
>>>Am I on the wrong way or should I just reimplement it and send a patch?
>>
>>If you an test it, do it and send a patch.
> 
> 
> There will be two patches, this one doesn't reimplement the mentioned 
> feature but fixes a few other bugs. 
> 
> There are two questions left in that patch, apart from the handling of the 
> WWPC display as mentioned in the header. One is, if there was a reason to 
> use a fixed-size char array for the panelname. 
> 
> The other is about the use of au1100fb_fix and au1100fb_var. Is the 
> explanation in the patch accurate? Would it make more sense to write 
> directly into fbdev->info.var and fbdev->info.fixed? Also, couldn't 
> au1100fb_drv_probe() be declared as __init? After all, a late call to 
> au1100fb_drv_probe() will probably have fatal consequences anyway because 
> it depends on the above and they are declared __initdata.

I checked in a patch that was an uplift for 2.6 a couple of days ago. I'm sorry, 
I didn't catch your email in time to let you know that someone else is working 
on a patch. If you're willing to pull the latest code and see what it makes 
sense to merge from your code, including the new panel support, and send me that 
patch, I'll apply it.

Pete


> Uli
> 
> Changes:
>  * fixed typos, inconsistent formatting and trailing whitespace
>  * added a check to a kalloc() call
>  * fixed possible resource leak in au1100fb_drv_probe()
>  * replaced the fixed-size panel name with a char pointer 
>  * added a few 'const'
>  * added display data for PrimeView PD104SL5
> 
> ---
> Index: drivers/video/au1100fb.c
> ===================================================================
> RCS file: /home/cvs/linux/drivers/video/au1100fb.c,v
> retrieving revision 1.6
> diff -u -r1.6 au1100fb.c
> --- drivers/video/au1100fb.c 4 Apr 2005 01:06:20 -0000 1.6
> +++ drivers/video/au1100fb.c 6 Apr 2005 09:03:54 -0000
> @@ -3,7 +3,7 @@
>   * Au1100 LCD Driver.
>   *
>   * Rewritten for 2.6 by Embedded Alley Solutions
> - *  <source@embeddedalley.com>, based on submissions by 
> + *  <source@embeddedalley.com>, based on submissions by
>   *   Karl Lessard <klessard@sunrisetelecom.com>
>   *   <c.pellegrin@exadron.com>
>   *
> @@ -56,7 +56,7 @@
>  
>  #include "au1100fb.h"
>  
> -/* 
> +/*
>   * Sanity check. If this is a new Au1100 based board, search for
>   * the PB1100 ifdefs to make sure you modify the code accordingly.
>   */
> @@ -74,11 +74,11 @@
>  #define to_au1100fb_device(_info) \
>     (_info ? container_of(_info, struct au1100fb_device, info) : NULL);
>  
> -/* Bitfields format supported by the controller. Note that the order of formats 
> +/* Bitfields format supported by the controller. Note that the order of formats
>   * SHOULD be the same as in the LCD_CONTROL_SBPPF field, so we can retrieve the
>   * right pixel format by doing rgb_bitfields[LCD_CONTROL_SBPPF_XXX >> LCD_CONTROL_SBPPF]
>   */
> -struct fb_bitfield rgb_bitfields[][4] = 
> +struct fb_bitfield rgb_bitfields[][4] =
>  {
>     /*     Red,     Green,   Blue,       Transp   */
>   { { 10, 6, 0 }, { 5, 5, 0 }, { 0, 5, 0 }, { 0, 0, 0 } },
> @@ -91,6 +91,8 @@
>   { { 8, 4, 0 },  { 4, 4, 0 }, { 0, 4, 0 }, { 0, 0, 0 } },
>  };
>  
> +/* au1100fb_fix and au1100fb_var are local vars of au1100fb_drv_probe() but
> +defined here in order to not exhaust the stack. */
>  static struct fb_fix_screeninfo au1100fb_fix __initdata = {
>   .id  = "AU1100 FB",
>   .xpanstep  = 1,
> @@ -111,7 +113,7 @@
>  /*
>   * Set hardware with var settings. This will enable the controller with a specific
>   * mode, normally validated with the fb_check_var method
> -  */
> + */
>  int au1100fb_setmode(struct au1100fb_device *fbdev)
>  {
>   struct fb_info *info = &fbdev->info;
> @@ -142,7 +144,7 @@
>     info->var.transp.msb_right = 0;
>  
>     info->fix.visual = FB_VISUAL_PSEUDOCOLOR;
> -   info->fix.line_length = info->var.xres_virtual / 
> +   info->fix.line_length = info->var.xres_virtual /
>         (8/info->var.bits_per_pixel);
>    } else {
>     /* non-palettized */
> @@ -154,7 +156,7 @@
>  
>     info->fix.visual = FB_VISUAL_TRUECOLOR;
>     info->fix.line_length = info->var.xres_virtual << 1; /* depth=16 */
> - }
> +  }
>   } else {
>    /* mono */
>    info->fix.visual = FB_VISUAL_MONO10;
> @@ -162,7 +164,7 @@
>   }
>  
>   info->screen_size = info->fix.line_length * info->var.yres_virtual;
> - 
> +
>   /* Determine BPP mode and format */
>   fbdev->regs->lcd_control = fbdev->panel->control_base |
>         ((info->var.rotate/90) << LCD_CONTROL_SM_BIT);
> @@ -183,8 +185,8 @@
>     * otherwise display the same as the first panel */
>    if (info->var.yres_virtual >= (info->var.yres << 1)) {
>     fbdev->regs->lcd_dmaaddr1 = LCD_DMA_SA_N(fbdev->fb_phys +
> -         (info->fix.line_length * 
> -                (info->var.yres_virtual >> 1)));
> +         (info->fix.line_length *
> +         (info->var.yres_virtual >> 1)));
>    } else {
>     fbdev->regs->lcd_dmaaddr1 = LCD_DMA_SA_N(fbdev->fb_phys);
>    }
> @@ -201,7 +203,7 @@
>  
>   fbdev->regs->lcd_pwmdiv = 0;
>   fbdev->regs->lcd_pwmhi = 0;
> -   
> +
>   /* Resume controller */
>   fbdev->regs->lcd_control |= LCD_CONTROL_GO;
>  
> @@ -222,22 +224,22 @@
>  
>   if (fbi->var.grayscale) {
>    /* Convert color to grayscale */
> -  red = green = blue = 
> +  red = green = blue =
>     (19595 * red + 38470 * green + 7471 * blue) >> 16;
>   }
> -   
> +
>   if (fbi->fix.visual == FB_VISUAL_TRUECOLOR) {
>    /* Place color in the pseudopalette */
>    if (regno > 16)
>     return -EINVAL;
> -   
> +
>    palette = (u32*)fbi->pseudo_palette;
>  
>    red   >>= (16 - fbi->var.red.length);
>    green >>= (16 - fbi->var.green.length);
>    blue  >>= (16 - fbi->var.blue.length);
> - 
> -  value = (red   << fbi->var.red.offset)  | 
> +
> +  value = (red   << fbi->var.red.offset)  |
>     (green << fbi->var.green.offset)|
>     (blue  << fbi->var.blue.offset);
>    value &= 0xFFFF;
> @@ -249,8 +251,8 @@
>  
>   } else if (panel_is_color(fbdev->panel)) {
>    /* COLOR STN MODE */
> -  value = (((panel_swap_rgb(fbdev->panel) ? blue : red) >> 12) & 0x000F) | 
> -   ((green >> 8) & 0x00F0) | 
> +  value = (((panel_swap_rgb(fbdev->panel) ? blue : red) >> 12) & 0x000F) |
> +   ((green >> 8) & 0x00F0) |
>     (((panel_swap_rgb(fbdev->panel) ? red : blue) >> 4) & 0x0F00);
>    value &= 0xFFF;
>   } else {
> @@ -260,7 +262,7 @@
>   }
>  
>   palette[regno] = value;
> - 
> +
>   return 0;
>  }
>  
> @@ -277,14 +279,14 @@
>   switch (blank_mode) {
>  
>   case VESA_NO_BLANKING:
> -   /* Turn on panel */
> -   fbdev->regs->lcd_control |= LCD_CONTROL_GO;
> +  /* Turn on panel */
> +  fbdev->regs->lcd_control |= LCD_CONTROL_GO;
>  #ifdef CONFIG_MIPS_PB1100
> -   if (drv_info.panel_idx == 1) {
> -    au_writew(au_readw(PB1100_G_CONTROL) 
> -       | (PB1100_G_CONTROL_BL | PB1100_G_CONTROL_VDD), 
> -   PB1100_G_CONTROL);
> -   }
> +  if (drv_info.panel_idx == 1) {
> +   au_writew(au_readw(PB1100_G_CONTROL)
> +     | (PB1100_G_CONTROL_BL | PB1100_G_CONTROL_VDD),
> +    PB1100_G_CONTROL);
> +  }
>  #endif
>    au_sync();
>    break;
> @@ -292,20 +294,20 @@
>   case VESA_VSYNC_SUSPEND:
>   case VESA_HSYNC_SUSPEND:
>   case VESA_POWERDOWN:
> -   /* Turn off panel */
> -   fbdev->regs->lcd_control &= ~LCD_CONTROL_GO;
> +  /* Turn off panel */
> +  fbdev->regs->lcd_control &= ~LCD_CONTROL_GO;
>  #ifdef CONFIG_MIPS_PB1100
> -   if (drv_info.panel_idx == 1) {
> -    au_writew(au_readw(PB1100_G_CONTROL) 
> -         & ~(PB1100_G_CONTROL_BL | PB1100_G_CONTROL_VDD),
> -   PB1100_G_CONTROL);
> -   }
> +  if (drv_info.panel_idx == 1) {
> +   au_writew(au_readw(PB1100_G_CONTROL)
> +     & ~(PB1100_G_CONTROL_BL | PB1100_G_CONTROL_VDD),
> +    PB1100_G_CONTROL);
> +  }
>  #endif
>    au_sync();
>    break;
> - default: 
> -  break;
>  
> + default:
> +  break;
>   }
>   return 0;
>  }
> @@ -328,7 +330,7 @@
>    /* No support for X panning for now! */
>    return -EINVAL;
>   }
> -   
> +
>   print_dbg("fb_pan_display 2 %p %p", var, fbi);
>   dy = var->yoffset - fbi->var.yoffset;
>   if (dy) {
> @@ -340,14 +342,14 @@
>    dmaaddr = fbdev->regs->lcd_dmaaddr0;
>    dmaaddr += (fbi->fix.line_length * dy);
>  
> -  /* TODO: Wait for current frame to finished */
> +  /* TODO: Wait for current frame to be finished */
>    fbdev->regs->lcd_dmaaddr0 = LCD_DMA_SA_N(dmaaddr);
>  
>    if (panel_is_dual(fbdev->panel)) {
>     dmaaddr = fbdev->regs->lcd_dmaaddr1;
>     dmaaddr += (fbi->fix.line_length * dy);
>     fbdev->regs->lcd_dmaaddr0 = LCD_DMA_SA_N(dmaaddr);
> - }
> +  }
>   }
>   print_dbg("fb_pan_display 3 %p %p", var, fbi);
>  
> @@ -388,7 +390,7 @@
>   if (vma->vm_pgoff > (~0UL >> PAGE_SHIFT)) {
>    return -EINVAL;
>   }
> -    
> +
>   start = fbdev->fb_phys & PAGE_MASK;
>   len = PAGE_ALIGN((start & ~PAGE_MASK) + fbdev->fb_len);
>  
> @@ -405,7 +407,7 @@
>   pgprot_val(vma->vm_page_prot) |= (6 << 9); //CCA=6
>  
>   vma->vm_flags |= VM_IO;
> -    
> +
>   if (io_remap_page_range(vma, vma->vm_start, off,
>      vma->vm_end - vma->vm_start,
>      vma->vm_page_prot)) {
> @@ -415,7 +417,7 @@
>   return 0;
>  }
>  
> -static struct fb_ops au1100fb_ops = 
> +static struct fb_ops au1100fb_ops =
>  {
>   .owner   = THIS_MODULE,
>   .fb_setcolreg  = au1100fb_fb_setcolreg,
> @@ -440,13 +442,14 @@
>   struct resource *regs_res;
>   unsigned long page;
>   u32 sys_clksrc;
> + int res = 0;
>  
>   if (!dev)
> -   return -EINVAL;
> +  return -EINVAL;
>  
>   /* Allocate new device private */
>   if (!(fbdev = kmalloc(sizeof(struct au1100fb_device), GFP_KERNEL))) {
> -  print_err("fail to allocate device private record");
> +  print_err("failed to allocate device private record");
>    return -ENOMEM;
>   }
>   memset((void*)fbdev, 0, sizeof(struct au1100fb_device));
> @@ -456,20 +459,22 @@
>   dev_set_drvdata(dev, (void*)fbdev);
>  
>   /* Allocate region for our registers and map them */
> - if (!(regs_res = platform_get_resource(to_platform_device(dev), 
> + if (!(regs_res = platform_get_resource(to_platform_device(dev),
>       IORESOURCE_MEM, 0))) {
> -  print_err("fail to retrieve registers resource");
> -  return -EFAULT;
> +  print_err("failed to retrieve registers resource");
> +  res = -EFAULT;
> +  goto failed;
>   }
>  
>   au1100fb_fix.mmio_start = regs_res->start;
>   au1100fb_fix.mmio_len = regs_res->end - regs_res->start + 1;
>  
> - if (!request_mem_region(au1100fb_fix.mmio_start, au1100fb_fix.mmio_len, 
> + if (!request_mem_region(au1100fb_fix.mmio_start, au1100fb_fix.mmio_len,
>      DRIVER_NAME)) {
> -  print_err("fail to lock memory region at 0x%08x", 
> +  print_err("failed to lock memory region at 0x%08x",
>      au1100fb_fix.mmio_start);
> -  return -EBUSY;
> +  res = -EBUSY;
> +  goto failed;
>   }
>  
>   fbdev->regs = (struct au1100fb_regs*)KSEG1ADDR(au1100fb_fix.mmio_start);
> @@ -478,17 +483,17 @@
>   print_dbg("phys=0x%08x, size=%d", fbdev->regs_phys, fbdev->regs_len);
>  
>  
> -
>   /* Allocate the framebuffer to the maximum screen size * nbr of video buffers */
>   fbdev->fb_len = fbdev->panel->xres * fbdev->panel->yres *
>       (fbdev->panel->bpp >> 3) * AU1100FB_NBR_VIDEO_BUFFERS;
> - 
> - fbdev->fb_mem = dma_alloc_coherent(dev, PAGE_ALIGN(fbdev->fb_len), 
> +
> + fbdev->fb_mem = dma_alloc_coherent(dev, PAGE_ALIGN(fbdev->fb_len),
>       &fbdev->fb_phys, GFP_KERNEL);
>   if (!fbdev->fb_mem) {
> -  print_err("fail to allocate frambuffer (size: %dK))", 
> +  print_err("failed to allocate frambuffer (size: %dKiB))",
>       fbdev->fb_len / 1024);
> -  return -ENOMEM;
> +  res = -ENOMEM;
> +  goto failed;
>   }
>  
>   au1100fb_fix.smem_start = fbdev->fb_phys;
> @@ -499,7 +504,7 @@
>    * since we'll be remapping normal memory.
>    */
>   for (page = (unsigned long)fbdev->fb_mem;
> -      page < PAGE_ALIGN((unsigned long)fbdev->fb_mem + fbdev->fb_len); 
> +      page < PAGE_ALIGN((unsigned long)fbdev->fb_mem + fbdev->fb_len);
>        page += PAGE_SIZE) {
>  #if CONFIG_DMA_NONCOHERENT
>    SetPageReserved(virt_to_page(CAC_ADDR(page)));
> @@ -527,15 +532,17 @@
>   fbdev->info.fix = au1100fb_fix;
>  
>   if (!(fbdev->info.pseudo_palette = kmalloc(sizeof(u32) * 16, GFP_KERNEL))) {
> -  return -ENOMEM;
> +  print_err("failed to allocate pseudo palette");
> +  res = -ENOMEM;
> +  goto failed;
>   }
>   memset(fbdev->info.pseudo_palette, 0, sizeof(u32) * 16);
>  
>   if (fb_alloc_cmap(&fbdev->info.cmap, AU1100_LCD_NBR_PALETTE_ENTRIES, 0) < 0) {
> -  print_err("Fail to allocate colormap (%d entries)",
> +  print_err("failed to allocate colormap (%d entries)",
>        AU1100_LCD_NBR_PALETTE_ENTRIES);
> -  kfree(fbdev->info.pseudo_palette);
> -  return -EFAULT;
> +  res = -EFAULT;
> +  goto failed;
>   }
>  
>   fbdev->info.var = au1100fb_var;
> @@ -546,25 +553,30 @@
>   /* Register new framebuffer */
>   if (register_framebuffer(&fbdev->info) < 0) {
>    print_err("cannot register new framebuffer");
> +  res = -EFAULT;
>    goto failed;
>   }
>  
>   return 0;
>  
>  failed:
> - if (fbdev->regs) {
> -  release_mem_region(fbdev->regs_phys, fbdev->regs_len);
> + /** Failure. Release all resources in opposite order of allocation. */
> + if (fbdev->info.cmap.len != 0) {
> +  fb_dealloc_cmap(&fbdev->info.cmap);
> + }
> + if (fbdev->info.pseudo_palette){
> +  kfree(fbdev->info.pseudo_palette);
>   }
>   if (fbdev->fb_mem) {
>    dma_free_noncoherent(dev, fbdev->fb_len, fbdev->fb_mem, fbdev->fb_phys);
>   }
> - if (fbdev->info.cmap.len != 0) {
> -  fb_dealloc_cmap(&fbdev->info.cmap);
> + if (fbdev->regs) {
> +  release_mem_region(fbdev->regs_phys, fbdev->regs_len);
>   }
> - kfree(fbdev);
>   dev_set_drvdata(dev, NULL);
> + kfree(fbdev);
>  
> - return 0;
> + return res;
>  }
>  
>  int au1100fb_drv_remove(struct device *dev)
> @@ -610,17 +622,16 @@
>  static struct device_driver au1100fb_driver = {
>   .name  = "au1100-lcd",
>   .bus  = &platform_bus_type,
> -
>   .probe  = au1100fb_drv_probe,
> -        .remove  = au1100fb_drv_remove,
> + .remove  = au1100fb_drv_remove,
>   .suspend = au1100fb_drv_suspend,
> -        .resume  = au1100fb_drv_resume,
> + .resume  = au1100fb_drv_resume,
>  };
> -    
> +
>  /*-------------------------------------------------------------------------*/
>  
>  /* Kernel driver */
> -    
> +
>  int au1100fb_setup(char *options)
>  {
>   char* this_opt;
> @@ -631,44 +642,48 @@
>   if (num_panels <= 0) {
>    print_err("No LCD panels supported by driver!");
>    return -EFAULT;
> -   }
> + }
>  
>   if (options) {
>    while ((this_opt = strsep(&options,",")) != NULL) {
> +   size_t len = strlen(this_opt);
>     /* Panel option */
> -  if (!strncmp(this_opt, "panel:", 6)) {
> +   if (!strncmp(this_opt, "panel:", 6)) {
>      int i;
>      this_opt += 6;
>      for (i = 0; i < num_panels; i++) {
>       if (!strncmp(this_opt,
> -                 known_lcd_panels[i].name, 
> -       strlen(this_opt))) {
> +                 known_lcd_panels[i].name,
> +                  len)) {
>        panel_idx = i;
> -     break;
> +      break;
> +     }
>      }
> -   }
>      if (i >= num_panels) {
>        print_warn("Panel %s not supported!", this_opt);
> +     return -ENOTSUPP;
>      }
>     }
>     /* Mode option (only option that start with digit) */
>     else if (isdigit(this_opt[0])) {
> -    mode = kmalloc(strlen(this_opt) + 1, GFP_KERNEL);
> -    strncpy(mode, this_opt, strlen(this_opt) + 1);
> +    mode = kmalloc(len+1, GFP_KERNEL);
> +    if(!mode)
> +     return -ENOMEM;
> +    strncpy(mode, this_opt, len);
>     }
>     /* Unsupported option */
>     else {
>      print_warn("Unsupported option \"%s\"", this_opt);
> +   }
>    }
> -  }
> - } 
> + }
>  
>   drv_info.panel_idx = panel_idx;
>   drv_info.opt_mode = mode;
>  
>   print_info("Panel=%s Mode=%s",
>     known_lcd_panels[drv_info.panel_idx].name,
> -         drv_info.opt_mode ? drv_info.opt_mode : "default");
> +   drv_info.opt_mode ? drv_info.opt_mode : "default");
>  
>   return 0;
>  }
> @@ -677,9 +692,9 @@
>  {
>   char* options;
>   int ret;
> - 
> +
>   print_info("" DRIVER_DESC "");
> - 
> +
>   memset(&drv_info, 0, sizeof(drv_info));
>  
>   if (fb_get_options(DRIVER_NAME, &options))
> @@ -688,7 +703,7 @@
>   /* Setup driver with options */
>   ret = au1100fb_setup(options);
>   if (ret < 0) {
> -  print_err("Fail to setup driver");
> +  print_err("Failed to setup driver");
>    return ret;
>   }
>  
> Index: drivers/video/au1100fb.h
> ===================================================================
> RCS file: /home/cvs/linux/drivers/video/au1100fb.h,v
> retrieving revision 1.2
> diff -u -r1.2 au1100fb.h
> --- drivers/video/au1100fb.h 4 Apr 2005 01:06:20 -0000 1.2
> +++ drivers/video/au1100fb.h 6 Apr 2005 09:03:54 -0000
> @@ -65,20 +65,20 @@
>  
>  struct au1100fb_panel
>  {
> - const char name[25];  /* Full name <vendor>_<model> */
> + const char* name;  /* Full name <vendor>_<model> */
>  
> - u32    control_base;  /* Mode-independent control values */
> + u32 control_base;  /* Mode-independent control values */
>   u32 clkcontrol_base; /* Panel pixclock preferences */
>  
>   u32 horztiming;
>   u32 verttiming;
>  
>   u32 xres;  /* Maximum horizontal resolution */
> - u32  yres;  /* Maximum vertical resolution */
> - u32  bpp;  /* Maximum depth supported */
> + u32 yres;  /* Maximum vertical resolution */
> + u32 bpp;  /* Maximum depth supported */
>  };
>  
> -struct au1100fb_regs 
> +struct au1100fb_regs
>  {
>   u32  lcd_control;
>   u32  lcd_intstatus;
> @@ -99,7 +99,7 @@
>  
>   struct fb_info info;   /* FB driver info record */
>  
> - struct au1100fb_panel  *panel;  /* Panel connected to this device */
> + const struct au1100fb_panel  *panel;  /* Panel connected to this device */
>  
>   struct au1100fb_regs*  regs;  /* Registers memory map */
>   size_t         regs_len;
> @@ -255,7 +255,7 @@
>  
>  /* List of panels known to work with the AU1100 LCD controller.
>   * To add a new panel, enter the same specifications as the
> - * Generic_TFT one, and MAKE SURE that it doesn't conflicts 
> + * Generic_TFT one, and MAKE SURE that it doesn't conflicts
>   * with the controller restrictions. Restrictions are:
>   *
>   * STN color panels: max_bpp <= 12
> @@ -264,7 +264,7 @@
>   * max_xres <= 800
>   * max_yres <= 600
>   */
> -static struct au1100fb_panel known_lcd_panels[] =
> +static const struct au1100fb_panel known_lcd_panels[] =
>  {
>   /* 800x600x16bpp CRT */
>   [0] = {
> @@ -272,14 +272,24 @@
>    .xres = 800,
>    .yres = 600,
>    .bpp = 16,
> -  .control_base = 0x0004886A | 
> +  .control_base = 0x0004886A |
>     LCD_CONTROL_DEFAULT_PO | LCD_CONTROL_DEFAULT_SBPPF |
>     LCD_CONTROL_BPP_16,
>    .clkcontrol_base = 0x00020000,
>    .horztiming = 0x005aff1f,
>    .verttiming = 0x16000e57,
>   },
> - /* just the standard LCD */
> +
> + /* just the standard LCD
> + TODO: There is only one case where the index in this array is checked,
> + and that also only on PB1100 boards. Clarify when exactly this is used
> + and why, and possibly integrate this differently.
> +
> + Also, I'm not sure the code is right: in older versions, WWPC had this
> + display hard-coded in, and for PB1100 and DB1100, there was a way to
> + select a display by reading the BCSR. Now, there seems to be a special
> + way of blanking/unblanking this particular display.
> + */
>   [1] = {
>    .name = "WWPC LCD",
>    .xres = 240,
> @@ -290,6 +300,7 @@
>    .verttiming = 0x0301013F,
>    .clkcontrol_base = 0x00018001,
>   },
> +
>   /* Sharp 320x240 TFT panel */
>   [2] = {
>    .name = "Sharp_LQ038Q5DR01",
> @@ -351,7 +362,7 @@
>    .clkcontrol_base = LCD_CLKCONTROL_PCD_N(1),
>   },
>  
> -  /* Pb1100 LCDB 640x480 PrimeView TFT panel */
> + /* Pb1100 LCDB 640x480 PrimeView TFT panel */
>   [5] = {
>    .name = "PrimeView_640x480_16",
>    .xres = 640,
> @@ -362,6 +373,37 @@
>    .verttiming = 0x210805df,
>    .clkcontrol_base = 0x00038001,
>   },
> +
> + /* PrimeView PD104SL5 , a 800x600 16BPP color LCD */
> + [6] = {
> +  .name = "PrimeView_PD104SL5",
> +  .xres = 800,
> +  .yres = 640,
> +  .bpp = 16,
> +  .control_base =
> +   ( LCD_CONTROL_SBPPF_565
> +   | LCD_CONTROL_C
> +   | LCD_CONTROL_SM_0
> +   | LCD_CONTROL_DEFAULT_PO
> +   | LCD_CONTROL_CCO
> +   | LCD_CONTROL_PT
> +   | LCD_CONTROL_PC
> +   | LCD_CONTROL_BPP_16 ),
> +  .horztiming =
> +   ( LCD_HORZTIMING_HN2_N(30)
> +   | LCD_HORZTIMING_HN1_N(30)
> +   | LCD_HORZTIMING_HPW_N(60)
> +   | LCD_HORZTIMING_PPL_N(800) ),
> +  .verttiming =
> +   ( LCD_VERTTIMING_VN2_N(1)
> +   | LCD_VERTTIMING_VN1_N(1)
> +   | LCD_VERTTIMING_VPW_N(2)
> +   | LCD_VERTTIMING_LPP_N(600) ),
> +  .clkcontrol_base =
> +   ( LCD_CLKCONTROL_IH
> +   | LCD_CLKCONTROL_IV
> +   | LCD_CLKCONTROL_PCD_N(1)),
> + }
>  };
>  
>  struct au1100fb_drv_info {
> 
> 


From greg.weeks@timesys.com Wed Apr  6 18:10:56 2005
Received: with ECARTIS (v1.0.0; list linux-mips); Wed, 06 Apr 2005 18:11:17 +0100 (BST)
Received: from mail.timesys.com ([IPv6:::ffff:65.117.135.102]:18043 "EHLO
	exchange.timesys.com") by linux-mips.org with ESMTP
	id <S8224923AbVDFRK4>; Wed, 6 Apr 2005 18:10:56 +0100
Received: from [192.168.2.27] ([192.168.2.27]) by exchange.timesys.com with Microsoft SMTPSVC(5.0.2195.6713);
	 Wed, 6 Apr 2005 13:06:43 -0400
Message-ID: <4254181A.9000301@timesys.com>
Date:	Wed, 06 Apr 2005 13:10:50 -0400
From:	Greg Weeks <greg.weeks@timesys.com>
User-Agent: Mozilla Thunderbird 1.0 (X11/20041206)
X-Accept-Language: en-us, en
MIME-Version: 1.0
To:	linux-mips@linux-mips.org
Subject: 4kc machine check
Content-Type: multipart/mixed;
 boundary="------------000705020200040604050105"
X-OriginalArrivalTime: 06 Apr 2005 17:06:43.0937 (UTC) FILETIME=[022F8D10:01C53ACB]
Return-Path: <greg.weeks@timesys.com>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 7613
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: greg.weeks@timesys.com
Precedence: bulk
X-list: linux-mips

This is a multi-part message in MIME format.
--------------000705020200040604050105
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit

I noticed there was a recent checkin for 4000 series tlb code. It still 
seems to be a problem on the 4kc malta.

Greg Weeks



--------------000705020200040604050105
Content-Type: text/plain;
 name="malta.mc.txt"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
 filename="malta.mc.txt"

YAMON ROM Monitor, Revision 02.06.
Copyright (c) 1999-2004 MIPS Technologies, Inc. - All Rights Reserved.
 
For a list of available commands, type 'help'.
 
Compilation time =              Mar 23 2004  16:50:44
Board type/revision =           0x02 (Malta) / 0x00
Core board type/revision =      0x01 (CoreLV) / 0x01
System controller/revision =    Galileo / GT_64120A-B-1
FPGA revision =                 0x0001
MAC address =                   00.d0.a0.00.01.9a
Board S/N =                     0000000162
PCI bus frequency =             33.33 MHz
Processor Company ID/options =  0x01 (MIPS Technologies, Inc.) / 0x00
Processor ID/revision =         0x80 (MIPS 4Kc) / 0x01
Endianness =                    Little
CPU/Bus frequency =             80 MHz / 40 MHz
Flash memory size =             4 MByte
SDRAM size =                    64 MByte
First free SDRAM address =      0x800b3850
 
YAMON> load
About to load tftp://192.168.25.2/vmlinux.srec
Press Ctrl-C to break
........................................
........................................
........................................
........................................
........................................
........................................
........................................
........................................
........................................
.............
Start = 0x803ca000, range = (0x80100000,0x803ec085), format = SREC
YAMON> go . root=/dev/hda1
 
LINUX started...
Config serial console: console=ttyS0,38400n8r
Linux version 2.6.12-rc1 (gweeks@tanith.timesys.com) (gcc version 3.4.1 20040714 (TimeSys 3.4.1-7)) #1 Wed Apr 6 13:06:34 EDT 2005
CPU revision is: 00018001
Determined physical RAM map:
 memory: 00001000 @ 00000000 (reserved)
 memory: 000ef000 @ 00001000 (ROM data)
 memory: 00320000 @ 000f0000 (reserved)
 memory: 03bf0000 @ 00410000 (usable)
Built 1 zonelists
Kernel command line: root=/dev/hda1 console=ttyS0,38400n8r
Primary instruction cache 16kB, physically tagged, 4-way, linesize 16 bytes.
Primary data cache 16kB, 4-way, linesize 16 bytes.
Synthesized TLB refill handler (19 instructions).
Synthesized TLB load handler fastpath (31 instructions).
Synthesized TLB store handler fastpath (31 instructions).
Synthesized TLB modify handler fastpath (30 instructions).
PID hash table entries: 512 (order: 9, 8192 bytes)
CPU frequency 80.00 MHz
Using 40.001 MHz high precision timer.
Console: colour dummy device 80x25
Dentry cache hash table entries: 16384 (order: 4, 65536 bytes)
Inode-cache hash table entries: 8192 (order: 3, 32768 bytes)
Memory: 60672k/61376k available (2199k kernel code, 628k reserved, 652k data, 140k init, 0k highmem)
Mount-cache hash table entries: 512
Checking for 'wait' instruction...  available.
NET: Registered protocol family 16
VFS: Disk quotas dquot_6.5.1
Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
Installing knfsd (copyright (C) 1996 okir@monad.swb.de).
Initializing Cryptographic API
rtc: SRM (post-2000) epoch (2000) detected
Real Time Clock Driver v1.12a
Serial: 8250/16550 driver $Revision: 1.90 $ 8 ports, IRQ sharing disabled
ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A
ttyS1 at I/O 0x2f8 (irq = 3) is a 16550A
io scheduler noop registered
io scheduler anticipatory registered
io scheduler deadline registered
io scheduler cfq registered
RAMDISK driver initialized: 16 RAM disks of 4096K size 1024 blocksize
pcnet32.c:v1.30i 06.28.2004 tsbogend@alpha.franken.de
pcnet32: PCnet/FAST III 79C973 at 0x1060, 00 d0 a0 00 01 9a assigned IRQ 10.
eth0: registered as PCnet/FAST III 79C973
pcnet32: 1 cards_found.
Uniform Multi-Platform E-IDE driver Revision: 7.00alpha2
ide: Assuming 33MHz system bus speed for PIO modes; override with idebus=xx
PIIX4: IDE controller at PCI slot 0000:00:0a.1
PIIX4: chipset revision 1
PIIX4: not 100% native mode: will probe irqs later
    ide0: BM-DMA at 0x1080-0x1087, BIOS settings: hda:pio, hdb:pio
    ide1: BM-DMA at 0x1088-0x108f, BIOS settings: hdc:pio, hdd:pio
hda: IBM-DTLA-307075, ATA DISK drive
ide0 at 0x1f0-0x1f7,0x3f6 on irq 14
hda: max request size: 128KiB
hda: 150136560 sectors (76869 MB) w/1916KiB Cache, CHS=65535/16/63, UDMA(33)
hda: cache flushes not supported
 hda: hda1 hda2 hda3
mice: PS/2 mouse device common for all mice
NET: Registered protocol family 2
IP: routing cache hash table of 512 buckets, 4Kbytes
TCP established hash table entries: 4096 (order: 3, 32768 bytes)
TCP bind hash table entries: 4096 (order: 2, 16384 bytes)
TCP: Hash tables configured (established 4096 bind 4096)
NET: Registered protocol family 1
NET: Registered protocol family 17
NET: Registered protocol family 15
kjournald starting.  Commit interval 5 seconds
EXT3-fs: mounted filesystem with ordered data mode.
VFS: Mounted root (ext3 filesystem) readonly.
Freeing prom memory: 956kb freed
Freeing unused kernel memory: 1096k freed
Algorithmics/MIPS FPU Emulator v1.5
INIT: version 2.84 booting
Got mcheck at 0040240c
Cpu 0
$ 0   : 00000000 1000fc01 000002cd 00000023
$ 4   : 00000802 004084c2 004084c4 00000000
$ 8   : 00000000 00000000 80134390 ffffffec
$12   : 00000000 60e100fe 7efefefc ef4eff08
$16   : 10000560 7fa4cb48 100012a0 7fa4cbc8
$20   : 100012cc 7fa4cc48 7fa4cc48 100012a8
$24   : 8faffff6 0040240c
$28   : 10008270 7fa4ca28 7fa4cb28 004038d4
Hi    : fffffeee
Lo    : 200b02cd
epc   : 0040240c 0x40240c     Not tainted
ra    : 004038d4 0x4038d4
Status: 0020fc13    USER EXL IE
Cause : 00800060
PrId  : 00018001
                 
Index:  1 pgmask=4kb va=2ab82000 asid=07
                        [pa=000bf000 c=3 d=0 v=1 g=0]
                        [pa=00040000 c=3 d=0 v=0 g=0]
                                                      
Index:  2 pgmask=4kb va=00402000 asid=07
                        [pa=004d7000 c=3 d=0 v=0 g=0]
                        [pa=003d6000 c=3 d=0 v=1 g=0]
                                                      
Index:  3 pgmask=4kb va=7fa4c000 asid=07
                        [pa=01198000 c=3 d=1 v=1 g=0]
                        [pa=00000000 c=0 d=0 v=0 g=0]
                                                      
Index:  4 pgmask=4kb va=2acea000 asid=07
                        [pa=000c0000 c=3 d=0 v=1 g=0]
                        [pa=01199000 c=3 d=1 v=1 g=0]
                                                      
Index:  6 pgmask=4kb va=2abd0000 asid=07
                        [pa=000a1000 c=3 d=0 v=0 g=0]
                        [pa=000a2000 c=3 d=0 v=1 g=0]
                                                      
Index:  7 pgmask=4kb va=2abc4000 asid=07
                        [pa=00095000 c=3 d=0 v=0 g=0]
                        [pa=00096000 c=3 d=0 v=1 g=0]
                                                      
Index:  8 pgmask=4kb va=2acec000 asid=07
                        [pa=0119b000 c=3 d=1 v=1 g=0]
                        [pa=00410000 c=3 d=0 v=1 g=0]
                                                      
Index:  9 pgmask=4kb va=10000000 asid=07
                        [pa=00002000 c=3 d=0 v=1 g=0]
                        [pa=0119a000 c=3 d=1 v=1 g=0]
                                                      
Index: 10 pgmask=4kb va=2ace8000 asid=07
                        [pa=0002c000 c=3 d=0 v=1 g=0]
                        [pa=000c2000 c=3 d=0 v=1 g=0]
                                                      
Index: 11 pgmask=4kb va=2abca000 asid=07
                        [pa=0009b000 c=3 d=0 v=1 g=0]
                        [pa=00000000 c=0 d=0 v=0 g=0]
                                                      
Index: 14 pgmask=4kb va=2abce000 asid=07
                        [pa=00000000 c=0 d=0 v=0 g=0]
                        [pa=000a0000 c=3 d=0 v=1 g=0]
                                                      
Index: 15 pgmask=4kb va=2abf2000 asid=07
                        [pa=00000000 c=0 d=0 v=0 g=0]
                        [pa=00075000 c=3 d=0 v=1 g=0]
                                                      
Kernel panic - not syncing: Caught Machine Check exception - caused by multiple matching entries in the TLB.
                             


--------------000705020200040604050105--

From eckhardt@satorlaser.com Wed Apr  6 18:59:34 2005
Received: with ECARTIS (v1.0.0; list linux-mips); Wed, 06 Apr 2005 18:59:48 +0100 (BST)
Received: from moutng.kundenserver.de ([IPv6:::ffff:212.227.126.171]:32752
	"EHLO moutng.kundenserver.de") by linux-mips.org with ESMTP
	id <S8224923AbVDFR7e>; Wed, 6 Apr 2005 18:59:34 +0100
Received: from c155208.adsl.hansenet.de[213.39.155.208] (helo=c155208.adsl.hansenet.de)
	by mrelayeu.kundenserver.de with ESMTP (Nemesis),
	id 0MKwtQ-1DJEoM3qpU-0005IE; Wed, 06 Apr 2005 19:59:30 +0200
From:	Ulrich Eckhardt <eckhardt@satorlaser.com>
Organization: Sator Laser GmbH
To:	linux-mips@linux-mips.org
Subject: Re: Au1100 FB driver uplift for 2.6
Date:	Wed, 6 Apr 2005 19:58:17 +0200
User-Agent: KMail/1.7.1
References: <200504041717.29098.eckhardt@satorlaser.com> <200504061131.38457.eckhardt@satorlaser.com> <425405E7.5060003@embeddedalley.com>
In-Reply-To: <425405E7.5060003@embeddedalley.com>
MIME-Version: 1.0
Content-Type: text/plain;
  charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
Message-Id: <200504061958.18023.eckhardt@satorlaser.com>
X-Provags-ID: kundenserver.de abuse@kundenserver.de login:e35cee35a663f5c944b9750a965814ae
Return-Path: <eckhardt@satorlaser.com>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 7614
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: eckhardt@satorlaser.com
Precedence: bulk
X-list: linux-mips

On Wednesday 06 April 2005 17:53, Pete Popov wrote:
> I checked in a patch that was an uplift for 2.6 a couple of days ago. I'm
> sorry, I didn't catch your email in time to let you know that someone else
> is working on a patch. 

Pete, nothing to be sorry for, I wasn't working on anything. Point is that I 
grabbed a patch from someone else here (around 3 months ago) that updated the 
bitrotted 2.6 code to a usable state. Your version now is in some aspects 
even cleaner that that code and I'm in fact referring to the changes you 
committed a few days ago.

> If you're willing to pull the latest code and see 
> what it makes sense to merge from your code, including the new panel
> support, and send me that patch, I'll apply it.

I continuously track the latest changes, and merging the panel is perfectly 
painless, apart from this one thing with the clock setup.

thanks for your work

Uli

From foxy@nutter500.fsnet.co.uk Wed Apr  6 19:59:45 2005
Received: with ECARTIS (v1.0.0; list linux-mips); Wed, 06 Apr 2005 20:00:01 +0100 (BST)
Received: from cmailg3.svr.pol.co.uk ([IPv6:::ffff:195.92.195.173]:29189 "EHLO
	cmailg3.svr.pol.co.uk") by linux-mips.org with ESMTP
	id <S8224907AbVDFS7p>; Wed, 6 Apr 2005 19:59:45 +0100
Received: from modem-92.euthyrox.dialup.pol.co.uk ([62.136.93.220] helo=foxy)
	by cmailg3.svr.pol.co.uk with smtp (Exim 4.41)
	id 1DJFkd-0007BH-Hh
	for linux-mips@linux-mips.org; Wed, 06 Apr 2005 19:59:44 +0100
Message-ID: <000f01c53adb$2cb2eea0$dc5d883e@foxy>
From:	"DavidCox" <foxy@nutter500.fsnet.co.uk>
To:	<linux-mips@linux-mips.org>
Subject: mipsel-linux-gnu-ld: final link failed: Bad value
Date:	Wed, 6 Apr 2005 20:02:25 +0100
MIME-Version: 1.0
Content-Type: multipart/alternative;
	boundary="----=_NextPart_000_000C_01C53AE3.8DADEC20"
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 6.00.2800.1106
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106
Return-Path: <foxy@nutter500.fsnet.co.uk>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 7615
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: foxy@nutter500.fsnet.co.uk
Precedence: bulk
X-list: linux-mips

This is a multi-part message in MIME format.

------=_NextPart_000_000C_01C53AE3.8DADEC20
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

Hi

I am trying to build the kernel for mips - I have the following

GLibc - 2.3.4
Gcc - 3.4.3
Binutils 2.15.96
linux Kernel - 2.6.11.6

I can build the whole toolchain. But i get the following error when =
building the kernel
I can see that some people had this error before
http://www.linux-mips.org/archives/linux-mips/2005-01/msg00017.html

Has anyone tried my combination of gcc, glibc, binutils, linux kernel?

Please help as i am currently trying all combinations of binutils, gcc, =
glibc and it takes some time!

Cheers
DJL

------=_NextPart_000_000C_01C53AE3.8DADEC20
Content-Type: text/html;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 6.00.2800.1106" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>Hi</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>I am trying to build the kernel for =
mips - I have=20
the following</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>GLibc - 2.3.4</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>Gcc - 3.4.3</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>Binutils 2.15.96</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>linux Kernel - 2.6.11.6</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>I can build the whole toolchain. But i =
get the=20
following error when building the kernel</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>I can see that some people had this =
error=20
before</FONT></DIV>
<DIV><FONT face=3DArial size=3D2><A=20
href=3D"http://www.linux-mips.org/archives/linux-mips/2005-01/msg00017.ht=
ml">http://www.linux-mips.org/archives/linux-mips/2005-01/msg00017.html</=
A></FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Has anyone tried my combination of gcc, =
glibc,=20
binutils, linux kernel?</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Please help as i am currently trying =
all=20
combinations of binutils, gcc, glibc and it takes some =
time!</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Cheers</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>DJL</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV></BODY></HTML>

------=_NextPart_000_000C_01C53AE3.8DADEC20--


From danieljlaird@hotmail.com Wed Apr  6 20:11:50 2005
Received: with ECARTIS (v1.0.0; list linux-mips); Wed, 06 Apr 2005 20:12:04 +0100 (BST)
Received: from bay101-f40.bay101.hotmail.com ([IPv6:::ffff:64.4.56.50]:3219
	"EHLO hotmail.com") by linux-mips.org with ESMTP
	id <S8224907AbVDFTLu>; Wed, 6 Apr 2005 20:11:50 +0100
Received: from mail pickup service by hotmail.com with Microsoft SMTPSVC;
	 Wed, 6 Apr 2005 12:11:42 -0700
Message-ID: <BAY101-F40043BBF477AEF253F1316DC3D0@phx.gbl>
Received: from 64.4.56.210 by by101fd.bay101.hotmail.msn.com with HTTP;
	Wed, 06 Apr 2005 19:11:41 GMT
X-Originating-IP: [64.4.56.210]
X-Originating-Email: [danieljlaird@hotmail.com]
X-Sender: danieljlaird@hotmail.com
From:	"Daniel Laird" <danieljlaird@hotmail.com>
To:	linux-mips@linux-mips.org
Subject: mipsel-linux-gnu-ld: final link failed: Bad value
Date:	Wed, 06 Apr 2005 19:11:41 +0000
Mime-Version: 1.0
Content-Type: text/plain; format=flowed
X-OriginalArrivalTime: 06 Apr 2005 19:11:42.0812 (UTC) FILETIME=[77DD11C0:01C53ADC]
Return-Path: <danieljlaird@hotmail.com>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 7616
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: danieljlaird@hotmail.com
Precedence: bulk
X-list: linux-mips

Hi

I am trying to build the kernel for mips - I have the following

GLibc - 2.3.4
Gcc - 3.4.3
Binutils 2.15.96
linux Kernel - 2.6.11.6

I can build the whole toolchain. But i get the following error when building 
the kernel
I can see that some people had this error before
http://www.linux-mips.org/archives/linux-mips/2005-01/msg00017.html

Has anyone tried my combination of gcc, glibc, binutils, linux kernel?

Please help as i am currently trying all combinations of binutils, gcc, 
glibc and it takes some time!

Cheers
DJL



From ralf@linux-mips.org Thu Apr  7 09:58:31 2005
Received: with ECARTIS (v1.0.0; list linux-mips); Thu, 07 Apr 2005 09:58:49 +0100 (BST)
Received: from extgw-uk.mips.com ([IPv6:::ffff:62.254.210.129]:1294 "EHLO
	mail.linux-mips.net") by linux-mips.org with ESMTP
	id <S8224902AbVDGI6a>; Thu, 7 Apr 2005 09:58:30 +0100
Received: from dea.linux-mips.net (localhost.localdomain [127.0.0.1])
	by mail.linux-mips.net (8.13.1/8.13.1) with ESMTP id j378wIAr003730;
	Thu, 7 Apr 2005 09:58:19 +0100
Received: (from ralf@localhost)
	by dea.linux-mips.net (8.13.1/8.13.1/Submit) id j36K2t3D005005;
	Wed, 6 Apr 2005 21:02:55 +0100
Date:	Wed, 6 Apr 2005 21:02:55 +0100
From:	Ralf Baechle <ralf@linux-mips.org>
To:	Greg Weeks <greg.weeks@timesys.com>
Cc:	linux-mips@linux-mips.org
Subject: Re: 4kc machine check
Message-ID: <20050406200255.GA4978@linux-mips.org>
References: <4254181A.9000301@timesys.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <4254181A.9000301@timesys.com>
User-Agent: Mutt/1.4.1i
Return-Path: <ralf@linux-mips.org>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 7617
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: ralf@linux-mips.org
Precedence: bulk
X-list: linux-mips

On Wed, Apr 06, 2005 at 01:10:50PM -0400, Greg Weeks wrote:

> I noticed there was a recent checkin for 4000 series tlb code. It still 
> seems to be a problem on the 4kc malta.

4K is not R4000 series ...   Anyway, the 4K code you were sent aren't yet
in because they've only empirically proven to be correct; we'd like to
look into the case a little further before comitting the patches into CVS.

  Ralf

From ralf@linux-mips.org Thu Apr  7 09:59:12 2005
Received: with ECARTIS (v1.0.0; list linux-mips); Thu, 07 Apr 2005 09:59:33 +0100 (BST)
Received: from extgw-uk.mips.com ([IPv6:::ffff:62.254.210.129]:36381 "EHLO
	mail.linux-mips.net") by linux-mips.org with ESMTP
	id <S8224903AbVDGI6e>; Thu, 7 Apr 2005 09:58:34 +0100
Received: from dea.linux-mips.net (localhost.localdomain [127.0.0.1])
	by mail.linux-mips.net (8.13.1/8.13.1) with ESMTP id j378wIAt003730;
	Thu, 7 Apr 2005 09:58:27 +0100
Received: (from ralf@localhost)
	by dea.linux-mips.net (8.13.1/8.13.1/Submit) id j36KJFIQ005029;
	Wed, 6 Apr 2005 21:19:15 +0100
Date:	Wed, 6 Apr 2005 21:19:15 +0100
From:	Ralf Baechle <ralf@linux-mips.org>
To:	Ulrich Eckhardt <eckhardt@satorlaser.com>
Cc:	linux-mips@linux-mips.org
Subject: Re: When code and comments disagree...
Message-ID: <20050406201914.GC4978@linux-mips.org>
References: <200504061700.53764.eckhardt@satorlaser.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <200504061700.53764.eckhardt@satorlaser.com>
User-Agent: Mutt/1.4.1i
Return-Path: <ralf@linux-mips.org>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 7618
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: ralf@linux-mips.org
Precedence: bulk
X-list: linux-mips

On Wed, Apr 06, 2005 at 05:00:53PM +0200, Ulrich Eckhardt wrote:

> ... both are probably wrong, as the saying goes. I stumbled across this line 
> in arch/mips/au1000/common/reset.c:
> 
>    au_writel(0x00, 0xb1900100); /* sys_pininputen */
> 
> However, 0xb1900100 is SYS_TRIOUTCLR, while SYS_PININPUTEN is 0xb1900110... 
> Which one is right now?
> 
> Also, does the switch statement in that file make sense at all? I mean is it 
> possible to compile a kernel that runs on several Alchemy systems?

Technically it's certainly possible to share kernels for many of the
Linux/MIPS platforms but for an architecture that these days largely
powers embedded platforms a generic kernel is of much less usefullnes than
on PCs, for example.

  Ralf

From ralf@linux-mips.org Thu Apr  7 09:59:55 2005
Received: with ECARTIS (v1.0.0; list linux-mips); Thu, 07 Apr 2005 10:00:15 +0100 (BST)
Received: from extgw-uk.mips.com ([IPv6:::ffff:62.254.210.129]:22301 "EHLO
	mail.linux-mips.net") by linux-mips.org with ESMTP
	id <S8224904AbVDGI6f>; Thu, 7 Apr 2005 09:58:35 +0100
Received: from dea.linux-mips.net (localhost.localdomain [127.0.0.1])
	by mail.linux-mips.net (8.13.1/8.13.1) with ESMTP id j378wIAv003730;
	Thu, 7 Apr 2005 09:58:31 +0100
Received: (from ralf@localhost)
	by dea.linux-mips.net (8.13.1/8.13.1/Submit) id j36K8mRn005011;
	Wed, 6 Apr 2005 21:08:48 +0100
Date:	Wed, 6 Apr 2005 21:08:48 +0100
From:	Ralf Baechle <ralf@linux-mips.org>
To:	Greg Weeks <greg.weeks@timesys.com>
Cc:	linux-mips@linux-mips.org
Subject: Re: memcpy prefetch
Message-ID: <20050406200848.GB4978@linux-mips.org>
References: <4253D67C.4010705@timesys.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <4253D67C.4010705@timesys.com>
User-Agent: Mutt/1.4.1i
Return-Path: <ralf@linux-mips.org>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 7619
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: ralf@linux-mips.org
Precedence: bulk
X-list: linux-mips

On Wed, Apr 06, 2005 at 08:30:52AM -0400, Greg Weeks wrote:

> In trying to understand the prefetch code in memcpy it looks like it's 
> prefetching too far out in front of the loop. In the main aligned loop 
> the loop copies 32 or 64 bytes of data and the prefetch is trying to 
> prefetch 256 bytes ahead of the current copy. The prefetches should also 
> pay attention to cache line size and they currently don't. If the line 
> size is less than the copy size we are skipping prefetches that should 
> be done. For the 4kc the line size is only 16 bytes. We should be doing 
> a prefetch for each line. The src_unaligned_dst_aligned loop is even 
> worse as it prefetches 288 bytes ahead of the copy and only copies 16 or 
> 32 bytes at a time.
> 
> Have I totally misunderstood the code?

Nope, you've understood that perfectly right.  The messy thing is that on
a whole bunch of system we don't know the cacheline size before runtime
so we have two choices a) work under worst case assumptions which would be
16 bytes.  Or do the same thing as we're already doing it for a bunch of
other performance sensitive functions, generating them at runtime.  Choose
your poison ;-)

  Ralf

From greg.weeks@timesys.com Thu Apr  7 12:37:33 2005
Received: with ECARTIS (v1.0.0; list linux-mips); Thu, 07 Apr 2005 12:37:48 +0100 (BST)
Received: from mail.timesys.com ([IPv6:::ffff:65.117.135.102]:12695 "EHLO
	exchange.timesys.com") by linux-mips.org with ESMTP
	id <S8224935AbVDGLhd>; Thu, 7 Apr 2005 12:37:33 +0100
Received: from [192.168.2.27] ([192.168.2.27]) by exchange.timesys.com with Microsoft SMTPSVC(5.0.2195.6713);
	 Thu, 7 Apr 2005 07:33:21 -0400
Message-ID: <42551B79.6080803@timesys.com>
Date:	Thu, 07 Apr 2005 07:37:29 -0400
From:	Greg Weeks <greg.weeks@timesys.com>
User-Agent: Mozilla Thunderbird 1.0 (X11/20041206)
X-Accept-Language: en-us, en
MIME-Version: 1.0
To:	Ralf Baechle <ralf@linux-mips.org>
CC:	linux-mips@linux-mips.org
Subject: Re: 4kc machine check
References: <4254181A.9000301@timesys.com> <20050406200255.GA4978@linux-mips.org>
In-Reply-To: <20050406200255.GA4978@linux-mips.org>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-OriginalArrivalTime: 07 Apr 2005 11:33:21.0218 (UTC) FILETIME=[9A0C9A20:01C53B65]
Return-Path: <greg.weeks@timesys.com>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 7621
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: greg.weeks@timesys.com
Precedence: bulk
X-list: linux-mips
Content-Length: 626
Lines: 21

Ralf Baechle wrote:

>On Wed, Apr 06, 2005 at 01:10:50PM -0400, Greg Weeks wrote:
>
>  
>
>>I noticed there was a recent checkin for 4000 series tlb code. It still 
>>seems to be a problem on the 4kc malta.
>>    
>>
>
>4K is not R4000 series ...   Anyway, the 4K code you were sent aren't yet
>in because they've only empirically proven to be correct; we'd like to
>look into the case a little further before comitting the patches into CVS.
>  
>
Touched code got built so I figured it was worth a build and run. I 
still see occasional machine checks with the patch you gave me that 
moves the tlb_probe around.

Greg Weeks

From greg.weeks@timesys.com Thu Apr  7 13:14:09 2005
Received: with ECARTIS (v1.0.0; list linux-mips); Thu, 07 Apr 2005 13:14:23 +0100 (BST)
Received: from mail.timesys.com ([IPv6:::ffff:65.117.135.102]:54912 "EHLO
	exchange.timesys.com") by linux-mips.org with ESMTP
	id <S8224939AbVDGMOJ>; Thu, 7 Apr 2005 13:14:09 +0100
Received: from [192.168.2.27] ([192.168.2.27]) by exchange.timesys.com with Microsoft SMTPSVC(5.0.2195.6713);
	 Thu, 7 Apr 2005 08:09:57 -0400
Message-ID: <4255240E.4050701@timesys.com>
Date:	Thu, 07 Apr 2005 08:14:06 -0400
From:	Greg Weeks <greg.weeks@timesys.com>
User-Agent: Mozilla Thunderbird 1.0 (X11/20041206)
X-Accept-Language: en-us, en
MIME-Version: 1.0
To:	Ralf Baechle <ralf@linux-mips.org>
CC:	linux-mips@linux-mips.org
Subject: Re: memcpy prefetch
References: <4253D67C.4010705@timesys.com> <20050406200848.GB4978@linux-mips.org>
In-Reply-To: <20050406200848.GB4978@linux-mips.org>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-OriginalArrivalTime: 07 Apr 2005 12:09:57.0625 (UTC) FILETIME=[B735B690:01C53B6A]
Return-Path: <greg.weeks@timesys.com>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 7622
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: greg.weeks@timesys.com
Precedence: bulk
X-list: linux-mips
Content-Length: 1629
Lines: 37

Ralf Baechle wrote:

>On Wed, Apr 06, 2005 at 08:30:52AM -0400, Greg Weeks wrote:
>
>  
>
>>In trying to understand the prefetch code in memcpy it looks like it's 
>>prefetching too far out in front of the loop. In the main aligned loop 
>>the loop copies 32 or 64 bytes of data and the prefetch is trying to 
>>prefetch 256 bytes ahead of the current copy. The prefetches should also 
>>pay attention to cache line size and they currently don't. If the line 
>>size is less than the copy size we are skipping prefetches that should 
>>be done. For the 4kc the line size is only 16 bytes. We should be doing 
>>a prefetch for each line. The src_unaligned_dst_aligned loop is even 
>>worse as it prefetches 288 bytes ahead of the copy and only copies 16 or 
>>32 bytes at a time.
>>
>>Have I totally misunderstood the code?
>>    
>>
>
>Nope, you've understood that perfectly right.  The messy thing is that on
>a whole bunch of system we don't know the cacheline size before runtime
>so we have two choices a) work under worst case assumptions which would be
>16 bytes.  Or do the same thing as we're already doing it for a bunch of
>other performance sensitive functions, generating them at runtime.  Choose
>your poison ;-)
>  
>
What's the performance hit for doing a pref on a cache line that is 
already pref'd? Does it turn into a nop, or do we get some horrible 
degenerate case? Are 64 bit processors always at least 32 byte cache 
line size? I don't really expect anyone to know the answers right now. I 
expect I'll need to time code to tell. This makes generating them at run 
time look better and better.

Greg Weeks

From ralf@linux-mips.org Thu Apr  7 13:25:13 2005
Received: with ECARTIS (v1.0.0; list linux-mips); Thu, 07 Apr 2005 13:25:27 +0100 (BST)
Received: from extgw-uk.mips.com ([IPv6:::ffff:62.254.210.129]:31510 "EHLO
	mail.linux-mips.net") by linux-mips.org with ESMTP
	id <S8224939AbVDGMZN>; Thu, 7 Apr 2005 13:25:13 +0100
Received: from dea.linux-mips.net (localhost.localdomain [127.0.0.1])
	by mail.linux-mips.net (8.13.1/8.13.1) with ESMTP id j37CP7UH013177;
	Thu, 7 Apr 2005 13:25:07 +0100
Received: (from ralf@localhost)
	by dea.linux-mips.net (8.13.1/8.13.1/Submit) id j37CP4OK013176;
	Thu, 7 Apr 2005 13:25:04 +0100
Date:	Thu, 7 Apr 2005 13:25:04 +0100
From:	Ralf Baechle <ralf@linux-mips.org>
To:	Greg Weeks <greg.weeks@timesys.com>
Cc:	linux-mips@linux-mips.org
Subject: Re: memcpy prefetch
Message-ID: <20050407122504.GY4948@linux-mips.org>
References: <4253D67C.4010705@timesys.com> <20050406200848.GB4978@linux-mips.org> <4255240E.4050701@timesys.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <4255240E.4050701@timesys.com>
User-Agent: Mutt/1.4.1i
Return-Path: <ralf@linux-mips.org>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 7623
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: ralf@linux-mips.org
Precedence: bulk
X-list: linux-mips
Content-Length: 1157
Lines: 31

On Thu, Apr 07, 2005 at 08:14:06AM -0400, Greg Weeks wrote:

> What's the performance hit for doing a pref on a cache line that is 
> already pref'd?

A wasted instruction.

(More complicated on certain multi-issue in-order processors such as the
SB1 CPU core.  Mentioning this for completeness; we shouldn't worry about
it here.)

>  Does it turn into a nop, or do we get some horrible 
> degenerate case? Are 64 bit processors always at least 32 byte cache 
> line size?

The smallest D-cache line I know of is 16 bytes.

> I don't really expect anyone to know the answers right now. I 
> expect I'll need to time code to tell. This makes generating them at run 
> time look better and better.

Indeed.  Initially when we started doing such things some people felt it
might be really bad to debug and everything but in practice it's been a
relativly minor problem, so I guess the resistance against yet another
run-time generated group of functions is getting less.

One interesting issue to solve - memcpy, memmove and copy_user are combined
into a single big function, so the fixups for userspace accesses need to
be handled at runtime as well.

  Ralf

From uhler@mips.com Thu Apr  7 13:25:49 2005
Received: with ECARTIS (v1.0.0; list linux-mips); Thu, 07 Apr 2005 13:26:09 +0100 (BST)
Received: from 209-232-97-206.ded.pacbell.net ([IPv6:::ffff:209.232.97.206]:24228
	"EHLO dns0.mips.com") by linux-mips.org with ESMTP
	id <S8224942AbVDGMZ0> convert rfc822-to-8bit; Thu, 7 Apr 2005 13:25:26 +0100
Received: from mercury.mips.com (sbcns-dmz [209.232.97.193])
	by dns0.mips.com (8.12.11/8.12.11) with ESMTP id j37CPHlu014455;
	Thu, 7 Apr 2005 05:25:17 -0700 (PDT)
Received: from laptopuhler4 (laptop-uhler4.mips.com [192.168.2.2])
	by mercury.mips.com (8.12.9/8.12.11) with ESMTP id j37CPIGl003354;
	Thu, 7 Apr 2005 05:25:18 -0700 (PDT)
From:	"Michael Uhler" <uhler@mips.com>
To:	"'Greg Weeks'" <greg.weeks@timesys.com>,
	"'Ralf Baechle'" <ralf@linux-mips.org>
Cc:	<linux-mips@linux-mips.org>
Subject: RE: memcpy prefetch
Date:	Thu, 7 Apr 2005 05:25:15 -0700
Organization: MIPS Technologies, Inc.
Message-ID: <003901c53b6c$da8938e0$cf14a8c0@MIPS.COM>
MIME-Version: 1.0
Content-Type: text/plain;
	charset="us-ascii"
Content-Transfer-Encoding: 8BIT
X-Priority: 3 (Normal)
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook, Build 10.0.6626
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2527
Importance: Normal
In-Reply-To: <4255240E.4050701@timesys.com>
X-Scanned-By: MIMEDefang 2.39
Return-Path: <uhler@mips.com>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 7624
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: uhler@mips.com
Precedence: bulk
X-list: linux-mips
Content-Length: 1103
Lines: 29

> What's the performance hit for doing a pref on a cache line that is 
> already pref'd? Does it turn into a nop, or do we get some horrible 
> degenerate case? Are 64 bit processors always at least 32 byte cache 
> line size? I don't really expect anyone to know the answers 
> right now. I 
> expect I'll need to time code to tell. This makes generating 
> them at run 
> time look better and better.

As very general rules of thumb:

- A pref to a line which is already in the cache take a cycle in the
load/store unit and does not go back out to the memory subsystem.  There are
some possible ships-passing-in-the-night scenarios, but most processors do
what you'd expect.

- Most 64-bit processors are built for high-end applications, and most
high-end processors most likely have at least 32-bit lines.  One usually has
smaller line sizes when the processor is intended for lower-end
applications, or where the memory subsystem isn't all that good.

/gmu

---
Michael Uhler, Chief Technology Officer
MIPS Technologies, Inc.   Email: uhler at mips.com
1225 Charleston Road
Mountain View, CA 94043


From dom@mips.com Thu Apr  7 13:29:36 2005
Received: with ECARTIS (v1.0.0; list linux-mips); Thu, 07 Apr 2005 13:29:52 +0100 (BST)
Received: from alg145.algor.co.uk ([IPv6:::ffff:62.254.210.145]:21010 "EHLO
	dmz.algor.co.uk") by linux-mips.org with ESMTP id <S8224942AbVDGM3g>;
	Thu, 7 Apr 2005 13:29:36 +0100
Received: from alg158.algor.co.uk ([62.254.210.158] helo=olympia.mips.com)
	by dmz.algor.co.uk with esmtp (Exim 3.35 #1 (Debian))
	id 1DJWBi-0000iD-00; Thu, 07 Apr 2005 13:32:46 +0100
Received: from arsenal.mips.com ([192.168.192.197])
	by olympia.mips.com with esmtp (Exim 3.36 #1 (Debian))
	id 1DJW7e-0008O1-00; Thu, 07 Apr 2005 13:28:34 +0100
Received: from dom by arsenal.mips.com with local (Exim 4.44)
	id 1DJW7d-0002WM-KW; Thu, 07 Apr 2005 13:28:33 +0100
From:	Dominic Sweetman <dom@mips.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Message-ID: <16981.10097.547098.639380@arsenal.mips.com>
Date:	Thu, 7 Apr 2005 13:28:33 +0100
To:	Greg Weeks <greg.weeks@timesys.com>
Cc:	Ralf Baechle <ralf@linux-mips.org>, linux-mips@linux-mips.org
Subject: Re: memcpy prefetch
In-Reply-To: <4255240E.4050701@timesys.com>
References: <4253D67C.4010705@timesys.com>
	<20050406200848.GB4978@linux-mips.org>
	<4255240E.4050701@timesys.com>
X-Mailer: VM 7.17 under 21.4 (patch 17) "Jumbo Shrimp" XEmacs Lucid
X-MTUK-Scanner:	Found to be clean
X-MTUK-SpamCheck: not spam (whitelisted), SpamAssassin (score=-4.823,
	required 4, AWL, BAYES_00)
Return-Path: <dom@mips.com>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 7625
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: dom@mips.com
Precedence: bulk
X-list: linux-mips
Content-Length: 870
Lines: 23


Greg Weeks (greg.weeks@timesys.com) writes:

> What's the performance hit for doing a pref on a cache line that is 
> already pref'd? Does it turn into a nop, or do we get some horrible 
> degenerate case?

The specification for the prefetch instruction is fairly wide, to
permit different implementations to act differently.  It's perfectly
legal for it to be a no-op.  However, implementors are told that they
should not do anything which would make performance *worse* than if it
was a no-op.

> Are 64 bit processors always at least 32 byte cache line size?

There's no reliable correlation.  If you were to go round the
"autogenerated at kernel-startup-time" route, then you can figure out
the line size from the "Config" registers (MIPS32- or MIPS64-compliant
CPUs) or from a table of CPU IDs or otherwise (earlier CPUs)...

--
Dominic Sweetman
MIPS Technologies

From mile.davidovic@micronasnit.com Thu Apr  7 14:35:48 2005
Received: with ECARTIS (v1.0.0; list linux-mips); Thu, 07 Apr 2005 14:36:03 +0100 (BST)
Received: from krt.tmd.ns.ac.yu ([IPv6:::ffff:147.91.177.65]:58544 "EHLO
	krt.neobee.net") by linux-mips.org with ESMTP id <S8225073AbVDGNfs>;
	Thu, 7 Apr 2005 14:35:48 +0100
Received: from localhost (localhost [127.0.0.1])
	by krt.neobee.net (8.12.7/8.12.7/SuSE Linux 0.6) with ESMTP id j37DYrZF021718
	for <linux-mips@linux-mips.org>; Thu, 7 Apr 2005 15:34:54 +0200
Received: from krt.neobee.net ([127.0.0.1])
 by localhost (krt.neobee.net [127.0.0.1]) (amavisd-new, port 10024) with LMTP
 id 20943-08 for <linux-mips@linux-mips.org>;
 Thu,  7 Apr 2005 15:34:53 +0200 (CEST)
Received: from davidovic ([192.168.0.89])
	by krt.neobee.net (8.12.7/8.12.7/SuSE Linux 0.6) with ESMTP id j37DYp1p021714
	for <linux-mips@linux-mips.org>; Thu, 7 Apr 2005 15:34:51 +0200
Message-Id: <200504071334.j37DYp1p021714@krt.neobee.net>
Reply-To: <mile.davidovic@micronasnit.com>
From:	"Mile Davidovic" <mile.davidovic@micronasnit.com>
To:	<linux-mips@linux-mips.org>
Subject: Porting new board
Date:	Thu, 7 Apr 2005 15:35:08 +0200
Organization: MicronasNIT
MIME-Version: 1.0
Content-Type: text/plain;
	charset="ISO-8859-2"
Content-Transfer-Encoding: 7bit
X-Mailer: Microsoft Office Outlook, Build 11.0.6353
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2527
Thread-Index: AcU7dpzZ8ihBrbxxTjyEF7iZyq+Drw==
X-Virus-Scanned: by amavisd-new at krt.neobee.net
Return-Path: <mile.davidovic@micronasnit.com>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 7626
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: mile.davidovic@micronasnit.com
Precedence: bulk
X-list: linux-mips
Content-Length: 780
Lines: 29

Hello all
I try to port new board (MIPS 4KEC processor) to latest version
of linux-mips kernel. I have question regarding Kconfig and adding
new board.
In arch/mips/Kconfig I add next lines:

config MIPS_VGCA_EVA
  bool "Support for VGCA-Eva board"
  select SYS_SUPPORTS_BIG_ENDIAN
  help
	  This enables support for the VGCA-EVA board.

and in arch/mips/Makefile I add next lines:
core-$(MIPS_VGCA_EVA)	+= arch/mips/vgca-eva/
cflags-$(MIPS_VGCA_EVA)   += -Iinclude/asm-mips/vgca-eva
load-$(MIPS_VGCA_EVA)	+= 0xffffffff80100000

But when I try to build kernel with:
	make menuconfig  		---> choose VGCA-Eva board
	make arch=mips V=1 CROSS_COMPILE=mips-linux- 

it stop forever. When I try to choose some other board it work nice. 
Any comment?



Thanks a lot.
Best regards Mile


From geert@linux-m68k.org Thu Apr  7 15:04:45 2005
Received: with ECARTIS (v1.0.0; list linux-mips); Thu, 07 Apr 2005 15:05:00 +0100 (BST)
Received: from witte.sonytel.be ([IPv6:::ffff:80.88.33.193]:35466 "EHLO
	witte.sonytel.be") by linux-mips.org with ESMTP id <S8225207AbVDGOEp>;
	Thu, 7 Apr 2005 15:04:45 +0100
Received: from numbat.sonytel.be (mail.sonytel.be [43.221.60.197])
	by witte.sonytel.be (8.12.10/8.12.10) with ESMTP id j37E4iGU010658;
	Thu, 7 Apr 2005 16:04:44 +0200 (MEST)
Date:	Thu, 7 Apr 2005 16:04:38 +0200 (CEST)
From:	Geert Uytterhoeven <geert@linux-m68k.org>
To:	Mile Davidovic <mile.davidovic@micronasnit.com>
cc:	Linux/MIPS Development <linux-mips@linux-mips.org>
Subject: Re: Porting new board
In-Reply-To: <200504071334.j37DYp1p021714@krt.neobee.net>
Message-ID: <Pine.LNX.4.62.0504071603460.9236@numbat.sonytel.be>
References: <200504071334.j37DYp1p021714@krt.neobee.net>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Return-Path: <geert@linux-m68k.org>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 7627
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: geert@linux-m68k.org
Precedence: bulk
X-list: linux-mips
Content-Length: 1268
Lines: 39

On Thu, 7 Apr 2005, Mile Davidovic wrote:
> I try to port new board (MIPS 4KEC processor) to latest version
> of linux-mips kernel. I have question regarding Kconfig and adding
> new board.
> In arch/mips/Kconfig I add next lines:
> 
> config MIPS_VGCA_EVA
>   bool "Support for VGCA-Eva board"
>   select SYS_SUPPORTS_BIG_ENDIAN
>   help
> 	  This enables support for the VGCA-EVA board.
> 
> and in arch/mips/Makefile I add next lines:
> core-$(MIPS_VGCA_EVA)	+= arch/mips/vgca-eva/
         ^^^^^^^^^^^^^
> cflags-$(MIPS_VGCA_EVA)   += -Iinclude/asm-mips/vgca-eva
           ^^^^^^^^^^^^^
> load-$(MIPS_VGCA_EVA)	+= 0xffffffff80100000
         ^^^^^^^^^^^^^

All of these should be `CONFIG_MIPS_VGCA_EVA' instead of `MIPS_VGCA_EVA'.

> But when I try to build kernel with:
> 	make menuconfig  		---> choose VGCA-Eva board
> 	make arch=mips V=1 CROSS_COMPILE=mips-linux- 
> 
> it stop forever. When I try to choose some other board it work nice. 
> Any comment?

Gr{oetje,eeting}s,

						Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
							    -- Linus Torvalds

From ralf@linux-mips.org Thu Apr  7 15:05:23 2005
Received: with ECARTIS (v1.0.0; list linux-mips); Thu, 07 Apr 2005 15:05:42 +0100 (BST)
Received: from extgw-uk.mips.com ([IPv6:::ffff:62.254.210.129]:2321 "EHLO
	mail.linux-mips.net") by linux-mips.org with ESMTP
	id <S8225211AbVDGOFO>; Thu, 7 Apr 2005 15:05:14 +0100
Received: from dea.linux-mips.net (localhost.localdomain [127.0.0.1])
	by mail.linux-mips.net (8.13.1/8.13.1) with ESMTP id j37E586C016582;
	Thu, 7 Apr 2005 15:05:09 +0100
Received: (from ralf@localhost)
	by dea.linux-mips.net (8.13.1/8.13.1/Submit) id j37E57UV016581;
	Thu, 7 Apr 2005 15:05:07 +0100
Date:	Thu, 7 Apr 2005 15:05:07 +0100
From:	Ralf Baechle <ralf@linux-mips.org>
To:	Dominic Sweetman <dom@mips.com>
Cc:	Greg Weeks <greg.weeks@timesys.com>, linux-mips@linux-mips.org
Subject: Re: memcpy prefetch
Message-ID: <20050407140507.GA4948@linux-mips.org>
References: <4253D67C.4010705@timesys.com> <20050406200848.GB4978@linux-mips.org> <4255240E.4050701@timesys.com> <16981.10097.547098.639380@arsenal.mips.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <16981.10097.547098.639380@arsenal.mips.com>
User-Agent: Mutt/1.4.1i
Return-Path: <ralf@linux-mips.org>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 7628
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: ralf@linux-mips.org
Precedence: bulk
X-list: linux-mips
Content-Length: 1516
Lines: 36

On Thu, Apr 07, 2005 at 01:28:33PM +0100, Dominic Sweetman wrote:

> Greg Weeks (greg.weeks@timesys.com) writes:
> 
> > What's the performance hit for doing a pref on a cache line that is 
> > already pref'd? Does it turn into a nop, or do we get some horrible 
> > degenerate case?
> 
> The specification for the prefetch instruction is fairly wide, to
> permit different implementations to act differently.  It's perfectly
> legal for it to be a no-op.

The R5000 series actually treats it as a nop - which is why Linux treats
the R5000 as a CPU that does not have prefetch.

>  However, implementors are told that they
> should not do anything which would make performance *worse* than if it
> was a no-op.

Okay, but that should be obvious, I'd hope :-)

> > Are 64 bit processors always at least 32 byte cache line size?
> 
> There's no reliable correlation.  If you were to go round the
> "autogenerated at kernel-startup-time" route, then you can figure out
> the line size from the "Config" registers (MIPS32- or MIPS64-compliant
> CPUs) or from a table of CPU IDs or otherwise (earlier CPUs)...

Linux already contains a huge chunk of code to detect these and many
more cache properties for mips32, mips64 and more.  We also try to make
sure the compiler can do constant folding etc. as far as possible for
a particular platform.  All it takes is a suitable cpu-feature-overrides.h.
In absence of that Linux will built cache that pretty much support
everything in the universe - at some code bloat.

  Ralf

From greg.weeks@timesys.com Thu Apr  7 15:06:05 2005
Received: with ECARTIS (v1.0.0; list linux-mips); Thu, 07 Apr 2005 15:06:27 +0100 (BST)
Received: from mail.timesys.com ([IPv6:::ffff:65.117.135.102]:7015 "EHLO
	exchange.timesys.com") by linux-mips.org with ESMTP
	id <S8225209AbVDGOGC>; Thu, 7 Apr 2005 15:06:02 +0100
Received: from [192.168.2.27] ([192.168.2.27]) by exchange.timesys.com with Microsoft SMTPSVC(5.0.2195.6713);
	 Thu, 7 Apr 2005 10:01:51 -0400
Message-ID: <42553E49.7080004@timesys.com>
Date:	Thu, 07 Apr 2005 10:06:01 -0400
From:	Greg Weeks <greg.weeks@timesys.com>
User-Agent: Mozilla Thunderbird 1.0 (X11/20041206)
X-Accept-Language: en-us, en
MIME-Version: 1.0
To:	linux-mips@linux-mips.org
Subject: another 4kc machine check.
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-OriginalArrivalTime: 07 Apr 2005 14:01:51.0640 (UTC) FILETIME=[59131980:01C53B7A]
Return-Path: <greg.weeks@timesys.com>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 7629
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: greg.weeks@timesys.com
Precedence: bulk
X-list: linux-mips
Content-Length: 3190
Lines: 126

This is the malta branch with the tlb patch from Ralf applied. The LTP test:


-bash-2.05b# shmem_test_06
shmem_test_06: IPC Shared Memory TestSuite program
 
        mykey to uniquely identify the shared memory segment 0x330b035a
 
...
       
        Detach from the segment using the shmdt subroutine
 
        Release shared memory
 

causes:

timesys-bsp login: Got mcheck at 802199bc
Cpu 0
$ 0   : 00000000 1000fc00 00000004 00000000
$ 4   : 80401d30 00020004 c0002034 803e5964
$ 8   : 803e598c 00000000 fffffffa 8299f470
$12   : 00000001 000000ff 00000000 00000000
$16   : 80400000 00020004 82d15720 82d15724
$20   : 60100000 803e5964 8337dd38 00000000
$24   : 00000000 8014e6a4
$28   : 82d3e000 82d3fe38 10021a80 8021d314
Hi    : d3c9c18f
Lo    : 7263fc03
epc   : 802199bc ipc_lock+0x14/0x54     Not tainted
ra    : 8021d314 shm_close+0x5c/0x11c
Status: 1020fc03    KERNEL EXL IE
Cause : 00800060
PrId  : 00018001
                
Kernel panic - not syncing: Caught Machine Check exception - caused by 
multiple matching entries in the TLB.
                            
To run this test I have a different config from the default malta.
[gweeks@tanith linux]$ diff -du arch/mips/configs/malta_defconfig .config
--- arch/mips/configs/malta_defconfig   2005-03-18 12:36:52.000000000 -0500
+++ .config     2005-04-07 09:42:47.000000000 -0400
@@ -1,7 +1,7 @@
 #
 # Automatically generated make config: don't edit
 # Linux kernel version: 2.6.12-rc1
-# Fri Mar 18 15:41:40 2005
+# Thu Apr  7 09:42:47 2005
 #
 CONFIG_MIPS=y
 
@@ -18,7 +18,7 @@
 CONFIG_LOCALVERSION=""
 CONFIG_SWAP=y
 CONFIG_SYSVIPC=y
-# CONFIG_POSIX_MQUEUE is not set
+CONFIG_POSIX_MQUEUE=y
 # CONFIG_BSD_PROCESS_ACCT is not set
 CONFIG_SYSCTL=y
 # CONFIG_AUDIT is not set
@@ -158,6 +158,7 @@
 # CONFIG_PAGE_SIZE_16KB is not set
 # CONFIG_PAGE_SIZE_64KB is not set
 CONFIG_CPU_HAS_PREFETCH=y
+CONFIG_BOARD_HAS_MEMCPY_PREFETCH_BUG=y
 # CONFIG_64BIT_PHYS_ADDR is not set
 # CONFIG_CPU_ADVANCED is not set
 CONFIG_CPU_HAS_LLSC=y
@@ -187,7 +188,7 @@
 # Executable file formats
 #
 CONFIG_BINFMT_ELF=y
-# CONFIG_BINFMT_MISC is not set
+CONFIG_BINFMT_MISC=y
 CONFIG_TRAD_SIGNALS=y
 
 #
@@ -394,8 +395,7 @@
 CONFIG_DM_SNAPSHOT=m
 CONFIG_DM_MIRROR=m
 CONFIG_DM_ZERO=m
-CONFIG_DM_MULTIPATH=m
-CONFIG_DM_MULTIPATH_EMC=m
+# CONFIG_DM_MULTIPATH is not set
 
 #
 # Fusion MPT device support
@@ -663,7 +663,7 @@
 CONFIG_NET_QOS=y
 CONFIG_NET_ESTIMATOR=y
 CONFIG_NET_CLS=y
-CONFIG_NET_CLS_BASIC=m
+# CONFIG_NET_CLS_BASIC is not set
 CONFIG_NET_CLS_TCINDEX=m
 CONFIG_NET_CLS_ROUTE4=m
 CONFIG_NET_CLS_ROUTE=y
@@ -1006,10 +1006,13 @@
 CONFIG_PROC_FS=y
 CONFIG_PROC_KCORE=y
 CONFIG_SYSFS=y
-# CONFIG_DEVFS_FS is not set
+CONFIG_DEVFS_FS=y
+# CONFIG_DEVFS_MOUNT is not set
+# CONFIG_DEVFS_DEBUG is not set
 CONFIG_DEVPTS_FS_XATTR=y
 CONFIG_DEVPTS_FS_SECURITY=y
-# CONFIG_TMPFS is not set
+CONFIG_TMPFS=y
+# CONFIG_TMPFS_XATTR is not set
 # CONFIG_HUGETLB_PAGE is not set
 CONFIG_RAMFS=y
 
@@ -1138,7 +1141,7 @@
 CONFIG_CRYPTO_SHA256=m
 CONFIG_CRYPTO_SHA512=m
 CONFIG_CRYPTO_WP512=m
-CONFIG_CRYPTO_TGR192=m
+# CONFIG_CRYPTO_TGR192 is not set
 CONFIG_CRYPTO_DES=m
 CONFIG_CRYPTO_BLOWFISH=m
 CONFIG_CRYPTO_TWOFISH=m
[gweeks@tanith linux]$





From fonga_pascal2@yahoo.fr Thu Apr  7 16:19:31 2005
Received: with ECARTIS (v1.0.0; list linux-mips); Thu, 07 Apr 2005 16:19:50 +0100 (BST)
Received: from web26503.mail.ukl.yahoo.com ([IPv6:::ffff:217.146.176.40]:62629
	"HELO web26503.mail.ukl.yahoo.com") by linux-mips.org with SMTP
	id <S8225219AbVDGPTb>; Thu, 7 Apr 2005 16:19:31 +0100
Received: (qmail 54327 invoked by uid 60001); 7 Apr 2005 15:19:24 -0000
Message-ID: <20050407151924.54325.qmail@web26503.mail.ukl.yahoo.com>
Received: from [213.136.104.118] by web26503.mail.ukl.yahoo.com via HTTP; Thu, 07 Apr 2005 17:19:24 CEST
Date:	Thu, 7 Apr 2005 17:19:24 +0200 (CEST)
From:	pascal fonga <fonga_pascal2@yahoo.fr>
Subject: Economiser ma vie, De: Pascal Fonga
To:	fonga_pascal2@yahoo.fr
MIME-Version: 1.0
Content-Type: multipart/alternative; boundary="0-1861327577-1112887164=:44495"
Content-Transfer-Encoding: 8bit
Return-Path: <fonga_pascal2@yahoo.fr>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 7630
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: fonga_pascal2@yahoo.fr
Precedence: bulk
X-list: linux-mips
Content-Length: 9824
Lines: 66

--0-1861327577-1112887164=:44495
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: 8bit


De : Pascal Fonga

Cher, 

Ceci est très urgent, mon nom est Pascal Fonga, j'ai 24 ans , le fils du défunt M. Laurent Fonga, je souhaite vous informer que je suis intéressé à faire des affaires avec vous, en particulier des affaires dans l'immobilier comme produit de placement ou n'importe quelles affaires qui sont profitables dans votre pays. Je vous prie de ne pas trahir  la confiance qui  repose sur vous en tant que mon associé d'affaires si vous êtes disposé à m'aider dans cette proposition. 

Je suis en possession de la somme d' US$12.5 (douze millions de cinq cents mille dollars américains) que je souhaite investir d'urgence par vous dans votre pays. La source des fonds, mon défunt M. Laurent Fonga de père, était un homme d'affaires réussi avant sa mort prématurée en juin 2003, l était un négociant de cacao et  de diamant basé ici à Abidjan, en Cote d'lvoire . Mon père et ma mère ont été empoisonnés par une partie organisée par un de ses associés d'affaires. Avant qu'il ne meurt, il m'a appelé à son chevet malade et m'a secrètement informé qu'il a déposé la somme d'US$12.5  Millions  à une banque ici, qu'il avait l'habitude d'utiliser mon nom en tant que proche parents pour déposer les fonds, et puisque je suis le seul fils. 

Il m'a averti sérieusement, de faire très attention  et de ne pas perdre pas les fonds, que c'était à cause de ces fonds que ses associés d'affaires ont prévu l' empoisonner. Par conséquent, avec des larmes il m'a conseillé de chercher pour un associé étranger de confiance dans votre pays pou m'aider à investir les fonds dans n'importe quelles affaires lucratives, telles que l'investissement dans tout domaine ou toute affaire qui sont profitables dans votre pays. Il m'a conseillé de prendre ma plus jeune soeur Elizabeth et de me déplacer hors de ce pays, après que les fonds aient été transférés. 

Mon plan était que nous devrions finir nos études ici d'abord, avant que je commence à projeter comment investir les fonds dans n'importe quelle entreprise d'affaires. Mais deux hommes qui réclament être les associés d'affaires de mon défunt père, sont récemment venus à notre maison et ont exigés tous les documents au sujet des fonds. J'ai nié que je ne sais rien au sujet des fonds ou autre document. Avant qu'ils soient partis, ils ont menacé de me tuer si je ne leur donne pas la fois prochaine qu'ils viennent. Basé sur ceci, j'ai décidé de transférer les fonds hrs d'ici immédiatement et de les replacer dans  votre pays. Avant de vous contacter, j'ai parlé avec le directeur d'agence de la banque et les modalités à établir sur la façon dont transférer les fonds. 

S'il vous plait, nous cherchons humblement votre aide de la manières suivante : 

1. Pour nous aider en transférant les fonds tranquillement dans votre compte dans votre pays. 

2. Pour servir de gardien des fonds puisque je suis toujours à l'université et à ma plus jeune soeur est toujours à l'école secondaire. 

3. Pour faire l'arrangement approprié pour que nous venons dans votre pays, dans d'autres écoles n et pour nous aident à trouver une autorisation résidentielle dans votre pays. 

Avec l'esprit propre, je vous offre 15% de tous les fonds, comme compensation pour votre efforts, après que le transfert réussi des fonds dans  votre compte dans votre pays. Je crois qu'on conclurait cette transaction dans le temps le plus court possible. J'espère que je recevrai une réponse favorable de vous instamment et je vous donnerai davantage sur les détails d'information, comment cette transaction à effectuer. 

Dieu vous bénissent. 
Pascal Fonga et sœur.



		
---------------------------------
 Découvrez le nouveau Yahoo! Mail : 250 Mo d'espace de stockage pour vos mails !
Créez votre Yahoo! Mail
		
---------------------------------
 Découvrez le nouveau Yahoo! Mail : 250 Mo d'espace de stockage pour vos mails !
Créez votre Yahoo! Mail
--0-1861327577-1112887164=:44495
Content-Type: text/html; charset=iso-8859-1
Content-Transfer-Encoding: 8bit

<DIV>
<DIV>
<DIV>
<P style="MARGIN: 12pt 0cm; LINE-HEIGHT: 121%"><SPAN>De : Pascal Fonga</SPAN></P>
<P style="MARGIN-BOTTOM: 12pt; LINE-HEIGHT: 121%"><SPAN>Cher, <?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p></o:p></SPAN></P>
<P style="MARGIN-BOTTOM: 12pt; LINE-HEIGHT: 121%"><SPAN>Ceci est très urgent, mon nom est Pascal Fonga, j'ai 24 ans , le fils du défunt M. Laurent Fonga, je souhaite vous informer que je suis intéressé à faire des affaires avec vous, en particulier des affaires dans l'immobilier comme produit de placement ou n'importe quelles affaires qui sont profitables dans votre pays. Je vous prie de ne pas trahir&nbsp; la confiance qui&nbsp; repose sur vous en tant que mon associé d'affaires si vous êtes disposé à m'aider dans cette proposition. <o:p></o:p></SPAN></P>
<P style="MARGIN-BOTTOM: 12pt; LINE-HEIGHT: 121%"><SPAN>Je suis en possession de la somme d' US$12.5 (douze millions de cinq cents mille dollars américains) que je souhaite investir d'urgence par vous dans votre pays. La source des fonds, mon défunt M. Laurent Fonga de père, était un homme d'affaires réussi avant sa mort prématurée en juin 2003, l était un négociant de cacao et&nbsp; de diamant basé ici&nbsp;à Abidjan, en Cote d'lvoire . Mon père et ma mère ont été empoisonnés&nbsp;par une partie organisée par un de ses associés d'affaires. Avant qu'il ne&nbsp;meurt, il m'a appelé à son chevet malade et m'a secrètement informé qu'il a déposé la somme d'US$12.5<SPAN style="mso-spacerun: yes">&nbsp; </SPAN>Millions &nbsp;à une banque ici, qu'il avait l'habitude d'utiliser mon nom en tant que proche parents pour déposer les fonds,&nbsp;et puisque je suis&nbsp;le seul fils. <o:p></o:p></SPAN></P>
<P style="MARGIN-BOTTOM: 12pt; LINE-HEIGHT: 121%"><SPAN>Il m'a averti sérieusement, de faire très attention&nbsp; et de ne pas perdre pas les fonds, que c'était&nbsp;à cause de&nbsp;ces fonds que ses associés d'affaires ont prévu l'&nbsp;empoisonner. Par conséquent, avec des larmes il m'a conseillé de chercher pour un associé étranger de confiance dans votre pays&nbsp;pou m'aider à investir les fonds dans n'importe quelles affaires lucratives, telles que l'investissement dans tout domaine ou toute affaire qui sont profitables dans votre pays. Il m'a conseillé de prendre ma plus jeune soeur Elizabeth et de me déplacer hors de ce pays, après que les fonds aient été transférés. <o:p></o:p></SPAN></P>
<P style="MARGIN-BOTTOM: 12pt; LINE-HEIGHT: 121%"><SPAN>Mon plan était que nous devrions finir&nbsp;nos études&nbsp;ici d'abord, avant que je commence à projeter comment investir les fonds dans n'importe quelle entreprise d'affaires. Mais deux hommes qui réclament être les associés d'affaires de mon défunt père,&nbsp;sont récemment venus à notre maison et ont exigés tous les documents au sujet des fonds. J'ai nié que je ne sais rien au sujet des fonds ou&nbsp;autre document. Avant qu'ils soient partis, ils ont menacé de me tuer si je ne leur donne pas la fois prochaine qu'ils viennent. Basé sur ceci, j'ai décidé de transférer les fonds&nbsp;hrs d'ici&nbsp;immédiatement et de les replacer dans &nbsp;votre pays. Avant de vous contacter, j'ai parlé avec le directeur d'agence de la banque et les modalités à établir sur la façon dont transférer les fonds. <o:p></o:p></SPAN></P>
<P style="MARGIN-BOTTOM: 12pt; LINE-HEIGHT: 121%"><SPAN>S'il vous plait, nous cherchons humblement votre aide de la&nbsp;manières suivante : <o:p></o:p></SPAN></P>
<P style="MARGIN-BOTTOM: 12pt; LINE-HEIGHT: 121%"><SPAN>1. Pour nous aider en transférant les fonds tranquillement&nbsp;dans votre compte dans votre pays. <o:p></o:p></SPAN></P>
<P style="MARGIN-BOTTOM: 12pt; LINE-HEIGHT: 121%"><SPAN>2. Pour servir de gardien des fonds puisque&nbsp;je suis&nbsp;toujours à l'université et à ma plus jeune soeur est toujours&nbsp;à l'école secondaire. <o:p></o:p></SPAN></P>
<P style="MARGIN-BOTTOM: 12pt; LINE-HEIGHT: 121%"><SPAN>3. Pour faire l'arrangement approprié pour que nous venons dans votre pays, dans d'autres écoles n et pour nous aident à trouver une autorisation résidentielle dans votre pays. <o:p></o:p></SPAN></P>
<P style="MARGIN-BOTTOM: 12pt; LINE-HEIGHT: 121%"><SPAN>Avec l'esprit propre, je vous offre 15% de tous les fonds, comme compensation pour votre efforts, après que le transfert réussi des fonds&nbsp;dans &nbsp;votre compte dans votre pays. Je crois qu'on conclurait cette transaction dans le temps le plus court possible. J'espère que je recevrai une réponse favorable de vous instamment et je vous donnerai davantage sur les détails&nbsp;d'information, comment cette transaction&nbsp;à effectuer. <o:p></o:p></SPAN></P>
<P style="MARGIN-BOTTOM: 12pt; LINE-HEIGHT: 121%"><SPAN>Dieu vous bénissent. <o:p></o:p></SPAN></P><SPAN style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: Arial; mso-fareast-font-family: 'Times New Roman'; mso-ansi-language: FR; mso-fareast-language: FR; mso-bidi-language: AR-SA">Pascal Fonga et sœur.</SPAN></DIV></DIV></DIV><p>
		<hr size=1> 
Découvrez le nouveau Yahoo! Mail : <font color="red">250 Mo d'espace</font> de stockage pour vos mails !<br><a href="http://us.rd.yahoo.com/evt=25917/*http://us.rd.yahoo.com/mail_fr/mail_campaigns/splash/taglines_250/hotmailcom/*http://fr.promotions.yahoo.com/mail/creer28.html" target="_blank">Créez votre Yahoo! Mail</a>
<p>
		<hr size=1> 
Découvrez le nouveau Yahoo! Mail : <font color="red">250 Mo d'espace</font> de stockage pour vos mails !<br><a href="http://us.rd.yahoo.com/evt=25917/*http://us.rd.yahoo.com/mail_fr/mail_campaigns/splash/taglines_250/hotmailcom/*http://fr.promotions.yahoo.com/mail/creer28.html" target="_blank">Créez votre Yahoo! Mail</a>

--0-1861327577-1112887164=:44495--

From mile.davidovic@micronasnit.com Thu Apr  7 16:24:50 2005
Received: with ECARTIS (v1.0.0; list linux-mips); Thu, 07 Apr 2005 16:25:05 +0100 (BST)
Received: from krt.tmd.ns.ac.yu ([IPv6:::ffff:147.91.177.65]:18884 "EHLO
	krt.neobee.net") by linux-mips.org with ESMTP id <S8225221AbVDGPYu>;
	Thu, 7 Apr 2005 16:24:50 +0100
Received: from localhost (localhost [127.0.0.1])
	by krt.neobee.net (8.12.7/8.12.7/SuSE Linux 0.6) with ESMTP id j37FNnZF025417;
	Thu, 7 Apr 2005 17:23:50 +0200
Received: from krt.neobee.net ([127.0.0.1])
 by localhost (krt.neobee.net [127.0.0.1]) (amavisd-new, port 10024) with LMTP
 id 25091-02; Thu,  7 Apr 2005 17:23:49 +0200 (CEST)
Received: from davidovic ([192.168.0.89])
	by krt.neobee.net (8.12.7/8.12.7/SuSE Linux 0.6) with ESMTP id j37FNd1p025409;
	Thu, 7 Apr 2005 17:23:39 +0200
Message-Id: <200504071523.j37FNd1p025409@krt.neobee.net>
Reply-To: <mile.davidovic@micronasnit.com>
From:	"Mile Davidovic" <mile.davidovic@micronasnit.com>
To:	"'Geert Uytterhoeven'" <geert@linux-m68k.org>
Cc:	"'Linux/MIPS Development'" <linux-mips@linux-mips.org>
Subject: RE: Porting new board
Date:	Thu, 7 Apr 2005 17:23:54 +0200
Organization: MicronasNIT
MIME-Version: 1.0
Content-Type: text/plain;
	charset="iso-8859-2"
Content-Transfer-Encoding: 7bit
X-Mailer: Microsoft Office Outlook, Build 11.0.6353
In-Reply-To: <Pine.LNX.4.62.0504071603460.9236@numbat.sonytel.be>
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2527
Thread-Index: AcU7esi/O6dyZaWpQ5q7Jj6TSPEDBQACmO5Q
X-Virus-Scanned: by amavisd-new at krt.neobee.net
Return-Path: <mile.davidovic@micronasnit.com>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 7631
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: mile.davidovic@micronasnit.com
Precedence: bulk
X-list: linux-mips
Content-Length: 1635
Lines: 56

Thank for Your comment. Yes this was obviouse error but unfortunately it
does not work.

Best regards mile

-----Original Message-----
From: linux-mips-bounce@linux-mips.org
[mailto:linux-mips-bounce@linux-mips.org] On Behalf Of Geert Uytterhoeven
Sent: Thursday, April 07, 2005 4:05 PM
To: Mile Davidovic
Cc: Linux/MIPS Development
Subject: Re: Porting new board

On Thu, 7 Apr 2005, Mile Davidovic wrote:
> I try to port new board (MIPS 4KEC processor) to latest version of 
> linux-mips kernel. I have question regarding Kconfig and adding new 
> board.
> In arch/mips/Kconfig I add next lines:
> 
> config MIPS_VGCA_EVA
>   bool "Support for VGCA-Eva board"
>   select SYS_SUPPORTS_BIG_ENDIAN
>   help
> 	  This enables support for the VGCA-EVA board.
> 
> and in arch/mips/Makefile I add next lines:
> core-$(MIPS_VGCA_EVA)	+= arch/mips/vgca-eva/
         ^^^^^^^^^^^^^
> cflags-$(MIPS_VGCA_EVA)   += -Iinclude/asm-mips/vgca-eva
           ^^^^^^^^^^^^^
> load-$(MIPS_VGCA_EVA)	+= 0xffffffff80100000
         ^^^^^^^^^^^^^

All of these should be `CONFIG_MIPS_VGCA_EVA' instead of `MIPS_VGCA_EVA'.

> But when I try to build kernel with:
> 	make menuconfig  		---> choose VGCA-Eva board
> 	make arch=mips V=1 CROSS_COMPILE=mips-linux-
> 
> it stop forever. When I try to choose some other board it work nice. 
> Any comment?

Gr{oetje,eeting}s,

						Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 --
geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like
that.
							    -- Linus
Torvalds


From mile.davidovic@micronasnit.com Thu Apr  7 16:38:25 2005
Received: with ECARTIS (v1.0.0; list linux-mips); Thu, 07 Apr 2005 16:38:39 +0100 (BST)
Received: from krt.tmd.ns.ac.yu ([IPv6:::ffff:147.91.177.65]:34759 "EHLO
	krt.neobee.net") by linux-mips.org with ESMTP id <S8225234AbVDGPiY>;
	Thu, 7 Apr 2005 16:38:24 +0100
Received: from localhost (localhost [127.0.0.1])
	by krt.neobee.net (8.12.7/8.12.7/SuSE Linux 0.6) with ESMTP id j37FbUZF025791;
	Thu, 7 Apr 2005 17:37:30 +0200
Received: from krt.neobee.net ([127.0.0.1])
 by localhost (krt.neobee.net [127.0.0.1]) (amavisd-new, port 10024) with LMTP
 id 25054-07; Thu,  7 Apr 2005 17:37:30 +0200 (CEST)
Received: from davidovic ([192.168.0.89])
	by krt.neobee.net (8.12.7/8.12.7/SuSE Linux 0.6) with ESMTP id j37FbS1p025786;
	Thu, 7 Apr 2005 17:37:28 +0200
Message-Id: <200504071537.j37FbS1p025786@krt.neobee.net>
Reply-To: <mile.davidovic@micronasnit.com>
From:	"Mile Davidovic" <mile.davidovic@micronasnit.com>
To:	"'Geert Uytterhoeven'" <geert@linux-m68k.org>
Cc:	"'Linux/MIPS Development'" <linux-mips@linux-mips.org>
Subject: RE: Porting new board
Date:	Thu, 7 Apr 2005 17:37:45 +0200
Organization: MicronasNIT
MIME-Version: 1.0
Content-Type: text/plain;
	charset="iso-8859-2"
Content-Transfer-Encoding: 7bit
X-Mailer: Microsoft Office Outlook, Build 11.0.6353
In-Reply-To: <200504071523.j37FNd1p025409@krt.neobee.net>
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2527
Thread-Index: AcU7esi/O6dyZaWpQ5q7Jj6TSPEDBQACmO5QAACXuKA=
X-Virus-Scanned: by amavisd-new at krt.neobee.net
Return-Path: <mile.davidovic@micronasnit.com>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 7632
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: mile.davidovic@micronasnit.com
Precedence: bulk
X-list: linux-mips
Content-Length: 2098
Lines: 74

 
I found what cause my problem after adding 
  select SYS_SUPPORTS_BIG_ENDIAN
  select SYS_SUPPORTS_32BIT_KERNEL
in Kconfig compilation start.

Sorry for posting stupid questions..

Best regards Mile
-----Original Message-----
From: linux-mips-bounce@linux-mips.org
[mailto:linux-mips-bounce@linux-mips.org] On Behalf Of Mile Davidovic
Sent: Thursday, April 07, 2005 5:24 PM
To: 'Geert Uytterhoeven'
Cc: 'Linux/MIPS Development'
Subject: RE: Porting new board

Thank for Your comment. Yes this was obviouse error but unfortunately it
does not work.

Best regards mile

-----Original Message-----
From: linux-mips-bounce@linux-mips.org
[mailto:linux-mips-bounce@linux-mips.org] On Behalf Of Geert Uytterhoeven
Sent: Thursday, April 07, 2005 4:05 PM
To: Mile Davidovic
Cc: Linux/MIPS Development
Subject: Re: Porting new board

On Thu, 7 Apr 2005, Mile Davidovic wrote:
> I try to port new board (MIPS 4KEC processor) to latest version of 
> linux-mips kernel. I have question regarding Kconfig and adding new 
> board.
> In arch/mips/Kconfig I add next lines:
> 
> config MIPS_VGCA_EVA
>   bool "Support for VGCA-Eva board"
>   select SYS_SUPPORTS_BIG_ENDIAN
>   help
> 	  This enables support for the VGCA-EVA board.
> 
> and in arch/mips/Makefile I add next lines:
> core-$(MIPS_VGCA_EVA)	+= arch/mips/vgca-eva/
         ^^^^^^^^^^^^^
> cflags-$(MIPS_VGCA_EVA)   += -Iinclude/asm-mips/vgca-eva
           ^^^^^^^^^^^^^
> load-$(MIPS_VGCA_EVA)	+= 0xffffffff80100000
         ^^^^^^^^^^^^^

All of these should be `CONFIG_MIPS_VGCA_EVA' instead of `MIPS_VGCA_EVA'.

> But when I try to build kernel with:
> 	make menuconfig  		---> choose VGCA-Eva board
> 	make arch=mips V=1 CROSS_COMPILE=mips-linux-
> 
> it stop forever. When I try to choose some other board it work nice. 
> Any comment?

Gr{oetje,eeting}s,

						Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 --
geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like
that.
							    -- Linus
Torvalds



From danieljlaird@hotmail.com Thu Apr  7 18:32:27 2005
Received: with ECARTIS (v1.0.0; list linux-mips); Thu, 07 Apr 2005 18:32:54 +0100 (BST)
Received: from bay101-f35.bay101.hotmail.com ([IPv6:::ffff:64.4.56.45]:23676
	"EHLO hotmail.com") by linux-mips.org with ESMTP
	id <S8225273AbVDGRc1>; Thu, 7 Apr 2005 18:32:27 +0100
Received: from mail pickup service by hotmail.com with Microsoft SMTPSVC;
	 Thu, 7 Apr 2005 10:32:20 -0700
Message-ID: <BAY101-F35417F4A22F1FC159B196ADC3E0@phx.gbl>
Received: from 64.4.56.200 by by101fd.bay101.hotmail.msn.com with HTTP;
	Thu, 07 Apr 2005 17:32:19 GMT
X-Originating-IP: [64.4.56.200]
X-Originating-Email: [danieljlaird@hotmail.com]
X-Sender: danieljlaird@hotmail.com
From:	"Daniel Laird" <danieljlaird@hotmail.com>
To:	linux-mips@linux-mips.org
Subject: mipsel-linux-ld:arch/mips/kernel/vmlinux.lds:*: parse error
Date:	Thu, 07 Apr 2005 17:32:19 +0000
Mime-Version: 1.0
Content-Type: text/plain; format=flowed
X-OriginalArrivalTime: 07 Apr 2005 17:32:20.0331 (UTC) FILETIME=[C05C6BB0:01C53B97]
Return-Path: <danieljlaird@hotmail.com>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 7633
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: danieljlaird@hotmail.com
Precedence: bulk
X-list: linux-mips
Content-Length: 538
Lines: 23

I am trying to build a linux kernel and gcc etc.

I have tried the following combo
gcc-3.4.3
glibc-2.3.4
binutils-2.15.96
linux-2.6.11.6

I egt everything built and then see the following error

mipsel-linux-ld:arch/mips/kernel/vmlinux.lds:6: parse error

I can see that people have told someone else to edit the file vmlinux.lds 
manually
http://www.linux-mips.org/archives/linux-mips/2005-01/msg00059.html

and try again but in a complete build environment so does anyone know what 
causes the bug in the first place

Please help
Dan



From bkuschak@yahoo.com Thu Apr  7 18:45:01 2005
Received: with ECARTIS (v1.0.0; list linux-mips); Thu, 07 Apr 2005 18:45:15 +0100 (BST)
Received: from web40909.mail.yahoo.com ([IPv6:::ffff:66.218.78.206]:54434 "HELO
	web40909.mail.yahoo.com") by linux-mips.org with SMTP
	id <S8225273AbVDGRpB>; Thu, 7 Apr 2005 18:45:01 +0100
Received: (qmail 77211 invoked by uid 60001); 7 Apr 2005 17:44:54 -0000
Comment: DomainKeys? See http://antispam.yahoo.com/domainkeys
DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws;
  s=s1024; d=yahoo.com;
  b=NB3KsAKgKp4H1Dio2l6xaJt7OmqL+O8OCq14EgKJwgXcA/GxfWVHW1v4FrK3dHOd43nYfHmdEjd9nTgTRO84eOgzNV/ppEk+VycJXQvuzgji1ZFPHf/mgBqsJ08HXsM3ohUKNUuK1cnOgsYKPXvFEwfzB2YLqKAvAOzP6sb9kvw=  ;
Message-ID: <20050407174454.77209.qmail@web40909.mail.yahoo.com>
Received: from [65.205.244.66] by web40909.mail.yahoo.com via HTTP; Thu, 07 Apr 2005 10:44:54 PDT
Date:	Thu, 7 Apr 2005 10:44:54 -0700 (PDT)
From:	Brian Kuschak <bkuschak@yahoo.com>
Subject: gdb backtrace with core files
To:	linux-mips@linux-mips.org
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Return-Path: <bkuschak@yahoo.com>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 7634
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: bkuschak@yahoo.com
Precedence: bulk
X-list: linux-mips
Content-Length: 602
Lines: 22

Is anyone succesfully using gdb for mipsel to debug
core dumps?  If so, can you share your secrets for
success?  I tried various recent versions (6.3,
6.1.1), but backtrace never works right, even though
the stack pointer appears to be valid.  gdb-5.3
partially works, but not completely.  

Forcing gdb to use a specific stack pointer and PC
(frame <sp> <pc>) doesn't seem to help either.  

Using linux 2.4.25 and gcc 3.3.3.

Regards,
Brian 




__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

From fabrizio@fazzino.it Thu Apr  7 18:53:57 2005
Received: with ECARTIS (v1.0.0; list linux-mips); Thu, 07 Apr 2005 18:54:12 +0100 (BST)
Received: from smtpa1.aruba.it ([IPv6:::ffff:62.149.128.206]:20386 "HELO
	smtpa1.aruba.it") by linux-mips.org with SMTP id <S8225280AbVDGRx5>;
	Thu, 7 Apr 2005 18:53:57 +0100
Received: (qmail 6992 invoked by uid 511); 7 Apr 2005 17:53:51 -0000
Received: from fabrizio@fazzino.it by smtpa1.aruba.it by uid 503 with qmail-scanner-1.20 
 (avp(2004-04-15).  Clear:RC:0(82.51.107.222):. 
 Processed in 0.047367 secs); 07 Apr 2005 17:53:51 -0000
Received: from unknown (HELO ?192.168.32.1?) (fabrizio@fazzino.it@82.51.107.222)
  by smtpa1.aruba.it with SMTP; 7 Apr 2005 17:53:50 -0000
Message-ID: <425573AD.9010702@fazzino.it>
Date:	Thu, 07 Apr 2005 19:53:49 +0200
From:	Fabrizio Fazzino <fabrizio@fazzino.it>
User-Agent: Mozilla Thunderbird 1.0.2 (Windows/20050317)
X-Accept-Language: it, it-it, en-us, en
MIME-Version: 1.0
To:	linux-mips@linux-mips.org
Subject: Assembly macro with parameters
Content-Type: text/plain; charset=ISO-8859-15; format=flowed
Content-Transfer-Encoding: 7bit
Return-Path: <fabrizio@fazzino.it>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 7635
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: fabrizio@fazzino.it
Precedence: bulk
X-list: linux-mips
Content-Length: 1149
Lines: 41

Hi all,
I'm working to an hardware extension of the MIPS32 instruction set
and I need to convert my new instruction into an existing opcode
to make it possible for the normal GCC to correctly compile the code.

Just to be clear, to obtain my new FZMIN instruction like

	FZMIN $rd, $rs, $rt

I have to convert it into

	LWC1 $rt, rd<<11 ($rs)

that is an existing (in some cases unused) opcode.

I'm currently using hardcoded values for the parameters, so
fzmin(10,8,9) will be transformed into
	asm("lwc1 $9, 10<<11($8)" : : : "$10");

It works, but I need a way to set the values of the parameters
at runtime; so I've tried the following macro:

	#define fzmin(rd, rs, rt) asm("lwc1 $rt, rd<<11($rs)");

As you can imagine I'm not an expert of MIPS Assembly macros:
what I've written does NOT work since the values of rd,rs,rt
are NOT substituted inside the asm string.

Is there any way to do what I need? I would appreciate your
help very much.

Cheers,
	Fabrizio


-- 
============================================
    Fabrizio Fazzino - fabrizio@fazzino.it
      Fazzino.IT - http://www.fazzino.it
============================================


From drow@nevyn.them.org Thu Apr  7 18:54:34 2005
Received: with ECARTIS (v1.0.0; list linux-mips); Thu, 07 Apr 2005 18:54:53 +0100 (BST)
Received: from nevyn.them.org ([IPv6:::ffff:66.93.172.17]:44948 "EHLO
	nevyn.them.org") by linux-mips.org with ESMTP id <S8225281AbVDGRyB>;
	Thu, 7 Apr 2005 18:54:01 +0100
Received: from drow by nevyn.them.org with local (Exim 4.50 #1 (Debian))
	id 1DJbCY-0004Gi-NX; Thu, 07 Apr 2005 13:53:58 -0400
Date:	Thu, 7 Apr 2005 13:53:58 -0400
From:	Daniel Jacobowitz <dan@debian.org>
To:	Brian Kuschak <bkuschak@yahoo.com>
Cc:	linux-mips@linux-mips.org
Subject: Re: gdb backtrace with core files
Message-ID: <20050407175358.GA16385@nevyn.them.org>
References: <20050407174454.77209.qmail@web40909.mail.yahoo.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <20050407174454.77209.qmail@web40909.mail.yahoo.com>
User-Agent: Mutt/1.5.8i
Return-Path: <drow@nevyn.them.org>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 7636
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: dan@debian.org
Precedence: bulk
X-list: linux-mips
Content-Length: 444
Lines: 13

On Thu, Apr 07, 2005 at 10:44:54AM -0700, Brian Kuschak wrote:
> Is anyone succesfully using gdb for mipsel to debug
> core dumps?  If so, can you share your secrets for
> success?  I tried various recent versions (6.3,
> 6.1.1), but backtrace never works right, even though
> the stack pointer appears to be valid.  gdb-5.3
> partially works, but not completely.  

Give the CVS version a try, please.

-- 
Daniel Jacobowitz
CodeSourcery, LLC

From greg.weeks@timesys.com Thu Apr  7 18:58:03 2005
Received: with ECARTIS (v1.0.0; list linux-mips); Thu, 07 Apr 2005 18:58:18 +0100 (BST)
Received: from mail.timesys.com ([IPv6:::ffff:65.117.135.102]:36563 "EHLO
	exchange.timesys.com") by linux-mips.org with ESMTP
	id <S8225281AbVDGR6D>; Thu, 7 Apr 2005 18:58:03 +0100
Received: from [192.168.2.27] ([192.168.2.27]) by exchange.timesys.com with Microsoft SMTPSVC(5.0.2195.6713);
	 Thu, 7 Apr 2005 13:53:51 -0400
Message-ID: <425574A8.4030605@timesys.com>
Date:	Thu, 07 Apr 2005 13:58:00 -0400
From:	Greg Weeks <greg.weeks@timesys.com>
User-Agent: Mozilla Thunderbird 1.0 (X11/20041206)
X-Accept-Language: en-us, en
MIME-Version: 1.0
To:	Brian Kuschak <bkuschak@yahoo.com>
CC:	linux-mips@linux-mips.org
Subject: Re: gdb backtrace with core files
References: <20050407174454.77209.qmail@web40909.mail.yahoo.com>
In-Reply-To: <20050407174454.77209.qmail@web40909.mail.yahoo.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-OriginalArrivalTime: 07 Apr 2005 17:53:51.0093 (UTC) FILETIME=[C1B71250:01C53B9A]
Return-Path: <greg.weeks@timesys.com>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 7637
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: greg.weeks@timesys.com
Precedence: bulk
X-list: linux-mips
Content-Length: 2138
Lines: 56

Brian Kuschak wrote:

>Is anyone succesfully using gdb for mipsel to debug
>core dumps?  If so, can you share your secrets for
>success?  I tried various recent versions (6.3,
>6.1.1), but backtrace never works right, even though
>the stack pointer appears to be valid.  gdb-5.3
>partially works, but not completely.  
>
>Forcing gdb to use a specific stack pointer and PC
>(frame <sp> <pc>) doesn't seem to help either.  
>
>Using linux 2.4.25 and gcc 3.3.3.
>
>  
>
It appears to work for me. My gdb has a ton of patches from Amit Kale 
though. The kernel is the latest malta with a couple of patches that 
shouldn't affect gdb.

-bash-2.05b# gdb
GNU gdb TimeSys Linux (6.2.1-1rh)
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain 
conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "mipsel-linux".
(gdb) file gdb_core_tester
Reading symbols from 
/root/TestWare/TTS_2.4.2/command/gdb_man/gdb_core_tester...done.
Using host libthread_db library "/lib/libthread_db.so.1".
(gdb) core-file core.2045
Core was generated by `./gdb_core_tester'.
Program terminated with signal 11, Segmentation fault.
Reading symbols from /usr/lib/libgcc_s.so.1...done.
Loaded symbols for /usr/lib/libgcc_s.so.1
Reading symbols from /lib/libc.so.6...done.
Loaded symbols for /lib/libc.so.6
Reading symbols from /lib/ld.so.1...done.
Loaded symbols for /lib/ld.so.1
#0  0x00400f48 in add_node (rootptr=0x1000105c, nodeval=193)
    at create_core.c:75
75              if(node_ptr->value.value >= nodeval) {
(gdb) bt
#0  0x00400f48 in add_node (rootptr=0x1000105c, nodeval=193)
    at create_core.c:75
#1  0x00400fcc in add_node (rootptr=0x10001048, nodeval=193)
    at create_core.c:81
#2  0x00400f74 in add_node (rootptr=0x10000140, nodeval=193)
    at create_core.c:76
#3  0x00400df8 in create_tree (rootptr=0x10000140) at create_core.c:38
#4  0x00400b4c in main (argc=1, argv=0x7f931b44) at main.c:25

Greg Weeks

From bkuschak@yahoo.com Thu Apr  7 19:23:19 2005
Received: with ECARTIS (v1.0.0; list linux-mips); Thu, 07 Apr 2005 19:23:34 +0100 (BST)
Received: from web40910.mail.yahoo.com ([IPv6:::ffff:66.218.78.207]:34351 "HELO
	web40910.mail.yahoo.com") by linux-mips.org with SMTP
	id <S8225281AbVDGSXT>; Thu, 7 Apr 2005 19:23:19 +0100
Received: (qmail 25260 invoked by uid 60001); 7 Apr 2005 18:23:10 -0000
Comment: DomainKeys? See http://antispam.yahoo.com/domainkeys
DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws;
  s=s1024; d=yahoo.com;
  b=HhF0yKMdhGLroA3NvgUkMZZkOXFMfKGSaiTgJZOe8QYKS3UVXg3NSBEYOvQEwzlRqQukjF0i2rtaZoTC4VU3sbxCMh6Wegjn9ahO0rUXMA7SLc9x5+UyQZMWETcGpKzZv4+bUD7uXv7cLDxHehcSqKsqr3zM2d8mjYtxZyF2wbg=  ;
Message-ID: <20050407182310.25258.qmail@web40910.mail.yahoo.com>
Received: from [65.205.244.66] by web40910.mail.yahoo.com via HTTP; Thu, 07 Apr 2005 11:23:10 PDT
Date:	Thu, 7 Apr 2005 11:23:10 -0700 (PDT)
From:	Brian Kuschak <bkuschak@yahoo.com>
Subject: Re: gdb backtrace with core files
To:	Daniel Jacobowitz <dan@debian.org>
Cc:	linux-mips@linux-mips.org
In-Reply-To: 6667
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Return-Path: <bkuschak@yahoo.com>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 7638
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: bkuschak@yahoo.com
Precedence: bulk
X-list: linux-mips
Content-Length: 2381
Lines: 87

No luck with latest CVS version (GNU gdb
6.3.0.20050407-cvs):

(gdb) bt
warning: GDB can't find the start of the function at
0x658.
 
    GDB is unable to find the start of the function at
0x658
and thus can't determine the size of that function's
stack frame.
This means that GDB may be unable to access that stack
frame, or
the frames below it.
    This problem is most likely caused by an invalid
program counter or
stack pointer.
    However, if you think GDB should simply search
farther back
from 0x658 for code which looks like the beginning of
a
function, you can increase the range of the search
using the `set
heuristic-fence-post' command.
warning: GDB can't find the start of the function at
0x658.
Previous frame identical to this frame (corrupt
stack?)
(gdb) t
[Current thread is 1 (process 362)]
(gdb) bt
#0  0x00000658 in ?? ()
#1  0x00000658 in ?? ()
(gdb) info registers
          zero       at       v0       v1       a0    
  a1       a2       a3
 R0   00000000 2ab01970 00000000 00000338 00000000
00000000 00000000 00000db0
            t0       t1       t2       t3       t4    
  t5       t6       t7
 R8   0dafd6e5 00000001 2abccfd4 2abc8034 00000001
2aac2948 00000001 2abe0ce4
            s0       s1       s2       s3       s4    
  s5       s6       s7
 R16  00400f70 7fff7e74 00400ed0 00000001 00400c70
00000000 10010f80 00000000
            t8       t9       k0       k1       gp    
  sp       s8       ra
 R24  00000263 2ad2c788 2af318b5 00000000 2af8dab0
7fff7bf0 7fff7bf0 2abe0ce4
            sr       lo       hi      bad    cause    
  pc
      00800008 00108413 0001b4e9 800649b8 2ad2c7c8
00000658
           fsr      fir
      00000000 00000000
(gdb)

Regards,
Brian

--- Daniel Jacobowitz <dan@debian.org> wrote:
> On Thu, Apr 07, 2005 at 10:44:54AM -0700, Brian
> Kuschak wrote:
> > Is anyone succesfully using gdb for mipsel to
> debug
> > core dumps?  If so, can you share your secrets for
> > success?  I tried various recent versions (6.3,
> > 6.1.1), but backtrace never works right, even
> though
> > the stack pointer appears to be valid.  gdb-5.3
> > partially works, but not completely.  
> 
> Give the CVS version a try, please.
> 
> -- 
> Daniel Jacobowitz
> CodeSourcery, LLC
> 
> 


		
__________________________________ 
Do you Yahoo!? 
Read only the mail you want - Yahoo! Mail SpamGuard. 
http://promotions.yahoo.com/new_mail 

From ralf@linux-mips.org Thu Apr  7 19:25:57 2005
Received: with ECARTIS (v1.0.0; list linux-mips); Thu, 07 Apr 2005 19:26:11 +0100 (BST)
Received: from extgw-uk.mips.com ([IPv6:::ffff:62.254.210.129]:63507 "EHLO
	mail.linux-mips.net") by linux-mips.org with ESMTP
	id <S8225281AbVDGSZ5>; Thu, 7 Apr 2005 19:25:57 +0100
Received: from dea.linux-mips.net (localhost.localdomain [127.0.0.1])
	by mail.linux-mips.net (8.13.1/8.13.1) with ESMTP id j37IPnxN025752;
	Thu, 7 Apr 2005 19:25:49 +0100
Received: (from ralf@localhost)
	by dea.linux-mips.net (8.13.1/8.13.1/Submit) id j37IPnlI025751;
	Thu, 7 Apr 2005 19:25:49 +0100
Date:	Thu, 7 Apr 2005 19:25:49 +0100
From:	Ralf Baechle <ralf@linux-mips.org>
To:	Fabrizio Fazzino <fabrizio@fazzino.it>
Cc:	linux-mips@linux-mips.org
Subject: Re: Assembly macro with parameters
Message-ID: <20050407182549.GA24235@linux-mips.org>
References: <425573AD.9010702@fazzino.it>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <425573AD.9010702@fazzino.it>
User-Agent: Mutt/1.4.1i
Return-Path: <ralf@linux-mips.org>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 7639
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: ralf@linux-mips.org
Precedence: bulk
X-list: linux-mips
Content-Length: 1365
Lines: 41

On Thu, Apr 07, 2005 at 07:53:49PM +0200, Fabrizio Fazzino wrote:

> Hi all,
> I'm working to an hardware extension of the MIPS32 instruction set
> and I need to convert my new instruction into an existing opcode
> to make it possible for the normal GCC to correctly compile the code.
> 
> Just to be clear, to obtain my new FZMIN instruction like
> 
> 	FZMIN $rd, $rs, $rt
> 
> I have to convert it into
> 
> 	LWC1 $rt, rd<<11 ($rs)
> 
> that is an existing (in some cases unused) opcode.
> 
> I'm currently using hardcoded values for the parameters, so
> fzmin(10,8,9) will be transformed into
> 	asm("lwc1 $9, 10<<11($8)" : : : "$10");
> 
> It works, but I need a way to set the values of the parameters
> at runtime; so I've tried the following macro:
> 
> 	#define fzmin(rd, rs, rt) asm("lwc1 $rt, rd<<11($rs)");

Which will leave the assembler entirely unimpressed ;-)

> As you can imagine I'm not an expert of MIPS Assembly macros:
> what I've written does NOT work since the values of rd,rs,rt
> are NOT substituted inside the asm string.
> 
> Is there any way to do what I need? I would appreciate your
> help very much.

Unless you only have a few instructions and are going for a quick hack
I really suggest to add proper support for these instructions to binutils.
Having working support in as, gdb, objdump will make your life so much
easier.

  Ralf

From drow@nevyn.them.org Thu Apr  7 19:27:19 2005
Received: with ECARTIS (v1.0.0; list linux-mips); Thu, 07 Apr 2005 19:27:36 +0100 (BST)
Received: from nevyn.them.org ([IPv6:::ffff:66.93.172.17]:34212 "EHLO
	nevyn.them.org") by linux-mips.org with ESMTP id <S8225281AbVDGS1T>;
	Thu, 7 Apr 2005 19:27:19 +0100
Received: from drow by nevyn.them.org with local (Exim 4.50 #1 (Debian))
	id 1DJbin-0004cu-8k; Thu, 07 Apr 2005 14:27:17 -0400
Date:	Thu, 7 Apr 2005 14:27:17 -0400
From:	Daniel Jacobowitz <dan@debian.org>
To:	Brian Kuschak <bkuschak@yahoo.com>
Cc:	linux-mips@linux-mips.org
Subject: Re: gdb backtrace with core files
Message-ID: <20050407182717.GA17686@nevyn.them.org>
References: <20050407182310.25258.qmail@web40910.mail.yahoo.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <20050407182310.25258.qmail@web40910.mail.yahoo.com>
User-Agent: Mutt/1.5.8i
Return-Path: <drow@nevyn.them.org>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 7640
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: dan@debian.org
Precedence: bulk
X-list: linux-mips
Content-Length: 1430
Lines: 45

On Thu, Apr 07, 2005 at 11:23:10AM -0700, Brian Kuschak wrote:
> No luck with latest CVS version (GNU gdb
> 6.3.0.20050407-cvs):

That looks like a 6.3 branch snapshot; I meant HEAD.

> (gdb) t
> [Current thread is 1 (process 362)]
> (gdb) bt
> #0  0x00000658 in ?? ()
> #1  0x00000658 in ?? ()
> (gdb) info registers
>           zero       at       v0       v1       a0    
>   a1       a2       a3
>  R0   00000000 2ab01970 00000000 00000338 00000000
> 00000000 00000000 00000db0
>             t0       t1       t2       t3       t4    
>   t5       t6       t7
>  R8   0dafd6e5 00000001 2abccfd4 2abc8034 00000001
> 2aac2948 00000001 2abe0ce4
>             s0       s1       s2       s3       s4    
>   s5       s6       s7
>  R16  00400f70 7fff7e74 00400ed0 00000001 00400c70
> 00000000 10010f80 00000000
>             t8       t9       k0       k1       gp    
>   sp       s8       ra
>  R24  00000263 2ad2c788 2af318b5 00000000 2af8dab0
> 7fff7bf0 7fff7bf0 2abe0ce4
>             sr       lo       hi      bad    cause    
>   pc
>       00800008 00108413 0001b4e9 800649b8 2ad2c7c8
> 00000658
>            fsr      fir
>       00000000 00000000
> (gdb)

Did your application really jump to 0x658 before it crashed?  Did it
really get a value in the shared library / mmap region into the cause
register?  Looks like your GDB and kernel don't agree on what a core
file looks like.


-- 
Daniel Jacobowitz
CodeSourcery, LLC

From bkuschak@yahoo.com Thu Apr  7 20:03:35 2005
Received: with ECARTIS (v1.0.0; list linux-mips); Thu, 07 Apr 2005 20:03:50 +0100 (BST)
Received: from web40905.mail.yahoo.com ([IPv6:::ffff:66.218.78.202]:22028 "HELO
	web40905.mail.yahoo.com") by linux-mips.org with SMTP
	id <S8225305AbVDGTDf>; Thu, 7 Apr 2005 20:03:35 +0100
Received: (qmail 21694 invoked by uid 60001); 7 Apr 2005 19:03:27 -0000
Comment: DomainKeys? See http://antispam.yahoo.com/domainkeys
DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws;
  s=s1024; d=yahoo.com;
  b=a0LxqSVcIxSjTacrbu528GI8Smc6vxUU5Z4v1end/4D8i3ongWZvgVxfpYqnipMM0uSG9B+QWhfKMaTyADeISLnFmCkR1nC7d4PK5HnGq2j8mCKQ8HhbqyuVo/uTS8SiqvFGy3TxNmoFavG8eSv74CtSMBt1FE2Rwgfm50vfMuU=  ;
Message-ID: <20050407190327.21692.qmail@web40905.mail.yahoo.com>
Received: from [65.205.244.66] by web40905.mail.yahoo.com via HTTP; Thu, 07 Apr 2005 12:03:27 PDT
Date:	Thu, 7 Apr 2005 12:03:27 -0700 (PDT)
From:	Brian Kuschak <bkuschak@yahoo.com>
Subject: Re: gdb backtrace with core files
To:	Greg Weeks <greg.weeks@timesys.com>
Cc:	linux-mips@linux-mips.org
In-Reply-To: 6667
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Return-Path: <bkuschak@yahoo.com>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 7641
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: bkuschak@yahoo.com
Precedence: bulk
X-list: linux-mips
Content-Length: 2641
Lines: 90

Greg,

Is your GDB hosted on MIPS or another machine?  Are
those patches freely available?  If so, can you
provide a link?  Google seems to find mostly kgdb
patches - are these what you used?

Brian

--- Greg Weeks <greg.weeks@timesys.com> wrote:
> Brian Kuschak wrote:
> 
> >Is anyone succesfully using gdb for mipsel to debug
> >core dumps?  If so, can you share your secrets for
> >success?  I tried various recent versions (6.3,
> >6.1.1), but backtrace never works right, even
> though
> >the stack pointer appears to be valid.  gdb-5.3
> >partially works, but not completely.  
> >
> >Forcing gdb to use a specific stack pointer and PC
> >(frame <sp> <pc>) doesn't seem to help either.  
> >
> >Using linux 2.4.25 and gcc 3.3.3.
> >
> >  
> >
> It appears to work for me. My gdb has a ton of
> patches from Amit Kale 
> though. The kernel is the latest malta with a couple
> of patches that 
> shouldn't affect gdb.
> 
> -bash-2.05b# gdb
> GNU gdb TimeSys Linux (6.2.1-1rh)
> Copyright 2004 Free Software Foundation, Inc.
> GDB is free software, covered by the GNU General
> Public License, and you are
> welcome to change it and/or distribute copies of it
> under certain 
> conditions.
> Type "show copying" to see the conditions.
> There is absolutely no warranty for GDB.  Type "show
> warranty" for details.
> This GDB was configured as "mipsel-linux".
> (gdb) file gdb_core_tester
> Reading symbols from 
>
/root/TestWare/TTS_2.4.2/command/gdb_man/gdb_core_tester...done.
> Using host libthread_db library
> "/lib/libthread_db.so.1".
> (gdb) core-file core.2045
> Core was generated by `./gdb_core_tester'.
> Program terminated with signal 11, Segmentation
> fault.
> Reading symbols from /usr/lib/libgcc_s.so.1...done.
> Loaded symbols for /usr/lib/libgcc_s.so.1
> Reading symbols from /lib/libc.so.6...done.
> Loaded symbols for /lib/libc.so.6
> Reading symbols from /lib/ld.so.1...done.
> Loaded symbols for /lib/ld.so.1
> #0  0x00400f48 in add_node (rootptr=0x1000105c,
> nodeval=193)
>     at create_core.c:75
> 75              if(node_ptr->value.value >= nodeval)
> {
> (gdb) bt
> #0  0x00400f48 in add_node (rootptr=0x1000105c,
> nodeval=193)
>     at create_core.c:75
> #1  0x00400fcc in add_node (rootptr=0x10001048,
> nodeval=193)
>     at create_core.c:81
> #2  0x00400f74 in add_node (rootptr=0x10000140,
> nodeval=193)
>     at create_core.c:76
> #3  0x00400df8 in create_tree (rootptr=0x10000140)
> at create_core.c:38
> #4  0x00400b4c in main (argc=1, argv=0x7f931b44) at
> main.c:25
> 
> Greg Weeks
> 


		
__________________________________ 
Do you Yahoo!? 
Make Yahoo! your home page 
http://www.yahoo.com/r/hs

From greg.weeks@timesys.com Thu Apr  7 20:08:20 2005
Received: with ECARTIS (v1.0.0; list linux-mips); Thu, 07 Apr 2005 20:08:35 +0100 (BST)
Received: from mail.timesys.com ([IPv6:::ffff:65.117.135.102]:21376 "EHLO
	exchange.timesys.com") by linux-mips.org with ESMTP
	id <S8225305AbVDGTIU>; Thu, 7 Apr 2005 20:08:20 +0100
Received: from [192.168.2.27] ([192.168.2.27]) by exchange.timesys.com with Microsoft SMTPSVC(5.0.2195.6713);
	 Thu, 7 Apr 2005 15:04:08 -0400
Message-ID: <42558523.30404@timesys.com>
Date:	Thu, 07 Apr 2005 15:08:19 -0400
From:	Greg Weeks <greg.weeks@timesys.com>
User-Agent: Mozilla Thunderbird 1.0 (X11/20041206)
X-Accept-Language: en-us, en
MIME-Version: 1.0
To:	Brian Kuschak <bkuschak@yahoo.com>
CC:	linux-mips@linux-mips.org
Subject: Re: gdb backtrace with core files
References: <20050407190327.21692.qmail@web40905.mail.yahoo.com>
In-Reply-To: <20050407190327.21692.qmail@web40905.mail.yahoo.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-OriginalArrivalTime: 07 Apr 2005 19:04:08.0953 (UTC) FILETIME=[93C16E90:01C53BA4]
Return-Path: <greg.weeks@timesys.com>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 7642
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: greg.weeks@timesys.com
Precedence: bulk
X-list: linux-mips
Content-Length: 463
Lines: 18

Brian Kuschak wrote:

>Greg,
>
>Is your GDB hosted on MIPS or another machine?  Are
>those patches freely available?  If so, can you
>provide a link?  Google seems to find mostly kgdb
>patches - are these what you used?
>
>  
>
I have an i386 hosted gdb and a mips native gdb. The backtrace test I 
did was for the native gdb.

I'm not sure which patches are available. I'll check. I'm in the process 
of working up our first BSP with this toolchain.

Greg Weeks

From pratikgpatel@gmail.com Thu Apr  7 20:30:33 2005
Received: with ECARTIS (v1.0.0; list linux-mips); Thu, 07 Apr 2005 20:30:48 +0100 (BST)
Received: from wproxy.gmail.com ([IPv6:::ffff:64.233.184.199]:7948 "EHLO
	wproxy.gmail.com") by linux-mips.org with ESMTP id <S8224902AbVDGTad>;
	Thu, 7 Apr 2005 20:30:33 +0100
Received: by wproxy.gmail.com with SMTP id 36so870050wra
        for <linux-mips@linux-mips.org>; Thu, 07 Apr 2005 12:30:26 -0700 (PDT)
DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws;
        s=beta; d=gmail.com;
        h=received:message-id:date:from:reply-to:to:subject:mime-version:content-type:content-transfer-encoding;
        b=PCCzryLb6DN8o4BeCW3gGFmjTm4ln7PuvX9BSN1sVlCNn5PW3OSgJNmHmCTFNpR5X3b49zR2Qrx3jt9LxgyaDxvCCLZcrgITbNUQJbyR3PTCDgLfREu0a3fhBB1C2r6sZ0tuyuLuTmStVpHoKJMnJPtklgt3par+s0O8WyviZzY=
Received: by 10.54.25.60 with SMTP id 60mr1209344wry;
        Thu, 07 Apr 2005 12:30:26 -0700 (PDT)
Received: by 10.54.53.56 with HTTP; Thu, 7 Apr 2005 12:30:26 -0700 (PDT)
Message-ID: <fda764b0504071230516cde06@mail.gmail.com>
Date:	Thu, 7 Apr 2005 12:30:26 -0700
From:	Pratik Patel <pratikgpatel@gmail.com>
Reply-To: Pratik Patel <pratikgpatel@gmail.com>
To:	linux-mips@linux-mips.org
Subject: need libpcap.a for mipsel platform
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Return-Path: <pratikgpatel@gmail.com>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 7643
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: pratikgpatel@gmail.com
Precedence: bulk
X-list: linux-mips
Content-Length: 335
Lines: 14

Hi,

I wanted the libpcap.a file compiled for the MIPSEL flatform. I am
working on Linksys WRT54GS router and I have problems compiling
libpcap for target platform. I tried many different ways but no
success!

If anyone has the pre-compiled libpcap.a file for MIPSEL platform,
please mail it to me.

Thanks in advance!

Cheers,
Pratik

From greg.weeks@timesys.com Thu Apr  7 20:38:08 2005
Received: with ECARTIS (v1.0.0; list linux-mips); Thu, 07 Apr 2005 20:38:23 +0100 (BST)
Received: from mail.timesys.com ([IPv6:::ffff:65.117.135.102]:39572 "EHLO
	exchange.timesys.com") by linux-mips.org with ESMTP
	id <S8224902AbVDGTiI>; Thu, 7 Apr 2005 20:38:08 +0100
Received: from [192.168.2.27] ([192.168.2.27]) by exchange.timesys.com with Microsoft SMTPSVC(5.0.2195.6713);
	 Thu, 7 Apr 2005 15:33:56 -0400
Message-ID: <42558C1E.4020906@timesys.com>
Date:	Thu, 07 Apr 2005 15:38:06 -0400
From:	Greg Weeks <greg.weeks@timesys.com>
User-Agent: Mozilla Thunderbird 1.0 (X11/20041206)
X-Accept-Language: en-us, en
MIME-Version: 1.0
To:	Brian Kuschak <bkuschak@yahoo.com>
CC:	linux-mips@linux-mips.org
Subject: Re: gdb backtrace with core files
References: <20050407190327.21692.qmail@web40905.mail.yahoo.com>
In-Reply-To: <20050407190327.21692.qmail@web40905.mail.yahoo.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-OriginalArrivalTime: 07 Apr 2005 19:33:56.0187 (UTC) FILETIME=[BD07B2B0:01C53BA8]
Return-Path: <greg.weeks@timesys.com>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 7644
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: greg.weeks@timesys.com
Precedence: bulk
X-list: linux-mips
Content-Length: 475
Lines: 17

Brian Kuschak wrote:

>Greg,
>
>Is your GDB hosted on MIPS or another machine?  Are
>those patches freely available?  If so, can you
>  
>
OK, I checked.

Most of what's in our patches should be in gdb HEAD. We're currently at 
6.2.1 and don't want to take the time to move to head. If you're 
interested and no one objects I can post them to the mips list. There 
are 37 patches totaling 285K. Not all are mips related and gdb isn't 
totally working for me yet.

Greg Weeks

From ralf@linux-mips.org Thu Apr  7 20:41:19 2005
Received: with ECARTIS (v1.0.0; list linux-mips); Thu, 07 Apr 2005 20:41:34 +0100 (BST)
Received: from extgw-uk.mips.com ([IPv6:::ffff:62.254.210.129]:17938 "EHLO
	mail.linux-mips.net") by linux-mips.org with ESMTP
	id <S8224902AbVDGTlT>; Thu, 7 Apr 2005 20:41:19 +0100
Received: from dea.linux-mips.net (localhost.localdomain [127.0.0.1])
	by mail.linux-mips.net (8.13.1/8.13.1) with ESMTP id j37JfADt028501;
	Thu, 7 Apr 2005 20:41:10 +0100
Received: (from ralf@localhost)
	by dea.linux-mips.net (8.13.1/8.13.1/Submit) id j37Jf9aO028500;
	Thu, 7 Apr 2005 20:41:09 +0100
Date:	Thu, 7 Apr 2005 20:41:09 +0100
From:	Ralf Baechle <ralf@linux-mips.org>
To:	Pratik Patel <pratikgpatel@gmail.com>
Cc:	linux-mips@linux-mips.org
Subject: Re: need libpcap.a for mipsel platform
Message-ID: <20050407194109.GA27344@linux-mips.org>
References: <fda764b0504071230516cde06@mail.gmail.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <fda764b0504071230516cde06@mail.gmail.com>
User-Agent: Mutt/1.4.1i
Return-Path: <ralf@linux-mips.org>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 7645
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: ralf@linux-mips.org
Precedence: bulk
X-list: linux-mips
Content-Length: 574
Lines: 16

On Thu, Apr 07, 2005 at 12:30:26PM -0700, Pratik Patel wrote:

> I wanted the libpcap.a file compiled for the MIPSEL flatform. I am
> working on Linksys WRT54GS router and I have problems compiling
> libpcap for target platform. I tried many different ways but no
> success!
> 
> If anyone has the pre-compiled libpcap.a file for MIPSEL platform,
> please mail it to me.

I suggest you get that from your favorite Linux distribution.

As a guess on a small system like the WRT54G you're using uclibc and I'd
expect some problem when building libpcap against uclibc.

  Ralf

From tom@voda.cz Thu Apr  7 20:52:54 2005
Received: with ECARTIS (v1.0.0; list linux-mips); Thu, 07 Apr 2005 20:53:09 +0100 (BST)
Received: from gw.voda.cz ([IPv6:::ffff:212.24.154.90]:15824 "EHLO
	smtp.voda.cz") by linux-mips.org with ESMTP id <S8224902AbVDGTwy>;
	Thu, 7 Apr 2005 20:52:54 +0100
Received: from localhost (localhost [127.0.0.1])
	by smtp.voda.cz (Postfix) with ESMTP id 655C51380B;
	Thu,  7 Apr 2005 21:52:44 +0200 (CEST)
Received: from smtp.voda.cz ([127.0.0.1])
 by localhost (gw [127.0.0.1]) (amavisd-new, port 10024) with ESMTP
 id 09982-01; Thu,  7 Apr 2005 21:52:29 +0200 (CEST)
Received: from [10.1.1.77] (unknown [10.1.1.77])
	by smtp.voda.cz (Postfix) with ESMTP id DDECC14729;
	Thu,  7 Apr 2005 21:52:24 +0200 (CEST)
Message-ID: <42558F78.7060407@voda.cz>
Date:	Thu, 07 Apr 2005 21:52:24 +0200
From:	=?ISO-8859-1?Q?Tom_Vr=E1na?= <tom@voda.cz>
Organization: VODA IT consulting
User-Agent: Mozilla Thunderbird 0.6 (X11/20040502)
X-Accept-Language: en-us, en
MIME-Version: 1.0
To:	Ralf Baechle <ralf@linux-mips.org>
Cc:	Pratik Patel <pratikgpatel@gmail.com>, linux-mips@linux-mips.org
Subject: Re: need libpcap.a for mipsel platform
References: <fda764b0504071230516cde06@mail.gmail.com> <20050407194109.GA27344@linux-mips.org>
In-Reply-To: <20050407194109.GA27344@linux-mips.org>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Virus-Scanned: by amavisd-new at voda.cz
Return-Path: <tom@voda.cz>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 7646
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: tom@voda.cz
Precedence: bulk
X-list: linux-mips
Content-Length: 775
Lines: 34

Ralf Baechle wrote:

> <>On Thu, Apr 07, 2005 at 12:30:26PM -0700, Pratik Patel wrote:
>
>
> If anyone has the pre-compiled libpcap.a file for MIPSEL platform,
> please mail it to me.
>
>
>I suggest you get that from your favorite Linux distribution.
>
>As a guess on a small system like the WRT54G you're using uclibc and I'd
>expect some problem when building libpcap against uclibc.
>
>  Ralf
>  
>
AFAIK there is no major problem with compiling recent libpcap using 
uclibc for the mipsel platform. Just get you favorite cross-compiler, 
sources and you're done...

       Tom

-- 
 Tomas Vrana  <tom@voda.cz>
 --------------------------
 VODA IT consulting, Borkovany 48, 691 75
 http://www.voda.cz/
 phone: +420 519 419 416 mobile: +420 603 469 305 UIN: 105142752






From bkuschak@yahoo.com Thu Apr  7 21:43:38 2005
Received: with ECARTIS (v1.0.0; list linux-mips); Thu, 07 Apr 2005 21:43:54 +0100 (BST)
Received: from web40914.mail.yahoo.com ([IPv6:::ffff:66.218.78.211]:23680 "HELO
	web40914.mail.yahoo.com") by linux-mips.org with SMTP
	id <S8224920AbVDGUni>; Thu, 7 Apr 2005 21:43:38 +0100
Received: (qmail 51805 invoked by uid 60001); 7 Apr 2005 20:43:29 -0000
Comment: DomainKeys? See http://antispam.yahoo.com/domainkeys
DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws;
  s=s1024; d=yahoo.com;
  b=q6JxWqdT3s6sZ1pKsID379kO74F+SYB+HjcYz34S/IZq7z/pDIDdKVovSXTcLg+SMsXRtIJ+KHPlpu4zQyY6UBNItGxsuUNNd4V3sSPLCkD5cF8VcIN5u+4NiSLX2e96a8OQQ78+2ny3Bh0JVkD4YHqd3NZAWwSiN7FB0MX2XuQ=  ;
Message-ID: <20050407204329.51803.qmail@web40914.mail.yahoo.com>
Received: from [65.205.244.66] by web40914.mail.yahoo.com via HTTP; Thu, 07 Apr 2005 13:43:29 PDT
Date:	Thu, 7 Apr 2005 13:43:29 -0700 (PDT)
From:	Brian Kuschak <bkuschak@yahoo.com>
Subject: Re: gdb backtrace with core files
To:	Daniel Jacobowitz <dan@debian.org>, linux-mips@linux-mips.org
In-Reply-To: 6667
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Return-Path: <bkuschak@yahoo.com>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 7647
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: bkuschak@yahoo.com
Precedence: bulk
X-list: linux-mips
Content-Length: 980
Lines: 37


> > OK, tried again with version (GNU gdb
> > 6.3.50.20050407-cvs.)  Same result.
> > 
> > I'm running gdb on x86 host, debugging a binary
> for a
> > MIPS target.  I configured gdb as
> > ./configure --target mipsel-linux-gnu
> --enable-shared
> > --enable-threads 
> > 
> > Perhaps gdb isn't getting the right kernel headers
> > when built?  I added the configure options
> > --includedir and --oldincludedir to point to my
> > linux-mips kernel tree, but that didn't help
> either.  
> 
> It does not use the kernel headers to work out the
> layout.  Are you
> using a current kernel?  I tested core dump support
> only a couple weeks
> ago.

I'm using a 2.4.25 vendor-patched kernel from
Broadcom.  I can poke around and compare the
core-dumping code to the latest mips-linux tree to see
if anything is different.

Brian
 


		
__________________________________ 
Do you Yahoo!? 
Yahoo! Small Business - Try our new resources site!
http://smallbusiness.yahoo.com/resources/ 

From bkuschak@yahoo.com Thu Apr  7 21:45:33 2005
Received: with ECARTIS (v1.0.0; list linux-mips); Thu, 07 Apr 2005 21:45:48 +0100 (BST)
Received: from web40914.mail.yahoo.com ([IPv6:::ffff:66.218.78.211]:36992 "HELO
	web40914.mail.yahoo.com") by linux-mips.org with SMTP
	id <S8224920AbVDGUpd>; Thu, 7 Apr 2005 21:45:33 +0100
Received: (qmail 52642 invoked by uid 60001); 7 Apr 2005 20:45:26 -0000
Comment: DomainKeys? See http://antispam.yahoo.com/domainkeys
DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws;
  s=s1024; d=yahoo.com;
  b=FJT83l2dNzRMTTGCbpFbsk6nqYgCnAQsImEqSibGrev4755/3J92e2+ec0pci0CewupFpBQ9qyyKaa49DPSPEj0M/gbKIIB2gb/EnkukmcDxf3QQ+qMMvCYPn9PwtB70giHXMHlDXt91NwKMoIWqGoI9COSSSXwNY6k/u5HYuFc=  ;
Message-ID: <20050407204526.52640.qmail@web40914.mail.yahoo.com>
Received: from [65.205.244.66] by web40914.mail.yahoo.com via HTTP; Thu, 07 Apr 2005 13:45:26 PDT
Date:	Thu, 7 Apr 2005 13:45:26 -0700 (PDT)
From:	Brian Kuschak <bkuschak@yahoo.com>
Subject: Re: gdb backtrace with core files
To:	Greg Weeks <greg.weeks@timesys.com>
Cc:	linux-mips@linux-mips.org
In-Reply-To: 6667
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Return-Path: <bkuschak@yahoo.com>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 7648
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: bkuschak@yahoo.com
Precedence: bulk
X-list: linux-mips
Content-Length: 834
Lines: 36

Which kernel version are you using?  Are you getting a
complete backtrace with the x86-hosted gdb?

Thanks,
Brian

--- Greg Weeks <greg.weeks@timesys.com> wrote:
> Brian Kuschak wrote:
> 
> >Greg,
> >
> >Is your GDB hosted on MIPS or another machine?  Are
> >those patches freely available?  If so, can you
> >  
> >
> OK, I checked.
> 
> Most of what's in our patches should be in gdb HEAD.
> We're currently at 
> 6.2.1 and don't want to take the time to move to
> head. If you're 
> interested and no one objects I can post them to the
> mips list. There 
> are 37 patches totaling 285K. Not all are mips
> related and gdb isn't 
> totally working for me yet.
> 
> Greg Weeks
> 


		
__________________________________ 
Do you Yahoo!? 
Yahoo! Small Business - Try our new resources site!
http://smallbusiness.yahoo.com/resources/ 

From greg.weeks@timesys.com Fri Apr  8 12:25:29 2005
Received: with ECARTIS (v1.0.0; list linux-mips); Fri, 08 Apr 2005 12:25:45 +0100 (BST)
Received: from mail.timesys.com ([IPv6:::ffff:65.117.135.102]:62619 "EHLO
	exchange.timesys.com") by linux-mips.org with ESMTP
	id <S8225361AbVDHLZ3>; Fri, 8 Apr 2005 12:25:29 +0100
Received: from [192.168.2.27] ([192.168.2.27]) by exchange.timesys.com with Microsoft SMTPSVC(5.0.2195.6713);
	 Fri, 8 Apr 2005 07:21:13 -0400
Message-ID: <42566A25.6080208@timesys.com>
Date:	Fri, 08 Apr 2005 07:25:25 -0400
From:	Greg Weeks <greg.weeks@timesys.com>
User-Agent: Mozilla Thunderbird 1.0 (X11/20041206)
X-Accept-Language: en-us, en
MIME-Version: 1.0
To:	Brian Kuschak <bkuschak@yahoo.com>
CC:	linux-mips@linux-mips.org
Subject: Re: gdb backtrace with core files
References: <20050407204526.52640.qmail@web40914.mail.yahoo.com>
In-Reply-To: <20050407204526.52640.qmail@web40914.mail.yahoo.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-OriginalArrivalTime: 08 Apr 2005 11:21:13.0640 (UTC) FILETIME=[12CAC280:01C53C2D]
Return-Path: <greg.weeks@timesys.com>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 7649
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: greg.weeks@timesys.com
Precedence: bulk
X-list: linux-mips
Content-Length: 410
Lines: 13

Brian Kuschak wrote:

>Which kernel version are you using?  Are you getting a
>complete backtrace with the x86-hosted gdb?
>
>  
>
2.6.12-rcwhatever from the malta linux tree. I also have a 2.6.11.6 tree 
I'm playing with. I've not tried the x86 hosted gdb yet. It wouldn't 
surprise me if that one didn't work. The Timesys gdb has historically 
had problems with core dumps on the x86 hosted gdb.

Greg Weeks

From francis_moreau2000@yahoo.fr Fri Apr  8 13:59:07 2005
Received: with ECARTIS (v1.0.0; list linux-mips); Fri, 08 Apr 2005 13:59:39 +0100 (BST)
Received: from web25106.mail.ukl.yahoo.com ([IPv6:::ffff:217.12.10.54]:27986
	"HELO web25106.mail.ukl.yahoo.com") by linux-mips.org with SMTP
	id <S8225393AbVDHM7F>; Fri, 8 Apr 2005 13:59:05 +0100
Received: (qmail 26390 invoked by uid 60001); 8 Apr 2005 12:58:56 -0000
Message-ID: <20050408125856.26388.qmail@web25106.mail.ukl.yahoo.com>
Received: from [80.14.198.143] by web25106.mail.ukl.yahoo.com via HTTP; Fri, 08 Apr 2005 14:58:56 CEST
Date:	Fri, 8 Apr 2005 14:58:56 +0200 (CEST)
From:	moreau francis <francis_moreau2000@yahoo.fr>
Subject: [PATCH] Physical mem start different from 0 
To:	linux-mips@linux-mips.org
Cc:	ralf@linux-mips.org
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="0-754048015-1112965136=:26360"
Content-Transfer-Encoding: 8bit
Return-Path: <francis_moreau2000@yahoo.fr>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 7650
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: francis_moreau2000@yahoo.fr
Precedence: bulk
X-list: linux-mips
Content-Length: 1698
Lines: 49

--0-754048015-1112965136=:26360
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: 8bit
Content-Id: 
Content-Disposition: inline

Ralf,

I'm sending to you a very trivial patch.
It's related to memory start address that does not
start at 0. This can easily be handled with uses of
"pfn_to_phys" and "virt_to_phys" macros. But some
parts of the kernel don't use them, and do for
instance
"addr << PAGE_SHIFT".
The patch deals with such cases in pgtable-32.h. If
you agree with, I'll send others patches to remove
them from every places I found.

     Francis


	

	
		
__________________________________________________________________
Découvrez le nouveau Yahoo! Mail : 250 Mo d'espace de stockage pour vos mails ! 
Créez votre Yahoo! Mail sur http://fr.mail.yahoo.com/
--0-754048015-1112965136=:26360
Content-Type: text/x-patch; name="pgtable-32.h.patch"
Content-Description: pgtable-32.h.patch
Content-Disposition: inline; filename="pgtable-32.h.patch"

--- pgtable-32.h.old	2005-04-08 14:37:00.231705720 +0200
+++ pgtable-32.h	2005-04-08 14:24:24.360615592 +0200
@@ -136,8 +136,8 @@ pfn_pte(unsigned long pfn, pgprot_t prot
 #define pte_pfn(x)		((unsigned long)((x).pte >> (PAGE_SHIFT + 2)))
 #define pfn_pte(pfn, prot)	__pte(((pfn) << (PAGE_SHIFT + 2)) | pgprot_val(prot))
 #else
-#define pte_pfn(x)		((unsigned long)((x).pte >> PAGE_SHIFT))
-#define pfn_pte(pfn, prot)	__pte(((pfn) << PAGE_SHIFT) | pgprot_val(prot))
+#define pte_pfn(x)		((unsigned long)(phys_to_pfn((x).pte)))
+#define pfn_pte(pfn, prot)	__pte((pfn_to_phys(pfn) | pgprot_val(prot)))
 #endif
 #endif /* defined(CONFIG_64BIT_PHYS_ADDR) && defined(CONFIG_CPU_MIPS32) */
 

--0-754048015-1112965136=:26360--

From eckhardt@satorlaser.com Fri Apr  8 15:10:05 2005
Received: with ECARTIS (v1.0.0; list linux-mips); Fri, 08 Apr 2005 15:10:21 +0100 (BST)
Received: from moutng.kundenserver.de ([IPv6:::ffff:212.227.126.177]:57555
	"EHLO moutng.kundenserver.de") by linux-mips.org with ESMTP
	id <S8225403AbVDHOKF>; Fri, 8 Apr 2005 15:10:05 +0100
Received: from [213.39.254.66] (helo=tuxator.satorlaser-intern.com)
	by mrelayeu.kundenserver.de with ESMTP (Nemesis),
	id 0MKxQS-1DJuBO1uU0-0001bP; Fri, 08 Apr 2005 16:10:02 +0200
From:	Ulrich Eckhardt <eckhardt@satorlaser.com>
Organization: Sator Laser GmbH
To:	linux-mips@linux-mips.org
Subject: CompactFlash on PCMCIA problems
Date:	Fri, 8 Apr 2005 16:10:30 +0200
User-Agent: KMail/1.7.2
MIME-Version: 1.0
Content-Type: text/plain;
  charset="utf-8"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
Message-Id: <200504081610.32088.eckhardt@satorlaser.com>
X-Provags-ID: kundenserver.de abuse@kundenserver.de login:e35cee35a663f5c944b9750a965814ae
Return-Path: <eckhardt@satorlaser.com>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 7651
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: eckhardt@satorlaser.com
Precedence: bulk
X-list: linux-mips
Content-Length: 2155
Lines: 48

Hi!

I'm trying to code the glue to connect the vanilla ATA drivers with a CF card 
connected to an Au1100. I managed to access the CIS parts of the card but 
then the problems start: the area where I'd expect to find the ATA 
controller's registers mirrors every byte twice, just as if the address used 
was first shifted by one.

Here's a sketch of what I'm doing:

1. Setup SYS_PINFUNC so the PCMCIA interface is used
2. Setup GPIO and GPIO2, they are used for e.g. card detection and power
3. apply power to card via GPIO
4. reset card via GPIO, waiting for it to finish
5. ioremap all three PCMCIA_*_PHYS_ADDR ranges[1]
6. parse CIS in ioremapped PCMCIA_ATTR_PHYS_ADDR
7. setup CISREG_CCSR with 0x00, in particular to reset CCSR_POWER_DOWN
8. setup CISREG_COR with 0x01, configuration #1 is the contiguous memory[1] 
configuration parsed from the CIS

At this moment, I think I should be able to talk to the ATA controller via the 
first few bytes of the ioremapped PCMCIA_IO_PHYS_ADDR, but that area has this 
weird mirrored byte behaviour which I don't understand.


Another thing I don't fully understand yet is the meaning of the three memory 
areas. These are called 'IO', 'attrib' and 'mem'. The 'attrib' area contains 
the CIS and presents no problem. The 'IO' area is where I'd expect to find 
the ATA controller's registers. Now, what I don't understand is the meaning 
of the 'mem' area (PCMCIA_MEM_PHYS_ADDR). The documents I found on the web 
always referred to a 'common memory' area, but funnily they also only 
distinguished between two areas!?

Yet another thing I'm missing is the meaning of CISREG_IOBASE_* and 
CISREG_IOSIZE. When exactly and how do I have to setup those?

I'm pretty lost, I have tried everything I could think of without any success. 
I'll also send this to the PCMCIA mailinglist at sourceforge's, in case it is 
not related to MIPS but rather to PCMCIA.

greetings

Uli

[1] is a particular size required? Also, I used ioremap_nocache(), does that 
matter or should I use plain ioremap()?
[2] yes, it might be more interesting to use one of the non-contiguous modes, 
but that still doesn't solve my problems.

From greg.weeks@timesys.com Fri Apr  8 15:45:51 2005
Received: with ECARTIS (v1.0.0; list linux-mips); Fri, 08 Apr 2005 15:46:09 +0100 (BST)
Received: from mail.timesys.com ([IPv6:::ffff:65.117.135.102]:51991 "EHLO
	exchange.timesys.com") by linux-mips.org with ESMTP
	id <S8225410AbVDHOpv>; Fri, 8 Apr 2005 15:45:51 +0100
Received: from [192.168.2.27] ([192.168.2.27]) by exchange.timesys.com with Microsoft SMTPSVC(5.0.2195.6713);
	 Fri, 8 Apr 2005 10:41:36 -0400
Message-ID: <4256991C.4020601@timesys.com>
Date:	Fri, 08 Apr 2005 10:45:48 -0400
From:	Greg Weeks <greg.weeks@timesys.com>
User-Agent: Mozilla Thunderbird 1.0 (X11/20041206)
X-Accept-Language: en-us, en
MIME-Version: 1.0
To:	linux-mips@linux-mips.org
Subject: Re: another 4kc machine check.
References: <42553E49.7080004@timesys.com>
In-Reply-To: <42553E49.7080004@timesys.com>
Content-Type: multipart/mixed;
 boundary="------------010208010801020209030105"
X-OriginalArrivalTime: 08 Apr 2005 14:41:36.0593 (UTC) FILETIME=[1107CC10:01C53C49]
Return-Path: <greg.weeks@timesys.com>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 7652
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: greg.weeks@timesys.com
Precedence: bulk
X-list: linux-mips
Content-Length: 13084
Lines: 367

This is a multi-part message in MIME format.
--------------010208010801020209030105
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit

Greg Weeks wrote:

> This is the malta branch with the tlb patch from Ralf applied. The LTP 
> test:
>
>
> -bash-2.05b# shmem_test_06

This test does some mucking with shmat at fixed addresses that might not 
be correct for mips. I still wouldn't expect to see a machine check when 
it goes to free the shared memory areas. I'm going to try it on a 24K 
malta as soon as I get yamon on it and can get it booted.

Greg Weeks


--------------010208010801020209030105
Content-Type: text/x-c;
 name="shmem_test_06.c"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
 filename="shmem_test_06.c"

/*
 *
 *   Copyright (c) International Business Machines  Corp., 2001
 *
 *   This program is free software;  you can redistribute it and/or modify
 *   it under the terms of the GNU General Public License as published by
 *   the Free Software Foundation; either version 2 of the License, or
 *   (at your option) any later version.
 *
 *   This program is distributed in the hope that it will be useful,
 *   but WITHOUT ANY WARRANTY;  without even the implied warranty of
 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See
 *   the GNU General Public License for more details.
 *
 *   You should have received a copy of the GNU General Public License
 *   along with this program;  if not, write to the Free Software
 *   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 */

/*
 * Copyright (C) Bull S.A. 1996
 * Level 1,5 Years Bull Confidential and Proprietary Information
 */

/*---------------------------------------------------------------------+
|                           shmem_test_06.c                            |
| ==================================================================== |
| Title:        Segment Register 0xE                                   |
|                                                                      |
| Purpose:      simultaneous attachment of more than ten shared        |
|               memory regions to a process. Using segment registers   |
|               0x3 to 0xC and 0xE .                                   |
|                                                                      |
| Description:  Simplistic test to verify that a process can obtain    |
|               11 shared memory regions in the adress space from      |
|               0x30000000 to 0xCFFFFFFF and 0xE0000000 to 0xEFFFFFFF. |
|                                                                      |
|                                                                      |
| Algorithm:    *  from 1 up to 11                                     |
|               {                                                      |
|               o  Create a key to uniquely identify the shared segment|
|		   using ftok()	subroutine.			       |
|               o  Obtain a unique shared memory identifier with       |
|                  shmget ()                                           |
|               o  Map the shared memory segment to the current        |
|                  process with shmat ()                               |
|               o  Index through the shared memory segment             |
|               }                                                      |
|               *  from 1 up to 11                                     |
|               {                                                      |
|               o  Detach from the segment with shmdt()                |
|               o  Release the shared memory segment with shmctl ()    |
|               }                                                      |
|                                                                      |
| System calls: The following system calls are tested:                 |
|                                                                      |
|               ftok()                                                 |
|               shmget ()                                              |
|               shmat ()                                               |
|               shmdt ()                                               |
|               shmctl ()                                              |
|                                                                      |
| Usage:        shmem_test_06                                          |
|                                                                      |
| To compile:   cc -O -g  shmem_test_06.c -o shmem_test_06 -lbsd       |
|                                                                      |
| Last update:                                                         |
|                                                                      |
| Change Activity                                                      |
|                                                                      |
|   Version  Date    Name  Reason                                      |
|    0.1     010797  J.Malcles  initial version for 4.2.G              |
|                                                                      |
|                                                                      |
+---------------------------------------------------------------------*/

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <errno.h>
#include <unistd.h>
#include <sys/shm.h>

#include <sys/types.h>
#include <sys/ipc.h>

#include <sys/stat.h>
/*
off_t offsets[] = {
0x20000000,
0x30000000,
0x48000000,
0x50000000,
0x60000000,
0x70000000,
0x80000000,
0x90000000,
0xA0000000,
0xB0000000,
0xBFE00000,
};
*/
off_t offsets[] = {
0x20000000,
0x00000000,
0x48000000,
0x50000000,
0x60000000,
0x60200000,
0x60400000,
0x70200000,
0x70400000,
0x70600000,
0x70800000,
};
int offsets_cnt = sizeof (offsets) /sizeof (offsets[0]);
/* Defines
 *
 * MAX_SHMEM_SIZE: maximum shared memory segment size of 256MB 
 *
 * MAX_SHMEM_NUMBER: maximum number of simultaneous attached shared memory 
 * regions
 *
 * DEFAULT_SHMEM_SIZE: default shared memory size, unless specified with
 * -s command line option
 * 
 * SHMEM_MODE: shared memory access permissions (permit process to read
 * and write access)
 * 
 * USAGE: usage statement
 */
#define MAX_SHMEM_SIZE		256*1024*1024
#define MAX_SHMEM_NUMBER	11
#define DEFAULT_SHMEM_SIZE	1024*1024
#define	SHMEM_MODE		(SHM_R | SHM_W)
#define USAGE	"\nUsage: %s [-s shmem_size]\n\n" \
		"\t-s shmem_size  size of shared memory segment (bytes)\n" \
		"\t               (must be less than 256MB!)\n\n"

#define GOTHERE printf("got to line %d\n", __LINE__);

/*
 * Function prototypes
 *
 * parse_args (): Parse command line arguments
 * sys_error (): System error message function
 * error (): Error message function
 */
void parse_args (int, char **);
void sys_error (const char *, int);
void error (const char *, int);

/*
 * Global variables
 * 
 * shmem_size: shared memory segment size (in bytes)
 */
int shmem_size = DEFAULT_SHMEM_SIZE;


/*---------------------------------------------------------------------+
|                               main                                   |
| ==================================================================== |
|                                                                      |
|                                                                      |
| Function:  Main program  (see prolog for more details)               |
|                                                                      |
| Returns:   (0)  Successful completion                                |
|            (-1) Error occurred                                       |
|                                                                      |
+---------------------------------------------------------------------*/
int main (int argc, char **argv)
{
  off_t offset;
  int i;
  
  int shmid[MAX_SHMEM_NUMBER];	/* (Unique) Shared memory identifier */
  
  char *shmptr[MAX_SHMEM_NUMBER];	/* Shared memory segment address */
  char	*ptr;		/* Index into shared memory segment */
  
  int value = 0;	/* Value written into shared memory segment */
  
  key_t mykey[MAX_SHMEM_NUMBER];
  char * null_file = "/dev/null";
  char  proj[MAX_SHMEM_NUMBER] = {
    '3', '4', '5', '6', '7', '8', '9', 'A', 'B', 'C', 'E'
  };
  
  
  /*
   * Parse command line arguments and print out program header
   */
  parse_args (argc, argv);
  printf ("%s: IPC Shared Memory TestSuite program\n", *argv);
  
  for (i=0; i<offsets_cnt; i++) 
    {
      char tmpstr[256];
      /*
       * Create a key to uniquely identify the shared segment
       */
      
      mykey[i] = ftok(null_file,proj[i]);
      
      printf ("\n\tmykey to uniquely identify the shared memory segment 0x%x\n",mykey[i]);
      
      printf ("\n\tGet shared memory segment (%d bytes)\n", shmem_size);
      /*
       * Obtain a unique shared memory identifier with shmget ().
       */
      
      if ((long)(shmid[i]= shmget (mykey[i], shmem_size, IPC_CREAT | 0666 )) < 0)
	sys_error ("shmget failed", __LINE__);
      
      
      printf ("\n\tAttach shared memory segment to process\n");
      /*
       * Attach the shared memory segment to the process
       */
      offset = offsets[i];

      if ((long)(shmptr[i] = (char *) shmat (shmid[i], (const void*)offset, 0)) == -1)
	{
	  sprintf(tmpstr, "shmat failed - return: %p", shmptr[i]);
	  sys_error (tmpstr, __LINE__);
	}

      
      printf ("\n\tShared memory segment address : 0x%p \n",shmptr[i]);
      
      printf ("\n\tIndex through shared memory segment ...\n");
      
      /*
       * Index through the shared memory segment
       */
      
      for (ptr=shmptr[i]; ptr < (shmptr[i] + shmem_size); ptr++)
	*ptr = value++;
      
    } // for 1..11

  printf ("\n\tDetach from the segment using the shmdt subroutine\n");
  
  printf ("\n\tRelease shared memory\n");
  
  for (i=0; i<offsets_cnt; i++) 
    {
      // Detach from the segment
      
      shmdt( shmptr[i] );
      
      // Release shared memory
      
      if (shmctl (shmid[i], IPC_RMID, 0) < 0)
	sys_error ("shmctl failed", __LINE__);
      
    } // 2nd for 1..11
  /* 
   * Program completed successfully -- exit
   */
  
  printf ("\nsuccessful!\n");
  
  return (0);
  
}


/*---------------------------------------------------------------------+
|                             parse_args ()                            |
| ==================================================================== |
|                                                                      |
| Function:  Parse the command line arguments & initialize global      |
|            variables.                                                |
|                                                                      |
| Updates:   (command line options)                                    |
|                                                                      |
|            [-s] size: shared memory segment size                     |
|                                                                      |
+---------------------------------------------------------------------*/
void parse_args (int argc, char **argv)
{
  int	i;
  int	errflag = 0;
  char	*program_name = *argv;
  extern char 	*optarg;	/* Command line option */
  
  while ((i = getopt(argc, argv, "s:?")) != EOF) {
    switch (i) {
    case 's':
      shmem_size = atoi (optarg);
      break;
    case '?':
      errflag++;
      break;
    }
  }
  
  if (shmem_size < 1 || shmem_size > MAX_SHMEM_SIZE)
    errflag++;
  
  if (errflag) {
    fprintf (stderr, USAGE, program_name);
    exit (2);
  }
}


/*---------------------------------------------------------------------+
  |                             sys_error ()                             |
  | ==================================================================== |
  |                                                                      |
  | Function:  Creates system error message and calls error ()           |
  |                                                                      |
  +---------------------------------------------------------------------*/
void sys_error (const char *msg, int line)
{
  char syserr_msg [256];
  
  sprintf (syserr_msg, "%s: %s\n", msg, strerror (errno));
  error (syserr_msg, line);
}


/*---------------------------------------------------------------------+
|                               error ()                               |
| ==================================================================== |
|                                                                      |
| Function:  Prints out message and exits...                           |
|                                                                      |
+---------------------------------------------------------------------*/
void error (const char *msg, int line)
{
  fprintf (stderr, "ERROR [line: %d] %s\n", line, msg);
  exit (-1);
}

--------------010208010801020209030105--

From ralf@linux-mips.org Fri Apr  8 17:21:14 2005
Received: with ECARTIS (v1.0.0; list linux-mips); Fri, 08 Apr 2005 17:21:30 +0100 (BST)
Received: from extgw-uk.mips.com ([IPv6:::ffff:62.254.210.129]:56351 "EHLO
	bacchus.net.dhis.org") by linux-mips.org with ESMTP
	id <S8225421AbVDHQVO>; Fri, 8 Apr 2005 17:21:14 +0100
Received: from dea.linux-mips.net (localhost.localdomain [127.0.0.1])
	by bacchus.net.dhis.org (8.13.1/8.13.1) with ESMTP id j38GL8x0000401
	for <linux-mips@linux-mips.org>; Fri, 8 Apr 2005 17:21:08 +0100
Received: (from ralf@localhost)
	by dea.linux-mips.net (8.13.1/8.13.1/Submit) id j38GL8UM000400
	for linux-mips@linux-mips.org; Fri, 8 Apr 2005 17:21:08 +0100
Resent-Message-Id: <200504081621.j38GL8UM000400@dea.linux-mips.net>
Received: from dea.linux-mips.net (localhost.localdomain [127.0.0.1])
	by mail.linux-mips.org (8.13.1/8.13.1) with ESMTP id j38GDwwi032529;
	Fri, 8 Apr 2005 17:13:58 +0100
Received: (from ralf@localhost)
	by dea.linux-mips.net (8.13.1/8.13.1/Submit) id j38GDw0R032528;
	Fri, 8 Apr 2005 17:13:58 +0100
Date:	Fri, 8 Apr 2005 17:13:57 +0100
From:	Ralf Baechle <ralf@linux-mips.org>
To:	Greg Weeks <greg.weeks@timesys.com>
Cc:	linux-mips@linux-mips.org
Subject: Re: another 4kc machine check.
Message-ID: <20050408161357.GB19166@linux-mips.org>
References: <42553E49.7080004@timesys.com> <4256991C.4020601@timesys.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <4256991C.4020601@timesys.com>
User-Agent: Mutt/1.4.1i
Resent-From: ralf@linux-mips.org
Resent-Date: Fri, 8 Apr 2005 17:21:08 +0100
Resent-To: linux-mips@linux-mips.org
Return-Path: <ralf@linux-mips.org>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 7653
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: ralf@linux-mips.org
Precedence: bulk
X-list: linux-mips
Content-Length: 819
Lines: 20

On Fri, Apr 08, 2005 at 10:45:48AM -0400, Greg Weeks wrote:

> >This is the malta branch with the tlb patch from Ralf applied. The LTP 
> >test:

Credits for this patch go to Maciej who actually went through the pain
of debugging this problem that did show it's ugly head long, long after
the affected revision has been obsoleted by newer revisions.

> >-bash-2.05b# shmem_test_06
> 
> This test does some mucking with shmat at fixed addresses that might not 
> be correct for mips. I still wouldn't expect to see a machine check when 
> it goes to free the shared memory areas. I'm going to try it on a 24K 
> malta as soon as I get yamon on it and can get it booted.

I've been able to reproduce it on on two 4Kc boards of different revisions
so this seems to be something else.  It does not hit 5Kc and 24K.

  Ralf

From greg.weeks@timesys.com Fri Apr  8 17:45:26 2005
Received: with ECARTIS (v1.0.0; list linux-mips); Fri, 08 Apr 2005 17:45:41 +0100 (BST)
Received: from mail.timesys.com ([IPv6:::ffff:65.117.135.102]:48219 "EHLO
	exchange.timesys.com") by linux-mips.org with ESMTP
	id <S8225417AbVDHQp0>; Fri, 8 Apr 2005 17:45:26 +0100
Received: from [192.168.2.27] ([192.168.2.27]) by exchange.timesys.com with Microsoft SMTPSVC(5.0.2195.6713);
	 Fri, 8 Apr 2005 12:41:11 -0400
Message-ID: <4256B524.2080509@timesys.com>
Date:	Fri, 08 Apr 2005 12:45:24 -0400
From:	Greg Weeks <greg.weeks@timesys.com>
User-Agent: Mozilla Thunderbird 1.0 (X11/20041206)
X-Accept-Language: en-us, en
MIME-Version: 1.0
To:	Ralf Baechle <ralf@linux-mips.org>
CC:	linux-mips@linux-mips.org
Subject: Re: another 4kc machine check.
References: <42553E49.7080004@timesys.com> <4256991C.4020601@timesys.com> <20050408161357.GB19166@linux-mips.org>
In-Reply-To: <20050408161357.GB19166@linux-mips.org>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-OriginalArrivalTime: 08 Apr 2005 16:41:11.0593 (UTC) FILETIME=[C5A9E990:01C53C59]
Return-Path: <greg.weeks@timesys.com>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 7654
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: greg.weeks@timesys.com
Precedence: bulk
X-list: linux-mips
Content-Length: 981
Lines: 34

Ralf Baechle wrote:

>On Fri, Apr 08, 2005 at 10:45:48AM -0400, Greg Weeks wrote:
>
>  
>
>>>This is the malta branch with the tlb patch from Ralf applied. The LTP 
>>>test:
>>>      
>>>
>
>Credits for this patch go to Maciej who actually went through the pain
>of debugging this problem that did show it's ugly head long, long after
>the affected revision has been obsoleted by newer revisions.
>
>  
>
>>>-bash-2.05b# shmem_test_06
>>>      
>>>
>>This test does some mucking with shmat at fixed addresses that might not 
>>be correct for mips. I still wouldn't expect to see a machine check when 
>>it goes to free the shared memory areas. I'm going to try it on a 24K 
>>malta as soon as I get yamon on it and can get it booted.
>>    
>>
>
>I've been able to reproduce it on on two 4Kc boards of different revisions
>so this seems to be something else.  It does not hit 5Kc and 24K.
>  
>
Have you tried a 4kec? That's the only other mips board I have available.

Greg Weeks

From fabrizio@fazzino.it Fri Apr  8 17:48:06 2005
Received: with ECARTIS (v1.0.0; list linux-mips); Fri, 08 Apr 2005 17:48:22 +0100 (BST)
Received: from smtpa1.aruba.it ([IPv6:::ffff:62.149.128.206]:41417 "HELO
	smtpa1.aruba.it") by linux-mips.org with SMTP id <S8225417AbVDHQsG>;
	Fri, 8 Apr 2005 17:48:06 +0100
Received: (qmail 2205 invoked by uid 511); 8 Apr 2005 16:47:58 -0000
Received: from fabrizio@fazzino.it by smtpa1.aruba.it by uid 503 with qmail-scanner-1.20 
 (avp(2004-04-15).  Clear:RC:0(82.51.96.131):. 
 Processed in 0.014562 secs); 08 Apr 2005 16:47:58 -0000
Received: from unknown (HELO ?192.168.32.1?) (fabrizio@fazzino.it@82.51.96.131)
  by smtpa1.aruba.it with SMTP; 8 Apr 2005 16:47:58 -0000
Message-ID: <4256B5BE.8070708@fazzino.it>
Date:	Fri, 08 Apr 2005 18:47:58 +0200
From:	Fabrizio Fazzino <fabrizio@fazzino.it>
User-Agent: Mozilla Thunderbird 1.0.2 (Windows/20050317)
X-Accept-Language: it, it-it, en-us, en
MIME-Version: 1.0
To:	linux-mips@linux-mips.org
Subject: Re: Assembly macro with parameters
References: <425573AD.9010702@fazzino.it> <20050407182549.GA24235@linux-mips.org>
In-Reply-To: <20050407182549.GA24235@linux-mips.org>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Return-Path: <fabrizio@fazzino.it>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 7655
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: fabrizio@fazzino.it
Precedence: bulk
X-list: linux-mips
Content-Length: 1038
Lines: 33

Ralf Baechle wrote:
> Fabrizio Fazzino wrote:
> 
>>It works, but I need a way to set the values of the parameters
>>at runtime; so I've tried the following macro:
>>
>>	#define fzmin(rd, rs, rt) asm("lwc1 $rt, rd<<11($rs)");
> 
> Which will leave the assembler entirely unimpressed ;-)

I thought that the compiler was able to substitute also the
values inside strings... Is there any way to force it to do so?

> Unless you only have a few instructions and are going for a quick hack
> I really suggest to add proper support for these instructions to binutils.
> Having working support in as, gdb, objdump will make your life so much
> easier.

The processor I'm designing probably will not be implemented in
any way (we just have to simulate the VHDL hardware description),
so we just need a quick-and-dirty way to make the opcode
conversion.

	Fabrizio


-- 
============================================
    Fabrizio Fazzino - fabrizio@fazzino.it
      Fazzino.IT - http://www.fazzino.it
============================================



From drow@nevyn.them.org Fri Apr  8 17:57:23 2005
Received: with ECARTIS (v1.0.0; list linux-mips); Fri, 08 Apr 2005 17:57:37 +0100 (BST)
Received: from nevyn.them.org ([IPv6:::ffff:66.93.172.17]:16027 "EHLO
	nevyn.them.org") by linux-mips.org with ESMTP id <S8225417AbVDHQ5X>;
	Fri, 8 Apr 2005 17:57:23 +0100
Received: from drow by nevyn.them.org with local (Exim 4.50 #1 (Debian))
	id 1DJwnF-00028l-PF; Fri, 08 Apr 2005 12:57:17 -0400
Date:	Fri, 8 Apr 2005 12:57:17 -0400
From:	Daniel Jacobowitz <dan@debian.org>
To:	Fabrizio Fazzino <fabrizio@fazzino.it>
Cc:	linux-mips@linux-mips.org
Subject: Re: Assembly macro with parameters
Message-ID: <20050408165717.GA8157@nevyn.them.org>
References: <425573AD.9010702@fazzino.it> <20050407182549.GA24235@linux-mips.org> <4256B5BE.8070708@fazzino.it>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <4256B5BE.8070708@fazzino.it>
User-Agent: Mutt/1.5.8i
Return-Path: <drow@nevyn.them.org>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 7656
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: dan@debian.org
Precedence: bulk
X-list: linux-mips
Content-Length: 1081
Lines: 30

On Fri, Apr 08, 2005 at 06:47:58PM +0200, Fabrizio Fazzino wrote:
> Ralf Baechle wrote:
> >Fabrizio Fazzino wrote:
> >
> >>It works, but I need a way to set the values of the parameters
> >>at runtime; so I've tried the following macro:
> >>
> >>	#define fzmin(rd, rs, rt) asm("lwc1 $rt, rd<<11($rs)");
> >
> >Which will leave the assembler entirely unimpressed ;-)
> 
> I thought that the compiler was able to substitute also the
> values inside strings... Is there any way to force it to do so?
> 
> >Unless you only have a few instructions and are going for a quick hack
> >I really suggest to add proper support for these instructions to binutils.
> >Having working support in as, gdb, objdump will make your life so much
> >easier.
> 
> The processor I'm designing probably will not be implemented in
> any way (we just have to simulate the VHDL hardware description),
> so we just need a quick-and-dirty way to make the opcode
> conversion.

You should probably be using .word then, and generating the instruction
completely by hand.

-- 
Daniel Jacobowitz
CodeSourcery, LLC

From greg.weeks@timesys.com Fri Apr  8 18:11:42 2005
Received: with ECARTIS (v1.0.0; list linux-mips); Fri, 08 Apr 2005 18:11:57 +0100 (BST)
Received: from mail.timesys.com ([IPv6:::ffff:65.117.135.102]:19562 "EHLO
	exchange.timesys.com") by linux-mips.org with ESMTP
	id <S8225417AbVDHRLm>; Fri, 8 Apr 2005 18:11:42 +0100
Received: from [192.168.2.27] ([192.168.2.27]) by exchange.timesys.com with Microsoft SMTPSVC(5.0.2195.6713);
	 Fri, 8 Apr 2005 13:07:28 -0400
Message-ID: <4256BB4C.2020605@timesys.com>
Date:	Fri, 08 Apr 2005 13:11:40 -0400
From:	Greg Weeks <greg.weeks@timesys.com>
User-Agent: Mozilla Thunderbird 1.0 (X11/20041206)
X-Accept-Language: en-us, en
MIME-Version: 1.0
To:	linux-mips@linux-mips.org
Subject: NPTL
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-OriginalArrivalTime: 08 Apr 2005 17:07:28.0046 (UTC) FILETIME=[714D8CE0:01C53C5D]
Return-Path: <greg.weeks@timesys.com>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 7657
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: greg.weeks@timesys.com
Precedence: bulk
X-list: linux-mips
Content-Length: 283
Lines: 6

I saw the kernel support patch (TLS) a while back and ment to ask what 
state the gcc/glibc patches were in. Has either been picked up into the 
gnu projects yet? If they're close I might try building a toolchain and 
root file system with NPTL to try our test suite on.

Greg Weeks

From sjhill@realitydiluted.com Fri Apr  8 18:20:12 2005
Received: with ECARTIS (v1.0.0; list linux-mips); Fri, 08 Apr 2005 18:20:27 +0100 (BST)
Received: from eth13.com-link.com ([IPv6:::ffff:208.242.241.164]:58764 "EHLO
	real.realitydiluted.com") by linux-mips.org with ESMTP
	id <S8225417AbVDHRUM>; Fri, 8 Apr 2005 18:20:12 +0100
Received: from sjhill by real.realitydiluted.com with local (Exim 4.50 #1 (Debian))
	id 1DJx9N-0000KA-M7; Fri, 08 Apr 2005 12:20:09 -0500
Subject: Re: NPTL
In-Reply-To: <4256BB4C.2020605@timesys.com>
To:	Greg Weeks <greg.weeks@timesys.com>
Date:	Fri, 8 Apr 2005 12:20:09 -0500 (CDT)
CC:	linux-mips@linux-mips.org
X-Mailer: ELM [version 2.4ME+ PL100 (25)]
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Type: text/plain; charset=US-ASCII
Message-Id: <E1DJx9N-0000KA-M7@real.realitydiluted.com>
From:	sjhill@realitydiluted.com
Return-Path: <sjhill@realitydiluted.com>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 7658
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: sjhill@realitydiluted.com
Precedence: bulk
X-list: linux-mips
Content-Length: 516
Lines: 11

> I saw the kernel support patch (TLS) a while back and ment to ask what 
> state the gcc/glibc patches were in. Has either been picked up into the 
> gnu projects yet? If they're close I might try building a toolchain and 
> root file system with NPTL to try our test suite on.
> 
The kernel patch has not gone in and probably will not until a lot more
testing has been done. All of the changes to binutils, gcc and glibc
have been checked in and are available from HEAD of cvs for respective
repositories.

-Steve

From drow@nevyn.them.org Fri Apr  8 18:21:49 2005
Received: with ECARTIS (v1.0.0; list linux-mips); Fri, 08 Apr 2005 18:22:04 +0100 (BST)
Received: from nevyn.them.org ([IPv6:::ffff:66.93.172.17]:25550 "EHLO
	nevyn.them.org") by linux-mips.org with ESMTP id <S8225417AbVDHRVt>;
	Fri, 8 Apr 2005 18:21:49 +0100
Received: from drow by nevyn.them.org with local (Exim 4.50 #1 (Debian))
	id 1DJxAw-0002P5-PP; Fri, 08 Apr 2005 13:21:46 -0400
Date:	Fri, 8 Apr 2005 13:21:46 -0400
From:	Daniel Jacobowitz <dan@debian.org>
To:	sjhill@realitydiluted.com
Cc:	Greg Weeks <greg.weeks@timesys.com>, linux-mips@linux-mips.org
Subject: Re: NPTL
Message-ID: <20050408172146.GA9192@nevyn.them.org>
References: <4256BB4C.2020605@timesys.com> <E1DJx9N-0000KA-M7@real.realitydiluted.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <E1DJx9N-0000KA-M7@real.realitydiluted.com>
User-Agent: Mutt/1.5.8i
Return-Path: <drow@nevyn.them.org>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 7659
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: dan@debian.org
Precedence: bulk
X-list: linux-mips
Content-Length: 529
Lines: 14

On Fri, Apr 08, 2005 at 12:20:09PM -0500, sjhill@realitydiluted.com wrote:
> > I saw the kernel support patch (TLS) a while back and ment to ask what 
> > state the gcc/glibc patches were in. Has either been picked up into the 
> > gnu projects yet? If they're close I might try building a toolchain and 
> > root file system with NPTL to try our test suite on.
> > 
> The kernel patch has not gone in and probably will not until a lot more
> testing has been done.

Why do you say that?

-- 
Daniel Jacobowitz
CodeSourcery, LLC

From sjhill@realitydiluted.com Fri Apr  8 18:23:38 2005
Received: with ECARTIS (v1.0.0; list linux-mips); Fri, 08 Apr 2005 18:23:53 +0100 (BST)
Received: from eth13.com-link.com ([IPv6:::ffff:208.242.241.164]:61580 "EHLO
	real.realitydiluted.com") by linux-mips.org with ESMTP
	id <S8225417AbVDHRXi>; Fri, 8 Apr 2005 18:23:38 +0100
Received: from sjhill by real.realitydiluted.com with local (Exim 4.50 #1 (Debian))
	id 1DJxCh-0000Kd-Kt; Fri, 08 Apr 2005 12:23:35 -0500
Subject: Re: NPTL
In-Reply-To: <20050408172146.GA9192@nevyn.them.org>
To:	Daniel Jacobowitz <dan@debian.org>
Date:	Fri, 8 Apr 2005 12:23:35 -0500 (CDT)
CC:	sjhill@realitydiluted.com, Greg Weeks <greg.weeks@timesys.com>,
	linux-mips@linux-mips.org
X-Mailer: ELM [version 2.4ME+ PL100 (25)]
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Type: text/plain; charset=US-ASCII
Message-Id: <E1DJxCh-0000Kd-Kt@real.realitydiluted.com>
From:	sjhill@realitydiluted.com
Return-Path: <sjhill@realitydiluted.com>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 7660
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: sjhill@realitydiluted.com
Precedence: bulk
X-list: linux-mips
Content-Length: 261
Lines: 9

> > The kernel patch has not gone in and probably will not until a lot more
> > testing has been done.
> 
> Why do you say that?
> 
I just made that assumption based on the fact that it is not in CVS
yet, at least it was not yesterday. Did I mis-speak?

-Steve

From mlachwani@mvista.com Fri Apr  8 18:25:34 2005
Received: with ECARTIS (v1.0.0; list linux-mips); Fri, 08 Apr 2005 18:25:49 +0100 (BST)
Received: from gateway-1237.mvista.com ([IPv6:::ffff:12.44.186.158]:60665 "EHLO
	hermes.mvista.com") by linux-mips.org with ESMTP
	id <S8225417AbVDHRZe>; Fri, 8 Apr 2005 18:25:34 +0100
Received: from [10.0.0.139] (prometheus.mvista.com [10.0.0.139])
	by hermes.mvista.com (Postfix) with ESMTP
	id 8B5F618C23; Fri,  8 Apr 2005 10:25:32 -0700 (PDT)
Message-ID: <4256BE8C.4060607@mvista.com>
Date:	Fri, 08 Apr 2005 10:25:32 -0700
From:	Manish Lachwani <mlachwani@mvista.com>
User-Agent: Mozilla Thunderbird 1.0.2 (X11/20050317)
X-Accept-Language: en-us, en
MIME-Version: 1.0
To:	sjhill@realitydiluted.com
Cc:	Greg Weeks <greg.weeks@timesys.com>, linux-mips@linux-mips.org
Subject: Re: NPTL
References: <E1DJx9N-0000KA-M7@real.realitydiluted.com>
In-Reply-To: <E1DJx9N-0000KA-M7@real.realitydiluted.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Return-Path: <mlachwani@mvista.com>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 7661
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: mlachwani@mvista.com
Precedence: bulk
X-list: linux-mips
Content-Length: 660
Lines: 24

sjhill@realitydiluted.com wrote:

>>I saw the kernel support patch (TLS) a while back and ment to ask what 
>>state the gcc/glibc patches were in. Has either been picked up into the 
>>gnu projects yet? If they're close I might try building a toolchain and 
>>root file system with NPTL to try our test suite on.
>>
>>    
>>
>The kernel patch has not gone in and probably will not until a lot more
>testing has been done. All of the changes to binutils, gcc and glibc
>have been checked in and are available from HEAD of cvs for respective
>repositories.
>
>-Steve
>
>  
>
Steve,

I thought the kernel patch was well tested by Daniel.

Thanks
Manish Lachwani

From drow@nevyn.them.org Fri Apr  8 19:18:45 2005
Received: with ECARTIS (v1.0.0; list linux-mips); Fri, 08 Apr 2005 19:19:00 +0100 (BST)
Received: from nevyn.them.org ([IPv6:::ffff:66.93.172.17]:32185 "EHLO
	nevyn.them.org") by linux-mips.org with ESMTP id <S8225428AbVDHSSp>;
	Fri, 8 Apr 2005 19:18:45 +0100
Received: from drow by nevyn.them.org with local (Exim 4.50 #1 (Debian))
	id 1DJy40-00036U-La; Fri, 08 Apr 2005 14:18:40 -0400
Date:	Fri, 8 Apr 2005 14:18:40 -0400
From:	Daniel Jacobowitz <dan@debian.org>
To:	sjhill@realitydiluted.com
Cc:	Greg Weeks <greg.weeks@timesys.com>, linux-mips@linux-mips.org
Subject: Re: NPTL
Message-ID: <20050408181840.GA11886@nevyn.them.org>
References: <20050408172146.GA9192@nevyn.them.org> <E1DJxCh-0000Kd-Kt@real.realitydiluted.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <E1DJxCh-0000Kd-Kt@real.realitydiluted.com>
User-Agent: Mutt/1.5.8i
Return-Path: <drow@nevyn.them.org>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 7662
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: dan@debian.org
Precedence: bulk
X-list: linux-mips
Content-Length: 499
Lines: 15

On Fri, Apr 08, 2005 at 12:23:35PM -0500, sjhill@realitydiluted.com wrote:
> > > The kernel patch has not gone in and probably will not until a lot more
> > > testing has been done.
> > 
> > Why do you say that?
> > 
> I just made that assumption based on the fact that it is not in CVS
> yet, at least it was not yesterday. Did I mis-speak?

I imagine it will go in exactly when Ralf and Maciej are ready for it
to :-)  It is extremely well tested already.

-- 
Daniel Jacobowitz
CodeSourcery, LLC

From pratikgpatel@gmail.com Fri Apr  8 21:07:31 2005
Received: with ECARTIS (v1.0.0; list linux-mips); Fri, 08 Apr 2005 21:07:50 +0100 (BST)
Received: from wproxy.gmail.com ([IPv6:::ffff:64.233.184.192]:7860 "EHLO
	wproxy.gmail.com") by linux-mips.org with ESMTP id <S8225435AbVDHUHa>;
	Fri, 8 Apr 2005 21:07:30 +0100
Received: by wproxy.gmail.com with SMTP id 37so1218007wra
        for <linux-mips@linux-mips.org>; Fri, 08 Apr 2005 13:07:23 -0700 (PDT)
DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws;
        s=beta; d=gmail.com;
        h=received:message-id:date:from:reply-to:to:subject:mime-version:content-type:content-transfer-encoding;
        b=etJww7Xry8D27KfwnTPw3zry3jwLO7hFbNnG5O9GW6zNUVp5w3GCJSPvX9s52oPKnEyNk0cKAUn6ULVx7rJqMpnk9lWjAR2eVuknK3Rf20tSICXJ5XcK2EIWwP7oahatW9gcnDqrDaQjkc3oHclLIaaK18qUzjLNI9QyaeWTJrg=
Received: by 10.54.34.64 with SMTP id h64mr2056893wrh;
        Fri, 08 Apr 2005 13:07:23 -0700 (PDT)
Received: by 10.54.53.56 with HTTP; Fri, 8 Apr 2005 13:07:23 -0700 (PDT)
Message-ID: <fda764b050408130730e74576@mail.gmail.com>
Date:	Fri, 8 Apr 2005 13:07:23 -0700
From:	Pratik Patel <pratikgpatel@gmail.com>
Reply-To: Pratik Patel <pratikgpatel@gmail.com>
To:	linux-mips@linux-mips.org
Subject: problems compiling libpcap programs for mipsel
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Return-Path: <pratikgpatel@gmail.com>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 7663
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: pratikgpatel@gmail.com
Precedence: bulk
X-list: linux-mips
Content-Length: 1025
Lines: 28

Hi,

Finally I was able to compile libpcap for mipsel platform. Now I have
the proper libpcap.a file. I had to bring the .h files from different
versions/cross-compilers of mipsel platform libraries.

Even after doing this, I get the following output.

[pratik@Akshar libpcap_samples]$ mipsel-uclibc-gcc ldev.c -lpcap
/opt/brcm/hndtools-mipsel-uclibc-0.9.19/lib/libpcap.a(fad-getad.o): In
function `pcap_findalldevs':
fad-getad.c(.text+0xa4): undefined reference to `getifaddrs'
fad-getad.c(.text+0x2e0): undefined reference to `freeifaddrs'
/opt/brcm/hndtools-mipsel-uclibc-0.9.19/lib/libpcap.a(nametoaddr.o):
In function `pcap_ether_hostton':
nametoaddr.c(.text+0x764): undefined reference to `ether_hostton'
collect2: ld returned 1 exit status
[pratik@Akshar libpcap_samples]$

The ldev.c is the simplest libpcap program available at:
http://www.cet.nau.edu/~mc8/Socket/Tutorials/section1.html

Are there any patches available that I need to take care of?

Any pointers to suggestions/pathces are welcome.

Cheers,
Pratik

From dyu@juniper.net Fri Apr  8 22:38:03 2005
Received: with ECARTIS (v1.0.0; list linux-mips); Fri, 08 Apr 2005 22:38:18 +0100 (BST)
Received: from borg.juniper.net ([IPv6:::ffff:207.17.137.119]:57117 "EHLO
	borg.juniper.net") by linux-mips.org with ESMTP id <S8225457AbVDHViD>;
	Fri, 8 Apr 2005 22:38:03 +0100
Received: from unknown (HELO gamma.jnpr.net) (172.24.245.25)
  by borg.juniper.net with ESMTP; 08 Apr 2005 14:37:59 -0700
X-BrightmailFiltered: true
X-Brightmail-Tracker: AAAAAA==
X-IronPort-AV: i="3.92,89,1112598000"; 
   d="scan'208,217"; a="253521821:sNHT43100636"
Received: from electron.jnpr.net ([172.24.15.21]) by gamma.jnpr.net with Microsoft SMTPSVC(6.0.3790.211);
	 Fri, 8 Apr 2005 14:37:57 -0700
x-mimeole: Produced By Microsoft Exchange V6.5.7226.0
Content-class: urn:content-classes:message
MIME-Version: 1.0
Content-Type: multipart/alternative;
	boundary="----_=_NextPart_001_01C53C83.3A82BFF8"
Subject: MIPS TLS support 
Date:	Fri, 8 Apr 2005 14:37:56 -0700
Message-ID: <27BCF2C7355655439636003CC56C152C051BEFDC@electron.jnpr.net>
X-MS-Has-Attach: 
X-MS-TNEF-Correlator: 
Thread-Topic: MIPS TLS support 
Thread-Index: AcU8gzo6jG3CSwjkQn+I8PW2/1+nLA==
From:	"David Yu" <dyu@juniper.net>
To:	<linux-mips@linux-mips.org>
X-OriginalArrivalTime: 08 Apr 2005 21:37:57.0285 (UTC) FILETIME=[3AAEE550:01C53C83]
Return-Path: <dyu@juniper.net>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 7664
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: dyu@juniper.net
Precedence: bulk
X-list: linux-mips
Content-Length: 2551
Lines: 107

This is a multi-part message in MIME format.

------_=_NextPart_001_01C53C83.3A82BFF8
Content-Type: text/plain;
	charset="us-ascii"
Content-Transfer-Encoding: quoted-printable

Hi,

=20

Anyone know if MIPS TLS support is available in any of the recent Linux
kernel release? Any patches available?

=20

Thanks

David=20


------_=_NextPart_001_01C53C83.3A82BFF8
Content-Type: text/html;
	charset="us-ascii"
Content-Transfer-Encoding: quoted-printable

<html xmlns:o=3D"urn:schemas-microsoft-com:office:office" =
xmlns:w=3D"urn:schemas-microsoft-com:office:word" =
xmlns=3D"http://www.w3.org/TR/REC-html40">

<head>
<META HTTP-EQUIV=3D"Content-Type" CONTENT=3D"text/html; =
charset=3Dus-ascii">
<meta name=3DGenerator content=3D"Microsoft Word 11 (filtered medium)">
<style>
<!--
 /* Font Definitions */
 @font-face
	{font-family:SimSun;
	panose-1:2 1 6 0 3 1 1 1 1 1;}
@font-face
	{font-family:"\@SimSun";
	panose-1:2 1 6 0 3 1 1 1 1 1;}
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
	{margin:0in;
	margin-bottom:.0001pt;
	font-size:12.0pt;
	font-family:"Times New Roman";}
a:link, span.MsoHyperlink
	{color:blue;
	text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
	{color:purple;
	text-decoration:underline;}
span.EmailStyle17
	{mso-style-type:personal-compose;
	font-family:Arial;
	color:windowtext;}
@page Section1
	{size:8.5in 11.0in;
	margin:1.0in 1.25in 1.0in 1.25in;}
div.Section1
	{page:Section1;}
-->
</style>

</head>

<body lang=3DEN-US link=3Dblue vlink=3Dpurple>

<div class=3DSection1>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'>Hi,<o:p></o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'><o:p>&nbsp;</o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'>Anyone know if MIPS TLS support is available in any =
of the recent
Linux kernel release? Any patches =
available?<o:p></o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'><o:p>&nbsp;</o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'>Thanks<o:p></o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'>David <o:p></o:p></span></font></p>

</div>

</body>

</html>

------_=_NextPart_001_01C53C83.3A82BFF8--

From mlachwani@mvista.com Fri Apr  8 22:55:04 2005
Received: with ECARTIS (v1.0.0; list linux-mips); Fri, 08 Apr 2005 22:55:19 +0100 (BST)
Received: from gateway-1237.mvista.com ([IPv6:::ffff:12.44.186.158]:52724 "EHLO
	hermes.mvista.com") by linux-mips.org with ESMTP
	id <S8225459AbVDHVzE>; Fri, 8 Apr 2005 22:55:04 +0100
Received: from [10.0.0.139] (prometheus.mvista.com [10.0.0.139])
	by hermes.mvista.com (Postfix) with ESMTP
	id 8B35918DA1; Fri,  8 Apr 2005 14:55:02 -0700 (PDT)
Message-ID: <4256FDB6.7060107@mvista.com>
Date:	Fri, 08 Apr 2005 14:55:02 -0700
From:	Manish Lachwani <mlachwani@mvista.com>
User-Agent: Mozilla Thunderbird 1.0.2 (X11/20050317)
X-Accept-Language: en-us, en
MIME-Version: 1.0
To:	David Yu <dyu@juniper.net>
Cc:	linux-mips@linux-mips.org
Subject: Re: MIPS TLS support
References: <27BCF2C7355655439636003CC56C152C051BEFDC@electron.jnpr.net>
In-Reply-To: <27BCF2C7355655439636003CC56C152C051BEFDC@electron.jnpr.net>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Return-Path: <mlachwani@mvista.com>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 7665
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: mlachwani@mvista.com
Precedence: bulk
X-list: linux-mips
Content-Length: 268
Lines: 19

David Yu wrote:

> Hi,
>
>  
>
> Anyone know if MIPS TLS support is available in any of the recent 
> Linux kernel release? Any patches available?
>
>  
>
> Thanks
>
> David
>
http://www.linux-mips.org/archives/linux-mips/2005-03/msg00092.html

Thanks
Manish Lachwani

From quekio@gmail.com Sat Apr  9 13:09:23 2005
Received: with ECARTIS (v1.0.0; list linux-mips); Sat, 09 Apr 2005 13:09:38 +0100 (BST)
Received: from wproxy.gmail.com ([IPv6:::ffff:64.233.184.206]:44999 "EHLO
	wproxy.gmail.com") by linux-mips.org with ESMTP id <S8225742AbVDIMJX> convert rfc822-to-8bit;
	Sat, 9 Apr 2005 13:09:23 +0100
Received: by wproxy.gmail.com with SMTP id 57so896427wri
        for <linux-mips@linux-mips.org>; Sat, 09 Apr 2005 05:09:14 -0700 (PDT)
DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws;
        s=beta; d=gmail.com;
        h=received:message-id:date:from:reply-to:to:subject:mime-version:content-type:content-transfer-encoding;
        b=SL75hivYYRvQENuVO+yKsnInxdsLpmeln7ilZ2hyR9bgjlq7VGFusnnpMn9GFxeou0jLyRF5rtfNxbpNTxaPYVTOETYzCTrtZ588BLWwgYPA85pik68jcNRdexvNt3m1ejgTPnOSOWylaHAXR0rhmahFPqQ+Z5CP40wmBo5T3RE=
Received: by 10.54.50.73 with SMTP id x73mr556190wrx;
        Sat, 09 Apr 2005 05:09:14 -0700 (PDT)
Received: by 10.54.38.20 with HTTP; Sat, 9 Apr 2005 05:09:14 -0700 (PDT)
Message-ID: <e02bc66105040905091efb3dc6@mail.gmail.com>
Date:	Sat, 9 Apr 2005 14:09:14 +0200
From:	Sergio Ruiz <quekio@gmail.com>
Reply-To: Sergio Ruiz <quekio@gmail.com>
To:	linux-mips@linux-mips.org
Subject: Linking assembled PIC code with Linux libc library
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8BIT
Return-Path: <quekio@gmail.com>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 7666
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: quekio@gmail.com
Precedence: bulk
X-list: linux-mips
Content-Length: 539
Lines: 15

Hi, i can't link assembled pic code against the libc running my
embedded-mips-box under debian, and this is what i do:

bluebox@bluebox:~$ as -al -EL -membedded-pic -mips1 -o prueba."o" prueba."s"

ld -L/usr/lib -lc -EL -o prueba prueba.o
ld: aviso: no se puede encontrar el símbolo de entrada __start; usando
por omisión 0000000000400280
prueba.o: En la función `main':
prueba.o(.text+0x8): relocation truncated to fit: R_MIPS_GNU_REL16_S2
printf@@GLIBC_2.0

I've been looking everywhere without any luck.
Any help is appreciated!
Thanks

From drow@nevyn.them.org Sat Apr  9 14:49:33 2005
Received: with ECARTIS (v1.0.0; list linux-mips); Sat, 09 Apr 2005 14:49:48 +0100 (BST)
Received: from nevyn.them.org ([IPv6:::ffff:66.93.172.17]:51405 "EHLO
	nevyn.them.org") by linux-mips.org with ESMTP id <S8225742AbVDINtd>;
	Sat, 9 Apr 2005 14:49:33 +0100
Received: from drow by nevyn.them.org with local (Exim 4.50 #1 (Debian))
	id 1DKGKt-0001FG-G4; Sat, 09 Apr 2005 09:49:19 -0400
Date:	Sat, 9 Apr 2005 09:49:19 -0400
From:	Daniel Jacobowitz <dan@debian.org>
To:	Sergio Ruiz <quekio@gmail.com>
Cc:	linux-mips@linux-mips.org
Subject: Re: Linking assembled PIC code with Linux libc library
Message-ID: <20050409134919.GA4738@nevyn.them.org>
References: <e02bc66105040905091efb3dc6@mail.gmail.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <e02bc66105040905091efb3dc6@mail.gmail.com>
User-Agent: Mutt/1.5.8i
Return-Path: <drow@nevyn.them.org>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 7667
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: dan@debian.org
Precedence: bulk
X-list: linux-mips
Content-Length: 506
Lines: 14

On Sat, Apr 09, 2005 at 02:09:14PM +0200, Sergio Ruiz wrote:
> Hi, i can't link assembled pic code against the libc running my
> embedded-mips-box under debian, and this is what i do:
> 
> bluebox@bluebox:~$ as -al -EL -membedded-pic -mips1 -o prueba."o" prueba."s"

PIC != embedded-pic.  You shouldn't be using -membedded-pic.

In fact, you shouldn't be using as directly, or ld.  Always use GCC to
assemble and link, and it will take care of the options for you.

-- 
Daniel Jacobowitz
CodeSourcery, LLC

From pratikgpatel@gmail.com Sun Apr 10 00:29:03 2005
Received: with ECARTIS (v1.0.0; list linux-mips); Sun, 10 Apr 2005 00:29:18 +0100 (BST)
Received: from wproxy.gmail.com ([IPv6:::ffff:64.233.184.207]:34844 "EHLO
	wproxy.gmail.com") by linux-mips.org with ESMTP id <S8225769AbVDIX3D>;
	Sun, 10 Apr 2005 00:29:03 +0100
Received: by wproxy.gmail.com with SMTP id 68so2279380wra
        for <linux-mips@linux-mips.org>; Sat, 09 Apr 2005 16:28:57 -0700 (PDT)
DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws;
        s=beta; d=gmail.com;
        h=received:message-id:date:from:reply-to:to:subject:mime-version:content-type:content-transfer-encoding;
        b=EZFh78IPnapODGNy5OgMIqyalsG4XuJofV7d7gh13mLHhsWTGpeMySzh0JzWUkC9n89RDbnjPT9g4hhMfeCekcSC9WvdrjQzOpkGddfVlisxf3PqnYp4FJO+7+qHyBVhMecJOw9SRyxndcgoa7ukogbS06XGimsDwJpONZwJnyA=
Received: by 10.54.53.38 with SMTP id b38mr841805wra;
        Sat, 09 Apr 2005 16:28:56 -0700 (PDT)
Received: by 10.54.53.56 with HTTP; Sat, 9 Apr 2005 16:28:56 -0700 (PDT)
Message-ID: <fda764b0504091628158f8f39@mail.gmail.com>
Date:	Sat, 9 Apr 2005 16:28:56 -0700
From:	Pratik Patel <pratikgpatel@gmail.com>
Reply-To: Pratik Patel <pratikgpatel@gmail.com>
To:	linux-mips@linux-mips.org
Subject: problems compiling prog. for mipsel platform
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Return-Path: <pratikgpatel@gmail.com>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 7668
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: pratikgpatel@gmail.com
Precedence: bulk
X-list: linux-mips
Content-Length: 868
Lines: 25

Hi,

I compiled libpcap for mipsel platform. Now I have the proper
libpcap.a file. I had to bring the ifaddrs.h file from /usr/bin/
folder.

When I compile a simple program (ldev.c) available at:
http://www.cet.nau.edu/~mc8/Socket/Tutorials/section1.html

Output of the program:
[pratik@Akshar libpcap_samples]$ mipsel-uclibc-gcc ldev.c -lpcap
/opt/brcm/hndtools-mipsel-uclibc-0.9.19/lib/libpcap.a(fad-getad.o): In
function `pcap_findalldevs':
fad-getad.c(.text+0xa4): undefined reference to `getifaddrs'
fad-getad.c(.text+0x2e0): undefined reference to `freeifaddrs'
/opt/brcm/hndtools-mipsel-uclibc-0.9.19/lib/libpcap.a(nametoaddr.o):
In function `pcap_ether_hostton':
nametoaddr.c(.text+0x764): undefined reference to `ether_hostton'
collect2: ld returned 1 exit status
[pratik@Akshar libpcap_samples]$

Are ther any patches for the ifaddrs.h file?

Cheers,
Pratik

From pdh@colonel-panic.org Sun Apr 10 14:06:33 2005
Received: with ECARTIS (v1.0.0; list linux-mips); Sun, 10 Apr 2005 14:06:49 +0100 (BST)
Received: from i-83-67-53-76.freedom2surf.net ([IPv6:::ffff:83.67.53.76]:27265
	"EHLO skeleton-jack.localnet") by linux-mips.org with ESMTP
	id <S8225942AbVDJNGd>; Sun, 10 Apr 2005 14:06:33 +0100
Received: from pdh by skeleton-jack.localnet with local (Exim 3.36 #1 (Debian))
	id 1DKc95-0005MS-00; Sun, 10 Apr 2005 14:06:35 +0100
Date:	Sun, 10 Apr 2005 14:06:35 +0100
To:	ralf@linux-mips.org
Cc:	linux-mips@linux-mips.org
Subject: [PATCH Cobalt 1/3] fix hang on Qube2700 boot
Message-ID: <20050410130635.GA20589@skeleton-jack>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
User-Agent: Mutt/1.5.6+20040907i
From:	Peter Horton <pdh@colonel-panic.org>
Return-Path: <pdh@colonel-panic.org>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 7669
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: pdh@colonel-panic.org
Precedence: bulk
X-list: linux-mips
Content-Length: 787
Lines: 20

The Qube2700 boot hangs because the old "prom" style console is
unconditionally enabled. Drop the "prom" console code from the build. It
would only be used if no "console=" line was supplied and in that case
the current 8250 code defaults to using ttyS0 at 9600 anyway (assuming a
port exists).

--

Index: linux/arch/mips/cobalt/Makefile
===================================================================
--- linux.orig/arch/mips/cobalt/Makefile	2003-11-13 14:30:45.000000000 +0000
+++ linux/arch/mips/cobalt/Makefile	2005-04-10 13:16:58.000000000 +0100
@@ -2,6 +2,6 @@
 # Makefile for the Cobalt micro systems family specific parts of the kernel
 #
 
-obj-y	 := irq.o int-handler.o reset.o setup.o promcon.o
+obj-y	 := irq.o int-handler.o reset.o setup.o
 
 EXTRA_AFLAGS := $(CFLAGS)

From pdh@colonel-panic.org Sun Apr 10 14:08:47 2005
Received: with ECARTIS (v1.0.0; list linux-mips); Sun, 10 Apr 2005 14:09:04 +0100 (BST)
Received: from i-83-67-53-76.freedom2surf.net ([IPv6:::ffff:83.67.53.76]:27521
	"EHLO skeleton-jack.localnet") by linux-mips.org with ESMTP
	id <S8225942AbVDJNIr>; Sun, 10 Apr 2005 14:08:47 +0100
Received: from pdh by skeleton-jack.localnet with local (Exim 3.36 #1 (Debian))
	id 1DKcBG-0005Nq-00; Sun, 10 Apr 2005 14:08:50 +0100
Date:	Sun, 10 Apr 2005 14:08:50 +0100
To:	ralf@linux-mips.org
Cc:	linux-mips@linux-mips.org
Subject: [PATCH Cobalt 2/3] interrupt cleanup
Message-ID: <20050410130850.GA20623@skeleton-jack>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
User-Agent: Mutt/1.5.6+20040907i
From:	Peter Horton <pdh@colonel-panic.org>
Return-Path: <pdh@colonel-panic.org>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 7670
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: pdh@colonel-panic.org
Precedence: bulk
X-list: linux-mips
Content-Length: 5540
Lines: 193

Tidy up the Cobalt interrupt handling code.

--

Index: linux/include/asm-mips/cobalt/cobalt.h
===================================================================
--- linux.orig/include/asm-mips/cobalt/cobalt.h	2005-03-04 15:13:37.000000000 +0000
+++ linux/include/asm-mips/cobalt/cobalt.h	2005-04-06 22:43:05.000000000 +0100
@@ -25,15 +25,17 @@
 /*
  * CPU IRQs  are 16 ... 23
  */
-#define COBALT_TIMER_IRQ	18
-#define COBALT_SCC_IRQ          19		/* pre-production has 85C30 */
-#define COBALT_RAQ_SCSI_IRQ	19
-#define COBALT_ETH0_IRQ		19
-#define COBALT_QUBE1_ETH0_IRQ	20
-#define COBALT_ETH1_IRQ		20
-#define COBALT_SERIAL_IRQ	21
-#define COBALT_SCSI_IRQ         21
-#define COBALT_VIA_IRQ		22		/* Chained to VIA ISA bridge */
+#define COBALT_CPU_IRQ		16
+
+#define COBALT_GALILEO_IRQ	(COBALT_CPU_IRQ + 2)
+#define COBALT_SCC_IRQ          (COBALT_CPU_IRQ + 3)	/* pre-production has 85C30 */
+#define COBALT_RAQ_SCSI_IRQ	(COBALT_CPU_IRQ + 3)
+#define COBALT_ETH0_IRQ		(COBALT_CPU_IRQ + 3)
+#define COBALT_QUBE1_ETH0_IRQ	(COBALT_CPU_IRQ + 4)
+#define COBALT_ETH1_IRQ		(COBALT_CPU_IRQ + 4)
+#define COBALT_SERIAL_IRQ	(COBALT_CPU_IRQ + 5)
+#define COBALT_SCSI_IRQ         (COBALT_CPU_IRQ + 5)
+#define COBALT_VIA_IRQ		(COBALT_CPU_IRQ + 6)	/* Chained to VIA ISA bridge */
 
 /*
  * PCI configuration space manifest constants.  These are wired into
@@ -84,7 +86,8 @@
 	*(volatile unsigned int *) GALILEO_REG(port) = (val);		\
 } while (0)
 
-#define GALILEO_T0EXP		0x0100
+#define GALILEO_INTR_T0EXP	(1 << 8)
+
 #define GALILEO_ENTC0		0x01
 #define GALILEO_SELTC0		0x02
 
Index: linux/arch/mips/cobalt/setup.c
===================================================================
--- linux.orig/arch/mips/cobalt/setup.c	2005-03-04 15:13:37.000000000 +0000
+++ linux/arch/mips/cobalt/setup.c	2005-04-06 22:43:05.000000000 +0100
@@ -50,16 +50,17 @@
 
 static void __init cobalt_timer_setup(struct irqaction *irq)
 {
-	/* Load timer value for 1KHz */
+	/* Load timer value for 1KHz (TCLK is 50MHz) */
 	GALILEO_OUTL(50*1000*1000 / 1000, GT_TC0_OFS);
 
-	/* Register our timer interrupt */
-	setup_irq(COBALT_TIMER_IRQ, irq);
+	/* Enable timer */
+	GALILEO_OUTL(GALILEO_ENTC0 | GALILEO_SELTC0, GT_TC_CONTROL_OFS);
 
-	/* Enable timer ints */
-	GALILEO_OUTL((GALILEO_ENTC0 | GALILEO_SELTC0), GT_TC_CONTROL_OFS);
-	/* Unmask timer int */
-	GALILEO_OUTL(GALILEO_T0EXP, GT_INTRMASK_OFS);
+	/* Register interrupt */
+	setup_irq(COBALT_GALILEO_IRQ, irq);
+
+	/* Enable interrupt */
+	GALILEO_OUTL(GALILEO_INTR_T0EXP | GALILEO_INL(GT_INTRMASK_OFS), GT_INTRMASK_OFS);
 }
 
 extern struct pci_ops gt64111_pci_ops;
Index: linux/arch/mips/cobalt/irq.c
===================================================================
--- linux.orig/arch/mips/cobalt/irq.c	2005-02-21 16:41:55.000000000 +0000
+++ linux/arch/mips/cobalt/irq.c	2005-04-06 22:43:34.000000000 +0100
@@ -43,49 +43,63 @@
  *    15  - IDE1
  */
 
-asmlinkage void cobalt_irq(struct pt_regs *regs)
+static inline void galileo_irq(struct pt_regs *regs)
 {
-	unsigned int pending = read_c0_status() & read_c0_cause();
+	unsigned int mask, pending;
 
-	if (pending & CAUSEF_IP2) {			/* int 18 */
-		unsigned long irq_src = GALILEO_INL(GT_INTRCAUSE_OFS);
+	mask = GALILEO_INL(GT_INTRMASK_OFS);
+	pending = GALILEO_INL(GT_INTRCAUSE_OFS) & mask;
 
-		/* Check for timer irq ... */
-		if (irq_src & GALILEO_T0EXP) {
-			/* Clear the int line */
-			GALILEO_OUTL(0, GT_INTRCAUSE_OFS);
-			do_IRQ(COBALT_TIMER_IRQ, regs);
-		}
-		return;
-	}
+	if (pending & GALILEO_INTR_T0EXP) {
 
-	if (pending & CAUSEF_IP6) {			/* int 22 */
-		int irq = i8259_irq();
+		GALILEO_OUTL(~GALILEO_INTR_T0EXP, GT_INTRCAUSE_OFS);
+		do_IRQ(COBALT_GALILEO_IRQ, regs);
 
-		if (irq >= 0)
-			do_IRQ(irq, regs);
-		return;
-	}
+	} else {
 
-	if (pending & CAUSEF_IP3) {			/* int 19 */
-		do_IRQ(COBALT_ETH0_IRQ, regs);
-		return;
+		GALILEO_OUTL(mask & ~pending, GT_INTRMASK_OFS);
+		printk(KERN_WARNING "Galileo: masking unexpected interrupt %08x\n", pending);
 	}
+}
 
-	if (pending & CAUSEF_IP4) {			/* int 20 */
-		do_IRQ(COBALT_ETH1_IRQ, regs);
-		return;
-	}
+static inline void via_pic_irq(struct pt_regs *regs)
+{
+	int irq;
 
-	if (pending & CAUSEF_IP5) {			/* int 21 */
-		do_IRQ(COBALT_SERIAL_IRQ, regs);
-		return;
-	}
+	irq = i8259_irq();
+	if (irq >= 0)
+		do_IRQ(irq, regs);
+}
 
-	if (pending & CAUSEF_IP7) {			/* int 23 */
-		do_IRQ(23, regs);
-		return;
-	}
+asmlinkage void cobalt_irq(struct pt_regs *regs)
+{
+	unsigned pending;
+
+	pending = read_c0_status() & read_c0_cause();
+
+	if (pending & CAUSEF_IP2)			/* COBALT_GALILEO_IRQ (18) */
+
+		galileo_irq(regs);
+
+	else if (pending & CAUSEF_IP6)			/* COBALT_VIA_IRQ (22) */
+
+		via_pic_irq(regs);
+
+	else if (pending & CAUSEF_IP3)			/* COBALT_ETH0_IRQ (19) */
+
+		do_IRQ(COBALT_CPU_IRQ + 3, regs);
+
+	else if (pending & CAUSEF_IP4)			/* COBALT_ETH1_IRQ (20) */
+
+		do_IRQ(COBALT_CPU_IRQ + 4, regs);
+
+	else if (pending & CAUSEF_IP5)			/* COBALT_SERIAL_IRQ (21) */
+
+		do_IRQ(COBALT_CPU_IRQ + 5, regs);
+
+	else if (pending & CAUSEF_IP7)			/* IRQ 23 */
+
+		do_IRQ(COBALT_CPU_IRQ + 7, regs);
 }
 
 static struct irqaction irq_via = {
@@ -94,10 +108,16 @@
  
 void __init arch_init_irq(void)
 {
+	/*
+	 * Mask all Galileo interrupts. The Galileo
+	 * handler is set in cobalt_timer_setup()
+	 */
+	GALILEO_OUTL(0, GT_INTRMASK_OFS);
+
 	set_except_vector(0, cobalt_handle_int);
 
 	init_i8259_irqs();				/*  0 ... 15 */
-	mips_cpu_irq_init(16);				/* 16 ... 23 */
+	mips_cpu_irq_init(COBALT_CPU_IRQ);		/* 16 ... 23 */
 
 	/*
 	 * Mask all cpu interrupts

From pdh@colonel-panic.org Sun Apr 10 14:11:34 2005
Received: with ECARTIS (v1.0.0; list linux-mips); Sun, 10 Apr 2005 14:12:01 +0100 (BST)
Received: from i-83-67-53-76.freedom2surf.net ([IPv6:::ffff:83.67.53.76]:3465
	"EHLO skeleton-jack.localnet") by linux-mips.org with ESMTP
	id <S8225949AbVDJNLe>; Sun, 10 Apr 2005 14:11:34 +0100
Received: from pdh by skeleton-jack.localnet with local (Exim 3.36 #1 (Debian))
	id 1DKcDx-0005OS-00; Sun, 10 Apr 2005 14:11:37 +0100
Date:	Sun, 10 Apr 2005 14:11:37 +0100
To:	ralf@linux-mips.org
Cc:	linux-mips@linux-mips.org
Subject: [PATCH Cobalt 3/3] add PCI retry error handler
Message-ID: <20050410131137.GA20709@skeleton-jack>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
User-Agent: Mutt/1.5.6+20040907i
From:	Peter Horton <pdh@colonel-panic.org>
Return-Path: <pdh@colonel-panic.org>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 7671
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: pdh@colonel-panic.org
Precedence: bulk
X-list: linux-mips
Content-Length: 3434
Lines: 103

Add PCI retry error handler. We can drop the check for the device #6
from pci_range_ck() as we now get a diagnostic message and the kernel
continues the boot.

--

Index: linux/arch/mips/pci/fixup-cobalt.c
===================================================================
--- linux.orig/arch/mips/pci/fixup-cobalt.c	2005-03-04 15:13:37.000000000 +0000
+++ linux/arch/mips/pci/fixup-cobalt.c	2005-04-10 13:16:12.000000000 +0100
@@ -102,7 +102,14 @@
 		/* XXX WE MUST DO THIS ELSE GALILEO LOCKS UP! -DaveM */
 		timeo = GALILEO_INL(GT_PCI0_TOR_OFS);
 		/* Old Galileo, assumes PCI STOP line to VIA is disconnected. */
-		GALILEO_OUTL(0xffff, GT_PCI0_TOR_OFS);
+		GALILEO_OUTL(
+			(0xff << 16) |		/* retry count */
+			(0xff << 8) |		/* timeout 1   */
+			0xff,			/* timeout 0   */
+			GT_PCI0_TOR_OFS);
+
+		/* enable PCI retry exceeded interrupt */
+		GALILEO_OUTL(GALILEO_INTR_RETRY_CTR | GALILEO_INL(GT_INTRMASK_OFS), GT_INTRMASK_OFS);
 	}
 }
 
Index: linux/arch/mips/pci/ops-gt64111.c
===================================================================
--- linux.orig/arch/mips/pci/ops-gt64111.c	2005-03-04 15:13:37.000000000 +0000
+++ linux/arch/mips/pci/ops-gt64111.c	2005-04-10 13:16:12.000000000 +0100
@@ -18,21 +18,13 @@
 #include <asm/cobalt/cobalt.h>
 
 /*
- * Accessing device 31 hangs the GT64120.  Not sure if this will also hang
- * the GT64111, let's be paranoid for now.
- *
- * Accessing device COBALT_PCICONF_CPU hangs early units.
+ * Device 31 on the GT64111 is used to generate PCI special
+ * cycles, so we shouldn't expected to find a device there ...
  */
 static inline int pci_range_ck(struct pci_bus *bus, unsigned int devfn)
 {
-	unsigned slot;
-
-	if (bus->number == 0) {
-
-		slot = PCI_SLOT(devfn);
-		if (slot != COBALT_PCICONF_CPU && slot < 31)
-			return 0;
-	}
+	if (bus->number == 0 && PCI_SLOT(devfn) < 31)
+		return 0;
 
 	return -1;
 }
Index: linux/arch/mips/cobalt/irq.c
===================================================================
--- linux.orig/arch/mips/cobalt/irq.c	2005-04-10 13:16:12.000000000 +0100
+++ linux/arch/mips/cobalt/irq.c	2005-04-10 13:43:39.000000000 +0100
@@ -11,6 +11,7 @@
 #include <linux/init.h>
 #include <linux/irq.h>
 #include <linux/interrupt.h>
+#include <linux/pci.h>
 
 #include <asm/i8259.h>
 #include <asm/irq_cpu.h>
@@ -45,7 +46,7 @@
 
 static inline void galileo_irq(struct pt_regs *regs)
 {
-	unsigned int mask, pending;
+	unsigned int mask, pending, devfn;
 
 	mask = GALILEO_INL(GT_INTRMASK_OFS);
 	pending = GALILEO_INL(GT_INTRCAUSE_OFS) & mask;
@@ -55,6 +56,13 @@
 		GALILEO_OUTL(~GALILEO_INTR_T0EXP, GT_INTRCAUSE_OFS);
 		do_IRQ(COBALT_GALILEO_IRQ, regs);
 
+	} else if (pending & GALILEO_INTR_RETRY_CTR) {
+
+		devfn = GALILEO_INL(GT_PCI0_CFGADDR_OFS) >> 8;
+		GALILEO_OUTL(~GALILEO_INTR_RETRY_CTR, GT_INTRCAUSE_OFS);
+		printk(KERN_WARNING "Galileo: PCI retry count exceeded (%02x.%u)\n",
+			PCI_SLOT(devfn), PCI_FUNC(devfn));
+
 	} else {
 
 		GALILEO_OUTL(mask & ~pending, GT_INTRMASK_OFS);
Index: linux/include/asm-mips/cobalt/cobalt.h
===================================================================
--- linux.orig/include/asm-mips/cobalt/cobalt.h	2005-04-10 13:16:12.000000000 +0100
+++ linux/include/asm-mips/cobalt/cobalt.h	2005-04-10 13:16:12.000000000 +0100
@@ -87,6 +87,7 @@
 } while (0)
 
 #define GALILEO_INTR_T0EXP	(1 << 8)
+#define GALILEO_INTR_RETRY_CTR	(1 << 20)
 
 #define GALILEO_ENTC0		0x01
 #define GALILEO_SELTC0		0x02

From hjl@lucon.org Sun Apr 10 18:43:32 2005
Received: with ECARTIS (v1.0.0; list linux-mips); Sun, 10 Apr 2005 18:43:51 +0100 (BST)
Received: from rwcrmhc11.comcast.net ([IPv6:::ffff:204.127.198.35]:505 "EHLO
	rwcrmhc11.comcast.net") by linux-mips.org with ESMTP
	id <S8225965AbVDJRnc>; Sun, 10 Apr 2005 18:43:32 +0100
Received: from lucon.org ([24.6.212.230]) by comcast.net (rwcrmhc11) with ESMTP
          id <2005041017432001300nbnk7e>; Sun, 10 Apr 2005 17:43:25 +0000
Received: by lucon.org (Postfix, from userid 1000)
	id 5B71463D5D; Sun, 10 Apr 2005 10:43:20 -0700 (PDT)
Date:	Sun, 10 Apr 2005 10:43:20 -0700
From:	"H. J. Lu" <hjl@lucon.org>
To:	linux-gcc@vger.kernel.org
Cc:	gcc@gcc.gnu.org, GNU C Library <libc-alpha@sources.redhat.com>,
	Mat Hostetter <mat@lcs.mit.edu>, Warner Losh <imp@village.org>,
	linux-mips@linux-mips.org, Ralf Baechle <ralf@linux-mips.org>,
	Linas Vepstas <linas@linas.org>
Subject: The Linux binutils 2.16.90.0.1 is released
Message-ID: <20050410174320.GA29704@lucon.org>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
User-Agent: Mutt/1.4.1i
Return-Path: <hjl@lucon.org>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 7672
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: hjl@lucon.org
Precedence: bulk
X-list: linux-mips
Content-Length: 9308
Lines: 307

This is the beta release of binutils 2.16.90.0.1 for Linux, which is
based on binutils 2005 0408 in CVS on sources.redhat.com plus various
changes. It is purely for Linux.

The new i386/x86_64 assemblers no longer accept instructions for moving
between a segment register and a 32bit memory location, i.e.,

	movl (%eax),%ds
	movl %ds,(%eax)

To generate instructions for moving between a segment register and a
16bit memory location without the 16bit operand size prefix, 0x66,

	mov (%eax),%ds
	mov %ds,(%eax)

should be used. It will work with both new and old assemblers. The
assembler starting from 2.16.90.0.1 will also support

	movw (%eax),%ds
	movw %ds,(%eax)

without the 0x66 prefix. Patches for 2.4 and 2.6 Linux kernels are
available at

http://www.kernel.org/pub/linux/devel/binutils/linux-2.4-seg-4.patch
http://www.kernel.org/pub/linux/devel/binutils/linux-2.6-seg-5.patch

The ia64 assembler is now defaulted to tune for Itanium 2 processors.
To build a kernel for Itanium 1 processors, you will need to add

ifeq ($(CONFIG_ITANIUM),y)
	CFLAGS += -Wa,-mtune=itanium1
	AFLAGS += -Wa,-mtune=itanium1
endif

to arch/ia64/Makefile in your kernel source tree.

Please report any bugs related to binutils 2.16.90.0.1 to hjl@lucon.org

and

http://www.sourceware.org/bugzilla/

If you don't use

# rpmbuild -ta binutils-xx.xx.xx.xx.xx.tar.bz2

to compile the Linux binutils, please read patches/README in source
tree to apply Linux patches if there are any.

Changes from binutils 2.15.94.0.2.2:

1. Update from binutils 2005 0408.
2. The i386/x86_64 assemblers no longer accept instructions for moving
between a segment register and a 32bit memory location.
3. The x86_64 assembler now allows movq between a segment register and
a 64bit general purpose register.
4. 20x Speed up linker for input files with >64K sections.
5. Properly report ia64 linker relaxation failures.
6. Support tuning ia64 assembler for Itanium 2 processors.
7. Linker will remove empty unused output sections.
8. Add -N to readelf to display full section names.
9. Fix the ia64 linker to support linkonce text sections without unwind
sections.
10. More unwind directive checkings in the ia64 assembler.
11. Speed up linker with wildcard handling.
12. Fix readelf to properly dump .debug_ranges and .debug_loc sections.

Changes from binutils 2.15.94.0.2:

1. Fix greater than 64K section support in linker.
2. Properly handle i386 and x86_64 protected symbols in linker.
3. Fix readelf for LEB128 on 64bit hosts.
4. Speed up readelf for section group process.
5. Include ia64 texinfo pages.
6. Change ia64 assembler to check hint.b for Montecito.
7. Improve relaxation failure report in ia64 linker.
8. Fix ia64 linker to allow relax backward branch in the same section.

Changes from binutils 2.15.94.0.1:

1. Update from binutils 2004 1220.
2. Fix strip for TLS symbol references.

Changes from binutils 2.15.92.0.2:

1. Update from binutils 2004 1121.
2. Put ia64 .ctors/.dtors sections next to small data section for
Intel ia64 compiler.
3. Fix -Bdynamic/-Bstatic handling for linker script.
4. Provide more information on relocation overflow.
5. Add --sort-section to linker.
6. Support icc 8.1 unwind info in readelf.
7. Fix the infinite loop bug on bad input in the ia64 assembler.
8. Fix ia64 SECREL relocation in linker.
9. Fix a section group memory leak in readelf.

Changes from binutils 2.15.91.0.2:

1. Update from binutils 2004 0927.
2. Work around a section header bug in Intel ia64 compiler.
3. Fix an unwind directive bug in the ia64 assembler.
4. Fix various PPC bugs.
5. Update ARM support.
6. Fix an x86-64 linker warning while building Linux kernel.

Changes from binutils 2.15.91.0.1:

1. Update from binutils 2004 0727.
2. Fix the x86_64 linker to prevent non-PIC code in shared library.
3. Fix the ia64 linker to warn the relotable files which can't be
relaxed.
4. Fix the comdat group support. Allow mix single-member comdat group
with linkonce section.
5. Added --add-needed/--no-add-needed options to linker.
6. Fix the SHF_LINK_ORDER support.
7. Fix the ia64 assembler for multiple sections with the same name and
SHT_IA_64_UNWIND sections.
8. Fix the ia64 assembler for merge section and relaxation.

Changes from binutils 2.15.90.0.3:

1. Update from binutils 2004 0527.
2. Fix -x auto option in the ia64 assembler.
3. Add the AR check in the ia64 assembler.
4. Fix the section group support.
5. Add a new -z relro linker option.
6. Fix an exception section placement bug in linker.
7. Add .serialize.data and .serialize.instruction to the ia64
assembler.

Changes from binutils 2.15.90.0.2:

1. Update from binutils 2004 0415.
2. Fix the linker for weak undefined symbol handling.
3. Fix the ELF/Sparc and ELF/Sparc64 linker for statically linking PIC
code.

Changes from binutils 2.15.90.0.1.1:

1. Update from binutils 2004 0412.
2. Add --as-needed/--no-as-needed to linker.
3. Fix -z defs in linker.
4. Always reserve the memory for ia64 dynamic linker.
5. Fix a race condition in ia64 lazy binding.

Changes from binutils 2.15.90.0.1:

1. Fixed an ia64 assembler bug.
2. Install the assembler man page.

Changes from binutils 2.14.90.0.8:

1. Update from binutils 2004 0303.
2. Fixed linker for undefined symbols with non-default visibility.
3. Sped up linker weakdef symbol handling.
4. Fixed mixing ELF32 and ELF64 object files in archive.
5. Added ia64 linker brl optimization.
6. Fixed ia64 linker to disallow invalid dynamic relocations.
7. Fixed DT_TEXTREL handling in ia64 linker.
8. Fixed alignment handling in ia64 assembler.
9. Improved ia64 assembler unwind table handling. 

Changes from binutils 2.14.90.0.7:

1. Update from binutils 2004 0114.
2. Fixed an ia64 assembler unwind table bug. 
3. Better handle IPF linker relaxation overflow.
4. Fixed misc PPC bugs.

Changes from binutils 2.14.90.0.6:

1. Update from binutils 2003 1029.
2. Allow type changes for undefined symbols.
3. Fix EH frame optimization.
4. Fix the check for undefined versioned symbol with wildcard.
5. Support generating code for Itanium.
6. Detect and warn bad symbol index.
7. Update IPF assemebler DV check.

Changes from binutils 2.14.90.0.5:

1. Update from binutils 2003 0820.
2. No longer use section names for ELF section types nor flags.
3. Fix some ELF/IA64 linker bugs.
4. Fix some ELF/ppc bugs.
5. Add archive support to readelf.

Changes from binutils 2.14.90.0.4.1:

1. Update from binutils 2003 0722.
2. Fix an ELF/mips linker bug.
3. Fix an ELF/hpppa linker bug.
4. Fix an ELF/ia64 assembler bug.
5. Fix a linkonce support with C++ debug.
6. A new working C++ demangler.
7. Various alpha, mips, ia64, ... bug fixes.
8. Support for the current gcc and glibc.

Changes from binutils 2.14.90.0.4:
 
1. Fix an ia64 assembler hint@pause bug.
2. Support Intel Prescott New Instructions.

Changes from binutils 2.14.90.0.3:

1. Work around the brain dead libtool.

Changes from binutils 2.14.90.0.2:

1. Update from binutils 2003 0523.
2. Fix 2 ELF visibility bugs.
3. Fix ELF/ppc linker bugs.

Changes from binutils 2.14.90.0.1:

1. Update from binutils 2003 0515.
2. Fix various ELF visibility bugs.
3. Fix some ia64 linker bugs.
4. Add more IAS compatibilities to ia64 assembler.

Changes from binutils 2.13.90.0.20:

1. Update from binutils 2003 0505.
2. Fix various ELF visibility bugs.
3. Fix some ia64 linker bugs.
4. Fix some ia64 assembler bugs.
5. Add some IAS compatibilities to ia64 assembler.
6. Fix ELF common symbol alignment.
7. Fix ELF weak symbol handling.

Changes from binutils 2.13.90.0.18:

1. Update from binutils 2003 0319.
2. Fix an ia64 linker brl relaxation bug.
3. Fix some ELF/ppc linker bugs.

Changes from binutils 2.13.90.0.16:

1. Update from binutils 2003 0121.
2. Fix an ia64 gas bug.
3. Fix some TLS bugs.
4. Fix some ELF/ppc bugs.
5. Fix an ELF/m68k bug.

2. Include /usr/bin/c++filt.
Changes from binutils 2.13.90.0.14:

1. Update from binutils 2002 1126.
2. Include /usr/bin/c++filt.
3. Fix "ld -r" with execption handling.

Changes from binutils 2.13.90.0.10:

1. Update from binutils 2002 1114.
2. Fix ELF/alpha bugs.
3. Fix an ELF/i386 assembler bug.

Changes from binutils 2.13.90.0.4:

1. Update from binutils 2002 1010.
2. More ELF/PPC linker bug fixes.
3. Fix an ELF/alpha linker bug.
4. Fix an ELF/sparc linker bug to support Solaris.
5. More TLS updates.

Changes from binutils 2.13.90.0.3:

1. Update from binutils 2002 0814.
2. Fix symbol versioning bugs for gcc 3.2.
3. Fix mips gas.

Changes from binutils 2.13.90.0.2:

1. Update from binutils 2002 0809.
2. Fix a mips gas compatibility bug.
3. Fix an x86 TLS bfd bug.
4. Fix an x86 PIC gas bug.
5. Improve symbol versioning support.

The file list:

1. binutils-2.16.90.0.1.tar.bz2. Source code.
2. binutils-2.15.94.0.2.2-2.16.90.0.1.diff.bz2. Patch against the
   previous beta source code.
3. binutils-2.16.90.0.1-1.i386.rpm. IA-32 binary RPM for RedHat EL 3.
4. binutils-2.16.90.0.1-1.ia64.rpm. IA-64 binary RPM for RedHat EL 3.
5. binutils-2.16.90.0.1-1.x86_64.rpm. X64_64 binary RPM for RedHat
   EL 3.

There is no separate source rpm. You can do

# rpmbuild -ta binutils-2.16.90.0.1.tar.bz2

to create both binary and source rpms.

The primary sites for the beta Linux binutils are:

1. http://www.kernel.org/pub/linux/devel/binutils/

Thanks.


H.J. Lu
hjl@lucon.org
04/10/2005

From quekio@gmail.com Sun Apr 10 20:28:05 2005
Received: with ECARTIS (v1.0.0; list linux-mips); Sun, 10 Apr 2005 20:28:20 +0100 (BST)
Received: from wproxy.gmail.com ([IPv6:::ffff:64.233.184.200]:44485 "EHLO
	wproxy.gmail.com") by linux-mips.org with ESMTP id <S8225977AbVDJT2F>;
	Sun, 10 Apr 2005 20:28:05 +0100
Received: by wproxy.gmail.com with SMTP id 57so1054816wri
        for <linux-mips@linux-mips.org>; Sun, 10 Apr 2005 12:27:58 -0700 (PDT)
DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws;
        s=beta; d=gmail.com;
        h=received:message-id:date:from:reply-to:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:references;
        b=Gbi+cOPjXhggOV2k2QYT70u2rJZ+vCIjiRBNWrzcaFvMh6wdNNcqHEunXzPN8qxNkbEKoltJIHDZLfnAUA6SNvRj2V7W5r15qpIV21oxJgaihD/jUzFibpnRxXOZPY9Yp1d8HOhrtRODBeUiDpHKfps1hrBs9Z3xRSzyWKo3dZ8=
Received: by 10.54.71.15 with SMTP id t15mr2852940wra;
        Sun, 10 Apr 2005 12:27:58 -0700 (PDT)
Received: by 10.54.38.20 with HTTP; Sun, 10 Apr 2005 12:27:58 -0700 (PDT)
Message-ID: <e02bc661050410122733e21927@mail.gmail.com>
Date:	Sun, 10 Apr 2005 21:27:58 +0200
From:	Sergio Ruiz <quekio@gmail.com>
Reply-To: Sergio Ruiz <quekio@gmail.com>
To:	linux-mips@linux-mips.org
Subject: Re: Linking assembled PIC code with Linux libc library
In-Reply-To: <e02bc66105041012091afdf306@mail.gmail.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
References: <e02bc66105040905091efb3dc6@mail.gmail.com>
	 <20050409134919.GA4738@nevyn.them.org>
	 <e02bc661050409113820cceae3@mail.gmail.com>
	 <20050409215140.GA15253@nevyn.them.org>
	 <e02bc66105041012091afdf306@mail.gmail.com>
Return-Path: <quekio@gmail.com>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 7673
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: quekio@gmail.com
Precedence: bulk
X-list: linux-mips
Content-Length: 209
Lines: 9

But if I use GCC with my assembler code, and I use a simple 'printf'
function, the assembler code I get is totally different than the
original one, so I cant debug it.

any other possibility?

thanks,

Sergio

From clem.taylor@gmail.com Sun Apr 10 23:16:24 2005
Received: with ECARTIS (v1.0.0; list linux-mips); Sun, 10 Apr 2005 23:16:42 +0100 (BST)
Received: from wproxy.gmail.com ([IPv6:::ffff:64.233.184.206]:39925 "EHLO
	wproxy.gmail.com") by linux-mips.org with ESMTP id <S8225999AbVDJWQY>;
	Sun, 10 Apr 2005 23:16:24 +0100
Received: by wproxy.gmail.com with SMTP id 57so1072820wri
        for <linux-mips@linux-mips.org>; Sun, 10 Apr 2005 15:16:18 -0700 (PDT)
DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws;
        s=beta; d=gmail.com;
        h=received:message-id:date:from:reply-to:to:subject:mime-version:content-type:content-transfer-encoding;
        b=Jb76gL8cgOFLhEQdkLO4JehHLq5lHxPmanN5japzh7zyTlJ60EoSpHjSeVrKkq+YxTaJ7iyavk1bHZytnY9RxVIdofkz1kmO+piiV9fghYBejp3TqBJjecLlfl465rD59jhDv9w3+UDDM+2H9CFlIPKmy5HpOtGXTl8envK7njo=
Received: by 10.54.24.9 with SMTP id 9mr417108wrx;
        Sun, 10 Apr 2005 15:16:17 -0700 (PDT)
Received: by 10.54.41.29 with HTTP; Sun, 10 Apr 2005 15:16:17 -0700 (PDT)
Message-ID: <ecb4efd10504101516482a9785@mail.gmail.com>
Date:	Sun, 10 Apr 2005 18:16:17 -0400
From:	Clem Taylor <clem.taylor@gmail.com>
Reply-To: Clem Taylor <clem.taylor@gmail.com>
To:	linux-mips@linux-mips.org
Subject: troubles mmaping PCI device on Au1550
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Return-Path: <clem.taylor@gmail.com>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 7674
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: clem.taylor@gmail.com
Precedence: bulk
X-list: linux-mips
Content-Length: 1767
Lines: 39

I'm working on a Au1550 driver for a PCI based co-processor. The
processor exports a 4Mbyte BAR that I want to mmap() into user space.
From inside the driver I can read and write to the BAR using an
address from ioremap_nocache(). I can read location with known values
and get back the expected data and with JTAG on the co-processor I saw
that data written from the 1550 really makes it into the PCI device.
From userspace with the llseek/read interface I can read the data well
known data and the data written by the driver.

However, I'm not having any luck getting mmap() to work. I must just
be mapping the wrong address... I tried a bunch of different
combinations of addresses, but so far I haven't had any luck getting
the mmap() to work.

The mmap() handler calls remap_pfn_range with a physical address
returned from pci_resource_start().

My driver code has something like:
remap_pfn_range ( vma, vma->vm_start,
     ( pci_resource_start ( pdev, BAR ) >> PAGE_SHIFT ) + vma->pgoff,
     vma->vm_end - vma->vm_start, vma->vm_page_prot );

vma->pgoff is zero, so this should map starting at the beginning of
the BAR. From user space, the data at the mmap()ed address isn't what
I was expecting.

For a sanity check, I tried using /dev/mem to mmap the PCI address as
returned by lspci. This seems to return similar, but not identical
data as my device driver. But it isn't what I was expecting.

I tried a similar test using /dev/mem and the address the linear
framebuffer on my desktop machine (as returned by lspci). The mapped
data matches the pixels on the first line (as reported by xmag).

Has anyone tried something like this on the Alchemy processors with a
recent kernel?

                          Many thanks,
                          Clem Taylor

From alexshinkin@hotmail.com Mon Apr 11 05:08:11 2005
Received: with ECARTIS (v1.0.0; list linux-mips); Mon, 11 Apr 2005 05:08:26 +0100 (BST)
Received: from bay15-f5.bay15.hotmail.com ([IPv6:::ffff:65.54.185.5]:58183
	"EHLO hotmail.com") by linux-mips.org with ESMTP
	id <S8224936AbVDKEIL>; Mon, 11 Apr 2005 05:08:11 +0100
Received: from mail pickup service by hotmail.com with Microsoft SMTPSVC;
	 Sun, 10 Apr 2005 21:08:04 -0700
Message-ID: <BAY15-F564283E78372BB36A999AAF320@phx.gbl>
Received: from 82.200.0.252 by by15fd.bay15.hotmail.msn.com with HTTP;
	Mon, 11 Apr 2005 04:08:03 GMT
X-Originating-IP: [82.200.0.252]
X-Originating-Email: [alexshinkin@hotmail.com]
X-Sender: alexshinkin@hotmail.com
In-Reply-To: <20050410230001Z8226002-1340+5508@linux-mips.org>
From:	"Alexey Shinkin" <alexshinkin@hotmail.com>
To:	linux-mips@linux-mips.org
Subject: RE: troubles mmaping PCI device on Au1550
Date:	Mon, 11 Apr 2005 11:08:03 +0700
Mime-Version: 1.0
Content-Type: text/plain; format=flowed
X-OriginalArrivalTime: 11 Apr 2005 04:08:04.0228 (UTC) FILETIME=[0F227440:01C53E4C]
Return-Path: <alexshinkin@hotmail.com>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 7675
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: alexshinkin@hotmail.com
Precedence: bulk
X-list: linux-mips
Content-Length: 629
Lines: 20


>Has anyone tried something like this on the Alchemy processors with a
>recent kernel?
>
>                           Many thanks,
>                           Clem Taylor

Hi !
Something like this works  on Au1550 with montavista kernel 2.4.20 . Dont 
know about more recent...

I use the followinng in  drivers'  mmap() :

vma->vm_page_prot = pgprot_noncached(vma->vm_page_prot);
remap_page_range(... , vma->vm_page_prot)

_________________________________________________________________
Express yourself instantly with MSN Messenger! Download today it's FREE! 
http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/


From mile.davidovic@micronasnit.com Mon Apr 11 11:14:38 2005
Received: with ECARTIS (v1.0.0; list linux-mips); Mon, 11 Apr 2005 11:14:54 +0100 (BST)
Received: from krt.tmd.ns.ac.yu ([IPv6:::ffff:147.91.177.65]:2025 "EHLO
	krt.neobee.net") by linux-mips.org with ESMTP id <S8226092AbVDKKOi>;
	Mon, 11 Apr 2005 11:14:38 +0100
Received: from localhost (localhost [127.0.0.1])
	by krt.neobee.net (8.12.7/8.12.7/SuSE Linux 0.6) with ESMTP id j3BAEBZF023537
	for <linux-mips@linux-mips.org>; Mon, 11 Apr 2005 12:14:16 +0200
Received: from krt.neobee.net ([127.0.0.1])
 by localhost (krt.neobee.net [127.0.0.1]) (amavisd-new, port 10024) with LMTP
 id 22496-08 for <linux-mips@linux-mips.org>;
 Mon, 11 Apr 2005 12:14:11 +0200 (CEST)
Received: from davidovic ([192.168.0.89])
	by krt.neobee.net (8.12.7/8.12.7/SuSE Linux 0.6) with ESMTP id j3BADt1p023510
	for <linux-mips@linux-mips.org>; Mon, 11 Apr 2005 12:14:03 +0200
Message-Id: <200504111014.j3BADt1p023510@krt.neobee.net>
Reply-To: <mile.davidovic@micronasnit.com>
From:	"Mile Davidovic" <mile.davidovic@micronasnit.com>
To:	"'Linux/MIPS Development'" <linux-mips@linux-mips.org>
Subject: Toolchain question
Date:	Mon, 11 Apr 2005 12:13:50 +0200
Organization: MicronasNIT
MIME-Version: 1.0
Content-Type: text/plain;
	charset="iso-8859-2"
Content-Transfer-Encoding: 7bit
X-Mailer: Microsoft Office Outlook, Build 11.0.6353
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2527
Thread-Index: AcU+fyfcpgEcgq/8RNW7uTSJdHqoTg==
X-Virus-Scanned: by amavisd-new at krt.neobee.net
Return-Path: <mile.davidovic@micronasnit.com>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 7676
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: mile.davidovic@micronasnit.com
Precedence: bulk
X-list: linux-mips
Content-Length: 874
Lines: 26

Hello all
I would like to port board (with MIPS 4kec) to latest linux 2.6 kernel.
Using porting guide 
from (http://www.linux-mips.org/wiki/index.php/Porting) I successfully made
console and
serial driver. But problem appears with first printk (in start_kernel) I got
exception.  

I used toolchain which uclibc buildroot script produced (gcc-3.4.2,
binutils-2.15.91.0.2),
and I am not sure is this correct combination.

From 
http://www.linux-mips.org/wiki/index.php/Toolchains I saw that next
recommendations:
1. SDE MIPS - unfortunately this is 2.9x compiler.
2. Mr. Rozycki offer only mipsel toolchain
3. Mr. Kegel's crosstool but from
http://kegel.com/crosstool/crosstool-0.31/buildlogs/ it seems that 
this toolchain is not good for MIPS.
4. Toolchain from ucLibc, I tried but I have trouble with.

So my question: which toolchains I have to use? 

Best regards Mile


From ralf@linux-mips.org Mon Apr 11 13:27:30 2005
Received: with ECARTIS (v1.0.0; list linux-mips); Mon, 11 Apr 2005 13:27:45 +0100 (BST)
Received: from extgw-uk.mips.com ([IPv6:::ffff:62.254.210.129]:52487 "EHLO
	bacchus.net.dhis.org") by linux-mips.org with ESMTP
	id <S8226098AbVDKM1a>; Mon, 11 Apr 2005 13:27:30 +0100
Received: from dea.linux-mips.net (localhost.localdomain [127.0.0.1])
	by bacchus.net.dhis.org (8.13.1/8.13.1) with ESMTP id j3BCROOb018903;
	Mon, 11 Apr 2005 13:27:24 +0100
Received: (from ralf@localhost)
	by dea.linux-mips.net (8.13.1/8.13.1/Submit) id j3BCROWU018902;
	Mon, 11 Apr 2005 13:27:24 +0100
Date:	Mon, 11 Apr 2005 13:27:24 +0100
From:	Ralf Baechle <ralf@linux-mips.org>
To:	Peter Horton <pdh@colonel-panic.org>
Cc:	linux-mips@linux-mips.org
Subject: Re: [PATCH Cobalt 1/3] fix hang on Qube2700 boot
Message-ID: <20050411122724.GU7038@linux-mips.org>
References: <20050410130635.GA20589@skeleton-jack>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <20050410130635.GA20589@skeleton-jack>
User-Agent: Mutt/1.4.1i
Return-Path: <ralf@linux-mips.org>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 7677
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: ralf@linux-mips.org
Precedence: bulk
X-list: linux-mips
Content-Length: 482
Lines: 12

On Sun, Apr 10, 2005 at 02:06:35PM +0100, Peter Horton wrote:

> The Qube2700 boot hangs because the old "prom" style console is
> unconditionally enabled. Drop the "prom" console code from the build. It
> would only be used if no "console=" line was supplied and in that case
> the current 8250 code defaults to using ttyS0 at 9600 anyway (assuming a
> port exists).

Ok, applied - but that leaves the unused arch/mips/cobalt/promcon.c around.
Guess it should die as well?

  Ralf

From ralf@linux-mips.org Mon Apr 11 13:42:56 2005
Received: with ECARTIS (v1.0.0; list linux-mips); Mon, 11 Apr 2005 13:43:10 +0100 (BST)
Received: from extgw-uk.mips.com ([IPv6:::ffff:62.254.210.129]:62742 "EHLO
	bacchus.net.dhis.org") by linux-mips.org with ESMTP
	id <S8226104AbVDKMm4>; Mon, 11 Apr 2005 13:42:56 +0100
Received: from dea.linux-mips.net (localhost.localdomain [127.0.0.1])
	by bacchus.net.dhis.org (8.13.1/8.13.1) with ESMTP id j3BCgo8A019546;
	Mon, 11 Apr 2005 13:42:50 +0100
Received: (from ralf@localhost)
	by dea.linux-mips.net (8.13.1/8.13.1/Submit) id j3BCgnOa019545;
	Mon, 11 Apr 2005 13:42:49 +0100
Date:	Mon, 11 Apr 2005 13:42:49 +0100
From:	Ralf Baechle <ralf@linux-mips.org>
To:	Peter Horton <pdh@colonel-panic.org>
Cc:	linux-mips@linux-mips.org
Subject: Re: [PATCH Cobalt 2/3] interrupt cleanup
Message-ID: <20050411124249.GA19115@linux-mips.org>
References: <20050410130850.GA20623@skeleton-jack>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <20050410130850.GA20623@skeleton-jack>
User-Agent: Mutt/1.4.1i
Return-Path: <ralf@linux-mips.org>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 7678
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: ralf@linux-mips.org
Precedence: bulk
X-list: linux-mips
Content-Length: 132
Lines: 7

On Sun, Apr 10, 2005 at 02:08:50PM +0100, Peter Horton wrote:

> Tidy up the Cobalt interrupt handling code.

Applied also,

  Ralf

From ralf@linux-mips.org Mon Apr 11 13:46:49 2005
Received: with ECARTIS (v1.0.0; list linux-mips); Mon, 11 Apr 2005 13:47:03 +0100 (BST)
Received: from extgw-uk.mips.com ([IPv6:::ffff:62.254.210.129]:44830 "EHLO
	bacchus.net.dhis.org") by linux-mips.org with ESMTP
	id <S8226104AbVDKMqt>; Mon, 11 Apr 2005 13:46:49 +0100
Received: from dea.linux-mips.net (localhost.localdomain [127.0.0.1])
	by bacchus.net.dhis.org (8.13.1/8.13.1) with ESMTP id j3BCkhc1019749;
	Mon, 11 Apr 2005 13:46:43 +0100
Received: (from ralf@localhost)
	by dea.linux-mips.net (8.13.1/8.13.1/Submit) id j3BCkhnf019748;
	Mon, 11 Apr 2005 13:46:43 +0100
Date:	Mon, 11 Apr 2005 13:46:43 +0100
From:	Ralf Baechle <ralf@linux-mips.org>
To:	Peter Horton <pdh@colonel-panic.org>
Cc:	linux-mips@linux-mips.org
Subject: Re: [PATCH Cobalt 3/3] add PCI retry error handler
Message-ID: <20050411124643.GB19115@linux-mips.org>
References: <20050410131137.GA20709@skeleton-jack>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <20050410131137.GA20709@skeleton-jack>
User-Agent: Mutt/1.4.1i
Return-Path: <ralf@linux-mips.org>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 7679
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: ralf@linux-mips.org
Precedence: bulk
X-list: linux-mips
Content-Length: 246
Lines: 9

On Sun, Apr 10, 2005 at 02:11:37PM +0100, Peter Horton wrote:

> Add PCI retry error handler. We can drop the check for the device #6
> from pci_range_ck() as we now get a diagnostic message and the kernel
> continues the boot.

Applied,

  Ralf

From pdh@colonel-panic.org Mon Apr 11 14:04:11 2005
Received: with ECARTIS (v1.0.0; list linux-mips); Mon, 11 Apr 2005 14:04:26 +0100 (BST)
Received: from no-dns-yet.demon.co.uk ([IPv6:::ffff:80.176.203.50]:2529 "EHLO
	pangolin.localnet") by linux-mips.org with ESMTP
	id <S8226106AbVDKNEL>; Mon, 11 Apr 2005 14:04:11 +0100
Received: from sprocket.localnet ([192.168.1.27])
	by pangolin.localnet with esmtp (Exim 3.35 #1 (Debian))
	id 1DKyaD-00015w-00; Mon, 11 Apr 2005 14:04:05 +0100
Message-ID: <425A75C2.80802@colonel-panic.org>
Date:	Mon, 11 Apr 2005 14:04:02 +0100
From:	Peter Horton <pdh@colonel-panic.org>
User-Agent: Mozilla Thunderbird 1.0 (Windows/20041206)
X-Accept-Language: en-us, en
MIME-Version: 1.0
To:	Ralf Baechle <ralf@linux-mips.org>
CC:	Peter Horton <pdh@colonel-panic.org>, linux-mips@linux-mips.org
Subject: Re: [PATCH Cobalt 1/3] fix hang on Qube2700 boot
References: <20050410130635.GA20589@skeleton-jack> <20050411122724.GU7038@linux-mips.org>
In-Reply-To: <20050411122724.GU7038@linux-mips.org>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Return-Path: <pdh@colonel-panic.org>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 7680
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: pdh@colonel-panic.org
Precedence: bulk
X-list: linux-mips
Content-Length: 635
Lines: 23

Ralf Baechle wrote:

>On Sun, Apr 10, 2005 at 02:06:35PM +0100, Peter Horton wrote:
>
>  
>
>>The Qube2700 boot hangs because the old "prom" style console is
>>unconditionally enabled. Drop the "prom" console code from the build. It
>>would only be used if no "console=" line was supplied and in that case
>>the current 8250 code defaults to using ttyS0 at 9600 anyway (assuming a
>>port exists).
>>    
>>
>
>Ok, applied - but that leaves the unused arch/mips/cobalt/promcon.c around.
>Guess it should die as well?
>
> 
>
Yep, probably. It was handy for debugging very early boot, but it's not 
worth cluttering the tree with it.

P.

From ralf@linux-mips.org Mon Apr 11 14:07:39 2005
Received: with ECARTIS (v1.0.0; list linux-mips); Mon, 11 Apr 2005 14:07:53 +0100 (BST)
Received: from extgw-uk.mips.com ([IPv6:::ffff:62.254.210.129]:61200 "EHLO
	bacchus.net.dhis.org") by linux-mips.org with ESMTP
	id <S8226106AbVDKNHj>; Mon, 11 Apr 2005 14:07:39 +0100
Received: from dea.linux-mips.net (localhost.localdomain [127.0.0.1])
	by bacchus.net.dhis.org (8.13.1/8.13.1) with ESMTP id j3BD7XrH020606;
	Mon, 11 Apr 2005 14:07:33 +0100
Received: (from ralf@localhost)
	by dea.linux-mips.net (8.13.1/8.13.1/Submit) id j3BD7Xx5020605;
	Mon, 11 Apr 2005 14:07:33 +0100
Date:	Mon, 11 Apr 2005 14:07:33 +0100
From:	Ralf Baechle <ralf@linux-mips.org>
To:	Peter Horton <pdh@colonel-panic.org>
Cc:	linux-mips@linux-mips.org
Subject: Re: [PATCH Cobalt 1/3] fix hang on Qube2700 boot
Message-ID: <20050411130733.GC19115@linux-mips.org>
References: <20050410130635.GA20589@skeleton-jack> <20050411122724.GU7038@linux-mips.org> <425A75C2.80802@colonel-panic.org>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <425A75C2.80802@colonel-panic.org>
User-Agent: Mutt/1.4.1i
Return-Path: <ralf@linux-mips.org>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 7681
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: ralf@linux-mips.org
Precedence: bulk
X-list: linux-mips
Content-Length: 431
Lines: 12

On Mon, Apr 11, 2005 at 02:04:02PM +0100, Peter Horton wrote:

> >Ok, applied - but that leaves the unused arch/mips/cobalt/promcon.c around.
> >Guess it should die as well?
> >
> Yep, probably. It was handy for debugging very early boot, but it's not 
> worth cluttering the tree with it.

Theese days it'd probably be a matter of days until one self-proclaimed
code police man's scripts would notice and send a patch ;-)

  Ralf

From ralf@linux-mips.org Mon Apr 11 14:38:48 2005
Received: with ECARTIS (v1.0.0; list linux-mips); Mon, 11 Apr 2005 14:39:03 +0100 (BST)
Received: from extgw-uk.mips.com ([IPv6:::ffff:62.254.210.129]:38174 "EHLO
	bacchus.net.dhis.org") by linux-mips.org with ESMTP
	id <S8226114AbVDKNis>; Mon, 11 Apr 2005 14:38:48 +0100
Received: from dea.linux-mips.net (localhost.localdomain [127.0.0.1])
	by bacchus.net.dhis.org (8.13.1/8.13.1) with ESMTP id j3BDcgNr021821;
	Mon, 11 Apr 2005 14:38:42 +0100
Received: (from ralf@localhost)
	by dea.linux-mips.net (8.13.1/8.13.1/Submit) id j3BDcfB7021820;
	Mon, 11 Apr 2005 14:38:41 +0100
Date:	Mon, 11 Apr 2005 14:38:41 +0100
From:	Ralf Baechle <ralf@linux-mips.org>
To:	Mile Davidovic <mile.davidovic@micronasnit.com>
Cc:	"'Linux/MIPS Development'" <linux-mips@linux-mips.org>
Subject: Re: Toolchain question
Message-ID: <20050411133841.GX7038@linux-mips.org>
References: <200504111014.j3BADt1p023510@krt.neobee.net>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <200504111014.j3BADt1p023510@krt.neobee.net>
User-Agent: Mutt/1.4.1i
Return-Path: <ralf@linux-mips.org>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 7682
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: ralf@linux-mips.org
Precedence: bulk
X-list: linux-mips
Content-Length: 1696
Lines: 51

On Mon, Apr 11, 2005 at 12:13:50PM +0200, Mile Davidovic wrote:
> From:	"Mile Davidovic" <mile.davidovic@micronasnit.com>
> To:	"'Linux/MIPS Development'" <linux-mips@linux-mips.org>
> Subject: Toolchain question
> Date:	Mon, 11 Apr 2005 12:13:50 +0200
> Content-Type: text/plain;
> 	charset="iso-8859-2"
> 
> Hello all
> I would like to port board (with MIPS 4kec) to latest linux 2.6 kernel.
> Using porting guide 
> from (http://www.linux-mips.org/wiki/index.php/Porting) I successfully made
> console and
> serial driver. But problem appears with first printk (in start_kernel) I got
> exception.  
> 
> I used toolchain which uclibc buildroot script produced (gcc-3.4.2,
> binutils-2.15.91.0.2),
> and I am not sure is this correct combination.
> 
> >From 
> http://www.linux-mips.org/wiki/index.php/Toolchains I saw that next
> recommendations:
> 1. SDE MIPS - unfortunately this is 2.9x compiler.

Which should be perfectly find for the kernel.  And no, SDE isn't really
a 2.96-based compiler with _vastly_ improved code generation for MIPS
processors.

Less than a week ago SDE 5 was released which is based on gcc 3.4 and
similarly contains a large number of mostly MIPS-specific improvments.

> 2. Mr. Rozycki offer only mipsel toolchain

Recompiling is easy.

> 3. Mr. Kegel's crosstool but from
> http://kegel.com/crosstool/crosstool-0.31/buildlogs/ it seems that 
> this toolchain is not good for MIPS.

Plenty of success reports to this list contradict it.

> 4. Toolchain from ucLibc, I tried but I have trouble with.

No idea about this one.

> So my question: which toolchains I have to use? 

Since you have problems with all of these you may want to describe those ...

  Ralf

From yuasa@hh.iij4u.or.jp Mon Apr 11 15:54:51 2005
Received: with ECARTIS (v1.0.0; list linux-mips); Mon, 11 Apr 2005 15:55:09 +0100 (BST)
Received: from mo01.iij4u.or.jp ([IPv6:::ffff:210.130.0.20]:23039 "EHLO
	mo01.iij4u.or.jp") by linux-mips.org with ESMTP id <S8226115AbVDKOyv>;
	Mon, 11 Apr 2005 15:54:51 +0100
Received: MO(mo01)id j3BEsjY9005909; Mon, 11 Apr 2005 23:54:45 +0900 (JST)
Received: MDO(mdo01) id j3BEsic8007943; Mon, 11 Apr 2005 23:54:45 +0900 (JST)
Received: 4UMRO01 id j3BEsird005894; Mon, 11 Apr 2005 23:54:44 +0900 (JST)
	from stratos (localhost [127.0.0.1]) (authenticated)
Date:	Mon, 11 Apr 2005 23:54:43 +0900
From:	Yoichi Yuasa <yuasa@hh.iij4u.or.jp>
To:	Ralf Baechle <ralf@linux-mips.org>
Cc:	yuasa@hh.iij4u.or.jp, linux-mips <linux-mips@linux-mips.org>
Subject: [PATCH 2.6] vr41xx: bcu update
Message-Id: <20050411235443.2f80fe64.yuasa@hh.iij4u.or.jp>
X-Mailer: Sylpheed version 1.0.4 (GTK+ 1.2.10; i386-pc-linux-gnu)
Mime-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Return-Path: <yuasa@hh.iij4u.or.jp>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 7683
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: yuasa@hh.iij4u.or.jp
Precedence: bulk
X-list: linux-mips
Content-Length: 2806
Lines: 93

This patch had added EXPORT_SYMBOL() and had removed early_initcall().

Yoichi

Signed-off-by: Yoichi Yuasa <yuasa@hh.iij4u.or.jp>

diff -urN -X dontdiff c-orig/arch/mips/vr41xx/common/bcu.c c/arch/mips/vr41xx/common/bcu.c
--- c-orig/arch/mips/vr41xx/common/bcu.c	Thu Dec  2 13:56:02 2004
+++ c/arch/mips/vr41xx/common/bcu.c	Sat Apr  9 23:28:45 2005
@@ -3,7 +3,7 @@
  *
  *  Copyright (C) 2002  MontaVista Software Inc.
  *    Author: Yoichi Yuasa <yyuasa@mvista.com, or source@mvista.com>
- *  Copyright (C) 2003-2004  Yoichi Yuasa <yuasa@hh.iij4u.or.jp>
+ *  Copyright (C) 2003-2005  Yoichi Yuasa <yuasa@hh.iij4u.or.jp>
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
@@ -28,20 +28,16 @@
  *  Yoichi Yuasa <yuasa@hh.iij4u.or.jp>
  *  - Added support for NEC VR4133.
  */
-#include <linux/init.h>
-#include <linux/ioport.h>
 #include <linux/kernel.h>
+#include <linux/module.h>
 #include <linux/smp.h>
 #include <linux/types.h>
 
 #include <asm/cpu.h>
 #include <asm/io.h>
 
-#define IO_MEM_RESOURCE_START	0UL
-#define IO_MEM_RESOURCE_END	0x1fffffffUL
-
-#define CLKSPEEDREG_TYPE1	KSEG1ADDR(0x0b000014)
-#define CLKSPEEDREG_TYPE2	KSEG1ADDR(0x0f000014)
+#define CLKSPEEDREG_TYPE1	(void __iomem *)KSEG1ADDR(0x0b000014)
+#define CLKSPEEDREG_TYPE2	(void __iomem *)KSEG1ADDR(0x0f000014)
  #define CLKSP(x)		((x) & 0x001f)
  #define CLKSP_VR4133(x)	((x) & 0x0007)
 
@@ -63,11 +59,15 @@
 	return vr41xx_vtclock;
 }
 
+EXPORT_SYMBOL_GPL(vr41xx_get_vtclock_frequency);
+
 unsigned long vr41xx_get_tclock_frequency(void)
 {
 	return vr41xx_tclock;
 }
 
+EXPORT_SYMBOL_GPL(vr41xx_get_tclock_frequency);
+
 static inline uint16_t read_clkspeed(void)
 {
 	switch (current_cpu_data.cputype) {
@@ -207,7 +207,7 @@
 	return tclock;
 }
 
-static int __init vr41xx_bcu_init(void)
+void vr41xx_calculate_clock_frequency(void)
 {
 	unsigned long pclock;
 	uint16_t clkspeed;
@@ -217,11 +217,6 @@
 	pclock = calculate_pclock(clkspeed);
 	vr41xx_vtclock = calculate_vtclock(clkspeed, pclock);
 	vr41xx_tclock = calculate_tclock(clkspeed, pclock, vr41xx_vtclock);
-
-	iomem_resource.start = IO_MEM_RESOURCE_START;
-	iomem_resource.end = IO_MEM_RESOURCE_END;
-
-	return 0;
 }
 
-early_initcall(vr41xx_bcu_init);
+EXPORT_SYMBOL_GPL(vr41xx_calculate_clock_frequency);
diff -urN -X dontdiff c-orig/include/asm-mips/vr41xx/vr41xx.h c/include/asm-mips/vr41xx/vr41xx.h
--- c-orig/include/asm-mips/vr41xx/vr41xx.h	Tue Mar  8 08:11:27 2005
+++ c/include/asm-mips/vr41xx/vr41xx.h	Sat Apr  9 23:29:46 2005
@@ -45,6 +45,7 @@
 /*
  * Bus Control Uint
  */
+extern unsigned long vr41xx_calculate_clock_frequency(void);
 extern unsigned long vr41xx_get_vtclock_frequency(void);
 extern unsigned long vr41xx_get_tclock_frequency(void);
 



From danieljlaird@hotmail.com Mon Apr 11 16:57:53 2005
Received: with ECARTIS (v1.0.0; list linux-mips); Mon, 11 Apr 2005 16:58:10 +0100 (BST)
Received: from bay101-f5.bay101.hotmail.com ([IPv6:::ffff:64.4.56.15]:48186
	"EHLO hotmail.com") by linux-mips.org with ESMTP
	id <S8226117AbVDKP5x>; Mon, 11 Apr 2005 16:57:53 +0100
Received: from mail pickup service by hotmail.com with Microsoft SMTPSVC;
	 Mon, 11 Apr 2005 08:57:45 -0700
Message-ID: <BAY101-F54440B7BD61E4D879501FDC320@phx.gbl>
Received: from 64.4.56.208 by by101fd.bay101.hotmail.msn.com with HTTP;
	Mon, 11 Apr 2005 15:57:44 GMT
X-Originating-IP: [64.4.56.208]
X-Originating-Email: [danieljlaird@hotmail.com]
X-Sender: danieljlaird@hotmail.com
From:	"Daniel Laird" <danieljlaird@hotmail.com>
To:	macro@linux-mips.org
Cc:	libc-alpha@sources.redhat.com, linux-mips@linux-mips.org
Subject: Re: Building GLIBC 2.3.4 on MIPS
Date:	Mon, 11 Apr 2005 15:57:44 +0000
Mime-Version: 1.0
Content-Type: text/plain; format=flowed
X-OriginalArrivalTime: 11 Apr 2005 15:57:45.0140 (UTC) FILETIME=[3355FF40:01C53EAF]
Return-Path: <danieljlaird@hotmail.com>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 7684
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: danieljlaird@hotmail.com
Precedence: bulk
X-list: linux-mips
Content-Length: 504
Lines: 17

I am trying to build glibc-2.3.4 (gcc-3.4.3, binutils-2.15.96) with 
linux-2.6.11.6 on mips.

I am having problems with bits/syscalls.h whereas yours seem to be empty 
mine just does not exist???
Any reason for this?
I have applied your patches but they do not seem to correct this error have 
you seen this.

Its just that when i try to compile busybox i get an error as bits/syscall.h 
is missing and obviously means my cross compiler toolchain is not quite 
correct.

Hope you can help
Daniel Laird



From ralf@linux-mips.org Mon Apr 11 17:06:08 2005
Received: with ECARTIS (v1.0.0; list linux-mips); Mon, 11 Apr 2005 17:06:24 +0100 (BST)
Received: from extgw-uk.mips.com ([IPv6:::ffff:62.254.210.129]:29446 "EHLO
	bacchus.net.dhis.org") by linux-mips.org with ESMTP
	id <S8226119AbVDKQGI>; Mon, 11 Apr 2005 17:06:08 +0100
Received: from dea.linux-mips.net (localhost.localdomain [127.0.0.1])
	by bacchus.net.dhis.org (8.13.1/8.13.1) with ESMTP id j3BG60e5027709;
	Mon, 11 Apr 2005 17:06:00 +0100
Received: (from ralf@localhost)
	by dea.linux-mips.net (8.13.1/8.13.1/Submit) id j3BG5wAh027708;
	Mon, 11 Apr 2005 17:05:58 +0100
Date:	Mon, 11 Apr 2005 17:05:58 +0100
From:	Ralf Baechle <ralf@linux-mips.org>
To:	Yoichi Yuasa <yuasa@hh.iij4u.or.jp>
Cc:	linux-mips <linux-mips@linux-mips.org>
Subject: Re: [PATCH 2.6] vr41xx: bcu update
Message-ID: <20050411160558.GG7038@linux-mips.org>
References: <20050411235443.2f80fe64.yuasa@hh.iij4u.or.jp>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <20050411235443.2f80fe64.yuasa@hh.iij4u.or.jp>
User-Agent: Mutt/1.4.1i
Return-Path: <ralf@linux-mips.org>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 7685
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: ralf@linux-mips.org
Precedence: bulk
X-list: linux-mips
Content-Length: 170
Lines: 7

On Mon, Apr 11, 2005 at 11:54:43PM +0900, Yoichi Yuasa wrote:

> This patch had added EXPORT_SYMBOL() and had removed early_initcall().

Applied.  Thanks Yoichi,

  Ralf

From macro@linux-mips.org Mon Apr 11 17:08:18 2005
Received: with ECARTIS (v1.0.0; list linux-mips); Mon, 11 Apr 2005 17:08:34 +0100 (BST)
Received: from pollux.ds.pg.gda.pl ([IPv6:::ffff:153.19.208.7]:53765 "EHLO
	pollux.ds.pg.gda.pl") by linux-mips.org with ESMTP
	id <S8226119AbVDKQIS>; Mon, 11 Apr 2005 17:08:18 +0100
Received: from localhost (localhost [127.0.0.1])
	by pollux.ds.pg.gda.pl (Postfix) with ESMTP
	id 177B8E1C65; Mon, 11 Apr 2005 18:07:52 +0200 (CEST)
Received: from pollux.ds.pg.gda.pl ([127.0.0.1])
 by localhost (pollux [127.0.0.1]) (amavisd-new, port 10024) with ESMTP
 id 03652-07; Mon, 11 Apr 2005 18:07:51 +0200 (CEST)
Received: from piorun.ds.pg.gda.pl (piorun.ds.pg.gda.pl [153.19.208.8])
	by pollux.ds.pg.gda.pl (Postfix) with ESMTP
	id D2C59E1C63; Mon, 11 Apr 2005 18:07:51 +0200 (CEST)
Received: from blysk.ds.pg.gda.pl (macro@blysk.ds.pg.gda.pl [153.19.208.6])
	by piorun.ds.pg.gda.pl (8.13.1/8.13.1) with ESMTP id j3BG7tFr014699;
	Mon, 11 Apr 2005 18:07:55 +0200
Date:	Mon, 11 Apr 2005 17:08:04 +0100 (BST)
From:	"Maciej W. Rozycki" <macro@linux-mips.org>
To:	Daniel Laird <danieljlaird@hotmail.com>
Cc:	libc-alpha@sources.redhat.com, linux-mips@linux-mips.org
Subject: Re: Building GLIBC 2.3.4 on MIPS
In-Reply-To: <BAY101-F54440B7BD61E4D879501FDC320@phx.gbl>
Message-ID: <Pine.LNX.4.61L.0504111659410.31547@blysk.ds.pg.gda.pl>
References: <BAY101-F54440B7BD61E4D879501FDC320@phx.gbl>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Virus-Scanned: ClamAV version 0.83, clamav-milter version 0.83 on piorun.ds.pg.gda.pl
X-Virus-Status:	Clean
X-Virus-Scanned: by amavisd-new at pollux.ds.pg.gda.pl
Return-Path: <macro@linux-mips.org>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 7686
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: macro@linux-mips.org
Precedence: bulk
X-list: linux-mips
Content-Length: 745
Lines: 23

On Mon, 11 Apr 2005, Daniel Laird wrote:

> I am trying to build glibc-2.3.4 (gcc-3.4.3, binutils-2.15.96) with
> linux-2.6.11.6 on mips.

 You may consider glibc 2.3.5.

> I am having problems with bits/syscalls.h whereas yours seem to be empty mine
> just does not exist???

 Can I ask you which package are you specifically referring to?  Perhaps 
you've picked an outdated one.

> Any reason for this?
> I have applied your patches but they do not seem to correct this error have
> you seen this.

 There used to be problems with <bits/syscalls.h> generation, which, 
depending on the exact version of Linux headers supplied, could be 
triggered or not.  They are supposed to be fixed in 2.3.5 (credit goes 
to Richard Sandiford).

  Maciej

From ralf@linux-mips.org Mon Apr 11 17:09:56 2005
Received: with ECARTIS (v1.0.0; list linux-mips); Mon, 11 Apr 2005 17:10:11 +0100 (BST)
Received: from extgw-uk.mips.com ([IPv6:::ffff:62.254.210.129]:59148 "EHLO
	bacchus.net.dhis.org") by linux-mips.org with ESMTP
	id <S8226119AbVDKQJ4>; Mon, 11 Apr 2005 17:09:56 +0100
Received: from dea.linux-mips.net (localhost.localdomain [127.0.0.1])
	by bacchus.net.dhis.org (8.13.1/8.13.1) with ESMTP id j3BG9lcc027870;
	Mon, 11 Apr 2005 17:09:47 +0100
Received: (from ralf@localhost)
	by dea.linux-mips.net (8.13.1/8.13.1/Submit) id j3BG9lKZ027869;
	Mon, 11 Apr 2005 17:09:47 +0100
Date:	Mon, 11 Apr 2005 17:09:47 +0100
From:	Ralf Baechle <ralf@linux-mips.org>
To:	Sergio Ruiz <quekio@gmail.com>
Cc:	linux-mips@linux-mips.org
Subject: Re: Linking assembled PIC code with Linux libc library
Message-ID: <20050411160947.GH7038@linux-mips.org>
References: <e02bc66105040905091efb3dc6@mail.gmail.com> <20050409134919.GA4738@nevyn.them.org> <e02bc661050409113820cceae3@mail.gmail.com> <20050409215140.GA15253@nevyn.them.org> <e02bc66105041012091afdf306@mail.gmail.com> <e02bc661050410122733e21927@mail.gmail.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <e02bc661050410122733e21927@mail.gmail.com>
User-Agent: Mutt/1.4.1i
Return-Path: <ralf@linux-mips.org>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 7687
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: ralf@linux-mips.org
Precedence: bulk
X-list: linux-mips
Content-Length: 425
Lines: 11

On Sun, Apr 10, 2005 at 09:27:58PM +0200, Sergio Ruiz wrote:

> But if I use GCC with my assembler code, and I use a simple 'printf'
> function, the assembler code I get is totally different than the
> original one, so I cant debug it.

Sounds like you're being surprised by the gcc 3.4 optimization where gcc
may replace certain functions such as printf with a whole sequence of
calls to more basic stdio functions?

  Ralf

From danieljlaird@hotmail.com Mon Apr 11 17:26:16 2005
Received: with ECARTIS (v1.0.0; list linux-mips); Mon, 11 Apr 2005 17:26:31 +0100 (BST)
Received: from bay101-f34.bay101.hotmail.com ([IPv6:::ffff:64.4.56.44]:60829
	"EHLO hotmail.com") by linux-mips.org with ESMTP
	id <S8226124AbVDKQ0Q>; Mon, 11 Apr 2005 17:26:16 +0100
Received: from mail pickup service by hotmail.com with Microsoft SMTPSVC;
	 Mon, 11 Apr 2005 09:26:09 -0700
Message-ID: <BAY101-F34FE6C8FFEB4555FB1EE0BDC320@phx.gbl>
Received: from 64.4.56.208 by by101fd.bay101.hotmail.msn.com with HTTP;
	Mon, 11 Apr 2005 16:26:08 GMT
X-Originating-IP: [64.4.56.208]
X-Originating-Email: [danieljlaird@hotmail.com]
X-Sender: danieljlaird@hotmail.com
From:	"Daniel Laird" <danieljlaird@hotmail.com>
To:	linux-mips@linux-mips.org
Subject: Building Glibc-2.3.4 for mipsel
Date:	Mon, 11 Apr 2005 16:26:08 +0000
Mime-Version: 1.0
Content-Type: text/plain; format=flowed
X-OriginalArrivalTime: 11 Apr 2005 16:26:09.0028 (UTC) FILETIME=[2AEEAC40:01C53EB3]
Return-Path: <danieljlaird@hotmail.com>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 7688
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: danieljlaird@hotmail.com
Precedence: bulk
X-list: linux-mips
Content-Length: 1090
Lines: 36

I am trying to get Glibc-2.3.4 to build for mipsel.

I am using crosstool to help me do this
I am using 2.6.11.6 kernel
I am using 2.15.96 binutils
I am using Glibc-2.3.4
I am using 3.4.3 Gcc

I try to compile it and i get a problem in the install-headers target where 
it tries to pass -mabi=32 to a host compile.  This will obviously not work.

To get round this i comment out the offending line in 
sysdeps/mips/mips32/Makefile.

And pass in EXTRA_TARGET_CFLAGS="-mips32 -mtune=r4600"

This succesfuly builds me a toolchain and a kernel and the kernel runs on my 
target

I then try to compile BUSYBox-1.00 and it errors with a missing 
bits/syscall.h.  I check and it is correct this is missing .
I have seen some patches to do in this area and have tried them all but it 
makes no difference.

Has anyone used crosstool and GLibc-2-3-4 etc and built a tollchain where 
bits/syscall.h exists?

I think the problem may lie in my editing of the makefile before 
install-headers and then the editing it back.  But i want to know if anyone 
has done what i am trying.

Please help!!

DJL



From danieljlaird@hotmail.com Mon Apr 11 17:33:33 2005
Received: with ECARTIS (v1.0.0; list linux-mips); Mon, 11 Apr 2005 17:33:48 +0100 (BST)
Received: from bay101-f10.bay101.hotmail.com ([IPv6:::ffff:64.4.56.20]:59732
	"EHLO hotmail.com") by linux-mips.org with ESMTP
	id <S8226124AbVDKQdd>; Mon, 11 Apr 2005 17:33:33 +0100
Received: from mail pickup service by hotmail.com with Microsoft SMTPSVC;
	 Mon, 11 Apr 2005 09:33:25 -0700
Message-ID: <BAY101-F104C615D4EA1DBF2A3064DDC320@phx.gbl>
Received: from 64.4.56.208 by by101fd.bay101.hotmail.msn.com with HTTP;
	Mon, 11 Apr 2005 16:33:25 GMT
X-Originating-IP: [64.4.56.208]
X-Originating-Email: [danieljlaird@hotmail.com]
X-Sender: danieljlaird@hotmail.com
In-Reply-To: <Pine.LNX.4.61L.0504111659410.31547@blysk.ds.pg.gda.pl>
From:	"Daniel Laird" <danieljlaird@hotmail.com>
To:	macro@linux-mips.org
Cc:	libc-alpha@sources.redhat.com, linux-mips@linux-mips.org
Subject: Re: Building GLIBC 2.3.4 on MIPS
Date:	Mon, 11 Apr 2005 16:33:25 +0000
Mime-Version: 1.0
Content-Type: text/plain; format=flowed
X-OriginalArrivalTime: 11 Apr 2005 16:33:25.0434 (UTC) FILETIME=[2F0CF1A0:01C53EB4]
Return-Path: <danieljlaird@hotmail.com>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 7689
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: danieljlaird@hotmail.com
Precedence: bulk
X-list: linux-mips
Content-Length: 1284
Lines: 34

I am using crosstool to help me build!

I have a problem when i compile that it seems to include a file 
sysdeps/mips/mips32/Makefile.  This has the option -mabi=32.  When it does 
the install-headers target in crosstool it passes this flag to the host 
compiler.  This causes an error.

I get around this my removing this flag for the install header target and 
then putting it back for the rest of the crosstool script.

this results in a complete toolchain and a 2.6.11.6 kernel which is running 
on my target.

I then try to build busybox1.00 and i get the error
In file included from 
/home/laird/ccm_wa/ipstb/ipstb_laird/ipstb/build/packages/busybox-1.00/libbb/module_syscalls.c:26:
/opt/nxlinux/gcc/gcc-3.4.3-glibc-2.3.4/lib/gcc/mipsel-linux-gnu/3.4.3/../../../../mipsel-linux-gnu/sys-include/sys/syscall.h:39:27: 
bits/syscall.h: No such file or directory
make[1]: *** 
[/home/laird/ccm_wa/ipstb/ipstb_laird/ipstb/build/packages/busybox-1.00/libbb/module_syscalls.o] 
Error 1
make[1]: Leaving directory 
`/home/laird/ccm_wa/ipstb/ipstb_laird/ipstb/build/packages/busybox-1.00'

When i check it is missing.

I am presuming my hack to get the install-headers target may be breaking 
things but how else do i get round this.

Are you guys using crosstool?

Thanks for the help



From maillist@jg555.com Mon Apr 11 18:04:19 2005
Received: with ECARTIS (v1.0.0; list linux-mips); Mon, 11 Apr 2005 18:04:35 +0100 (BST)
Received: from 64-30-195-78.dsl.linkline.com ([IPv6:::ffff:64.30.195.78]:24978
	"EHLO jg555.com") by linux-mips.org with ESMTP id <S8226126AbVDKRET>;
	Mon, 11 Apr 2005 18:04:19 +0100
Received: from [172.16.0.55] ([::ffff:172.16.0.55])
  (AUTH: PLAIN root, TLS: TLSv1/SSLv3,256bits,AES256-SHA)
  by jg555.com with esmtp; Mon, 11 Apr 2005 10:04:15 -0700
  id 001E0181.425AAE0F.0000412E
Message-ID: <425AAE00.9080406@jg555.com>
Date:	Mon, 11 Apr 2005 10:04:00 -0700
From:	Jim Gifford <maillist@jg555.com>
User-Agent: Mozilla Thunderbird 1.0 (Windows/20041206)
X-Accept-Language: en-us, en
MIME-Version: 1.0
To:	Daniel Laird <danieljlaird@hotmail.com>
CC:	linux-mips@linux-mips.org
Subject: Re: Building Glibc-2.3.4 for mipsel
References: <BAY101-F34FE6C8FFEB4555FB1EE0BDC320@phx.gbl>
In-Reply-To: <BAY101-F34FE6C8FFEB4555FB1EE0BDC320@phx.gbl>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Return-Path: <maillist@jg555.com>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 7690
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: maillist@jg555.com
Precedence: bulk
X-list: linux-mips
Content-Length: 602
Lines: 22

Daniel,
   I have gotten this to work, using my build method from LFS. There are 
a few patches needed, here is my information about the patches location.

http://documents.jg555.com/lfs-raq2
http://documents.jg555.com/lfs-raq2/chapter03/patches.html

The patches in particular are

http://www.linuxfromscratch.org/patches/downloads/linux-libc-headers/linux-libc-headers-2.6.11.2-mips_fix-1.patch 

This fixes a compile issue with sysklogd

http://www.linuxfromscratch.org/patches/downloads/glibc/glibc-2.3.4-mips_syscall-2.patch
Fixes various syscall issues


-- 
----
Jim Gifford
maillist@jg555.com


From maillist@jg555.com Mon Apr 11 18:14:22 2005
Received: with ECARTIS (v1.0.0; list linux-mips); Mon, 11 Apr 2005 18:14:39 +0100 (BST)
Received: from 64-30-195-78.dsl.linkline.com ([IPv6:::ffff:64.30.195.78]:44946
	"EHLO jg555.com") by linux-mips.org with ESMTP id <S8226126AbVDKROW>;
	Mon, 11 Apr 2005 18:14:22 +0100
Received: from [172.16.0.55] ([::ffff:172.16.0.55])
  (AUTH: PLAIN root, TLS: TLSv1/SSLv3,256bits,AES256-SHA)
  by jg555.com with esmtp; Mon, 11 Apr 2005 10:14:19 -0700
  id 001E0180.425AB06B.00004204
Message-ID: <425AB05B.4010403@jg555.com>
Date:	Mon, 11 Apr 2005 10:14:03 -0700
From:	Jim Gifford <maillist@jg555.com>
User-Agent: Mozilla Thunderbird 1.0 (Windows/20041206)
X-Accept-Language: en-us, en
Mime-Version: 1.0
Content-Type: multipart/mixed; boundary="=_server-16900-1113239659-0001-2"
To:	Linux MIPS List <linux-mips@linux-mips.org>
Subject: [Patch] : Tulip - fixes compile on MIPS64
Return-Path: <maillist@jg555.com>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 7691
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: maillist@jg555.com
Precedence: bulk
X-list: linux-mips
Content-Length: 5770
Lines: 167

This is a MIME-formatted message.  If you see this text it means that your
E-mail software does not support MIME-formatted messages.

--=_server-16900-1113239659-0001-2
Content-Type: text/plain; charset=iso-8859-1; format=flowed
Content-Transfer-Encoding: 7bit

I have been working on getting the RaQ2 to build using 64 bit. I ran 
into numerous issues. After I got the kernel to compile, the tulip 
driver didn't work. It kept showing error messages like
tulip_stop_rxtx() failed

This patch fixes the compile issue, this patch was create by Grant 
Grundler of linux-parsic. This patch matches the tulip driver follow the 
specs laid out by the manufacture. On 32 bit this patch seemed to make 
the tulip more responsive on my RaQ2 systems.


-- 
----
Jim Gifford
maillist@jg555.com


--=_server-16900-1113239659-0001-2
Content-Type: text/x-diff; name="tulip-mips.patch"; charset=iso-8859-1
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
 filename="tulip-mips.patch"

diff -Naurp linux.orig/drivers/net/tulip/de2104x.c linux/drivers/net/tulip/de2104x.c
--- linux.orig/drivers/net/tulip/de2104x.c	2005-03-18 09:37:38.000000000 -0800
+++ linux/drivers/net/tulip/de2104x.c	2005-04-01 20:10:25.323550440 -0800
@@ -1787,15 +1787,10 @@ static void __init de21041_get_srom_info
 	/* DEC now has a specification but early board makers
 	   just put the address in the first EEPROM locations. */
 	/* This does  memcmp(eedata, eedata+16, 8) */
-
-#ifndef CONFIG_MIPS_COBALT
-
 	for (i = 0; i < 8; i ++)
 		if (ee_data[i] != ee_data[16+i])
 			sa_offset = 20;
 
-#endif
-
 	/* store MAC address */
 	for (i = 0; i < 6; i ++)
 		de->dev->dev_addr[i] = ee_data[i + sa_offset];
@@ -1932,7 +1927,7 @@ bad_srom:
 	goto fill_defaults;
 }
 
-static int __init de_init_one (struct pci_dev *pdev,
+static int __devinit de_init_one (struct pci_dev *pdev,
 				  const struct pci_device_id *ent)
 {
 	struct net_device *dev;
diff -Naurp linux.orig/drivers/net/tulip/de4x5.c linux/drivers/net/tulip/de4x5.c
--- linux.orig/drivers/net/tulip/de4x5.c	2005-03-18 09:37:38.000000000 -0800
+++ linux/drivers/net/tulip/de4x5.c	2005-04-01 20:10:25.854469728 -0800
@@ -2124,7 +2124,6 @@ static struct eisa_driver de4x5_eisa_dri
                 .remove  = __devexit_p (de4x5_eisa_remove),
         }
 };
-MODULE_DEVICE_TABLE(eisa, de4x5_eisa_ids);
 #endif
 
 #ifdef CONFIG_PCI
diff -Naurp linux.orig/drivers/net/tulip/media.c linux/drivers/net/tulip/media.c
--- linux.orig/drivers/net/tulip/media.c	2005-03-18 09:37:38.000000000 -0800
+++ linux/drivers/net/tulip/media.c	2005-04-01 20:10:26.553363480 -0800
@@ -44,8 +44,10 @@ static const unsigned char comet_miireg2
 
 /* MII transceiver control section.
    Read and write the MII registers using software-generated serial
-   MDIO protocol.  See the MII specifications or DP83840A data sheet
-   for details. */
+   MDIO protocol.
+   See IEEE 802.3-2002.pdf (Section 2, Chapter "22.2.4 Management functions")
+   or DP83840A data sheet for more details.
+   */
 
 int tulip_mdio_read(struct net_device *dev, int phy_id, int location)
 {
@@ -307,13 +309,29 @@ void tulip_select_media(struct net_devic
 				int reset_length = p[2 + init_length];
 				misc_info = (u16*)(reset_sequence + reset_length);
 				if (startup) {
+					int timeout = 10;	/* max 1 ms */
 					iowrite32(mtable->csr12dir | 0x100, ioaddr + CSR12);
 					for (i = 0; i < reset_length; i++)
 						iowrite32(reset_sequence[i], ioaddr + CSR12);
+
+					/* flush posted writes */
+					ioread32(ioaddr + CSR12);
+
+					/* Sect 3.10.3 in DP83840A.pdf (p39) */
+					udelay(500);
+
+					/* Section 4.2 in DP83840A.pdf (p43) */
+					/* and IEEE 802.3 "22.2.4.1.1 Reset" */
+					while (timeout-- &&
+						(tulip_mdio_read (dev, phy_num, MII_BMCR) & BMCR_RESET))
+						udelay(100);
 				}
 				for (i = 0; i < init_length; i++)
 					iowrite32(init_sequence[i], ioaddr + CSR12);
+
+				ioread32(ioaddr + CSR12);	/* flush posted writes */
 			}
+
 			tmp_info = get_u16(&misc_info[1]);
 			if (tmp_info)
 				tp->advertising[phy_num] = tmp_info | 1;
@@ -399,9 +417,6 @@ void tulip_select_media(struct net_devic
 	}
 
 	tp->csr6 = new_csr6 | (tp->csr6 & 0xfdff) | (tp->full_duplex ? 0x0200 : 0);
-
-	udelay(1000);
-
 	return;
 }
 
diff -Naurp linux.orig/drivers/net/tulip/tulip_core.c linux/drivers/net/tulip/tulip_core.c
--- linux.orig/drivers/net/tulip/tulip_core.c	2005-03-18 09:37:38.000000000 -0800
+++ linux/drivers/net/tulip/tulip_core.c	2005-04-01 20:10:27.003295080 -0800
@@ -22,7 +22,7 @@
 #else
 #define DRV_VERSION	"1.1.13"
 #endif
-#define DRV_RELDATE	"May 11, 2002"
+#define DRV_RELDATE	"December 15, 2004"
 
 
 #include <linux/module.h>
@@ -1514,8 +1514,8 @@ static int __devinit tulip_init_one (str
                     (PCI_SLOT(pdev->devfn) == 12))) {
                        /* Cobalt MAC address in first EEPROM locations. */
                        sa_offset = 0;
-		       /* Ensure our media table fixup get's applied */
-		       memcpy(ee_data + 16, ee_data, 8);
+                       /* No media table either */
+                       tp->flags &= ~HAS_MEDIA_TABLE;
                }
 #endif
 #ifdef CONFIG_GSC
diff -Naurp linux.orig/drivers/net/tulip/tulip.h linux/drivers/net/tulip/tulip.h
--- linux.orig/drivers/net/tulip/tulip.h	2005-03-18 09:37:38.000000000 -0800
+++ linux/drivers/net/tulip/tulip.h	2005-04-01 20:10:26.851318184 -0800
@@ -475,8 +475,11 @@ static inline void tulip_stop_rxtx(struc
 			udelay(10);
 
 		if (!i)
-			printk(KERN_DEBUG "%s: tulip_stop_rxtx() failed\n",
-					pci_name(tp->pdev));
+			printk(KERN_DEBUG "%s: tulip_stop_rxtx() failed"
+					" (CSR5 0x%x CSR6 0x%x)\n",
+					pci_name(tp->pdev),
+					ioread32(ioaddr + CSR5),
+					ioread32(ioaddr + CSR6));
 	}
 }
 

--=_server-16900-1113239659-0001-2--

From greg.weeks@timesys.com Mon Apr 11 20:47:15 2005
Received: with ECARTIS (v1.0.0; list linux-mips); Mon, 11 Apr 2005 20:47:31 +0100 (BST)
Received: from mail.timesys.com ([IPv6:::ffff:65.117.135.102]:37163 "EHLO
	exchange.timesys.com") by linux-mips.org with ESMTP
	id <S8226134AbVDKTrP>; Mon, 11 Apr 2005 20:47:15 +0100
Received: from [192.168.2.27] ([192.168.2.27]) by exchange.timesys.com with Microsoft SMTPSVC(5.0.2195.6713);
	 Mon, 11 Apr 2005 15:42:51 -0400
Message-ID: <425AD440.5050600@timesys.com>
Date:	Mon, 11 Apr 2005 15:47:12 -0400
From:	Greg Weeks <greg.weeks@timesys.com>
User-Agent: Mozilla Thunderbird 1.0 (X11/20041206)
X-Accept-Language: en-us, en
MIME-Version: 1.0
To:	Ralf Baechle <ralf@linux-mips.org>
CC:	linux-mips@linux-mips.org
Subject: Re: another 4kc machine check.
References: <42553E49.7080004@timesys.com> <4256991C.4020601@timesys.com> <20050408161357.GB19166@linux-mips.org> <4256B524.2080509@timesys.com>
In-Reply-To: <4256B524.2080509@timesys.com>
Content-Type: multipart/mixed;
 boundary="------------040309050204000803030403"
X-OriginalArrivalTime: 11 Apr 2005 19:42:51.0250 (UTC) FILETIME=[A59AD520:01C53ECE]
Return-Path: <greg.weeks@timesys.com>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 7692
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: greg.weeks@timesys.com
Precedence: bulk
X-list: linux-mips
Content-Length: 880
Lines: 37

This is a multi-part message in MIME format.
--------------040309050204000803030403
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit

This patch appears to fix my machine check problem on the 4kc. The 4kc 
shouldn't need an ssnop here, but this appears to fix it.

Greg Weeks

--------------040309050204000803030403
Content-Type: text/x-patch;
 name="mips.4kc.tlb.patch"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
 filename="mips.4kc.tlb.patch"

--- mips-malta4kcle-basic/arch/mips/mm/tlbex.c-orig
+++ mips-malta4kcle-basic/arch/mips/mm/tlbex.c
@@ -847,7 +847,6 @@
 
 	case CPU_R10000:
 	case CPU_R12000:
-	case CPU_4KC:
 	case CPU_SB1:
 	case CPU_4KSC:
 	case CPU_20KC:
@@ -874,6 +873,7 @@
 		tlbw(p);
 		break;
 
+	case CPU_4KC:
 	case CPU_4KEC:
 	case CPU_24K:
 		i_ehb(p);

--------------040309050204000803030403--

From kevink@mips.com Mon Apr 11 21:24:33 2005
Received: with ECARTIS (v1.0.0; list linux-mips); Mon, 11 Apr 2005 21:24:48 +0100 (BST)
Received: from 209-232-97-206.ded.pacbell.net ([IPv6:::ffff:209.232.97.206]:42955
	"EHLO dns0.mips.com") by linux-mips.org with ESMTP
	id <S8226136AbVDKUYd>; Mon, 11 Apr 2005 21:24:33 +0100
Received: from mercury.mips.com (sbcns-dmz [209.232.97.193])
	by dns0.mips.com (8.12.11/8.12.11) with ESMTP id j3BKOOcH013610;
	Mon, 11 Apr 2005 13:24:24 -0700 (PDT)
Received: from grendel (grendel [192.168.236.16])
	by mercury.mips.com (8.12.9/8.12.11) with SMTP id j3BKOLGl000873;
	Mon, 11 Apr 2005 13:24:22 -0700 (PDT)
Message-ID: <004a01c53ed4$dab12b00$10eca8c0@grendel>
From:	"Kevin D. Kissell" <kevink@mips.com>
To:	"Greg Weeks" <greg.weeks@timesys.com>,
	"Ralf Baechle" <ralf@linux-mips.org>
Cc:	<linux-mips@linux-mips.org>
References: <42553E49.7080004@timesys.com> <4256991C.4020601@timesys.com> <20050408161357.GB19166@linux-mips.org> <4256B524.2080509@timesys.com> <425AD440.5050600@timesys.com>
Subject: Re: another 4kc machine check.
Date:	Mon, 11 Apr 2005 22:27:15 +0200
MIME-Version: 1.0
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 6.00.2800.1437
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1441
X-Scanned-By: MIMEDefang 2.39
Return-Path: <kevink@mips.com>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 7693
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: kevink@mips.com
Precedence: bulk
X-list: linux-mips
Content-Length: 888
Lines: 39

If the 4KC and 4KEC need it, so does the 4KSC (and 4KSD).

----- Original Message ----- 
From: "Greg Weeks" <greg.weeks@timesys.com>
To: "Ralf Baechle" <ralf@linux-mips.org>
Cc: <linux-mips@linux-mips.org>
Sent: Monday, April 11, 2005 21:47
Subject: Re: another 4kc machine check.


> This patch appears to fix my machine check problem on the 4kc. The 4kc 
> shouldn't need an ssnop here, but this appears to fix it.
> 
> Greg Weeks
> 


--------------------------------------------------------------------------------


> --- mips-malta4kcle-basic/arch/mips/mm/tlbex.c-orig
> +++ mips-malta4kcle-basic/arch/mips/mm/tlbex.c
> @@ -847,7 +847,6 @@
>  
>   case CPU_R10000:
>   case CPU_R12000:
> - case CPU_4KC:
>   case CPU_SB1:
>   case CPU_4KSC:
>   case CPU_20KC:
> @@ -874,6 +873,7 @@
>   tlbw(p);
>   break;
>  
> + case CPU_4KC:
>   case CPU_4KEC:
>   case CPU_24K:
>   i_ehb(p);
> 

From paul.chapman@BrockU.CA Mon Apr 11 21:30:30 2005
Received: with ECARTIS (v1.0.0; list linux-mips); Mon, 11 Apr 2005 21:30:45 +0100 (BST)
Received: from spartan.ac.BrockU.CA ([IPv6:::ffff:139.57.65.3]:14746 "EHLO
	spartan.ac.BrockU.CA") by linux-mips.org with ESMTP
	id <S8226144AbVDKUaa>; Mon, 11 Apr 2005 21:30:30 +0100
Received: from paul.dev.brocku.ca ([139.57.69.110])
	by spartan.ac.BrockU.CA (8.12.8/8.12.8) with ESMTP id j3BKUKgc031927
	for <linux-mips@linux-mips.org>; Mon, 11 Apr 2005 16:30:20 -0400
Subject: ip27 PCI devices
From:	Paul Chapman <paul.chapman@BrockU.CA>
To:	linux-mips@linux-mips.org
Content-Type: text/plain
Organization: Brock University
Date:	Mon, 11 Apr 2005 16:30:22 -0400
Message-Id: <1113251422.21580.33.camel@paul.dev.brocku.ca>
Mime-Version: 1.0
X-Mailer: Evolution 2.2.1.1 (2.2.1.1-2) 
Content-Transfer-Encoding: 7bit
Return-Path: <paul.chapman@BrockU.CA>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 7694
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: paul.chapman@BrockU.CA
Precedence: bulk
X-list: linux-mips
Content-Length: 523
Lines: 16

Hello,

I've been experimenting with trying various PCI cards I have lying
around in my Origin 200, to see if I can make any of them work.

So far, I've had no luck: all of them have resource collisions with the
IOC3 (presumably because of its address decoding).  They're detected
fine in /proc/pci.

So: has anyone had any luck with anything they've tried?  In particular,
I'm looking for an ethernet card that works (and is readily available),
since the performance of the IOC3 is pretty wretched.

Thanks,
Paul Chapman


From kevink@mips.com Mon Apr 11 21:41:51 2005
Received: with ECARTIS (v1.0.0; list linux-mips); Mon, 11 Apr 2005 21:42:05 +0100 (BST)
Received: from 209-232-97-206.ded.pacbell.net ([IPv6:::ffff:209.232.97.206]:56267
	"EHLO dns0.mips.com") by linux-mips.org with ESMTP
	id <S8226136AbVDKUlv>; Mon, 11 Apr 2005 21:41:51 +0100
Received: from mercury.mips.com (sbcns-dmz [209.232.97.193])
	by dns0.mips.com (8.12.11/8.12.11) with ESMTP id j3BKfgqb013711;
	Mon, 11 Apr 2005 13:41:43 -0700 (PDT)
Received: from grendel (grendel [192.168.236.16])
	by mercury.mips.com (8.12.9/8.12.11) with SMTP id j3BKfdGl001729;
	Mon, 11 Apr 2005 13:41:39 -0700 (PDT)
Message-ID: <007101c53ed7$44a71ae0$10eca8c0@grendel>
From:	"Kevin D. Kissell" <kevink@mips.com>
To:	"Greg Weeks" <greg.weeks@timesys.com>,
	"Ralf Baechle" <ralf@linux-mips.org>
Cc:	<linux-mips@linux-mips.org>
References: <42553E49.7080004@timesys.com> <4256991C.4020601@timesys.com> <20050408161357.GB19166@linux-mips.org> <4256B524.2080509@timesys.com> <425AD440.5050600@timesys.com>
Subject: Re: another 4kc machine check.
Date:	Mon, 11 Apr 2005 22:42:57 +0200
MIME-Version: 1.0
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 6.00.2800.1437
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1441
X-Scanned-By: MIMEDefang 2.39
Return-Path: <kevink@mips.com>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 7695
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: kevink@mips.com
Precedence: bulk
X-list: linux-mips
Content-Length: 506
Lines: 15

One further comment:


> This patch appears to fix my machine check problem on the 4kc. The 4kc 
> shouldn't need an ssnop here, but this appears to fix it.


The 4Kc shouldn't need an ssnop/ehb for the purposes of a *load*, but
if the exception was on an instruction fetch, the documentation is reasonably
clear that there's a hazard of 3 cycles before the new entry can be used for
a fetch - which is what ERET will do in the case of a instruction fetch miss.

            Regards,

            Kevin K.

From nsekhar@ti.com Tue Apr 12 06:00:27 2005
Received: with ECARTIS (v1.0.0; list linux-mips); Tue, 12 Apr 2005 06:00:42 +0100 (BST)
Received: from news.ti.com ([IPv6:::ffff:192.94.94.33]:52136 "EHLO
	dragon.ti.com") by linux-mips.org with ESMTP id <S8225563AbVDLFA1> convert rfc822-to-8bit;
	Tue, 12 Apr 2005 06:00:27 +0100
Received: from dlep30.itg.ti.com ([157.170.139.157])
	by dragon.ti.com (8.13.1/8.13.1) with ESMTP id j3C50H9D014914;
	Tue, 12 Apr 2005 00:00:21 -0500 (CDT)
Received: from dlep90.itg.ti.com (localhost [127.0.0.1])
	by dlep30.itg.ti.com (8.12.11/8.12.11) with ESMTP id j3C50GUK006119;
	Tue, 12 Apr 2005 00:00:16 -0500 (CDT)
Received: from dbde2k01.ent.ti.com (localhost [127.0.0.1])
	by dlep90.itg.ti.com (8.12.11/8.12.11) with ESMTP id j3C50EeA012746;
	Tue, 12 Apr 2005 00:00:15 -0500 (CDT)
X-MimeOLE: Produced By Microsoft Exchange V6.0.6603.0
content-class: urn:content-classes:message
MIME-Version: 1.0
Content-Type: text/plain;
	charset="us-ascii"
Content-Transfer-Encoding: 8BIT
Subject: RE: Toolchain question
Date:	Tue, 12 Apr 2005 10:29:09 +0530
Message-ID: <F6B01C6242515443BB6E5DDD63AE935F046867@dbde2k01.itg.ti.com>
X-MS-Has-Attach: 
X-MS-TNEF-Correlator: 
Thread-Topic: Toolchain question
Thread-Index: AcU+nAQ3JjPZAH9aS8y/Jeca90og7QAfeyyw
From:	"Nori, Soma Sekhar" <nsekhar@ti.com>
To:	"Ralf Baechle" <ralf@linux-mips.org>,
	"Mile Davidovic" <mile.davidovic@micronasnit.com>
Cc:	"Linux/MIPS Development" <linux-mips@linux-mips.org>
Return-Path: <nsekhar@ti.com>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 7696
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: nsekhar@ti.com
Precedence: bulk
X-list: linux-mips
Content-Length: 459
Lines: 16

> 
> Less than a week ago SDE 5 was released which is based on gcc 3.4 and
> similarly contains a large number of mostly MIPS-specific improvments.
> 
>   Ralf

Can you let know where I can get it from? The mips.com ftp site informs
The latest SDE as 5.03.06
(ftp://ftp.mips.com/pub/tools/software/sde-for-linux/sdelinux-mipsel-lat
est/) 
which linux-mips.org
(http://www.linux-mips.org/wiki/index.php/Toolchains) informs is based
on gcc 2.96

-
Sekhar Nori.

From goldfinger@member.fsf.org Tue Apr 12 11:06:49 2005
Received: with ECARTIS (v1.0.0; list linux-mips); Tue, 12 Apr 2005 11:07:04 +0100 (BST)
Received: from host62-164.pool80181.interbusiness.it ([IPv6:::ffff:80.181.164.62]:2544
	"EHLO localhost.localdomain") by linux-mips.org with ESMTP
	id <S8224855AbVDLKGt>; Tue, 12 Apr 2005 11:06:49 +0100
Received: by localhost.localdomain (Postfix, from userid 501)
	id 20BFC10F004; Tue, 12 Apr 2005 14:08:21 +0200 (CEST)
Subject: menet
From:	Michele Carla` <goldfinger@member.fsf.org>
To:	linux-mips@linux-mips.org
Content-Type: text/plain
Content-Transfer-Encoding: 7bit
Date:	Tue, 12 Apr 2005 14:08:20 +0200
Message-Id: <1113307700.3163.8.camel@localhost>
Mime-Version: 1.0
X-Mailer: Evolution 2.0.4 
Return-Path: <goldfinger@member.fsf.org>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 7697
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: goldfinger@member.fsf.org
Precedence: bulk
X-list: linux-mips
Content-Length: 144
Lines: 7

what about "menet" xio-board and origin-2000, is it supported... or can
I help in this work ?

Thanks

Michele Carla`
goldfinger@member.fsf.org

From ralf@linux-mips.org Tue Apr 12 11:44:38 2005
Received: with ECARTIS (v1.0.0; list linux-mips); Tue, 12 Apr 2005 11:44:52 +0100 (BST)
Received: from extgw-uk.mips.com ([IPv6:::ffff:62.254.210.129]:10267 "EHLO
	bacchus.net.dhis.org") by linux-mips.org with ESMTP
	id <S8224913AbVDLKoi>; Tue, 12 Apr 2005 11:44:38 +0100
Received: from dea.linux-mips.net (localhost.localdomain [127.0.0.1])
	by bacchus.net.dhis.org (8.13.1/8.13.1) with ESMTP id j3CAiVdu013716;
	Tue, 12 Apr 2005 11:44:31 +0100
Received: (from ralf@localhost)
	by dea.linux-mips.net (8.13.1/8.13.1/Submit) id j3CAiVJ3013706;
	Tue, 12 Apr 2005 11:44:31 +0100
Date:	Tue, 12 Apr 2005 11:44:30 +0100
From:	Ralf Baechle <ralf@linux-mips.org>
To:	Michele Carla` <goldfinger@member.fsf.org>
Cc:	linux-mips@linux-mips.org
Subject: Re: menet
Message-ID: <20050412104430.GA5573@linux-mips.org>
References: <1113307700.3163.8.camel@localhost>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <1113307700.3163.8.camel@localhost>
User-Agent: Mutt/1.4.1i
Return-Path: <ralf@linux-mips.org>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 7698
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: ralf@linux-mips.org
Precedence: bulk
X-list: linux-mips
Content-Length: 287
Lines: 9

On Tue, Apr 12, 2005 at 02:08:20PM +0200, Michele Carla` wrote:

> what about "menet" xio-board and origin-2000, is it supported... or can
> I help in this work ?

It's supposed to work - but I don't recall any MENET reports in a few
years so no way to be sure if it still does.

  Ralf

From ralf@linux-mips.org Tue Apr 12 11:58:29 2005
Received: with ECARTIS (v1.0.0; list linux-mips); Tue, 12 Apr 2005 11:58:44 +0100 (BST)
Received: from extgw-uk.mips.com ([IPv6:::ffff:62.254.210.129]:55560 "EHLO
	bacchus.net.dhis.org") by linux-mips.org with ESMTP
	id <S8224916AbVDLK63>; Tue, 12 Apr 2005 11:58:29 +0100
Received: from dea.linux-mips.net (localhost.localdomain [127.0.0.1])
	by bacchus.net.dhis.org (8.13.1/8.13.1) with ESMTP id j3CAwGJQ019059;
	Tue, 12 Apr 2005 11:58:16 +0100
Received: (from ralf@localhost)
	by dea.linux-mips.net (8.13.1/8.13.1/Submit) id j3CAwGWZ019058;
	Tue, 12 Apr 2005 11:58:16 +0100
Date:	Tue, 12 Apr 2005 11:58:15 +0100
From:	Ralf Baechle <ralf@linux-mips.org>
To:	Paul Chapman <paul.chapman@BrockU.CA>
Cc:	linux-mips@linux-mips.org
Subject: Re: ip27 PCI devices
Message-ID: <20050412105815.GC5573@linux-mips.org>
References: <1113251422.21580.33.camel@paul.dev.brocku.ca>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <1113251422.21580.33.camel@paul.dev.brocku.ca>
User-Agent: Mutt/1.4.1i
Return-Path: <ralf@linux-mips.org>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 7699
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: ralf@linux-mips.org
Precedence: bulk
X-list: linux-mips
Content-Length: 941
Lines: 24

On Mon, Apr 11, 2005 at 04:30:22PM -0400, Paul Chapman wrote:

> I've been experimenting with trying various PCI cards I have lying
> around in my Origin 200, to see if I can make any of them work.

The current Linux implementation limits IP27 to cards with 64-bit
addressing capability.

> So far, I've had no luck: all of them have resource collisions with the
> IOC3 (presumably because of its address decoding).  They're detected
> fine in /proc/pci.

What kernel version are you trying?

> So: has anyone had any luck with anything they've tried?  In particular,
> I'm looking for an ethernet card that works (and is readily available),
> since the performance of the IOC3 is pretty wretched.

That actually also seems to be more of a limitation of how the IP27 code
is setting up RRBs for PCI devices, so any driver is expected to deliver
a somewhat modest (understatement!) performance.  Fixing fortunately isn't
too hard ...

  Ralf

From macro@linux-mips.org Tue Apr 12 12:18:19 2005
Received: with ECARTIS (v1.0.0; list linux-mips); Tue, 12 Apr 2005 12:18:35 +0100 (BST)
Received: from pollux.ds.pg.gda.pl ([IPv6:::ffff:153.19.208.7]:267 "EHLO
	pollux.ds.pg.gda.pl") by linux-mips.org with ESMTP
	id <S8224916AbVDLLST>; Tue, 12 Apr 2005 12:18:19 +0100
Received: from localhost (localhost [127.0.0.1])
	by pollux.ds.pg.gda.pl (Postfix) with ESMTP
	id 18D3AE1C7D; Tue, 12 Apr 2005 13:18:08 +0200 (CEST)
Received: from pollux.ds.pg.gda.pl ([127.0.0.1])
 by localhost (pollux [127.0.0.1]) (amavisd-new, port 10024) with ESMTP
 id 07216-04; Tue, 12 Apr 2005 13:18:07 +0200 (CEST)
Received: from piorun.ds.pg.gda.pl (piorun.ds.pg.gda.pl [153.19.208.8])
	by pollux.ds.pg.gda.pl (Postfix) with ESMTP
	id B01DAE1C7B; Tue, 12 Apr 2005 13:18:07 +0200 (CEST)
Received: from blysk.ds.pg.gda.pl (macro@blysk.ds.pg.gda.pl [153.19.208.6])
	by piorun.ds.pg.gda.pl (8.13.1/8.13.1) with ESMTP id j3CBIAY7006694;
	Tue, 12 Apr 2005 13:18:10 +0200
Date:	Tue, 12 Apr 2005 12:18:15 +0100 (BST)
From:	"Maciej W. Rozycki" <macro@linux-mips.org>
To:	Ralf Baechle <ralf@linux-mips.org>
Cc:	Paul Chapman <paul.chapman@BrockU.CA>, linux-mips@linux-mips.org
Subject: Re: ip27 PCI devices
In-Reply-To: <20050412105815.GC5573@linux-mips.org>
Message-ID: <Pine.LNX.4.61L.0504121213400.18606@blysk.ds.pg.gda.pl>
References: <1113251422.21580.33.camel@paul.dev.brocku.ca>
 <20050412105815.GC5573@linux-mips.org>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Virus-Scanned: ClamAV 0.83/822/Tue Apr 12 06:55:55 2005 on piorun.ds.pg.gda.pl
X-Virus-Status:	Clean
X-Virus-Scanned: by amavisd-new at pollux.ds.pg.gda.pl
Return-Path: <macro@linux-mips.org>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 7700
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: macro@linux-mips.org
Precedence: bulk
X-list: linux-mips
Content-Length: 497
Lines: 13

On Tue, 12 Apr 2005, Ralf Baechle wrote:

> > I've been experimenting with trying various PCI cards I have lying
> > around in my Origin 200, to see if I can make any of them work.
> 
> The current Linux implementation limits IP27 to cards with 64-bit
> addressing capability.

 Do we have a problem with our implementation of PCI DMA masks or is the 
low 4GB of PCI address space already consumed on this system?  The problem 
is most 32-bit PCI cards unfortunately do not support DAC.

  Maciej

From ralf@linux-mips.org Tue Apr 12 12:43:04 2005
Received: with ECARTIS (v1.0.0; list linux-mips); Tue, 12 Apr 2005 12:43:19 +0100 (BST)
Received: from extgw-uk.mips.com ([IPv6:::ffff:62.254.210.129]:45083 "EHLO
	bacchus.net.dhis.org") by linux-mips.org with ESMTP
	id <S8224916AbVDLLnE>; Tue, 12 Apr 2005 12:43:04 +0100
Received: from dea.linux-mips.net (localhost.localdomain [127.0.0.1])
	by bacchus.net.dhis.org (8.13.1/8.13.1) with ESMTP id j3CBgqqQ021323;
	Tue, 12 Apr 2005 12:42:52 +0100
Received: (from ralf@localhost)
	by dea.linux-mips.net (8.13.1/8.13.1/Submit) id j3CBgqH8021322;
	Tue, 12 Apr 2005 12:42:52 +0100
Date:	Tue, 12 Apr 2005 12:42:52 +0100
From:	Ralf Baechle <ralf@linux-mips.org>
To:	"Maciej W. Rozycki" <macro@linux-mips.org>
Cc:	Paul Chapman <paul.chapman@BrockU.CA>, linux-mips@linux-mips.org
Subject: Re: ip27 PCI devices
Message-ID: <20050412114252.GE5573@linux-mips.org>
References: <1113251422.21580.33.camel@paul.dev.brocku.ca> <20050412105815.GC5573@linux-mips.org> <Pine.LNX.4.61L.0504121213400.18606@blysk.ds.pg.gda.pl>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <Pine.LNX.4.61L.0504121213400.18606@blysk.ds.pg.gda.pl>
User-Agent: Mutt/1.4.1i
Return-Path: <ralf@linux-mips.org>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 7701
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: ralf@linux-mips.org
Precedence: bulk
X-list: linux-mips
Content-Length: 959
Lines: 20

On Tue, Apr 12, 2005 at 12:18:15PM +0100, Maciej W. Rozycki wrote:

> > > I've been experimenting with trying various PCI cards I have lying
> > > around in my Origin 200, to see if I can make any of them work.
> > 
> > The current Linux implementation limits IP27 to cards with 64-bit
> > addressing capability.
> 
>  Do we have a problem with our implementation of PCI DMA masks or is the 
> low 4GB of PCI address space already consumed on this system?  The problem 
> is most 32-bit PCI cards unfortunately do not support DAC.

32-bit devices can only address a tiny fraction of the address space on
IP27.  To make matters more interesting, there is no memory at all in the
low 4GB of the crosstalk address space,  so 32-bit PCI has to rely on the
yet non-existing support for the IOMMU.  SGI trying to save a little too
much money on the external SRAM for the IOMMU in the Origin 200 finally
made it a hard to use in an OS, deadlock prone thing.

  Ralf

From ralf@linux-mips.org Tue Apr 12 13:07:09 2005
Received: with ECARTIS (v1.0.0; list linux-mips); Tue, 12 Apr 2005 13:07:24 +0100 (BST)
Received: from extgw-uk.mips.com ([IPv6:::ffff:62.254.210.129]:28952 "EHLO
	bacchus.net.dhis.org") by linux-mips.org with ESMTP
	id <S8224937AbVDLMHJ>; Tue, 12 Apr 2005 13:07:09 +0100
Received: from dea.linux-mips.net (localhost.localdomain [127.0.0.1])
	by bacchus.net.dhis.org (8.13.1/8.13.1) with ESMTP id j3CC74R8022174;
	Tue, 12 Apr 2005 13:07:04 +0100
Received: (from ralf@localhost)
	by dea.linux-mips.net (8.13.1/8.13.1/Submit) id j3CC73BB022173;
	Tue, 12 Apr 2005 13:07:03 +0100
Date:	Tue, 12 Apr 2005 13:07:03 +0100
From:	Ralf Baechle <ralf@linux-mips.org>
To:	"Nori, Soma Sekhar" <nsekhar@ti.com>
Cc:	Mile Davidovic <mile.davidovic@micronasnit.com>,
	Linux/MIPS Development <linux-mips@linux-mips.org>
Subject: Re: Toolchain question
Message-ID: <20050412120703.GI5573@linux-mips.org>
References: <F6B01C6242515443BB6E5DDD63AE935F046867@dbde2k01.itg.ti.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <F6B01C6242515443BB6E5DDD63AE935F046867@dbde2k01.itg.ti.com>
User-Agent: Mutt/1.4.1i
Return-Path: <ralf@linux-mips.org>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 7702
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: ralf@linux-mips.org
Precedence: bulk
X-list: linux-mips
Content-Length: 691
Lines: 19

On Tue, Apr 12, 2005 at 10:29:09AM +0530, Nori, Soma Sekhar wrote:

> > Less than a week ago SDE 5 was released which is based on gcc 3.4 and
> > similarly contains a large number of mostly MIPS-specific improvments.
> > 
> >   Ralf
> 
> Can you let know where I can get it from? The mips.com ftp site informs
> The latest SDE as 5.03.06
> (ftp://ftp.mips.com/pub/tools/software/sde-for-linux/sdelinux-mipsel-lat
> est/) 
> which linux-mips.org
> (http://www.linux-mips.org/wiki/index.php/Toolchains) informs is based
> on gcc 2.96

Little correction here - the release I meant was SDE 6.02 and it was only
a MIPS internal release, so will soon be available to the general audience.

  Ralf

From greg.weeks@timesys.com Tue Apr 12 15:36:23 2005
Received: with ECARTIS (v1.0.0; list linux-mips); Tue, 12 Apr 2005 15:36:39 +0100 (BST)
Received: from mail.timesys.com ([IPv6:::ffff:65.117.135.102]:28026 "EHLO
	exchange.timesys.com") by linux-mips.org with ESMTP
	id <S8225002AbVDLOgX>; Tue, 12 Apr 2005 15:36:23 +0100
Received: from [192.168.2.27] ([192.168.2.27]) by exchange.timesys.com with Microsoft SMTPSVC(5.0.2195.6713);
	 Tue, 12 Apr 2005 10:31:57 -0400
Message-ID: <425BDCE4.6070708@timesys.com>
Date:	Tue, 12 Apr 2005 10:36:20 -0400
From:	Greg Weeks <greg.weeks@timesys.com>
User-Agent: Mozilla Thunderbird 1.0 (X11/20041206)
X-Accept-Language: en-us, en
MIME-Version: 1.0
To:	linux-mips@linux-mips.org
Subject: BogoMIPS
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-OriginalArrivalTime: 12 Apr 2005 14:31:57.0078 (UTC) FILETIME=[6143D360:01C53F6C]
Return-Path: <greg.weeks@timesys.com>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 7703
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: greg.weeks@timesys.com
Precedence: bulk
X-list: linux-mips
Content-Length: 492
Lines: 18

Has anyone else noticed BogoMIPS is zero? Are we not doing the calibrate 
delay?

Greg Weeks

-bash-2.05b# cat /proc/cpuinfo
system type             : MIPS Malta
processor               : 0
cpu model               : MIPS 4Kc V0.1
BogoMIPS                : 0.00
wait instruction        : yes
microsecond timers      : yes
tlb_entries             : 16
extra interrupt vector  : yes
hardware watchpoint     : yes
VCED exceptions         : not available
VCEI exceptions         : not available
-

From greg.weeks@timesys.com Tue Apr 12 15:52:40 2005
Received: with ECARTIS (v1.0.0; list linux-mips); Tue, 12 Apr 2005 15:52:56 +0100 (BST)
Received: from mail.timesys.com ([IPv6:::ffff:65.117.135.102]:18053 "EHLO
	exchange.timesys.com") by linux-mips.org with ESMTP
	id <S8225007AbVDLOwk>; Tue, 12 Apr 2005 15:52:40 +0100
Received: from [192.168.2.27] ([192.168.2.27]) by exchange.timesys.com with Microsoft SMTPSVC(5.0.2195.6713);
	 Tue, 12 Apr 2005 10:48:14 -0400
Message-ID: <425BE0B6.4080801@timesys.com>
Date:	Tue, 12 Apr 2005 10:52:38 -0400
From:	Greg Weeks <greg.weeks@timesys.com>
User-Agent: Mozilla Thunderbird 1.0 (X11/20041206)
X-Accept-Language: en-us, en
MIME-Version: 1.0
To:	"Kevin D. Kissell" <kevink@mips.com>
CC:	Ralf Baechle <ralf@linux-mips.org>, linux-mips@linux-mips.org
Subject: Re: another 4kc machine check.
References: <42553E49.7080004@timesys.com> <4256991C.4020601@timesys.com> <20050408161357.GB19166@linux-mips.org> <4256B524.2080509@timesys.com> <425AD440.5050600@timesys.com> <004a01c53ed4$dab12b00$10eca8c0@grendel>
In-Reply-To: <004a01c53ed4$dab12b00$10eca8c0@grendel>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-OriginalArrivalTime: 12 Apr 2005 14:48:14.0812 (UTC) FILETIME=[A80A31C0:01C53F6E]
Return-Path: <greg.weeks@timesys.com>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 7704
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: greg.weeks@timesys.com
Precedence: bulk
X-list: linux-mips
Content-Length: 1095
Lines: 57

Kevin D. Kissell wrote:

>If the 4KC and 4KEC need it, so does the 4KSC (and 4KSD).
>
>  
>
Is this a reasonable thing to do though. I always hate making changes 
that work, but that I don't understand why.

Greg Weeks

>----- Original Message ----- 
>From: "Greg Weeks" <greg.weeks@timesys.com>
>To: "Ralf Baechle" <ralf@linux-mips.org>
>Cc: <linux-mips@linux-mips.org>
>Sent: Monday, April 11, 2005 21:47
>Subject: Re: another 4kc machine check.
>
>
>  
>
>>This patch appears to fix my machine check problem on the 4kc. The 4kc 
>>shouldn't need an ssnop here, but this appears to fix it.
>>
>>Greg Weeks
>>
>>    
>>
>
>
>--------------------------------------------------------------------------------
>
>
>  
>
>>--- mips-malta4kcle-basic/arch/mips/mm/tlbex.c-orig
>>+++ mips-malta4kcle-basic/arch/mips/mm/tlbex.c
>>@@ -847,7 +847,6 @@
>> 
>>  case CPU_R10000:
>>  case CPU_R12000:
>>- case CPU_4KC:
>>  case CPU_SB1:
>>  case CPU_4KSC:
>>  case CPU_20KC:
>>@@ -874,6 +873,7 @@
>>  tlbw(p);
>>  break;
>> 
>>+ case CPU_4KC:
>>  case CPU_4KEC:
>>  case CPU_24K:
>>  i_ehb(p);
>>
>>    
>>


From yuasa@hh.iij4u.or.jp Tue Apr 12 16:02:08 2005
Received: with ECARTIS (v1.0.0; list linux-mips); Tue, 12 Apr 2005 16:02:25 +0100 (BST)
Received: from mo01.iij4u.or.jp ([IPv6:::ffff:210.130.0.20]:16595 "EHLO
	mo01.iij4u.or.jp") by linux-mips.org with ESMTP id <S8225008AbVDLPCI>;
	Tue, 12 Apr 2005 16:02:08 +0100
Received: MO(mo01)id j3CF25h2007917; Wed, 13 Apr 2005 00:02:05 +0900 (JST)
Received: MDO(mdo00) id j3CF24ah002300; Wed, 13 Apr 2005 00:02:05 +0900 (JST)
Received: from stratos (64.43.138.210.xn.2iij.net [210.138.43.64])
	by mbox.iij4u.or.jp (4U-MR/mbox01) id j3CF23Gi023089
	(version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NOT);
	Wed, 13 Apr 2005 00:02:04 +0900 (JST)
Date:	Wed, 13 Apr 2005 00:02:01 +0900
From:	Yoichi Yuasa <yuasa@hh.iij4u.or.jp>
To:	Ralf Baechle <ralf@linux-mips.org>
Cc:	yuasa@hh.iij4u.or.jp, linux-mips <linux-mips@linux-mips.org>
Subject: [PATCH 2.6] vr41xx: add resource management to cmu.c
Message-Id: <20050413000201.151293d3.yuasa@hh.iij4u.or.jp>
X-Mailer: Sylpheed version 1.0.4 (GTK+ 1.2.10; i386-pc-linux-gnu)
Mime-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Return-Path: <yuasa@hh.iij4u.or.jp>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 7705
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: yuasa@hh.iij4u.or.jp
Precedence: bulk
X-list: linux-mips
Content-Length: 4331
Lines: 162

This patch had added resource management to cmu.c.

Yoichi

Signed-off-by: Yoichi Yuasa <yuasa@hh.iij4u.or.jp>

diff -urN -X dontdiff c-orig/arch/mips/vr41xx/common/cmu.c c/arch/mips/vr41xx/common/cmu.c
--- c-orig/arch/mips/vr41xx/common/cmu.c	Thu May 27 02:11:11 2004
+++ c/arch/mips/vr41xx/common/cmu.c	Sat Apr  9 18:27:02 2005
@@ -3,7 +3,7 @@
  *
  *  Copyright (C) 2001-2002  MontaVista Software Inc.
  *    Author: Yoichi Yuasa <yyuasa@mvista.com or source@mvista.com>
- *  Copuright (C) 2003-2004  Yoichi Yuasa <yuasa@hh.iij4u.or.jp>
+ *  Copuright (C) 2003-2005  Yoichi Yuasa <yuasa@hh.iij4u.or.jp>
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
@@ -29,6 +29,8 @@
  *  - Added support for NEC VR4133.
  */
 #include <linux/init.h>
+#include <linux/ioport.h>
+#include <linux/module.h>
 #include <linux/smp.h>
 #include <linux/spinlock.h>
 #include <linux/types.h>
@@ -37,8 +39,16 @@
 #include <asm/io.h>
 #include <asm/vr41xx/vr41xx.h>
 
-#define CMUCLKMSK_TYPE1	KSEG1ADDR(0x0b000060)
-#define CMUCLKMSK_TYPE2	KSEG1ADDR(0x0f000060)
+#define CMU_TYPE1_BASE	0x0b000060UL
+#define CMU_TYPE1_SIZE	0x4
+
+#define CMU_TYPE2_BASE	0x0f000060UL
+#define CMU_TYPE2_SIZE	0x4
+
+#define CMU_TYPE3_BASE	0x0f000060UL
+#define CMU_TYPE3_SIZE	0x8
+
+#define CMUCLKMSK	0x0
  #define MSKPIU		0x0001
  #define MSKSIU		0x0002
  #define MSKAIU		0x0004
@@ -52,19 +62,17 @@
  #define MSKFFIR	0x0400
  #define MSKSCSI	0x1000
  #define MSKPPCIU	0x2000
-#define CMUCLKMSK2	KSEG1ADDR(0x0f000064)
+#define CMUCLKMSK2	0x4
  #define MSKCEU		0x0001
  #define MSKMAC0	0x0002
  #define MSKMAC1	0x0004
 
-static uint32_t cmu_base;
+static void __iomem *cmu_base;
 static uint16_t cmuclkmsk, cmuclkmsk2;
 static spinlock_t cmu_lock;
 
-#define read_cmuclkmsk()	readw(cmu_base)
-#define read_cmuclkmsk2()	readw(CMUCLKMSK2)
-#define write_cmuclkmsk()	writew(cmuclkmsk, cmu_base)
-#define write_cmuclkmsk2()	writew(cmuclkmsk2, CMUCLKMSK2)
+#define cmu_read(offset)		readw(cmu_base + (offset))
+#define cmu_write(offset, value)	writew((value), cmu_base + (offset))
 
 void vr41xx_supply_clock(vr41xx_clock_t clock)
 {
@@ -120,13 +128,15 @@
 
 	if (clock == CEU_CLOCK || clock == ETHER0_CLOCK ||
 	    clock == ETHER1_CLOCK)
-		write_cmuclkmsk2();
+		cmu_write(CMUCLKMSK2, cmuclkmsk2);
 	else
-		write_cmuclkmsk();
+		cmu_write(CMUCLKMSK, cmuclkmsk);
 
 	spin_unlock_irq(&cmu_lock);
 }
 
+EXPORT_SYMBOL_GPL(vr41xx_supply_clock);
+
 void vr41xx_mask_clock(vr41xx_clock_t clock)
 {
 	spin_lock_irq(&cmu_lock);
@@ -160,7 +170,7 @@
 		    current_cpu_data.cputype == CPU_VR4121) {
 			cmuclkmsk &= ~MSKDSIU;
 		} else {
-			if (cmuclkmsk & MSKSIU)
+			if (cmuclkmsk & MSKSSIU)
 				cmuclkmsk &= ~MSKDSIU;
 			else
 				cmuclkmsk &= ~(MSKSIU | MSKDSIU);
@@ -193,38 +203,55 @@
 
 	if (clock == CEU_CLOCK || clock == ETHER0_CLOCK ||
 	    clock == ETHER1_CLOCK)
-		write_cmuclkmsk2();
+		cmu_write(CMUCLKMSK2, cmuclkmsk2);
 	else
-		write_cmuclkmsk();
+		cmu_write(CMUCLKMSK, cmuclkmsk);
 
 	spin_unlock_irq(&cmu_lock);
 }
 
+EXPORT_SYMBOL_GPL(vr41xx_mask_clock);
+
 static int __init vr41xx_cmu_init(void)
 {
+	unsigned long start, size;
+
 	switch (current_cpu_data.cputype) {
         case CPU_VR4111:
         case CPU_VR4121:
-                cmu_base = CMUCLKMSK_TYPE1;
+		start = CMU_TYPE1_BASE;
+		size = CMU_TYPE1_SIZE;
                 break;
         case CPU_VR4122:
         case CPU_VR4131:
-                cmu_base = CMUCLKMSK_TYPE2;
-                break;
+		start = CMU_TYPE2_BASE;
+		size = CMU_TYPE2_SIZE;
+		break;
         case CPU_VR4133:
-                cmu_base = CMUCLKMSK_TYPE2;
-		cmuclkmsk2 = read_cmuclkmsk2();
+		start = CMU_TYPE3_BASE;
+		size = CMU_TYPE3_SIZE;
                 break;
 	default:
 		panic("Unexpected CPU of NEC VR4100 series");
 		break;
         }
 
-	cmuclkmsk = read_cmuclkmsk();
+	if (request_mem_region(start, size, "CMU") == NULL)
+		return -EBUSY;
+
+	cmu_base = ioremap(start, size);
+	if (cmu_base == NULL) {
+		release_mem_region(start, size);
+		return -EBUSY;
+	}
+
+	cmuclkmsk = cmu_read(CMUCLKMSK);
+	if (current_cpu_data.cputype == CPU_VR4133)
+		cmuclkmsk2 = cmu_read(CMUCLKMSK2);
 
 	spin_lock_init(&cmu_lock);
 
 	return 0;
 }
 
-early_initcall(vr41xx_cmu_init);
+core_initcall(vr41xx_cmu_init);

From macro@linux-mips.org Tue Apr 12 16:22:34 2005
Received: with ECARTIS (v1.0.0; list linux-mips); Tue, 12 Apr 2005 16:22:50 +0100 (BST)
Received: from pollux.ds.pg.gda.pl ([IPv6:::ffff:153.19.208.7]:7941 "EHLO
	pollux.ds.pg.gda.pl") by linux-mips.org with ESMTP
	id <S8225008AbVDLPWe>; Tue, 12 Apr 2005 16:22:34 +0100
Received: from localhost (localhost [127.0.0.1])
	by pollux.ds.pg.gda.pl (Postfix) with ESMTP
	id 95067E1C81; Tue, 12 Apr 2005 17:22:28 +0200 (CEST)
Received: from pollux.ds.pg.gda.pl ([127.0.0.1])
 by localhost (pollux [127.0.0.1]) (amavisd-new, port 10024) with ESMTP
 id 24394-09; Tue, 12 Apr 2005 17:22:28 +0200 (CEST)
Received: from piorun.ds.pg.gda.pl (piorun.ds.pg.gda.pl [153.19.208.8])
	by pollux.ds.pg.gda.pl (Postfix) with ESMTP
	id 430AEE1C80; Tue, 12 Apr 2005 17:22:28 +0200 (CEST)
Received: from blysk.ds.pg.gda.pl (macro@blysk.ds.pg.gda.pl [153.19.208.6])
	by piorun.ds.pg.gda.pl (8.13.1/8.13.1) with ESMTP id j3CFMQIc017271;
	Tue, 12 Apr 2005 17:22:29 +0200
Date:	Tue, 12 Apr 2005 16:22:34 +0100 (BST)
From:	"Maciej W. Rozycki" <macro@linux-mips.org>
To:	"Kevin D. Kissell" <kevink@mips.com>
Cc:	Greg Weeks <greg.weeks@timesys.com>,
	Ralf Baechle <ralf@linux-mips.org>, linux-mips@linux-mips.org
Subject: Re: another 4kc machine check.
In-Reply-To: <004a01c53ed4$dab12b00$10eca8c0@grendel>
Message-ID: <Pine.LNX.4.61L.0504121610500.18606@blysk.ds.pg.gda.pl>
References: <42553E49.7080004@timesys.com> <4256991C.4020601@timesys.com>
 <20050408161357.GB19166@linux-mips.org> <4256B524.2080509@timesys.com>
 <425AD440.5050600@timesys.com> <004a01c53ed4$dab12b00$10eca8c0@grendel>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Virus-Scanned: ClamAV 0.83/822/Tue Apr 12 06:55:55 2005 on piorun.ds.pg.gda.pl
X-Virus-Status:	Clean
X-Virus-Scanned: by amavisd-new at pollux.ds.pg.gda.pl
Return-Path: <macro@linux-mips.org>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 7706
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: macro@linux-mips.org
Precedence: bulk
X-list: linux-mips
Content-Length: 448
Lines: 11

On Mon, 11 Apr 2005, Kevin D. Kissell wrote:

> If the 4KC and 4KEC need it, so does the 4KSC (and 4KSD).

 But that's weird in the first place as 4Kc implements the original 
revision of MIPS32 so it does not implement "ehb".  Therefore it acts just 
as an ordinary "nop", but according to the 4K manual there is no need for 
one -- the hazard between a move to EntryLo0/EntryLo1 and tlbwi/tlbwr is 
explicitly listed as 0 instructions.

  Maciej

From dan@embeddedalley.com Tue Apr 12 16:23:12 2005
Received: with ECARTIS (v1.0.0; list linux-mips); Tue, 12 Apr 2005 16:23:33 +0100 (BST)
Received: from embeddededge.com ([IPv6:::ffff:209.113.146.155]:58629 "EHLO
	penguin.netx4.com") by linux-mips.org with ESMTP
	id <S8225009AbVDLPWl>; Tue, 12 Apr 2005 16:22:41 +0100
Received: from [192.168.2.27] (h69-21-252-132.69-21.unk.tds.net [69.21.252.132])
	by penguin.netx4.com (8.12.8/8.12.9) with ESMTP id j3CFIUtU008064;
	Tue, 12 Apr 2005 11:18:31 -0400
In-Reply-To: <ecb4efd10504101516482a9785@mail.gmail.com>
References: <ecb4efd10504101516482a9785@mail.gmail.com>
Mime-Version: 1.0 (Apple Message framework v619.2)
Content-Type: text/plain; charset=US-ASCII; format=flowed
Message-Id: <479d91035fe1567525659393491e7ab9@embeddedalley.com>
Content-Transfer-Encoding: 7bit
Cc:	linux-mips@linux-mips.org
From:	Dan Malek <dan@embeddedalley.com>
Subject: Re: troubles mmaping PCI device on Au1550
Date:	Tue, 12 Apr 2005 11:22:24 -0400
To:	Clem Taylor <clem.taylor@gmail.com>
X-Mailer: Apple Mail (2.619.2)
Return-Path: <dan@embeddedalley.com>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 7707
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: dan@embeddedalley.com
Precedence: bulk
X-list: linux-mips
Content-Length: 930
Lines: 27


On Apr 10, 2005, at 6:16 PM, Clem Taylor wrote:

> My driver code has something like:
> remap_pfn_range ( vma, vma->vm_start,
>      ( pci_resource_start ( pdev, BAR ) >> PAGE_SHIFT ) + vma->pgoff,
>      vma->vm_end - vma->vm_start, vma->vm_page_prot );

The Au15xx uses 36-bit addressing for the PCI (among other) physical
addresses.  The mmap() in your driver is the right thing, but you need
to use io_remap_page_range() where the 2nd parameter is a phys_t.
Your offset should be a phys_t type, and pci_resource_start() also
returns a phys_t.

> I tried a similar test using /dev/mem and the address the linear
> framebuffer on my desktop machine (as returned by lspci).

You can't use /dev/mem for this on Au15xx because it doesn't have
provisions for more than 32-bit addresses.  Be careful with lspci,
as it only returns the 32-bit BAR, not the 36-bit Au15xx address nor
the 32-bit ioremapped address.

Thanks.


	-- Dan


From kevink@mips.com Tue Apr 12 17:35:37 2005
Received: with ECARTIS (v1.0.0; list linux-mips); Tue, 12 Apr 2005 17:35:53 +0100 (BST)
Received: from 209-232-97-206.ded.pacbell.net ([IPv6:::ffff:209.232.97.206]:33496
	"EHLO dns0.mips.com") by linux-mips.org with ESMTP
	id <S8225195AbVDLQfh>; Tue, 12 Apr 2005 17:35:37 +0100
Received: from mercury.mips.com (sbcns-dmz [209.232.97.193])
	by dns0.mips.com (8.12.11/8.12.11) with ESMTP id j3CGZRGJ019606;
	Tue, 12 Apr 2005 09:35:28 -0700 (PDT)
Received: from grendel (grendel [192.168.236.16])
	by mercury.mips.com (8.12.9/8.12.11) with SMTP id j3CGZJGl003529;
	Tue, 12 Apr 2005 09:35:20 -0700 (PDT)
Message-ID: <00c701c53f7e$09ec56c0$10eca8c0@grendel>
From:	"Kevin D. Kissell" <kevink@mips.com>
To:	"Maciej W. Rozycki" <macro@linux-mips.org>
Cc:	"Greg Weeks" <greg.weeks@timesys.com>,
	"Ralf Baechle" <ralf@linux-mips.org>, <linux-mips@linux-mips.org>
References: <42553E49.7080004@timesys.com> <4256991C.4020601@timesys.com> <20050408161357.GB19166@linux-mips.org> <4256B524.2080509@timesys.com> <425AD440.5050600@timesys.com> <004a01c53ed4$dab12b00$10eca8c0@grendel> <Pine.LNX.4.61L.0504121610500.18606@blysk.ds.pg.gda.pl>
Subject: Re: another 4kc machine check.
Date:	Tue, 12 Apr 2005 18:38:14 +0200
MIME-Version: 1.0
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 6.00.2800.1437
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1441
X-Scanned-By: MIMEDefang 2.39
Return-Path: <kevink@mips.com>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 7708
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: kevink@mips.com
Precedence: bulk
X-list: linux-mips
Content-Length: 574
Lines: 14

> On Mon, 11 Apr 2005, Kevin D. Kissell wrote:
> 
> > If the 4KC and 4KEC need it, so does the 4KSC (and 4KSD).
> 
>  But that's weird in the first place as 4Kc implements the original 
> revision of MIPS32 so it does not implement "ehb".  Therefore it acts just 
> as an ordinary "nop", but according to the 4K manual there is no need for 
> one -- the hazard between a move to EntryLo0/EntryLo1 and tlbwi/tlbwr is 
> explicitly listed as 0 instructions.

Oops.  Maybe I misread the patch.  I thought the added NOP was between
the TLBWR and the ERET.

            Kevin K.

From greg.weeks@timesys.com Tue Apr 12 17:52:22 2005
Received: with ECARTIS (v1.0.0; list linux-mips); Tue, 12 Apr 2005 17:52:36 +0100 (BST)
Received: from mail.timesys.com ([IPv6:::ffff:65.117.135.102]:44753 "EHLO
	exchange.timesys.com") by linux-mips.org with ESMTP
	id <S8225197AbVDLQwW>; Tue, 12 Apr 2005 17:52:22 +0100
Received: from [192.168.2.27] ([192.168.2.27]) by exchange.timesys.com with Microsoft SMTPSVC(5.0.2195.6713);
	 Tue, 12 Apr 2005 12:47:55 -0400
Message-ID: <425BFCC2.9060901@timesys.com>
Date:	Tue, 12 Apr 2005 12:52:18 -0400
From:	Greg Weeks <greg.weeks@timesys.com>
User-Agent: Mozilla Thunderbird 1.0 (X11/20041206)
X-Accept-Language: en-us, en
MIME-Version: 1.0
To:	"Kevin D. Kissell" <kevink@mips.com>
CC:	"Maciej W. Rozycki" <macro@linux-mips.org>,
	Ralf Baechle <ralf@linux-mips.org>, linux-mips@linux-mips.org
Subject: Re: another 4kc machine check.
References: <42553E49.7080004@timesys.com> <4256991C.4020601@timesys.com> <20050408161357.GB19166@linux-mips.org> <4256B524.2080509@timesys.com> <425AD440.5050600@timesys.com> <004a01c53ed4$dab12b00$10eca8c0@grendel> <Pine.LNX.4.61L.0504121610500.18606@blysk.ds.pg.gda.pl> <00c701c53f7e$09ec56c0$10eca8c0@grendel>
In-Reply-To: <00c701c53f7e$09ec56c0$10eca8c0@grendel>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-OriginalArrivalTime: 12 Apr 2005 16:47:55.0250 (UTC) FILETIME=[5FEA1520:01C53F7F]
Return-Path: <greg.weeks@timesys.com>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 7709
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: greg.weeks@timesys.com
Precedence: bulk
X-list: linux-mips
Content-Length: 695
Lines: 24

Kevin D. Kissell wrote:

>>On Mon, 11 Apr 2005, Kevin D. Kissell wrote:
>>
>>    
>>
>>>If the 4KC and 4KEC need it, so does the 4KSC (and 4KSD).
>>>      
>>>
>> But that's weird in the first place as 4Kc implements the original 
>>revision of MIPS32 so it does not implement "ehb".  Therefore it acts just 
>>as an ordinary "nop", but according to the 4K manual there is no need for 
>>one -- the hazard between a move to EntryLo0/EntryLo1 and tlbwi/tlbwr is 
>>explicitly listed as 0 instructions.
>>    
>>
>
>Oops.  Maybe I misread the patch.  I thought the added NOP was between
>the TLBWR and the ERET.
>  
>
No, it adds it before the TLBWR where there shouldn't be a hazard.

Greg Weeks

From hch@lst.de Tue Apr 12 17:57:30 2005
Received: with ECARTIS (v1.0.0; list linux-mips); Tue, 12 Apr 2005 17:57:45 +0100 (BST)
Received: from verein.lst.de ([IPv6:::ffff:213.95.11.210]:61866 "EHLO
	mail.lst.de") by linux-mips.org with ESMTP id <S8225197AbVDLQ5a>;
	Tue, 12 Apr 2005 17:57:30 +0100
Received: from verein.lst.de (localhost [127.0.0.1])
	by mail.lst.de (8.12.3/8.12.3/Debian-7.1) with ESMTP id j3CGvS6t022445
	(version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NO);
	Tue, 12 Apr 2005 18:57:28 +0200
Received: (from hch@localhost)
	by verein.lst.de (8.12.3/8.12.3/Debian-6.6) id j3CGvSFc022443;
	Tue, 12 Apr 2005 18:57:28 +0200
Date:	Tue, 12 Apr 2005 18:57:28 +0200
From:	Christoph Hellwig <hch@lst.de>
To:	linux-mips@linux-mips.org
Cc:	linux-cvs@linux-mips.org
Subject: Re: CVS Update@linux-mips.org: linux
Message-ID: <20050412165728.GA22407@lst.de>
References: <20050412140045Z8224988-1340+5602@linux-mips.org>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <20050412140045Z8224988-1340+5602@linux-mips.org>
User-Agent: Mutt/1.3.28i
X-Scanned-By: MIMEDefang 2.39
Return-Path: <hch@lst.de>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 7710
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: hch@lst.de
Precedence: bulk
X-list: linux-mips
Content-Length: 466
Lines: 16

On Tue, Apr 12, 2005 at 03:00:38PM +0100, ths@linux-mips.org wrote:
> 
> CVSROOT:	/home/cvs
> Module name:	linux
> Changes by:	ths@ftp.linux-mips.org	05/04/12 15:00:38
> 
> Modified files:
> 	drivers/scsi   : sgiwd93.c 
> Removed files:
> 	drivers/scsi   : sgiwd93.h 
> 
> Log message:
> 	Enable proc support, minor code cleanup.

Haven't seen the diffs, but please don't add new ->proc_info methods.
It's deprecated and will go away in the not very distant future.

From ths@networkno.de Tue Apr 12 19:28:04 2005
Received: with ECARTIS (v1.0.0; list linux-mips); Tue, 12 Apr 2005 19:28:19 +0100 (BST)
Received: from mx02.qsc.de ([IPv6:::ffff:213.148.130.14]:3809 "EHLO
	mx02.qsc.de") by linux-mips.org with ESMTP id <S8225204AbVDLS2E>;
	Tue, 12 Apr 2005 19:28:04 +0100
Received: from port-195-158-168-78.dynamic.qsc.de ([195.158.168.78] helo=hattusa.textio)
	by mx02.qsc.de with esmtp (Exim 3.35 #1)
	id 1DLQ77-0007t1-00; Tue, 12 Apr 2005 20:27:53 +0200
Received: from ths by hattusa.textio with local (Exim 4.50)
	id 1DLPVE-0007G3-Pl; Tue, 12 Apr 2005 19:48:44 +0200
Date:	Tue, 12 Apr 2005 19:48:44 +0200
To:	Christoph Hellwig <hch@lst.de>
Cc:	linux-mips@linux-mips.org
Subject: Re: CVS Update@linux-mips.org: linux
Message-ID: <20050412174844.GD12375@hattusa.textio>
References: <20050412140045Z8224988-1340+5602@linux-mips.org> <20050412165728.GA22407@lst.de>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <20050412165728.GA22407@lst.de>
User-Agent: Mutt/1.5.8i
From:	Thiemo Seufer <ths@networkno.de>
Return-Path: <ths@networkno.de>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 7711
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: ths@networkno.de
Precedence: bulk
X-list: linux-mips
Content-Length: 673
Lines: 24

Christoph Hellwig wrote:
> On Tue, Apr 12, 2005 at 03:00:38PM +0100, ths@linux-mips.org wrote:
> > 
> > CVSROOT:	/home/cvs
> > Module name:	linux
> > Changes by:	ths@ftp.linux-mips.org	05/04/12 15:00:38
> > 
> > Modified files:
> > 	drivers/scsi   : sgiwd93.c 
> > Removed files:
> > 	drivers/scsi   : sgiwd93.h 
> > 
> > Log message:
> > 	Enable proc support, minor code cleanup.
> 
> Haven't seen the diffs, but please don't add new ->proc_info methods.
> It's deprecated and will go away in the not very distant future.

The comments in scsi_host.s leave no doubt about that. :-)
The function isn't exactly new, the sgiwd driver reuses the generic
wd function.


Thiemo

From greg.weeks@timesys.com Tue Apr 12 20:12:33 2005
Received: with ECARTIS (v1.0.0; list linux-mips); Tue, 12 Apr 2005 20:12:48 +0100 (BST)
Received: from mail.timesys.com ([IPv6:::ffff:65.117.135.102]:57381 "EHLO
	exchange.timesys.com") by linux-mips.org with ESMTP
	id <S8225209AbVDLTMd>; Tue, 12 Apr 2005 20:12:33 +0100
Received: from [192.168.2.27] ([192.168.2.27]) by exchange.timesys.com with Microsoft SMTPSVC(5.0.2195.6713);
	 Tue, 12 Apr 2005 15:08:05 -0400
Message-ID: <425C1D9D.2070608@timesys.com>
Date:	Tue, 12 Apr 2005 15:12:29 -0400
From:	Greg Weeks <greg.weeks@timesys.com>
User-Agent: Mozilla Thunderbird 1.0 (X11/20041206)
X-Accept-Language: en-us, en
MIME-Version: 1.0
To:	linux-mips@linux-mips.org
CC:	"Kevin D. Kissell" <kevink@mips.com>,
	"Maciej W. Rozycki" <macro@linux-mips.org>,
	Ralf Baechle <ralf@linux-mips.org>
Subject: Re: another 4kc machine check.
References: <42553E49.7080004@timesys.com> <4256991C.4020601@timesys.com> <20050408161357.GB19166@linux-mips.org> <4256B524.2080509@timesys.com> <425AD440.5050600@timesys.com> <004a01c53ed4$dab12b00$10eca8c0@grendel> <Pine.LNX.4.61L.0504121610500.18606@blysk.ds.pg.gda.pl> <00c701c53f7e$09ec56c0$10eca8c0@grendel> <425BFCC2.9060901@timesys.com>
In-Reply-To: <425BFCC2.9060901@timesys.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-OriginalArrivalTime: 12 Apr 2005 19:08:05.0656 (UTC) FILETIME=[F4E83180:01C53F92]
Return-Path: <greg.weeks@timesys.com>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 7712
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: greg.weeks@timesys.com
Precedence: bulk
X-list: linux-mips
Content-Length: 314
Lines: 9

Greg Weeks wrote:

> No, it adds it before the TLBWR where there shouldn't be a hazard.

On the off chance that the hazard between the TLBWR and the ERET might 
be coming into play I tried a kernel with 3 nops between the TLBWR and 
ERET and no EHB before the TLBWR and it still machine checks for me.

Greg Weeks

From clem.taylor@gmail.com Tue Apr 12 21:57:04 2005
Received: with ECARTIS (v1.0.0; list linux-mips); Tue, 12 Apr 2005 21:57:19 +0100 (BST)
Received: from wproxy.gmail.com ([IPv6:::ffff:64.233.184.206]:25610 "EHLO
	wproxy.gmail.com") by linux-mips.org with ESMTP id <S8225219AbVDLU5E>;
	Tue, 12 Apr 2005 21:57:04 +0100
Received: by wproxy.gmail.com with SMTP id 57so1612650wri
        for <linux-mips@linux-mips.org>; Tue, 12 Apr 2005 13:56:57 -0700 (PDT)
DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws;
        s=beta; d=gmail.com;
        h=received:message-id:date:from:reply-to:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:references;
        b=EXANG0ewYmVxOUmh9+F2NCgFYdaOBWQVX7p9N5RQSweNNejEpdm+zrTNllh7jk9hakE7VZreU+9Zi02r2kkFs5Brh19DO7VQpabYC2l0mS28sgoU6x/GN7xPpPV4tzK6mfMjeBBMZL0V7JiGz7e1CNPRkkUB8qlca2VNjRB3rFA=
Received: by 10.54.13.77 with SMTP id 77mr395014wrm;
        Tue, 12 Apr 2005 13:56:56 -0700 (PDT)
Received: by 10.54.41.29 with HTTP; Tue, 12 Apr 2005 13:56:56 -0700 (PDT)
Message-ID: <ecb4efd10504121356194d4d9f@mail.gmail.com>
Date:	Tue, 12 Apr 2005 16:56:56 -0400
From:	Clem Taylor <clem.taylor@gmail.com>
Reply-To: Clem Taylor <clem.taylor@gmail.com>
To:	linux-mips@linux-mips.org
Subject: Re: troubles mmaping PCI device on Au1550
In-Reply-To: <479d91035fe1567525659393491e7ab9@embeddedalley.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
References: <ecb4efd10504101516482a9785@mail.gmail.com>
	 <479d91035fe1567525659393491e7ab9@embeddedalley.com>
Return-Path: <clem.taylor@gmail.com>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 7713
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: clem.taylor@gmail.com
Precedence: bulk
X-list: linux-mips
Content-Length: 566
Lines: 12

On Apr 12, 2005 11:22 AM, Dan Malek <dan@embeddedalley.com> wrote:
> The Au15xx uses 36-bit addressing for the PCI (among other) physical
> addresses.  The mmap() in your driver is the right thing, but you need
> to use io_remap_page_range() where the 2nd parameter is a phys_t.
> Your offset should be a phys_t type, and pci_resource_start() also
> returns a phys_t.

Yeah, this was exactly my problem. Last night I managed to find the
comment about this in au1000.h. Now I can happily mmap() the PCI
devices memory. Thanks!

                                --Clem

From stuartl@longlandclan.hopto.org Wed Apr 13 05:19:07 2005
Received: with ECARTIS (v1.0.0; list linux-mips); Wed, 13 Apr 2005 05:19:26 +0100 (BST)
Received: from 202-47-55-78.adsl.gil.com.au ([IPv6:::ffff:202.47.55.78]:25192
	"EHLO longlandclan.hopto.org") by linux-mips.org with ESMTP
	id <S8225257AbVDMETG>; Wed, 13 Apr 2005 05:19:06 +0100
Received: (qmail 19511 invoked by uid 210); 13 Apr 2005 14:18:56 +1000
Received: from 10.0.0.251 by www (envelope-from <stuartl@longlandclan.hopto.org>, uid 201) with qmail-scanner-1.25st 
 (spamassassin: 3.0.2. perlscan: 1.25st.  
 Clear:RC:1(10.0.0.251):. 
 Processed in 0.097415 secs); 13 Apr 2005 04:18:56 -0000
Received: from unknown (HELO ?10.0.0.251?) (10.0.0.251)
  by 192.168.5.1 with SMTP; 13 Apr 2005 14:18:56 +1000
Message-ID: <425C9DBF.6090807@longlandclan.hopto.org>
Date:	Wed, 13 Apr 2005 14:19:11 +1000
From:	Stuart Longland <stuartl@longlandclan.hopto.org>
User-Agent: Mozilla Thunderbird 1.0 (X11/20041206)
X-Accept-Language: en-us, en
MIME-Version: 1.0
To:	Greg Weeks <greg.weeks@timesys.com>
CC:	linux-mips@linux-mips.org
Subject: Re: BogoMIPS
References: <425BDCE4.6070708@timesys.com>
In-Reply-To: <425BDCE4.6070708@timesys.com>
X-Enigmail-Version: 0.89.6.0
X-Enigmail-Supports: pgp-inline, pgp-mime
Content-Type: multipart/signed; micalg=pgp-sha1;
 protocol="application/pgp-signature";
 boundary="------------enig6ECE6BC35CE34562CD0BB806"
Return-Path: <stuartl@longlandclan.hopto.org>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 7714
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: stuartl@longlandclan.hopto.org
Precedence: bulk
X-list: linux-mips
Content-Length: 2976
Lines: 79

This is an OpenPGP/MIME signed message (RFC 2440 and 3156)
--------------enig6ECE6BC35CE34562CD0BB806
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit

Greg Weeks wrote:
> Has anyone else noticed BogoMIPS is zero? Are we not doing the calibrate
> delay?
>
> Greg Weeks
>
> -bash-2.05b# cat /proc/cpuinfo
> system type             : MIPS Malta
> processor               : 0
> cpu model               : MIPS 4Kc V0.1
> BogoMIPS                : 0.00
> wait instruction        : yes
> microsecond timers      : yes
> tlb_entries             : 16
> extra interrupt vector  : yes
> hardware watchpoint     : yes
> VCED exceptions         : not available
> VCEI exceptions         : not available
> -
>

Probably, because it's no longer relevant these days.  It doesn't say
anything special.

> The more surprising it is that BogoMIPS have become a benchmark for
 > performance as important as extra inches in spam email.  Having been
 > a permanent annoynce over the years due to miss-interpretation by
 > users and due to excessive output on multiprocessor machines Linux
 > by default will no longer print the BogoMIPS number since 2.6.9-rc2.
-- <http://www.linux-mips.org/wiki/index.php/BogoMIPS>

Interestingly, my IP28 still shows the BogoMIPS reading in /proc/cpuinfo:
> stuartl@indigo ~ $ uname -a
> Linux indigo 2.6.10-mipscvs-20050115-ip28 #2 Sun Apr 3 08:24:18 EST 2005 mips64 R10000 V2.5  FPU V0.0 SGI Indigo2 GNU/Linux
> stuartl@indigo ~ $ cat /proc/cpuinfo
> system type             : SGI Indigo2
> processor               : 0
> cpu model               : R10000 V2.5  FPU V0.0
> BogoMIPS                : 193.53
> wait instruction        : no
> microsecond timers      : yes
> tlb_entries             : 64
> extra interrupt vector  : no
> hardware watchpoint     : yes
> VCED exceptions         : not available
> VCEI exceptions         : not available
> stuartl@indigo ~ $

So honestly, I don't know what's happening with BogoMIPS. :-)  What I do
know however, it isn't worth a cracker in terms of benchmarking value. ;-)

--
+-------------------------------------------------------------+
| Stuart Longland -oOo- http://stuartl.longlandclan.hopto.org |
| Atomic Linux Project     -oOo-    http://atomicl.berlios.de |
| - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - |
| I haven't lost my mind - it's backed up on a tape somewhere |
+-------------------------------------------------------------+

--------------enig6ECE6BC35CE34562CD0BB806
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: OpenPGP digital signature
Content-Disposition: attachment; filename="signature.asc"

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFCXJ3DuarJ1mMmSrkRAn6VAJ94r1URQOXGU5eMxGVXGyL9MGeIPgCfeIq8
6CnigapjkHOQMKnv6gEMl44=
=0ItE
-----END PGP SIGNATURE-----

--------------enig6ECE6BC35CE34562CD0BB806--

From greg.weeks@timesys.com Wed Apr 13 12:36:47 2005
Received: with ECARTIS (v1.0.0; list linux-mips); Wed, 13 Apr 2005 12:37:02 +0100 (BST)
Received: from mail.timesys.com ([IPv6:::ffff:65.117.135.102]:549 "EHLO
	exchange.timesys.com") by linux-mips.org with ESMTP
	id <S8225795AbVDMLgr>; Wed, 13 Apr 2005 12:36:47 +0100
Received: from [192.168.2.27] ([192.168.2.27]) by exchange.timesys.com with Microsoft SMTPSVC(5.0.2195.6713);
	 Wed, 13 Apr 2005 07:32:14 -0400
Message-ID: <425D0448.6010700@timesys.com>
Date:	Wed, 13 Apr 2005 07:36:40 -0400
From:	Greg Weeks <greg.weeks@timesys.com>
User-Agent: Mozilla Thunderbird 1.0 (X11/20041206)
X-Accept-Language: en-us, en
MIME-Version: 1.0
To:	Stuart Longland <stuartl@longlandclan.hopto.org>
CC:	linux-mips@linux-mips.org
Subject: Re: BogoMIPS
References: <425BDCE4.6070708@timesys.com> <425C9DBF.6090807@longlandclan.hopto.org>
In-Reply-To: <425C9DBF.6090807@longlandclan.hopto.org>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-OriginalArrivalTime: 13 Apr 2005 11:32:14.0656 (UTC) FILETIME=[70DA8C00:01C5401C]
Return-Path: <greg.weeks@timesys.com>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 7715
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: greg.weeks@timesys.com
Precedence: bulk
X-list: linux-mips
Content-Length: 464
Lines: 13

Stuart Longland wrote:

>
> So honestly, I don't know what's happening with BogoMIPS. :-)  What I do
> know however, it isn't worth a cracker in terms of benchmarking value. 
> ;-)

I could care less about it as a benchmarking value, but it's used to do 
calibrated udelays.  If mips doesn't need it because it calibrates some 
other way then fine. I suspect not though and we're probably using an 
initial works everywhere value. I don't know though.

Greg Weeks

From ralf@linux-mips.org Wed Apr 13 13:47:19 2005
Received: with ECARTIS (v1.0.0; list linux-mips); Wed, 13 Apr 2005 13:47:34 +0100 (BST)
Received: from extgw-uk.mips.com ([IPv6:::ffff:62.254.210.129]:21258 "EHLO
	bacchus.net.dhis.org") by linux-mips.org with ESMTP
	id <S8225800AbVDMMrT>; Wed, 13 Apr 2005 13:47:19 +0100
Received: from dea.linux-mips.net (localhost.localdomain [127.0.0.1])
	by bacchus.net.dhis.org (8.13.1/8.13.1) with ESMTP id j3DClEXu011665;
	Wed, 13 Apr 2005 13:47:14 +0100
Received: (from ralf@localhost)
	by dea.linux-mips.net (8.13.1/8.13.1/Submit) id j3DClC7F011664;
	Wed, 13 Apr 2005 13:47:12 +0100
Date:	Wed, 13 Apr 2005 13:47:12 +0100
From:	Ralf Baechle <ralf@linux-mips.org>
To:	Stuart Longland <stuartl@longlandclan.hopto.org>
Cc:	Greg Weeks <greg.weeks@timesys.com>, linux-mips@linux-mips.org
Subject: Re: BogoMIPS
Message-ID: <20050413124712.GF5253@linux-mips.org>
References: <425BDCE4.6070708@timesys.com> <425C9DBF.6090807@longlandclan.hopto.org>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <425C9DBF.6090807@longlandclan.hopto.org>
User-Agent: Mutt/1.4.1i
Return-Path: <ralf@linux-mips.org>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 7716
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: ralf@linux-mips.org
Precedence: bulk
X-list: linux-mips
Content-Length: 911
Lines: 24

On Wed, Apr 13, 2005 at 02:19:11PM +1000, Stuart Longland wrote:

> Probably, because it's no longer relevant these days.  It doesn't say
> anything special.

Nonsense.  It's just not printed to the screen by default.

> Interestingly, my IP28 still shows the BogoMIPS reading in /proc/cpuinfo:
> >stuartl@indigo ~ $ uname -a
> >Linux indigo 2.6.10-mipscvs-20050115-ip28 #2 Sun Apr 3 08:24:18 EST 2005 

Because you're running a vintage kernel.  The 0 BogoMIPS bug was
introduced by this CVS change:

  revision 1.54
  date: 2005/02/21 21:34:24;  author: ralf;  state: Exp;  lines: +2 -2
  On multiprocessor systems the BogoMIPS for each CPU was reported was
  the value for the last CPU having calibrated it's delay loop.

Only the value shown in /proc/cpuinfo on UP kernel was affected, so the
effect should be purely psychologic - I know what negative impact low
BogoMIPS may have on some people ;-)

  Ralf

From ralf@linux-mips.org Wed Apr 13 14:21:24 2005
Received: with ECARTIS (v1.0.0; list linux-mips); Wed, 13 Apr 2005 14:21:40 +0100 (BST)
Received: from extgw-uk.mips.com ([IPv6:::ffff:62.254.210.129]:29206 "EHLO
	bacchus.net.dhis.org") by linux-mips.org with ESMTP
	id <S8225808AbVDMNVY>; Wed, 13 Apr 2005 14:21:24 +0100
Received: from dea.linux-mips.net (localhost.localdomain [127.0.0.1])
	by bacchus.net.dhis.org (8.13.1/8.13.1) with ESMTP id j3DDLIFR012899;
	Wed, 13 Apr 2005 14:21:18 +0100
Received: (from ralf@localhost)
	by dea.linux-mips.net (8.13.1/8.13.1/Submit) id j3DDLIVG012891;
	Wed, 13 Apr 2005 14:21:18 +0100
Date:	Wed, 13 Apr 2005 14:21:18 +0100
From:	Ralf Baechle <ralf@linux-mips.org>
To:	Greg Weeks <greg.weeks@timesys.com>
Cc:	Stuart Longland <stuartl@longlandclan.hopto.org>,
	linux-mips@linux-mips.org
Subject: Re: BogoMIPS
Message-ID: <20050413132118.GG5253@linux-mips.org>
References: <425BDCE4.6070708@timesys.com> <425C9DBF.6090807@longlandclan.hopto.org> <425D0448.6010700@timesys.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <425D0448.6010700@timesys.com>
User-Agent: Mutt/1.4.1i
Return-Path: <ralf@linux-mips.org>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 7717
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: ralf@linux-mips.org
Precedence: bulk
X-list: linux-mips
Content-Length: 3428
Lines: 104

On Wed, Apr 13, 2005 at 07:36:40AM -0400, Greg Weeks wrote:

> >So honestly, I don't know what's happening with BogoMIPS. :-)  What I do
> >know however, it isn't worth a cracker in terms of benchmarking value. 
> >;-)
> 
> I could care less about it as a benchmarking value, but it's used to do 
> calibrated udelays.  If mips doesn't need it because it calibrates some 
> other way then fine. I suspect not though and we're probably using an 
> initial works everywhere value. I don't know though.

The bugs is the result of the somewhat messy way the calibration code is
working.  calibrate_delay() puts it's result into a global variable,
loops_per_jiffy.  The value is CPU-specific not global, so we need to
copy it to a per-processor data structure which we do on SMP but forget
to do on uniprocessor.  At the same time the actual delay loop code in
delay.h knew to use loops_per_jiffy on uniprocessor, so it was actually
working ok.

   Ralf

Index: arch/mips/kernel/cpu-probe.c
===================================================================
RCS file: /home/cvs/linux/arch/mips/kernel/cpu-probe.c,v
retrieving revision 1.43
diff -u -r1.43 cpu-probe.c
--- arch/mips/kernel/cpu-probe.c	8 Apr 2005 20:36:05 -0000	1.43
+++ arch/mips/kernel/cpu-probe.c	13 Apr 2005 13:19:11 -0000
@@ -17,7 +17,6 @@
 #include <linux/ptrace.h>
 #include <linux/stddef.h>
 
-#include <asm/bugs.h>
 #include <asm/cpu.h>
 #include <asm/fpu.h>
 #include <asm/mipsregs.h>
Index: arch/mips/kernel/smp.c
===================================================================
RCS file: /home/cvs/linux/arch/mips/kernel/smp.c,v
retrieving revision 1.77
diff -u -r1.77 smp.c
--- arch/mips/kernel/smp.c	18 Mar 2005 17:36:53 -0000	1.77
+++ arch/mips/kernel/smp.c	13 Apr 2005 13:19:11 -0000
@@ -226,7 +226,6 @@
 /* called from main before smp_init() */
 void __init smp_prepare_cpus(unsigned int max_cpus)
 {
-	cpu_data[0].udelay_val = loops_per_jiffy;
 	init_new_context(current, &init_mm);
 	current_thread_info()->cpu = 0;
 	smp_tune_scheduling();
Index: include/asm-mips/bugs.h
===================================================================
RCS file: /home/cvs/linux/include/asm-mips/bugs.h,v
retrieving revision 1.10
diff -u -r1.10 bugs.h
--- include/asm-mips/bugs.h	25 Jul 2003 22:49:24 -0000	1.10
+++ include/asm-mips/bugs.h	13 Apr 2005 13:19:12 -0000
@@ -8,12 +8,17 @@
 #define _ASM_BUGS_H
 
 #include <linux/config.h>
+#include <asm/cpu.h>
+#include <asm/cpu-info.h>
 
 extern void check_bugs32(void);
 extern void check_bugs64(void);
 
 static inline void check_bugs(void)
 {
+	unsigned int cpu = smp_processor_id();
+
+	cpu_data[cpu].udelay_val = loops_per_jiffy;
 	check_bugs32();
 #ifdef CONFIG_MIPS64
 	check_bugs64();
Index: include/asm-mips/delay.h
===================================================================
RCS file: /home/cvs/linux/include/asm-mips/delay.h,v
retrieving revision 1.16
diff -u -r1.16 delay.h
--- include/asm-mips/delay.h	8 Oct 2004 02:41:17 -0000	1.16
+++ include/asm-mips/delay.h	13 Apr 2005 13:19:12 -0000
@@ -15,8 +15,6 @@
 
 #include <asm/compiler.h>
 
-extern unsigned long loops_per_jiffy;
-
 static inline void __delay(unsigned long loops)
 {
 	if (sizeof(long) == 4)
@@ -82,11 +80,7 @@
 	__delay(usecs);
 }
 
-#ifdef CONFIG_SMP
 #define __udelay_val cpu_data[smp_processor_id()].udelay_val
-#else
-#define __udelay_val loops_per_jiffy
-#endif
 
 #define udelay(usecs) __udelay((usecs),__udelay_val)
 

From tklauser@access.unizh.ch Wed Apr 13 14:31:57 2005
Received: with ECARTIS (v1.0.0; list linux-mips); Wed, 13 Apr 2005 14:32:13 +0100 (BST)
Received: from idmailgate1.unizh.ch ([IPv6:::ffff:130.60.68.105]:39468 "EHLO
	idmailgate1.unizh.ch") by linux-mips.org with ESMTP
	id <S8225808AbVDMNb5>; Wed, 13 Apr 2005 14:31:57 +0100
Received: from localhost ([130.60.169.171])
	by idmailgate1.unizh.ch (8.13.1/8.13.1/SuSE Linux 0.7) with ESMTP id j3DDVsLw008833;
	Wed, 13 Apr 2005 15:31:54 +0200
Date:	Wed, 13 Apr 2005 15:31:52 +0200
From:	Tobias Klauser <tklauser@nuerscht.ch>
To:	kernel-janitors@lists.osdl.org
Cc:	ralf@linux-mips.org, linux-mips@linux-mips.org
Subject: [PATCH] net/ioc3-eth: Use the DMA_{32,64}BIT_MASK constants
Message-ID: <20050413133147.GA9864@argon.tklauser.home>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
X-GPG-Key: 0x3A445520
X-OS:	GNU/Linux
User-Agent: Mutt/1.5.6+20040907i
X-Virus-Scanned: by amavisd-new
Return-Path: <tklauser@access.unizh.ch>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 7718
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: tklauser@nuerscht.ch
Precedence: bulk
X-list: linux-mips
Content-Length: 1596
Lines: 40

Use the DMA_{32,64}BIT_MASK constants from dma-mapping.h when calling
pci_set_dma_mask() or pci_set_consistent_dma_mask()
This patch includes dma-mapping.h explicitly because patches caused
errors on some architectures otherwise.
See http://marc.theaimsgroup.com/?t=108001993000001&r=1&w=2 for details

Signed-off-by: Tobias Klauser <tklauser@nuerscht.ch>

diff -urpN linux-2.6.12-rc2-mm3/drivers/net/ioc3-eth.c linux-2.6.12-rc2-mm3-tk/drivers/net/ioc3-eth.c
--- linux-2.6.12-rc2-mm3/drivers/net/ioc3-eth.c	2005-04-12 16:56:40.000000000 +0200
+++ linux-2.6.12-rc2-mm3-tk/drivers/net/ioc3-eth.c	2005-04-12 17:28:55.470878176 +0200
@@ -38,6 +38,7 @@
 #include <linux/errno.h>
 #include <linux/module.h>
 #include <linux/pci.h>
+#include <linux/dma-mapping.h>
 #include <linux/crc32.h>
 #include <linux/mii.h>
 #include <linux/in.h>
@@ -1193,17 +1194,17 @@ static int ioc3_probe(struct pci_dev *pd
 	int err, pci_using_dac;
 
 	/* Configure DMA attributes. */
-	err = pci_set_dma_mask(pdev, 0xffffffffffffffffULL);
+	err = pci_set_dma_mask(pdev, DMA_64BIT_MASK);
 	if (!err) {
 		pci_using_dac = 1;
-		err = pci_set_consistent_dma_mask(pdev, 0xffffffffffffffffULL);
+		err = pci_set_consistent_dma_mask(pdev, DMA_64BIT_MASK);
 		if (err < 0) {
 			printk(KERN_ERR "%s: Unable to obtain 64 bit DMA "
 			       "for consistent allocations\n", pci_name(pdev));
 			goto out;
 		}
 	} else {
-		err = pci_set_dma_mask(pdev, 0xffffffffULL);
+		err = pci_set_dma_mask(pdev, DMA_32BIT_MASK);
 		if (err) {
 			printk(KERN_ERR "%s: No usable DMA configuration, "
 			       "aborting.\n", pci_name(pdev));

From ralf@linux-mips.org Wed Apr 13 14:36:33 2005
Received: with ECARTIS (v1.0.0; list linux-mips); Wed, 13 Apr 2005 14:36:48 +0100 (BST)
Received: from extgw-uk.mips.com ([IPv6:::ffff:62.254.210.129]:39454 "EHLO
	bacchus.net.dhis.org") by linux-mips.org with ESMTP
	id <S8225808AbVDMNgd>; Wed, 13 Apr 2005 14:36:33 +0100
Received: from dea.linux-mips.net (localhost.localdomain [127.0.0.1])
	by bacchus.net.dhis.org (8.13.1/8.13.1) with ESMTP id j3DDaSY5013480;
	Wed, 13 Apr 2005 14:36:28 +0100
Received: (from ralf@localhost)
	by dea.linux-mips.net (8.13.1/8.13.1/Submit) id j3DDaRAn013470;
	Wed, 13 Apr 2005 14:36:27 +0100
Date:	Wed, 13 Apr 2005 14:36:27 +0100
From:	Ralf Baechle <ralf@linux-mips.org>
To:	Tobias Klauser <tklauser@nuerscht.ch>
Cc:	kernel-janitors@lists.osdl.org, linux-mips@linux-mips.org
Subject: Re: [PATCH] net/ioc3-eth: Use the DMA_{32,64}BIT_MASK constants
Message-ID: <20050413133627.GI5253@linux-mips.org>
References: <20050413133147.GA9864@argon.tklauser.home>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <20050413133147.GA9864@argon.tklauser.home>
User-Agent: Mutt/1.4.1i
Return-Path: <ralf@linux-mips.org>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 7719
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: ralf@linux-mips.org
Precedence: bulk
X-list: linux-mips
Content-Length: 507
Lines: 15

On Wed, Apr 13, 2005 at 03:31:52PM +0200, Tobias Klauser wrote:

> Use the DMA_{32,64}BIT_MASK constants from dma-mapping.h when calling
> pci_set_dma_mask() or pci_set_consistent_dma_mask()
> This patch includes dma-mapping.h explicitly because patches caused
> errors on some architectures otherwise.
> See http://marc.theaimsgroup.com/?t=108001993000001&r=1&w=2 for details
> 
> Signed-off-by: Tobias Klauser <tklauser@nuerscht.ch>

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>

Looks good,

  Ralf

From eckhardt@satorlaser.com Wed Apr 13 15:51:18 2005
Received: with ECARTIS (v1.0.0; list linux-mips); Wed, 13 Apr 2005 15:51:33 +0100 (BST)
Received: from moutng.kundenserver.de ([IPv6:::ffff:212.227.126.183]:29159
	"EHLO moutng.kundenserver.de") by linux-mips.org with ESMTP
	id <S8225851AbVDMOvS>; Wed, 13 Apr 2005 15:51:18 +0100
Received: from [212.227.126.155] (helo=mrelayng.kundenserver.de)
	by moutng.kundenserver.de with esmtp (Exim 3.35 #1)
	id 1DLjCD-0003gx-00
	for linux-mips@linux-mips.org; Wed, 13 Apr 2005 16:50:25 +0200
Received: from [213.39.254.66] (helo=tuxator.satorlaser-intern.com)
	by mrelayng.kundenserver.de with asmtp (TLSv1:RC4-MD5:128)
	(Exim 3.35 #1)
	id 1DLjCC-0004Nt-00
	for linux-mips@linux-mips.org; Wed, 13 Apr 2005 16:50:24 +0200
From:	Ulrich Eckhardt <eckhardt@satorlaser.com>
Organization: Sator Laser GmbH
To:	linux-mips@linux-mips.org
Subject: Re: CompactFlash on PCMCIA problems
Date:	Wed, 13 Apr 2005 16:51:04 +0200
User-Agent: KMail/1.7.2
References: <200504081610.32088.eckhardt@satorlaser.com>
In-Reply-To: <200504081610.32088.eckhardt@satorlaser.com>
MIME-Version: 1.0
Content-Type: text/plain;
  charset="utf-8"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
Message-Id: <200504131651.05113.eckhardt@satorlaser.com>
X-Provags-ID: kundenserver.de abuse@kundenserver.de auth:e35cee35a663f5c944b9750a965814ae
Return-Path: <eckhardt@satorlaser.com>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 7720
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: eckhardt@satorlaser.com
Precedence: bulk
X-list: linux-mips
Content-Length: 1044
Lines: 28

Ulrich Eckhardt wrote:
> I'm trying to code the glue to connect the vanilla ATA drivers with a CF
> card connected to an Au1100. I managed to access the CIS parts of the card
> but then the problems start: the area where I'd expect to find the ATA
> controller's registers mirrors every byte twice, just as if the address
> used was first shifted by one.
>
> Here's a sketch of what I'm doing:
>
> 1. Setup SYS_PINFUNC so the PCMCIA interface is used

Well, at least I tried to...

[...]
> At this moment, I think I should be able to talk to the ATA controller via
> the first few bytes of the ioremapped PCMCIA_IO_PHYS_ADDR, but that area
> has this weird mirrored byte behaviour which I don't understand.

Setting the PC flag in SYS_PINFUNC in fact DISables the PCMCIA driver, leaving 
PREG, PCE1, PCE2 and PWE as GPIO pins. These seem unused for 16 bit accesses 
to the attribute memory but required for the 8 bit accesses to the ATA 
controller's registers, causing the funny behaviour.

"Principle of maximum surprise."

oh, well....

Uli

From greg.weeks@timesys.com Wed Apr 13 19:35:19 2005
Received: with ECARTIS (v1.0.0; list linux-mips); Wed, 13 Apr 2005 19:35:35 +0100 (BST)
Received: from mail.timesys.com ([IPv6:::ffff:65.117.135.102]:41005 "EHLO
	exchange.timesys.com") by linux-mips.org with ESMTP
	id <S8225932AbVDMSfT>; Wed, 13 Apr 2005 19:35:19 +0100
Received: from [192.168.2.27] ([192.168.2.27]) by exchange.timesys.com with Microsoft SMTPSVC(5.0.2195.6713);
	 Wed, 13 Apr 2005 14:30:45 -0400
Message-ID: <425D665F.5080605@timesys.com>
Date:	Wed, 13 Apr 2005 14:35:11 -0400
From:	Greg Weeks <greg.weeks@timesys.com>
User-Agent: Mozilla Thunderbird 1.0 (X11/20041206)
X-Accept-Language: en-us, en
MIME-Version: 1.0
To:	linux-mips@linux-mips.org
Subject: USB on malta
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-OriginalArrivalTime: 13 Apr 2005 18:30:45.0062 (UTC) FILETIME=[E7D26E60:01C54056]
Return-Path: <greg.weeks@timesys.com>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 7721
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: greg.weeks@timesys.com
Precedence: bulk
X-list: linux-mips
Content-Length: 753
Lines: 21

Has anyone tried USB on malta recently? It's turned off on the default 
config. Turning it on an plugging something in results in:

uhci_hcd 0000:00:0a.2: host system error, PCI problems?
uhci_hcd 0000:00:0a.2: host controller process error, something bad 
happened!
uhci_hcd 0000:00:0a.2: host controller halted, very bad!
usb 1-1: khubd timed out on ep0in
usb 1-1: unable to read config index 0 descriptor/start
usb 1-1: can't read configurations, error -145
usb 1-1: khubd timed out on ep0in
usb 1-1: khubd timed out on ep0out
eth0: transmit timed out, status 06f3, resetting.
usb 1-1: khubd timed out on ep0out
usb 1-1: device not accepting address 3, error -145

And what appaears to be no more interrupts.

Has anyone chased this yet?

Greg Weeks

From danieljlaird@hotmail.com Wed Apr 13 20:49:30 2005
Received: with ECARTIS (v1.0.0; list linux-mips); Wed, 13 Apr 2005 20:49:52 +0100 (BST)
Received: from bay101-f39.bay101.hotmail.com ([IPv6:::ffff:64.4.56.49]:35380
	"EHLO hotmail.com") by linux-mips.org with ESMTP
	id <S8225936AbVDMTta>; Wed, 13 Apr 2005 20:49:30 +0100
Received: from mail pickup service by hotmail.com with Microsoft SMTPSVC;
	 Wed, 13 Apr 2005 12:49:21 -0700
Message-ID: <BAY101-F3978081BDE57937C67314CDC340@phx.gbl>
Received: from 64.4.56.200 by by101fd.bay101.hotmail.msn.com with HTTP;
	Wed, 13 Apr 2005 19:49:21 GMT
X-Originating-IP: [64.4.56.200]
X-Originating-Email: [danieljlaird@hotmail.com]
X-Sender: danieljlaird@hotmail.com
In-Reply-To: <Pine.LNX.4.61L.0504111659410.31547@blysk.ds.pg.gda.pl>
From:	"Daniel Laird" <danieljlaird@hotmail.com>
To:	macro@linux-mips.org
Cc:	libc-alpha@sources.redhat.com, linux-mips@linux-mips.org
Subject: Re: Building GLIBC 2.3.4 on MIPS
Date:	Wed, 13 Apr 2005 19:49:21 +0000
Mime-Version: 1.0
Content-Type: text/plain; format=flowed
X-OriginalArrivalTime: 13 Apr 2005 19:49:21.0768 (UTC) FILETIME=[E332A680:01C54061]
Return-Path: <danieljlaird@hotmail.com>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 7722
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: danieljlaird@hotmail.com
Precedence: bulk
X-list: linux-mips
Content-Length: 556
Lines: 20

I have tried this with any number of patches you want to name

I can do the following combo
glibc-2.3.2
glibc-linuxthreads-2.3.4
kernel 2.6.11.6
binutils-2.15.96

It all works but glibc-2.3.3, 2.3.4, 2.3.5 all fail.  bits/syscalls.h is not 
even generated.  I do not have the problem where it generated wrongly it 
just does not get made on my system and also the wrong flags are passed to 
the HOST compiler which requires patching.

If anyone ever get glibc-2.3.4 and the rest working let me know (please 
check that bits/syscall.h exists)

cheers
Dan



From greg.weeks@timesys.com Wed Apr 13 21:01:36 2005
Received: with ECARTIS (v1.0.0; list linux-mips); Wed, 13 Apr 2005 21:01:51 +0100 (BST)
Received: from mail.timesys.com ([IPv6:::ffff:65.117.135.102]:21346 "EHLO
	exchange.timesys.com") by linux-mips.org with ESMTP
	id <S8225936AbVDMUBg>; Wed, 13 Apr 2005 21:01:36 +0100
Received: from [192.168.2.27] ([192.168.2.27]) by exchange.timesys.com with Microsoft SMTPSVC(5.0.2195.6713);
	 Wed, 13 Apr 2005 15:57:02 -0400
Message-ID: <425D7A99.5040401@timesys.com>
Date:	Wed, 13 Apr 2005 16:01:29 -0400
From:	Greg Weeks <greg.weeks@timesys.com>
User-Agent: Mozilla Thunderbird 1.0 (X11/20041206)
X-Accept-Language: en-us, en
MIME-Version: 1.0
To:	Daniel Laird <danieljlaird@hotmail.com>
CC:	macro@linux-mips.org, libc-alpha@sources.redhat.com,
	linux-mips@linux-mips.org
Subject: Re: Building GLIBC 2.3.4 on MIPS
References: <BAY101-F3978081BDE57937C67314CDC340@phx.gbl>
In-Reply-To: <BAY101-F3978081BDE57937C67314CDC340@phx.gbl>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-OriginalArrivalTime: 13 Apr 2005 19:57:02.0812 (UTC) FILETIME=[F60061C0:01C54062]
Return-Path: <greg.weeks@timesys.com>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 7723
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: greg.weeks@timesys.com
Precedence: bulk
X-list: linux-mips
Content-Length: 748
Lines: 22

Daniel Laird wrote:

> I have tried this with any number of patches you want to name
>
> I can do the following combo
> glibc-2.3.2
> glibc-linuxthreads-2.3.4
> kernel 2.6.11.6
> binutils-2.15.96
>
> It all works but glibc-2.3.3, 2.3.4, 2.3.5 all fail.  bits/syscalls.h 
> is not even generated.  I do not have the problem where it generated 
> wrongly it just does not get made on my system and also the wrong 
> flags are passed to the HOST compiler which requires patching.
>
> If anyone ever get glibc-2.3.4 and the rest working let me know 
> (please check that bits/syscall.h exists)

I've got glibc-2.3.3-200407050320 and gcc-3.4.1-20040715 building here. 
A number of patches of course. I remember the syscall thing was a pain.

Greg Weeks

From bkuschak@yahoo.com Wed Apr 13 22:38:26 2005
Received: with ECARTIS (v1.0.0; list linux-mips); Wed, 13 Apr 2005 22:38:42 +0100 (BST)
Received: from web40908.mail.yahoo.com ([IPv6:::ffff:66.218.78.205]:41612 "HELO
	web40908.mail.yahoo.com") by linux-mips.org with SMTP
	id <S8225962AbVDMVi0>; Wed, 13 Apr 2005 22:38:26 +0100
Received: (qmail 50943 invoked by uid 60001); 13 Apr 2005 21:38:18 -0000
Comment: DomainKeys? See http://antispam.yahoo.com/domainkeys
DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws;
  s=s1024; d=yahoo.com;
  b=McYhXD6euIY7kSK0qBQBP4aeIv1M6EsK8i3GbObCPokaWAndD6helTWuzj2D1XBojQlynVLxVBRjV/bgggI2p01tBdptNwsOK2mpgS8UGudnx86G6A1NF9Q4TBCOjMuYJxaom2/xKfyNqvO+i/VQyxoupPWOB+xhFA3o6MDu9xg=  ;
Message-ID: <20050413213818.50941.qmail@web40908.mail.yahoo.com>
Received: from [65.205.244.66] by web40908.mail.yahoo.com via HTTP; Wed, 13 Apr 2005 14:38:18 PDT
Date:	Wed, 13 Apr 2005 14:38:18 -0700 (PDT)
From:	Brian Kuschak <bkuschak@yahoo.com>
Subject: Re: gdb backtrace with core files [PATCH]
To:	Greg Weeks <greg.weeks@timesys.com>
Cc:	linux-mips@linux-mips.org, 'Daniel Jacobowitz' <dan@debian.org>,
	'Ralf Baechle' <ralf@linux-mips.org>
In-Reply-To: 6667
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="0-563089567-1113428298=:50713"
Return-Path: <bkuschak@yahoo.com>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 7724
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: bkuschak@yahoo.com
Precedence: bulk
X-list: linux-mips
Content-Length: 3754
Lines: 123

--0-563089567-1113428298=:50713
Content-Type: text/plain; charset=us-ascii
Content-Id: 
Content-Disposition: inline

Ok, based on some off-list discussion, here is a patch
which fixes the non-ABI-compilant linux-mips coredump
for 2.4.25.  This needs to be merged into the 2.4
tree, but is already present in 2.6.

Tested with standard gdb-6.3.  Backtracing and
register contents are correct now.

Regards,
Brian

--- Greg Weeks <greg.weeks@timesys.com> wrote:
> Brian Kuschak wrote:
> 
> >Greg,
> >
> >Is your GDB hosted on MIPS or another machine?  Are
> >those patches freely available?  If so, can you
> >  
> >
> OK, I checked.
> 
> Most of what's in our patches should be in gdb HEAD.
> We're currently at 
> 6.2.1 and don't want to take the time to move to
> head. If you're 
> interested and no one objects I can post them to the
> mips list. There 
> are 37 patches totaling 285K. Not all are mips
> related and gdb isn't 
> totally working for me yet.
> 
> Greg Weeks
> 


		
__________________________________ 
Yahoo! Mail Mobile 
Take Yahoo! Mail with you! Check email on your mobile phone. 
http://mobile.yahoo.com/learn/mail 
--0-563089567-1113428298=:50713
Content-Type: text/x-patch; name="linux_gdb_corefile.patch"
Content-Description: linux_gdb_corefile.patch
Content-Disposition: inline; filename="linux_gdb_corefile.patch"

diff -urN --exclude=.svn linux.svn/arch/mips/kernel/process.c linux/arch/mips/kernel/process.c
--- linux.svn/arch/mips/kernel/process.c	2005-04-13 13:34:37.991809507 -0700
+++ linux/arch/mips/kernel/process.c	2005-04-13 12:09:06.850076067 -0700
@@ -128,6 +128,29 @@
 	return 1;
 }
 
+/* bk - backported from 2.6.  coredump was not abi compliant. */
+void dump_regs(elf_greg_t *gp, struct pt_regs *regs)
+{
+	int i;
+
+	for (i = 0; i < EF_REG0; i++)
+		gp[i] = 0;
+	gp[EF_REG0] = 0;
+	for (i = 1; i <= 31; i++)
+		gp[EF_REG0 + i] = regs->regs[i];
+	gp[EF_REG26] = 0;
+	gp[EF_REG27] = 0;
+	gp[EF_LO] = regs->lo;
+	gp[EF_HI] = regs->hi;
+	gp[EF_CP0_EPC] = regs->cp0_epc;
+	gp[EF_CP0_BADVADDR] = regs->cp0_badvaddr;
+	gp[EF_CP0_STATUS] = regs->cp0_status;
+	gp[EF_CP0_CAUSE] = regs->cp0_cause;
+#ifdef EF_UNUSED0
+	gp[EF_UNUSED0] = 0;
+#endif
+}
+
 /*
  * Create a kernel thread
  */
diff -urN --exclude=.svn linux.svn/include/asm-mips/elf.h linux/include/asm-mips/elf.h
--- linux.svn/include/asm-mips/elf.h	2005-04-13 13:32:23.240250530 -0700
+++ linux/include/asm-mips/elf.h	2005-04-13 11:31:22.954466902 -0700
@@ -66,9 +66,17 @@
 #define USE_ELF_CORE_DUMP
 #define ELF_EXEC_PAGESIZE	PAGE_SIZE
 
-#define ELF_CORE_COPY_REGS(_dest,_regs)				\
-	memcpy((char *) &_dest, (char *) _regs,			\
-	       sizeof(struct pt_regs));
+/* bk - backport changes from 2.6 to make coredump ABI-compilant */
+extern void dump_regs(elf_greg_t *, struct pt_regs *regs);
+extern int dump_task_regs (struct task_struct *, elf_gregset_t *);
+extern int dump_task_fpu(struct task_struct *, elf_fpregset_t *);
+
+#define ELF_CORE_COPY_REGS(elf_regs, regs)			\
+	dump_regs((elf_greg_t *)&(elf_regs), regs);
+#define ELF_CORE_COPY_TASK_REGS(tsk, elf_regs) \
+	dump_task_regs(tsk, elf_regs)
+#define ELF_CORE_COPY_FPREGS(tsk, elf_fpregs)			\
+	dump_task_fpu(tsk, elf_fpregs)
 
 /* This yields a mask that user programs can use to figure out what
    instruction set this cpu supports.  This could be done in userspace,
diff -urN --exclude=.svn linux.svn/include/asm-mips/reg.h linux/include/asm-mips/reg.h
--- linux.svn/include/asm-mips/reg.h	2005-04-13 13:32:23.263247724 -0700
+++ linux/include/asm-mips/reg.h	2005-04-13 12:01:47.717743650 -0700
@@ -45,6 +45,9 @@
 /*
  * k0/k1 unsaved
  */
+#define EF_REG26		32
+#define EF_REG27		33
+
 #define EF_REG28		34
 #define EF_REG29		35
 #define EF_REG30		36

--0-563089567-1113428298=:50713--

From ralf@linux-mips.org Thu Apr 14 14:16:26 2005
Received: with ECARTIS (v1.0.0; list linux-mips); Thu, 14 Apr 2005 14:16:41 +0100 (BST)
Received: from extgw-uk.mips.com ([IPv6:::ffff:62.254.210.129]:45316 "EHLO
	bacchus.net.dhis.org") by linux-mips.org with ESMTP
	id <S8225989AbVDNNQ0>; Thu, 14 Apr 2005 14:16:26 +0100
Received: from dea.linux-mips.net (localhost.localdomain [127.0.0.1])
	by bacchus.net.dhis.org (8.13.1/8.13.1) with ESMTP id j3EDGGMA030338;
	Thu, 14 Apr 2005 14:16:16 +0100
Received: (from ralf@localhost)
	by dea.linux-mips.net (8.13.1/8.13.1/Submit) id j3EDGF5l030337;
	Thu, 14 Apr 2005 14:16:15 +0100
Date:	Thu, 14 Apr 2005 14:16:14 +0100
From:	Ralf Baechle <ralf@linux-mips.org>
To:	Yoichi Yuasa <yuasa@hh.iij4u.or.jp>
Cc:	linux-mips <linux-mips@linux-mips.org>
Subject: Re: [PATCH 2.6] vr41xx: add resource management to cmu.c
Message-ID: <20050414131614.GA30329@linux-mips.org>
References: <20050413000201.151293d3.yuasa@hh.iij4u.or.jp>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <20050413000201.151293d3.yuasa@hh.iij4u.or.jp>
User-Agent: Mutt/1.4.1i
Return-Path: <ralf@linux-mips.org>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 7725
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: ralf@linux-mips.org
Precedence: bulk
X-list: linux-mips
Content-Length: 150
Lines: 7

On Wed, Apr 13, 2005 at 12:02:01AM +0900, Yoichi Yuasa wrote:

> This patch had added resource management to cmu.c.

Thanks Yoichi.  Applied,

  Ralf

From spam@god.dyndns.org Thu Apr 14 17:26:36 2005
Received: with ECARTIS (v1.0.0; list linux-mips); Thu, 14 Apr 2005 17:26:51 +0100 (BST)
Received: from god.demon.nl ([IPv6:::ffff:83.160.164.11]:21448 "EHLO
	god.dyndns.org") by linux-mips.org with ESMTP id <S8226007AbVDNQ0g>;
	Thu, 14 Apr 2005 17:26:36 +0100
Received: by god.dyndns.org (Postfix, from userid 1005)
	id 2E3F44ECAE; Thu, 14 Apr 2005 18:26:34 +0200 (CEST)
Date:	Thu, 14 Apr 2005 18:26:34 +0200
From:	Henk <Henk.Vergonet@gmail.com>
To:	linux-mips@linux-mips.org
Subject: Porting mips based routers
Message-ID: <20050414162633.GA30142@god.dyndns.org>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
User-Agent: Mutt/1.5.6i
Return-Path: <spam@god.dyndns.org>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 7726
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: Henk.Vergonet@gmail.com
Precedence: bulk
X-list: linux-mips
Content-Length: 341
Lines: 15


Hi,

I was wondering if there is already someone working on a kernel 2.6
port for mips based Linksys\ASUS routers. So far I could not find
anything on the net.

There's an initial wiki page on the openWRT site.
http://openwrt.org/Kernel26Firmware

If so I would like to see if we can set up some colaborative effort...

Best regards,

Henk

From ralf@linux-mips.org Thu Apr 14 19:16:11 2005
Received: with ECARTIS (v1.0.0; list linux-mips); Thu, 14 Apr 2005 19:16:26 +0100 (BST)
Received: from extgw-uk.mips.com ([IPv6:::ffff:62.254.210.129]:31507 "EHLO
	bacchus.net.dhis.org") by linux-mips.org with ESMTP
	id <S8226016AbVDNSQL>; Thu, 14 Apr 2005 19:16:11 +0100
Received: from dea.linux-mips.net (localhost.localdomain [127.0.0.1])
	by bacchus.net.dhis.org (8.13.1/8.13.1) with ESMTP id j3EI5ToV008572
	for <linux-mips@linux-mips.org>; Thu, 14 Apr 2005 19:05:29 +0100
Received: (from ralf@localhost)
	by dea.linux-mips.net (8.13.1/8.13.1/Submit) id j3EI5RqG008571;
	Thu, 14 Apr 2005 19:05:27 +0100
Date:	Thu, 14 Apr 2005 19:05:27 +0100
From:	Ralf Baechle <ralf@linux-mips.org>
To:	Henk <Henk.Vergonet@gmail.com>
Cc:	linux-mips@linux-mips.org
Subject: Re: Porting mips based routers
Message-ID: <20050414180527.GJ30329@linux-mips.org>
References: <20050414162633.GA30142@god.dyndns.org>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <20050414162633.GA30142@god.dyndns.org>
User-Agent: Mutt/1.4.1i
Return-Path: <ralf@linux-mips.org>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 7727
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: ralf@linux-mips.org
Precedence: bulk
X-list: linux-mips
Content-Length: 567
Lines: 16

On Thu, Apr 14, 2005 at 06:26:34PM +0200, Henk wrote:

> I was wondering if there is already someone working on a kernel 2.6
> port for mips based Linksys\ASUS routers. So far I could not find
> anything on the net.
> 
> There's an initial wiki page on the openWRT site.
> http://openwrt.org/Kernel26Firmware
> 
> If so I would like to see if we can set up some colaborative effort...

None of the code for the routers or ASICs has been contributed back to
linux-mips.org so far so all you'll find there is a little blurb in the
wiki and a bunch of pointers.

  Ralf

From pdh@colonel-panic.org Thu Apr 14 19:59:58 2005
Received: with ECARTIS (v1.0.0; list linux-mips); Thu, 14 Apr 2005 20:00:13 +0100 (BST)
Received: from i-83-67-53-76.freedom2surf.net ([IPv6:::ffff:83.67.53.76]:22429
	"EHLO skeleton-jack.localnet") by linux-mips.org with ESMTP
	id <S8226017AbVDNS76>; Thu, 14 Apr 2005 19:59:58 +0100
Received: from pdh by skeleton-jack.localnet with local (Exim 3.36 #1 (Debian))
	id 1DM9Z8-0001SV-00; Thu, 14 Apr 2005 19:59:50 +0100
Date:	Thu, 14 Apr 2005 19:59:49 +0100
To:	linux-mips@linux-mips.org
Cc:	ralf@linux-mips.org
Subject: [PATCH Cobalt 1/1] 64-bit fix
Message-ID: <20050414185949.GA5578@skeleton-jack>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
User-Agent: Mutt/1.5.6+20040907i
From:	Peter Horton <pdh@colonel-panic.org>
Return-Path: <pdh@colonel-panic.org>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 7728
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: pdh@colonel-panic.org
Precedence: bulk
X-list: linux-mips
Content-Length: 2849
Lines: 97

This patch adds detection of broken 64-bit mode LL/SC on Cobalt units.
With this patch my Qube2700 boots a 64-bit build fine. The later units
have some problems with the Tulip driver.

P.

--

Index: linux/arch/mips/kernel/cpu-probe.c
===================================================================
--- linux.orig/arch/mips/kernel/cpu-probe.c	2005-04-11 23:19:17.000000000 +0100
+++ linux/arch/mips/kernel/cpu-probe.c	2005-04-11 23:35:06.000000000 +0100
@@ -131,6 +131,58 @@
 	check_wait();
 }
 
+#ifdef CONFIG_MIPS64
+
+/*
+ * On RM5230/5231 all accesses to XKPHYS by LL(D) are forced
+ * to be uncached, bits 61-59 of the address are ignored.
+ *
+ * Apparently fixed on RM5230A/5231A.
+ */
+static inline int check_lld(void)
+{
+	unsigned long flags, value, match, phys, *addr;
+
+	printk("Checking for lld bug... ");
+
+	/* hope the stack is in the low 512MB */
+	phys = CPHYSADDR((unsigned long) &value);
+
+	/* write value to memory */
+	value = 0xfedcba9876543210;
+	addr = (unsigned long *) PHYS_TO_XKPHYS(K_CALG_UNCACHED, phys);
+	*addr = value;
+
+	/* stop spurious flushes */
+	local_irq_save(flags);
+
+	/* flip cached value */
+	value = ~value;
+
+	/* read value, supposedly from cache */
+	addr = (unsigned long *) PHYS_TO_XKPHYS(K_CALG_NONCOHERENT, phys);
+	asm volatile("lld %0, %1" : "=r" (match) : "m" (*addr));
+
+	local_irq_restore(flags);
+
+	match ^= value;
+
+	switch ((long) match) {
+	case 0:
+		printk("no.\n");
+		break;
+	case -1:
+		printk("yes.\n");
+		break;
+	default:
+		printk("yikes yes! (%lx/%lx@%p)\nPlease report to <linux-mips@linux-mips.org>.", value, match, &value);
+	}
+
+	return !match;
+}
+
+#endif
+
 /*
  * Probe whether cpu has config register by trying to play with
  * alternate cache bit and see whether it matters.
@@ -347,7 +399,11 @@
 		c->cputype = CPU_NEVADA;
 		c->isa_level = MIPS_CPU_ISA_IV;
 		c->options = R4K_OPTS | MIPS_CPU_FPU | MIPS_CPU_32FPR |
-		             MIPS_CPU_DIVEC | MIPS_CPU_LLSC;
+		             MIPS_CPU_DIVEC;
+#ifdef CONFIG_MIPS64
+		if (check_lld())
+#endif
+			c->options |= MIPS_CPU_LLSC;
 		c->tlbsize = 48;
 		break;
 	case PRID_IMP_R6000:
Index: linux/include/asm-mips/addrspace.h
===================================================================
--- linux.orig/include/asm-mips/addrspace.h	2005-04-11 23:19:17.000000000 +0100
+++ linux/include/asm-mips/addrspace.h	2005-04-11 23:19:20.000000000 +0100
@@ -120,7 +120,7 @@
 #define PHYS_TO_XKSEG_UNCACHED(p)	PHYS_TO_XKPHYS(K_CALG_UNCACHED,(p))
 #define PHYS_TO_XKSEG_CACHED(p)		PHYS_TO_XKPHYS(K_CALG_COH_SHAREABLE,(p))
 #define XKPHYS_TO_PHYS(p)		((p) & TO_PHYS_MASK)
-#define PHYS_TO_XKPHYS(cm,a)		(0x8000000000000000 | ((cm)<<59) | (a))
+#define PHYS_TO_XKPHYS(cm,a)		(0x8000000000000000 | ((unsigned long)(cm)<<59) | (a))
 
 #if defined (CONFIG_CPU_R4300)						\
     || defined (CONFIG_CPU_R4X00)					\

From spam@god.dyndns.org Thu Apr 14 22:06:46 2005
Received: with ECARTIS (v1.0.0; list linux-mips); Thu, 14 Apr 2005 22:07:01 +0100 (BST)
Received: from god.demon.nl ([IPv6:::ffff:83.160.164.11]:23240 "EHLO
	god.dyndns.org") by linux-mips.org with ESMTP id <S8226031AbVDNVGq>;
	Thu, 14 Apr 2005 22:06:46 +0100
Received: by god.dyndns.org (Postfix, from userid 1005)
	id 6AECB4ECB5; Thu, 14 Apr 2005 23:06:45 +0200 (CEST)
Date:	Thu, 14 Apr 2005 23:06:45 +0200
From:	Henk <Henk.Vergonet@gmail.com>
To:	linux-mips@linux-mips.org
Subject: Re: Porting mips based routers
Message-ID: <20050414210645.GB30585@god.dyndns.org>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
User-Agent: Mutt/1.5.6i
Return-Path: <spam@god.dyndns.org>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 7729
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: Henk.Vergonet@gmail.com
Precedence: bulk
X-list: linux-mips
Content-Length: 937
Lines: 23

On Thu, Apr 14, 2005 at 07:05:27PM +0100, Ralf Baechle wrote:
> On Thu, Apr 14, 2005 at 06:26:34PM +0200, Henk wrote:
> > There's an initial wiki page on the openWRT site.
> > http://openwrt.org/Kernel26Firmware
> > 
> > If so I would like to see if we can set up some colaborative effort...
> 
> None of the code for the routers or ASICs has been contributed back to
> linux-mips.org so far so all you'll find there is a little blurb in the
> wiki and a bunch of pointers.

That little blurb in the wiki I contributed yesterday, in the hope of
raising some interest in the openwrt community ;)

I will try to see if I can get a list of 2.4 source files that need to
be contributed back to linux-mips.org, with a quick initial proposal on
how to migrate this to the 2.6 kernel tree.

The list can then be reviewed here (possibly added with comments on expected
code changes) and could serve as an initial porting roadmap.

Regards,
Henk

From colin@realtek.com.tw Fri Apr 15 07:31:23 2005
Received: with ECARTIS (v1.0.0; list linux-mips); Fri, 15 Apr 2005 07:31:39 +0100 (BST)
Received: from mf2.realtek.com.tw ([IPv6:::ffff:220.128.56.22]:61448 "EHLO
	mf2.realtek.com.tw") by linux-mips.org with ESMTP
	id <S8226197AbVDOGbX>; Fri, 15 Apr 2005 07:31:23 +0100
Received: from msx.realtek.com.tw (unverified [172.21.1.77]) by mf2.realtek.com.tw
 (Content Technologies SMTPRS 4.3.14) with ESMTP id <T7052afa4d3dc8038166a4@mf2.realtek.com.tw> for <linux-mips@linux-mips.org>;
 Fri, 15 Apr 2005 14:32:59 +0800
Received: from rtpdii3098 ([172.21.98.16])
          by msx.realtek.com.tw (Lotus Domino Release 6.5.1)
          with ESMTP id 2005041514331591-7675 ;
          Fri, 15 Apr 2005 14:33:15 +0800 
Message-ID: <001b01c54184$b918b5a0$106215ac@realtek.com.tw>
From:	"colin" <colin@realtek.com.tw>
To:	<linux-mips@linux-mips.org>
Subject: Re: initrd problem
Date:	Fri, 15 Apr 2005 14:31:14 +0800
MIME-Version: 1.0
X-Priority: 3 (Normal)
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 6.00.2800.1478
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1478
X-MIMETrack: Itemize by SMTP Server on msx/Realtek(Release 6.5.1|January 28, 2004) at
 2005/04/15 =?Bog5?B?pFWkyCAwMjozMzoxNQ==?=,
	Serialize by Router on msx/Realtek(Release 6.5.1|January 28, 2004) at 2005/04/15
 =?Bog5?B?pFWkyCAwMjozMzoxOA==?=,
	Serialize complete at 2005/04/15 =?Bog5?B?pFWkyCAwMjozMzoxOA==?=
Content-Transfer-Encoding: 7bit
Content-Type: text/plain;
	charset="big5"
Return-Path: <colin@realtek.com.tw>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 7730
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: colin@realtek.com.tw
Precedence: bulk
X-list: linux-mips
Content-Length: 2292
Lines: 70



Hi Kumba,
I used your patch for 2.6.11 on MIPS kernel, and found that it lost the
definition "kernel_physaddr".
Could you tell me where is it?

Regards,
Colin



----------------------------------------------------------------------------
---------------


Ed Martini wrote:
> Background:
>
> I'm trying to get 2.6.11 to run on a MIPS Malta board with Yamon.  The
> kernel that comes with the board is 2.4.18 with an embedded ramdisk that
> runs some scripts to install RPMS via NFS or CD-ROM.  The kernel is
> converted to s-records via objcopy(1), and loaded into memory via tftp.
> I want to do something similar with 2.6.latest.
>
> Problem:
>
> On or about Nov 21 of last year, the CONFIG_EMBEDDED_RAMDISK disappeared.
>
> http://www.linux-mips.org/archives/linux-mips/2004-11/msg00135.html
>
> In it's place it is suggested to use the tools in arch/mips/boot, so I
> tried it.  I can cross-compile the kernel, and I get an ELF vmlinux.  I
> can convert it to ecoff with elf2ecoff, and attach an initrd image with
> addinitrd.  The problem begins here.  I end up with an ecoff format
> kernel which is not recognized by objcopy(1), and therefore no s-records.
>
> It seems there is a program called gensrec that would do the job, but
> google doesn't want to tell me where to get it.  Some IRIX binary perhaps?
>
> Solution?
>
> Should I put CONFIG_EMBEDDED_RAMDISK and its ilk back into my kernel, or
> write an ELF version of addinitrd?  Other ideas?
>
> Thanks in advance.

The future is purportedly in the feature known as initramfs.  See the file
Documentation/early-userpace/README for more details on how that is supposed
to work.

That said, I tried initramfs a few times, but either due to lack of
understanding, or broken support code in 2.6.10, I couldn't get it to
properly
load an initrd bundled in, so I forward-ported a patch I wrote that
originally
fixed CONFIG_EMBEDDED_RAMDISK to work with any ABI to 2.6.10, and it worked
rather well.  I'm sticking with this method until I find more/better docs on
how to use initramfs properly.

If you're interested, the patch I use can be found here:
http://dev.gentoo.org/~kumba/mips/misc/misc-2.6.10-add-ramdisk-back.patch
[2.6.10]
http://dev.gentoo.org/~kumba/mips/misc/misc-2.6.11-add-ramdisk-back.patch
[2.6.11]


--Kumba



From aravindforl@yahoo.co.in Fri Apr 15 07:39:43 2005
Received: with ECARTIS (v1.0.0; list linux-mips); Fri, 15 Apr 2005 07:40:06 +0100 (BST)
Received: from web8407.mail.in.yahoo.com ([IPv6:::ffff:202.43.219.155]:4464
	"HELO web8407.mail.in.yahoo.com") by linux-mips.org with SMTP
	id <S8226203AbVDOGjn>; Fri, 15 Apr 2005 07:39:43 +0100
Received: (qmail 75854 invoked by uid 60001); 15 Apr 2005 06:39:25 -0000
Message-ID: <20050415063924.75852.qmail@web8407.mail.in.yahoo.com>
Received: from [202.41.227.188] by web8407.mail.in.yahoo.com via HTTP; Fri, 15 Apr 2005 07:39:24 BST
Date:	Fri, 15 Apr 2005 07:39:24 +0100 (BST)
From:	Arravind babu <aravindforl@yahoo.co.in>
Subject: Change in hardware
To:	linux-mips@linux-mips.org
MIME-Version: 1.0
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: 8bit
Return-Path: <aravindforl@yahoo.co.in>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 7731
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: aravindforl@yahoo.co.in
Precedence: bulk
X-list: linux-mips
Content-Length: 444
Lines: 16

Hi all,


      We are planning to change the hardware in our
device from MSP2000 to MSP2100.What are things i have
to look with respect to hardware change? In my view,
changes in bootloader, drivers etc.What other things i
have to check?


Thanks in advance,
Aravind.

________________________________________________________________________
Yahoo! India Matrimony: Find your life partner online
Go to: http://yahoo.shaadi.com/india-matrimony

From wbx@openbsd-geek.de Fri Apr 15 07:56:01 2005
Received: with ECARTIS (v1.0.0; list linux-mips); Fri, 15 Apr 2005 07:56:16 +0100 (BST)
Received: from chrom.openbsd-geek.de ([IPv6:::ffff:217.160.135.112]:6937 "EHLO
	chrom.openbsd-geek.de") by linux-mips.org with ESMTP
	id <S8226202AbVDOG4B>; Fri, 15 Apr 2005 07:56:01 +0100
Received: by chrom.openbsd-geek.de (Postfix, from userid 1000)
	id 6712D32560; Fri, 15 Apr 2005 08:55:58 +0200 (CEST)
Date:	Fri, 15 Apr 2005 08:55:58 +0200
From:	Waldemar Brodkorb <wbx@openbsd-geek.de>
To:	Henk <Henk.Vergonet@gmail.com>
Cc:	linux-mips@linux-mips.org
Subject: Re: Porting mips based routers
Message-ID: <20050415065558.GD25962@openbsd-geek.de>
References: <20050414210645.GB30585@god.dyndns.org>
Mime-Version: 1.0
Content-Type: text/plain; charset=iso-8859-1
Content-Disposition: inline
In-Reply-To: <20050414210645.GB30585@god.dyndns.org>
X-Editor: VIM
X-Operating-System: OpenBSD 3.6 i386
User-Agent: Mutt/1.5.6i
Return-Path: <wbx@openbsd-geek.de>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 7732
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: wbx@openbsd-geek.de
Precedence: bulk
X-list: linux-mips
Content-Length: 1531
Lines: 41

Hi,
Henk wrote,

> On Thu, Apr 14, 2005 at 07:05:27PM +0100, Ralf Baechle wrote:
> > On Thu, Apr 14, 2005 at 06:26:34PM +0200, Henk wrote:
> > > There's an initial wiki page on the openWRT site.
> > > http://openwrt.org/Kernel26Firmware
> > > 
> > > If so I would like to see if we can set up some colaborative effort...
> > 
> > None of the code for the routers or ASICs has been contributed back to
> > linux-mips.org so far so all you'll find there is a little blurb in the
> > wiki and a bunch of pointers.
> 
> That little blurb in the wiki I contributed yesterday, in the hope of
> raising some interest in the openwrt community ;)
> 
> I will try to see if I can get a list of 2.4 source files that need to
> be contributed back to linux-mips.org, with a quick initial proposal on
> how to migrate this to the 2.6 kernel tree.

If you like to help, I would be giving you detailed information
about the needed source code changes/addons.

I ported Linksys 2.4.20 patches to linux-mips 2.4.29 and added some
quirks to get the wlan binary kernel modul working.

All the stuff is really new for me, that is the reason I wait before
I contribute it back, because I like to see how stable this stuff
is in reality.

But may be it is time to send some patches...
 
bye
   Waldemar 

-- 
Waldemar Brodkorb                       waldemar.brodkorb@dass-it.de                                     
dass IT GmbH                               Phone: +49.221.3565666-0
http://www.dass-IT.de                        Fax: +49.221.3565666-10


From dom@kilimandjaro.dyndns.org Fri Apr 15 10:20:02 2005
Received: with ECARTIS (v1.0.0; list linux-mips); Fri, 15 Apr 2005 10:20:18 +0100 (BST)
Received: from kilimandjaro.dyndns.org ([IPv6:::ffff:212.85.147.17]:25608 "EHLO
	kilimandjaro.dyndns.org") by linux-mips.org with ESMTP
	id <S8226222AbVDOJUC>; Fri, 15 Apr 2005 10:20:02 +0100
Received: by kilimandjaro.dyndns.org (Postfix, from userid 500)
	id 38919BE85D; Fri, 15 Apr 2005 11:19:53 +0200 (CEST)
Received: from saperlipopette ([127.0.0.1] helo=kilimandjaro.dyndns.org)
	by saperlipopette with esmtp (Exim 4.22)
	id 1DMN0R-0002Jy-7k; Fri, 15 Apr 2005 11:20:55 +0200
Message-ID: <425F8776.6080703@kilimandjaro.dyndns.org>
Date:	Fri, 15 Apr 2005 11:20:54 +0200
From:	Dominique Quatravaux <dom@kilimandjaro.dyndns.org>
User-Agent: Mozilla Thunderbird 0.4 (X11/20040306)
X-Accept-Language: fr, en
MIME-Version: 1.0
To:	Peter Horton <pdh@colonel-panic.org>
Cc:	linux-mips@linux-mips.org, ralf@linux-mips.org
Subject: [OFF-TOPIC] Cobalt 64-bit, what for? (was: 64-bit fix)
References: <20050414185949.GA5578@skeleton-jack>
In-Reply-To: <20050414185949.GA5578@skeleton-jack>
X-Enigmail-Version: 0.83.2.0
X-Enigmail-Supports: pgp-inline, pgp-mime
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
Return-Path: <dom@kilimandjaro.dyndns.org>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 7733
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: dom@kilimandjaro.dyndns.org
Precedence: bulk
X-list: linux-mips
Content-Length: 622
Lines: 18

Peter Horton wrote:

>This patch adds detection of broken 64-bit mode LL/SC on Cobalt units.
>With this patch my Qube2700 boots a 64-bit build fine. The later units
>have some problems with the Tulip driver.
>  
>
Just out of curiosity, is there any practical interest in going 64bit on 
Cobalt besides the fun of it? One cannot possibly squeeze more than 4 Gb 
of RAM into a Cobalt box right? And doesn't 64 bit mode have costs of 
its own (doubled i-fetch bandwidth for starters)?

-- 
<< Tout n'y est pas parfait, mais on y honore certainement les jardiniers >>

			Dominique Quatravaux <dom@kilimandjaro.dyndns.org>



From ralf@linux-mips.org Fri Apr 15 11:14:33 2005
Received: with ECARTIS (v1.0.0; list linux-mips); Fri, 15 Apr 2005 11:14:47 +0100 (BST)
Received: from extgw-uk.mips.com ([IPv6:::ffff:62.254.210.129]:63510 "EHLO
	bacchus.net.dhis.org") by linux-mips.org with ESMTP
	id <S8226231AbVDOKOd>; Fri, 15 Apr 2005 11:14:33 +0100
Received: from dea.linux-mips.net (localhost.localdomain [127.0.0.1])
	by bacchus.net.dhis.org (8.13.1/8.13.1) with ESMTP id j3FAENrI007330;
	Fri, 15 Apr 2005 11:14:23 +0100
Received: (from ralf@localhost)
	by dea.linux-mips.net (8.13.1/8.13.1/Submit) id j3FAEMxL007329;
	Fri, 15 Apr 2005 11:14:22 +0100
Date:	Fri, 15 Apr 2005 11:14:22 +0100
From:	Ralf Baechle <ralf@linux-mips.org>
To:	Dominique Quatravaux <dom@kilimandjaro.dyndns.org>
Cc:	Peter Horton <pdh@colonel-panic.org>, linux-mips@linux-mips.org
Subject: Re: [OFF-TOPIC] Cobalt 64-bit, what for? (was: 64-bit fix)
Message-ID: <20050415101422.GB5414@linux-mips.org>
References: <20050414185949.GA5578@skeleton-jack> <425F8776.6080703@kilimandjaro.dyndns.org>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <425F8776.6080703@kilimandjaro.dyndns.org>
User-Agent: Mutt/1.4.1i
Return-Path: <ralf@linux-mips.org>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 7734
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: ralf@linux-mips.org
Precedence: bulk
X-list: linux-mips
Content-Length: 1179
Lines: 29

On Fri, Apr 15, 2005 at 11:20:54AM +0200, Dominique Quatravaux wrote:

> Just out of curiosity, is there any practical interest in going 64bit on 
> Cobalt besides the fun of it?

Second hand Cobalt MIPS hardware is available fairly cheaply so it's being
used by various Linux developers for doing development work, including
64-bit work.

> One cannot possibly squeeze more than 4 Gb of RAM into a Cobalt box right?

No, the limit is significantly less.  64-bit kernels are advantagous if

 - running N32 or N64 software is desired
 - anything that takes advantage of 64-bit registers or the 32/32 fpr model
 - software is using large amounts of virtual address space.  Process size
   is limited to 2GB which is tight for some of todays codes which do their
   I/O by memory mapping files.
 - and of the course there is the "more inches" factor ;-)

> And doesn't 64 bit mode have costs of its own (doubled i-fetch bandwidth
> for starters)?

Fortunately not double and caches will further blurr the picture - but on
a system with a 32-bit processor and memory bus there will be very
noticable impact.  We're using a bunch of tricks to keep the overhead under
control.

  Ralf

From dom@mips.com Fri Apr 15 11:18:22 2005
Received: with ECARTIS (v1.0.0; list linux-mips); Fri, 15 Apr 2005 11:18:37 +0100 (BST)
Received: from alg145.algor.co.uk ([IPv6:::ffff:62.254.210.145]:531 "EHLO
	dmz.algor.co.uk") by linux-mips.org with ESMTP id <S8226231AbVDOKSW>;
	Fri, 15 Apr 2005 11:18:22 +0100
Received: from alg158.algor.co.uk ([62.254.210.158] helo=olympia.mips.com)
	by dmz.algor.co.uk with esmtp (Exim 3.35 #1 (Debian))
	id 1DMNwp-0007YC-00; Fri, 15 Apr 2005 11:21:15 +0100
Received: from arsenal.mips.com ([192.168.192.197])
	by olympia.mips.com with esmtp (Exim 3.36 #1 (Debian))
	id 1DMNto-0007Z7-00; Fri, 15 Apr 2005 11:18:08 +0100
Received: from dom by arsenal.mips.com with local (Exim 4.44)
	id 1DMNto-0000Z3-4V; Fri, 15 Apr 2005 11:18:08 +0100
From:	Dominic Sweetman <dom@mips.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Message-ID: <16991.38112.114688.697412@arsenal.mips.com>
Date:	Fri, 15 Apr 2005 11:18:08 +0100
To:	Ralf Baechle <ralf@linux-mips.org>
Cc:	Dominique Quatravaux <dom@kilimandjaro.dyndns.org>,
	Peter Horton <pdh@colonel-panic.org>, linux-mips@linux-mips.org
Subject: Re: [OFF-TOPIC] Cobalt 64-bit, what for? (was: 64-bit fix)
In-Reply-To: <20050415101422.GB5414@linux-mips.org>
References: <20050414185949.GA5578@skeleton-jack>
	<425F8776.6080703@kilimandjaro.dyndns.org>
	<20050415101422.GB5414@linux-mips.org>
X-Mailer: VM 7.17 under 21.4 (patch 17) "Jumbo Shrimp" XEmacs Lucid
X-MTUK-Scanner:	Found to be clean
X-MTUK-SpamCheck: not spam (whitelisted), SpamAssassin (score=-4.831,
	required 4, AWL, BAYES_00)
Return-Path: <dom@mips.com>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 7735
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: dom@mips.com
Precedence: bulk
X-list: linux-mips
Content-Length: 436
Lines: 15


Ralf Baechle (ralf@linux-mips.org) writes:

> > And doesn't 64 bit mode have costs of its own (doubled i-fetch bandwidth
> > for starters)?

64-bit MIPS CPUs still have 32-bit instructions... it's the registers
and addressing range which grow, not the instructions.

Program data segments tend to grow when you use 64-bit pointers (N64
does, but N32 - paradoxically still a 64-bit ABI - doesn't)

--
Dominic Sweetman
MIPS Technologies

From ralf@linux-mips.org Fri Apr 15 11:25:57 2005
Received: with ECARTIS (v1.0.0; list linux-mips); Fri, 15 Apr 2005 11:26:11 +0100 (BST)
Received: from extgw-uk.mips.com ([IPv6:::ffff:62.254.210.129]:5143 "EHLO
	bacchus.net.dhis.org") by linux-mips.org with ESMTP
	id <S8226235AbVDOKZ5>; Fri, 15 Apr 2005 11:25:57 +0100
Received: from dea.linux-mips.net (localhost.localdomain [127.0.0.1])
	by bacchus.net.dhis.org (8.13.1/8.13.1) with ESMTP id j3FAPnST007698;
	Fri, 15 Apr 2005 11:25:49 +0100
Received: (from ralf@localhost)
	by dea.linux-mips.net (8.13.1/8.13.1/Submit) id j3FAPmOX007697;
	Fri, 15 Apr 2005 11:25:48 +0100
Date:	Fri, 15 Apr 2005 11:25:48 +0100
From:	Ralf Baechle <ralf@linux-mips.org>
To:	Dominic Sweetman <dom@mips.com>
Cc:	Dominique Quatravaux <dom@kilimandjaro.dyndns.org>,
	Peter Horton <pdh@colonel-panic.org>, linux-mips@linux-mips.org
Subject: Re: [OFF-TOPIC] Cobalt 64-bit, what for? (was: 64-bit fix)
Message-ID: <20050415102548.GD5414@linux-mips.org>
References: <20050414185949.GA5578@skeleton-jack> <425F8776.6080703@kilimandjaro.dyndns.org> <20050415101422.GB5414@linux-mips.org> <16991.38112.114688.697412@arsenal.mips.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <16991.38112.114688.697412@arsenal.mips.com>
User-Agent: Mutt/1.4.1i
Return-Path: <ralf@linux-mips.org>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 7736
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: ralf@linux-mips.org
Precedence: bulk
X-list: linux-mips
Content-Length: 576
Lines: 17

On Fri, Apr 15, 2005 at 11:18:08AM +0100, Dominic Sweetman wrote:

> > > And doesn't 64 bit mode have costs of its own (doubled i-fetch bandwidth
> > > for starters)?
> 
> 64-bit MIPS CPUs still have 32-bit instructions... it's the registers
> and addressing range which grow, not the instructions.

True - but number of instructions will grow, thus the bandwidth needed to
fetch them.

> Program data segments tend to grow when you use 64-bit pointers (N64
> does, but N32 - paradoxically still a 64-bit ABI - doesn't)

N32 is an ILP32 ABI so I'd count it as 32-bit.

  Ralf

From cordova@uninet.com.br Sat Apr 16 15:34:00 2005
Received: with ECARTIS (v1.0.0; list linux-mips); Sat, 16 Apr 2005 15:34:15 +0100 (BST)
Received: from smtp.unisys.com.br ([IPv6:::ffff:200.220.64.9]:47523 "HELO
	smtp.unisys.com.br") by linux-mips.org with SMTP
	id <S8225609AbVDPOeA> convert rfc822-to-8bit; Sat, 16 Apr 2005 15:34:00 +0100
Received: (qmail 15471 invoked from network); 16 Apr 2005 11:33:45 -0300
Received: from garfield.unisys.com.br (HELO uninet.com.br) (200.220.64.19)
  by smtp.unisys.com.br with SMTP; 16 Apr 2005 11:33:45 -0300
From:	cordova@uninet.com.br
To:	linux-mips@linux-mips.org
Subject: Linux for RouterBoard532 - CPU MIPS32 4Kc - IDT 79RC32434.
X-Originating-IP: 200.173.214.99
Date:	Sat, 16 Apr 2005 11:33:45 -0300
Message-id: <42612249.1fb.7a40.2093672349@uninet.com.br>
MIME-Version: 1.0
Content-Type: text/plain; charset="iso-8859-1"
Content-Transfer-Encoding: 8BIT
Return-Path: <cordova@uninet.com.br>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 7737
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: cordova@uninet.com.br
Precedence: bulk
X-list: linux-mips
Content-Length: 516
Lines: 27

Hi,

I´d just bought Routerboard532 (
http://www.routerboard.com/rb500.html ) and I want to port
linux to this board. The vendor has just an linux image on
the web site.

Anyone could help me we some info or "HOWTO" ?


Board Info: 

- CPU MIPS32 4Kc - IDT 79RC32434;

- 32MB DDR onboard memory chip;

- 64MB onboard NAND memory chip;

- One IDT Korina 10/100 Mbit/s Fast Ethernet port supporting
Auto-MDI/X
Two VIA VT6105 10/100 Mbit/s Fast Ethernet ports supporting
Auto-MDI/X.


Best Regards,

Alessandro Cordova

From jbglaw@lug-owl.de Sat Apr 16 15:58:15 2005
Received: with ECARTIS (v1.0.0; list linux-mips); Sat, 16 Apr 2005 15:58:29 +0100 (BST)
Received: from lug-owl.de ([IPv6:::ffff:195.71.106.12]:446 "EHLO lug-owl.de")
	by linux-mips.org with ESMTP id <S8226081AbVDPO6P>;
	Sat, 16 Apr 2005 15:58:15 +0100
Received: by lug-owl.de (Postfix, from userid 1001)
	id AE80C19026D; Sat, 16 Apr 2005 16:58:09 +0200 (CEST)
Date:	Sat, 16 Apr 2005 16:58:09 +0200
From:	Jan-Benedict Glaw <jbglaw@lug-owl.de>
To:	linux-mips@linux-mips.org
Subject: Re: Linux for RouterBoard532 - CPU MIPS32 4Kc - IDT 79RC32434.
Message-ID: <20050416145809.GS9461@lug-owl.de>
Mail-Followup-To: linux-mips@linux-mips.org
References: <42612249.1fb.7a40.2093672349@uninet.com.br>
Mime-Version: 1.0
Content-Type: multipart/signed; micalg=pgp-sha1;
	protocol="application/pgp-signature"; boundary="psiTe9LjpVyD9953"
Content-Disposition: inline
In-Reply-To: <42612249.1fb.7a40.2093672349@uninet.com.br>
X-Operating-System: Linux mail 2.6.10-rc2-bk5lug-owl 
X-gpg-fingerprint: 250D 3BCF 7127 0D8C A444  A961 1DBD 5E75 8399 E1BB
X-gpg-key: wwwkeys.de.pgp.net
User-Agent: Mutt/1.5.6+20040907i
Return-Path: <jbglaw@lug-owl.de>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 7738
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: jbglaw@lug-owl.de
Precedence: bulk
X-list: linux-mips
Content-Length: 1545
Lines: 47


--psiTe9LjpVyD9953
Content-Type: text/plain; charset=utf-8
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Sat, 2005-04-16 11:33:45 -0300, cordova@uninet.com.br <cordova@uninet.co=
m.br>
wrote in message <42612249.1fb.7a40.2093672349@uninet.com.br>:
> I=C2=B4d just bought Routerboard532 (
> http://www.routerboard.com/rb500.html ) and I want to port
> linux to this board. The vendor has just an linux image on
> the web site.

No need to "port" Linux to this board, since obviously the vendor
already did this for you. Just ask him for all the sources needed for
the bootloader and at least the kernel stuff. He needs to supply these
to you, as forced by the GPLv2...  In the above link, the vendor already
states that a Debian reference image as well as sources are available.
Just ask them for this!

MfG, JBG

--=20
Jan-Benedict Glaw       jbglaw@lug-owl.de    . +49-172-7608481             =
_ O _
"Eine Freie Meinung in  einem Freien Kopf    | Gegen Zensur | Gegen Krieg  =
_ _ O
 fuer einen Freien Staat voll Freier B=C3=BCrger" | im Internet! |   im Ira=
k!   O O O
ret =3D do_actions((curr | FREE_SPEECH) & ~(NEW_COPYRIGHT_LAW | DRM | TCPA)=
);

--psiTe9LjpVyD9953
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: Digital signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (GNU/Linux)

iD8DBQFCYSgBHb1edYOZ4bsRAqdmAJ9DkO3Yy2M5ykSg+t6EfCXd1aAQfQCgkXs0
NBj5AV80NEaBR1wU5thxnFc=
=dw6m
-----END PGP SIGNATURE-----

--psiTe9LjpVyD9953--

From sskowron@ET.PUT.Poznan.PL Sat Apr 16 16:21:34 2005
Received: with ECARTIS (v1.0.0; list linux-mips); Sat, 16 Apr 2005 16:21:49 +0100 (BST)
Received: from corvus.et.put.poznan.pl ([IPv6:::ffff:150.254.11.9]:2446 "EHLO
	corvus.et.put.poznan.pl") by linux-mips.org with ESMTP
	id <S8226085AbVDPPVe>; Sat, 16 Apr 2005 16:21:34 +0100
Received: from corvus (corvus.et.put.poznan.pl [150.254.11.9])
	by corvus.et.put.poznan.pl (8.11.6+Sun/8.11.6) with ESMTP id j3GFLWj29392
	for <linux-mips@linux-mips.org>; Sat, 16 Apr 2005 17:21:32 +0200 (MET DST)
Received: from helios.et.put.poznan.pl ([150.254.29.65])
	by corvus.et.put.poznan.pl (MailMonitor for SMTP v1.2.2 ) ;
	Sat, 16 Apr 2005 17:21:31 +0200 (MET DST)
Received: from localhost (sskowron@localhost)
	by helios.et.put.poznan.pl (8.11.6+Sun/8.11.6) with ESMTP id j3GFLTR16019
	for <linux-mips@linux-mips.org>; Sat, 16 Apr 2005 17:21:29 +0200 (MET DST)
X-Authentication-Warning: helios.et.put.poznan.pl: sskowron owned process doing -bs
Date:	Sat, 16 Apr 2005 17:21:28 +0200 (MET DST)
From:	Stanislaw Skowronek <sskowron@ET.PUT.Poznan.PL>
To:	linux-mips@linux-mips.org
Subject: Re: Linux for RouterBoard532 - CPU MIPS32 4Kc - IDT 79RC32434.
In-Reply-To: <20050416145809.GS9461@lug-owl.de>
Message-ID: <Pine.GSO.4.10.10504161719570.15889-100000@helios.et.put.poznan.pl>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Return-Path: <sskowron@ET.PUT.Poznan.PL>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 7739
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: sskowron@ET.PUT.Poznan.PL
Precedence: bulk
X-list: linux-mips
Content-Length: 296
Lines: 9

> He needs to supply these to you, as forced by the GPLv2...

You don't even need to point that out. IDT is quite pleasant to work with
as a company, I can say that even as a hobbyist. They don't make problems
about Linux kernel source. I just wonder why don't they let us merge it.

Stanislaw



From wd@denx.de Sat Apr 16 23:59:40 2005
Received: with ECARTIS (v1.0.0; list linux-mips); Sat, 16 Apr 2005 23:59:56 +0100 (BST)
Received: from mailout05.sul.t-online.com ([IPv6:::ffff:194.25.134.82]:26528
	"EHLO mailout05.sul.t-online.com") by linux-mips.org with ESMTP
	id <S8226111AbVDPW7k>; Sat, 16 Apr 2005 23:59:40 +0100
Received: from fwd28.aul.t-online.de 
	by mailout05.sul.t-online.com with smtp 
	id 1DMwGH-0001BB-00; Sun, 17 Apr 2005 00:59:37 +0200
Received: from denx.de (GiQXaTZSZeaW4SMdMrc4MKQooUrETCOudjwNTK8+NJO3qNM+HFmJE+@[84.150.88.129]) by fwd28.sul.t-online.de
	with esmtp id 1DMwGD-1rOUTI0; Sun, 17 Apr 2005 00:59:33 +0200
Received: from atlas.denx.de (atlas.denx.de [10.0.0.14])
	by denx.de (Postfix) with ESMTP
	id ED1F542BB0; Sun, 17 Apr 2005 00:59:32 +0200 (MEST)
Received: by atlas.denx.de (Postfix, from userid 15)
	id D620AC108D; Sun, 17 Apr 2005 00:59:31 +0200 (MEST)
Received: from atlas.denx.de (localhost [127.0.0.1])
	by atlas.denx.de (Postfix) with ESMTP
	id D3C5E13D94A; Sun, 17 Apr 2005 00:59:31 +0200 (MEST)
To:	cordova@uninet.com.br
Cc:	linux-mips@linux-mips.org
From:	Wolfgang Denk <wd@denx.de>
Subject: Re: Linux for RouterBoard532 - CPU MIPS32 4Kc - IDT 79RC32434. 
Mime-version: 1.0
Content-type: text/plain; charset=ISO-8859-1
Content-transfer-encoding: 8bit
In-reply-to: Your message of "Sat, 16 Apr 2005 11:33:45 -0300."
             <42612249.1fb.7a40.2093672349@uninet.com.br> 
Date:	Sun, 17 Apr 2005 00:59:26 +0200
Message-Id: <20050416225931.D620AC108D@atlas.denx.de>
X-ID:	GiQXaTZSZeaW4SMdMrc4MKQooUrETCOudjwNTK8+NJO3qNM+HFmJE+@t-dialin.net
X-TOI-MSGID: e97210a2-b8df-4123-a062-a181e822e096
Return-Path: <wd@denx.de>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 7740
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: wd@denx.de
Precedence: bulk
X-list: linux-mips
Content-Length: 1418
Lines: 35

In message <42612249.1fb.7a40.2093672349@uninet.com.br> you wrote:
> 
> I´d just bought Routerboard532 (
> http://www.routerboard.com/rb500.html ) and I want to port
> linux to this board. The vendor has just an linux image on
> the web site.

This is not correct. If you just scroll  down  the  page  you  listed
yoursself,   then   you   should   easily  find  the  section  titled
"RouterBOARD 500 GNU/Linux support files" which includes  a  link  to
"Patch for Linux 2.4.29 kernel".

> Anyone could help me we some info or "HOWTO" ?

Download the patch, download the corresponding  kernel  source  tree,
apply  patch,  copy  "config.mipsel"  to  ".config"  to get a default
configuration, build the kernel, download it, run it.

So far I haven't been able to find out how to pass  kernel  arguments
with their boot loader, so you may have to hack rc32434/rb500/prom.c

I used the mips_4KCle packages of the ELDK to build the kernel and to
provide a root filesystem over NFS - this worked fine. There are some
problems (like not being able to switch the CPU clock and NAND  flash
support not working at all), but it boots and runs.

Best regards,

Wolfgang Denk

-- 
Software Engineering:  Embedded and Realtime Systems,  Embedded Linux
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd@denx.de
The IQ of the group is the lowest IQ of a member of the group divided
by the number of people in the group.

From eckhardt@satorlaser.com Mon Apr 18 10:37:08 2005
Received: with ECARTIS (v1.0.0; list linux-mips); Mon, 18 Apr 2005 10:37:25 +0100 (BST)
Received: from moutng.kundenserver.de ([IPv6:::ffff:212.227.126.189]:59854
	"EHLO moutng.kundenserver.de") by linux-mips.org with ESMTP
	id <S8225462AbVDRJhI>; Mon, 18 Apr 2005 10:37:08 +0100
Received: from [212.227.126.155] (helo=mrelayng.kundenserver.de)
	by moutng.kundenserver.de with esmtp (Exim 3.35 #1)
	id 1DNSgf-0006UM-00; Mon, 18 Apr 2005 11:37:01 +0200
Received: from [213.39.254.66] (helo=tuxator.satorlaser-intern.com)
	by mrelayng.kundenserver.de with asmtp (TLSv1:RC4-MD5:128)
	(Exim 3.35 #1)
	id 1DNSge-0006Tc-00; Mon, 18 Apr 2005 11:37:01 +0200
From:	Ulrich Eckhardt <eckhardt@satorlaser.com>
Organization: Sator Laser GmbH
To:	linux-mips@linux-mips.org
Subject: [patch] some cleanups for Alchemy processors
Date:	Mon, 18 Apr 2005 11:37:48 +0200
User-Agent: KMail/1.7.2
Cc:	ralf@linux-mips.org
MIME-Version: 1.0
Content-Type: text/plain;
  charset="utf-8"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
Message-Id: <200504181137.49593.eckhardt@satorlaser.com>
X-Provags-ID: kundenserver.de abuse@kundenserver.de auth:e35cee35a663f5c944b9750a965814ae
Return-Path: <eckhardt@satorlaser.com>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 7741
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: eckhardt@satorlaser.com
Precedence: bulk
X-list: linux-mips
Content-Length: 6550
Lines: 238

Changes:
 * use 'unsigned long' as address supplied to au_write[bwl]()
 * remove two already unused and commented structures
 * replace three evil macros used to alias fields of a structure 
   with an anonymous union
 * added an ULL suffix to several address constants that use 
   bits 35-32

cheers

Uli

---
Index: include/asm-mips/mach-au1x00/au1000.h
===================================================================
RCS file: /home/cvs/linux/include/asm-mips/mach-au1x00/au1000.h,v
retrieving revision 1.16
diff -u -w -r1.16 au1000.h
--- include/asm-mips/mach-au1x00/au1000.h	4 Apr 2005 01:06:20 -0000	1.16
+++ include/asm-mips/mach-au1x00/au1000.h	18 Apr 2005 09:33:57 -0000
@@ -60,19 +60,19 @@
 	mdelay(ms);
 }
 
-void static inline au_writeb(u8 val, int reg)
+void static inline au_writeb(u8 val, unsigned long port)
 {
-	*(volatile u8 *)(reg) = val;
+	*(volatile u8 *)(port) = val;
 }
 
-void static inline au_writew(u16 val, int reg)
+void static inline au_writew(u16 val, unsigned long port)
 {
-	*(volatile u16 *)(reg) = val;
+	*(volatile u16 *)(port) = val;
 }
 
-void static inline au_writel(u32 val, int reg)
+void static inline au_writel(u32 val, unsigned long port)
 {
-	*(volatile u32 *)(reg) = val;
+	*(volatile u32 *)(port) = val;
 }
 
 static inline u8 au_readb(unsigned long port)
@@ -181,26 +181,6 @@
 #define MEM_SDSLEEP		(0x0030)
 #define MEM_SDSMCKE		(0x0034)
 
-#ifndef ASSEMBLER
-/*typedef volatile struct
-{
-	uint32 sdmode0;
-	uint32 sdmode1;
-	uint32 sdmode2;
-	uint32 sdaddr0;
-	uint32 sdaddr1;
-	uint32 sdaddr2;
-	uint32 sdrefcfg;
-	uint32 sdautoref;
-	uint32 sdwrmd0;
-	uint32 sdwrmd1;
-	uint32 sdwrmd2;
-	uint32 sdsleep;
-	uint32 sdsmcke;
-
-} AU1X00_SDRAM;*/
-#endif
-
 /*
  * MEM_SDMODE register content definitions
  */
@@ -286,49 +266,6 @@
 #define MEM_SDSREF		(0x08D0)
 #define MEM_SDSLEEP		MEM_SDSREF
 
-#ifndef ASSEMBLER
-/*typedef volatile struct
-{
-	uint32 sdmode0;
-	uint32 reserved0;
-	uint32 sdmode1;
-	uint32 reserved1;
-	uint32 sdmode2;
-	uint32 reserved2[3];
-	uint32 sdaddr0;
-	uint32 reserved3;
-	uint32 sdaddr1;
-	uint32 reserved4;
-	uint32 sdaddr2;
-	uint32 reserved5[3];
-	uint32 sdconfiga;
-	uint32 reserved6;
-	uint32 sdconfigb;
-	uint32 reserved7;
-	uint32 sdstat;
-	uint32 reserved8;
-	uint32 sderraddr;
-	uint32 reserved9;
-	uint32 sdstride0;
-	uint32 reserved10;
-	uint32 sdstride1;
-	uint32 reserved11;
-	uint32 sdstride2;
-	uint32 reserved12[3];
-	uint32 sdwrmd0;
-	uint32 reserved13;
-	uint32 sdwrmd1;
-	uint32 reserved14;
-	uint32 sdwrmd2;
-	uint32 reserved15[11];
-	uint32 sdprecmd;
-	uint32 reserved16;
-	uint32 sdautoref;
-	uint32 reserved17;
-	uint32 sdsref;
-
-} AU1550_SDRAM;*/
-#endif
 #endif
 
 /*
@@ -365,9 +302,9 @@
 #define	SSI0_PHYS_ADDR		0x11600000
 #define	SSI1_PHYS_ADDR		0x11680000
 #define	SYS_PHYS_ADDR		0x11900000
-#define PCMCIA_IO_PHYS_ADDR   0xF00000000
-#define PCMCIA_ATTR_PHYS_ADDR 0xF40000000
-#define PCMCIA_MEM_PHYS_ADDR  0xF80000000
+#define PCMCIA_IO_PHYS_ADDR   0xF00000000ULL
+#define PCMCIA_ATTR_PHYS_ADDR 0xF40000000ULL
+#define PCMCIA_MEM_PHYS_ADDR  0xF80000000ULL
 #endif
 
 /********************************************************************/
@@ -399,13 +336,13 @@
 #define	UART3_PHYS_ADDR		0x11400000
 #define GPIO2_PHYS_ADDR		0x11700000
 #define	SYS_PHYS_ADDR		0x11900000
-#define PCI_MEM_PHYS_ADDR     0x400000000
-#define PCI_IO_PHYS_ADDR      0x500000000
-#define PCI_CONFIG0_PHYS_ADDR 0x600000000
-#define PCI_CONFIG1_PHYS_ADDR 0x680000000
-#define PCMCIA_IO_PHYS_ADDR   0xF00000000
-#define PCMCIA_ATTR_PHYS_ADDR 0xF40000000
-#define PCMCIA_MEM_PHYS_ADDR  0xF80000000
+#define PCI_MEM_PHYS_ADDR     0x400000000ULL
+#define PCI_IO_PHYS_ADDR      0x500000000ULL
+#define PCI_CONFIG0_PHYS_ADDR 0x600000000ULL
+#define PCI_CONFIG1_PHYS_ADDR 0x680000000ULL
+#define PCMCIA_IO_PHYS_ADDR   0xF00000000ULL
+#define PCMCIA_ATTR_PHYS_ADDR 0xF40000000ULL
+#define PCMCIA_MEM_PHYS_ADDR  0xF80000000ULL
 #endif
 
 /********************************************************************/
@@ -442,9 +379,9 @@
 #define GPIO2_PHYS_ADDR		0x11700000
 #define	SYS_PHYS_ADDR		0x11900000
 #define LCD_PHYS_ADDR		0x15000000
-#define PCMCIA_IO_PHYS_ADDR   0xF00000000
-#define PCMCIA_ATTR_PHYS_ADDR 0xF40000000
-#define PCMCIA_MEM_PHYS_ADDR  0xF80000000
+#define PCMCIA_IO_PHYS_ADDR   0xF00000000ULL
+#define PCMCIA_ATTR_PHYS_ADDR 0xF40000000ULL
+#define PCMCIA_MEM_PHYS_ADDR  0xF80000000ULL
 #endif
 
 /***********************************************************************/
@@ -473,13 +410,13 @@
 #define PSC1_PHYS_ADDR	 	0x11B00000
 #define PSC2_PHYS_ADDR	 	0x10A00000
 #define PSC3_PHYS_ADDR	 	0x10B00000
-#define PCI_MEM_PHYS_ADDR     0x400000000
-#define PCI_IO_PHYS_ADDR      0x500000000
-#define PCI_CONFIG0_PHYS_ADDR 0x600000000
-#define PCI_CONFIG1_PHYS_ADDR 0x680000000
-#define PCMCIA_IO_PHYS_ADDR   0xF00000000
-#define PCMCIA_ATTR_PHYS_ADDR 0xF40000000
-#define PCMCIA_MEM_PHYS_ADDR  0xF80000000
+#define PCI_MEM_PHYS_ADDR     0x400000000ULL
+#define PCI_IO_PHYS_ADDR      0x500000000ULL
+#define PCI_CONFIG0_PHYS_ADDR 0x600000000ULL
+#define PCI_CONFIG1_PHYS_ADDR 0x680000000ULL
+#define PCMCIA_IO_PHYS_ADDR   0xF00000000ULL
+#define PCMCIA_ATTR_PHYS_ADDR 0xF40000000ULL
+#define PCMCIA_MEM_PHYS_ADDR  0xF80000000ULL
 #endif
 
 /***********************************************************************/
@@ -500,15 +437,15 @@
 #define	DDMA_PHYS_ADDR		0x14002000
 #define PSC0_PHYS_ADDR	 	0x11A00000
 #define PSC1_PHYS_ADDR	 	0x11B00000
-#define PCMCIA_IO_PHYS_ADDR   0xF00000000
-#define PCMCIA_ATTR_PHYS_ADDR 0xF40000000
-#define PCMCIA_MEM_PHYS_ADDR  0xF80000000
 #define SD0_PHYS_ADDR		0x10600000
 #define SD1_PHYS_ADDR		0x10680000
 #define LCD_PHYS_ADDR		0x15000000
 #define SWCNT_PHYS_ADDR		0x1110010C
 #define MAEFE_PHYS_ADDR		0x14012000
 #define MAEBE_PHYS_ADDR		0x14010000
+#define PCMCIA_IO_PHYS_ADDR   0xF00000000ULL
+#define PCMCIA_ATTR_PHYS_ADDR 0xF40000000ULL
+#define PCMCIA_MEM_PHYS_ADDR  0xF80000000ULL
 #endif
 
 
@@ -1830,15 +1767,20 @@
 	/* 0x0078 */ u32 slppwr;
 	/* 0x007C */ u32 sleep;
 	/* 0x0080 */ u32 reserved5[32];
-	/* 0x0100 */ u32 trioutrd;
-#define trioutclr trioutrd
+	/* 0x0100 */ union {
+		u32 trioutrd;
+		u32 trioutclr;
+	};
 	/* 0x0104 */ u32 reserved6;
-	/* 0x0108 */ u32 outputrd;
-#define outputset outputrd
+	/* 0x0108 */ union {
+		u32 outputrd;
+		u32 outputset;
+	};
 	/* 0x010C */ u32 outputclr;
-	/* 0x0110 */ u32 pinstaterd;
-#define pininputen pinstaterd
-
+	/* 0x0110 */ union {
+		u32 pinstaterd;
+		u32 pininputen;
+	};
 } AU1X00_SYS;
 
 static AU1X00_SYS* const sys  = (AU1X00_SYS *)SYS_BASE;

From vksavl@cityline.ru Mon Apr 18 10:45:31 2005
Received: with ECARTIS (v1.0.0; list linux-mips); Mon, 18 Apr 2005 10:45:46 +0100 (BST)
Received: from mail.ultranet.ru ([IPv6:::ffff:213.33.170.34]:36528 "EHLO
	mail.ultranet.ru") by linux-mips.org with ESMTP id <S8225477AbVDRJpb>;
	Mon, 18 Apr 2005 10:45:31 +0100
Received: from [194.154.83.194] ([194.154.83.194] verified)
  by mail.ultranet.ru (CommuniGate Pro SMTP 4.2.9)
  with ESMTP id 24748302; Mon, 18 Apr 2005 13:30:57 +0400
Date:	Mon, 18 Apr 2005 13:32:46 +0400
From:	Pavel Kiryukhin <vksavl@cityline.ru>
X-Mailer: The Bat! (v2.10) UNREG / CD5BF9353B3B7091
Reply-To: Pavel Kiryukhin <vksavl@cityline.ru>
X-Priority: 3 (Normal)
Message-ID: <1807918959.20050418133246@cityline.ru>
To:	linux-mips@linux-mips.org
CC:	Manish Lachwani <mlachwani@mvista.com>
Subject: Preemption in do_cpu      (Re: [PATCH]Preemption patch for 2.6)
In-Reply-To: <1098468403.4266.42.camel@prometheus.mvista.com>
References: <1098468403.4266.42.camel@prometheus.mvista.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=Windows-1251
Content-Transfer-Encoding: 8bit
Return-Path: <vksavl@cityline.ru>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 7742
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: vksavl@cityline.ru
Precedence: bulk
X-list: linux-mips
Content-Length: 1432
Lines: 69

Hi,
the preempt_disable/preempt_enable sequence in do_cpu() [traps.c]
exists quite long (patch submitted in Oct. 2004), so it should be nothing
wrong there.

Can somebody please comment why use of preempt_disable/enable in do_cpu
will not result in "scheduling while atomic" for fpu-less cpu (with enabled
preemption).

The sequence looks like

do_cpu()
| preempt_disable()
| fpu_emulator_cop1Handler()
| | cond_reshed()
| | | schedule()  <------ scheduling while atomic


The proposed patch was tested for Sibyte, but it has fpu (AFAIK) and has no
fpu_emulator_cop1Handler called.

--
Thank you,
Pavel Kiryukhin                   mailto:vksavl@cityline.ru



Friday, October 22, 2004, 10:06:43 PM, you wrote:

ML> Hello !

ML> The attached patch incorporates preemption enable/disable in some parts
ML> of the kernel. I have tested this on the Broadcom Sibyte. Please review
ML> ...

ML> Thanks
ML> Manish Lachwani


<skip>

ML> Index: linux-2.6.8.1/arch/mips/kernel/traps.c
ML> ===================================================================
ML> --- linux-2.6.8.1.orig/arch/mips/kernel/traps.c
ML> +++ linux-2.6.8.1/arch/mips/kernel/traps.c

<skip>

ML>  case 1:
ML> +preempt_disable();
ML> +
ML>  own_fpu();
ML>  if (current->used_math) {	/* Using the FPU again.  */
ML>  restore_fp(current);
ML> @@ -674,6 +690,8 @@
ML>  force_sig(sig, current);
ML>  }
 
ML> +preempt_enable();
ML> +
ML>  return;
 
ML>  case 2:

<skip>





From eckhardt@satorlaser.com Mon Apr 18 10:46:08 2005
Received: with ECARTIS (v1.0.0; list linux-mips); Mon, 18 Apr 2005 10:46:27 +0100 (BST)
Received: from moutng.kundenserver.de ([IPv6:::ffff:212.227.126.176]:41466
	"EHLO moutng.kundenserver.de") by linux-mips.org with ESMTP
	id <S8225474AbVDRJpg>; Mon, 18 Apr 2005 10:45:36 +0100
Received: from [212.227.126.208] (helo=mrelayng.kundenserver.de)
	by moutng.kundenserver.de with esmtp (Exim 3.35 #1)
	id 1DNSox-0004du-00; Mon, 18 Apr 2005 11:45:35 +0200
Received: from [213.39.254.66] (helo=tuxator.satorlaser-intern.com)
	by mrelayng.kundenserver.de with asmtp (TLSv1:RC4-MD5:128)
	(Exim 3.35 #1)
	id 1DNSox-00073V-00; Mon, 18 Apr 2005 11:45:35 +0200
From:	Ulrich Eckhardt <eckhardt@satorlaser.com>
Organization: Sator Laser GmbH
To:	linux-mips@linux-mips.org
Subject: [patch] add missing declaration of smp_processor_id
Date:	Mon, 18 Apr 2005 11:46:26 +0200
User-Agent: KMail/1.7.2
Cc:	ralf@linux-mips.org
MIME-Version: 1.0
Content-Type: text/plain;
  charset="utf-8"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
Message-Id: <200504181146.26588.eckhardt@satorlaser.com>
X-Provags-ID: kundenserver.de abuse@kundenserver.de auth:e35cee35a663f5c944b9750a965814ae
Return-Path: <eckhardt@satorlaser.com>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 7743
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: eckhardt@satorlaser.com
Precedence: bulk
X-list: linux-mips
Content-Length: 672
Lines: 27

The missing declaration leads to warnings during compilation for Alchemy 
boards.

Changes
 * include <linux/smp.h> because udelay() needs smp_processor_id

cheers

Uli
---

Index: include/asm-mips/delay.h
===================================================================
RCS file: /home/cvs/linux/include/asm-mips/delay.h,v
retrieving revision 1.17
diff -u -w -r1.17 delay.h
--- include/asm-mips/delay.h	13 Apr 2005 13:37:32 -0000	1.17
+++ include/asm-mips/delay.h	18 Apr 2005 09:38:25 -0000
@@ -12,7 +12,7 @@
 
 #include <linux/config.h>
 #include <linux/param.h>
-
+#include <linux/smp.h>
 #include <asm/compiler.h>
 
 static inline void __delay(unsigned long loops)

From ralf@linux-mips.org Mon Apr 18 11:40:53 2005
Received: with ECARTIS (v1.0.0; list linux-mips); Mon, 18 Apr 2005 11:41:07 +0100 (BST)
Received: from extgw-uk.mips.com ([IPv6:::ffff:62.254.210.129]:63236 "EHLO
	bacchus.net.dhis.org") by linux-mips.org with ESMTP
	id <S8225527AbVDRKkx>; Mon, 18 Apr 2005 11:40:53 +0100
Received: from dea.linux-mips.net (localhost.localdomain [127.0.0.1])
	by bacchus.net.dhis.org (8.13.1/8.13.1) with ESMTP id j3IAemuL008505;
	Mon, 18 Apr 2005 11:40:48 +0100
Received: (from ralf@localhost)
	by dea.linux-mips.net (8.13.1/8.13.1/Submit) id j3IAemJE008504;
	Mon, 18 Apr 2005 11:40:48 +0100
Date:	Mon, 18 Apr 2005 11:40:48 +0100
From:	Ralf Baechle <ralf@linux-mips.org>
To:	Ulrich Eckhardt <eckhardt@satorlaser.com>
Cc:	linux-mips@linux-mips.org
Subject: Re: [patch] add missing declaration of smp_processor_id
Message-ID: <20050418104048.GD4572@linux-mips.org>
References: <200504181146.26588.eckhardt@satorlaser.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <200504181146.26588.eckhardt@satorlaser.com>
User-Agent: Mutt/1.4.1i
Return-Path: <ralf@linux-mips.org>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 7744
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: ralf@linux-mips.org
Precedence: bulk
X-list: linux-mips
Content-Length: 170
Lines: 8

On Mon, Apr 18, 2005 at 11:46:26AM +0200, Ulrich Eckhardt wrote:

> The missing declaration leads to warnings during compilation for Alchemy 
> boards.

Applied,

  Ralf

From d.piccolo@exadron.com Mon Apr 18 11:45:28 2005
Received: with ECARTIS (v1.0.0; list linux-mips); Mon, 18 Apr 2005 11:45:42 +0100 (BST)
Received: from host51-186.pool80204.interbusiness.it ([IPv6:::ffff:80.204.186.51]:55189
	"EHLO gate.exadron.com") by linux-mips.org with ESMTP
	id <S8225530AbVDRKp2>; Mon, 18 Apr 2005 11:45:28 +0100
Received: from 10.0.10.210 ([10.0.10.210])
	by gate.exadron.com (8.12.7/8.12.7) with ESMTP id j3IAgQjG027120
	for <linux-mips@linux-mips.org>; Mon, 18 Apr 2005 12:42:54 +0200
Subject: Bug detection and correction on Alchemy au1x00_uart.c serial driver
From:	"d.piccolo" <d.piccolo@exadron.com>
To:	linux-mips@linux-mips.org
Content-Type: text/plain
Date:	Mon, 18 Apr 2005 13:02:08 +0200
Message-Id: <1113822129.3261.42.camel@localhost.localdomain>
Mime-Version: 1.0
X-Mailer: Evolution 2.0.2 (2.0.2-3) 
Content-Transfer-Encoding: 7bit
Return-Path: <d.piccolo@exadron.com>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 7745
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: d.piccolo@exadron.com
Precedence: bulk
X-list: linux-mips
Content-Length: 880
Lines: 27

Hi Everybody

I've found a bug in the  au1x00_uart.c file in the drivers/serial/
directory of the 2.6.10 linux kernel. There is only possible to change
the speed of the communication but not to update other parameters of the
serial link, like the number of bits involved, stop bits and parity.
  Comparing the code of this source file with the code of the standard
8250 driver (8250.c also present in the same directory) I've found the
problem:  au1x00_uart.c never updates the LCR register  (Line Control
Register) of the serial controller at runtime, it happens only at first
setup. The problem is solved by adding the line

	serial_out(up, UART_LCR, cval);

just before the line 
 
	up->lcr = cval;	  /* Save LCR */

(there is only one position in all the source code where is written
"Save LCR")

I hope it could be useful.
                              David Piccolo


    


From hch@lst.de Mon Apr 18 12:54:43 2005
Received: with ECARTIS (v1.0.0; list linux-mips); Mon, 18 Apr 2005 12:54:58 +0100 (BST)
Received: from verein.lst.de ([IPv6:::ffff:213.95.11.210]:51133 "EHLO
	mail.lst.de") by linux-mips.org with ESMTP id <S8225534AbVDRLyn>;
	Mon, 18 Apr 2005 12:54:43 +0100
Received: from verein.lst.de (localhost [127.0.0.1])
	by mail.lst.de (8.12.3/8.12.3/Debian-7.1) with ESMTP id j3IBsg6t029142
	(version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NO);
	Mon, 18 Apr 2005 13:54:42 +0200
Received: (from hch@localhost)
	by verein.lst.de (8.12.3/8.12.3/Debian-6.6) id j3IBsg62029140;
	Mon, 18 Apr 2005 13:54:42 +0200
Date:	Mon, 18 Apr 2005 13:54:41 +0200
From:	Christoph Hellwig <hch@lst.de>
To:	Ulrich Eckhardt <eckhardt@satorlaser.com>
Cc:	linux-mips@linux-mips.org, ralf@linux-mips.org
Subject: Re: [patch] some cleanups for Alchemy processors
Message-ID: <20050418115441.GA29116@lst.de>
References: <200504181137.49593.eckhardt@satorlaser.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <200504181137.49593.eckhardt@satorlaser.com>
User-Agent: Mutt/1.3.28i
X-Scanned-By: MIMEDefang 2.39
Return-Path: <hch@lst.de>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 7746
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: hch@lst.de
Precedence: bulk
X-list: linux-mips
Content-Length: 274
Lines: 7

On Mon, Apr 18, 2005 at 11:37:48AM +0200, Ulrich Eckhardt wrote:
>  * replace three evil macros used to alias fields of a structure 
>    with an anonymous union

In general we try to still support gcc 2.95 for compiling the kernel,
which doesn't support anonymous unions.


From spam@god.dyndns.org Mon Apr 18 13:48:12 2005
Received: with ECARTIS (v1.0.0; list linux-mips); Mon, 18 Apr 2005 13:48:26 +0100 (BST)
Received: from god.demon.nl ([IPv6:::ffff:83.160.164.11]:9929 "EHLO
	god.dyndns.org") by linux-mips.org with ESMTP id <S8225550AbVDRMsM>;
	Mon, 18 Apr 2005 13:48:12 +0100
Received: by god.dyndns.org (Postfix, from userid 1005)
	id 729B24EC13; Mon, 18 Apr 2005 14:48:09 +0200 (CEST)
Date:	Mon, 18 Apr 2005 14:48:09 +0200
From:	Henk <Henk.Vergonet@gmail.com>
To:	Waldemar Brodkorb <wbx@openbsd-geek.de>
Cc:	linux-mips@linux-mips.org
Subject: Re: Porting mips based routers
Message-ID: <20050418124809.GA27967@god.dyndns.org>
References: <20050414210645.GB30585@god.dyndns.org> <20050415065558.GD25962@openbsd-geek.de>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <20050415065558.GD25962@openbsd-geek.de>
User-Agent: Mutt/1.5.6i
Return-Path: <spam@god.dyndns.org>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 7747
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: Henk.Vergonet@gmail.com
Precedence: bulk
X-list: linux-mips
Content-Length: 1061
Lines: 28

On Fri, Apr 15, 2005 at 08:55:58AM +0200, Waldemar Brodkorb wrote:
> > I will try to see if I can get a list of 2.4 source files that need to
> > be contributed back to linux-mips.org, with a quick initial proposal on
> > how to migrate this to the 2.6 kernel tree.

See section 1.3 on the wiki page:
http://openwrt.org/Kernel26Firmware
Feel free to comment here on the list.

General comments on the WRT code:
 - There's some code bloat that enables the inclusion of code in other OS's
  this should probably be removed.
 - We should probably make some abstraction/API of the so called Silicon
  Backplane bus that broadcom defined. I see allot of drivers, even in
  the mainline kernel (b44 ethernet driver) that use this.

> If you like to help, I would be giving you detailed information
> about the needed source code changes/addons.

Yes! Do you have any objection to make these publicly available?

> But may be it is time to send some patches...

Again yes, it should be possible to get this train rolling with some colaborative effort.

Regards,

Henk

From yuasa@hh.iij4u.or.jp Mon Apr 18 15:28:14 2005
Received: with ECARTIS (v1.0.0; list linux-mips); Mon, 18 Apr 2005 15:28:30 +0100 (BST)
Received: from mo00.iij4u.or.jp ([IPv6:::ffff:210.130.0.19]:37355 "EHLO
	mo00.iij4u.or.jp") by linux-mips.org with ESMTP id <S8225619AbVDRO2N>;
	Mon, 18 Apr 2005 15:28:13 +0100
Received: MO(mo00)id j3IES9Pc013463; Mon, 18 Apr 2005 23:28:09 +0900 (JST)
Received: MDO(mdo00) id j3IES9ls016810; Mon, 18 Apr 2005 23:28:09 +0900 (JST)
Received: from stratos (64.43.138.210.xn.2iij.net [210.138.43.64])
	by mbox.iij4u.or.jp (4U-MR/mbox00) id j3IES71o018696
	(version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NOT);
	Mon, 18 Apr 2005 23:28:08 +0900 (JST)
Date:	Mon, 18 Apr 2005 23:28:05 +0900
From:	Yoichi Yuasa <yuasa@hh.iij4u.or.jp>
To:	Ralf Baechle <ralf@linux-mips.org>
Cc:	yuasa@hh.iij4u.or.jp, linux-mips <linux-mips@linux-mips.org>
Subject: [PATCH 2.6] vr41xx: update init.c
Message-Id: <20050418232805.68e9828b.yuasa@hh.iij4u.or.jp>
X-Mailer: Sylpheed version 1.0.4 (GTK+ 1.2.10; i386-pc-linux-gnu)
Mime-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Return-Path: <yuasa@hh.iij4u.or.jp>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 7748
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: yuasa@hh.iij4u.or.jp
Precedence: bulk
X-list: linux-mips
Content-Length: 2605
Lines: 92

This patch had updated init.c for vr41xx.
 - add iomem resource init
 - add CP0 timer init
 - add clock frequency calculation

Signed-off-by: Yoichi Yuasa <yuasa@hh.iij4u.or.jp>

diff -urN -X dontdiff c-orig/arch/mips/vr41xx/common/init.c c/arch/mips/vr41xx/common/init.c
--- c-orig/arch/mips/vr41xx/common/init.c	Thu May 27 02:11:11 2004
+++ c/arch/mips/vr41xx/common/init.c	Sat Apr  9 23:42:40 2005
@@ -1,7 +1,7 @@
 /*
  *  init.c, Common initialization routines for NEC VR4100 series.
  *
- *  Copyright (C) 2003-2004  Yoichi Yuasa <yuasa@hh.iij4u.or.jp>
+ *  Copyright (C) 2003-2005  Yoichi Yuasa <yuasa@hh.iij4u.or.jp>
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
@@ -18,9 +18,45 @@
  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
 #include <linux/init.h>
+#include <linux/ioport.h>
+#include <linux/irq.h>
 #include <linux/string.h>
 
 #include <asm/bootinfo.h>
+#include <asm/time.h>
+#include <asm/vr41xx/vr41xx.h>
+
+#define IO_MEM_RESOURCE_START	0UL
+#define IO_MEM_RESOURCE_END	0x1fffffffUL
+
+static void __init iomem_resource_init(void)
+{
+	iomem_resource.start = IO_MEM_RESOURCE_START;
+	iomem_resource.end = IO_MEM_RESOURCE_END;
+}
+
+static void __init setup_timer_frequency(void)
+{
+	unsigned long tclock;
+
+	tclock = vr41xx_get_tclock_frequency();
+	if (current_cpu_data.processor_id == PRID_VR4131_REV2_0 ||
+	    current_cpu_data.processor_id == PRID_VR4131_REV2_1)
+		mips_hpt_frequency = tclock / 2;
+	else
+		mips_hpt_frequency = tclock / 4;
+}
+
+static void __init setup_timer_irq(struct irqaction *irq)
+{
+	setup_irq(TIMER_IRQ, irq);
+}
+
+static void __init timer_init(void)
+{
+	board_time_init = setup_timer_frequency;
+	board_timer_setup = setup_timer_irq;
+}
 
 void __init prom_init(void)
 {
@@ -35,6 +71,12 @@
 		if (i < (argc - 1))
 			strcat(arcs_cmdline, " ");
 	}
+
+	vr41xx_calculate_clock_frequency();
+
+	timer_init();
+
+	iomem_resource_init();
 }
 
 unsigned long __init prom_free_prom_memory (void)
diff -urN -X dontdiff c-orig/include/asm-mips/vr41xx/vr41xx.h c/include/asm-mips/vr41xx/vr41xx.h
--- c-orig/include/asm-mips/vr41xx/vr41xx.h	Sat Apr  9 23:42:21 2005
+++ c/include/asm-mips/vr41xx/vr41xx.h	Sat Apr  9 23:43:22 2005
@@ -84,7 +84,7 @@
 #define INT2_CASCADE_IRQ	MIPS_CPU_IRQ(4)
 #define INT3_CASCADE_IRQ	MIPS_CPU_IRQ(5)
 #define INT4_CASCADE_IRQ	MIPS_CPU_IRQ(6)
-#define MIPS_COUNTER_IRQ	MIPS_CPU_IRQ(7)
+#define TIMER_IRQ		MIPS_CPU_IRQ(7)
 
 /* SYINT1 Interrupt Numbers */
 #define SYSINT1_IRQ_BASE	8



From danm@embeddededge.com Mon Apr 18 15:45:42 2005
Received: with ECARTIS (v1.0.0; list linux-mips); Mon, 18 Apr 2005 15:45:58 +0100 (BST)
Received: from embeddededge.com ([IPv6:::ffff:209.113.146.155]:65041 "EHLO
	penguin.netx4.com") by linux-mips.org with ESMTP
	id <S8225472AbVDROpm>; Mon, 18 Apr 2005 15:45:42 +0100
Received: from [192.168.87.101] (pool-141-154-240-184.bos.east.verizon.net [141.154.240.184])
	by penguin.netx4.com (8.12.8/8.12.9) with ESMTP id j3IEf4fg024008;
	Mon, 18 Apr 2005 10:41:04 -0400
In-Reply-To: <200504181137.49593.eckhardt@satorlaser.com>
References: <200504181137.49593.eckhardt@satorlaser.com>
Mime-Version: 1.0 (Apple Message framework v619.2)
Content-Type: text/plain; charset=US-ASCII; format=flowed
Message-Id: <ca4c0616e67fe48cc66f3116afa1a5bc@embeddededge.com>
Content-Transfer-Encoding: 7bit
Cc:	linux-mips@linux-mips.org, ralf@linux-mips.org
From:	Dan malek <danm@embeddededge.com>
Subject: Re: [patch] some cleanups for Alchemy processors
Date:	Mon, 18 Apr 2005 10:45:33 -0400
To:	Ulrich Eckhardt <eckhardt@satorlaser.com>
X-Mailer: Apple Mail (2.619.2)
Return-Path: <danm@embeddededge.com>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 7749
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: danm@embeddededge.com
Precedence: bulk
X-list: linux-mips
Content-Length: 396
Lines: 18


On Apr 18, 2005, at 5:37 AM, Ulrich Eckhardt wrote:

> -void static inline au_writeb(u8 val, int reg)
> +void static inline au_writeb(u8 val, unsigned long port)
>  {
> -	*(volatile u8 *)(reg) = val;
> +	*(volatile u8 *)(port) = val;

Technically, these are registers, not "ports", so please
don't change their name.  They are memory mapped
registers, as their name implies.

Thanks.


	-- Dan


From tully@mikrotik.com Mon Apr 18 15:54:54 2005
Received: with ECARTIS (v1.0.0; list linux-mips); Mon, 18 Apr 2005 15:55:11 +0100 (BST)
Received: from frog.mt.lv ([IPv6:::ffff:159.148.172.197]:12206 "EHLO
	frog.mt.lv") by linux-mips.org with ESMTP id <S8225535AbVDROyy>;
	Mon, 18 Apr 2005 15:54:54 +0100
Received: from [10.5.17.206] (helo=your-lnsz0iqs6f.mikrotik.com)
	by frog.mt.lv with esmtp (Exim 4.44)
	id 1DNXix-0006B6-O1; Mon, 18 Apr 2005 17:59:43 +0300
Message-Id: <6.2.1.2.0.20050418174810.0382e410@frog.mt.lv>
X-Mailer: QUALCOMM Windows Eudora Version 6.2.1.2
Date:	Mon, 18 Apr 2005 17:54:05 +0300
To:	linux-mips@linux-mips.org
From:	John Tully <tully@mikrotik.com>
Subject: Re: Linux for RouterBoard532 - CPU MIPS32 4Kc - IDT 79RC32434.
Cc:	Wolfgang Denk <wd@denx.de>, cordova@uninet.com.br
In-Reply-To: <20050416225931.D620AC108D@atlas.denx.de>
References: <Your message of "Sat, 16 Apr 2005 11:33:45 -0300." <42612249.1fb.7a40.2093672349@uninet.com.br>
 <20050416225931.D620AC108D@atlas.denx.de>
Mime-Version: 1.0
Content-Type: text/plain; charset="iso-8859-1"; format=flowed
Content-Transfer-Encoding: 8bit
Return-Path: <tully@mikrotik.com>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 7750
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: tully@mikrotik.com
Precedence: bulk
X-list: linux-mips
Content-Length: 2061
Lines: 49

I work for MikroTik and we make the RB500.  We are trying to add more 
documentation to make it easy to do more things with Linux.  At the moment, 
the CF image at least lets you quickly start on developing Linux 
applications.  Allot of what you need can be figured out from the kernel 
patch on the specs page for the RB500 at www.routerboard.com , but that is 
not so much fun.  We will add more documentation on the NAND device and 
such features.  So, please check the site and I can also write to this list 
as we add more info.

John
www.mikrotik.com

At 01:59 AM 4/17/2005, Wolfgang Denk wrote:
>In message <42612249.1fb.7a40.2093672349@uninet.com.br> you wrote:
> >
> > I´d just bought Routerboard532 (
> > http://www.routerboard.com/rb500.html ) and I want to port
> > linux to this board. The vendor has just an linux image on
> > the web site.
>
>This is not correct. If you just scroll  down  the  page  you  listed
>yoursself,   then   you   should   easily  find  the  section  titled
>"RouterBOARD 500 GNU/Linux support files" which includes  a  link  to
>"Patch for Linux 2.4.29 kernel".
>
> > Anyone could help me we some info or "HOWTO" ?
>
>Download the patch, download the corresponding  kernel  source  tree,
>apply  patch,  copy  "config.mipsel"  to  ".config"  to get a default
>configuration, build the kernel, download it, run it.
>
>So far I haven't been able to find out how to pass  kernel  arguments
>with their boot loader, so you may have to hack rc32434/rb500/prom.c
>
>I used the mips_4KCle packages of the ELDK to build the kernel and to
>provide a root filesystem over NFS - this worked fine. There are some
>problems (like not being able to switch the CPU clock and NAND  flash
>support not working at all), but it boots and runs.
>
>Best regards,
>
>Wolfgang Denk
>
>--
>Software Engineering:  Embedded and Realtime Systems,  Embedded Linux
>Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd@denx.de
>The IQ of the group is the lowest IQ of a member of the group divided
>by the number of people in the group.


From eckhardt@satorlaser.com Mon Apr 18 16:26:32 2005
Received: with ECARTIS (v1.0.0; list linux-mips); Mon, 18 Apr 2005 16:26:48 +0100 (BST)
Received: from moutng.kundenserver.de ([IPv6:::ffff:212.227.126.191]:243 "EHLO
	moutng.kundenserver.de") by linux-mips.org with ESMTP
	id <S8225528AbVDRP0c>; Mon, 18 Apr 2005 16:26:32 +0100
Received: from [212.227.126.155] (helo=mrelayng.kundenserver.de)
	by moutng.kundenserver.de with esmtp (Exim 3.35 #1)
	id 1DNY8t-0000Nw-00
	for linux-mips@linux-mips.org; Mon, 18 Apr 2005 17:26:31 +0200
Received: from [213.39.254.66] (helo=tuxator.satorlaser-intern.com)
	by mrelayng.kundenserver.de with asmtp (TLSv1:RC4-MD5:128)
	(Exim 3.35 #1)
	id 1DNY8s-0000UE-00
	for linux-mips@linux-mips.org; Mon, 18 Apr 2005 17:26:30 +0200
From:	Ulrich Eckhardt <eckhardt@satorlaser.com>
Organization: Sator Laser GmbH
To:	linux-mips@linux-mips.org
Subject: Re: [patch] some cleanups for Alchemy processors
Date:	Mon, 18 Apr 2005 17:27:21 +0200
User-Agent: KMail/1.7.2
References: <200504181137.49593.eckhardt@satorlaser.com>
In-Reply-To: <200504181137.49593.eckhardt@satorlaser.com>
MIME-Version: 1.0
Content-Type: text/plain;
  charset="utf-8"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
Message-Id: <200504181727.22299.eckhardt@satorlaser.com>
X-Provags-ID: kundenserver.de abuse@kundenserver.de auth:e35cee35a663f5c944b9750a965814ae
Return-Path: <eckhardt@satorlaser.com>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 7751
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: eckhardt@satorlaser.com
Precedence: bulk
X-list: linux-mips
Content-Length: 6553
Lines: 237

OK, here's a new version that fixes the objections raised by Christoph and 
Dan.

Uli


Changes:
 * use 'unsigned long' as address supplied to au_write[bwl]()
 * remove two already unused and commented structures
 * added an ULL suffix to several address constants that use
   bits 35-32

---
Index: include/asm-mips/mach-au1x00/au1000.h
===================================================================
RCS file: /home/cvs/linux/include/asm-mips/mach-au1x00/au1000.h,v
retrieving revision 1.16
diff -u -r1.16 au1000.h
--- include/asm-mips/mach-au1x00/au1000.h	4 Apr 2005 01:06:20 -0000	1.16
+++ include/asm-mips/mach-au1x00/au1000.h	18 Apr 2005 15:24:38 -0000
@@ -60,34 +60,34 @@
 	mdelay(ms);
 }
 
-void static inline au_writeb(u8 val, int reg)
+void static inline au_writeb(u8 val, unsigned long reg)
 {
 	*(volatile u8 *)(reg) = val;
 }
 
-void static inline au_writew(u16 val, int reg)
+void static inline au_writew(u16 val, unsigned long reg)
 {
 	*(volatile u16 *)(reg) = val;
 }
 
-void static inline au_writel(u32 val, int reg)
+void static inline au_writel(u32 val, unsigned long reg)
 {
 	*(volatile u32 *)(reg) = val;
 }
 
-static inline u8 au_readb(unsigned long port)
+static inline u8 au_readb(unsigned long reg)
 {
-	return (*(volatile u8 *)port);
+	return (*(volatile u8 *)reg);
 }
 
-static inline u16 au_readw(unsigned long port)
+static inline u16 au_readw(unsigned long reg)
 {
-	return (*(volatile u16 *)port);
+	return (*(volatile u16 *)reg);
 }
 
-static inline u32 au_readl(unsigned long port)
+static inline u32 au_readl(unsigned long reg)
 {
-	return (*(volatile u32 *)port);
+	return (*(volatile u32 *)reg);
 }
 
 /* These next three functions should be a generic part of the MIPS
@@ -181,26 +181,6 @@
 #define MEM_SDSLEEP		(0x0030)
 #define MEM_SDSMCKE		(0x0034)
 
-#ifndef ASSEMBLER
-/*typedef volatile struct
-{
-	uint32 sdmode0;
-	uint32 sdmode1;
-	uint32 sdmode2;
-	uint32 sdaddr0;
-	uint32 sdaddr1;
-	uint32 sdaddr2;
-	uint32 sdrefcfg;
-	uint32 sdautoref;
-	uint32 sdwrmd0;
-	uint32 sdwrmd1;
-	uint32 sdwrmd2;
-	uint32 sdsleep;
-	uint32 sdsmcke;
-
-} AU1X00_SDRAM;*/
-#endif
-
 /*
  * MEM_SDMODE register content definitions
  */
@@ -286,49 +266,6 @@
 #define MEM_SDSREF		(0x08D0)
 #define MEM_SDSLEEP		MEM_SDSREF
 
-#ifndef ASSEMBLER
-/*typedef volatile struct
-{
-	uint32 sdmode0;
-	uint32 reserved0;
-	uint32 sdmode1;
-	uint32 reserved1;
-	uint32 sdmode2;
-	uint32 reserved2[3];
-	uint32 sdaddr0;
-	uint32 reserved3;
-	uint32 sdaddr1;
-	uint32 reserved4;
-	uint32 sdaddr2;
-	uint32 reserved5[3];
-	uint32 sdconfiga;
-	uint32 reserved6;
-	uint32 sdconfigb;
-	uint32 reserved7;
-	uint32 sdstat;
-	uint32 reserved8;
-	uint32 sderraddr;
-	uint32 reserved9;
-	uint32 sdstride0;
-	uint32 reserved10;
-	uint32 sdstride1;
-	uint32 reserved11;
-	uint32 sdstride2;
-	uint32 reserved12[3];
-	uint32 sdwrmd0;
-	uint32 reserved13;
-	uint32 sdwrmd1;
-	uint32 reserved14;
-	uint32 sdwrmd2;
-	uint32 reserved15[11];
-	uint32 sdprecmd;
-	uint32 reserved16;
-	uint32 sdautoref;
-	uint32 reserved17;
-	uint32 sdsref;
-
-} AU1550_SDRAM;*/
-#endif
 #endif
 
 /*
@@ -365,9 +302,9 @@
 #define	SSI0_PHYS_ADDR		0x11600000
 #define	SSI1_PHYS_ADDR		0x11680000
 #define	SYS_PHYS_ADDR		0x11900000
-#define PCMCIA_IO_PHYS_ADDR   0xF00000000
-#define PCMCIA_ATTR_PHYS_ADDR 0xF40000000
-#define PCMCIA_MEM_PHYS_ADDR  0xF80000000
+#define PCMCIA_IO_PHYS_ADDR   0xF00000000ULL
+#define PCMCIA_ATTR_PHYS_ADDR 0xF40000000ULL
+#define PCMCIA_MEM_PHYS_ADDR  0xF80000000ULL
 #endif
 
 /********************************************************************/
@@ -399,13 +336,13 @@
 #define	UART3_PHYS_ADDR		0x11400000
 #define GPIO2_PHYS_ADDR		0x11700000
 #define	SYS_PHYS_ADDR		0x11900000
-#define PCI_MEM_PHYS_ADDR     0x400000000
-#define PCI_IO_PHYS_ADDR      0x500000000
-#define PCI_CONFIG0_PHYS_ADDR 0x600000000
-#define PCI_CONFIG1_PHYS_ADDR 0x680000000
-#define PCMCIA_IO_PHYS_ADDR   0xF00000000
-#define PCMCIA_ATTR_PHYS_ADDR 0xF40000000
-#define PCMCIA_MEM_PHYS_ADDR  0xF80000000
+#define PCI_MEM_PHYS_ADDR     0x400000000ULL
+#define PCI_IO_PHYS_ADDR      0x500000000ULL
+#define PCI_CONFIG0_PHYS_ADDR 0x600000000ULL
+#define PCI_CONFIG1_PHYS_ADDR 0x680000000ULL
+#define PCMCIA_IO_PHYS_ADDR   0xF00000000ULL
+#define PCMCIA_ATTR_PHYS_ADDR 0xF40000000ULL
+#define PCMCIA_MEM_PHYS_ADDR  0xF80000000ULL
 #endif
 
 /********************************************************************/
@@ -442,9 +379,9 @@
 #define GPIO2_PHYS_ADDR		0x11700000
 #define	SYS_PHYS_ADDR		0x11900000
 #define LCD_PHYS_ADDR		0x15000000
-#define PCMCIA_IO_PHYS_ADDR   0xF00000000
-#define PCMCIA_ATTR_PHYS_ADDR 0xF40000000
-#define PCMCIA_MEM_PHYS_ADDR  0xF80000000
+#define PCMCIA_IO_PHYS_ADDR   0xF00000000ULL
+#define PCMCIA_ATTR_PHYS_ADDR 0xF40000000ULL
+#define PCMCIA_MEM_PHYS_ADDR  0xF80000000ULL
 #endif
 
 /***********************************************************************/
@@ -473,13 +410,13 @@
 #define PSC1_PHYS_ADDR	 	0x11B00000
 #define PSC2_PHYS_ADDR	 	0x10A00000
 #define PSC3_PHYS_ADDR	 	0x10B00000
-#define PCI_MEM_PHYS_ADDR     0x400000000
-#define PCI_IO_PHYS_ADDR      0x500000000
-#define PCI_CONFIG0_PHYS_ADDR 0x600000000
-#define PCI_CONFIG1_PHYS_ADDR 0x680000000
-#define PCMCIA_IO_PHYS_ADDR   0xF00000000
-#define PCMCIA_ATTR_PHYS_ADDR 0xF40000000
-#define PCMCIA_MEM_PHYS_ADDR  0xF80000000
+#define PCI_MEM_PHYS_ADDR     0x400000000ULL
+#define PCI_IO_PHYS_ADDR      0x500000000ULL
+#define PCI_CONFIG0_PHYS_ADDR 0x600000000ULL
+#define PCI_CONFIG1_PHYS_ADDR 0x680000000ULL
+#define PCMCIA_IO_PHYS_ADDR   0xF00000000ULL
+#define PCMCIA_ATTR_PHYS_ADDR 0xF40000000ULL
+#define PCMCIA_MEM_PHYS_ADDR  0xF80000000ULL
 #endif
 
 /***********************************************************************/
@@ -500,15 +437,15 @@
 #define	DDMA_PHYS_ADDR		0x14002000
 #define PSC0_PHYS_ADDR	 	0x11A00000
 #define PSC1_PHYS_ADDR	 	0x11B00000
-#define PCMCIA_IO_PHYS_ADDR   0xF00000000
-#define PCMCIA_ATTR_PHYS_ADDR 0xF40000000
-#define PCMCIA_MEM_PHYS_ADDR  0xF80000000
 #define SD0_PHYS_ADDR		0x10600000
 #define SD1_PHYS_ADDR		0x10680000
 #define LCD_PHYS_ADDR		0x15000000
 #define SWCNT_PHYS_ADDR		0x1110010C
 #define MAEFE_PHYS_ADDR		0x14012000
 #define MAEBE_PHYS_ADDR		0x14010000
+#define PCMCIA_IO_PHYS_ADDR   0xF00000000ULL
+#define PCMCIA_ATTR_PHYS_ADDR 0xF40000000ULL
+#define PCMCIA_MEM_PHYS_ADDR  0xF80000000ULL
 #endif
 
 
@@ -1788,7 +1725,7 @@
 #define PCI_IO_START    0
 #define PCI_IO_END      0
 #define PCI_MEM_START   0
-#define PCI_MEM_END     0 
+#define PCI_MEM_END     0
 #define PCI_FIRST_DEVFN 0
 #define PCI_LAST_DEVFN  0
 

From ralf@linux-mips.org Mon Apr 18 17:10:31 2005
Received: with ECARTIS (v1.0.0; list linux-mips); Mon, 18 Apr 2005 17:10:46 +0100 (BST)
Received: from extgw-uk.mips.com ([IPv6:::ffff:62.254.210.129]:29194 "EHLO
	bacchus.net.dhis.org") by linux-mips.org with ESMTP
	id <S8225621AbVDRQKb>; Mon, 18 Apr 2005 17:10:31 +0100
Received: from dea.linux-mips.net (localhost.localdomain [127.0.0.1])
	by bacchus.net.dhis.org (8.13.1/8.13.1) with ESMTP id j3IGAMgE031465;
	Mon, 18 Apr 2005 17:10:22 +0100
Received: (from ralf@localhost)
	by dea.linux-mips.net (8.13.1/8.13.1/Submit) id j3IGALMJ031464;
	Mon, 18 Apr 2005 17:10:21 +0100
Date:	Mon, 18 Apr 2005 17:10:21 +0100
From:	Ralf Baechle <ralf@linux-mips.org>
To:	Yoichi Yuasa <yuasa@hh.iij4u.or.jp>
Cc:	linux-mips <linux-mips@linux-mips.org>
Subject: Re: [PATCH 2.6] vr41xx: update init.c
Message-ID: <20050418161021.GM4572@linux-mips.org>
References: <20050418232805.68e9828b.yuasa@hh.iij4u.or.jp>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <20050418232805.68e9828b.yuasa@hh.iij4u.or.jp>
User-Agent: Mutt/1.4.1i
Return-Path: <ralf@linux-mips.org>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 7752
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: ralf@linux-mips.org
Precedence: bulk
X-list: linux-mips
Content-Length: 232
Lines: 10

On Mon, Apr 18, 2005 at 11:28:05PM +0900, Yoichi Yuasa wrote:

> This patch had updated init.c for vr41xx.
>  - add iomem resource init
>  - add CP0 timer init
>  - add clock frequency calculation

Thanks, Yoichi.  Applied,

  Ralf

From alex.gonzalez@packetvision.com Mon Apr 18 18:03:07 2005
Received: with ECARTIS (v1.0.0; list linux-mips); Mon, 18 Apr 2005 18:03:27 +0100 (BST)
Received: from smtp.uk.colt.net ([IPv6:::ffff:195.110.64.125]:14522 "EHLO
	smtp.uk.colt.net") by linux-mips.org with ESMTP id <S8225722AbVDRRDH>;
	Mon, 18 Apr 2005 18:03:07 +0100
Received: from euskadi.packetvision (unknown [213.86.106.84])
	by smtp.uk.colt.net (Postfix) with ESMTP id 766F0127750
	for <linux-mips@linux-mips.org>; Mon, 18 Apr 2005 17:59:21 +0100 (BST)
Subject: Building native binutils/gcc/glibc
From:	Alex Gonzalez <alex.gonzalez@packetvision.com>
To:	linux-mips@linux-mips.org
Content-Type: multipart/mixed; boundary="=-ts/afQCHMsiboRljnl2a"
Message-Id: <1113843806.4266.20.camel@euskadi.packetvision>
Mime-Version: 1.0
X-Mailer: Ximian Evolution 1.4.5 (1.4.5-9) 
Date:	Mon, 18 Apr 2005 18:03:26 +0100
Return-Path: <alex.gonzalez@packetvision.com>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 7753
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: alex.gonzalez@packetvision.com
Precedence: bulk
X-list: linux-mips
Content-Length: 21446
Lines: 558


--=-ts/afQCHMsiboRljnl2a
Content-Type: text/plain
Content-Transfer-Encoding: 7bit

Hi,

I have a cross compilation toolchain that successfully builds a linux
2.6.11 kernel (o32) for my mips target, and elf executables to run on
it.

I am trying to cross compile native binutils/gcc and glibc to be able to
build on the target, using:

binutils 2.14
gcc 3.3.5
glibc 2.3.5

I configure them with --host=mips-linux-gnu --build=i686-pc-linux-glibc2.2 and target=mips-linux-gnu

After installing them in the target root filesystem, I try to compile a simple "Hello World" program, and I get the following error:

 Reading specs from /bin/../lib/gcc-lib/mips-linux-gnu/3.3.5/specs
Configured with: ../gcc-3.3.5/configure --host=mips-linux-gnu --target=mips-linux-gnu --build=i686-pc-linux-gnulibc2.2 --prefix=/home/alex/nfsroot/pv-rootfs --enable-clocale=gnu --enable-languages=c,c++
Thread model: posix
gcc driver version 3.3.5 executing gcc version 3.3-mips64linux-031001
 /bin/../lib/gcc-lib/mips-linux-gnu/3.3.5/cc1 -quiet -v -I /usr/include -iprefix /bin/../lib/gcc-lib/mips-linux-gnu/3.3.5/ -isystem /usr/lib/include -D__GNUC__=3 -D__GNUC_MINOR__=3 -D__GNUC_PATCHLEVEL__=0 hello.c -quiet -dumpbase hello.c -auxbase hello -version -o ./ccKgGMsl.s
ignoring nonexistent directory "/usr/lib/include"
GNU C version 3.3.5 (mips-linux-gnu)
        compiled by GNU C version 3.3-mips64linux-031001.
GGC heuristics: --param ggc-min-expand=47 --param ggc-min-heapsize=32046
ignoring nonexistent directory "/mips-linux-gnu/include"
ignoring nonexistent directory "/usr/local/include"
ignoring nonexistent directory "/home/alex/nfsroot/pv-rootfs/include"
ignoring nonexistent directory "/home/alex/nfsroot/pv-rootfs/lib/gcc-lib/mips-linux-gnu/3.3.5/include"
ignoring nonexistent directory "/home/alex/nfsroot/pv-rootfs/mips-linux-gnu/include"
ignoring duplicate directory "/usr/include"
  as it is a non-system directory that duplicates a system directory
#include "..." search starts here:
#include <...> search starts here:
 /lib/gcc-lib/mips-linux-gnu/3.3.5/include
 /usr/include
End of search list.
 /bin/../lib/gcc-lib/mips-linux-gnu/3.3.5/../../../../mips-linux-gnu/bin/as -EB -g0 -32 -v -KPIC -o ./ccYlX6Ij.o ./ccKgGMsl.s
GNU assembler version 2.14 (mips-linux-gnu) using BFD version 2.14 20030612
 /bin/../lib/gcc-lib/mips-linux-gnu/3.3.5/collect2 --eh-frame-hdr -EB -dynamic-linker /lib/ld.so.1 /usr/lib/crt1.o /usr/lib/crti.o /bin/../lib/gcc-lib/mips-linux-gnu/3.3.5/crtbegin.o -L/bin/../lib/gcc-lib/mips-linux-gnu/3.3.5 -L/bin/../lib/gcc-lib -L/bin/../lib/gcc-lib/mips-linux-gnu/3.3.5/../../../../mips-linux-gnu/lib ./ccYlX6Ij.o -lgcc -lgcc_eh -rpath-link /lib:/usr/lib -lc -lgcc -lgcc_eh /bin/../lib/gcc-lib/mips-linux-gnu/3.3.5/crtend.o /usr/lib/crtn.o
/bin/../lib/gcc-lib/mips-linux-gnu/3.3.5/../../../../mips-linux-gnu/bin/ld: ./ccYlX6Ij.o: linking abicalls files with non-abicalls files
Bad value: failed to merge target specific data of file ./ccYlX6Ij.o
collect2: ld returned 1 exit status

Passing -a to gas, I see the .abicalls in the object file. Trying to compile with -mno-abicalls removes the .abicall from the object file but does not remove the error.

I have tried different versions of binutils/gcc/glibc, but I don't know if the problem comes from glibc, gcc or gas.

Does anybody have any clue about what's going on?

I enclose the output of,

gcc hello.c -I /usr/include -B /usr/lib -Wl,-t,-M -Wa,-a -mno-abicalls

in case it helps. 

Thanks a lot,
Alex


--=-ts/afQCHMsiboRljnl2a
Content-Disposition: attachment; filename=out.3
Content-Type: text/x-troff-man; name=out.3; charset=
Content-Transfer-Encoding: 7bit

Reading specs from /bin/../lib/gcc-lib/mips-linux-gnu/3.3.5/specs
Configured with: ../gcc-3.3.5/configure --host=mips-linux-gnu --target=mips-linux-gnu --build=i686-pc-linux-gnulibc2.2 --prefix=/home/alex/nfsroot/pv-rootfs --enable-clocale=gnu --enable-languages=c,c++
Thread model: posix
gcc driver version 3.3.5 executing gcc version 3.3-mips64linux-031001
 /bin/../lib/gcc-lib/mips-linux-gnu/3.3.5/cc1 -quiet -v -I /usr/include -iprefix /bin/../lib/gcc-lib/mips-linux-gnu/3.3.5/ -isystem /usr/lib/include -D__GNUC__=3 -D__GNUC_MINOR__=3 -D__GNUC_PATCHLEVEL__=0 hello.c -quiet -dumpbase hello.c -mno-abicalls -auxbase hello -version -o ./ccY7LCg6.s
ignoring nonexistent directory "/usr/lib/include"
GNU C version 3.3.5 (mips-linux-gnu)
	compiled by GNU C version 3.3-mips64linux-031001.
GGC heuristics: --param ggc-min-expand=47 --param ggc-min-heapsize=32046
ignoring nonexistent directory "/mips-linux-gnu/include"
ignoring nonexistent directory "/usr/local/include"
ignoring nonexistent directory "/home/alex/nfsroot/pv-rootfs/include"
ignoring nonexistent directory "/home/alex/nfsroot/pv-rootfs/lib/gcc-lib/mips-linux-gnu/3.3.5/include"
ignoring nonexistent directory "/home/alex/nfsroot/pv-rootfs/mips-linux-gnu/include"
ignoring duplicate directory "/usr/include"
  as it is a non-system directory that duplicates a system directory
#include "..." search starts here:
#include <...> search starts here:
 /lib/gcc-lib/mips-linux-gnu/3.3.5/include
 /usr/include
End of search list.
 /bin/../lib/gcc-lib/mips-linux-gnu/3.3.5/../../../../mips-linux-gnu/bin/as -EB -g0 -32 -v -KPIC -a -o ./cc2XtIzO.o ./ccY7LCg6.s
GNU assembler version 2.14 (mips-linux-gnu) using BFD version 2.14 20030612
./ccY7LCg6.s: Assembler messages:
./ccY7LCg6.s:22: Warning: No .cprestore pseudo-op used in PIC code
GAS LISTING ./ccY7LCg6.s 			page 1


   1              		.file	1 "hello.c"
   2              		.section .mdebug.abi32
   3              		.previous
   4              		.rdata
   5              		.align	2
   6              	$LC0:
   7 0000 48656C6C 		.ascii	"Hello World!\000"
   7      6F20576F 
   7      726C6421 
   7      00
   8 000d 000000   		.text
   9              		.align	2
  10              		.globl	main
  11              		.ent	main
  12              		.type	main, @function
  13              	main:
  14              		.frame	$fp,24,$31		# vars= 0, regs= 2/0, args= 16, extra= 0
  15              		.mask	0xc0000000,-4
  16              		.fmask	0x00000000,0
  17 0000 27BDFFE8 		subu	$sp,$sp,24
  18 0004 AFBF0014 		sw	$31,20($sp)
  19 0008 AFBE0010 		sw	$fp,16($sp)
  20 000c 03A0F021 		move	$fp,$sp
  21 0010 8F840000 		la	$4,$LC0
  21      00000000 
  21      24840000 
  22 001c 8F990000 		jal	printf
****  Warning:No .cprestore pseudo-op used in PIC code
  22      00000000 
  22      0320F809 
  22      00000000 
  23 002c 03C0E821 		move	$sp,$fp
  24 0030 8FBF0014 		lw	$31,20($sp)
  25 0034 8FBE0010 		lw	$fp,16($sp)
  26 0038 03E00008 		addu	$sp,$sp,24
  27 003c 27BD0018 		j	$31
  28              		.end	main
  29              		.ident	"GCC: (GNU) 3.3.5"
GAS LISTING ./ccY7LCg6.s 			page 2


DEFINED SYMBOLS
                            *ABS*:0000000000000000 hello.c
        ./ccY7LCg6.s:13     .text:0000000000000000 main

UNDEFINED SYMBOLS
printf
 /bin/../lib/gcc-lib/mips-linux-gnu/3.3.5/collect2 --eh-frame-hdr -EB -dynamic-linker /lib/ld.so.1 /usr/lib/crt1.o /usr/lib/crti.o /bin/../lib/gcc-lib/mips-linux-gnu/3.3.5/crtbegin.o -L/bin/../lib/gcc-lib/mips-linux-gnu/3.3.5 -L/bin/../lib/gcc-lib -L/bin/../lib/gcc-lib/mips-linux-gnu/3.3.5/../../../../mips-linux-gnu/lib ./cc2XtIzO.o -t -M -lgcc -lgcc_eh -rpath-link /lib:/usr/lib -lc -lgcc -lgcc_eh /bin/../lib/gcc-lib/mips-linux-gnu/3.3.5/crtend.o /usr/lib/crtn.o
/bin/../lib/gcc-lib/mips-linux-gnu/3.3.5/../../../../mips-linux-gnu/bin/ld: ./cc2XtIzO.o: linking abicalls files with non-abicalls files
Bad value: failed to merge target specific data of file ./cc2XtIzO.o
/bin/../lib/gcc-lib/mips-linux-gnu/3.3.5/../../../../mips-linux-gnu/bin/ld: mode elf32btsmip
/usr/lib/crt1.o
/usr/lib/crti.o
/bin/../lib/gcc-lib/mips-linux-gnu/3.3.5/crtbegin.o
./cc2XtIzO.o
/lib/libc.so.6
Archive member included because of file (symbol)

/usr/lib/libc_nonshared.a(elf-init.oS)
                              /usr/lib/crt1.o (__libc_csu_init)
(/usr/lib/libc_nonshared.a)elf-init.oS
/bin/../lib/gcc-lib/mips-linux-gnu/3.3.5/crtend.o
/usr/lib/crtn.o

Memory Configuration

Name             Origin             Length             Attributes
*default*        0x0000000000000000 0xffffffffffffffff

Linker script and memory map

LOAD /usr/lib/crt1.o
LOAD /usr/lib/crti.o
LOAD /bin/../lib/gcc-lib/mips-linux-gnu/3.3.5/crtbegin.o
LOAD ./cc2XtIzO.o
LOAD /bin/../lib/gcc-lib/mips-linux-gnu/3.3.5/libgcc.a
LOAD /bin/../lib/gcc-lib/mips-linux-gnu/3.3.5/libgcc_eh.a
LOAD /usr/lib/libc.so
START GROUP
LOAD /lib/libc.so.6
LOAD /usr/lib/libc_nonshared.a
END GROUP
LOAD /bin/../lib/gcc-lib/mips-linux-gnu/3.3.5/libgcc.a
LOAD /bin/../lib/gcc-lib/mips-linux-gnu/3.3.5/libgcc_eh.a
LOAD /bin/../lib/gcc-lib/mips-linux-gnu/3.3.5/crtend.o
LOAD /usr/lib/crtn.o
                0x0000000000400114                . = (0x400000 + SIZEOF_HEADERS)

.interp         0x0000000000400114        0xd
 *(.interp)
 .interp        0x0000000000400114        0xd /usr/lib/crt1.o

.note.ABI-tag   0x0000000000400124       0x20
 .note.ABI-tag  0x0000000000400124       0x20 /usr/lib/crt1.o

.reginfo        0x0000000000400144       0x18
 *(.reginfo)
 .reginfo       0x0000000000400144       0x18 /usr/lib/crt1.o

.dynamic        0x000000000040015c       0xf0
 *(.dynamic)
 .dynamic       0x000000000040015c       0xf0 /usr/lib/crt1.o
                0x000000000040015c                _DYNAMIC

.hash           0x000000000040024c       0x9c
 *(.hash)
 .hash          0x000000000040024c       0x9c /usr/lib/crt1.o

.dynsym         0x00000000004002e8      0x140
 *(.dynsym)
 .dynsym        0x00000000004002e8      0x140 /usr/lib/crt1.o

.dynstr         0x0000000000400428      0x11a
 *(.dynstr)
 .dynstr        0x0000000000400428      0x11a /usr/lib/crt1.o

.gnu.version    0x0000000000400542       0x28
 *(.gnu.version)
 .gnu.version   0x0000000000400542       0x28 /usr/lib/crt1.o

.gnu.version_d
 *(.gnu.version_d)

.gnu.version_r  0x000000000040056c       0x20
 *(.gnu.version_r)
 .gnu.version_r
                0x000000000040056c       0x20 /usr/lib/crt1.o

.rel.dyn
 *(.rel.init)
 *(.rel.text .rel.text.* .rel.gnu.linkonce.t.*)
 *(.rel.fini)
 *(.rel.rodata .rel.rodata.* .rel.gnu.linkonce.r.*)
 *(.rel.data .rel.data.* .rel.gnu.linkonce.d.*)
 *(.rel.tdata .rel.tdata.* .rel.gnu.linkonce.td.*)
 *(.rel.tbss .rel.tbss.* .rel.gnu.linkonce.tb.*)
 *(.rel.ctors)
 *(.rel.dtors)
 *(.rel.got)
 *(.rel.sdata .rel.sdata.* .rel.gnu.linkonce.s.*)
 *(.rel.sbss .rel.sbss.* .rel.gnu.linkonce.sb.*)
 *(.rel.sdata2 .rel.sdata2.* .rel.gnu.linkonce.s2.*)
 *(.rel.sbss2 .rel.sbss2.* .rel.gnu.linkonce.sb2.*)
 *(.rel.bss .rel.bss.* .rel.gnu.linkonce.b.*)

.rela.dyn
 *(.rela.init)
 *(.rela.text .rela.text.* .rela.gnu.linkonce.t.*)
 *(.rela.fini)
 *(.rela.rodata .rela.rodata.* .rela.gnu.linkonce.r.*)
 *(.rela.data .rela.data.* .rela.gnu.linkonce.d.*)
 *(.rela.tdata .rela.tdata.* .rela.gnu.linkonce.td.*)
 *(.rela.tbss .rela.tbss.* .rela.gnu.linkonce.tb.*)
 *(.rela.ctors)
 *(.rela.dtors)
 *(.rela.got)
 *(.rela.sdata .rela.sdata.* .rela.gnu.linkonce.s.*)
 *(.rela.sbss .rela.sbss.* .rela.gnu.linkonce.sb.*)
 *(.rela.sdata2 .rela.sdata2.* .rela.gnu.linkonce.s2.*)
 *(.rela.sbss2 .rela.sbss2.* .rela.gnu.linkonce.sb2.*)
 *(.rela.bss .rela.bss.* .rela.gnu.linkonce.b.*)

.rel.plt
 *(.rel.plt)

.rela.plt
 *(.rela.plt)

.init           0x000000000040058c       0xa8
 *(.init)
 .init          0x000000000040058c       0x38 /usr/lib/crti.o
                0x000000000040058c                _init
 .init          0x00000000004005c4       0x30 /bin/../lib/gcc-lib/mips-linux-gnu/3.3.5/crtbegin.o
 .init          0x00000000004005f4       0x30 /bin/../lib/gcc-lib/mips-linux-gnu/3.3.5/crtend.o
 .init          0x0000000000400624       0x10 /usr/lib/crtn.o

.plt
 *(.plt)

.text           0x0000000000400640      0x460
                0x0000000000400640                _ftext = .
 *(.text .stub .text.* .gnu.linkonce.t.*)
 .text          0x0000000000400640       0x70 /usr/lib/crt1.o
                0x0000000000400640                __start
 .stub          0x00000000004006b0       0x10 /usr/lib/crt1.o
 .text          0x00000000004006c0       0x50 /usr/lib/crti.o
 .text          0x0000000000400710      0x190 /bin/../lib/gcc-lib/mips-linux-gnu/3.3.5/crtbegin.o
 .text          0x00000000004008a0       0x40 ./cc2XtIzO.o
                0x00000000004008a0                main
 .text          0x00000000004008e0      0x140 /usr/lib/libc_nonshared.a(elf-init.oS)
                0x000000000040097c                __libc_csu_fini
                0x00000000004008e0                __libc_csu_init
 .text          0x0000000000400a20       0x80 /bin/../lib/gcc-lib/mips-linux-gnu/3.3.5/crtend.o
 *(.gnu.warning)
 *(.mips16.fn.*)
 *(.mips16.call.*)

.fini           0x0000000000400aa0       0x58
 *(.fini)
 .fini          0x0000000000400aa0       0x18 /usr/lib/crti.o
                0x0000000000400aa0                _fini
 .fini          0x0000000000400ab8       0x30 /bin/../lib/gcc-lib/mips-linux-gnu/3.3.5/crtbegin.o
 .fini          0x0000000000400ae8       0x10 /usr/lib/crtn.o
                0x0000000000400af8                PROVIDE (__etext, .)
                0x0000000000400af8                PROVIDE (_etext, .)
                0x0000000000400af8                PROVIDE (etext, .)

.rodata         0x0000000000400b00       0x20
 *(.rodata .rodata.* .gnu.linkonce.r.*)
 .rodata        0x0000000000400b00       0x10 /usr/lib/crt1.o
                0x0000000000400b00                _IO_stdin_used
 .rodata        0x0000000000400b10       0x10 ./cc2XtIzO.o

.rodata1
 *(.rodata1)

.sdata2
 *(.sdata2 .sdata2.* .gnu.linkonce.s2.*)

.sbss2
 *(.sbss2 .sbss2.* .gnu.linkonce.sb2.*)

.eh_frame_hdr
 *(.eh_frame_hdr)
                0x0000000010000000                . = 0x10000000
                0x0000000010000000                . = ALIGN (0x4)
                0x0000000010000000                PROVIDE (__preinit_array_start, .)

.preinit_array
 *(.preinit_array)
                0x0000000010000000                PROVIDE (__preinit_array_end, .)
                0x0000000010000000                PROVIDE (__init_array_start, .)

.init_array
 *(.init_array)
                0x0000000010000000                PROVIDE (__init_array_end, .)
                0x0000000010000000                PROVIDE (__fini_array_start, .)

.fini_array
 *(.fini_array)
                0x0000000010000000                PROVIDE (__fini_array_end, .)

.data           0x0000000010000000       0x20
                0x0000000010000000                _fdata = .
 *(.data .data.* .gnu.linkonce.d.*)
 .data          0x0000000010000000       0x10 /usr/lib/crt1.o
                0x0000000010000000                data_start
                0x0000000010000000                __data_start
 .data          0x0000000010000010       0x10 /bin/../lib/gcc-lib/mips-linux-gnu/3.3.5/crtbegin.o
                0x0000000010000010                __dso_handle

.rld_map        0x0000000010000020        0x4
 .rld_map       0x0000000010000020        0x4 /usr/lib/crt1.o
                0x0000000010000020                __RLD_MAP

.data1
 *(.data1)

.tdata
 *(.tdata .tdata.* .gnu.linkonce.td.*)

.tbss
 *(.tbss .tbss.* .gnu.linkonce.tb.*)
 *(.tcommon)

.eh_frame       0x0000000010000024        0x4
 *(.eh_frame)
 .eh_frame      0x0000000010000024        0x4 /bin/../lib/gcc-lib/mips-linux-gnu/3.3.5/crtend.o

.gcc_except_table
 *(.gcc_except_table)

.ctors          0x0000000010000028        0x8
 *crtbegin*.o(.ctors)
 *(EXCLUDE_FILE(*crtend*.o) .ctors)
 .ctors         0x0000000010000028        0x4 /bin/../lib/gcc-lib/mips-linux-gnu/3.3.5/crtbegin.o
 *(SORT(.ctors.*))
 *(.ctors)
 .ctors         0x000000001000002c        0x4 /bin/../lib/gcc-lib/mips-linux-gnu/3.3.5/crtend.o

.dtors          0x0000000010000030        0x8
 *crtbegin*.o(.dtors)
 *(EXCLUDE_FILE(*crtend*.o) .dtors)
 .dtors         0x0000000010000030        0x4 /bin/../lib/gcc-lib/mips-linux-gnu/3.3.5/crtbegin.o
 *(SORT(.dtors.*))
 *(.dtors)
 .dtors         0x0000000010000034        0x4 /bin/../lib/gcc-lib/mips-linux-gnu/3.3.5/crtend.o

.jcr            0x0000000010000038        0x4
 *(.jcr)
 .jcr           0x0000000010000038        0x4 /bin/../lib/gcc-lib/mips-linux-gnu/3.3.5/crtend.o
                0x0000000010008030                _gp = (ALIGN (0x10) + 0x7ff0)

.got            0x0000000010000040       0x58
 *(.got.plt)
 *(.got)
 .got           0x0000000010000040       0x58 /usr/lib/crt1.o
                0x0000000010000040                _GLOBAL_OFFSET_TABLE_

.sdata
 *(.sdata .sdata.* .gnu.linkonce.s.*)

.lit8
 *(.lit8)

.lit4
 *(.lit4)
                0x0000000010000098                _edata = .
                0x0000000010000098                PROVIDE (edata, .)
                0x0000000010000098                __bss_start = .
                0x0000000010000098                _fbss = .

.sbss           0x0000000010000098        0x0
                0x0000000010000098                PROVIDE (__sbss_start, .)
                0x0000000010000098                PROVIDE (___sbss_start, .)
 *(.dynsbss)
 *(.sbss .sbss.* .gnu.linkonce.sb.*)
 *(.scommon)
                0x0000000010000098                PROVIDE (__sbss_end, .)
                0x0000000010000098                PROVIDE (___sbss_end, .)

.bss            0x00000000100000a0       0x20
 *(.dynbss)
 *(.bss .bss.* .gnu.linkonce.b.*)
 .bss           0x00000000100000a0       0x20 /bin/../lib/gcc-lib/mips-linux-gnu/3.3.5/crtbegin.o
 *(COMMON)
                0x00000000100000c0                . = ALIGN (0x4)
                0x00000000100000c0                . = ALIGN (0x4)
                0x00000000100000c0                _end = .
                0x00000000100000c0                PROVIDE (end, .)

.stab
 *(.stab)

.stabstr
 *(.stabstr)

.stab.excl
 *(.stab.excl)

.stab.exclstr
 *(.stab.exclstr)

.stab.index
 *(.stab.index)

.stab.indexstr
 *(.stab.indexstr)

.comment        0x0000000000000000       0xe4
 *(.comment)
 .comment       0x0000000000000000       0x23 /usr/lib/crt1.o
 .comment       0x0000000000000023       0x23 /usr/lib/crti.o
 .comment       0x0000000000000046       0x23 /bin/../lib/gcc-lib/mips-linux-gnu/3.3.5/crtbegin.o
 .comment       0x0000000000000069       0x12 ./cc2XtIzO.o
 .comment       0x000000000000007b       0x23 /usr/lib/libc_nonshared.a(elf-init.oS)
 .comment       0x000000000000009e       0x23 /bin/../lib/gcc-lib/mips-linux-gnu/3.3.5/crtend.o
 .comment       0x00000000000000c1       0x23 /usr/lib/crtn.o

.debug
 *(.debug)

.line
 *(.line)

.debug_srcinfo
 *(.debug_srcinfo)

.debug_sfnames
 *(.debug_sfnames)

.debug_aranges  0x0000000000000000       0x98
 *(.debug_aranges)
 .debug_aranges
                0x0000000000000000       0x20 /usr/lib/crt1.o
 .debug_aranges
                0x0000000000000020       0x30 /usr/lib/crti.o
 .debug_aranges
                0x0000000000000050       0x20 /usr/lib/libc_nonshared.a(elf-init.oS)
 .debug_aranges
                0x0000000000000070       0x28 /usr/lib/crtn.o

.debug_pubnames
                0x0000000000000000       0x5f
 *(.debug_pubnames)
 .debug_pubnames
                0x0000000000000000       0x25 /usr/lib/crt1.o
 .debug_pubnames
                0x0000000000000025       0x3a /usr/lib/libc_nonshared.a(elf-init.oS)

.debug_info     0x0000000000000000      0xb5a
 *(.debug_info .gnu.linkonce.wi.*)
 .debug_info    0x0000000000000000      0x95b /usr/lib/crt1.o
 .debug_info    0x000000000000095b       0x73 /usr/lib/crti.o
 .debug_info    0x00000000000009ce      0x119 /usr/lib/libc_nonshared.a(elf-init.oS)
 .debug_info    0x0000000000000ae7       0x73 /usr/lib/crtn.o

.debug_abbrev   0x0000000000000000      0x1ec
 *(.debug_abbrev)
 .debug_abbrev  0x0000000000000000      0x118 /usr/lib/crt1.o
 .debug_abbrev  0x0000000000000118       0x10 /usr/lib/crti.o
 .debug_abbrev  0x0000000000000128       0xb4 /usr/lib/libc_nonshared.a(elf-init.oS)
 .debug_abbrev  0x00000000000001dc       0x10 /usr/lib/crtn.o

.debug_line     /bin/../lib/gcc-lib/mips-linux-gnu/3.3.5/../../../../mips-linux-gnu/bin/ld: link errors found, deleting executable `a.out'
0x0000000000000000      0x38d
 *(.debug_line)
 .debug_line    0x0000000000000000      0x17e /usr/lib/crt1.o
 .debug_line    0x000000000000017e       0xaf /usr/lib/crti.o
 .debug_line    0x000000000000022d       0xd1 /usr/lib/libc_nonshared.a(elf-init.oS)
 .debug_line    0x00000000000002fe       0x8f /usr/lib/crtn.o

.debug_frame    0x0000000000000000       0x54
 *(.debug_frame)
 .debug_frame   0x0000000000000000       0x54 /usr/lib/libc_nonshared.a(elf-init.oS)

.debug_str      0x0000000000000000      0x712
 *(.debug_str)
 .debug_str     0x0000000000000000      0x690 /usr/lib/crt1.o
                                        0x6d7 (size before relaxing)
 .debug_str     0x0000000000000690       0x82 /usr/lib/libc_nonshared.a(elf-init.oS)
                                         0xe2 (size before relaxing)

.debug_loc
 *(.debug_loc)

.debug_macinfo
 *(.debug_macinfo)

.debug_weaknames
 *(.debug_weaknames)

.debug_funcnames
 *(.debug_funcnames)

.debug_typenames
 *(.debug_typenames)

.debug_varnames
 *(.debug_varnames)

.gptab.sdata
 *(.gptab.data)
 *(.gptab.sdata)

.gptab.sbss
 *(.gptab.bss)
 *(.gptab.sbss)
OUTPUT(a.out elf32-tradbigmips)

.pdr            0x0000000000000000       0x60
 .pdr           0x0000000000000000       0x20 ./cc2XtIzO.o
 .pdr           0x0000000000000020       0x40 /usr/lib/libc_nonshared.a(elf-init.oS)

.mdebug.abi32   0x0000000000000000        0x0
collect2: ld returned 1 exit status

--=-ts/afQCHMsiboRljnl2a--


From jsun@junsun.net Mon Apr 18 22:20:38 2005
Received: with ECARTIS (v1.0.0; list linux-mips); Mon, 18 Apr 2005 22:20:54 +0100 (BST)
Received: from sccrmhc14.comcast.net ([IPv6:::ffff:204.127.202.59]:58314 "EHLO
	sccrmhc14.comcast.net") by linux-mips.org with ESMTP
	id <S8225745AbVDRVUi>; Mon, 18 Apr 2005 22:20:38 +0100
Received: from gw.junsun.net (c-24-6-106-170.hsd1.ca.comcast.net[24.6.106.170])
          by comcast.net (sccrmhc14) with ESMTP
          id <2005041821202601400h3dnpe>; Mon, 18 Apr 2005 21:20:26 +0000
Received: from gw.junsun.net (gw.junsun.net [127.0.0.1])
	by gw.junsun.net (8.13.1/8.13.1) with ESMTP id j3ILKNWm013009;
	Mon, 18 Apr 2005 14:20:23 -0700
Received: (from jsun@localhost)
	by gw.junsun.net (8.13.1/8.13.1/Submit) id j3ILKLII013008;
	Mon, 18 Apr 2005 14:20:21 -0700
Date:	Mon, 18 Apr 2005 14:20:21 -0700
From:	Jun Sun <jsun@junsun.net>
To:	Pavel Kiryukhin <vksavl@cityline.ru>
Cc:	linux-mips@linux-mips.org, Manish Lachwani <mlachwani@mvista.com>
Subject: Re: Preemption in do_cpu      (Re: [PATCH]Preemption patch for 2.6)
Message-ID: <20050418212021.GA12996@gw.junsun.net>
References: <1098468403.4266.42.camel@prometheus.mvista.com> <1807918959.20050418133246@cityline.ru>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <1807918959.20050418133246@cityline.ru>
User-Agent: Mutt/1.4.1i
Return-Path: <jsun@junsun.net>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 7754
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: jsun@junsun.net
Precedence: bulk
X-list: linux-mips
Content-Length: 1012
Lines: 33

On Mon, Apr 18, 2005 at 01:32:46PM +0400, Pavel Kiryukhin wrote:
> Hi,
> the preempt_disable/preempt_enable sequence in do_cpu() [traps.c]
> exists quite long (patch submitted in Oct. 2004), so it should be nothing
> wrong there.
> 
> Can somebody please comment why use of preempt_disable/enable in do_cpu
> will not result in "scheduling while atomic" for fpu-less cpu (with enabled
> preemption).
> 
> The sequence looks like
> 
> do_cpu()
> | preempt_disable()
> | fpu_emulator_cop1Handler()
> | | cond_reshed()
> | | | schedule()  <------ scheduling while atomic
> 
> 
> The proposed patch was tested for Sibyte, but it has fpu (AFAIK) and has no
> fpu_emulator_cop1Handler called.
>

fpu_emulator maintains global variables and in general is dangerous
to be preempted in the middle of processing.

The quick fix for this problem is probably to move preemption disabling/
enabling inside fpu_emulator_cop1Handler().

Better fix is probably to modify fpu emulator so that it is preemption
safe overall.

Jun

From mlachwani@mvista.com Mon Apr 18 22:35:23 2005
Received: with ECARTIS (v1.0.0; list linux-mips); Mon, 18 Apr 2005 22:35:38 +0100 (BST)
Received: from gateway-1237.mvista.com ([IPv6:::ffff:12.44.186.158]:56826 "EHLO
	hermes.mvista.com") by linux-mips.org with ESMTP
	id <S8225746AbVDRVfX>; Mon, 18 Apr 2005 22:35:23 +0100
Received: from mvista.com (prometheus.mvista.com [10.0.0.139])
	by hermes.mvista.com (Postfix) with ESMTP
	id DDDE218C23; Mon, 18 Apr 2005 14:35:16 -0700 (PDT)
Message-ID: <42642814.8040701@mvista.com>
Date:	Mon, 18 Apr 2005 14:35:16 -0700
From:	Manish Lachwani <mlachwani@mvista.com>
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4.2) Gecko/20040308
X-Accept-Language: en-us, en
MIME-Version: 1.0
To:	Jun Sun <jsun@junsun.net>
Cc:	Pavel Kiryukhin <vksavl@cityline.ru>, linux-mips@linux-mips.org
Subject: Re: Preemption in do_cpu      (Re: [PATCH]Preemption patch for 2.6)
References: <1098468403.4266.42.camel@prometheus.mvista.com> <1807918959.20050418133246@cityline.ru> <20050418212021.GA12996@gw.junsun.net>
In-Reply-To: <20050418212021.GA12996@gw.junsun.net>
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
Return-Path: <mlachwani@mvista.com>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 7755
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: mlachwani@mvista.com
Precedence: bulk
X-list: linux-mips
Content-Length: 1291
Lines: 48

Jun Sun wrote:

>On Mon, Apr 18, 2005 at 01:32:46PM +0400, Pavel Kiryukhin wrote:
>  
>
>>Hi,
>>the preempt_disable/preempt_enable sequence in do_cpu() [traps.c]
>>exists quite long (patch submitted in Oct. 2004), so it should be nothing
>>wrong there.
>>
>>Can somebody please comment why use of preempt_disable/enable in do_cpu
>>will not result in "scheduling while atomic" for fpu-less cpu (with enabled
>>preemption).
>>
>>The sequence looks like
>>
>>do_cpu()
>>| preempt_disable()
>>| fpu_emulator_cop1Handler()
>>| | cond_reshed()
>>| | | schedule()  <------ scheduling while atomic
>>
>>
>>The proposed patch was tested for Sibyte, but it has fpu (AFAIK) and has no
>>fpu_emulator_cop1Handler called.
>>
>>    
>>
>
>fpu_emulator maintains global variables and in general is dangerous
>to be preempted in the middle of processing.
>
>The quick fix for this problem is probably to move preemption disabling/
>enabling inside fpu_emulator_cop1Handler().
>
>Better fix is probably to modify fpu emulator so that it is preemption
>safe overall.
>
>Jun
>  
>
Missed this one ! I had a patch that enables preemption before the 
cond_resched and disables right after it. I forgot to send it to 
linux-mips though. But, I needed it to work on fpu-less CPU. My bad.

Thanks
Manish Lachwani


From wd@denx.de Tue Apr 19 00:17:43 2005
Received: with ECARTIS (v1.0.0; list linux-mips); Tue, 19 Apr 2005 00:17:59 +0100 (BST)
Received: from mailout02.sul.t-online.com ([IPv6:::ffff:194.25.134.17]:9395
	"EHLO mailout02.sul.t-online.com") by linux-mips.org with ESMTP
	id <S8225753AbVDRXRm>; Tue, 19 Apr 2005 00:17:42 +0100
Received: from fwd34.aul.t-online.de 
	by mailout02.sul.t-online.com with smtp 
	id 1DNfUn-0002Jh-00; Tue, 19 Apr 2005 01:17:37 +0200
Received: from denx.de (bpRcT8ZHYeoV+4PIzmI31n+ZYprjwvWwNcOr+Z-Y6jOc1Smtp84rcb@[84.150.101.52]) by fwd34.sul.t-online.de
	with esmtp id 1DNfUa-0tXbSy0; Tue, 19 Apr 2005 01:17:24 +0200
Received: from atlas.denx.de (atlas.denx.de [10.0.0.14])
	by denx.de (Postfix) with ESMTP
	id A3C0C42C64; Tue, 19 Apr 2005 01:17:23 +0200 (MEST)
Received: by atlas.denx.de (Postfix, from userid 15)
	id CFEAFC1519; Tue, 19 Apr 2005 01:17:22 +0200 (MEST)
Received: from atlas.denx.de (localhost [127.0.0.1])
	by atlas.denx.de (Postfix) with ESMTP
	id BAA0613D94A; Tue, 19 Apr 2005 01:17:22 +0200 (MEST)
To:	John Tully <tully@mikrotik.com>
Cc:	linux-mips@linux-mips.org, cordova@uninet.com.br
From:	Wolfgang Denk <wd@denx.de>
Subject: Re: Linux for RouterBoard532 - CPU MIPS32 4Kc - IDT 79RC32434. 
Mime-version: 1.0
Content-type: text/plain; charset=ISO-8859-1
Content-transfer-encoding: 8bit
In-reply-to: Your message of "Mon, 18 Apr 2005 17:54:05 +0300."
             <6.2.1.2.0.20050418174810.0382e410@frog.mt.lv> 
Date:	Tue, 19 Apr 2005 01:17:17 +0200
Message-Id: <20050418231722.CFEAFC1519@atlas.denx.de>
X-ID:	bpRcT8ZHYeoV+4PIzmI31n+ZYprjwvWwNcOr+Z-Y6jOc1Smtp84rcb@t-dialin.net
X-TOI-MSGID: d42a9de3-b727-4231-aa93-5a7d00f45f3e
Return-Path: <wd@denx.de>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 7756
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: wd@denx.de
Precedence: bulk
X-list: linux-mips
Content-Length: 1057
Lines: 26

In message <6.2.1.2.0.20050418174810.0382e410@frog.mt.lv> you wrote:
> I work for MikroTik and we make the RB500.  We are trying to add more 
> documentation to make it easy to do more things with Linux.  At the moment, 
> the CF image at least lets you quickly start on developing Linux 
> applications.  Allot of what you need can be figured out from the kernel 
> patch on the specs page for the RB500 at www.routerboard.com , but that is 
> not so much fun.  We will add more documentation on the NAND device and 
> such features.  So, please check the site and I can also write to this list 
> as we add more info.

Thanks. Just two more questions now:

* Are you working on a 2.6.x version ?

* Is the NAND flash support supposed to be working?  All  I  can  get
  from it is only error messages.

Best regards,

Wolfgang Denk

-- 
Software Engineering:  Embedded and Realtime Systems,  Embedded Linux
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd@denx.de
Anyone can count the seeds in an apple.
No one can count the apples in a seed.

From anemo@mba.ocn.ne.jp Tue Apr 19 02:24:42 2005
Received: with ECARTIS (v1.0.0; list linux-mips); Tue, 19 Apr 2005 02:24:58 +0100 (BST)
Received: from topsns.toshiba-tops.co.jp ([IPv6:::ffff:202.230.225.5]:8742
	"HELO topsns.toshiba-tops.co.jp") by linux-mips.org with SMTP
	id <S8225762AbVDSBYm>; Tue, 19 Apr 2005 02:24:42 +0100
Received: from inside-ms1.toshiba-tops.co.jp by topsns.toshiba-tops.co.jp
          via smtpd (for mail.linux-mips.org [62.254.210.162]) with SMTP; 19 Apr 2005 01:24:41 UT
Received: from topsms.toshiba-tops.co.jp (localhost.localdomain [127.0.0.1])
	by localhost.toshiba-tops.co.jp (Postfix) with ESMTP id 9D56C1F2BC;
	Tue, 19 Apr 2005 10:24:38 +0900 (JST)
Received: from srd2sd.toshiba-tops.co.jp (gw-chiba7.toshiba-tops.co.jp [172.17.244.27])
	by topsms.toshiba-tops.co.jp (Postfix) with ESMTP id 8884E1D1CC;
	Tue, 19 Apr 2005 10:24:38 +0900 (JST)
Received: from localhost (fragile [172.17.28.65])
	by srd2sd.toshiba-tops.co.jp (8.12.10/8.12.10) with ESMTP id j3J1Ob9c092303;
	Tue, 19 Apr 2005 10:24:37 +0900 (JST)
	(envelope-from anemo@mba.ocn.ne.jp)
Date:	Tue, 19 Apr 2005 10:24:37 +0900 (JST)
Message-Id: <20050419.102437.78704892.nemoto@toshiba-tops.co.jp>
To:	jsun@junsun.net
Cc:	vksavl@cityline.ru, linux-mips@linux-mips.org, mlachwani@mvista.com
Subject: Re: Preemption in do_cpu
From:	Atsushi Nemoto <anemo@mba.ocn.ne.jp>
In-Reply-To: <20050418212021.GA12996@gw.junsun.net>
References: <1098468403.4266.42.camel@prometheus.mvista.com>
	<1807918959.20050418133246@cityline.ru>
	<20050418212021.GA12996@gw.junsun.net>
X-Fingerprint: 6ACA 1623 39BD 9A94 9B1A  B746 CA77 FE94 2874 D52F
X-Pgp-Public-Key: http://wwwkeys.pgp.net/pks/lookup?op=get&search=0x2874D52F
X-Mailer: Mew version 3.3 on Emacs 21.3 / Mule 5.0 (SAKAKI)
Mime-Version: 1.0
Content-Type: Text/Plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Return-Path: <anemo@mba.ocn.ne.jp>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 7757
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: anemo@mba.ocn.ne.jp
Precedence: bulk
X-list: linux-mips
Content-Length: 746
Lines: 20

>>>>> On Mon, 18 Apr 2005 14:20:21 -0700, Jun Sun <jsun@junsun.net> said:
jsun> fpu_emulator maintains global variables and in general is
jsun> dangerous to be preempted in the middle of processing.

jsun> The quick fix for this problem is probably to move preemption
jsun> disabling/ enabling inside fpu_emulator_cop1Handler().

Also, get_user/put_user should not be used with preempt disabled.

Here is Quick and dirty workaround (including some other preemption fixes):

http://www.linux-mips.org/cgi-bin/mesg.cgi?a=linux-mips&i=20041025.003619.92586674.anemo%40mba.ocn.ne.jp

jsun> Better fix is probably to modify fpu emulator so that it is
jsun> preemption safe overall.

Sure.  It will make fpu emulator SMP safe also.

---
Atsushi Nemoto

From tully@mikrotik.com Tue Apr 19 09:36:19 2005
Received: with ECARTIS (v1.0.0; list linux-mips); Tue, 19 Apr 2005 09:36:35 +0100 (BST)
Received: from frog.mt.lv ([IPv6:::ffff:159.148.172.197]:48326 "EHLO
	frog.mt.lv") by linux-mips.org with ESMTP id <S8225799AbVDSIgT>;
	Tue, 19 Apr 2005 09:36:19 +0100
Received: from [10.5.17.206] (helo=your-lnsz0iqs6f.mikrotik.com)
	by frog.mt.lv with esmtp (Exim 4.44)
	id 1DNoIH-0005FH-Rs
	for linux-mips@linux-mips.org; Tue, 19 Apr 2005 11:41:18 +0300
Message-Id: <6.2.1.2.0.20050419113317.026ad010@frog.mt.lv>
X-Mailer: QUALCOMM Windows Eudora Version 6.2.1.2
Date:	Tue, 19 Apr 2005 11:35:28 +0300
To:	linux-mips@linux-mips.org
From:	John Tully <tully@mikrotik.com>
Subject: Re: Linux for RouterBoard532 - CPU MIPS32 4Kc - IDT 79RC32434.
In-Reply-To: <20050418231722.CFEAFC1519@atlas.denx.de>
References: <Your message of "Mon, 18 Apr 2005 17:54:05 +0300." <6.2.1.2.0.20050418174810.0382e410@frog.mt.lv>
 <20050418231722.CFEAFC1519@atlas.denx.de>
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"; format=flowed
Return-Path: <tully@mikrotik.com>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 7758
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: tully@mikrotik.com
Precedence: bulk
X-list: linux-mips
Content-Length: 1280
Lines: 38

At 02:17 AM 4/19/2005, Wolfgang Denk wrote:
>In message <6.2.1.2.0.20050418174810.0382e410@frog.mt.lv> you wrote:
> > I work for MikroTik and we make the RB500.  We are trying to add more
> > documentation to make it easy to do more things with Linux.  At the 
> moment,
> > the CF image at least lets you quickly start on developing Linux
> > applications.  Allot of what you need can be figured out from the kernel
> > patch on the specs page for the RB500 at www.routerboard.com , but that is
> > not so much fun.  We will add more documentation on the NAND device and
> > such features.  So, please check the site and I can also write to this 
> list
> > as we add more info.
>
>Thanks. Just two more questions now:
>
>* Are you working on a 2.6.x version ?

No, maybe you would like to work on that.

>* Is the NAND flash support supposed to be working?  All  I  can  get
>   from it is only error messages.

Yes, it works.  I will try to organize some more docs on this in a week or so.

John
www.mikrotik.com


>Best regards,
>
>Wolfgang Denk
>
>--
>Software Engineering:  Embedded and Realtime Systems,  Embedded Linux
>Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd@denx.de
>Anyone can count the seeds in an apple.
>No one can count the apples in a seed.


From macro@linux-mips.org Tue Apr 19 12:16:10 2005
Received: with ECARTIS (v1.0.0; list linux-mips); Tue, 19 Apr 2005 12:16:26 +0100 (BST)
Received: from pollux.ds.pg.gda.pl ([IPv6:::ffff:153.19.208.7]:24334 "EHLO
	pollux.ds.pg.gda.pl") by linux-mips.org with ESMTP
	id <S8225845AbVDSLQK>; Tue, 19 Apr 2005 12:16:10 +0100
Received: from localhost (localhost [127.0.0.1])
	by pollux.ds.pg.gda.pl (Postfix) with ESMTP
	id 488D6F597E; Tue, 19 Apr 2005 13:16:00 +0200 (CEST)
Received: from pollux.ds.pg.gda.pl ([127.0.0.1])
 by localhost (pollux [127.0.0.1]) (amavisd-new, port 10024) with ESMTP
 id 02129-02; Tue, 19 Apr 2005 13:16:00 +0200 (CEST)
Received: from piorun.ds.pg.gda.pl (piorun.ds.pg.gda.pl [153.19.208.8])
	by pollux.ds.pg.gda.pl (Postfix) with ESMTP
	id 8FD0DE1C7A; Tue, 19 Apr 2005 13:15:59 +0200 (CEST)
Received: from blysk.ds.pg.gda.pl (macro@blysk.ds.pg.gda.pl [153.19.208.6])
	by piorun.ds.pg.gda.pl (8.13.1/8.13.1) with ESMTP id j3JBG04M016736;
	Tue, 19 Apr 2005 13:16:01 +0200
Date:	Tue, 19 Apr 2005 12:16:06 +0100 (BST)
From:	"Maciej W. Rozycki" <macro@linux-mips.org>
To:	Alex Gonzalez <alex.gonzalez@packetvision.com>
Cc:	linux-mips@linux-mips.org
Subject: Re: Building native binutils/gcc/glibc
In-Reply-To: <1113843806.4266.20.camel@euskadi.packetvision>
Message-ID: <Pine.LNX.4.61L.0504191214580.14774@blysk.ds.pg.gda.pl>
References: <1113843806.4266.20.camel@euskadi.packetvision>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Virus-Scanned: ClamAV 0.83/840/Tue Apr 19 03:42:09 2005 on piorun.ds.pg.gda.pl
X-Virus-Status:	Clean
X-Virus-Scanned: by amavisd-new at pollux.ds.pg.gda.pl
Return-Path: <macro@linux-mips.org>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 7759
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: macro@linux-mips.org
Precedence: bulk
X-list: linux-mips
Content-Length: 476
Lines: 16

On Mon, 18 Apr 2005, Alex Gonzalez wrote:

> I am trying to cross compile native binutils/gcc and glibc to be able to
> build on the target, using:
> 
> binutils 2.14
> gcc 3.3.5
> glibc 2.3.5
[...]
> /bin/../lib/gcc-lib/mips-linux-gnu/3.3.5/../../../../mips-linux-gnu/bin/ld: ./ccYlX6Ij.o: linking abicalls files with non-abicalls files
> Bad value: failed to merge target specific data of file ./ccYlX6Ij.o
> collect2: ld returned 1 exit status

 Update binutils.

  Maciej

From greg.weeks@timesys.com Tue Apr 19 15:42:27 2005
Received: with ECARTIS (v1.0.0; list linux-mips); Tue, 19 Apr 2005 15:42:43 +0100 (BST)
Received: from mail.timesys.com ([IPv6:::ffff:65.117.135.102]:13253 "EHLO
	exchange.timesys.com") by linux-mips.org with ESMTP
	id <S8226066AbVDSOm1>; Tue, 19 Apr 2005 15:42:27 +0100
Received: from [192.168.2.27] ([192.168.2.27]) by exchange.timesys.com with Microsoft SMTPSVC(5.0.2195.6713);
	 Tue, 19 Apr 2005 10:37:42 -0400
Message-ID: <426518D0.5080506@timesys.com>
Date:	Tue, 19 Apr 2005 10:42:24 -0400
From:	Greg Weeks <greg.weeks@timesys.com>
User-Agent: Mozilla Thunderbird 1.0 (X11/20041206)
X-Accept-Language: en-us, en
MIME-Version: 1.0
To:	linux-mips@linux-mips.org
Subject: sysv ipc msg functions
Content-Type: multipart/mixed;
 boundary="------------080106050706080303090605"
X-OriginalArrivalTime: 19 Apr 2005 14:37:42.0031 (UTC) FILETIME=[57C3B9F0:01C544ED]
Return-Path: <greg.weeks@timesys.com>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 7760
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: greg.weeks@timesys.com
Precedence: bulk
X-list: linux-mips
Content-Length: 1873
Lines: 50

This is a multi-part message in MIME format.
--------------080106050706080303090605
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit

I needed this glibc patch to get the sysv ipc msgctl functions to work 
correctly. This looks a bit hackish to me, so I wanted to run it past 
everybody here before filing it with glibc.

Greg Weeks

--------------080106050706080303090605
Content-Type: text/x-patch;
 name="glibc-2.3.3-timesys-mips-msq.h.patch"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
 filename="glibc-2.3.3-timesys-mips-msq.h.patch"

--- glibc-2.3.3-200407050320/sysdeps/unix/sysv/linux/mips/bits/msq.h.orig	2005-04-19 09:04:15.000000000 -0400
+++ glibc-2.3.3-200407050320/sysdeps/unix/sysv/linux/mips/bits/msq.h	2005-04-19 09:22:21.000000000 -0400
@@ -38,9 +38,27 @@ typedef unsigned long int msglen_t;
 struct msqid_ds
 {
   struct ipc_perm msg_perm;	/* structure describing operation permission */
+#if __WORDSIZE == 32 && defined(__MIPSEB__)
+   unsigned long	__unused3;
+#endif
   __time_t msg_stime;		/* time of last msgsnd command */
+#if __WORDSIZE == 32 && defined(__MIPSEL__)
+   unsigned long	__unused3;
+#endif
+#if __WORDSIZE == 32 && defined(__MIPSEB__)
+  unsigned long	__unused4;
+#endif
   __time_t msg_rtime;		/* time of last msgrcv command */
+#if __WORDSIZE == 32 && defined(__MIPSEL__)
+  unsigned long	__unused4;
+#endif
+#if __WORDSIZE == 32 && defined(__MIPSEB__)
+  unsigned long	__unused5;
+#endif
   __time_t msg_ctime;		/* time of last change */
+#if __WORDSIZE == 32 && defined(__MIPSEL__)
+  unsigned long	__unused5;
+#endif
   unsigned long int __msg_cbytes; /* current number of bytes on queue */
   msgqnum_t msg_qnum;		/* number of messages currently on queue */
   msglen_t msg_qbytes;		/* max number of bytes allowed on queue */

--------------080106050706080303090605--

From sjhill@realitydiluted.com Tue Apr 19 15:51:52 2005
Received: with ECARTIS (v1.0.0; list linux-mips); Tue, 19 Apr 2005 15:52:07 +0100 (BST)
Received: from eth13.com-link.com ([IPv6:::ffff:208.242.241.164]:43426 "EHLO
	real.realitydiluted.com") by linux-mips.org with ESMTP
	id <S8226122AbVDSOvw>; Tue, 19 Apr 2005 15:51:52 +0100
Received: from sjhill by real.realitydiluted.com with local (Exim 4.50 #1 (Debian))
	id 1DNu4q-0000da-T3; Tue, 19 Apr 2005 09:51:48 -0500
Subject: Re: sysv ipc msg functions
In-Reply-To: <426518D0.5080506@timesys.com>
To:	Greg Weeks <greg.weeks@timesys.com>
Date:	Tue, 19 Apr 2005 09:51:48 -0500 (CDT)
CC:	linux-mips@linux-mips.org
X-Mailer: ELM [version 2.4ME+ PL100 (25)]
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Type: text/plain; charset=US-ASCII
Message-Id: <E1DNu4q-0000da-T3@real.realitydiluted.com>
From:	sjhill@realitydiluted.com
Return-Path: <sjhill@realitydiluted.com>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 7761
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: sjhill@realitydiluted.com
Precedence: bulk
X-list: linux-mips
Content-Length: 483
Lines: 11

[ Charset ISO-8859-1 unsupported, converting... ]
> I needed this glibc patch to get the sysv ipc msgctl functions to work 
> correctly. This looks a bit hackish to me, so I wanted to run it past 
> everybody here before filing it with glibc.
> 
Perhaps is ignorance on my part, but I thought the compiler would
handle the endianness with regards to the structure members. Did
you have problems with big and little endian such that you had to
do all of the ugly #ifdef'ing? 

-Steve

From greg.weeks@timesys.com Tue Apr 19 15:54:51 2005
Received: with ECARTIS (v1.0.0; list linux-mips); Tue, 19 Apr 2005 15:55:06 +0100 (BST)
Received: from mail.timesys.com ([IPv6:::ffff:65.117.135.102]:5838 "EHLO
	exchange.timesys.com") by linux-mips.org with ESMTP
	id <S8226122AbVDSOyv>; Tue, 19 Apr 2005 15:54:51 +0100
Received: from [192.168.2.27] ([192.168.2.27]) by exchange.timesys.com with Microsoft SMTPSVC(5.0.2195.6713);
	 Tue, 19 Apr 2005 10:50:06 -0400
Message-ID: <42651BB9.4050609@timesys.com>
Date:	Tue, 19 Apr 2005 10:54:49 -0400
From:	Greg Weeks <greg.weeks@timesys.com>
User-Agent: Mozilla Thunderbird 1.0 (X11/20041206)
X-Accept-Language: en-us, en
MIME-Version: 1.0
To:	sjhill@realitydiluted.com
CC:	linux-mips@linux-mips.org
Subject: Re: sysv ipc msg functions
References: <E1DNu4q-0000da-T3@real.realitydiluted.com>
In-Reply-To: <E1DNu4q-0000da-T3@real.realitydiluted.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-OriginalArrivalTime: 19 Apr 2005 14:50:06.0312 (UTC) FILETIME=[1363FE80:01C544EF]
Return-Path: <greg.weeks@timesys.com>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 7762
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: greg.weeks@timesys.com
Precedence: bulk
X-list: linux-mips
Content-Length: 648
Lines: 25

sjhill@realitydiluted.com wrote:

>[ Charset ISO-8859-1 unsupported, converting... ]
>  
>
>>I needed this glibc patch to get the sysv ipc msgctl functions to work 
>>correctly. This looks a bit hackish to me, so I wanted to run it past 
>>everybody here before filing it with glibc.
>>
>>    
>>
>Perhaps is ignorance on my part, but I thought the compiler would
>handle the endianness with regards to the structure members. Did
>you have problems with big and little endian such that you had to
>do all of the ugly #ifdef'ing? 
>  
>
yes. Take a look at the kernel structure it is mapping to.

in
asm-mips/msgbuf.h

struct msqid64_ds

Greg Weeks

From drow@nevyn.them.org Tue Apr 19 16:05:53 2005
Received: with ECARTIS (v1.0.0; list linux-mips); Tue, 19 Apr 2005 16:06:18 +0100 (BST)
Received: from nevyn.them.org ([IPv6:::ffff:66.93.172.17]:6597 "EHLO
	nevyn.them.org") by linux-mips.org with ESMTP id <S8226144AbVDSPFx>;
	Tue, 19 Apr 2005 16:05:53 +0100
Received: from drow by nevyn.them.org with local (Exim 4.50 #1 (Debian))
	id 1DNuIP-0007lP-Px; Tue, 19 Apr 2005 11:05:49 -0400
Date:	Tue, 19 Apr 2005 11:05:49 -0400
From:	Daniel Jacobowitz <dan@debian.org>
To:	Greg Weeks <greg.weeks@timesys.com>
Cc:	linux-mips@linux-mips.org
Subject: Re: sysv ipc msg functions
Message-ID: <20050419150549.GA29564@nevyn.them.org>
References: <426518D0.5080506@timesys.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <426518D0.5080506@timesys.com>
User-Agent: Mutt/1.5.8i
Return-Path: <drow@nevyn.them.org>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 7763
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: dan@debian.org
Precedence: bulk
X-list: linux-mips
Content-Length: 661
Lines: 17

On Tue, Apr 19, 2005 at 10:42:24AM -0400, Greg Weeks wrote:
> I needed this glibc patch to get the sysv ipc msgctl functions to work 
> correctly. This looks a bit hackish to me, so I wanted to run it past 
> everybody here before filing it with glibc.

What's your configuration?  Big or little endian, userland ABI, kernel
ABI.  Glibc version.  Kernel version.  What specific things don't work. 
Not even enough information here to make a guess.

You're updating the userspace msqid_ds to match the kernel's
msqid64_ds.  They're not normally the same type.  Rather, see
<linux/msg.h> for the type o32 generally uses.


-- 
Daniel Jacobowitz
CodeSourcery, LLC

From ths@networkno.de Tue Apr 19 16:16:53 2005
Received: with ECARTIS (v1.0.0; list linux-mips); Tue, 19 Apr 2005 16:17:08 +0100 (BST)
Received: from mx01.qsc.de ([IPv6:::ffff:213.148.129.14]:48848 "EHLO
	mx01.qsc.de") by linux-mips.org with ESMTP id <S8226148AbVDSPQx>;
	Tue, 19 Apr 2005 16:16:53 +0100
Received: from port-195-158-168-232.dynamic.qsc.de ([195.158.168.232] helo=hattusa.textio)
	by mx01.qsc.de with esmtp (Exim 3.35 #1)
	id 1DNuSx-0002ba-00; Tue, 19 Apr 2005 17:16:43 +0200
Received: from ths by hattusa.textio with local (Exim 4.50)
	id 1DNtpH-000479-L8; Tue, 19 Apr 2005 16:35:43 +0200
Date:	Tue, 19 Apr 2005 16:35:43 +0200
To:	Greg Weeks <greg.weeks@timesys.com>
Cc:	linux-mips@linux-mips.org
Subject: Re: sysv ipc msg functions
Message-ID: <20050419143543.GB3300@hattusa.textio>
References: <426518D0.5080506@timesys.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <426518D0.5080506@timesys.com>
User-Agent: Mutt/1.5.9i
From:	Thiemo Seufer <ths@networkno.de>
Return-Path: <ths@networkno.de>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 7764
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: ths@networkno.de
Precedence: bulk
X-list: linux-mips
Content-Length: 350
Lines: 11

Greg Weeks wrote:
> I needed this glibc patch to get the sysv ipc msgctl functions to work 
> correctly. This looks a bit hackish to me, so I wanted to run it past 
> everybody here before filing it with glibc.

The Debian glibc has a similiar patch, see
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=200215&archive=yes
for a discussion.


Thiemo

From drow@nevyn.them.org Tue Apr 19 16:23:16 2005
Received: with ECARTIS (v1.0.0; list linux-mips); Tue, 19 Apr 2005 16:23:33 +0100 (BST)
Received: from nevyn.them.org ([IPv6:::ffff:66.93.172.17]:1711 "EHLO
	nevyn.them.org") by linux-mips.org with ESMTP id <S8226155AbVDSPXQ>;
	Tue, 19 Apr 2005 16:23:16 +0100
Received: from drow by nevyn.them.org with local (Exim 4.50 #1 (Debian))
	id 1DNuZE-0007u8-De; Tue, 19 Apr 2005 11:23:12 -0400
Date:	Tue, 19 Apr 2005 11:23:12 -0400
From:	Daniel Jacobowitz <dan@debian.org>
To:	Thiemo Seufer <ths@networkno.de>
Cc:	Greg Weeks <greg.weeks@timesys.com>, linux-mips@linux-mips.org
Subject: Re: sysv ipc msg functions
Message-ID: <20050419152312.GA30205@nevyn.them.org>
References: <426518D0.5080506@timesys.com> <20050419143543.GB3300@hattusa.textio>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <20050419143543.GB3300@hattusa.textio>
User-Agent: Mutt/1.5.8i
Return-Path: <drow@nevyn.them.org>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 7765
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: dan@debian.org
Precedence: bulk
X-list: linux-mips
Content-Length: 639
Lines: 20

On Tue, Apr 19, 2005 at 04:35:43PM +0200, Thiemo Seufer wrote:
> Greg Weeks wrote:
> > I needed this glibc patch to get the sysv ipc msgctl functions to work 
> > correctly. This looks a bit hackish to me, so I wanted to run it past 
> > everybody here before filing it with glibc.
> 
> The Debian glibc has a similiar patch, see
> http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=200215&archive=yes
> for a discussion.

Last thing I see there was:

  Okay, I suggest you send this patch to Uli for libc and I'll prepare a
  patch for the kernel, will post here later.

Anything ever come of that?

-- 
Daniel Jacobowitz
CodeSourcery, LLC

From greg.weeks@timesys.com Tue Apr 19 16:52:15 2005
Received: with ECARTIS (v1.0.0; list linux-mips); Tue, 19 Apr 2005 16:52:30 +0100 (BST)
Received: from mail.timesys.com ([IPv6:::ffff:65.117.135.102]:60400 "EHLO
	exchange.timesys.com") by linux-mips.org with ESMTP
	id <S8226197AbVDSPwP>; Tue, 19 Apr 2005 16:52:15 +0100
Received: from [192.168.2.27] ([192.168.2.27]) by exchange.timesys.com with Microsoft SMTPSVC(5.0.2195.6713);
	 Tue, 19 Apr 2005 11:47:30 -0400
Message-ID: <4265292D.5040704@timesys.com>
Date:	Tue, 19 Apr 2005 11:52:13 -0400
From:	Greg Weeks <greg.weeks@timesys.com>
User-Agent: Mozilla Thunderbird 1.0 (X11/20041206)
X-Accept-Language: en-us, en
MIME-Version: 1.0
To:	Daniel Jacobowitz <dan@debian.org>
CC:	linux-mips@linux-mips.org
Subject: Re: sysv ipc msg functions
References: <426518D0.5080506@timesys.com> <20050419150549.GA29564@nevyn.them.org>
In-Reply-To: <20050419150549.GA29564@nevyn.them.org>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-OriginalArrivalTime: 19 Apr 2005 15:47:30.0109 (UTC) FILETIME=[180DB6D0:01C544F7]
Return-Path: <greg.weeks@timesys.com>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 7766
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: greg.weeks@timesys.com
Precedence: bulk
X-list: linux-mips
Content-Length: 890
Lines: 28

Daniel Jacobowitz wrote:

>On Tue, Apr 19, 2005 at 10:42:24AM -0400, Greg Weeks wrote:
>  
>
>>I needed this glibc patch to get the sysv ipc msgctl functions to work 
>>correctly. This looks a bit hackish to me, so I wanted to run it past 
>>everybody here before filing it with glibc.
>>    
>>
>
>What's your configuration?  Big or little endian, userland ABI, kernel
>ABI.  Glibc version.  Kernel version.  What specific things don't work. 
>Not even enough information here to make a guess.
>
>You're updating the userspace msqid_ds to match the kernel's
>msqid64_ds.  They're not normally the same type.  Rather, see
><linux/msg.h> for the type o32 generally uses.
>
>  
>

glibc-2.3.3-200407050320
2.6.11.7 kernel but it's the issue is the same on the 2.6.12-rc from cvs.
The board is a malta 4kc in LE mode.
If you want to see a failure the LTP msgctl/msgsnd tests fail.

Greg Weeks

From alex.gonzalez@packetvision.com Tue Apr 19 17:50:34 2005
Received: with ECARTIS (v1.0.0; list linux-mips); Tue, 19 Apr 2005 17:50:49 +0100 (BST)
Received: from smtp.uk.colt.net ([IPv6:::ffff:195.110.64.125]:30662 "EHLO
	smtp.uk.colt.net") by linux-mips.org with ESMTP id <S8226243AbVDSQue>;
	Tue, 19 Apr 2005 17:50:34 +0100
Received: from euskadi.packetvision (unknown [213.86.106.84])
	by smtp.uk.colt.net (Postfix) with ESMTP id 01819E7077
	for <linux-mips@linux-mips.org>; Tue, 19 Apr 2005 17:42:53 +0100 (BST)
Subject: Re: Building native binutils/gcc/glibc
From:	Alex Gonzalez <alex.gonzalez@packetvision.com>
To:	linux-mips@linux-mips.org
In-Reply-To: <Pine.LNX.4.61L.0504191214580.14774@blysk.ds.pg.gda.pl>
References: <1113843806.4266.20.camel@euskadi.packetvision>
	 <Pine.LNX.4.61L.0504191214580.14774@blysk.ds.pg.gda.pl>
Content-Type: text/plain
Message-Id: <1113929447.31725.1.camel@euskadi.packetvision>
Mime-Version: 1.0
X-Mailer: Ximian Evolution 1.4.5 (1.4.5-9) 
Date:	Tue, 19 Apr 2005 17:50:47 +0100
Content-Transfer-Encoding: 7bit
Return-Path: <alex.gonzalez@packetvision.com>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 7767
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: alex.gonzalez@packetvision.com
Precedence: bulk
X-list: linux-mips
Content-Length: 608
Lines: 22

Thanks a lot, binutils-2.15 worked.
Alex

On Tue, 2005-04-19 at 12:16, Maciej W. Rozycki wrote:
> On Mon, 18 Apr 2005, Alex Gonzalez wrote:
> 
> > I am trying to cross compile native binutils/gcc and glibc to be able to
> > build on the target, using:
> > 
> > binutils 2.14
> > gcc 3.3.5
> > glibc 2.3.5
> [...]
> > /bin/../lib/gcc-lib/mips-linux-gnu/3.3.5/../../../../mips-linux-gnu/bin/ld: ./ccYlX6Ij.o: linking abicalls files with non-abicalls files
> > Bad value: failed to merge target specific data of file ./ccYlX6Ij.o
> > collect2: ld returned 1 exit status
> 
>  Update binutils.
> 
>   Maciej
> 


From adi@hexapodia.org Tue Apr 19 19:33:09 2005
Received: with ECARTIS (v1.0.0; list linux-mips); Tue, 19 Apr 2005 19:33:26 +0100 (BST)
Received: from pirx.hexapodia.org ([IPv6:::ffff:199.199.212.25]:39994 "EHLO
	pirx.hexapodia.org") by linux-mips.org with ESMTP
	id <S8226312AbVDSSdJ>; Tue, 19 Apr 2005 19:33:09 +0100
Received: by pirx.hexapodia.org (Postfix, from userid 22448)
	id 14989402; Tue, 19 Apr 2005 11:33:00 -0700 (PDT)
Date:	Tue, 19 Apr 2005 11:32:59 -0700
From:	Andy Isaacson <adi@hexapodia.org>
To:	Henk <Henk.Vergonet@gmail.com>
Cc:	Waldemar Brodkorb <wbx@openbsd-geek.de>, linux-mips@linux-mips.org
Subject: Re: Porting mips based routers
Message-ID: <20050419183259.GA623@hexapodia.org>
References: <20050414210645.GB30585@god.dyndns.org> <20050415065558.GD25962@openbsd-geek.de> <20050418124809.GA27967@god.dyndns.org>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <20050418124809.GA27967@god.dyndns.org>
User-Agent: Mutt/1.4.1i
X-PGP-Fingerprint: 48 01 21 E2 D4 E4 68 D1  B8 DF 39 B2 AF A3 16 B9
X-PGP-Key-URL: http://web.hexapodia.org/~adi/pgp.txt
X-Domestic-Surveillance: money launder bomb tax evasion
Return-Path: <adi@hexapodia.org>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 7768
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: adi@hexapodia.org
Precedence: bulk
X-list: linux-mips
Content-Length: 2334
Lines: 58

On Mon, Apr 18, 2005 at 02:48:09PM +0200, Henk wrote:
> On Fri, Apr 15, 2005 at 08:55:58AM +0200, Waldemar Brodkorb wrote:
> > > I will try to see if I can get a list of 2.4 source files that need to
> > > be contributed back to linux-mips.org, with a quick initial proposal on
> > > how to migrate this to the 2.6 kernel tree.
> 
> See section 1.3 on the wiki page:
> http://openwrt.org/Kernel26Firmware
> Feel free to comment here on the list.

One comment:

# - Migrate: Should we cluster this with the sibyte stuf? Probably
# there's some shared code....

SiByte and the 47xx don't share anything significant beyond both being
MIPS, and both running CFE.  And people (including Ralf) actually have
SiByte hardware that they test on.  So not breaking SiByte would be a
good thing.

Because there's no technical connection between SiByte and 47xx I'd lean
towards leaving the SiByte stuff alone, and clean up the 47xx code on
its own.

> General comments on the WRT code:

The code is full of "Broadcom Proprietary" and "All Rights Reserved"
notices.  Does anyone have a clear written statement from Broadcom that
it's redistributable?  (If you're depending on the GPL release
requirements to justify relicensing, clear documentation of the chain of
release would be helpful.)

>  - We should probably make some abstraction/API of the so called Silicon
>   Backplane bus that broadcom defined. I see allot of drivers, even in
>   the mainline kernel (b44 ethernet driver) that use this.

The Silicon Backplane bus actually came from another company, it wasn't
defined by Broadcom; google knows all:
http://www.ocpip.org/socket/adoption/sonics

I think there are other OCP busses supported in the kernel; ISTR seeing
some PPC SoC from IBM that uses OCP... so perhaps this should be brought
up on l-k for general discussion.

But it's challenging to come up with a useful abstraction that covers
both the b44 scenario and the SoC scenario.

 - for b44, OCP is on the far side of the PCI bus, and is used only to
   access a single core (ethernet MAC).

 - for bcm947xx (and ppc SoC, I guess), OCP is the system bus, and is
   used to access everything from PCI to DRAM.

grep grep grep... Take a look at include/asm-ppc/ocp.h and
arch/ppc/platforms/*.c, it looks like the PowerPC people have already
done a bunch of work here.

-andy

From spam@god.dyndns.org Tue Apr 19 22:35:33 2005
Received: with ECARTIS (v1.0.0; list linux-mips); Tue, 19 Apr 2005 22:35:49 +0100 (BST)
Received: from god.demon.nl ([IPv6:::ffff:83.160.164.11]:17097 "EHLO
	god.dyndns.org") by linux-mips.org with ESMTP id <S8226333AbVDSVfd>;
	Tue, 19 Apr 2005 22:35:33 +0100
Received: by god.dyndns.org (Postfix, from userid 1005)
	id 029664EBE8; Tue, 19 Apr 2005 23:35:29 +0200 (CEST)
Date:	Tue, 19 Apr 2005 23:35:29 +0200
From:	Henk <Henk.Vergonet@gmail.com>
To:	Andy Isaacson <adi@hexapodia.org>
Cc:	linux-mips@linux-mips.org
Subject: Re: Porting mips based routers
Message-ID: <20050419213529.GA6447@god.dyndns.org>
References: <20050414210645.GB30585@god.dyndns.org> <20050415065558.GD25962@openbsd-geek.de> <20050418124809.GA27967@god.dyndns.org> <20050419183259.GA623@hexapodia.org>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <20050419183259.GA623@hexapodia.org>
User-Agent: Mutt/1.5.6i
Return-Path: <spam@god.dyndns.org>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 7769
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: Henk.Vergonet@gmail.com
Precedence: bulk
X-list: linux-mips
Content-Length: 2958
Lines: 76

On Tue, Apr 19, 2005 at 11:32:59AM -0700, Andy Isaacson wrote:
> On Mon, Apr 18, 2005 at 02:48:09PM +0200, Henk wrote:
> > 
> > See section 1.3 on the wiki page:
> > http://openwrt.org/Kernel26Firmware
> > Feel free to comment here on the list.
> 
> One comment:
> 
> # - Migrate: Should we cluster this with the sibyte stuf? Probably
> # there's some shared code....
> 
> SiByte and the 47xx don't share anything significant beyond both being
> MIPS, and both running CFE.  And people (including Ralf) actually have
> SiByte hardware that they test on.  So not breaking SiByte would be a
> good thing.
> 
> Because there's no technical connection between SiByte and 47xx I'd lean
> towards leaving the SiByte stuff alone, and clean up the 47xx code on
> its own.
> 
Point taken, we should have a seperate broadcom branch.
I will update this on the wiki.

> > General comments on the WRT code:
> 
> The code is full of "Broadcom Proprietary" and "All Rights Reserved"
> notices.  Does anyone have a clear written statement from Broadcom that
> it's redistributable?  (If you're depending on the GPL release
> requirements to justify relicensing, clear documentation of the chain of
> release would be helpful.)

Maybe we should create patch sets that will transform the original wrt
branch into 2.6 code.

Anyway I don't think broadcom is a criminal company, I think it is obliged
by law to comply with the requirements of the GPL ;)

> >  - We should probably make some abstraction/API of the so called Silicon
> >   Backplane bus that broadcom defined. I see allot of drivers, even in
> >   the mainline kernel (b44 ethernet driver) that use this.
> 
> The Silicon Backplane bus actually came from another company, it wasn't
> defined by Broadcom; google knows all:
> http://www.ocpip.org/socket/adoption/sonics
> 
> I think there are other OCP busses supported in the kernel; ISTR seeing
> some PPC SoC from IBM that uses OCP... so perhaps this should be brought
> up on l-k for general discussion.
> 
> But it's challenging to come up with a useful abstraction that covers
> both the b44 scenario and the SoC scenario.
> 
>  - for b44, OCP is on the far side of the PCI bus, and is used only to
>    access a single core (ethernet MAC).
> 
>  - for bcm947xx (and ppc SoC, I guess), OCP is the system bus, and is
>    used to access everything from PCI to DRAM.
> 
> grep grep grep... Take a look at include/asm-ppc/ocp.h and
> arch/ppc/platforms/*.c, it looks like the PowerPC people have already
> done a bunch of work here.
>
Also of interest may be the new SOC abstraction on the hh.org branch, see
http://handhelds.org/cgi-bin/cvsweb.cgi/linux/kernel26/Documentation/soc.txt

Thanks for your comments, greatly appreciated, I will update the OCP stuff
on the wiki.

The task seems a little more challenging than a week ago, anyway I will
focus on the boot code for a while so I can boot test kernels without
the need for reflashing...

regards,

Henk

From anemo@mba.ocn.ne.jp Wed Apr 20 08:53:26 2005
Received: with ECARTIS (v1.0.0; list linux-mips); Wed, 20 Apr 2005 08:53:42 +0100 (BST)
Received: from topsns.toshiba-tops.co.jp ([IPv6:::ffff:202.230.225.5]:21775
	"HELO topsns.toshiba-tops.co.jp") by linux-mips.org with SMTP
	id <S8226042AbVDTHx0>; Wed, 20 Apr 2005 08:53:26 +0100
Received: from inside-ms1.toshiba-tops.co.jp by topsns.toshiba-tops.co.jp
          via smtpd (for mail.linux-mips.org [62.254.210.162]) with SMTP; 20 Apr 2005 07:53:25 UT
Received: from topsms.toshiba-tops.co.jp (localhost.localdomain [127.0.0.1])
	by localhost.toshiba-tops.co.jp (Postfix) with ESMTP id A3B131F2CD;
	Wed, 20 Apr 2005 16:53:21 +0900 (JST)
Received: from srd2sd.toshiba-tops.co.jp (gw-chiba7.toshiba-tops.co.jp [172.17.244.27])
	by topsms.toshiba-tops.co.jp (Postfix) with ESMTP id 8F6E918E0C;
	Wed, 20 Apr 2005 16:53:21 +0900 (JST)
Received: from localhost (fragile [172.17.28.65])
	by srd2sd.toshiba-tops.co.jp (8.12.10/8.12.10) with ESMTP id j3K7rKoj004534;
	Wed, 20 Apr 2005 16:53:21 +0900 (JST)
	(envelope-from anemo@mba.ocn.ne.jp)
Date:	Wed, 20 Apr 2005 16:53:20 +0900 (JST)
Message-Id: <20050420.165320.42204293.nemoto@toshiba-tops.co.jp>
To:	linux-mips@linux-mips.org
Cc:	ralf@linux-mips.org
Subject: CFC1 instruction in compute_return_epc
From:	Atsushi Nemoto <anemo@mba.ocn.ne.jp>
X-Fingerprint: 6ACA 1623 39BD 9A94 9B1A  B746 CA77 FE94 2874 D52F
X-Pgp-Public-Key: http://wwwkeys.pgp.net/pks/lookup?op=get&search=0x2874D52F
X-Mailer: Mew version 3.3 on Emacs 21.3 / Mule 5.0 (SAKAKI)
Mime-Version: 1.0
Content-Type: Text/Plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Return-Path: <anemo@mba.ocn.ne.jp>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 7770
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: anemo@mba.ocn.ne.jp
Precedence: bulk
X-list: linux-mips
Content-Length: 1054
Lines: 37

The __compute_return_epc() uses CFC1 instruction but it might cause a
coprocessor unusable exception since the process can lose its fpu
context by preemption.  The coprocessor unusable exception is not
allowed in kernel context.

Here is a patch.  Please review.  Thank you.

--- linux-mips/arch/mips/kernel/branch.c	2004-08-14 19:55:32.000000000 +0900
+++ linux/arch/mips/kernel/branch.c	2005-04-20 16:33:24.662914765 +0900
@@ -12,6 +12,7 @@
 #include <asm/branch.h>
 #include <asm/cpu.h>
 #include <asm/cpu-features.h>
+#include <asm/fpu.h>
 #include <asm/inst.h>
 #include <asm/ptrace.h>
 #include <asm/uaccess.h>
@@ -163,8 +164,14 @@
 	case cop1_op:
 		if (!cpu_has_fpu)
 			fcr31 = current->thread.fpu.soft.fcr31;
-		else
-			asm volatile("cfc1\t%0,$31" : "=r" (fcr31));
+		else {
+			preempt_disable();
+			if (is_fpu_owner())
+				asm volatile("cfc1\t%0,$31" : "=r" (fcr31));
+			else
+				fcr31 = current->thread.fpu.hard.fcr31;
+			preempt_enable();
+		}
 		bit = (insn.i_format.rt >> 2);
 		bit += (bit != 0);
 		bit += 23;

---
Atsushi Nemoto

From anemo@mba.ocn.ne.jp Wed Apr 20 09:40:29 2005
Received: with ECARTIS (v1.0.0; list linux-mips); Wed, 20 Apr 2005 09:40:45 +0100 (BST)
Received: from topsns.toshiba-tops.co.jp ([IPv6:::ffff:202.230.225.5]:55300
	"HELO topsns.toshiba-tops.co.jp") by linux-mips.org with SMTP
	id <S8226045AbVDTIk3>; Wed, 20 Apr 2005 09:40:29 +0100
Received: from inside-ms1.toshiba-tops.co.jp by topsns.toshiba-tops.co.jp
          via smtpd (for mail.linux-mips.org [62.254.210.162]) with SMTP; 20 Apr 2005 08:40:26 UT
Received: from topsms.toshiba-tops.co.jp (localhost.localdomain [127.0.0.1])
	by localhost.toshiba-tops.co.jp (Postfix) with ESMTP id A03781F300;
	Wed, 20 Apr 2005 17:40:24 +0900 (JST)
Received: from srd2sd.toshiba-tops.co.jp (gw-chiba7.toshiba-tops.co.jp [172.17.244.27])
	by topsms.toshiba-tops.co.jp (Postfix) with ESMTP id 9475B1F22F;
	Wed, 20 Apr 2005 17:40:24 +0900 (JST)
Received: from localhost (fragile [172.17.28.65])
	by srd2sd.toshiba-tops.co.jp (8.12.10/8.12.10) with ESMTP id j3K8eNoj004741;
	Wed, 20 Apr 2005 17:40:24 +0900 (JST)
	(envelope-from anemo@mba.ocn.ne.jp)
Date:	Wed, 20 Apr 2005 17:40:23 +0900 (JST)
Message-Id: <20050420.174023.113589096.nemoto@toshiba-tops.co.jp>
To:	linux-mips@linux-mips.org
Cc:	ralf@linux-mips.org
Subject: ieee754[sd]p_neg workaround
From:	Atsushi Nemoto <anemo@mba.ocn.ne.jp>
X-Fingerprint: 6ACA 1623 39BD 9A94 9B1A  B746 CA77 FE94 2874 D52F
X-Pgp-Public-Key: http://wwwkeys.pgp.net/pks/lookup?op=get&search=0x2874D52F
X-Mailer: Mew version 3.3 on Emacs 21.3 / Mule 5.0 (SAKAKI)
Mime-Version: 1.0
Content-Type: Text/Plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Return-Path: <anemo@mba.ocn.ne.jp>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 7771
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: anemo@mba.ocn.ne.jp
Precedence: bulk
X-list: linux-mips
Content-Length: 2540
Lines: 100

I have a long standing patch for FPU emulator to fix a segmentation
fault in pow() library function.

Here is a test program to reproduce it.

main()
{
	union {
		double d;
		struct {
#ifdef __MIPSEB
			unsigned int high, low;
#else
			unsigned int low, high;
#endif
		} i;
	} x, y, z;
        x.i.low = 0x00000000;
        x.i.high = 0xfff00001;
        y.i.low = 0x80000000;
        y.i.high = 0xcff00000;
        z.d = pow(x.d, y.d);
        printf("%x %x\n", z.i.high, z.i.low);
        return 0;
}


If you run this program, you will get segmentation fault (unless your
FPU does not raise Unimplemented exception for NaN operands).  The
segmentation fault is caused by endless recursion in __ieee754_pow().

It looks glibc's pow() assume unary '-' operation for any number
(including NaN) always invert its sign bit.

Here is a revised (just added a few comments) patch.  Please review.
Thank you.

diff -u linux-mips/arch/mips/math-emu/dp_simple.c linux/arch/mips/math-emu/dp_simple.c
--- linux-mips/arch/mips/math-emu/dp_simple.c	2005-01-31 11:05:18.000000000 +0900
+++ linux/arch/mips/math-emu/dp_simple.c	2005-04-20 17:02:02.613112541 +0900
@@ -48,16 +48,22 @@
 	CLEARCX;
 	FLUSHXDP;
 
+	/*
+	 * Invert the sign ALWAYS to prevent an endless recursion on
+	 * pow() in libc.
+	 */
+	/* quick fix up */
+	DPSIGN(x) ^= 1;
+
 	if (xc == IEEE754_CLASS_SNAN) {
+		ieee754dp y = ieee754dp_indef();
 		SETCX(IEEE754_INVALID_OPERATION);
-		return ieee754dp_nanxcpt(ieee754dp_indef(), "neg");
+		DPSIGN(y) = DPSIGN(x);
+		return ieee754dp_nanxcpt(y, "neg");
 	}
 
 	if (ieee754dp_isnan(x))	/* but not infinity */
 		return ieee754dp_nanxcpt(x, "neg", x);
-
-	/* quick fix up */
-	DPSIGN(x) ^= 1;
 	return x;
 }
 
diff -u linux-mips/arch/mips/math-emu/sp_simple.c linux/arch/mips/math-emu/sp_simple.c
--- linux-mips/arch/mips/math-emu/sp_simple.c	2005-01-31 11:05:18.000000000 +0900
+++ linux/arch/mips/math-emu/sp_simple.c	2005-04-20 17:02:13.678391113 +0900
@@ -48,16 +48,22 @@
 	CLEARCX;
 	FLUSHXSP;
 
+	/*
+	 * Invert the sign ALWAYS to prevent an endless recursion on
+	 * pow() in libc.
+	 */
+	/* quick fix up */
+	SPSIGN(x) ^= 1;
+
 	if (xc == IEEE754_CLASS_SNAN) {
+		ieee754sp y = ieee754sp_indef();
 		SETCX(IEEE754_INVALID_OPERATION);
-		return ieee754sp_nanxcpt(ieee754sp_indef(), "neg");
+		SPSIGN(y) = SPSIGN(x);
+		return ieee754sp_nanxcpt(y, "neg");
 	}
 
 	if (ieee754sp_isnan(x))	/* but not infinity */
 		return ieee754sp_nanxcpt(x, "neg", x);
-
-	/* quick fix up */
-	SPSIGN(x) ^= 1;
 	return x;
 }
 

---
Atsushi Nemoto

From ralf@linux-mips.org Wed Apr 20 11:27:40 2005
Received: with ECARTIS (v1.0.0; list linux-mips); Wed, 20 Apr 2005 11:28:00 +0100 (BST)
Received: from extgw-uk.mips.com ([IPv6:::ffff:62.254.210.129]:3594 "EHLO
	bacchus.net.dhis.org") by linux-mips.org with ESMTP
	id <S8226057AbVDTK1k>; Wed, 20 Apr 2005 11:27:40 +0100
Received: from dea.linux-mips.net (localhost.localdomain [127.0.0.1])
	by bacchus.net.dhis.org (8.13.1/8.13.1) with ESMTP id j3KARPrY009172;
	Wed, 20 Apr 2005 11:27:25 +0100
Received: (from ralf@localhost)
	by dea.linux-mips.net (8.13.1/8.13.1/Submit) id j3KARO7p009171;
	Wed, 20 Apr 2005 11:27:24 +0100
Date:	Wed, 20 Apr 2005 11:27:24 +0100
From:	Ralf Baechle <ralf@linux-mips.org>
To:	Andy Isaacson <adi@hexapodia.org>
Cc:	Henk <Henk.Vergonet@gmail.com>,
	Waldemar Brodkorb <wbx@openbsd-geek.de>,
	linux-mips@linux-mips.org
Subject: Re: Porting mips based routers
Message-ID: <20050420102724.GD5212@linux-mips.org>
References: <20050414210645.GB30585@god.dyndns.org> <20050415065558.GD25962@openbsd-geek.de> <20050418124809.GA27967@god.dyndns.org> <20050419183259.GA623@hexapodia.org>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <20050419183259.GA623@hexapodia.org>
User-Agent: Mutt/1.4.1i
Return-Path: <ralf@linux-mips.org>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 7772
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: ralf@linux-mips.org
Precedence: bulk
X-list: linux-mips
Content-Length: 1096
Lines: 28

On Tue, Apr 19, 2005 at 11:32:59AM -0700, Andy Isaacson wrote:

> > General comments on the WRT code:
> 
> The code is full of "Broadcom Proprietary" and "All Rights Reserved"
> notices.  Does anyone have a clear written statement from Broadcom that
> it's redistributable?  (If you're depending on the GPL release
> requirements to justify relicensing, clear documentation of the chain of
> release would be helpful.)

Broadcom's interpretation of these comments is that they don't contradict
the GPL.

> I think there are other OCP busses supported in the kernel; ISTR seeing
> some PPC SoC from IBM that uses OCP... so perhaps this should be brought
> up on l-k for general discussion.
> 
> But it's challenging to come up with a useful abstraction that covers
> both the b44 scenario and the SoC scenario.

OCP is basically ISA on steroids - no configuration space, no nothing so
there is not terribly much OCP code that could potencially be shared.
Right now we treat OCP devices such as on PMC-Sierra's RM9000 series as
platform devices.

I'm clearly less than impressed by OCP ...

  Ralf

From macro@linux-mips.org Wed Apr 20 13:23:08 2005
Received: with ECARTIS (v1.0.0; list linux-mips); Wed, 20 Apr 2005 13:23:23 +0100 (BST)
Received: from pollux.ds.pg.gda.pl ([IPv6:::ffff:153.19.208.7]:15879 "EHLO
	pollux.ds.pg.gda.pl") by linux-mips.org with ESMTP
	id <S8226086AbVDTMXI>; Wed, 20 Apr 2005 13:23:08 +0100
Received: from localhost (localhost [127.0.0.1])
	by pollux.ds.pg.gda.pl (Postfix) with ESMTP
	id BC789F59C0; Wed, 20 Apr 2005 14:23:02 +0200 (CEST)
Received: from pollux.ds.pg.gda.pl ([127.0.0.1])
 by localhost (pollux [127.0.0.1]) (amavisd-new, port 10024) with ESMTP
 id 14944-04; Wed, 20 Apr 2005 14:23:02 +0200 (CEST)
Received: from piorun.ds.pg.gda.pl (piorun.ds.pg.gda.pl [153.19.208.8])
	by pollux.ds.pg.gda.pl (Postfix) with ESMTP
	id 7CF98E1C92; Wed, 20 Apr 2005 14:23:02 +0200 (CEST)
Received: from blysk.ds.pg.gda.pl (macro@blysk.ds.pg.gda.pl [153.19.208.6])
	by piorun.ds.pg.gda.pl (8.13.1/8.13.1) with ESMTP id j3KCN4sW015386;
	Wed, 20 Apr 2005 14:23:05 +0200
Date:	Wed, 20 Apr 2005 13:23:11 +0100 (BST)
From:	"Maciej W. Rozycki" <macro@linux-mips.org>
To:	Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Cc:	linux-mips@linux-mips.org, ralf@linux-mips.org
Subject: Re: ieee754[sd]p_neg workaround
In-Reply-To: <20050420.174023.113589096.nemoto@toshiba-tops.co.jp>
Message-ID: <Pine.LNX.4.61L.0504201312520.7109@blysk.ds.pg.gda.pl>
References: <20050420.174023.113589096.nemoto@toshiba-tops.co.jp>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Virus-Scanned: ClamAV version 0.83, clamav-milter version 0.83 on piorun.ds.pg.gda.pl
X-Virus-Status:	Clean
X-Virus-Scanned: by amavisd-new at pollux.ds.pg.gda.pl
Return-Path: <macro@linux-mips.org>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 7773
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: macro@linux-mips.org
Precedence: bulk
X-list: linux-mips
Content-Length: 1177
Lines: 42

On Wed, 20 Apr 2005, Atsushi Nemoto wrote:

> I have a long standing patch for FPU emulator to fix a segmentation
> fault in pow() library function.
> 
> Here is a test program to reproduce it.
> 
> main()
> {
> 	union {
> 		double d;
> 		struct {
> #ifdef __MIPSEB
> 			unsigned int high, low;
> #else
> 			unsigned int low, high;
> #endif
> 		} i;
> 	} x, y, z;
>         x.i.low = 0x00000000;
>         x.i.high = 0xfff00001;
>         y.i.low = 0x80000000;
>         y.i.high = 0xcff00000;
>         z.d = pow(x.d, y.d);
>         printf("%x %x\n", z.i.high, z.i.low);
>         return 0;
> }
> 
> 
> If you run this program, you will get segmentation fault (unless your
> FPU does not raise Unimplemented exception for NaN operands).  The
> segmentation fault is caused by endless recursion in __ieee754_pow().
> 
> It looks glibc's pow() assume unary '-' operation for any number
> (including NaN) always invert its sign bit.

 AFAICS, the IEEE 754 standard explicitly leaves interpretation of the 
sign bit for NaNs as unspecified.  Therefore our implementation is correct 
and its glibc that should be fixed instead.  Please file a bug report 
against glibc.

  Maciej

From dom@mips.com Wed Apr 20 14:00:13 2005
Received: with ECARTIS (v1.0.0; list linux-mips); Wed, 20 Apr 2005 14:00:28 +0100 (BST)
Received: from alg145.algor.co.uk ([IPv6:::ffff:62.254.210.145]:53767 "EHLO
	dmz.algor.co.uk") by linux-mips.org with ESMTP id <S8226100AbVDTNAN> convert rfc822-to-8bit;
	Wed, 20 Apr 2005 14:00:13 +0100
Received: from alg158.algor.co.uk ([62.254.210.158] helo=olympia.mips.com)
	by dmz.algor.co.uk with esmtp (Exim 3.35 #1 (Debian))
	id 1DOEr1-0004ab-00; Wed, 20 Apr 2005 14:02:55 +0100
Received: from arsenal.mips.com ([192.168.192.197])
	by olympia.mips.com with esmtp (Exim 3.36 #1 (Debian))
	id 1DOElw-0004vY-00; Wed, 20 Apr 2005 13:57:40 +0100
Received: from dom by arsenal.mips.com with local (Exim 4.44)
	id 1DOElx-0001Sw-4b; Wed, 20 Apr 2005 13:57:41 +0100
From:	Dominic Sweetman <dom@mips.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: 8BIT
Message-ID: <16998.20933.14301.397793@arsenal.mips.com>
Date:	Wed, 20 Apr 2005 13:57:41 +0100
To:	"Maciej W. Rozycki" <macro@linux-mips.org>
Cc:	Atsushi Nemoto <anemo@mba.ocn.ne.jp>, linux-mips@linux-mips.org,
	ralf@linux-mips.org
Subject: Re: ieee754[sd]p_neg workaround
In-Reply-To: <Pine.LNX.4.61L.0504201312520.7109@blysk.ds.pg.gda.pl>
References: <20050420.174023.113589096.nemoto@toshiba-tops.co.jp>
	<Pine.LNX.4.61L.0504201312520.7109@blysk.ds.pg.gda.pl>
X-Mailer: VM 7.17 under 21.4 (patch 17) "Jumbo Shrimp" XEmacs Lucid
X-MTUK-Scanner:	Found to be clean
X-MTUK-SpamCheck: not spam (whitelisted), SpamAssassin (score=-4.835,
	required 4, AWL, BAYES_00)
Return-Path: <dom@mips.com>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 7774
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: dom@mips.com
Precedence: bulk
X-list: linux-mips
Content-Length: 2129
Lines: 68


Maciej W. Rozycki (macro@linux-mips.org) writes:

> > I have a long standing patch for FPU emulator to fix a segmentation
> > fault in pow() library function.
> > 
> > Here is a test program to reproduce it.
> > 
> > main()
> > {
> > 	union {
> > 		double d;
> > 		struct {
> > #ifdef __MIPSEB
> > 			unsigned int high, low;
> > #else
> > 			unsigned int low, high;
> > #endif
> > 		} i;
> > 	} x, y, z;
> >         x.i.low = 0x00000000;
> >         x.i.high = 0xfff00001;
> >         y.i.low = 0x80000000;
> >         y.i.high = 0xcff00000;
> >         z.d = pow(x.d, y.d);
> >         printf("%x %x\n", z.i.high, z.i.low);
> >         return 0;
> > }
> > 
> > 
> > If you run this program, you will get segmentation fault (unless your
> > FPU does not raise Unimplemented exception for NaN operands).  The
> > segmentation fault is caused by endless recursion in __ieee754_pow().
> > 
> > It looks glibc's pow() assume unary '-' operation for any number
> > (including NaN) always invert its sign bit.
> 
>  AFAICS, the IEEE 754 standard explicitly leaves interpretation of the 
> sign bit for NaNs as unspecified.  Therefore our implementation is correct 
> and its glibc that should be fixed instead.  Please file a bug report 
> against glibc.

You are both right, in a sense.

"Annex A Recommended Functions and Predicates" of IEEE754 (the
annexe is not part of the formal spec) includes a recommendation:

   "­x is x copied with its sign reversed, not 0­x; the distinction is
    germane when x is ±0 or NaN."

And in fact that's how the MIPS neg.d operation works: it never
generates an exception, just blindly flips the sign bit.

In the body of IEEE754 it says:

   "This standard does not interpret the sign of an NaN."

So there you are.  According to the book, the library function should
not depend on the sign of a NaN, but it would also be better if the
compiler/emulator/whatever ensures that "-x" is always and only
implemented by reversing the sign bit.

So file a bug against glibc, but we should fix the emulator so it
correctly imitates the MIPS instruction set...

--
Dominic Sweetman
MIPS Technologies.

From ralf@linux-mips.org Wed Apr 20 14:13:09 2005
Received: with ECARTIS (v1.0.0; list linux-mips); Wed, 20 Apr 2005 14:13:23 +0100 (BST)
Received: from extgw-uk.mips.com ([IPv6:::ffff:62.254.210.129]:22800 "EHLO
	bacchus.net.dhis.org") by linux-mips.org with ESMTP
	id <S8226106AbVDTNNJ>; Wed, 20 Apr 2005 14:13:09 +0100
Received: from dea.linux-mips.net (localhost.localdomain [127.0.0.1])
	by bacchus.net.dhis.org (8.13.1/8.13.1) with ESMTP id j3KDD5XV016057;
	Wed, 20 Apr 2005 14:13:05 +0100
Received: (from ralf@localhost)
	by dea.linux-mips.net (8.13.1/8.13.1/Submit) id j3KDD41l016056;
	Wed, 20 Apr 2005 14:13:04 +0100
Date:	Wed, 20 Apr 2005 14:13:04 +0100
From:	Ralf Baechle <ralf@linux-mips.org>
To:	Dominic Sweetman <dom@mips.com>
Cc:	"Maciej W. Rozycki" <macro@linux-mips.org>,
	Atsushi Nemoto <anemo@mba.ocn.ne.jp>, linux-mips@linux-mips.org
Subject: Re: ieee754[sd]p_neg workaround
Message-ID: <20050420131304.GF5212@linux-mips.org>
References: <20050420.174023.113589096.nemoto@toshiba-tops.co.jp> <Pine.LNX.4.61L.0504201312520.7109@blysk.ds.pg.gda.pl> <16998.20933.14301.397793@arsenal.mips.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <16998.20933.14301.397793@arsenal.mips.com>
User-Agent: Mutt/1.4.1i
Return-Path: <ralf@linux-mips.org>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 7775
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: ralf@linux-mips.org
Precedence: bulk
X-list: linux-mips
Content-Length: 327
Lines: 9

On Wed, Apr 20, 2005 at 01:57:41PM +0100, Dominic Sweetman wrote:

> So file a bug against glibc, but we should fix the emulator so it
> correctly imitates the MIPS instruction set...

As a matter of defensive design I think we should try to follow the
establish behaviour if nothing more specific is defined anywhere.

  Ralf

From clem.taylor@gmail.com Wed Apr 20 18:50:18 2005
Received: with ECARTIS (v1.0.0; list linux-mips); Wed, 20 Apr 2005 18:50:33 +0100 (BST)
Received: from wproxy.gmail.com ([IPv6:::ffff:64.233.184.201]:37057 "EHLO
	wproxy.gmail.com") by linux-mips.org with ESMTP id <S8224850AbVDTRuR> convert rfc822-to-8bit;
	Wed, 20 Apr 2005 18:50:17 +0100
Received: by wproxy.gmail.com with SMTP id 57so353884wri
        for <linux-mips@linux-mips.org>; Wed, 20 Apr 2005 10:50:11 -0700 (PDT)
DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws;
        s=beta; d=gmail.com;
        h=received:message-id:date:from:reply-to:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition;
        b=gCSxb683HoWwmCGfeE3ly8p1NeiISGcj9nHOFMJjWwzY4n1hNRph2Ko3zPbbBODOJJxd1mO5oBoNalMtI7YgHLYl3/Pg9VN8dma4R0RRqWpg3ZQEybVaQNEW5/N+09N1MRz7THoHtvK/0zH/j853ipZl/whoQ3aqEvjCYtMeylY=
Received: by 10.54.73.10 with SMTP id v10mr892528wra;
        Wed, 20 Apr 2005 10:50:10 -0700 (PDT)
Received: by 10.54.41.29 with HTTP; Wed, 20 Apr 2005 10:50:10 -0700 (PDT)
Message-ID: <ecb4efd10504201050a00f941@mail.gmail.com>
Date:	Wed, 20 Apr 2005 13:50:10 -0400
From:	Clem Taylor <clem.taylor@gmail.com>
Reply-To: Clem Taylor <clem.taylor@gmail.com>
To:	linux-mips@linux-mips.org
Subject: mdelay() from board_setup() [is default value for loops_per_jiffy way off?]
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8BIT
Content-Disposition: inline
Return-Path: <clem.taylor@gmail.com>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 7776
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: clem.taylor@gmail.com
Precedence: bulk
X-list: linux-mips
Content-Length: 612
Lines: 13

Hi,

I'm working on a linux port for a custom Au1550 based board. Inside of
board_setup() I need to wait for some hardware to power up. So, I
called mdelay(), but it seems to wait for far too short a time. It
seems that loops_per_jiffy still has the default value (4096) in
board_setup(), the computed value is more like 245248. So, what is the
proper way to spin wait this early in the startup process? Also, isn't
the default value for loops_per_jiffy off by quite a bit? I'm running
the Au1550 at 492MHz, so that would make the default value good for a
~8MHz processor?

                               --Clem

From ppopov@embeddedalley.com Wed Apr 20 18:59:00 2005
Received: with ECARTIS (v1.0.0; list linux-mips); Wed, 20 Apr 2005 18:59:15 +0100 (BST)
Received: from smtp005.bizmail.sc5.yahoo.com ([IPv6:::ffff:66.163.175.82]:44155
	"HELO smtp005.bizmail.sc5.yahoo.com") by linux-mips.org with SMTP
	id <S8224851AbVDTR7A>; Wed, 20 Apr 2005 18:59:00 +0100
Received: from unknown (HELO ?192.168.1.100?) (ppopov@embeddedalley.com@63.194.214.47 with plain)
  by smtp005.bizmail.sc5.yahoo.com with SMTP; 20 Apr 2005 17:58:57 -0000
Message-ID: <42669862.7000405@embeddedalley.com>
Date:	Wed, 20 Apr 2005 10:58:58 -0700
From:	Pete Popov <ppopov@embeddedalley.com>
Reply-To:  ppopov@embeddedalley.com
Organization: Embedded Alley Solutions, Inc
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.3) Gecko/20041020
X-Accept-Language: en-us, en
MIME-Version: 1.0
To:	Clem Taylor <clem.taylor@gmail.com>
CC:	linux-mips@linux-mips.org
Subject: Re: mdelay() from board_setup() [is default value for loops_per_jiffy
 way off?]
References: <ecb4efd10504201050a00f941@mail.gmail.com>
In-Reply-To: <ecb4efd10504201050a00f941@mail.gmail.com>
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
Return-Path: <ppopov@embeddedalley.com>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 7777
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: ppopov@embeddedalley.com
Precedence: bulk
X-list: linux-mips
Content-Length: 899
Lines: 19

Clem Taylor wrote:
> Hi,
> 
> I'm working on a linux port for a custom Au1550 based board. Inside of
> board_setup() I need to wait for some hardware to power up. So, I
> called mdelay(), but it seems to wait for far too short a time. It
> seems that loops_per_jiffy still has the default value (4096) in
> board_setup(), the computed value is more like 245248. So, what is the
> proper way to spin wait this early in the startup process? Also, isn't
> the default value for loops_per_jiffy off by quite a bit? I'm running
> the Au1550 at 492MHz, so that would make the default value good for a
> ~8MHz processor?

It's too early in board_setup() to use the standard delay routines. You can't 
use those until after calibrate_delay() runs. To do precise delays in 
board_setup, you'll have to do something yourself where you read the cp0 timer 
periodically and wait a certain amount of time.

Pete

From ralf@linux-mips.org Wed Apr 20 19:07:37 2005
Received: with ECARTIS (v1.0.0; list linux-mips); Wed, 20 Apr 2005 19:07:51 +0100 (BST)
Received: from extgw-uk.mips.com ([IPv6:::ffff:62.254.210.129]:55577 "EHLO
	bacchus.net.dhis.org") by linux-mips.org with ESMTP
	id <S8224850AbVDTSHh>; Wed, 20 Apr 2005 19:07:37 +0100
Received: from dea.linux-mips.net (localhost.localdomain [127.0.0.1])
	by bacchus.net.dhis.org (8.13.1/8.13.1) with ESMTP id j3KI7LcG026415;
	Wed, 20 Apr 2005 19:07:21 +0100
Received: (from ralf@localhost)
	by dea.linux-mips.net (8.13.1/8.13.1/Submit) id j3KI7Kwa026414;
	Wed, 20 Apr 2005 19:07:20 +0100
Date:	Wed, 20 Apr 2005 19:07:20 +0100
From:	Ralf Baechle <ralf@linux-mips.org>
To:	Pete Popov <ppopov@embeddedalley.com>
Cc:	Clem Taylor <clem.taylor@gmail.com>, linux-mips@linux-mips.org
Subject: Re: mdelay() from board_setup() [is default value for loops_per_jiffy way off?]
Message-ID: <20050420180720.GK5212@linux-mips.org>
References: <ecb4efd10504201050a00f941@mail.gmail.com> <42669862.7000405@embeddedalley.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <42669862.7000405@embeddedalley.com>
User-Agent: Mutt/1.4.1i
Return-Path: <ralf@linux-mips.org>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 7778
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: ralf@linux-mips.org
Precedence: bulk
X-list: linux-mips
Content-Length: 481
Lines: 11

On Wed, Apr 20, 2005 at 10:58:58AM -0700, Pete Popov wrote:

> It's too early in board_setup() to use the standard delay routines. You 
> can't use those until after calibrate_delay() runs. To do precise delays in 
> board_setup, you'll have to do something yourself where you read the cp0 
> timer periodically and wait a certain amount of time.

And make sure not to be trapped by wrap-arounds of that counter.  Also it
doesn't count the same speed on all processors ...

  Ralf

From ppopov@embeddedalley.com Thu Apr 21 06:08:25 2005
Received: with ECARTIS (v1.0.0; list linux-mips); Thu, 21 Apr 2005 06:08:41 +0100 (BST)
Received: from smtp007.bizmail.sc5.yahoo.com ([IPv6:::ffff:66.163.170.10]:19812
	"HELO smtp007.bizmail.sc5.yahoo.com") by linux-mips.org with SMTP
	id <S8224916AbVDUFIZ>; Thu, 21 Apr 2005 06:08:25 +0100
Received: from unknown (HELO ?192.168.1.100?) (ppopov@embeddedalley.com@63.194.214.47 with plain)
  by smtp007.bizmail.sc5.yahoo.com with SMTP; 21 Apr 2005 05:08:20 -0000
Message-ID: <42673538.90508@embeddedalley.com>
Date:	Wed, 20 Apr 2005 22:08:08 -0700
From:	Pete Popov <ppopov@embeddedalley.com>
Reply-To:  ppopov@embeddedalley.com
Organization: Embedded Alley Solutions, Inc
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.3) Gecko/20041020
X-Accept-Language: en-us, en
MIME-Version: 1.0
To:	"d.piccolo" <d.piccolo@exadron.com>
CC:	linux-mips@linux-mips.org
Subject: Re: Bug detection and correction on Alchemy au1x00_uart.c serial
 driver
References: <1113822129.3261.42.camel@localhost.localdomain>
In-Reply-To: <1113822129.3261.42.camel@localhost.localdomain>
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
Return-Path: <ppopov@embeddedalley.com>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 7779
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: ppopov@embeddedalley.com
Precedence: bulk
X-list: linux-mips
Content-Length: 983
Lines: 36


Applied, thanks.

Pete

d.piccolo wrote:
> Hi Everybody
> 
> I've found a bug in the  au1x00_uart.c file in the drivers/serial/
> directory of the 2.6.10 linux kernel. There is only possible to change
> the speed of the communication but not to update other parameters of the
> serial link, like the number of bits involved, stop bits and parity.
>   Comparing the code of this source file with the code of the standard
> 8250 driver (8250.c also present in the same directory) I've found the
> problem:  au1x00_uart.c never updates the LCR register  (Line Control
> Register) of the serial controller at runtime, it happens only at first
> setup. The problem is solved by adding the line
> 
> 	serial_out(up, UART_LCR, cval);
> 
> just before the line 
>  
> 	up->lcr = cval;	  /* Save LCR */
> 
> (there is only one position in all the source code where is written
> "Save LCR")
> 
> I hope it could be useful.
>                               David Piccolo
> 
> 
>     
> 
> 
> 


From ppopov@embeddedalley.com Thu Apr 21 06:33:00 2005
Received: with ECARTIS (v1.0.0; list linux-mips); Thu, 21 Apr 2005 06:33:26 +0100 (BST)
Received: from smtp008.bizmail.sc5.yahoo.com ([IPv6:::ffff:66.163.170.74]:20156
	"HELO smtp008.bizmail.sc5.yahoo.com") by linux-mips.org with SMTP
	id <S8224992AbVDUFdA>; Thu, 21 Apr 2005 06:33:00 +0100
Received: from unknown (HELO ?192.168.1.100?) (ppopov@embeddedalley.com@63.194.214.47 with plain)
  by smtp008.bizmail.sc5.yahoo.com with SMTP; 21 Apr 2005 05:32:52 -0000
Message-ID: <42673AF7.9000604@embeddedalley.com>
Date:	Wed, 20 Apr 2005 22:32:39 -0700
From:	Pete Popov <ppopov@embeddedalley.com>
Reply-To:  ppopov@embeddedalley.com
Organization: Embedded Alley Solutions, Inc
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.3) Gecko/20041020
X-Accept-Language: en-us, en
MIME-Version: 1.0
To:	Ulrich Eckhardt <eckhardt@satorlaser.com>
CC:	linux-mips@linux-mips.org
Subject: Re: [patch] some cleanups for Alchemy processors
References: <200504181137.49593.eckhardt@satorlaser.com> <200504181727.22299.eckhardt@satorlaser.com>
In-Reply-To: <200504181727.22299.eckhardt@satorlaser.com>
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
Return-Path: <ppopov@embeddedalley.com>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 7780
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: ppopov@embeddedalley.com
Precedence: bulk
X-list: linux-mips
Content-Length: 7082
Lines: 246


Thanks, applied.

Pete

Ulrich Eckhardt wrote:
> OK, here's a new version that fixes the objections raised by Christoph and 
> Dan.
> 
> Uli
> 
> 
> Changes:
>  * use 'unsigned long' as address supplied to au_write[bwl]()
>  * remove two already unused and commented structures
>  * added an ULL suffix to several address constants that use
>    bits 35-32
> 
> ---
> Index: include/asm-mips/mach-au1x00/au1000.h
> ===================================================================
> RCS file: /home/cvs/linux/include/asm-mips/mach-au1x00/au1000.h,v
> retrieving revision 1.16
> diff -u -r1.16 au1000.h
> --- include/asm-mips/mach-au1x00/au1000.h	4 Apr 2005 01:06:20 -0000	1.16
> +++ include/asm-mips/mach-au1x00/au1000.h	18 Apr 2005 15:24:38 -0000
> @@ -60,34 +60,34 @@
>  	mdelay(ms);
>  }
>  
> -void static inline au_writeb(u8 val, int reg)
> +void static inline au_writeb(u8 val, unsigned long reg)
>  {
>  	*(volatile u8 *)(reg) = val;
>  }
>  
> -void static inline au_writew(u16 val, int reg)
> +void static inline au_writew(u16 val, unsigned long reg)
>  {
>  	*(volatile u16 *)(reg) = val;
>  }
>  
> -void static inline au_writel(u32 val, int reg)
> +void static inline au_writel(u32 val, unsigned long reg)
>  {
>  	*(volatile u32 *)(reg) = val;
>  }
>  
> -static inline u8 au_readb(unsigned long port)
> +static inline u8 au_readb(unsigned long reg)
>  {
> -	return (*(volatile u8 *)port);
> +	return (*(volatile u8 *)reg);
>  }
>  
> -static inline u16 au_readw(unsigned long port)
> +static inline u16 au_readw(unsigned long reg)
>  {
> -	return (*(volatile u16 *)port);
> +	return (*(volatile u16 *)reg);
>  }
>  
> -static inline u32 au_readl(unsigned long port)
> +static inline u32 au_readl(unsigned long reg)
>  {
> -	return (*(volatile u32 *)port);
> +	return (*(volatile u32 *)reg);
>  }
>  
>  /* These next three functions should be a generic part of the MIPS
> @@ -181,26 +181,6 @@
>  #define MEM_SDSLEEP		(0x0030)
>  #define MEM_SDSMCKE		(0x0034)
>  
> -#ifndef ASSEMBLER
> -/*typedef volatile struct
> -{
> -	uint32 sdmode0;
> -	uint32 sdmode1;
> -	uint32 sdmode2;
> -	uint32 sdaddr0;
> -	uint32 sdaddr1;
> -	uint32 sdaddr2;
> -	uint32 sdrefcfg;
> -	uint32 sdautoref;
> -	uint32 sdwrmd0;
> -	uint32 sdwrmd1;
> -	uint32 sdwrmd2;
> -	uint32 sdsleep;
> -	uint32 sdsmcke;
> -
> -} AU1X00_SDRAM;*/
> -#endif
> -
>  /*
>   * MEM_SDMODE register content definitions
>   */
> @@ -286,49 +266,6 @@
>  #define MEM_SDSREF		(0x08D0)
>  #define MEM_SDSLEEP		MEM_SDSREF
>  
> -#ifndef ASSEMBLER
> -/*typedef volatile struct
> -{
> -	uint32 sdmode0;
> -	uint32 reserved0;
> -	uint32 sdmode1;
> -	uint32 reserved1;
> -	uint32 sdmode2;
> -	uint32 reserved2[3];
> -	uint32 sdaddr0;
> -	uint32 reserved3;
> -	uint32 sdaddr1;
> -	uint32 reserved4;
> -	uint32 sdaddr2;
> -	uint32 reserved5[3];
> -	uint32 sdconfiga;
> -	uint32 reserved6;
> -	uint32 sdconfigb;
> -	uint32 reserved7;
> -	uint32 sdstat;
> -	uint32 reserved8;
> -	uint32 sderraddr;
> -	uint32 reserved9;
> -	uint32 sdstride0;
> -	uint32 reserved10;
> -	uint32 sdstride1;
> -	uint32 reserved11;
> -	uint32 sdstride2;
> -	uint32 reserved12[3];
> -	uint32 sdwrmd0;
> -	uint32 reserved13;
> -	uint32 sdwrmd1;
> -	uint32 reserved14;
> -	uint32 sdwrmd2;
> -	uint32 reserved15[11];
> -	uint32 sdprecmd;
> -	uint32 reserved16;
> -	uint32 sdautoref;
> -	uint32 reserved17;
> -	uint32 sdsref;
> -
> -} AU1550_SDRAM;*/
> -#endif
>  #endif
>  
>  /*
> @@ -365,9 +302,9 @@
>  #define	SSI0_PHYS_ADDR		0x11600000
>  #define	SSI1_PHYS_ADDR		0x11680000
>  #define	SYS_PHYS_ADDR		0x11900000
> -#define PCMCIA_IO_PHYS_ADDR   0xF00000000
> -#define PCMCIA_ATTR_PHYS_ADDR 0xF40000000
> -#define PCMCIA_MEM_PHYS_ADDR  0xF80000000
> +#define PCMCIA_IO_PHYS_ADDR   0xF00000000ULL
> +#define PCMCIA_ATTR_PHYS_ADDR 0xF40000000ULL
> +#define PCMCIA_MEM_PHYS_ADDR  0xF80000000ULL
>  #endif
>  
>  /********************************************************************/
> @@ -399,13 +336,13 @@
>  #define	UART3_PHYS_ADDR		0x11400000
>  #define GPIO2_PHYS_ADDR		0x11700000
>  #define	SYS_PHYS_ADDR		0x11900000
> -#define PCI_MEM_PHYS_ADDR     0x400000000
> -#define PCI_IO_PHYS_ADDR      0x500000000
> -#define PCI_CONFIG0_PHYS_ADDR 0x600000000
> -#define PCI_CONFIG1_PHYS_ADDR 0x680000000
> -#define PCMCIA_IO_PHYS_ADDR   0xF00000000
> -#define PCMCIA_ATTR_PHYS_ADDR 0xF40000000
> -#define PCMCIA_MEM_PHYS_ADDR  0xF80000000
> +#define PCI_MEM_PHYS_ADDR     0x400000000ULL
> +#define PCI_IO_PHYS_ADDR      0x500000000ULL
> +#define PCI_CONFIG0_PHYS_ADDR 0x600000000ULL
> +#define PCI_CONFIG1_PHYS_ADDR 0x680000000ULL
> +#define PCMCIA_IO_PHYS_ADDR   0xF00000000ULL
> +#define PCMCIA_ATTR_PHYS_ADDR 0xF40000000ULL
> +#define PCMCIA_MEM_PHYS_ADDR  0xF80000000ULL
>  #endif
>  
>  /********************************************************************/
> @@ -442,9 +379,9 @@
>  #define GPIO2_PHYS_ADDR		0x11700000
>  #define	SYS_PHYS_ADDR		0x11900000
>  #define LCD_PHYS_ADDR		0x15000000
> -#define PCMCIA_IO_PHYS_ADDR   0xF00000000
> -#define PCMCIA_ATTR_PHYS_ADDR 0xF40000000
> -#define PCMCIA_MEM_PHYS_ADDR  0xF80000000
> +#define PCMCIA_IO_PHYS_ADDR   0xF00000000ULL
> +#define PCMCIA_ATTR_PHYS_ADDR 0xF40000000ULL
> +#define PCMCIA_MEM_PHYS_ADDR  0xF80000000ULL
>  #endif
>  
>  /***********************************************************************/
> @@ -473,13 +410,13 @@
>  #define PSC1_PHYS_ADDR	 	0x11B00000
>  #define PSC2_PHYS_ADDR	 	0x10A00000
>  #define PSC3_PHYS_ADDR	 	0x10B00000
> -#define PCI_MEM_PHYS_ADDR     0x400000000
> -#define PCI_IO_PHYS_ADDR      0x500000000
> -#define PCI_CONFIG0_PHYS_ADDR 0x600000000
> -#define PCI_CONFIG1_PHYS_ADDR 0x680000000
> -#define PCMCIA_IO_PHYS_ADDR   0xF00000000
> -#define PCMCIA_ATTR_PHYS_ADDR 0xF40000000
> -#define PCMCIA_MEM_PHYS_ADDR  0xF80000000
> +#define PCI_MEM_PHYS_ADDR     0x400000000ULL
> +#define PCI_IO_PHYS_ADDR      0x500000000ULL
> +#define PCI_CONFIG0_PHYS_ADDR 0x600000000ULL
> +#define PCI_CONFIG1_PHYS_ADDR 0x680000000ULL
> +#define PCMCIA_IO_PHYS_ADDR   0xF00000000ULL
> +#define PCMCIA_ATTR_PHYS_ADDR 0xF40000000ULL
> +#define PCMCIA_MEM_PHYS_ADDR  0xF80000000ULL
>  #endif
>  
>  /***********************************************************************/
> @@ -500,15 +437,15 @@
>  #define	DDMA_PHYS_ADDR		0x14002000
>  #define PSC0_PHYS_ADDR	 	0x11A00000
>  #define PSC1_PHYS_ADDR	 	0x11B00000
> -#define PCMCIA_IO_PHYS_ADDR   0xF00000000
> -#define PCMCIA_ATTR_PHYS_ADDR 0xF40000000
> -#define PCMCIA_MEM_PHYS_ADDR  0xF80000000
>  #define SD0_PHYS_ADDR		0x10600000
>  #define SD1_PHYS_ADDR		0x10680000
>  #define LCD_PHYS_ADDR		0x15000000
>  #define SWCNT_PHYS_ADDR		0x1110010C
>  #define MAEFE_PHYS_ADDR		0x14012000
>  #define MAEBE_PHYS_ADDR		0x14010000
> +#define PCMCIA_IO_PHYS_ADDR   0xF00000000ULL
> +#define PCMCIA_ATTR_PHYS_ADDR 0xF40000000ULL
> +#define PCMCIA_MEM_PHYS_ADDR  0xF80000000ULL
>  #endif
>  
>  
> @@ -1788,7 +1725,7 @@
>  #define PCI_IO_START    0
>  #define PCI_IO_END      0
>  #define PCI_MEM_START   0
> -#define PCI_MEM_END     0 
> +#define PCI_MEM_END     0
>  #define PCI_FIRST_DEVFN 0
>  #define PCI_LAST_DEVFN  0
>  
> 
> 


From anemo@mba.ocn.ne.jp Thu Apr 21 08:19:50 2005
Received: with ECARTIS (v1.0.0; list linux-mips); Thu, 21 Apr 2005 08:20:07 +0100 (BST)
Received: from topsns.toshiba-tops.co.jp ([IPv6:::ffff:202.230.225.5]:24593
	"HELO topsns.toshiba-tops.co.jp") by linux-mips.org with SMTP
	id <S8225072AbVDUHTu>; Thu, 21 Apr 2005 08:19:50 +0100
Received: from inside-ms1.toshiba-tops.co.jp by topsns.toshiba-tops.co.jp
          via smtpd (for mail.linux-mips.org [62.254.210.162]) with SMTP; 21 Apr 2005 07:19:48 UT
Received: from topsms.toshiba-tops.co.jp (localhost.localdomain [127.0.0.1])
	by localhost.toshiba-tops.co.jp (Postfix) with ESMTP id B0FC21F30A;
	Thu, 21 Apr 2005 16:19:45 +0900 (JST)
Received: from srd2sd.toshiba-tops.co.jp (gw-chiba7.toshiba-tops.co.jp [172.17.244.27])
	by topsms.toshiba-tops.co.jp (Postfix) with ESMTP id A4EC51F2F4;
	Thu, 21 Apr 2005 16:19:45 +0900 (JST)
Received: from localhost (fragile [172.17.28.65])
	by srd2sd.toshiba-tops.co.jp (8.12.10/8.12.10) with ESMTP id j3L7Jjoj008950;
	Thu, 21 Apr 2005 16:19:45 +0900 (JST)
	(envelope-from anemo@mba.ocn.ne.jp)
Date:	Thu, 21 Apr 2005 16:19:45 +0900 (JST)
Message-Id: <20050421.161945.79301612.nemoto@toshiba-tops.co.jp>
To:	ralf@linux-mips.org
Cc:	dom@mips.com, macro@linux-mips.org, linux-mips@linux-mips.org
Subject: Re: ieee754[sd]p_neg workaround
From:	Atsushi Nemoto <anemo@mba.ocn.ne.jp>
In-Reply-To: <20050420131304.GF5212@linux-mips.org>
References: <Pine.LNX.4.61L.0504201312520.7109@blysk.ds.pg.gda.pl>
	<16998.20933.14301.397793@arsenal.mips.com>
	<20050420131304.GF5212@linux-mips.org>
X-Fingerprint: 6ACA 1623 39BD 9A94 9B1A  B746 CA77 FE94 2874 D52F
X-Pgp-Public-Key: http://wwwkeys.pgp.net/pks/lookup?op=get&search=0x2874D52F
X-Mailer: Mew version 3.3 on Emacs 21.3 / Mule 5.0 (SAKAKI)
Mime-Version: 1.0
Content-Type: Text/Plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Return-Path: <anemo@mba.ocn.ne.jp>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 7781
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: anemo@mba.ocn.ne.jp
Precedence: bulk
X-list: linux-mips
Content-Length: 431
Lines: 12

>>>>> On Wed, 20 Apr 2005 14:13:04 +0100, Ralf Baechle <ralf@linux-mips.org> said:
>> So file a bug against glibc, but we should fix the emulator so it
>> correctly imitates the MIPS instruction set...

ralf> As a matter of defensive design I think we should try to follow
ralf> the establish behaviour if nothing more specific is defined
ralf> anywhere.

OK, I sent a bug reoport to glibc bugzilla. (Bug# 864)

---
Atsushi Nemoto

From clem.taylor@gmail.com Thu Apr 21 20:31:29 2005
Received: with ECARTIS (v1.0.0; list linux-mips); Thu, 21 Apr 2005 20:31:45 +0100 (BST)
Received: from wproxy.gmail.com ([IPv6:::ffff:64.233.184.205]:31882 "EHLO
	wproxy.gmail.com") by linux-mips.org with ESMTP id <S8225327AbVDUTb3> convert rfc822-to-8bit;
	Thu, 21 Apr 2005 20:31:29 +0100
Received: by wproxy.gmail.com with SMTP id 57so734724wri
        for <linux-mips@linux-mips.org>; Thu, 21 Apr 2005 12:31:22 -0700 (PDT)
DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws;
        s=beta; d=gmail.com;
        h=received:message-id:date:from:reply-to:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition;
        b=D60B2tHUFnS9YzRqJ4ivn/4IMygWRZJNG1ZMcldT2w6Tjxpi0Ls+yUhYCSxW5wMkQ5ZI3PFvD3rNVKTVcIjdsjNpemMvUijFs678fZ61ilxD8zdSky46dLyjWtzrZooxKAPrCDr7gf+MOH9GBQwcUB7qttr9tbaceLaqMKAuO3o=
Received: by 10.54.5.61 with SMTP id 61mr35579wre;
        Thu, 21 Apr 2005 12:31:21 -0700 (PDT)
Received: by 10.54.41.29 with HTTP; Thu, 21 Apr 2005 12:31:21 -0700 (PDT)
Message-ID: <ecb4efd10504211231748d2525@mail.gmail.com>
Date:	Thu, 21 Apr 2005 15:31:21 -0400
From:	Clem Taylor <clem.taylor@gmail.com>
Reply-To: Clem Taylor <clem.taylor@gmail.com>
To:	linux-mips@linux-mips.org
Subject: troubles writing to a mmapped PCI BAR
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8BIT
Content-Disposition: inline
Return-Path: <clem.taylor@gmail.com>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 7782
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: clem.taylor@gmail.com
Precedence: bulk
X-list: linux-mips

I'm working on a Au1550 driver for a PCI based co-processor. The
driver provides mmap() that allows the mapping of a PCI BAR. From
userspace I can happily read from the mmaped region, but writes just
hang the user space program. gdb shows that the user program is
sitting at the write statement. The read() and write() system calls
work just fine as well.

In the driver mmap() does:
vma->vm_page_prot = pgprot_noncached(vma->vm_page_prot);
return io_remap_page_range(vma, vma->vm_start,
    barStart + (vma->vm_pgoff << PAGE_SHIFT),
    vma->vm_end - vma->vm_start, vma->vm_page_prot);

The user space program does:
u32 *mem;
fd = open("/dev/moo-0", O_RDWR);
mem = mmap(NULL, 4*1024*1024. PROT_READ|PROT_WRITE, MAP_SHARED, fd, 0);
...
fprintf(stderr, "mem[42]=0x%08X\n", mem[42]);
mem[42] = 0xDEADBEEF;

When I run the test, it will print the current value of mem[42], then
hang on the write to mem[42]. /proc/pid/maps shows the mmap with rw-s
permissions:
2abd4000-2afd4000 rw-s 00000000 00:09 134        /dev/moo-0
top shows that the test process is consuming ~100% of the CPU.

I'm really at a loss as to what is happening. I'd imagine that the
userspace program is page faulting (not sure how to verify that) and
the fault handler is not returning. Any ideas what I might be missing?

                       Thanks,
                       Clem

From anemo@mba.ocn.ne.jp Fri Apr 22 11:25:36 2005
Received: with ECARTIS (v1.0.0; list linux-mips); Fri, 22 Apr 2005 11:25:52 +0100 (BST)
Received: from topsns.toshiba-tops.co.jp ([IPv6:::ffff:202.230.225.5]:13316
	"HELO topsns.toshiba-tops.co.jp") by linux-mips.org with SMTP
	id <S8225875AbVDVKZg>; Fri, 22 Apr 2005 11:25:36 +0100
Received: from inside-ms1.toshiba-tops.co.jp by topsns.toshiba-tops.co.jp
          via smtpd (for mail.linux-mips.org [62.254.210.162]) with SMTP; 22 Apr 2005 10:25:34 UT
Received: from topsms.toshiba-tops.co.jp (localhost.localdomain [127.0.0.1])
	by localhost.toshiba-tops.co.jp (Postfix) with ESMTP id B9DFD1F325;
	Fri, 22 Apr 2005 19:25:30 +0900 (JST)
Received: from srd2sd.toshiba-tops.co.jp (gw-chiba7.toshiba-tops.co.jp [172.17.244.27])
	by topsms.toshiba-tops.co.jp (Postfix) with ESMTP id A4CC31F2E4;
	Fri, 22 Apr 2005 19:25:30 +0900 (JST)
Received: from localhost (fragile [172.17.28.65])
	by srd2sd.toshiba-tops.co.jp (8.12.10/8.12.10) with ESMTP id j3MAPUoj014343;
	Fri, 22 Apr 2005 19:25:30 +0900 (JST)
	(envelope-from anemo@mba.ocn.ne.jp)
Date:	Fri, 22 Apr 2005 19:25:30 +0900 (JST)
Message-Id: <20050422.192530.65824230.nemoto@toshiba-tops.co.jp>
To:	linux-mips@linux-mips.org
Cc:	ralf@linux-mips.org
Subject: 2.4.30 do_readv_writev32 fix
From:	Atsushi Nemoto <anemo@mba.ocn.ne.jp>
X-Fingerprint: 6ACA 1623 39BD 9A94 9B1A  B746 CA77 FE94 2874 D52F
X-Pgp-Public-Key: http://wwwkeys.pgp.net/pks/lookup?op=get&search=0x2874D52F
X-Mailer: Mew version 3.3 on Emacs 21.3 / Mule 5.0 (SAKAKI)
Mime-Version: 1.0
Content-Type: Text/Plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Return-Path: <anemo@mba.ocn.ne.jp>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 7783
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: anemo@mba.ocn.ne.jp
Precedence: bulk
X-list: linux-mips

Hi.  Here is a patch to fix a bug introduced on 2.4.30 ...

--- linux-mips-2.4/arch/mips64/kernel/linux32.c	2005-04-18 11:44:19.000000000 +0900
+++ linux-2.4/arch/mips64/kernel/linux32.c	2005-04-22 19:15:32.358642423 +0900
@@ -1101,6 +1101,7 @@
 	 * specially as they have atomicity guarantees and can handle
 	 * iovec's natively
 	 */
+	inode = file->f_dentry->d_inode;
 	if (inode->i_sock) {
 		int err;
 		err = sock_readv_writev(type, inode, file, iov, count, tot_len);

From martin.nichols@oxinst.co.uk Fri Apr 22 13:45:27 2005
Received: with ECARTIS (v1.0.0; list linux-mips); Fri, 22 Apr 2005 13:45:42 +0100 (BST)
Received: from mail58.messagelabs.com ([IPv6:::ffff:193.109.255.35]:30395 "HELO
	mail58.messagelabs.com") by linux-mips.org with SMTP
	id <S8226360AbVDVMp1>; Fri, 22 Apr 2005 13:45:27 +0100
X-VirusChecked:	Checked
X-Env-Sender: martin.nichols@oxinst.co.uk
X-Msg-Ref: server-9.tower-58.messagelabs.com!1114173920!67412617!1
X-StarScan-Version: 5.4.11; banners=-,-,-
X-Originating-IP: [194.200.52.193]
Received: (qmail 11519 invoked from network); 22 Apr 2005 12:45:20 -0000
Received: from smtp1.oxinst.co.uk (HELO ukhontx01.oxinst.co.uk) (194.200.52.193)
  by server-9.tower-58.messagelabs.com with SMTP; 22 Apr 2005 12:45:20 -0000
Received: by UKHONTX01 with Internet Mail Service (5.5.2653.19)
	id <J17AS11D>; Fri, 22 Apr 2005 13:45:19 +0100
Message-ID: <DEF431FFDB15C1488464F0E57D5506642AA6B7@MEDNT02>
From:	martin.nichols@oxinst.co.uk
To:	linux-mips@linux-mips.org
Subject: Common Flash Memory Interface
Date:	Fri, 22 Apr 2005 13:48:02 +0100
MIME-Version: 1.0
X-Mailer: Internet Mail Service (5.5.2653.19)
Content-Type: text/plain;
	charset="iso-8859-1"
Return-Path: <martin.nichols@oxinst.co.uk>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 7784
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: martin.nichols@oxinst.co.uk
Precedence: bulk
X-list: linux-mips

Hi all,

Can anyone out there help?

I'm in the process of designing an Au1100 based board and this question has
both hardware
and software aspects.

I've arranged for a pair of Spansion S29GL256N 256Mbit flash roms to be
connected to the
Au1100 static bus. These devices are each 16bits wide and are connected to
upper and lower
halves of the 32 bit static bus at an address such that the boot code can
reside in them.
After boot, we want to use the remainder of the devices as flash disk using
one of the wear
leveling file systems. Each flash chip implements the Common Flash Memory
Interface standard,
but as they are arranged as 32 bits wide the devices are effectively
interleaved.

Can Linux support this arrangement?
If not, what do other folks do?

I think I could arrange the flash chips as 32M x 16 rather than 16M x 32 and
force the CPU
to boot from 16 bit wide ROM using the ROMSIZE pin on the Au1100. There is
obviously a
significant performance loss in doing this.

Finally, this email is not confidential and is for all Linux-Mips
addressees.

Regards and thanks,

Martin Nichols.

 ###  OXFORD INSTRUMENTS   http://www.oxford-instruments.com/  ### 

Unless stated above to be non-confidential, this E-mail and any 
attachments are private and confidential and are for the addressee 
only and may not be used, copied or disclosed save to the addressee.
If you have received this E-mail in error please notify us upon receipt 
and delete it from your records. Internet communications are not secure 
and Oxford Instruments is not responsible for their abuse by third 
parties nor for any alteration or corruption in transmission. 


From ralf@linux-mips.org Fri Apr 22 14:01:40 2005
Received: with ECARTIS (v1.0.0; list linux-mips); Fri, 22 Apr 2005 14:01:54 +0100 (BST)
Received: from extgw-uk.mips.com ([IPv6:::ffff:62.254.210.129]:62746 "EHLO
	bacchus.net.dhis.org") by linux-mips.org with ESMTP
	id <S8226366AbVDVNBk>; Fri, 22 Apr 2005 14:01:40 +0100
Received: from dea.linux-mips.net (localhost.localdomain [127.0.0.1])
	by bacchus.net.dhis.org (8.13.1/8.13.1) with ESMTP id j3MD1dom016687;
	Fri, 22 Apr 2005 14:01:39 +0100
Received: (from ralf@localhost)
	by dea.linux-mips.net (8.13.1/8.13.1/Submit) id j3MD1cp4016686;
	Fri, 22 Apr 2005 14:01:38 +0100
Date:	Fri, 22 Apr 2005 14:01:38 +0100
From:	Ralf Baechle <ralf@linux-mips.org>
To:	Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Cc:	linux-mips@linux-mips.org
Subject: Re: 2.4.30 do_readv_writev32 fix
Message-ID: <20050422130137.GC5937@linux-mips.org>
References: <20050422.192530.65824230.nemoto@toshiba-tops.co.jp>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <20050422.192530.65824230.nemoto@toshiba-tops.co.jp>
User-Agent: Mutt/1.4.1i
Return-Path: <ralf@linux-mips.org>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 7785
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: ralf@linux-mips.org
Precedence: bulk
X-list: linux-mips

On Fri, Apr 22, 2005 at 07:25:30PM +0900, Atsushi Nemoto wrote:

> Hi.  Here is a patch to fix a bug introduced on 2.4.30 ...

Thanks.  Funny things comming from upstrea at times ;-)

  Ralf

From wd@denx.de Fri Apr 22 16:03:13 2005
Received: with ECARTIS (v1.0.0; list linux-mips); Fri, 22 Apr 2005 16:03:29 +0100 (BST)
Received: from mailout08.sul.t-online.com ([IPv6:::ffff:194.25.134.20]:47018
	"EHLO mailout08.sul.t-online.com") by linux-mips.org with ESMTP
	id <S8226386AbVDVPDN>; Fri, 22 Apr 2005 16:03:13 +0100
Received: from fwd20.aul.t-online.de 
	by mailout08.sul.t-online.com with smtp 
	id 1DOzgW-00083l-02; Fri, 22 Apr 2005 17:03:12 +0200
Received: from denx.de (Xp9x+2Zrre2YaWMUYIL3zkdpv0uy-GcNsq-0X+cQeTriInBdNGBogx@[84.150.74.71]) by fwd20.sul.t-online.de
	with esmtp id 1DOzgI-0WOTDc0; Fri, 22 Apr 2005 17:02:58 +0200
Received: from atlas.denx.de (atlas.denx.de [10.0.0.14])
	by denx.de (Postfix) with ESMTP
	id B6DEB42A2F; Fri, 22 Apr 2005 17:02:57 +0200 (MEST)
Received: by atlas.denx.de (Postfix, from userid 15)
	id 4C188C1510; Fri, 22 Apr 2005 17:02:57 +0200 (MEST)
Received: from atlas.denx.de (localhost [127.0.0.1])
	by atlas.denx.de (Postfix) with ESMTP
	id 497E813D94A; Fri, 22 Apr 2005 17:02:57 +0200 (MEST)
To:	martin.nichols@oxinst.co.uk
Cc:	linux-mips@linux-mips.org
From:	Wolfgang Denk <wd@denx.de>
Subject: Re: Common Flash Memory Interface 
Mime-version: 1.0
Content-type: text/plain; charset=ISO-8859-1
Content-transfer-encoding: 8bit
In-reply-to: Your message of "Fri, 22 Apr 2005 13:48:02 BST."
             <DEF431FFDB15C1488464F0E57D5506642AA6B7@MEDNT02> 
Date:	Fri, 22 Apr 2005 17:02:52 +0200
Message-Id: <20050422150257.4C188C1510@atlas.denx.de>
X-ID:	Xp9x+2Zrre2YaWMUYIL3zkdpv0uy-GcNsq-0X+cQeTriInBdNGBogx@t-dialin.net
X-TOI-MSGID: 220afcf9-6913-4072-ba92-cbfa5de7b3ba
Return-Path: <wd@denx.de>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 7786
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: wd@denx.de
Precedence: bulk
X-list: linux-mips

In message <DEF431FFDB15C1488464F0E57D5506642AA6B7@MEDNT02> you wrote:
> 
> I've arranged for a pair of Spansion S29GL256N 256Mbit flash roms to be
> connected to the
> Au1100 static bus. These devices are each 16bits wide and are connected to
> upper and lower
> halves of the 32 bit static bus at an address such that the boot code can
> reside in them.
> After boot, we want to use the remainder of the devices as flash disk using
> one of the wear
> leveling file systems. Each flash chip implements the Common Flash Memory
> Interface standard,

OK.

> but as they are arranged as 32 bits wide the devices are effectively
> interleaved.

I'd rather say thay are accesses in parallel.

> Can Linux support this arrangement?

Yes, of course. Such a configurationir more or less standard. The MTD
drivers will work just fine.

> Finally, this email is not confidential and is for all Linux-Mips
> addressees.

Then why do you attach such a silly disclaimer?

Best regards,

Wolfgang Denk

-- 
Software Engineering:  Embedded and Realtime Systems,  Embedded Linux
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd@denx.de
"...one of the main causes of the fall of the Roman Empire was  that,
lacking  zero,  they had no way to indicate successful termination of
their C programs."                                     - Robert Firth

From clem.taylor@gmail.com Fri Apr 22 21:23:00 2005
Received: with ECARTIS (v1.0.0; list linux-mips); Fri, 22 Apr 2005 21:23:18 +0100 (BST)
Received: from wproxy.gmail.com ([IPv6:::ffff:64.233.184.206]:36400 "EHLO
	wproxy.gmail.com") by linux-mips.org with ESMTP id <S8225073AbVDVUXA> convert rfc822-to-8bit;
	Fri, 22 Apr 2005 21:23:00 +0100
Received: by wproxy.gmail.com with SMTP id 57so972861wri
        for <linux-mips@linux-mips.org>; Fri, 22 Apr 2005 13:22:53 -0700 (PDT)
DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws;
        s=beta; d=gmail.com;
        h=received:message-id:date:from:reply-to:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references;
        b=jgOv23GgDYzMVoBt9g3jg7KUPuNsdZI0z9UhZgjN3kGWAP96OkDO6UUngbicHrGBID1tl9hyS/3aIayDsmuPSpUAS6kJzODhhrc77YoYzE95DtgBJsuOy8Tf2XWSplFAVrMAMC64RoVMiIKX3eyrClx8gAfYwl3+YSoYihTmJ2c=
Received: by 10.54.10.6 with SMTP id 6mr695461wrj;
        Fri, 22 Apr 2005 13:22:53 -0700 (PDT)
Received: by 10.54.41.29 with HTTP; Fri, 22 Apr 2005 13:22:53 -0700 (PDT)
Message-ID: <ecb4efd105042213221c30cac4@mail.gmail.com>
Date:	Fri, 22 Apr 2005 16:22:53 -0400
From:	Clem Taylor <clem.taylor@gmail.com>
Reply-To: Clem Taylor <clem.taylor@gmail.com>
To:	linux-mips@linux-mips.org
Subject: Re: troubles writing to a mmapped PCI BAR
In-Reply-To: <ecb4efd10504211231748d2525@mail.gmail.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8BIT
Content-Disposition: inline
References: <ecb4efd10504211231748d2525@mail.gmail.com>
Return-Path: <clem.taylor@gmail.com>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 7787
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: clem.taylor@gmail.com
Precedence: bulk
X-list: linux-mips

On 4/21/05, Clem Taylor <clem.taylor@gmail.com> wrote:
> I'm working on a Au1550 driver for a PCI based co-processor. The
> driver provides mmap() that allows the mapping of a PCI BAR. From
> userspace I can happily read from the mmaped region, but writes just
> hang the user space program. gdb shows that the user program is
> sitting at the write statement. The read() and write() system calls
> work just fine as well.

I saw in drivers/video/epson1356fb.c it was doing:
        // FIXME: shouldn't have to do this. If the pages are marked writeable,
        // the TLB fault handlers should set these.
        pgprot_val(vma->vm_page_prot) |= (_PAGE_DIRTY | _PAGE_VALID);

So I tried adding this before my io_remap_page_range() and it seems to
have fixed my problem. My mmap() write to a PCI device is working now.
I tried setting just the _PAGE_DIRTY bit and that seems to be the
trick. Any ideas why I would need do to this or what is going on?

                        --Clem

From ralf@linux-mips.org Fri Apr 22 21:27:43 2005
Received: with ECARTIS (v1.0.0; list linux-mips); Fri, 22 Apr 2005 21:27:58 +0100 (BST)
Received: from extgw-uk.mips.com ([IPv6:::ffff:62.254.210.129]:43027 "EHLO
	bacchus.net.dhis.org") by linux-mips.org with ESMTP
	id <S8225073AbVDVU1n>; Fri, 22 Apr 2005 21:27:43 +0100
Received: from dea.linux-mips.net (localhost.localdomain [127.0.0.1])
	by bacchus.net.dhis.org (8.13.1/8.13.1) with ESMTP id j3MKRe0t032696;
	Fri, 22 Apr 2005 21:27:40 +0100
Received: (from ralf@localhost)
	by dea.linux-mips.net (8.13.1/8.13.1/Submit) id j3MKReKY032695;
	Fri, 22 Apr 2005 21:27:40 +0100
Date:	Fri, 22 Apr 2005 21:27:40 +0100
From:	Ralf Baechle <ralf@linux-mips.org>
To:	Clem Taylor <clem.taylor@gmail.com>
Cc:	linux-mips@linux-mips.org
Subject: Re: troubles writing to a mmapped PCI BAR
Message-ID: <20050422202740.GY20252@linux-mips.org>
References: <ecb4efd10504211231748d2525@mail.gmail.com> <ecb4efd105042213221c30cac4@mail.gmail.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <ecb4efd105042213221c30cac4@mail.gmail.com>
User-Agent: Mutt/1.4.1i
Return-Path: <ralf@linux-mips.org>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 7788
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: ralf@linux-mips.org
Precedence: bulk
X-list: linux-mips

On Fri, Apr 22, 2005 at 04:22:53PM -0400, Clem Taylor wrote:

> So I tried adding this before my io_remap_page_range() and it seems to
> have fixed my problem. My mmap() write to a PCI device is working now.
> I tried setting just the _PAGE_DIRTY bit and that seems to be the
> trick. Any ideas why I would need do to this or what is going on?

Without the process simply won't have access priviledges to that page, see
the TLB chapter of the CPU manual.

(I'm simplifying things alot here.)

  Ralf

From yuasa@hh.iij4u.or.jp Sat Apr 23 14:54:32 2005
Received: with ECARTIS (v1.0.0; list linux-mips); Sat, 23 Apr 2005 14:54:50 +0100 (BST)
Received: from mo01.iij4u.or.jp ([IPv6:::ffff:210.130.0.20]:16838 "EHLO
	mo01.iij4u.or.jp") by linux-mips.org with ESMTP id <S8225564AbVDWNyc>;
	Sat, 23 Apr 2005 14:54:32 +0100
Received: MO(mo01)id j3NDsRGg026136; Sat, 23 Apr 2005 22:54:27 +0900 (JST)
Received: MDO(mdo01) id j3NDsRCo013447; Sat, 23 Apr 2005 22:54:27 +0900 (JST)
Received: from stratos (h042.p502.iij4u.or.jp [210.149.246.42])
	by mbox.iij4u.or.jp (4U-MR/mbox00) id j3NDsPgR002022
	(version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NOT);
	Sat, 23 Apr 2005 22:54:26 +0900 (JST)
Date:	Sat, 23 Apr 2005 22:54:25 +0900
From:	Yoichi Yuasa <yuasa@hh.iij4u.or.jp>
To:	Ralf Baechle <ralf@linux-mips.org>
Cc:	yuasa@hh.iij4u.or.jp, linux-mips <linux-mips@linux-mips.org>
Subject: [PATCH 2.6] vr41xx: remove old rtc driver for vr41xx
Message-Id: <20050423225425.1b7826c5.yuasa@hh.iij4u.or.jp>
X-Mailer: Sylpheed version 1.0.4 (GTK+ 1.2.10; i386-pc-linux-gnu)
Mime-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Return-Path: <yuasa@hh.iij4u.or.jp>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 7789
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: yuasa@hh.iij4u.or.jp
Precedence: bulk
X-list: linux-mips

Hi,

This patch had removed old rtc driver for vr41xx.

Yoichi

Signed-off-by: Yoichi Yuasa <yuasa@hh.iij4u.or.jp>

diff -urN -X dontdiff b-orig/arch/mips/vr41xx/common/Makefile b/arch/mips/vr41xx/common/Makefile
--- b-orig/arch/mips/vr41xx/common/Makefile	Tue Mar  8 08:10:16 2005
+++ b/arch/mips/vr41xx/common/Makefile	Sat Apr 23 08:50:30 2005
@@ -2,7 +2,7 @@
 # Makefile for common code of the NEC VR4100 series.
 #
 
-obj-y				+= bcu.o cmu.o icu.o init.o int-handler.o ksyms.o pmu.o rtc.o
+obj-y				+= bcu.o cmu.o icu.o init.o int-handler.o pmu.o
 obj-$(CONFIG_GPIO_VR41XX)	+= giu.o
 obj-$(CONFIG_SERIAL_8250)	+= serial.o
 obj-$(CONFIG_VRC4171)		+= vrc4171.o
diff -urN -X dontdiff b-orig/arch/mips/vr41xx/common/ksyms.c b/arch/mips/vr41xx/common/ksyms.c
--- b-orig/arch/mips/vr41xx/common/ksyms.c	Sun Jan 16 22:34:31 2005
+++ b/arch/mips/vr41xx/common/ksyms.c	Thu Jan  1 09:00:00 1970
@@ -1,33 +0,0 @@
-/*
- *   ksyms.c, Export NEC VR4100 series specific functions needed for loadable modules.
- *
- *  Copyright (C) 2003  Yoichi Yuasa <yuasa@hh.iij4u.or.jp>
- *  Copyright (C) 2005 Ralf Baechle (ralf@linux-mips.org)
- *
- *  This program is free software; you can redistribute it and/or modify
- *  it under the terms of the GNU General Public License as published by
- *  the Free Software Foundation; either version 2 of the License, or
- *  (at your option) any later version.
- *
- *  This program is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *  GNU General Public License for more details.
- *
- *  You should have received a copy of the GNU General Public License
- *  along with this program; if not, write to the Free Software
- *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
- */
-#include <linux/module.h>
-
-#include <asm/vr41xx/vr41xx.h>
-
-EXPORT_SYMBOL(vr41xx_get_vtclock_frequency);
-EXPORT_SYMBOL(vr41xx_get_tclock_frequency);
-
-EXPORT_SYMBOL(vr41xx_set_rtclong1_cycle);
-EXPORT_SYMBOL(vr41xx_read_rtclong1_counter);
-EXPORT_SYMBOL(vr41xx_set_rtclong2_cycle);
-EXPORT_SYMBOL(vr41xx_read_rtclong2_counter);
-EXPORT_SYMBOL(vr41xx_set_tclock_cycle);
-EXPORT_SYMBOL(vr41xx_read_tclock_counter);
diff -urN -X dontdiff b-orig/arch/mips/vr41xx/common/rtc.c b/arch/mips/vr41xx/common/rtc.c
--- b-orig/arch/mips/vr41xx/common/rtc.c	Thu May 27 02:11:11 2004
+++ b/arch/mips/vr41xx/common/rtc.c	Thu Jan  1 09:00:00 1970
@@ -1,321 +0,0 @@
-/*
- *  rtc.c, RTC(has only timer function) routines for NEC VR4100 series.
- *
- *  Copyright (C) 2003-2004  Yoichi Yuasa <yuasa@hh.iij4u.or.jp>
- *
- *  This program is free software; you can redistribute it and/or modify
- *  it under the terms of the GNU General Public License as published by
- *  the Free Software Foundation; either version 2 of the License, or
- *  (at your option) any later version.
- *
- *  This program is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *  GNU General Public License for more details.
- *
- *  You should have received a copy of the GNU General Public License
- *  along with this program; if not, write to the Free Software
- *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
- */
-#include <linux/init.h>
-#include <linux/irq.h>
-#include <linux/smp.h>
-#include <linux/types.h>
-
-#include <asm/io.h>
-#include <asm/time.h>
-#include <asm/vr41xx/vr41xx.h>
-
-static uint32_t rtc1_base;
-static uint32_t rtc2_base;
-
-static uint64_t previous_elapsedtime;
-static unsigned int remainder_per_sec;
-static unsigned int cycles_per_sec;
-static unsigned int cycles_per_jiffy;
-static unsigned long epoch_time;
-
-#define CYCLES_PER_JIFFY	(CLOCK_TICK_RATE / HZ)
-#define REMAINDER_PER_SEC	(CLOCK_TICK_RATE - (CYCLES_PER_JIFFY * HZ))
-#define CYCLES_PER_100USEC	((CLOCK_TICK_RATE + (10000 / 2)) / 10000)
-
-#define ETIMELREG_TYPE1		KSEG1ADDR(0x0b0000c0)
-#define TCLKLREG_TYPE1		KSEG1ADDR(0x0b0001c0)
-
-#define ETIMELREG_TYPE2		KSEG1ADDR(0x0f000100)
-#define TCLKLREG_TYPE2		KSEG1ADDR(0x0f000120)
-
-/* RTC 1 registers */
-#define ETIMELREG		0x00
-#define ETIMEMREG		0x02
-#define ETIMEHREG		0x04
-/* RFU */
-#define ECMPLREG		0x08
-#define ECMPMREG		0x0a
-#define ECMPHREG		0x0c
-/* RFU */
-#define RTCL1LREG		0x10
-#define RTCL1HREG		0x12
-#define RTCL1CNTLREG		0x14
-#define RTCL1CNTHREG		0x16
-#define RTCL2LREG		0x18
-#define RTCL2HREG		0x1a
-#define RTCL2CNTLREG		0x1c
-#define RTCL2CNTHREG		0x1e
-
-/* RTC 2 registers */
-#define TCLKLREG		0x00
-#define TCLKHREG		0x02
-#define TCLKCNTLREG		0x04
-#define TCLKCNTHREG		0x06
-/* RFU */
-#define RTCINTREG		0x1e
- #define TCLOCK_INT		0x08
- #define RTCLONG2_INT		0x04
- #define RTCLONG1_INT		0x02
- #define ELAPSEDTIME_INT	0x01
-
-#define read_rtc1(offset)	readw(rtc1_base + (offset))
-#define write_rtc1(val, offset)	writew((val), rtc1_base + (offset))
-
-#define read_rtc2(offset)	readw(rtc2_base + (offset))
-#define write_rtc2(val, offset)	writew((val), rtc2_base + (offset))
-
-static inline uint64_t read_elapsedtime_counter(void)
-{
-	uint64_t first, second;
-	uint32_t first_mid, first_low;
-	uint32_t second_mid, second_low;
-
-	do {
-		first_low = (uint32_t)read_rtc1(ETIMELREG);
-		first_mid = (uint32_t)read_rtc1(ETIMEMREG);
-		first = (uint64_t)read_rtc1(ETIMEHREG);
-		second_low = (uint32_t)read_rtc1(ETIMELREG);
-		second_mid = (uint32_t)read_rtc1(ETIMEMREG);
-		second = (uint64_t)read_rtc1(ETIMEHREG);
-	} while (first_low != second_low || first_mid != second_mid ||
-	         first != second);
-
-	return (first << 32) | (uint64_t)((first_mid << 16) | first_low);
-}
-
-static inline void write_elapsedtime_counter(uint64_t time)
-{
-	write_rtc1((uint16_t)time, ETIMELREG);
-	write_rtc1((uint16_t)(time >> 16), ETIMEMREG);
-	write_rtc1((uint16_t)(time >> 32), ETIMEHREG);
-}
-
-static inline void write_elapsedtime_compare(uint64_t time)
-{
-	write_rtc1((uint16_t)time, ECMPLREG);
-	write_rtc1((uint16_t)(time >> 16), ECMPMREG);
-	write_rtc1((uint16_t)(time >> 32), ECMPHREG);
-}
-
-void vr41xx_set_rtclong1_cycle(uint32_t cycles)
-{
-	write_rtc1((uint16_t)cycles, RTCL1LREG);
-	write_rtc1((uint16_t)(cycles >> 16), RTCL1HREG);
-}
-
-uint32_t vr41xx_read_rtclong1_counter(void)
-{
-	uint32_t first_high, first_low;
-	uint32_t second_high, second_low;
-
-	do {
-		first_low = (uint32_t)read_rtc1(RTCL1CNTLREG);
-		first_high = (uint32_t)read_rtc1(RTCL1CNTHREG);
-		second_low = (uint32_t)read_rtc1(RTCL1CNTLREG);
-		second_high = (uint32_t)read_rtc1(RTCL1CNTHREG);
-	} while (first_low != second_low || first_high != second_high);
-
-	return (first_high << 16) | first_low;
-}
-
-void vr41xx_set_rtclong2_cycle(uint32_t cycles)
-{
-	write_rtc1((uint16_t)cycles, RTCL2LREG);
-	write_rtc1((uint16_t)(cycles >> 16), RTCL2HREG);
-}
-
-uint32_t vr41xx_read_rtclong2_counter(void)
-{
-	uint32_t first_high, first_low;
-	uint32_t second_high, second_low;
-
-	do {
-		first_low = (uint32_t)read_rtc1(RTCL2CNTLREG);
-		first_high = (uint32_t)read_rtc1(RTCL2CNTHREG);
-		second_low = (uint32_t)read_rtc1(RTCL2CNTLREG);
-		second_high = (uint32_t)read_rtc1(RTCL2CNTHREG);
-	} while (first_low != second_low || first_high != second_high);
-
-	return (first_high << 16) | first_low;
-}
-
-void vr41xx_set_tclock_cycle(uint32_t cycles)
-{
-	write_rtc2((uint16_t)cycles, TCLKLREG);
-	write_rtc2((uint16_t)(cycles >> 16), TCLKHREG);
-}
-
-uint32_t vr41xx_read_tclock_counter(void)
-{
-	uint32_t first_high, first_low;
-	uint32_t second_high, second_low;
-
-	do {
-		first_low = (uint32_t)read_rtc2(TCLKCNTLREG);
-		first_high = (uint32_t)read_rtc2(TCLKCNTHREG);
-		second_low = (uint32_t)read_rtc2(TCLKCNTLREG);
-		second_high = (uint32_t)read_rtc2(TCLKCNTHREG);
-	} while (first_low != second_low || first_high != second_high);
-
-	return (first_high << 16) | first_low;
-}
-
-static void vr41xx_timer_ack(void)
-{
-	uint64_t cur;
-
-	write_rtc2(ELAPSEDTIME_INT, RTCINTREG);
-
-	previous_elapsedtime += (uint64_t)cycles_per_jiffy;
-	cycles_per_sec += cycles_per_jiffy;
-
-	if (cycles_per_sec >= CLOCK_TICK_RATE) {
-		cycles_per_sec = 0;
-		remainder_per_sec = REMAINDER_PER_SEC;
-	}
-
-	cycles_per_jiffy = 0;
-
-	do {
-		cycles_per_jiffy += CYCLES_PER_JIFFY;
-		if (remainder_per_sec > 0) {
-			cycles_per_jiffy++;
-			remainder_per_sec--;
-		}
-
-		cur = read_elapsedtime_counter();
-	} while (cur >= previous_elapsedtime + (uint64_t)cycles_per_jiffy);
-
-	write_elapsedtime_compare(previous_elapsedtime + (uint64_t)cycles_per_jiffy);
-}
-
-static void vr41xx_hpt_init(unsigned int count)
-{
-}
-
-static unsigned int vr41xx_hpt_read(void)
-{
-	uint64_t cur;
-
-	cur = read_elapsedtime_counter();
-
-	return (unsigned int)cur;
-}
-
-static unsigned long vr41xx_gettimeoffset(void)
-{
-	uint64_t cur;
-	unsigned long gap;
-
-	cur = read_elapsedtime_counter();
-	gap = (unsigned long)(cur - previous_elapsedtime);
-	gap = gap / CYCLES_PER_100USEC * 100;	/* usec */
-
-	return gap;
-}
-
-static unsigned long vr41xx_get_time(void)
-{
-	uint64_t counts;
-
-	counts = read_elapsedtime_counter();
-	counts >>= 15;
-
-	return epoch_time + (unsigned long)counts;
-
-}
-
-static int vr41xx_set_time(unsigned long sec)
-{
-	if (sec < epoch_time)
-		return -EINVAL;
-
-	sec -= epoch_time;
-
-	write_elapsedtime_counter((uint64_t)sec << 15);
-
-	return 0;
-}
-
-void vr41xx_set_epoch_time(unsigned long time)
-{
-	epoch_time = time;
-}
-
-static void __init vr41xx_time_init(void)
-{
-	switch (current_cpu_data.cputype) {
-	case CPU_VR4111:
-	case CPU_VR4121:
-		rtc1_base = ETIMELREG_TYPE1;
-		rtc2_base = TCLKLREG_TYPE1;
-		break;
-	case CPU_VR4122:
-	case CPU_VR4131:
-	case CPU_VR4133:
-		rtc1_base = ETIMELREG_TYPE2;
-		rtc2_base = TCLKLREG_TYPE2;
-		break;
-	default:
-		panic("Unexpected CPU of NEC VR4100 series");
-		break;
-	}
-
-	mips_timer_ack = vr41xx_timer_ack;
-
-	mips_hpt_init = vr41xx_hpt_init;
-	mips_hpt_read = vr41xx_hpt_read;
-	mips_hpt_frequency = CLOCK_TICK_RATE;
-
-	if (epoch_time == 0)
-		epoch_time = mktime(1970, 1, 1, 0, 0, 0);
-
-	rtc_get_time = vr41xx_get_time;
-	rtc_set_time = vr41xx_set_time;
-}
-
-static void __init vr41xx_timer_setup(struct irqaction *irq)
-{
-	do_gettimeoffset = vr41xx_gettimeoffset;
-
-	remainder_per_sec = REMAINDER_PER_SEC;
-	cycles_per_jiffy = CYCLES_PER_JIFFY;
-
-	if (remainder_per_sec > 0) {
-		cycles_per_jiffy++;
-		remainder_per_sec--;
-	}
-
-	previous_elapsedtime = read_elapsedtime_counter();
-	write_elapsedtime_compare(previous_elapsedtime + (uint64_t)cycles_per_jiffy);
-	write_rtc2(ELAPSEDTIME_INT, RTCINTREG);
-
-	setup_irq(ELAPSEDTIME_IRQ, irq);
-}
-
-static int __init vr41xx_rtc_init(void)
-{
-	board_time_init = vr41xx_time_init;
-	board_timer_setup = vr41xx_timer_setup;
-
-	return 0;
-}
-
-early_initcall(vr41xx_rtc_init);
diff -urN -X dontdiff b-orig/include/asm-mips/vr41xx/vr41xx.h b/include/asm-mips/vr41xx/vr41xx.h
--- b-orig/include/asm-mips/vr41xx/vr41xx.h	Tue Apr 19 07:57:50 2005
+++ b/include/asm-mips/vr41xx/vr41xx.h	Sat Apr 23 08:51:00 2005
@@ -198,22 +198,6 @@
 extern void vr41xx_disable_bcuint(void);
 
 /*
- * Power Management Unit
- */
-
-/*
- * RTC
- */
-extern void vr41xx_set_rtclong1_cycle(uint32_t cycles);
-extern uint32_t vr41xx_read_rtclong1_counter(void);
-
-extern void vr41xx_set_rtclong2_cycle(uint32_t cycles);
-extern uint32_t vr41xx_read_rtclong2_counter(void);
-
-extern void vr41xx_set_tclock_cycle(uint32_t cycles);
-extern uint32_t vr41xx_read_tclock_counter(void);
-
-/*
  * General-Purpose I/O Unit
  */
 enum {


From wbx@openbsd-geek.de Sun Apr 24 12:34:13 2005
Received: with ECARTIS (v1.0.0; list linux-mips); Sun, 24 Apr 2005 12:34:31 +0100 (BST)
Received: from chrom.openbsd-geek.de ([IPv6:::ffff:217.160.135.112]:30506 "EHLO
	chrom.openbsd-geek.de") by linux-mips.org with ESMTP
	id <S8225801AbVDXLeN>; Sun, 24 Apr 2005 12:34:13 +0100
Received: by chrom.openbsd-geek.de (Postfix, from userid 1000)
	id EE26B32561; Sun, 24 Apr 2005 13:34:11 +0200 (CEST)
Date:	Sun, 24 Apr 2005 13:34:11 +0200
From:	Waldemar Brodkorb <wbx@openbsd-geek.de>
To:	linux-mips <linux-mips@linux-mips.org>
Subject: broadcom wireless driver 
Message-ID: <20050424113411.GA18904@openbsd-geek.de>
Mime-Version: 1.0
Content-Type: text/plain; charset=iso-8859-1
Content-Disposition: inline
X-Editor: VIM
X-Operating-System: OpenBSD 3.6 i386
User-Agent: Mutt/1.5.6i
Return-Path: <wbx@openbsd-geek.de>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 7790
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: wbx@openbsd-geek.de
Precedence: bulk
X-list: linux-mips

Hi MIPS-Hackers,

I have a question regarding the binary only driver from linksys for
the wireless lan chip Broadcom BCM4320. (Linksys WRT54G router)

Linksys source code is based on linux kernel 2.4.20. Some time ago I
ported the stuff over to 2.4.29, which actually works, but has some bugs.

The binary driver wl.o use two structures from the kernel source. 
include/linux/skbuff.h: struct sk_buff{}
include/linux/netdevice.h: struct net_device{}

Both have changed his fields from 2.4.20 to 2.4.30.

Last time i backported both changes and changed some stuff in
net/sched to handle the changes. Now I am searching for a better
solution, because I think I broke traffic shaping.

I can move the new field "struct net_device       *real_dev" in
include/linux/skbuff.h to the end of the defintion and wl.o is happy
with the change. 

But in include/linux/netdevice.h there are two changes, one new
field "struct ethtool_ops *ethtool_ops;" and a type change:
"struct Qdisc            *qdisc_list;" changed to 
"struct list_head        qdisc_list;". 

What is the best way to handle this change, so that wl.o, the
wireless driver and the rest of the kernel is happy?

Thanks for any advice.

bye
    Waldemar

From frederic.temporelli@laposte.net Sun Apr 24 16:34:14 2005
Received: with ECARTIS (v1.0.0; list linux-mips); Sun, 24 Apr 2005 16:34:34 +0100 (BST)
Received: from mailfe08.swip.net ([IPv6:::ffff:212.247.154.225]:50389 "EHLO
	swip.net") by linux-mips.org with ESMTP id <S8224818AbVDXPeO>;
	Sun, 24 Apr 2005 16:34:14 +0100
X-T2-Posting-ID: g63wq726D5fsXb2UbU6LU0KOXzHnTHjCzHZ35sC2MDs=
Received: from [213.102.193.221] (HELO [192.168.0.32])
  by mailfe08.swip.net (CommuniGate Pro SMTP 4.3c5)
  with ESMTP id 152273908 for linux-mips@linux-mips.org; Sun, 24 Apr 2005 17:34:05 +0200
Message-ID: <426BBC6E.5010603@laposte.net>
Date:	Sun, 24 Apr 2005 17:34:06 +0200
From:	Frederic TEMPORELLI <frederic.temporelli@laposte.net>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; fr; rv:1.7.3) Gecko/20040910
X-Accept-Language: fr, en
MIME-Version: 1.0
To:	linux-mips <linux-mips@linux-mips.org>
Subject: O2 IP32: patch for ALSA sound for 2.6.12rc2
Content-Type: multipart/mixed;
 boundary="------------060107080302010002040300"
Return-Path: <frederic.temporelli@laposte.net>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 7791
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: frederic.temporelli@laposte.net
Precedence: bulk
X-list: linux-mips

This is a multi-part message in MIME format.
--------------060107080302010002040300
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit

Hi,

Here's a patch for some ALSA sound stuff on O2 with 2.6.12rc2.

I wasn't able to get sound since 2.6.8.1, so I get back Glaurung's 
"sgio2audio" patch  for 2.6.1 and update it to 2.6.12rc2.
Most of the work was to understand how the driver is working and to 
update it according to ALSA API changes
(I'm not used to work on drivers, moreover on ALSA drivers...)

I've just test the chenages and I've been able to play some music with 
xmms. Still glitches... but I'm thinking that some people will be 
interested.

important comments:
- driver can be used as module (modprobe snd-sgi-o2) . Not tested when 
statically linked to the kernel
modprobe may have to be played twice to get the module loaded (seems 
that AD1843 isn't so easy to init)
- need to be compiled with CONFIG_SND_DEBUG, CONFIG_SND_DEBUG_MEMORY and 
CONFIG_SND_DEBUG_DETECT
=> you should be able to get SGI O2 Audio in ALSA mips section
- I didn't (yet) change anything else:
* still glitches. Vivien was talking about DMA issues...
* mixer not available
- I try to reduce created/modified files:
* create include/sound/ad1843.h (also created with 2.6.1 patch)
* change snd/sound/mips/Kconfig (was created by 2.6.1 patch, but now 
this file is also used for Au1x000 )
* change snd/sound/mips/Makefile (was created by 2.6.1 patch, but now 
this file is also used for Au1x000 )
* create sound/mips/ad1843.c and sound/mips/sgio2audio.c (also created 
with 2.6.1 patch)

==
Fred


--------------060107080302010002040300
Content-Type: text/plain;
 name="o2snd-2_6_12rc2.diff"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
 filename="o2snd-2_6_12rc2.diff"

diff -urN -X dontdiff linux-2.6.12rc2-orig/include/sound/ad1843.h linux-2.6.12rc2-o2snd/include/sound/ad1843.h
--- linux-2.6.12rc2-orig/include/sound/ad1843.h	Thu Jan  1 01:00:00 1970
+++ linux-2.6.12rc2-o2snd/include/sound/ad1843.h	Sun Apr 24 09:57:00 2005
@@ -0,0 +1,47 @@
+/*
+ * This file is subject to the terms and conditions of the GNU General Public
+ * License.  See the file "COPYING" in the main directory of this archive
+ * for more details.
+ *
+ * Copyright 2003 Vivien Chappelier <vivien.chappelier@linux-mips.org>
+ */
+
+#ifndef __SOUND_AD1843_H
+#define __SOUND_AD1843_H
+
+typedef struct {
+  void *chip;
+  int (* read)(void *chip, int reg);
+  int (* write)(void *chip, int reg, int val);
+} ad1843_t;
+
+#define AD1843_GAIN_RECLEV 0
+#define AD1843_GAIN_LINE   1
+#define AD1843_GAIN_CD     2
+#define AD1843_GAIN_MIC    3
+#define AD1843_GAIN_PCM_0  4
+#define AD1843_GAIN_PCM_1  5
+#define AD1843_GAIN_SIZE   AD1843_GAIN_PCM_1+1
+
+int ad1843_get_gain(ad1843_t *ad1843, int id);
+int ad1843_set_gain(ad1843_t *ad1843, int id, int newval);
+int ad1843_get_recsrc(ad1843_t *ad1843);
+void ad1843_set_resample_mode(ad1843_t *ad1843, int onoff);
+int ad1843_set_recsrc(ad1843_t *ad1843, int newsrc);
+int ad1843_get_outsrc(ad1843_t *ad1843);
+int ad1843_set_outsrc(ad1843_t *ad1843, int mask);
+void ad1843_setup_dac(ad1843_t *ad1843,
+                      unsigned int id,
+                      unsigned int framerate,
+                      snd_pcm_format_t fmt,
+                      unsigned int channels);
+void ad1843_shutdown_dac(ad1843_t *ad1843,
+                         unsigned int id);
+void ad1843_setup_adc(ad1843_t *ad1843,
+                      unsigned int framerate,
+                      snd_pcm_format_t fmt,
+                      unsigned int channels);
+void ad1843_shutdown_adc(ad1843_t *ad1843);
+int ad1843_init(ad1843_t *ad1843);
+
+#endif /* __SOUND_AD1843_H */
diff -urN -X dontdiff linux-2.6.12rc2-orig/sound/mips/Kconfig linux-2.6.12rc2-o2snd/sound/mips/Kconfig
--- linux-2.6.12rc2-orig/sound/mips/Kconfig	Wed Oct 27 07:12:38 2004
+++ linux-2.6.12rc2-o2snd/sound/mips/Kconfig	Sun Apr 24 10:02:31 2005
@@ -11,5 +11,11 @@
 	help
 	  ALSA Sound driver for the Au1x00's AC97 port.
 
+config SND_SGI_O2
+	tristate "SGI O2 Audio"
+	depends on  SND && SGI_IP32
+        help
+                Sound support for the SGI O2 Workstation. 
+
 endmenu
 
diff -urN -X dontdiff linux-2.6.12rc2-orig/sound/mips/Makefile linux-2.6.12rc2-o2snd/sound/mips/Makefile
--- linux-2.6.12rc2-orig/sound/mips/Makefile	Wed Oct 27 07:10:46 2004
+++ linux-2.6.12rc2-o2snd/sound/mips/Makefile	Sun Apr 24 16:44:00 2005
@@ -2,7 +2,9 @@
 # Makefile for ALSA
 #
 
+snd-sgi-o2-objs := sgio2audio.o ad1843.o
 snd-au1x00-objs := au1x00.o
 
 # Toplevel Module Dependency
 obj-$(CONFIG_SND_AU1X00) += snd-au1x00.o
+obj-$(CONFIG_SND_SGI_O2) += snd-sgi-o2.o
diff -urN -X dontdiff linux-2.6.12rc2-orig/sound/mips/ad1843.c linux-2.6.12rc2-o2snd/sound/mips/ad1843.c
--- linux-2.6.12rc2-orig/sound/mips/ad1843.c	Thu Jan  1 01:00:00 1970
+++ linux-2.6.12rc2-o2snd/sound/mips/ad1843.c	Sun Apr 24 09:57:00 2005
@@ -0,0 +1,624 @@
+/*
+ *   AD1843 low level driver
+ *
+ *   Copyright 2003 Vivien Chappelier <vivien.chappelier@linux-mips.org>
+ *
+ *   inspired from vwsnd.c (SGI VW audio driver)
+ *     Copyright 1999 Silicon Graphics, Inc.  All rights reserved.
+ *
+ *   This program is free software; you can redistribute it and/or modify
+ *   it under the terms of the GNU General Public License as published by
+ *   the Free Software Foundation; either version 2 of the License, or
+ *   (at your option) any later version.
+ *
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+ *
+ */
+
+#include <linux/config.h>
+#include <linux/slab.h>
+
+#include <linux/init.h>
+#include <linux/jiffies.h>
+#include <linux/sched.h>
+#include <linux/errno.h>
+#include <sound/driver.h>
+#include <sound/core.h>
+#include <sound/pcm.h>
+#include <sound/initval.h>
+#include <sound/ad1843.h>
+
+// TEMP: OSS stuff
+#include <linux/soundcard.h>
+
+/*
+ * AD1843 bitfield definitions.  All are named as in the AD1843 data
+ * sheet, with ad1843_ prepended and individual bit numbers removed.
+ *
+ * E.g., bits LSS0 through LSS2 become ad1843_LSS.
+ *
+ * Only the bitfields we need are defined.
+ */
+
+typedef struct ad1843_bitfield {
+	char reg;
+	char lo_bit;
+	char nbits;
+} ad1843_bitfield_t;
+
+static const ad1843_bitfield_t
+	ad1843_PDNO   = {  0, 14,  1 },	/* Converter Power-Down Flag */
+	ad1843_INIT   = {  0, 15,  1 },	/* Clock Initialization Flag */
+	ad1843_RIG    = {  2,  0,  4 },	/* Right ADC Input Gain */
+	ad1843_RMGE   = {  2,  4,  1 },	/* Right ADC Mic Gain Enable */
+	ad1843_RSS    = {  2,  5,  3 },	/* Right ADC Source Select */
+	ad1843_LIG    = {  2,  8,  4 },	/* Left ADC Input Gain */
+	ad1843_LMGE   = {  2, 12,  1 },	/* Left ADC Mic Gain Enable */
+	ad1843_LSS    = {  2, 13,  3 },	/* Left ADC Source Select */
+	ad1843_RX1M   = {  4,  0,  5 },	/* Right Aux 1 Mix Gain/Atten */
+	ad1843_RX1MM  = {  4,  7,  1 },	/* Right Aux 1 Mix Mute */
+	ad1843_LX1M   = {  4,  8,  5 },	/* Left Aux 1 Mix Gain/Atten */
+	ad1843_LX1MM  = {  4, 15,  1 },	/* Left Aux 1 Mix Mute */
+	ad1843_RX2M   = {  5,  0,  5 },	/* Right Aux 2 Mix Gain/Atten */
+	ad1843_RX2MM  = {  5,  7,  1 },	/* Right Aux 2 Mix Mute */
+	ad1843_LX2M   = {  5,  8,  5 },	/* Left Aux 2 Mix Gain/Atten */
+	ad1843_LX2MM  = {  5, 15,  1 },	/* Left Aux 2 Mix Mute */
+	ad1843_RMCM   = {  7,  0,  5 },	/* Right Mic Mix Gain/Atten */
+	ad1843_RMCMM  = {  7,  7,  1 },	/* Right Mic Mix Mute */
+	ad1843_LMCM   = {  7,  8,  5 },	/* Left Mic Mix Gain/Atten */
+	ad1843_LMCMM  = {  7, 15,  1 },	/* Left Mic Mix Mute */
+	ad1843_HPOS   = {  8,  4,  1 },	/* Headphone Output Voltage Swing */
+	ad1843_HPOM   = {  8,  5,  1 },	/* Headphone Output Mute */
+	ad1843_MPOM   = {  8,  6,  1 },	/* Mono Output Mute */
+	ad1843_RDA1G  = {  9,  0,  6 },	/* Right DAC1 Analog/Digital Gain */
+	ad1843_RDA1GM = {  9,  7,  1 },	/* Right DAC1 Analog Mute */
+	ad1843_LDA1G  = {  9,  8,  6 },	/* Left DAC1 Analog/Digital Gain */
+	ad1843_LDA1GM = {  9, 15,  1 },	/* Left DAC1 Analog Mute */
+	ad1843_RDA2G  = {  9,  0,  6 },	/* Right DAC2 Analog/Digital Gain */
+	ad1843_RDA2GM = {  9,  7,  1 },	/* Right DAC2 Analog Mute */
+	ad1843_LDA2G  = {  9,  8,  6 },	/* Left DAC2 Analog/Digital Gain */
+	ad1843_LDA2GM = {  9, 15,  1 },	/* Left DAC2 Analog Mute */
+	ad1843_RDA1AM = { 11,  7,  1 },	/* Right DAC1 Digital Mute */
+	ad1843_LDA1AM = { 11, 15,  1 },	/* Left DAC1 Digital Mute */
+	ad1843_RDA2AM = { 11,  7,  1 },	/* Right DAC1 Digital Mute */
+	ad1843_LDA2AM = { 11, 15,  1 },	/* Left DAC1 Digital Mute */
+	ad1843_ADLC   = { 15,  0,  2 },	/* ADC Left Sample Rate Source */
+	ad1843_ADRC   = { 15,  2,  2 },	/* ADC Right Sample Rate Source */
+	ad1843_DA1C   = { 15,  8,  2 },	/* DAC1 Sample Rate Source */
+	ad1843_DA2C   = { 15, 10,  2 },	/* DAC2 Sample Rate Source */
+	ad1843_C1C    = { 17,  0, 16 },	/* Clock 1 Sample Rate Select */
+	ad1843_C2C    = { 20,  0, 16 },	/* Clock 2 Sample Rate Select */
+	ad1843_C3C    = { 23,  0, 16 },	/* Clock 3 Sample Rate Select */
+	ad1843_DAADL  = { 25,  4,  2 },	/* Digital ADC Left Source Select */
+	ad1843_DAADR  = { 25,  6,  2 },	/* Digital ADC Right Source Select */
+	ad1843_DRSFLT = { 25, 15,  1 },	/* Digital Reampler Filter Mode */
+	ad1843_ADLF   = { 26,  0,  2 }, /* ADC Left Channel Data Format */
+	ad1843_ADRF   = { 26,  2,  2 }, /* ADC Right Channel Data Format */
+	ad1843_ADTLK  = { 26,  4,  1 },	/* ADC Transmit Lock Mode Select */
+	ad1843_SCF    = { 26,  7,  1 },	/* SCLK Frequency Select */
+	ad1843_DA1F   = { 26,  8,  2 },	/* DAC1 Data Format Select */
+	ad1843_DA2F   = { 26, 10,  2 },	/* DAC2 Data Format Select */
+	ad1843_DA1SM  = { 26, 14,  1 },	/* DAC1 Stereo/Mono Mode Select */
+	ad1843_DA2SM  = { 26, 15,  1 },	/* DAC2 Stereo/Mono Mode Select */
+	ad1843_ADLEN  = { 27,  0,  1 },	/* ADC Left Channel Enable */
+	ad1843_ADREN  = { 27,  1,  1 },	/* ADC Right Channel Enable */
+	ad1843_AAMEN  = { 27,  4,  1 },	/* Analog to Analog Mix Enable */
+	ad1843_ANAEN  = { 27,  7,  1 },	/* Analog Channel Enable */
+	ad1843_DA1EN  = { 27,  8,  1 },	/* DAC1 Enable */
+	ad1843_DA2EN  = { 27,  9,  1 },	/* DAC2 Enable */
+	ad1843_C1EN   = { 28, 11,  1 },	/* Clock Generator 1 Enable */
+	ad1843_C2EN   = { 28, 12,  1 },	/* Clock Generator 2 Enable */
+	ad1843_C3EN   = { 28, 13,  1 },	/* Clock Generator 3 Enable */
+	ad1843_PDNI   = { 28, 15,  1 };	/* Converter Power Down */
+
+/*
+ * The various registers of the AD1843 use three different formats for
+ * specifying gain.  The ad1843_gain structure parameterizes the
+ * formats.
+ */
+
+typedef struct ad1843_gain {
+	int	negative;		/* nonzero if gain is negative. */
+	const ad1843_bitfield_t *lfield;
+	const ad1843_bitfield_t *rfield;
+} ad1843_gain_t;
+
+const ad1843_gain_t ad1843_gain_RECLEV
+				= { 0, &ad1843_LIG,   &ad1843_RIG };
+const ad1843_gain_t ad1843_gain_LINE
+				= { 1, &ad1843_LX1M,  &ad1843_RX1M };
+const ad1843_gain_t ad1843_gain_CD
+				= { 1, &ad1843_LX2M,  &ad1843_RX2M };
+const ad1843_gain_t ad1843_gain_MIC
+				= { 1, &ad1843_LMCM,  &ad1843_RMCM };
+const ad1843_gain_t ad1843_gain_PCM_0
+				= { 1, &ad1843_LDA1G, &ad1843_RDA1G };
+const ad1843_gain_t ad1843_gain_PCM_1
+				= { 1, &ad1843_LDA2G, &ad1843_RDA2G };
+
+const ad1843_gain_t *ad1843_gain[AD1843_GAIN_SIZE] = {
+  &ad1843_gain_RECLEV,
+  &ad1843_gain_LINE,
+  &ad1843_gain_CD,
+  &ad1843_gain_MIC,
+  &ad1843_gain_PCM_0,
+  &ad1843_gain_PCM_1,
+};
+
+/* read the current value of an AD1843 bitfield. */
+
+static int ad1843_read_bits(ad1843_t *ad1843, const ad1843_bitfield_t *field)
+{
+	int w = ad1843->read(ad1843->chip, field->reg);
+	int val = w >> field->lo_bit & ((1 << field->nbits) - 1);
+
+	return val;
+}
+
+/*
+ * write a new value to an AD1843 bitfield and return the old value.
+ */
+
+static int ad1843_write_bits(ad1843_t *ad1843,
+			     const ad1843_bitfield_t *field,
+			     int newval)
+{
+	int w = ad1843->read(ad1843->chip, field->reg);
+	int mask = ((1 << field->nbits) - 1) << field->lo_bit;
+	int oldval = (w & mask) >> field->lo_bit;
+	int newbits = (newval << field->lo_bit) & mask;
+	w = (w & ~mask) | newbits;
+	(void) ad1843->write(ad1843->chip, field->reg, w);
+
+	return oldval;
+}
+
+/*
+ * ad1843_read_multi reads multiple bitfields from the same AD1843
+ * register.  It uses a single read cycle to do it.  (Reading the
+ * ad1843 requires 256 bit times at 12.288 MHz, or nearly 20
+ * microseconds.)
+ *
+ * Called like this.
+ *
+ *  ad1843_read_multi(ad1843, nfields,
+ *		      &ad1843_FIELD1, &val1,
+ *		      &ad1843_FIELD2, &val2, ...);
+ */
+
+static void ad1843_read_multi(ad1843_t *ad1843, int argcount, ...)
+{
+	va_list ap;
+	const ad1843_bitfield_t *fp;
+	int w = 0, mask, *value, reg = -1;
+
+	va_start(ap, argcount);
+	while (--argcount >= 0) {
+		fp = va_arg(ap, const ad1843_bitfield_t *);
+		value = va_arg(ap, int *);
+		if (reg == -1) {
+			reg = fp->reg;
+			w = ad1843->read(ad1843->chip, reg);
+		}
+
+		mask = (1 << fp->nbits) - 1;
+		*value = w >> fp->lo_bit & mask;
+	}
+	va_end(ap);
+}
+
+/*
+ * ad1843_write_multi stores multiple bitfields into the same AD1843
+ * register.  It uses one read and one write cycle to do it.
+ *
+ * Called like this.
+ *
+ *  ad1843_write_multi(ad1843, nfields,
+ *		       &ad1843_FIELD1, val1,
+ *		       &ad1843_FIELF2, val2, ...);
+ */
+
+static void ad1843_write_multi(ad1843_t *ad1843, int argcount, ...)
+{
+	va_list ap;
+	int reg;
+	const ad1843_bitfield_t *fp;
+	int value;
+	int w, m, mask, bits;
+
+	mask = 0;
+	bits = 0;
+	reg = -1;
+
+	va_start(ap, argcount);
+	while (--argcount >= 0) {
+		fp = va_arg(ap, const ad1843_bitfield_t *);
+		value = va_arg(ap, int);
+		if (reg == -1)
+			reg = fp->reg;
+
+		m = ((1 << fp->nbits) - 1) << fp->lo_bit;
+		mask |= m;
+		bits |= (value << fp->lo_bit) & m;
+	}
+	va_end(ap);
+
+	if (~mask & 0xFFFF)
+		w = ad1843->read(ad1843->chip, reg);
+	else
+		w = 0;
+	w = (w & ~mask) | bits;
+	(void) ad1843->write(ad1843->chip, reg, w);
+}
+
+/*
+ * ad1843_get_gain reads the specified register and extracts the gain value
+ * using the supplied gain type.  It returns the gain in OSS format.
+ */
+
+int ad1843_get_gain(ad1843_t *ad1843, int id)
+{
+	int lg, rg;
+        const ad1843_gain_t *gp = ad1843_gain[id];
+	unsigned short mask = (1 << gp->lfield->nbits) - 1;
+
+	ad1843_read_multi(ad1843, 2, gp->lfield, &lg, gp->rfield, &rg);
+	if (gp->negative) {
+		lg = mask - lg;
+		rg = mask - rg;
+	}
+	lg = (lg * 100 + (mask >> 1)) / mask;
+	rg = (rg * 100 + (mask >> 1)) / mask;
+	return lg << 0 | rg << 8;
+}
+
+/*
+ * Set an audio channel's gain. Converts from OSS format to AD1843's
+ * format.
+ *
+ * Returns the new gain, which may be lower than the old gain.
+ */
+
+int ad1843_set_gain(ad1843_t *ad1843,
+                    int id,
+                    int newval)
+{
+        const ad1843_gain_t *gp = ad1843_gain[id];
+	unsigned short mask = (1 << gp->lfield->nbits) - 1;
+
+	int lg = newval >> 0 & 0xFF;
+	int rg = newval >> 8;
+	if (lg < 0 || lg > 100 || rg < 0 || rg > 100)
+		return -EINVAL;
+	lg = (lg * mask + (mask >> 1)) / 100;
+	rg = (rg * mask + (mask >> 1)) / 100;
+	if (gp->negative) {
+		lg = mask - lg;
+		rg = mask - rg;
+	}
+	ad1843_write_multi(ad1843, 2, gp->lfield, lg, gp->rfield, rg);
+	return ad1843_get_gain(ad1843, id);
+}
+
+/* Returns the current recording source, in OSS format. */
+
+int ad1843_get_recsrc(ad1843_t *ad1843)
+{
+	int ls = ad1843_read_bits(ad1843, &ad1843_LSS);
+
+	switch (ls) {
+	case 1:
+		return SOUND_MASK_MIC;
+	case 2:
+		return SOUND_MASK_LINE;
+	case 3:
+		return SOUND_MASK_CD;
+	case 6:
+		return SOUND_MASK_PCM;
+	default:
+		return -1;
+	}
+}
+
+/*
+ * Enable/disable digital resample mode in the AD1843.
+ *
+ * The AD1843 requires that ADL, ADR, DA1 and DA2 be powered down
+ * while switching modes.  So we save DA's state, power them down,
+ * switch into/out of resample mode, power them up, and restore state.
+ *
+ * This will cause audible glitches if D/A or A/D is going on, so the
+ * driver disallows that (in mixer_write_ioctl()).
+ *
+ * The open question is, is this worth doing?  I'm leaving it in,
+ * because it's written, but...
+ */
+
+void ad1843_set_resample_mode(ad1843_t *ad1843, int onoff)
+{
+	/* Save DA's mute and gain (addr 9/10 is analog gain/attenuation) */
+	int save_da1 = ad1843->read(ad1843->chip, 9);
+	int save_da2 = ad1843->read(ad1843->chip, 10);
+
+	/* Power down A/D and D/A. */
+	ad1843_write_multi(ad1843, 4,
+			   &ad1843_DA1EN, 0,
+			   &ad1843_DA2EN, 0,
+			   &ad1843_ADLEN, 0,
+			   &ad1843_ADREN, 0);
+
+	/* Switch mode */
+	ad1843_write_bits(ad1843, &ad1843_DRSFLT, onoff);
+
+ 	/* Power up A/D and D/A. */
+	ad1843_write_multi(ad1843, 3,
+			   &ad1843_DA1EN, 1,
+			   &ad1843_DA2EN, 1,
+			   &ad1843_ADLEN, 1,
+			   &ad1843_ADREN, 1);
+
+	/* Restore DA's mute and gain. */
+	ad1843->write(ad1843->chip, 9, save_da1);
+	ad1843->write(ad1843->chip, 10, save_da2);
+}
+
+/*
+ * Set recording source.  Arg newsrc specifies an OSS channel mask.
+ *
+ * The complication is that when we switch into/out of loopback mode
+ * (i.e., src = SOUND_MASK_PCM), we change the AD1843 into/out of
+ * digital resampling mode.
+ *
+ * Returns newsrc on success, -errno on failure.
+ */
+
+int ad1843_set_recsrc(ad1843_t *ad1843, int newsrc)
+{
+	int bits;
+	int oldbits;
+
+	switch (newsrc) {
+	case SOUND_MASK_PCM:
+		bits = 6;
+		break;
+
+	case SOUND_MASK_MIC:
+		bits = 1;
+		break;
+
+	case SOUND_MASK_LINE:
+		bits = 2;
+		break;
+
+	case SOUND_MASK_CD:
+		bits = 3;
+		break;
+
+	default:
+		return -EINVAL;
+	}
+	oldbits = ad1843_read_bits(ad1843, &ad1843_LSS);
+	if (newsrc == SOUND_MASK_PCM && oldbits != 6) {
+
+		ad1843_set_resample_mode(ad1843, 1);
+		ad1843_write_multi(ad1843, 2,
+				   &ad1843_DAADL, 2,
+				   &ad1843_DAADR, 2);
+	} else if (newsrc != SOUND_MASK_PCM && oldbits == 6) {
+
+		ad1843_set_resample_mode(ad1843, 0);
+		ad1843_write_multi(ad1843, 2,
+				   &ad1843_DAADL, 0,
+				   &ad1843_DAADR, 0);
+	}
+	ad1843_write_multi(ad1843, 2, &ad1843_LSS, bits, &ad1843_RSS, bits);
+	return newsrc;
+}
+
+/*
+ * Return current output sources, in OSS format.
+ */
+
+int ad1843_get_outsrc(ad1843_t *ad1843)
+{
+	int pcm, line, mic, cd;
+
+	pcm  = ad1843_read_bits(ad1843, &ad1843_LDA1GM) ? 0 : SOUND_MASK_PCM;
+	line = ad1843_read_bits(ad1843, &ad1843_LX1MM)  ? 0 : SOUND_MASK_LINE;
+	cd   = ad1843_read_bits(ad1843, &ad1843_LX2MM)  ? 0 : SOUND_MASK_CD;
+	mic  = ad1843_read_bits(ad1843, &ad1843_LMCMM)  ? 0 : SOUND_MASK_MIC;
+
+	return pcm | line | cd | mic;
+}
+
+/*
+ * Set output sources.  Arg is a mask of active sources in OSS format.
+ *
+ * Returns source mask on success, -errno on failure.
+ */
+
+int ad1843_set_outsrc(ad1843_t *ad1843, int mask)
+{
+	int pcm, line, mic, cd;
+
+	if (mask & ~(SOUND_MASK_PCM | SOUND_MASK_LINE |
+		     SOUND_MASK_CD | SOUND_MASK_MIC))
+		return -EINVAL;
+	pcm  = (mask & SOUND_MASK_PCM)  ? 0 : 1;
+	line = (mask & SOUND_MASK_LINE) ? 0 : 1;
+	mic  = (mask & SOUND_MASK_MIC)  ? 0 : 1;
+	cd   = (mask & SOUND_MASK_CD)   ? 0 : 1;
+
+	ad1843_write_multi(ad1843, 2, &ad1843_LDA1GM, pcm, &ad1843_RDA1GM, pcm);
+	ad1843_write_multi(ad1843, 2, &ad1843_LX1MM, line, &ad1843_RX1MM, line);
+	ad1843_write_multi(ad1843, 2, &ad1843_LX2MM, cd,   &ad1843_RX2MM, cd);
+	ad1843_write_multi(ad1843, 2, &ad1843_LMCMM, mic,  &ad1843_RMCMM, mic);
+
+	return mask;
+}
+
+/* Setup ad1843 for D/A conversion. */
+
+void ad1843_setup_dac(ad1843_t *ad1843,
+                      unsigned int id,
+                      unsigned int framerate,
+                      snd_pcm_format_t fmt,
+                      unsigned int channels)
+{
+	int ad_fmt = 0, ad_mode = 0;
+
+	switch (fmt) {
+	case SNDRV_PCM_FORMAT_S8:	ad_fmt = 0; break;
+	case SNDRV_PCM_FORMAT_U8:	ad_fmt = 0; break;
+	case SNDRV_PCM_FORMAT_S16_LE:	ad_fmt = 1; break;
+	case SNDRV_PCM_FORMAT_MU_LAW:	ad_fmt = 2; break;
+	case SNDRV_PCM_FORMAT_A_LAW:	ad_fmt = 3; break;
+	default:		break;
+	}
+
+	switch (channels) {
+	case 2:			ad_mode = 0; break;
+	case 1:			ad_mode = 1; break;
+	default:		break;
+	}
+	
+        if(id) {
+		ad1843_write_bits(ad1843, &ad1843_C2C, framerate);
+		ad1843_write_multi(ad1843, 2,
+				   &ad1843_DA2SM, ad_mode,
+				   &ad1843_DA2F, ad_fmt);
+        } else {
+		ad1843_write_bits(ad1843, &ad1843_C1C, framerate);
+		ad1843_write_multi(ad1843, 2,
+				   &ad1843_DA1SM, ad_mode,
+				   &ad1843_DA1F, ad_fmt);
+	}
+}
+
+void ad1843_shutdown_dac(ad1843_t *ad1843, unsigned int id)
+{
+	if(id)
+		ad1843_write_bits(ad1843, &ad1843_DA2F, 1);
+        else
+		ad1843_write_bits(ad1843, &ad1843_DA1F, 1);
+}
+
+void ad1843_setup_adc(ad1843_t *ad1843,
+                      unsigned int framerate,
+                      snd_pcm_format_t fmt,
+                      unsigned int channels)
+{
+	int da_fmt = 0;
+
+	switch (fmt) {
+	case SNDRV_PCM_FORMAT_S8:	da_fmt = 0; break;
+	case SNDRV_PCM_FORMAT_U8:	da_fmt = 0; break;
+	case SNDRV_PCM_FORMAT_S16_LE:	da_fmt = 1; break;
+	case SNDRV_PCM_FORMAT_MU_LAW:	da_fmt = 2; break;
+	case SNDRV_PCM_FORMAT_A_LAW:	da_fmt = 3; break;
+	default:		break;
+	}
+
+	ad1843_write_bits(ad1843, &ad1843_C3C, framerate);
+	ad1843_write_multi(ad1843, 2,
+			   &ad1843_ADLF, da_fmt, &ad1843_ADRF, da_fmt);
+}
+
+void ad1843_shutdown_adc(ad1843_t *ad1843)
+{
+	/* nothing to do */
+}
+
+/*
+ * Fully initialize the ad1843.  As described in the AD1843 data
+ * sheet, section "START-UP SEQUENCE".  The numbered comments are
+ * subsection headings from the data sheet.  See the data sheet, pages
+ * 52-54, for more info.
+ *
+ * return 0 on success, -errno on failure.  */
+
+int ad1843_init(ad1843_t *ad1843)
+{
+	unsigned long later;
+
+	if (ad1843_read_bits(ad1843, &ad1843_INIT) != 0) {
+		printk(KERN_ERR "ad1843: AD1843 won't initialize\n");
+		return -EIO;
+	}
+
+	ad1843_write_bits(ad1843, &ad1843_SCF, 1);
+
+	/* 4. Put the conversion resources into standby. */
+	ad1843_write_bits(ad1843, &ad1843_PDNI, 0);
+	later = jiffies + HZ / 2;	/* roughly half a second */
+
+	while (ad1843_read_bits(ad1843, &ad1843_PDNO)) {
+		if (time_after(jiffies, later)) {
+			printk(KERN_ERR
+			       "ad1843: AD1843 won't power up\n");
+			return -EIO;
+		}
+		schedule();
+	}
+
+	/* 5. Power up the clock generators and enable clock output pins. */
+	ad1843_write_multi(ad1843, 3,
+                           &ad1843_C1EN, 1,
+                           &ad1843_C2EN, 1,
+                           &ad1843_C3EN, 1);
+
+	/* 6. Configure conversion resources while they are in standby. */
+
+ 	/* DAC1/2 use clock 1/2 as source, ADC uses clock 3.  Always. */
+	ad1843_write_multi(ad1843, 3,
+			   &ad1843_DA1C, 1,
+			   &ad1843_DA1C, 2,
+			   &ad1843_ADLC, 3,
+			   &ad1843_ADRC, 3);
+
+	/* 7. Enable conversion resources. */
+	ad1843_write_bits(ad1843, &ad1843_ADTLK, 1);
+	ad1843_write_multi(ad1843, 5,
+			   &ad1843_ANAEN, 1,
+			   &ad1843_AAMEN, 1,
+			   &ad1843_DA1EN, 1,
+			   &ad1843_DA2EN, 1,
+			   &ad1843_ADLEN, 1,
+			   &ad1843_ADREN, 1);
+
+	/* 8. Configure conversion resources while they are enabled. */
+	ad1843_write_bits(ad1843, &ad1843_DA1C, 1);
+	ad1843_write_bits(ad1843, &ad1843_DA2C, 1);
+
+	/* Unmute all channels. */
+
+	ad1843_set_outsrc(ad1843,
+			  (SOUND_MASK_PCM | SOUND_MASK_LINE |
+			   SOUND_MASK_MIC | SOUND_MASK_CD));
+	ad1843_write_multi(ad1843, 4,
+                           &ad1843_LDA1AM, 0,
+                           &ad1843_RDA1AM, 0,
+                           &ad1843_LDA2AM, 0,
+                           &ad1843_RDA2AM, 0);
+
+	/* Set default recording source to Line In and set
+	 * mic gain to +20 dB.
+	 */
+	ad1843_set_recsrc(ad1843, SOUND_MASK_LINE);
+	ad1843_write_multi(ad1843, 2, &ad1843_LMGE, 1, &ad1843_RMGE, 1);
+
+	/* Set Speaker Out level to +/- 4V and unmute it. */
+	ad1843_write_multi(ad1843, 3,
+                           &ad1843_HPOS, 1,
+                           &ad1843_HPOM, 0,
+                           &ad1843_MPOM, 0);
+
+	return 0;
+}
diff -urN -X dontdiff linux-2.6.12rc2-orig/sound/mips/sgio2audio.c linux-2.6.12rc2-o2snd/sound/mips/sgio2audio.c
--- linux-2.6.12rc2-orig/sound/mips/sgio2audio.c	Thu Jan  1 01:00:00 1970
+++ linux-2.6.12rc2-o2snd/sound/mips/sgio2audio.c	Sun Apr 24 16:09:20 2005
@@ -0,0 +1,794 @@
+/*
+ *   Sound driver for Silicon Graphics O2 Workstations A/V board audio.
+ *
+ *   Copyright 2003 Vivien Chappelier <vivien.chappelier@linux-mips.org>
+ *
+ *   INCOMPLETE:
+ *        - finish PCM, 
+ *            . check why dma_area buffer is not filled correcly
+ *            . finish/test 2nd DAC
+ *            . recording
+ *        - mixer and controls
+ *        - /proc interface
+ *
+ *   This program is free software; you can redistribute it and/or modify
+ *   it under the terms of the GNU General Public License as published by
+ *   the Free Software Foundation; either version 2 of the License, or
+ *   (at your option) any later version.
+ *
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+ *
+ */
+
+#include <sound/driver.h>
+#include <linux/version.h>
+#include <linux/init.h>
+// #if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 5, 0)
+#include <linux/jiffies.h>
+// #else
+// #include <linux/sched.h>
+// #endif
+#include <linux/slab.h>
+#include <linux/time.h>
+#include <linux/wait.h>
+#include <linux/delay.h>
+#include <linux/spinlock.h>
+#include <linux/gfp.h>
+#include <linux/vmalloc.h>
+#include <linux/interrupt.h>
+#include <sound/core.h>
+#include <sound/control.h>
+#include <sound/pcm.h>
+#define SNDRV_GET_ID
+#include <sound/initval.h>
+#include <sound/ad1843.h>
+
+#include <asm/io.h>
+#include <asm/ip32/ip32_ints.h>
+#include <asm/ip32/mace.h>
+
+
+
+MODULE_AUTHOR("Vivien Chappelier <vivien.chappelier@linux-mips.org>");
+MODULE_DESCRIPTION("SGI O2 Audio");
+MODULE_LICENSE("GPL");
+MODULE_SUPPORTED_DEVICE("{{Silicon Graphics, O2 Audio}}");
+/* oldies, kernel < 2.6.8MODULE_CLASSES("{sound}");
+MODULE_DEVICES("{{Silicon Graphics, O2 Audio}}"); */
+
+#define SGIO2AUDIO_MAX_VOLUME 1000
+
+#define AUDIO_CONTROL_RESET              BIT(0) /* 1: reset audio interface */
+#define AUDIO_CONTROL_CODEC_PRESENT      BIT(1) /* 1: codec detected */
+/*  2-8  : channel 1 write ptr alias */
+/*  9-15 : channel 2 read ptr alias */
+/* 16-22 : channel 3 read ptr alias */
+#define AUDIO_CONTROL_VOLUME_BUTTON_UP   BIT(23) /* latched volume button */
+#define AUDIO_CONTROL_VOLUME_BUTTON_DOWN BIT(24) /* latched volume button */
+
+#define CODEC_CONTROL_WORD_SHIFT 0
+#define CODEC_CONTROL_WORD_MASK ((1 << 16) - 1)
+#define CODEC_CONTROL_READ BIT(16)
+#define CODEC_CONTROL_ADDRESS_SHIFT 17
+#define CODEC_CONTROL_ADDRESS_MASK ((1 << 7) - 1)
+
+#define CHANNEL_PTR_SHIFT     5
+#define CHANNEL_PTR_MASK      ((1 << 6) - 1)
+#define CHANNEL_CONTROL_RESET BIT(10) /* 1: reset channel */
+#define CHANNEL_DMA_ENABLE    BIT(9)  /* 1: enable DMA transfer */
+#define CHANNEL_INT_THRESHOLD_DISABLED  (0 << 5) /* interrupt disabled */
+#define CHANNEL_INT_THRESHOLD_25        (1 << 5) /* int on buffer >25% full */
+#define CHANNEL_INT_THRESHOLD_50        (2 << 5) /* int on buffer >50% full */
+#define CHANNEL_INT_THRESHOLD_75        (3 << 5) /* int on buffer >75% full */
+#define CHANNEL_INT_THRESHOLD_EMPTY     (4 << 5) /* int on buffer empty */
+#define CHANNEL_INT_THRESHOLD_NOT_EMPTY (5 << 5) /* int on buffer !empty */
+#define CHANNEL_INT_THRESHOLD_FULL      (6 << 5) /* int on buffer empty */
+#define CHANNEL_INT_THRESHOLD_NOT_FULL  (7 << 5) /* int on buffer !empty */
+
+#define CHANNEL_IN_BASE   (0 << 12)
+#define CHANNEL_OUT1_BASE (1 << 12)
+#define CHANNEL_OUT2_BASE (2 << 12)
+
+#define CHANNEL_RING_SHIFT 12
+#define CHANNEL_RING_SIZE (1 << CHANNEL_RING_SHIFT)
+#define CHANNEL_RING_MASK (CHANNEL_RING_SIZE - 1)
+
+#define CHANNEL_LEFT_SHIFT 40
+#define CHANNEL_RIGHT_SHIFT 8
+
+#define mace_read(r)	(sizeof(r) == 4 ? readl(&r) : readq(&r))
+#define mace_write(v,r)	(sizeof(r) == 4 ? writel(v,&r) : writeq(v,&r))
+#define mace_perif_audio_read(r)	mace_read(mace->perif.audio.r)
+#define mace_perif_audio_write(v,r)	mace_write(v,mace->perif.audio.r)
+
+static int enable = 1;
+struct sgi_mace *mace;
+// static int pcm_dev = 1;
+// static int pcm_substreams = 8;
+/*
+MODULE_PARM(enable, "i");
+MODULE_PARM_DESC(enable, "Enable SGI O2 soundcard.");
+MODULE_PARM_SYNTAX(enable, SNDRV_ENABLE_DESC);
+MODULE_PARM(pcm_devs, "i");
+MODULE_PARM_DESC(pcm_devs, "PCM devices # (0-4) for sgio2au driver.");
+MODULE_PARM_SYNTAX(pcm_devs, SNDRV_ENABLED ",allows:{{0,4}},default:1,dialog:list");
+MODULE_PARM(pcm_substreams, "i");
+MODULE_PARM_DESC(pcm_substreams, "PCM substreams # (1-16) for sgio2au driver.");
+MODULE_PARM_SYNTAX(pcm_substreams, SNDRV_ENABLED ",allows:{{1,16}},default:8,dialog:list");
+*/
+static snd_card_t *snd_sgio2audio_card = SNDRV_DEFAULT_PTR1;
+
+/* definition of the chip-specific record */
+typedef struct snd_sgio2audio sgio2audio_t;
+struct snd_sgio2audio {
+	snd_card_t *card;
+
+	snd_pcm_t *pcm;
+
+	/* codec */
+ 	ad1843_t *ad1843;
+        spinlock_t ad1843_lock;
+
+        /* channels */
+        struct {
+                snd_pcm_substream_t *substream;
+                void * buffer;
+                unsigned int pos;
+                snd_pcm_uframes_t size;
+                spinlock_t lock;
+        } channel[3];
+
+	/* properties */
+	int volume;
+	snd_pcm_format_t format;
+
+	/* resources */
+        void *ring_base;
+	int irq_start;
+	int irq_end;
+};
+#define chip_t sgio2audio_t
+/* TODO: this should be go into <sound/sndmagic.h> */
+#define sgio2audio_t_magic        0xa15a4501
+
+/* PCM hardware definition */
+static snd_pcm_hardware_t snd_sgio2audio_playback_hw = {
+        .info = (SNDRV_PCM_INFO_MMAP | 
+                 SNDRV_PCM_INFO_MMAP_VALID |
+                 SNDRV_PCM_INFO_INTERLEAVED |
+                 SNDRV_PCM_INFO_BLOCK_TRANSFER),
+        .formats =          SNDRV_PCM_FMTBIT_S16_BE,
+        .rates =            SNDRV_PCM_RATE_8000_48000,
+        .rate_min =         8000,
+        .rate_max =         48000,
+        .channels_min =     2,
+        .channels_max =     2,
+        .buffer_bytes_max = 65536,
+        .period_bytes_min = 32768,
+        .period_bytes_max = 65536,
+        .periods_min =      1,
+        .periods_max =      1024,
+};
+
+/* AD1843 access */
+
+/*
+ * read_ad1843_reg returns the current contents of a 16 bit AD1843 register.
+ *
+ * Returns unsigned register value on success, -errno on failure.
+ */
+
+static int read_ad1843_reg(void *priv, int reg)
+{
+	sgio2audio_t *chip = (sgio2audio_t *) priv;
+	int val;
+        unsigned long flags;
+
+        spin_lock_irqsave(&chip->ad1843_lock, flags);
+
+        mace_write((reg << CODEC_CONTROL_ADDRESS_SHIFT) |
+                               CODEC_CONTROL_READ, mace->perif.audio.codec_control);
+        wmb();
+        val = mace_read(mace->perif.audio.codec_control); /* flush bus */
+        udelay(200);
+
+        val = mace_read(mace->perif.audio.codec_read);
+
+	spin_unlock_irqrestore(&chip->ad1843_lock, flags);
+
+	return val;
+}
+
+/*
+ * write_ad1843_reg writes the specified value to a 16 bit AD1843 register.
+ */
+
+static int write_ad1843_reg(void *priv, int reg, int word)
+{
+	sgio2audio_t *chip = (sgio2audio_t *) priv;
+	int val;
+        unsigned long flags;
+
+	spin_lock_irqsave(&chip->ad1843_lock, flags);
+
+        mace_write((reg << CODEC_CONTROL_ADDRESS_SHIFT) |
+                               (word << CODEC_CONTROL_WORD_SHIFT), mace->perif.audio.codec_control);
+        wmb();
+        val = mace_read(mace->perif.audio.codec_control); /* flush bus */
+        udelay(200);
+
+	spin_unlock_irqrestore(&chip->ad1843_lock, flags);
+
+        return(0);
+}
+
+static void dump_ad1843_regs(ad1843_t *ad1843) {
+  int i;
+
+  printk(KERN_DEBUG "sgio2audio: AD1843 register dump\n");
+  for(i = 0; i < 32; i++)
+    printk(KERN_DEBUG "sgio2audio: 0x%02x: %04x\n", i,
+           ad1843->read(ad1843->chip, i));
+}
+
+static ad1843_t ad1843_ops = {
+    NULL, /* initialized in snd_sgio2_audio_create */
+    read_ad1843_reg,
+    write_ad1843_reg,
+};
+
+/* low-level audio interface DMA */
+
+/* put some DMA data in bounce buffer, count must be a multiple of 32 */
+/* returns 1 if a period has elapsed */
+static int snd_sgio2audio_dma_push_frag(sgio2audio_t *chip,
+                                        unsigned int channel,
+                                        unsigned int count)
+{
+  int ret;
+  s64 l, r;
+  unsigned long dst_base, dst_pos;
+  unsigned long src_base, src_pos, src_mask;
+  u64 *dst;
+  s16 *src;
+  unsigned long flags;
+  snd_pcm_runtime_t *runtime = chip->channel[channel].substream->runtime;
+
+  spin_lock_irqsave(&chip->channel[channel].lock, flags);
+
+  dst_base = (unsigned long) chip->ring_base | (channel << CHANNEL_RING_SHIFT);
+  dst_pos = (unsigned long) mace_read(mace->perif.audio.chan[channel].write_ptr);
+  src_base = (unsigned long) chip->channel[channel].buffer;
+  src_pos = (unsigned long) chip->channel[channel].pos;
+  src_mask = frames_to_bytes(runtime, runtime->buffer_size) - 1;
+  dst = (u64 *) (dst_base + dst_pos);
+  src = (s16 *) (src_base + src_pos);
+
+  /* check if a period has elapsed */
+  chip->channel[channel].size += (count >> 3); /* in frames */
+  ret = chip->channel[channel].size >= runtime->period_size;
+  chip->channel[channel].size %= runtime->period_size;
+
+  while(count) {
+    l = src[0]; /* sign extend */
+    r = src[1]; /* sign extend */
+
+    *dst = ((l & 0x00ffffff) << CHANNEL_LEFT_SHIFT) |
+           ((r & 0x00ffffff) << CHANNEL_RIGHT_SHIFT);
+
+    dst_pos += sizeof(u64);
+    dst_pos &= CHANNEL_RING_MASK;
+    dst = (u64 *) (dst_base + dst_pos);
+    src_pos += 2 * sizeof(s16);
+    src_pos &= src_mask;
+    src = (s16 *) (src_base + src_pos);
+    count -= sizeof(u64);
+  }
+
+  mace_write(dst_pos, mace->perif.audio.chan[channel].write_ptr); /* in bytes */
+  chip->channel[channel].pos = src_pos;
+
+  spin_unlock_irqrestore(&chip->channel[channel].lock, flags);
+
+  return(ret);
+}
+
+static int snd_sgio2audio_dma_start(snd_pcm_substream_t *substream)
+{
+        sgio2audio_t *chip = snd_pcm_substream_chip(substream);
+        unsigned int index = 1 + substream->number;
+
+        /* reset DMA channel */
+        mace_write(CHANNEL_CONTROL_RESET, mace->perif.audio.chan[index].control);
+        udelay(10);
+        mace_write(0, mace->perif.audio.chan[index].control);
+
+        /* push a full buffer */
+        snd_sgio2audio_dma_push_frag(chip, index, CHANNEL_RING_SIZE - 32);
+
+        /* set DMA to wake on 50% empty and enable interrupt */
+	mace_write(CHANNEL_DMA_ENABLE |
+			       CHANNEL_INT_THRESHOLD_50,
+			       mace->perif.audio.chan[index].control);
+        return(0);
+}
+
+static int snd_sgio2audio_dma_stop(snd_pcm_substream_t *substream)
+{
+        //sgio2audio_t *chip = snd_pcm_substream_chip(substream);
+        unsigned int index = 1 + substream->number;
+
+        mace_write(0, mace->perif.audio.chan[index].control);
+
+        return(0);
+}
+
+static void snd_sgio2audio_dma_interrupt(struct snd_sgio2audio *chip,
+                                         int index)
+{
+  snd_pcm_substream_t *substream = chip->channel[index].substream;
+  int count;
+
+  /* fill the ring */
+  count = CHANNEL_RING_SIZE - mace_read(mace->perif.audio.chan[index].depth) - 32;
+  if (snd_sgio2audio_dma_push_frag(chip, index, count))
+    snd_pcm_period_elapsed(substream);
+}
+
+static irqreturn_t snd_sgio2audio_interrupt(int irq, void *dev_id,
+					    struct pt_regs *regs)
+{
+  struct snd_sgio2audio *chip = (struct snd_sgio2audio *) dev_id;
+  unsigned long status;
+
+  switch(irq) {
+    /* volume changed */
+    case MACEISA_AUDIO_SC_IRQ:
+      status = mace_read(mace->perif.audio.control);
+      if(status & AUDIO_CONTROL_VOLUME_BUTTON_UP) {
+        status &= ~AUDIO_CONTROL_VOLUME_BUTTON_UP;
+	mace_write(status, mace->perif.audio.control);
+        if(chip->volume < SGIO2AUDIO_MAX_VOLUME) chip->volume++;
+      }
+      if(status & AUDIO_CONTROL_VOLUME_BUTTON_DOWN) {
+        status &= ~AUDIO_CONTROL_VOLUME_BUTTON_DOWN;
+	mace_write(status, mace->perif.audio.control);
+        if(chip->volume > 0) chip->volume--;
+      }
+
+      /* program AD1843 with the new volume */
+      ad1843_set_gain(chip->ad1843, AD1843_GAIN_PCM_0, chip->volume / 10);
+      ad1843_set_gain(chip->ad1843, AD1843_GAIN_PCM_1, chip->volume / 10);
+      break;
+
+    /* dma ring ready */
+    case MACEISA_AUDIO1_DMAT_IRQ:
+      snd_sgio2audio_dma_interrupt(chip, 0);
+      break;
+    case MACEISA_AUDIO2_DMAT_IRQ:
+      snd_sgio2audio_dma_interrupt(chip, 1);
+      break;
+    case MACEISA_AUDIO3_DMAT_IRQ: 
+      snd_sgio2audio_dma_interrupt(chip, 2);
+      break;
+  
+    default:
+      printk(KERN_ERR "sgio2audio: unhandled interrupt %d\n", irq);
+      // TEMP : stop DMA
+      mace_write(0, mace->perif.audio.chan[0].control);
+      mace_write(0, mace->perif.audio.chan[1].control);
+      mace_write(0, mace->perif.audio.chan[2].control);
+      break;
+  }
+
+  return(IRQ_HANDLED);
+}
+
+/* PCM part */
+
+/* PCM playback open callback */
+static int snd_sgio2audio_playback_open(snd_pcm_substream_t *substream)
+{
+        // sgio2audio_t *chip = snd_pcm_substream_chip(substream);
+        snd_pcm_runtime_t *runtime = substream->runtime;
+
+        runtime->hw = snd_sgio2audio_playback_hw;
+        
+        return 0;
+}
+
+/* PCM playback close callback */
+static int snd_sgio2audio_playback_close(snd_pcm_substream_t *substream)
+{
+        //sgio2audio_t *chip = snd_pcm_substream_chip(substream);
+
+        /* TODO: hardware code */
+        return 0;
+}
+
+/* PCM capture open callback */
+static int snd_sgio2audio_capture_open(snd_pcm_substream_t *substream)
+{
+        sgio2audio_t *chip = snd_pcm_substream_chip(substream);
+        snd_pcm_runtime_t *runtime = substream->runtime;
+
+        runtime->hw = snd_sgio2audio_playback_hw;
+
+        /* initialize AD1843 */
+        ad1843_init(chip->ad1843);
+
+        return 0;
+}
+
+/* PCM capture close callback */
+static int snd_sgio2audio_capture_close(snd_pcm_substream_t *substream)
+{
+        return 0;
+}
+
+
+/* hw_params callback */
+static int snd_sgio2audio_pcm_hw_params(snd_pcm_substream_t *substream,
+                                        snd_pcm_hw_params_t * hw_params)
+{
+        //sgio2audio_t *chip = snd_pcm_substream_chip(substream);
+        // unsigned long flags;
+        // int ret;
+        // static int count = 0;
+	
+        /* alloc virtual 'dma' area */
+        if(substream->runtime->dma_area != NULL)
+          vfree(substream->runtime->dma_area);
+        substream->runtime->dma_area = vmalloc(params_buffer_bytes(hw_params));
+        if(substream->runtime->dma_area == NULL)
+          return(-ENOMEM);
+        return(0);
+}
+
+/* hw_free callback */
+static int snd_sgio2audio_pcm_hw_free(snd_pcm_substream_t *substream)
+{
+        if(substream->runtime->dma_area != NULL)
+          vfree(substream->runtime->dma_area);
+        substream->runtime->dma_area = NULL;
+        return 0;
+}
+
+/* prepare callback */
+static int snd_sgio2audio_pcm_prepare(snd_pcm_substream_t *substream)
+{
+        sgio2audio_t *chip = snd_pcm_substream_chip(substream);
+        snd_pcm_runtime_t *runtime = substream->runtime;
+        unsigned int index = 1 + substream->number;
+        unsigned long flags;
+
+        spin_lock_irqsave(&chip->channel[index].lock, flags);
+
+	/* Setup the pseudo-dma transfer pointers.  */
+	chip->channel[index].buffer = runtime->dma_area;
+        chip->channel[index].pos = 0;
+        chip->channel[index].size = 0;
+        chip->channel[index].substream = substream;
+
+        /* set AD1843 format */
+        /* hardware format is always S16_LE */
+        if(index) {
+          /* playback */
+          ad1843_setup_dac(chip->ad1843,
+                           index - 1,
+                           runtime->rate,
+                           SNDRV_PCM_FORMAT_S16_LE,
+                           runtime->channels);
+        } else {
+          /* capture */
+          ad1843_setup_adc(chip->ad1843,
+                           runtime->rate,
+                           SNDRV_PCM_FORMAT_S16_LE,
+                           runtime->channels);
+        }
+
+        spin_unlock_irqrestore(&chip->channel[index].lock, flags);
+
+        return 0;
+}
+
+/* trigger callback */
+static int snd_sgio2audio_pcm_trigger(snd_pcm_substream_t *substream,
+                                      int cmd)
+{
+        switch (cmd) {
+        case SNDRV_PCM_TRIGGER_START:
+                /* start the PCM engine */
+                snd_sgio2audio_dma_start(substream);
+                break;
+        case SNDRV_PCM_TRIGGER_STOP:
+                /* stop the PCM engine */
+                snd_sgio2audio_dma_stop(substream);
+                break;
+        default:
+                return -EINVAL;
+        }
+        return(0);
+}
+
+/* pointer callback */
+static snd_pcm_uframes_t
+snd_sgio2audio_pcm_pointer(snd_pcm_substream_t *substream)
+{
+        sgio2audio_t *chip = snd_pcm_substream_chip(substream);
+        unsigned int index = 1 + substream->number;
+        snd_pcm_uframes_t current_ptr;
+        
+        /* get the current hardware pointer */
+	current_ptr = bytes_to_frames(substream->runtime,
+                                      chip->channel[index].pos);
+
+        return current_ptr;
+}
+
+/* get the physical page pointer on the given offset */
+static struct page *snd_sgio2audio_page(snd_pcm_substream_t *substream,
+                                        unsigned long offset)
+{
+        void *pageptr = substream->runtime->dma_area + offset;
+        return vmalloc_to_page(pageptr);
+}
+
+/* operators */
+static snd_pcm_ops_t snd_sgio2audio_playback_ops = {
+        .open =        snd_sgio2audio_playback_open,
+        .close =       snd_sgio2audio_playback_close,
+        .ioctl =       snd_pcm_lib_ioctl,
+        .hw_params =   snd_sgio2audio_pcm_hw_params,
+        .hw_free =     snd_sgio2audio_pcm_hw_free,
+        .prepare =     snd_sgio2audio_pcm_prepare,
+        .trigger =     snd_sgio2audio_pcm_trigger,
+        .pointer =     snd_sgio2audio_pcm_pointer,
+        .page =        snd_sgio2audio_page,
+};
+
+static snd_pcm_ops_t snd_sgio2audio_capture_ops = {
+        .open =        snd_sgio2audio_capture_open,
+        .close =       snd_sgio2audio_capture_close,
+        .ioctl =       snd_pcm_lib_ioctl,
+        .hw_params =   snd_sgio2audio_pcm_hw_params,
+        .hw_free =     snd_sgio2audio_pcm_hw_free,
+        .prepare =     snd_sgio2audio_pcm_prepare,
+        .trigger =     snd_sgio2audio_pcm_trigger,
+        .pointer =     snd_sgio2audio_pcm_pointer,
+        .page =        snd_sgio2audio_page,
+};
+
+/*
+ *  definitions of capture are omitted here...
+ */
+
+/* create a pcm device */
+static int __devinit snd_sgio2audio_new_pcm(sgio2audio_t *chip)
+{
+        snd_pcm_t *pcm;
+        int err;
+
+        /* create a new pcm device with two outputs and one input */
+        if ((err = snd_pcm_new(chip->card, "SGI O2 Audio", 0, 2, 1,
+                               &pcm)) < 0){
+		printk("sgio2audio: failed to create PCM devices\n");
+                return err;
+	}
+	else{
+		printk("sgio2audio: PCM devices created\n");
+	}
+		
+        pcm->private_data = chip;
+        strcpy(pcm->name, "SGI O2 Audio");
+        chip->pcm = pcm;
+
+        /* set operators */
+        snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_PLAYBACK,
+                        &snd_sgio2audio_playback_ops);
+        snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_CAPTURE,
+                        &snd_sgio2audio_capture_ops);
+
+        return 0;
+}
+
+/* ALSA driver */
+
+static int snd_sgio2audio_free(sgio2audio_t *chip)
+{
+        int irq;
+
+	/* reset interface */
+        mace_write(AUDIO_CONTROL_RESET, mace->perif.audio.control);
+        udelay(1);
+        mace_write(0, mace->perif.audio.control);
+
+        /* release IRQ's */
+        for (irq = MACEISA_AUDIO_SW_IRQ; irq <= MACEISA_AUDIO3_MERR_IRQ; irq++)
+        {
+                free_irq(irq, (void *)chip);
+		printk("sgio2audio: irq %d is now free\n",irq);
+        }
+
+        /* release card data */
+        snd_hidden_kfree(chip);
+	printk("sgio2audio: device ressources are now free\n");
+
+        return(0);
+}
+
+static int snd_sgio2audio_dev_free(snd_device_t *device)
+{
+//	sgio2audio_t *chip = snd_magic_cast(sgio2audio_t,
+//		device->device_data, return -ENXIO);
+	sgio2audio_t *chip = device->device_data;
+	/* TODO: component destructor */
+	return snd_sgio2audio_free(chip);
+}
+
+static int __devinit snd_sgio2audio_create(snd_card_t *card,
+                                           sgio2audio_t **rchip)
+{
+	sgio2audio_t *chip;
+        int err, irq, index;
+        static snd_device_ops_t ops = {
+          .dev_free = snd_sgio2audio_dev_free,
+        };
+
+        *rchip = NULL;
+
+        /* allocate a chip-specific data with magic-alloc */
+        chip = snd_hidden_kcalloc(1,sizeof(sgio2audio_t), GFP_KERNEL);
+        if (chip == NULL)
+          return -ENOMEM;
+
+        chip->card = card;
+        chip->irq_start = MACEISA_AUDIO_SW_IRQ;
+        chip->irq_end = MACEISA_AUDIO3_MERR_IRQ;
+
+        chip->ring_base = 
+          (void *) __get_free_pages(GFP_DMA, get_order(MACEISA_RINGBUFFERS_SIZE));
+        if(chip->ring_base == NULL) {
+          printk(KERN_ERR "sgio2audio: could not allocate ring buffers\n");
+          return(-ENOMEM);
+        }
+	else{
+		printk("sgio2audio: ring buffers allocated\n");
+	}
+
+        spin_lock_init(&chip->ad1843_lock);
+
+        chip->volume = SGIO2AUDIO_MAX_VOLUME;
+
+        /* initialize channels */
+        for (index = 0; index < 3; index++) {
+          spin_lock_init(&chip->channel[index].lock);
+          chip->channel[index].substream = NULL;
+          chip->channel[index].buffer = NULL;
+          chip->channel[index].pos = 0;
+          chip->channel[index].size = 0;
+        }
+
+        /* allocate IRQs */
+        for (irq = chip->irq_start; irq <= chip->irq_end; irq++) {
+          if (request_irq(irq, snd_sgio2audio_interrupt,
+                          SA_INTERRUPT|SA_SHIRQ, "SGI O2 Audio",
+                          (void *)chip)) {
+            snd_sgio2audio_free(chip);
+            printk(KERN_ERR "sgio2audio: cannot allocate irq %d\n", irq);
+            return -EBUSY;
+          }
+	  else{
+		  printk("sgio2audio: irq %d allocated\n",irq);
+	  }
+        }
+
+        /* check if a codec is attached to the interface */
+        /* (Audio or Audio/Video board present) */
+        if (!(mace_read(mace->perif.audio.control) & AUDIO_CONTROL_CODEC_PRESENT))
+          return(-ENOENT);
+
+        /* reset the interface */
+        mace_write(AUDIO_CONTROL_RESET, mace->perif.audio.control);
+        udelay(1);
+        mace_write(0, mace->perif.audio.control);
+
+        /* set ring base; this assumes serial doesn't use DMA */        
+        //mace_perif_ctrl_write(virt_to_bus(chip->ring_base), ringbase);
+	mace_write(virt_to_bus(chip->ring_base),mace->perif.ctrl.ringbase);
+
+        /* attach the AD1843 codec */
+        chip->ad1843 = &ad1843_ops;
+        chip->ad1843->chip = (void *) chip;
+
+        /* initialize the AD1843 codec */
+        if ((err = ad1843_init(chip->ad1843)) < 0) {
+          snd_sgio2audio_free(chip);
+          return err;
+        }
+
+        if ((err = snd_device_new(card, SNDRV_DEV_LOWLEVEL,
+                                  chip, &ops)) < 0) {
+          snd_sgio2audio_free(chip);
+          return err;
+        }
+        *rchip = chip;
+	printk("sgio2audio: AD1843 initialized\n");
+        return 0;
+}
+
+static int __devinit snd_sgio2audio_probe(void)
+{
+        snd_card_t *card;
+        sgio2audio_t *chip;
+        int err;
+
+        if (!enable)
+          return -ENOENT;
+#ifdef MODULE
+	mace = ioremap(MACE_BASE, sizeof(struct sgi_mace));
+#endif	
+
+        card = snd_card_new(0, 0, THIS_MODULE, 0);
+	printk("MACE_BASE=%lX - mace=%lX\n",MACE_BASE,mace);
+        if (card == NULL)
+                  return -ENOMEM;
+
+        if ((err = snd_sgio2audio_create(card, &chip)) < 0) {
+                  snd_card_free(card);
+                  return err;
+        }
+
+        /* TODO : finish PCM, do mixer and /proc */
+        if ((err = snd_sgio2audio_new_pcm(chip)) < 0) {
+                  snd_card_free(card);
+                  return err;
+        }
+
+        strcpy(card->driver, "SGI O2 Audio Driver");
+        strcpy(card->shortname, "SGI O2 Audio");
+        sprintf(card->longname, "%s irq %i-%i",
+                card->shortname,
+                chip->irq_start, chip->irq_end);
+
+        if ((err = snd_card_register(card)) < 0) {
+                  snd_card_free(card);
+                  return err;
+        }
+
+	snd_sgio2audio_card = card;
+	printk("sgio2audio: SGI O2 AD1843 detected\n"); 
+
+        return 0;
+}      
+
+/* initialization of the module */
+static int __init alsa_card_sgio2audio_init(void)
+{
+        int err;
+
+        if ((err = snd_sgio2audio_probe()) < 0) {
+#ifdef MODULE
+                printk(KERN_ERR "SGI O2 Audio not found "
+                                "or device busy\n");
+#endif
+                return err;
+        }
+        return 0;
+}
+
+/* clean up the module */
+static void __exit alsa_card_sgio2audio_exit(void)
+{
+	snd_card_free(snd_sgio2audio_card);
+}
+
+module_init(alsa_card_sgio2audio_init)
+module_exit(alsa_card_sgio2audio_exit)

--------------060107080302010002040300--

From ftemporelli@astek.fr Sun Apr 24 20:36:52 2005
Received: with ECARTIS (v1.0.0; list linux-mips); Sun, 24 Apr 2005 20:37:07 +0100 (BST)
Received: from mailfe10.tele2.se ([IPv6:::ffff:212.247.155.33]:6626 "EHLO
	swip.net") by linux-mips.org with ESMTP id <S8224913AbVDXTgw>;
	Sun, 24 Apr 2005 20:36:52 +0100
X-T2-Posting-ID: g63wq726D5fsXb2UbU6LU0KOXzHnTHjCzHZ35sC2MDs=
Received: from [213.102.193.221] (HELO [192.168.0.32])
  by mailfe10.swip.net (CommuniGate Pro SMTP 4.3c5)
  with ESMTP id 142414783 for linux-mips@linux-mips.org; Sun, 24 Apr 2005 21:36:45 +0200
Message-ID: <426BF548.3030005@astek.fr>
Date:	Sun, 24 Apr 2005 21:36:40 +0200
From:	Frederic TEMPORELLI - astek <ftemporelli@astek.fr>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; fr; rv:1.7.3) Gecko/20040910
X-Accept-Language: fr, en
MIME-Version: 1.0
To:	linux-mips <linux-mips@linux-mips.org>
Subject: O2 IP32: patch for ALSA sound for 2.6.12rc2 (2)
References: <426BBC6E.5010603@laposte.net>
In-Reply-To: <426BBC6E.5010603@laposte.net>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Return-Path: <ftemporelli@astek.fr>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 7792
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: ftemporelli@astek.fr
Precedence: bulk
X-list: linux-mips

more comments about previous patch:
following problems have been reported when compiling static driver:
- "mace" musn't be defined in the driver => just comment line 112 in 
sgio2audio.c
- AD1843 init may be done twice (or more) to get it working... but 
driver can't be launch again when static...

Kumba, can you replace alsa_card_sgio2audio_init in sgio2audio.c with 
following code ?
(not really nice, but should do the trick when AD1843 won't go ahead)
====================================================
/* initialization of the module */
#include <linux/delay.h>
static int __init alsa_card_sgio2audio_init(void)
{
        int err,tries;
        tries=0;
        while(tries<5){
                if ((err = snd_sgio2audio_probe()) < 0) {
                        printk("sgio2audio: probe SGI O2 Audio 
#%d\n",tries);
                        tries++;
                        msleep(1000);
                }
                else{
                        printk("sgio2audio: SGI O2 Audio probed - OK\n");
                        return 0;
                }
        }
        printk("sgio2audio: sorry, SGI O2 Audio can't be initialized\n");
        return err;
}
====================================================

Fred

From martin.nichols@oxinst.co.uk Mon Apr 25 09:39:05 2005
Received: with ECARTIS (v1.0.0; list linux-mips); Mon, 25 Apr 2005 09:39:22 +0100 (BST)
Received: from mail59.messagelabs.com ([IPv6:::ffff:195.245.230.83]:50354 "HELO
	mail59.messagelabs.com") by linux-mips.org with SMTP
	id <S8225409AbVDYIjF>; Mon, 25 Apr 2005 09:39:05 +0100
X-VirusChecked:	Checked
X-Env-Sender: martin.nichols@oxinst.co.uk
X-Msg-Ref: server-7.tower-59.messagelabs.com!1114418337!56038863!1
X-StarScan-Version: 5.4.11; banners=-,-,-
X-Originating-IP: [194.200.52.193]
Received: (qmail 18780 invoked from network); 25 Apr 2005 08:38:58 -0000
Received: from smtp1.oxinst.co.uk (HELO ukhontx01.oxinst.co.uk) (194.200.52.193)
  by server-7.tower-59.messagelabs.com with SMTP; 25 Apr 2005 08:38:58 -0000
Received: by UKHONTX01 with Internet Mail Service (5.5.2653.19)
	id <JTJ3AWY2>; Mon, 25 Apr 2005 09:38:56 +0100
Message-ID: <DEF431FFDB15C1488464F0E57D5506642AA6B8@MEDNT02>
From:	martin.nichols@oxinst.co.uk
To:	wd@denx.de
Cc:	linux-mips@linux-mips.org
Subject: RE: Common Flash Memory Interface 
Date:	Mon, 25 Apr 2005 09:41:47 +0100
MIME-Version: 1.0
X-Mailer: Internet Mail Service (5.5.2653.19)
Content-Type: text/plain;
	charset="iso-8859-1"
Return-Path: <martin.nichols@oxinst.co.uk>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 7793
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: martin.nichols@oxinst.co.uk
Precedence: bulk
X-list: linux-mips

Hi Wolfgang,

Many thanks for your reply - You've reassured me that I'm not
doing something in hardware that I'll regret later!

As for the waiver on the disclaimer - I can't win here! It's automatically
attached by our Head Office to all outgoing emails and I don't know of any
way to stop it. Not long ago someone else on this list commented on a
similar
(probably automatically) attached disclaimer without a waiver
http://www.linux-mips.org/archives/linux-mips/2005-03/msg00184.html

Regards,

Martin Nichols,
Thanks again and ...
please ignore the bit that follows - I didn't put it there!




-----Original Message-----
From: Wolfgang Denk [mailto:wd@denx.de]
Sent: 22 April 2005 16:03
To: martin.nichols@oxinst.co.uk
Cc: linux-mips@linux-mips.org
Subject: Re: Common Flash Memory Interface 


In message <DEF431FFDB15C1488464F0E57D5506642AA6B7@MEDNT02> you wrote:
> 
> I've arranged for a pair of Spansion S29GL256N 256Mbit flash roms to be
> connected to the
> Au1100 static bus. These devices are each 16bits wide and are connected to
> upper and lower
> halves of the 32 bit static bus at an address such that the boot code can
> reside in them.
> After boot, we want to use the remainder of the devices as flash disk
using
> one of the wear
> leveling file systems. Each flash chip implements the Common Flash Memory
> Interface standard,

OK.

> but as they are arranged as 32 bits wide the devices are effectively
> interleaved.

I'd rather say thay are accesses in parallel.

> Can Linux support this arrangement?

Yes, of course. Such a configurationir more or less standard. The MTD
drivers will work just fine.

> Finally, this email is not confidential and is for all Linux-Mips
> addressees.

Then why do you attach such a silly disclaimer?

Best regards,

Wolfgang Denk

-- 
Software Engineering:  Embedded and Realtime Systems,  Embedded Linux
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd@denx.de
"...one of the main causes of the fall of the Roman Empire was  that,
lacking  zero,  they had no way to indicate successful termination of
their C programs."                                     - Robert Firth

+++ Virus-scanned by Messagelabs for Oxford Instruments +++

 ###  OXFORD INSTRUMENTS   http://www.oxford-instruments.com/  ### 

Unless stated above to be non-confidential, this E-mail and any 
attachments are private and confidential and are for the addressee 
only and may not be used, copied or disclosed save to the addressee.
If you have received this E-mail in error please notify us upon receipt 
and delete it from your records. Internet communications are not secure 
and Oxford Instruments is not responsible for their abuse by third 
parties nor for any alteration or corruption in transmission. 


From tully@mikrotik.com Mon Apr 25 10:26:25 2005
Received: with ECARTIS (v1.0.0; list linux-mips); Mon, 25 Apr 2005 10:26:40 +0100 (BST)
Received: from frog.mt.lv ([IPv6:::ffff:159.148.172.197]:18905 "EHLO
	frog.mt.lv") by linux-mips.org with ESMTP id <S8225463AbVDYJ0Z>;
	Mon, 25 Apr 2005 10:26:25 +0100
Received: from [10.5.17.206] (helo=your-lnsz0iqs6f.mikrotik.com)
	by frog.mt.lv with esmtp (Exim 4.44)
	id 1DPzx6-0004n3-Hd
	for linux-mips@linux-mips.org; Mon, 25 Apr 2005 12:32:28 +0300
Message-Id: <6.2.1.2.0.20050425122426.07156ac0@frog.mt.lv>
X-Mailer: QUALCOMM Windows Eudora Version 6.2.1.2
Date:	Mon, 25 Apr 2005 12:26:13 +0300
To:	linux-mips@linux-mips.org
From:	John Tully <tully@mikrotik.com>
Subject: RB500 Linux page and forum
In-Reply-To: <DEF431FFDB15C1488464F0E57D5506642AA6B8@MEDNT02>
References: <DEF431FFDB15C1488464F0E57D5506642AA6B8@MEDNT02>
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"; format=flowed
Return-Path: <tully@mikrotik.com>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 7794
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: tully@mikrotik.com
Precedence: bulk
X-list: linux-mips

One user of the Mikrotik Forum has made a how-to for building you own Linux 
on a CF for the RB500.

<http://forum.mikrotik.com//viewtopic.php?t=2857&highlight=>http://forum.mikrotik.com//viewtopic.php?t=2857&highlight= 


http://www.cosam.org/computers/hardware/rb500.html

John
www.routerboard.com 


From hvr@hvrlab.org Tue Apr 26 09:44:00 2005
Received: with ECARTIS (v1.0.0; list linux-mips); Tue, 26 Apr 2005 09:44:18 +0100 (BST)
Received: from h081217049130.dyn.cm.kabsi.at ([IPv6:::ffff:81.217.49.130]:54965
	"EHLO phobos.hvrlab.org") by linux-mips.org with ESMTP
	id <S8225294AbVDZIoA>; Tue, 26 Apr 2005 09:44:00 +0100
Received: from mini.intra (dhcp-1334-4.blizz.at [213.143.126.4])
	(authenticated bits=0)
	by phobos.hvrlab.org (8.13.4/8.13.4/Debian-1) with ESMTP id j3Q8hh99014179
	(version=TLSv1/SSLv3 cipher=RC4-MD5 bits=128 verify=NOT);
	Tue, 26 Apr 2005 10:43:49 +0200
Subject: iptables/vmalloc issues on alchemy
From:	Herbert Valerio Riedel <hvr@hvrlab.org>
To:	Pete Popov <ppopov@embeddedalley.com>
Cc:	Josh Green <jgreen@users.sourceforge.net>,
	linux-mips@linux-mips.org
Content-Type: text/plain
Date:	Tue, 26 Apr 2005 10:43:29 +0200
Message-Id: <1114505009.11315.37.camel@mini.intra>
Mime-Version: 1.0
X-Mailer: Evolution 2.2.2 
Content-Transfer-Encoding: 7bit
Return-Path: <hvr@hvrlab.org>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 7795
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: hvr@hvrlab.org
Precedence: bulk
X-list: linux-mips

hello!

I'm seeing similiar problems to the ones that Josh Green reported some
time ago on this list (but alas didn't seem to get any further
attention...)

The problem seems to be so far, that when modifying the iptables
structures by adding/flushing the rules, a state can be reached sooner
or later (indeterministic! smells like race) where the data structure
becomes invalid (although there are checks in the kernel which would
prevent that); the result is either ip_tables.c:ipt_do_tables() causing
an oops due to bad pointer dereferencing (or the kernel freezing w/o
further notice at all), or the iptables tool being unable to
retrieve/modify the rules from the kernel (and getting ENOMEM/EINVAL) or
simply segfaulting due to other inconsistencies with the data...

I was able to avoid corruption by replacing all vmalloc()/vfree() calls
by kmalloc()/kfree()'s respectively in ip_tables.c; another variant
which I was suggested to try helped as well: inserting flush_tlb_all()
calls after every vmalloc() in said source file;

I assumed so far, the issue must be alchemy specific, as I experienced
this on a DbAu1550 board; and Josh had it on a DbAu1100; As it's a
rather easy to trigger bug, I would have expected to see more bug
reports if it affected more than just the alchemy's on 2.6.x;
I tried it with a few kernel revisions from linux-mips' cvs (from 2.6.10
upto 2.6.12rc2); also tried different compilers (debian's cross-gcc's
3.4.4 and 3.3.3), even switched the alchemy to little endian
operation... all the same; everything else I use on that board has been
rather stable so far, iptables are the only part which show up this
vmalloc-issue so far...

as to reproducing the bug, it's rather easy for me:

a script repeatedly performing rule modifications should trigger the
issue rather easily (possibly called over a remote ssh/telnet session,
in order to create a bit of traffic as well...)

set -x
while :
do
  iptables -F || exit 1
  iptables -A INPUT -i lo -j ACCEPT || exit 1
  iptables -A INPUT -p udp -i eth0 --dport domain -j ACCEPT || exit 1
  iptables -A INPUT -p udp -i eth0 --dport 6666 -j ACCEPT || exit 1
  iptables -A INPUT -p tcp -i eth0 --dport ssh -j ACCEPT || exit 1
  iptables -A INPUT -p tcp -i eth0 --dport http -j ACCEPT || exit 1
  iptables -A INPUT -p tcp -i eth0 --dport https -j ACCEPT || exit 1
  iptables -A INPUT -p tcp -i eth0 --dport 3496 -j ACCEPT || exit 1
done

or alternatively (requiring state & multiport helpers)

while :
do
  iptables -F
  iptables -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT  || exit 1
  iptables -A INPUT -i lo -j ACCEPT || exit 1
  iptables -A INPUT -p udp -i eth0 -m multiport --dports domain,6666 -j ACCEPT || exit 1
  iptables -A INPUT -p tcp -i eth0 -m multiport --dports ssh,http,https,3496 -j ACCEPT || exit 1
  iptables -A OUTPUT -m state --state ESTABLISHED,RELATED -j ACCEPT || exit 1
  iptables -A OUTPUT -o lo -j ACCEPT || exit 1
  iptables -A OUTPUT -p udp -o eth0 -m multiport --dports ntp -j ACCEPT || exit 1
  iptables -A OUTPUT -p tcp -o eth0 -m multiport --dports www,https,8444,8445,8446,8454,8455,8456,8464,8465,8466,9225 -j ACCEPT || exit 1
done

regards,
-- 
Herbert Valerio Riedel <hvr@hvrlab.org>


From clem.taylor@gmail.com Tue Apr 26 20:58:10 2005
Received: with ECARTIS (v1.0.0; list linux-mips); Tue, 26 Apr 2005 20:58:26 +0100 (BST)
Received: from wproxy.gmail.com ([IPv6:::ffff:64.233.184.202]:27768 "EHLO
	wproxy.gmail.com") by linux-mips.org with ESMTP id <S8224962AbVDZT6K> convert rfc822-to-8bit;
	Tue, 26 Apr 2005 20:58:10 +0100
Received: by wproxy.gmail.com with SMTP id 57so48153wri
        for <linux-mips@linux-mips.org>; Tue, 26 Apr 2005 12:58:00 -0700 (PDT)
DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws;
        s=beta; d=gmail.com;
        h=received:message-id:date:from:reply-to:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition;
        b=jQ4G5HXz+HIW+WCD9rZiR7BSPA3Xtmu5k4c0kZwvRfSFSRjpk3oaykOj6viVTx+RywMcy6Bf8RC3xiyYlBj1FWysdYXkxmLyqxQ/4qMZJBYDfcs0zRE3fo1nrLRsY41fRd6MBKvzoSW9ZII63HOS3RAeWVWSjUgcqpHDKBVSskA=
Received: by 10.54.120.16 with SMTP id s16mr81611wrc;
        Tue, 26 Apr 2005 12:58:00 -0700 (PDT)
Received: by 10.54.41.29 with HTTP; Tue, 26 Apr 2005 12:58:00 -0700 (PDT)
Message-ID: <ecb4efd105042612586d43fcc5@mail.gmail.com>
Date:	Tue, 26 Apr 2005 15:58:00 -0400
From:	Clem Taylor <clem.taylor@gmail.com>
Reply-To: Clem Taylor <clem.taylor@gmail.com>
To:	linux-mips@linux-mips.org
Subject: should the kernel be initializing the uarts on the Au1550?
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8BIT
Content-Disposition: inline
Return-Path: <clem.taylor@gmail.com>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 7796
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: clem.taylor@gmail.com
Precedence: bulk
X-list: linux-mips

It seems that the kernel (2.6.10) isn't properly initializing the
Au1550 serial ports. All three of the serial ports work, just not at
the same time. Linux seems to need yamon to configure the serial port
first. Out of the box yamon uses UART0 & UART3 and ttyS0 & ttyS2
(UART3, the 1550 doesn't have a UART2) work in linux, but ttyS1
doesn't. If I switch yamon to use UART1 & UART3, then ttyS0 doesn't
seem to work in linux. The serial port that isn't configured by yamon
will hang in an ioctl() on calling tcsetattr().

Before I just cheat and add a third serial port to yamon, should the
kernel be initializing the UARTs or does it really expect the yamon to
initialize them first? Is anyone using all 3 serial ports on an
Au1550?

                                  Thanks,
                                  Clem

From dan@embeddededge.com Tue Apr 26 21:47:42 2005
Received: with ECARTIS (v1.0.0; list linux-mips); Tue, 26 Apr 2005 21:47:57 +0100 (BST)
Received: from embeddededge.com ([IPv6:::ffff:209.113.146.155]:57103 "EHLO
	penguin.netx4.com") by linux-mips.org with ESMTP
	id <S8224966AbVDZUrm>; Tue, 26 Apr 2005 21:47:42 +0100
Received: from [192.168.253.28] (tibook.embeddededge.com [192.168.253.28])
	by penguin.netx4.com (8.12.8/8.12.9) with ESMTP id j3QKgAfg031907;
	Tue, 26 Apr 2005 16:42:10 -0400
In-Reply-To: <ecb4efd105042612586d43fcc5@mail.gmail.com>
References: <ecb4efd105042612586d43fcc5@mail.gmail.com>
Mime-Version: 1.0 (Apple Message framework v622)
Content-Type: text/plain; charset=US-ASCII; format=flowed
Message-Id: <322b387146f9931748c566c2f6352746@embeddededge.com>
Content-Transfer-Encoding: 7bit
Cc:	linux-mips@linux-mips.org
From:	Dan Malek <dan@embeddededge.com>
Subject: Re: should the kernel be initializing the uarts on the Au1550?
Date:	Tue, 26 Apr 2005 16:47:43 -0400
To:	Clem Taylor <clem.taylor@gmail.com>
X-Mailer: Apple Mail (2.622)
Return-Path: <dan@embeddededge.com>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 7797
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: dan@embeddededge.com
Precedence: bulk
X-list: linux-mips


On Apr 26, 2005, at 3:58 PM, Clem Taylor wrote:

> It seems that the kernel (2.6.10) isn't properly initializing the
> Au1550 serial ports.

What do you mean by "initializing"?

> .... Linux seems to need yamon to configure ....

Linux assumes yamon for the Db1xxx and Pb1xxx
boards will configure nearly all of the IO pins
properly.  This is quite the opposite of most embedded
systems that assume nothing and rely on the Linux
board startup functions to do this.

It is just historical, and could be changed.  First, we
need to add sufficient configuration information so
we know what IO is used (serial ports in this case).
Second we need the functions to do the proper
set up based upon the selected configuration.

Then, the discussions (arguments) start about what
should be further assumed about initialization :-)
My preference is that if we should do all of the
initialization and assume nothing, because we could
probably eliminate lots of board specific set up
files and use more common software.

Thanks.


	-- Dan


From ppopov@embeddedalley.com Tue Apr 26 22:53:40 2005
Received: with ECARTIS (v1.0.0; list linux-mips); Tue, 26 Apr 2005 22:53:55 +0100 (BST)
Received: from smtp001.bizmail.yahoo.com ([IPv6:::ffff:216.136.172.125]:1170
	"HELO smtp001.bizmail.yahoo.com") by linux-mips.org with SMTP
	id <S8224983AbVDZVxk>; Tue, 26 Apr 2005 22:53:40 +0100
Received: from unknown (HELO ?192.168.1.102?) (ppopov@embeddedalley.com@71.128.175.241 with plain)
  by smtp001.bizmail.yahoo.com with SMTP; 26 Apr 2005 21:53:37 -0000
Subject: Re: should the kernel be initializing the uarts on the Au1550?
From:	Pete Popov <ppopov@embeddedalley.com>
Reply-To: ppopov@embeddedalley.com
To:	Clem Taylor <clem.taylor@gmail.com>
Cc:	"'linux-mips@linux-mips.org'" <linux-mips@linux-mips.org>
In-Reply-To: <ecb4efd105042612586d43fcc5@mail.gmail.com>
References: <ecb4efd105042612586d43fcc5@mail.gmail.com>
Content-Type: text/plain
Organization: Embedded Alley Solutions, Inc
Date:	Tue, 26 Apr 2005 14:53:37 -0700
Message-Id: <1114552417.5524.17.camel@localhost.localdomain>
Mime-Version: 1.0
X-Mailer: Evolution 2.0.4 (2.0.4-4) 
Content-Transfer-Encoding: 7bit
Return-Path: <ppopov@embeddedalley.com>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 7798
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: ppopov@embeddedalley.com
Precedence: bulk
X-list: linux-mips

On Tue, 2005-04-26 at 15:58 -0400, Clem Taylor wrote:
> It seems that the kernel (2.6.10) isn't properly initializing the
> Au1550 serial ports. All three of the serial ports work, just not at
> the same time. Linux seems to need yamon to configure the serial port
> first. Out of the box yamon uses UART0 & UART3 and ttyS0 & ttyS2
> (UART3, the 1550 doesn't have a UART2) work in linux, but ttyS1
> doesn't. If I switch yamon to use UART1 & UART3, then ttyS0 doesn't
> seem to work in linux. The serial port that isn't configured by yamon
> will hang in an ioctl() on calling tcsetattr().
> 
> Before I just cheat and add a third serial port to yamon, should the
> kernel be initializing the UARTs or does it really expect the yamon to
> initialize them first? Is anyone using all 3 serial ports on an
> Au1550?

Yes, it should. And we should really rewrite the serial driver from
scratch. 

Pete


From anemo@mba.ocn.ne.jp Wed Apr 27 06:36:28 2005
Received: with ECARTIS (v1.0.0; list linux-mips); Wed, 27 Apr 2005 06:36:47 +0100 (BST)
Received: from topsns.toshiba-tops.co.jp ([IPv6:::ffff:202.230.225.5]:14101
	"HELO topsns.toshiba-tops.co.jp") by linux-mips.org with SMTP
	id <S8224863AbVD0Fg2>; Wed, 27 Apr 2005 06:36:28 +0100
Received: from inside-ms1.toshiba-tops.co.jp by topsns.toshiba-tops.co.jp
          via smtpd (for [62.254.210.162]) with SMTP; 27 Apr 2005 05:36:26 UT
Received: from topsms.toshiba-tops.co.jp (localhost.localdomain [127.0.0.1])
	by localhost.toshiba-tops.co.jp (Postfix) with ESMTP id D6ACE1F2C3;
	Wed, 27 Apr 2005 14:36:22 +0900 (JST)
Received: from srd2sd.toshiba-tops.co.jp (gw-chiba7.toshiba-tops.co.jp [172.17.244.27])
	by topsms.toshiba-tops.co.jp (Postfix) with ESMTP id C15481D6CA;
	Wed, 27 Apr 2005 14:36:22 +0900 (JST)
Received: from localhost (fragile [172.17.28.65])
	by srd2sd.toshiba-tops.co.jp (8.12.10/8.12.10) with ESMTP id j3R5aMoj034147;
	Wed, 27 Apr 2005 14:36:22 +0900 (JST)
	(envelope-from anemo@mba.ocn.ne.jp)
Date:	Wed, 27 Apr 2005 14:36:22 +0900 (JST)
Message-Id: <20050427.143622.77402407.nemoto@toshiba-tops.co.jp>
To:	linux-mips@linux-mips.org
Cc:	ralf@linux-mips.org
Subject: preempt safe fpu-emulator
From:	Atsushi Nemoto <anemo@mba.ocn.ne.jp>
X-Fingerprint: 6ACA 1623 39BD 9A94 9B1A  B746 CA77 FE94 2874 D52F
X-Pgp-Public-Key: http://wwwkeys.pgp.net/pks/lookup?op=get&search=0x2874D52F
X-Mailer: Mew version 3.3 on Emacs 21.3 / Mule 5.0 (SAKAKI)
Mime-Version: 1.0
Content-Type: Text/Plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Return-Path: <anemo@mba.ocn.ne.jp>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 7799
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: anemo@mba.ocn.ne.jp
Precedence: bulk
X-list: linux-mips

Hi.  Here is a patch to make the fpu-emulator preempt-safe.  It would
be SMP-safe also.

The 'ieee754_csr' global variable is removed.  Now the 'ieee754_csr'
is an alias of current->thread.fpu.soft.fcr31.  While the fpu-emulator
uses different mapping for RM bits (FPU_CSR_Rm vs. IEEE754_Rm), RM
bits are converted before (and after) calling of cop1Emulate().  If we
adjusted IEEE754_Rm to match with FPU_CSR_Rm, we can remove ieee_rm[]
and mips_rm[].  Should we do it?

With this patch, whole fpu-emulator can be run without disabling
preempt.  I will post a patch to fix preemption issue soon.

diff -u linux-mips/arch/mips/math-emu/cp1emu.c linux/arch/mips/math-emu/cp1emu.c
--- linux-mips/arch/mips/math-emu/cp1emu.c	2005-03-04 10:19:33.000000000 +0900
+++ linux/arch/mips/math-emu/cp1emu.c	2005-04-27 10:45:08.000000000 +0900
@@ -79,7 +79,17 @@
 
 /* Convert Mips rounding mode (0..3) to IEEE library modes. */
 static const unsigned char ieee_rm[4] = {
-	IEEE754_RN, IEEE754_RZ, IEEE754_RU, IEEE754_RD
+	[FPU_CSR_RN] = IEEE754_RN,
+	[FPU_CSR_RZ] = IEEE754_RZ,
+	[FPU_CSR_RU] = IEEE754_RU,
+	[FPU_CSR_RD] = IEEE754_RD,
+};
+/* Convert IEEE library modes to Mips rounding mode (0..3). */
+static const unsigned char mips_rm[4] = {
+	[IEEE754_RN] = FPU_CSR_RN,
+	[IEEE754_RZ] = FPU_CSR_RZ,
+	[IEEE754_RD] = FPU_CSR_RD,
+	[IEEE754_RU] = FPU_CSR_RU,
 };
 
 #if __mips >= 4
@@ -368,6 +378,7 @@
 			}
 			if (MIPSInst_RD(ir) == FPCREG_CSR) {
 				value = ctx->fcr31;
+				value = (value & ~0x3) | mips_rm[value & 0x3];
 #ifdef CSRTRACE
 				printk("%p gpr[%d]<-csr=%08x\n",
 					(void *) (xcp->cp0_epc),
@@ -400,11 +411,10 @@
 					(void *) (xcp->cp0_epc),
 					MIPSInst_RT(ir), value);
 #endif
-				ctx->fcr31 = value;
-				/* copy new rounding mode and
-				   flush bit to ieee library state! */
-				ieee754_csr.nod = (ctx->fcr31 & 0x1000000) != 0;
-				ieee754_csr.rm = ieee_rm[value & 0x3];
+				value &= (FPU_CSR_FLUSH | FPU_CSR_ALL_E | FPU_CSR_ALL_S | 0x03);
+				ctx->fcr31 &= ~(FPU_CSR_FLUSH | FPU_CSR_ALL_E | FPU_CSR_ALL_S | 0x03);
+				/* convert to ieee library modes */
+				ctx->fcr31 |= (value & ~0x3) | ieee_rm[value & 0x3];
 			}
 			if ((ctx->fcr31 >> 5) & ctx->fcr31 & FPU_CSR_ALL_E) {
 				return SIGFPE;
@@ -570,7 +580,7 @@
 static ieee754##p fpemu_##p##_##name (ieee754##p r, ieee754##p s, \
     ieee754##p t) \
 { \
-	struct ieee754_csr ieee754_csr_save; \
+	struct _ieee754_csr ieee754_csr_save; \
 	s = f1 (s, t); \
 	ieee754_csr_save = ieee754_csr; \
 	s = f2 (s, r); \
@@ -699,8 +709,6 @@
 				rcsr |= FPU_CSR_INV_X | FPU_CSR_INV_S;
 
 			ctx->fcr31 = (ctx->fcr31 & ~FPU_CSR_ALL_X) | rcsr;
-			if (ieee754_csr.nod)
-				ctx->fcr31 |= 0x1000000;
 			if ((ctx->fcr31 >> 5) & ctx->fcr31 & FPU_CSR_ALL_E) {
 				/*printk ("SIGFPE: fpu csr = %08x\n",
 				   ctx->fcr31); */
@@ -1297,12 +1305,17 @@
 		if (insn == 0)
 			xcp->cp0_epc += 4;	/* skip nops */
 		else {
-			/* Update ieee754_csr. Only relevant if we have a
-			   h/w FPU */
-			ieee754_csr.nod = (ctx->fcr31 & 0x1000000) != 0;
-			ieee754_csr.rm = ieee_rm[ctx->fcr31 & 0x3];
-			ieee754_csr.cx = (ctx->fcr31 >> 12) & 0x1f;
+			/*
+			 * The 'ieee754_csr' is an alias of
+			 * ctx->fcr31.  No need to copy ctx->fcr31 to
+			 * ieee754_csr.  But ieee754_csr.rm is ieee
+			 * library modes. (not mips rounding mode)
+			 */
+			/* convert to ieee library modes */
+			ieee754_csr.rm = ieee_rm[ieee754_csr.rm];
 			sig = cop1Emulate(xcp, ctx);
+			/* revert to mips rounding mode */
+			ieee754_csr.rm = mips_rm[ieee754_csr.rm];
 		}
 
 		if (cpu_has_fpu)
diff -u linux-mips/arch/mips/math-emu/dp_sqrt.c linux/arch/mips/math-emu/dp_sqrt.c
--- linux-mips/arch/mips/math-emu/dp_sqrt.c	2005-01-31 11:05:18.000000000 +0900
+++ linux/arch/mips/math-emu/dp_sqrt.c	2005-04-27 10:04:18.000000000 +0900
@@ -37,7 +37,7 @@
 
 ieee754dp ieee754dp_sqrt(ieee754dp x)
 {
-	struct ieee754_csr oldcsr;
+	struct _ieee754_csr oldcsr;
 	ieee754dp y, z, t;
 	unsigned scalx, yh;
 	COMPXDP;
diff -u linux-mips/arch/mips/math-emu/ieee754.c linux/arch/mips/math-emu/ieee754.c
--- linux-mips/arch/mips/math-emu/ieee754.c	2005-01-31 11:05:18.000000000 +0900
+++ linux/arch/mips/math-emu/ieee754.c	2005-04-26 18:24:27.000000000 +0900
@@ -50,10 +50,6 @@
 	"SNaN",
 };
 
-/* the control status register
-*/
-struct ieee754_csr ieee754_csr;
-
 /* special constants
 */
 
diff -u linux-mips/arch/mips/math-emu/ieee754.h linux/arch/mips/math-emu/ieee754.h
--- linux-mips/arch/mips/math-emu/ieee754.h	2005-01-31 11:05:18.000000000 +0900
+++ linux/arch/mips/math-emu/ieee754.h	2005-04-27 10:04:57.000000000 +0900
@@ -35,6 +35,7 @@
 #ifdef __KERNEL__
 /* Going from Algorithmics to Linux native environment, add this */
 #include <linux/types.h>
+#include <linux/sched.h>	/* for 'current' */
 
 /*
  * Not very pretty, but the Linux kernel's normal va_list definition
@@ -323,15 +324,28 @@
 
 /* the control status register
 */
-struct ieee754_csr {
-	unsigned pad:13;
+struct _ieee754_csr {
+#if (defined(BYTE_ORDER) && BYTE_ORDER == BIG_ENDIAN) || defined(__MIPSEB__)
+	unsigned pad0:7;
 	unsigned nod:1;		/* set 1 for no denormalised numbers */
-	unsigned cx:5;		/* exceptions this operation */
+	unsigned c:1;		/* condition */
+	unsigned pad1:5;
+	unsigned cx:6;		/* exceptions this operation */
 	unsigned mx:5;		/* exception enable  mask */
 	unsigned sx:5;		/* exceptions total */
 	unsigned rm:2;		/* current rounding mode */
+#else
+	unsigned rm:2;		/* current rounding mode */
+	unsigned sx:5;		/* exceptions total */
+	unsigned mx:5;		/* exception enable  mask */
+	unsigned cx:6;		/* exceptions this operation */
+	unsigned pad1:5;
+	unsigned c:1;		/* condition */
+	unsigned nod:1;		/* set 1 for no denormalised numbers */
+	unsigned pad0:7;
+#endif
 };
-extern struct ieee754_csr ieee754_csr;
+#define ieee754_csr (*(struct _ieee754_csr *)(&current->thread.fpu.soft.fcr31))
 
 static __inline unsigned ieee754_getrm(void)
 {

From anemo@mba.ocn.ne.jp Wed Apr 27 06:46:37 2005
Received: with ECARTIS (v1.0.0; list linux-mips); Wed, 27 Apr 2005 06:46:53 +0100 (BST)
Received: from topsns.toshiba-tops.co.jp ([IPv6:::ffff:202.230.225.5]:53000
	"HELO topsns.toshiba-tops.co.jp") by linux-mips.org with SMTP
	id <S8225266AbVD0Fqh>; Wed, 27 Apr 2005 06:46:37 +0100
Received: from inside-ms1.toshiba-tops.co.jp by topsns.toshiba-tops.co.jp
          via smtpd (for [62.254.210.162]) with SMTP; 27 Apr 2005 05:46:35 UT
Received: from topsms.toshiba-tops.co.jp (localhost.localdomain [127.0.0.1])
	by localhost.toshiba-tops.co.jp (Postfix) with ESMTP id D7D541F2BF;
	Wed, 27 Apr 2005 14:46:33 +0900 (JST)
Received: from srd2sd.toshiba-tops.co.jp (gw-chiba7.toshiba-tops.co.jp [172.17.244.27])
	by topsms.toshiba-tops.co.jp (Postfix) with ESMTP id C23AC1D6CC;
	Wed, 27 Apr 2005 14:46:33 +0900 (JST)
Received: from localhost (fragile [172.17.28.65])
	by srd2sd.toshiba-tops.co.jp (8.12.10/8.12.10) with ESMTP id j3R5kXoj034228;
	Wed, 27 Apr 2005 14:46:33 +0900 (JST)
	(envelope-from anemo@mba.ocn.ne.jp)
Date:	Wed, 27 Apr 2005 14:46:33 +0900 (JST)
Message-Id: <20050427.144633.01210513.nemoto@toshiba-tops.co.jp>
To:	linux-mips@linux-mips.org
Cc:	ralf@linux-mips.org
Subject: Re: preempt safe fpu-emulator
From:	Atsushi Nemoto <anemo@mba.ocn.ne.jp>
In-Reply-To: <20050427.143622.77402407.nemoto@toshiba-tops.co.jp>
References: <20050427.143622.77402407.nemoto@toshiba-tops.co.jp>
X-Fingerprint: 6ACA 1623 39BD 9A94 9B1A  B746 CA77 FE94 2874 D52F
X-Pgp-Public-Key: http://wwwkeys.pgp.net/pks/lookup?op=get&search=0x2874D52F
X-Mailer: Mew version 3.3 on Emacs 21.3 / Mule 5.0 (SAKAKI)
Mime-Version: 1.0
Content-Type: Text/Plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Return-Path: <anemo@mba.ocn.ne.jp>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 7800
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: anemo@mba.ocn.ne.jp
Precedence: bulk
X-list: linux-mips

>>>>> On Wed, 27 Apr 2005 14:36:22 +0900 (JST), Atsushi Nemoto <anemo@mba.ocn.ne.jp> said:
anemo> With this patch, whole fpu-emulator can be run without
anemo> disabling preempt.  I will post a patch to fix preemption issue
anemo> soon.

Here it is.

It also fixes these issues:

* The process might lose fpu BEFORE calling preempt_disable() in
  do_fpe().
* The saved fp context might be overwritten if another process took
  fpu.


--- linux-mips/arch/mips/kernel/traps.c	2005-04-18 11:42:47.000000000 +0900
+++ linux/arch/mips/kernel/traps.c	2005-04-27 14:04:53.407006244 +0900
@@ -551,6 +551,14 @@
 
 		preempt_disable();
 
+#ifdef CONFIG_PREEMPT
+		if (!is_fpu_owner()) {
+			/* We might lose fpu before disabling preempt... */
+			own_fpu();
+			BUG_ON(!used_math());
+			restore_fp(current);
+		}
+#endif
 		/*
 	 	 * Unimplemented operation exception.  If we've got the full
 		 * software emulator on-board, let's use it...
@@ -562,11 +570,18 @@
 		 * a bit extreme for what should be an infrequent event.
 		 */
 		save_fp(current);
+		/* Ensure 'resume' not overwrite saved fp context again. */
+		lose_fpu();
+
+		preempt_enable();
 
 		/* Run the emulator */
 		sig = fpu_emulator_cop1Handler (0, regs,
 			&current->thread.fpu.soft);
 
+		preempt_disable();
+
+		own_fpu();	/* Using the FPU again.  */
 		/*
 		 * We can't allow the emulated instruction to leave any of
 		 * the cause bit set in $fcr31.
@@ -712,6 +727,8 @@
 			set_used_math();
 		}
 
+		preempt_enable();
+
 		if (!cpu_has_fpu) {
 			int sig = fpu_emulator_cop1Handler(0, regs,
 						&current->thread.fpu.soft);
@@ -719,8 +736,6 @@
 				force_sig(sig, current);
 		}
 
-		preempt_enable();
-
 		return;
 
 	case 2:

From tully@mikrotik.com Wed Apr 27 11:50:55 2005
Received: with ECARTIS (v1.0.0; list linux-mips); Wed, 27 Apr 2005 11:51:10 +0100 (BST)
Received: from frog.mt.lv ([IPv6:::ffff:159.148.172.197]:27878 "EHLO
	frog.mt.lv") by linux-mips.org with ESMTP id <S8225334AbVD0Kuz>;
	Wed, 27 Apr 2005 11:50:55 +0100
Received: from [10.5.7.10] (helo=your-lnsz0iqs6f.mikrotik.com)
	by frog.mt.lv with esmtp (Exim 4.44)
	id 1DQkEK-0006A6-S1
	for linux-mips@linux-mips.org; Wed, 27 Apr 2005 13:57:20 +0300
Message-Id: <6.2.1.2.0.20050427134637.063653a0@frog.mt.lv>
X-Mailer: QUALCOMM Windows Eudora Version 6.2.1.2
Date:	Wed, 27 Apr 2005 13:49:49 +0300
To:	linux-mips@linux-mips.org
From:	John Tully <tully@mikrotik.com>
Subject: New Forum for support of RB500 (MIPS board)
In-Reply-To: <20050427.144633.01210513.nemoto@toshiba-tops.co.jp>
References: <20050427.143622.77402407.nemoto@toshiba-tops.co.jp>
 <20050427.144633.01210513.nemoto@toshiba-tops.co.jp>
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"; format=flowed
Return-Path: <tully@mikrotik.com>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 7801
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: tully@mikrotik.com
Precedence: bulk
X-list: linux-mips

<http://forum.routerboard.com/>http://forum.routerboard.com/

One interesting topic is that openWRT is being ported to the RB500.

John


From toch@dfpost.ru Wed Apr 27 16:56:18 2005
Received: with ECARTIS (v1.0.0; list linux-mips); Wed, 27 Apr 2005 16:56:33 +0100 (BST)
Received: from dfpost.ru ([IPv6:::ffff:194.85.103.225]:39360 "EHLO
	mail.dfpost.ru") by linux-mips.org with ESMTP id <S8225355AbVD0P4S>;
	Wed, 27 Apr 2005 16:56:18 +0100
Received: by mail.dfpost.ru (Postfix, from userid 7897)
	id A112C3E4B1; Wed, 27 Apr 2005 19:54:15 +0400 (MSD)
Received: from toch.dfpost.ru (toch [192.168.7.60])
	by mail.dfpost.ru (Postfix) with SMTP id 199E23E4AE
	for <linux-mips@linux-mips.org>; Wed, 27 Apr 2005 19:54:15 +0400 (MSD)
Date:	Wed, 27 Apr 2005 19:55:52 +0400
From:	Dmitriy Tochansky <toch@dfpost.ru>
To:	linux-mips@linux-mips.org
Subject: ramfs
Message-Id: <20050427195552.41f92184.toch@dfpost.ru>
X-Mailer: Sylpheed version 1.0.4 (GTK+ 1.2.10; i686-pc-linux-gnu)
Mime-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
X-Bogosity: No, tests=bogofilter, spamicity=0.000000, version=0.92.8
Return-Path: <toch@dfpost.ru>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 7802
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: toch@dfpost.ru
Precedence: bulk
X-list: linux-mips

Hello!

Im trying to use embedded ramdisk on boot.
The error is:

[4294668.794000] Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(1,0) 

In make menuconfig I pass to initrdfs directory with my root("/mips/root"),
there are no errors on make. 
Ramdisk size set to 7777k
([4294668.691000] RAMDISK driver initialized: 2 RAM disks of 7777K size 1024 blocksize)

populate_rootfs() works fine:


[4294667.502000] init/initramfs.c void __init populate_rootfs(void);
[4294668.313000] checking if image is initramfs... it is

then on do_mounts in void __init mount_block_root(char *name, int flags)
it tryes to mount initrd with no result. :( As final:


[4294668.794000] Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(1,0)

Any ideas?

Kernel from cvs(yesterday updated).

Which type of fs is initrd? AFAIK gen_init_cpio just generates cpio archive with my root. Seems like it unpacked fine but who did mkfs on /dev/ram0?


-- 
Dmitriy Tochansky
toch@dfpost.ru
JID: dtoch@jabber.ru

From jgreen@users.sourceforge.net Wed Apr 27 19:56:17 2005
Received: with ECARTIS (v1.0.0; list linux-mips); Wed, 27 Apr 2005 19:56:36 +0100 (BST)
Received: from earth.resonance.org ([IPv6:::ffff:209.79.220.22]:1206 "EHLO
	earth.resonance.org") by linux-mips.org with ESMTP
	id <S8225337AbVD0S4R>; Wed, 27 Apr 2005 19:56:17 +0100
Received: from SillyPuddy.localdomain (earth.resonance.org [209.79.220.22])
	by earth.resonance.org (Postfix) with ESMTP id 28E378AD0F;
	Wed, 27 Apr 2005 11:56:48 -0700 (PDT)
Subject: Re: iptables/vmalloc issues on alchemy
From:	Josh Green <jgreen@users.sourceforge.net>
To:	Herbert Valerio Riedel <hvr@hvrlab.org>
Cc:	Pete Popov <ppopov@embeddedalley.com>, linux-mips@linux-mips.org
In-Reply-To: <1114505009.11315.37.camel@mini.intra>
References: <1114505009.11315.37.camel@mini.intra>
Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="=-OZc5Q07mEa0x8npIoUIK"
Date:	Wed, 27 Apr 2005 20:49:44 +0200
Message-Id: <1114627785.17008.21.camel@SillyPuddy.localdomain>
Mime-Version: 1.0
X-Mailer: Evolution 2.0.2 
Return-Path: <jgreen@users.sourceforge.net>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 7803
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: jgreen@users.sourceforge.net
Precedence: bulk
X-list: linux-mips


--=-OZc5Q07mEa0x8npIoUIK
Content-Type: text/plain
Content-Transfer-Encoding: quoted-printable

In my case it seemed I was able to achieve a stable condition by loading
modules in a specific order.  I am not doing a lot of iptables rule
modifications currently though, but will be in the future.  I was
planning on doing some additional gdb debugging of the failure
(especially the initial large MMAP attempt by iptables, which was 1.5GB
in my case).  I wont be doing anything on this for quite a while though,
since I am currently away from the board I was doing this work on.  I'm
currently traveling so I'm not on the Linux MIPS list.  I would be
interested in any fixes to this problem though, so please CC me :)
Cheers.
	Josh Green

On Tue, 2005-04-26 at 10:43 +0200, Herbert Valerio Riedel wrote:
> hello!
>=20
> I'm seeing similiar problems to the ones that Josh Green reported some
> time ago on this list (but alas didn't seem to get any further
> attention...)
>=20
> The problem seems to be so far, that when modifying the iptables
> structures by adding/flushing the rules, a state can be reached sooner
> or later (indeterministic! smells like race) where the data structure
> becomes invalid (although there are checks in the kernel which would
> prevent that); the result is either ip_tables.c:ipt_do_tables() causing
> an oops due to bad pointer dereferencing (or the kernel freezing w/o
> further notice at all), or the iptables tool being unable to
> retrieve/modify the rules from the kernel (and getting ENOMEM/EINVAL) or
> simply segfaulting due to other inconsistencies with the data...
>=20
> I was able to avoid corruption by replacing all vmalloc()/vfree() calls
> by kmalloc()/kfree()'s respectively in ip_tables.c; another variant
> which I was suggested to try helped as well: inserting flush_tlb_all()
> calls after every vmalloc() in said source file;
>=20
> I assumed so far, the issue must be alchemy specific, as I experienced
> this on a DbAu1550 board; and Josh had it on a DbAu1100; As it's a
> rather easy to trigger bug, I would have expected to see more bug
> reports if it affected more than just the alchemy's on 2.6.x;
> I tried it with a few kernel revisions from linux-mips' cvs (from 2.6.10
> upto 2.6.12rc2); also tried different compilers (debian's cross-gcc's
> 3.4.4 and 3.3.3), even switched the alchemy to little endian
> operation... all the same; everything else I use on that board has been
> rather stable so far, iptables are the only part which show up this
> vmalloc-issue so far...
>=20
> as to reproducing the bug, it's rather easy for me:
>=20
> a script repeatedly performing rule modifications should trigger the
> issue rather easily (possibly called over a remote ssh/telnet session,
> in order to create a bit of traffic as well...)
>=20
> set -x
> while :
> do
>   iptables -F || exit 1
>   iptables -A INPUT -i lo -j ACCEPT || exit 1
>   iptables -A INPUT -p udp -i eth0 --dport domain -j ACCEPT || exit 1
>   iptables -A INPUT -p udp -i eth0 --dport 6666 -j ACCEPT || exit 1
>   iptables -A INPUT -p tcp -i eth0 --dport ssh -j ACCEPT || exit 1
>   iptables -A INPUT -p tcp -i eth0 --dport http -j ACCEPT || exit 1
>   iptables -A INPUT -p tcp -i eth0 --dport https -j ACCEPT || exit 1
>   iptables -A INPUT -p tcp -i eth0 --dport 3496 -j ACCEPT || exit 1
> done
>=20
> or alternatively (requiring state & multiport helpers)
>=20
> while :
> do
>   iptables -F
>   iptables -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT  || ex=
it 1
>   iptables -A INPUT -i lo -j ACCEPT || exit 1
>   iptables -A INPUT -p udp -i eth0 -m multiport --dports domain,6666 -j A=
CCEPT || exit 1
>   iptables -A INPUT -p tcp -i eth0 -m multiport --dports ssh,http,https,3=
496 -j ACCEPT || exit 1
>   iptables -A OUTPUT -m state --state ESTABLISHED,RELATED -j ACCEPT || ex=
it 1
>   iptables -A OUTPUT -o lo -j ACCEPT || exit 1
>   iptables -A OUTPUT -p udp -o eth0 -m multiport --dports ntp -j ACCEPT |=
| exit 1
>   iptables -A OUTPUT -p tcp -o eth0 -m multiport --dports www,https,8444,=
8445,8446,8454,8455,8456,8464,8465,8466,9225 -j ACCEPT || exit 1
> done
>=20
> regards,

--=-OZc5Q07mEa0x8npIoUIK
Content-Type: application/pgp-signature; name=signature.asc
Content-Description: This is a digitally signed message part

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.6 (GNU/Linux)

iD8DBQBCb97IRoMuWKCcbgQRAjbWAJ9kvc2VtdfQM3lt3Drfa2iDTv3F2wCgxblf
RM3oRxeqUZsOKXbZNGReZEU=
=0GFP
-----END PGP SIGNATURE-----

--=-OZc5Q07mEa0x8npIoUIK--


From dan@embeddededge.com Wed Apr 27 20:06:16 2005
Received: with ECARTIS (v1.0.0; list linux-mips); Wed, 27 Apr 2005 20:06:31 +0100 (BST)
Received: from embeddededge.com ([IPv6:::ffff:209.113.146.155]:41220 "EHLO
	penguin.netx4.com") by linux-mips.org with ESMTP
	id <S8225367AbVD0TGQ>; Wed, 27 Apr 2005 20:06:16 +0100
Received: from [192.168.253.28] (tibook.embeddededge.com [192.168.253.28])
	by penguin.netx4.com (8.12.8/8.12.9) with ESMTP id j3RJ0Lfg002290;
	Wed, 27 Apr 2005 15:00:21 -0400
In-Reply-To: <1114627785.17008.21.camel@SillyPuddy.localdomain>
References: <1114505009.11315.37.camel@mini.intra> <1114627785.17008.21.camel@SillyPuddy.localdomain>
Mime-Version: 1.0 (Apple Message framework v622)
Content-Type: text/plain; charset=US-ASCII; format=flowed
Message-Id: <4bf8c757c3a4d32177ab90b92eace823@embeddededge.com>
Content-Transfer-Encoding: 7bit
Cc:	linux-mips@linux-mips.org, Pete Popov <ppopov@embeddedalley.com>,
	Herbert Valerio Riedel <hvr@hvrlab.org>
From:	Dan Malek <dan@embeddededge.com>
Subject: Re: iptables/vmalloc issues on alchemy
Date:	Wed, 27 Apr 2005 15:06:00 -0400
To:	Josh Green <jgreen@users.sourceforge.net>
X-Mailer: Apple Mail (2.622)
Return-Path: <dan@embeddededge.com>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 7804
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: dan@embeddededge.com
Precedence: bulk
X-list: linux-mips


On Apr 27, 2005, at 2:49 PM, Josh Green wrote:

> ...... I was
> planning on doing some additional gdb debugging of the failure
> (especially the initial large MMAP attempt by iptables, which was 1.5GB
> in my case).

Oh wait ....  I found a bug a while ago from someone trying to load
large modules.  There is a problem if the kernel grows to need
additional PTE tables, the top level pointers don't get propagated
correctly and subsequent access by a thread that didn't actually
do the allocation would fail.  I'm looking into this, including your
past message about 64-bit PTEs.

Thanks.


	-- Dan


From vprashant@echelon.com Thu Apr 28 03:14:40 2005
Received: with ECARTIS (v1.0.0; list linux-mips); Thu, 28 Apr 2005 03:14:55 +0100 (BST)
Received: from ntfw.echelon.com ([IPv6:::ffff:205.229.50.10]:8944 "EHLO
	[205.229.50.10]") by linux-mips.org with ESMTP id <S8225474AbVD1COk>;
	Thu, 28 Apr 2005 03:14:40 +0100
Received: from miles.echelon.com by [205.229.50.10]
          via smtpd (for mail.linux-mips.org [62.254.210.162]) with ESMTP; Wed, 27 Apr 2005 19:14:38 -0700
Received: by miles.echelon.echcorp.com with Internet Mail Service (5.5.2653.19)
	id <JWPMNMC3>; Wed, 27 Apr 2005 19:14:36 -0700
Message-ID: <5375D9FB1CC3994D9DCBC47C344EEB590165465A@miles.echelon.echcorp.com>
From:	Prashant Viswanathan <vprashant@echelon.com>
To:	linux-mips@linux-mips.org
Subject:  Big Endian au1550
Date:	Wed, 27 Apr 2005 19:14:35 -0700
MIME-Version: 1.0
X-Mailer: Internet Mail Service (5.5.2653.19)
Content-Type: text/plain
Return-Path: <vprashant@echelon.com>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 7805
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: vprashant@echelon.com
Precedence: bulk
X-list: linux-mips

Is there a reason why the default configuration file doesn't support Big
Endian for the dbAu1550? 

Even if I edit .config to set the endianness to "BIG" it seems to change to
"Little Endian" every time a make is run.

Thanks
Prashant


From mlachwani@mvista.com Thu Apr 28 03:23:17 2005
Received: with ECARTIS (v1.0.0; list linux-mips); Thu, 28 Apr 2005 03:23:33 +0100 (BST)
Received: from gateway-1237.mvista.com ([IPv6:::ffff:12.44.186.158]:35063 "EHLO
	hermes.mvista.com") by linux-mips.org with ESMTP
	id <S8225477AbVD1CXR>; Thu, 28 Apr 2005 03:23:17 +0100
Received: from mvista.com (prometheus.mvista.com [10.0.0.139])
	by hermes.mvista.com (Postfix) with ESMTP
	id 470B018F06; Wed, 27 Apr 2005 19:23:14 -0700 (PDT)
Message-ID: <42704911.3010004@mvista.com>
Date:	Wed, 27 Apr 2005 19:23:13 -0700
From:	Manish Lachwani <mlachwani@mvista.com>
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4.2) Gecko/20040308
X-Accept-Language: en-us, en
MIME-Version: 1.0
To:	Prashant Viswanathan <vprashant@echelon.com>
Cc:	linux-mips@linux-mips.org
Subject: Re: Big Endian au1550
References: <5375D9FB1CC3994D9DCBC47C344EEB590165465A@miles.echelon.echcorp.com>
In-Reply-To: <5375D9FB1CC3994D9DCBC47C344EEB590165465A@miles.echelon.echcorp.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Return-Path: <mlachwani@mvista.com>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 7806
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: mlachwani@mvista.com
Precedence: bulk
X-list: linux-mips

Prashant Viswanathan wrote:

>Is there a reason why the default configuration file doesn't support Big
>Endian for the dbAu1550? 
>
>Even if I edit .config to set the endianness to "BIG" it seems to change to
>"Little Endian" every time a make is run.
>
>Thanks
>Prashant
>
>
>  
>
In arch/mips/Kconfig,

config CPU_LITTLE_ENDIAN
        bool "Generate little endian code"
        default y if ACER_PICA_61 || CASIO_E55 || DDB5074 || DDB5476 || 
DDB5477 || MACH_DECSTATION
|| IBM_WORKPAD || LASAT || MIPS_COBALT || MIPS_ITE8172 || MIPS_IVR || 
SOC_AU1X00 || NEC_OSPREY || OLIVETTI_M700 || SNI_RM200_PCI || 
VICTOR_MPC30X || ZAO_CAPCELLA
        default n if MIPS_EV64120 || MIPS_EV96100 || MOMENCO_OCELOT || 
MOMENCO_OCELOT_G || SGI_IP22 || SGI_IP27 || SGI_IP32 || TOSHIBA_JMR3927
        help
          Some MIPS machines can be configured for either little or big 
endian
          byte order. These modes require different kernels. Say Y if your
          machine is little endian, N if it's a big endian machine.

So, it appears that if you have SOC_AU1X00 set, it will always be 
configured little endian.

Thanks
Manish Lachwani



From vprashant@echelon.com Thu Apr 28 04:44:35 2005
Received: with ECARTIS (v1.0.0; list linux-mips); Thu, 28 Apr 2005 04:44:51 +0100 (BST)
Received: from ntfw.echelon.com ([IPv6:::ffff:205.229.50.10]:63525 "EHLO
	[205.229.50.10]") by linux-mips.org with ESMTP id <S8225534AbVD1Dof>;
	Thu, 28 Apr 2005 04:44:35 +0100
Received: from miles.echelon.com by [205.229.50.10]
          via smtpd (for mail.linux-mips.org [62.254.210.162]) with ESMTP; Wed, 27 Apr 2005 20:44:34 -0700
Received: by miles.echelon.echcorp.com with Internet Mail Service (5.5.2653.19)
	id <JWPMNM7D>; Wed, 27 Apr 2005 20:44:33 -0700
Message-ID: <5375D9FB1CC3994D9DCBC47C344EEB590165465B@miles.echelon.echcorp.com>
From:	Prashant Viswanathan <vprashant@echelon.com>
To:	'Manish Lachwani' <mlachwani@mvista.com>,
	Prashant Viswanathan <vprashant@echelon.com>
Cc:	linux-mips@linux-mips.org
Subject: RE: Big Endian au1550
Date:	Wed, 27 Apr 2005 20:44:32 -0700
MIME-Version: 1.0
X-Mailer: Internet Mail Service (5.5.2653.19)
Content-Type: text/plain
Return-Path: <vprashant@echelon.com>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 7807
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: vprashant@echelon.com
Precedence: bulk
X-list: linux-mips

> Prashant Viswanathan wrote:
> 
> >Is there a reason why the default configuration file doesn't support Big
> >Endian for the dbAu1550?
> >
> >Even if I edit .config to set the endianness to "BIG" it seems to change
> to
> >"Little Endian" every time a make is run.
> >
> >Thanks
> >Prashant
> >
> >
> >
> >
> In arch/mips/Kconfig,
> 
> config CPU_LITTLE_ENDIAN
>         bool "Generate little endian code"
>         default y if ACER_PICA_61 || CASIO_E55 || DDB5074 || DDB5476 ||
> DDB5477 || MACH_DECSTATION
> || IBM_WORKPAD || LASAT || MIPS_COBALT || MIPS_ITE8172 || MIPS_IVR ||
> SOC_AU1X00 || NEC_OSPREY || OLIVETTI_M700 || SNI_RM200_PCI ||
> VICTOR_MPC30X || ZAO_CAPCELLA
>         default n if MIPS_EV64120 || MIPS_EV96100 || MOMENCO_OCELOT ||
> MOMENCO_OCELOT_G || SGI_IP22 || SGI_IP27 || SGI_IP32 || TOSHIBA_JMR3927
>         help
>           Some MIPS machines can be configured for either little or big
> endian
>           byte order. These modes require different kernels. Say Y if your
>           machine is little endian, N if it's a big endian machine.
> 
> So, it appears that if you have SOC_AU1X00 set, it will always be
> configured little endian.

Is there a reason for this? 

Many months ago I was able to build a big-endian image and load it on my
dbAu1550 (also configured to be BE). I just decided to update and now I find
that it is almost as if it is not meant to be built BE.




From ppopov@embeddedalley.com Thu Apr 28 04:57:31 2005
Received: with ECARTIS (v1.0.0; list linux-mips); Thu, 28 Apr 2005 04:57:46 +0100 (BST)
Received: from smtp008.bizmail.sc5.yahoo.com ([IPv6:::ffff:66.163.170.74]:11909
	"HELO smtp008.bizmail.sc5.yahoo.com") by linux-mips.org with SMTP
	id <S8225537AbVD1D5b>; Thu, 28 Apr 2005 04:57:31 +0100
Received: from unknown (HELO ?127.0.0.1?) (ppopov@embeddedalley.com@63.194.214.47 with plain)
  by smtp008.bizmail.sc5.yahoo.com with SMTP; 28 Apr 2005 03:57:28 -0000
Message-ID: <42705F23.3000402@embeddedalley.com>
Date:	Wed, 27 Apr 2005 20:57:23 -0700
From:	ppopov@embeddedalley.com
User-Agent: Mozilla Thunderbird 1.0 (Windows/20041206)
X-Accept-Language: en-us, en
MIME-Version: 1.0
To:	Prashant Viswanathan <vprashant@echelon.com>
CC:	'Manish Lachwani' <mlachwani@mvista.com>, linux-mips@linux-mips.org
Subject: Re: Big Endian au1550
References: <5375D9FB1CC3994D9DCBC47C344EEB590165465B@miles.echelon.echcorp.com>
In-Reply-To: <5375D9FB1CC3994D9DCBC47C344EEB590165465B@miles.echelon.echcorp.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Return-Path: <ppopov@embeddedalley.com>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 7808
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: ppopov@embeddedalley.com
Precedence: bulk
X-list: linux-mips

Prashant Viswanathan wrote:

>>Prashant Viswanathan wrote:
>>
>>    
>>
>>>Is there a reason why the default configuration file doesn't support Big
>>>Endian for the dbAu1550?
>>>
>>>Even if I edit .config to set the endianness to "BIG" it seems to change
>>>      
>>>
>>to
>>    
>>
>>>"Little Endian" every time a make is run.
>>>
>>>Thanks
>>>Prashant
>>>
>>>
>>>
>>>
>>>      
>>>
>>In arch/mips/Kconfig,
>>
>>config CPU_LITTLE_ENDIAN
>>        bool "Generate little endian code"
>>        default y if ACER_PICA_61 || CASIO_E55 || DDB5074 || DDB5476 ||
>>DDB5477 || MACH_DECSTATION
>>|| IBM_WORKPAD || LASAT || MIPS_COBALT || MIPS_ITE8172 || MIPS_IVR ||
>>SOC_AU1X00 || NEC_OSPREY || OLIVETTI_M700 || SNI_RM200_PCI ||
>>VICTOR_MPC30X || ZAO_CAPCELLA
>>        default n if MIPS_EV64120 || MIPS_EV96100 || MOMENCO_OCELOT ||
>>MOMENCO_OCELOT_G || SGI_IP22 || SGI_IP27 || SGI_IP32 || TOSHIBA_JMR3927
>>        help
>>          Some MIPS machines can be configured for either little or big
>>endian
>>          byte order. These modes require different kernels. Say Y if your
>>          machine is little endian, N if it's a big endian machine.
>>
>>So, it appears that if you have SOC_AU1X00 set, it will always be
>>configured little endian.
>>    
>>
>
>Is there a reason for this? 
>  
>
It's the more common configuration.

>Many months ago I was able to build a big-endian image and load it on my
>dbAu1550 (also configured to be BE). I just decided to update and now I find
>that it is almost as if it is not meant to be built BE.
>  
>
BE should be fine too.  We should fix this in Kconfig.

Pete

From hvr@hvrlab.org Thu Apr 28 06:07:06 2005
Received: with ECARTIS (v1.0.0; list linux-mips); Thu, 28 Apr 2005 06:07:21 +0100 (BST)
Received: from h081217049130.dyn.cm.kabsi.at ([IPv6:::ffff:81.217.49.130]:49583
	"EHLO phobos.hvrlab.org") by linux-mips.org with ESMTP
	id <S8225561AbVD1FHG>; Thu, 28 Apr 2005 06:07:06 +0100
Received: from mini.intra (dhcp-1334-4.blizz.at [213.143.126.4])
	(authenticated bits=0)
	by phobos.hvrlab.org (8.13.4/8.13.4/Debian-1) with ESMTP id j3S56ttq006615
	(version=TLSv1/SSLv3 cipher=RC4-MD5 bits=128 verify=NOT);
	Thu, 28 Apr 2005 07:06:56 +0200
Subject: Re: iptables/vmalloc issues on alchemy
From:	Herbert Valerio Riedel <hvr@hvrlab.org>
To:	Dan Malek <dan@embeddededge.com>
Cc:	Josh Green <jgreen@users.sourceforge.net>,
	linux-mips@linux-mips.org, Pete Popov <ppopov@embeddedalley.com>
In-Reply-To: <4bf8c757c3a4d32177ab90b92eace823@embeddededge.com>
References: <1114505009.11315.37.camel@mini.intra>
	 <1114627785.17008.21.camel@SillyPuddy.localdomain>
	 <4bf8c757c3a4d32177ab90b92eace823@embeddededge.com>
Content-Type: text/plain
Date:	Thu, 28 Apr 2005 07:06:52 +0200
Message-Id: <1114664812.4647.6.camel@mini.intra>
Mime-Version: 1.0
X-Mailer: Evolution 2.2.2 
Content-Transfer-Encoding: 7bit
Return-Path: <hvr@hvrlab.org>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 7809
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: hvr@hvrlab.org
Precedence: bulk
X-list: linux-mips

On Wed, 2005-04-27 at 15:06 -0400, Dan Malek wrote:
> On Apr 27, 2005, at 2:49 PM, Josh Green wrote:
> 
> > ...... I was
> > planning on doing some additional gdb debugging of the failure
> > (especially the initial large MMAP attempt by iptables, which was 1.5GB
> > in my case).
> 
> Oh wait ....  I found a bug a while ago from someone trying to load
> large modules.  There is a problem if the kernel grows to need
> additional PTE tables, the top level pointers don't get propagated
> correctly and subsequent access by a thread that didn't actually
> do the allocation would fail.  I'm looking into this, including your
> past message about 64-bit PTEs.

additional note:

the problem only shows up for me only when enabling
CONFIG_64BIT_PHYS_ADDR, in case someone had problems reproducing the
issue...

regards,
-- 
Herbert Valerio Riedel <hvr@hvrlab.org>


From jaypee@hotpop.com Thu Apr 28 09:56:20 2005
Received: with ECARTIS (v1.0.0; list linux-mips); Thu, 28 Apr 2005 09:56:36 +0100 (BST)
Received: from smtp-out.hotpop.com ([IPv6:::ffff:38.113.3.51]:7086 "EHLO
	smtp-out.hotpop.com") by linux-mips.org with ESMTP
	id <S8225734AbVD1I4U>; Thu, 28 Apr 2005 09:56:20 +0100
Received: from hotpop.com (kubrick.hotpop.com [38.113.3.103])
	by smtp-out.hotpop.com (Postfix) with SMTP id 66C5F799AB
	for <linux-mips@linux-mips.org>; Thu, 28 Apr 2005 08:56:00 +0000 (UTC)
Received: from [192.168.0.85] (unknown [83.104.11.251])
	by smtp-1.hotpop.com (Postfix) with ESMTP
	id 1C83B1A0201; Thu, 28 Apr 2005 08:55:56 +0000 (UTC)
Subject: Re: Big Endian au1550
From:	JP <jaypee@hotpop.com>
To:	ppopov@embeddedalley.com
Cc:	Prashant Viswanathan <vprashant@echelon.com>,
	'Manish Lachwani' <mlachwani@mvista.com>,
	linux-mips@linux-mips.org
In-Reply-To: <42705F23.3000402@embeddedalley.com>
References: <5375D9FB1CC3994D9DCBC47C344EEB590165465B@miles.echelon.echcorp.com>
	 <42705F23.3000402@embeddedalley.com>
Content-Type: text/plain
Date:	Thu, 28 Apr 2005 09:56:23 +0100
Message-Id: <1114678583.2729.10.camel@localhost.localdomain>
Mime-Version: 1.0
X-Mailer: Evolution 2.2.1.1 
Content-Transfer-Encoding: 7bit
X-HotPOP: -----------------------------------------------
                   Sent By HotPOP.com FREE Email
             Get your FREE POP email at www.HotPOP.com
          -----------------------------------------------
Return-Path: <jaypee@hotpop.com>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 7810
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: jaypee@hotpop.com
Precedence: bulk
X-list: linux-mips

I can confirm that BE works fine on the db1550 board. Just add line

select SYS_SUPPORTS_BIG_ENDIAN

to the db1550 section of arch/mips/Kconfig. That allows you to choose
BE.

I guess all the alchemy boards will work LE and BE. At least allowing
the setting will mean they get tested rather than folk getting put off
by the fact they can't select it.

JP

On Wed, 2005-04-27 at 20:57 -0700, ppopov@embeddedalley.com wrote:
> Prashant Viswanathan wrote:
> 
> >>Prashant Viswanathan wrote:
> >>
> >>    
> >>
> >>>Is there a reason why the default configuration file doesn't support Big
> >>>Endian for the dbAu1550?
> >>>
> >>>Even if I edit .config to set the endianness to "BIG" it seems to change
> >>>      
> >>>
> >>to
> >>    
> >>
> >>>"Little Endian" every time a make is run.
> >>>
> >>>Thanks
> >>>Prashant
> >>>
> >>>
> >>>
> >>>
> >>>      
> >>>
> >>In arch/mips/Kconfig,
> >>
> >>config CPU_LITTLE_ENDIAN
> >>        bool "Generate little endian code"
> >>        default y if ACER_PICA_61 || CASIO_E55 || DDB5074 || DDB5476 ||
> >>DDB5477 || MACH_DECSTATION
> >>|| IBM_WORKPAD || LASAT || MIPS_COBALT || MIPS_ITE8172 || MIPS_IVR ||
> >>SOC_AU1X00 || NEC_OSPREY || OLIVETTI_M700 || SNI_RM200_PCI ||
> >>VICTOR_MPC30X || ZAO_CAPCELLA
> >>        default n if MIPS_EV64120 || MIPS_EV96100 || MOMENCO_OCELOT ||
> >>MOMENCO_OCELOT_G || SGI_IP22 || SGI_IP27 || SGI_IP32 || TOSHIBA_JMR3927
> >>        help
> >>          Some MIPS machines can be configured for either little or big
> >>endian
> >>          byte order. These modes require different kernels. Say Y if your
> >>          machine is little endian, N if it's a big endian machine.
> >>
> >>So, it appears that if you have SOC_AU1X00 set, it will always be
> >>configured little endian.
> >>    
> >>
> >
> >Is there a reason for this? 
> >  
> >
> It's the more common configuration.
> 
> >Many months ago I was able to build a big-endian image and load it on my
> >dbAu1550 (also configured to be BE). I just decided to update and now I find
> >that it is almost as if it is not meant to be built BE.
> >  
> >
> BE should be fine too.  We should fix this in Kconfig.
> 
> Pete
> 
-- 
mailto:jaypee@hotpop.com
http://jaypee.org.uk




From pf@net.alphadv.de Thu Apr 28 12:41:43 2005
Received: with ECARTIS (v1.0.0; list linux-mips); Thu, 28 Apr 2005 12:41:59 +0100 (BST)
Received: from mail.alphastar.de ([IPv6:::ffff:194.59.236.179]:15627 "EHLO
	mail.alphastar.de") by linux-mips.org with ESMTP
	id <S8225754AbVD1Lln>; Thu, 28 Apr 2005 12:41:43 +0100
Received: from SNaIlmail.Peter (217.249.217.11)
          by mail.alphastar.de with MERCUR Mailserver (v4.02.28 MTIxLTIxODAtNjY2OA==)
          for <linux-mips@linux-mips.org>; Thu, 28 Apr 2005 13:39:26 +0200
Received: from Opal.Peter (root@Opal.Peter [192.168.1.1])
	by SNaIlmail.Peter (8.12.6/8.12.6/Sendmail/Linux 2.0.32) with ESMTP id j3SBSGvB000152
	for <linux-mips@linux-mips.org>; Thu, 28 Apr 2005 13:28:17 +0200
Received: from localhost (pf@localhost)
	by Opal.Peter (8.9.3/8.9.3/Sendmail/Linux 2.2.5-15) with ESMTP id NAA00826
	for <linux-mips@linux-mips.org>; Thu, 28 Apr 2005 13:20:23 +0200
Date:	Thu, 28 Apr 2005 13:20:23 +0200 (CEST)
From:	peter fuerst <pf@net.alphadv.de>
To:	linux-mips@linux-mips.org
Subject: 2.6.12-rc2 for IP28
Message-ID: <Pine.LNX.4.21.0504281314090.818-100000@Opal.Peter>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Reply-To: pf@net.alphadv.de
Return-Path: <pf@net.alphadv.de>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 7811
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: pf@net.alphadv.de
Precedence: bulk
X-list: linux-mips



Hi,

the patches for Indigo2 IP28 are updated to current kernel(s).
They can - as usual - be retreived from
"http://home.alphastar.de/fuerst/download.html".

with kind regards

pf


From franck.bui-huu@innova-card.com Thu Apr 28 14:37:27 2005
Received: with ECARTIS (v1.0.0; list linux-mips); Thu, 28 Apr 2005 14:37:43 +0100 (BST)
Received: from smtp10.wanadoo.fr ([IPv6:::ffff:193.252.22.21]:58318 "EHLO
	smtp10.wanadoo.fr") by linux-mips.org with ESMTP
	id <S8225767AbVD1Nh1>; Thu, 28 Apr 2005 14:37:27 +0100
Received: from me-wanadoo.net (unknown [127.0.0.1])
	by mwinf1003.wanadoo.fr (SMTP Server) with ESMTP id 1CCB82000359
	for <linux-mips@linux-mips.org>; Thu, 28 Apr 2005 15:37:20 +0200 (CEST)
Received: from smtp.innova-card.com (AMarseille-206-1-6-143.w80-14.abo.wanadoo.fr [80.14.198.143])
	by mwinf1003.wanadoo.fr (SMTP Server) with ESMTP id 9E7DB2000328;
	Thu, 28 Apr 2005 15:37:19 +0200 (CEST)
X-ME-UUID: 20050428133719649.9E7DB2000328@mwinf1003.wanadoo.fr
Received: by smtp.innova-card.com (Postfix, from userid 100)
	id 195383800A; Thu, 28 Apr 2005 15:37:12 +0200 (CEST)
Received: from [192.168.0.24] (spoutnik.innova-card.com [192.168.0.24])
	by smtp.innova-card.com (Postfix) with ESMTP
	id 709A138009; Thu, 28 Apr 2005 15:37:11 +0200 (CEST)
Message-ID: <4270E678.7050402@innova-card.com>
Date:	Thu, 28 Apr 2005 15:34:48 +0200
From:	Franck Bui-Huu <franck.bui-huu@innova-card.com>
Reply-To: franck.bui-huu@innova-card.com
Organization: Innova Card
User-Agent: Mozilla Thunderbird 1.0.2-1.3.2 (X11/20050324)
X-Accept-Language: en-us, en
MIME-Version: 1.0
To:	Dmitriy Tochansky <toch@dfpost.ru>
Cc:	linux-mips@linux-mips.org
Subject: Re: ramfs
References: <20050427195552.41f92184.toch@dfpost.ru>
In-Reply-To: <20050427195552.41f92184.toch@dfpost.ru>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Return-Path: <franck.bui-huu@innova-card.com>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 7812
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: franck.bui-huu@innova-card.com
Precedence: bulk
X-list: linux-mips

Hi

Dmitriy Tochansky wrote:

>Hello!
>
>Im trying to use embedded ramdisk on boot.
>The error is:
>
>[4294668.794000] Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(1,0) 
>
>In make menuconfig I pass to initrdfs directory with my root("/mips/root"),
>there are no errors on make. 
>Ramdisk size set to 7777k
>([4294668.691000] RAMDISK driver initialized: 2 RAM disks of 7777K size 1024 blocksize)
>
>populate_rootfs() works fine:
>
>
>[4294667.502000] init/initramfs.c void __init populate_rootfs(void);
>[4294668.313000] checking if image is initramfs... it is
>  
>
why using initramfs with initrd ?

>then on do_mounts in void __init mount_block_root(char *name, int flags)
>it tryes to mount initrd with no result. :( As final:
>
>
>[4294668.794000] Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(1,0)
>
>Any ideas?
>  
>
maybe try to add in your kernel command option: "rootfstype=ramfs"

>Kernel from cvs(yesterday updated).
>
>Which type of fs is initrd? AFAIK gen_init_cpio just generates cpio archive with my root. Seems like it unpacked fine but who did mkfs on /dev/ram0?
>
>
>  
>
initrd fs depends on how your initrd image is built.
initramfs fs is ramfs.

cheers,

                Franck


-------------------------------------------------------------------------------
Come to visit Innova Card at Cards Asia (Singapore, April 27-29, 2005) on booth 4A04 !

links:
 - www.worldofcards.biz/2005/cardsa_SG/

-------------------------------------------------------------------------------
This message contains confidential information and is intended only for the
individual named. If you are not the named addressee you should not
disseminate, distribute or copy this e-mail. Please notify the sender
immediately by e-mail if you have received this e-mail by mistake and delete
this e-mail from your system.
Innova Card will not therefore be liable for the message if modified.


From ralf@linux-mips.org Thu Apr 28 14:41:11 2005
Received: with ECARTIS (v1.0.0; list linux-mips); Thu, 28 Apr 2005 14:41:26 +0100 (BST)
Received: from extgw-uk.mips.com ([IPv6:::ffff:62.254.210.129]:32525 "EHLO
	bacchus.net.dhis.org") by linux-mips.org with ESMTP
	id <S8225767AbVD1NlL>; Thu, 28 Apr 2005 14:41:11 +0100
Received: from dea.linux-mips.net (localhost.localdomain [127.0.0.1])
	by bacchus.net.dhis.org (8.13.1/8.13.1) with ESMTP id j3SDfJsn001936;
	Thu, 28 Apr 2005 14:41:19 +0100
Received: (from ralf@localhost)
	by dea.linux-mips.net (8.13.1/8.13.1/Submit) id j3SDfIK5001935;
	Thu, 28 Apr 2005 14:41:18 +0100
Date:	Thu, 28 Apr 2005 14:41:18 +0100
From:	Ralf Baechle <ralf@linux-mips.org>
To:	Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Cc:	linux-mips@linux-mips.org
Subject: Re: preempt safe fpu-emulator
Message-ID: <20050428134118.GC1276@linux-mips.org>
References: <20050427.143622.77402407.nemoto@toshiba-tops.co.jp>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <20050427.143622.77402407.nemoto@toshiba-tops.co.jp>
User-Agent: Mutt/1.4.1i
Return-Path: <ralf@linux-mips.org>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 7813
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: ralf@linux-mips.org
Precedence: bulk
X-list: linux-mips

On Wed, Apr 27, 2005 at 02:36:22PM +0900, Atsushi Nemoto wrote:

> Hi.  Here is a patch to make the fpu-emulator preempt-safe.  It would
> be SMP-safe also.
> 
> The 'ieee754_csr' global variable is removed.  Now the 'ieee754_csr'
> is an alias of current->thread.fpu.soft.fcr31.  While the fpu-emulator
> uses different mapping for RM bits (FPU_CSR_Rm vs. IEEE754_Rm), RM
> bits are converted before (and after) calling of cop1Emulate().  If we
> adjusted IEEE754_Rm to match with FPU_CSR_Rm, we can remove ieee_rm[]
> and mips_rm[].  Should we do it?
> 
> With this patch, whole fpu-emulator can be run without disabling
> preempt.  I will post a patch to fix preemption issue soon.

I applied both your patches with some slight cleanup for the endianess
stuff in arch/mips/math-emu/ieee754.h and non-Linux stuff.

  Ralf

From ralf@linux-mips.org Thu Apr 28 15:00:24 2005
Received: with ECARTIS (v1.0.0; list linux-mips); Thu, 28 Apr 2005 15:00:39 +0100 (BST)
Received: from extgw-uk.mips.com ([IPv6:::ffff:62.254.210.129]:27153 "EHLO
	bacchus.net.dhis.org") by linux-mips.org with ESMTP
	id <S8225777AbVD1OAY>; Thu, 28 Apr 2005 15:00:24 +0100
Received: from dea.linux-mips.net (localhost.localdomain [127.0.0.1])
	by bacchus.net.dhis.org (8.13.1/8.13.1) with ESMTP id j3SE0To0002733;
	Thu, 28 Apr 2005 15:00:29 +0100
Received: (from ralf@localhost)
	by dea.linux-mips.net (8.13.1/8.13.1/Submit) id j3SE0SPZ002732;
	Thu, 28 Apr 2005 15:00:28 +0100
Date:	Thu, 28 Apr 2005 15:00:27 +0100
From:	Ralf Baechle <ralf@linux-mips.org>
To:	Yoichi Yuasa <yuasa@hh.iij4u.or.jp>
Cc:	linux-mips <linux-mips@linux-mips.org>
Subject: Re: [PATCH 2.6] vr41xx: remove old rtc driver for vr41xx
Message-ID: <20050428140027.GD1276@linux-mips.org>
References: <20050423225425.1b7826c5.yuasa@hh.iij4u.or.jp>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <20050423225425.1b7826c5.yuasa@hh.iij4u.or.jp>
User-Agent: Mutt/1.4.1i
Return-Path: <ralf@linux-mips.org>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 7814
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: ralf@linux-mips.org
Precedence: bulk
X-list: linux-mips

On Sat, Apr 23, 2005 at 10:54:25PM +0900, Yoichi Yuasa wrote:

> This patch had removed old rtc driver for vr41xx.

Thanks Yoichi.  Applied,

  Ralf

From KevinK@mips.com Thu Apr 28 15:03:32 2005
Received: with ECARTIS (v1.0.0; list linux-mips); Thu, 28 Apr 2005 15:03:47 +0100 (BST)
Received: from 209-232-97-206.ded.pacbell.net ([IPv6:::ffff:209.232.97.206]:15322
	"EHLO dns0.mips.com") by linux-mips.org with ESMTP
	id <S8225778AbVD1ODc>; Thu, 28 Apr 2005 15:03:32 +0100
Received: from mercury.mips.com (sbcns-dmz [209.232.97.193])
	by dns0.mips.com (8.12.11/8.12.11) with ESMTP id j3SE3MuN006477;
	Thu, 28 Apr 2005 07:03:22 -0700 (PDT)
Received: from Ulysses (ulysses [192.168.236.13])
	by mercury.mips.com (8.12.9/8.12.11) with SMTP id j3SE3KQf011655;
	Thu, 28 Apr 2005 07:03:21 -0700 (PDT)
Message-ID: <002d01c54bfa$5b913f80$0deca8c0@Ulysses>
From:	"Kevin D. Kissell" <KevinK@mips.com>
To:	"Ralf Baechle" <ralf@linux-mips.org>,
	"Atsushi Nemoto" <anemo@mba.ocn.ne.jp>
Cc:	<linux-mips@linux-mips.org>
References: <20050427.143622.77402407.nemoto@toshiba-tops.co.jp> <20050428134118.GC1276@linux-mips.org>
Subject: Re: preempt safe fpu-emulator
Date:	Thu, 28 Apr 2005 06:58:28 -0700
MIME-Version: 1.0
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 5.50.4927.1200
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4927.1200
X-Scanned-By: MIMEDefang 2.39
Return-Path: <KevinK@mips.com>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 7815
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: KevinK@mips.com
Precedence: bulk
X-list: linux-mips

When I first integrated the Algorithmics emulator with the Linux kernel
several years back, I tried doing something like this but ran into some
problem that I cannot recall exactly - there may have been some case
where the system expected threads to "inherit" FCSR changes.  I agree
that this is an obviously cleaner approach, but be careful.

            Regards,

            Kevin K.

----- Original Message ----- 
From: "Ralf Baechle" <ralf@linux-mips.org>
To: "Atsushi Nemoto" <anemo@mba.ocn.ne.jp>
Cc: <linux-mips@linux-mips.org>
Sent: Thursday, April 28, 2005 6:41 AM
Subject: Re: preempt safe fpu-emulator


> On Wed, Apr 27, 2005 at 02:36:22PM +0900, Atsushi Nemoto wrote:
> 
> > Hi.  Here is a patch to make the fpu-emulator preempt-safe.  It would
> > be SMP-safe also.
> > 
> > The 'ieee754_csr' global variable is removed.  Now the 'ieee754_csr'
> > is an alias of current->thread.fpu.soft.fcr31.  While the fpu-emulator
> > uses different mapping for RM bits (FPU_CSR_Rm vs. IEEE754_Rm), RM
> > bits are converted before (and after) calling of cop1Emulate().  If we
> > adjusted IEEE754_Rm to match with FPU_CSR_Rm, we can remove ieee_rm[]
> > and mips_rm[].  Should we do it?
> > 
> > With this patch, whole fpu-emulator can be run without disabling
> > preempt.  I will post a patch to fix preemption issue soon.
> 
> I applied both your patches with some slight cleanup for the endianess
> stuff in arch/mips/math-emu/ieee754.h and non-Linux stuff.
> 
>   Ralf
> 
> 


From Singh.Inpreet@netsity.com Thu Apr 28 15:50:42 2005
Received: with ECARTIS (v1.0.0; list linux-mips); Thu, 28 Apr 2005 15:51:04 +0100 (BST)
Received: from [IPv6:::ffff:61.246.180.169] ([IPv6:::ffff:61.246.180.169]:48649
	"EHLO mail.netsity.com") by linux-mips.org with ESMTP
	id <S8225783AbVD1Oum>; Thu, 28 Apr 2005 15:50:42 +0100
Received: by mail.netsity.com with Internet Mail Service (5.5.2653.19)
	id <JTJF9DG8>; Thu, 28 Apr 2005 20:20:32 +0530
Received: from ISINGH ([192.168.103.60]) by mail.netsity.com with SMTP (Microsoft Exchange Internet Mail Service Version 5.5.2653.13)
	id JTJF9DG7; Thu, 28 Apr 2005 20:20:24 +0530
From:	Inpreet Singh <Singh.Inpreet@netsity.com>
To:	linux-mips@linux-mips.org
Message-ID: <015301c54c01$9b8e4e00$3c67a8c0@netsity.com>
Subject: GD Library on MIPS Processor
Date:	Thu, 28 Apr 2005 20:20:23 +0530
MIME-Version: 1.0
Content-Type: multipart/alternative;
	boundary="----=_NextPart_000_0150_01C54C2F.B52EBC40"
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 6.00.2800.1437
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1441
Return-Path: <Singh.Inpreet@netsity.com>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 7816
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: Singh.Inpreet@netsity.com
Precedence: bulk
X-list: linux-mips

This is a multi-part message in MIME format.

------=_NextPart_000_0150_01C54C2F.B52EBC40
Content-Type: text/plain;
	charset="Windows-1252"
Content-Transfer-Encoding: quoted-printable

Sir I am using gd library on Linux intel processor sucessfully but now =
I
want to do same on MIPS. I don't know to how install, configure and =
test
gd library on MIPS. Sir please give me some clue or link to study for
the same.
=20
I tried to configure gd library compilation using following command =
from
linux intel processor:
=20
./configure --host=3Dmips
and it makes Makefile with some differences
***************************************************
host_triplet =3D mips-unknown-elf
host =3D mips-unknown-elf
host_alias =3D mips
host_cpu =3D mips
***************************************************
Now I tried to build a example using this Makefile "make gddemo". What =
I
expect that it will create gddemo binary that will output in correctly
on MIPS processor. But when I run this binary on MIPS it is showing
errors.
**************************************************************
/launchpad # ./gddemo
./gddemo: 1: Syntax error: "(" unexpected
**************************************************************
Also I have downloaded debian packages for gd library on MIPS processor
but don't know how to install them. I tried dpkg command but it shows =
no
such command. So sir please help me out.
So please help me how should I proceed.
Regards
=20
Inpreet singh

------=_NextPart_000_0150_01C54C2F.B52EBC40
Content-Type: text/html;
	charset="Windows-1252"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>

<META content=3D"MSHTML 6.00.2800.1479" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV>
<DIV><FONT face=3DVerdana size=3D2>
<DIV><FONT face=3DVerdana size=3D2>Sir I am using gd library on Linux =
intel=20
processor sucessfully but now&nbsp;I want to do same on MIPS.&nbsp;I =
don't know=20
to how install, configure and test&nbsp;gd library on MIPS. Sir please =
give me=20
some clue or link to study for the same.</FONT></DIV>
<DIV><FONT face=3DVerdana size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DVerdana size=3D2>
<DIV><FONT face=3DVerdana size=3D2>I tried to configure gd library =
compilation using=20
following command from linux intel processor:</FONT></DIV>
<DIV><FONT face=3DVerdana size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DVerdana size=3D2>./configure --host=3Dmips<BR>and it =
makes Makefile=20
with some differences</FONT></DIV>
<DIV><FONT face=3DVerdana=20
size=3D2>***************************************************</FONT></DIV=
>
<DIV><FONT face=3DVerdana size=3D2>host_triplet =3D =
mips-unknown-elf</FONT></DIV>
<DIV><FONT face=3DVerdana size=3D2>host =3D =
mips-unknown-elf<BR>host_alias =3D=20
mips<BR>host_cpu =3D mips</DIV></FONT>
<DIV>
<DIV><FONT face=3DVerdana=20
size=3D2>***************************************************</FONT></DIV=
>
<DIV><FONT face=3DVerdana size=3D2>Now I tried to build a example using =
this=20
Makefile "make gddemo". What I expect that it will create gddemo binary =
that=20
will output in correctly on MIPS processor. But when I run this binary =
on MIPS=20
it is showing errors.</FONT></DIV>
<DIV>**************************************************************</DIV=
>
<DIV>/launchpad # ./gddemo<BR>./gddemo: 1: Syntax error: "(" =
unexpected</DIV>
<DIV><FONT face=3DVerdana=20
size=3D2>**************************************************************<=
/FONT></DIV>
<DIV><FONT face=3DVerdana size=3D2>Also I have downloaded debian =
packages for gd=20
library on MIPS processor but don't know how to install them. I tried =
dpkg=20
command but it shows no such command. So sir please help me =
out.</FONT></DIV>
<DIV><FONT face=3DVerdana size=3D2>So please help me how should I=20
proceed.</FONT></DIV>
<DIV><FONT face=3DVerdana size=3D2>Regards</FONT></DIV>
<DIV><FONT face=3DVerdana size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DVerdana size=3D2>Inpreet=20
singh</FONT></DIV></DIV></FONT></DIV></FONT></DIV></DIV></BODY></HTML>

------=_NextPart_000_0150_01C54C2F.B52EBC40--

From ralf@linux-mips.org Thu Apr 28 16:21:14 2005
Received: with ECARTIS (v1.0.0; list linux-mips); Thu, 28 Apr 2005 16:21:29 +0100 (BST)
Received: from extgw-uk.mips.com ([IPv6:::ffff:62.254.210.129]:26900 "EHLO
	bacchus.net.dhis.org") by linux-mips.org with ESMTP
	id <S8225783AbVD1PVO>; Thu, 28 Apr 2005 16:21:14 +0100
Received: from dea.linux-mips.net (localhost.localdomain [127.0.0.1])
	by bacchus.net.dhis.org (8.13.1/8.13.1) with ESMTP id j3SFLNt2005526;
	Thu, 28 Apr 2005 16:21:23 +0100
Received: (from ralf@localhost)
	by dea.linux-mips.net (8.13.1/8.13.1/Submit) id j3SFLNJb005525;
	Thu, 28 Apr 2005 16:21:23 +0100
Date:	Thu, 28 Apr 2005 16:21:23 +0100
From:	Ralf Baechle <ralf@linux-mips.org>
To:	"Kevin D. Kissell" <KevinK@mips.com>
Cc:	Atsushi Nemoto <anemo@mba.ocn.ne.jp>, linux-mips@linux-mips.org
Subject: Re: preempt safe fpu-emulator
Message-ID: <20050428152123.GH1276@linux-mips.org>
References: <20050427.143622.77402407.nemoto@toshiba-tops.co.jp> <20050428134118.GC1276@linux-mips.org> <002d01c54bfa$5b913f80$0deca8c0@Ulysses>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <002d01c54bfa$5b913f80$0deca8c0@Ulysses>
User-Agent: Mutt/1.4.1i
Return-Path: <ralf@linux-mips.org>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 7817
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: ralf@linux-mips.org
Precedence: bulk
X-list: linux-mips

On Thu, Apr 28, 2005 at 06:58:28AM -0700, Kevin D. Kissell wrote:

> When I first integrated the Algorithmics emulator with the Linux kernel
> several years back, I tried doing something like this but ran into some
> problem that I cannot recall exactly - there may have been some case
> where the system expected threads to "inherit" FCSR changes.  I agree
> that this is an obviously cleaner approach, but be careful.

The global variables definately won't fly anymore in preemptable and SMP
kernels.  Or rather any attempt to get that to work would only make things
worse, so they had to go.

  Ralf

From macro@linux-mips.org Thu Apr 28 16:25:28 2005
Received: with ECARTIS (v1.0.0; list linux-mips); Thu, 28 Apr 2005 16:25:43 +0100 (BST)
Received: from pollux.ds.pg.gda.pl ([IPv6:::ffff:153.19.208.7]:6921 "EHLO
	pollux.ds.pg.gda.pl") by linux-mips.org with ESMTP
	id <S8225783AbVD1PZ2>; Thu, 28 Apr 2005 16:25:28 +0100
Received: from localhost (localhost [127.0.0.1])
	by pollux.ds.pg.gda.pl (Postfix) with ESMTP
	id 72F70F5B79; Thu, 28 Apr 2005 17:25:19 +0200 (CEST)
Received: from pollux.ds.pg.gda.pl ([127.0.0.1])
 by localhost (pollux [127.0.0.1]) (amavisd-new, port 10024) with ESMTP
 id 28336-02; Thu, 28 Apr 2005 17:25:19 +0200 (CEST)
Received: from piorun.ds.pg.gda.pl (piorun.ds.pg.gda.pl [153.19.208.8])
	by pollux.ds.pg.gda.pl (Postfix) with ESMTP
	id 0BB29F5B78; Thu, 28 Apr 2005 17:25:19 +0200 (CEST)
Received: from blysk.ds.pg.gda.pl (macro@blysk.ds.pg.gda.pl [153.19.208.6])
	by piorun.ds.pg.gda.pl (8.13.1/8.13.1) with ESMTP id j3SFPMNv015956;
	Thu, 28 Apr 2005 17:25:22 +0200
Date:	Thu, 28 Apr 2005 16:25:30 +0100 (BST)
From:	"Maciej W. Rozycki" <macro@linux-mips.org>
To:	Ralf Baechle <ralf@linux-mips.org>
Cc:	"Kevin D. Kissell" <KevinK@mips.com>,
	Atsushi Nemoto <anemo@mba.ocn.ne.jp>, linux-mips@linux-mips.org
Subject: Re: preempt safe fpu-emulator
In-Reply-To: <20050428152123.GH1276@linux-mips.org>
Message-ID: <Pine.LNX.4.61L.0504281623160.31018@blysk.ds.pg.gda.pl>
References: <20050427.143622.77402407.nemoto@toshiba-tops.co.jp>
 <20050428134118.GC1276@linux-mips.org> <002d01c54bfa$5b913f80$0deca8c0@Ulysses>
 <20050428152123.GH1276@linux-mips.org>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Virus-Scanned: ClamAV 0.83/857/Thu Apr 28 08:30:10 2005 on piorun.ds.pg.gda.pl
X-Virus-Status:	Clean
X-Virus-Scanned: by amavisd-new at pollux.ds.pg.gda.pl
Return-Path: <macro@linux-mips.org>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 7818
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: macro@linux-mips.org
Precedence: bulk
X-list: linux-mips

On Thu, 28 Apr 2005, Ralf Baechle wrote:

> > When I first integrated the Algorithmics emulator with the Linux kernel
> > several years back, I tried doing something like this but ran into some
> > problem that I cannot recall exactly - there may have been some case
> > where the system expected threads to "inherit" FCSR changes.  I agree
> > that this is an obviously cleaner approach, but be careful.
> 
> The global variables definately won't fly anymore in preemptable and SMP
> kernels.  Or rather any attempt to get that to work would only make things
> worse, so they had to go.

 It depends on how they were actually used -- real FPU circuitry is 
"global", too, and somehow it works or at least it has to.

  Maciej

From ralf@linux-mips.org Thu Apr 28 16:33:48 2005
Received: with ECARTIS (v1.0.0; list linux-mips); Thu, 28 Apr 2005 16:34:02 +0100 (BST)
Received: from extgw-uk.mips.com ([IPv6:::ffff:62.254.210.129]:57100 "EHLO
	bacchus.net.dhis.org") by linux-mips.org with ESMTP
	id <S8225784AbVD1Pds>; Thu, 28 Apr 2005 16:33:48 +0100
Received: from dea.linux-mips.net (localhost.localdomain [127.0.0.1])
	by bacchus.net.dhis.org (8.13.1/8.13.1) with ESMTP id j3SFXuqg005957;
	Thu, 28 Apr 2005 16:33:56 +0100
Received: (from ralf@localhost)
	by dea.linux-mips.net (8.13.1/8.13.1/Submit) id j3SFXuLS005956;
	Thu, 28 Apr 2005 16:33:56 +0100
Date:	Thu, 28 Apr 2005 16:33:56 +0100
From:	Ralf Baechle <ralf@linux-mips.org>
To:	"Maciej W. Rozycki" <macro@linux-mips.org>
Cc:	"Kevin D. Kissell" <KevinK@mips.com>,
	Atsushi Nemoto <anemo@mba.ocn.ne.jp>, linux-mips@linux-mips.org
Subject: Re: preempt safe fpu-emulator
Message-ID: <20050428153356.GI1276@linux-mips.org>
References: <20050427.143622.77402407.nemoto@toshiba-tops.co.jp> <20050428134118.GC1276@linux-mips.org> <002d01c54bfa$5b913f80$0deca8c0@Ulysses> <20050428152123.GH1276@linux-mips.org> <Pine.LNX.4.61L.0504281623160.31018@blysk.ds.pg.gda.pl>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <Pine.LNX.4.61L.0504281623160.31018@blysk.ds.pg.gda.pl>
User-Agent: Mutt/1.4.1i
Return-Path: <ralf@linux-mips.org>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 7819
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: ralf@linux-mips.org
Precedence: bulk
X-list: linux-mips

On Thu, Apr 28, 2005 at 04:25:30PM +0100, Maciej W. Rozycki wrote:

>  It depends on how they were actually used -- real FPU circuitry is 
> "global", too, and somehow it works or at least it has to.

But it's not shared across processes ;-)

  Ralf

From ralf@linux-mips.org Thu Apr 28 16:34:32 2005
Received: with ECARTIS (v1.0.0; list linux-mips); Thu, 28 Apr 2005 16:34:47 +0100 (BST)
Received: from extgw-uk.mips.com ([IPv6:::ffff:62.254.210.129]:21008 "EHLO
	bacchus.net.dhis.org") by linux-mips.org with ESMTP
	id <S8225784AbVD1Pec>; Thu, 28 Apr 2005 16:34:32 +0100
Received: from dea.linux-mips.net (localhost.localdomain [127.0.0.1])
	by bacchus.net.dhis.org (8.13.1/8.13.1) with ESMTP id j3SFYeMF005967;
	Thu, 28 Apr 2005 16:34:40 +0100
Received: (from ralf@localhost)
	by dea.linux-mips.net (8.13.1/8.13.1/Submit) id j3SFYeU7005966;
	Thu, 28 Apr 2005 16:34:40 +0100
Date:	Thu, 28 Apr 2005 16:34:40 +0100
From:	Ralf Baechle <ralf@linux-mips.org>
To:	"Maciej W. Rozycki" <macro@linux-mips.org>
Cc:	"Kevin D. Kissell" <KevinK@mips.com>,
	Atsushi Nemoto <anemo@mba.ocn.ne.jp>, linux-mips@linux-mips.org
Subject: Re: preempt safe fpu-emulator
Message-ID: <20050428153440.GA5960@linux-mips.org>
References: <20050427.143622.77402407.nemoto@toshiba-tops.co.jp> <20050428134118.GC1276@linux-mips.org> <002d01c54bfa$5b913f80$0deca8c0@Ulysses> <20050428152123.GH1276@linux-mips.org> <Pine.LNX.4.61L.0504281623160.31018@blysk.ds.pg.gda.pl> <20050428153356.GI1276@linux-mips.org>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <20050428153356.GI1276@linux-mips.org>
User-Agent: Mutt/1.4.1i
Return-Path: <ralf@linux-mips.org>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 7820
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: ralf@linux-mips.org
Precedence: bulk
X-list: linux-mips

On Thu, Apr 28, 2005 at 04:33:56PM +0100, Ralf Baechle wrote:

> >  It depends on how they were actually used -- real FPU circuitry is 
> > "global", too, and somehow it works or at least it has to.
> 
> But it's not shared across processes ;-)

Processors, of course.

  Ralf

From kevink@mips.com Thu Apr 28 17:03:54 2005
Received: with ECARTIS (v1.0.0; list linux-mips); Thu, 28 Apr 2005 17:04:09 +0100 (BST)
Received: from 209-232-97-206.ded.pacbell.net ([IPv6:::ffff:209.232.97.206]:55770
	"EHLO dns0.mips.com") by linux-mips.org with ESMTP
	id <S8225793AbVD1QDy>; Thu, 28 Apr 2005 17:03:54 +0100
Received: from mercury.mips.com (sbcns-dmz [209.232.97.193])
	by dns0.mips.com (8.12.11/8.12.11) with ESMTP id j3SG3jJd007062;
	Thu, 28 Apr 2005 09:03:45 -0700 (PDT)
Received: from grendel (grendel [192.168.236.16])
	by mercury.mips.com (8.12.9/8.12.11) with SMTP id j3SG3hQf014926;
	Thu, 28 Apr 2005 09:03:44 -0700 (PDT)
Message-ID: <004e01c54c0c$4c9f3d30$10eca8c0@grendel>
From:	"Kevin D. Kissell" <kevink@mips.com>
To:	"Ralf Baechle" <ralf@linux-mips.org>
Cc:	"Atsushi Nemoto" <anemo@mba.ocn.ne.jp>, <linux-mips@linux-mips.org>
References: <20050427.143622.77402407.nemoto@toshiba-tops.co.jp> <20050428134118.GC1276@linux-mips.org> <002d01c54bfa$5b913f80$0deca8c0@Ulysses> <20050428152123.GH1276@linux-mips.org>
Subject: Re: preempt safe fpu-emulator
Date:	Thu, 28 Apr 2005 18:06:53 +0200
MIME-Version: 1.0
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 6.00.2800.1478
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1478
X-Scanned-By: MIMEDefang 2.39
Return-Path: <kevink@mips.com>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 7821
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: kevink@mips.com
Precedence: bulk
X-list: linux-mips

> On Thu, Apr 28, 2005 at 06:58:28AM -0700, Kevin D. Kissell wrote:
> 
> > When I first integrated the Algorithmics emulator with the Linux kernel
> > several years back, I tried doing something like this but ran into some
> > problem that I cannot recall exactly - there may have been some case
> > where the system expected threads to "inherit" FCSR changes.  I agree
> > that this is an obviously cleaner approach, but be careful.
> 
> The global variables definately won't fly anymore in preemptable and SMP
> kernels.  Or rather any attempt to get that to work would only make things
> worse, so they had to go.

The global variable thing was clearly not SMP safe - but then again, the
32-bit MIPS kernel we were working with wasn't SMP safe either, in
those days.  ;o)  But *if* - and it may not really (or no longer) be the case - 
there is an implicit assumption that some FCSR state is preserved on a
context switch, it would be more correct to map the ieee754_csr symbol
to a per-CPU variable than a per-thread variable.

            Regards,

            Kevin K.

From vprashant@echelon.com Thu Apr 28 19:18:44 2005
Received: with ECARTIS (v1.0.0; list linux-mips); Thu, 28 Apr 2005 19:19:00 +0100 (BST)
Received: from ntfw.echelon.com ([IPv6:::ffff:205.229.50.10]:28510 "EHLO
	[205.229.50.10]") by linux-mips.org with ESMTP id <S8225852AbVD1SSo>;
	Thu, 28 Apr 2005 19:18:44 +0100
Received: from miles.echelon.com by [205.229.50.10]
          via smtpd (for mail.linux-mips.org [62.254.210.162]) with ESMTP; Thu, 28 Apr 2005 11:18:43 -0700
Received: by miles.echelon.echcorp.com with Internet Mail Service (5.5.2653.19)
	id <JWPMNWXK>; Thu, 28 Apr 2005 11:18:41 -0700
Message-ID: <5375D9FB1CC3994D9DCBC47C344EEB590165465D@miles.echelon.echcorp.com>
From:	Prashant Viswanathan <vprashant@echelon.com>
To:	'JP' <jaypee@hotpop.com>, ppopov@embeddedalley.com
Cc:	Prashant Viswanathan <vprashant@echelon.com>,
	'Manish Lachwani' <mlachwani@mvista.com>,
	linux-mips@linux-mips.org
Subject: RE: Big Endian au1550
Date:	Thu, 28 Apr 2005 11:18:40 -0700
MIME-Version: 1.0
X-Mailer: Internet Mail Service (5.5.2653.19)
Content-Type: text/plain
Return-Path: <vprashant@echelon.com>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 7822
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: vprashant@echelon.com
Precedence: bulk
X-list: linux-mips

> I can confirm that BE works fine on the db1550 board. Just add line
> 
> select SYS_SUPPORTS_BIG_ENDIAN
> 
> to the db1550 section of arch/mips/Kconfig. That allows you to choose
> BE.
> 
> I guess all the alchemy boards will work LE and BE. At least allowing
> the setting will mean they get tested rather than folk getting put off
> by the fact they can't select it.
> 
> JP

Thanks.

Actually I had BE working many months ago. I just did an update to get the
latest and greatest stuff. It would be good if Kconfig was "fixed" to allow
BE selection.

Prashant

From bryan.althouse@3phoenix.com Thu Apr 28 20:16:08 2005
Received: with ECARTIS (v1.0.0; list linux-mips); Thu, 28 Apr 2005 20:16:26 +0100 (BST)
Received: from sccrmhc13.comcast.net ([IPv6:::ffff:204.127.202.64]:10481 "EHLO
	sccrmhc13.comcast.net") by linux-mips.org with ESMTP
	id <S8225923AbVD1TQI>; Thu, 28 Apr 2005 20:16:08 +0100
Received: from ba3pi (pcp0010731669pcs.howard01.md.comcast.net[69.243.71.130])
          by comcast.net (sccrmhc13) with SMTP
          id <20050428191601016002h221e>; Thu, 28 Apr 2005 19:16:01 +0000
From:	"Bryan Althouse" <bryan.althouse@3phoenix.com>
To:	<linux-mips@linux-mips.org>
Cc:	<TheNop@gmx.net>
Subject: 
Date:	Thu, 28 Apr 2005 15:15:49 -0400
MIME-Version: 1.0
Content-Type: text/plain;
	charset="us-ascii"
Content-Transfer-Encoding: 7bit
X-Mailer: Microsoft Office Outlook, Build 11.0.6353
Thread-Index: AcVMJrAGKf+TUcotQiCo0YNheAEyXQ==
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
Message-Id: <20050428191608Z8225923-1340+6320@linux-mips.org>
Return-Path: <bryan.althouse@3phoenix.com>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 7823
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: bryan.althouse@3phoenix.com
Precedence: bulk
X-list: linux-mips

Hello,

I would like to use a 2.6.x kernel with my Yosemite/HalfDome board.
Somehow, I am unable to compile the kernel.  I have tried the 2.6.10 kernel
trees from ftp.pmc-sierra.com and also the latest 2.6.12 snapshot from
linux-mips.  I am using the 3.3.x cross compile tools from
ftp.pmc-sierra.com .  The 2.4.x kernels from PMC compile fine.

In the case of 2.6.10 from ftp.pmc-sierra.com, my error looks like:
       Make[3]: *** [drivers/char/agp/backend.o] Error 1

	
In the case of 2.6.12 from linux-mips, my error looks like:
	drivers/net/titan_ge.c1950: error: 'titan_device_remove"  undeclared
here (not in a function)

My compile process is like so:
make mrproper
make xconfig
make oldconfig
make ARCH=mips CROSS_COMPILE=/<tool_path>/mips64-linux-gnu-    vmlinux

Could someone share their .config with me, or make some suggestions?

Thank you,
Bryan



From christian.gan@librestream.com Thu Apr 28 21:11:31 2005
Received: with ECARTIS (v1.0.0; list linux-mips); Thu, 28 Apr 2005 21:11:58 +0100 (BST)
Received: from 205-200-7-228.static.mts.net ([IPv6:::ffff:205.200.7.228]:23784
	"EHLO librestream.com") by linux-mips.org with ESMTP
	id <S8225923AbVD1ULb> convert rfc822-to-8bit; Thu, 28 Apr 2005 21:11:31 +0100
X-MIMEOLE: Produced By Microsoft Exchange V6.5.6944.0
Content-class: urn:content-classes:message
MIME-Version: 1.0
Content-Type: text/plain;
	charset="us-ascii"
Content-Transfer-Encoding: 8BIT
Subject: RE: iptables/vmalloc issues on alchemy
Date:	Thu, 28 Apr 2005 15:11:27 -0500
Message-ID: <8230E1CC35AF9F43839F3049E930169A137217@yang.LibreStream.local>
X-MS-Has-Attach: 
X-MS-TNEF-Correlator: 
Thread-Topic: iptables/vmalloc issues on alchemy
thread-index: AcVLsEJYLC+K/Ey9TpaqKlUwlL9V/gAffudg
From:	"Christian Gan" <christian.gan@librestream.com>
To:	"Herbert Valerio Riedel" <hvr@hvrlab.org>,
	"Dan Malek" <dan@embeddededge.com>
Cc:	"Josh Green" <jgreen@users.sourceforge.net>,
	<linux-mips@linux-mips.org>,
	"Pete Popov" <ppopov@embeddedalley.com>
Return-Path: <christian.gan@librestream.com>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 7824
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: christian.gan@librestream.com
Precedence: bulk
X-list: linux-mips

Could this also related to this problem I posted a long time ago?  I
haven't had a chance to revisit things for a while...

-----Original Message-----
Just a little update on this:

I turned off 36 bit address support for the MIPS32
(CONFIG_64BIT_PHYS_ADDR) and found that my tests for vmalloc work.

Can anyone who knows better point me in a direction of where I should
start?

Thanks!

Christian

-----Original Message-----
From: linux-mips-bounce@linux-mips.org
[mailto:linux-mips-bounce@linux-mips.org] On Behalf Of Christian Gan
Sent: Tuesday, January 04, 2005 3:25 PM
To: linux-mips@linux-mips.org
Subject: vmalloc memory corruption

Hey all,

I'm running into a strange memory corruption problem while trying to get
a driver to load firmware using hotplug support on a DBAU1550 eval
board.  This board has a single AU1550 MIPS32 processor.  I'm running
kernel version 2.6.10-rc3.

I've attached a code snippet below that I'd like somebody to try to
verify for me so I can determine whether or not it is a problem with my
kernel/hardware.  

The test code is a simplified version of the interaction between the
driver and the firmware/hotplug support of the kernel.  The firmware
hotplug support (linux/drivers/base/firmware_class.c) if fed data from a
file and places it into a buffer, this buffer gets reallocated when
required and grows as more data is read in.  Old data is memcopied into
the new reallocated buffer and newly read data is appended to the end.
What I'm finding is that eventually this data is corrupted.

Compile the test snippet below as a module and insmod it.  If things are
successful you should see results like this:

# insmod vmalloctest.ko
Using vmalloctest.ko
testing vmalloc
0x00 0x01 0x02 0x03 0x04 0x05 0x06 0x07 0x08 0x09 0x00 0x01 0x02 0x03
0x04 0x05 0x06 0x07 0x08 0x09 0x00 0x01 0x02 0x03 0x04 0x05 0x06 0x07
0x08 0x09 ...
0x00 0x01 0x02 0x03 0x04 0x05 0x06 0x07 0x08 0x09

But if data changes at any time, you've got problems like me.  When I
run this on my platform eventually the data becomes all 0x00.

Notice that if you use kmalloc instead of vmalloc (define USE_KMALLOC),
everything works.

Thanks!

Christian Gan

// Start vmalloctest.c

#ifndef __KERNEL__
#define __KERNEL__
#endif

#include <linux/config.h>
#include <linux/version.h>
#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/errno.h>
#include <linux/string.h>
#include <linux/mm.h>
#include <linux/delay.h>
#include <linux/init.h>
#include <linux/vmalloc.h>

#include <asm/io.h>

//#define USE_KMALLOC

void fillbuf(char * buf, unsigned long len) {
	int i = 0;
	for (i = 0; i < len; i++)
	{
		buf[i] = 0xFF & i;
	}
}

int __init vmalloctest_init(void)
{
    char * buf = NULL;
	int i = 0;

	printk("testing vmalloc\n");
	
	for (i = 0; i < 50; i++)
	{
		int j = 0;
#ifndef USE_KMALLOC		
		char * newbuf = vmalloc( (i+1)*PAGE_SIZE ); // allocate
a new buffer that grows in size #else
		char * newbuf = kmalloc( (i+1)*PAGE_SIZE, GFP_KERNEL );
// allocate a new buffer that grows in size
#endif		
		if (!newbuf)
		{
			printk("Could not allocate memory: %ld bytes\n",
(i+1)*PAGE_SIZE);
			break;
		}
				
		if (i==0)
		{
			fillbuf(newbuf, PAGE_SIZE );		// fill
the original buffer with some data... any will suffice
		}
		else
		{
			memcpy(newbuf, buf, i*PAGE_SIZE);	// copy
the contents of the old buffer to the new	
		}
		
#ifndef USE_KMALLOC
		vfree(buf);		// free the old buffer
#else
		kfree(buf);		// free the old buffer
#endif		

		buf = newbuf;
		
		// print out the first few bytes
		for (j=0; j < 10; j++)
		{
			printk("0x%02X ", 0xff & buf[j]);
		}
		printk("\n");
	}

#ifndef USE_KMALLOC
	vfree(buf);
#else
	kfree(buf);
#endif		

	return 0;
}
module_init(vmalloctest_init);

MODULE_LICENSE("GPL");





From dan@embeddededge.com Thu Apr 28 21:56:42 2005
Received: with ECARTIS (v1.0.0; list linux-mips); Thu, 28 Apr 2005 21:56:56 +0100 (BST)
Received: from embeddededge.com ([IPv6:::ffff:209.113.146.155]:27912 "EHLO
	penguin.netx4.com") by linux-mips.org with ESMTP
	id <S8225768AbVD1U4m>; Thu, 28 Apr 2005 21:56:42 +0100
Received: from [192.168.253.28] (tibook.embeddededge.com [192.168.253.28])
	by penguin.netx4.com (8.12.8/8.12.9) with ESMTP id j3SKopfg005185;
	Thu, 28 Apr 2005 16:50:51 -0400
In-Reply-To: <8230E1CC35AF9F43839F3049E930169A137217@yang.LibreStream.local>
References: <8230E1CC35AF9F43839F3049E930169A137217@yang.LibreStream.local>
Mime-Version: 1.0 (Apple Message framework v622)
Content-Type: text/plain; charset=US-ASCII; format=flowed
Message-Id: <ca9dea6d5cc67afd6a42f06de4286bf9@embeddededge.com>
Content-Transfer-Encoding: 7bit
Cc:	<linux-mips@linux-mips.org>,
	"Herbert Valerio Riedel" <hvr@hvrlab.org>,
	"Josh Green" <jgreen@users.sourceforge.net>,
	"Pete Popov" <ppopov@embeddedalley.com>
From:	Dan Malek <dan@embeddededge.com>
Subject: Re: iptables/vmalloc issues on alchemy
Date:	Thu, 28 Apr 2005 16:56:39 -0400
To:	"Christian Gan" <christian.gan@librestream.com>
X-Mailer: Apple Mail (2.622)
Return-Path: <dan@embeddededge.com>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 7825
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: dan@embeddededge.com
Precedence: bulk
X-list: linux-mips


On Apr 28, 2005, at 4:11 PM, Christian Gan wrote:

> Could this also related to this problem I posted a long time ago?  I
> haven't had a chance to revisit things for a while...

I've just been talking about 2.6, so "long time ago" can't be
that long :-)  I have the updates to the exception handler so
the PTEs get loaded correctly, that's on the way.  I think 2.4
should be OK if anyone is using that.

The one that bothers me is this patch I've been sitting on for
quite some time.  It's not specific to Alchemy, it's a generic
MIPS page table issue.  The problem started when someone
loaded very large modules which caused a new kernel page
table to be allocated.  For some reason I don't remember,
the vmalloc_fault fixup didn't handle this, and the applications
would crash the system because their pgd page  didn't
get updated to reflect this.  The address must have been in
the vmalloc space, but I no longer have the system for testing
(but the code is running in a several thousand real products).
The only way I could make this work is to test the fault address,
the most significant bit anyway, in the TLB miss handler to
see if it was a user or kernel address.  If it was a kernel address,
I loaded the init_mm pgd instead of the thread pgd.  Just one
test and a couple of instructions, but it was necessary.  I'm
still puzzling, but will remember :-)

Thanks.


	-- Dan


From christian.gan@librestream.com Thu Apr 28 22:22:35 2005
Received: with ECARTIS (v1.0.0; list linux-mips); Thu, 28 Apr 2005 22:22:50 +0100 (BST)
Received: from 205-200-7-228.static.mts.net ([IPv6:::ffff:205.200.7.228]:21256
	"EHLO librestream.com") by linux-mips.org with ESMTP
	id <S8225780AbVD1VWf> convert rfc822-to-8bit; Thu, 28 Apr 2005 22:22:35 +0100
X-MIMEOLE: Produced By Microsoft Exchange V6.5.6944.0
Content-class: urn:content-classes:message
MIME-Version: 1.0
Content-Type: text/plain;
	charset="us-ascii"
Content-Transfer-Encoding: 8BIT
Subject: RE: iptables/vmalloc issues on alchemy
Date:	Thu, 28 Apr 2005 16:22:34 -0500
Message-ID: <8230E1CC35AF9F43839F3049E930169A137228@yang.LibreStream.local>
X-MS-Has-Attach: 
X-MS-TNEF-Correlator: 
Thread-Topic: iptables/vmalloc issues on alchemy
thread-index: AcVMNMa94lBtGCPBQHWsdaLSO1+uUQAAnZyA
From:	"Christian Gan" <christian.gan@librestream.com>
To:	"Dan Malek" <dan@embeddededge.com>
Cc:	<linux-mips@linux-mips.org>,
	"Herbert Valerio Riedel" <hvr@hvrlab.org>,
	"Josh Green" <jgreen@users.sourceforge.net>,
	"Pete Popov" <ppopov@embeddedalley.com>
Return-Path: <christian.gan@librestream.com>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 7826
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: christian.gan@librestream.com
Precedence: bulk
X-list: linux-mips

Yes "long time ago" is a very loose and relative term :).  My version at
the time was 2.6.10 (December-ish).  I was seeing very similar symptoms
to Herbert:

- loading a firmware module (for a prism 802.11b mini PCI card) through
the hotplug support would fail when using vmalloc, but not kmalloc.
- I put together a dirty tester that kept increasing page requests to
vmalloc until corruption was detected.  Again it would be okay if I used
kmalloc or if I disabled CONFIG_64BIT_PHYS_ADDR.

By the way I didn't mention but my original post was attached to that
last post of mine if people wanted to glance over it.  Unfortunately I'm
in the same boat as Dan where I don't have my setup anymore at this
time.

Christian Gan
Software Developer
LibreStream Technologies
200-55 Rothwell Road
Winnipeg, MB, Canada R3P-2M5
christian.gan@librestream.com
Ph: (204) 487-0612 x209
Fx: (204) 487-0914

-----Original Message-----
From: Dan Malek [mailto:dan@embeddededge.com] 
Sent: Thursday, April 28, 2005 3:57 PM
To: Christian Gan
Cc: linux-mips@linux-mips.org; Herbert Valerio Riedel; Josh Green; Pete
Popov
Subject: Re: iptables/vmalloc issues on alchemy


On Apr 28, 2005, at 4:11 PM, Christian Gan wrote:

> Could this also related to this problem I posted a long time ago?  I
> haven't had a chance to revisit things for a while...

I've just been talking about 2.6, so "long time ago" can't be
that long :-)  I have the updates to the exception handler so
the PTEs get loaded correctly, that's on the way.  I think 2.4
should be OK if anyone is using that.

The one that bothers me is this patch I've been sitting on for
quite some time.  It's not specific to Alchemy, it's a generic
MIPS page table issue.  The problem started when someone
loaded very large modules which caused a new kernel page
table to be allocated.  For some reason I don't remember,
the vmalloc_fault fixup didn't handle this, and the applications
would crash the system because their pgd page  didn't
get updated to reflect this.  The address must have been in
the vmalloc space, but I no longer have the system for testing
(but the code is running in a several thousand real products).
The only way I could make this work is to test the fault address,
the most significant bit anyway, in the TLB miss handler to
see if it was a user or kernel address.  If it was a kernel address,
I loaded the init_mm pgd instead of the thread pgd.  Just one
test and a couple of instructions, but it was necessary.  I'm
still puzzling, but will remember :-)

Thanks.


	-- Dan




From Rajesh_Palani@pmc-sierra.com Thu Apr 28 22:31:12 2005
Received: with ECARTIS (v1.0.0; list linux-mips); Thu, 28 Apr 2005 22:31:26 +0100 (BST)
Received: from father.pmc-sierra.com ([IPv6:::ffff:216.241.224.13]:6630 "HELO
	father.pmc-sierra.bc.ca") by linux-mips.org with SMTP
	id <S8225780AbVD1VbM>; Thu, 28 Apr 2005 22:31:12 +0100
Received: (qmail 16336 invoked by uid 101); 28 Apr 2005 21:31:04 -0000
Received: from unknown (HELO ogmios.pmc-sierra.bc.ca) (216.241.226.59)
  by father.pmc-sierra.com with SMTP; 28 Apr 2005 21:31:04 -0000
Received: from bby1exi01.pmc_nt.nt.pmc-sierra.bc.ca (bby1exi01.pmc-sierra.bc.ca [216.241.231.251])
	by ogmios.pmc-sierra.bc.ca (8.13.3/8.12.7) with ESMTP id j3SLUv45026981;
	Thu, 28 Apr 2005 14:31:03 -0700
Received: by bby1exi01.pmc_nt.nt.pmc-sierra.bc.ca with Internet Mail Service (5.5.2656.59)
	id <JGC86217>; Thu, 28 Apr 2005 14:30:57 -0700
Message-ID: <04781D450CFF604A9628C8107A62FCCF0257422D@sjc1exm01.pmc_nt.nt.pmc-sierra.bc.ca>
From:	Raj Palani <Rajesh_Palani@pmc-sierra.com>
To:	"'Bryan Althouse'" <bryan.althouse@3phoenix.com>,
	linux-mips@linux-mips.org
Cc:	TheNop@gmx.net
Subject: RE: 
Date:	Thu, 28 Apr 2005 14:30:55 -0700
MIME-Version: 1.0
X-Mailer: Internet Mail Service (5.5.2656.59)
Content-Type: text/plain
Return-Path: <Rajesh_Palani@pmc-sierra.com>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 7827
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: Rajesh_Palani@pmc-sierra.com
Precedence: bulk
X-list: linux-mips

A quick and dirty fix is to remove CONFIG_HOTPLUG from your .config.  That function needs to be added to the driver code.

-Raj

> -----Original Message-----
> From: linux-mips-bounce@linux-mips.org
> [mailto:linux-mips-bounce@linux-mips.org]On Behalf Of Bryan Althouse
> Sent: Thursday, April 28, 2005 12:16 PM
> To: linux-mips@linux-mips.org
> Cc: TheNop@gmx.net
> Subject: 
> 
> 
> Hello,
> 
> I would like to use a 2.6.x kernel with my Yosemite/HalfDome board.
> Somehow, I am unable to compile the kernel.  I have tried the 
> 2.6.10 kernel
> trees from ftp.pmc-sierra.com and also the latest 2.6.12 snapshot from
> linux-mips.  I am using the 3.3.x cross compile tools from
> ftp.pmc-sierra.com .  The 2.4.x kernels from PMC compile fine.
> 
> In the case of 2.6.10 from ftp.pmc-sierra.com, my error looks like:
>        Make[3]: *** [drivers/char/agp/backend.o] Error 1
> 
> 	
> In the case of 2.6.12 from linux-mips, my error looks like:
> 	drivers/net/titan_ge.c1950: error: 
> 'titan_device_remove"  undeclared
> here (not in a function)
> 
> My compile process is like so:
> make mrproper
> make xconfig
> make oldconfig
> make ARCH=mips CROSS_COMPILE=/<tool_path>/mips64-linux-gnu-    vmlinux
> 
> Could someone share their .config with me, or make some suggestions?
> 
> Thank you,
> Bryan
> 
> 
> 

From dan@embeddedalley.com Thu Apr 28 23:16:48 2005
Received: with ECARTIS (v1.0.0; list linux-mips); Thu, 28 Apr 2005 23:17:12 +0100 (BST)
Received: from embeddededge.com ([IPv6:::ffff:209.113.146.155]:46856 "EHLO
	penguin.netx4.com") by linux-mips.org with ESMTP
	id <S8225786AbVD1WQs>; Thu, 28 Apr 2005 23:16:48 +0100
Received: from [192.168.253.28] (tibook.embeddededge.com [192.168.253.28])
	by penguin.netx4.com (8.12.8/8.12.9) with ESMTP id j3SMAsfg005348;
	Thu, 28 Apr 2005 18:10:55 -0400
In-Reply-To: <8230E1CC35AF9F43839F3049E930169A137228@yang.LibreStream.local>
References: <8230E1CC35AF9F43839F3049E930169A137228@yang.LibreStream.local>
Mime-Version: 1.0 (Apple Message framework v622)
Content-Type: text/plain; charset=US-ASCII; format=flowed
Message-Id: <c145ddc72b875ec3833ceba1a849b156@embeddedalley.com>
Content-Transfer-Encoding: 7bit
Cc:	"Josh Green" <jgreen@users.sourceforge.net>,
	"Herbert Valerio Riedel" <hvr@hvrlab.org>,
	<linux-mips@linux-mips.org>,
	"Pete Popov" <ppopov@embeddedalley.com>
From:	Dan Malek <dan@embeddedalley.com>
Subject: Re: iptables/vmalloc issues on alchemy
Date:	Thu, 28 Apr 2005 18:16:43 -0400
To:	"Christian Gan" <christian.gan@librestream.com>
X-Mailer: Apple Mail (2.622)
Return-Path: <dan@embeddedalley.com>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 7828
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: dan@embeddedalley.com
Precedence: bulk
X-list: linux-mips


On Apr 28, 2005, at 5:22 PM, Christian Gan wrote:

> ..... Again it would be okay if I used
> kmalloc or if I disabled CONFIG_64BIT_PHYS_ADDR.

An Au1500 or Au1550 isn't likely to work with this disabled.
PCI and other peripherals exist in the 36-bit space, unless you
disable them.  I suspect all of this got broken with the dynamic
exception handler building.  Prior to that, I suspect it works
fine.  I guess we need to do some regression testing ....

Thanks.


	-- Dan


From christian.gan@librestream.com Fri Apr 29 00:16:44 2005
Received: with ECARTIS (v1.0.0; list linux-mips); Fri, 29 Apr 2005 00:16:58 +0100 (BST)
Received: from 205-200-7-228.static.mts.net ([IPv6:::ffff:205.200.7.228]:57871
	"EHLO librestream.com") by linux-mips.org with ESMTP
	id <S8225938AbVD1XQo> convert rfc822-to-8bit; Fri, 29 Apr 2005 00:16:44 +0100
X-MIMEOLE: Produced By Microsoft Exchange V6.5.6944.0
Content-class: urn:content-classes:message
MIME-Version: 1.0
Content-Type: text/plain;
	charset="us-ascii"
Content-Transfer-Encoding: 8BIT
Subject: RE: iptables/vmalloc issues on alchemy
Date:	Thu, 28 Apr 2005 18:16:36 -0500
Message-ID: <8230E1CC35AF9F43839F3049E930169A137236@yang.LibreStream.local>
X-MS-Has-Attach: 
X-MS-TNEF-Correlator: 
Thread-Topic: iptables/vmalloc issues on alchemy
thread-index: AcVMP/eWlU8Fu2RfT3y2gnsK31YrNwACB8mw
From:	"Christian Gan" <christian.gan@librestream.com>
To:	"Dan Malek" <dan@embeddedalley.com>
Cc:	"Josh Green" <jgreen@users.sourceforge.net>,
	"Herbert Valerio Riedel" <hvr@hvrlab.org>,
	<linux-mips@linux-mips.org>,
	"Pete Popov" <ppopov@embeddedalley.com>
Return-Path: <christian.gan@librestream.com>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 7829
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: christian.gan@librestream.com
Precedence: bulk
X-list: linux-mips

Sorry, I should have been more clear:  The little test module I created
worked without CONFIG_64BIT_PHYS_ADDR, I realize that it would fail for
the PCI device though.

Thanks!

Christian

-----Original Message-----
From: Dan Malek [mailto:dan@embeddedalley.com] 
Sent: Thursday, April 28, 2005 5:17 PM
To: Christian Gan
Cc: Josh Green; Herbert Valerio Riedel; linux-mips@linux-mips.org; Pete
Popov
Subject: Re: iptables/vmalloc issues on alchemy


On Apr 28, 2005, at 5:22 PM, Christian Gan wrote:

> ..... Again it would be okay if I used
> kmalloc or if I disabled CONFIG_64BIT_PHYS_ADDR.

An Au1500 or Au1550 isn't likely to work with this disabled.
PCI and other peripherals exist in the 36-bit space, unless you
disable them.  I suspect all of this got broken with the dynamic
exception handler building.  Prior to that, I suspect it works
fine.  I guess we need to do some regression testing ....

Thanks.


	-- Dan




From ths@networkno.de Fri Apr 29 00:52:52 2005
Received: with ECARTIS (v1.0.0; list linux-mips); Fri, 29 Apr 2005 00:53:07 +0100 (BST)
Received: from mx02.qsc.de ([IPv6:::ffff:213.148.130.14]:60837 "EHLO
	mx02.qsc.de") by linux-mips.org with ESMTP id <S8225947AbVD1Xww>;
	Fri, 29 Apr 2005 00:52:52 +0100
Received: from port-195-158-168-232.dynamic.qsc.de ([195.158.168.232] helo=hattusa.textio)
	by mx02.qsc.de with esmtp (Exim 3.35 #1)
	id 1DRIoH-0004Ad-00; Fri, 29 Apr 2005 01:52:45 +0200
Received: from ths by hattusa.textio with local (Exim 4.50)
	id 1DRIoH-0004RS-2S; Fri, 29 Apr 2005 01:52:45 +0200
Date:	Fri, 29 Apr 2005 01:52:45 +0200
To:	Dan Malek <dan@embeddedalley.com>
Cc:	linux-mips@linux-mips.org
Subject: Re: iptables/vmalloc issues on alchemy
Message-ID: <20050428235244.GB1621@hattusa.textio>
References: <8230E1CC35AF9F43839F3049E930169A137228@yang.LibreStream.local> <c145ddc72b875ec3833ceba1a849b156@embeddedalley.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <c145ddc72b875ec3833ceba1a849b156@embeddedalley.com>
User-Agent: Mutt/1.5.9i
From:	Thiemo Seufer <ths@networkno.de>
Return-Path: <ths@networkno.de>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 7830
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: ths@networkno.de
Precedence: bulk
X-list: linux-mips

Dan Malek wrote:
> 
> On Apr 28, 2005, at 5:22 PM, Christian Gan wrote:
> 
> >..... Again it would be okay if I used
> >kmalloc or if I disabled CONFIG_64BIT_PHYS_ADDR.
> 
> An Au1500 or Au1550 isn't likely to work with this disabled.
> PCI and other peripherals exist in the 36-bit space, unless you
> disable them.  I suspect all of this got broken with the dynamic
> exception handler building.  Prior to that, I suspect it works
> fine.  I guess we need to do some regression testing ....

I took the code from 2.4 for 36bit support, without the means of testing
the result. There was no support for it in the 2.6 linux-mips.org CVS at
that time, but some people apparently had uncontributed patches.


Thiemo

From stuartl@longlandclan.hopto.org Fri Apr 29 07:51:14 2005
Received: with ECARTIS (v1.0.0; list linux-mips); Fri, 29 Apr 2005 07:51:29 +0100 (BST)
Received: from 202-47-55-78.adsl.gil.com.au ([IPv6:::ffff:202.47.55.78]:44846
	"EHLO longlandclan.hopto.org") by linux-mips.org with ESMTP
	id <S8225576AbVD2GvN>; Fri, 29 Apr 2005 07:51:13 +0100
Received: (qmail 4739 invoked by uid 210); 29 Apr 2005 16:51:03 +1000
Received: from 127.0.0.1 by www (envelope-from <stuartl@longlandclan.hopto.org>, uid 201) with qmail-scanner-1.25st 
 (spamassassin: 3.0.2. perlscan: 1.25st.  
 Clear:RC:1(127.0.0.1):. 
 Processed in 0.542765 secs); 29 Apr 2005 06:51:03 -0000
Received: from unknown (HELO mail.longlandclan.hopto.org) (127.0.0.1)
  by 127.0.0.1 with SMTP; 29 Apr 2005 16:51:02 +1000
Received: from 131.181.46.15
        (SquirrelMail authenticated user stuartl)
        by mail.longlandclan.hopto.org with HTTP;
        Fri,
      29 Apr 2005 06:51:02 -0000 (Local time zone must be set--see zic 
     manual page)
Message-ID: <57961.131.181.46.15.1114757462.squirrel@mail.longlandclan.hopto.org>
In-Reply-To: <015301c54c01$9b8e4e00$3c67a8c0@netsity.com>
References: <015301c54c01$9b8e4e00$3c67a8c0@netsity.com>
Date:	Fri,
      29 Apr 2005 06:51:02 -0000 (Local time zone must be set--see zic 
     manual page)
Subject: Re: GD Library on MIPS Processor
From:	"Stuart Longland" <stuartl@longlandclan.hopto.org>
To:	"Inpreet Singh" <Singh.Inpreet@netsity.com>
Cc:	linux-mips@linux-mips.org
User-Agent: SquirrelMail/1.4.2
MIME-Version: 1.0
Content-Type: text/plain;charset=iso-8859-1
Content-Transfer-Encoding: 8bit
X-Priority: 3
Importance: Normal
Return-Path: <stuartl@longlandclan.hopto.org>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 7831
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: stuartl@longlandclan.hopto.org
Precedence: bulk
X-list: linux-mips

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Okay, before I start... can you please turn off HTML message composition?
Some users here don't take kindly to HTML email. ;-)

> Sir I am using gd library on Linux intel processor sucessfully but now I
> want to do same on MIPS. I don't know to how install, configure and test
> gd library on MIPS. Sir please give me some clue or link to study for
> the same.
>
> I tried to configure gd library compilation using following command from
> linux intel processor:
>
> ./configure --host=mips

Try ./configure --host=mips-unknown-linux-gnu (or mips-unknown-linux-uclibc if
you use µClibc).  Setting --build and --target may help too.

> and it makes Makefile with some differences
> ***************************************************
> host_triplet = mips-unknown-elf
> host = mips-unknown-elf
> host_alias = mips
> host_cpu = mips
> ***************************************************
> Now I tried to build a example using this Makefile "make gddemo". What I
> expect that it will create gddemo binary that will output in correctly
> on MIPS processor. But when I run this binary on MIPS it is showing
> errors.
> **************************************************************
> /launchpad # ./gddemo
> ./gddemo: 1: Syntax error: "(" unexpected
> **************************************************************

I'm not sure what's going on there... but I'd presume it's related to the
wrong `host` option being set.

Also, make sure you run the compiled binaries on the MIPS machine... they
won't work on x86 (you'll get a "cannot execute binary file" error message).

> Also I have downloaded debian packages for gd library on MIPS processor
> but don't know how to install them. I tried dpkg command but it shows no
> such command. So sir please help me out.
> So please help me how should I proceed.

That's odd.  Do you have Debian installed correctly on the MIPS machine?  What
version/distribution did you install?

- --
+-------------------------------------------------------------+
| Stuart Longland -oOo- http://stuartl.longlandclan.hopto.org |
| Atomic Linux Project     -oOo-    http://atomicl.berlios.de |
| - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - |
| I haven't lost my mind - it's backed up on a tape somewhere |
+-------------------------------------------------------------+

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.6 (GNU/Linux)

iD8DBQFCcdkpuarJ1mMmSrkRAlt0AJ97SkR+SDtpVXiU1KzhWvSLFLTJIgCfQyFO
n8aKAVeZBTUPKhHm8NAvxAY=
=1oRI
-----END PGP SIGNATURE-----

From charles.palmer@acutetechnology.com Fri Apr 29 09:02:09 2005
Received: with ECARTIS (v1.0.0; list linux-mips); Fri, 29 Apr 2005 09:02:25 +0100 (BST)
Received: from turtle.dnsmaster.net ([IPv6:::ffff:212.84.160.23]:7049 "EHLO
	turtle.dnsmaster.net") by linux-mips.org with ESMTP
	id <S8225962AbVD2ICJ>; Fri, 29 Apr 2005 09:02:09 +0100
Received: from Charles (host81-129-41-101.range81-129.btcentralplus.com [81.129.41.101])
	by turtle.dnsmaster.net (8.13.1/8.12.8) with ESMTP id j3T825ZI024072
	for <linux-mips@linux-mips.org>; Fri, 29 Apr 2005 08:02:06 GMT
Message-ID: <000a01c54c91$bd2d03e0$0410a8c0@Charles>
From:	"Charles Palmer" <charles.palmer@acutetechnology.com>
To:	<linux-mips@linux-mips.org>
Subject: Obtaining cardmgr, cardctl for Alchemy
Date:	Fri, 29 Apr 2005 09:02:02 +0100
MIME-Version: 1.0
Content-Type: text/plain;
	format=flowed;
	charset="iso-8859-1";
	reply-type=original
Content-Transfer-Encoding: 7bit
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 6.00.2900.2180
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
Return-Path: <charles.palmer@acutetechnology.com>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 7832
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: charles.palmer@acutetechnology.com
Precedence: bulk
X-list: linux-mips

I am working with AMD's DBAu1200 development board and want to get the 
PCMCIA working. It looks like I am missing a package containing cardmgr, 
cardctl etc. Does anyone know where I can download this from? I am using 
2.4.26 kernel, based on a source tree provided with AMD's development kit, 
but it appears to lack this package.

AMD's pcmcia.txt readme says this: "Install the MVL HHL PCMCIA package, file 
named hhl-mips_fp_le-pcmcia-cs-3.1.24-db010812.1.mips_fp_le.rpm. This 
pacakge contains the scripts and utilities (specifically cardmgr and 
cardctl) for making PCMCIA work". I am using 2.4.26 kernel, based on a 
source tree provided with AMD's development kit, but it appears to lack this 
package.

Thanks - Charles Palmer 


From Singh.Inpreet@netsity.com Fri Apr 29 09:14:13 2005
Received: with ECARTIS (v1.0.0; list linux-mips); Fri, 29 Apr 2005 09:14:35 +0100 (BST)
Received: from [IPv6:::ffff:61.246.180.169] ([IPv6:::ffff:61.246.180.169]:5131
	"EHLO mail.netsity.com") by linux-mips.org with ESMTP
	id <S8225962AbVD2ION>; Fri, 29 Apr 2005 09:14:13 +0100
Received: by mail.netsity.com with Internet Mail Service (5.5.2653.19)
	id <J6SP2J8Y>; Fri, 29 Apr 2005 13:43:59 +0530
Received: from ISINGH ([192.168.103.60]) by mail.netsity.com with SMTP (Microsoft Exchange Internet Mail Service Version 5.5.2653.13)
	id J6SP2J8X; Fri, 29 Apr 2005 13:43:58 +0530
From:	Inpreet Singh <Singh.Inpreet@netsity.com>
To:	Stuart Longland <stuartl@longlandclan.hopto.org>
Cc:	linux-mips@linux-mips.org
Message-ID: <005201c54c93$64a5fb30$3c67a8c0@netsity.com>
References: <015301c54c01$9b8e4e00$3c67a8c0@netsity.com> <57961.131.181.46.15.1114757462.squirrel@mail.longlandclan.hopto.org>
Subject: Re: GD Library on MIPS Processor
Date:	Fri, 29 Apr 2005 13:43:58 +0530
MIME-Version: 1.0
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 6.00.2800.1437
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1441
Return-Path: <Singh.Inpreet@netsity.com>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 7833
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: Singh.Inpreet@netsity.com
Precedence: bulk
X-list: linux-mips

I want to use gd library on MIPS processor. Due to limited memory on mips, I
cannot compile gd library on it. So I need to compile it on linux intel
processor and transfer executable files on MIPS. I have compiled gd library
on intel linux and successfully tested it. But how to compile gd library for
MIPS processor? I tried to configure it with these commands
1. ./configure --host=mips-unknown-linux-gnu
2. ./configure --host=mips-linux
3. ./configure --host=mips-linux --build=mips-linux --target=mips-linux
4. ./configure --host=mips-linux --build=mips-linux

but none of them had worked for me. Whenever after compiling I place my
executables and try to test them, they fails to return results.

gd library after configure command dynamically generates Makefile. Now
method to test your application which you have to write in a c program is so
make this program with this Makefile. Lets suppose you make an example and
name it as test.c so what you have to do is enter test.c in this dynamically
generated Makefile and write command make test this will outputs in test
executable file. Which we can run using command ./test on our command
prompt.

Whenever I perform this task it always shows errors:
**************************************************************
/launchpad # ./gddemo
./gddemo: 1: Syntax error: "(" unexpected
**************************************************************
eval: 1: gcc: not found
**************************************************************
I have used Source-Navigator and tried to compile my project using mips
compiling option but doesn't workout. So please help me. please tell me what
is best procedure to compile and test gd library on MIPS processor when due
to memory limitation I cannot compile project on MIPS itself, on my MIPS
processor I have installed linux with very limited command set.
_____________________________________________________________________
Regards
Inpreet Singh

From eckhardt@satorlaser.com Fri Apr 29 11:02:07 2005
Received: with ECARTIS (v1.0.0; list linux-mips); Fri, 29 Apr 2005 11:02:22 +0100 (BST)
Received: from moutng.kundenserver.de ([IPv6:::ffff:212.227.126.184]:46035
	"EHLO moutng.kundenserver.de") by linux-mips.org with ESMTP
	id <S8225966AbVD2KCH>; Fri, 29 Apr 2005 11:02:07 +0100
Received: from [212.227.126.209] (helo=mrelayng.kundenserver.de)
	by moutng.kundenserver.de with esmtp (Exim 3.35 #1)
	id 1DRSJx-00036v-00
	for linux-mips@linux-mips.org; Fri, 29 Apr 2005 12:02:05 +0200
Received: from [213.39.254.68] (helo=tuxator.satorlaser-intern.com)
	by mrelayng.kundenserver.de with asmtp (TLSv1:RC4-MD5:128)
	(Exim 3.35 #1)
	id 1DRSJx-0002V8-00
	for linux-mips@linux-mips.org; Fri, 29 Apr 2005 12:02:05 +0200
From:	Ulrich Eckhardt <eckhardt@satorlaser.com>
Organization: Sator Laser GmbH
To:	linux-mips@linux-mips.org
Subject: Re: Obtaining cardmgr, cardctl for Alchemy
Date:	Fri, 29 Apr 2005 12:03:14 +0200
User-Agent: KMail/1.7.2
References: <000a01c54c91$bd2d03e0$0410a8c0@Charles>
In-Reply-To: <000a01c54c91$bd2d03e0$0410a8c0@Charles>
MIME-Version: 1.0
Content-Type: text/plain;
  charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
Message-Id: <200504291203.14838.eckhardt@satorlaser.com>
X-Provags-ID: kundenserver.de abuse@kundenserver.de auth:e35cee35a663f5c944b9750a965814ae
Return-Path: <eckhardt@satorlaser.com>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 7834
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: eckhardt@satorlaser.com
Precedence: bulk
X-list: linux-mips

Charles Palmer wrote:
> I am working with AMD's DBAu1200 development board and want to get the
> PCMCIA working. It looks like I am missing a package containing cardmgr,
> cardctl etc. Does anyone know where I can download this from? 

http://pcmcia-cs.sf.net

Uli

From eckhardt@satorlaser.com Fri Apr 29 11:08:26 2005
Received: with ECARTIS (v1.0.0; list linux-mips); Fri, 29 Apr 2005 11:08:41 +0100 (BST)
Received: from moutng.kundenserver.de ([IPv6:::ffff:212.227.126.187]:26860
	"EHLO moutng.kundenserver.de") by linux-mips.org with ESMTP
	id <S8225966AbVD2KI0>; Fri, 29 Apr 2005 11:08:26 +0100
Received: from [213.39.254.68] (helo=tuxator.satorlaser-intern.com)
	by mrelayeu.kundenserver.de with ESMTP (Nemesis),
	id 0MKxQS-1DRSQ4325s-0007Dj; Fri, 29 Apr 2005 12:08:24 +0200
From:	Ulrich Eckhardt <eckhardt@satorlaser.com>
Organization: Sator Laser GmbH
To:	linux-mips@linux-mips.org
Subject: Re: GD Library on MIPS Processor
Date:	Fri, 29 Apr 2005 12:09:33 +0200
User-Agent: KMail/1.7.2
References: <015301c54c01$9b8e4e00$3c67a8c0@netsity.com> <57961.131.181.46.15.1114757462.squirrel@mail.longlandclan.hopto.org> <005201c54c93$64a5fb30$3c67a8c0@netsity.com>
In-Reply-To: <005201c54c93$64a5fb30$3c67a8c0@netsity.com>
MIME-Version: 1.0
Content-Type: text/plain;
  charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
Message-Id: <200504291209.34016.eckhardt@satorlaser.com>
X-Provags-ID: kundenserver.de abuse@kundenserver.de login:e35cee35a663f5c944b9750a965814ae
Return-Path: <eckhardt@satorlaser.com>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 7835
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: eckhardt@satorlaser.com
Precedence: bulk
X-list: linux-mips

Inpreet Singh wrote:
> I want to use gd library on MIPS processor. Due to limited memory on mips,
> I cannot compile gd library on it. So I need to compile it on linux intel
> processor and transfer executable files on MIPS. I have compiled gd library
> on intel linux and successfully tested it. But how to compile gd library
> for MIPS processor? I tried to configure it with these commands
> 1. ./configure --host=mips-unknown-linux-gnu
> 2. ./configure --host=mips-linux
> 3. ./configure --host=mips-linux --build=mips-linux --target=mips-linux
> 4. ./configure --host=mips-linux --build=mips-linux

If you're building on Linux/x86, using '--build=mips-linux' is obviously 
completely bogus.

> but none of them had worked for me. Whenever after compiling I place my
> executables and try to test them, they fails to return results.

This could have another reason, see below...

> gd library after configure command dynamically generates Makefile. Now
> method to test your application which you have to write in a c program is
> so make this program with this Makefile. Lets suppose you make an example
> and name it as test.c so what you have to do is enter test.c in this
> dynamically generated Makefile and write command make test this will
> outputs in test executable file. Which we can run using command ./test on
> our command prompt.
>
> Whenever I perform this task it always shows errors:
> **************************************************************
> /launchpad # ./gddemo
> ./gddemo: 1: Syntax error: "(" unexpected

If this program gives this message, then it is running. Why it gives it is a 
totally unrelated thing. 

 Now, what could also be the case is that you didn't grab the executable but a 
script. Autotools usually generate a script in the builddir that setup the 
runtime linker so it finds the (not yet installed) libraries and then calls 
the executable inside the hidden .lib directory.

If this all fails, create a minimal hello-world and compile it with
'mips-linux-gcc -Wall -o hw hello.c' and try that on the host machine.

Uli

From ralf@linux-mips.org Fri Apr 29 12:03:34 2005
Received: with ECARTIS (v1.0.0; list linux-mips); Fri, 29 Apr 2005 12:03:48 +0100 (BST)
Received: from extgw-uk.mips.com ([IPv6:::ffff:62.254.210.129]:5655 "EHLO
	bacchus.net.dhis.org") by linux-mips.org with ESMTP
	id <S8225970AbVD2LDe>; Fri, 29 Apr 2005 12:03:34 +0100
Received: from dea.linux-mips.net (localhost.localdomain [127.0.0.1])
	by bacchus.net.dhis.org (8.13.1/8.13.1) with ESMTP id j3TB30Vk017145;
	Fri, 29 Apr 2005 12:03:00 +0100
Received: (from ralf@localhost)
	by dea.linux-mips.net (8.13.1/8.13.1/Submit) id j3TB2xoc017144;
	Fri, 29 Apr 2005 12:02:59 +0100
Date:	Fri, 29 Apr 2005 12:02:58 +0100
From:	Ralf Baechle <ralf@linux-mips.org>
To:	Bryan Althouse <bryan.althouse@3phoenix.com>
Cc:	linux-mips@linux-mips.org, TheNop@gmx.net
Subject: Re: your mail
Message-ID: <20050429110258.GE5951@linux-mips.org>
References: <20050428191608Z8225923-1340+6320@linux-mips.org>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <20050428191608Z8225923-1340+6320@linux-mips.org>
User-Agent: Mutt/1.4.1i
Return-Path: <ralf@linux-mips.org>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 7836
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: ralf@linux-mips.org
Precedence: bulk
X-list: linux-mips

On Thu, Apr 28, 2005 at 03:15:49PM -0400, Bryan Althouse wrote:

> I would like to use a 2.6.x kernel with my Yosemite/HalfDome board.
> Somehow, I am unable to compile the kernel.  I have tried the 2.6.10 kernel
> trees from ftp.pmc-sierra.com and also the latest 2.6.12 snapshot from
> linux-mips.  I am using the 3.3.x cross compile tools from
> ftp.pmc-sierra.com .  The 2.4.x kernels from PMC compile fine.
> 
> In the case of 2.6.10 from ftp.pmc-sierra.com, my error looks like:
>        Make[3]: *** [drivers/char/agp/backend.o] Error 1

Configuring AGP support for a MIPS kernel is obviously nonsense.  Disable
CONFIG_AGP.

> In the case of 2.6.12 from linux-mips, my error looks like:
> 	drivers/net/titan_ge.c1950: error: 'titan_device_remove"  undeclared
> here (not in a function)

Whoops, a bug.  The function indeed doesn't exist even though it should,
will fix that.  You will hit this bug only if compiling the titan driver
as a module, so workaround set CONFIG_TITAN_GE=y.  Which for the typical
titan-based device seems to be the preferable choice anyway.

  Ralf

From anemo@mba.ocn.ne.jp Fri Apr 29 14:39:06 2005
Received: with ECARTIS (v1.0.0; list linux-mips); Fri, 29 Apr 2005 14:39:22 +0100 (BST)
Received: from mba.ocn.ne.jp ([IPv6:::ffff:210.190.142.172]:35792 "HELO
	smtp.mba.ocn.ne.jp") by linux-mips.org with SMTP
	id <S8225983AbVD2NjG>; Fri, 29 Apr 2005 14:39:06 +0100
Received: from localhost (p8173-ipad25funabasi.chiba.ocn.ne.jp [220.104.86.173])
	by smtp.mba.ocn.ne.jp (Postfix) with ESMTP
	id 4F1D48441; Fri, 29 Apr 2005 22:39:03 +0900 (JST)
Date:	Fri, 29 Apr 2005 22:40:24 +0900 (JST)
Message-Id: <20050429.224024.25908909.anemo@mba.ocn.ne.jp>
To:	kevink@mips.com
Cc:	ralf@linux-mips.org, linux-mips@linux-mips.org
Subject: Re: preempt safe fpu-emulator
From:	Atsushi Nemoto <anemo@mba.ocn.ne.jp>
In-Reply-To: <004e01c54c0c$4c9f3d30$10eca8c0@grendel>
References: <002d01c54bfa$5b913f80$0deca8c0@Ulysses>
	<20050428152123.GH1276@linux-mips.org>
	<004e01c54c0c$4c9f3d30$10eca8c0@grendel>
X-Fingerprint: 6ACA 1623 39BD 9A94 9B1A  B746 CA77 FE94 2874 D52F
X-Pgp-Public-Key: http://wwwkeys.pgp.net/pks/lookup?op=get&search=0x2874D52F
X-Mailer: Mew version 3.3 on Emacs 21.4 / Mule 5.0 (SAKAKI)
Mime-Version: 1.0
Content-Type: Text/Plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Return-Path: <anemo@mba.ocn.ne.jp>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 7837
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: anemo@mba.ocn.ne.jp
Precedence: bulk
X-list: linux-mips

>>>>> On Thu, 28 Apr 2005 18:06:53 +0200, "Kevin D. Kissell" <kevink@mips.com> said:

kevink> The global variable thing was clearly not SMP safe - but then
kevink> again, the 32-bit MIPS kernel we were working with wasn't SMP
kevink> safe either, in those days.  ;o)

Also, IIRC, old FPU ownership management ("lazy fpu switch") was
somewhat broken (or fragile at least) in those days.  The current code
is more robust (and simple, I suppose).

kevink> But *if* - and it may not really (or no longer) be the case -
kevink> there is an implicit assumption that some FCSR state is
kevink> preserved on a context switch, it would be more correct to map
kevink> the ieee754_csr symbol to a per-CPU variable than a per-thread
kevink> variable.

Thanks for your advise.  I believe there is not a such assumption now.
Any newly created process always start with CP1 disabled, and on the
first CP1 unusable exception FCSR will be initialized to 0.

---
Atsushi Nemoto

From bryan.althouse@3phoenix.com Fri Apr 29 14:52:20 2005
Received: with ECARTIS (v1.0.0; list linux-mips); Fri, 29 Apr 2005 14:52:36 +0100 (BST)
Received: from rwcrmhc13.comcast.net ([IPv6:::ffff:204.127.198.39]:26512 "EHLO
	rwcrmhc13.comcast.net") by linux-mips.org with ESMTP
	id <S8225807AbVD2NwU>; Fri, 29 Apr 2005 14:52:20 +0100
Received: from ba3pi (pcp0010731669pcs.howard01.md.comcast.net[69.243.71.130])
          by comcast.net (rwcrmhc13) with SMTP
          id <20050429135212015004nk7re>; Fri, 29 Apr 2005 13:52:12 +0000
From:	"Bryan Althouse" <bryan.althouse@3phoenix.com>
To:	"'Ralf Baechle'" <ralf@linux-mips.org>
Cc:	<linux-mips@linux-mips.org>
Subject: RE: your mail (yosemite + 2.6.x issues)
Date:	Fri, 29 Apr 2005 09:52:05 -0400
MIME-Version: 1.0
Content-Type: text/plain;
	charset="us-ascii"
Content-Transfer-Encoding: 7bit
X-Mailer: Microsoft Office Outlook, Build 11.0.6353
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
In-Reply-To: <20050429110258.GE5951@linux-mips.org>
Thread-Index: AcVMqxJLo5JlAej0RIyD3aq2o/pxFgAFMaRw
Message-Id: <20050429135220Z8225807-1340+6357@linux-mips.org>
Return-Path: <bryan.althouse@3phoenix.com>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 7838
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: bryan.althouse@3phoenix.com
Precedence: bulk
X-list: linux-mips

Thanks Ralf, now I can compile the kernel.  But, I don't get any serial
console output when I try to boot it.  Actually, I get a single line that
looks like this:

Loading file: tftp://192.168.2.39/vmlinux (elf)
0x80100000/2288188 + 0x8032ea3c/111372(z) + 4125 syms|

I have found PMC's "yosemite_defconfig" file and I am using it as the
".config". I have tried using CONFIG_PMC_INTERNAL_UART=y and I have also
tried commenting it out.  Either way, I get no console output.

Thanks for the help!
Bryan

-----Original Message-----
From: Ralf Baechle [mailto:ralf@linux-mips.org] 
Sent: Friday, April 29, 2005 7:03 AM
To: Bryan Althouse
Cc: linux-mips@linux-mips.org; TheNop@gmx.net
Subject: Re: your mail

On Thu, Apr 28, 2005 at 03:15:49PM -0400, Bryan Althouse wrote:

> I would like to use a 2.6.x kernel with my Yosemite/HalfDome board.
> Somehow, I am unable to compile the kernel.  I have tried the 2.6.10
kernel
> trees from ftp.pmc-sierra.com and also the latest 2.6.12 snapshot from
> linux-mips.  I am using the 3.3.x cross compile tools from
> ftp.pmc-sierra.com .  The 2.4.x kernels from PMC compile fine.
> 
> In the case of 2.6.10 from ftp.pmc-sierra.com, my error looks like:
>        Make[3]: *** [drivers/char/agp/backend.o] Error 1

Configuring AGP support for a MIPS kernel is obviously nonsense.  Disable
CONFIG_AGP.

> In the case of 2.6.12 from linux-mips, my error looks like:
> 	drivers/net/titan_ge.c1950: error: 'titan_device_remove"  undeclared
> here (not in a function)

Whoops, a bug.  The function indeed doesn't exist even though it should,
will fix that.  You will hit this bug only if compiling the titan driver
as a module, so workaround set CONFIG_TITAN_GE=y.  Which for the typical
titan-based device seems to be the preferable choice anyway.

  Ralf



From mlachwani@mvista.com Fri Apr 29 17:08:42 2005
Received: with ECARTIS (v1.0.0; list linux-mips); Fri, 29 Apr 2005 17:08:58 +0100 (BST)
Received: from gateway-1237.mvista.com ([IPv6:::ffff:12.44.186.158]:64502 "EHLO
	hermes.mvista.com") by linux-mips.org with ESMTP
	id <S8226002AbVD2QIm>; Fri, 29 Apr 2005 17:08:42 +0100
Received: from mvista.com (prometheus.mvista.com [10.0.0.139])
	by hermes.mvista.com (Postfix) with ESMTP
	id A591418F3C; Fri, 29 Apr 2005 09:08:39 -0700 (PDT)
Message-ID: <42725C07.6050100@mvista.com>
Date:	Fri, 29 Apr 2005 09:08:39 -0700
From:	Manish Lachwani <mlachwani@mvista.com>
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4.2) Gecko/20040308
X-Accept-Language: en-us, en
MIME-Version: 1.0
To:	Bryan Althouse <bryan.althouse@3phoenix.com>
Cc:	'Ralf Baechle' <ralf@linux-mips.org>, linux-mips@linux-mips.org
Subject: Re: your mail (yosemite + 2.6.x issues)
References: <20050429135220Z8225807-1340+6357@linux-mips.org>
In-Reply-To: <20050429135220Z8225807-1340+6357@linux-mips.org>
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
Return-Path: <mlachwani@mvista.com>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 7839
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: mlachwani@mvista.com
Precedence: bulk
X-list: linux-mips

Do you load the kernel first and then do a "go"? If you load the kernel 
first using the "load" command, then you should come back to the PMON 
prompt where you can type a "go". I was not clear about it from your 
email below.

Thanks
Manish Lachwani

Bryan Althouse wrote:

>Thanks Ralf, now I can compile the kernel.  But, I don't get any serial
>console output when I try to boot it.  Actually, I get a single line that
>looks like this:
>
>Loading file: tftp://192.168.2.39/vmlinux (elf)
>0x80100000/2288188 + 0x8032ea3c/111372(z) + 4125 syms|
>
>I have found PMC's "yosemite_defconfig" file and I am using it as the
>".config". I have tried using CONFIG_PMC_INTERNAL_UART=y and I have also
>tried commenting it out.  Either way, I get no console output.
>
>Thanks for the help!
>Bryan
>
>-----Original Message-----
>From: Ralf Baechle [mailto:ralf@linux-mips.org] 
>Sent: Friday, April 29, 2005 7:03 AM
>To: Bryan Althouse
>Cc: linux-mips@linux-mips.org; TheNop@gmx.net
>Subject: Re: your mail
>
>On Thu, Apr 28, 2005 at 03:15:49PM -0400, Bryan Althouse wrote:
>
>  
>
>>I would like to use a 2.6.x kernel with my Yosemite/HalfDome board.
>>Somehow, I am unable to compile the kernel.  I have tried the 2.6.10
>>    
>>
>kernel
>  
>
>>trees from ftp.pmc-sierra.com and also the latest 2.6.12 snapshot from
>>linux-mips.  I am using the 3.3.x cross compile tools from
>>ftp.pmc-sierra.com .  The 2.4.x kernels from PMC compile fine.
>>
>>In the case of 2.6.10 from ftp.pmc-sierra.com, my error looks like:
>>       Make[3]: *** [drivers/char/agp/backend.o] Error 1
>>    
>>
>
>Configuring AGP support for a MIPS kernel is obviously nonsense.  Disable
>CONFIG_AGP.
>
>  
>
>>In the case of 2.6.12 from linux-mips, my error looks like:
>>	drivers/net/titan_ge.c1950: error: 'titan_device_remove"  undeclared
>>here (not in a function)
>>    
>>
>
>Whoops, a bug.  The function indeed doesn't exist even though it should,
>will fix that.  You will hit this bug only if compiling the titan driver
>as a module, so workaround set CONFIG_TITAN_GE=y.  Which for the typical
>titan-based device seems to be the preferable choice anyway.
>
>  Ralf
>
>
>
>  
>



From hjl@lucon.org Sat Apr 30 01:04:25 2005
Received: with ECARTIS (v1.0.0; list linux-mips); Sat, 30 Apr 2005 01:04:44 +0100 (BST)
Received: from rwcrmhc12.comcast.net ([IPv6:::ffff:216.148.227.85]:21666 "EHLO
	rwcrmhc12.comcast.net") by linux-mips.org with ESMTP
	id <S8226037AbVD3AEZ>; Sat, 30 Apr 2005 01:04:25 +0100
Received: from lucon.org ([24.6.212.230]) by comcast.net (rwcrmhc12) with ESMTP
          id <2005043000041301400kqdkae>; Sat, 30 Apr 2005 00:04:18 +0000
Received: by lucon.org (Postfix, from userid 1000)
	id 29A8363E85; Fri, 29 Apr 2005 17:04:13 -0700 (PDT)
Date:	Fri, 29 Apr 2005 17:04:13 -0700
From:	"H. J. Lu" <hjl@lucon.org>
To:	linux-gcc@vger.kernel.org
Cc:	GNU C Library <libc-alpha@sources.redhat.com>, gcc@gcc.gnu.org,
	Mat Hostetter <mat@lcs.mit.edu>, Warner Losh <imp@village.org>,
	linux-mips@linux-mips.org, Ralf Baechle <ralf@linux-mips.org>,
	Linas Vepstas <linas@linas.org>
Subject: The Linux binutils 2.16.90.0.2  is released
Message-ID: <20050430000413.GA26770@lucon.org>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
User-Agent: Mutt/1.4.1i
Return-Path: <hjl@lucon.org>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 7840
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: hjl@lucon.org
Precedence: bulk
X-list: linux-mips

This is the beta release of binutils 2.16.90.0.2 for Linux, which is
based on binutils 2005 0429 in CVS on sources.redhat.com plus various
changes. It is purely for Linux.

The new i386/x86_64 assemblers no longer accept instructions for moving
between a segment register and a 32bit memory location, i.e.,

	movl (%eax),%ds
	movl %ds,(%eax)

To generate instructions for moving between a segment register and a
16bit memory location without the 16bit operand size prefix, 0x66,

	mov (%eax),%ds
	mov %ds,(%eax)

should be used. It will work with both new and old assemblers. The
assembler starting from 2.16.90.0.2 will also support

	movw (%eax),%ds
	movw %ds,(%eax)

without the 0x66 prefix. Patches for 2.4 and 2.6 Linux kernels are
available at

http://www.kernel.org/pub/linux/devel/binutils/linux-2.4-seg-4.patch
http://www.kernel.org/pub/linux/devel/binutils/linux-2.6-seg-5.patch

The ia64 assembler is now defaulted to tune for Itanium 2 processors.
To build a kernel for Itanium 1 processors, you will need to add

ifeq ($(CONFIG_ITANIUM),y)
	CFLAGS += -Wa,-mtune=itanium1
	AFLAGS += -Wa,-mtune=itanium1
endif

to arch/ia64/Makefile in your kernel source tree.

Please report any bugs related to binutils 2.16.90.0.2 to hjl@lucon.org

and

http://www.sourceware.org/bugzilla/

If you don't use

# rpmbuild -ta binutils-xx.xx.xx.xx.xx.tar.bz2

to compile the Linux binutils, please read patches/README in source
tree to apply Linux patches if there are any.

Changes from binutils 2.16.90.0.1:

1. Update from binutils 2005 0429.
2. Fix an ELF linker regression (PR 815).
3. Fix an empty section removal related bug.
4. Fix an ia64 linker regression (PR 855).
5. Don't allow local symbol to be equated common/undefined symbols (PR
857).
6. Fix the ia64 linker to handle local dynamic symbol error reporting.
7. Make non-debugging reference to discarded section an error (PR 858).
8. Support Sparc/TLS.
9. Support rpm build with newer rpm.
10. Fix an alpha linker regression.
11. Fix the non-gcc build regression.

Changes from binutils 2.15.94.0.2.2:

1. Update from binutils 2005 0408.
2. The i386/x86_64 assemblers no longer accept instructions for moving
between a segment register and a 32bit memory location.
3. The x86_64 assembler now allows movq between a segment register and
a 64bit general purpose register.
4. 20x Speed up linker for input files with >64K sections.
5. Properly report ia64 linker relaxation failures.
6. Support tuning ia64 assembler for Itanium 2 processors.
7. Linker will remove empty unused output sections.
8. Add -N to readelf to display full section names.
9. Fix the ia64 linker to support linkonce text sections without unwind
sections.
10. More unwind directive checkings in the ia64 assembler.
11. Speed up linker with wildcard handling.
12. Fix readelf to properly dump .debug_ranges and .debug_loc sections.

Changes from binutils 2.15.94.0.2:

1. Fix greater than 64K section support in linker.
2. Properly handle i386 and x86_64 protected symbols in linker.
3. Fix readelf for LEB128 on 64bit hosts.
4. Speed up readelf for section group process.
5. Include ia64 texinfo pages.
6. Change ia64 assembler to check hint.b for Montecito.
7. Improve relaxation failure report in ia64 linker.
8. Fix ia64 linker to allow relax backward branch in the same section.

Changes from binutils 2.15.94.0.1:

1. Update from binutils 2004 1220.
2. Fix strip for TLS symbol references.

Changes from binutils 2.15.92.0.2:

1. Update from binutils 2004 1121.
2. Put ia64 .ctors/.dtors sections next to small data section for
Intel ia64 compiler.
3. Fix -Bdynamic/-Bstatic handling for linker script.
4. Provide more information on relocation overflow.
5. Add --sort-section to linker.
6. Support icc 8.1 unwind info in readelf.
7. Fix the infinite loop bug on bad input in the ia64 assembler.
8. Fix ia64 SECREL relocation in linker.
9. Fix a section group memory leak in readelf.

Changes from binutils 2.15.91.0.2:

1. Update from binutils 2004 0927.
2. Work around a section header bug in Intel ia64 compiler.
3. Fix an unwind directive bug in the ia64 assembler.
4. Fix various PPC bugs.
5. Update ARM support.
6. Fix an x86-64 linker warning while building Linux kernel.

Changes from binutils 2.15.91.0.1:

1. Update from binutils 2004 0727.
2. Fix the x86_64 linker to prevent non-PIC code in shared library.
3. Fix the ia64 linker to warn the relotable files which can't be
relaxed.
4. Fix the comdat group support. Allow mix single-member comdat group
with linkonce section.
5. Added --add-needed/--no-add-needed options to linker.
6. Fix the SHF_LINK_ORDER support.
7. Fix the ia64 assembler for multiple sections with the same name and
SHT_IA_64_UNWIND sections.
8. Fix the ia64 assembler for merge section and relaxation.

Changes from binutils 2.15.90.0.3:

1. Update from binutils 2004 0527.
2. Fix -x auto option in the ia64 assembler.
3. Add the AR check in the ia64 assembler.
4. Fix the section group support.
5. Add a new -z relro linker option.
6. Fix an exception section placement bug in linker.
7. Add .serialize.data and .serialize.instruction to the ia64
assembler.

Changes from binutils 2.15.90.0.2:

1. Update from binutils 2004 0415.
2. Fix the linker for weak undefined symbol handling.
3. Fix the ELF/Sparc and ELF/Sparc64 linker for statically linking PIC
code.

Changes from binutils 2.15.90.0.1.1:

1. Update from binutils 2004 0412.
2. Add --as-needed/--no-as-needed to linker.
3. Fix -z defs in linker.
4. Always reserve the memory for ia64 dynamic linker.
5. Fix a race condition in ia64 lazy binding.

Changes from binutils 2.15.90.0.1:

1. Fixed an ia64 assembler bug.
2. Install the assembler man page.

Changes from binutils 2.14.90.0.8:

1. Update from binutils 2004 0303.
2. Fixed linker for undefined symbols with non-default visibility.
3. Sped up linker weakdef symbol handling.
4. Fixed mixing ELF32 and ELF64 object files in archive.
5. Added ia64 linker brl optimization.
6. Fixed ia64 linker to disallow invalid dynamic relocations.
7. Fixed DT_TEXTREL handling in ia64 linker.
8. Fixed alignment handling in ia64 assembler.
9. Improved ia64 assembler unwind table handling. 

Changes from binutils 2.14.90.0.7:

1. Update from binutils 2004 0114.
2. Fixed an ia64 assembler unwind table bug. 
3. Better handle IPF linker relaxation overflow.
4. Fixed misc PPC bugs.

Changes from binutils 2.14.90.0.6:

1. Update from binutils 2003 1029.
2. Allow type changes for undefined symbols.
3. Fix EH frame optimization.
4. Fix the check for undefined versioned symbol with wildcard.
5. Support generating code for Itanium.
6. Detect and warn bad symbol index.
7. Update IPF assemebler DV check.

Changes from binutils 2.14.90.0.5:

1. Update from binutils 2003 0820.
2. No longer use section names for ELF section types nor flags.
3. Fix some ELF/IA64 linker bugs.
4. Fix some ELF/ppc bugs.
5. Add archive support to readelf.

Changes from binutils 2.14.90.0.4.1:

1. Update from binutils 2003 0722.
2. Fix an ELF/mips linker bug.
3. Fix an ELF/hpppa linker bug.
4. Fix an ELF/ia64 assembler bug.
5. Fix a linkonce support with C++ debug.
6. A new working C++ demangler.
7. Various alpha, mips, ia64, ... bug fixes.
8. Support for the current gcc and glibc.

Changes from binutils 2.14.90.0.4:
 
1. Fix an ia64 assembler hint@pause bug.
2. Support Intel Prescott New Instructions.

Changes from binutils 2.14.90.0.3:

1. Work around the brain dead libtool.

Changes from binutils 2.14.90.0.2:

1. Update from binutils 2003 0523.
2. Fix 2 ELF visibility bugs.
3. Fix ELF/ppc linker bugs.

Changes from binutils 2.14.90.0.1:

1. Update from binutils 2003 0515.
2. Fix various ELF visibility bugs.
3. Fix some ia64 linker bugs.
4. Add more IAS compatibilities to ia64 assembler.

Changes from binutils 2.13.90.0.20:

1. Update from binutils 2003 0505.
2. Fix various ELF visibility bugs.
3. Fix some ia64 linker bugs.
4. Fix some ia64 assembler bugs.
5. Add some IAS compatibilities to ia64 assembler.
6. Fix ELF common symbol alignment.
7. Fix ELF weak symbol handling.

Changes from binutils 2.13.90.0.18:

1. Update from binutils 2003 0319.
2. Fix an ia64 linker brl relaxation bug.
3. Fix some ELF/ppc linker bugs.

Changes from binutils 2.13.90.0.16:

1. Update from binutils 2003 0121.
2. Fix an ia64 gas bug.
3. Fix some TLS bugs.
4. Fix some ELF/ppc bugs.
5. Fix an ELF/m68k bug.

2. Include /usr/bin/c++filt.
Changes from binutils 2.13.90.0.14:

1. Update from binutils 2002 1126.
2. Include /usr/bin/c++filt.
3. Fix "ld -r" with execption handling.

Changes from binutils 2.13.90.0.10:

1. Update from binutils 2002 1114.
2. Fix ELF/alpha bugs.
3. Fix an ELF/i386 assembler bug.

Changes from binutils 2.13.90.0.4:

1. Update from binutils 2002 1010.
2. More ELF/PPC linker bug fixes.
3. Fix an ELF/alpha linker bug.
4. Fix an ELF/sparc linker bug to support Solaris.
5. More TLS updates.

Changes from binutils 2.13.90.0.3:

1. Update from binutils 2002 0814.
2. Fix symbol versioning bugs for gcc 3.2.
3. Fix mips gas.

Changes from binutils 2.13.90.0.2:

1. Update from binutils 2002 0809.
2. Fix a mips gas compatibility bug.
3. Fix an x86 TLS bfd bug.
4. Fix an x86 PIC gas bug.
5. Improve symbol versioning support.

The file list:

1. binutils-2.16.90.0.2.tar.bz2. Source code.
2. binutils-2.16.90.0.1-2.16.90.0.2.diff.bz2. Patch against the
   previous beta source code.
3. binutils-2.16.90.0.2-1.i386.rpm. IA-32 binary RPM for RedHat EL 3.
4. binutils-2.16.90.0.2-1.ia64.rpm. IA-64 binary RPM for RedHat EL 3.
5. binutils-2.16.90.0.2-1.x86_64.rpm. X64_64 binary RPM for RedHat
   EL 3.

There is no separate source rpm. You can do

# rpmbuild -ta binutils-2.16.90.0.2.tar.bz2

to create both binary and source rpms.

The primary sites for the beta Linux binutils are:

1. http://www.kernel.org/pub/linux/devel/binutils/

Thanks.


H.J. Lu
hjl@lucon.org
04/29/2005

From anemo@mba.ocn.ne.jp Sat Apr 30 15:35:32 2005
Received: with ECARTIS (v1.0.0; list linux-mips); Sat, 30 Apr 2005 15:35:48 +0100 (BST)
Received: from mba.ocn.ne.jp ([IPv6:::ffff:210.190.142.172]:57567 "HELO
	smtp.mba.ocn.ne.jp") by linux-mips.org with SMTP
	id <S8226060AbVD3Ofc>; Sat, 30 Apr 2005 15:35:32 +0100
Received: from localhost (p2095-ipad22funabasi.chiba.ocn.ne.jp [220.104.80.95])
	by smtp.mba.ocn.ne.jp (Postfix) with ESMTP
	id BC8857D9F; Sat, 30 Apr 2005 23:35:26 +0900 (JST)
Date:	Sat, 30 Apr 2005 23:36:51 +0900 (JST)
Message-Id: <20050430.233651.25908949.anemo@mba.ocn.ne.jp>
To:	ralf@linux-mips.org
Cc:	linux-mips@linux-mips.org
Subject: Re: preempt safe fpu-emulator
From:	Atsushi Nemoto <anemo@mba.ocn.ne.jp>
In-Reply-To: <20050428134118.GC1276@linux-mips.org>
References: <20050427.143622.77402407.nemoto@toshiba-tops.co.jp>
	<20050428134118.GC1276@linux-mips.org>
X-Fingerprint: 6ACA 1623 39BD 9A94 9B1A  B746 CA77 FE94 2874 D52F
X-Pgp-Public-Key: http://wwwkeys.pgp.net/pks/lookup?op=get&search=0x2874D52F
X-Mailer: Mew version 3.3 on Emacs 21.4 / Mule 5.0 (SAKAKI)
Mime-Version: 1.0
Content-Type: Text/Plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Return-Path: <anemo@mba.ocn.ne.jp>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 7841
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: anemo@mba.ocn.ne.jp
Precedence: bulk
X-list: linux-mips

>>>>> On Thu, 28 Apr 2005 14:41:18 +0100, Ralf Baechle <ralf@linux-mips.org> said:

ralf> I applied both your patches with some slight cleanup for the
ralf> endianess stuff in arch/mips/math-emu/ieee754.h and non-Linux
ralf> stuff.

Thanks.  Since the fpu emulator run without FPU ownership now, the
patch I posted a few weeks ago is necessary to emulate cp1 branch
instructions.

http://www.linux-mips.org/cgi-bin/mesg.cgi?a=linux-mips&i=20050420.165320.42204293.nemoto%40toshiba-tops.co.jp

Please apply this also.  Thank you.
---
Atsushi Nemoto

