From owner-linux-mips@oss.sgi.com Fri Feb 1 00:00:56 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g1180uZ25548 for linux-mips-outgoing; Fri, 1 Feb 2002 00:00:56 -0800 Received: from ocean.lucon.org (12-234-19-19.client.attbi.com [12.234.19.19]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g1180pd25544 for ; Fri, 1 Feb 2002 00:00:51 -0800 Received: by ocean.lucon.org (Postfix, from userid 1000) id 59746125C3; Thu, 31 Jan 2002 23:00:50 -0800 (PST) Date: Thu, 31 Jan 2002 23:00:50 -0800 From: "H . J . Lu" To: Hiroyuki Machida Cc: kaz@ashi.footprints.net, macro@ds2.pg.gda.pl, libc-alpha@sources.redhat.com, linux-mips@oss.sgi.com Subject: Re: [libc-alpha] Re: PATCH: Fix ll/sc for mips Message-ID: <20020131230050.C32690@lucon.org> References: <20020201.123523.50041631.machida@sm.sony.co.jp> <20020201.135903.123568420.machida@sm.sony.co.jp> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <20020201.135903.123568420.machida@sm.sony.co.jp>; from machida@sm.sony.co.jp on Fri, Feb 01, 2002 at 01:59:03PM +0900 Sender: owner-linux-mips@oss.sgi.com Precedence: bulk On Fri, Feb 01, 2002 at 01:59:03PM +0900, Hiroyuki Machida wrote: > > From: Kaz Kylheku > Subject: Re: [libc-alpha] Re: PATCH: Fix ll/sc for mips > Date: Thu, 31 Jan 2002 20:02:25 -0800 (PST) > > > On Fri, 1 Feb 2002, Hiroyuki Machida wrote: > > > Please note that "sc" may fail even if nobody write the > > > variable. (See P.211 "8.4.2 Load-Linked/Sotre-Conditional" of "See > > > MIPS RUN" for more detail.) > > > So, after your patch applied, compare_and_swap() may fail, even if > > > *p is equal to oldval. > > > > I can't think of anything that will break because of this, as long > > as the compare_and_swap eventually succeeds on some subsequent trial. > > If the atomic operation has to abort for some reason other than *p being > > unequal to oldval, that should be cool. > > I mean that this patch breaks the spec of compare_and_swap(). > In most case, this patch may works as Kaz said. If this patch have > no side-effect to any application, it's ok to apply the patch. But > we can't know how to use compare_and_swap() in all aplications in a > whole world. So we have to follow the spec. > Please note that the old compare_and_swap is broken. If you use compare_and_swap to check if *p == oldval, my patch doesn't help you. But if you use it to swap old/new, my patch works fine. But I don't think you can use it check if *p == oldval since *p can change at any time. It is the same as simply using "*p == oldval". I don't see my patch should break any sane applications. H.J. From owner-linux-mips@oss.sgi.com Fri Feb 1 00:04:18 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g1184Iw25670 for linux-mips-outgoing; Fri, 1 Feb 2002 00:04:18 -0800 Received: from mail.pha.ha-vel.cz (mail.pha.ha-vel.cz [195.39.72.3]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g1184Ad25665 for ; Fri, 1 Feb 2002 00:04:11 -0800 Received: (qmail 10665 invoked from network); 1 Feb 2002 07:04:05 -0000 Received: from twilight.ucw.cz (HELO twilight.suse.cz) (root@195.39.74.230) by mail.pha.ha-vel.cz with SMTP; 1 Feb 2002 07:04:05 -0000 Received: (from vojtech@localhost) by twilight.suse.cz (8.10.2/8.9.3) id g11745Z15608; Fri, 1 Feb 2002 08:04:05 +0100 Date: Fri, 1 Feb 2002 08:04:05 +0100 From: Vojtech Pavlik To: James Simmons Cc: Russell King , Linux Kernel Mailing List , linux-mips@oss.sgi.com, Linux ARM mailing list Subject: Re: [PATCH] Migration to input api for keyboards Message-ID: <20020201080405.B15571@suse.cz> References: <20020131004041.K19292@flint.arm.linux.org.uk> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: ; from jsimmons@transvirtual.com on Thu, Jan 31, 2002 at 12:06:36PM -0800 Sender: owner-linux-mips@oss.sgi.com Precedence: bulk On Thu, Jan 31, 2002 at 12:06:36PM -0800, James Simmons wrote: > > > As some on you know the input api drivers for the PS/2 keyboard/mice > > > have gone into the dj tree for 2.5.X. I need people on other platforms > > > besides ix86 to test it out. I made the following patch that forces the > > > use of the new input drivers so people can test it. Shortly this patch > > > will be placed into the DJ tree but before I do this I want to make sure > > > it works for all platforms. Here is the patch to do this. Thank you. > > > > Oops. > > Oops? > > > Out of those 3 ARM machines, only 1 or maybe 2 has an 8042-compatible > > port. > > > > CONFIG_PC_KEYB != i8042 controller present. Please look more closely > > at stuff in include/asm-arm/arch-*/keyboard.h > > I posted to find out which ones. BTW we have a driver for the acorn > keyboard controller. No acorn keyboard but we do have support the acorn The acorn RiscPC keyboard controller has a connector for the standard AT keyboard, so it's rpckbd.c + atkbd.c doing the trick there. > mouse. I can create a patch so you can give the mouse driver a try. Also > help on porting the acorn keyboard driver would be helpful, any docs on > it. Not needed. It's atkbd.c. And that way it'll be for a lot of other hardware - AT keyboards are used everywhere, only the controllers differ. That's the main reason for the keyboard (input) and keyboard controller (serio) driver split! -- Vojtech Pavlik SuSE Labs From owner-linux-mips@oss.sgi.com Fri Feb 1 00:10:41 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g118Afo25801 for linux-mips-outgoing; Fri, 1 Feb 2002 00:10:41 -0800 Received: from ocean.lucon.org (12-234-19-19.client.attbi.com [12.234.19.19]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g118Add25797 for ; Fri, 1 Feb 2002 00:10:39 -0800 Received: by ocean.lucon.org (Postfix, from userid 1000) id 13857125C3; Thu, 31 Jan 2002 23:10:36 -0800 (PST) Date: Thu, 31 Jan 2002 23:10:36 -0800 From: "H . J . Lu" To: Kaz Kylheku Cc: Hiroyuki Machida , macro@ds2.pg.gda.pl, libc-alpha@sources.redhat.com, linux-mips@oss.sgi.com Subject: Re: [libc-alpha] Re: PATCH: Fix ll/sc for mips Message-ID: <20020131231036.D32690@lucon.org> References: <20020201.123523.50041631.machida@sm.sony.co.jp> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: ; from kaz@ashi.footprints.net on Thu, Jan 31, 2002 at 08:02:25PM -0800 Sender: owner-linux-mips@oss.sgi.com Precedence: bulk On Thu, Jan 31, 2002 at 08:02:25PM -0800, Kaz Kylheku wrote: > On Fri, 1 Feb 2002, Hiroyuki Machida wrote: > > Please note that "sc" may fail even if nobody write the > > variable. (See P.211 "8.4.2 Load-Linked/Sotre-Conditional" of "See > > MIPS RUN" for more detail.) > > So, after your patch applied, compare_and_swap() may fail, even if > > *p is equal to oldval. > > I can't think of anything that will break because of this, as long > as the compare_and_swap eventually succeeds on some subsequent trial. > If the atomic operation has to abort for some reason other than *p being > unequal to oldval, that should be cool. Maybe we should document it in glibc, something like compare_and_swap compares the contents of a variable with an old value. If the values are equal and a new value is stored in the variable atomically, 1 is returned; otherwise, 1 is returned. H.J. From owner-linux-mips@oss.sgi.com Fri Feb 1 00:17:20 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g118HKZ25951 for linux-mips-outgoing; Fri, 1 Feb 2002 00:17:20 -0800 Received: from ocean.lucon.org (12-234-19-19.client.attbi.com [12.234.19.19]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g118HGd25948 for ; Fri, 1 Feb 2002 00:17:16 -0800 Received: by ocean.lucon.org (Postfix, from userid 1000) id 92E2D125C3; Thu, 31 Jan 2002 23:17:14 -0800 (PST) Date: Thu, 31 Jan 2002 23:17:14 -0800 From: "H . J . Lu" To: Hiroyuki Machida Cc: macro@ds2.pg.gda.pl, libc-alpha@sources.redhat.com, linux-mips@oss.sgi.com Subject: Re: PATCH: Fix ll/sc for mips Message-ID: <20020131231714.E32690@lucon.org> References: <20020131123547.A22759@lucon.org> <20020131144100.A24634@lucon.org> <20020201.123523.50041631.machida@sm.sony.co.jp> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <20020201.123523.50041631.machida@sm.sony.co.jp>; from machida@sm.sony.co.jp on Fri, Feb 01, 2002 at 12:35:23PM +0900 Sender: owner-linux-mips@oss.sgi.com Precedence: bulk On Fri, Feb 01, 2002 at 12:35:23PM +0900, Hiroyuki Machida wrote: > > _test_and_set (int *p, int v) __THROW > > { > > int r, t; > > > > __asm__ __volatile__ > > (".set push\n\t" > > ".set noreorder\n" > > "1:\n\t" > > "ll %0,%3\n\t" > > "beq %0,%4,2f\n\t" > > "move %1,%4\n\t" > > "sc %1,%2\n\t" > > "beqz %1,1b\n\t" > > "nop\n" > > "2:\n\t" > > ".set pop" > > : "=&r" (r), "=&r" (t), "=m" (*p) > > : "m" (*p), "r" (v) > > : "memory"); > > > > return r; > > } > > Gas will fill delay slots. Same object codes will be produced, so I > think you don't have to do that by hand. It will make the code more readable. We don't have to guess what the assembler will do. H.J. From owner-linux-mips@oss.sgi.com Fri Feb 1 01:55:44 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g119ti127581 for linux-mips-outgoing; Fri, 1 Feb 2002 01:55:44 -0800 Received: from oval.algor.co.uk (root@oval.algor.co.uk [62.254.210.250]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g119tYd27576 for ; Fri, 1 Feb 2002 01:55:35 -0800 Received: from mudchute.algor.co.uk (dom@mudchute.algor.co.uk [62.254.210.251]) by oval.algor.co.uk (8.11.6/8.10.1) with ESMTP id g118tEa10310; Fri, 1 Feb 2002 08:55:14 GMT Received: (from dom@localhost) by mudchute.algor.co.uk (8.8.5/8.8.5) id IAA00394; Fri, 1 Feb 2002 08:55:10 GMT Date: Fri, 1 Feb 2002 08:55:10 GMT Message-Id: <200202010855.IAA00394@mudchute.algor.co.uk> From: Dominic Sweetman MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit To: Jason Gunthorpe Cc: "Maciej W. Rozycki" , linux-mips@fnet.fr, linux-mips@oss.sgi.com Subject: Re: [patch] linux 2.4.17: An mb() rework In-Reply-To: References: X-Mailer: VM 6.34 under 19.16 "Lille" XEmacs Lucid Sender: owner-linux-mips@oss.sgi.com Precedence: bulk > > > No, a sync will still empty the write buffer. It may halt the > > >pipeline for many (~80 perhaps) cycles while posted write data is > > >dumped to the system controller. > > > > Then it's an implementation bug. For a CPU in the UP mode "sync" > > is only defined to prevent write and read reordering -- there is > > nothing about flushing. > > Did some more research + phoning.. RM7K is definately documented to dump > the write buffer on 'sync'. The RM7000 sync does more than is required by the ISA. However, since the write-buffer is not part of the architecture, this is not a bug. Though it might well be held to be undesirable. And there has to be *some* way to force the write buffer to empty, and this is cheaper than the standard alternative of an uncached read. I believe the RM7000 write buffer can hold one pending cache-line writeback or up to four uncached writes. Emptying the write buffer can only occupy more than a handful of cycles when the system controller is already backed-up with pending writes; under those circumstances the system was probably about to stall anyway, so I wouldn't be too worried about the performance implications of a 'sync'. > The RM7K guide even has an example (7.8.5) > where it implies that sync also forces a write back of any dirty cache > lines - gah! (Hard to belive though..) There's not a word of truth in that (there just aren't the right wires in the hardware to make that possible). But I think what it means is that it stops the CPU until a pending cache line write back is complete. It's hard to see why that would be useful, but since it uses the same write buffer hardware it's easy to see why it would happen. Of course (as everyone has been piling in and pointing out) the real problems are: 1. The MIPS people who invented 'sync' had a much more sophisticated understanding of read/write behaviour than is common in those who support, document and program uniprocessor "embedded" CPUs; so there's lots of scope for misunderstanding 'sync'. 2. When write-posting bites you, it's usually not in the CPU but somewhere further down the system. You should never believe a write has actually arrived at the device you sent it to, until you see the device itself change state... And a plea: the word "flush" in Linux is already abused for caches (where it means invalidate, write back, or possibly both). That's enough trouble: if you also "flush" write buffers, your confusion will be complete. Maybe we should leave "flush" to plumbers and use more precise terminology for computers... -- Dominic Sweetman, Algorithmics Ltd The Fruit Farm, Ely Road, Chittering, CAMBS CB5 9PH, ENGLAND phone: +44 1223 706200 / fax: +44 1223 706250 / direct: +44 1223 706205 http://www.algor.co.uk From owner-linux-mips@oss.sgi.com Fri Feb 1 02:53:15 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g11ArFv29146 for linux-mips-outgoing; Fri, 1 Feb 2002 02:53:15 -0800 Received: from mx.mips.com (mx.mips.com [206.31.31.226]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g11Ar6d29143 for ; Fri, 1 Feb 2002 02:53:06 -0800 Received: from newman.mips.com (ns-dmz [206.31.31.225]) by mx.mips.com (8.9.3/8.9.0) with ESMTP id BAA10156; Fri, 1 Feb 2002 01:52:50 -0800 (PST) Received: from copfs01.mips.com (copfs01 [192.168.205.101]) by newman.mips.com (8.9.3/8.9.0) with ESMTP id BAA03140; Fri, 1 Feb 2002 01:52:44 -0800 (PST) Received: from copsun18.mips.com (copsun18 [192.168.205.28]) by copfs01.mips.com (8.11.4/8.9.0) with ESMTP id g119qKA19597; Fri, 1 Feb 2002 10:52:20 +0100 (MET) From: Hartvig Ekner Received: (from hartvige@localhost) by copsun18.mips.com (8.9.1/8.9.0) id KAA23996; Fri, 1 Feb 2002 10:52:42 +0100 (MET) Message-Id: <200202010952.KAA23996@copsun18.mips.com> Subject: Re: [patch] linux 2.4.17: An mb() rework To: jgg@debian.org Date: Fri, 1 Feb 2002 10:52:42 +0100 (MET) Cc: macro@ds2.pg.gda.pl (Maciej W. Rozycki), linux-mips@fnet.fr, linux-mips@oss.sgi.com In-Reply-To: from "Jason Gunthorpe" at Jan 31, 2002 11:44:30 PM X-Mailer: ELM [version 2.5 PL1] MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-linux-mips@oss.sgi.com Precedence: bulk Jason Gunthorpe writes: > > > On Thu, 31 Jan 2002, Maciej W. Rozycki wrote: > > > Hmm, wmb() is pretty clearly defined. The current implementation does > > not enforce strict ordering and is thus incorrect. Note that the R4400 > > manual explicitly states a cached write can bypass an uncached one, hence > > the CPU may exploit weak ordering under certain circumstances. The "sync" > > instruction was specifically defined to avoid such a risk. > > Yes, you are correct. I suppose *mb() must also work correctly with the > cache flush macros - didn't think about that one! > > I'm afraid I don't have any manuals for any of the MIPS chips just 3rd > party ones SB1, RM7K and SR71000 - which is why I have some many > odd questions. :> > > > > No, a sync will still empty the write buffer. It may halt the pipeline for > > > many (~80 perhaps) cycles while posted write data is dumped to the system > > > controller. > > > > Then it's an implementation bug. For a CPU in the UP mode "sync" is only > > defined to prevent write and read reordering -- there is nothing about > > flushing. Not quite. Extract from the MIPS32 Architecture Reference Manual (available on www.mips.com, documentation section): SYNC Purpose: To order loads and stores. Description: * SYNC affects only uncached and cached coherent loads and stores. The loads and stores that occur before the SYNC must be completed before the loads and stores after the SYNC are allowed to start. * Loads are completed when the destination register is written. Stores are completed when the stored value is visible to every other processor in the system. * SYNC is required, potentially in conjunction with SSNOP, to guarantee that memory reference results are visible across operating mode changes. For example, a SYNC is required on some implementations on entry to and exit from Debug Mode to guarantee that memory affects are handled correctly. Detailed Description: * When the stype field has a value of zero, every synchronizable load and store that occurs in the instruction stream before the SYNC instruction must be globally performed before any synchronizable load or store that occurs after the SYNC can be performed, with respect to any other processor or coherent I/O module. * SYNC does not guarantee the order in which instruction fetches are performed. The stype values 1-31 are reserved; they produce the same result as the value zero. ----------- end of extract The interesting one is the second-last bullet, and where the synchronization point lies. All the cores from MIPS technologies provide the means through lines and/or signalling on the bus interface to move the synchronization point outside the processor. That is, without doing anything additional, the processor itself will empty all writebuffers and present the writes on the bus interface before any bus transaction of an instruction following the sync will appear on the bus interface. Through the use of the additional signalling mentioned above, the system logic can choose to delay even more, thus moving the synchronization point further out. /Hartvig -- _ _ _____ ____ Hartvig Ekner Mailto:hartvige@mips.com |\ /| | |____)(____ Direct: +45 4486 5503 | \/ | | | _____) MIPS Denmark Switch: +45 4486 5555 T E C H N O L O G I E S http://www.mips.com Fax...: +45 4486 5556 From owner-linux-mips@oss.sgi.com Fri Feb 1 03:51:35 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g11BpZg30136 for linux-mips-outgoing; Fri, 1 Feb 2002 03:51:35 -0800 Received: from Cantor.suse.de (ns.suse.de [213.95.15.193]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g11BpSd30131 for ; Fri, 1 Feb 2002 03:51:29 -0800 Received: from Hermes.suse.de (Hermes.suse.de [213.95.15.136]) by Cantor.suse.de (Postfix) with ESMTP id 2BD051EE67; Fri, 1 Feb 2002 11:49:43 +0100 (MET) X-Authentication-Warning: sykes.suse.de: schwab set sender to schwab@suse.de using -f To: Hiroyuki Machida Cc: kaz@ashi.footprints.net, hjl@lucon.org, macro@ds2.pg.gda.pl, libc-alpha@sources.redhat.com, linux-mips@oss.sgi.com Subject: Re: [libc-alpha] Re: PATCH: Fix ll/sc for mips References: <20020201.123523.50041631.machida@sm.sony.co.jp> <20020201.135903.123568420.machida@sm.sony.co.jp> X-Yow: .. I think I'd better go back to my DESK and toy with a few common MISAPPREHENSIONS... From: Andreas Schwab Date: Fri, 01 Feb 2002 11:49:22 +0100 In-Reply-To: <20020201.135903.123568420.machida@sm.sony.co.jp> (Hiroyuki Machida's message of "Fri, 01 Feb 2002 13:59:03 +0900 (JST)") Message-ID: Lines: 38 User-Agent: Gnus/5.090005 (Oort Gnus v0.05) Emacs/21.2.50 (ia64-suse-linux) MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Sender: owner-linux-mips@oss.sgi.com Precedence: bulk Hiroyuki Machida writes: |> From: Kaz Kylheku |> Subject: Re: [libc-alpha] Re: PATCH: Fix ll/sc for mips |> Date: Thu, 31 Jan 2002 20:02:25 -0800 (PST) |> |> > On Fri, 1 Feb 2002, Hiroyuki Machida wrote: |> > > Please note that "sc" may fail even if nobody write the |> > > variable. (See P.211 "8.4.2 Load-Linked/Sotre-Conditional" of "See |> > > MIPS RUN" for more detail.) |> > > So, after your patch applied, compare_and_swap() may fail, even if |> > > *p is equal to oldval. |> > |> > I can't think of anything that will break because of this, as long |> > as the compare_and_swap eventually succeeds on some subsequent trial. |> > If the atomic operation has to abort for some reason other than *p being |> > unequal to oldval, that should be cool. |> |> I mean that this patch breaks the spec of compare_and_swap(). |> |> In most case, this patch may works as Kaz said. If this patch have |> no side-effect to any application, it's ok to apply the patch. But |> we can't know how to use compare_and_swap() in all aplications in a |> whole world. So we have to follow the spec. There is no way to find out anything about intermediate values of *p when compare_and_swap returns zero. The value of *p can change anytime, even if it only was different from oldval just at the time compare_and_swap did the comparison. So there is zero chance that a spurious failure of compare_and_swap breaks anything. Andreas. -- Andreas Schwab, SuSE Labs, schwab@suse.de SuSE GmbH, Deutschherrnstr. 15-19, D-90429 Nürnberg Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5 "And now for something completely different." From owner-linux-mips@oss.sgi.com Fri Feb 1 04:13:05 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g11CD5A00414 for linux-mips-outgoing; Fri, 1 Feb 2002 04:13:05 -0800 Received: from ns6.sony.co.jp (NS6.Sony.CO.JP [146.215.0.32]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g11CCrd00410 for ; Fri, 1 Feb 2002 04:12:53 -0800 Received: from mail2.sony.co.jp (mail2.sony.co.jp [43.0.1.202]) by ns6.sony.co.jp (R8/Sony) with ESMTP id g11BChW17024; Fri, 1 Feb 2002 20:12:43 +0900 (JST) Received: from mail2.sony.co.jp (localhost [127.0.0.1]) by mail2.sony.co.jp (R8) with ESMTP id g11BCgH02200; Fri, 1 Feb 2002 20:12:42 +0900 (JST) Received: from smail1.sm.sony.co.jp (smail1.sm.sony.co.jp [43.11.253.1]) by mail2.sony.co.jp (R8) with ESMTP id g11BCfA02180; Fri, 1 Feb 2002 20:12:41 +0900 (JST) Received: from imail.sm.sony.co.jp (imail.sm.sony.co.jp [43.2.217.16]) by smail1.sm.sony.co.jp (8.8.8/3.6W) with ESMTP id UAA24352; Fri, 1 Feb 2002 20:17:20 +0900 (JST) Received: from mach0.sm.sony.co.jp (mach0.sm.sony.co.jp [43.2.226.27]) by imail.sm.sony.co.jp (8.9.3+3.2W/3.7W) with ESMTP id UAA04105; Fri, 1 Feb 2002 20:12:40 +0900 (JST) Received: from localhost by mach0.sm.sony.co.jp (8.11.0/8.11.0) with ESMTP id g11BCeJ10159; Fri, 1 Feb 2002 20:12:40 +0900 (JST) Date: Fri, 01 Feb 2002 20:12:40 +0900 (JST) Message-Id: <20020201.201240.103027706.machida@sm.sony.co.jp> To: hjl@lucon.org Cc: kaz@ashi.footprints.net, macro@ds2.pg.gda.pl, libc-alpha@sources.redhat.com, linux-mips@oss.sgi.com Subject: Re: [libc-alpha] Re: PATCH: Fix ll/sc for mips From: Hiroyuki Machida In-Reply-To: <20020131230050.C32690@lucon.org> References: <20020201.135903.123568420.machida@sm.sony.co.jp> <20020131230050.C32690@lucon.org> X-Mailer: Mew version 2.1.51 on Emacs 20.7 / Mule 4.0 (HANANOEN) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-linux-mips@oss.sgi.com Precedence: bulk From: "H . J . Lu" Subject: Re: [libc-alpha] Re: PATCH: Fix ll/sc for mips Date: Thu, 31 Jan 2002 23:00:50 -0800 > On Fri, Feb 01, 2002 at 01:59:03PM +0900, Hiroyuki Machida wrote: > > > > From: Kaz Kylheku > > Subject: Re: [libc-alpha] Re: PATCH: Fix ll/sc for mips > > Date: Thu, 31 Jan 2002 20:02:25 -0800 (PST) > > > > > On Fri, 1 Feb 2002, Hiroyuki Machida wrote: > > > > Please note that "sc" may fail even if nobody write the > > > > variable. (See P.211 "8.4.2 Load-Linked/Sotre-Conditional" of "See > > > > MIPS RUN" for more detail.) > > > > So, after your patch applied, compare_and_swap() may fail, even if > > > > *p is equal to oldval. > > > > > > I can't think of anything that will break because of this, as long > > > as the compare_and_swap eventually succeeds on some subsequent trial. > > > If the atomic operation has to abort for some reason other than *p being > > > unequal to oldval, that should be cool. > > > > I mean that this patch breaks the spec of compare_and_swap(). > > In most case, this patch may works as Kaz said. If this patch have > > no side-effect to any application, it's ok to apply the patch. But > > we can't know how to use compare_and_swap() in all aplications in a > > whole world. So we have to follow the spec. > > > > Please note that the old compare_and_swap is broken. If you use > compare_and_swap to check if *p == oldval, my patch doesn't help > you. But if you use it to swap old/new, my patch works fine. But I > don't think you can use it check if *p == oldval since *p can change > at any time. It is the same as simply using "*p == oldval". I don't > see my patch should break any sane applications. > > > H.J. > I know the orinal compare_and_swap() is bad, and I believe the spec of compare_and_swap() as below; compare_and_swap(p, oldval, newval) { retval = 0; begin_atomic if (*p==oldval) { *p = newval; retval = 1; } end_atomic return retval; } So, compare_and_swap() should be ... __compare_and_swap (a0 long int oldval, long int newval) a0: *p a1: oldval a2: newval v0: return value .set noreorder retry: ll v0, (a0) bne v0, a1 move v0, zero move v0, a2 sc v0, (a0) beqz v0, retry nop j ra But, with your patch ... .set noreorder ll t0, (a0) bne t0, a1 move v0, zero move v0, a sc v0, (a0) j ra In this way, compare_and_swap() was changed as compare_and_swap(p, oldval, newval) { retval = 0; begin_atomic if (*p==oldval) { if "sc" was failed goto out; *p = newval; retval = 1; } out: end_atomic return retval; } --- Hiroyuki Machida Sony Corp. From owner-linux-mips@oss.sgi.com Fri Feb 1 04:24:01 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g11CO1P00719 for linux-mips-outgoing; Fri, 1 Feb 2002 04:24:01 -0800 Received: from desire.geoffk.org (12-234-190-114.client.attbi.com [12.234.190.114]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g11CNwd00716 for ; Fri, 1 Feb 2002 04:23:58 -0800 Received: (from geoffk@localhost) by desire.geoffk.org (8.11.6/8.11.6) id g11BNhg01794; Fri, 1 Feb 2002 03:23:43 -0800 Date: Fri, 1 Feb 2002 03:23:43 -0800 From: Geoff Keating Message-Id: <200202011123.g11BNhg01794@desire.geoffk.org> To: schwab@suse.de CC: machida@sm.sony.co.jp, kaz@ashi.footprints.net, hjl@lucon.org, macro@ds2.pg.gda.pl, libc-alpha@sources.redhat.com, linux-mips@oss.sgi.com In-reply-to: (message from Andreas Schwab on Fri, 01 Feb 2002 11:49:22 +0100) Subject: Re: [libc-alpha] Re: PATCH: Fix ll/sc for mips Reply-to: Geoff Keating References: <20020201.123523.50041631.machida@sm.sony.co.jp> <20020201.135903.123568420.machida@sm.sony.co.jp> Sender: owner-linux-mips@oss.sgi.com Precedence: bulk > From: Andreas Schwab > Date: Fri, 01 Feb 2002 11:49:22 +0100 > There is no way to find out anything about intermediate values of *p when > compare_and_swap returns zero. The value of *p can change anytime, even > if it only was different from oldval just at the time compare_and_swap did > the comparison. So there is zero chance that a spurious failure of > compare_and_swap breaks anything. Something to watch out for, though, is livelock. Consider the situation in which two processors are competing for a cache line, and both only win at the 'wrong' time: when computing a new value to be passed to compare_and_swap rather than when actually trying to perform the compare_and_swap. This is why on powerpc the loop is coded in the asm statement. -- - Geoffrey Keating From owner-linux-mips@oss.sgi.com Fri Feb 1 04:46:13 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g11CkDj01132 for linux-mips-outgoing; Fri, 1 Feb 2002 04:46:13 -0800 Received: from delta.ds2.pg.gda.pl (macro@delta.ds2.pg.gda.pl [213.192.72.1]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g11Ck7d01129 for ; Fri, 1 Feb 2002 04:46:08 -0800 Received: from localhost by delta.ds2.pg.gda.pl (8.9.3/8.9.3) with SMTP id MAA26518; Fri, 1 Feb 2002 12:45:02 +0100 (MET) Date: Fri, 1 Feb 2002 12:45:02 +0100 (MET) From: "Maciej W. Rozycki" To: "H . J . Lu" cc: Hiroyuki Machida , libc-alpha@sources.redhat.com, linux-mips@oss.sgi.com Subject: Re: PATCH: Fix ll/sc for mips In-Reply-To: <20020131231714.E32690@lucon.org> Message-ID: Organization: Technical University of Gdansk MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-linux-mips@oss.sgi.com Precedence: bulk On Thu, 31 Jan 2002, H . J . Lu wrote: > > Gas will fill delay slots. Same object codes will be produced, so I > > think you don't have to do that by hand. > > It will make the code more readable. We don't have to guess what > the assembler will do. But you lose a chance for something useful being reordered to the slot. That might not necessarily be a "nop". Please don't forget of indents anyway. -- + Maciej W. Rozycki, Technical University of Gdansk, Poland + +--------------------------------------------------------------+ + e-mail: macro@ds2.pg.gda.pl, PGP key available + From owner-linux-mips@oss.sgi.com Fri Feb 1 04:51:14 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g11CpEF01298 for linux-mips-outgoing; Fri, 1 Feb 2002 04:51:14 -0800 Received: from delta.ds2.pg.gda.pl (macro@delta.ds2.pg.gda.pl [213.192.72.1]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g11CpBd01295 for ; Fri, 1 Feb 2002 04:51:11 -0800 Received: from localhost by delta.ds2.pg.gda.pl (8.9.3/8.9.3) with SMTP id MAA26608; Fri, 1 Feb 2002 12:50:48 +0100 (MET) Date: Fri, 1 Feb 2002 12:50:48 +0100 (MET) From: "Maciej W. Rozycki" To: Hiroyuki Machida cc: hjl@lucon.org, libc-alpha@sources.redhat.com, linux-mips@oss.sgi.com Subject: Re: PATCH: Fix ll/sc for mips In-Reply-To: <20020201.123523.50041631.machida@sm.sony.co.jp> Message-ID: Organization: Technical University of Gdansk MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-linux-mips@oss.sgi.com Precedence: bulk On Fri, 1 Feb 2002, Hiroyuki Machida wrote: > > It will fail if *p is not same as oldval. > > Please note that "sc" may fail even if nobody write the > variable. (See P.211 "8.4.2 Load-Linked/Sotre-Conditional" of "See > MIPS RUN" for more detail.) > So, after your patch applied, compare_and_swap() may fail, even if > *p is equal to oldval. That's exactly what I meant -- "sc" may fail to execute the store, while "cmpxchgl" may not. -- + Maciej W. Rozycki, Technical University of Gdansk, Poland + +--------------------------------------------------------------+ + e-mail: macro@ds2.pg.gda.pl, PGP key available + From owner-linux-mips@oss.sgi.com Fri Feb 1 05:02:44 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g11D2iV01606 for linux-mips-outgoing; Fri, 1 Feb 2002 05:02:44 -0800 Received: from delta.ds2.pg.gda.pl (delta.ds2.pg.gda.pl [213.192.72.1]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g11D2ed01603 for ; Fri, 1 Feb 2002 05:02:40 -0800 Received: from localhost by delta.ds2.pg.gda.pl (8.9.3/8.9.3) with SMTP id NAA27210; Fri, 1 Feb 2002 13:01:57 +0100 (MET) Date: Fri, 1 Feb 2002 13:01:57 +0100 (MET) From: "Maciej W. Rozycki" To: Jason Gunthorpe cc: linux-mips@fnet.fr, linux-mips@oss.sgi.com Subject: Re: [patch] linux 2.4.17: An mb() rework In-Reply-To: Message-ID: Organization: Technical University of Gdansk MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-linux-mips@oss.sgi.com Precedence: bulk On Thu, 31 Jan 2002, Jason Gunthorpe wrote: > I'm afraid I don't have any manuals for any of the MIPS chips just 3rd > party ones SB1, RM7K and SR71000 - which is why I have some many > odd questions. :> Please feel free to grab a few from 'http://www.mips.com/Documentation/' and 'http://www.mips.com/declassified/'. ;-) I have a few excellent IDT manuals on their original CD-ROM as well. If they can't be downloaded anymore, I may put them online at my site. > Did some more research + phoning.. RM7K is definately documented to dump > the write buffer on 'sync'. The RM7K guide even has an example (7.8.5) > where it implies that sync also forces a write back of any dirty cache > lines - gah! (Hard to belive though..) If RM7K is always strongly ordered, I may code a workaround. -- + Maciej W. Rozycki, Technical University of Gdansk, Poland + +--------------------------------------------------------------+ + e-mail: macro@ds2.pg.gda.pl, PGP key available + From owner-linux-mips@oss.sgi.com Fri Feb 1 05:05:15 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g11D5Fg01709 for linux-mips-outgoing; Fri, 1 Feb 2002 05:05:15 -0800 Received: from delta.ds2.pg.gda.pl (macro@delta.ds2.pg.gda.pl [213.192.72.1]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g11D5Bd01706 for ; Fri, 1 Feb 2002 05:05:12 -0800 Received: from localhost by delta.ds2.pg.gda.pl (8.9.3/8.9.3) with SMTP id NAA27319; Fri, 1 Feb 2002 13:04:24 +0100 (MET) Date: Fri, 1 Feb 2002 13:04:23 +0100 (MET) From: "Maciej W. Rozycki" To: Dominic Sweetman cc: Jason Gunthorpe , linux-mips@fnet.fr, linux-mips@oss.sgi.com Subject: Re: [patch] linux 2.4.17: An mb() rework In-Reply-To: <200202010855.IAA00394@mudchute.algor.co.uk> Message-ID: Organization: Technical University of Gdansk MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-linux-mips@oss.sgi.com Precedence: bulk On Fri, 1 Feb 2002, Dominic Sweetman wrote: > And a plea: the word "flush" in Linux is already abused for caches > (where it means invalidate, write back, or possibly both). That's > enough trouble: if you also "flush" write buffers, your confusion will > be complete. Maybe we should leave "flush" to plumbers and use more > precise terminology for computers... Too bad the original name for the function is wbflush() already... At least IDT uses it in their docs. -- + Maciej W. Rozycki, Technical University of Gdansk, Poland + +--------------------------------------------------------------+ + e-mail: macro@ds2.pg.gda.pl, PGP key available + From owner-linux-mips@oss.sgi.com Fri Feb 1 05:28:44 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g11DSif02116 for linux-mips-outgoing; Fri, 1 Feb 2002 05:28:44 -0800 Received: from delta.ds2.pg.gda.pl (macro@delta.ds2.pg.gda.pl [213.192.72.1]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g11DSad02105 for ; Fri, 1 Feb 2002 05:28:36 -0800 Received: from localhost by delta.ds2.pg.gda.pl (8.9.3/8.9.3) with SMTP id NAA27942; Fri, 1 Feb 2002 13:27:42 +0100 (MET) Date: Fri, 1 Feb 2002 13:27:42 +0100 (MET) From: "Maciej W. Rozycki" To: Alan Cox cc: jgg@debian.org, linux-mips@fnet.fr, linux-mips@oss.sgi.com Subject: Re: [patch] linux 2.4.17: An mb() rework In-Reply-To: Message-ID: Organization: Technical University of Gdansk MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-linux-mips@oss.sgi.com Precedence: bulk On Thu, 31 Jan 2002, Alan Cox wrote: > The x86 behaviour forced as I understand it is > > barrier() - compiler level store barrier > rmb() - read barrier to bus/DMA level > [no operation] > wmb() - write barrier to bus/DMA level > [synchronizing instruction sequence > of locked add of 0 to stack top] > > (mb and wmb as names come from Alpha so I guess its definitive 8)) Well, after looking at the Alpha Architecture Handbook I see "mb" and "wmb" are pure ordering barriers -- any transactions at the CPU bus (pins) may still be deferred or prefetched (architecturally -- can't comment on specific chips). So after all, maybe all the macros should be purely "sync" for MIPS ("" for MIPS I, and mb() equal to wbflush() for R3220 and similar setups) and anything that wants to see all writes actually committed should use wbflush(), which would be defined as "mb(); uncached_read();" (or in a system-specific way, for R3220, etc.)? The i386 implementation seems stronger than it should be, but that's probably because of the limited choice available. Any thoughts? > It does not enforce PCI posting. Also your spurious interrupt case is > wrong for other horrible reasons. Interrupt delivery must never be > assumed to be synchronous in a portable driver. (In fact you'll see async > irq delivery on an X86) For interrupts arriving to an interrupt controller -- agreed. But we don't generally expect a spurious interrupt from a line that was already masked at the controller level. In other words mask_and_ack() must undertake any means possible, to assure the addressed controller received the new mask. If an interrupt passes by ocassionally anyway, then it's not fatal, i.e. we can handle it, but it shouldn't be a rule (i.e. receiving as many spurious interrupts as real ones). Am I right? Maciej -- + Maciej W. Rozycki, Technical University of Gdansk, Poland + +--------------------------------------------------------------+ + e-mail: macro@ds2.pg.gda.pl, PGP key available + From owner-linux-mips@oss.sgi.com Fri Feb 1 05:47:05 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g11Dl5R03600 for linux-mips-outgoing; Fri, 1 Feb 2002 05:47:05 -0800 Received: from gandalf.physik.uni-konstanz.de (gandalf.physik.uni-konstanz.de [134.34.144.69]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g11Dl2d03597 for ; Fri, 1 Feb 2002 05:47:02 -0800 Received: from agx by gandalf.physik.uni-konstanz.de with local (Exim 3.12 #1 (Debian)) id 16Wd5m-000695-00; Fri, 01 Feb 2002 13:46:58 +0100 Date: Fri, 1 Feb 2002 13:46:06 +0100 From: Guido Guenther To: George Gensure Cc: linux-mips@lists.debian.org Subject: Re: Newport XZ Message-ID: <20020201134606.A22880@gandalf.physik.uni-konstanz.de> References: <20020131111144.A14922@gandalf.physik.uni-konstanz.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: ; from werkt@csh.rit.edu on Thu, Jan 31, 2002 at 03:43:04PM -0500 Sender: owner-linux-mips@oss.sgi.com Precedence: bulk On Thu, Jan 31, 2002 at 03:43:04PM -0500, George Gensure wrote: > It's definitely not a dual head board, however, attached to the sgi bus > (s-bus?) these two cards are stacked on top of one another. The top one > has the display adapter. I only say it is a XZ because of a hardware site GIO Bus. You misunderstood me here. I'm not taling about two video outs on one card. I actually ment: http://www.reputable.com/indytech.html#DualHead This "dual head graphics option board"(as it is called there) looks very much like a XL. Is that what you have? > that I found that showed all the different Newport cards, and this was the > only one that matched it. I don't have a problem doing the serial (found > a cord), but I looked at the kernel source for the graphics and gconsole > drivers, and it looked like they work now by some dark black magic. There > is no probing of the card of any kind, and even the code that looks as > though it might be able to run on more than one machine has been #if 0 -ed > out. Would only the base address for the XZ be different, or would it be > a completely different arrangement for the card as opposed to the XLs? GIO bus probing is being worked at. The current "probing" is crap and let's an I2 halt immediately with a bus error. As I said before: if both of these cards are XL(aka newport, although the "lower" one might be a slight variation to allow for the daughter board) and not XZ(aka fullhouse) you might have chances to get this working by only adjusting the base addresses(the likely ones are in include/video/newport.h). -- Guido From owner-linux-mips@oss.sgi.com Fri Feb 1 06:46:18 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g11EkI204723 for linux-mips-outgoing; Fri, 1 Feb 2002 06:46:18 -0800 Received: from outboundx.mv.meer.net (outboundx.mv.meer.net [209.157.152.12]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g11EkCd04719 for ; Fri, 1 Feb 2002 06:46:12 -0800 Received: from meer.meer.net (mail.meer.net [209.157.152.14]) by outboundx.mv.meer.net (8.11.6/8.11.6) with ESMTP id g11Dk7h90984; Fri, 1 Feb 2002 05:46:07 -0800 (PST) (envelope-from weasel@meer.net) Received: from localhost.meer.net (ptn-130.mv.meer.net [209.157.137.130]) by meer.meer.net (8.9.3/8.9.3/meer) with ESMTP id FAA4109180; Fri, 1 Feb 2002 05:45:20 -0800 (PST) To: binutils@sources.redhat.com, linux-mips@oss.sgi.com Subject: me vs gas mips64 relocation From: d p chang User-Agent: Gnus/5.0808 (Gnus v5.8.8) Emacs/20.7 Reply-To: weasel@cs.stanford.edu Date: 01 Feb 2002 05:45:19 -0800 Message-ID: Lines: 53 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Sender: owner-linux-mips@oss.sgi.com Precedence: bulk Hi there, I'm trying to figure out if i've just misconfigured something here or if there is a real problem in gas. I did some grovelling through the mailing list archives, but really am still catching up. Anyway, here at home i grabbed the current cvs binutils and configured (i thought successfully since I only checked the assembly before the final link and hadn't been looking at the reloc bits) it to cross compile from macos x to mips64-linux. It appeared to be successful but it wasn't until i had written the rest of my chipset startup logic that I noticed a problem. My test case looks like this: .text .comm my_test_global, 8, 8 LEAF(reloc_hi_test) ld t0, my_test_global ; my problem lui t0, %hi(my_test_global) ; works addiu t0, %lo(my_test_global) END(reloc_hi_test) .end i compile this w/ (i only just added all the verbosity flags). mips64-linux-gcc -I /Volumes/Homey/dpc/Devel/linux-2.4.17/include/asm/gcc -D__KERNEL__ -I/Volumes/Homey/dpc/Devel/linux-2.4.17/include -Wall -Wstrict-prototypes -Wno-trigraphs -O2 -fomit-frame-pointer -fno-strict-aliasing -fno-common -G 0 -mno-abicalls -fno-pic -Wa,--trap -pipe -mips4 -mmad -Wa,-march=r5231 -mlong64 -mgp64 -mfp64 -ffreestanding -mabi=n32 reloc.S -c -o reloc.o -Wa,-acdhls -v -Wa,-v -Wa,-O0 and I get this from objdump: reloc.o: file format elf32-tradbigmips Disassembly of section .text: 00000000 : 0: 3c0c0000 lui t0,0x0 4: 258c0000 addiu t0,t0,0 4: R_MIPS_LO16 my_test_global 8: 3c0c0000 lui t0,0x0 8: R_MIPS_HI16 my_test_global c: 258c0000 addiu t0,t0,0 c: R_MIPS_LO16 my_test_global Anyway, the missing R_MIPS_HI16 relocation at offset 0 is my problem. I had expected the two to generate the same code. am i mistaken, did i screw something up configuring, is this a bug, or something else? \p From owner-linux-mips@oss.sgi.com Fri Feb 1 07:09:09 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g11F99A05460 for linux-mips-outgoing; Fri, 1 Feb 2002 07:09:09 -0800 Received: from smtp2.libero.it (smtp2.libero.it [193.70.192.52]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g11F96d05449 for ; Fri, 1 Feb 2002 07:09:07 -0800 Received: from libero.it (193.70.192.44) by smtp2.libero.it (6.0.040) id 3C58404400135E7D; Fri, 1 Feb 2002 15:08:40 +0100 Date: Fri, 1 Feb 2002 15:08:40 +0100 Message-Id: Subject: =?iso-8859-1?Q?help_for_linux?= MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 From: "=?utf-8?Q?info@bbeuropean.com?=" To: brad@ltc.com Cc: linux-mips@oss.sgi.com X-XaM3-API-Version: 2.5 X-type: 0 X-SenderIP: 193.206.138.36 Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from base64 to 8bit by oss.sgi.com id g11F98d05454 Sender: owner-linux-mips@oss.sgi.com Precedence: bulk Installation mips linux to indy where is the readmy in the web site of sgi ?. http://www.bbeuropean.com http://www.spazio-formazione.it http://www.antigravity.it http://www.prestare.it Raffella tel 3476980419 preferibilmnet ore serali From owner-linux-mips@oss.sgi.com Fri Feb 1 10:40:55 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g11IetR15686 for linux-mips-outgoing; Fri, 1 Feb 2002 10:40:55 -0800 Received: from ocean.lucon.org (12-234-19-19.client.attbi.com [12.234.19.19]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g11IeSd15683 for ; Fri, 1 Feb 2002 10:40:28 -0800 Received: by ocean.lucon.org (Postfix, from userid 1000) id 78793125C3; Fri, 1 Feb 2002 09:40:25 -0800 (PST) Date: Fri, 1 Feb 2002 09:40:25 -0800 From: "H . J . Lu" To: "Maciej W. Rozycki" Cc: Hiroyuki Machida , libc-alpha@sources.redhat.com, linux-mips@oss.sgi.com Subject: Re: PATCH: Fix ll/sc for mips Message-ID: <20020201094025.A10392@lucon.org> References: <20020201.123523.50041631.machida@sm.sony.co.jp> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: ; from macro@ds2.pg.gda.pl on Fri, Feb 01, 2002 at 12:50:48PM +0100 Sender: owner-linux-mips@oss.sgi.com Precedence: bulk On Fri, Feb 01, 2002 at 12:50:48PM +0100, Maciej W. Rozycki wrote: > On Fri, 1 Feb 2002, Hiroyuki Machida wrote: > > > > It will fail if *p is not same as oldval. > > > > Please note that "sc" may fail even if nobody write the > > variable. (See P.211 "8.4.2 Load-Linked/Sotre-Conditional" of "See > > MIPS RUN" for more detail.) > > So, after your patch applied, compare_and_swap() may fail, even if > > *p is equal to oldval. > > That's exactly what I meant -- "sc" may fail to execute the store, while > "cmpxchgl" may not. > Here is the updated patch. H.J. --- 2002-01-31 H.J. Lu * sysdeps/mips/pspinlock.c (__pthread_spin_lock): Use a different register in the delayed slot. * sysdeps/mips/pt-machine.h (testandset): Call _test_and_set. (__compare_and_swap): Return 0 only when failed to compare. 2002-01-31 H.J. Lu * sysdeps/mips/atomicity.h (compare_and_swap): Return 0 only when failed to compare. * sysdeps/unix/sysv/linux/mips/sys/tas.h (_test_and_set): Fill the delay slot. --- glibc-2.2.4/linuxthreads/sysdeps/mips/pspinlock.c.llsc Thu Jan 31 10:49:37 2002 +++ glibc-2.2.4/linuxthreads/sysdeps/mips/pspinlock.c Thu Jan 31 10:49:37 2002 @@ -29,20 +29,21 @@ int __pthread_spin_lock (pthread_spinlock_t *lock) { - unsigned int tmp; + unsigned int tmp1, tmp2; asm volatile ("\t\t\t# spin_lock\n\t" - "1:\n\t" - "ll %1,%2\n\t" ".set push\n\t" - ".set noreorder\n\t" + ".set noreorder\n" + "1:\n\t" + "ll %1,%3\n\t" "bnez %1,1b\n\t" - " li %1,1\n\t" - ".set pop\n\t" - "sc %1,%0\n\t" - "beqz %1,1b" - : "=m" (*lock), "=&r" (tmp) + "li %2,1\n\t" + "sc %2,%0\n\t" + "beqz %2,1b\n\t" + "nop\n\t" + ".set pop" + : "=m" (*lock), "=&r" (tmp1), "=&r" (tmp2) : "m" (*lock) : "memory"); --- glibc-2.2.4/linuxthreads/sysdeps/mips/pt-machine.h.llsc Sat Dec 9 08:55:34 2000 +++ glibc-2.2.4/linuxthreads/sysdeps/mips/pt-machine.h Fri Feb 1 09:19:44 2002 @@ -33,41 +33,11 @@ /* Spinlock implementation; required. */ -#if (_MIPS_ISA >= _MIPS_ISA_MIPS2) - -PT_EI long int -testandset (int *spinlock) -{ - long int ret, temp; - - __asm__ __volatile__ - ("/* Inline spinlock test & set */\n\t" - "1:\n\t" - "ll %0,%3\n\t" - ".set push\n\t" - ".set noreorder\n\t" - "bnez %0,2f\n\t" - " li %1,1\n\t" - ".set pop\n\t" - "sc %1,%2\n\t" - "beqz %1,1b\n" - "2:\n\t" - "/* End spinlock test & set */" - : "=&r" (ret), "=&r" (temp), "=m" (*spinlock) - : "m" (*spinlock) - : "memory"); - - return ret; -} - -#else /* !(_MIPS_ISA >= _MIPS_ISA_MIPS2) */ - PT_EI long int testandset (int *spinlock) { return _test_and_set (spinlock, 1); } -#endif /* !(_MIPS_ISA >= _MIPS_ISA_MIPS2) */ /* Get some notion of the current stack. Need not be exactly the top @@ -84,22 +54,24 @@ register char * stack_pointer __asm__ (" PT_EI int __compare_and_swap (long int *p, long int oldval, long int newval) { - long int ret; + long int ret, temp; __asm__ __volatile__ - ("/* Inline compare & swap */\n\t" + ("/* Inline compare & swap */\n" "1:\n\t" - "ll %0,%4\n\t" - ".set push\n" + "ll %1,%5\n\t" + ".set push\n\t" ".set noreorder\n\t" - "bne %0,%2,2f\n\t" - " move %0,%3\n\t" - ".set pop\n\t" - "sc %0,%1\n\t" - "beqz %0,1b\n" + "bne %1,%3,2f\n\t" + "move %0,$0\n\t" + "move %0,%4\n\t" + "sc %0,%2\n\t" + "beqz %0,1b\n\t" + "nop\n\t" + ".set pop\n" "2:\n\t" "/* End compare & swap */" - : "=&r" (ret), "=m" (*p) + : "=&r" (ret), "=&r" (temp), "=m" (*p) : "r" (oldval), "r" (newval), "m" (*p) : "memory"); --- glibc-2.2.4/sysdeps/mips/atomicity.h.llsc Mon Jul 9 11:58:19 2001 +++ glibc-2.2.4/sysdeps/mips/atomicity.h Fri Feb 1 09:21:41 2002 @@ -32,12 +32,16 @@ exchange_and_add (volatile uint32_t *mem int result, tmp; __asm__ __volatile__ - ("/* Inline exchange & add */\n\t" + ("/* Inline exchange & add */\n" "1:\n\t" "ll %0,%3\n\t" "addu %1,%4,%0\n\t" "sc %1,%2\n\t" + ".set push\n\t" + ".set noreorder\n\t" "beqz %1,1b\n\t" + "nop\n\t" + ".set pop\n\t" "/* End exchange & add */" : "=&r"(result), "=&r"(tmp), "=m"(*mem) : "m" (*mem), "r"(val) @@ -53,12 +57,16 @@ atomic_add (volatile uint32_t *mem, int int result; __asm__ __volatile__ - ("/* Inline atomic add */\n\t" + ("/* Inline atomic add */\n" "1:\n\t" "ll %0,%2\n\t" "addu %0,%3,%0\n\t" "sc %0,%1\n\t" + ".set push\n\t" + ".set noreorder\n\t" "beqz %0,1b\n\t" + "nop\n\t" + ".set pop\n\t" "/* End atomic add */" : "=&r"(result), "=m"(*mem) : "m" (*mem), "r"(val) @@ -69,22 +77,24 @@ static inline int __attribute__ ((unused)) compare_and_swap (volatile long int *p, long int oldval, long int newval) { - long int ret; + long int ret, temp; __asm__ __volatile__ - ("/* Inline compare & swap */\n\t" + ("/* Inline compare & swap */\n" "1:\n\t" - "ll %0,%4\n\t" - ".set push\n" + "ll %1,%5\n\t" + ".set push\n\t" ".set noreorder\n\t" - "bne %0,%2,2f\n\t" - "move %0,%3\n\t" - ".set pop\n\t" - "sc %0,%1\n\t" - "beqz %0,1b\n" + "bne %1,%3,2f\n\t" + "move %0,$0\n\t" + "move %0,%4\n\t" + "sc %0,%2\n\t" + "beqz %0,1b\n\t" + "nop\n\t" + ".set pop\n" "2:\n\t" "/* End compare & swap */" - : "=&r" (ret), "=m" (*p) + : "=&r" (ret), "=&r" (temp), "=m" (*p) : "r" (oldval), "r" (newval), "m" (*p) : "memory"); --- glibc-2.2.4/sysdeps/unix/sysv/linux/mips/sys/tas.h.llsc Mon Jul 9 11:58:45 2001 +++ glibc-2.2.4/sysdeps/unix/sysv/linux/mips/sys/tas.h Thu Jan 31 10:49:37 2002 @@ -42,16 +42,17 @@ _test_and_set (int *p, int v) __THROW int r, t; __asm__ __volatile__ - ("1:\n\t" + (".set push\n\t" + ".set noreorder\n" + "1:\n\t" "ll %0,%3\n\t" - ".set push\n\t" - ".set noreorder\n\t" "beq %0,%4,2f\n\t" - " move %1,%4\n\t" - ".set pop\n\t" + "move %1,%4\n\t" "sc %1,%2\n\t" - "beqz %1,1b\n" - "2:\n" + "beqz %1,1b\n\t" + "nop\n" + "2:\n\t" + ".set pop" : "=&r" (r), "=&r" (t), "=m" (*p) : "m" (*p), "r" (v) : "memory"); From owner-linux-mips@oss.sgi.com Fri Feb 1 11:30:15 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g11JUFP16570 for linux-mips-outgoing; Fri, 1 Feb 2002 11:30:15 -0800 Received: from ocean.lucon.org (12-234-19-19.client.attbi.com [12.234.19.19]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g11JTkd16548 for ; Fri, 1 Feb 2002 11:29:46 -0800 Received: by ocean.lucon.org (Postfix, from userid 1000) id 4BEE5125C3; Fri, 1 Feb 2002 10:29:43 -0800 (PST) Date: Fri, 1 Feb 2002 10:29:43 -0800 From: "H . J . Lu" To: "Maciej W. Rozycki" Cc: Hiroyuki Machida , libc-alpha@sources.redhat.com, linux-mips@oss.sgi.com Subject: PATCH: Fix ll/sc for mips (take 3) Message-ID: <20020201102943.A11146@lucon.org> References: <20020131231714.E32690@lucon.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: ; from macro@ds2.pg.gda.pl on Fri, Feb 01, 2002 at 12:45:02PM +0100 Sender: owner-linux-mips@oss.sgi.com Precedence: bulk On Fri, Feb 01, 2002 at 12:45:02PM +0100, Maciej W. Rozycki wrote: > On Thu, 31 Jan 2002, H . J . Lu wrote: > > > > Gas will fill delay slots. Same object codes will be produced, so I > > > think you don't have to do that by hand. > > > > It will make the code more readable. We don't have to guess what > > the assembler will do. > > But you lose a chance for something useful being reordered to the slot. > That might not necessarily be a "nop". Please don't forget of indents > anyway. > Here is a new patch. I use branch likely to get rid of nops. Please tell me which indents I may have missed. Thanks. H.J. ---- 2002-02-01 H.J. Lu * sysdeps/mips/pspinlock.c (__pthread_spin_lock): Use a different register in the delayed slot. Use branch likely. * sysdeps/mips/pt-machine.h (testandset): Call _test_and_set. (__compare_and_swap): Return 0 only when failed to compare. Use branch likely. 2002-02-01 H.J. Lu * sysdeps/mips/atomicity.h (exchange_and_add): Use branch likely. (atomic_add): Likewise. (compare_and_swap): Return 0 only when failed to compare. Use branch likely. * sysdeps/unix/sysv/linux/mips/sys/tas.h (_test_and_set): Use branch likely. --- glibc-2.2.4/linuxthreads/sysdeps/mips/pspinlock.c.llsc Thu Jan 31 10:49:37 2002 +++ glibc-2.2.4/linuxthreads/sysdeps/mips/pspinlock.c Fri Feb 1 10:17:47 2002 @@ -29,20 +29,21 @@ int __pthread_spin_lock (pthread_spinlock_t *lock) { - unsigned int tmp; + unsigned int tmp1, tmp2; asm volatile ("\t\t\t# spin_lock\n\t" + "ll %1,%3\n" "1:\n\t" - "ll %1,%2\n\t" ".set push\n\t" ".set noreorder\n\t" "bnez %1,1b\n\t" - " li %1,1\n\t" - ".set pop\n\t" - "sc %1,%0\n\t" - "beqz %1,1b" - : "=m" (*lock), "=&r" (tmp) + "li %2,1\n\t" + "sc %2,%0\n\t" + "beqzl %2,1b\n\t" + "ll %1,%3\n\t" + ".set pop" + : "=m" (*lock), "=&r" (tmp1), "=&r" (tmp2) : "m" (*lock) : "memory"); --- glibc-2.2.4/linuxthreads/sysdeps/mips/pt-machine.h.llsc Sat Dec 9 08:55:34 2000 +++ glibc-2.2.4/linuxthreads/sysdeps/mips/pt-machine.h Fri Feb 1 10:14:18 2002 @@ -33,41 +33,11 @@ /* Spinlock implementation; required. */ -#if (_MIPS_ISA >= _MIPS_ISA_MIPS2) - -PT_EI long int -testandset (int *spinlock) -{ - long int ret, temp; - - __asm__ __volatile__ - ("/* Inline spinlock test & set */\n\t" - "1:\n\t" - "ll %0,%3\n\t" - ".set push\n\t" - ".set noreorder\n\t" - "bnez %0,2f\n\t" - " li %1,1\n\t" - ".set pop\n\t" - "sc %1,%2\n\t" - "beqz %1,1b\n" - "2:\n\t" - "/* End spinlock test & set */" - : "=&r" (ret), "=&r" (temp), "=m" (*spinlock) - : "m" (*spinlock) - : "memory"); - - return ret; -} - -#else /* !(_MIPS_ISA >= _MIPS_ISA_MIPS2) */ - PT_EI long int testandset (int *spinlock) { return _test_and_set (spinlock, 1); } -#endif /* !(_MIPS_ISA >= _MIPS_ISA_MIPS2) */ /* Get some notion of the current stack. Need not be exactly the top @@ -84,22 +54,24 @@ register char * stack_pointer __asm__ (" PT_EI int __compare_and_swap (long int *p, long int oldval, long int newval) { - long int ret; + long int ret, temp; __asm__ __volatile__ ("/* Inline compare & swap */\n\t" + "ll %1,%5\n" "1:\n\t" - "ll %0,%4\n\t" - ".set push\n" + ".set push\n\t" ".set noreorder\n\t" - "bne %0,%2,2f\n\t" - " move %0,%3\n\t" - ".set pop\n\t" - "sc %0,%1\n\t" - "beqz %0,1b\n" + "bne %1,%3,2f\n\t" + "move %0,$0\n\t" + "move %0,%4\n\t" + "sc %0,%2\n\t" + "beqzl %0,1b\n\t" + "ll %1,%5\n\t" + ".set pop\n" "2:\n\t" "/* End compare & swap */" - : "=&r" (ret), "=m" (*p) + : "=&r" (ret), "=&r" (temp), "=m" (*p) : "r" (oldval), "r" (newval), "m" (*p) : "memory"); --- glibc-2.2.4/sysdeps/mips/atomicity.h.llsc Mon Jul 9 11:58:19 2001 +++ glibc-2.2.4/sysdeps/mips/atomicity.h Fri Feb 1 09:55:05 2002 @@ -33,11 +33,15 @@ exchange_and_add (volatile uint32_t *mem __asm__ __volatile__ ("/* Inline exchange & add */\n\t" + "ll %0,%3\n" "1:\n\t" - "ll %0,%3\n\t" "addu %1,%4,%0\n\t" "sc %1,%2\n\t" - "beqz %1,1b\n\t" + ".set push\n\t" + ".set noreorder\n\t" + "beqzl %1,1b\n\t" + "ll %0,%3\n\t" + ".set pop\n\t" "/* End exchange & add */" : "=&r"(result), "=&r"(tmp), "=m"(*mem) : "m" (*mem), "r"(val) @@ -54,11 +58,15 @@ atomic_add (volatile uint32_t *mem, int __asm__ __volatile__ ("/* Inline atomic add */\n\t" + "ll %0,%2\n" "1:\n\t" - "ll %0,%2\n\t" "addu %0,%3,%0\n\t" "sc %0,%1\n\t" - "beqz %0,1b\n\t" + ".set push\n\t" + ".set noreorder\n\t" + "beqzl %0,1b\n\t" + "ll %0,%2\n\t" + ".set pop\n\t" "/* End atomic add */" : "=&r"(result), "=m"(*mem) : "m" (*mem), "r"(val) @@ -69,22 +77,24 @@ static inline int __attribute__ ((unused)) compare_and_swap (volatile long int *p, long int oldval, long int newval) { - long int ret; + long int ret, temp; __asm__ __volatile__ ("/* Inline compare & swap */\n\t" + "ll %1,%5\n" "1:\n\t" - "ll %0,%4\n\t" - ".set push\n" + ".set push\n\t" ".set noreorder\n\t" - "bne %0,%2,2f\n\t" - "move %0,%3\n\t" - ".set pop\n\t" - "sc %0,%1\n\t" - "beqz %0,1b\n" + "bne %1,%3,2f\n\t" + "move %0,$0\n\t" + "move %0,%4\n\t" + "sc %0,%2\n\t" + "beqzl %0,1b\n\t" + "ll %1,%5\n\t" + ".set pop\n" "2:\n\t" "/* End compare & swap */" - : "=&r" (ret), "=m" (*p) + : "=&r" (ret), "=&r" (temp), "=m" (*p) : "r" (oldval), "r" (newval), "m" (*p) : "memory"); --- glibc-2.2.4/sysdeps/unix/sysv/linux/mips/sys/tas.h.llsc Mon Jul 9 11:58:45 2001 +++ glibc-2.2.4/sysdeps/unix/sysv/linux/mips/sys/tas.h Fri Feb 1 09:56:47 2002 @@ -42,16 +42,19 @@ _test_and_set (int *p, int v) __THROW int r, t; __asm__ __volatile__ - ("1:\n\t" - "ll %0,%3\n\t" + ("/* Inline test and set */\n\t" + "ll %0,%3\n" + "1:\n\t" ".set push\n\t" ".set noreorder\n\t" "beq %0,%4,2f\n\t" - " move %1,%4\n\t" - ".set pop\n\t" + "move %1,%4\n\t" "sc %1,%2\n\t" - "beqz %1,1b\n" - "2:\n" + "beqzl %1,1b\n\t" + "ll %0,%3\n\t" + ".set pop\n" + "2:\n\t" + "/* End test and set */" : "=&r" (r), "=&r" (t), "=m" (*p) : "m" (*p), "r" (v) : "memory"); From owner-linux-mips@oss.sgi.com Fri Feb 1 12:57:19 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g11KvJr18080 for linux-mips-outgoing; Fri, 1 Feb 2002 12:57:19 -0800 Received: from sgi.com (sgi-too.SGI.COM [204.94.211.39]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g11KvFd18074 for ; Fri, 1 Feb 2002 12:57:15 -0800 Received: from orion.mvista.com (gateway-1237.mvista.com [12.44.186.158]) by sgi.com (980327.SGI.8.8.8-aspam/980304.SGI-aspam: SGI does not authorize the use of its proprietary systems or networks for unsolicited or bulk email from the Internet.) via ESMTP id LAA04454 for ; Fri, 1 Feb 2002 11:57:05 -0800 (PST) mail_from (jsun@orion.mvista.com) Received: (from jsun@localhost) by orion.mvista.com (8.9.3/8.9.3) id LAA18199; Fri, 1 Feb 2002 11:52:06 -0800 Date: Fri, 1 Feb 2002 11:52:06 -0800 From: Jun Sun To: linux-mips@oss.sgi.com Subject: gcc 3.x, -ansi and "static inline" Message-ID: <20020201115206.A18085@mvista.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i Sender: owner-linux-mips@oss.sgi.com Precedence: bulk We are trying to build userland apps with the newer kernel headers. Unexpected problems occur with the "static inline" declaration when "-ansi" option is used. Anybody else is having the problem? Also, what are the reasons for us to switch to "static inline" in the kernel header? Here is an example I am talking about: In 2.4.2, we have in bitops.h: extern __inline__ unsigned long ffz(unsigned long word) In 2.4.17, we have instead: static inline unsigned long ffz(unsigned long word) This problem seems only happening with gcc 3.x. I start to wonder whether we should fix kernel header. In some case, the fix seems to be not exposing to userland (by #ifdef __KERNEL__). In others, the fix might be using __inline__. However, I really like to know what was the original motivation to do such a change. BTW, the inclusion of "mipsregs.h" file in bitops.h seems unnecessary and caused a bunch of similar errors. Jun From owner-linux-mips@oss.sgi.com Fri Feb 1 13:53:24 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g11LrOg18966 for linux-mips-outgoing; Fri, 1 Feb 2002 13:53:24 -0800 Received: from outboundx.mv.meer.net (outboundx.mv.meer.net [209.157.152.12]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g11LrLd18960 for ; Fri, 1 Feb 2002 13:53:21 -0800 Received: from meer.meer.net (mail.meer.net [209.157.152.14]) by outboundx.mv.meer.net (8.11.6/8.11.6) with ESMTP id g11KrCh99062; Fri, 1 Feb 2002 12:53:12 -0800 (PST) (envelope-from weasel@meer.net) Received: from localhost.meer.net (bob.sonicblue.com [209.10.223.219]) by meer.meer.net (8.9.3/8.9.3/meer) with ESMTP id MAA4669480; Fri, 1 Feb 2002 12:52:59 -0800 (PST) To: binutils@sources.redhat.com, linux-mips@oss.sgi.com Subject: Re: me vs gas mips64 relocation References: Reply-To: weasel@cs.stanford.edu From: d p chang Date: 01 Feb 2002 12:52:59 -0800 In-Reply-To: Message-ID: Lines: 17 User-Agent: Gnus/5.0808 (Gnus v5.8.8) Emacs/20.7 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Sender: owner-linux-mips@oss.sgi.com Precedence: bulk d p chang writes: > i compile this w/ (i only just added all the verbosity flags). > > mips64-linux-gcc -I /Volumes/Homey/dpc/Devel/linux-2.4.17/include/asm/gcc -D__KERNEL__ -I/Volumes/Homey/dpc/Devel/linux-2.4.17/include -Wall -Wstrict-prototypes -Wno-trigraphs -O2 -fomit-frame-pointer -fno-strict-aliasing -fno-common -G 0 -mno-abicalls -fno-pic -Wa,--trap -pipe -mips4 -mmad -Wa,-march=r5231 -mlong64 -mgp64 -mfp64 -ffreestanding -mabi=n32 reloc.S -c -o reloc.o -Wa,-acdhls -v -Wa,-v -Wa,-O0 Looking at this some more I realize that my problem is probably that I'm lying to the compiler/assembler by claiming n32 and long64. We would like to have 64 bit registers available to us in user space, but enabling -mabi=64 gives an assertion in ld when it is trying to output relocations for a .pdr section. ideas? (other than for me to take the crack pipe out of my ass) \p --- I feel discomfort, therefore I am alive. --- Graham Greene From owner-linux-mips@oss.sgi.com Fri Feb 1 14:23:47 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g11MNlT19457 for linux-mips-outgoing; Fri, 1 Feb 2002 14:23:47 -0800 Received: from cygnus.com (runyon.sfbay.redhat.com [205.180.230.5] (may be forged)) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g11MNid19454 for ; Fri, 1 Feb 2002 14:23:44 -0800 Received: from localhost.localdomain (taarna.sfbay.redhat.com [205.180.230.102]) by runyon.cygnus.com (8.8.7-cygnus/8.8.7) with ESMTP id NAA10372; Fri, 1 Feb 2002 13:23:35 -0800 (PST) Subject: Re: me vs gas mips64 relocation From: Eric Christopher To: weasel@cs.stanford.edu Cc: binutils@sources.redhat.com, linux-mips@oss.sgi.com In-Reply-To: References: Content-Type: text/plain Content-Transfer-Encoding: 7bit X-Mailer: Evolution/1.0.2 Date: 01 Feb 2002 13:23:12 -0800 Message-Id: <1012598592.1689.33.camel@ghostwheel.cygnus.com> Mime-Version: 1.0 Sender: owner-linux-mips@oss.sgi.com Precedence: bulk > ideas? (other than for me to take the crack pipe out of my ass) You can try to help Thiemo Seufer finish n32 and n64 support in binutils... -eric -- I will not use abbrev. From owner-linux-mips@oss.sgi.com Fri Feb 1 14:41:57 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g11Mfvs19769 for linux-mips-outgoing; Fri, 1 Feb 2002 14:41:57 -0800 Received: from delta.ds2.pg.gda.pl (macro@delta.ds2.pg.gda.pl [213.192.72.1]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g11Mfsd19761 for ; Fri, 1 Feb 2002 14:41:54 -0800 Received: from localhost by delta.ds2.pg.gda.pl (8.9.3/8.9.3) with SMTP id WAA10068; Fri, 1 Feb 2002 22:41:17 +0100 (MET) Date: Fri, 1 Feb 2002 22:41:17 +0100 (MET) From: "Maciej W. Rozycki" To: "H . J . Lu" cc: Hiroyuki Machida , libc-alpha@sources.redhat.com, linux-mips@oss.sgi.com Subject: Re: PATCH: Fix ll/sc for mips In-Reply-To: <20020201094025.A10392@lucon.org> Message-ID: Organization: Technical University of Gdansk MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-linux-mips@oss.sgi.com Precedence: bulk On Fri, 1 Feb 2002, H . J . Lu wrote: > Here is the updated patch. Please do indent instructions in branch delay slots like it's done in other code (and here originally as well). It much improves the perception of what exactly is going on. -- + Maciej W. Rozycki, Technical University of Gdansk, Poland + +--------------------------------------------------------------+ + e-mail: macro@ds2.pg.gda.pl, PGP key available + From owner-linux-mips@oss.sgi.com Fri Feb 1 14:43:21 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g11MhL019866 for linux-mips-outgoing; Fri, 1 Feb 2002 14:43:21 -0800 Received: from host099.momenco.com (IDENT:root@www.momenco.com [64.169.228.99]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g11MhDd19853; Fri, 1 Feb 2002 14:43:13 -0800 Received: from beagle (beagle.internal.momenco.com [192.168.0.115]) by host099.momenco.com (8.11.6/8.11.6) with SMTP id g11LhAX12217; Fri, 1 Feb 2002 13:43:10 -0800 From: "Matthew Dharm" To: "Ralf Baechle" , "Carsten Langgaard" , Cc: Subject: RE: fsck fails on latest 2.4 kernel Date: Fri, 1 Feb 2002 13:43:10 -0800 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0) In-Reply-To: <20020116235232.A2760@dea.linux-mips.net> Importance: Normal X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400 Sender: owner-linux-mips@oss.sgi.com Precedence: bulk Hrm... Looks like I'm getting bitten by this bug also. I'm using H.J.'s toolchain RPMs for building the userspace applications, but the same tools as Carsten for building the kernel. I guess that combination doesn't work, either. Unfortunately, the RPMs that H.J. has put on oss.sgi.com won't install on my system -- wrong version of RedHat. And I don't see the source to his toolchain RPMs, so I can't rebuild it myself for the local libraries. Any suggestions on what the best approach is? Matt -- Matthew D. Dharm Senior Software Designer Momentum Computer Inc. 1815 Aston Ave. Suite 107 (760) 431-8663 X-115 Carlsbad, CA 92008-7310 Momentum Works For You www.momenco.com > -----Original Message----- > From: owner-linux-mips@oss.sgi.com > [mailto:owner-linux-mips@oss.sgi.com]On Behalf Of Ralf Baechle > Sent: Wednesday, January 16, 2002 11:53 PM > To: Carsten Langgaard > Cc: linux-mips@oss.sgi.com > Subject: Re: fsck fails on latest 2.4 kernel > > > On Thu, Jan 17, 2002 at 08:25:56AM +0100, Carsten Langgaard wrote: > > > > Don't use these for building userspace apps. > > > > I'm only building the kernel with these. > > What are you using for building the kernel ? > > Exactly the binaries which I put on oss. I know that in > the meantime > various problems with them have shown up so I'm waiting for the next > official binutils release to replace them. > > Ralf > From owner-linux-mips@oss.sgi.com Fri Feb 1 15:47:56 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g11NluK21328 for linux-mips-outgoing; Fri, 1 Feb 2002 15:47:56 -0800 Received: from ocean.lucon.org (12-234-19-19.client.attbi.com [12.234.19.19]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g11NlVd21316 for ; Fri, 1 Feb 2002 15:47:31 -0800 Received: by ocean.lucon.org (Postfix, from userid 1000) id 0F316125C3; Fri, 1 Feb 2002 14:47:28 -0800 (PST) Date: Fri, 1 Feb 2002 14:47:27 -0800 From: "H . J . Lu" To: "Maciej W. Rozycki" Cc: Hiroyuki Machida , libc-alpha@sources.redhat.com, linux-mips@oss.sgi.com Subject: Re: PATCH: Fix ll/sc for mips Message-ID: <20020201144727.A15521@lucon.org> References: <20020201094025.A10392@lucon.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: ; from macro@ds2.pg.gda.pl on Fri, Feb 01, 2002 at 10:41:17PM +0100 Sender: owner-linux-mips@oss.sgi.com Precedence: bulk On Fri, Feb 01, 2002 at 10:41:17PM +0100, Maciej W. Rozycki wrote: > On Fri, 1 Feb 2002, H . J . Lu wrote: > > > Here is the updated patch. > > Please do indent instructions in branch delay slots like it's done in > other code (and here originally as well). It much improves the perception > of what exactly is going on. > Like this? H.J. ---- 2002-02-01 H.J. Lu * sysdeps/mips/pspinlock.c (__pthread_spin_lock): Use a different register in the delayed slot. Use branch likely. * sysdeps/mips/pt-machine.h (testandset): Call _test_and_set. (__compare_and_swap): Return 0 only when failed to compare. Use branch likely. 2002-02-01 H.J. Lu * sysdeps/mips/atomicity.h (exchange_and_add): Use branch likely. (atomic_add): Likewise. (compare_and_swap): Return 0 only when failed to compare. Use branch likely. * sysdeps/unix/sysv/linux/mips/sys/tas.h (_test_and_set): Use branch likely. --- glibc-2.2.4/linuxthreads/sysdeps/mips/pspinlock.c.llsc Fri Feb 1 10:37:16 2002 +++ glibc-2.2.4/linuxthreads/sysdeps/mips/pspinlock.c Fri Feb 1 14:42:46 2002 @@ -29,20 +29,21 @@ int __pthread_spin_lock (pthread_spinlock_t *lock) { - unsigned int tmp; + unsigned int tmp1, tmp2; asm volatile ("\t\t\t# spin_lock\n\t" + "ll %1,%3\n" "1:\n\t" - "ll %1,%2\n\t" ".set push\n\t" ".set noreorder\n\t" "bnez %1,1b\n\t" - " li %1,1\n\t" - ".set pop\n\t" - "sc %1,%0\n\t" - "beqz %1,1b" - : "=m" (*lock), "=&r" (tmp) + " li %2,1\n\t" + "sc %2,%0\n\t" + "beqzl %2,1b\n\t" + " ll %1,%3\n\t" + ".set pop" + : "=m" (*lock), "=&r" (tmp1), "=&r" (tmp2) : "m" (*lock) : "memory"); --- glibc-2.2.4/linuxthreads/sysdeps/mips/pt-machine.h.llsc Sat Dec 9 08:55:34 2000 +++ glibc-2.2.4/linuxthreads/sysdeps/mips/pt-machine.h Fri Feb 1 14:42:20 2002 @@ -33,41 +33,11 @@ /* Spinlock implementation; required. */ -#if (_MIPS_ISA >= _MIPS_ISA_MIPS2) - -PT_EI long int -testandset (int *spinlock) -{ - long int ret, temp; - - __asm__ __volatile__ - ("/* Inline spinlock test & set */\n\t" - "1:\n\t" - "ll %0,%3\n\t" - ".set push\n\t" - ".set noreorder\n\t" - "bnez %0,2f\n\t" - " li %1,1\n\t" - ".set pop\n\t" - "sc %1,%2\n\t" - "beqz %1,1b\n" - "2:\n\t" - "/* End spinlock test & set */" - : "=&r" (ret), "=&r" (temp), "=m" (*spinlock) - : "m" (*spinlock) - : "memory"); - - return ret; -} - -#else /* !(_MIPS_ISA >= _MIPS_ISA_MIPS2) */ - PT_EI long int testandset (int *spinlock) { return _test_and_set (spinlock, 1); } -#endif /* !(_MIPS_ISA >= _MIPS_ISA_MIPS2) */ /* Get some notion of the current stack. Need not be exactly the top @@ -84,22 +54,24 @@ register char * stack_pointer __asm__ (" PT_EI int __compare_and_swap (long int *p, long int oldval, long int newval) { - long int ret; + long int ret, temp; __asm__ __volatile__ ("/* Inline compare & swap */\n\t" + "ll %1,%5\n" "1:\n\t" - "ll %0,%4\n\t" - ".set push\n" + ".set push\n\t" ".set noreorder\n\t" - "bne %0,%2,2f\n\t" - " move %0,%3\n\t" - ".set pop\n\t" - "sc %0,%1\n\t" - "beqz %0,1b\n" + "bne %1,%3,2f\n\t" + " move %0,$0\n\t" + "move %0,%4\n\t" + "sc %0,%2\n\t" + "beqzl %0,1b\n\t" + " ll %1,%5\n\t" + ".set pop\n" "2:\n\t" "/* End compare & swap */" - : "=&r" (ret), "=m" (*p) + : "=&r" (ret), "=&r" (temp), "=m" (*p) : "r" (oldval), "r" (newval), "m" (*p) : "memory"); --- glibc-2.2.4/sysdeps/mips/atomicity.h.llsc Mon Jul 9 11:58:19 2001 +++ glibc-2.2.4/sysdeps/mips/atomicity.h Fri Feb 1 14:43:34 2002 @@ -33,11 +33,15 @@ exchange_and_add (volatile uint32_t *mem __asm__ __volatile__ ("/* Inline exchange & add */\n\t" + "ll %0,%3\n" "1:\n\t" - "ll %0,%3\n\t" "addu %1,%4,%0\n\t" "sc %1,%2\n\t" - "beqz %1,1b\n\t" + ".set push\n\t" + ".set noreorder\n\t" + "beqzl %1,1b\n\t" + " ll %0,%3\n\t" + ".set pop\n\t" "/* End exchange & add */" : "=&r"(result), "=&r"(tmp), "=m"(*mem) : "m" (*mem), "r"(val) @@ -54,11 +58,15 @@ atomic_add (volatile uint32_t *mem, int __asm__ __volatile__ ("/* Inline atomic add */\n\t" + "ll %0,%2\n" "1:\n\t" - "ll %0,%2\n\t" "addu %0,%3,%0\n\t" "sc %0,%1\n\t" - "beqz %0,1b\n\t" + ".set push\n\t" + ".set noreorder\n\t" + "beqzl %0,1b\n\t" + " ll %0,%2\n\t" + ".set pop\n\t" "/* End atomic add */" : "=&r"(result), "=m"(*mem) : "m" (*mem), "r"(val) @@ -69,22 +77,24 @@ static inline int __attribute__ ((unused)) compare_and_swap (volatile long int *p, long int oldval, long int newval) { - long int ret; + long int ret, temp; __asm__ __volatile__ ("/* Inline compare & swap */\n\t" + "ll %1,%5\n" "1:\n\t" - "ll %0,%4\n\t" - ".set push\n" + ".set push\n\t" ".set noreorder\n\t" - "bne %0,%2,2f\n\t" - "move %0,%3\n\t" - ".set pop\n\t" - "sc %0,%1\n\t" - "beqz %0,1b\n" + "bne %1,%3,2f\n\t" + " move %0,$0\n\t" + "move %0,%4\n\t" + "sc %0,%2\n\t" + "beqzl %0,1b\n\t" + " ll %1,%5\n\t" + ".set pop\n" "2:\n\t" "/* End compare & swap */" - : "=&r" (ret), "=m" (*p) + : "=&r" (ret), "=&r" (temp), "=m" (*p) : "r" (oldval), "r" (newval), "m" (*p) : "memory"); --- glibc-2.2.4/sysdeps/unix/sysv/linux/mips/sys/tas.h.llsc Mon Jul 9 11:58:45 2001 +++ glibc-2.2.4/sysdeps/unix/sysv/linux/mips/sys/tas.h Fri Feb 1 14:43:52 2002 @@ -42,16 +42,19 @@ _test_and_set (int *p, int v) __THROW int r, t; __asm__ __volatile__ - ("1:\n\t" - "ll %0,%3\n\t" + ("/* Inline test and set */\n\t" + "ll %0,%3\n" + "1:\n\t" ".set push\n\t" ".set noreorder\n\t" "beq %0,%4,2f\n\t" " move %1,%4\n\t" - ".set pop\n\t" "sc %1,%2\n\t" - "beqz %1,1b\n" - "2:\n" + "beqzl %1,1b\n\t" + " ll %0,%3\n\t" + ".set pop\n" + "2:\n\t" + "/* End test and set */" : "=&r" (r), "=&r" (t), "=m" (*p) : "m" (*p), "r" (v) : "memory"); From owner-linux-mips@oss.sgi.com Fri Feb 1 15:52:53 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g11Nqr021452 for linux-mips-outgoing; Fri, 1 Feb 2002 15:52:53 -0800 Received: from ocean.lucon.org (12-234-19-19.client.attbi.com [12.234.19.19]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g11Nqmd21449; Fri, 1 Feb 2002 15:52:48 -0800 Received: by ocean.lucon.org (Postfix, from userid 1000) id 8B15C125C3; Fri, 1 Feb 2002 14:52:44 -0800 (PST) Date: Fri, 1 Feb 2002 14:52:44 -0800 From: "H . J . Lu" To: Matthew Dharm Cc: Ralf Baechle , Carsten Langgaard , linux-mips@oss.sgi.com Subject: Re: fsck fails on latest 2.4 kernel Message-ID: <20020201145244.B15521@lucon.org> References: <20020116235232.A2760@dea.linux-mips.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: ; from mdharm@momenco.com on Fri, Feb 01, 2002 at 01:43:10PM -0800 Sender: owner-linux-mips@oss.sgi.com Precedence: bulk On Fri, Feb 01, 2002 at 01:43:10PM -0800, Matthew Dharm wrote: > Hrm... Looks like I'm getting bitten by this bug also. > > I'm using H.J.'s toolchain RPMs for building the userspace > applications, but the same tools as Carsten for building the kernel. > I guess that combination doesn't work, either. > > Unfortunately, the RPMs that H.J. has put on oss.sgi.com won't install > on my system -- wrong version of RedHat. And I don't see the source > to his toolchain RPMs, so I can't rebuild it myself for the local > libraries. My toolchain source rpm is on oss.sgi.com: ftp://oss.sgi.com/pub/linux/mips/redhat/7.1/SRPMS/toolchain-20011020-1.src.rpm H.J. From owner-linux-mips@oss.sgi.com Fri Feb 1 16:02:06 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g12026P21984 for linux-mips-outgoing; Fri, 1 Feb 2002 16:02:06 -0800 Received: from nevyn.them.org (mail@NEVYN.RES.CMU.EDU [128.2.145.6]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g12023d21980 for ; Fri, 1 Feb 2002 16:02:03 -0800 Received: from drow by nevyn.them.org with local (Exim 3.34 #1 (Debian)) id 16WmgQ-0006BJ-00; Fri, 01 Feb 2002 18:01:26 -0500 Date: Fri, 1 Feb 2002 18:01:26 -0500 From: Daniel Jacobowitz To: "H . J . Lu" Cc: "Maciej W. Rozycki" , Hiroyuki Machida , libc-alpha@sources.redhat.com, linux-mips@oss.sgi.com Subject: Re: PATCH: Fix ll/sc for mips (take 3) Message-ID: <20020201180126.A23740@nevyn.them.org> Mail-Followup-To: "H . J . Lu" , "Maciej W. Rozycki" , Hiroyuki Machida , libc-alpha@sources.redhat.com, linux-mips@oss.sgi.com References: <20020131231714.E32690@lucon.org> <20020201102943.A11146@lucon.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20020201102943.A11146@lucon.org> User-Agent: Mutt/1.3.23i Sender: owner-linux-mips@oss.sgi.com Precedence: bulk On Fri, Feb 01, 2002 at 10:29:43AM -0800, H . J . Lu wrote: > On Fri, Feb 01, 2002 at 12:45:02PM +0100, Maciej W. Rozycki wrote: > > On Thu, 31 Jan 2002, H . J . Lu wrote: > > > > > > Gas will fill delay slots. Same object codes will be produced, so I > > > > think you don't have to do that by hand. > > > > > > It will make the code more readable. We don't have to guess what > > > the assembler will do. > > > > But you lose a chance for something useful being reordered to the slot. > > That might not necessarily be a "nop". Please don't forget of indents > > anyway. > > > > Here is a new patch. I use branch likely to get rid of nops. Please > tell me which indents I may have missed. Can you really assume presence of the branch-likely instruction? I don't think so. -- Daniel Jacobowitz Carnegie Mellon University MontaVista Software Debian GNU/Linux Developer From owner-linux-mips@oss.sgi.com Fri Feb 1 16:03:41 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g1203fa22123 for linux-mips-outgoing; Fri, 1 Feb 2002 16:03:41 -0800 Received: from host099.momenco.com (IDENT:root@www.momenco.com [64.169.228.99]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g1203Yd22114; Fri, 1 Feb 2002 16:03:34 -0800 Received: from beagle (beagle.internal.momenco.com [192.168.0.115]) by host099.momenco.com (8.11.6/8.11.6) with SMTP id g11N3VX12727; Fri, 1 Feb 2002 15:03:31 -0800 From: "Matthew Dharm" To: "H . J . Lu" Cc: "Ralf Baechle" , "Carsten Langgaard" , Subject: RE: fsck fails on latest 2.4 kernel Date: Fri, 1 Feb 2002 15:03:31 -0800 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0) In-Reply-To: <20020201145244.B15521@lucon.org> Importance: Normal X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400 Sender: owner-linux-mips@oss.sgi.com Precedence: bulk Okay... I'm a moron. I totally missed that SRPM after looking more than 3 times. Maybe I need stronger coffee.... Matt -- Matthew D. Dharm Senior Software Designer Momentum Computer Inc. 1815 Aston Ave. Suite 107 (760) 431-8663 X-115 Carlsbad, CA 92008-7310 Momentum Works For You www.momenco.com > -----Original Message----- > From: owner-linux-mips@oss.sgi.com > [mailto:owner-linux-mips@oss.sgi.com]On Behalf Of H . J . Lu > Sent: Friday, February 01, 2002 2:53 PM > To: Matthew Dharm > Cc: Ralf Baechle; Carsten Langgaard; linux-mips@oss.sgi.com > Subject: Re: fsck fails on latest 2.4 kernel > > > On Fri, Feb 01, 2002 at 01:43:10PM -0800, Matthew Dharm wrote: > > Hrm... Looks like I'm getting bitten by this bug also. > > > > I'm using H.J.'s toolchain RPMs for building the userspace > > applications, but the same tools as Carsten for building > the kernel. > > I guess that combination doesn't work, either. > > > > Unfortunately, the RPMs that H.J. has put on oss.sgi.com > won't install > > on my system -- wrong version of RedHat. And I don't see > the source > > to his toolchain RPMs, so I can't rebuild it myself for the local > > libraries. > > My toolchain source rpm is on oss.sgi.com: > > ftp://oss.sgi.com/pub/linux/mips/redhat/7.1/SRPMS/toolchain- > 20011020-1.src.rpm > > > H.J. > From owner-linux-mips@oss.sgi.com Fri Feb 1 16:15:21 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g120FLM22801 for linux-mips-outgoing; Fri, 1 Feb 2002 16:15:21 -0800 Received: from ocean.lucon.org (12-234-19-19.client.attbi.com [12.234.19.19]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g120FHd22797 for ; Fri, 1 Feb 2002 16:15:17 -0800 Received: by ocean.lucon.org (Postfix, from userid 1000) id 37BA2125C3; Fri, 1 Feb 2002 15:15:14 -0800 (PST) Date: Fri, 1 Feb 2002 15:15:13 -0800 From: "H . J . Lu" To: "Maciej W. Rozycki" , Hiroyuki Machida , libc-alpha@sources.redhat.com, linux-mips@oss.sgi.com Subject: Re: PATCH: Fix ll/sc for mips (take 3) Message-ID: <20020201151513.A15913@lucon.org> References: <20020131231714.E32690@lucon.org> <20020201102943.A11146@lucon.org> <20020201180126.A23740@nevyn.them.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <20020201180126.A23740@nevyn.them.org>; from dan@debian.org on Fri, Feb 01, 2002 at 06:01:26PM -0500 Sender: owner-linux-mips@oss.sgi.com Precedence: bulk On Fri, Feb 01, 2002 at 06:01:26PM -0500, Daniel Jacobowitz wrote: > On Fri, Feb 01, 2002 at 10:29:43AM -0800, H . J . Lu wrote: > > On Fri, Feb 01, 2002 at 12:45:02PM +0100, Maciej W. Rozycki wrote: > > > On Thu, 31 Jan 2002, H . J . Lu wrote: > > > > > > > > Gas will fill delay slots. Same object codes will be produced, so I > > > > > think you don't have to do that by hand. > > > > > > > > It will make the code more readable. We don't have to guess what > > > > the assembler will do. > > > > > > But you lose a chance for something useful being reordered to the slot. > > > That might not necessarily be a "nop". Please don't forget of indents > > > anyway. > > > > > > > Here is a new patch. I use branch likely to get rid of nops. Please > > tell me which indents I may have missed. > > Can you really assume presence of the branch-likely instruction? I > don't think so. Why not? Can you show me a MIPS II or above CPU which doesn't have branch-likely instruction? From gcc, /* ISA has branch likely instructions (eg. mips2). */ /* Disable branchlikely for tx39 until compare rewrite. They haven't been generated up to this point. */ #define ISA_HAS_BRANCHLIKELY (mips_isa != 1 \ /* || TARGET_MIPS3900 */) Did I miss something? H.J. From owner-linux-mips@oss.sgi.com Fri Feb 1 18:09:08 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g12298V25670 for linux-mips-outgoing; Fri, 1 Feb 2002 18:09:08 -0800 Received: from host099.momenco.com (IDENT:root@www.momenco.com [64.169.228.99]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g12290d25660; Fri, 1 Feb 2002 18:09:00 -0800 Received: from beagle (beagle.internal.momenco.com [192.168.0.115]) by host099.momenco.com (8.11.6/8.11.6) with SMTP id g1218vX13253; Fri, 1 Feb 2002 17:08:57 -0800 From: "Matthew Dharm" To: "H . J . Lu" Cc: "Ralf Baechle" , "Carsten Langgaard" , Subject: RE: fsck fails on latest 2.4 kernel Date: Fri, 1 Feb 2002 17:08:57 -0800 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0) In-Reply-To: <20020201145244.B15521@lucon.org> Importance: Normal X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400 Sender: owner-linux-mips@oss.sgi.com Precedence: bulk As an aside, it looks like you can't rebuild this from source without gettext installed, but that isn't a pre-req given in the spec file. It looks like there is code to detect gettext and substitute a local copy if it's not available, but that code doesn't seem to work right. Matt -- Matthew D. Dharm Senior Software Designer Momentum Computer Inc. 1815 Aston Ave. Suite 107 (760) 431-8663 X-115 Carlsbad, CA 92008-7310 Momentum Works For You www.momenco.com > -----Original Message----- > From: H . J . Lu [mailto:hjl@lucon.org] > Sent: Friday, February 01, 2002 2:53 PM > To: Matthew Dharm > Cc: Ralf Baechle; Carsten Langgaard; linux-mips@oss.sgi.com > Subject: Re: fsck fails on latest 2.4 kernel > > > On Fri, Feb 01, 2002 at 01:43:10PM -0800, Matthew Dharm wrote: > > Hrm... Looks like I'm getting bitten by this bug also. > > > > I'm using H.J.'s toolchain RPMs for building the userspace > > applications, but the same tools as Carsten for building > the kernel. > > I guess that combination doesn't work, either. > > > > Unfortunately, the RPMs that H.J. has put on oss.sgi.com > won't install > > on my system -- wrong version of RedHat. And I don't see > the source > > to his toolchain RPMs, so I can't rebuild it myself for the local > > libraries. > > My toolchain source rpm is on oss.sgi.com: > > ftp://oss.sgi.com/pub/linux/mips/redhat/7.1/SRPMS/toolchain- > 20011020-1.src.rpm > > > H.J. > From owner-linux-mips@oss.sgi.com Fri Feb 1 18:47:46 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g122lkf26148 for linux-mips-outgoing; Fri, 1 Feb 2002 18:47:46 -0800 Received: from ocean.lucon.org (12-234-19-19.client.attbi.com [12.234.19.19]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g122lgd26145; Fri, 1 Feb 2002 18:47:42 -0800 Received: by ocean.lucon.org (Postfix, from userid 1000) id 9AFCC125C3; Fri, 1 Feb 2002 17:47:38 -0800 (PST) Date: Fri, 1 Feb 2002 17:47:38 -0800 From: "H . J . Lu" To: Matthew Dharm Cc: Ralf Baechle , Carsten Langgaard , linux-mips@oss.sgi.com Subject: Re: fsck fails on latest 2.4 kernel Message-ID: <20020201174738.A18322@lucon.org> References: <20020201145244.B15521@lucon.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: ; from mdharm@momenco.com on Fri, Feb 01, 2002 at 05:08:57PM -0800 Sender: owner-linux-mips@oss.sgi.com Precedence: bulk On Fri, Feb 01, 2002 at 05:08:57PM -0800, Matthew Dharm wrote: > As an aside, it looks like you can't rebuild this from source without > gettext installed, but that isn't a pre-req given in the spec file. > > It looks like there is code to detect gettext and substitute a local > copy if it's not available, but that code doesn't seem to work right. > There are many things left out, like gcc, binutils, glibc-devel, ..... I don't like to list all of them. It should be no different to bootstrap gcc. H.J. From owner-linux-mips@oss.sgi.com Fri Feb 1 19:37:36 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g123baQ26856 for linux-mips-outgoing; Fri, 1 Feb 2002 19:37:36 -0800 Received: from ns6.sony.co.jp (NS6.Sony.CO.JP [146.215.0.32]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g123bWd26853 for ; Fri, 1 Feb 2002 19:37:32 -0800 Received: from mail2.sony.co.jp (mail2.sony.co.jp [43.0.1.202]) by ns6.sony.co.jp (R8/Sony) with ESMTP id g122bJW20863; Sat, 2 Feb 2002 11:37:19 +0900 (JST) Received: from mail2.sony.co.jp (localhost [127.0.0.1]) by mail2.sony.co.jp (R8) with ESMTP id g122bIH12818; Sat, 2 Feb 2002 11:37:18 +0900 (JST) Received: from smail1.sm.sony.co.jp (smail1.sm.sony.co.jp [43.11.253.1]) by mail2.sony.co.jp (R8) with ESMTP id g122bIA12810; Sat, 2 Feb 2002 11:37:18 +0900 (JST) Received: from imail.sm.sony.co.jp (imail.sm.sony.co.jp [43.2.217.16]) by smail1.sm.sony.co.jp (8.8.8/3.6W) with ESMTP id LAA08031; Sat, 2 Feb 2002 11:41:56 +0900 (JST) Received: from mach0.sm.sony.co.jp (mach0.sm.sony.co.jp [43.2.226.27]) by imail.sm.sony.co.jp (8.9.3+3.2W/3.7W) with ESMTP id LAA20470; Sat, 2 Feb 2002 11:37:17 +0900 (JST) Received: from localhost by mach0.sm.sony.co.jp (8.11.0/8.11.0) with ESMTP id g122bHJ12472; Sat, 2 Feb 2002 11:37:17 +0900 (JST) Date: Sat, 02 Feb 2002 11:37:17 +0900 (JST) Message-Id: <20020202.113717.68552217.machida@sm.sony.co.jp> To: hjl@lucon.org Cc: macro@ds2.pg.gda.pl, libc-alpha@sources.redhat.com, linux-mips@oss.sgi.com Subject: Re: PATCH: Fix ll/sc for mips (take 3) From: Hiroyuki Machida In-Reply-To: <20020201151513.A15913@lucon.org> References: <20020201102943.A11146@lucon.org> <20020201180126.A23740@nevyn.them.org> <20020201151513.A15913@lucon.org> X-Mailer: Mew version 2.1.51 on Emacs 20.7 / Mule 4.0 (HANANOEN) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-linux-mips@oss.sgi.com Precedence: bulk From: "H . J . Lu" Subject: Re: PATCH: Fix ll/sc for mips (take 3) Date: Fri, 1 Feb 2002 15:15:13 -0800 > Why not? Can you show me a MIPS II or above CPU which doesn't have > branch-likely instruction? From gcc, > > /* ISA has branch likely instructions (eg. mips2). */ > /* Disable branchlikely for tx39 until compare rewrite. They haven't > been generated up to this point. */ > #define ISA_HAS_BRANCHLIKELY (mips_isa != 1 \ > /* || TARGET_MIPS3900 */) > > Did I miss something? I think we can assume CPU has branch-likely insns, if CPU has MIPS ISA 2 or greater ISA, as H.J said. I don't know any exception of this. If anyone know exceptions, please let us know. (FYI: we can't assume CPU has LL/SC even if CPU has branch-likely insns. ) HL's patch looks good for me. --- Hiroyuki Machida Sony Corp. From owner-linux-mips@oss.sgi.com Fri Feb 1 20:27:12 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g124RC527590 for linux-mips-outgoing; Fri, 1 Feb 2002 20:27:12 -0800 Received: from nevyn.them.org (mail@NEVYN.RES.CMU.EDU [128.2.145.6]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g124R7d27586 for ; Fri, 1 Feb 2002 20:27:07 -0800 Received: from drow by nevyn.them.org with local (Exim 3.34 #1 (Debian)) id 16WqpN-0003TY-00; Fri, 01 Feb 2002 22:26:57 -0500 Date: Fri, 1 Feb 2002 22:26:57 -0500 From: Daniel Jacobowitz To: "H . J . Lu" Cc: "Maciej W. Rozycki" , Hiroyuki Machida , libc-alpha@sources.redhat.com, linux-mips@oss.sgi.com Subject: Re: PATCH: Fix ll/sc for mips (take 3) Message-ID: <20020201222657.A13339@nevyn.them.org> Mail-Followup-To: "H . J . Lu" , "Maciej W. Rozycki" , Hiroyuki Machida , libc-alpha@sources.redhat.com, linux-mips@oss.sgi.com References: <20020131231714.E32690@lucon.org> <20020201102943.A11146@lucon.org> <20020201180126.A23740@nevyn.them.org> <20020201151513.A15913@lucon.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20020201151513.A15913@lucon.org> User-Agent: Mutt/1.3.23i Sender: owner-linux-mips@oss.sgi.com Precedence: bulk On Fri, Feb 01, 2002 at 03:15:13PM -0800, H . J . Lu wrote: > On Fri, Feb 01, 2002 at 06:01:26PM -0500, Daniel Jacobowitz wrote: > > On Fri, Feb 01, 2002 at 10:29:43AM -0800, H . J . Lu wrote: > > > On Fri, Feb 01, 2002 at 12:45:02PM +0100, Maciej W. Rozycki wrote: > > > > On Thu, 31 Jan 2002, H . J . Lu wrote: > > > > > > > > > > Gas will fill delay slots. Same object codes will be produced, so I > > > > > > think you don't have to do that by hand. > > > > > > > > > > It will make the code more readable. We don't have to guess what > > > > > the assembler will do. > > > > > > > > But you lose a chance for something useful being reordered to the slot. > > > > That might not necessarily be a "nop". Please don't forget of indents > > > > anyway. > > > > > > > > > > Here is a new patch. I use branch likely to get rid of nops. Please > > > tell me which indents I may have missed. > > > > Can you really assume presence of the branch-likely instruction? I > > don't think so. > > Why not? Can you show me a MIPS II or above CPU which doesn't have > branch-likely instruction? From gcc, > > /* ISA has branch likely instructions (eg. mips2). */ > /* Disable branchlikely for tx39 until compare rewrite. They haven't > been generated up to this point. */ > #define ISA_HAS_BRANCHLIKELY (mips_isa != 1 \ > /* || TARGET_MIPS3900 */) > > Did I miss something? My fault. I was indeed thinking of the tx39, which is not normally MIPS2. -- Daniel Jacobowitz Carnegie Mellon University MontaVista Software Debian GNU/Linux Developer From owner-linux-mips@oss.sgi.com Fri Feb 1 23:23:07 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g127N7130451 for linux-mips-outgoing; Fri, 1 Feb 2002 23:23:07 -0800 Received: from mail.ict.ac.cn ([159.226.39.4]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g127N4d30447 for ; Fri, 1 Feb 2002 23:23:04 -0800 Message-Id: <200202020723.g127N4d30447@oss.sgi.com> Received: (qmail 5953 invoked from network); 2 Feb 2002 06:22:56 -0000 Received: from unknown (HELO foxsen) (@159.226.40.150) by 159.226.39.4 with SMTP; 2 Feb 2002 06:22:56 -0000 Date: Sat, 2 Feb 2002 14:20:6 +0800 From: Zhang Fuxin To: "linux-mips@oss.sgi.com" Subject: used_math not cleared for new processes? X-mailer: FoxMail 3.11 Release [cn] Mime-Version: 1.0 Content-Type: text/plain; charset="GB2312" Content-Transfer-Encoding: 7bit Sender: owner-linux-mips@oss.sgi.com Precedence: bulk hi,linux-mips, I find that current->used_math isn't cleared when we start a new process.Is it intended? I mean 'start_thread' in do_exec but not 'copy_thread' in do_fork when speaking 'start a new process'. We can/should? keep used_math for the latter,but for the former? It leads to a failure in libm-test(the fpu control register doesn't equal to default) I think the reason is that init_fpu fail to be called with used_math set. BTW: besides this failure,i see a lot of more related to extra "Invalid operation" exception. e.g.: exp(NaN) == NaN: Exception "Invalid operation" set fmax (0, NaN) == 0: Exception "Invalid operation" set .. My cpu is IDT RC64474,which is basically a r4600. I think the cause probably is mips's special SNaN and QNaN handling. Could somebody explain? Regards Zhang Fuxin fxzhang@ict.ac.cn From owner-linux-mips@oss.sgi.com Sat Feb 2 02:18:09 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g12AI9P00933 for linux-mips-outgoing; Sat, 2 Feb 2002 02:18:09 -0800 Received: from mail.sonytel.be (mail.sonytel.be [193.74.243.200]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g12AI3d00930 for ; Sat, 2 Feb 2002 02:18:03 -0800 Received: from vervain.sonytel.be (mail.sonytel.be [10.17.0.27]) by mail.sonytel.be (8.9.0/8.8.6) with ESMTP id KAA13347; Sat, 2 Feb 2002 10:17:49 +0100 (MET) Date: Sat, 2 Feb 2002 10:17:50 +0100 (MET) From: Geert Uytterhoeven To: Jun Sun cc: Linux/MIPS Development Subject: Re: gcc 3.x, -ansi and "static inline" In-Reply-To: <20020201115206.A18085@mvista.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-linux-mips@oss.sgi.com Precedence: bulk On Fri, 1 Feb 2002, Jun Sun wrote: > We are trying to build userland apps with the newer kernel headers. > Unexpected problems occur with the "static inline" declaration > when "-ansi" option is used. > > Anybody else is having the problem? > > Also, what are the reasons for us to switch to "static inline" in the > kernel header? > > Here is an example I am talking about: > > In 2.4.2, we have in bitops.h: > > extern __inline__ unsigned long ffz(unsigned long word) > > In 2.4.17, we have instead: > > static inline unsigned long ffz(unsigned long word) > > This problem seems only happening with gcc 3.x. I start to wonder > whether we should fix kernel header. In some case, the fix seems > to be not exposing to userland (by #ifdef __KERNEL__). In others, > the fix might be using __inline__. Yes, #ifdef __KERNEL__ is the right fix. > However, I really like to know what was the original motivation > to do such a change. See linux-kernel 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 owner-linux-mips@oss.sgi.com Sat Feb 2 04:06:46 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g12C6kx02652 for linux-mips-outgoing; Sat, 2 Feb 2002 04:06:46 -0800 Received: from delta.ds2.pg.gda.pl (macro@delta.ds2.pg.gda.pl [213.192.72.1]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g12C6fd02648 for ; Sat, 2 Feb 2002 04:06:42 -0800 Received: from localhost by delta.ds2.pg.gda.pl (8.9.3/8.9.3) with SMTP id MAA22923; Sat, 2 Feb 2002 12:06:07 +0100 (MET) Date: Sat, 2 Feb 2002 12:06:07 +0100 (MET) From: "Maciej W. Rozycki" To: "H . J . Lu" cc: Hiroyuki Machida , libc-alpha@sources.redhat.com, linux-mips@oss.sgi.com Subject: Re: PATCH: Fix ll/sc for mips In-Reply-To: <20020201144727.A15521@lucon.org> Message-ID: Organization: Technical University of Gdansk MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-linux-mips@oss.sgi.com Precedence: bulk On Fri, 1 Feb 2002, H . J . Lu wrote: > > Please do indent instructions in branch delay slots like it's done in > > other code (and here originally as well). It much improves the perception > > of what exactly is going on. > > Like this? Exactly. Thanks. -- + Maciej W. Rozycki, Technical University of Gdansk, Poland + +--------------------------------------------------------------+ + e-mail: macro@ds2.pg.gda.pl, PGP key available + From owner-linux-mips@oss.sgi.com Sat Feb 2 05:11:02 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g12DB2P03760 for linux-mips-outgoing; Sat, 2 Feb 2002 05:11:02 -0800 Received: from delta.ds2.pg.gda.pl (macro@delta.ds2.pg.gda.pl [213.192.72.1]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g12DAhd03748 for ; Sat, 2 Feb 2002 05:10:43 -0800 Received: from localhost by delta.ds2.pg.gda.pl (8.9.3/8.9.3) with SMTP id NAA24037; Sat, 2 Feb 2002 13:09:48 +0100 (MET) Date: Sat, 2 Feb 2002 13:09:47 +0100 (MET) From: "Maciej W. Rozycki" To: linux-mips@fnet.fr, linux-mips@oss.sgi.com cc: jgg@debian.org Subject: Re: [patch] linux 2.4.17: An mb() rework In-Reply-To: Message-ID: Organization: Technical University of Gdansk MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-linux-mips@oss.sgi.com Precedence: bulk On Fri, 1 Feb 2002, Maciej W. Rozycki wrote: > Well, after looking at the Alpha Architecture Handbook I see "mb" and > "wmb" are pure ordering barriers -- any transactions at the CPU bus (pins) > may still be deferred or prefetched (architecturally -- can't comment on > specific chips). So after all, maybe all the macros should be purely > "sync" for MIPS ("" for MIPS I, and mb() equal to wbflush() for R3220 and > similar setups) and anything that wants to see all writes actually > committed should use wbflush(), which would be defined as "mb(); > uncached_read();" (or in a system-specific way, for R3220, etc.)? > > The i386 implementation seems stronger than it should be, but that's > probably because of the limited choice available. > > Any thoughts? Well, I've seen no thoughts so far. :-( Anyway here is a new patch, which takes my considerations about a synchronization vs a write commitment into account. This implementation only assures the absolute minimum specified in the operations. I am also tempted to add "#define iob() wbflush()" to system.h and attempt to define the macro for other architectures as well. The intended semantics is to assure all preceding transactions arrived at a system bus and none of following ones were started yet. The "system bus" here is defined: "the bus that connects the bus controller of a CPU (whether internal to the chip or not) to the rest of a system." -- + Maciej W. Rozycki, Technical University of Gdansk, Poland + +--------------------------------------------------------------+ + e-mail: macro@ds2.pg.gda.pl, PGP key available + patch-mips-2.4.17-20020111-mb-wb-1 diff -up --recursive --new-file linux-mips-2.4.17-20020111.macro/arch/mips/config.in linux-mips-2.4.17-20020111/arch/mips/config.in --- linux-mips-2.4.17-20020111.macro/arch/mips/config.in Mon Jan 7 05:27:13 2002 +++ linux-mips-2.4.17-20020111/arch/mips/config.in Sat Jan 26 02:35:35 2002 @@ -363,6 +363,12 @@ else fi fi fi +if [ "$CONFIG_CPU_R3000" = "y" -o \ + "$CONFIG_CPU_TX39XX" = "y" ]; then + define_bool CONFIG_CPU_HAS_SYNC n +else + define_bool CONFIG_CPU_HAS_SYNC y +fi endmenu mainmenu_option next_comment diff -up --recursive --new-file linux-mips-2.4.17-20020111.macro/include/asm-mips/system.h linux-mips-2.4.17-20020111/include/asm-mips/system.h --- linux-mips-2.4.17-20020111.macro/include/asm-mips/system.h Thu Dec 13 05:28:09 2001 +++ linux-mips-2.4.17-20020111/include/asm-mips/system.h Sat Feb 2 00:05:19 2002 @@ -167,32 +167,31 @@ extern void __global_restore_flags(unsig #define local_irq_disable() __cli(); #define local_irq_enable() __sti(); -/* - * These are probably defined overly paranoid ... - */ +#ifdef CONFIG_CPU_HAS_SYNC +#define __sync() __asm__ __volatile__("sync" : : : "memory") +#else +#define __sync() do { } while(0) +#endif + +#define fast_wmb() __sync() +#define fast_rmb() __sync() +#define fast_mb() __sync() + #ifdef CONFIG_CPU_HAS_WB #include -#define rmb() do { } while(0) -#define wmb() wbflush() -#define mb() wbflush() - -#else /* CONFIG_CPU_HAS_WB */ - -#define mb() \ -__asm__ __volatile__( \ - "# prevent instructions being moved around\n\t" \ - ".set\tnoreorder\n\t" \ - "# 8 nops to fool the R4400 pipeline\n\t" \ - "nop;nop;nop;nop;nop;nop;nop;nop\n\t" \ - ".set\treorder" \ - : /* no output */ \ - : /* no input */ \ - : "memory") -#define rmb() mb() -#define wmb() mb() -#endif /* CONFIG_CPU_HAS_WB */ +#define wmb() fast_wmb() +#define rmb() fast_rmb() +#define mb() wbflush(); + +#else /* !CONFIG_CPU_HAS_WB */ + +#define wmb() fast_wmb() +#define rmb() fast_rmb() +#define mb() fast_mb() + +#endif /* !CONFIG_CPU_HAS_WB */ #ifdef CONFIG_SMP #define smp_mb() mb() diff -up --recursive --new-file linux-mips-2.4.17-20020111.macro/include/asm-mips/wbflush.h linux-mips-2.4.17-20020111/include/asm-mips/wbflush.h --- linux-mips-2.4.17-20020111.macro/include/asm-mips/wbflush.h Fri Sep 7 04:26:33 2001 +++ linux-mips-2.4.17-20020111/include/asm-mips/wbflush.h Sat Feb 2 00:05:21 2002 @@ -6,28 +6,49 @@ * for more details. * * Copyright (c) 1998 Harald Koerfgen + * Copyright (C) 2002 Maciej W. Rozycki */ #ifndef __ASM_MIPS_WBFLUSH_H #define __ASM_MIPS_WBFLUSH_H #include -#if defined(CONFIG_CPU_HAS_WB) -/* - * R2000 or R3000 - */ -extern void (*__wbflush) (void); +#include +#include -#define wbflush() __wbflush() +#define __fast_wbflush() \ + __asm__ __volatile__( \ + ".set push\n\t" \ + ".set noreorder\n\t" \ + "lw $0,%0\n\t" \ + "nop\n\t" \ + ".set pop" \ + : /* no output */ \ + : "m" (*(int *)KSEG1) \ + : "memory") + +#define fast_wbflush() \ + do { \ + fast_mb(); \ + __fast_wbflush(); \ + } while (0) + + +#ifdef CONFIG_CPU_HAS_WB + +extern void (*__wbflush)(void); + +#define wbflush() \ + do { \ + fast_mb(); \ + __wbflush(); \ + } while (0) -#else -/* - * we don't need no stinkin' wbflush - */ +#else /* !CONFIG_CPU_HAS_WB */ -#define wbflush() do { } while(0) +#define wbflush() fast_wbflush() -#endif +#endif /* !CONFIG_CPU_HAS_WB */ extern void wbflush_setup(void); From owner-linux-mips@oss.sgi.com Sat Feb 2 11:52:37 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g12Jqbv14167 for linux-mips-outgoing; Sat, 2 Feb 2002 11:52:37 -0800 Received: from xyzzy.stargate.net ([198.144.45.122]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g12JqUd14163 for ; Sat, 2 Feb 2002 11:52:30 -0800 Received: (from justin@localhost) by xyzzy.stargate.net (8.11.6/8.11.6) id g12IrOg01938; Sat, 2 Feb 2002 13:53:24 -0500 X-Authentication-Warning: xyzzy.stargate.net: justin set sender to justinca@ri.cmu.edu using -f Subject: Re: PATCH: Fix ll/sc for mips (take 3) From: Justin Carlson To: Daniel Jacobowitz Cc: "H . J . Lu" , "Maciej W. Rozycki" , Hiroyuki Machida , libc-alpha@sources.redhat.com, linux-mips@oss.sgi.com In-Reply-To: <20020201222657.A13339@nevyn.them.org> References: <20020131231714.E32690@lucon.org> <20020201102943.A11146@lucon.org> <20020201180126.A23740@nevyn.them.org> <20020201151513.A15913@lucon.org> <20020201222657.A13339@nevyn.them.org> Content-Type: text/plain Content-Transfer-Encoding: 7bit X-Mailer: Evolution/1.0.2 Date: 02 Feb 2002 13:53:23 -0500 Message-Id: <1012676003.1563.6.camel@xyzzy.stargate.net> Mime-Version: 1.0 Sender: owner-linux-mips@oss.sgi.com Precedence: bulk On Fri, 2002-02-01 at 22:26, Daniel Jacobowitz wrote: > On Fri, Feb 01, 2002 at 03:15:13PM -0800, H . J . Lu wrote: > > On Fri, Feb 01, 2002 at 06:01:26PM -0500, Daniel Jacobowitz wrote: > > > On Fri, Feb 01, 2002 at 10:29:43AM -0800, H . J . Lu wrote: > > > > On Fri, Feb 01, 2002 at 12:45:02PM +0100, Maciej W. Rozycki wrote: > > > > > On Thu, 31 Jan 2002, H . J . Lu wrote: > > > > > > > > > > > > Gas will fill delay slots. Same object codes will be produced, so I > > > > > > > think you don't have to do that by hand. > > > > > > > > > > > > It will make the code more readable. We don't have to guess what > > > > > > the assembler will do. > > > > > > > > > > But you lose a chance for something useful being reordered to the slot. > > > > > That might not necessarily be a "nop". Please don't forget of indents > > > > > anyway. > > > > > > > > > > > > > Here is a new patch. I use branch likely to get rid of nops. Please > > > > tell me which indents I may have missed. > > > > > > Can you really assume presence of the branch-likely instruction? I > > > don't think so. > > Actually, regardless of whether modern cpus implement it, I'd argue that avoiding the branch likely is a good idea for 2 reasons: 1) In the latest MIPS specs (mips32 and mips64) branch likelies have officially been deprecated as probable removals from the architecture in the not-too-distant future. 2) More importantly, most implementations don't use any sort of dynamic branch prediction on branch likelies. They predict taken, always, since that's the specified intent (it's a branch *likely* to be taken). For most spin locks, the normal behaviour is a fall through, not taking that branch, so you're inflicting a branch mispredict penalty on every lock grabbed without contention. Even for locks which the general case is contention, giving the processor branch predictor a chance to learn that is a Good Idea. -Justin From owner-linux-mips@oss.sgi.com Sat Feb 2 13:04:02 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g12L42Z20444 for linux-mips-outgoing; Sat, 2 Feb 2002 13:04:02 -0800 Received: from ocean.lucon.org (12-234-19-19.client.attbi.com [12.234.19.19]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g12L3wd20441 for ; Sat, 2 Feb 2002 13:03:59 -0800 Received: by ocean.lucon.org (Postfix, from userid 1000) id 29000125C3; Sat, 2 Feb 2002 12:03:54 -0800 (PST) Date: Sat, 2 Feb 2002 12:03:54 -0800 From: "H . J . Lu" To: Justin Carlson Cc: Daniel Jacobowitz , "Maciej W. Rozycki" , Hiroyuki Machida , libc-alpha@sources.redhat.com, linux-mips@oss.sgi.com, gcc@gcc.gnu.org Subject: Re: PATCH: Fix ll/sc for mips (take 3) Message-ID: <20020202120354.A1522@lucon.org> References: <20020131231714.E32690@lucon.org> <20020201102943.A11146@lucon.org> <20020201180126.A23740@nevyn.them.org> <20020201151513.A15913@lucon.org> <20020201222657.A13339@nevyn.them.org> <1012676003.1563.6.camel@xyzzy.stargate.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <1012676003.1563.6.camel@xyzzy.stargate.net>; from justinca@ri.cmu.edu on Sat, Feb 02, 2002 at 01:53:23PM -0500 Sender: owner-linux-mips@oss.sgi.com Precedence: bulk On Sat, Feb 02, 2002 at 01:53:23PM -0500, Justin Carlson wrote: > > Actually, regardless of whether modern cpus implement it, I'd argue that > avoiding the branch likely is a good idea for 2 reasons: > > 1) In the latest MIPS specs (mips32 and mips64) branch likelies have > officially been deprecated as probable removals from the architecture in > the not-too-distant future. > > 2) More importantly, most implementations don't use any sort of dynamic > branch prediction on branch likelies. They predict taken, always, since > that's the specified intent (it's a branch *likely* to be taken). For > most spin locks, the normal behaviour is a fall through, not taking that > branch, so you're inflicting a branch mispredict penalty on every lock > grabbed without contention. Even for locks which the general case is > contention, giving the processor branch predictor a chance to learn that > is a Good Idea. > Does everyone agree with this? If yes, I can make a patch not to use branch likely. But on the other hand, "gcc -mips2" will generate code using branch likely. If branch likely doesn't buy you anything, shouldn't we change gcc not to generate branch likely instructions? H.J. From owner-linux-mips@oss.sgi.com Sat Feb 2 13:49:48 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g12Lnmu27535 for linux-mips-outgoing; Sat, 2 Feb 2002 13:49:48 -0800 Received: from mx.mips.com (mx.mips.com [206.31.31.226]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g12Lnjd27484 for ; Sat, 2 Feb 2002 13:49:45 -0800 Received: from newman.mips.com (ns-dmz [206.31.31.225]) by mx.mips.com (8.9.3/8.9.0) with ESMTP id MAA29253; Sat, 2 Feb 2002 12:49:35 -0800 (PST) Received: from copfs01.mips.com (copfs01 [192.168.205.101]) by newman.mips.com (8.9.3/8.9.0) with ESMTP id MAA22911; Sat, 2 Feb 2002 12:49:32 -0800 (PST) Received: from copsun18.mips.com (copsun18 [192.168.205.28]) by copfs01.mips.com (8.11.4/8.9.0) with ESMTP id g12Kn7A24635; Sat, 2 Feb 2002 21:49:07 +0100 (MET) From: Hartvig Ekner Received: (from hartvige@localhost) by copsun18.mips.com (8.9.1/8.9.0) id VAA15305; Sat, 2 Feb 2002 21:49:29 +0100 (MET) Message-Id: <200202022049.VAA15305@copsun18.mips.com> Subject: Re: PATCH: Fix ll/sc for mips (take 3) To: hjl@lucon.org (H . J . Lu) Date: Sat, 2 Feb 2002 21:49:29 +0100 (MET) Cc: justinca@ri.cmu.edu (Justin Carlson), dan@debian.org (Daniel Jacobowitz), macro@ds2.pg.gda.pl (Maciej W. Rozycki), machida@sm.sony.co.jp (Hiroyuki Machida), libc-alpha@sources.redhat.com, linux-mips@oss.sgi.com, gcc@gcc.gnu.org In-Reply-To: <20020202120354.A1522@lucon.org> from "H . J . Lu" at Feb 02, 2002 12:03:54 PM X-Mailer: ELM [version 2.5 PL1] MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-linux-mips@oss.sgi.com Precedence: bulk H . J . Lu writes: > Does everyone agree with this? If yes, I can make a patch not to use > branch likely. But on the other hand, "gcc -mips2" will generate code > using branch likely. If branch likely doesn't buy you anything, > shouldn't we change gcc not to generate branch likely instructions? I would say it's still too early to actively remove them. There are many processors out there (certainly in the embedded world most of them) without branch prediction, and for all of those branch-likelys actually help performance. /Hartvig From owner-linux-mips@oss.sgi.com Sun Feb 3 00:26:47 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g138QlU05654 for linux-mips-outgoing; Sun, 3 Feb 2002 00:26:47 -0800 Received: from nevyn.them.org (mail@NEVYN.RES.CMU.EDU [128.2.145.6]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g138QjA05651 for ; Sun, 3 Feb 2002 00:26:45 -0800 Received: from drow by nevyn.them.org with local (Exim 3.34 #1 (Debian)) id 16XH35-0000V1-00; Sun, 03 Feb 2002 02:26:51 -0500 Date: Sun, 3 Feb 2002 02:26:51 -0500 From: Daniel Jacobowitz To: weasel@cs.stanford.edu Cc: Eric Christopher , binutils@sources.redhat.com, linux-mips@oss.sgi.com Subject: Re: me vs gas mips64 relocation Message-ID: <20020203022651.A1903@nevyn.them.org> Mail-Followup-To: weasel@cs.stanford.edu, Eric Christopher , binutils@sources.redhat.com, linux-mips@oss.sgi.com References: <1012598592.1689.33.camel@ghostwheel.cygnus.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.3.23i Sender: owner-linux-mips@oss.sgi.com Precedence: bulk On Sat, Feb 02, 2002 at 08:47:30PM -0800, d p chang wrote: > Eric Christopher writes: > > > > ideas? (other than for me to take the crack pipe out of my ass) > > > > You can try to help Thiemo Seufer finish n32 and n64 support in > > binutils... > > Is there a todo or something that I could start w/? Search for TODO in elf64-mips.c, if I recall correctly. Among other things PIC support is non-functional. -- Daniel Jacobowitz Carnegie Mellon University MontaVista Software Debian GNU/Linux Developer From owner-linux-mips@oss.sgi.com Sun Feb 3 00:43:29 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g138hT206043 for linux-mips-outgoing; Sun, 3 Feb 2002 00:43:29 -0800 Received: from sgi.com (sgi-too.SGI.COM [204.94.211.39]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g138hLA05993 for ; Sun, 3 Feb 2002 00:43:21 -0800 Received: from xyzzy.stargate.net ([198.144.45.122]) by sgi.com (980327.SGI.8.8.8-aspam/980304.SGI-aspam: SGI does not authorize the use of its proprietary systems or networks for unsolicited or bulk email from the Internet.) via ESMTP id VAA00825 for ; Sat, 2 Feb 2002 21:50:15 -0800 (PST) mail_from (justinca@ri.cmu.edu) Received: (from justin@localhost) by xyzzy.stargate.net (8.11.6/8.11.6) id g135lVu02334; Sun, 3 Feb 2002 00:47:31 -0500 X-Authentication-Warning: xyzzy.stargate.net: justin set sender to justinca@ri.cmu.edu using -f Subject: Re: PATCH: Fix ll/sc for mips (take 3) From: Justin Carlson To: "H . J . Lu" Cc: Daniel Jacobowitz , "Maciej W. Rozycki" , Hiroyuki Machida , libc-alpha@sources.redhat.com, linux-mips@oss.sgi.com, gcc@gcc.gnu.org In-Reply-To: <20020202120354.A1522@lucon.org> References: <20020131231714.E32690@lucon.org> <20020201102943.A11146@lucon.org> <20020201180126.A23740@nevyn.them.org> <20020201151513.A15913@lucon.org> <20020201222657.A13339@nevyn.them.org> <1012676003.1563.6.camel@xyzzy.stargate.net> <20020202120354.A1522@lucon.org> Content-Type: text/plain Content-Transfer-Encoding: 7bit X-Mailer: Evolution/1.0.2 Date: 03 Feb 2002 00:47:30 -0500 Message-Id: <1012715250.2297.9.camel@xyzzy.stargate.net> Mime-Version: 1.0 Sender: owner-linux-mips@oss.sgi.com Precedence: bulk On Sat, 2002-02-02 at 15:03, H . J . Lu wrote: > On Sat, Feb 02, 2002 at 01:53:23PM -0500, Justin Carlson wrote: > > > > Actually, regardless of whether modern cpus implement it, I'd argue that > > avoiding the branch likely is a good idea for 2 reasons: > > > > 1) In the latest MIPS specs (mips32 and mips64) branch likelies have > > officially been deprecated as probable removals from the architecture in > > the not-too-distant future. > > > > 2) More importantly, most implementations don't use any sort of dynamic > > branch prediction on branch likelies. They predict taken, always, since > > that's the specified intent (it's a branch *likely* to be taken). For > > most spin locks, the normal behaviour is a fall through, not taking that > > branch, so you're inflicting a branch mispredict penalty on every lock > > grabbed without contention. Even for locks which the general case is > > contention, giving the processor branch predictor a chance to learn that > > is a Good Idea. > > > > Does everyone agree with this? If yes, I can make a patch not to use > branch likely. But on the other hand, "gcc -mips2" will generate code > using branch likely. If branch likely doesn't buy you anything, > shouldn't we change gcc not to generate branch likely instructions? > I know of at least one internal version of gcc which already has been hacked to remove generation of branch likely instructions. It actually helped performance a bit because gcc has (possibly had, this was 6-9 months ago) the bad habit of generating code like this: beqzl $1, next daddiu $2, $3, 1 next: ... This looks like a nice, compact way to do a conditional move. In practice, it's a horrendous idea due to the lack of consideration of the branch prediction. It's easier to tell the compiler not to generate branch likelies than to try to fix the code generation for this case. :) Also, I didn't say branch likely doesn't buy you anything; there are situations where it works well. Looking at the spin_lock code, though, this isn't one of them. The cases where it is a win are far enough between that my personal practice is to generally avoid them. -Justin From owner-linux-mips@oss.sgi.com Sun Feb 3 01:34:01 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g139Y1N07084 for linux-mips-outgoing; Sun, 3 Feb 2002 01:34:01 -0800 Received: from dea.linux-mips.net (a1as10-p200.stg.tli.de [195.252.189.200]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g139XuA07078 for ; Sun, 3 Feb 2002 01:33:57 -0800 Received: (from ralf@localhost) by dea.linux-mips.net (8.11.6/8.11.1) id g138Wra20903; Sun, 3 Feb 2002 09:32:53 +0100 Date: Sun, 3 Feb 2002 09:32:53 +0100 From: Ralf Baechle To: Girish Gulawani Cc: "MIPS/Linux List (SGI)" Subject: Re: MIPS/Linux NonSGI Message-ID: <20020203093253.J20021@dea.linux-mips.net> References: <3C505900.9685DDE3@cotw.com> <003901c1a532$d01576e0$de920dd3@gol.com> <20020124174521.B8860@dea.linux-mips.net> <007001c1a97a$6e52a9e0$c1900dd3@gol.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <007001c1a97a$6e52a9e0$c1900dd3@gol.com>; from girishvg@yahoo.com on Wed, Jan 30, 2002 at 07:39:41PM +0900 X-Accept-Language: de,en,fr Sender: owner-linux-mips@oss.sgi.com Precedence: bulk On Wed, Jan 30, 2002 at 07:39:41PM +0900, Girish Gulawani wrote: > could solve the disk corruption problem, thanks to you. it was due to my > over-confident source code for bus mastering device. while re-targeting the > driver from vxworks to linux i had introduced a bug. its all working great > now. thanks again. while this problem is solved i have one more query. > > as i mentioned earlier, our core supports page size of 16K. hence the mmu > code is changed accordingly, for kernel 2.4.9. but any command load fails > giving page alignment error. seems some problem from binfmt_elf.c file. i > have build the command, ash, using egcc-2.91.66. to change the page > alignment the option given was "--n16384". this option is surely wrong, > hence could you tell me what is correct option? HOW TO CHANGE PAGE ALIGNMENT > TO 16K WHILE LINKING USER COMMANDS?? I hate to say it but at this time we don't support any other pagesize than 4kb on MIPS. I haven't looked into details but I'd expect to hit a number of subtle bugs when we go to a larger pagesize. So I expect your way to be stony. Ralf From owner-linux-mips@oss.sgi.com Sun Feb 3 01:33:34 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g139XYm07023 for linux-mips-outgoing; Sun, 3 Feb 2002 01:33:34 -0800 Received: from sgi.com (sgi-too.SGI.COM [204.94.211.39]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g139XWA07020 for ; Sun, 3 Feb 2002 01:33:32 -0800 Received: from outboundx.mv.meer.net (outboundx.mv.meer.net [209.157.152.12]) by sgi.com (980327.SGI.8.8.8-aspam/980304.SGI-aspam: SGI does not authorize the use of its proprietary systems or networks for unsolicited or bulk email from the Internet.) via ESMTP id UAA08933 for ; Sat, 2 Feb 2002 20:51:55 -0800 (PST) mail_from (weasel@meer.net) Received: from meer.meer.net (mail.meer.net [209.157.152.14]) by outboundx.mv.meer.net (8.11.6/8.11.6) with ESMTP id g134m6X22934; Sat, 2 Feb 2002 20:48:06 -0800 (PST) (envelope-from weasel@meer.net) Received: from localhost.meer.net (ptn-133.mv.meer.net [209.157.137.133]) by meer.meer.net (8.9.3/8.9.3/meer) with ESMTP id UAA4873664; Sat, 2 Feb 2002 20:47:30 -0800 (PST) To: Eric Christopher , binutils@sources.redhat.com, linux-mips@oss.sgi.com Subject: Re: me vs gas mips64 relocation References: <1012598592.1689.33.camel@ghostwheel.cygnus.com> Reply-To: weasel@cs.stanford.edu From: d p chang Date: 02 Feb 2002 20:47:30 -0800 In-Reply-To: <1012598592.1689.33.camel@ghostwheel.cygnus.com> Message-ID: Lines: 10 User-Agent: Gnus/5.0808 (Gnus v5.8.8) Emacs/20.7 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Sender: owner-linux-mips@oss.sgi.com Precedence: bulk Eric Christopher writes: > > ideas? (other than for me to take the crack pipe out of my ass) > > You can try to help Thiemo Seufer finish n32 and n64 support in > binutils... Is there a todo or something that I could start w/? \p From owner-linux-mips@oss.sgi.com Sun Feb 3 02:31:43 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g13AVhX13308 for linux-mips-outgoing; Sun, 3 Feb 2002 02:31:43 -0800 Received: from sgi.com (sgi-too.SGI.COM [204.94.211.39]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g13AVeA13290 for ; Sun, 3 Feb 2002 02:31:40 -0800 Received: from cygnus.com (runyon.sfbay.redhat.com [205.180.230.5] (may be forged)) by sgi.com (980327.SGI.8.8.8-aspam/980304.SGI-aspam: SGI does not authorize the use of its proprietary systems or networks for unsolicited or bulk email from the Internet.) via SMTP id SAA00195 for ; Sat, 2 Feb 2002 18:34:32 -0800 (PST) mail_from (drepper@redhat.com) Received: from myware.mynet (fiendish.sfbay.redhat.com [205.180.231.146]) by runyon.cygnus.com (8.8.7-cygnus/8.8.7) with ESMTP id SAA01398; Sat, 2 Feb 2002 18:29:56 -0800 (PST) Received: (from drepper@localhost) by myware.mynet (8.11.6/8.11.6) id g132TpP17826; Sat, 2 Feb 2002 18:29:51 -0800 X-Authentication-Warning: myware.mynet: drepper set sender to drepper@redhat.com using -f To: "H . J . Lu" Cc: "Maciej W. Rozycki" , Hiroyuki Machida , libc-alpha@sources.redhat.com, linux-mips@oss.sgi.com Subject: Re: PATCH: Fix ll/sc for mips References: <20020201094025.A10392@lucon.org> <20020201144727.A15521@lucon.org> Reply-To: drepper@redhat.com (Ulrich Drepper) X-fingerprint: BE 3B 21 04 BC 77 AC F0 61 92 E4 CB AC DD B9 5A X-fingerprint: e6:49:07:36:9a:0d:b7:ba:b5:e9:06:f3:e7:e7:08:4a From: Ulrich Drepper Date: 02 Feb 2002 18:29:51 -0800 In-Reply-To: <20020201144727.A15521@lucon.org> Message-ID: Lines: 12 User-Agent: Gnus/5.0808 (Gnus v5.8.8) XEmacs/21.5 (asparagus) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Sender: owner-linux-mips@oss.sgi.com Precedence: bulk "H . J . Lu" writes: > Like this? > [...] >From what I've seen this patch was generally agreed on. I've checked it in. -- ---------------. ,-. 1325 Chesapeake Terrace Ulrich Drepper \ ,-------------------' \ Sunnyvale, CA 94089 USA Red Hat `--' drepper at redhat.com `------------------------ From owner-linux-mips@oss.sgi.com Sun Feb 3 10:02:59 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g13I2xt11590 for linux-mips-outgoing; Sun, 3 Feb 2002 10:02:59 -0800 Received: from dea.linux-mips.net (a1as04-p166.stg.tli.de [195.252.186.166]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g13I2tA11587 for ; Sun, 3 Feb 2002 10:02:56 -0800 Received: (from ralf@localhost) by dea.linux-mips.net (8.11.6/8.11.1) id g13H1pl05691; Sun, 3 Feb 2002 18:01:51 +0100 Date: Sun, 3 Feb 2002 18:01:51 +0100 From: Ralf Baechle To: Jun Sun Cc: linux-mips@oss.sgi.com Subject: Re: gcc 3.x, -ansi and "static inline" Message-ID: <20020203180151.A5371@dea.linux-mips.net> References: <20020201115206.A18085@mvista.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <20020201115206.A18085@mvista.com>; from jsun@mvista.com on Fri, Feb 01, 2002 at 11:52:06AM -0800 X-Accept-Language: de,en,fr Sender: owner-linux-mips@oss.sgi.com Precedence: bulk On Fri, Feb 01, 2002 at 11:52:06AM -0800, Jun Sun wrote: > BTW, the inclusion of "mipsregs.h" file in bitops.h seems unnecessary > and caused a bunch of similar errors. Indeed, it was pointless and I therefore removed it. Ralf From owner-linux-mips@oss.sgi.com Sun Feb 3 11:38:30 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g13JcUj03259 for linux-mips-outgoing; Sun, 3 Feb 2002 11:38:30 -0800 Received: from dea.linux-mips.net (a1as09-p51.stg.tli.de [195.252.189.51]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g13JcQA03256 for ; Sun, 3 Feb 2002 11:38:26 -0800 Received: (from ralf@localhost) by dea.linux-mips.net (8.11.6/8.11.1) id g13IbHY06652; Sun, 3 Feb 2002 19:37:17 +0100 Date: Sun, 3 Feb 2002 19:37:17 +0100 From: Ralf Baechle To: "Maciej W. Rozycki" Cc: linux-mips@oss.sgi.com Subject: Re: CVS Update@oss.sgi.com: linux Message-ID: <20020203193717.B6317@dea.linux-mips.net> References: <200202022138.g12LcZU24388@oss.sgi.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: ; from macro@ds2.pg.gda.pl on Sun, Feb 03, 2002 at 07:18:01PM +0100 X-Accept-Language: de,en,fr Sender: owner-linux-mips@oss.sgi.com Precedence: bulk On Sun, Feb 03, 2002 at 07:18:01PM +0100, Maciej W. Rozycki wrote: > > Log message: > > i8259.c assumes that i8259 are interrupt 0 to 15. Change DDB5476 > > code accordingly. > > Hmm, the assumption might be justifiable for the i386 only? Shouldn't > i8259.c be fixed instead? These are the ISA interrupts; many drivers make assumptions about the interrupts numbers, so we can't really change the numbers anyway. For any non-ISA interrupt it's number can be choosen freely. Ralf From owner-linux-mips@oss.sgi.com Sun Feb 3 16:29:44 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g140Til20174 for linux-mips-outgoing; Sun, 3 Feb 2002 16:29:44 -0800 Received: from mms1.broadcom.com (mms1.broadcom.com [63.70.210.58]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g140TXA20000 for ; Sun, 3 Feb 2002 16:29:33 -0800 Received: from 63.70.210.1 by mms1.broadcom.com with ESMTP (Broadcom MMS-1 SMTP Relay (MMS v4.7)); Sun, 03 Feb 2002 15:29:13 -0800 X-Server-Uuid: 1e1caf3a-b686-11d4-a6a3-00508bfc9ae5 Received: from dt-sj3-118.sj.broadcom.com (dt-sj3-118 [10.21.64.118]) by mail-sj1-5.sj.broadcom.com (8.12.2/8.12.2) with ESMTP id g13NTSKf006263; Sun, 3 Feb 2002 15:29:28 -0800 (PST) Received: (from cgd@localhost) by dt-sj3-118.sj.broadcom.com ( 8.9.1/SJ8.9.1) id PAA19089; Sun, 3 Feb 2002 15:29:28 -0800 (PST) To: hjl@lucon.org cc: "Justin Carlson" , "Daniel Jacobowitz" , "Maciej W. Rozycki" , "Hiroyuki Machida" , libc-alpha@sources.redhat.com, linux-mips@oss.sgi.com, gcc@gcc.gnu.org Subject: Re: PATCH: Fix ll/sc for mips (take 3) References: <20020131231714.E32690@lucon.org> <20020201102943.A11146@lucon.org> <20020201180126.A23740@nevyn.them.org> <20020201151513.A15913@lucon.org> <20020201222657.A13339@nevyn.them.org> <1012676003.1563.6.camel@xyzzy.stargate.net> <20020202120354.A1522@lucon.org> From: cgd@broadcom.com Date: 03 Feb 2002 15:29:28 -0800 In-Reply-To: hjl@lucon.org's message of "Sat, 2 Feb 2002 20:04:10 +0000 (UTC)" Message-ID: Lines: 54 X-Mailer: Gnus v5.7/Emacs 20.4 MIME-Version: 1.0 X-WSS-ID: 104318431312682-01-01 Content-Type: text/plain Content-Transfer-Encoding: 7bit Sender: owner-linux-mips@oss.sgi.com Precedence: bulk [ Hi Justin, enjoying winter in pgh? 8-] At Sat, 2 Feb 2002 20:04:10 +0000 (UTC), "H . J . Lu" wrote: > Does everyone agree with this? If yes, I can make a patch not to use > branch likely. But on the other hand, "gcc -mips2" will generate code > using branch likely. If branch likely doesn't buy you anything, > shouldn't we change gcc not to generate branch likely instructions? Branch-likely instructions probably _do_ buy you something (at least, slightly less code size) on some CPUs, probably even some CPUs which are still being produced. FYI, somebody, i think it was Mike Stump, submitted a patch to add a flag to disable branch-likely instructions N months ago. It was discussed a little bit, not AFAIK nothing was ever done with it. To quote the MIPS32 instruction set document from the MIPS web site: > Programming Notes: > > [ ... ] > > Software is strongly encouraged to avoid the use of the Branch > Likely instructions, as they will be removed from a future revision > of the MIPS Architecture. > > Some implementations always predict the branch will be taken, so > there is a significant penalty if the branch is not taken. Software > should only use this instruction when there is a very high > probability (98% or more) that the branch will be taken. If the > branch is not likely to be taken or if the probability of a taken > branch is unknown, software is encouraged to use the BGEZAL > instruction instead. If you have a sufficiently high static likelyhood of branch-taken, it may well be worthwhile to use branch-likely even on MIPS32/MIPS64 if it'll save you code space, or if you can determine that not clogging up your branch history / predictor buffers makes your code run faster. However, it should definitely not be the default. Anyway, from where I sit, this should be resolved like: * -mips1 - -mips5 should generate them by default (for strongly-predicted branches), -mips32 & -mips64 should not. (modify that for your favorite flag names, -march or whatever. 8-) * There should be flags to override the defaults either way, so you could say -mips2 -mno-branch-likely, or -mips32 -mbranch-likely. cgd From owner-linux-mips@oss.sgi.com Sun Feb 3 20:20:43 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g144KhT12057 for linux-mips-outgoing; Sun, 3 Feb 2002 20:20:43 -0800 Received: from dtla2.teknuts.com (adsl-66-125-62-110.dsl.lsan03.pacbell.net [66.125.62.110]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g144KeA11997 for ; Sun, 3 Feb 2002 20:20:40 -0800 Received: from delllaptop ([208.187.134.82]) (authenticated) by dtla2.teknuts.com (8.11.3/8.10.1) with ESMTP id g143KfF10060 for ; Sun, 3 Feb 2002 19:20:41 -0800 From: "Robert Rusek" To: Subject: RPM Problems Date: Sun, 3 Feb 2002 19:21:09 -0800 Message-ID: <001301c1ad2a$feb2b1c0$6701a8c0@delllaptop> 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.3416 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 Importance: Normal Sender: owner-linux-mips@oss.sgi.com Precedence: bulk I am getting a Segmentation fault (core dumped) when trying to run rpm -i or -u. What dependencies does rpm use? I figure it may be a program that rpm is dependent on that is causing the error. Any help would be much appreciated. Without rpm I am dead in the water. Thanks -- Robert Rusek From owner-linux-mips@oss.sgi.com Sun Feb 3 23:46:04 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g147k4Q23049 for linux-mips-outgoing; Sun, 3 Feb 2002 23:46:04 -0800 Received: from mail.ict.ac.cn ([159.226.39.4]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g147k0A23002 for ; Sun, 3 Feb 2002 23:46:01 -0800 Message-Id: <200202040746.g147k0A23002@oss.sgi.com> Received: (qmail 19041 invoked from network); 4 Feb 2002 06:26:07 -0000 Received: from unknown (HELO foxsen) (@159.226.40.150) by 159.226.39.4 with SMTP; 4 Feb 2002 06:26:07 -0000 Date: Mon, 4 Feb 2002 14:22:48 +0800 From: Zhang Fuxin To: "linux-mips@oss.sgi.com" Subject: SNaN & QNaN on mips X-mailer: FoxMail 3.11 Release [cn] Mime-Version: 1.0 Content-Type: text/plain; charset="GB2312" Content-Transfer-Encoding: 7bit Sender: owner-linux-mips@oss.sgi.com Precedence: bulk hi, Gcc (2.96 20000731,H.J.LU's rh port for mips) think 0x7fc00000 is QNaN and optimize 0.0/0.0 as 0x7fc00000 for single precision ops,while for my cpu (maybe most mips cpu) is a SNaN. R4k user's manual and "See Mips Run" both say so.And experiments confirm this. Should we correct it? > >Regards > Zhang Fuxin > fxzhang@ict.ac.cn Regards Zhang Fuxin fxzhang@ict.ac.cn From owner-linux-mips@oss.sgi.com Sun Feb 3 23:45:57 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g147jvD22915 for linux-mips-outgoing; Sun, 3 Feb 2002 23:45:57 -0800 Received: from ocean.lucon.org (12-234-19-19.client.attbi.com [12.234.19.19]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g147jtA22893 for ; Sun, 3 Feb 2002 23:45:55 -0800 Received: by ocean.lucon.org (Postfix, from userid 1000) id 8C8CF125C8; Sun, 3 Feb 2002 22:45:52 -0800 (PST) Date: Sun, 3 Feb 2002 22:45:52 -0800 From: "H . J . Lu" To: linux-mips@oss.sgi.com Subject: Please try new libtool Message-ID: <20020203224552.A4998@lucon.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i Sender: owner-linux-mips@oss.sgi.com Precedence: bulk I put a new libtool at ftp://oss.sgi.com/pub/linux/mips/redhat/7.1/SRPMS/libtool-1.3.5-8.3.src.rpm I think I have fixed the shared library problem. Please verify it and let me know. Thanks. H.J. From owner-linux-mips@oss.sgi.com Sun Feb 3 23:55:00 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g147t0031248 for linux-mips-outgoing; Sun, 3 Feb 2002 23:55:00 -0800 Received: from ocean.lucon.org (12-234-19-19.client.attbi.com [12.234.19.19]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g147svA31223 for ; Sun, 3 Feb 2002 23:54:57 -0800 Received: by ocean.lucon.org (Postfix, from userid 1000) id A7D26125C8; Sun, 3 Feb 2002 22:54:54 -0800 (PST) Date: Sun, 3 Feb 2002 22:54:54 -0800 From: "H . J . Lu" To: Zhang Fuxin Cc: "linux-mips@oss.sgi.com" Subject: Re: SNaN & QNaN on mips Message-ID: <20020203225454.A5158@lucon.org> References: <200202040746.g147k0A23002@oss.sgi.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <200202040746.g147k0A23002@oss.sgi.com>; from fxzhang@ict.ac.cn on Mon, Feb 04, 2002 at 02:22:48PM +0800 Sender: owner-linux-mips@oss.sgi.com Precedence: bulk On Mon, Feb 04, 2002 at 02:22:48PM +0800, Zhang Fuxin wrote: > hi, > > Gcc (2.96 20000731,H.J.LU's rh port for mips) think 0x7fc00000 is QNaN and > optimize 0.0/0.0 as 0x7fc00000 for single precision ops,while for my cpu > (maybe most mips cpu) is a SNaN. R4k user's manual and "See Mips Run" both > say so.And experiments confirm this. > > Should we correct it? Yes. Do you have a patch? Thanks. H.J. From owner-linux-mips@oss.sgi.com Mon Feb 4 00:00:31 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g1480Vb03985 for linux-mips-outgoing; Mon, 4 Feb 2002 00:00:31 -0800 Received: from coplin19.mips.com ([80.63.7.130]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g1480NA03910 for ; Mon, 4 Feb 2002 00:00:24 -0800 Received: from localhost (kjelde@localhost) by coplin19.mips.com (8.11.6/8.11.6) with ESMTP id g146x6U03946; Mon, 4 Feb 2002 07:59:06 +0100 X-Authentication-Warning: coplin19.mips.com: kjelde owned process doing -bs Date: Mon, 4 Feb 2002 07:59:06 +0100 (CET) From: Kjeld Borch Egevang To: Zhang Fuxin cc: "linux-mips@oss.sgi.com" Subject: Re: SNaN & QNaN on mips In-Reply-To: <200202040746.g147k0A23002@oss.sgi.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-linux-mips@oss.sgi.com Precedence: bulk On Mon, 4 Feb 2002, Zhang Fuxin wrote: > hi, > > Gcc (2.96 20000731,H.J.LU's rh port for mips) think 0x7fc00000 is QNaN and > optimize 0.0/0.0 as 0x7fc00000 for single precision ops,while for my cpu > (maybe most mips cpu) is a SNaN. R4k user's manual and "See Mips Run" both > say so.And experiments confirm this. MIPS interprets Signalling NaN's different than e.g. Intel. According to IEEE754 it _is_ a matter of interpretation. 0x7fc00000 is an SNaN while 0x7fbfffff is an QNaN. It would be great if you could fix it. /Kjeld > Should we correct it? > > > > >Regards > > Zhang Fuxin > > fxzhang@ict.ac.cn > > Regards > Zhang Fuxin > fxzhang@ict.ac.cn > -- _ _ ____ ___ Mailto:kjelde@mips.com |\ /|||___)(___ MIPS Denmark Direct: +45 44 86 55 85 | \/ ||| ____) Lautrupvang 4 B Switch: +45 44 86 55 55 TECHNOLOGIES DK-2750 Ballerup Fax...: +45 44 86 55 56 Denmark http://www.mips.com/ From owner-linux-mips@oss.sgi.com Mon Feb 4 01:54:00 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g149s0D18077 for linux-mips-outgoing; Mon, 4 Feb 2002 01:54:00 -0800 Received: from mail.ict.ac.cn ([159.226.39.4]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g149rrA17976 for ; Mon, 4 Feb 2002 01:53:56 -0800 Message-Id: <200202040953.g149rrA17976@oss.sgi.com> Received: (qmail 2779 invoked from network); 4 Feb 2002 08:54:06 -0000 Received: from unknown (HELO foxsen) (@159.226.40.150) by 159.226.39.4 with SMTP; 4 Feb 2002 08:54:06 -0000 Date: Mon, 4 Feb 2002 16:50:43 +0800 From: Zhang Fuxin To: "H . J . Lu" CC: "linux-mips@oss.sgi.com" Subject: Re: Re: SNaN & QNaN on mips X-mailer: FoxMail 3.11 Release [cn] Mime-Version: 1.0 Content-Type: text/plain; charset="GB2312" Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by oss.sgi.com id g149ruA18014 Sender: owner-linux-mips@oss.sgi.com Precedence: bulk ÔÚ 2002-02-03 22:54:00 you wrote£º >On Mon, Feb 04, 2002 at 02:22:48PM +0800, Zhang Fuxin wrote: >> hi, >> >> Gcc (2.96 20000731,H.J.LU's rh port for mips) think 0x7fc00000 is QNaN and >> optimize 0.0/0.0 as 0x7fc00000 for single precision ops,while for my cpu >> (maybe most mips cpu) is a SNaN. R4k user's manual and "See Mips Run" both >> say so.And experiments confirm this. >> >> Should we correct it? > >Yes. Do you have a patch? Not currently but I will have a try. glibc seems having the same problem. > >Thanks. > > >H.J. Regards Zhang Fuxin fxzhang@ict.ac.cn From owner-linux-mips@oss.sgi.com Mon Feb 4 02:32:52 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g14AWqY24591 for linux-mips-outgoing; Mon, 4 Feb 2002 02:32:52 -0800 Received: from oval.algor.co.uk (root@oval.algor.co.uk [62.254.210.250]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g14AWjA24547 for ; Mon, 4 Feb 2002 02:32:45 -0800 Received: from gladsmuir.algor.co.uk.algor.co.uk (IDENT:dom@gladsmuir.algor.co.uk [192.168.5.75]) by oval.algor.co.uk (8.11.6/8.10.1) with ESMTP id g149Waa27266; Mon, 4 Feb 2002 09:32:37 GMT From: Dominic Sweetman Message-ID: <15454.21812.39310.478616@gladsmuir.algor.co.uk> Date: Mon, 4 Feb 2002 09:32:36 +0000 MIME-Version: 1.0 To: Hiroyuki Machida Cc: hjl@lucon.org, linux-mips@oss.sgi.com Subject: Re: PATCH: Fix ll/sc for mips (take 3) In-Reply-To: <20020202.113717.68552217.machida@sm.sony.co.jp> References: <20020201102943.A11146@lucon.org> <20020201180126.A23740@nevyn.them.org> <20020201151513.A15913@lucon.org> <20020202.113717.68552217.machida@sm.sony.co.jp> X-Mailer: VM 6.89 under 21.1 (patch 14) "Cuyahoga Valley" XEmacs Lucid User-Agent: SEMI/1.13.7 (Awazu) CLIME/1.13.6 (=?ISO-2022-JP?B?GyRCQ2YbKEI=?= =?ISO-2022-JP?B?GyRCJU4+MRsoQg==?=) MULE XEmacs/21.1 (patch 14) (Cuyahoga Valley) (i386-redhat-linux) Content-Type: text/plain; charset=US-ASCII Sender: owner-linux-mips@oss.sgi.com Precedence: bulk Hiroyuki Machida (machida@sm.sony.co.jp) writes: > I think we can assume CPU has branch-likely insns, if CPU has MIPS > ISA 2 or greater ISA.. "MIPS II" is officially the instruction set introduced for the long lost R6000 CPU. But "MIPS II" is now used to mean "the 32-bit subset of MIPS III" (which is extremely close to the same thing, but I'm never quite sure about the last details of the R6000 - Kevin would remember better, probably). OK: branch-likely is definitely part of MIPS II and MIPS32. There are still MIPS CPUs in regular use which are based on MIPS I and don't provide them. Generally the advantages of MIPS II are slight, so if you want to build a kernel which will not require instruction-set variants, it's no big deal to restrict it to MIPS I. > (FYI: we can't assume CPU has LL/SC even if CPU has branch-likely > insns. ) LL/SC is also part of MIPS III (and the 32-bit variants are thus taken to be in MIPS II). Unfortunately, the documentation of LL/SC gave the impression that they were useful only in multiprocessor systems, so they were omitted by NEC building the Vr41xx and Toshiba's R59xx. In both cases it's a bug - but since it isn't about to be fixed, you need workarounds. In these more enlightened days, CPU vendors are more likely to ask an operating system person before they leave out bits of the instruction set, so we hope it won't happen again! Dominic Sweetman Algorithmics Ltd The Fruit Farm, Ely Road, Chittering, CAMBS CB5 9PH, ENGLAND phone: +44 1223 706200 / fax: +44 1223 706250 / direct: +44 1223 706205 http://www.algor.co.uk From owner-linux-mips@oss.sgi.com Mon Feb 4 02:47:06 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g14Al6M07468 for linux-mips-outgoing; Mon, 4 Feb 2002 02:47:06 -0800 Received: from oval.algor.co.uk (root@oval.algor.co.uk [62.254.210.250]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g14AkvA07339 for ; Mon, 4 Feb 2002 02:46:58 -0800 Received: from gladsmuir.algor.co.uk.algor.co.uk (IDENT:dom@gladsmuir.algor.co.uk [192.168.5.75]) by oval.algor.co.uk (8.11.6/8.10.1) with ESMTP id g149kma27958; Mon, 4 Feb 2002 09:46:50 GMT From: Dominic Sweetman Message-ID: <15454.22661.855423.532827@gladsmuir.algor.co.uk> Date: Mon, 4 Feb 2002 09:46:45 +0000 MIME-Version: 1.0 To: cgd@broadcom.com Cc: linux-mips@oss.sgi.com Subject: Re: PATCH: Fix ll/sc for mips (take 3) In-Reply-To: References: <20020131231714.E32690@lucon.org> <20020201102943.A11146@lucon.org> <20020201180126.A23740@nevyn.them.org> <20020201151513.A15913@lucon.org> <20020201222657.A13339@nevyn.them.org> <1012676003.1563.6.camel@xyzzy.stargate.net> <20020202120354.A1522@lucon.org> X-Mailer: VM 6.89 under 21.1 (patch 14) "Cuyahoga Valley" XEmacs Lucid User-Agent: SEMI/1.13.7 (Awazu) CLIME/1.13.6 (=?ISO-2022-JP?B?GyRCQ2YbKEI=?= =?ISO-2022-JP?B?GyRCJU4+MRsoQg==?=) MULE XEmacs/21.1 (patch 14) (Cuyahoga Valley) (i386-redhat-linux) Content-Type: text/plain; charset=US-ASCII Sender: owner-linux-mips@oss.sgi.com Precedence: bulk cgd@broadcom.com (cgd@broadcom.com) writes: > Branch-likely instructions probably _do_ buy you something (at > least, slightly less code size) on some CPUs, probably even some > CPUs which are still being produced. Here's how branch likely is used to improve performance in a simple MIPS CPU, and why it has no effect on code size. You start off with this: loopstart: insn 1 insn 2 .... insn last branch to loopstart nop In small loops, the last instruction in the loop might well calculate the branch condition, so it can't be moved into the delay slot of the loop-closing branch. That puts a no-op into every loop iteration. With branch-likely, you can transform the loop to loopstart: insn 1 loop2: insn 2 .... insn last branch-likely loop2 insn 1 (copy) The nop is replaced by a duplicate instruction from the top of the loop. Good for performance, no effect on code size. Builders of clever modern CPUs full of branch prediction hardware, multiple instruction issue and instruction re-ordering find the coupling of the branch-likely to the following instruction makes their CPUs more complicated. That's why MIPS have warned that the instructions will be removed from some future version of the MIPS instruction set. -- Dominic Sweetman Algorithmics Ltd The Fruit Farm, Ely Road, Chittering, CAMBS CB5 9PH, ENGLAND phone: +44 1223 706200 / fax: +44 1223 706250 / direct: +44 1223 706205 http://www.algor.co.uk From owner-linux-mips@oss.sgi.com Mon Feb 4 04:33:09 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g14CX9X10429 for linux-mips-outgoing; Mon, 4 Feb 2002 04:33:09 -0800 Received: from delta.ds2.pg.gda.pl (macro@delta.ds2.pg.gda.pl [213.192.72.1]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g14CWxA10273; Mon, 4 Feb 2002 04:33:00 -0800 Received: from localhost by delta.ds2.pg.gda.pl (8.9.3/8.9.3) with SMTP id MAA09990; Mon, 4 Feb 2002 12:32:41 +0100 (MET) Date: Mon, 4 Feb 2002 12:32:40 +0100 (MET) From: "Maciej W. Rozycki" To: Ralf Baechle cc: linux-mips@oss.sgi.com Subject: Re: CVS Update@oss.sgi.com: linux In-Reply-To: <20020203193717.B6317@dea.linux-mips.net> Message-ID: Organization: Technical University of Gdansk MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-linux-mips@oss.sgi.com Precedence: bulk On Sun, 3 Feb 2002, Ralf Baechle wrote: > > Hmm, the assumption might be justifiable for the i386 only? Shouldn't > > i8259.c be fixed instead? > > These are the ISA interrupts; many drivers make assumptions about the > interrupts numbers, so we can't really change the numbers anyway. For > any non-ISA interrupt it's number can be choosen freely. I don't think such assumptions are sane even for the i386 -- an I/O APIC system is free to route ISA interrupts to whichever I/O APIC inputs are available, not necessarily the low 16. The Intel MP Spec explicitly allows such a setup -- ISA interrupts are only tied in default configurations, which are rarely used (probably not at all these days). Anyway, only the drivers that read an IRQ number from jumpers or Flash memory need to be checked, and these are a minority (3Com Ethernet cards and possibly very few others). These that do probing (with probe_irq) or simply take the number from an option will work automatically. While I agree for 2.4 it might be not the best idea to do such changes, for 2.5 it's worth considering, isn't it? -- + Maciej W. Rozycki, Technical University of Gdansk, Poland + +--------------------------------------------------------------+ + e-mail: macro@ds2.pg.gda.pl, PGP key available + From owner-linux-mips@oss.sgi.com Mon Feb 4 05:11:12 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g14DBCP08384 for linux-mips-outgoing; Mon, 4 Feb 2002 05:11:12 -0800 Received: from delta.ds2.pg.gda.pl (macro@delta.ds2.pg.gda.pl [213.192.72.1]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g14DAgA08143 for ; Mon, 4 Feb 2002 05:10:42 -0800 Received: from localhost by delta.ds2.pg.gda.pl (8.9.3/8.9.3) with SMTP id NAA11331; Mon, 4 Feb 2002 13:10:25 +0100 (MET) Date: Mon, 4 Feb 2002 13:10:25 +0100 (MET) From: "Maciej W. Rozycki" To: linux-mips@fnet.fr, linux-mips@oss.sgi.com cc: Ralf Baechle Subject: [patch] linux 2.4.17: The second mb() rework Message-ID: Organization: Technical University of Gdansk MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-linux-mips@oss.sgi.com Precedence: bulk Hello, Here is the second version of the mb() approach again. It adds iob() as the strongest barrier, implying committing all writes to the CPU bus. I consider this version final. Any objections (barring "sync" workarounds we may consider later)? Maciej -- + Maciej W. Rozycki, Technical University of Gdansk, Poland + +--------------------------------------------------------------+ + e-mail: macro@ds2.pg.gda.pl, PGP key available + patch-mips-2.4.17-20020129-mb-wb-5 diff -up --recursive --new-file linux-mips-2.4.17-20020129.macro/arch/mips/config.in linux-mips-2.4.17-20020129/arch/mips/config.in --- linux-mips-2.4.17-20020129.macro/arch/mips/config.in Fri Jan 25 05:26:34 2002 +++ linux-mips-2.4.17-20020129/arch/mips/config.in Mon Feb 4 00:07:13 2002 @@ -384,6 +384,12 @@ else fi fi fi +if [ "$CONFIG_CPU_R3000" = "y" -o \ + "$CONFIG_CPU_TX39XX" = "y" ]; then + define_bool CONFIG_CPU_HAS_SYNC n +else + define_bool CONFIG_CPU_HAS_SYNC y +fi endmenu mainmenu_option next_comment diff -up --recursive --new-file linux-mips-2.4.17-20020129.macro/include/asm-mips/system.h linux-mips-2.4.17-20020129/include/asm-mips/system.h --- linux-mips-2.4.17-20020129.macro/include/asm-mips/system.h Sun Jan 27 05:27:59 2002 +++ linux-mips-2.4.17-20020129/include/asm-mips/system.h Mon Feb 4 02:10:33 2002 @@ -18,9 +18,12 @@ #include #include -#include + #include +#include +#include + __asm__ ( ".macro\t__sti\n\t" ".set\tpush\n\t" @@ -166,32 +169,57 @@ extern void __global_restore_flags(unsig #define local_irq_disable() __cli(); #define local_irq_enable() __sti(); -/* - * These are probably defined overly paranoid ... - */ +#ifdef CONFIG_CPU_HAS_SYNC +#define __sync() \ + __asm__ __volatile__( \ + ".set push\n\t" \ + ".set noreorder\n\t" \ + "sync\n\t" \ + ".set pop" \ + : /* no output */ \ + : /* no input */ \ + : "memory") +#else +#define __sync() do { } while(0) +#endif + +#define __fast_iob() \ + __asm__ __volatile__( \ + ".set push\n\t" \ + ".set noreorder\n\t" \ + "lw $0,%0\n\t" \ + "nop\n\t" \ + ".set pop" \ + : /* no output */ \ + : "m" (*(int *)KSEG1) \ + : "memory") + +#define fast_wmb() __sync() +#define fast_rmb() __sync() +#define fast_mb() __sync() +#define fast_iob() \ + do { \ + __sync(); \ + __fast_iob(); \ + } while (0) + #ifdef CONFIG_CPU_HAS_WB #include -#define rmb() do { } while(0) -#define wmb() wbflush() -#define mb() wbflush() - -#else /* CONFIG_CPU_HAS_WB */ - -#define mb() \ -__asm__ __volatile__( \ - "# prevent instructions being moved around\n\t" \ - ".set\tnoreorder\n\t" \ - "# 8 nops to fool the R4400 pipeline\n\t" \ - "nop;nop;nop;nop;nop;nop;nop;nop\n\t" \ - ".set\treorder" \ - : /* no output */ \ - : /* no input */ \ - : "memory") -#define rmb() mb() -#define wmb() mb() -#endif /* CONFIG_CPU_HAS_WB */ +#define wmb() fast_wmb() +#define rmb() fast_rmb() +#define mb() wbflush(); +#define iob() wbflush(); + +#else /* !CONFIG_CPU_HAS_WB */ + +#define wmb() fast_wmb() +#define rmb() fast_rmb() +#define mb() fast_mb() +#define iob() fast_iob() + +#endif /* !CONFIG_CPU_HAS_WB */ #ifdef CONFIG_SMP #define smp_mb() mb() diff -up --recursive --new-file linux-mips-2.4.17-20020129.macro/include/asm-mips/wbflush.h linux-mips-2.4.17-20020129/include/asm-mips/wbflush.h --- linux-mips-2.4.17-20020129.macro/include/asm-mips/wbflush.h Fri Sep 7 04:26:33 2001 +++ linux-mips-2.4.17-20020129/include/asm-mips/wbflush.h Mon Feb 4 02:52:11 2002 @@ -6,29 +6,30 @@ * for more details. * * Copyright (c) 1998 Harald Koerfgen + * Copyright (C) 2002 Maciej W. Rozycki */ #ifndef __ASM_MIPS_WBFLUSH_H #define __ASM_MIPS_WBFLUSH_H #include -#if defined(CONFIG_CPU_HAS_WB) -/* - * R2000 or R3000 - */ -extern void (*__wbflush) (void); +#ifdef CONFIG_CPU_HAS_WB -#define wbflush() __wbflush() +extern void (*__wbflush)(void); +extern void wbflush_setup(void); -#else -/* - * we don't need no stinkin' wbflush - */ +#define wbflush() \ + do { \ + __sync(); \ + __wbflush(); \ + } while (0) -#define wbflush() do { } while(0) +#else /* !CONFIG_CPU_HAS_WB */ -#endif +#define wbflush_setup() do { } while (0) -extern void wbflush_setup(void); +#define wbflush() fast_iob() + +#endif /* !CONFIG_CPU_HAS_WB */ #endif /* __ASM_MIPS_WBFLUSH_H */ diff -up --recursive --new-file linux-mips-2.4.17-20020129.macro/include/asm-mips64/system.h linux-mips-2.4.17-20020129/include/asm-mips64/system.h --- linux-mips-2.4.17-20020129.macro/include/asm-mips64/system.h Sun Jan 27 05:27:59 2002 +++ linux-mips-2.4.17-20020129/include/asm-mips64/system.h Mon Feb 4 02:12:27 2002 @@ -11,12 +11,13 @@ #define _ASM_SYSTEM_H #include - #include -#include #include +#include +#include + __asm__ ( ".macro\t__sti\n\t" ".set\tpush\n\t" @@ -163,20 +164,32 @@ extern void __global_restore_flags(unsig #define local_irq_disable() __cli(); #define local_irq_enable() __sti(); -/* - * These are probably defined overly paranoid ... - */ -#define mb() \ -__asm__ __volatile__( \ - "# prevent instructions being moved around\n\t" \ - ".set\tnoreorder\n\t" \ - "sync\n\t" \ - ".set\treorder" \ - : /* no output */ \ - : /* no input */ \ - : "memory") -#define rmb() mb() -#define wmb() mb() +#define __sync() \ + __asm__ __volatile__( \ + ".set push\n\t" \ + ".set noreorder\n\t" \ + "sync\n\t" \ + ".set pop" \ + : /* no output */ \ + : /* no input */ \ + : "memory") + +#define wmb() __sync() +#define rmb() __sync() +#define mb() __sync() +#define iob() \ + do { \ + __sync(); \ + __asm__ __volatile__( \ + ".set push\n\t" \ + ".set noreorder\n\t" \ + "lw $0,%0\n\t" \ + "nop\n\t" \ + ".set pop" \ + : /* no output */ \ + : "m" (*(int *)KSEG1) \ + : "memory"); \ + } while (0) #ifdef CONFIG_SMP #define smp_mb() mb() From owner-linux-mips@oss.sgi.com Mon Feb 4 05:20:28 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g14DKSf16032 for linux-mips-outgoing; Mon, 4 Feb 2002 05:20:28 -0800 Received: from dea.linux-mips.net (a1as01-p54.stg.tli.de [195.252.185.54]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g14DKNA15981 for ; Mon, 4 Feb 2002 05:20:24 -0800 Received: (from ralf@localhost) by dea.linux-mips.net (8.11.6/8.11.1) id g1471j719209; Mon, 4 Feb 2002 08:01:45 +0100 Date: Mon, 4 Feb 2002 08:01:45 +0100 From: Ralf Baechle To: "H . J . Lu" Cc: Hiroyuki Machida , macro@ds2.pg.gda.pl, libc-alpha@sources.redhat.com, linux-mips@oss.sgi.com Subject: Re: PATCH: Fix ll/sc for mips Message-ID: <20020204080145.C13799@dea.linux-mips.net> References: <20020131123547.A22759@lucon.org> <20020131144100.A24634@lucon.org> <20020201.123523.50041631.machida@sm.sony.co.jp> <20020131231714.E32690@lucon.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <20020131231714.E32690@lucon.org>; from hjl@lucon.org on Thu, Jan 31, 2002 at 11:17:14PM -0800 X-Accept-Language: de,en,fr Sender: owner-linux-mips@oss.sgi.com Precedence: bulk On Thu, Jan 31, 2002 at 11:17:14PM -0800, H . J . Lu wrote: > > Gas will fill delay slots. Same object codes will be produced, so I > > think you don't have to do that by hand. > > It will make the code more readable. We don't have to guess what > the assembler will do. Generally speaking a MIPS assembler is free to do arbitrary reordering. In the past there have been non-GNU assembler that were doing more massive reordering than gcc does ... Using .set noreorder means you dump the assembler's intelligence and take full responsibility for dealing with all interlocks (or the lack thereof) and other performance issues yourself. Ralf From owner-linux-mips@oss.sgi.com Mon Feb 4 05:20:59 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g14DKxZ16534 for linux-mips-outgoing; Mon, 4 Feb 2002 05:20:59 -0800 Received: from dea.linux-mips.net (a1as01-p54.stg.tli.de [195.252.185.54]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g14DKsA16468 for ; Mon, 4 Feb 2002 05:20:54 -0800 Received: (from ralf@localhost) by dea.linux-mips.net (8.11.6/8.11.1) id g146kJh19091; Mon, 4 Feb 2002 07:46:19 +0100 Date: Mon, 4 Feb 2002 07:46:19 +0100 From: Ralf Baechle To: Justin Carlson Cc: Daniel Jacobowitz , "H . J . Lu" , "Maciej W. Rozycki" , Hiroyuki Machida , libc-alpha@sources.redhat.com, linux-mips@oss.sgi.com Subject: Re: PATCH: Fix ll/sc for mips (take 3) Message-ID: <20020204074619.B13799@dea.linux-mips.net> References: <20020131231714.E32690@lucon.org> <20020201102943.A11146@lucon.org> <20020201180126.A23740@nevyn.them.org> <20020201151513.A15913@lucon.org> <20020201222657.A13339@nevyn.them.org> <1012676003.1563.6.camel@xyzzy.stargate.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <1012676003.1563.6.camel@xyzzy.stargate.net>; from justinca@ri.cmu.edu on Sat, Feb 02, 2002 at 01:53:23PM -0500 X-Accept-Language: de,en,fr Sender: owner-linux-mips@oss.sgi.com Precedence: bulk On Sat, Feb 02, 2002 at 01:53:23PM -0500, Justin Carlson wrote: > 2) More importantly, most implementations don't use any sort of dynamic > branch prediction on branch likelies. They predict taken, always, since > that's the specified intent (it's a branch *likely* to be taken). CPU guys hate branch likely and would probably love if whoever invented them hires at Intel ;-) > For most spin locks, the normal behaviour is a fall through, not taking > that branch, so you're inflicting a branch mispredict penalty on every > lock grabbed without contention. Even for locks which the general case > is contention, giving the processor branch predictor a chance to learn > that is a Good Idea. I was thinking about spinlocks like retry: la addrreg, retry ll reg, lockvar ... sc reg, lockvar teq $0, reg That would depend on the price of a trap instruction when it's not taken and the probability of the lock being congested. Ralf From owner-linux-mips@oss.sgi.com Mon Feb 4 05:21:31 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g14DLVq17058 for linux-mips-outgoing; Mon, 4 Feb 2002 05:21:31 -0800 Received: from dea.linux-mips.net (a1as01-p54.stg.tli.de [195.252.185.54]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g14DLQA16969 for ; Mon, 4 Feb 2002 05:21:26 -0800 Received: (from ralf@localhost) by dea.linux-mips.net (8.11.6/8.11.1) id g1467fO18828; Mon, 4 Feb 2002 07:07:41 +0100 Date: Mon, 4 Feb 2002 07:07:41 +0100 From: Ralf Baechle To: cgd@broadcom.com Cc: hjl@lucon.org, Justin Carlson , Daniel Jacobowitz , "Maciej W. Rozycki" , Hiroyuki Machida , libc-alpha@sources.redhat.com, linux-mips@oss.sgi.com, gcc@gcc.gnu.org Subject: Re: PATCH: Fix ll/sc for mips (take 3) Message-ID: <20020204070741.A13799@dea.linux-mips.net> References: <20020131231714.E32690@lucon.org> <20020201102943.A11146@lucon.org> <20020201180126.A23740@nevyn.them.org> <20020201151513.A15913@lucon.org> <20020201222657.A13339@nevyn.them.org> <1012676003.1563.6.camel@xyzzy.stargate.net> <20020202120354.A1522@lucon.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: ; from cgd@broadcom.com on Sun, Feb 03, 2002 at 03:29:28PM -0800 X-Accept-Language: de,en,fr Sender: owner-linux-mips@oss.sgi.com Precedence: bulk On Sun, Feb 03, 2002 at 03:29:28PM -0800, cgd@broadcom.com wrote: > At Sat, 2 Feb 2002 20:04:10 +0000 (UTC), "H . J . Lu" wrote: > > Does everyone agree with this? If yes, I can make a patch not to use > > branch likely. But on the other hand, "gcc -mips2" will generate code > > using branch likely. If branch likely doesn't buy you anything, > > shouldn't we change gcc not to generate branch likely instructions? > > Branch-likely instructions probably _do_ buy you something (at least, > slightly less code size) on some CPUs, probably even some CPUs which > are still being produced. I benchmarked the performance improvment on R4000/R4400 by using branch likely instructions to be in the range of 1-2% in a piece of pretty "branchy" code, so we don't want to disable branch likely right entirely. Newer CPU types, in particular those featuring branch prediction tend to perform differently. I suggest to enable branch likely in gcc for those > MIPS II CPUs where they're known to improve performance or when optimizing for code size. Unfortunately gcc's knowledge about such architecture details is rather limited. Ralf From owner-linux-mips@oss.sgi.com Mon Feb 4 08:00:14 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g14G0Ej28110 for linux-mips-outgoing; Mon, 4 Feb 2002 08:00:14 -0800 Received: from sgi.com (sgi-too.SGI.COM [204.94.211.39]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g14FxvA27903; Mon, 4 Feb 2002 07:59:58 -0800 Received: from delta.ds2.pg.gda.pl (delta.ds2.pg.gda.pl [213.192.72.1]) by sgi.com (980327.SGI.8.8.8-aspam/980304.SGI-aspam: SGI does not authorize the use of its proprietary systems or networks for unsolicited or bulk email from the Internet.) via ESMTP id GAA09246; Mon, 4 Feb 2002 06:58:37 -0800 (PST) mail_from (macro@ds2.pg.gda.pl) Received: from localhost by delta.ds2.pg.gda.pl (8.9.3/8.9.3) with SMTP id PAA16007; Mon, 4 Feb 2002 15:54:11 +0100 (MET) Date: Mon, 4 Feb 2002 15:54:11 +0100 (MET) From: "Maciej W. Rozycki" Reply-To: "Maciej W. Rozycki" To: Ralf Baechle cc: "H . J . Lu" , Hiroyuki Machida , libc-alpha@sources.redhat.com, linux-mips@oss.sgi.com Subject: Re: PATCH: Fix ll/sc for mips In-Reply-To: <20020204080145.C13799@dea.linux-mips.net> Message-ID: Organization: Technical University of Gdansk MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-linux-mips@oss.sgi.com Precedence: bulk On Mon, 4 Feb 2002, Ralf Baechle wrote: > > It will make the code more readable. We don't have to guess what > > the assembler will do. > > Generally speaking a MIPS assembler is free to do arbitrary reordering. > In the past there have been non-GNU assembler that were doing more massive > reordering than gcc does ... Using .set noreorder means you dump the > assembler's intelligence and take full responsibility for dealing with > all interlocks (or the lack thereof) and other performance issues > yourself. That's why I'm still uneasy about the patch or, specifically, its _test_and_set hunk. It's best to avoid pretending we have the knowledge beyond what an assembler has, as it's often not the case -- consider all the options an assembler can accept for code variations. Using "noreorder" is really justified if you need to generate an exact opcode stream for some reason (perhaps for a trampoline with a fixed format) or you know you have the knowledege beyond what an assembler has, e.g. you know an instruction can (or must) really be placed in a delay slot even though a dependency analysis performed by an assembler shows otherwise. Also beware of implicit macros which may expand into multiple instructions -- their semantics when placed in a delay slot may differ from what one may expect! -- + Maciej W. Rozycki, Technical University of Gdansk, Poland + +--------------------------------------------------------------+ + e-mail: macro@ds2.pg.gda.pl, PGP key available + From owner-linux-mips@oss.sgi.com Mon Feb 4 09:31:26 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g14HVQ222103 for linux-mips-outgoing; Mon, 4 Feb 2002 09:31:26 -0800 Received: from ocean.lucon.org (12-234-19-19.client.attbi.com [12.234.19.19]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g14HVJA21979 for ; Mon, 4 Feb 2002 09:31:19 -0800 Received: by ocean.lucon.org (Postfix, from userid 1000) id 2B8CE125C8; Mon, 4 Feb 2002 08:31:15 -0800 (PST) Date: Mon, 4 Feb 2002 08:31:15 -0800 From: "H . J . Lu" To: Dominic Sweetman Cc: cgd@broadcom.com, linux-mips@oss.sgi.com Subject: Re: PATCH: Fix ll/sc for mips (take 3) Message-ID: <20020204083115.C13384@lucon.org> References: <20020201102943.A11146@lucon.org> <20020201180126.A23740@nevyn.them.org> <20020201151513.A15913@lucon.org> <20020201222657.A13339@nevyn.them.org> <1012676003.1563.6.camel@xyzzy.stargate.net> <20020202120354.A1522@lucon.org> <15454.22661.855423.532827@gladsmuir.algor.co.uk> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <15454.22661.855423.532827@gladsmuir.algor.co.uk>; from dom@algor.co.uk on Mon, Feb 04, 2002 at 09:46:45AM +0000 Sender: owner-linux-mips@oss.sgi.com Precedence: bulk On Mon, Feb 04, 2002 at 09:46:45AM +0000, Dominic Sweetman wrote: > > cgd@broadcom.com (cgd@broadcom.com) writes: > > > Branch-likely instructions probably _do_ buy you something (at > > least, slightly less code size) on some CPUs, probably even some > > CPUs which are still being produced. > > Here's how branch likely is used to improve performance in a simple > MIPS CPU, and why it has no effect on code size. > > You start off with this: > > loopstart: insn 1 > insn 2 > .... > insn last > branch to loopstart > nop > > In small loops, the last instruction in the loop might well calculate > the branch condition, so it can't be moved into the delay slot of the > loop-closing branch. That puts a no-op into every loop iteration. > With branch-likely, you can transform the loop to > > loopstart: insn 1 > loop2: insn 2 > .... > insn last > branch-likely loop2 > insn 1 (copy) > > The nop is replaced by a duplicate instruction from the top > of the loop. Good for performance, no effect on code size. > > Builders of clever modern CPUs full of branch prediction hardware, > multiple instruction issue and instruction re-ordering find the > coupling of the branch-likely to the following instruction makes their > CPUs more complicated. That's why MIPS have warned that the > instructions will be removed from some future version of the MIPS > instruction set. I can change glibc not to use branch-likely without using nop. But it may require one or two instructions outside of the loop. Should I do it given what we know now? H.J. From owner-linux-mips@oss.sgi.com Mon Feb 4 09:46:22 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g14HkMd07052 for linux-mips-outgoing; Mon, 4 Feb 2002 09:46:22 -0800 Received: from oval.algor.co.uk (root@oval.algor.co.uk [62.254.210.250]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g14HkJA06989 for ; Mon, 4 Feb 2002 09:46:19 -0800 Received: from gladsmuir.algor.co.uk.algor.co.uk (IDENT:dom@gladsmuir.algor.co.uk [192.168.5.75]) by oval.algor.co.uk (8.11.6/8.10.1) with ESMTP id g14GkAa11615; Mon, 4 Feb 2002 16:46:12 GMT From: Dominic Sweetman MIME-Version: 1.0 Message-ID: <15454.47823.837119.847975@gladsmuir.algor.co.uk> Date: Mon, 4 Feb 2002 16:46:07 +0000 To: "H . J . Lu" Cc: Dominic Sweetman , cgd@broadcom.com, linux-mips@oss.sgi.com Subject: Re: PATCH: Fix ll/sc for mips (take 3) In-Reply-To: <20020204083115.C13384@lucon.org> References: <20020201102943.A11146@lucon.org> <20020201180126.A23740@nevyn.them.org> <20020201151513.A15913@lucon.org> <20020201222657.A13339@nevyn.them.org> <1012676003.1563.6.camel@xyzzy.stargate.net> <20020202120354.A1522@lucon.org> <15454.22661.855423.532827@gladsmuir.algor.co.uk> <20020204083115.C13384@lucon.org> X-Mailer: VM 6.89 under 21.1 (patch 14) "Cuyahoga Valley" XEmacs Lucid User-Agent: SEMI/1.13.7 (Awazu) CLIME/1.13.6 (=?ISO-2022-JP?B?GyRCQ2YbKEI=?= =?ISO-2022-JP?B?GyRCJU4+MRsoQg==?=) MULE XEmacs/21.1 (patch 14) (Cuyahoga Valley) (i386-redhat-linux) Content-Type: text/plain; charset=US-ASCII Sender: owner-linux-mips@oss.sgi.com Precedence: bulk H . J . Lu (hjl@lucon.org) writes: > I can change glibc not to use branch-likely without using nop. But it > may require one or two instructions outside of the loop. Should I do > it given what we know now? I would not recommend using "branch likely" in assembler coding, if that's what you're asking. Dominic From owner-linux-mips@oss.sgi.com Mon Feb 4 10:27:21 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g14IRLA12002 for linux-mips-outgoing; Mon, 4 Feb 2002 10:27:21 -0800 Received: from hermes.mvista.com (gateway-1237.mvista.com [12.44.186.158]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g14IRIA11984 for ; Mon, 4 Feb 2002 10:27:18 -0800 Received: from zeus.mvista.com (zeus.mvista.com [10.0.0.112]) by hermes.mvista.com (8.11.0/8.11.0) with ESMTP id g14HPBB03539 for ; Mon, 4 Feb 2002 09:25:11 -0800 Subject: madplay on mips From: Pete Popov To: linux-mips Content-Type: text/plain Content-Transfer-Encoding: 7bit X-Mailer: Evolution/1.0.1 Date: 04 Feb 2002 09:29:13 -0800 Message-Id: <1012843753.14993.106.camel@zeus> Mime-Version: 1.0 Sender: owner-linux-mips@oss.sgi.com Precedence: bulk Has anyone used madplay on mips to play mp3 files successfully? I've tried it on two mips boards with different sound drivers, and in both cases it plays the song slower and a bit muffled. It works on x86 and supposedly ppc. Pete From owner-linux-mips@oss.sgi.com Mon Feb 4 10:44:42 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g14Iig326911 for linux-mips-outgoing; Mon, 4 Feb 2002 10:44:42 -0800 Received: from mms2.broadcom.com (mms2.broadcom.com [63.70.210.59]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g14IibA26779 for ; Mon, 4 Feb 2002 10:44:37 -0800 Received: from 63.70.210.1 by mms2.broadcom.com with ESMTP (Broadcom MMS-2 SMTP Relay (MMS v4.7)); Mon, 04 Feb 2002 09:43:20 -0800 X-Server-Uuid: 2a12fa22-b688-11d4-a6a1-00508bfc9626 Received: from mail-sj1-2.sj.broadcom.com (mail-sj1-2 [10.16.128.232]) by mail-sj1-5.sj.broadcom.com (8.12.2/8.12.2) with ESMTP id g14HiVKf011646; Mon, 4 Feb 2002 09:44:31 -0800 (PST) Received: (from cgd@localhost) by mail-sj1-2.sj.broadcom.com ( 8.9.1/SJ8.9.1) id JAA06295; Mon, 4 Feb 2002 09:44:31 -0800 (PST) To: "Dominic Sweetman" cc: linux-mips@oss.sgi.com Subject: Re: PATCH: Fix ll/sc for mips (take 3) References: <20020131231714.E32690@lucon.org> <20020201102943.A11146@lucon.org> <20020201180126.A23740@nevyn.them.org> <20020201151513.A15913@lucon.org> <20020201222657.A13339@nevyn.them.org> <1012676003.1563.6.camel@xyzzy.stargate.net> <20020202120354.A1522@lucon.org> <15454.22661.855423.532827@gladsmuir.algor.co.uk> From: cgd@broadcom.com Date: 04 Feb 2002 09:44:31 -0800 In-Reply-To: "Dominic Sweetman"'s message of "Mon, 4 Feb 2002 09:46:45 +0000" Message-ID: Lines: 8 X-Mailer: Gnus v5.7/Emacs 20.4 MIME-Version: 1.0 X-WSS-ID: 104017B272261-01-01 Content-Type: text/plain Content-Transfer-Encoding: 7bit Sender: owner-linux-mips@oss.sgi.com Precedence: bulk thanks for the explanation. just goes to show that i should probably sit down and read your book from cover to cover one day, rather than just recommending it to the newbies. 8-) chris From owner-linux-mips@oss.sgi.com Mon Feb 4 11:19:13 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g14JJDf26418 for linux-mips-outgoing; Mon, 4 Feb 2002 11:19:13 -0800 Received: from dea.linux-mips.net (a1as18-p231.stg.tli.de [195.252.193.231]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g14JJ8A26331 for ; Mon, 4 Feb 2002 11:19:08 -0800 Received: (from ralf@localhost) by dea.linux-mips.net (8.11.6/8.11.1) id g14H2w404022; Mon, 4 Feb 2002 18:02:58 +0100 Date: Mon, 4 Feb 2002 18:02:58 +0100 From: Ralf Baechle To: "Maciej W. Rozycki" Cc: Jason Gunthorpe , linux-mips@fnet.fr, linux-mips@oss.sgi.com Subject: Re: [patch] linux 2.4.17: An mb() rework Message-ID: <20020204180258.A6124@dea.linux-mips.net> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: ; from macro@ds2.pg.gda.pl on Thu, Jan 31, 2002 at 01:17:39PM +0100 X-Accept-Language: de,en,fr Sender: owner-linux-mips@oss.sgi.com Precedence: bulk On Thu, Jan 31, 2002 at 01:17:39PM +0100, Maciej W. Rozycki wrote: > Certain DECstation models have a write-back buffer that needs to be > handled explicitly. For example rmb() is "1: bc0f 1b" for the R3220 WB > chip. Wmb() is null, certainly, as the buffer is strongly-ordered. See > arch/mips/dec/wbflush.c for details. Just as an aside that isn't directly relevant to DECstations. To date all MIPS _processors_ are strongly ordered. I now know of at least one processor that implements a weakly ordered memory model, so the assumption of a strongly ordered memory model has become void for large parts of the kernel. Even before that some systems had strongly ordered processors in system environments that may reorder requests. Bugs due to surprise memory reordering are entirely unfun to debug, so be paranoid. They're out there to get you ... Ralf From owner-linux-mips@oss.sgi.com Mon Feb 4 11:42:34 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g14JgYx14961 for linux-mips-outgoing; Mon, 4 Feb 2002 11:42:34 -0800 Received: from hermes.mvista.com (gateway-1237.mvista.com [12.44.186.158]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g14JgWA14928 for ; Mon, 4 Feb 2002 11:42:32 -0800 Received: from mvista.com (IDENT:jsun@orion.mvista.com [10.0.0.75]) by hermes.mvista.com (8.11.0/8.11.0) with ESMTP id g14IeOB08958; Mon, 4 Feb 2002 10:40:24 -0800 Message-ID: <3C5ED610.529C020E@mvista.com> Date: Mon, 04 Feb 2002 10:42:24 -0800 From: Jun Sun X-Mailer: Mozilla 4.72 [en] (X11; U; Linux 2.2.18 i686) X-Accept-Language: en MIME-Version: 1.0 To: Pete Popov CC: linux-mips Subject: Re: madplay on mips References: <1012843753.14993.106.camel@zeus> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-linux-mips@oss.sgi.com Precedence: bulk Pete Popov wrote: > > Has anyone used madplay on mips to play mp3 files successfully? I've > tried it on two mips boards with different sound drivers, and in both > cases it plays the song slower and a bit muffled. It works on x86 and > supposedly ppc. > I tried it before, and had the same results. I looked over the system calls, and was pretty much sure that the problem was on madplay side, and not on the driver side. One problem suspected was the floating point issue, but did get into it. Jun From owner-linux-mips@oss.sgi.com Mon Feb 4 11:45:02 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g14Jj2O16812 for linux-mips-outgoing; Mon, 4 Feb 2002 11:45:02 -0800 Received: from hermes.mvista.com (gateway-1237.mvista.com [12.44.186.158]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g14JixA16774 for ; Mon, 4 Feb 2002 11:44:59 -0800 Received: from zeus.mvista.com (zeus.mvista.com [10.0.0.112]) by hermes.mvista.com (8.11.0/8.11.0) with ESMTP id g14IgqB09457; Mon, 4 Feb 2002 10:42:52 -0800 Subject: Re: madplay on mips From: Pete Popov To: Jun Sun Cc: linux-mips In-Reply-To: <3C5ED610.529C020E@mvista.com> References: <1012843753.14993.106.camel@zeus> <3C5ED610.529C020E@mvista.com> Content-Type: text/plain Content-Transfer-Encoding: 7bit X-Mailer: Evolution/1.0.1 Date: 04 Feb 2002 10:46:54 -0800 Message-Id: <1012848414.15163.140.camel@zeus> Mime-Version: 1.0 Sender: owner-linux-mips@oss.sgi.com Precedence: bulk On Mon, 2002-02-04 at 10:42, Jun Sun wrote: > Pete Popov wrote: > > > > Has anyone used madplay on mips to play mp3 files successfully? I've > > tried it on two mips boards with different sound drivers, and in both > > cases it plays the song slower and a bit muffled. It works on x86 and > > supposedly ppc. > > > > I tried it before, and had the same results. > > I looked over the system calls, and was pretty much sure that the problem was > on madplay side, and not on the driver side. One problem suspected was the > floating point issue, but did get into it. Even though madplay claims that no floating point is used, the disassembly of the latest version shows otherwise. But I tried it on a board with a cpu that does have a hardware floating point unit with the same result. Pete From owner-linux-mips@oss.sgi.com Mon Feb 4 12:05:55 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g14K5tV30992 for linux-mips-outgoing; Mon, 4 Feb 2002 12:05:55 -0800 Received: from hermes.mvista.com (gateway-1237.mvista.com [12.44.186.158]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g14K5jA30793; Mon, 4 Feb 2002 12:05:45 -0800 Received: from mvista.com (IDENT:jsun@orion.mvista.com [10.0.0.75]) by hermes.mvista.com (8.11.0/8.11.0) with ESMTP id g14J1aB11076; Mon, 4 Feb 2002 11:01:36 -0800 Message-ID: <3C5EDB08.B4F2FF7B@mvista.com> Date: Mon, 04 Feb 2002 11:03:36 -0800 From: Jun Sun X-Mailer: Mozilla 4.72 [en] (X11; U; Linux 2.2.18 i686) X-Accept-Language: en MIME-Version: 1.0 To: "Maciej W. Rozycki" CC: Ralf Baechle , linux-mips@oss.sgi.com Subject: Re: CVS Update@oss.sgi.com: linux References: Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-linux-mips@oss.sgi.com Precedence: bulk "Maciej W. Rozycki" wrote: > > On Sun, 3 Feb 2002, Ralf Baechle wrote: > > > > Hmm, the assumption might be justifiable for the i386 only? Shouldn't > > > i8259.c be fixed instead? > > > > These are the ISA interrupts; many drivers make assumptions about the > > interrupts numbers, so we can't really change the numbers anyway. For > > any non-ISA interrupt it's number can be choosen freely. > > I don't think such assumptions are sane even for the i386 -- an I/O APIC > system is free to route ISA interrupts to whichever I/O APIC inputs are > available, not necessarily the low 16. The Intel MP Spec explicitly > allows such a setup -- ISA interrupts are only tied in default > configurations, which are rarely used (probably not at all these days). > > Anyway, only the drivers that read an IRQ number from jumpers or Flash > memory need to be checked, and these are a minority (3Com Ethernet cards > and possibly very few others). These that do probing (with probe_irq) or > simply take the number from an option will work automatically. > > While I agree for 2.4 it might be not the best idea to do such changes, > for 2.5 it's worth considering, isn't it? > This patch is from me. It merely reflects a change of the irq base mapping from 0x20 to 0x0. I think someone did this change for Malta board. A better solution is to have init_i8259_irqs() take an argument that is the base IRQ number, like many other irq controller code do. This way it is a board level decision as what block of IRQs i8259 should use. Jun From owner-linux-mips@oss.sgi.com Mon Feb 4 12:20:23 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g14KKNv10302 for linux-mips-outgoing; Mon, 4 Feb 2002 12:20:23 -0800 Received: from cygnus.equallogic.com (cygnus.equallogic.com [65.170.102.10]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g14KKHA10161 for ; Mon, 4 Feb 2002 12:20:17 -0800 Received: from deneb.dev.equallogic.com (deneb.dev.equallogic.com [172.16.1.99]) by cygnus.equallogic.com (8.11.6/8.11.6) with ESMTP id g14JHC606535; Mon, 4 Feb 2002 14:17:12 -0500 Received: from pkoning.dev.equallogic.com.equallogic.com (localhost.localdomain [127.0.0.1]) by deneb.dev.equallogic.com (8.11.6/8.11.2) with SMTP id g14JH8704342; Mon, 4 Feb 2002 14:17:08 -0500 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <15454.56884.108220.380799@pkoning.dev.equallogic.com> Date: Mon, 4 Feb 2002 14:17:08 -0500 (EST) From: Paul Koning To: justinca@ri.cmu.edu Cc: hjl@lucon.org, dan@debian.org, macro@ds2.pg.gda.pl, machida@sm.sony.co.jp, libc-alpha@sources.redhat.com, linux-mips@oss.sgi.com, gcc@gcc.gnu.org Subject: Re: PATCH: Fix ll/sc for mips (take 3) References: <20020131231714.E32690@lucon.org> <20020201102943.A11146@lucon.org> <20020201180126.A23740@nevyn.them.org> <20020201151513.A15913@lucon.org> <20020201222657.A13339@nevyn.them.org> <1012676003.1563.6.camel@xyzzy.stargate.net> <20020202120354.A1522@lucon.org> <1012715250.2297.9.camel@xyzzy.stargate.net> X-Mailer: VM 6.75 under 21.1 (patch 11) "Carlsbad Caverns" XEmacs Lucid Sender: owner-linux-mips@oss.sgi.com Precedence: bulk >>>>> "Justin" == Justin Carlson writes: Justin> On Sat, 2002-02-02 at 15:03, H . J . Lu wrote: >> Does everyone agree with this? If yes, I can make a patch not to >> use branch likely. But on the other hand, "gcc -mips2" will >> generate code using branch likely. If branch likely doesn't buy >> you anything, shouldn't we change gcc not to generate branch >> likely instructions? >> Justin> I know of at least one internal version of gcc which already Justin> has been hacked to remove generation of branch likely Justin> instructions. More precisely (if you're looking at the same one I was) -- it has a target processor type check that disables it for those CPUs where it is known to be not a good idea. Justin> Also, I didn't say branch likely doesn't buy you anything; Justin> there are situations where it works well. Looking at the Justin> spin_lock code, though, this isn't one of them. I agree, and I think that point was missed. Independent of whether a particular processor (MIPS or otherwise) has the concept of "branch likely", the design rule of spinlocks is that you try to avoid spinning (i.e., avoid lock contention) in the system design. So for that particular construct, the right answer is "branch not likely". paul From owner-linux-mips@oss.sgi.com Mon Feb 4 12:28:32 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g14KSWV23268 for linux-mips-outgoing; Mon, 4 Feb 2002 12:28:32 -0800 Received: from hermes.mvista.com (gateway-1237.mvista.com [12.44.186.158]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g14KSNA23073; Mon, 4 Feb 2002 12:28:23 -0800 Received: from mvista.com (IDENT:jsun@orion.mvista.com [10.0.0.75]) by hermes.mvista.com (8.11.0/8.11.0) with ESMTP id g14JQGB12611; Mon, 4 Feb 2002 11:26:16 -0800 Message-ID: <3C5EE0D0.F2CC94CE@mvista.com> Date: Mon, 04 Feb 2002 11:28:16 -0800 From: Jun Sun X-Mailer: Mozilla 4.72 [en] (X11; U; Linux 2.2.18 i686) X-Accept-Language: en MIME-Version: 1.0 To: Ralf Baechle CC: linux-mips@oss.sgi.com Subject: Re: gcc 3.x, -ansi and "static inline" References: <20020201115206.A18085@mvista.com> <20020203180151.A5371@dea.linux-mips.net> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-linux-mips@oss.sgi.com Precedence: bulk Ralf Baechle wrote: > > On Fri, Feb 01, 2002 at 11:52:06AM -0800, Jun Sun wrote: > > > BTW, the inclusion of "mipsregs.h" file in bitops.h seems unnecessary > > and caused a bunch of similar errors. > > Indeed, it was pointless and I therefore removed it. > What about ffz()? We can do: diff -Nru include/asm-mips/bitops.h.orig include/asm-mips/bitops.h --- include/asm-mips/bitops.h.orig Mon Feb 4 11:07:31 2002 +++ include/asm-mips/bitops.h Mon Feb 4 11:21:14 2002 @@ -675,7 +675,7 @@ * * Undefined if no zero exists, so code should check against ~0UL first. */ -static inline unsigned long ffz(unsigned long word) +static __inline__ unsigned long ffz(unsigned long word) { int b = 0, s; or diff -Nru include/asm-mips/bitops.h.orig include/asm-mips/bitops.h --- include/asm-mips/bitops.h.orig Mon Feb 4 11:07:31 2002 +++ include/asm-mips/bitops.h Mon Feb 4 11:27:55 2002 @@ -669,6 +669,8 @@ #endif /* !(__MIPSEB__) */ +#ifdef __KERNEL__ + /* * ffz - find first zero in word. * @word: The word to search @@ -689,8 +691,6 @@ return b; } - -#ifdef __KERNEL__ /** * ffs - find first bit set Jun From owner-linux-mips@oss.sgi.com Mon Feb 4 14:22:46 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g14MMk115876 for linux-mips-outgoing; Mon, 4 Feb 2002 14:22:46 -0800 Received: from dea.linux-mips.net (a1as18-p231.stg.tli.de [195.252.193.231]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g14MMdA15872 for ; Mon, 4 Feb 2002 14:22:40 -0800 Received: (from ralf@localhost) by dea.linux-mips.net (8.11.6/8.11.1) id g14ML8c07451; Mon, 4 Feb 2002 23:21:08 +0100 Date: Mon, 4 Feb 2002 23:21:08 +0100 From: Ralf Baechle To: Jun Sun Cc: linux-mips@oss.sgi.com Subject: Re: gcc 3.x, -ansi and "static inline" Message-ID: <20020204232108.A7266@dea.linux-mips.net> References: <20020201115206.A18085@mvista.com> <20020203180151.A5371@dea.linux-mips.net> <3C5EE0D0.F2CC94CE@mvista.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <3C5EE0D0.F2CC94CE@mvista.com>; from jsun@mvista.com on Mon, Feb 04, 2002 at 11:28:16AM -0800 X-Accept-Language: de,en,fr Sender: owner-linux-mips@oss.sgi.com Precedence: bulk On Mon, Feb 04, 2002 at 11:28:16AM -0800, Jun Sun wrote: > > On Fri, Feb 01, 2002 at 11:52:06AM -0800, Jun Sun wrote: > > > > > BTW, the inclusion of "mipsregs.h" file in bitops.h seems unnecessary > > > and caused a bunch of similar errors. > > > > Indeed, it was pointless and I therefore removed it. > > What about ffz()? We can do: Including kernel header files into user code is the actual bug but if you think fixing that isn't an option I can certainly so a s/inline/__inline__/ Ralf From owner-linux-mips@oss.sgi.com Mon Feb 4 14:56:55 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g14Muta18698 for linux-mips-outgoing; Mon, 4 Feb 2002 14:56:55 -0800 Received: from hermes.mvista.com (gateway-1237.mvista.com [12.44.186.158]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g14MumA18693; Mon, 4 Feb 2002 14:56:48 -0800 Received: from mvista.com (IDENT:jsun@orion.mvista.com [10.0.0.75]) by hermes.mvista.com (8.11.0/8.11.0) with ESMTP id g14MshB25272; Mon, 4 Feb 2002 14:54:43 -0800 Message-ID: <3C5F11AB.957DDA6C@mvista.com> Date: Mon, 04 Feb 2002 14:56:43 -0800 From: Jun Sun X-Mailer: Mozilla 4.72 [en] (X11; U; Linux 2.2.18 i686) X-Accept-Language: en MIME-Version: 1.0 To: Ralf Baechle CC: linux-mips@oss.sgi.com Subject: Re: gcc 3.x, -ansi and "static inline" References: <20020201115206.A18085@mvista.com> <20020203180151.A5371@dea.linux-mips.net> <3C5EE0D0.F2CC94CE@mvista.com> <20020204232108.A7266@dea.linux-mips.net> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-linux-mips@oss.sgi.com Precedence: bulk Ralf Baechle wrote: > > On Mon, Feb 04, 2002 at 11:28:16AM -0800, Jun Sun wrote: > > > > On Fri, Feb 01, 2002 at 11:52:06AM -0800, Jun Sun wrote: > > > > > > > BTW, the inclusion of "mipsregs.h" file in bitops.h seems unnecessary > > > > and caused a bunch of similar errors. > > > > > > Indeed, it was pointless and I therefore removed it. > > > > What about ffz()? We can do: > > Including kernel header files into user code is the actual bug In theory, yes. In practice, kernel head is all a big mesh where we don't have a clear division as which part can go to userland and which part can't. The inline function makes mesh even meshier. > but if > you think fixing that isn't an option I can certainly so a > s/inline/__inline__/ > I think this is the case. See the inclusion chain below. BTW, the app is libcap. In file included from /opt/hardhat/devkit/mips/sb1_fp_be/target/usr/include/linux/fs.h:26, from /opt/hardhat/devkit/mips/sb1_fp_be/target/usr/include/linux/capability.h:17, from /var/tmp/BUILD/libcap-1.10.orig/libcap/include/sys/capability.h:24, from libcap.h:19, from cap_alloc.c:12: /opt/hardhat/devkit/mips/sb1_fp_be/target/usr/include/asm/bitops.h:678: syntax error before "unsigned" Jun From owner-linux-mips@oss.sgi.com Mon Feb 4 15:02:39 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g14N2dd19186 for linux-mips-outgoing; Mon, 4 Feb 2002 15:02:39 -0800 Received: from dea.linux-mips.net (a1as18-p231.stg.tli.de [195.252.193.231]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g14N2ZA19183 for ; Mon, 4 Feb 2002 15:02:36 -0800 Received: (from ralf@localhost) by dea.linux-mips.net (8.11.6/8.11.1) id g14N19j07967; Tue, 5 Feb 2002 00:01:09 +0100 Date: Tue, 5 Feb 2002 00:01:09 +0100 From: Ralf Baechle To: Jun Sun Cc: linux-mips@oss.sgi.com Subject: Re: gcc 3.x, -ansi and "static inline" Message-ID: <20020205000109.A7512@dea.linux-mips.net> References: <20020201115206.A18085@mvista.com> <20020203180151.A5371@dea.linux-mips.net> <3C5EE0D0.F2CC94CE@mvista.com> <20020204232108.A7266@dea.linux-mips.net> <3C5F11AB.957DDA6C@mvista.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <3C5F11AB.957DDA6C@mvista.com>; from jsun@mvista.com on Mon, Feb 04, 2002 at 02:56:43PM -0800 X-Accept-Language: de,en,fr Sender: owner-linux-mips@oss.sgi.com Precedence: bulk On Mon, Feb 04, 2002 at 02:56:43PM -0800, Jun Sun wrote: > In theory, yes. In practice, kernel head is all a big mesh where we don't > have a clear division as which part can go to userland and which part can't. The answer is already l-k faq probably - copy the kernel header to userspace and hack it into your favorite shape. I'm not a fan of this policy but ... Ralf From owner-linux-mips@oss.sgi.com Mon Feb 4 17:29:12 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g151TCn07877 for linux-mips-outgoing; Mon, 4 Feb 2002 17:29:12 -0800 Received: from ocean.lucon.org (12-234-19-19.client.attbi.com [12.234.19.19]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g151SwA07872 for ; Mon, 4 Feb 2002 17:28:58 -0800 Received: by ocean.lucon.org (Postfix, from userid 1000) id CEDCC125C8; Mon, 4 Feb 2002 17:28:57 -0800 (PST) Date: Mon, 4 Feb 2002 17:28:57 -0800 From: "H . J . Lu" To: Dominic Sweetman Cc: GNU C Library , linux-mips@oss.sgi.com Subject: Re: PATCH: Fix ll/sc for mips (take 3) Message-ID: <20020204172857.A22337@lucon.org> References: <20020201180126.A23740@nevyn.them.org> <20020201151513.A15913@lucon.org> <20020201222657.A13339@nevyn.them.org> <1012676003.1563.6.camel@xyzzy.stargate.net> <20020202120354.A1522@lucon.org> <15454.22661.855423.532827@gladsmuir.algor.co.uk> <20020204083115.C13384@lucon.org> <15454.47823.837119.847975@gladsmuir.algor.co.uk> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <15454.47823.837119.847975@gladsmuir.algor.co.uk>; from dom@algor.co.uk on Mon, Feb 04, 2002 at 04:46:07PM +0000 Sender: owner-linux-mips@oss.sgi.com Precedence: bulk On Mon, Feb 04, 2002 at 04:46:07PM +0000, Dominic Sweetman wrote: > > H . J . Lu (hjl@lucon.org) writes: > > > I can change glibc not to use branch-likely without using nop. But it > > may require one or two instructions outside of the loop. Should I do > > it given what we know now? > > I would not recommend using "branch likely" in assembler coding, if > that's what you're asking. > Here is a patch to remove branch likely. But I couldn't find a way not to fill the delay slot with nop. BTW, is that safe to remove ".set noreorder"? H.J. --- 2002-02-04 H.J. Lu * sysdeps/mips/pspinlock.c (__pthread_spin_lock): Not use branch likely. * sysdeps/mips/pt-machine.h (testandset): Liekwise. (__compare_and_swap): Liekwise. 2002-02-04 H.J. Lu * sysdeps/mips/atomicity.h (exchange_and_add): Not use branch likely. (atomic_add): Likewise. (compare_and_swap): Likewise. * sysdeps/unix/sysv/linux/mips/sys/tas.h (_test_and_set): Likewise. --- libc/linuxthreads/sysdeps/mips/pspinlock.c.llsc Mon Feb 4 13:45:01 2002 +++ libc/linuxthreads/sysdeps/mips/pspinlock.c Mon Feb 4 17:09:02 2002 @@ -40,7 +40,7 @@ __pthread_spin_lock (pthread_spinlock_t "bnez %1,1b\n\t" " li %2,1\n\t" "sc %2,%0\n\t" - "beqzl %2,1b\n\t" + "beqz %2,1b\n\t" " ll %1,%3\n\t" ".set pop" : "=m" (*lock), "=&r" (tmp1), "=&r" (tmp2) --- libc/linuxthreads/sysdeps/mips/pt-machine.h.llsc Mon Feb 4 13:45:01 2002 +++ libc/linuxthreads/sysdeps/mips/pt-machine.h Mon Feb 4 17:09:36 2002 @@ -66,7 +66,7 @@ __compare_and_swap (long int *p, long in " move %0,$0\n\t" "move %0,%4\n\t" "sc %0,%2\n\t" - "beqzl %0,1b\n\t" + "beqz %0,1b\n\t" " ll %1,%5\n\t" ".set pop\n" "2:\n\t" --- libc/sysdeps/mips/atomicity.h.llsc Mon Feb 4 13:45:18 2002 +++ libc/sysdeps/mips/atomicity.h Mon Feb 4 17:14:48 2002 @@ -32,15 +32,15 @@ exchange_and_add (volatile uint32_t *mem int result, tmp; __asm__ __volatile__ - ("/* Inline exchange & add */\n\t" + ("/* Inline exchange & add */\n" + "1:\n" "ll %0,%3\n" - "1:\n\t" "addu %1,%4,%0\n\t" "sc %1,%2\n\t" ".set push\n\t" ".set noreorder\n\t" - "beqzl %1,1b\n\t" - " ll %0,%3\n\t" + "beqz %1,1b\n\t" + " nop\n\t" ".set pop\n\t" "/* End exchange & add */" : "=&r"(result), "=&r"(tmp), "=m"(*mem) @@ -57,15 +57,15 @@ atomic_add (volatile uint32_t *mem, int int result; __asm__ __volatile__ - ("/* Inline atomic add */\n\t" - "ll %0,%2\n" + ("/* Inline atomic add */\n" "1:\n\t" + "ll %0,%2\n" "addu %0,%3,%0\n\t" "sc %0,%1\n\t" ".set push\n\t" ".set noreorder\n\t" - "beqzl %0,1b\n\t" - " ll %0,%2\n\t" + "beqz %0,1b\n\t" + " nop\n\t" ".set pop\n\t" "/* End atomic add */" : "=&r"(result), "=m"(*mem) @@ -89,7 +89,7 @@ compare_and_swap (volatile long int *p, " move %0,$0\n\t" "move %0,%4\n\t" "sc %0,%2\n\t" - "beqzl %0,1b\n\t" + "beqz %0,1b\n\t" " ll %1,%5\n\t" ".set pop\n" "2:\n\t" --- libc/sysdeps/unix/sysv/linux/mips/sys/tas.h.llsc Mon Feb 4 13:45:28 2002 +++ libc/sysdeps/unix/sysv/linux/mips/sys/tas.h Mon Feb 4 17:19:06 2002 @@ -42,16 +42,16 @@ _test_and_set (int *p, int v) __THROW int r, t; __asm__ __volatile__ - ("/* Inline test and set */\n\t" - "ll %0,%3\n" + ("/* Inline test and set */\n" "1:\n\t" + "ll %0,%3\n" ".set push\n\t" ".set noreorder\n\t" "beq %0,%4,2f\n\t" " move %1,%4\n\t" "sc %1,%2\n\t" - "beqzl %1,1b\n\t" - " ll %0,%3\n\t" + "beqz %1,1b\n\t" + " nop\n\t" ".set pop\n" "2:\n\t" "/* End test and set */" From owner-linux-mips@oss.sgi.com Mon Feb 4 18:58:36 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g152waS09788 for linux-mips-outgoing; Mon, 4 Feb 2002 18:58:36 -0800 Received: from nevyn.them.org (mail@NEVYN.RES.CMU.EDU [128.2.145.6]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g152wRA09781 for ; Mon, 4 Feb 2002 18:58:27 -0800 Received: from drow by nevyn.them.org with local (Exim 3.34 #1 (Debian)) id 16Xvo4-0000Yy-00; Mon, 04 Feb 2002 21:58:04 -0500 Date: Mon, 4 Feb 2002 21:58:04 -0500 From: Daniel Jacobowitz To: "H . J . Lu" Cc: Dominic Sweetman , GNU C Library , linux-mips@oss.sgi.com Subject: Re: PATCH: Fix ll/sc for mips (take 3) Message-ID: <20020204215804.A2095@nevyn.them.org> Mail-Followup-To: "H . J . Lu" , Dominic Sweetman , GNU C Library , linux-mips@oss.sgi.com References: <20020201151513.A15913@lucon.org> <20020201222657.A13339@nevyn.them.org> <1012676003.1563.6.camel@xyzzy.stargate.net> <20020202120354.A1522@lucon.org> <15454.22661.855423.532827@gladsmuir.algor.co.uk> <20020204083115.C13384@lucon.org> <15454.47823.837119.847975@gladsmuir.algor.co.uk> <20020204172857.A22337@lucon.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20020204172857.A22337@lucon.org> User-Agent: Mutt/1.3.23i Sender: owner-linux-mips@oss.sgi.com Precedence: bulk On Mon, Feb 04, 2002 at 05:28:57PM -0800, H . J . Lu wrote: > On Mon, Feb 04, 2002 at 04:46:07PM +0000, Dominic Sweetman wrote: > > > > H . J . Lu (hjl@lucon.org) writes: > > > > > I can change glibc not to use branch-likely without using nop. But it > > > may require one or two instructions outside of the loop. Should I do > > > it given what we know now? > > > > I would not recommend using "branch likely" in assembler coding, if > > that's what you're asking. > > > > Here is a patch to remove branch likely. But I couldn't find a way > not to fill the delay slot with nop. BTW, is that safe to remove > ".set noreorder"? You mean, if there is nothing which can be put there? Yes, it's safe. > --- libc/linuxthreads/sysdeps/mips/pspinlock.c.llsc Mon Feb 4 13:45:01 2002 > +++ libc/linuxthreads/sysdeps/mips/pspinlock.c Mon Feb 4 17:09:02 2002 > @@ -40,7 +40,7 @@ __pthread_spin_lock (pthread_spinlock_t > "bnez %1,1b\n\t" > " li %2,1\n\t" > "sc %2,%0\n\t" > - "beqzl %2,1b\n\t" > + "beqz %2,1b\n\t" > " ll %1,%3\n\t" > ".set pop" > : "=m" (*lock), "=&r" (tmp1), "=&r" (tmp2) Is that really what you meant to do? The ll is now in the delay slot of the beqz. > --- libc/linuxthreads/sysdeps/mips/pt-machine.h.llsc Mon Feb 4 13:45:01 2002 > +++ libc/linuxthreads/sysdeps/mips/pt-machine.h Mon Feb 4 17:09:36 2002 > @@ -66,7 +66,7 @@ __compare_and_swap (long int *p, long in > " move %0,$0\n\t" > "move %0,%4\n\t" > "sc %0,%2\n\t" > - "beqzl %0,1b\n\t" > + "beqz %0,1b\n\t" > " ll %1,%5\n\t" > ".set pop\n" > "2:\n\t" Ditto. > @@ -89,7 +89,7 @@ compare_and_swap (volatile long int *p, > " move %0,$0\n\t" > "move %0,%4\n\t" > "sc %0,%2\n\t" > - "beqzl %0,1b\n\t" > + "beqz %0,1b\n\t" > " ll %1,%5\n\t" > ".set pop\n" > "2:\n\t" Ditto. -- Daniel Jacobowitz Carnegie Mellon University MontaVista Software Debian GNU/Linux Developer From owner-linux-mips@oss.sgi.com Mon Feb 4 20:42:54 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g154gsZ11694 for linux-mips-outgoing; Mon, 4 Feb 2002 20:42:54 -0800 Received: from ocean.lucon.org (12-234-19-19.client.attbi.com [12.234.19.19]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g154goA11686 for ; Mon, 4 Feb 2002 20:42:51 -0800 Received: by ocean.lucon.org (Postfix, from userid 1000) id 29CBA125C8; Mon, 4 Feb 2002 20:42:47 -0800 (PST) Date: Mon, 4 Feb 2002 20:42:47 -0800 From: "H . J . Lu" To: Daniel Jacobowitz Cc: Dominic Sweetman , GNU C Library , linux-mips@oss.sgi.com Subject: Re: PATCH: Fix ll/sc for mips (take 3) Message-ID: <20020204204247.A25254@lucon.org> References: <20020201222657.A13339@nevyn.them.org> <1012676003.1563.6.camel@xyzzy.stargate.net> <20020202120354.A1522@lucon.org> <15454.22661.855423.532827@gladsmuir.algor.co.uk> <20020204083115.C13384@lucon.org> <15454.47823.837119.847975@gladsmuir.algor.co.uk> <20020204172857.A22337@lucon.org> <20020204215804.A2095@nevyn.them.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <20020204215804.A2095@nevyn.them.org>; from dan@debian.org on Mon, Feb 04, 2002 at 09:58:04PM -0500 Sender: owner-linux-mips@oss.sgi.com Precedence: bulk On Mon, Feb 04, 2002 at 09:58:04PM -0500, Daniel Jacobowitz wrote: > > > --- libc/linuxthreads/sysdeps/mips/pspinlock.c.llsc Mon Feb 4 13:45:01 2002 > > +++ libc/linuxthreads/sysdeps/mips/pspinlock.c Mon Feb 4 17:09:02 2002 > > @@ -40,7 +40,7 @@ __pthread_spin_lock (pthread_spinlock_t > > "bnez %1,1b\n\t" > > " li %2,1\n\t" > > "sc %2,%0\n\t" > > - "beqzl %2,1b\n\t" > > + "beqz %2,1b\n\t" > > " ll %1,%3\n\t" > > ".set pop" > > : "=m" (*lock), "=&r" (tmp1), "=&r" (tmp2) > > Is that really what you meant to do? The ll is now in the delay slot > of the beqz. Yes, it is ok since we don't care what ll does if the branch is not taken. H.J. From owner-linux-mips@oss.sgi.com Mon Feb 4 20:51:19 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g154pJC11848 for linux-mips-outgoing; Mon, 4 Feb 2002 20:51:19 -0800 Received: from nevyn.them.org (mail@NEVYN.RES.CMU.EDU [128.2.145.6]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g154pFA11845 for ; Mon, 4 Feb 2002 20:51:15 -0800 Received: from drow by nevyn.them.org with local (Exim 3.34 #1 (Debian)) id 16XxVe-0001rD-00; Mon, 04 Feb 2002 23:47:10 -0500 Date: Mon, 4 Feb 2002 23:47:10 -0500 From: Daniel Jacobowitz To: "H . J . Lu" Cc: Dominic Sweetman , GNU C Library , linux-mips@oss.sgi.com Subject: Re: PATCH: Fix ll/sc for mips (take 3) Message-ID: <20020204234710.A7094@nevyn.them.org> Mail-Followup-To: "H . J . Lu" , Dominic Sweetman , GNU C Library , linux-mips@oss.sgi.com References: <1012676003.1563.6.camel@xyzzy.stargate.net> <20020202120354.A1522@lucon.org> <15454.22661.855423.532827@gladsmuir.algor.co.uk> <20020204083115.C13384@lucon.org> <15454.47823.837119.847975@gladsmuir.algor.co.uk> <20020204172857.A22337@lucon.org> <20020204215804.A2095@nevyn.them.org> <20020204204247.A25254@lucon.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20020204204247.A25254@lucon.org> User-Agent: Mutt/1.3.23i Sender: owner-linux-mips@oss.sgi.com Precedence: bulk On Mon, Feb 04, 2002 at 08:42:47PM -0800, H . J . Lu wrote: > On Mon, Feb 04, 2002 at 09:58:04PM -0500, Daniel Jacobowitz wrote: > > > > > --- libc/linuxthreads/sysdeps/mips/pspinlock.c.llsc Mon Feb 4 13:45:01 2002 > > > +++ libc/linuxthreads/sysdeps/mips/pspinlock.c Mon Feb 4 17:09:02 2002 > > > @@ -40,7 +40,7 @@ __pthread_spin_lock (pthread_spinlock_t > > > "bnez %1,1b\n\t" > > > " li %2,1\n\t" > > > "sc %2,%0\n\t" > > > - "beqzl %2,1b\n\t" > > > + "beqz %2,1b\n\t" > > > " ll %1,%3\n\t" > > > ".set pop" > > > : "=m" (*lock), "=&r" (tmp1), "=&r" (tmp2) > > > > Is that really what you meant to do? The ll is now in the delay slot > > of the beqz. > > Yes, it is ok since we don't care what ll does if the branch is not > taken. Won't this cause some gratuitous thrashing if someone else is trying to get the spinlock at the same time? -- Daniel Jacobowitz Carnegie Mellon University MontaVista Software Debian GNU/Linux Developer From owner-linux-mips@oss.sgi.com Mon Feb 4 21:29:39 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g155TdE12673 for linux-mips-outgoing; Mon, 4 Feb 2002 21:29:39 -0800 Received: from xyzzy.stargate.net ([198.144.45.122]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g155TZA12670 for ; Mon, 4 Feb 2002 21:29:35 -0800 Received: (from justin@localhost) by xyzzy.stargate.net (8.11.6/8.11.6) id g155UMa04455; Tue, 5 Feb 2002 00:30:22 -0500 X-Authentication-Warning: xyzzy.stargate.net: justin set sender to justinca@ri.cmu.edu using -f Subject: Re: PATCH: Fix ll/sc for mips (take 3) From: Justin Carlson To: Daniel Jacobowitz Cc: "H . J . Lu" , Dominic Sweetman , GNU C Library , linux-mips@oss.sgi.com In-Reply-To: <20020204234710.A7094@nevyn.them.org> References: <1012676003.1563.6.camel@xyzzy.stargate.net> <20020202120354.A1522@lucon.org> <15454.22661.855423.532827@gladsmuir.algor.co.uk> <20020204083115.C13384@lucon.org> <15454.47823.837119.847975@gladsmuir.algor.co.uk> <20020204172857.A22337@lucon.org> <20020204215804.A2095@nevyn.them.org> <20020204204247.A25254@lucon.org> <20020204234710.A7094@nevyn.them.org> Content-Type: text/plain Content-Transfer-Encoding: 7bit X-Mailer: Evolution/1.0.2 Date: 05 Feb 2002 00:30:22 -0500 Message-Id: <1012887022.3343.9.camel@xyzzy.stargate.net> Mime-Version: 1.0 Sender: owner-linux-mips@oss.sgi.com Precedence: bulk On Mon, 2002-02-04 at 23:47, Daniel Jacobowitz wrote: > > Won't this cause some gratuitous thrashing if someone else is trying to > get the spinlock at the same time? > Actually, if you look at the required semantics of ll, no. A ll by itself can never cause a sc from another cpu to fail. It's part of the semantic definition to avoid potential livelock cases, e.g. A does ll B does ll, foiling A's lock attempt A does sc, which fails A does ll, foiling B's lock attempt B does sc, which fails B does ll, foiling A's lock attempt ... Instead, this case becomes: A does ll B does ll A does sc, which succeeds, even though B has done a ll B does sc which fails A does critical section work B spins on ll until A releases the lock -Justin From owner-linux-mips@oss.sgi.com Mon Feb 4 22:20:33 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g156KXp13939 for linux-mips-outgoing; Mon, 4 Feb 2002 22:20:33 -0800 Received: from chmls18.ne.ipsvc.net (chmls18.ne.ipsvc.net [24.147.1.153]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g156KRA13936 for ; Mon, 4 Feb 2002 22:20:27 -0800 Received: from localhost (h00a0cc39f081.ne.mediaone.net [65.96.250.215]) by chmls18.ne.ipsvc.net (8.11.6/8.11.6) with ESMTP id g156GlG19456; Tue, 5 Feb 2002 01:16:47 -0500 (EST) Date: Tue, 5 Feb 2002 01:16:46 -0500 Subject: Re: PATCH: Fix ll/sc for mips (take 3) Content-Type: text/plain; charset=US-ASCII; format=flowed Mime-Version: 1.0 (Apple Message framework v480) Cc: Jay Carlson , Hiroyuki Machida , hjl@lucon.org, linux-mips@oss.sgi.com To: Dominic Sweetman From: Jay Carlson In-Reply-To: <15454.21812.39310.478616@gladsmuir.algor.co.uk> Message-Id: Content-Transfer-Encoding: 7bit X-Mailer: Apple Mail (2.480) Sender: owner-linux-mips@oss.sgi.com Precedence: bulk On Monday, February 4, 2002, at 04:32 AM, Dominic Sweetman wrote: > > Hiroyuki Machida (machida@sm.sony.co.jp) writes: > >> I think we can assume CPU has branch-likely insns, if CPU has MIPS >> ISA 2 or greater ISA.. > > "MIPS II" is officially the instruction set introduced for the long > lost R6000 CPU. > > But "MIPS II" is now used to mean "the 32-bit subset of MIPS III" > (which is extremely close to the same thing, but I'm never quite sure > about the last details of the R6000 - Kevin would remember better, > probably). > > OK: branch-likely is definitely part of MIPS II and MIPS32. There are > still MIPS CPUs in regular use which are based on MIPS I and don't > provide them. Generally the advantages of MIPS II are slight, so if > you want to build a kernel which will not require instruction-set > variants, it's no big deal to restrict it to MIPS I. There's load interlocks, which you can depend on starting with MIPS II. They're also present on the TX39 and VR41xx. For non-PIC code, I see around a 5-7% reduction in userland code size by compiling with -Wa,-mips2, which afaict just eliminates the generation of nops after loads. The compiler is still generating code anticipating the delays, which is good. For PIC code, I remember the benefits being in the same range. And you're fighting gas, which will generate load-delay nops in the middle of la/lw/sw macro expansions in PIC mode regardless of what mips architecture you're building for. I made some patches against an older binutils to eliminate those nops for mips2 and up, and got ANOTHER 5-7%, of course depending on actual instruction mix. Given that I tossed out the SVR4 ABI in search of code density in snow, I'm probably a little abnormal in these concerns. But other people on small platforms may care. Jay From owner-linux-mips@oss.sgi.com Mon Feb 4 22:57:02 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g156v2419735 for linux-mips-outgoing; Mon, 4 Feb 2002 22:57:02 -0800 Received: from smtp017.mail.yahoo.com (smtp017.mail.yahoo.com [216.136.174.114]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g156uxA19725 for ; Mon, 4 Feb 2002 22:56:59 -0800 Message-Id: <200202050656.g156uxA19725@oss.sgi.com> Received: from unknown (HELO tp240) (218.76.14.216) by smtp.mail.vip.sc5.yahoo.com with SMTP; 5 Feb 2002 06:56:58 -0000 Date: Tue, 5 Feb 2002 14:58:22 +0800 From: Wu Qingbo To: "linux-mips@oss.sgi.com" Subject: can mipsel linux support UDF? X-mailer: FoxMail 3.0 beta 2 [cn] Mime-Version: 1.0 Content-Type: text/plain; charset="GB2312" Content-Transfer-Encoding: 7bit Sender: owner-linux-mips@oss.sgi.com Precedence: bulk Hi, all, I use mipsel-2.4.2 kernel and added udf into it. When the system is up, I mount -t udf /dev/cdrom /mnt. And it is ok, but sometimes will report {Drive Ready, Seek Complete}. But when I cd /mnt, and ls, I could not find anything. Sometimes the system is pause. My question is: Can mipsel linux support UDF? My DVD-ROM can work well use iso9660 format. If someone knows, Please help me. TIA Wu Qingbo wu_qingbo2000@yahoo.com.cn _________________________________________________________ Do You Yahoo!? Get your free @yahoo.com address at http://mail.yahoo.com From owner-linux-mips@oss.sgi.com Tue Feb 5 00:26:21 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g158QLR32019 for linux-mips-outgoing; Tue, 5 Feb 2002 00:26:21 -0800 Received: from dea.linux-mips.net (a1as18-p231.stg.tli.de [195.252.193.231]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g158QHA32000 for ; Tue, 5 Feb 2002 00:26:17 -0800 Received: (from ralf@localhost) by dea.linux-mips.net (8.11.6/8.11.1) id g158Oag02647; Tue, 5 Feb 2002 09:24:36 +0100 Date: Tue, 5 Feb 2002 09:24:36 +0100 From: Ralf Baechle To: Wu Qingbo Cc: "linux-mips@oss.sgi.com" Subject: Re: can mipsel linux support UDF? Message-ID: <20020205092436.B2582@dea.linux-mips.net> References: <200202050656.g156uxA19725@oss.sgi.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <200202050656.g156uxA19725@oss.sgi.com>; from wu_qingbo2000@yahoo.com.cn on Tue, Feb 05, 2002 at 02:58:22PM +0800 X-Accept-Language: de,en,fr Sender: owner-linux-mips@oss.sgi.com Precedence: bulk On Tue, Feb 05, 2002 at 02:58:22PM +0800, Wu Qingbo wrote: > I use mipsel-2.4.2 kernel and added udf into it. When the system is up, > I mount -t udf /dev/cdrom /mnt. And it is ok, but sometimes will > report {Drive Ready, Seek Complete}. > But when I cd /mnt, and ls, I could not find anything. Sometimes the > system is pause. My question is: Can mipsel linux support UDF? > My DVD-ROM can work well use iso9660 format. If someone knows, That still looks like some sort of hardware problem. Maybe your DVD disk has scratches or the drive is just broken enough no longer read DVD's. I have observed the same problem on non-MIPS systems. Ralf From owner-linux-mips@oss.sgi.com Tue Feb 5 00:30:33 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g158UXm00513 for linux-mips-outgoing; Tue, 5 Feb 2002 00:30:33 -0800 Received: from dea.linux-mips.net (a1as18-p231.stg.tli.de [195.252.193.231]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g158UUA00503 for ; Tue, 5 Feb 2002 00:30:30 -0800 Received: (from ralf@localhost) by dea.linux-mips.net (8.11.6/8.11.1) id g158SBn02688; Tue, 5 Feb 2002 09:28:11 +0100 Date: Tue, 5 Feb 2002 09:28:11 +0100 From: Ralf Baechle To: Jay Carlson Cc: Dominic Sweetman , Hiroyuki Machida , hjl@lucon.org, linux-mips@oss.sgi.com Subject: Re: PATCH: Fix ll/sc for mips (take 3) Message-ID: <20020205092811.C2582@dea.linux-mips.net> References: <15454.21812.39310.478616@gladsmuir.algor.co.uk> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: ; from nop@nop.com on Tue, Feb 05, 2002 at 01:16:46AM -0500 X-Accept-Language: de,en,fr Sender: owner-linux-mips@oss.sgi.com Precedence: bulk On Tue, Feb 05, 2002 at 01:16:46AM -0500, Jay Carlson wrote: > Given that I tossed out the SVR4 ABI in search of code density in snow, > I'm probably a little abnormal in these concerns. But other people on > small platforms may care. SNOW certainly was a nice invention and the definition of small is changing. Are you planning to keep up the support for SNOW? Ralf From owner-linux-mips@oss.sgi.com Tue Feb 5 00:38:59 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g158cxH01515 for linux-mips-outgoing; Tue, 5 Feb 2002 00:38:59 -0800 Received: from topsns.toshiba-tops.co.jp (topsns.toshiba-tops.co.jp [202.230.225.5]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g158ciA01489; Tue, 5 Feb 2002 00:38:45 -0800 Received: from inside-ms1.toshiba-tops.co.jp by topsns.toshiba-tops.co.jp via smtpd (for oss.sgi.com [216.32.174.27]) with SMTP; 5 Feb 2002 08:38:44 UT 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 5F93EB46B; Tue, 5 Feb 2002 17:38:43 +0900 (JST) Received: by srd2sd.toshiba-tops.co.jp (8.9.3/3.5Wbeta-srd2sd) with ESMTP id RAA22086; Tue, 5 Feb 2002 17:38:43 +0900 (JST) Date: Tue, 05 Feb 2002 17:43:20 +0900 (JST) Message-Id: <20020205.174320.78702446.nemoto@toshiba-tops.co.jp> To: linux-mips@oss.sgi.com Cc: ralf@oss.sgi.com Subject: endless recursive loop in pow() From: Atsushi Nemoto In-Reply-To: <200202040953.g149rrA17976@oss.sgi.com> References: <200202040953.g149rrA17976@oss.sgi.com> X-Fingerprint: EC 9D B9 17 2E 89 D2 25 CE F5 5D 3D 12 29 2A AD X-Pgp-Public-Key: http://pgp.nic.ad.jp/cgi-bin/pgpsearchkey.pl?op=get&search=0xB6D728B1 Organization: TOSHIBA Personal Computer System Corporation X-Mailer: Mew version 2.1 on Emacs 20.7 / Mule 4.1 (AOI) Mime-Version: 1.0 Content-Type: Multipart/Mixed; boundary="--Next_Part(Tue_Feb__5_17:43:20_2002_271)--" Content-Transfer-Encoding: 7bit Sender: owner-linux-mips@oss.sgi.com Precedence: bulk ----Next_Part(Tue_Feb__5_17:43:20_2002_271)-- Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit I found that pow() of glibc 2.2.4 causes stack overflow on some testcase with NaN operand. Try this simple (and dirty) test program (for little endian). main() { double x, y, z; *(int*)(&x) = 0x00000000; *((int*)(&x) + 1) = 0xfff00001; *(int*)(&y) = 0x80000000; *((int*)(&y) + 1) = 0xcff00000; z = pow(x, y); printf("%x %x\n", *((int*)&z + 1), *(int*)&z); return 0; } This program fall into endless recursive call at line 128 in sysdeps/ieee754/dbl-64/e_pow.c. 128: return (k==1)?__ieee754_pow(-x,y):-__ieee754_pow(-x,y); /* if y even or odd */ The problem occur if sign-bit of a NaN and negation of the NaN is same. I saw this problem only if the neg.d instruction was interpreted by kernel fp emulation. The patch below is a fix for kernel fp emulation. Is this a right fix? Or glibc should be fixed? --- Atsushi Nemoto ----Next_Part(Tue_Feb__5_17:43:20_2002_271)-- Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="neg.patch" diff -u linux-sgi-cvs/arch/mips/math-emu/dp_simple.c linux.new/arch/mips/math-emu/dp_simple.c --- linux-sgi-cvs/arch/mips/math-emu/dp_simple.c Mon Oct 22 10:29:56 2001 +++ linux.new/arch/mips/math-emu/dp_simple.c Tue Feb 5 17:36:29 2002 @@ -48,16 +48,18 @@ CLEARCX; FLUSHXDP; + /* 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-sgi-cvs/arch/mips/math-emu/sp_simple.c linux.new/arch/mips/math-emu/sp_simple.c --- linux-sgi-cvs/arch/mips/math-emu/sp_simple.c Mon Oct 22 10:29:56 2001 +++ linux.new/arch/mips/math-emu/sp_simple.c Tue Feb 5 17:36:29 2002 @@ -48,16 +48,18 @@ CLEARCX; FLUSHXSP; + /* 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; } ----Next_Part(Tue_Feb__5_17:43:20_2002_271)---- From owner-linux-mips@oss.sgi.com Tue Feb 5 00:39:45 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g158djH01673 for linux-mips-outgoing; Tue, 5 Feb 2002 00:39:45 -0800 Received: from mx.mips.com (mx.mips.com [206.31.31.226]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g158ddA01653 for ; Tue, 5 Feb 2002 00:39:39 -0800 Received: from newman.mips.com (ns-dmz [206.31.31.225]) by mx.mips.com (8.9.3/8.9.0) with ESMTP id AAA01772; Tue, 5 Feb 2002 00:39:30 -0800 (PST) Received: from copfs01.mips.com (copfs01 [192.168.205.101]) by newman.mips.com (8.9.3/8.9.0) with ESMTP id AAA03164; Tue, 5 Feb 2002 00:39:29 -0800 (PST) Received: from copsun18.mips.com (copsun18 [192.168.205.28]) by copfs01.mips.com (8.11.4/8.9.0) with ESMTP id g158d3A21047; Tue, 5 Feb 2002 09:39:04 +0100 (MET) From: Hartvig Ekner Received: (from hartvige@localhost) by copsun18.mips.com (8.9.1/8.9.0) id JAA00051; Tue, 5 Feb 2002 09:39:27 +0100 (MET) Message-Id: <200202050839.JAA00051@copsun18.mips.com> Subject: Re: PATCH: Fix ll/sc for mips (take 3) To: justinca@ri.cmu.edu (Justin Carlson) Date: Tue, 5 Feb 2002 09:39:27 +0100 (MET) Cc: dan@debian.org (Daniel Jacobowitz), hjl@lucon.org (H . J . Lu), dom@algor.co.uk (Dominic Sweetman), libc-alpha@sources.redhat.com (GNU C Library), linux-mips@oss.sgi.com In-Reply-To: <1012887022.3343.9.camel@xyzzy.stargate.net> from "Justin Carlson" at Feb 05, 2002 12:30:22 AM X-Mailer: ELM [version 2.5 PL1] MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-linux-mips@oss.sgi.com Precedence: bulk Note that the issue of a "LL" will trigger bus watching activity in the system logic (and maybe delays?) I would personally try to avoid issuing "dangling" ll's in the normal case, even though the functionality would be ok, and in some cases they are inavoidable. /Hartvig Justin Carlson writes: > > On Mon, 2002-02-04 at 23:47, Daniel Jacobowitz wrote: > > > > Won't this cause some gratuitous thrashing if someone else is trying to > > get the spinlock at the same time? > > > > Actually, if you look at the required semantics of ll, no. A ll by > itself can never cause a sc from another cpu to fail. It's part of the > semantic definition to avoid potential livelock cases, e.g. > > A does ll > B does ll, foiling A's lock attempt > A does sc, which fails > A does ll, foiling B's lock attempt > B does sc, which fails > B does ll, foiling A's lock attempt > ... > > Instead, this case becomes: > A does ll > B does ll > A does sc, which succeeds, even though B has done a ll > B does sc which fails > A does critical section work > B spins on ll until A releases the lock > > > -Justin > > -- _ _ _____ ____ Hartvig Ekner Mailto:hartvige@mips.com |\ /| | |____)(____ Direct: +45 4486 5503 | \/ | | | _____) MIPS Denmark Switch: +45 4486 5555 T E C H N O L O G I E S http://www.mips.com Fax...: +45 4486 5556 From owner-linux-mips@oss.sgi.com Tue Feb 5 01:51:08 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g159p8609646 for linux-mips-outgoing; Tue, 5 Feb 2002 01:51:08 -0800 Received: from mail.ict.ac.cn ([159.226.39.4]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g159owA09632 for ; Tue, 5 Feb 2002 01:50:58 -0800 Message-Id: <200202050950.g159owA09632@oss.sgi.com> Received: (qmail 5848 invoked from network); 5 Feb 2002 09:51:27 -0000 Received: from unknown (HELO foxsen) (@159.226.40.150) by 159.226.39.4 with SMTP; 5 Feb 2002 09:51:27 -0000 Date: Tue, 5 Feb 2002 17:48:18 +0800 From: Zhang Fuxin To: "H . J . Lu" CC: "linux-mips@oss.sgi.com" Subject: Re: Re: SNaN & QNaN on mips X-mailer: FoxMail 3.11 Release [cn] Mime-Version: 1.0 Content-Type: text/plain; charset="GB2312" Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by oss.sgi.com id g159owA09633 Sender: owner-linux-mips@oss.sgi.com Precedence: bulk hi, I am sorry but it seems i can't fix this without ugly changes. since i am not familiar with gcc code, i decide to leave it to you, but provide some information instead. In gcc there are 3 spaces where the NaN handling is assumed the Intel way. 1. gcc/real.c (the most important one) here the author seems to have known the NaN pattern problem,so he leaves a interface macro for defining non intel NaN patterns: (comment of function "make_nan()",at about line 6219) /* Output a binary NaN bit pattern in the target machine's format. */ /* If special NaN bit patterns are required, define them in tm.h as arrays of unsigned 16-bit shorts. Otherwise, use the default patterns here. */ I have read through this file and decided that the follow defined should be enough for mips: /* NaN pattern,mips QNAN & SNAN is different from intel's * DFMODE_NAN and SFMODE_NAN is used in real.c */ #define DFMODE_NAN \ unsigned short DFbignan[4] = {0x7ff7, 0xffff, 0xffff, 0xffff}; \ unsigned short DFlittlenan[4] = {0xffff, 0xffff, 0xffff, 0xfff7} #define SFMODE_NAN \ unsigned short SFbignan[2] = {0x7fbf, 0xffff}; \ unsigned short SFlittlenan[2] = {0xffff, 0xffbf} But the problem is where to put them:(. Obviously it is target specified definitions and should be in config/mips/. Documents say tm.h is a symbol link and included in config.h,but it is no long true.If i add them to xm-mips.h then for native compilation it is ok but it fails for cross-compile. 2.gcc/reg-stack.c There is a hardcoded QNaN used around line 477: nan = gen_lowpart (SFmode, GEN_INT (0x7fc00000)); I sugest defining a macro QNAN_HAS_1ST_FRACBIT_CLEARED for mips and change it to,just don't know where to put it: #ifndef QNAN_HAS_1ST_FRACBIT_CLEARED nan = gen_lowpart (SFmode, GEN_INT (0x7fc00000)); #else nan = gen_lowpart (SFmode, GEN_INT (0x7fbfffff)); #endif 3. config/fp-bit.c this is for machine having no fpu hardware. again i susgest define QNAN_HAS_1ST_FRACBIT_CLEARED and then apply this patch: 190d189 < #ifndef QNAN_HAS_1ST_FRACBIT_CLEARED 192,195d190 < #else < fraction &= ~QUIET_NAN; < #endif < 379,380d373 < < #ifndef QNAN_HAS_1ST_FRACBIT_CLEARED 382,384d374 < #else < if (!(fraction & QUIET_NAN)) < #endif ÔÚ 2002-02-03 22:54:00 you wrote£º >On Mon, Feb 04, 2002 at 02:22:48PM +0800, Zhang Fuxin wrote: >> hi, >> >> Gcc (2.96 20000731,H.J.LU's rh port for mips) think 0x7fc00000 is QNaN and >> optimize 0.0/0.0 as 0x7fc00000 for single precision ops,while for my cpu >> (maybe most mips cpu) is a SNaN. R4k user's manual and "See Mips Run" both >> say so.And experiments confirm this. >> >> Should we correct it? > >Yes. Do you have a patch? > >Thanks. > > >H.J. Regards Zhang Fuxin fxzhang@ict.ac.cn From owner-linux-mips@oss.sgi.com Tue Feb 5 02:33:49 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g15AXno16988 for linux-mips-outgoing; Tue, 5 Feb 2002 02:33:49 -0800 Received: from delta.ds2.pg.gda.pl (macro@delta.ds2.pg.gda.pl [213.192.72.1]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g15AXhA16974; Tue, 5 Feb 2002 02:33:43 -0800 Received: from localhost by delta.ds2.pg.gda.pl (8.9.3/8.9.3) with SMTP id LAA10108; Tue, 5 Feb 2002 11:33:24 +0100 (MET) Date: Tue, 5 Feb 2002 11:33:23 +0100 (MET) From: "Maciej W. Rozycki" To: Ralf Baechle cc: Jason Gunthorpe , linux-mips@fnet.fr, linux-mips@oss.sgi.com Subject: Re: [patch] linux 2.4.17: An mb() rework In-Reply-To: <20020204180258.A6124@dea.linux-mips.net> Message-ID: Organization: Technical University of Gdansk MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-linux-mips@oss.sgi.com Precedence: bulk On Mon, 4 Feb 2002, Ralf Baechle wrote: > Bugs due to surprise memory reordering are entirely unfun to debug, so be > paranoid. They're out there to get you ... The rule of thumb is to use barriers whenever a *device* requires them and depend on the platform to define them appropriately. They will expand to nothing if unneeded, so there is no trade-off. -- + Maciej W. Rozycki, Technical University of Gdansk, Poland + +--------------------------------------------------------------+ + e-mail: macro@ds2.pg.gda.pl, PGP key available + From owner-linux-mips@oss.sgi.com Tue Feb 5 03:39:22 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g15BdMx27178 for linux-mips-outgoing; Tue, 5 Feb 2002 03:39:22 -0800 Received: from delta.ds2.pg.gda.pl (macro@delta.ds2.pg.gda.pl [213.192.72.1]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g15BdHA27168 for ; Tue, 5 Feb 2002 03:39:18 -0800 Received: from localhost by delta.ds2.pg.gda.pl (8.9.3/8.9.3) with SMTP id MAA12048; Tue, 5 Feb 2002 12:37:06 +0100 (MET) Date: Tue, 5 Feb 2002 12:37:06 +0100 (MET) From: "Maciej W. Rozycki" To: Hartvig Ekner cc: Justin Carlson , Daniel Jacobowitz , "H . J . Lu" , Dominic Sweetman , GNU C Library , linux-mips@oss.sgi.com Subject: Re: PATCH: Fix ll/sc for mips (take 3) In-Reply-To: <200202050839.JAA00051@copsun18.mips.com> Message-ID: Organization: Technical University of Gdansk MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-linux-mips@oss.sgi.com Precedence: bulk On Tue, 5 Feb 2002, Hartvig Ekner wrote: > Note that the issue of a "LL" will trigger bus watching activity in the > system logic (and maybe delays?) I would personally try to avoid issuing > "dangling" ll's in the normal case, even though the functionality would > be ok, and in some cases they are inavoidable. I'd suppose the address comparator to be active all the time, as it's the simpler approach and involves trivial asynchronous hardware and certainly no performance hit. -- + Maciej W. Rozycki, Technical University of Gdansk, Poland + +--------------------------------------------------------------+ + e-mail: macro@ds2.pg.gda.pl, PGP key available + From owner-linux-mips@oss.sgi.com Tue Feb 5 04:15:15 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g15CFFt32475 for linux-mips-outgoing; Tue, 5 Feb 2002 04:15:15 -0800 Received: from dea.linux-mips.net (a1as14-p209.stg.tli.de [195.252.191.209]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g15CFBA32462 for ; Tue, 5 Feb 2002 04:15:12 -0800 Received: (from ralf@localhost) by dea.linux-mips.net (8.11.6/8.11.1) id g15CCvs04561; Tue, 5 Feb 2002 13:12:57 +0100 Date: Tue, 5 Feb 2002 13:12:57 +0100 From: Ralf Baechle To: Hartvig Ekner Cc: Justin Carlson , Daniel Jacobowitz , "H . J . Lu" , Dominic Sweetman , GNU C Library , linux-mips@oss.sgi.com Subject: Re: PATCH: Fix ll/sc for mips (take 3) Message-ID: <20020205131257.A4482@dea.linux-mips.net> References: <1012887022.3343.9.camel@xyzzy.stargate.net> <200202050839.JAA00051@copsun18.mips.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <200202050839.JAA00051@copsun18.mips.com>; from hartvige@mips.com on Tue, Feb 05, 2002 at 09:39:27AM +0100 X-Accept-Language: de,en,fr Sender: owner-linux-mips@oss.sgi.com Precedence: bulk On Tue, Feb 05, 2002 at 09:39:27AM +0100, Hartvig Ekner wrote: > Note that the issue of a "LL" will trigger bus watching activity in the > system logic (and maybe delays?) I would personally try to avoid issuing > "dangling" ll's in the normal case, even though the functionality would > be ok, and in some cases they are inavoidable. Some of the processor manuals explicitly note that the execution of a ll instruction may not be visible at all externally. That's the case if the address is already in a primary cache line in exclusive (ll) or dirty (sc) state. That makes even if a processor supports full coherency since there is no reason to indicate the update to any other external agent. Or am I missing something? Ralf From owner-linux-mips@oss.sgi.com Tue Feb 5 04:31:43 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g15CVh702203 for linux-mips-outgoing; Tue, 5 Feb 2002 04:31:43 -0800 Received: from delta.ds2.pg.gda.pl (macro@delta.ds2.pg.gda.pl [213.192.72.1]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g15CVYA02179; Tue, 5 Feb 2002 04:31:35 -0800 Received: from localhost by delta.ds2.pg.gda.pl (8.9.3/8.9.3) with SMTP id NAA13528; Tue, 5 Feb 2002 13:31:06 +0100 (MET) Date: Tue, 5 Feb 2002 13:31:05 +0100 (MET) From: "Maciej W. Rozycki" To: Ralf Baechle cc: Hartvig Ekner , Justin Carlson , Daniel Jacobowitz , "H . J . Lu" , Dominic Sweetman , GNU C Library , linux-mips@oss.sgi.com Subject: Re: PATCH: Fix ll/sc for mips (take 3) In-Reply-To: <20020205131257.A4482@dea.linux-mips.net> Message-ID: Organization: Technical University of Gdansk MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-linux-mips@oss.sgi.com Precedence: bulk On Tue, 5 Feb 2002, Ralf Baechle wrote: > Some of the processor manuals explicitly note that the execution of a > ll instruction may not be visible at all externally. That's the case if > the address is already in a primary cache line in exclusive (ll) or > dirty (sc) state. That makes even if a processor supports full coherency > since there is no reason to indicate the update to any other external > agent. Or am I missing something? By definition, apart from an ordinary load, an "ll" does only the following two additional actions: 1. Loads the LLAddr register (it's visible in CP0, at least in certain implementations) to set up the ll comparator. 2. Sets the LLbit flip-flop to set the ll state to valid initially. None of the actions should normally involve externally visible activity. -- + Maciej W. Rozycki, Technical University of Gdansk, Poland + +--------------------------------------------------------------+ + e-mail: macro@ds2.pg.gda.pl, PGP key available + From owner-linux-mips@oss.sgi.com Tue Feb 5 04:38:56 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g15Ccu303064 for linux-mips-outgoing; Tue, 5 Feb 2002 04:38:56 -0800 Received: from mx.mips.com (mx.mips.com [206.31.31.226]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g15CclA03044; Tue, 5 Feb 2002 04:38:47 -0800 Received: from newman.mips.com (ns-dmz [206.31.31.225]) by mx.mips.com (8.9.3/8.9.0) with ESMTP id EAA04442; Tue, 5 Feb 2002 04:38:40 -0800 (PST) Received: from copfs01.mips.com (copfs01 [192.168.205.101]) by newman.mips.com (8.9.3/8.9.0) with ESMTP id EAA07880; Tue, 5 Feb 2002 04:38:37 -0800 (PST) Received: from copsun18.mips.com (copsun18 [192.168.205.28]) by copfs01.mips.com (8.11.4/8.9.0) with ESMTP id g15CcAA08992; Tue, 5 Feb 2002 13:38:10 +0100 (MET) From: Hartvig Ekner Received: (from hartvige@localhost) by copsun18.mips.com (8.9.1/8.9.0) id NAA03846; Tue, 5 Feb 2002 13:38:34 +0100 (MET) Message-Id: <200202051238.NAA03846@copsun18.mips.com> Subject: Re: PATCH: Fix ll/sc for mips (take 3) To: macro@ds2.pg.gda.pl (Maciej W. Rozycki) Date: Tue, 5 Feb 2002 13:38:34 +0100 (MET) Cc: ralf@oss.sgi.com (Ralf Baechle), hartvige@mips.com (Hartvig Ekner), justinca@ri.cmu.edu (Justin Carlson), dan@debian.org (Daniel Jacobowitz), hjl@lucon.org (H . J . Lu), dom@algor.co.uk (Dominic Sweetman), libc-alpha@sources.redhat.com (GNU C Library), linux-mips@oss.sgi.com In-Reply-To: from "Maciej W. Rozycki" at Feb 05, 2002 01:31:05 PM X-Mailer: ELM [version 2.5 PL1] MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-linux-mips@oss.sgi.com Precedence: bulk Some of MIPS's cores do externalize the event of a "LL" and make it visible on the bus interface. Similarly, the SC is externalized and requires a go/nogo response from the system logic. Think of it as putting a shared LLAddr & LLBit outside the processor. The SC will only succeed if the internal LLBit is ok *and* the external logic gives the go-ahead as well. The reasoning behind all this is that one can then utilize LL/SC in multi CPU systems without full coherency support being required. But then again, this might not be relevant for MIPS/Linux as it will not run without full HW coherency on multiple CPUs? /Hartvig Maciej W. Rozycki writes: > > On Tue, 5 Feb 2002, Ralf Baechle wrote: > > > Some of the processor manuals explicitly note that the execution of a > > ll instruction may not be visible at all externally. That's the case if > > the address is already in a primary cache line in exclusive (ll) or > > dirty (sc) state. That makes even if a processor supports full coherency > > since there is no reason to indicate the update to any other external > > agent. Or am I missing something? > > By definition, apart from an ordinary load, an "ll" does only the > following two additional actions: > > 1. Loads the LLAddr register (it's visible in CP0, at least in certain > implementations) to set up the ll comparator. > > 2. Sets the LLbit flip-flop to set the ll state to valid initially. > > None of the actions should normally involve externally visible activity. > > -- > + Maciej W. Rozycki, Technical University of Gdansk, Poland + > +--------------------------------------------------------------+ > + e-mail: macro@ds2.pg.gda.pl, PGP key available + > > -- _ _ _____ ____ Hartvig Ekner Mailto:hartvige@mips.com |\ /| | |____)(____ Direct: +45 4486 5503 | \/ | | | _____) MIPS Denmark Switch: +45 4486 5555 T E C H N O L O G I E S http://www.mips.com Fax...: +45 4486 5556 From owner-linux-mips@oss.sgi.com Tue Feb 5 05:30:25 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g15DUP318730 for linux-mips-outgoing; Tue, 5 Feb 2002 05:30:25 -0800 Received: from delta.ds2.pg.gda.pl (macro@delta.ds2.pg.gda.pl [213.192.72.1]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g15DU9A18515; Tue, 5 Feb 2002 05:30:10 -0800 Received: from localhost by delta.ds2.pg.gda.pl (8.9.3/8.9.3) with SMTP id OAA14932; Tue, 5 Feb 2002 14:29:00 +0100 (MET) Date: Tue, 5 Feb 2002 14:28:59 +0100 (MET) From: "Maciej W. Rozycki" To: Hartvig Ekner cc: Ralf Baechle , Justin Carlson , Daniel Jacobowitz , "H . J . Lu" , Dominic Sweetman , GNU C Library , linux-mips@oss.sgi.com Subject: Re: PATCH: Fix ll/sc for mips (take 3) In-Reply-To: <200202051238.NAA03846@copsun18.mips.com> Message-ID: Organization: Technical University of Gdansk MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-linux-mips@oss.sgi.com Precedence: bulk On Tue, 5 Feb 2002, Hartvig Ekner wrote: > Some of MIPS's cores do externalize the event of a "LL" and make it > visible on the bus interface. Similarly, the SC is externalized and > requires a go/nogo response from the system logic. Think of it as > putting a shared LLAddr & LLBit outside the processor. The SC will > only succeed if the internal LLBit is ok *and* the external logic gives > the go-ahead as well. OK, but an external register shouldn't need any additional CPU time to get its contents latched. > The reasoning behind all this is that one can then utilize LL/SC in > multi CPU systems without full coherency support being required. Nor should an external comparator. > But then again, this might not be relevant for MIPS/Linux as it will not > run without full HW coherency on multiple CPUs? How do you maintain coherency on such a system? To support such a model all shared area write accesses should be followed by explicit synchronization requests. It should be trivial but tedious to do for Linux, but it might not be that easy for threads. One bit I've forgotten about "ll" -- it also implies a "sync". -- + Maciej W. Rozycki, Technical University of Gdansk, Poland + +--------------------------------------------------------------+ + e-mail: macro@ds2.pg.gda.pl, PGP key available + From owner-linux-mips@oss.sgi.com Tue Feb 5 05:48:24 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g15DmO228987 for linux-mips-outgoing; Tue, 5 Feb 2002 05:48:24 -0800 Received: from surveyor.mars.org (surveyor.mars.org [216.98.134.66]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g15DmIA28955 for ; Tue, 5 Feb 2002 05:48:18 -0800 Received: from mars.org (localhost [127.0.0.1]) by surveyor.mars.org (8.9.3/8.9.3/Debian 8.9.3-21) with ESMTP id FAA32122; Tue, 5 Feb 2002 05:48:15 -0800 Message-Id: <200202051348.FAA32122@surveyor.mars.org> From: Rob Leslie To: Pete Popov Cc: linux-mips@oss.sgi.com Subject: Re: madplay on mips In-reply-to: Your message of "04 Feb 2002 10:46:54 PST." <1012848414.15163.140.camel@zeus> Mime-Version: 1.0 (generated by tm-edit 7.106) Content-Type: text/plain; charset=US-ASCII Date: Tue, 05 Feb 2002 05:48:15 -0800 Sender: owner-linux-mips@oss.sgi.com Precedence: bulk Pete Popov wrote: > Has anyone used madplay on mips to play mp3 files successfully? I've > tried it on two mips boards with different sound drivers, and in both > cases it plays the song slower and a bit muffled. It works on x86 and > supposedly ppc. Muffled sound could be the result of a poor FPM choice, or a buggy compiler. For best performance, MAD needs a multiply/accumulate instruction, which is not available on all MIPS platforms. Check the MIPS section of libmad/fixed.h and see whether you can use either of the MADD_ASM alternatives, then change your libmad/config.h to suit (or consider updating libmad/configure.in). In the worst case you might need to write a new asm alternative, or try something more generic like FPM_64BIT or FPM_DEFAULT -- though the latter could also be the cause of poor sound. I've encountered problems with certain gcc optimization options on some platforms, notably ARM and MIPS, the symptom being a sort of muffled sound result rather than the clear sound MAD ought to produce. I never traced these bugs in the compiler, so my only advice is to try different combinations of -fstrength-reduce and -finline-functions if you suspect this to be a problem. > Even though madplay claims that no floating point is used, the > disassembly of the latest version shows otherwise. But I tried it on a > board with a cpu that does have a hardware floating point unit with the > same result. The _only_ floating point used by madplay is in option parsing and calculation of peak amplitude in decibels upon completion of decoding. There is no floating point used in the decoder proper (libmad). I'm not sure what you mean by songs "playing slower" but it could be either libmad is not reaching real-time performance, or there could be issues with channel/sampling frequency selection in your sound driver. You could try -m and/or --downsample, or modify the audio output module to use a fixed known good sampling frequency. Also try sending output to a file (-o out.wav) and see if you can play that successfully with another program. If the problem is real-time performance, you can try the --enable-speed option to `configure' at the expense of some accuracy. -- Rob Leslie rob@mars.org From owner-linux-mips@oss.sgi.com Tue Feb 5 06:22:26 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g15EMQW07935 for linux-mips-outgoing; Tue, 5 Feb 2002 06:22:26 -0800 Received: from mailgate2.zdv.Uni-Mainz.DE (mailgate2.zdv.Uni-Mainz.DE [134.93.8.57]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g15EMJA07921; Tue, 5 Feb 2002 06:22:19 -0800 Received: from exchange2.zdv.Uni-Mainz.DE (exchange2.zdv.Uni-Mainz.DE [134.93.8.113]) by mailgate2.zdv.Uni-Mainz.DE (8.11.0/8.10.2) with ESMTP id g15EMEh07927; Tue, 5 Feb 2002 15:22:14 +0100 (MET) Received: from exstore1.zdv.uni-mainz.de ([134.93.8.124]) by exchange2.zdv.Uni-Mainz.DE with Microsoft SMTPSVC(5.0.2195.3779); Tue, 5 Feb 2002 15:22:11 +0100 Received: from mail pickup service by exstore1.zdv.uni-mainz.de with Microsoft SMTPSVC; Tue, 5 Feb 2002 15:22:10 +0100 Received: from mailgate1.zdv.Uni-Mainz.DE ([134.93.8.56]) by exstore1.zdv.uni-mainz.de with Microsoft SMTPSVC(5.0.2195.3779); Tue, 5 Feb 2002 11:38:11 +0100 Received: from guadalquivir.fnet.fr (guadalquivir.fnet.fr [193.104.112.133]) by mailgate1.zdv.Uni-Mainz.DE (8.11.0/8.10.2) with ESMTP id g15AcBe21591 for ; Tue, 5 Feb 2002 11:38:11 +0100 (MET) Received: (list@localhost) by guadalquivir.fnet.fr (8.8.8/97.02.12/Guadalquivir); id LAA06457; Tue, 5 Feb 2002 11:34:31 +0100 (MET) Received-Date: Tue, 5 Feb 2002 11:34:24 +0100 (MET) Date: Tue, 5 Feb 2002 11:33:23 +0100 (MET) From: "Maciej W. Rozycki" To: Ralf Baechle cc: Jason Gunthorpe , linux-mips@fnet.fr, linux-mips@oss.sgi.com Subject: Re: [patch] linux 2.4.17: An mb() rework In-Reply-To: <20020204180258.A6124@dea.linux-mips.net> Message-ID: Organization: Technical University of Gdansk MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Mailing-List: archive/latest/6639 X-Loop: linux-mips@fnet.fr X-OriginalArrivalTime: 05 Feb 2002 10:38:11.0840 (UTC) FILETIME=[3590D800:01C1AE31] Sender: owner-linux-mips@oss.sgi.com Precedence: bulk On Mon, 4 Feb 2002, Ralf Baechle wrote: > Bugs due to surprise memory reordering are entirely unfun to debug, so be > paranoid. They're out there to get you ... The rule of thumb is to use barriers whenever a *device* requires them and depend on the platform to define them appropriately. They will expand to nothing if unneeded, so there is no trade-off. -- + Maciej W. Rozycki, Technical University of Gdansk, Poland + +--------------------------------------------------------------+ + e-mail: macro@ds2.pg.gda.pl, PGP key available + From owner-linux-mips@oss.sgi.com Tue Feb 5 06:58:06 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g15Ew6c12453 for linux-mips-outgoing; Tue, 5 Feb 2002 06:58:06 -0800 Received: from mail.ict.ac.cn ([159.226.39.4]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g15EvfA12401 for ; Tue, 5 Feb 2002 06:57:41 -0800 Message-Id: <200202051457.g15EvfA12401@oss.sgi.com> Received: (qmail 28346 invoked from network); 5 Feb 2002 14:58:14 -0000 Received: from unknown (HELO foxsen) (@159.226.40.150) by 159.226.39.4 with SMTP; 5 Feb 2002 14:58:14 -0000 Date: Tue, 5 Feb 2002 22:54:42 +0800 From: Zhang Fuxin To: "linux-mips@oss.sgi.com" Subject: another gcc optimization bug? X-mailer: FoxMail 3.11 Release [cn] Mime-Version: 1.0 Content-Type: text/plain; charset="GB2312" Content-Transfer-Encoding: 7bit Sender: owner-linux-mips@oss.sgi.com Precedence: bulk hi, It seems gcc with optimization > -O2 will produce incorrect code for fp code: I find this example when tracking down the libm-test failures. ( expf(NaN) == NaN will report an extra "invalid operation" exception ) The faulting code snippet is: float __my_expf(float x) /* wrapper expf */ { float z; unsigned int hx; z = __ieee754_expf(x); if(_LIB_VERSION == _IEEE_) return z; if(__finitef(x)) { if(x>o_threshold) return 1.0; else if(x: 401290: 3c1c0fc0 lui gp,0xfc0 401294: 279c6dd0 addiu gp,gp,28112 401298: 0399e021 addu gp,gp,t9 40129c: 27bdffd0 addiu sp,sp,-48 4012a0: afbc0010 sw gp,16(sp) 4012a4: afbf0028 sw ra,40(sp) 4012a8: afbe0024 sw s8,36(sp) 4012ac: afbc0020 sw gp,32(sp) 4012b0: 03a0f021 move s8,sp 4012b4: e7cc0030 swc1 $f12,48(s8) 4012b8: c7cc0030 lwc1 $f12,48(s8) 4012bc: 8f998088 lw t9,-32632(gp) 4012c0: 00000000 nop 4012c4: 0320f809 jalr t9 4012c8: 00000000 nop 4012cc: 8fdc0010 lw gp,16(s8) 4012d0: e7c00018 swc1 $f0,24(s8) 4012d4: 8f8380ac lw v1,-32596(gp) 4012d8: 00000000 nop 4012dc: 8c630000 lw v1,0(v1) 4012e0: 2402ffff li v0,-1 4012e4: 14620004 bne v1,v0,4012f8 <__my_expf+0x68> 4012e8: 00000000 nop 4012ec: c7c00018 lwc1 $f0,24(s8) 4012f0: 10000032 b 4013bc <__my_expf+0x12c> 4012f4: 00000000 nop 4012f8: c7cc0030 lwc1 $f12,48(s8) 4012fc: 8f998090 lw t9,-32624(gp) 401300: 00000000 nop 401304: 0320f809 jalr t9 401308: 00000000 nop 40130c: 8fdc0010 lw gp,16(s8) 401310: 10400029 beqz v0,4013b8 <__my_expf+0x128> 401314: 00000000 nop 401318: c7c20030 lwc1 $f2,48(s8) 40131c: 8f818018 lw at,-32744(gp) 401320: 00000000 nop 401324: 242142a0 addiu at,at,17056 401328: c4200000 lwc1 $f0,0(at) 40132c: 00000000 nop 401330: 4602003c c.lt.s $f0,$f2 401334: 00000000 nop 401338: 45010003 bc1t 401348 <__my_expf+0xb8> 40133c: 00000000 nop 401340: 10000005 b 401358 <__my_expf+0xc8> 401344: 00000000 nop 401348: 3c013f80 lui at,0x3f80 40134c: 44810000 mtc1 at,$f0 401350: 1000001a b 4013bc <__my_expf+0x12c> 401354: 00000000 nop 401358: c7c20030 lwc1 $f2,48(s8) 40135c: 8f818018 lw at,-32744(gp) 401360: 00000000 nop 401364: 242142a4 addiu at,at,17060 401368: c4200000 lwc1 $f0,0(at) 40136c: 00000000 nop 401370: 4600103c c.lt.s $f2,$f0 401374: 00000000 nop 401378: 45010003 bc1t 401388 <__my_expf+0xf8> 40137c: 00000000 nop 401380: 10000005 b 401398 <__my_expf+0x108> 401384: 00000000 nop 401388: 3c014000 lui at,0x4000 40138c: 44810000 mtc1 at,$f0 401390: 1000000a b 4013bc <__my_expf+0x12c> 401394: 00000000 nop 401398: 8f848018 lw a0,-32744(gp) 40139c: 00000000 nop 4013a0: 248442a8 addiu a0,a0,17064 4013a4: 8f998058 lw t9,-32680(gp) 4013a8: 00000000 nop 4013ac: 0320f809 jalr t9 4013b0: 00000000 nop 4013b4: 8fdc0010 lw gp,16(s8) 4013b8: c7c00018 lwc1 $f0,24(s8) 4013bc: 03c0e821 move sp,s8 4013c0: 8fbf0028 lw ra,40(sp) 4013c4: 8fbe0024 lw s8,36(sp) 4013c8: 03e00008 jr ra 4013cc: 27bd0030 addiu sp,sp,48 2. with -O 000000000400fc0 <__my_expf>: 400fc0: 3c1c0fc0 lui gp,0xfc0 400fc4: 279c70a0 addiu gp,gp,28832 400fc8: 0399e021 addu gp,gp,t9 400fcc: 27bdffd0 addiu sp,sp,-48 400fd0: afbc0010 sw gp,16(sp) 400fd4: e7b60028 swc1 $f22,40(sp) 400fd8: e7b7002c swc1 $f23,44(sp) 400fdc: e7b40020 swc1 $f20,32(sp) 400fe0: e7b50024 swc1 $f21,36(sp) 400fe4: afbf001c sw ra,28(sp) 400fe8: 46006506 mov.s $f20,$f12 400fec: afbc0018 sw gp,24(sp) 400ff0: 8f998088 lw t9,-32632(gp) 400ff4: 00000000 nop 400ff8: 0320f809 jalr t9 400ffc: 00000000 nop 401000: 8fbc0010 lw gp,16(sp) 401004: 00000000 nop 401008: 8f8380ac lw v1,-32596(gp) 40100c: 00000000 nop 401010: 8c630000 lw v1,0(v1) 401014: 2402ffff li v0,-1 401018: 46000586 mov.s $f22,$f0 40101c: 1062000a beq v1,v0,401048 <__my_expf+0x88> 401020: 4600a306 mov.s $f12,$f20 401024: 8f998090 lw t9,-32624(gp) 401028: 00000000 nop 40102c: 0320f809 jalr t9 401030: 00000000 nop 401034: 8fbc0010 lw gp,16(sp) 401038: 44800000 mtc1 zero,$f0 40103c: 14400002 bnez v0,401048 <__my_expf+0x88> 401040: 00000000 nop 401044: 4600b006 mov.s $f0,$f22 401048: 8fbf001c lw ra,28(sp) 40104c: c7b60028 lwc1 $f22,40(sp) 401050: c7b7002c lwc1 $f23,44(sp) 401054: c7b40020 lwc1 $f20,32(sp) 401058: c7b50024 lwc1 $f21,36(sp) 40105c: 03e00008 jr ra 401060: 27bd0030 addiu sp,sp,48 3. with -O2 0000000000400fc0 <__my_expf>: 400fc0: 3c1c0fc0 lui gp,0xfc0 400fc4: 279c70a0 addiu gp,gp,28832 400fc8: 0399e021 addu gp,gp,t9 400fcc: 27bdffd0 addiu sp,sp,-48 400fd0: afbc0010 sw gp,16(sp) 400fd4: e7b60028 swc1 $f22,40(sp) 400fd8: e7b7002c swc1 $f23,44(sp) 400fdc: e7b40020 swc1 $f20,32(sp) 400fe0: e7b50024 swc1 $f21,36(sp) 400fe4: afbf001c sw ra,28(sp) 400fe8: 46006506 mov.s $f20,$f12 400fec: afbc0018 sw gp,24(sp) 400ff0: 8f998088 lw t9,-32632(gp) 400ff4: 00000000 nop 400ff8: 0320f809 jalr t9 400ffc: 00000000 nop 401000: 8fbc0010 lw gp,16(sp) 401004: 00000000 nop 401008: 8f8380ac lw v1,-32596(gp) 40100c: 00000000 nop 401010: 8c630000 lw v1,0(v1) 401014: 2402ffff li v0,-1 401018: 46000586 mov.s $f22,$f0 40101c: 10620021 beq v1,v0,4010a4 <__my_expf+0xe4> 401020: 4600a306 mov.s $f12,$f20 401024: 8f998090 lw t9,-32624(gp) 401028: 00000000 nop 40102c: 0320f809 jalr t9 401030: 00000000 nop 401034: 8fbc0010 lw gp,16(sp) 401038: 3c0142b1 lui at,0x42b1 40103c: 34217180 ori at,at,0x7180 401040: 44811000 mtc1 at,$f2 401044: 3c013f80 lui at,0x3f80 401048: 44810000 mtc1 at,$f0 40104c: 4614103c c.lt.s $f2,$f20 // this is wrongly put ahead ? 401050: 10400013 beqz v0,4010a0 <__my_expf+0xe0> 401054: 00000000 nop 401058: 45010012 bc1t 4010a4 <__my_expf+0xe4> 40105c: 00000000 nop 401060: 3c01c2cf lui at,0xc2cf 401064: 3421f1b5 ori at,at,0xf1b5 401068: 44810000 mtc1 at,$f0 40106c: 8f848018 lw a0,-32744(gp) 401070: 00000000 nop 401074: 24843fa8 addiu a0,a0,16296 401078: 4600a03c c.lt.s $f20,$f0 40107c: 3c014000 lui at,0x4000 401080: 44810000 mtc1 at,$f0 401084: 45010007 bc1t 4010a4 <__my_expf+0xe4> 401088: 00000000 nop 40108c: 8f998058 lw t9,-32680(gp) 401090: 00000000 nop 401094: 0320f809 jalr t9 401098: 00000000 nop 40109c: 8fbc0010 lw gp,16(sp) 4010a0: 4600b006 mov.s $f0,$f22 4010a4: 8fbf001c lw ra,28(sp) 4010a8: c7b60028 lwc1 $f22,40(sp) 4010ac: c7b7002c lwc1 $f23,44(sp) 4010b0: c7b40020 lwc1 $f20,32(sp) 4010b4: c7b50024 lwc1 $f21,36(sp) 4010b8: 03e00008 jr ra 4010bc: 27bd0030 addiu sp,sp,48 Regards Zhang Fuxin fxzhang@ict.ac.cn From owner-linux-mips@oss.sgi.com Tue Feb 5 07:11:47 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g15FBlc14205 for linux-mips-outgoing; Tue, 5 Feb 2002 07:11:47 -0800 Received: from chmls20.mediaone.net (chmls20.ne.ipsvc.net [24.147.1.156]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g15FBQA14155; Tue, 5 Feb 2002 07:11:26 -0800 Received: from localhost (h00a0cc39f081.ne.mediaone.net [65.96.250.215]) by chmls20.mediaone.net (8.11.1/8.11.1) with ESMTP id g15FCZx09366; Tue, 5 Feb 2002 10:12:35 -0500 (EST) Date: Tue, 5 Feb 2002 10:10:29 -0500 Subject: Re: PATCH: Fix ll/sc for mips (take 3) Content-Type: text/plain; charset=US-ASCII; format=flowed Mime-Version: 1.0 (Apple Message framework v480) Cc: Jay Carlson , Dominic Sweetman , Hiroyuki Machida , hjl@lucon.org, linux-mips@oss.sgi.com To: Ralf Baechle From: Jay Carlson In-Reply-To: <20020205092811.C2582@dea.linux-mips.net> Message-Id: <7E232BAE-1A4A-11D6-927F-0030658AB11E@nop.com> Content-Transfer-Encoding: 7bit X-Mailer: Apple Mail (2.480) Sender: owner-linux-mips@oss.sgi.com Precedence: bulk On Tuesday, February 5, 2002, at 03:28 AM, Ralf Baechle wrote: > On Tue, Feb 05, 2002 at 01:16:46AM -0500, Jay Carlson wrote: > >> Given that I tossed out the SVR4 ABI in search of code density in snow, >> I'm probably a little abnormal in these concerns. But other people on >> small platforms may care. > > SNOW certainly was a nice invention and the definition of small is > changing. Are you planning to keep up the support for SNOW? Yeah, although it's slow going. As usual, "which toolchain" plays a major part in the delay :-) (Quick background for the list: Because there's such a large code size penalty to PIC/abicalls, I resurrected the bad old Linux/SVR3 statically linked, dynamically loaded libraries, which are linked at absolute locations. Shane Nay took this from a cute demo to a working distribution for the Agenda VR3; Brian Webb helped. Typical code reduction is ~25-40%, eg 391k->272k.) I think I finally have a working jumptable implementation, which should allow (careful!) upgrades of libraries without triggering app rebuilds. The pain was not actually jumptables themselves; it was getting all exported data in a library shuffled around so it could live at fixed addresses. -fdata-sections let me do most of this with linker scripts. Unfortunately, g++ was still emitting "int foo;" in ".bss", so I had to fix it to generate the proper ".bss.foo". I created a toolchain builder based on the RH71 SRPMs. About halfway through this, I remembered why I hadn't upgraded from glibc 2.0 to 2.2 before---the library size doubled. So after getting a few huge statically linked executables tested to make sure the toolchain was sound, I backtracked to uclibc and the old Agenda glibc "2.0.7". I have plausible-looking builds of both, but I haven't actually run them on real hardware..... (Is there any hope of patching glibc 2.2.4 with the sglibc patches? If so, how?) I started writing a /lib/ld-snow.so.1 to get the library loading code out of the main body of executables. I'm hoping to have a beta of a full toolchain/library build tool shipped this weekend or next, and from there hook into the community efforts to automate rebuilding the Agenda VR3 from source. I figure X and a pile of C++ fltk apps will expose any lingering bugs in the toolchain and new bugs in the shared library mechanism. I'd like to be less Agenda-centric. I think this work would benefit the Helio as well as other small platforms. But as you say, the definition of "small" is changing; hopefully in few years, machines will be big enough to support the SVR4 ABI without second thoughts. I don't know; it's possible that the really low end machines will just get cheaper instead of bigger. Speaking of small, anybody have a Linux box with a CPU with working MIPS16 support? (Other than Vr41xx; I have plenty of those to test on.) I have a small test case I'd like someone to run. Jay From owner-linux-mips@oss.sgi.com Tue Feb 5 08:06:28 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g15G6Si21476 for linux-mips-outgoing; Tue, 5 Feb 2002 08:06:28 -0800 Received: from chmls05.mediaone.net (chmls05.ne.ipsvc.net [24.147.1.143]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g15G6MA21451 for ; Tue, 5 Feb 2002 08:06:22 -0800 Received: from localhost (h00a0cc39f081.ne.mediaone.net [65.96.250.215]) by chmls05.mediaone.net (8.11.1/8.11.1) with ESMTP id g15G64u29653; Tue, 5 Feb 2002 11:06:05 -0500 (EST) Date: Tue, 5 Feb 2002 11:06:15 -0500 Subject: Re: PATCH: Fix ll/sc for mips (take 3) Content-Type: text/plain; charset=US-ASCII; format=flowed Mime-Version: 1.0 (Apple Message framework v480) Cc: linux-mips@oss.sgi.com To: Jay Carlson From: Jay Carlson In-Reply-To: <7E232BAE-1A4A-11D6-927F-0030658AB11E@nop.com> Message-Id: <48264C88-1A52-11D6-927F-0030658AB11E@nop.com> Content-Transfer-Encoding: 7bit X-Mailer: Apple Mail (2.480) Sender: owner-linux-mips@oss.sgi.com Precedence: bulk On Tuesday, February 5, 2002, at 10:10 AM, Jay Carlson wrote: > (Quick background for the list: Because there's such a large code size > penalty to PIC/abicalls, I resurrected the bad old Linux/SVR3 > statically linked, dynamically loaded libraries, which are linked at > absolute locations. Shane Nay took this from a cute demo to a working > distribution for the Agenda VR3; Brian Webb helped. Typical code > reduction is ~25-40%, eg 391k->272k.) Oh yes, performance. Apps on the Agenda VR3 built in the snow ABI are dramatically faster/more responsive. If you don't believe me, go search the agenda-dev list and read the testimonials :-) I don't fully understand why, though. Here are my speculations; bear in mind that the VR3 and some of the other small boxes have 16-bit memory interfaces with small i/d caches. 1) Better icache efficiency. 2) Fewer loads (and stalls) to get typical work done. In PIC, you need a load per symbol reference, and that's every function call. 3) Better dcache efficiency. The GOT no longer needs to be hit for those symbol references. 4) Reduced TLB usage. The GOT pages for each module are quite hot, so now that we're no longer touching them, their 4k (ouch) TLB entries can point somewhere more useful. 5) No symbol resolution at load time. For C++ apps, this can help startup a lot. (prelinking fixes this too) 6) Better scheduling from gcc. egcs seemed to do a better job of arranging loads ahead of use when building non-pic; on the TX39, this helps even more due to non-blocking loads. I dunno. Jay From owner-linux-mips@oss.sgi.com Tue Feb 5 08:50:34 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g15GoY427163 for linux-mips-outgoing; Tue, 5 Feb 2002 08:50:34 -0800 Received: from real.realitydiluted.com (real.realitydiluted.com [208.242.241.164]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g15GoWA27156 for ; Tue, 5 Feb 2002 08:50:32 -0800 Received: from localhost.localdomain ([127.0.0.1] helo=cotw.com) by real.realitydiluted.com with esmtp (Exim 3.22 #1 (Red Hat Linux)) id 16Y8na-0000JQ-00 for ; Tue, 05 Feb 2002 10:50:26 -0600 Message-ID: <3C600D4C.43CBA784@cotw.com> Date: Tue, 05 Feb 2002 10:50:20 -0600 From: "Steven J. Hill" Reply-To: sjhill@cotw.com X-Mailer: Mozilla 4.77 [en] (X11; U; Linux 2.4.17-xfs i686) X-Accept-Language: en MIME-Version: 1.0 To: linux-mips@oss.sgi.com Subject: What is the maximum physical RAM for a 32bit MIPS core? Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-linux-mips@oss.sgi.com Precedence: bulk I am just trying to fill in some more MIPS knowledge here. With a 32-bit MIPS processor, we are forever limited to a userspace of 2GB in size thanks to the kuser region. kseg0/1 map the same 512MB of physical memory. kseg2 is 1GB in size and hence it could address another 1GB of RAM. So, is the maximum amount of RAM for a 32bit MIPS core: 1) 1.5GB = 0.5GB kseg0/1 + 1.0GB kseg2 2) 4.0GB = largest 32-bit address 3) Something larger than 4.0GB by adding fancy external HW logic Also, for choice #3, while it would be a hit in performance, could you use the fp registers for 64-bit pointers to address larger than 4.0GB? Thanks in advance. -Steve -- Steven J. Hill - Embedded SW Engineer From owner-linux-mips@oss.sgi.com Tue Feb 5 09:47:46 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g15Hlk909304 for linux-mips-outgoing; Tue, 5 Feb 2002 09:47:46 -0800 Received: from mx.mips.com (mx.mips.com [206.31.31.226]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g15HlfA09301 for ; Tue, 5 Feb 2002 09:47:41 -0800 Received: from newman.mips.com (ns-dmz [206.31.31.225]) by mx.mips.com (8.9.3/8.9.0) with ESMTP id JAA08451; Tue, 5 Feb 2002 09:47:33 -0800 (PST) Received: from copfs01.mips.com (copfs01 [192.168.205.101]) by newman.mips.com (8.9.3/8.9.0) with ESMTP id JAA15438; Tue, 5 Feb 2002 09:47:32 -0800 (PST) Received: from copsun18.mips.com (copsun18 [192.168.205.28]) by copfs01.mips.com (8.11.4/8.9.0) with ESMTP id g15Hl4A25550; Tue, 5 Feb 2002 18:47:04 +0100 (MET) From: Hartvig Ekner Received: (from hartvige@localhost) by copsun18.mips.com (8.9.1/8.9.0) id SAA21696; Tue, 5 Feb 2002 18:47:28 +0100 (MET) Message-Id: <200202051747.SAA21696@copsun18.mips.com> Subject: Re: What is the maximum physical RAM for a 32bit MIPS core? To: sjhill@cotw.com Date: Tue, 5 Feb 2002 18:47:28 +0100 (MET) Cc: linux-mips@oss.sgi.com In-Reply-To: <3C600D4C.43CBA784@cotw.com> from "Steven J. Hill" at Feb 05, 2002 10:50:20 AM X-Mailer: ELM [version 2.5 PL1] MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-linux-mips@oss.sgi.com Precedence: bulk You have to distinguish between physical and virtual memory. The MIPS32 architecture supports implementations with up to 36 bits of physical address space, however the virtual address space in kernel and user mode is as you describe below. One note: Many MIPS32 implementations choose not to implement all 36 PA bits, but limit themselves to 32 bits. This saves a few bits in the TLB and a few address lines. And no to the FP thing: FP registers can only be used to hold FP values. All addressing is done through integer registers. And any given process can only see 2GB anyway. /Hartvig Steven J. Hill writes: > > I am just trying to fill in some more MIPS knowledge here. With a 32-bit > MIPS processor, we are forever limited to a userspace of 2GB in size thanks > to the kuser region. kseg0/1 map the same 512MB of physical memory. kseg2 > is 1GB in size and hence it could address another 1GB of RAM. So, is the > maximum amount of RAM for a 32bit MIPS core: > > 1) 1.5GB = 0.5GB kseg0/1 + 1.0GB kseg2 > > 2) 4.0GB = largest 32-bit address > > 3) Something larger than 4.0GB by adding fancy external HW logic > > Also, for choice #3, while it would be a hit in performance, could you use > the fp registers for 64-bit pointers to address larger than 4.0GB? > > Thanks in advance. > > -Steve > > -- > Steven J. Hill - Embedded SW Engineer > -- _ _ _____ ____ Hartvig Ekner Mailto:hartvige@mips.com |\ /| | |____)(____ Direct: +45 4486 5503 | \/ | | | _____) MIPS Denmark Switch: +45 4486 5555 T E C H N O L O G I E S http://www.mips.com Fax...: +45 4486 5556 From owner-linux-mips@oss.sgi.com Tue Feb 5 11:28:50 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g15JSof30389 for linux-mips-outgoing; Tue, 5 Feb 2002 11:28:50 -0800 Received: from mx.mips.com (mx.mips.com [206.31.31.226]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g15JSiA30386 for ; Tue, 5 Feb 2002 11:28:44 -0800 Received: from newman.mips.com (ns-dmz [206.31.31.225]) by mx.mips.com (8.9.3/8.9.0) with ESMTP id LAA10568; Tue, 5 Feb 2002 11:28:36 -0800 (PST) Received: from copfs01.mips.com (copfs01 [192.168.205.101]) by newman.mips.com (8.9.3/8.9.0) with ESMTP id LAA21674; Tue, 5 Feb 2002 11:28:36 -0800 (PST) Received: from copsun18.mips.com (copsun18 [192.168.205.28]) by copfs01.mips.com (8.11.4/8.9.0) with ESMTP id g15JSAA29091; Tue, 5 Feb 2002 20:28:10 +0100 (MET) From: Hartvig Ekner Received: (from hartvige@localhost) by copsun18.mips.com (8.9.1/8.9.0) id UAA21774; Tue, 5 Feb 2002 20:28:34 +0100 (MET) Message-Id: <200202051928.UAA21774@copsun18.mips.com> Subject: Re: PATCH: Fix ll/sc for mips (take 3) To: macro@ds2.pg.gda.pl (Maciej W. Rozycki) Date: Tue, 5 Feb 2002 20:28:34 +0100 (MET) Cc: linux-mips@oss.sgi.com In-Reply-To: from "Maciej W. Rozycki" at Feb 05, 2002 02:28:59 PM X-Mailer: ELM [version 2.5 PL1] MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-linux-mips@oss.sgi.com Precedence: bulk Maciej W. Rozycki writes: > How do you maintain coherency on such a system? To support such a model > all shared area write accesses should be followed by explicit > synchronization requests. It should be trivial but tedious to do for > Linux, but it might not be that easy for threads. This would have to be a loosely coupled system - something using either software coherency or uncached accesses for the shared areas. And then LL/SC for synchronization primitives. There are a fair number of SOC designs like this, even with more than two processors. /Hartvig From owner-linux-mips@oss.sgi.com Tue Feb 5 11:30:36 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g15JUaF30901 for linux-mips-outgoing; Tue, 5 Feb 2002 11:30:36 -0800 Received: from ocean.lucon.org (12-234-19-19.client.attbi.com [12.234.19.19]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g15JUIA30898 for ; Tue, 5 Feb 2002 11:30:18 -0800 Received: by ocean.lucon.org (Postfix, from userid 1000) id 5C5A5125CC; Tue, 5 Feb 2002 11:30:17 -0800 (PST) Date: Tue, 5 Feb 2002 11:30:17 -0800 From: "H . J . Lu" To: Dominic Sweetman , GNU C Library , linux-mips@oss.sgi.com Subject: Re: PATCH: Fix ll/sc for mips (take 3) Message-ID: <20020205113017.A6144@lucon.org> References: <20020201222657.A13339@nevyn.them.org> <1012676003.1563.6.camel@xyzzy.stargate.net> <20020202120354.A1522@lucon.org> <15454.22661.855423.532827@gladsmuir.algor.co.uk> <20020204083115.C13384@lucon.org> <15454.47823.837119.847975@gladsmuir.algor.co.uk> <20020204172857.A22337@lucon.org> <20020204215804.A2095@nevyn.them.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <20020204215804.A2095@nevyn.them.org>; from dan@debian.org on Mon, Feb 04, 2002 at 09:58:04PM -0500 Sender: owner-linux-mips@oss.sgi.com Precedence: bulk On Mon, Feb 04, 2002 at 09:58:04PM -0500, Daniel Jacobowitz wrote: > On Mon, Feb 04, 2002 at 05:28:57PM -0800, H . J . Lu wrote: > > On Mon, Feb 04, 2002 at 04:46:07PM +0000, Dominic Sweetman wrote: > > > > > > H . J . Lu (hjl@lucon.org) writes: > > > > > > > I can change glibc not to use branch-likely without using nop. But it > > > > may require one or two instructions outside of the loop. Should I do > > > > it given what we know now? > > > > > > I would not recommend using "branch likely" in assembler coding, if > > > that's what you're asking. > > > > > > > Here is a patch to remove branch likely. But I couldn't find a way > > not to fill the delay slot with nop. BTW, is that safe to remove > > ".set noreorder"? > > You mean, if there is nothing which can be put there? Yes, it's safe. > Here is a new patch. I removed the extra "ll" in the delay slot. H.J. --- 2002-02-05 H.J. Lu * sysdeps/mips/pspinlock.c (__pthread_spin_lock): Not use branch likely. Remove ".set noreorder". * sysdeps/mips/pt-machine.h (testandset): Liekwise. (__compare_and_swap): Liekwise. 2002-02-05 H.J. Lu * sysdeps/mips/atomicity.h (exchange_and_add): Not use branch likely. Remove ".set noreorder". (atomic_add): Likewise. (compare_and_swap): Likewise. * sysdeps/unix/sysv/linux/mips/sys/tas.h (_test_and_set): Likewise. --- libc/linuxthreads/sysdeps/mips/pspinlock.c.llsc Mon Feb 4 13:45:01 2002 +++ libc/linuxthreads/sysdeps/mips/pspinlock.c Tue Feb 5 11:26:22 2002 @@ -32,17 +32,13 @@ __pthread_spin_lock (pthread_spinlock_t unsigned int tmp1, tmp2; asm volatile - ("\t\t\t# spin_lock\n\t" - "ll %1,%3\n" + ("\t\t\t# spin_lock\n" "1:\n\t" - ".set push\n\t" - ".set noreorder\n\t" + "ll %1,%3\n" "bnez %1,1b\n\t" " li %2,1\n\t" "sc %2,%0\n\t" - "beqzl %2,1b\n\t" - " ll %1,%3\n\t" - ".set pop" + "beqz %2,1b\n\t" : "=m" (*lock), "=&r" (tmp1), "=&r" (tmp2) : "m" (*lock) : "memory"); --- libc/linuxthreads/sysdeps/mips/pt-machine.h.llsc Mon Feb 4 13:45:01 2002 +++ libc/linuxthreads/sysdeps/mips/pt-machine.h Tue Feb 5 11:26:51 2002 @@ -57,18 +57,14 @@ __compare_and_swap (long int *p, long in long int ret, temp; __asm__ __volatile__ - ("/* Inline compare & swap */\n\t" - "ll %1,%5\n" + ("/* Inline compare & swap */\n" "1:\n\t" - ".set push\n\t" - ".set noreorder\n\t" + "ll %1,%5\n" "bne %1,%3,2f\n\t" " move %0,$0\n\t" "move %0,%4\n\t" "sc %0,%2\n\t" - "beqzl %0,1b\n\t" - " ll %1,%5\n\t" - ".set pop\n" + "beqz %0,1b\n\t" "2:\n\t" "/* End compare & swap */" : "=&r" (ret), "=&r" (temp), "=m" (*p) --- libc/sysdeps/mips/atomicity.h.llsc Mon Feb 4 13:45:18 2002 +++ libc/sysdeps/mips/atomicity.h Tue Feb 5 11:25:09 2002 @@ -32,16 +32,12 @@ exchange_and_add (volatile uint32_t *mem int result, tmp; __asm__ __volatile__ - ("/* Inline exchange & add */\n\t" + ("/* Inline exchange & add */\n" + "1:\n" "ll %0,%3\n" - "1:\n\t" "addu %1,%4,%0\n\t" "sc %1,%2\n\t" - ".set push\n\t" - ".set noreorder\n\t" - "beqzl %1,1b\n\t" - " ll %0,%3\n\t" - ".set pop\n\t" + "beqz %1,1b\n\t" "/* End exchange & add */" : "=&r"(result), "=&r"(tmp), "=m"(*mem) : "m" (*mem), "r"(val) @@ -57,16 +53,12 @@ atomic_add (volatile uint32_t *mem, int int result; __asm__ __volatile__ - ("/* Inline atomic add */\n\t" - "ll %0,%2\n" + ("/* Inline atomic add */\n" "1:\n\t" + "ll %0,%2\n" "addu %0,%3,%0\n\t" "sc %0,%1\n\t" - ".set push\n\t" - ".set noreorder\n\t" - "beqzl %0,1b\n\t" - " ll %0,%2\n\t" - ".set pop\n\t" + "beqz %0,1b\n\t" "/* End atomic add */" : "=&r"(result), "=m"(*mem) : "m" (*mem), "r"(val) @@ -80,18 +72,14 @@ compare_and_swap (volatile long int *p, long int ret, temp; __asm__ __volatile__ - ("/* Inline compare & swap */\n\t" - "ll %1,%5\n" + ("/* Inline compare & swap */\n" "1:\n\t" - ".set push\n\t" - ".set noreorder\n\t" + "ll %1,%5\n" "bne %1,%3,2f\n\t" " move %0,$0\n\t" "move %0,%4\n\t" "sc %0,%2\n\t" - "beqzl %0,1b\n\t" - " ll %1,%5\n\t" - ".set pop\n" + "beqz %0,1b\n\t" "2:\n\t" "/* End compare & swap */" : "=&r" (ret), "=&r" (temp), "=m" (*p) --- libc/sysdeps/unix/sysv/linux/mips/sys/tas.h.llsc Mon Feb 4 13:45:28 2002 +++ libc/sysdeps/unix/sysv/linux/mips/sys/tas.h Tue Feb 5 11:25:34 2002 @@ -42,17 +42,13 @@ _test_and_set (int *p, int v) __THROW int r, t; __asm__ __volatile__ - ("/* Inline test and set */\n\t" - "ll %0,%3\n" + ("/* Inline test and set */\n" "1:\n\t" - ".set push\n\t" - ".set noreorder\n\t" + "ll %0,%3\n" "beq %0,%4,2f\n\t" " move %1,%4\n\t" "sc %1,%2\n\t" - "beqzl %1,1b\n\t" - " ll %0,%3\n\t" - ".set pop\n" + "beqz %1,1b\n\t" "2:\n\t" "/* End test and set */" : "=&r" (r), "=&r" (t), "=m" (*p) From owner-linux-mips@oss.sgi.com Tue Feb 5 11:30:50 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g15JUos30968 for linux-mips-outgoing; Tue, 5 Feb 2002 11:30:50 -0800 Received: from dea.linux-mips.net (a1as03-p87.stg.tli.de [195.252.186.87]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g15JUkA30961 for ; Tue, 5 Feb 2002 11:30:46 -0800 Received: (from ralf@localhost) by dea.linux-mips.net (8.11.6/8.11.1) id g15IxDK07734; Tue, 5 Feb 2002 19:59:13 +0100 Date: Tue, 5 Feb 2002 19:59:12 +0100 From: Ralf Baechle To: Hartvig Ekner Cc: "Maciej W. Rozycki" , Justin Carlson , Daniel Jacobowitz , "H . J . Lu" , Dominic Sweetman , GNU C Library , linux-mips@oss.sgi.com Subject: Re: PATCH: Fix ll/sc for mips (take 3) Message-ID: <20020205195912.A7023@dea.linux-mips.net> References: <200202051238.NAA03846@copsun18.mips.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <200202051238.NAA03846@copsun18.mips.com>; from hartvige@mips.com on Tue, Feb 05, 2002 at 01:38:34PM +0100 X-Accept-Language: de,en,fr Sender: owner-linux-mips@oss.sgi.com Precedence: bulk On Tue, Feb 05, 2002 at 01:38:34PM +0100, Hartvig Ekner wrote: > Some of MIPS's cores do externalize the event of a "LL" and make it > visible on the bus interface. Similarly, the SC is externalized and > requires a go/nogo response from the system logic. Think of it as > putting a shared LLAddr & LLBit outside the processor. The SC will > only succeed if the internal LLBit is ok *and* the external logic gives > the go-ahead as well. > > The reasoning behind all this is that one can then utilize LL/SC in > multi CPU systems without full coherency support being required. > > But then again, this might not be relevant for MIPS/Linux as it will not > run without full HW coherency on multiple CPUs? Linux could easily be hacked into handle such a configuration as a cluster. Anything else would be a pretty large job. Ralf From owner-linux-mips@oss.sgi.com Tue Feb 5 12:46:51 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g15Kkp805016 for linux-mips-outgoing; Tue, 5 Feb 2002 12:46:51 -0800 Received: from real.realitydiluted.com (real.realitydiluted.com [208.242.241.164]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g15KklA04983 for ; Tue, 5 Feb 2002 12:46:47 -0800 Received: from localhost.localdomain ([127.0.0.1] helo=cotw.com) by real.realitydiluted.com with esmtp (Exim 3.22 #1 (Red Hat Linux)) id 16YCUC-0000XP-00; Tue, 05 Feb 2002 14:46:40 -0600 Message-ID: <3C6044A7.13FEB2E2@cotw.com> Date: Tue, 05 Feb 2002 14:46:31 -0600 From: "Steven J. Hill" Reply-To: sjhill@cotw.com X-Mailer: Mozilla 4.77 [en] (X11; U; Linux 2.4.17-xfs i686) X-Accept-Language: en MIME-Version: 1.0 To: Hartvig Ekner CC: linux-mips@oss.sgi.com Subject: Re: What is the maximum physical RAM for a 32bit MIPS core? References: <200202051747.SAA21696@copsun18.mips.com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-linux-mips@oss.sgi.com Precedence: bulk Hartvig Ekner wrote: > > You have to distinguish between physical and virtual memory. The MIPS32 > architecture supports implementations with up to 36 bits of physical > address space, however the virtual address space in kernel and user mode > is as you describe below. > I wasn't talking about the MIP32[tm] cores specifically, I was using a generalization of 32bit. However, this is good to know. All of the data sheets that I just downloaded from the MIPS site for the R4k[X] cores don't mention the 36-bit PA item. Care to elaborate? > One note: Many MIPS32 implementations choose not to implement all 36 PA > bits, but limit themselves to 32 bits. This saves a few bits in the TLB > and a few address lines. > So, if someone did want 36 PA bits on Linux, the TLB exception handlers and a little of the page table construction/management code would have to change. The userspace contraints and such would still remain. Cool. -Steve -- Steven J. Hill - Embedded SW Engineer From owner-linux-mips@oss.sgi.com Tue Feb 5 12:54:12 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g15KsCH10683 for linux-mips-outgoing; Tue, 5 Feb 2002 12:54:12 -0800 Received: from mx.mips.com (mx.mips.com [206.31.31.226]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g15Ks8A10637 for ; Tue, 5 Feb 2002 12:54:08 -0800 Received: from newman.mips.com (ns-dmz [206.31.31.225]) by mx.mips.com (8.9.3/8.9.0) with ESMTP id MAA12073; Tue, 5 Feb 2002 12:54:02 -0800 (PST) Received: from copfs01.mips.com (copfs01 [192.168.205.101]) by newman.mips.com (8.9.3/8.9.0) with ESMTP id MAA25903; Tue, 5 Feb 2002 12:54:00 -0800 (PST) Received: from copsun18.mips.com (copsun18 [192.168.205.28]) by copfs01.mips.com (8.11.4/8.9.0) with ESMTP id g15KrYA01845; Tue, 5 Feb 2002 21:53:34 +0100 (MET) From: Hartvig Ekner Received: (from hartvige@localhost) by copsun18.mips.com (8.9.1/8.9.0) id VAA21843; Tue, 5 Feb 2002 21:53:58 +0100 (MET) Message-Id: <200202052053.VAA21843@copsun18.mips.com> Subject: Re: What is the maximum physical RAM for a 32bit MIPS core? To: sjhill@cotw.com Date: Tue, 5 Feb 2002 21:53:58 +0100 (MET) Cc: hartvige@mips.com (Hartvig Ekner), linux-mips@oss.sgi.com In-Reply-To: <3C6044A7.13FEB2E2@cotw.com> from "Steven J. Hill" at Feb 05, 2002 02:46:31 PM X-Mailer: ELM [version 2.5 PL1] MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-linux-mips@oss.sgi.com Precedence: bulk Hi, Steven J. Hill writes: > > Hartvig Ekner wrote: > > > > You have to distinguish between physical and virtual memory. The MIPS32 > > architecture supports implementations with up to 36 bits of physical > > address space, however the virtual address space in kernel and user mode > > is as you describe below. > > > I wasn't talking about the MIP32[tm] cores specifically, I was using a > generalization of 32bit. However, this is good to know. All of the data > sheets that I just downloaded from the MIPS site for the R4k[X] cores > don't mention the 36-bit PA item. Care to elaborate? Sure. All the 4K, 4KE and 4KS families (all MIPS32 cores) from MTI only provide 32 bits of PA. The 5K and 20K families (MIPS64 implementations) both provide 36 bit of PA. Also note that all of the above is only relevant for cores which have a TLB. The low-end 4K/4KE/4KS cores all come in variants without TLB (to save die area) and these can of course only generate 32-bits of PA regardless. /Hartvig From owner-linux-mips@oss.sgi.com Tue Feb 5 13:13:05 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g15LD5Z14875 for linux-mips-outgoing; Tue, 5 Feb 2002 13:13:05 -0800 Received: from hermes.mvista.com (gateway-1237.mvista.com [12.44.186.158]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g15LD1A14871 for ; Tue, 5 Feb 2002 13:13:02 -0800 Received: from zeus.mvista.com (zeus.mvista.com [10.0.0.112]) by hermes.mvista.com (8.11.0/8.11.0) with ESMTP id g15LAoB19474; Tue, 5 Feb 2002 13:10:50 -0800 Subject: Re: What is the maximum physical RAM for a 32bit MIPS core? From: Pete Popov To: sjhill@cotw.com Cc: Hartvig Ekner , linux-mips In-Reply-To: <3C6044A7.13FEB2E2@cotw.com> References: <200202051747.SAA21696@copsun18.mips.com> <3C6044A7.13FEB2E2@cotw.com> Content-Type: text/plain Content-Transfer-Encoding: 7bit X-Mailer: Evolution/1.0.1 Date: 05 Feb 2002 13:15:09 -0800 Message-Id: <1012943709.10659.106.camel@zeus> Mime-Version: 1.0 Sender: owner-linux-mips@oss.sgi.com Precedence: bulk On Tue, 2002-02-05 at 12:46, Steven J. Hill wrote: > Hartvig Ekner wrote: > > > > You have to distinguish between physical and virtual memory. The MIPS32 > > architecture supports implementations with up to 36 bits of physical > > address space, however the virtual address space in kernel and user mode > > is as you describe below. > > > I wasn't talking about the MIP32[tm] cores specifically, I was using a > generalization of 32bit. However, this is good to know. All of the data > sheets that I just downloaded from the MIPS site for the R4k[X] cores > don't mention the 36-bit PA item. Care to elaborate? > > > One note: Many MIPS32 implementations choose not to implement all 36 PA > > bits, but limit themselves to 32 bits. This saves a few bits in the TLB > > and a few address lines. > > > So, if someone did want 36 PA bits on Linux, the TLB exception handlers > and a little of the page table construction/management code would have to > change. The userspace contraints and such would still remain. Cool. I'm not sure if it's a "little" though. Ralf has already done the work for 64bit memory support on 32bit kernels, but that only works currently on 64bit CPUs. I started hacking on the 64bit memory patch to get it to work on 32bit processors, but had to put that aside for a few weeks. I hope to get back to it soon. Pete From owner-linux-mips@oss.sgi.com Tue Feb 5 13:24:24 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g15LOOI15252 for linux-mips-outgoing; Tue, 5 Feb 2002 13:24:24 -0800 Received: from real.realitydiluted.com (real.realitydiluted.com [208.242.241.164]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g15LOLA15248 for ; Tue, 5 Feb 2002 13:24:21 -0800 Received: from localhost.localdomain ([127.0.0.1] helo=cotw.com) by real.realitydiluted.com with esmtp (Exim 3.22 #1 (Red Hat Linux)) id 16YD4W-0000aG-00; Tue, 05 Feb 2002 15:24:12 -0600 Message-ID: <3C604D73.88F1CDCE@cotw.com> Date: Tue, 05 Feb 2002 15:24:03 -0600 From: "Steven J. Hill" Reply-To: sjhill@cotw.com X-Mailer: Mozilla 4.77 [en] (X11; U; Linux 2.4.17-xfs i686) X-Accept-Language: en MIME-Version: 1.0 To: Pete Popov CC: Hartvig Ekner , linux-mips Subject: Re: What is the maximum physical RAM for a 32bit MIPS core? References: <200202051747.SAA21696@copsun18.mips.com> <3C6044A7.13FEB2E2@cotw.com> <1012943709.10659.106.camel@zeus> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-linux-mips@oss.sgi.com Precedence: bulk Pete Popov wrote: > > I'm not sure if it's a "little" though. Ralf has already done the work > for 64bit memory support on 32bit kernels, but that only works currently > on 64bit CPUs. I started hacking on the 64bit memory patch to get it to > work on 32bit processors, but had to put that aside for a few weeks. I > hope to get back to it soon. > Sure, the "little" is a relative term. As far as your patch is concerned, you are essentially trying to use a true 32-bit processor (my definition being that it is not a 64-bit processor running in 32-bit mode), to address address more than 4GB of physical memory. I don't see how that is possible with just the MMU and TLB unless you are using chip selects and customm logic. -Steve -- Steven J. Hill - Embedded SW Engineer From owner-linux-mips@oss.sgi.com Tue Feb 5 13:41:57 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g15Lfvq15520 for linux-mips-outgoing; Tue, 5 Feb 2002 13:41:57 -0800 Received: from hermes.mvista.com (gateway-1237.mvista.com [12.44.186.158]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g15LfsA15517 for ; Tue, 5 Feb 2002 13:41:54 -0800 Received: from zeus.mvista.com (zeus.mvista.com [10.0.0.112]) by hermes.mvista.com (8.11.0/8.11.0) with ESMTP id g15LdjB21511; Tue, 5 Feb 2002 13:39:45 -0800 Subject: Re: What is the maximum physical RAM for a 32bit MIPS core? From: Pete Popov To: sjhill@cotw.com Cc: Hartvig Ekner , linux-mips In-Reply-To: <3C604D73.88F1CDCE@cotw.com> References: <200202051747.SAA21696@copsun18.mips.com> <3C6044A7.13FEB2E2@cotw.com> <1012943709.10659.106.camel@zeus> <3C604D73.88F1CDCE@cotw.com> Content-Type: text/plain Content-Transfer-Encoding: 7bit X-Mailer: Evolution/1.0.1 Date: 05 Feb 2002 13:44:03 -0800 Message-Id: <1012945444.10720.113.camel@zeus> Mime-Version: 1.0 Sender: owner-linux-mips@oss.sgi.com Precedence: bulk On Tue, 2002-02-05 at 13:24, Steven J. Hill wrote: > Pete Popov wrote: > > > > I'm not sure if it's a "little" though. Ralf has already done the work > > for 64bit memory support on 32bit kernels, but that only works currently > > on 64bit CPUs. I started hacking on the 64bit memory patch to get it to > > work on 32bit processors, but had to put that aside for a few weeks. I > > hope to get back to it soon. > > > Sure, the "little" is a relative term. As far as your patch is concerned, > you are essentially trying to use a true 32-bit processor (my definition > being that it is not a 64-bit processor running in 32-bit mode), to address > address more than 4GB of physical memory. I don't see how that is possible > with just the MMU and TLB unless you are using chip selects and customm > logic. I failed to mention that the additional patch, once working, would be for MIPS32 (as in the MIPS Tech's MIPS32 spec, not just any 32 bit CPU) CPUs that implemented the full 36 bit physical address space. So the support really won't be 64bit, it will be 36bit. Pete From owner-linux-mips@oss.sgi.com Tue Feb 5 13:54:17 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g15LsHe15818 for linux-mips-outgoing; Tue, 5 Feb 2002 13:54:17 -0800 Received: from ocean.lucon.org (12-234-19-19.client.attbi.com [12.234.19.19]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g15Ls9A15815 for ; Tue, 5 Feb 2002 13:54:09 -0800 Received: by ocean.lucon.org (Postfix, from userid 1000) id 09DAF125C8; Tue, 5 Feb 2002 13:54:08 -0800 (PST) Date: Tue, 5 Feb 2002 13:54:07 -0800 From: "H . J . Lu" To: Dominic Sweetman , GNU C Library , linux-mips@oss.sgi.com, binutils@sources.redhat.com Subject: Re: PATCH: Fix ll/sc for mips (take 3) Message-ID: <20020205135407.A8309@lucon.org> References: <1012676003.1563.6.camel@xyzzy.stargate.net> <20020202120354.A1522@lucon.org> <15454.22661.855423.532827@gladsmuir.algor.co.uk> <20020204083115.C13384@lucon.org> <15454.47823.837119.847975@gladsmuir.algor.co.uk> <20020204172857.A22337@lucon.org> <20020204215804.A2095@nevyn.them.org> <20020205113017.A6144@lucon.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <20020205113017.A6144@lucon.org>; from hjl@lucon.org on Tue, Feb 05, 2002 at 11:30:17AM -0800 Sender: owner-linux-mips@oss.sgi.com Precedence: bulk On Tue, Feb 05, 2002 at 11:30:17AM -0800, H . J . Lu wrote: > On Mon, Feb 04, 2002 at 09:58:04PM -0500, Daniel Jacobowitz wrote: > > On Mon, Feb 04, 2002 at 05:28:57PM -0800, H . J . Lu wrote: > > > On Mon, Feb 04, 2002 at 04:46:07PM +0000, Dominic Sweetman wrote: > > > > > > > > H . J . Lu (hjl@lucon.org) writes: > > > > > > > > > I can change glibc not to use branch-likely without using nop. But it > > > > > may require one or two instructions outside of the loop. Should I do > > > > > it given what we know now? > > > > > > > > I would not recommend using "branch likely" in assembler coding, if > > > > that's what you're asking. > > > > > > > > > > Here is a patch to remove branch likely. But I couldn't find a way > > > not to fill the delay slot with nop. BTW, is that safe to remove > > > ".set noreorder"? > > > > You mean, if there is nothing which can be put there? Yes, it's safe. > > > > Here is a new patch. I removed the extra "ll" in the delay slot. > This patch is wrong. The assmebler turns that into 0x2ab0f724 <__pthread_alt_lock+212>: ll v1,0(s1) 0x2ab0f728 <__pthread_alt_lock+216>: bne v1,s0,0x2ab0f744 <__pthread_alt_lock+244> 0x2ab0f72c <__pthread_alt_lock+220>: nop 0x2ab0f730 <__pthread_alt_lock+224>: move a1,zero 0x2ab0f734 <__pthread_alt_lock+228>: move a1,v0 0x2ab0f738 <__pthread_alt_lock+232>: sc a1,0(s1) 0x2ab0f73c <__pthread_alt_lock+236>: beqz a1,0x2ab0f724 <__pthread_alt_lock+212> 0x2ab0f740 <__pthread_alt_lock+240>: nop If I do __asm__ __volatile__ ("/* Inline compare & swap */\n" "1:\n\t" "ll %1,%5\n\t" "move %0,$0\n\t" "bne %1,%3,2f\n\t" "move %0,%4\n\t" "sc %0,%2\n\t" "beqz %0,1b\n\t" "2:\n\t" "/* End compare & swap */" : "=&r" (ret), "=&r" (temp), "=m" (*p) : "r" (oldval), "r" (newval), "m" (*p) : "memory"); The assembler will do 0xd724 <__pthread_alt_lock+212>: ll v1,0(s1) 0xd728 <__pthread_alt_lock+216>: move a1,zero 0xd72c <__pthread_alt_lock+220>: bne v1,s0,0xd744 <__pthread_alt_lock+244> 0xd730 <__pthread_alt_lock+224>: nop 0xd734 <__pthread_alt_lock+228>: move a1,v0 0xd738 <__pthread_alt_lock+232>: sc a1,0(s1) 0xd73c <__pthread_alt_lock+236>: beqz a1,0xd724 <__pthread_alt_lock+212> 0xd740 <__pthread_alt_lock+240>: nop There is an extra "nop" in the delay slot. I don't think gas is smart enough to fill the delay slot. I will put back those ".set noredor". H.J. From owner-linux-mips@oss.sgi.com Tue Feb 5 13:57:41 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g15LvfA16018 for linux-mips-outgoing; Tue, 5 Feb 2002 13:57:41 -0800 Received: from ns1.ltc.com (vsat-148-63-243-254.c3.sb4.mrt.starband.net [148.63.243.254]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g15LvUA16012 for ; Tue, 5 Feb 2002 13:57:32 -0800 Received: from prefect (unknown [10.1.1.86]) by ns1.ltc.com (Postfix) with SMTP id DAF41590A9; Tue, 5 Feb 2002 16:49:21 -0500 (EST) Message-ID: <02a001c1ae90$43748d40$5601010a@prefect> From: "Bradley D. LaRonde" To: Cc: "linux-mips" References: <200202051747.SAA21696@copsun18.mips.com> <3C6044A7.13FEB2E2@cotw.com> <1012943709.10659.106.camel@zeus> <3C604D73.88F1CDCE@cotw.com> Subject: Re: What is the maximum physical RAM for a 32bit MIPS core? Date: Tue, 5 Feb 2002 16:58:26 -0500 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.2600.0000 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 Sender: owner-linux-mips@oss.sgi.com Precedence: bulk ----- Original Message ----- From: "Steven J. Hill" To: "Pete Popov" Cc: "Hartvig Ekner" ; "linux-mips" Sent: Tuesday, February 05, 2002 4:24 PM Subject: Re: What is the maximum physical RAM for a 32bit MIPS core? > Pete Popov wrote: > > > > I'm not sure if it's a "little" though. Ralf has already done the work > > for 64bit memory support on 32bit kernels, but that only works currently > > on 64bit CPUs. I started hacking on the 64bit memory patch to get it to > > work on 32bit processors, but had to put that aside for a few weeks. I > > hope to get back to it soon. > > > Sure, the "little" is a relative term. As far as your patch is concerned, > you are essentially trying to use a true 32-bit processor (my definition > being that it is not a 64-bit processor running in 32-bit mode), to address > address more than 4GB of physical memory. I don't see how that is possible > with just the MMU and TLB unless you are using chip selects and customm > logic. As already mentioned, a MIPS TLB entry typically can point with 36 bits (that's 67TB of address space?) at physical memory. If you have more than 2^31 bytes of physical memory, then a single process can't map all of physical memory into it's address space, but it can map in pages (using TLB entries) from anywhere within the 36-bit physical memory space. In other words, process address space doesn't limit physical address space. Only TLB capability limits physical address space. And right, KSEG0 and KSEG1 can only get at the low 0.5GB of physical memory. You can imagine that KSEG0 is implemented with a single hardwired TLB entry that maps virtual address 0x80000000 to physical address 0x0, 0.5GB wide. The only way to get to physical memory above 0.5GB is through a TLB entry. Regards, Brad From owner-linux-mips@oss.sgi.com Tue Feb 5 15:05:07 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g15N57522011 for linux-mips-outgoing; Tue, 5 Feb 2002 15:05:07 -0800 Received: from ocean.lucon.org (12-234-19-19.client.attbi.com [12.234.19.19]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g15N4tA21965 for ; Tue, 5 Feb 2002 15:04:55 -0800 Received: by ocean.lucon.org (Postfix, from userid 1000) id 54B88125C8; Tue, 5 Feb 2002 15:04:54 -0800 (PST) Date: Tue, 5 Feb 2002 15:04:54 -0800 From: "H . J . Lu" To: Zhang Fuxin Cc: gcc-patches@gcc.gnu.org, "linux-mips @ oss . sgi . com" Subject: PATCH: Re: SNaN & QNaN on mips Message-ID: <20020205150454.A8759@lucon.org> References: <20020205095056.735A5125C8@ocean.lucon.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <20020205095056.735A5125C8@ocean.lucon.org>; from fxzhang@ict.ac.cn on Tue, Feb 05, 2002 at 05:48:18PM +0800 Sender: owner-linux-mips@oss.sgi.com Precedence: bulk On Tue, Feb 05, 2002 at 05:48:18PM +0800, Zhang Fuxin wrote: > hi, > > I am sorry but it seems i can't fix this without ugly changes. > since i am not familiar with gcc code, i decide to leave it to you, > but provide some information instead. > > In gcc there are 3 spaces where the NaN handling is assumed the > Intel way. > > 1. gcc/real.c (the most important one) > here the author seems to have known the NaN pattern problem,so > he leaves a interface macro for defining non intel NaN patterns: > (comment of function "make_nan()",at about line 6219) > > /* Output a binary NaN bit pattern in the target machine's format. */ > > /* If special NaN bit patterns are required, define them in tm.h > as arrays of unsigned 16-bit shorts. Otherwise, use the default > patterns here. */ > > I have read through this file and decided that the follow defined should > be enough for mips: > > /* NaN pattern,mips QNAN & SNAN is different from intel's > * DFMODE_NAN and SFMODE_NAN is used in real.c */ > #define DFMODE_NAN \ > unsigned short DFbignan[4] = {0x7ff7, 0xffff, 0xffff, 0xffff}; \ > unsigned short DFlittlenan[4] = {0xffff, 0xffff, 0xffff, 0xfff7} > #define SFMODE_NAN \ > unsigned short SFbignan[2] = {0x7fbf, 0xffff}; \ > unsigned short SFlittlenan[2] = {0xffff, 0xffbf} > > But the problem is where to put them:(. Obviously it is target specified > definitions and should be in config/mips/. Documents say tm.h is a symbol > link and included in config.h,but it is no long true.If i add them to xm-mips.h > then for native compilation it is ok but it fails for cross-compile. I am enclosing a patch here. > > 2.gcc/reg-stack.c > There is a hardcoded QNaN used around line 477: > nan = gen_lowpart (SFmode, GEN_INT (0x7fc00000)); > I sugest defining a macro QNAN_HAS_1ST_FRACBIT_CLEARED for mips and change > it to,just don't know where to put it: > #ifndef QNAN_HAS_1ST_FRACBIT_CLEARED > nan = gen_lowpart (SFmode, GEN_INT (0x7fc00000)); > #else > nan = gen_lowpart (SFmode, GEN_INT (0x7fbfffff)); > #endif MIPS doesn't use reg-stack.c. > > 3. config/fp-bit.c > this is for machine having no fpu hardware. > again i susgest define QNAN_HAS_1ST_FRACBIT_CLEARED and then apply this patch: > > 190d189 > < #ifndef QNAN_HAS_1ST_FRACBIT_CLEARED > 192,195d190 > < #else > < fraction &= ~QUIET_NAN; > < #endif > < > 379,380d373 > < > < #ifndef QNAN_HAS_1ST_FRACBIT_CLEARED > 382,384d374 > < #else > < if (!(fraction & QUIET_NAN)) > < #endif This one is tricky. fp-bit.c is not supposed to be target specific. I think we add SET_QUIET_NAN/IS_QUIET_NAN and provide the special ones for MIPS. H.J. ---- 2002-02-05 H.J. Lu Base on suggestions from Zhang Fuxin : * config/mips/mips.h (DFMODE_NAN): Defined. (SFMODE_NAN): Likewise. --- gcc/config/mips/mips.h.ieee Thu Nov 15 12:21:17 2001 +++ gcc/config/mips/mips.h Tue Feb 5 14:38:11 2002 @@ -4637,3 +4637,10 @@ do \ } \ } \ while (0) + +#define DFMODE_NAN \ + unsigned short DFbignan[4] = {0x7ff7, 0xffff, 0xffff, 0xffff}; \ + unsigned short DFlittlenan[4] = {0xffff, 0xffff, 0xffff, 0xfff7} +#define SFMODE_NAN \ + unsigned short SFbignan[2] = {0x7fbf, 0xffff}; \ + unsigned short SFlittlenan[2] = {0xffff, 0xffbf} From owner-linux-mips@oss.sgi.com Tue Feb 5 15:44:42 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g15NigY24816 for linux-mips-outgoing; Tue, 5 Feb 2002 15:44:42 -0800 Received: from ocean.lucon.org (12-234-19-19.client.attbi.com [12.234.19.19]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g15NicA24813 for ; Tue, 5 Feb 2002 15:44:38 -0800 Received: by ocean.lucon.org (Postfix, from userid 1000) id A73B4125C8; Tue, 5 Feb 2002 15:44:37 -0800 (PST) Date: Tue, 5 Feb 2002 15:44:37 -0800 From: "H . J . Lu" To: Zhang Fuxin Cc: "linux-mips@oss.sgi.com" Subject: Re: another gcc optimization bug? Message-ID: <20020205154437.A9605@lucon.org> References: <200202051457.g15EvfA12401@oss.sgi.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <200202051457.g15EvfA12401@oss.sgi.com>; from fxzhang@ict.ac.cn on Tue, Feb 05, 2002 at 10:54:42PM +0800 Sender: owner-linux-mips@oss.sgi.com Precedence: bulk On Tue, Feb 05, 2002 at 10:54:42PM +0800, Zhang Fuxin wrote: > hi, > It seems gcc with optimization > -O2 will produce incorrect code for fp code: > I find this example when tracking down the libm-test failures. > ( expf(NaN) == NaN will report an extra "invalid operation" exception ) > The faulting code snippet is: > float __my_expf(float x) /* wrapper expf */ > { > float z; > unsigned int hx; > z = __ieee754_expf(x); > if(_LIB_VERSION == _IEEE_) return z; > if(__finitef(x)) { > if(x>o_threshold) > return 1.0; > else if(x return 2.0; > printf("haha\n"); > } > return z; > } > > with -O2(or higher),some statements inside "if (__finitef(x))" are put before > testing the return value of __finitef(x),one of which is a c.lt.s that cause > the extra "invalid operation" exception being raised. > This bug seem fixed in gcc 3.1. H.J. From owner-linux-mips@oss.sgi.com Tue Feb 5 18:03:04 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g16234e05019 for linux-mips-outgoing; Tue, 5 Feb 2002 18:03:04 -0800 Received: from ocean.lucon.org (12-234-19-19.client.attbi.com [12.234.19.19]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g1622jA05015 for ; Tue, 5 Feb 2002 18:02:45 -0800 Received: by ocean.lucon.org (Postfix, from userid 1000) id 81605125C8; Tue, 5 Feb 2002 18:02:43 -0800 (PST) Date: Tue, 5 Feb 2002 18:02:43 -0800 From: "H . J . Lu" To: linux-mips@oss.sgi.com, GNU C Library Subject: PATCH: Not use branch likely on mips Message-ID: <20020205180243.A11993@lucon.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i Sender: owner-linux-mips@oss.sgi.com Precedence: bulk This patch removes branch likely. H.J. ---- 2002-02-05 H.J. Lu * sysdeps/mips/pspinlock.c (__pthread_spin_lock): Not use branch likely. * sysdeps/mips/pt-machine.h (testandset): Liekwise. (__compare_and_swap): Liekwise. 2002-02-05 H.J. Lu * sysdeps/mips/atomicity.h (exchange_and_add): Not use branch likely. (atomic_add): Likewise. (compare_and_swap): Likewise. * sysdeps/unix/sysv/linux/mips/sys/tas.h (_test_and_set): Likewise. --- libc/linuxthreads/sysdeps/mips/pspinlock.c.llsc Mon Feb 4 13:45:01 2002 +++ libc/linuxthreads/sysdeps/mips/pspinlock.c Tue Feb 5 14:11:01 2002 @@ -32,17 +32,16 @@ __pthread_spin_lock (pthread_spinlock_t unsigned int tmp1, tmp2; asm volatile - ("\t\t\t# spin_lock\n\t" - "ll %1,%3\n" + ("\t\t\t# spin_lock\n" "1:\n\t" + "ll %1,%3\n\t" ".set push\n\t" ".set noreorder\n\t" "bnez %1,1b\n\t" " li %2,1\n\t" + ".set pop\n\t" "sc %2,%0\n\t" - "beqzl %2,1b\n\t" - " ll %1,%3\n\t" - ".set pop" + "beqz %2,1b" : "=m" (*lock), "=&r" (tmp1), "=&r" (tmp2) : "m" (*lock) : "memory"); --- libc/linuxthreads/sysdeps/mips/pt-machine.h.llsc Mon Feb 4 13:45:01 2002 +++ libc/linuxthreads/sysdeps/mips/pt-machine.h Tue Feb 5 14:01:11 2002 @@ -57,18 +57,17 @@ __compare_and_swap (long int *p, long in long int ret, temp; __asm__ __volatile__ - ("/* Inline compare & swap */\n\t" - "ll %1,%5\n" + ("/* Inline compare & swap */\n" "1:\n\t" + "ll %1,%5\n\t" ".set push\n\t" ".set noreorder\n\t" "bne %1,%3,2f\n\t" " move %0,$0\n\t" + ".set pop\n\t" "move %0,%4\n\t" "sc %0,%2\n\t" - "beqzl %0,1b\n\t" - " ll %1,%5\n\t" - ".set pop\n" + "beqz %0,1b\n" "2:\n\t" "/* End compare & swap */" : "=&r" (ret), "=&r" (temp), "=m" (*p) --- libc/sysdeps/mips/atomicity.h.llsc Mon Feb 4 13:45:18 2002 +++ libc/sysdeps/mips/atomicity.h Tue Feb 5 13:58:59 2002 @@ -32,16 +32,12 @@ exchange_and_add (volatile uint32_t *mem int result, tmp; __asm__ __volatile__ - ("/* Inline exchange & add */\n\t" - "ll %0,%3\n" + ("/* Inline exchange & add */\n" "1:\n\t" + "ll %0,%3\n\t" "addu %1,%4,%0\n\t" "sc %1,%2\n\t" - ".set push\n\t" - ".set noreorder\n\t" - "beqzl %1,1b\n\t" - " ll %0,%3\n\t" - ".set pop\n\t" + "beqz %1,1b\n\t" "/* End exchange & add */" : "=&r"(result), "=&r"(tmp), "=m"(*mem) : "m" (*mem), "r"(val) @@ -57,16 +53,12 @@ atomic_add (volatile uint32_t *mem, int int result; __asm__ __volatile__ - ("/* Inline atomic add */\n\t" - "ll %0,%2\n" + ("/* Inline atomic add */\n" "1:\n\t" + "ll %0,%2\n\t" "addu %0,%3,%0\n\t" "sc %0,%1\n\t" - ".set push\n\t" - ".set noreorder\n\t" - "beqzl %0,1b\n\t" - " ll %0,%2\n\t" - ".set pop\n\t" + "beqz %0,1b\n\t" "/* End atomic add */" : "=&r"(result), "=m"(*mem) : "m" (*mem), "r"(val) @@ -80,18 +72,17 @@ compare_and_swap (volatile long int *p, long int ret, temp; __asm__ __volatile__ - ("/* Inline compare & swap */\n\t" - "ll %1,%5\n" + ("/* Inline compare & swap */\n" "1:\n\t" + "ll %1,%5\n\t" ".set push\n\t" ".set noreorder\n\t" "bne %1,%3,2f\n\t" " move %0,$0\n\t" + ".set pop\n\t" "move %0,%4\n\t" "sc %0,%2\n\t" - "beqzl %0,1b\n\t" - " ll %1,%5\n\t" - ".set pop\n" + "beqz %0,1b\n" "2:\n\t" "/* End compare & swap */" : "=&r" (ret), "=&r" (temp), "=m" (*p) --- libc/sysdeps/unix/sysv/linux/mips/sys/tas.h.llsc Mon Feb 4 13:45:28 2002 +++ libc/sysdeps/unix/sysv/linux/mips/sys/tas.h Tue Feb 5 13:59:52 2002 @@ -42,17 +42,16 @@ _test_and_set (int *p, int v) __THROW int r, t; __asm__ __volatile__ - ("/* Inline test and set */\n\t" - "ll %0,%3\n" + ("/* Inline test and set */\n" "1:\n\t" + "ll %0,%3\n\t" ".set push\n\t" ".set noreorder\n\t" "beq %0,%4,2f\n\t" " move %1,%4\n\t" + ".set pop\n\t" "sc %1,%2\n\t" - "beqzl %1,1b\n\t" - " ll %0,%3\n\t" - ".set pop\n" + "beqz %1,1b\n" "2:\n\t" "/* End test and set */" : "=&r" (r), "=&r" (t), "=m" (*p) From owner-linux-mips@oss.sgi.com Tue Feb 5 18:35:37 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g162Zbe05324 for linux-mips-outgoing; Tue, 5 Feb 2002 18:35:37 -0800 Received: from dea.linux-mips.net (a1as11-p112.stg.tli.de [195.252.190.112]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g162ZXA05321 for ; Tue, 5 Feb 2002 18:35:33 -0800 Received: (from ralf@localhost) by dea.linux-mips.net (8.11.6/8.11.1) id g162Xkf11663; Wed, 6 Feb 2002 03:33:46 +0100 Date: Wed, 6 Feb 2002 03:33:46 +0100 From: Ralf Baechle To: "Steven J. Hill" Cc: linux-mips@oss.sgi.com Subject: Re: What is the maximum physical RAM for a 32bit MIPS core? Message-ID: <20020206033346.A7298@dea.linux-mips.net> References: <3C600D4C.43CBA784@cotw.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <3C600D4C.43CBA784@cotw.com>; from sjhill@cotw.com on Tue, Feb 05, 2002 at 10:50:20AM -0600 X-Accept-Language: de,en,fr Sender: owner-linux-mips@oss.sgi.com Precedence: bulk On Tue, Feb 05, 2002 at 10:50:20AM -0600, Steven J. Hill wrote: > I am just trying to fill in some more MIPS knowledge here. With a 32-bit > MIPS processor, we are forever limited to a userspace of 2GB in size thanks > to the kuser region. kseg0/1 map the same 512MB of physical memory. kseg2 > is 1GB in size and hence it could address another 1GB of RAM. So, is the 2gb virtual memory per process. In theory physical memory is limited by the size of the address bus with highmem; the practical limit for highmem should be in the range of 16-32gb RAM. Ralf From owner-linux-mips@oss.sgi.com Wed Feb 6 00:50:37 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g168obA12581 for linux-mips-outgoing; Wed, 6 Feb 2002 00:50:37 -0800 Received: from mail.sonytel.be (mail.sonytel.be [193.74.243.200]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g168oVA12572 for ; Wed, 6 Feb 2002 00:50:31 -0800 Received: from vervain.sonytel.be (mail.sonytel.be [10.17.0.27]) by mail.sonytel.be (8.9.0/8.8.6) with ESMTP id JAA03368; Wed, 6 Feb 2002 09:49:23 +0100 (MET) Date: Wed, 6 Feb 2002 09:49:24 +0100 (MET) From: Geert Uytterhoeven To: "Bradley D. LaRonde" cc: sjhill@cotw.com, linux-mips Subject: Re: What is the maximum physical RAM for a 32bit MIPS core? In-Reply-To: <02a001c1ae90$43748d40$5601010a@prefect> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-linux-mips@oss.sgi.com Precedence: bulk On Tue, 5 Feb 2002, Bradley D. LaRonde wrote: > As already mentioned, a MIPS TLB entry typically can point with 36 bits > (that's 67TB of address space?) at physical memory. If you have more than At bit less: 64 GiB or approx. 69 GB :-) 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 owner-linux-mips@oss.sgi.com Wed Feb 6 03:17:02 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g16BH2Z17251 for linux-mips-outgoing; Wed, 6 Feb 2002 03:17:02 -0800 Received: from ns.snowman.net (ns.snowman.net [63.80.4.34]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g16BGuA17246 for ; Wed, 6 Feb 2002 03:16:57 -0800 Received: from localhost (nick@localhost) by ns.snowman.net (8.9.3/8.9.3/Debian 8.9.3-21) with ESMTP id GAA04302 for ; Wed, 6 Feb 2002 06:16:49 -0500 Date: Wed, 6 Feb 2002 06:16:49 -0500 (EST) From: X-Sender: nick@ns cc: linux-mips Subject: Re: What is the maximum physical RAM for a 32bit MIPS core? In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-linux-mips@oss.sgi.com Precedence: bulk The fact that idiot marketoids in some moronic HD maker decided "GB" ment "billion bytes" is not a good excuse for useing the term to refer to anything that has never been polluted this way. It's not an excuse to use it to refer to things that have been polluted this way either, but that won't stop ppl. How bout you say GB is gigabits and claim ~549 of your mythical "GB"? Nick On Wed, 6 Feb 2002, Geert Uytterhoeven wrote: > On Tue, 5 Feb 2002, Bradley D. LaRonde wrote: > > As already mentioned, a MIPS TLB entry typically can point with 36 bits > > (that's 67TB of address space?) at physical memory. If you have more than > > At bit less: 64 GiB or approx. 69 GB :-) > > 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 owner-linux-mips@oss.sgi.com Wed Feb 6 03:38:42 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g16BcgD17625 for linux-mips-outgoing; Wed, 6 Feb 2002 03:38:42 -0800 Received: from delta.ds2.pg.gda.pl (macro@delta.ds2.pg.gda.pl [213.192.72.1]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g16BcbA17622 for ; Wed, 6 Feb 2002 03:38:37 -0800 Received: from localhost by delta.ds2.pg.gda.pl (8.9.3/8.9.3) with SMTP id MAA11977; Wed, 6 Feb 2002 12:37:31 +0100 (MET) Date: Wed, 6 Feb 2002 12:37:31 +0100 (MET) From: "Maciej W. Rozycki" To: "H . J . Lu" cc: Dominic Sweetman , GNU C Library , linux-mips@oss.sgi.com, binutils@sources.redhat.com Subject: Re: PATCH: Fix ll/sc for mips (take 3) In-Reply-To: <20020205135407.A8309@lucon.org> Message-ID: Organization: Technical University of Gdansk MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-linux-mips@oss.sgi.com Precedence: bulk On Tue, 5 Feb 2002, H . J . Lu wrote: > 0xd724 <__pthread_alt_lock+212>: ll v1,0(s1) > 0xd728 <__pthread_alt_lock+216>: move a1,zero > 0xd72c <__pthread_alt_lock+220>: bne v1,s0,0xd744 <__pthread_alt_lock+244> > 0xd730 <__pthread_alt_lock+224>: nop > 0xd734 <__pthread_alt_lock+228>: move a1,v0 > 0xd738 <__pthread_alt_lock+232>: sc a1,0(s1) > 0xd73c <__pthread_alt_lock+236>: beqz a1,0xd724 <__pthread_alt_lock+212> > 0xd740 <__pthread_alt_lock+240>: nop > > There is an extra "nop" in the delay slot. I don't think gas is smart > enough to fill the delay slot. I will put back those ".set noredor". The code uses the same count of cycles either way. As you may see above, gas was smart enough to fill the "ll" load delay slot. Maybe it should prefer filling the branch delay slot instead due to smaller code... -- + Maciej W. Rozycki, Technical University of Gdansk, Poland + +--------------------------------------------------------------+ + e-mail: macro@ds2.pg.gda.pl, PGP key available + From owner-linux-mips@oss.sgi.com Wed Feb 6 04:08:12 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g16C8Cc18864 for linux-mips-outgoing; Wed, 6 Feb 2002 04:08:12 -0800 Received: from mail.sonytel.be (mail.sonytel.be [193.74.243.200]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g16C85A18859 for ; Wed, 6 Feb 2002 04:08:06 -0800 Received: from vervain.sonytel.be (mail.sonytel.be [10.17.0.27]) by mail.sonytel.be (8.9.0/8.8.6) with ESMTP id NAA20357; Wed, 6 Feb 2002 13:07:12 +0100 (MET) Date: Wed, 6 Feb 2002 13:07:13 +0100 (MET) From: Geert Uytterhoeven To: nick@snowman.net cc: linux-mips Subject: Re: What is the maximum physical RAM for a 32bit MIPS core? In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-linux-mips@oss.sgi.com Precedence: bulk On Wed, 6 Feb 2002 nick@snowman.net wrote: > The fact that idiot marketoids in some moronic HD maker decided "GB" ment > "billion bytes" is not a good excuse for useing the term to refer to > anything that has never been polluted this way. It's not an excuse to use > it to refer to things that have been polluted this way either, but that > won't stop ppl. How bout you say GB is gigabits and claim ~549 of your > mythical "GB"? Then I would say `Gb' (lower case b). > On Wed, 6 Feb 2002, Geert Uytterhoeven wrote: > > On Tue, 5 Feb 2002, Bradley D. LaRonde wrote: > > > As already mentioned, a MIPS TLB entry typically can point with 36 bits > > > (that's 67TB of address space?) at physical memory. If you have more than > > > > At bit less: 64 GiB or approx. 69 GB :-) But the main issue here was: tera vs. giga. 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 owner-linux-mips@oss.sgi.com Wed Feb 6 05:17:53 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g16DHri20298 for linux-mips-outgoing; Wed, 6 Feb 2002 05:17:53 -0800 Received: from holomorphy (mail@holomorphy.com [216.36.33.161]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g16DHmA20295; Wed, 6 Feb 2002 05:17:48 -0800 Received: from wli by holomorphy with local (Exim 3.33 #1 (Debian)) id 16YRx7-0002tw-00; Wed, 06 Feb 2002 05:17:33 -0800 Date: Wed, 6 Feb 2002 05:17:33 -0800 From: William Lee Irwin III To: Ralf Baechle Cc: "Steven J. Hill" , linux-mips@oss.sgi.com Subject: Re: What is the maximum physical RAM for a 32bit MIPS core? Message-ID: <20020206131733.GF744@holomorphy.com> References: <3C600D4C.43CBA784@cotw.com> <20020206033346.A7298@dea.linux-mips.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Description: brief message Content-Disposition: inline In-Reply-To: <20020206033346.A7298@dea.linux-mips.net> User-Agent: Mutt/1.3.25i Organization: The Domain of Holomorphy Sender: owner-linux-mips@oss.sgi.com Precedence: bulk On Tue, Feb 05, 2002 at 10:50:20AM -0600, Steven J. Hill wrote: >> I am just trying to fill in some more MIPS knowledge here. With a 32-bit >> MIPS processor, we are forever limited to a userspace of 2GB in size thanks >> to the kuser region. kseg0/1 map the same 512MB of physical memory. kseg2 >> is 1GB in size and hence it could address another 1GB of RAM. So, is the On Wed, Feb 06, 2002 at 03:33:46AM +0100, Ralf Baechle wrote: > 2gb virtual memory per process. In theory physical memory is limited by > the size of the address bus with highmem; the practical limit for highmem > should be in the range of 16-32gb RAM. I'm aware that some of those issues have to do with boot-time allocations proportional to memory size filling the direct-mapped portion of the kernel virtual address space. Do you have in mind others? I'm just generally curious. Thanks, Bill From owner-linux-mips@oss.sgi.com Wed Feb 6 06:07:14 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g16E7EA21628 for linux-mips-outgoing; Wed, 6 Feb 2002 06:07:14 -0800 Received: from mail.laser5.co.jp (gw1.laser5.co.jp [202.221.8.77]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g16E6xA21618 for ; Wed, 6 Feb 2002 06:07:00 -0800 Received: from l5ac227.l5.laser5.co.jp (unknown [192.168.128.227]) by mail.laser5.co.jp (Postfix) with ESMTP id F2720833A5 for ; Wed, 6 Feb 2002 23:06:58 +0900 (JST) Date: Wed, 06 Feb 2002 23:06:57 +0900 Message-ID: From: Kunihiko IMAI To: Linux-MIPS Subject: Re: One bug fixed, another found? In-Reply-To: References: User-Agent: Wanderlust/2.4.0 (Rio) WEMI/1.13.7 (Shimada) CLIME/1.13.6 (=?ISO-2022-JP?B?GyRCQ2YlTj4xGyhC?=) MULE XEmacs/21.1 (patch 14) (Cuyahoga Valley) (i386-vine-linux) MIME-Version: 1.0 (generated by WEMI 1.13.7 - "Shimada") Content-Type: text/plain; charset=US-ASCII Sender: owner-linux-mips@oss.sgi.com Precedence: bulk Hi, I also got the Oops in same place. My environment is: o board: Pb1000 ( Au1000 eval. board ) o kernel: SGI version of 2.4.17 o root fs: nfs root o userland: RedHat 7.1 got from SGI ftp site. When rebuilding rpm package on the MIPS board, I also got error in same place. Today I compiled kernel with __wake_up_common not inline function, and got same result. And also made kgdb version. I found that the line p = curr->task; made the memory violation. When trap occurs, gdb says curr = 0xfffffffc So here is the place of memory violation. At Thu, 31 Jan 2002 18:09:29 -0800, Matthew Dharm wrote: > Unable to handle kernel paging request at virtual address fffffffc, > epc == 8010b > 1ec, ra == 8010b19c > $0 : 00000000 b0045400 00000000 00000000 00000017 802d51cc 92bdc000 > 93e7d120 > $8 : 92bdc000 b0045401 00000000 00000000 00000000 00000000 00000088 > 00000000 > $16: 00000000 b0045400 00000001 b0045401 802de998 802dad88 00000001 > 92ce1160 > $24: 00000000 2acce4e0 92bdc000 92bddd68 92bddd68 > 8010b19c > epc : 8010b1ec Not tainted > Using defaults from ksymoops -t elf32-tradbigmips -a mips:3000 > Status: b0045402 > Cause : 80008008 > Process bladeenc (pid: 660, stackpage=92bdc000) > Stack: 92bddd68 92bddd68 92bddd68 92bddd68 802df378 00000001 00000000 > 93ff8bf0 > 802df1fc 802df36c 000001d2 92bc4060 8012c588 8012c528 00001000 > 92bc4060 > 00000000 92bc4060 81018fc0 92ce1160 00000005 92bc4120 00001a55 > 93ff8bf0 > 92ce1160 0000001f 00001000 8012c180 81018fc0 92bc4120 00001a54 > 93ff8bec > 80122aa0 80122af8 93f036c0 00000000 80170988 80170980 00000005 > 00001a50 > 92ce1160 ... > Call Trace: [<8012c588>] [<8012c528>] [<8012c180>] [<80122aa0>] > [<80122af8>] [<8 > 0170988>] > [<80170980>] [<801233ec>] [<8012372c>] [<8012377c>] [<80126198>] > [<80123d80>] > [<80123c78>] [<801680dc>] [<8010703c>] [<8013290c>] [<80113158>] > [<80106508>] > [<80106508>] > Code: 12400004 00000000 8e100000 <5614ffcc> 8e05fffc 40016000 > 32730001 3421 > 0001 38210001 > > >>RA; 8010b19c <__wake_up+ec/198> > >>PC; 8010b1ec <__wake_up+13c/198> <===== > Trace; 8012c588 <__alloc_pages+d0/21c> > Trace; 8012c528 <__alloc_pages+70/21c> > Trace; 8012c180 <_alloc_pages+20/2c> > Trace; 80122aa0 > Trace; 80122af8 > Trace; 80170988 > Trace; 80170980 > Trace; 801233ec > Trace; 8012372c > Trace; 8012377c > Trace; 80126198 > Trace; 80123d80 > Trace; 80123c78 > Trace; 801680dc > Trace; 8010703c > Trace; 8013290c > Trace; 80113158 > Trace; 80106508 > Trace; 80106508 > Code; 8010b1e0 <__wake_up+130/198> > 00000000 <_PC>: > Code; 8010b1e0 <__wake_up+130/198> > 0: 12400004 beqz s2,14 <_PC+0x14> 8010b1f4 > <__wake_up+144/198> > Code; 8010b1e4 <__wake_up+134/198> > 4: 00000000 nop > Code; 8010b1e8 <__wake_up+138/198> > 8: 8e100000 lw s0,0(s0) > Code; 8010b1ec <__wake_up+13c/198> <===== > c: 5614ffcc 0x5614ffcc <===== This is MIPS2 code. If you use objdump to disassemble, add -m mips:4600 option to get correct mnemonic. And the cause register says exception occurred in delay slot, so: > Code; 8010b1f0 <__wake_up+140/198> > 10: 8e05fffc lw a1,-4(s0) The memory violation occurs here. Registers dump says s0 = 00000000, memory access to 0xfffffffc occurs here. > Code; 8010b1f4 <__wake_up+144/198> > 14: 40016000 mfc0 at,$12 > Code; 8010b1f8 <__wake_up+148/198> > 18: 32730001 andi s3,s3,0x1 > Code; 8010b1fc <__wake_up+14c/198> > 1c: 34210001 ori at,at,0x1 > Code; 8010b200 <__wake_up+150/198> > 20: 38210001 xori at,at,0x1 Thanks. _._. __._ _ . ... _ .___ ._. _____ _... ._ _._ _.._. .____ _ . ... _ Kunihiko IMAI From owner-linux-mips@oss.sgi.com Wed Feb 6 06:13:48 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g16EDmI21881 for linux-mips-outgoing; Wed, 6 Feb 2002 06:13:48 -0800 Received: from ns1.ltc.com (vsat-148-63-243-254.c3.sb4.mrt.starband.net [148.63.243.254]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g16EDdA21876 for ; Wed, 6 Feb 2002 06:13:41 -0800 Received: from prefect (unknown [10.1.1.86]) by ns1.ltc.com (Postfix) with SMTP id 055CA590A9; Wed, 6 Feb 2002 09:05:36 -0500 (EST) Message-ID: <002f01c1af18$a8685410$5601010a@prefect> From: "Bradley D. LaRonde" To: "Geert Uytterhoeven" Cc: , "linux-mips" References: Subject: Re: What is the maximum physical RAM for a 32bit MIPS core? Date: Wed, 6 Feb 2002 09:14:53 -0500 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.2600.0000 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 Sender: owner-linux-mips@oss.sgi.com Precedence: bulk ----- Original Message ----- From: "Geert Uytterhoeven" To: "Bradley D. LaRonde" Cc: ; "linux-mips" Sent: Wednesday, February 06, 2002 3:49 AM Subject: Re: What is the maximum physical RAM for a 32bit MIPS core? > On Tue, 5 Feb 2002, Bradley D. LaRonde wrote: > > As already mentioned, a MIPS TLB entry typically can point with 36 bits > > (that's 67TB of address space?) at physical memory. If you have more than > > At bit less: 64 GiB or approx. 69 GB :-) Oops, yeah. 67TB seemed a little high. :-P Regards, Brad From owner-linux-mips@oss.sgi.com Wed Feb 6 07:22:43 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g16FMht24518 for linux-mips-outgoing; Wed, 6 Feb 2002 07:22:43 -0800 Received: from real.realitydiluted.com (real.realitydiluted.com [208.242.241.164]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g16FMeA24515 for ; Wed, 6 Feb 2002 07:22:40 -0800 Received: from localhost.localdomain ([127.0.0.1] helo=cotw.com) by real.realitydiluted.com with esmtp (Exim 3.22 #1 (Red Hat Linux)) id 16YTu6-0001LD-00; Wed, 06 Feb 2002 09:22:34 -0600 Message-ID: <3C614A30.928E6BC5@cotw.com> Date: Wed, 06 Feb 2002 09:22:24 -0600 From: "Steven J. Hill" Reply-To: sjhill@cotw.com X-Mailer: Mozilla 4.77 [en] (X11; U; Linux 2.4.17-xfs i686) X-Accept-Language: en MIME-Version: 1.0 To: linux-mips@oss.sgi.com, binutils@sources.redhat.com Subject: Comments on new Linux MIPS FAQ... Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-linux-mips@oss.sgi.com Precedence: bulk First off, this is not a replacement for the awesome FAQ at SGI maintained by Ralf. The FAQ I wrote addresses 32-bit and 64-bit Linux kernel/userspace questions (well, starts to). I would greatly appreciate comments from everyone on this. You can read it here: http://www.cotw.com/mips/mips64.txt Please send me comments and corrections and make sure you copy the mailing list(s). After the corrections settle down a bit, we can come up with a name and get it hosted on SGI's site or the http://www.linuxmips.net/ site or even my site, I don't care. The inspiration for this came from Matthew Dharm's questions as well as my management asking about 32-bit versus 64-bit Linux kernels and wanting to know current toolchain status. Thanks. -Steve -- Steven J. Hill - Embedded SW Engineer From owner-linux-mips@oss.sgi.com Wed Feb 6 09:04:32 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g16H4Wu26538 for linux-mips-outgoing; Wed, 6 Feb 2002 09:04:32 -0800 Received: from noose.gt.owl.de (postfix@noose.gt.owl.de [62.52.19.4]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g16H4QA26526 for ; Wed, 6 Feb 2002 09:04:26 -0800 Received: by noose.gt.owl.de (Postfix, from userid 10) id 90AC385B; Wed, 6 Feb 2002 18:04:06 +0100 (CET) Received: by paradigm.rfc822.org (Postfix, from userid 1000) id 335DC3FB4; Wed, 6 Feb 2002 18:04:16 +0100 (CET) Date: Wed, 6 Feb 2002 18:04:16 +0100 From: Florian Lohoff To: "Steven J. Hill" Cc: linux-mips@oss.sgi.com, binutils@sources.redhat.com Subject: Re: Comments on new Linux MIPS FAQ... Message-ID: <20020206170416.GB2589@paradigm.rfc822.org> References: <3C614A30.928E6BC5@cotw.com> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="8P1HSweYDcXXzwPJ" Content-Disposition: inline In-Reply-To: <3C614A30.928E6BC5@cotw.com> User-Agent: Mutt/1.3.25i Organization: rfc822 - pure communication Sender: owner-linux-mips@oss.sgi.com Precedence: bulk --8P1HSweYDcXXzwPJ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Feb 06, 2002 at 09:22:24AM -0600, Steven J. Hill wrote: > First off, this is not a replacement for the awesome FAQ at > SGI maintained by Ralf. The FAQ I wrote addresses 32-bit and > 64-bit Linux kernel/userspace questions (well, starts to). I > would greatly appreciate comments from everyone on this. You > can read it here: >=20 > http://www.cotw.com/mips/mips64.txt >=20 > Please send me comments and corrections and make sure you copy > the mailing list(s). After the corrections settle down a bit, > we can come up with a name and get it hosted on SGI's site or > the http://www.linuxmips.net/ site or even my site, I don't care. >=20 > The inspiration for this came from Matthew Dharm's questions as > well as my management asking about 32-bit versus 64-bit Linux > kernels and wanting to know current toolchain status. Thanks. My impression is that the number of FAQs grows rapidly - I would like to see them all be integrated into the one and only Linux/Mips FAQ as it makes pointing people to informations a lot easier. I dont think this distributed information storage of Linux/Mips helps keeping people together. Flo --=20 Florian Lohoff flo@rfc822.org +49-5201-669912 Nine nineth on september the 9th Welcome to the new billenium --8P1HSweYDcXXzwPJ Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.6 (GNU/Linux) Comment: For info see http://www.gnupg.org iD8DBQE8YWIQUaz2rXW+gJcRAn5WAJwLgS97Ny04xlZykjTN3Z/Nhf8YqACfW1un xfwwz1nplRHFSzfIqVRGfRs= =Mq9r -----END PGP SIGNATURE----- --8P1HSweYDcXXzwPJ-- From owner-linux-mips@oss.sgi.com Wed Feb 6 11:17:03 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g16JH3Z29088 for linux-mips-outgoing; Wed, 6 Feb 2002 11:17:03 -0800 Received: from dea.linux-mips.net (a1as20-p202.stg.tli.de [195.252.194.202]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g16JGwA29084 for ; Wed, 6 Feb 2002 11:16:59 -0800 Received: (from ralf@localhost) by dea.linux-mips.net (8.11.6/8.11.1) id g16H82l17705; Wed, 6 Feb 2002 18:08:02 +0100 Date: Wed, 6 Feb 2002 18:08:02 +0100 From: Ralf Baechle To: Florian Lohoff Cc: "Steven J. Hill" , linux-mips@oss.sgi.com, binutils@sources.redhat.com Subject: Re: Comments on new Linux MIPS FAQ... Message-ID: <20020206180802.A17344@dea.linux-mips.net> References: <3C614A30.928E6BC5@cotw.com> <20020206170416.GB2589@paradigm.rfc822.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <20020206170416.GB2589@paradigm.rfc822.org>; from flo@rfc822.org on Wed, Feb 06, 2002 at 06:04:16PM +0100 X-Accept-Language: de,en,fr Sender: owner-linux-mips@oss.sgi.com Precedence: bulk On Wed, Feb 06, 2002 at 06:04:16PM +0100, Florian Lohoff wrote: > > Please send me comments and corrections and make sure you copy > > the mailing list(s). After the corrections settle down a bit, > > we can come up with a name and get it hosted on SGI's site or > > the http://www.linuxmips.net/ site or even my site, I don't care. > > > > The inspiration for this came from Matthew Dharm's questions as > > well as my management asking about 32-bit versus 64-bit Linux > > kernels and wanting to know current toolchain status. Thanks. > > My impression is that the number of FAQs grows rapidly - I would > like to see them all be integrated into the one and only Linux/Mips > FAQ as it makes pointing people to informations a lot easier. > > I dont think this distributed information storage of Linux/Mips helps > keeping people together. I agree on that one. So for anything that seems to belong into the MIPS FAQ I'll take a patch to the SGML code. Ralf From owner-linux-mips@oss.sgi.com Wed Feb 6 11:17:58 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g16JHwO29161 for linux-mips-outgoing; Wed, 6 Feb 2002 11:17:58 -0800 Received: from dea.linux-mips.net (a1as20-p202.stg.tli.de [195.252.194.202]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g16JHmA29157 for ; Wed, 6 Feb 2002 11:17:49 -0800 Received: (from ralf@localhost) by dea.linux-mips.net (8.11.6/8.11.1) id g16AWxB15749; Wed, 6 Feb 2002 11:32:59 +0100 Date: Wed, 6 Feb 2002 11:32:59 +0100 From: Ralf Baechle To: "H . J . Lu" Cc: Dominic Sweetman , GNU C Library , linux-mips@oss.sgi.com, binutils@sources.redhat.com Subject: Re: PATCH: Fix ll/sc for mips (take 3) Message-ID: <20020206113259.A15431@dea.linux-mips.net> References: <20020202120354.A1522@lucon.org> <15454.22661.855423.532827@gladsmuir.algor.co.uk> <20020204083115.C13384@lucon.org> <15454.47823.837119.847975@gladsmuir.algor.co.uk> <20020204172857.A22337@lucon.org> <20020204215804.A2095@nevyn.them.org> <20020205113017.A6144@lucon.org> <20020205135407.A8309@lucon.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <20020205135407.A8309@lucon.org>; from hjl@lucon.org on Tue, Feb 05, 2002 at 01:54:07PM -0800 X-Accept-Language: de,en,fr Sender: owner-linux-mips@oss.sgi.com Precedence: bulk On Tue, Feb 05, 2002 at 01:54:07PM -0800, H . J . Lu wrote: > __asm__ __volatile__ > ("/* Inline compare & swap */\n" > "1:\n\t" > "ll %1,%5\n\t" > "move %0,$0\n\t" > "bne %1,%3,2f\n\t" > "move %0,%4\n\t" > "sc %0,%2\n\t" > "beqz %0,1b\n\t" > "2:\n\t" > "/* End compare & swap */" > : "=&r" (ret), "=&r" (temp), "=m" (*p) > : "r" (oldval), "r" (newval), "m" (*p) > : "memory"); > > The assembler will do > > 0xd724 <__pthread_alt_lock+212>: ll v1,0(s1) > 0xd728 <__pthread_alt_lock+216>: move a1,zero > 0xd72c <__pthread_alt_lock+220>: bne v1,s0,0xd744 <__pthread_alt_lock+244> > 0xd730 <__pthread_alt_lock+224>: nop > 0xd734 <__pthread_alt_lock+228>: move a1,v0 > 0xd738 <__pthread_alt_lock+232>: sc a1,0(s1) > 0xd73c <__pthread_alt_lock+236>: beqz a1,0xd724 <__pthread_alt_lock+212> > 0xd740 <__pthread_alt_lock+240>: nop > > There is an extra "nop" in the delay slot. I don't think gas is smart > enough to fill the delay slot. I will put back those ".set noredor". The solution is to move the move instruction in front of the branch instruction. The assembler will then move it into the delay slot: __asm__ __volatile__ ("/* Inline compare & swap */\n" "1:\n\t" "ll %1,%5\n\t" "move %0,$0\n\t" "move %0,%4\n\t" "bne %1,%3,2f\n\t" "sc %0,%2\n\t" "beqz %0,1b\n\t" "2:\n\t" "/* End compare & swap */" : "=&r" (ret), "=&r" (temp), "=m" (*p) : "r" (oldval), "r" (newval), "m" (*p) : "memory"); Also this function looks like a good candidate for inlining (Is it actually inlined? Haven't checked ...) where depending on it's use the address of *p is loaded twice from the GOT, so changing the code to: __asm__ __volatile__ ("/* Inline compare & swap */\n" "1:\n\t" "ll %1,(%5)\n\t" "move %0,$0\n\t" "move %0,%4\n\t" "bne %1,%3,2f\n\t" "sc %0,(%2)\n\t" "beqz %0,1b\n\t" "2:\n\t" "/* End compare & swap */" : "=&r" (ret), "=&r" (temp), "=r" (p) : "r" (oldval), "r" (newval), "r" (p) : "memory"); will avoid having to pay that PIC bloat twice and get you around the gas inefficiency of putting in too many nops into PIC code. Ralf From owner-linux-mips@oss.sgi.com Wed Feb 6 11:18:42 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g16JIgS29229 for linux-mips-outgoing; Wed, 6 Feb 2002 11:18:42 -0800 Received: from dea.linux-mips.net (a1as20-p202.stg.tli.de [195.252.194.202]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g16JIcA29226 for ; Wed, 6 Feb 2002 11:18:38 -0800 Received: (from ralf@localhost) by dea.linux-mips.net (8.11.6/8.11.1) id g165Tjm13904; Wed, 6 Feb 2002 06:29:45 +0100 Date: Wed, 6 Feb 2002 06:29:45 +0100 From: Ralf Baechle To: "Steven J. Hill" Cc: Hartvig Ekner , linux-mips@oss.sgi.com Subject: Re: What is the maximum physical RAM for a 32bit MIPS core? Message-ID: <20020206062945.A13634@dea.linux-mips.net> References: <200202051747.SAA21696@copsun18.mips.com> <3C6044A7.13FEB2E2@cotw.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <3C6044A7.13FEB2E2@cotw.com>; from sjhill@cotw.com on Tue, Feb 05, 2002 at 02:46:31PM -0600 X-Accept-Language: de,en,fr Sender: owner-linux-mips@oss.sgi.com Precedence: bulk On Tue, Feb 05, 2002 at 02:46:31PM -0600, Steven J. Hill wrote: > > One note: Many MIPS32 implementations choose not to implement all 36 PA > > bits, but limit themselves to 32 bits. This saves a few bits in the TLB > > and a few address lines. > > > So, if someone did want 36 PA bits on Linux, the TLB exception handlers > and a little of the page table construction/management code would have to > change. The userspace contraints and such would still remain. Cool. Basically the whole code is already in place except a few bugs fixes that still need to go in. Ralf From owner-linux-mips@oss.sgi.com Wed Feb 6 12:45:48 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g16KjmK31182 for linux-mips-outgoing; Wed, 6 Feb 2002 12:45:48 -0800 Received: from ocean.lucon.org (12-234-19-19.client.attbi.com [12.234.19.19]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g16KjfA31179; Wed, 6 Feb 2002 12:45:41 -0800 Received: by ocean.lucon.org (Postfix, from userid 1000) id F18F7125C8; Wed, 6 Feb 2002 12:45:38 -0800 (PST) Date: Wed, 6 Feb 2002 12:45:38 -0800 From: "H . J . Lu" To: Ralf Baechle Cc: Dominic Sweetman , GNU C Library , linux-mips@oss.sgi.com, binutils@sources.redhat.com Subject: Why does -g turn off filling the delat slot? Message-ID: <20020206124538.A28632@lucon.org> References: <15454.22661.855423.532827@gladsmuir.algor.co.uk> <20020204083115.C13384@lucon.org> <15454.47823.837119.847975@gladsmuir.algor.co.uk> <20020204172857.A22337@lucon.org> <20020204215804.A2095@nevyn.them.org> <20020205113017.A6144@lucon.org> <20020205135407.A8309@lucon.org> <20020206113259.A15431@dea.linux-mips.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <20020206113259.A15431@dea.linux-mips.net>; from ralf@oss.sgi.com on Wed, Feb 06, 2002 at 11:32:59AM +0100 Sender: owner-linux-mips@oss.sgi.com Precedence: bulk On Wed, Feb 06, 2002 at 11:32:59AM +0100, Ralf Baechle wrote: > > > > There is an extra "nop" in the delay slot. I don't think gas is smart > > enough to fill the delay slot. I will put back those ".set noredor". > > The solution is to move the move instruction in front of the branch > instruction. The assembler will then move it into the delay slot: > I found out why it didn't work for me. The problem is -g turns off filling the delay slot. The mips as has case 'g': if (arg == NULL) mips_debug = 2; else mips_debug = atoi (arg); /* When the MIPS assembler sees -g or -g2, it does not do optimizations which limit full symbolic debugging. We take that to be equivalent to -O0. */ if (mips_debug == 2) mips_optimize = 1; break; It doesn't matter of you pass -O to as or not. I'd like to override it if -O is seen. H.J. From owner-linux-mips@oss.sgi.com Wed Feb 6 12:46:39 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g16KkdC31251 for linux-mips-outgoing; Wed, 6 Feb 2002 12:46:39 -0800 Received: from dtla2.teknuts.com (adsl-66-125-62-110.dsl.lsan03.pacbell.net [66.125.62.110]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g16KkcA31248 for ; Wed, 6 Feb 2002 12:46:38 -0800 Received: from whrrusek (whnat1.weiderpub.com [65.115.104.67]) (authenticated) by dtla2.teknuts.com (8.11.3/8.10.1) with ESMTP id g16KkbR02642 for ; Wed, 6 Feb 2002 12:46:37 -0800 Message-ID: <001f01c1af4f$5f3af0e0$261510ac@AD.WEIDERPUB.COM> From: "Robert Rusek" To: Subject: ftp.mips.com RedHat 7.1 Build Date: Wed, 6 Feb 2002 12:46:37 -0800 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.2600.0000 X-MIMEOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 Sender: owner-linux-mips@oss.sgi.com Precedence: bulk Has anyone sucessfully got the ftp.mips.com Redhat 7.1 build working on a SGI Indy/Challenge S ? Thanks, Rob. From owner-linux-mips@oss.sgi.com Wed Feb 6 12:55:14 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g16KtEh31476 for linux-mips-outgoing; Wed, 6 Feb 2002 12:55:14 -0800 Received: from host099.momenco.com (IDENT:root@www.momenco.com [64.169.228.99]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g16KsvA31442 for ; Wed, 6 Feb 2002 12:54:57 -0800 Received: from beagle (beagle.internal.momenco.com [192.168.0.115]) by host099.momenco.com (8.11.6/8.11.6) with SMTP id g16KsqR08536; Wed, 6 Feb 2002 12:54:52 -0800 From: "Matthew Dharm" To: "Kunihiko IMAI" , "Linux-MIPS" Subject: RE: One bug fixed, another found? Date: Wed, 6 Feb 2002 12:54:52 -0800 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0) In-Reply-To: X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400 Importance: Normal Sender: owner-linux-mips@oss.sgi.com Precedence: bulk It turns out that this is a toolchain bug. Get a newer toolchain -- I'm using the one from H.J., which is on oss.sgi.com in the redhat 7.1 mini-port. Matt -- Matthew D. Dharm Senior Software Designer Momentum Computer Inc. 1815 Aston Ave. Suite 107 (760) 431-8663 X-115 Carlsbad, CA 92008-7310 Momentum Works For You www.momenco.com > -----Original Message----- > From: owner-linux-mips@oss.sgi.com > [mailto:owner-linux-mips@oss.sgi.com]On Behalf Of Kunihiko IMAI > Sent: Wednesday, February 06, 2002 6:07 AM > To: Linux-MIPS > Subject: Re: One bug fixed, another found? > > > Hi, > > I also got the Oops in same place. > > My environment is: > > o board: Pb1000 ( Au1000 eval. board ) > o kernel: SGI version of 2.4.17 > o root fs: nfs root > o userland: RedHat 7.1 got from SGI ftp site. > > When rebuilding rpm package on the MIPS board, I also got error in > same place. > > Today I compiled kernel with __wake_up_common not inline > function, and > got same result. And also made kgdb version. I found that the line > > p = curr->task; > > made the memory violation. When trap occurs, gdb says > > curr = 0xfffffffc > > So here is the place of memory violation. > > At Thu, 31 Jan 2002 18:09:29 -0800, > Matthew Dharm wrote: > > > Unable to handle kernel paging request at virtual address > fffffffc, > > epc == 8010b > > 1ec, ra == 8010b19c > > $0 : 00000000 b0045400 00000000 00000000 00000017 > 802d51cc 92bdc000 > > 93e7d120 > > $8 : 92bdc000 b0045401 00000000 00000000 00000000 > 00000000 00000088 > > 00000000 > > $16: 00000000 b0045400 00000001 b0045401 802de998 > 802dad88 00000001 > > 92ce1160 > > $24: 00000000 2acce4e0 92bdc000 > 92bddd68 92bddd68 > > 8010b19c > > epc : 8010b1ec Not tainted > > Using defaults from ksymoops -t elf32-tradbigmips -a mips:3000 > > Status: b0045402 > > Cause : 80008008 > > Process bladeenc (pid: 660, stackpage=92bdc000) > > Stack: 92bddd68 92bddd68 92bddd68 92bddd68 802df378 > 00000001 00000000 > > 93ff8bf0 > > 802df1fc 802df36c 000001d2 92bc4060 8012c588 > 8012c528 00001000 > > 92bc4060 > > 00000000 92bc4060 81018fc0 92ce1160 00000005 > 92bc4120 00001a55 > > 93ff8bf0 > > 92ce1160 0000001f 00001000 8012c180 81018fc0 > 92bc4120 00001a54 > > 93ff8bec > > 80122aa0 80122af8 93f036c0 00000000 80170988 > 80170980 00000005 > > 00001a50 > > 92ce1160 ... > > Call Trace: [<8012c588>] [<8012c528>] [<8012c180>] [<80122aa0>] > > [<80122af8>] [<8 > > 0170988>] > > [<80170980>] [<801233ec>] [<8012372c>] [<8012377c>] [<80126198>] > > [<80123d80>] > > [<80123c78>] [<801680dc>] [<8010703c>] [<8013290c>] [<80113158>] > > [<80106508>] > > [<80106508>] > > Code: 12400004 00000000 8e100000 <5614ffcc> 8e05fffc 40016000 > > 32730001 3421 > > 0001 38210001 > > > > >>RA; 8010b19c <__wake_up+ec/198> > > >>PC; 8010b1ec <__wake_up+13c/198> <===== > > Trace; 8012c588 <__alloc_pages+d0/21c> > > Trace; 8012c528 <__alloc_pages+70/21c> > > Trace; 8012c180 <_alloc_pages+20/2c> > > Trace; 80122aa0 > > Trace; 80122af8 > > Trace; 80170988 > > Trace; 80170980 > > Trace; 801233ec > > Trace; 8012372c > > Trace; 8012377c > > Trace; 80126198 > > Trace; 80123d80 > > Trace; 80123c78 > > Trace; 801680dc > > Trace; 8010703c > > Trace; 8013290c > > Trace; 80113158 > > Trace; 80106508 > > Trace; 80106508 > > Code; 8010b1e0 <__wake_up+130/198> > > 00000000 <_PC>: > > Code; 8010b1e0 <__wake_up+130/198> > > 0: 12400004 beqz s2,14 <_PC+0x14> 8010b1f4 > > <__wake_up+144/198> > > Code; 8010b1e4 <__wake_up+134/198> > > 4: 00000000 nop > > Code; 8010b1e8 <__wake_up+138/198> > > 8: 8e100000 lw s0,0(s0) > > Code; 8010b1ec <__wake_up+13c/198> <===== > > c: 5614ffcc 0x5614ffcc <===== > > This is MIPS2 code. If you use objdump to disassemble, add > -m mips:4600 option to get correct mnemonic. > > And the cause register says exception occurred in delay slot, so: > > > Code; 8010b1f0 <__wake_up+140/198> > > 10: 8e05fffc lw a1,-4(s0) > > The memory violation occurs here. > > Registers dump says s0 = 00000000, memory access to > 0xfffffffc occurs > here. > > > Code; 8010b1f4 <__wake_up+144/198> > > 14: 40016000 mfc0 at,$12 > > Code; 8010b1f8 <__wake_up+148/198> > > 18: 32730001 andi s3,s3,0x1 > > Code; 8010b1fc <__wake_up+14c/198> > > 1c: 34210001 ori at,at,0x1 > > Code; 8010b200 <__wake_up+150/198> > > 20: 38210001 xori at,at,0x1 > > Thanks. > _._. __._ _ . ... _ .___ ._. _____ _... ._ _._ _.._. > .____ _ . ... _ > > > Kunihiko IMAI > From owner-linux-mips@oss.sgi.com Wed Feb 6 13:00:47 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g16L0lP31682 for linux-mips-outgoing; Wed, 6 Feb 2002 13:00:47 -0800 Received: from ocean.lucon.org (12-234-19-19.client.attbi.com [12.234.19.19]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g16L0cA31676 for ; Wed, 6 Feb 2002 13:00:38 -0800 Received: by ocean.lucon.org (Postfix, from userid 1000) id 7654F125C8; Wed, 6 Feb 2002 13:00:37 -0800 (PST) Date: Wed, 6 Feb 2002 13:00:37 -0800 From: "H . J . Lu" To: echristo@redhat.com Cc: linux-mips@oss.sgi.com, binutils@sources.redhat.com Subject: PATCH: Modify the mips gas behavior for -g -O Message-ID: <20020206130037.A29208@lucon.org> References: <15454.22661.855423.532827@gladsmuir.algor.co.uk> <20020204083115.C13384@lucon.org> <15454.47823.837119.847975@gladsmuir.algor.co.uk> <20020204172857.A22337@lucon.org> <20020204215804.A2095@nevyn.them.org> <20020205113017.A6144@lucon.org> <20020205135407.A8309@lucon.org> <20020206113259.A15431@dea.linux-mips.net> <20020206124538.A28632@lucon.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <20020206124538.A28632@lucon.org>; from hjl@lucon.org on Wed, Feb 06, 2002 at 12:45:38PM -0800 Sender: owner-linux-mips@oss.sgi.com Precedence: bulk On Wed, Feb 06, 2002 at 12:45:38PM -0800, H . J . Lu wrote: > On Wed, Feb 06, 2002 at 11:32:59AM +0100, Ralf Baechle wrote: > > > > > > There is an extra "nop" in the delay slot. I don't think gas is smart > > > enough to fill the delay slot. I will put back those ".set noredor". > > > > The solution is to move the move instruction in front of the branch > > instruction. The assembler will then move it into the delay slot: > > > > I found out why it didn't work for me. The problem is -g turns off > filling the delay slot. The mips as has > > case 'g': > if (arg == NULL) > mips_debug = 2; > else > mips_debug = atoi (arg); > /* When the MIPS assembler sees -g or -g2, it does not do > optimizations which limit full symbolic debugging. We take > that to be equivalent to -O0. */ > if (mips_debug == 2) > mips_optimize = 1; > break; > > It doesn't matter of you pass -O to as or not. I'd like to override it > if -O is seen. > > Here is a patch which does what I want. Any comments? Eric, can you approve http://sources.redhat.com/ml/binutils/2002-02/msg00028.html Thanks. H.J. ---- 2002-02-06 H.J. Lu (hjl@gnu.org) * config/tc-mips.c (mips_optimize): Initialize to -2. (md_begin): Set mips_optimize to -mips_optimize if it is less than 0. (md_parse_option): Set mips_optimize to 1 for -g only if it is less than 0. --- gas/config/tc-mips.c.opt Sun Feb 3 23:47:26 2002 +++ gas/config/tc-mips.c Wed Feb 6 12:55:39 2002 @@ -431,7 +431,7 @@ static int mips_frame_reg_valid = 0; unneeded NOPs and swap branch instructions when possible. A value of 1 means to not swap branches. A value of 0 means to always insert NOPs. */ -static int mips_optimize = 2; +static int mips_optimize = -2; /* Debugging level. -g sets this to 2. -gN sets this to N. -g0 is equivalent to seeing no -g option at all. */ @@ -1020,6 +1020,9 @@ md_begin () int target_cpu_had_mips16 = 0; const struct mips_cpu_info *ci; + if (mips_optimize < 0) + mips_optimize = -mips_optimize; + /* GP relative stuff not working for PE */ if (strncmp (TARGET_OS, "pe", 2) == 0 && g_switch_value != 0) @@ -9794,7 +9797,7 @@ md_parse_option (c, arg) /* When the MIPS assembler sees -g or -g2, it does not do optimizations which limit full symbolic debugging. We take that to be equivalent to -O0. */ - if (mips_debug == 2) + if (mips_debug == 2 && mips_optimize < 0) mips_optimize = 1; break; From owner-linux-mips@oss.sgi.com Wed Feb 6 13:17:39 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g16LHdS32171 for linux-mips-outgoing; Wed, 6 Feb 2002 13:17:39 -0800 Received: from cygnus.com (runyon.sfbay.redhat.com [205.180.230.5] (may be forged)) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g16LHZA32163 for ; Wed, 6 Feb 2002 13:17:35 -0800 Received: from localhost.localdomain (taarna.sfbay.redhat.com [205.180.230.102]) by runyon.cygnus.com (8.8.7-cygnus/8.8.7) with ESMTP id NAA18750; Wed, 6 Feb 2002 13:17:26 -0800 (PST) Subject: Re: PATCH: Modify the mips gas behavior for -g -O From: Eric Christopher To: "H . J . Lu" Cc: linux-mips@oss.sgi.com, binutils@sources.redhat.com In-Reply-To: <20020206130037.A29208@lucon.org> References: <15454.22661.855423.532827@gladsmuir.algor.co.uk> <20020204083115.C13384@lucon.org> <15454.47823.837119.847975@gladsmuir.algor.co.uk> <20020204172857.A22337@lucon.org> <20020204215804.A2095@nevyn.them.org> <20020205113017.A6144@lucon.org> <20020205135407.A8309@lucon.org> <20020206113259.A15431@dea.linux-mips.net> <20020206124538.A28632@lucon.org> <20020206130037.A29208@lucon.org> Content-Type: text/plain Content-Transfer-Encoding: 7bit X-Mailer: Evolution/1.0.2 Date: 06 Feb 2002 13:16:47 -0800 Message-Id: <1013030208.19162.6.camel@ghostwheel.cygnus.com> Mime-Version: 1.0 Sender: owner-linux-mips@oss.sgi.com Precedence: bulk > Here is a patch which does what I want. Any comments? > Does anyone care if we have MIPS compatibility? I remember seeing this a few years ago and wondering why we were doing it this way. I remember at one time debuggers had problems with optimized code, but gdb has come a long way since then. Is there any reason to have this code in there at all now, i.e. should we just go off of optimization level and not debug level at all? > Eric, can you approve > > http://sources.redhat.com/ml/binutils/2002-02/msg00028.html > If this is the one for header file information, then go ahead. We need to come up with a better way of doing this though. -eric -- I will not use abbrev. From owner-linux-mips@oss.sgi.com Wed Feb 6 13:31:17 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g16LVHZ32567 for linux-mips-outgoing; Wed, 6 Feb 2002 13:31:17 -0800 Received: from ocean.lucon.org (12-234-19-19.client.attbi.com [12.234.19.19]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g16LVEA32554 for ; Wed, 6 Feb 2002 13:31:14 -0800 Received: by ocean.lucon.org (Postfix, from userid 1000) id DEB56125C8; Wed, 6 Feb 2002 13:31:13 -0800 (PST) Date: Wed, 6 Feb 2002 13:31:13 -0800 From: "H . J . Lu" To: GNU C Library Cc: linux-mips@oss.sgi.com Subject: PATCH: Fix for Linux/mips Message-ID: <20020206133113.A29718@lucon.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i Sender: owner-linux-mips@oss.sgi.com Precedence: bulk We have been using the wrong for Linux/mips. Here is a patch. H.J. ---- 2002-02-06 H.J. Lu * sysdeps/mips/elf/ldsodefs.h: Make sure the right is included. --- sysdeps/mips/elf/ldsodefs.h.mips Sat Jul 7 16:46:05 2001 +++ sysdeps/mips/elf/ldsodefs.h Wed Feb 6 13:25:17 2002 @@ -22,4 +22,4 @@ #define DL_RO_DYN_SECTION 1 -#include +#include_next From owner-linux-mips@oss.sgi.com Wed Feb 6 13:40:29 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g16LeT000359 for linux-mips-outgoing; Wed, 6 Feb 2002 13:40:29 -0800 Received: from foghorn.airs.com (IDENT:qmailr@foghorn.airs.com [63.201.54.26]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g16LeQA00356 for ; Wed, 6 Feb 2002 13:40:26 -0800 Received: (qmail 7673 invoked by uid 10); 6 Feb 2002 21:40:25 -0000 Received: (qmail 29608 invoked by uid 269); 6 Feb 2002 21:40:20 -0000 Mail-Followup-To: hjl@lucon.org, linux-mips@oss.sgi.com, binutils@sources.redhat.com, echristo@redhat.com To: Eric Christopher Cc: "H . J . Lu" , linux-mips@oss.sgi.com, binutils@sources.redhat.com Subject: Re: PATCH: Modify the mips gas behavior for -g -O References: <15454.22661.855423.532827@gladsmuir.algor.co.uk> <20020204083115.C13384@lucon.org> <15454.47823.837119.847975@gladsmuir.algor.co.uk> <20020204172857.A22337@lucon.org> <20020204215804.A2095@nevyn.them.org> <20020205113017.A6144@lucon.org> <20020205135407.A8309@lucon.org> <20020206113259.A15431@dea.linux-mips.net> <20020206124538.A28632@lucon.org> <20020206130037.A29208@lucon.org> <1013030208.19162.6.camel@ghostwheel.cygnus.com> From: Ian Lance Taylor Date: 06 Feb 2002 13:40:20 -0800 In-Reply-To: <1013030208.19162.6.camel@ghostwheel.cygnus.com> Message-ID: Lines: 25 User-Agent: Gnus/5.0808 (Gnus v5.8.8) Emacs/20.7 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Sender: owner-linux-mips@oss.sgi.com Precedence: bulk Eric Christopher writes: > > Here is a patch which does what I want. Any comments? > > > > Does anyone care if we have MIPS compatibility? I remember seeing this a > few years ago and wondering why we were doing it this way. I remember at > one time debuggers had problems with optimized code, but gdb has come a > long way since then. Is there any reason to have this code in there at > all now, i.e. should we just go off of optimization level and not debug > level at all? In general the reason for this sort of compatibility is for easier gcc support. It's normally more convenient if the GNU assembler and the native assembler present the same interface, so that you don't have to use --with-gnu-assembler to get the right result when configuring gcc. It's far more common to invoke the assembler via the compiler than to invoke it directly, so making it work correctly when invoked via the compiler is normally best. H.J., my question on this patch would be: why is -g being passed to the assembler? Ian From owner-linux-mips@oss.sgi.com Wed Feb 6 13:47:33 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g16LlXC00558 for linux-mips-outgoing; Wed, 6 Feb 2002 13:47:33 -0800 Received: from cygnus.com (runyon.sfbay.redhat.com [205.180.230.5] (may be forged)) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g16LlUA00555 for ; Wed, 6 Feb 2002 13:47:31 -0800 Received: from localhost.localdomain (taarna.sfbay.redhat.com [205.180.230.102]) by runyon.cygnus.com (8.8.7-cygnus/8.8.7) with ESMTP id NAA22008; Wed, 6 Feb 2002 13:47:23 -0800 (PST) Subject: Re: PATCH: Modify the mips gas behavior for -g -O From: Eric Christopher To: Ian Lance Taylor Cc: "H . J . Lu" , linux-mips@oss.sgi.com, binutils@sources.redhat.com In-Reply-To: References: <15454.22661.855423.532827@gladsmuir.algor.co.uk> <20020204083115.C13384@lucon.org> <15454.47823.837119.847975@gladsmuir.algor.co.uk> <20020204172857.A22337@lucon.org> <20020204215804.A2095@nevyn.them.org> <20020205113017.A6144@lucon.org> <20020205135407.A8309@lucon.org> <20020206113259.A15431@dea.linux-mips.net> <20020206124538.A28632@lucon.org> <20020206130037.A29208@lucon.org> <1013030208.19162.6.camel@ghostwheel.cygnus.com> Content-Type: text/plain Content-Transfer-Encoding: 7bit X-Mailer: Evolution/1.0.2 Date: 06 Feb 2002 13:46:45 -0800 Message-Id: <1013032006.19159.13.camel@ghostwheel.cygnus.com> Mime-Version: 1.0 Sender: owner-linux-mips@oss.sgi.com Precedence: bulk > In general the reason for this sort of compatibility is for easier gcc > support. It's normally more convenient if the GNU assembler and the > native assembler present the same interface, so that you don't have to > use --with-gnu-assembler to get the right result when configuring gcc. > Ok. That's fair enough. I was hoping you'd pipe up here. :) -eric -- I will not use abbrev. From owner-linux-mips@oss.sgi.com Wed Feb 6 14:00:22 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g16M0MV00886 for linux-mips-outgoing; Wed, 6 Feb 2002 14:00:22 -0800 Received: from ocean.lucon.org (12-234-19-19.client.attbi.com [12.234.19.19]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g16M0IA00883 for ; Wed, 6 Feb 2002 14:00:18 -0800 Received: by ocean.lucon.org (Postfix, from userid 1000) id 06A4C125C8; Wed, 6 Feb 2002 14:00:16 -0800 (PST) Date: Wed, 6 Feb 2002 14:00:16 -0800 From: "H . J . Lu" To: Ian Lance Taylor Cc: Eric Christopher , linux-mips@oss.sgi.com, binutils@sources.redhat.com, gcc-patches@gcc.gnu.org Subject: PATCH: Define SUBTARGET_ASM_DEBUGGING_SPEC for Linux/mips Message-ID: <20020206140016.A30178@lucon.org> References: <15454.47823.837119.847975@gladsmuir.algor.co.uk> <20020204172857.A22337@lucon.org> <20020204215804.A2095@nevyn.them.org> <20020205113017.A6144@lucon.org> <20020205135407.A8309@lucon.org> <20020206113259.A15431@dea.linux-mips.net> <20020206124538.A28632@lucon.org> <20020206130037.A29208@lucon.org> <1013030208.19162.6.camel@ghostwheel.cygnus.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: ; from ian@airs.com on Wed, Feb 06, 2002 at 01:40:20PM -0800 Sender: owner-linux-mips@oss.sgi.com Precedence: bulk On Wed, Feb 06, 2002 at 01:40:20PM -0800, Ian Lance Taylor wrote: > > H.J., my question on this patch would be: why is -g being passed to > the assembler? > Here is a patch similar to Irix 6. H.J. ---- 2002-02-06 H.J. Lu * config/mips/linux.h (SUBTARGET_ASM_DEBUGGING_SPEC): Defined. --- gcc/config/mips/linux.h.gas Thu Nov 15 12:21:17 2001 +++ gcc/config/mips/linux.h Wed Feb 6 13:57:47 2002 @@ -170,6 +170,9 @@ Boston, MA 02111-1307, USA. */ %{!fno-PIC:%{!fno-pic:-KPIC}} \ %{fno-PIC:-non_shared} %{fno-pic:-non_shared}" +#undef SUBTARGET_ASM_DEBUGGING_SPEC +#define SUBTARGET_ASM_DEBUGGING_SPEC "-g0" + /* We don't need those nonsenses. */ #undef INVOKE__main #undef CTOR_LIST_BEGIN From owner-linux-mips@oss.sgi.com Wed Feb 6 14:48:55 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g16Mmts01883 for linux-mips-outgoing; Wed, 6 Feb 2002 14:48:55 -0800 Received: from Cantor.suse.de (ns.suse.de [213.95.15.193]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g16MmoA01879 for ; Wed, 6 Feb 2002 14:48:50 -0800 Received: from Hermes.suse.de (Hermes.suse.de [213.95.15.136]) by Cantor.suse.de (Postfix) with ESMTP id 8F3571EC9F; Wed, 6 Feb 2002 23:48:44 +0100 (MET) Received: from aj by arthur.inka.de with local (Exim 3.34 #1) id 16Yarr-0001Wy-00; Wed, 06 Feb 2002 23:48:43 +0100 Mail-Copies-To: never To: "H . J . Lu" Cc: GNU C Library , linux-mips@oss.sgi.com Subject: Re: PATCH: Fix for Linux/mips References: <20020206133113.A29718@lucon.org> From: Andreas Jaeger Date: Wed, 06 Feb 2002 23:48:42 +0100 In-Reply-To: <20020206133113.A29718@lucon.org> ("H . J . Lu"'s message of "Wed, 6 Feb 2002 13:31:13 -0800") Message-ID: Lines: 33 User-Agent: Gnus/5.090006 (Oort Gnus v0.06) XEmacs/21.4 (Artificial Intelligence, i386-suse-linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Sender: owner-linux-mips@oss.sgi.com Precedence: bulk Thanks, I've committed this, Andreas "H . J . Lu" writes: > We have been using the wrong for Linux/mips. Here is a > patch. > > > H.J. > ---- > 2002-02-06 H.J. Lu > > * sysdeps/mips/elf/ldsodefs.h: Make sure the right > is included. > > --- sysdeps/mips/elf/ldsodefs.h.mips Sat Jul 7 16:46:05 2001 > +++ sysdeps/mips/elf/ldsodefs.h Wed Feb 6 13:25:17 2002 > @@ -22,4 +22,4 @@ > > #define DL_RO_DYN_SECTION 1 > > -#include > +#include_next > -- Andreas Jaeger SuSE Labs aj@suse.de private aj@arthur.inka.de http://www.suse.de/~aj From owner-linux-mips@oss.sgi.com Wed Feb 6 17:22:28 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g171MSK05135 for linux-mips-outgoing; Wed, 6 Feb 2002 17:22:28 -0800 Received: from host099.momenco.com (IDENT:root@www.momenco.com [64.169.228.99]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g171MAA05115 for ; Wed, 6 Feb 2002 17:22:10 -0800 Received: from beagle (beagle.internal.momenco.com [192.168.0.115]) by host099.momenco.com (8.11.6/8.11.6) with SMTP id g171LtR10473; Wed, 6 Feb 2002 17:21:56 -0800 From: "Matthew Dharm" To: "Ralf Baechle" Cc: "Linux-MIPS" Subject: PATCH: Momentum Ocelot (CP7000) fixes Date: Wed, 6 Feb 2002 17:21:55 -0800 Message-ID: MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_NextPart_000_0016_01C1AF32.C66555C0" X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0) X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400 Importance: Normal Sender: owner-linux-mips@oss.sgi.com Precedence: bulk This is a multi-part message in MIME format. ------=_NextPart_000_0016_01C1AF32.C66555C0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Ralf -- Attached to this message is a patch to make the Momentum Computer Ocelot (CP7000) SBC port of Linux work. I made this patch against a recent (2 days ago) CVS snapshot. Please apply it to the CVS repository. It turns out that the existing code only worked for boards with 512MiB of SDRAM. This patch makes all memory configurations work. While discontiguous memory configurations seemed to work, there was some "unusual" behavior. This patch uses a contiguous memory approach, which seems much more stable. BTW, did you ever wind up in the same place as the board we sent you? Matt -- Matthew D. Dharm Senior Software Designer Momentum Computer Inc. 1815 Aston Ave. Suite 107 (760) 431-8663 X-115 Carlsbad, CA 92008-7310 Momentum Works For You www.momenco.com ------=_NextPart_000_0016_01C1AF32.C66555C0 Content-Type: application/octet-stream; name="patch20020204" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="patch20020204" ? a.out=0A= ? arch/mips/boot/elf2ecoff=0A= ? arch/mips/boot/vmlinux.ecoff=0A= ? arch/mips/boot/addinitrd=0A= Index: arch/mips/gt64120/momenco_ocelot/setup.c=0A= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=0A= RCS file: /cvs/linux/arch/mips/gt64120/momenco_ocelot/setup.c,v=0A= retrieving revision 1.5=0A= diff -u -r1.5 setup.c=0A= --- arch/mips/gt64120/momenco_ocelot/setup.c 2001/11/25 09:25:53 1.5=0A= +++ arch/mips/gt64120/momenco_ocelot/setup.c 2002/02/05 02:24:48=0A= @@ -2,11 +2,12 @@=0A= * setup.c=0A= *=0A= * BRIEF MODULE DESCRIPTION=0A= - * Galileo Evaluation Boards - board dependent boot routines=0A= + * Momentum Computer Ocelot (CP7000) - board dependent boot routines=0A= *=0A= * Copyright (C) 1996, 1997, 2001 Ralf Baechle=0A= * Copyright (C) 2000 RidgeRun, Inc.=0A= * Copyright (C) 2001 Red Hat, Inc.=0A= + * Copyright (C) 2002 Momentum Computer=0A= *=0A= * Author: RidgeRun, Inc.=0A= * glonnon@ridgerun.com, skranz@ridgerun.com, stevej@ridgerun.com=0A= @@ -116,8 +117,7 @@=0A= =0A= /* Also a temporary entry to let us talk to the Ocelot PLD and NVRAM=0A= in the CS[012] region. We can't use ioremap() yet. The NVRAM=0A= - appears to be one of the variants of ST M48T35 - see =0A= - = http://www.st.com/stonline/bin/sftab.exe?table=3D172&filter0=3DM48T35=0A= + is a ST M48T37Y, which includes NVRAM, RTC, and Watchdog functions.=0A= =0A= Ocelot PLD (CS0) 0x2c000000 0xe0020000=0A= NVRAM 0x2c800000 0xe0030000=0A= @@ -155,6 +155,7 @@=0A= GT_WRITE(GT_PCI1M0LD_OFS, 0x32000000 >> 21);=0A= GT_WRITE(GT_PCI1M1LD_OFS, 0x34000000 >> 21);=0A= =0A= + /* For the initial programming, we assume 512MB configuration */=0A= /* Relocate the CPU's view of the RAM... */=0A= GT_WRITE(GT_SCS10LD_OFS, 0);=0A= GT_WRITE(GT_SCS10HD_OFS, 0x0fe00000 >> 21);=0A= @@ -207,17 +208,66 @@=0A= switch(tmpword &3) {=0A= case 3:=0A= /* 512MiB */=0A= - add_memory_region(256<<20, 256<<20, BOOT_MEM_RAM);=0A= + /* Decoders are allready set -- just add the=0A= + * appropriate region */=0A= + add_memory_region( 0x40<<20, 0xC0<<20, BOOT_MEM_RAM);=0A= + add_memory_region(0x100<<20, 0x100<<20, BOOT_MEM_RAM);=0A= + break;=0A= case 2:=0A= - /* 256MiB */=0A= - /* FIXME: Is it actually here, or at 0x10000000? */=0A= - add_memory_region(128<<20, 128<<20, BOOT_MEM_RAM);=0A= + /* 256MiB -- two banks of 128MiB */=0A= + GT_WRITE(GT_SCS10HD_OFS, 0x07e00000 >> 21);=0A= + GT_WRITE(GT_SCS32LD_OFS, 0x08000000 >> 21);=0A= + GT_WRITE(GT_SCS32HD_OFS, 0x0fe00000 >> 21);=0A= +=0A= + GT_WRITE(GT_SCS0HD_OFS, 0x7f);=0A= + GT_WRITE(GT_SCS2LD_OFS, 0x80);=0A= + GT_WRITE(GT_SCS2HD_OFS, 0xff);=0A= +=0A= + /* reconfigure the PCI0 interface view of memory */=0A= + GT_WRITE(GT_PCI0_CFGADDR_OFS, 0x80000014);=0A= + GT_WRITE(GT_PCI0_CFGDATA_OFS, 0x08000000);=0A= + GT_WRITE(GT_PCI0_BS_SCS10_OFS, 0x0ffff000);=0A= + GT_WRITE(GT_PCI0_BS_SCS32_OFS, 0x0ffff000);=0A= +=0A= + add_memory_region(0x40<<20, 0x40<<20, BOOT_MEM_RAM);=0A= + add_memory_region(0x80<<20, 0x80<<20, BOOT_MEM_RAM);=0A= + break;=0A= case 1:=0A= - /* 128MiB */=0A= - add_memory_region(64<<20, 64<<20, BOOT_MEM_RAM);=0A= + /* 128MiB -- 64MiB per bank */=0A= + GT_WRITE(GT_SCS10HD_OFS, 0x03e00000 >> 21);=0A= + GT_WRITE(GT_SCS32LD_OFS, 0x04000000 >> 21);=0A= + GT_WRITE(GT_SCS32HD_OFS, 0x07e00000 >> 21);=0A= +=0A= + GT_WRITE(GT_SCS0HD_OFS, 0x3f);=0A= + GT_WRITE(GT_SCS2LD_OFS, 0x40);=0A= + GT_WRITE(GT_SCS2HD_OFS, 0x7f);=0A= +=0A= + /* reconfigure the PCI0 interface view of memory */=0A= + GT_WRITE(GT_PCI0_CFGADDR_OFS, 0x80000014);=0A= + GT_WRITE(GT_PCI0_CFGDATA_OFS, 0x04000000);=0A= + GT_WRITE(GT_PCI0_BS_SCS10_OFS, 0x03fff000);=0A= + GT_WRITE(GT_PCI0_BS_SCS32_OFS, 0x03fff000);=0A= +=0A= + /* add the appropriate region */=0A= + add_memory_region(0x40<<20, 0x40<<20, BOOT_MEM_RAM);=0A= + break;=0A= case 0:=0A= /* 64MiB */=0A= - ;=0A= + GT_WRITE(GT_SCS10HD_OFS, 0x01e00000 >> 21);=0A= + GT_WRITE(GT_SCS32LD_OFS, 0x02000000 >> 21);=0A= + GT_WRITE(GT_SCS32HD_OFS, 0x03e00000 >> 21);=0A= +=0A= + GT_WRITE(GT_SCS0HD_OFS, 0x1f);=0A= + GT_WRITE(GT_SCS2LD_OFS, 0x20);=0A= + GT_WRITE(GT_SCS2HD_OFS, 0x3f);=0A= +=0A= + /* reconfigure the PCI0 interface view of memory */=0A= + GT_WRITE(GT_PCI0_CFGADDR_OFS, 0x80000014);=0A= + GT_WRITE(GT_PCI0_CFGDATA_OFS, 0x04000000);=0A= + GT_WRITE(GT_PCI0_BS_SCS10_OFS, 0x01fff000);=0A= + GT_WRITE(GT_PCI0_BS_SCS32_OFS, 0x01fff000);=0A= +=0A= + break;=0A= }=0A= =0A= /* Fix up the DiskOnChip mapping */=0A= ------=_NextPart_000_0016_01C1AF32.C66555C0-- From owner-linux-mips@oss.sgi.com Wed Feb 6 23:20:57 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g177Kve15835 for linux-mips-outgoing; Wed, 6 Feb 2002 23:20:57 -0800 Received: from web.lhk.com.tw (61-220-176-241.HINET-IP.hinet.net [61.220.176.241]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g177KjA15830; Wed, 6 Feb 2002 23:20:46 -0800 Received: from 208.245.148.186 ([208.245.148.186]) by web.lhk.com.tw with Microsoft SMTPSVC(5.0.2195.2966); Thu, 7 Feb 2002 15:17:11 +0800 To: From: 0c@aphrodite.nu Subject: COPY ANY DVD MOVIE.... FOR FREE! Date: Thu, 07 Feb 2002 14:10:38 -0500 MIME-Version: 1.0 Content-Type: text/plain; charset="Windows-1252" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2911.0) Message-ID: X-OriginalArrivalTime: 07 Feb 2002 07:17:14.0094 (UTC) FILETIME=[776A50E0:01C1AFA7] Sender: owner-linux-mips@oss.sgi.com Precedence: bulk MAKE FREE DVD MOVIES!!!! New Full Download Version Offered Nowhere Else!! DOWNLOAD INSTANTLY!!! CLICK BELOW TO DOWNLOAD NOW! http://bluemoon22.com/images/gz/dvd/index.html?AFFT=M25 This is the "HOTTEST" Software in the USA! FREE FREE FREE Order DVD Copy Wizard NOW and Take Advantage Of This Special Limited Time Offer! Get Our Amazing VHS and PlayStation Copy Wizards For FREE! CLICK BELOW TO DOWNLOAD NOW! http://bluemoon22.com/images/gz/dvd/index.html?AFFT=M25 To be removed click below. http://bluemoon22.com/images/gz/dvd/remove.html From owner-linux-mips@oss.sgi.com Thu Feb 7 00:36:50 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g178aok17079 for linux-mips-outgoing; Thu, 7 Feb 2002 00:36:50 -0800 Received: from deliverator.sgi.com (deliverator.sgi.com [204.94.214.10]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g178alA17076 for ; Thu, 7 Feb 2002 00:36:47 -0800 Received: from cygnus.com (runyon.sfbay.redhat.com [205.180.230.5] (may be forged)) by deliverator.sgi.com (980309.SGI.8.8.8-aspam-6.2/980310.SGI-aspam) via SMTP id AAA27220 for ; Thu, 7 Feb 2002 00:32:21 -0800 (PST) mail_from (echristo@redhat.com) Received: from localhost.localdomain (taarna.cygnus.com [205.180.230.102]) by runyon.cygnus.com (8.8.7-cygnus/8.8.7) with ESMTP id AAA03407; Thu, 7 Feb 2002 00:25:21 -0800 (PST) Subject: Re: PATCH: Define SUBTARGET_ASM_DEBUGGING_SPEC for Linux/mips From: Eric Christopher To: "H . J . Lu" Cc: Ian Lance Taylor , linux-mips@oss.sgi.com, binutils@sources.redhat.com, gcc-patches@gcc.gnu.org In-Reply-To: <20020206140016.A30178@lucon.org> References: <15454.47823.837119.847975@gladsmuir.algor.co.uk> <20020204172857.A22337@lucon.org> <20020204215804.A2095@nevyn.them.org> <20020205113017.A6144@lucon.org> <20020205135407.A8309@lucon.org> <20020206113259.A15431@dea.linux-mips.net> <20020206124538.A28632@lucon.org> <20020206130037.A29208@lucon.org> <1013030208.19162.6.camel@ghostwheel.cygnus.com> <20020206140016.A30178@lucon.org> Content-Type: text/plain Content-Transfer-Encoding: 7bit X-Mailer: Evolution/1.0.2 Date: 07 Feb 2002 00:24:40 -0800 Message-Id: <1013070285.19162.74.camel@ghostwheel.cygnus.com> Mime-Version: 1.0 Sender: owner-linux-mips@oss.sgi.com Precedence: bulk > Here is a patch similar to Irix 6. > > > H.J. > ---- > 2002-02-06 H.J. Lu > > * config/mips/linux.h (SUBTARGET_ASM_DEBUGGING_SPEC): Defined. > Have at. :) -eric -- I will not use abbrev. From owner-linux-mips@oss.sgi.com Thu Feb 7 02:38:21 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g17AcLn19426 for linux-mips-outgoing; Thu, 7 Feb 2002 02:38:21 -0800 Received: from Cantor.suse.de (ns.suse.de [213.95.15.193]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g17AcGA19420 for ; Thu, 7 Feb 2002 02:38:17 -0800 Received: from Hermes.suse.de (Hermes.suse.de [213.95.15.136]) by Cantor.suse.de (Postfix) with ESMTP id DA9371E8CA; Thu, 7 Feb 2002 11:38:10 +0100 (MET) X-Authentication-Warning: gee.suse.de: aj set sender to aj@suse.de using -f Mail-Copies-To: never To: "H . J . Lu" Cc: linux-mips@oss.sgi.com, GNU C Library Subject: Re: PATCH: Not use branch likely on mips References: <20020205180243.A11993@lucon.org> From: Andreas Jaeger Date: Thu, 07 Feb 2002 11:38:09 +0100 In-Reply-To: <20020205180243.A11993@lucon.org> ("H . J . Lu"'s message of "Tue, 5 Feb 2002 18:02:43 -0800") Message-ID: Lines: 34 User-Agent: Gnus/5.090005 (Oort Gnus v0.05) XEmacs/21.4 (Artificial Intelligence, i386-suse-linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Sender: owner-linux-mips@oss.sgi.com Precedence: bulk "H . J . Lu" writes: > This patch removes branch likely. Please update the copyright years next time. I've committed the patch, Andreas > > H.J. > ---- > 2002-02-05 H.J. Lu > > * sysdeps/mips/pspinlock.c (__pthread_spin_lock): Not use > branch likely. > * sysdeps/mips/pt-machine.h (testandset): Liekwise. > (__compare_and_swap): Liekwise. > > 2002-02-05 H.J. Lu > > * sysdeps/mips/atomicity.h (exchange_and_add): Not use branch > likely. > (atomic_add): Likewise. > (compare_and_swap): Likewise. > * sysdeps/unix/sysv/linux/mips/sys/tas.h (_test_and_set): > Likewise. > [...] -- Andreas Jaeger SuSE Labs aj@suse.de private aj@arthur.inka.de http://www.suse.de/~aj From owner-linux-mips@oss.sgi.com Thu Feb 7 02:53:22 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g17ArMH19676 for linux-mips-outgoing; Thu, 7 Feb 2002 02:53:22 -0800 Received: from laposte.enst-bretagne.fr (laposte.enst-bretagne.fr [192.108.115.3]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g17ArGA19673; Thu, 7 Feb 2002 02:53:17 -0800 Received: from resel.enst-bretagne.fr (UNKNOWN@maisel-gw.enst-bretagne.fr [192.44.76.8]) by laposte.enst-bretagne.fr (8.11.6/8.11.6) with ESMTP id g17Ar8a04663; Thu, 7 Feb 2002 11:53:08 +0100 Received: from melkor (mail@melkor.maisel.enst-bretagne.fr [172.16.20.65]) by resel.enst-bretagne.fr (8.12.1/8.12.1/Debian -5) with ESMTP id g17Ar247002552; Thu, 7 Feb 2002 11:53:03 +0100 Received: from glaurung (helo=localhost) by melkor with local-esmtp (Exim 3.34 #1 (Debian)) id 16YWGa-0000oD-00; Wed, 06 Feb 2002 18:53:56 +0100 Date: Wed, 6 Feb 2002 18:53:56 +0100 (CET) From: Vivien Chappelier X-Sender: glaurung@melkor To: Kunihiko IMAI cc: Ralf Baechle , Linux-MIPS Subject: Re: One bug fixed, another found? In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Virus-Scanned: by amavisd-milter (http://amavis.org/) at enst-bretagne.fr Sender: owner-linux-mips@oss.sgi.com Precedence: bulk On Wed, 6 Feb 2002, Kunihiko IMAI wrote: > Today I compiled kernel with __wake_up_common not inline function, and > got same result. And also made kgdb version. I found that the line > p = curr->task; > made the memory violation. If you're using binutils 2.9.5, upgrade to a newer version or use the workaround I've posted about one month ago to this list (Subject: binutils workaround), this should fix your bug. Actually list_for_each fails to detect the end of the q->task_list as it is not properly initialized by binutils. This happens when kswapd wakes up, it calls wake_up on the kwapd_wait wait queue which is a global variable initialized at compile time (mm/vmscan.c). Ralf, could you forbid compiling with this version of binutils, as I've already answered 3 times to the same bug :) gcc < 2.91 seem to be alread forbidden in init.c ... regards, Vivien. From owner-linux-mips@oss.sgi.com Thu Feb 7 03:08:32 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g17B8Wi20092 for linux-mips-outgoing; Thu, 7 Feb 2002 03:08:32 -0800 Received: from dea.linux-mips.net (a1as20-p188.stg.tli.de [195.252.194.188]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g17B8SA20089 for ; Thu, 7 Feb 2002 03:08:28 -0800 Received: (from ralf@localhost) by dea.linux-mips.net (8.11.6/8.11.1) id g17B6Ms18043; Thu, 7 Feb 2002 12:06:22 +0100 Date: Thu, 7 Feb 2002 12:06:22 +0100 From: Ralf Baechle To: Matthew Dharm Cc: Linux-MIPS Subject: Re: PATCH: Momentum Ocelot (CP7000) fixes Message-ID: <20020207120622.A18012@dea.linux-mips.net> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: ; from mdharm@momenco.com on Wed, Feb 06, 2002 at 05:21:55PM -0800 X-Accept-Language: de,en,fr Sender: owner-linux-mips@oss.sgi.com Precedence: bulk On Wed, Feb 06, 2002 at 05:21:55PM -0800, Matthew Dharm wrote: > Attached to this message is a patch to make the Momentum Computer > Ocelot (CP7000) SBC port of Linux work. I made this patch against a > recent (2 days ago) CVS snapshot. Please apply it to the CVS > repository. > > It turns out that the existing code only worked for boards with 512MiB > of SDRAM. This patch makes all memory configurations work. While > discontiguous memory configurations seemed to work, there was some > "unusual" behavior. This patch uses a contiguous memory approach, > which seems much more stable. Applied, Ralf From owner-linux-mips@oss.sgi.com Thu Feb 7 03:38:20 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g17BcK620496 for linux-mips-outgoing; Thu, 7 Feb 2002 03:38:20 -0800 Received: from mail.laser5.co.jp (gw1.laser5.co.jp [202.221.8.77]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g17BcCA20493; Thu, 7 Feb 2002 03:38:13 -0800 Received: from l5ac227.l5.laser5.co.jp (unknown [192.168.128.227]) by mail.laser5.co.jp (Postfix) with ESMTP id F3E83833A5; Thu, 7 Feb 2002 20:38:09 +0900 (JST) Date: Thu, 07 Feb 2002 20:38:09 +0900 Message-ID: From: Kunihiko IMAI To: Vivien Chappelier Cc: Kunihiko IMAI , Ralf Baechle , Linux-MIPS Subject: Re: One bug fixed, another found? In-Reply-To: References: User-Agent: Wanderlust/2.4.0 (Rio) WEMI/1.13.7 (Shimada) CLIME/1.13.6 (=?ISO-2022-JP?B?GyRCQ2YlTj4xGyhC?=) MULE XEmacs/21.1 (patch 14) (Cuyahoga Valley) (i386-vine-linux) MIME-Version: 1.0 (generated by WEMI 1.13.7 - "Shimada") Content-Type: text/plain; charset=US-ASCII Sender: owner-linux-mips@oss.sgi.com Precedence: bulk Hi, It goes well to work by Matthew's and Vivien's advices. Thank you very much. The toolchain which I used for kernel compilation was binutils-mipsel-linux-2.9.5-3.i386.rpm egcs-mipsel-linux-1.1.2-4.i386.rpm got from ftp://oss.sgi.com/pub/linux/mips/crossdev/i386-linux/mipsel-linux/. By this toolchain, The kernel make Oops message at __wake_up_common. I rebuilt and replaced binutils to binutils-2.11.92.0.10. Then it works fine without no Oops at __wake_up_common. At Wed, 6 Feb 2002 18:53:56 +0100 (CET), Vivien Chappelier wrote: > Ralf, could you forbid compiling with this version of binutils, as I've > already answered 3 times to the same bug :) > gcc < 2.91 seem to be alread forbidden in init.c ... I'm sorry for my laziness. Thanks. _._. __._ _ . ... _ .___ ._. _____ _... ._ _._ _.._. .____ _ . ... _ Kunihiko IMAI From owner-linux-mips@oss.sgi.com Thu Feb 7 06:31:06 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g17EV6Q23689 for linux-mips-outgoing; Thu, 7 Feb 2002 06:31:06 -0800 Received: from real.realitydiluted.com (real.realitydiluted.com [208.242.241.164]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g17EUmA23686; Thu, 7 Feb 2002 06:30:48 -0800 Received: from localhost.localdomain ([127.0.0.1] helo=cotw.com) by real.realitydiluted.com with esmtp (Exim 3.22 #1 (Red Hat Linux)) id 16YpZS-0002be-00; Thu, 07 Feb 2002 08:30:42 -0600 Message-ID: <3C628F81.B7079B89@cotw.com> Date: Thu, 07 Feb 2002 08:30:25 -0600 From: "Steven J. Hill" Reply-To: sjhill@cotw.com X-Mailer: Mozilla 4.77 [en] (X11; U; Linux 2.4.17-xfs i686) X-Accept-Language: en MIME-Version: 1.0 To: ralf@oss.sgi.com CC: linux-mips@oss.sgi.com Subject: [PATCH] Fix printk format error, remove dead code, eliminate warnings... Content-Type: multipart/mixed; boundary="------------123C0BC0ED6B31E34070338C" Sender: owner-linux-mips@oss.sgi.com Precedence: bulk This is a multi-part message in MIME format. --------------123C0BC0ED6B31E34070338C Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Ralf, Please apply. Thanks. -Steve -- Steven J. Hill - Embedded SW Engineer --------------123C0BC0ED6B31E34070338C Content-Type: application/octet-stream; name="mipslinux-20020207.diff" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="mipslinux-20020207.diff" ZGlmZiAtdXJOIC1YIGN2cy1leGMudHh0IG1pcHNsaW51eC0yLjQuMTcteGZzL2FyY2gvbWlw cy9rZXJuZWwvc2V0dXAuYyBzZXR0b3AvYXJjaC9taXBzL2tlcm5lbC9zZXR1cC5jCi0tLSBt aXBzbGludXgtMi40LjE3LXhmcy9hcmNoL21pcHMva2VybmVsL3NldHVwLmMJVGh1IEZlYiAg NyAwMDowNDo1MyAyMDAyCisrKyBzZXR0b3AvYXJjaC9taXBzL2tlcm5lbC9zZXR1cC5jCVRo dSBGZWIgIDcgMDg6MDA6MTkgMjAwMgpAQCAtNTc2LDcgKzU3NiwxMSBAQAogCWludCBpOwog CiAJZm9yIChpID0gMDsgaSA8IGJvb3RfbWVtX21hcC5ucl9tYXA7IGkrKykgeworI2lmZGVm IENPTkZJR182NEJJVF9QSFlTX0FERFIKIAkJcHJpbnRrKCIgbWVtb3J5OiAlMDhMeCBAICUw OEx4ICIsCisjZWxzZQorCQlwcmludGsoIiBtZW1vcnk6ICUwOGx4IEAgJTA4bHggIiwKKyNl bmRpZgogCQkJYm9vdF9tZW1fbWFwLm1hcFtpXS5zaXplLCBib290X21lbV9tYXAubWFwW2ld LmFkZHIpOwogCQlzd2l0Y2ggKGJvb3RfbWVtX21hcC5tYXBbaV0udHlwZSkgewogCQljYXNl IEJPT1RfTUVNX1JBTToKQEAgLTg3MSw3ICs4ODEsNyBAQAogI2lmbmRlZiBDT05GSUdfSElH SE1FTQogCQkvKiBNYXhpbXVtIG1lbW9yeSB1c2FibGUgaXMgd2hhdCBpcyBkaXJlY3RseSBh ZGRyZXNzYWJsZSAqLwogCQlwcmludGsoS0VSTl9XQVJOSU5HICJXYXJuaW5nIG9ubHkgJWxk TUIgd2lsbCBiZSB1c2VkLlxuIiwKLQkJICAgICAgIE1BWE1FTT4+MjApOworCQkgICAgICAg KHVuc2lnbmVkIGxvbmcpIE1BWE1FTT4+MjApOwogCQlwcmludGsoS0VSTl9XQVJOSU5HICJV c2UgYSBISUdITUVNIGVuYWJsZWQga2VybmVsLlxuIik7CiAjZW5kaWYKIAl9CmRpZmYgLXVy TiAtWCBjdnMtZXhjLnR4dCBtaXBzbGludXgtMi40LjE3LXhmcy9hcmNoL21pcHMvbWF0aC1l bXUvaWVlZTc1NHhjcHQuYyBzZXR0b3AvYXJjaC9taXBzL21hdGgtZW11L2llZWU3NTR4Y3B0 LmMKLS0tIG1pcHNsaW51eC0yLjQuMTcteGZzL2FyY2gvbWlwcy9tYXRoLWVtdS9pZWVlNzU0 eGNwdC5jCVNhdCBKYW4gMTMgMTI6MTc6NTggMjAwMQorKysgc2V0dG9wL2FyY2gvbWlwcy9t YXRoLWVtdS9pZWVlNzU0eGNwdC5jCVdlZCBKYW4gMzAgMDk6MTI6NDggMjAwMgpAQCAtMzAs NiArMzAsNyBAQAogICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCiAKICNpbmNsdWRlICJpZWVlNzU0 LmgiCisjaW5jbHVkZSA8bGludXgva2VybmVsLmg+CiAKIC8qCiAgKiBWZXJ5IG5hZmYgZXhj ZXB0aW9uIGhhbmRsZXIgKHlvdSBjYW4gcGx1ZyBpbiB5b3VyIG93biBhbmQKZGlmZiAtdXJO IC1YIGN2cy1leGMudHh0IG1pcHNsaW51eC0yLjQuMTcteGZzL2FyY2gvbWlwcy9tYXRoLWVt dS9zcF9zdWIuYyBzZXR0b3AvYXJjaC9taXBzL21hdGgtZW11L3NwX3N1Yi5jCi0tLSBtaXBz bGludXgtMi40LjE3LXhmcy9hcmNoL21pcHMvbWF0aC1lbXUvc3Bfc3ViLmMJVGh1IE9jdCAg NCAwODoxOTo0NCAyMDAxCisrKyBzZXR0b3AvYXJjaC9taXBzL21hdGgtZW11L3NwX3N1Yi5j CVdlZCBKYW4gMzAgMTA6Mzg6MjcgMjAwMgpAQCAtMTY3LDExICsxNjcsMTIgQEAKIAkJCXhl ID0geGU7CiAJCQl4cyA9IHlzOwogCQl9Ci0JCWlmICh4bSA9PSAwKQorCQlpZiAoeG0gPT0g MCkgewogCQkJaWYgKGllZWU3NTRfY3NyLnJtID09IElFRUU3NTRfUkQpCiAJCQkJcmV0dXJu IGllZWU3NTRzcF96ZXJvKDEpOwkvKiByb3VuZCBuZWdhdGl2ZSBpbmYuID0+IHNpZ24gPSAt MSAqLwogCQkJZWxzZQogCQkJCXJldHVybiBpZWVlNzU0c3BfemVybygwKTsJLyogb3RoZXIg cm91bmQgbW9kZXMgICA9PiBzaWduID0gMSAqLworCQl9CiAKIAkJLyogbm9ybWFsaXplIHRv IHJvdW5kaW5nIHByZWNpc2lvbiAKIAkJICovCmRpZmYgLXVyTiAtWCBjdnMtZXhjLnR4dCBt aXBzbGludXgtMi40LjE3LXhmcy9hcmNoL21pcHMvbW0vYy1yNTQzMi5jIHNldHRvcC9hcmNo L21pcHMvbW0vYy1yNTQzMi5jCi0tLSBtaXBzbGludXgtMi40LjE3LXhmcy9hcmNoL21pcHMv bW0vYy1yNTQzMi5jCUZyaSBOb3YgMzAgMDc6Mjg6MDYgMjAwMQorKysgc2V0dG9wL2FyY2gv bWlwcy9tbS9jLXI1NDMyLmMJV2VkIEphbiAzMCAxMTowOTo0NyAyMDAyCkBAIC00MiwzNCAr NDIsNiBAQAogLyogLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0gKi8KIC8qICNpbmNsdWRlIDxhc20vcjRrY2Fj aGUuaD4gKi8KIAotc3RhdGljIGlubGluZSB2b2lkIGZsdXNoX2ljYWNoZV9saW5lX2luZGV4 ZWQodW5zaWduZWQgbG9uZyBhZGRyKQotewotCV9fYXNtX18gX192b2xhdGlsZV9fKAotCQki LnNldCBub3Jlb3JkZXJcblx0IgotCQkiLnNldCBtaXBzM1xuXHQiCi0JCSJjYWNoZSAlMSwg KCUwKVxuXHQiCi0JCSJjYWNoZSAlMSwgMSglMClcblx0IgotCQkiLnNldCBtaXBzMFxuXHQi Ci0JCSIuc2V0IHJlb3JkZXIiCi0JCToKLQkJOiAiciIgKGFkZHIpLAotCQkgICJpIiAoSW5k ZXhfSW52YWxpZGF0ZV9JKSk7Ci19Ci0KLXN0YXRpYyBpbmxpbmUgdm9pZCBmbHVzaF9kY2Fj aGVfbGluZV9pbmRleGVkKHVuc2lnbmVkIGxvbmcgYWRkcikKLXsKLQlfX2FzbV9fIF9fdm9s YXRpbGVfXygKLQkJIi5zZXQgbm9yZW9yZGVyXG5cdCIKLQkJIi5zZXQgbWlwczNcblx0Igot CQkiY2FjaGUgJTEsICglMClcblx0IgotCQkiY2FjaGUgJTEsIDEoJTApXG5cdCIKLQkJIi5z ZXQgbWlwczBcblx0IgotCQkiLnNldCByZW9yZGVyIgotCQk6Ci0JCTogInIiIChhZGRyKSwK LQkJICAiaSIgKEluZGV4X1dyaXRlYmFja19JbnZfRCkpOwotfQotCiBzdGF0aWMgaW5saW5l IHZvaWQgZmx1c2hfaWNhY2hlX2xpbmUodW5zaWduZWQgbG9uZyBhZGRyKQogewogCV9fYXNt X18gX192b2xhdGlsZV9fKApkaWZmIC11ck4gLVggY3ZzLWV4Yy50eHQgbWlwc2xpbnV4LTIu NC4xNy14ZnMvYXJjaC9taXBzL21tL2ZhdWx0LmMgc2V0dG9wL2FyY2gvbWlwcy9tbS9mYXVs dC5jCi0tLSBtaXBzbGludXgtMi40LjE3LXhmcy9hcmNoL21pcHMvbW0vZmF1bHQuYwlXZWQg SmFuIDE2IDAwOjA1OjIxIDIwMDIKKysrIHNldHRvcC9hcmNoL21pcHMvbW0vZmF1bHQuYwlX ZWQgSmFuIDMwIDExOjA4OjMwIDIwMDIKQEAgLTE4LDYgKzE4LDkgQEAKICNpbmNsdWRlIDxs aW51eC9zbXAuaD4KICNpbmNsdWRlIDxsaW51eC9zbXBfbG9jay5oPgogI2luY2x1ZGUgPGxp bnV4L3ZlcnNpb24uaD4KKyNpZmRlZiBDT05GSUdfVlQKKyNpbmNsdWRlIDxsaW51eC92dF9r ZXJuLmg+CisjZW5kaWYKIAogI2luY2x1ZGUgPGFzbS9oYXJkaXJxLmg+CiAjaW5jbHVkZSA8 YXNtL3BnYWxsb2MuaD4KZGlmZiAtdXJOIC1YIGN2cy1leGMudHh0IG1pcHNsaW51eC0yLjQu MTcteGZzL2FyY2gvbWlwcy9tbS9pbml0LmMgc2V0dG9wL2FyY2gvbWlwcy9tbS9pbml0LmMK LS0tIG1pcHNsaW51eC0yLjQuMTcteGZzL2FyY2gvbWlwcy9tbS9pbml0LmMJVGh1IEZlYiAg NyAwMDowNDo1NCAyMDAyCisrKyBzZXR0b3AvYXJjaC9taXBzL21tL2luaXQuYwlUaHUgRmVi ICA3IDA3OjAxOjE1IDIwMDIKQEAgLTE2MSw2ICsxNjEsNyBAQAogZXh0ZXJuIGNoYXIgX2Z0 ZXh0LCBfZXRleHQsIF9mZGF0YSwgX2VkYXRhOwogZXh0ZXJuIGNoYXIgX19pbml0X2JlZ2lu LCBfX2luaXRfZW5kOwogCisjaWZkZWYgQ09ORklHX0hJR0hNRU0KIHN0YXRpYyB2b2lkIF9f aW5pdCBmaXhyYW5nZV9pbml0ICh1bnNpZ25lZCBsb25nIHN0YXJ0LCB1bnNpZ25lZCBsb25n IGVuZCwKIAlwZ2RfdCAqcGdkX2Jhc2UpCiB7CkBAIC0xODksMTMgKzE5MCwxNyBAQAogCQlq ID0gMDsKIAl9CiB9CisjZW5kaWYKIAogdm9pZCBfX2luaXQgcGFnZXRhYmxlX2luaXQodm9p ZCkKIHsKKyNpZmRlZiBDT05GSUdfSElHSE1FTQogCXVuc2lnbmVkIGxvbmcgdmFkZHI7Ci0J cGdkX3QgKnBnZCwgKnBnZF9iYXNlOworCXBnZF90ICpwZ2Q7CiAJcG1kX3QgKnBtZDsKIAlw dGVfdCAqcHRlOworI2VuZGlmCisJcGdkX3QgKnBnZF9iYXNlOwogCiAJLyogSW5pdGlhbGl6 ZSB0aGUgZW50aXJlIHBnZC4gICovCiAJcGdkX2luaXQoKHVuc2lnbmVkIGxvbmcpc3dhcHBl cl9wZ19kaXIpOwpkaWZmIC11ck4gLVggY3ZzLWV4Yy50eHQgbWlwc2xpbnV4LTIuNC4xNy14 ZnMvaW5jbHVkZS9saW51eC9ydG5ldGxpbmsuaCBzZXR0b3AvaW5jbHVkZS9saW51eC9ydG5l dGxpbmsuaAotLS0gbWlwc2xpbnV4LTIuNC4xNy14ZnMvaW5jbHVkZS9saW51eC9ydG5ldGxp bmsuaAlTYXQgRGVjIDI5IDAwOjA1OjEzIDIwMDEKKysrIHNldHRvcC9pbmNsdWRlL2xpbnV4 L3J0bmV0bGluay5oCVdlZCBKYW4gMzAgMDg6NDM6MDggMjAwMgpAQCAtNTg2LDkgKzU4Niw5 IEBACiBleHRlcm4gdm9pZCBydG5ldGxpbmtfaW5pdCh2b2lkKTsKIAogI2RlZmluZSBBU1NF UlRfUlROTCgpIGRvIHsgaWYgKGRvd25fdHJ5bG9jaygmcnRubF9zZW0pID09IDApICB7IHVw KCZydG5sX3NlbSk7IFwKLXByaW50aygiUlROTDogYXNzZXJ0aW9uIGZhaWxlZCBhdCAiIF9f RklMRV9fICIoJWQpOiIgX19GVU5DVElPTl9fICJcbiIsIF9fTElORV9fKTsgfSBcCitwcmlu dGsoIlJUTkw6IGFzc2VydGlvbiBmYWlsZWQgYXQgIiBfX0ZJTEVfXyAiKCVkKTogJXNcbiIs IF9fTElORV9fLCBfX0ZVTkNUSU9OX18pOyB9IFwKIAkJICAgfSB3aGlsZSgwKTsKLSNkZWZp bmUgQlVHX1RSQVAoeCkgaWYgKCEoeCkpIHsgcHJpbnRrKCJLRVJORUw6IGFzc2VydGlvbiAo IiAjeCAiKSBmYWlsZWQgYXQgIiBfX0ZJTEVfXyAiKCVkKToiIF9fRlVOQ1RJT05fXyAiXG4i LCBfX0xJTkVfXyk7IH0KKyNkZWZpbmUgQlVHX1RSQVAoeCkgaWYgKCEoeCkpIHsgcHJpbnRr KCJLRVJORUw6IGFzc2VydGlvbiAoIiAjeCAiKSBmYWlsZWQgYXQgIiBfX0ZJTEVfXyAiKCVk KTogJXNcbiIsIF9fTElORV9fLCBfX0ZVTkNUSU9OX18pOyB9CiAKIAogI2VuZGlmIC8qIF9f S0VSTkVMX18gKi8KZGlmZiAtdXJOIC1YIGN2cy1leGMudHh0IG1pcHNsaW51eC0yLjQuMTct eGZzL25ldC9uZXRsaW5rL2FmX25ldGxpbmsuYyBzZXR0b3AvbmV0L25ldGxpbmsvYWZfbmV0 bGluay5jCi0tLSBtaXBzbGludXgtMi40LjE3LXhmcy9uZXQvbmV0bGluay9hZl9uZXRsaW5r LmMJVHVlIEF1ZyAyMSAyMjoyNToyMCAyMDAxCisrKyBzZXR0b3AvbmV0L25ldGxpbmsvYWZf bmV0bGluay5jCVdlZCBKYW4gMzAgMTA6Mzc6MzggMjAwMgpAQCAtNDgsNyArNDgsNyBAQAog I2RlZmluZSBOTF9FTVVMQVRFX0RFVgogI2VuZGlmCiAKLSNkZWZpbmUgQlVHX1RSQVAoeCkg aWYgKCEoeCkpIHsgcHJpbnRrKCJBc3NlcnRpb24gKCIgI3ggIikgZmFpbGVkIGF0ICIgX19G SUxFX18gIiglZCk6IiBfX0ZVTkNUSU9OX18gIlxuIiwgX19MSU5FX18pOyB9CisjZGVmaW5l IEJVR19UUkFQKHgpIGlmICghKHgpKSB7IHByaW50aygiQXNzZXJ0aW9uICgiICN4ICIpIGZh aWxlZCBhdCAiIF9fRklMRV9fICIoJWQpOiVzXG4iLCBfX0xJTkVfXywgX19GVU5DVElPTl9f KTsgfQogCiBzdHJ1Y3QgbmV0bGlua19vcHQKIHsK --------------123C0BC0ED6B31E34070338C-- From owner-linux-mips@oss.sgi.com Thu Feb 7 07:57:42 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g17Fvgk25676 for linux-mips-outgoing; Thu, 7 Feb 2002 07:57:42 -0800 Received: from real.realitydiluted.com (real.realitydiluted.com [208.242.241.164]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g17FvVA25673; Thu, 7 Feb 2002 07:57:31 -0800 Received: from localhost.localdomain ([127.0.0.1] helo=cotw.com) by real.realitydiluted.com with esmtp (Exim 3.22 #1 (Red Hat Linux)) id 16YqvN-0002fF-00; Thu, 07 Feb 2002 09:57:25 -0600 Message-ID: <3C62A3D5.C9F7808E@cotw.com> Date: Thu, 07 Feb 2002 09:57:09 -0600 From: "Steven J. Hill" Reply-To: sjhill@cotw.com X-Mailer: Mozilla 4.77 [en] (X11; U; Linux 2.4.17-xfs i686) X-Accept-Language: en MIME-Version: 1.0 To: ralf@oss.sgi.com, linux-mips@oss.sgi.com Subject: [PATCH] Eliminate more compiler warnings... Content-Type: multipart/mixed; boundary="------------F4570B76FBC979731E93AC39" Sender: owner-linux-mips@oss.sgi.com Precedence: bulk This is a multi-part message in MIME format. --------------F4570B76FBC979731E93AC39 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Please apply this too. Thanks. -Steve -- Steven J. Hill - Embedded SW Engineer --------------F4570B76FBC979731E93AC39 Content-Type: application/octet-stream; name="mipslinux-20020207p2.diff" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="mipslinux-20020207p2.diff" ZGlmZiAtdXJOIC1YIGN2cy1leGMudHh0IG1pcHNsaW51eC0yLjQuMTcteGZzL2FyY2gvbWlw cy9rZXJuZWwvaXJxLmMgc2V0dG9wL2FyY2gvbWlwcy9rZXJuZWwvaXJxLmMKLS0tIG1pcHNs aW51eC0yLjQuMTcteGZzL2FyY2gvbWlwcy9rZXJuZWwvaXJxLmMJVHVlIERlYyAxOCAwMDow NDowMCAyMDAxCisrKyBzZXR0b3AvYXJjaC9taXBzL2tlcm5lbC9pcnEuYwlUaHUgRmViICA3 IDA5OjA1OjA0IDIwMDIKQEAgLTI1LDYgKzI1LDggQEAKICNpbmNsdWRlIDxhc20vc3lzdGVt Lmg+CiAjaW5jbHVkZSA8YXNtL3VhY2Nlc3MuaD4KIAorc3RhdGljIHZvaWQgcmVnaXN0ZXJf aXJxX3Byb2MgKHVuc2lnbmVkIGludCBpcnEpOworCiAvKgogICogQ29udHJvbGxlciBtYXBw aW5ncyBmb3IgYWxsIGludGVycnVwdCBzb3VyY2VzOgogICovCkBAIC05OCw3ICsxMDAsNyBA QAogCQkJcCArPSBzcHJpbnRmKHAsICIsICVzIiwgYWN0aW9uLT5uYW1lKTsKIAkJKnArKyA9 ICdcbic7CiAJfQotCXAgKz0gc3ByaW50ZihwLCAiRVJSOiAlMTBsdVxuIiwgaXJxX2Vycl9j b3VudCk7CisJcCArPSBzcHJpbnRmKHAsICJFUlI6ICUxMHVcbiIsIGF0b21pY19yZWFkKCZp cnFfZXJyX2NvdW50KSk7CiAJcmV0dXJuIHAgLSBidWY7CiB9CiAKZGlmZiAtdXJOIC1YIGN2 cy1leGMudHh0IG1pcHNsaW51eC0yLjQuMTcteGZzL2RyaXZlcnMvaWRlL2lkZS1wcm9iZS5j IHNldHRvcC9kcml2ZXJzL2lkZS9pZGUtcHJvYmUuYwotLS0gbWlwc2xpbnV4LTIuNC4xNy14 ZnMvZHJpdmVycy9pZGUvaWRlLXByb2JlLmMJU3VuIERlYyAgMiAwNjowODowMyAyMDAxCisr KyBzZXR0b3AvZHJpdmVycy9pZGUvaWRlLXByb2JlLmMJVHVlIEphbiAyOSAxNDowNjozOSAy MDAyCkBAIC03MjAsOSArNzIwLDkgQEAKIAogI2lmICFkZWZpbmVkKF9fbWM2ODAwMF9fKSAm JiAhZGVmaW5lZChDT05GSUdfQVBVUykgJiYgIWRlZmluZWQoX19zcGFyY19fKQogCXByaW50 aygiJXMgYXQgMHglMDN4LTB4JTAzeCwweCUwM3ggb24gaXJxICVkIiwgaHdpZi0+bmFtZSwK LQkJaHdpZi0+aW9fcG9ydHNbSURFX0RBVEFfT0ZGU0VUXSwKLQkJaHdpZi0+aW9fcG9ydHNb SURFX0RBVEFfT0ZGU0VUXSs3LAotCQlod2lmLT5pb19wb3J0c1tJREVfQ09OVFJPTF9PRkZT RVRdLCBod2lmLT5pcnEpOworCQkodW5zaWduZWQgaW50KSBod2lmLT5pb19wb3J0c1tJREVf REFUQV9PRkZTRVRdLAorCQkodW5zaWduZWQgaW50KSBod2lmLT5pb19wb3J0c1tJREVfREFU QV9PRkZTRVRdKzcsCisJCSh1bnNpZ25lZCBpbnQpIGh3aWYtPmlvX3BvcnRzW0lERV9DT05U Uk9MX09GRlNFVF0sIGh3aWYtPmlycSk7CiAjZWxpZiBkZWZpbmVkKF9fc3BhcmNfXykKIAlw cmludGsoIiVzIGF0IDB4JTAzbHgtMHglMDNseCwweCUwM2x4IG9uIGlycSAlcyIsIGh3aWYt Pm5hbWUsCiAJCWh3aWYtPmlvX3BvcnRzW0lERV9EQVRBX09GRlNFVF0sCmRpZmYgLXVyTiAt WCBjdnMtZXhjLnR4dCBtaXBzbGludXgtMi40LjE3LXhmcy9kcml2ZXJzL3BjaS9wY2kuaWRz IHNldHRvcC9kcml2ZXJzL3BjaS9wY2kuaWRzCi0tLSBtaXBzbGludXgtMi40LjE3LXhmcy9k cml2ZXJzL3BjaS9wY2kuaWRzCVN1biBEZWMgIDIgMDU6MzQ6NDUgMjAwMQorKysgc2V0dG9w L2RyaXZlcnMvcGNpL3BjaS5pZHMJVGh1IEZlYiAgNyAwOTozNDoxOSAyMDAyCkBAIC0xMzky LDcgKzEzOTIsNyBAQAogMTA5ZSAgQnJvb2t0cmVlIENvcnBvcmF0aW9uCiAJMDM1MCAgQnQ4 NDggVFYgd2l0aCBETUEgcHVzaAogCTAzNTEgIEJ0ODQ5QSBWaWRlbyBjYXB0dXJlCi0JMDM2 YyAgQnQ4NzkoPz8pIFZpZGVvIENhcHR1cmUKKwkwMzZjICBCdDg3OVs/P10gVmlkZW8gQ2Fw dHVyZQogCQkxM2U5IDAwNzAgIFdpbi9UViAoVmlkZW8gU2VjdGlvbikKIAkwMzZlICBCdDg3 OAogCQkwMDcwIDEzZWIgIFdpblRWL0dPCkBAIC00NjU2LDcgKzQ2NTYsNyBAQAogMjcwYiAg WGFudGVsIENvcnBvcmF0aW9uCiAyNzBmICBDaGFpbnRlY2ggQ29tcHV0ZXIgQ28uIEx0ZAog MjcxMSAgQVZJRCBUZWNobm9sb2d5IEluYy4KLTJhMTUgIDNEIFZpc2lvbig/Pz8pCisyYTE1 ICAzRCBWaXNpb25bPz8/XQogMzAwMCAgSGFuc29sIEVsZWN0cm9uaWNzIEluYy4KIDMxNDIg IFBvc3QgSW1wcmVzc2lvbiBTeXN0ZW1zLgogMzM4OCAgSGludCBDb3JwCmRpZmYgLXVyTiAt WCBjdnMtZXhjLnR4dCBtaXBzbGludXgtMi40LjE3LXhmcy9kcml2ZXJzL3BjaS9wcm9jLmMg c2V0dG9wL2RyaXZlcnMvcGNpL3Byb2MuYwotLS0gbWlwc2xpbnV4LTIuNC4xNy14ZnMvZHJp dmVycy9wY2kvcHJvYy5jCVN1biBEZWMgIDIgMDU6MzQ6NDUgMjAwMQorKysgc2V0dG9wL2Ry aXZlcnMvcGNpL3Byb2MuYwlXZWQgSmFuIDMwIDA4OjM0OjAzIDIwMDIKQEAgLTIwMCw3ICsy MDAsNyBAQAogc3RhdGljIGludCBwcm9jX2J1c19wY2lfaW9jdGwoc3RydWN0IGlub2RlICpp bm9kZSwgc3RydWN0IGZpbGUgKmZpbGUsIHVuc2lnbmVkIGludCBjbWQsIHVuc2lnbmVkIGxv bmcgYXJnKQogewogCWNvbnN0IHN0cnVjdCBwcm9jX2Rpcl9lbnRyeSAqZHAgPSBpbm9kZS0+ dS5nZW5lcmljX2lwOwotCXN0cnVjdCBwY2lfZGV2ICpkZXYgPSBkcC0+ZGF0YTsKKwlzdHJ1 Y3QgcGNpX2RldiAqZGV2OwogI2lmZGVmIEhBVkVfUENJX01NQVAKIAlzdHJ1Y3QgcGNpX2Zp bHBfcHJpdmF0ZSAqZnByaXYgPSBmaWxlLT5wcml2YXRlX2RhdGE7CiAjZW5kaWYgLyogSEFW RV9QQ0lfTU1BUCAqLwpAQCAtMjA4LDYgKzIwOCw3IEBACiAKIAlzd2l0Y2ggKGNtZCkgewog CWNhc2UgUENJSU9DX0NPTlRST0xMRVI6CisJCWRldiA9IGRwLT5kYXRhOwogCQlyZXQgPSBw Y2lfY29udHJvbGxlcl9udW0oZGV2KTsKIAkJYnJlYWs7CiAK --------------F4570B76FBC979731E93AC39-- From owner-linux-mips@oss.sgi.com Thu Feb 7 08:18:44 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g17GIiE26159 for linux-mips-outgoing; Thu, 7 Feb 2002 08:18:44 -0800 Received: from delta.ds2.pg.gda.pl (macro@delta.ds2.pg.gda.pl [213.192.72.1]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g17GIUA26153; Thu, 7 Feb 2002 08:18:30 -0800 Received: from localhost by delta.ds2.pg.gda.pl (8.9.3/8.9.3) with SMTP id RAA17743; Thu, 7 Feb 2002 17:18:30 +0100 (MET) Date: Thu, 7 Feb 2002 17:18:30 +0100 (MET) From: "Maciej W. Rozycki" Reply-To: "Maciej W. Rozycki" To: "Steven J. Hill" cc: ralf@oss.sgi.com, linux-mips@oss.sgi.com Subject: Re: [PATCH] Eliminate more compiler warnings... In-Reply-To: <3C62A3D5.C9F7808E@cotw.com> Message-ID: Organization: Technical University of Gdansk MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-linux-mips@oss.sgi.com Precedence: bulk On Thu, 7 Feb 2002, Steven J. Hill wrote: > Please apply this too. Thanks. [...] > printk("%s at 0x%03x-0x%03x,0x%03x on irq %d", hwif->name, > - hwif->io_ports[IDE_DATA_OFFSET], > - hwif->io_ports[IDE_DATA_OFFSET]+7, > - hwif->io_ports[IDE_CONTROL_OFFSET], hwif->irq); > + (unsigned int) hwif->io_ports[IDE_DATA_OFFSET], > + (unsigned int) hwif->io_ports[IDE_DATA_OFFSET]+7, > + (unsigned int) hwif->io_ports[IDE_CONTROL_OFFSET], hwif->irq); Why is it needed? hwif->io_ports[...] or ide_ioreg_t is short which gets promoted to int due to varargs automatically. BTW, please send patches to the list as inlined plain text if possible. -- + Maciej W. Rozycki, Technical University of Gdansk, Poland + +--------------------------------------------------------------+ + e-mail: macro@ds2.pg.gda.pl, PGP key available + From owner-linux-mips@oss.sgi.com Thu Feb 7 08:28:09 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g17GS9C26320 for linux-mips-outgoing; Thu, 7 Feb 2002 08:28:09 -0800 Received: from mail.sonytel.be (mail.sonytel.be [193.74.243.200]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g17GRuA26315; Thu, 7 Feb 2002 08:27:57 -0800 Received: from vervain.sonytel.be (mail.sonytel.be [10.17.0.26]) by mail.sonytel.be (8.9.0/8.8.6) with ESMTP id RAA20472; Thu, 7 Feb 2002 17:27:16 +0100 (MET) Date: Thu, 7 Feb 2002 17:27:16 +0100 (MET) From: Geert Uytterhoeven To: "Steven J. Hill" cc: Ralf Baechle , Linux/MIPS Development Subject: Re: [PATCH] Eliminate more compiler warnings... In-Reply-To: <3C62A3D5.C9F7808E@cotw.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-linux-mips@oss.sgi.com Precedence: bulk On Thu, 7 Feb 2002, Steven J. Hill wrote: > Please apply this too. Thanks. diff -urN -X cvs-exc.txt mipslinux-2.4.17-xfs/drivers/ide/ide-probe.c settop/drivers/ide/ide-probe.c --- mipslinux-2.4.17-xfs/drivers/ide/ide-probe.c Sun Dec 2 06:08:03 2001 +++ settop/drivers/ide/ide-probe.c Tue Jan 29 14:06:39 2002 @@ -720,9 +720,9 @@ #if !defined(__mc68000__) && !defined(CONFIG_APUS) && !defined(__sparc__) printk("%s at 0x%03x-0x%03x,0x%03x on irq %d", hwif->name, - hwif->io_ports[IDE_DATA_OFFSET], - hwif->io_ports[IDE_DATA_OFFSET]+7, - hwif->io_ports[IDE_CONTROL_OFFSET], hwif->irq); + (unsigned int) hwif->io_ports[IDE_DATA_OFFSET], + (unsigned int) hwif->io_ports[IDE_DATA_OFFSET]+7, + (unsigned int) hwif->io_ports[IDE_CONTROL_OFFSET], hwif->irq); #elif defined(__sparc__) printk("%s at 0x%03lx-0x%03lx,0x%03lx on irq %s", hwif->name, hwif->io_ports[IDE_DATA_OFFSET], Wouldn't it be better to treat MIPS the same as SPARC here, so you don't need the casts? Both MIPS and SPARC define ide_ioreg_t to be unsigned long. And perhaps the #if mess (__sparc__ is checked twice) can be cleant up a bit as well. BTW, find include/asm-* -type f | xargs grep 'typedef.*ide_ioreg_t' shows that very few platforms define ide_ioreg_t to be unsigned short... | include/asm-alpha/hdreg.h:typedef unsigned short ide_ioreg_t; | include/asm-arm/hdreg.h:typedef unsigned long ide_ioreg_t; | include/asm-cris/hdreg.h:typedef unsigned long ide_ioreg_t; | include/asm-i386/hdreg.h:typedef unsigned short ide_ioreg_t; | include/asm-ia64/hdreg.h:typedef unsigned short ide_ioreg_t; | include/asm-m68k/hdreg.h:typedef unsigned int q40ide_ioreg_t; | include/asm-m68k/hdreg.h:typedef unsigned char * ide_ioreg_t; | include/asm-mips/hdreg.h:typedef unsigned long ide_ioreg_t; | include/asm-mips64/hdreg.h:typedef unsigned long ide_ioreg_t; | include/asm-parisc/hdreg.h:typedef unsigned short ide_ioreg_t; | include/asm-ppc/hdreg.h:typedef unsigned int ide_ioreg_t; | include/asm-s390/hdreg.h:typedef unsigned long ide_ioreg_t; | include/asm-s390x/hdreg.h:typedef unsigned long ide_ioreg_t; | include/asm-sh/hdreg.h:typedef unsigned int ide_ioreg_t; | include/asm-sparc/hdreg.h:typedef unsigned long ide_ioreg_t; | include/asm-sparc64/hdreg.h:typedef unsigned long ide_ioreg_t; 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 owner-linux-mips@oss.sgi.com Thu Feb 7 08:51:10 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g17GpAX26844 for linux-mips-outgoing; Thu, 7 Feb 2002 08:51:10 -0800 Received: from dea.linux-mips.net (a1as01-p27.stg.tli.de [195.252.185.27]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g17Gp6A26837 for ; Thu, 7 Feb 2002 08:51:07 -0800 Received: (from ralf@localhost) by dea.linux-mips.net (8.11.6/8.11.1) id g17Gmgn23669; Thu, 7 Feb 2002 17:48:42 +0100 Date: Thu, 7 Feb 2002 17:48:41 +0100 From: Ralf Baechle To: "Maciej W. Rozycki" Cc: "Steven J. Hill" , linux-mips@oss.sgi.com Subject: Re: [PATCH] Eliminate more compiler warnings... Message-ID: <20020207174841.A23659@dea.linux-mips.net> References: <3C62A3D5.C9F7808E@cotw.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: ; from macro@ds2.pg.gda.pl on Thu, Feb 07, 2002 at 05:18:30PM +0100 X-Accept-Language: de,en,fr Sender: owner-linux-mips@oss.sgi.com Precedence: bulk On Thu, Feb 07, 2002 at 05:18:30PM +0100, Maciej W. Rozycki wrote: > Why is it needed? hwif->io_ports[...] or ide_ioreg_t is short which gets > promoted to int due to varargs automatically. > > BTW, please send patches to the list as inlined plain text if possible. And split into individual independant patches. Ralf From owner-linux-mips@oss.sgi.com Thu Feb 7 09:13:39 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g17HDdQ27274 for linux-mips-outgoing; Thu, 7 Feb 2002 09:13:39 -0800 Received: from ocean.lucon.org (12-234-19-19.client.attbi.com [12.234.19.19]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g17HDSA27271 for ; Thu, 7 Feb 2002 09:13:28 -0800 Received: by ocean.lucon.org (Postfix, from userid 1000) id DC9E0125C8; Thu, 7 Feb 2002 09:13:27 -0800 (PST) Date: Thu, 7 Feb 2002 09:13:27 -0800 From: "H . J . Lu" To: Andreas Jaeger Cc: linux-mips@oss.sgi.com, GNU C Library Subject: Re: PATCH: Not use branch likely on mips Message-ID: <20020207091327.B15331@lucon.org> References: <20020205180243.A11993@lucon.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: ; from aj@suse.de on Thu, Feb 07, 2002 at 11:38:09AM +0100 Sender: owner-linux-mips@oss.sgi.com Precedence: bulk On Thu, Feb 07, 2002 at 11:38:09AM +0100, Andreas Jaeger wrote: > "H . J . Lu" writes: > > > This patch removes branch likely. > > Please update the copyright years next time. > > I've committed the patch, > Here is a new patch. I have checked in a gcc patch which makes ".set noreorder" unnecessary even with "gcc -g". Thanks. H.J. ---- 2002-02-07 H.J. Lu * sysdeps/mips/pspinlock.c (__pthread_spin_lock): Silence the gcc warning. (__pthread_spin_lock): Remove ".set noreorder". * sysdeps/mips/pt-machine.h (__compare_and_swap): Liekwise. 2002-02-07 H.J. Lu * sysdeps/mips/atomicity.h (compare_and_swap): Remove ".set noreorder". * sysdeps/unix/sysv/linux/mips/sys/tas.h (_test_and_set): Likewise. --- libc/linuxthreads/sysdeps/mips/pspinlock.c.llsc Thu Feb 7 08:48:57 2002 +++ libc/linuxthreads/sysdeps/mips/pspinlock.c Wed Feb 6 12:12:50 2002 @@ -35,11 +35,8 @@ __pthread_spin_lock (pthread_spinlock_t ("\t\t\t# spin_lock\n" "1:\n\t" "ll %1,%3\n\t" - ".set push\n\t" - ".set noreorder\n\t" + "li %2,1\n\t" "bnez %1,1b\n\t" - " li %2,1\n\t" - ".set pop\n\t" "sc %2,%0\n\t" "beqz %2,1b" : "=m" (*lock), "=&r" (tmp1), "=&r" (tmp2) @@ -54,7 +51,7 @@ __pthread_spin_lock (pthread_spinlock_t int __pthread_spin_lock (pthread_spinlock_t *lock) { - while (_test_and_set (lock, 1)); + while (_test_and_set ((int *) lock, 1)); return 0; } --- libc/linuxthreads/sysdeps/mips/pt-machine.h.llsc Thu Feb 7 08:48:57 2002 +++ libc/linuxthreads/sysdeps/mips/pt-machine.h Wed Feb 6 12:12:50 2002 @@ -60,11 +60,8 @@ __compare_and_swap (long int *p, long in ("/* Inline compare & swap */\n" "1:\n\t" "ll %1,%5\n\t" - ".set push\n\t" - ".set noreorder\n\t" + "move %0,$0\n\t" "bne %1,%3,2f\n\t" - " move %0,$0\n\t" - ".set pop\n\t" "move %0,%4\n\t" "sc %0,%2\n\t" "beqz %0,1b\n" --- libc/sysdeps/mips/atomicity.h.llsc Thu Feb 7 08:50:14 2002 +++ libc/sysdeps/mips/atomicity.h Wed Feb 6 12:12:50 2002 @@ -75,11 +75,8 @@ compare_and_swap (volatile long int *p, ("/* Inline compare & swap */\n" "1:\n\t" "ll %1,%5\n\t" - ".set push\n\t" - ".set noreorder\n\t" + "move %0,$0\n\t" "bne %1,%3,2f\n\t" - " move %0,$0\n\t" - ".set pop\n\t" "move %0,%4\n\t" "sc %0,%2\n\t" "beqz %0,1b\n" --- libc/sysdeps/unix/sysv/linux/mips/sys/tas.h.llsc Thu Feb 7 08:50:15 2002 +++ libc/sysdeps/unix/sysv/linux/mips/sys/tas.h Wed Feb 6 12:12:50 2002 @@ -45,11 +45,8 @@ _test_and_set (int *p, int v) __THROW ("/* Inline test and set */\n" "1:\n\t" "ll %0,%3\n\t" - ".set push\n\t" - ".set noreorder\n\t" + "move %1,%4\n\t" "beq %0,%4,2f\n\t" - " move %1,%4\n\t" - ".set pop\n\t" "sc %1,%2\n\t" "beqz %1,1b\n" "2:\n\t" From owner-linux-mips@oss.sgi.com Thu Feb 7 10:46:30 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g17IkUR30167 for linux-mips-outgoing; Thu, 7 Feb 2002 10:46:30 -0800 Received: from mx.mips.com (mx.mips.com [206.31.31.226]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g17IkSA30161 for ; Thu, 7 Feb 2002 10:46:28 -0800 Received: from newman.mips.com (ns-dmz [206.31.31.225]) by mx.mips.com (8.9.3/8.9.0) with ESMTP id KAA20093 for ; Thu, 7 Feb 2002 10:46:20 -0800 (PST) Received: from copfs01.mips.com (copfs01 [192.168.205.101]) by newman.mips.com (8.9.3/8.9.0) with ESMTP id KAA18070 for ; Thu, 7 Feb 2002 10:46:20 -0800 (PST) Received: from copsun18.mips.com (copsun18 [192.168.205.28]) by copfs01.mips.com (8.11.4/8.9.0) with ESMTP id g17IjrA14142 for ; Thu, 7 Feb 2002 19:45:53 +0100 (MET) From: Hartvig Ekner Received: (from hartvige@localhost) by copsun18.mips.com (8.9.1/8.9.0) id TAA27734 for linux-mips@oss.sgi.com; Thu, 7 Feb 2002 19:46:17 +0100 (MET) Message-Id: <200202071846.TAA27734@copsun18.mips.com> Subject: madplay on MIPS To: linux-mips@oss.sgi.com Date: Thu, 7 Feb 2002 19:46:17 +0100 (MET) X-Mailer: ELM [version 2.5 PL1] MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-linux-mips@oss.sgi.com Precedence: bulk I seem to recall somebody asking about madplay mp3 player about a week ago. For what it's worth, we just ran mad-0.14.2b on our Malta board with the 2.4.3 kernel, and it works without a hitch (so far only LE tested). CPU utilization is around 25% of a 200 MHz CPU. The soundcard was a Creative SB card, based on the Ensoniq chip and using the es1371.c driver. /Hartvig -- _ _ _____ ____ Hartvig Ekner Mailto:hartvige@mips.com |\ /| | |____)(____ Direct: +45 4486 5503 | \/ | | | _____) MIPS Denmark Switch: +45 4486 5555 T E C H N O L O G I E S http://www.mips.com Fax...: +45 4486 5556 From owner-linux-mips@oss.sgi.com Thu Feb 7 10:59:16 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g17IxGi30705 for linux-mips-outgoing; Thu, 7 Feb 2002 10:59:16 -0800 Received: from hermes.mvista.com (gateway-1237.mvista.com [12.44.186.158]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g17IxDA30702 for ; Thu, 7 Feb 2002 10:59:13 -0800 Received: from zeus.mvista.com (zeus.mvista.com [10.0.0.112]) by hermes.mvista.com (8.11.0/8.11.0) with ESMTP id g17Iv0B16346; Thu, 7 Feb 2002 10:57:00 -0800 Subject: Re: madplay on MIPS From: Pete Popov To: Hartvig Ekner Cc: linux-mips In-Reply-To: <200202071846.TAA27734@copsun18.mips.com> References: <200202071846.TAA27734@copsun18.mips.com> Content-Type: text/plain Content-Transfer-Encoding: 7bit X-Mailer: Evolution/1.0.1 Date: 07 Feb 2002 11:00:39 -0800 Message-Id: <1013108440.2956.40.camel@zeus> Mime-Version: 1.0 Sender: owner-linux-mips@oss.sgi.com Precedence: bulk On Thu, 2002-02-07 at 10:46, Hartvig Ekner wrote: > I seem to recall somebody asking about madplay mp3 player about a week > ago. For what it's worth, we just ran mad-0.14.2b on our Malta board > with the 2.4.3 kernel, and it works without a hitch (so far only LE > tested). CPU utilization is around 25% of a 200 MHz CPU. > > The soundcard was a Creative SB card, based on the Ensoniq chip and > using the es1371.c driver. OK, thanks. I'll take a look at the es1371 driver. Pete From owner-linux-mips@oss.sgi.com Fri Feb 8 00:00:18 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g1880Iw21187 for linux-mips-outgoing; Fri, 8 Feb 2002 00:00:18 -0800 Received: from Cantor.suse.de (ns.suse.de [213.95.15.193]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g1880DA21183 for ; Fri, 8 Feb 2002 00:00:14 -0800 Received: from Hermes.suse.de (Hermes.suse.de [213.95.15.136]) by Cantor.suse.de (Postfix) with ESMTP id 581011E24B; Fri, 8 Feb 2002 09:00:07 +0100 (MET) X-Authentication-Warning: gee.suse.de: aj set sender to aj@suse.de using -f Mail-Copies-To: never To: "H . J . Lu" Cc: linux-mips@oss.sgi.com, GNU C Library Subject: Re: PATCH: Not use branch likely on mips References: <20020205180243.A11993@lucon.org> <20020207091327.B15331@lucon.org> From: Andreas Jaeger Date: Fri, 08 Feb 2002 09:00:02 +0100 In-Reply-To: <20020207091327.B15331@lucon.org> ("H . J . Lu"'s message of "Thu, 7 Feb 2002 09:13:27 -0800") Message-ID: Lines: 24 User-Agent: Gnus/5.090006 (Oort Gnus v0.06) XEmacs/21.4 (Artificial Intelligence, i386-suse-linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Sender: owner-linux-mips@oss.sgi.com Precedence: bulk "H . J . Lu" writes: > On Thu, Feb 07, 2002 at 11:38:09AM +0100, Andreas Jaeger wrote: >> "H . J . Lu" writes: >> >> > This patch removes branch likely. >> >> Please update the copyright years next time. >> >> I've committed the patch, >> > > Here is a new patch. I have checked in a gcc patch which makes > ".set noreorder" unnecessary even with "gcc -g". But what about current GCC releases? Does it work there also without problems? Andreas -- Andreas Jaeger SuSE Labs aj@suse.de private aj@arthur.inka.de http://www.suse.de/~aj From owner-linux-mips@oss.sgi.com Fri Feb 8 02:33:15 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g18AXFa25810 for linux-mips-outgoing; Fri, 8 Feb 2002 02:33:15 -0800 Received: from topsns.toshiba-tops.co.jp (topsns.toshiba-tops.co.jp [202.230.225.5]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g18AX3A25804 for ; Fri, 8 Feb 2002 02:33:03 -0800 Received: from inside-ms1.toshiba-tops.co.jp by topsns.toshiba-tops.co.jp via smtpd (for oss.sgi.com [216.32.174.27]) with SMTP; 8 Feb 2002 10:33:03 UT 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 58C3CB479 for ; Fri, 8 Feb 2002 19:33:01 +0900 (JST) Received: by srd2sd.toshiba-tops.co.jp (8.9.3/3.5Wbeta-srd2sd) with ESMTP id TAA32445; Fri, 8 Feb 2002 19:33:00 +0900 (JST) Date: Fri, 08 Feb 2002 19:37:31 +0900 (JST) Message-Id: <20020208.193731.48536791.nemoto@toshiba-tops.co.jp> To: linux-mips@oss.sgi.com Subject: gcc-2.96-99 optimization bug? From: Atsushi Nemoto X-Fingerprint: EC 9D B9 17 2E 89 D2 25 CE F5 5D 3D 12 29 2A AD X-Pgp-Public-Key: http://pgp.nic.ad.jp/cgi-bin/pgpsearchkey.pl?op=get&search=0xB6D728B1 Organization: TOSHIBA Personal Computer System Corporation X-Mailer: Mew version 2.1 on Emacs 20.7 / Mule 4.1 (AOI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-linux-mips@oss.sgi.com Precedence: bulk I found gcc 2.96 (gcc-2.96-99.1.mipsel.rpm in H.J.Lu's RedHat 7.1) outputs wrong code for this short program. int foo(unsigned long long a, unsigned long long b) { int as, bs; as = a >> 63; bs = b >> 63; if (as != bs) return as || !(b << 1); return (a == b) || as; } int main(int argc, char **argv) { return foo(0, 0xffffffffffffffffull); } This program must return 0. But compiling with -O2 it returns 1 !! # gcc -O -o foo foo.c;./foo;echo $? 0 # gcc -O2 -o foo foo.c;./foo;echo $? 1 Output wth -O -g are: 00400780 : 400780: 3c1c0fc0 lui gp,0xfc0 400784: 279c78b0 addiu gp,gp,30896 400788: 0399e021 addu gp,gp,t9 40078c: 00804021 move t0,a0 400790: 00a04821 move t1,a1 400794: 000917c2 srl v0,t1,0x1f 400798: 00402821 move a1,v0 40079c: 000717c2 srl v0,a3,0x1f 4007a0: 10a2000d beq a1,v0,4007d8 4007a4: 00001821 move v1,zero 4007a8: 14a00008 bnez a1,4007cc 4007ac: 00004021 move t0,zero 4007b0: 00071840 sll v1,a3,0x1 4007b4: 000627c2 srl a0,a2,0x1f 4007b8: 00641825 or v1,v1,a0 4007bc: 00061040 sll v0,a2,0x1 4007c0: 00621025 or v0,v1,v0 4007c4: 14400002 bnez v0,4007d0 4007c8: 00000000 nop 4007cc: 24080001 li t0,1 4007d0: 03e00008 jr ra 4007d4: 01001021 move v0,t0 4007d8: 15060003 bne t0,a2,4007e8 4007dc: 00001021 move v0,zero 4007e0: 11270003 beq t1,a3,4007f0 4007e4: 00000000 nop 4007e8: 10a00002 beqz a1,4007f4 4007ec: 00000000 nop 4007f0: 24020001 li v0,1 4007f4: 03e00008 jr ra 4007f8: 00000000 nop Output with -O2 -g are: 00400780 : 400780: 3c1c0fc0 lui gp,0xfc0 400784: 279c78b0 addiu gp,gp,30896 400788: 0399e021 addu gp,gp,t9 40078c: 00805021 move t2,a0 400790: 00c04021 move t0,a2 400794: 00a05821 move t3,a1 400798: 00e04821 move t1,a3 40079c: 000b17c2 srl v0,t3,0x1f 4007a0: 000927c2 srl a0,t1,0x1f 4007a4: 00001821 move v1,zero 4007a8: 1044000a beq v0,a0,4007d4 4007ac: 00002821 move a1,zero 4007b0: 14400006 bnez v0,4007cc 4007b4: 24050001 li a1,1 4007b8: 00091840 sll v1,t1,0x1 4007bc: 000827c2 srl a0,t0,0x1f 4007c0: 00641825 or v1,v1,a0 4007c4: 00081040 sll v0,t0,0x1 4007c8: 00621025 or v0,v1,v0 4007cc: 03e00008 jr ra 4007d0: 00a01021 move v0,a1 4007d4: 15480003 bne t2,t0,4007e4 4007d8: 00001821 move v1,zero 4007dc: 11690003 beq t3,t1,4007ec 4007e0: 00000000 nop 4007e4: 10400002 beqz v0,4007f0 4007e8: 00000000 nop 4007ec: 24030001 li v1,1 4007f0: 03e00008 jr ra 4007f4: 00601021 move v0,v1 It seems one 'bnez' in good code (at 4007c4) was lost in bad code. Is this a know problem? If so, is there any patches available? Thank you. --- Atsushi Nemoto From owner-linux-mips@oss.sgi.com Fri Feb 8 02:56:31 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g18AuVr27040 for linux-mips-outgoing; Fri, 8 Feb 2002 02:56:31 -0800 Received: from mail.ict.ac.cn ([159.226.39.4]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g18AuIA27035 for ; Fri, 8 Feb 2002 02:56:18 -0800 Message-Id: <200202081056.g18AuIA27035@oss.sgi.com> Received: (qmail 21926 invoked from network); 8 Feb 2002 10:57:19 -0000 Received: from unknown (HELO foxsen) (@159.226.40.150) by 159.226.39.4 with SMTP; 8 Feb 2002 10:57:19 -0000 Date: Fri, 8 Feb 2002 18:53:46 +0800 From: Zhang Fuxin To: Atsushi Nemoto CC: "linux-mips@oss.sgi.com" Subject: Re: gcc-2.96-99 optimization bug? X-mailer: FoxMail 3.11 Release [cn] Mime-Version: 1.0 Content-Type: text/plain; charset="GB2312" Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by oss.sgi.com id g18AuJA27037 Sender: owner-linux-mips@oss.sgi.com Precedence: bulk hi, it seems fixed in latest gcc (3.1). gcc 2.96 does produce wrong code for -O2, i posted another example one or two days ago. ÔÚ 2002-02-08 19:37:00 you wrote£º >I found gcc 2.96 (gcc-2.96-99.1.mipsel.rpm in H.J.Lu's RedHat 7.1) >outputs wrong code for this short program. > >int foo(unsigned long long a, unsigned long long b) >{ > int as, bs; > as = a >> 63; > bs = b >> 63; > if (as != bs) > return as || !(b << 1); > return (a == b) || as; >} > >int main(int argc, char **argv) >{ > return foo(0, 0xffffffffffffffffull); >} > >This program must return 0. But compiling with -O2 it returns 1 !! > ># gcc -O -o foo foo.c;./foo;echo $? >0 ># gcc -O2 -o foo foo.c;./foo;echo $? >1 > >Output wth -O -g are: > >00400780 : > 400780: 3c1c0fc0 lui gp,0xfc0 > 400784: 279c78b0 addiu gp,gp,30896 > 400788: 0399e021 addu gp,gp,t9 > 40078c: 00804021 move t0,a0 > 400790: 00a04821 move t1,a1 > 400794: 000917c2 srl v0,t1,0x1f > 400798: 00402821 move a1,v0 > 40079c: 000717c2 srl v0,a3,0x1f > 4007a0: 10a2000d beq a1,v0,4007d8 > 4007a4: 00001821 move v1,zero > 4007a8: 14a00008 bnez a1,4007cc > 4007ac: 00004021 move t0,zero > 4007b0: 00071840 sll v1,a3,0x1 > 4007b4: 000627c2 srl a0,a2,0x1f > 4007b8: 00641825 or v1,v1,a0 > 4007bc: 00061040 sll v0,a2,0x1 > 4007c0: 00621025 or v0,v1,v0 > 4007c4: 14400002 bnez v0,4007d0 > 4007c8: 00000000 nop > 4007cc: 24080001 li t0,1 > 4007d0: 03e00008 jr ra > 4007d4: 01001021 move v0,t0 > 4007d8: 15060003 bne t0,a2,4007e8 > 4007dc: 00001021 move v0,zero > 4007e0: 11270003 beq t1,a3,4007f0 > 4007e4: 00000000 nop > 4007e8: 10a00002 beqz a1,4007f4 > 4007ec: 00000000 nop > 4007f0: 24020001 li v0,1 > 4007f4: 03e00008 jr ra > 4007f8: 00000000 nop > >Output with -O2 -g are: > >00400780 : > 400780: 3c1c0fc0 lui gp,0xfc0 > 400784: 279c78b0 addiu gp,gp,30896 > 400788: 0399e021 addu gp,gp,t9 > 40078c: 00805021 move t2,a0 > 400790: 00c04021 move t0,a2 > 400794: 00a05821 move t3,a1 > 400798: 00e04821 move t1,a3 > 40079c: 000b17c2 srl v0,t3,0x1f > 4007a0: 000927c2 srl a0,t1,0x1f > 4007a4: 00001821 move v1,zero > 4007a8: 1044000a beq v0,a0,4007d4 > 4007ac: 00002821 move a1,zero > 4007b0: 14400006 bnez v0,4007cc > 4007b4: 24050001 li a1,1 > 4007b8: 00091840 sll v1,t1,0x1 > 4007bc: 000827c2 srl a0,t0,0x1f > 4007c0: 00641825 or v1,v1,a0 > 4007c4: 00081040 sll v0,t0,0x1 > 4007c8: 00621025 or v0,v1,v0 > 4007cc: 03e00008 jr ra > 4007d0: 00a01021 move v0,a1 > 4007d4: 15480003 bne t2,t0,4007e4 > 4007d8: 00001821 move v1,zero > 4007dc: 11690003 beq t3,t1,4007ec > 4007e0: 00000000 nop > 4007e4: 10400002 beqz v0,4007f0 > 4007e8: 00000000 nop > 4007ec: 24030001 li v1,1 > 4007f0: 03e00008 jr ra > 4007f4: 00601021 move v0,v1 > > >It seems one 'bnez' in good code (at 4007c4) was lost in bad code. > >Is this a know problem? If so, is there any patches available? > >Thank you. >--- >Atsushi Nemoto Regards Zhang Fuxin fxzhang@ict.ac.cn From owner-linux-mips@oss.sgi.com Fri Feb 8 04:05:19 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g18C5JM29185 for linux-mips-outgoing; Fri, 8 Feb 2002 04:05:19 -0800 Received: from delta.ds2.pg.gda.pl (macro@delta.ds2.pg.gda.pl [213.192.72.1]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g18C5DA29182 for ; Fri, 8 Feb 2002 04:05:13 -0800 Received: from localhost by delta.ds2.pg.gda.pl (8.9.3/8.9.3) with SMTP id NAA09027; Fri, 8 Feb 2002 13:03:41 +0100 (MET) Date: Fri, 8 Feb 2002 13:03:40 +0100 (MET) From: "Maciej W. Rozycki" To: Andreas Jaeger cc: "H . J . Lu" , linux-mips@oss.sgi.com, GNU C Library Subject: Re: PATCH: Not use branch likely on mips In-Reply-To: Message-ID: Organization: Technical University of Gdansk MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-linux-mips@oss.sgi.com Precedence: bulk On Fri, 8 Feb 2002, Andreas Jaeger wrote: > > Here is a new patch. I have checked in a gcc patch which makes > > ".set noreorder" unnecessary even with "gcc -g". > > But what about current GCC releases? Does it work there also without > problems? At worst you lose a few cycles for superfluous nops. -- + Maciej W. Rozycki, Technical University of Gdansk, Poland + +--------------------------------------------------------------+ + e-mail: macro@ds2.pg.gda.pl, PGP key available + From owner-linux-mips@oss.sgi.com Fri Feb 8 05:40:47 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g18Del131478 for linux-mips-outgoing; Fri, 8 Feb 2002 05:40:47 -0800 Received: from noose.gt.owl.de (postfix@noose.gt.owl.de [62.52.19.4]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g18DeZA31470; Fri, 8 Feb 2002 05:40:36 -0800 Received: by noose.gt.owl.de (Postfix, from userid 10) id 12B39853; Fri, 8 Feb 2002 14:40:13 +0100 (CET) Received: by paradigm.rfc822.org (Postfix, from userid 1000) id 3773D3FB4; Fri, 8 Feb 2002 14:39:38 +0100 (CET) Date: Fri, 8 Feb 2002 14:39:38 +0100 From: Florian Lohoff To: linux-mips@oss.sgi.com Cc: ralf@oss.sgi.com Subject: [PATCH] endianess in /proc/cpuinfo Message-ID: <20020208133938.GA29298@paradigm.rfc822.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="M9NhX3UHpAaciwkO" Content-Disposition: inline User-Agent: Mutt/1.3.25i Organization: rfc822 - pure communication Sender: owner-linux-mips@oss.sgi.com Precedence: bulk --M9NhX3UHpAaciwkO Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable As Ralf also suffers the LTPDS* this is a resend of the needed patch. Index: arch/mips/arc/identify.c =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RCS file: /cvs/linux/arch/mips/arc/identify.c,v retrieving revision 1.5.2.1 diff -u -r1.5.2.1 identify.c --- arch/mips/arc/identify.c 2001/12/12 13:45:57 1.5.2.1 +++ arch/mips/arc/identify.c 2001/12/13 18:00:04 @@ -26,7 +26,7 @@ =20 static struct smatch mach_table[] =3D { { "SGI-IP22", - "SGI Indy", + "SGI ", MACH_GROUP_SGI, MACH_SGI_INDY, PROM_FLAG_ARCS Flo * Linux Thorvalds Patch Drop Syndrom --=20 Florian Lohoff flo@rfc822.org +49-5201-669912 Nine nineth on september the 9th Welcome to the new billenium --M9NhX3UHpAaciwkO Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.6 (GNU/Linux) Comment: For info see http://www.gnupg.org iD8DBQE8Y9UaUaz2rXW+gJcRAmMBAJ9mWVmrl8uyrff4loZs33FTRjrDjQCfWkbV WxyKx27gVAhaMdMMpaGSAAI= =8E/3 -----END PGP SIGNATURE----- --M9NhX3UHpAaciwkO-- From owner-linux-mips@oss.sgi.com Fri Feb 8 05:40:56 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g18Deui31505 for linux-mips-outgoing; Fri, 8 Feb 2002 05:40:56 -0800 Received: from noose.gt.owl.de (postfix@noose.gt.owl.de [62.52.19.4]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g18DeZA31471; Fri, 8 Feb 2002 05:40:36 -0800 Received: by noose.gt.owl.de (Postfix, from userid 10) id 2A08D859; Fri, 8 Feb 2002 14:40:13 +0100 (CET) Received: by paradigm.rfc822.org (Postfix, from userid 1000) id 96FD03FB4; Fri, 8 Feb 2002 14:40:23 +0100 (CET) Date: Fri, 8 Feb 2002 14:40:23 +0100 From: Florian Lohoff To: linux-mips@oss.sgi.com Cc: ralf@oss.sgi.com Subject: [PATCH] /proc/cpuinfo endianess Message-ID: <20020208134023.GB29298@paradigm.rfc822.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="CdrF4e02JqNVZeln" Content-Disposition: inline User-Agent: Mutt/1.3.25i Organization: rfc822 - pure communication Sender: owner-linux-mips@oss.sgi.com Precedence: bulk --CdrF4e02JqNVZeln Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Again a LTPDS solution: Index: arch/mips/kernel/proc.c =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RCS file: /cvs/linux/arch/mips/kernel/proc.c,v retrieving revision 1.27.2.6 diff -u -r1.27.2.6 proc.c --- arch/mips/kernel/proc.c 2002/01/07 01:16:33 1.27.2.6 +++ arch/mips/kernel/proc.c 2002/02/08 13:37:18 @@ -97,6 +97,11 @@ seq_printf(m, "BogoMIPS\t\t: %lu.%02lu\n", loops_per_jiffy / (500000/HZ), (loops_per_jiffy / (5000/HZ)) % 100); +#ifdef __MIPSEB__ + seq_printf(m, "byteorder\t\t: big endian\n"); +#else + seq_printf(m, "byteorder\t\t: little endian\n"); +#endif seq_printf(m, "wait instruction\t: %s\n", cpu_wait ? "yes" : "no"); seq_printf(m, "microsecond timers\t: %s\n", (mips_cpu.options & MIPS_CPU_COUNTER) ? "yes" : "no"); Flo --=20 Florian Lohoff flo@rfc822.org +49-5201-669912 Nine nineth on september the 9th Welcome to the new billenium --CdrF4e02JqNVZeln Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.6 (GNU/Linux) Comment: For info see http://www.gnupg.org iD8DBQE8Y9VHUaz2rXW+gJcRAivqAKCgpv1mKbIZ7AxE747a6D2L4z8R0gCfeLRo 6Q1V4AihstNEHDD+imm0h1g= =mtj2 -----END PGP SIGNATURE----- --CdrF4e02JqNVZeln-- From owner-linux-mips@oss.sgi.com Fri Feb 8 07:34:10 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g18FYAp01127 for linux-mips-outgoing; Fri, 8 Feb 2002 07:34:10 -0800 Received: from real.realitydiluted.com (real.realitydiluted.com [208.242.241.164]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g18FY3A01123 for ; Fri, 8 Feb 2002 07:34:03 -0800 Received: from sjhill by real.realitydiluted.com with local (Exim 3.22 #1 (Red Hat Linux)) id 16ZD2B-0003iv-00 for ; Fri, 08 Feb 2002 09:33:55 -0600 To: linux-mips@oss.sgi.com Subject: [PATCH] Removal of warning messages for gdb-stub.c Message-Id: From: "Steven J. Hill" Date: Fri, 08 Feb 2002 09:33:55 -0600 Sender: owner-linux-mips@oss.sgi.com Precedence: bulk Just more clean ups. I tested it, it works. -Steve diff -urN -X cvs-exc.txt mipslinux-2.4.17-xfs/arch/mips/kernel/gdb-stub.c settop/arch/mips/kernel/gdb-stub.c --- mipslinux-2.4.17-xfs/arch/mips/kernel/gdb-stub.c Thu Nov 29 09:13:08 2001 +++ settop/arch/mips/kernel/gdb-stub.c Fri Feb 8 09:14:52 2002 @@ -306,7 +306,7 @@ unsigned char ch; while (count-- > 0) { - if (kgdb_read_byte(mem++, &ch) != 0) + if (kgdb_read_byte((unsigned *) mem++, (unsigned *) &ch) != 0) return 0; *buf++ = hexchars[ch >> 4]; *buf++ = hexchars[ch & 0xf]; @@ -332,7 +332,7 @@ { ch = hex(*buf++) << 4; ch |= hex(*buf++); - if (kgdb_write_byte(ch, mem++) != 0) + if (kgdb_write_byte((unsigned) ch, (unsigned *) mem++) != 0) return 0; } @@ -902,23 +902,21 @@ if (!initialized) return; - __asm__ __volatile__(" - .globl breakinst - .set noreorder - nop -breakinst: break - nop - .set reorder - "); + __asm__ __volatile__( + ".globl\tbreakinst\n\t" + ".set\tnoreorder\n\t" + "nop\n\t" + "breakinst:\tbreak\n\t" + "nop\n\t" + ".set\treorder\n\t"); } void adel(void) { - __asm__ __volatile__(" - .globl adel - la $8,0x80000001 - lw $9,0($8) - "); + __asm__ __volatile__( + ".globl\tadel\n\t" + "la\t$8,0x80000001\n\t" + "lw\t$9,0($8)\n\t"); } #ifdef CONFIG_GDB_CONSOLE From owner-linux-mips@oss.sgi.com Fri Feb 8 08:16:54 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g18GGs704840 for linux-mips-outgoing; Fri, 8 Feb 2002 08:16:54 -0800 Received: from mail.sonytel.be (mail.sonytel.be [193.74.243.200]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g18GGkA04835 for ; Fri, 8 Feb 2002 08:16:47 -0800 Received: from vervain.sonytel.be (mail.sonytel.be [10.17.0.26]) by mail.sonytel.be (8.9.0/8.8.6) with ESMTP id RAA21330; Fri, 8 Feb 2002 17:15:59 +0100 (MET) Date: Fri, 8 Feb 2002 17:16:00 +0100 (MET) From: Geert Uytterhoeven To: "Steven J. Hill" cc: Linux/MIPS Development Subject: Re: [PATCH] Removal of warning messages for gdb-stub.c In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-linux-mips@oss.sgi.com Precedence: bulk On Fri, 8 Feb 2002, Steven J. Hill wrote: > Just more clean ups. I tested it, it works. > > -Steve > > diff -urN -X cvs-exc.txt mipslinux-2.4.17-xfs/arch/mips/kernel/gdb-stub.c settop/arch/mips/kernel/gdb-stub.c > --- mipslinux-2.4.17-xfs/arch/mips/kernel/gdb-stub.c Thu Nov 29 09:13:08 2001 > +++ settop/arch/mips/kernel/gdb-stub.c Fri Feb 8 09:14:52 2002 > @@ -306,7 +306,7 @@ > unsigned char ch; > > while (count-- > 0) { > - if (kgdb_read_byte(mem++, &ch) != 0) > + if (kgdb_read_byte((unsigned *) mem++, (unsigned *) &ch) != 0) > return 0; > *buf++ = hexchars[ch >> 4]; > *buf++ = hexchars[ch & 0xf]; > @@ -332,7 +332,7 @@ > { > ch = hex(*buf++) << 4; > ch |= hex(*buf++); > - if (kgdb_write_byte(ch, mem++) != 0) > + if (kgdb_write_byte((unsigned) ch, (unsigned *) mem++) != 0) > return 0; > } > Wouldn't it be better to change the prototypes | int kgdb_read_byte(unsigned *address, unsigned *dest); | int kgdb_write_byte(unsigned val, unsigned *dest); instead? If these routines work on bytes, why have them taking unsigned (wasn't plain `unsigned' deprecated in some recent C standard?) parameters instead of char parameters? 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 owner-linux-mips@oss.sgi.com Fri Feb 8 08:16:57 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g18GGvj04853 for linux-mips-outgoing; Fri, 8 Feb 2002 08:16:57 -0800 Received: from Cantor.suse.de (ns.suse.de [213.95.15.193]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g18GGrA04839 for ; Fri, 8 Feb 2002 08:16:54 -0800 Received: from Hermes.suse.de (Hermes.suse.de [213.95.15.136]) by Cantor.suse.de (Postfix) with ESMTP id 248B21E9B8; Fri, 8 Feb 2002 17:15:46 +0100 (MET) X-Authentication-Warning: gee.suse.de: aj set sender to aj@suse.de using -f Mail-Copies-To: never To: "H . J . Lu" Cc: linux-mips@oss.sgi.com, GNU C Library Subject: Re: PATCH: Not use branch likely on mips References: <20020205180243.A11993@lucon.org> <20020207091327.B15331@lucon.org> From: Andreas Jaeger Date: Fri, 08 Feb 2002 17:15:45 +0100 In-Reply-To: <20020207091327.B15331@lucon.org> ("H . J . Lu"'s message of "Thu, 7 Feb 2002 09:13:27 -0800") Message-ID: Lines: 25 User-Agent: Gnus/5.090006 (Oort Gnus v0.06) XEmacs/21.4 (Artificial Intelligence, i386-suse-linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Sender: owner-linux-mips@oss.sgi.com Precedence: bulk "H . J . Lu" writes: > On Thu, Feb 07, 2002 at 11:38:09AM +0100, Andreas Jaeger wrote: >> "H . J . Lu" writes: >> >> > This patch removes branch likely. >> >> Please update the copyright years next time. >> >> I've committed the patch, >> > > Here is a new patch. I have checked in a gcc patch which makes > ".set noreorder" unnecessary even with "gcc -g". > > Thanks. Thanks, committed, Andreas -- Andreas Jaeger SuSE Labs aj@suse.de private aj@arthur.inka.de http://www.suse.de/~aj From owner-linux-mips@oss.sgi.com Fri Feb 8 09:28:31 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g18HSVx05842 for linux-mips-outgoing; Fri, 8 Feb 2002 09:28:31 -0800 Received: from mail.gmx.net (sproxy.gmx.de [213.165.64.20]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g18HS5A05837 for ; Fri, 8 Feb 2002 09:28:06 -0800 Received: (qmail 16460 invoked by uid 0); 8 Feb 2002 17:27:58 -0000 Received: from pd9e41821.dip.t-dialin.net (HELO bogon.ms20.nix) (217.228.24.33) by mail.gmx.net (mp011-rz3) with SMTP; 8 Feb 2002 17:27:58 -0000 Received: by bogon.ms20.nix (Postfix, from userid 1000) id 936B036BDC; Fri, 8 Feb 2002 18:27:11 +0100 (CET) Date: Fri, 8 Feb 2002 18:27:11 +0100 From: Guido Guenther To: linux-mips@oss.sgi.com Cc: ralf@oss.sgi.com Subject: ip22 watchdog timer Message-ID: <20020208172711.GA5605@bogon.ms20.nix> Mail-Followup-To: linux-mips@oss.sgi.com, ralf@oss.sgi.com Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="y0ulUmNC+osPPQO6" Content-Disposition: inline User-Agent: Mutt/1.3.27i Sender: owner-linux-mips@oss.sgi.com Precedence: bulk --y0ulUmNC+osPPQO6 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Hi, attached is an updated patch for the ip22 watchdog timer. Please apply. -- Guido --y0ulUmNC+osPPQO6 Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="indydog-2001-02-08.diff" diff -Naur kernel-source-2.4.17.clean/Documentation/Configure.help kernel-source-2.4.17/Documentation/Configure.help --- kernel-source-2.4.17.clean/Documentation/Configure.help Wed Mar 26 05:57:18 2003 +++ kernel-source-2.4.17/Documentation/Configure.help Wed Mar 26 18:50:52 2003 @@ -3129,6 +3129,13 @@ via the file /proc/rtc and its behaviour is set by various ioctls on /dev/rtc. +Indy/I2 Hardware Watchdog +CONFIG_INDYDOG + Hardwaredriver for the Indy's/I2's watchdog. This is a + watchdog timer that will reboot the machine after a 60 second + timer expired and no process has written to /dev/watchdog during + that time. + Support the Bell Technologies HUB6 card CONFIG_HUB6 Say Y here to enable support in the dumb serial driver to support diff -Naur kernel-source-2.4.17.clean/arch/mips/config.in kernel-source-2.4.17/arch/mips/config.in --- kernel-source-2.4.17.clean/arch/mips/config.in Wed Mar 26 05:57:19 2003 +++ kernel-source-2.4.17/arch/mips/config.in Wed Mar 26 19:03:33 2003 @@ -574,6 +574,11 @@ fi # we always need the dummy console to make the serial console I2 happy define_bool CONFIG_DUMMY_CONSOLE y + bool 'Watchdog Timer Support' CONFIG_WATCHDOG + if [ "$CONFIG_WATCHDOG" != "n" ]; then + bool ' Disable watchdog shutdown on close' CONFIG_WATCHDOG_NOWAYOUT + tristate ' Indy/I2 Hardware Watchdog' CONFIG_INDYDOG + fi endmenu fi diff -Naur kernel-source-2.4.17.clean/arch/mips/sgi-ip22/ip22-mc.c kernel-source-2.4.17/arch/mips/sgi-ip22/ip22-mc.c --- kernel-source-2.4.17.clean/arch/mips/sgi-ip22/ip22-mc.c Wed Mar 26 05:57:28 2003 +++ kernel-source-2.4.17/arch/mips/sgi-ip22/ip22-mc.c Wed Mar 26 18:38:55 2003 @@ -82,6 +82,14 @@ * interrupts are first enabled etc. */ + /* Step 0: Make sure we turn off the watchdog in case it's + * still running (which might be the case after a + * soft reboot). + */ + tmpreg = mcmisc_regs->cpuctrl0; + tmpreg &= ~SGIMC_CCTRL0_WDOG; + mcmisc_regs->cpuctrl0 = tmpreg; + /* Step 1: The CPU/GIO error status registers will not latch * up a new error status until the register has been * cleared by the cpu. These status registers are diff -Naur kernel-source-2.4.17.clean/drivers/char/Makefile kernel-source-2.4.17/drivers/char/Makefile --- kernel-source-2.4.17.clean/drivers/char/Makefile Wed Mar 26 05:57:32 2003 +++ kernel-source-2.4.17/drivers/char/Makefile Wed Mar 26 18:38:47 2003 @@ -245,6 +245,7 @@ obj-$(CONFIG_SH_WDT) += shwdt.o obj-$(CONFIG_EUROTECH_WDT) += eurotechwdt.o obj-$(CONFIG_SOFT_WATCHDOG) += softdog.o +obj-$(CONFIG_INDYDOG) += indydog.o subdir-$(CONFIG_MWAVE) += mwave ifeq ($(CONFIG_MWAVE),y) diff -Naur kernel-source-2.4.17.clean/drivers/char/indydog.c kernel-source-2.4.17/drivers/char/indydog.c --- kernel-source-2.4.17.clean/drivers/char/indydog.c Thu Jan 1 01:00:00 1970 +++ kernel-source-2.4.17/drivers/char/indydog.c Wed Mar 26 20:33:59 2003 @@ -0,0 +1,158 @@ +/* + * IndyDog 0.0.2 A Hardware Watchdog Device for SGI IP22 + * + * (c) Copyright 2001 Guido Guenther , 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. + * + * based on softdog.c by Alan Cox + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +static int indydog_alive; +static struct sgimc_misc_ctrl *mcmisc_regs; + +static void indydog_ping() +{ + mcmisc_regs->watchdogt = 0; +} + + +/* + * Allow only one person to hold it open + */ + +static int indydog_open(struct inode *inode, struct file *file) +{ + u32 mc_ctrl0; + + if(indydog_alive) + return -EBUSY; +#ifdef CONFIG_WATCHDOG_NOWAYOUT + MOD_INC_USE_COUNT; +#endif + /* + * Activate timer + */ + mcmisc_regs = (struct sgimc_misc_ctrl *)(KSEG1+0x1fa00000); + + mc_ctrl0 = mcmisc_regs->cpuctrl0 | SGIMC_CCTRL0_WDOG; + mcmisc_regs->cpuctrl0 = mc_ctrl0; + indydog_ping(); + + indydog_alive=1; + printk("Started watchdog timer.\n"); + return 0; +} + +static int indydog_release(struct inode *inode, struct file *file) +{ + /* + * Shut off the timer. + * Lock it in if it's a module and we defined ...NOWAYOUT + */ + lock_kernel(); +#ifndef CONFIG_WATCHDOG_NOWAYOUT + { + u32 mc_ctrl0 = mcmisc_regs->cpuctrl0; + mc_ctrl0 &= ~SGIMC_CCTRL0_WDOG; + mcmisc_regs->cpuctrl0 = mc_ctrl0; + printk("Stopped watchdog timer.\n"); + } +#endif + indydog_alive=0; + unlock_kernel(); + return 0; +} + +static ssize_t indydog_write(struct file *file, const char *data, size_t len, loff_t *ppos) +{ + /* Can't seek (pwrite) on this device */ + if (ppos != &file->f_pos) + return -ESPIPE; + + /* + * Refresh the timer. + */ + if(len) { + indydog_ping(); + return 1; + } + return 0; +} + +static int indydog_ioctl(struct inode *inode, struct file *file, + unsigned int cmd, unsigned long arg) +{ + static struct watchdog_info ident = { + identity: "Hardware Watchdog for SGI IP22", + }; + switch (cmd) { + default: + return -ENOIOCTLCMD; + case WDIOC_GETSUPPORT: + if(copy_to_user((struct watchdog_info *)arg, &ident, sizeof(ident))) + return -EFAULT; + return 0; + case WDIOC_GETSTATUS: + case WDIOC_GETBOOTSTATUS: + return put_user(0,(int *)arg); + case WDIOC_KEEPALIVE: + indydog_ping(); + return 0; + } +} + +static struct file_operations indydog_fops = { + owner: THIS_MODULE, + write: indydog_write, + ioctl: indydog_ioctl, + open: indydog_open, + release: indydog_release, +}; + +static struct miscdevice indydog_miscdev = { + minor: WATCHDOG_MINOR, + name: "watchdog", + fops: &indydog_fops, +}; + +static const char banner[] __initdata = KERN_INFO "Hardware Watchdog Timer for SGI IP22: 0.0.2\n"; + +static int __init watchdog_init(void) +{ + int ret; + + ret = misc_register(&indydog_miscdev); + + if (ret) + return ret; + + printk(banner); + + return 0; +} + +static void __exit watchdog_exit(void) +{ + misc_deregister(&indydog_miscdev); +} + +module_init(watchdog_init); +module_exit(watchdog_exit); +MODULE_LICENSE("GPL"); --y0ulUmNC+osPPQO6-- From owner-linux-mips@oss.sgi.com Fri Feb 8 09:42:39 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g18HgdV06130 for linux-mips-outgoing; Fri, 8 Feb 2002 09:42:39 -0800 Received: from nevyn.them.org (mail@NEVYN.RES.CMU.EDU [128.2.145.6]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g18HgXA06126 for ; Fri, 8 Feb 2002 09:42:33 -0800 Received: from drow by nevyn.them.org with local (Exim 3.34 #1 (Debian)) id 16ZF2Y-0006Lq-00; Fri, 08 Feb 2002 12:42:26 -0500 Date: Fri, 8 Feb 2002 12:42:26 -0500 From: Daniel Jacobowitz To: Geert Uytterhoeven Cc: "Steven J. Hill" , Linux/MIPS Development Subject: Re: [PATCH] Removal of warning messages for gdb-stub.c Message-ID: <20020208124226.A24322@nevyn.them.org> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.3.23i Sender: owner-linux-mips@oss.sgi.com Precedence: bulk On Fri, Feb 08, 2002 at 05:16:00PM +0100, Geert Uytterhoeven wrote: > On Fri, 8 Feb 2002, Steven J. Hill wrote: > > Just more clean ups. I tested it, it works. > > > > -Steve > > > > diff -urN -X cvs-exc.txt mipslinux-2.4.17-xfs/arch/mips/kernel/gdb-stub.c settop/arch/mips/kernel/gdb-stub.c > > --- mipslinux-2.4.17-xfs/arch/mips/kernel/gdb-stub.c Thu Nov 29 09:13:08 2001 > > +++ settop/arch/mips/kernel/gdb-stub.c Fri Feb 8 09:14:52 2002 > > @@ -306,7 +306,7 @@ > > unsigned char ch; > > > > while (count-- > 0) { > > - if (kgdb_read_byte(mem++, &ch) != 0) > > + if (kgdb_read_byte((unsigned *) mem++, (unsigned *) &ch) != 0) > > return 0; > > *buf++ = hexchars[ch >> 4]; > > *buf++ = hexchars[ch & 0xf]; > > @@ -332,7 +332,7 @@ > > { > > ch = hex(*buf++) << 4; > > ch |= hex(*buf++); > > - if (kgdb_write_byte(ch, mem++) != 0) > > + if (kgdb_write_byte((unsigned) ch, (unsigned *) mem++) != 0) > > return 0; > > } > > > > Wouldn't it be better to change the prototypes > > | int kgdb_read_byte(unsigned *address, unsigned *dest); > | int kgdb_write_byte(unsigned val, unsigned *dest); > > instead? > > If these routines work on bytes, why have them taking unsigned (wasn't plain > `unsigned' deprecated in some recent C standard?) parameters instead of char > parameters? Because Ralf dropped one of my patches, or messed up a merge, or more likely I simply sent him a bad patch. My working directory from when I remember writing those functions says unsigned char... -- Daniel Jacobowitz Carnegie Mellon University MontaVista Software Debian GNU/Linux Developer From owner-linux-mips@oss.sgi.com Fri Feb 8 10:30:51 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g18IUpu06839 for linux-mips-outgoing; Fri, 8 Feb 2002 10:30:51 -0800 Received: from ocean.lucon.org (12-234-19-19.client.attbi.com [12.234.19.19]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g18IUmA06836 for ; Fri, 8 Feb 2002 10:30:49 -0800 Received: by ocean.lucon.org (Postfix, from userid 1000) id 5EA31125C8; Fri, 8 Feb 2002 10:30:47 -0800 (PST) Date: Fri, 8 Feb 2002 10:30:47 -0800 From: "H . J . Lu" To: Atsushi Nemoto Cc: linux-mips@oss.sgi.com Subject: Re: gcc-2.96-99 optimization bug? Message-ID: <20020208103047.A6079@lucon.org> References: <20020208.193731.48536791.nemoto@toshiba-tops.co.jp> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <20020208.193731.48536791.nemoto@toshiba-tops.co.jp>; from nemoto@toshiba-tops.co.jp on Fri, Feb 08, 2002 at 07:37:31PM +0900 Sender: owner-linux-mips@oss.sgi.com Precedence: bulk On Fri, Feb 08, 2002 at 07:37:31PM +0900, Atsushi Nemoto wrote: > I found gcc 2.96 (gcc-2.96-99.1.mipsel.rpm in H.J.Lu's RedHat 7.1) > outputs wrong code for this short program. > > It seems one 'bnez' in good code (at 4007c4) was lost in bad code. > > Is this a know problem? If so, is there any patches available? > gcc 3.1 seems fine. No one is working on gcc 2.96. I am working on a new Linuxx/mips which will use gcc 3.1. H.J. From owner-linux-mips@oss.sgi.com Fri Feb 8 14:04:48 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g18M4mr11612 for linux-mips-outgoing; Fri, 8 Feb 2002 14:04:48 -0800 Received: from noose.gt.owl.de (postfix@noose.gt.owl.de [62.52.19.4]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g18M4gA11609 for ; Fri, 8 Feb 2002 14:04:42 -0800 Received: by noose.gt.owl.de (Postfix, from userid 10) id 2F92284B; Fri, 8 Feb 2002 23:04:22 +0100 (CET) Received: by paradigm.rfc822.org (Postfix, from userid 1000) id 61B8F4162; Fri, 8 Feb 2002 22:58:51 +0100 (CET) Date: Fri, 8 Feb 2002 22:58:51 +0100 From: Florian Lohoff To: linux-mips@oss.sgi.com Subject: gdb disassemble bug Message-ID: <20020208215851.GA18416@paradigm.rfc822.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="sm4nu43k4a2Rpi4c" Content-Disposition: inline User-Agent: Mutt/1.3.27i Organization: rfc822 - pure communication Sender: owner-linux-mips@oss.sgi.com Precedence: bulk --sm4nu43k4a2Rpi4c Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi, while debugging arcboot and some interesting crashes related to caching etc i found a disassemble bug in gdb=20 0x88166b58 : mtc0 zero,gp 0x88166b5c : nop 0x88166b60 : mtc0 zero,sp 0x88166b64 : nop mtc0/mfc0 do not address cpu registers but CP0 registers. The decoding as "gp" or "sp" is not correct. These are "TagLo" and "TagHi". If somebody has an idea why the kernel crashes when writing to TagHi - Speak up ... This only seems to happen sometimes not always. Flo --=20 Florian Lohoff flo@rfc822.org +49-5201-669912 Nine nineth on september the 9th Welcome to the new billenium --sm4nu43k4a2Rpi4c Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.6 (GNU/Linux) Comment: For info see http://www.gnupg.org iD8DBQE8ZEobUaz2rXW+gJcRAqOBAKDAWzd1m5if/pBuuxQIwTsg0IqMmgCgmiB+ 4/jAlCVlpDoUnYy9s259UIM= =nn3I -----END PGP SIGNATURE----- --sm4nu43k4a2Rpi4c-- From owner-linux-mips@oss.sgi.com Fri Feb 8 14:11:21 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g18MBLO11735 for linux-mips-outgoing; Fri, 8 Feb 2002 14:11:21 -0800 Received: from nevyn.them.org (mail@NEVYN.RES.CMU.EDU [128.2.145.6]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g18MBIA11731 for ; Fri, 8 Feb 2002 14:11:18 -0800 Received: from drow by nevyn.them.org with local (Exim 3.34 #1 (Debian)) id 16ZJEJ-0000Uy-00; Fri, 08 Feb 2002 17:10:51 -0500 Date: Fri, 8 Feb 2002 17:10:51 -0500 From: Daniel Jacobowitz To: Florian Lohoff Cc: linux-mips@oss.sgi.com Subject: Re: gdb disassemble bug Message-ID: <20020208171051.A1829@nevyn.them.org> References: <20020208215851.GA18416@paradigm.rfc822.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20020208215851.GA18416@paradigm.rfc822.org> User-Agent: Mutt/1.3.23i Sender: owner-linux-mips@oss.sgi.com Precedence: bulk On Fri, Feb 08, 2002 at 10:58:51PM +0100, Florian Lohoff wrote: > > Hi, > while debugging arcboot and some interesting crashes related to caching > etc i found a disassemble bug in gdb > > 0x88166b58 : mtc0 zero,gp > 0x88166b5c : nop > 0x88166b60 : mtc0 zero,sp > 0x88166b64 : nop > > mtc0/mfc0 do not address cpu registers but CP0 registers. The decoding > as "gp" or "sp" is not correct. These are "TagLo" and "TagHi". - what version of GDB? - does objdump do the same thing? -- Daniel Jacobowitz Carnegie Mellon University MontaVista Software Debian GNU/Linux Developer From owner-linux-mips@oss.sgi.com Fri Feb 8 14:19:07 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g18MJ7q11874 for linux-mips-outgoing; Fri, 8 Feb 2002 14:19:07 -0800 Received: from noose.gt.owl.de (postfix@noose.gt.owl.de [62.52.19.4]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g18MIxA11870 for ; Fri, 8 Feb 2002 14:18:59 -0800 Received: by noose.gt.owl.de (Postfix, from userid 10) id 9078B84B; Fri, 8 Feb 2002 23:18:39 +0100 (CET) Received: by paradigm.rfc822.org (Postfix, from userid 1000) id 93AA94162; Fri, 8 Feb 2002 23:18:49 +0100 (CET) Date: Fri, 8 Feb 2002 23:18:49 +0100 From: Florian Lohoff To: Daniel Jacobowitz Cc: linux-mips@oss.sgi.com Subject: Re: gdb disassemble bug Message-ID: <20020208221849.GA18922@paradigm.rfc822.org> References: <20020208215851.GA18416@paradigm.rfc822.org> <20020208171051.A1829@nevyn.them.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="EeQfGwPcQSOJBaQU" Content-Disposition: inline In-Reply-To: <20020208171051.A1829@nevyn.them.org> User-Agent: Mutt/1.3.27i Organization: rfc822 - pure communication Sender: owner-linux-mips@oss.sgi.com Precedence: bulk --EeQfGwPcQSOJBaQU Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Feb 08, 2002 at 05:10:51PM -0500, Daniel Jacobowitz wrote: > On Fri, Feb 08, 2002 at 10:58:51PM +0100, Florian Lohoff wrote: > > 0x88166b58 : mtc0 zero,gp > > 0x88166b5c : nop > > 0x88166b60 : mtc0 zero,sp > > 0x88166b64 : nop > >=20 > > mtc0/mfc0 do not address cpu registers but CP0 registers. The decoding > > as "gp" or "sp" is not correct. These are "TagLo" and "TagHi". >=20 > - what version of GDB? > - does objdump do the same thing? reset:~# gdb --version GNU gdb 5.1 Copyright 2001 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 condition= s. Type "show copying" to see the conditions. There is absolutely no warranty for GDB. Type "show warranty" for details. This GDB was configured as "mips-linux". reset:~# dpkg -l gdb Desired=3DUnknown/Install/Remove/Purge/Hold | Status=3DNot/Installed/Config-files/Unpacked/Failed-config/Half-installed |/ Err?=3D(none)/Hold/Reinst-required/X=3Dboth-problems (Status,Err: upperc= ase=3Dbad) ||/ Name Version Description +++-=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D-=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D-=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D ii gdb 5.1-1 The GNU Debugger Objdump does seem to get this right: 88166b58: 4080e000 mtc0 zero,$28 88166b60: 4080e800 mtc0 zero,$29 Flo --=20 Florian Lohoff flo@rfc822.org +49-5201-669912 Nine nineth on september the 9th Welcome to the new billenium --EeQfGwPcQSOJBaQU Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.6 (GNU/Linux) Comment: For info see http://www.gnupg.org iD8DBQE8ZE7JUaz2rXW+gJcRAnBKAJ9j3mlpOklYr58fP56LiYK1CyL9CgCgo6OF AQXHnjP5p1nwFl6Hc+3qdwg= =DV4t -----END PGP SIGNATURE----- --EeQfGwPcQSOJBaQU-- From owner-linux-mips@oss.sgi.com Fri Feb 8 14:31:13 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g18MVDn12057 for linux-mips-outgoing; Fri, 8 Feb 2002 14:31:13 -0800 Received: from nevyn.them.org (mail@NEVYN.RES.CMU.EDU [128.2.145.6]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g18MV9A12054 for ; Fri, 8 Feb 2002 14:31:09 -0800 Received: from drow by nevyn.them.org with local (Exim 3.34 #1 (Debian)) id 16ZJXv-0000kG-00; Fri, 08 Feb 2002 17:31:07 -0500 Date: Fri, 8 Feb 2002 17:31:07 -0500 From: Daniel Jacobowitz To: Florian Lohoff Cc: linux-mips@oss.sgi.com Subject: Re: gdb disassemble bug Message-ID: <20020208173107.A2758@nevyn.them.org> References: <20020208215851.GA18416@paradigm.rfc822.org> <20020208171051.A1829@nevyn.them.org> <20020208221849.GA18922@paradigm.rfc822.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20020208221849.GA18922@paradigm.rfc822.org> User-Agent: Mutt/1.3.23i Sender: owner-linux-mips@oss.sgi.com Precedence: bulk On Fri, Feb 08, 2002 at 11:18:49PM +0100, Florian Lohoff wrote: > On Fri, Feb 08, 2002 at 05:10:51PM -0500, Daniel Jacobowitz wrote: > > On Fri, Feb 08, 2002 at 10:58:51PM +0100, Florian Lohoff wrote: > > > 0x88166b58 : mtc0 zero,gp > > > 0x88166b5c : nop > > > 0x88166b60 : mtc0 zero,sp > > > 0x88166b64 : nop > > > > > > mtc0/mfc0 do not address cpu registers but CP0 registers. The decoding > > > as "gp" or "sp" is not correct. These are "TagLo" and "TagHi". > > > > - what version of GDB? > > - does objdump do the same thing? > > reset:~# gdb --version > GNU gdb 5.1 > Copyright 2001 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 "mips-linux". > reset:~# dpkg -l gdb > Desired=Unknown/Install/Remove/Purge/Hold > | Status=Not/Installed/Config-files/Unpacked/Failed-config/Half-installed > |/ Err?=(none)/Hold/Reinst-required/X=both-problems (Status,Err: uppercase=bad) > ||/ Name Version Description > +++-==============-==============-============================================ > ii gdb 5.1-1 The GNU Debugger OK. You may want to try a CVS snapshot; I'm 99% certain that this was fixed after gdb 5.1 branched. -- Daniel Jacobowitz Carnegie Mellon University MontaVista Software Debian GNU/Linux Developer From owner-linux-mips@oss.sgi.com Fri Feb 8 14:40:56 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g18MeuC12232 for linux-mips-outgoing; Fri, 8 Feb 2002 14:40:56 -0800 Received: from host099.momenco.com (IDENT:root@www.momenco.com [64.169.228.99]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g18MeRA12228 for ; Fri, 8 Feb 2002 14:40:27 -0800 Received: from beagle (beagle.internal.momenco.com [192.168.0.115]) by host099.momenco.com (8.11.6/8.11.6) with SMTP id g18MeOR26336; Fri, 8 Feb 2002 14:40:24 -0800 From: "Matthew Dharm" To: "Linux-MIPS" , "Ralf Baechle" Subject: PATCH: Updated support for Ocelot boot PROM Date: Fri, 8 Feb 2002 14:40:24 -0800 Message-ID: MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_NextPart_000_0024_01C1B0AE.8B076400" X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0) X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400 Importance: Normal Sender: owner-linux-mips@oss.sgi.com Precedence: bulk This is a multi-part message in MIME format. ------=_NextPart_000_0024_01C1B0AE.8B076400 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Ralf et al -- Attached is a patch made against the lastest CVS snapshot (from about an hour ago). Please apply. This patch adds support for our PMON v2.0 boot PROM. This boot prom uses a completely different mapping from the v1 boot prom, so the kernel code had to change significantly. This code auto-detects the version of PMON and adjusts accordingly. Oh, it also adds support for some of the debugging callbacks, which can be used before the MMU/TLBs are reconfigured. And it prints a nice "Booting Linux kernel" message just to let you know that life is good. :) Matt -- Matthew D. Dharm Senior Software Designer Momentum Computer Inc. 1815 Aston Ave. Suite 107 (760) 431-8663 X-115 Carlsbad, CA 92008-7310 Momentum Works For You www.momenco.com ------=_NextPart_000_0024_01C1B0AE.8B076400 Content-Type: application/octet-stream; name="patch20020208" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="patch20020208" ? arch/mips/boot/elf2ecoff=0A= ? arch/mips/boot/vmlinux.ecoff=0A= ? arch/mips/boot/addinitrd=0A= ? arch/mips/gt64120/momenco_ocelot/setup-save.c=0A= Index: arch/mips/gt64120/momenco_ocelot/prom.c=0A= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=0A= RCS file: /cvs/linux/arch/mips/gt64120/momenco_ocelot/prom.c,v=0A= retrieving revision 1.3.2.1=0A= diff -u -r1.3.2.1 prom.c=0A= --- arch/mips/gt64120/momenco_ocelot/prom.c 2001/12/12 13:45:58 1.3.2.1=0A= +++ arch/mips/gt64120/momenco_ocelot/prom.c 2002/02/08 21:32:29=0A= @@ -15,34 +15,35 @@=0A= #include =0A= #include =0A= =0A= -#define PLD_BASE 0xbc000000=0A= +struct callvectors {=0A= + int (*open) (char*, int, int);=0A= + int (*close) (int);=0A= + int (*read) (int, void*, int);=0A= + int (*write) (int, void*, int);=0A= + off_t (*lseek) (int, off_t, int);=0A= + int (*printf) (const char*, ...);=0A= + void (*cacheflush) (void);=0A= + char* (*gets) (char*);=0A= +};=0A= =0A= -#define REV 0x0 /* Board Assembly Revision */=0A= -#define PLD1ID 0x1 /* PLD 1 ID */=0A= -#define PLD2ID 0x2 /* PLD 2 ID */=0A= -#define RESET_STAT 0x3 /* Reset Status Register */=0A= -#define BOARD_STAT 0x4 /* Board Status Register */=0A= -#define CPCI_ID 0x5 /* Compact PCI ID Register */=0A= -#define CONTROL 0x8 /* Control Register */=0A= -#define CPU_EEPROM 0x9 /* CPU Configuration EEPROM Register */=0A= -#define INTMASK 0xA /* Interrupt Mask Register */=0A= -#define INTSTAT 0xB /* Interrupt Status Register */=0A= -#define INTSET 0xC /* Interrupt Set Register */=0A= -#define INTCLR 0xD /* Interrupt Clear Register */=0A= -=0A= -#define PLD_REG(x) ((uint8_t*)(PLD_BASE+(x)))=0A= -=0A= +struct callvectors* debug_vectors;=0A= char arcs_cmdline[CL_SIZE];=0A= =0A= +extern unsigned long gt64120_base;=0A= +=0A= const char *get_system_type(void)=0A= {=0A= return "Momentum Ocelot";=0A= }=0A= =0A= /* [jsun@junsun.net] PMON passes arguments in C main() style */=0A= -void __init prom_init(int argc, const char **arg)=0A= +void __init prom_init(int argc, char **arg, char** env, struct = callvectors *cv)=0A= {=0A= int i;=0A= + uint32_t tmp;=0A= +=0A= + /* save the PROM vectors for debugging use */=0A= + debug_vectors =3D cv;=0A= =0A= /* arg[0] is "g", the rest is boot parameters */=0A= arcs_cmdline[0] =3D '\0';=0A= @@ -56,10 +57,17 @@=0A= =0A= mips_machgroup =3D MACH_GROUP_MOMENCO;=0A= mips_machtype =3D MACH_MOMENCO_OCELOT;=0A= +=0A= + while (*env) {=0A= + if (strncmp("gtbase", *env, 6) =3D=3D 0) {=0A= + gt64120_base =3D simple_strtol(*env + strlen("gtbase=3D"),=0A= + NULL, 16);=0A= + break;=0A= + }=0A= + *env++;=0A= + }=0A= =0A= - /* turn off the Bit Error LED, which comes on automatically=0A= - * at power-up reset */=0A= - *PLD_REG(INTCLR) =3D 0x80;=0A= + debug_vectors->printf("Booting Linux kernel...\n");=0A= =0A= /* All the boards have at least 64MiB. If there's more, we=0A= detect and register it later */=0A= Index: arch/mips/gt64120/momenco_ocelot/setup.c=0A= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=0A= RCS file: /cvs/linux/arch/mips/gt64120/momenco_ocelot/setup.c,v=0A= retrieving revision 1.5.2.1=0A= diff -u -r1.5.2.1 setup.c=0A= --- arch/mips/gt64120/momenco_ocelot/setup.c 2002/02/07 01:58:06 1.5.2.1=0A= +++ arch/mips/gt64120/momenco_ocelot/setup.c 2002/02/08 21:32:29=0A= @@ -83,25 +83,9 @@=0A= =0A= static void __init setup_l3cache(unsigned long size);=0A= =0A= -void __init momenco_ocelot_setup(void)=0A= +/* setup code for a handoff from a version 1 PMON 2000 PROM */=0A= +void PMON_v1_setup()=0A= {=0A= - void (*l3func)(unsigned long)=3DKSEG1ADDR(&setup_l3cache);=0A= - unsigned int tmpword;=0A= -=0A= - board_time_init =3D gt64120_time_init;=0A= -=0A= - _machine_restart =3D momenco_ocelot_restart;=0A= - _machine_halt =3D momenco_ocelot_halt;=0A= - _machine_power_off =3D momenco_ocelot_power_off;=0A= -=0A= - /*=0A= - * initrd_start =3D (ulong)ocelot_initrd_start;=0A= - * initrd_end =3D (ulong)ocelot_initrd_start + = (ulong)ocelot_initrd_size;=0A= - * initrd_below_start_ok =3D 1;=0A= - */=0A= - rtc_ops =3D &no_rtc_ops;=0A= -=0A= -=0A= /* A wired TLB entry for the GT64120A and the serial port. The=0A= GT64120A is going to be hit on every IRQ anyway - there's=0A= absolutely no point in letting it be a random TLB entry, as=0A= @@ -122,12 +106,10 @@=0A= Ocelot PLD (CS0) 0x2c000000 0xe0020000=0A= NVRAM 0x2c800000 0xe0030000=0A= */=0A= - =0A= add_temporary_entry(ENTRYLO(0x2C000000), ENTRYLO(0x2d000000), = 0xe0020000, PM_64K);=0A= =0A= -=0A= /* Relocate the CS3/BootCS region */=0A= - GT_WRITE( GT_CS3BOOTLD_OFS, 0x2f000000 >> 21);=0A= + GT_WRITE(GT_CS3BOOTLD_OFS, 0x2f000000 >> 21);=0A= =0A= /* Relocate CS[012] */=0A= GT_WRITE(GT_CS20LD_OFS, 0x2c000000 >> 21);=0A= @@ -142,18 +124,74 @@=0A= GT_WRITE(GT_PCI0_CFGDATA_OFS, 0x24000000);=0A= GT_WRITE(GT_PCI0_CFGADDR_OFS, 0x80000024);=0A= GT_WRITE(GT_PCI0_CFGDATA_OFS, 0x24000001);=0A= +}=0A= =0A= - /* Relocate PCI0 I/O and Mem0 */=0A= - GT_WRITE(GT_PCI0IOLD_OFS, 0x20000000 >> 21);=0A= - GT_WRITE(GT_PCI0M0LD_OFS, 0x22000000 >> 21);=0A= +/* setup code for a handoff from a version 2 PMON 2000 PROM */=0A= +void PMON_v2_setup()=0A= +{=0A= + /* A wired TLB entry for the GT64120A and the serial port. The=0A= + GT64120A is going to be hit on every IRQ anyway - there's=0A= + absolutely no point in letting it be a random TLB entry, as=0A= + it'll just cause needless churning of the TLB. And we use=0A= + the other half for the serial port, which is just a PITA=0A= + otherwise :)=0A= =0A= - /* Relocate PCI0 Mem1 */=0A= - GT_WRITE(GT_PCI0M1LD_OFS, 0x36000000 >> 21);=0A= + Device Physical Virtual=0A= + GT64120 Internal Regs 0xf4000000 0xe0000000=0A= + UARTs (CS2) 0xfd000000 0xe0001000=0A= + */=0A= + add_wired_entry(ENTRYLO(0xf4000000), ENTRYLO(0xfD000000), 0xe0000000, = PM_4K);=0A= +=0A= + /* Also a temporary entry to let us talk to the Ocelot PLD and NVRAM=0A= + in the CS[012] region. We can't use ioremap() yet. The NVRAM=0A= + is a ST M48T37Y, which includes NVRAM, RTC, and Watchdog functions.=0A= +=0A= + Ocelot PLD (CS0) 0xfc000000 0xe0020000=0A= + NVRAM 0xfc800000 0xe0030000=0A= + */=0A= + add_temporary_entry(ENTRYLO(0xfC000000), ENTRYLO(0xfd000000), = 0xe0020000, PM_64K);=0A= +=0A= + gt64120_base =3D 0xe0000000;=0A= +}=0A= +=0A= +void __init momenco_ocelot_setup(void)=0A= +{=0A= + void (*l3func)(unsigned long)=3DKSEG1ADDR(&setup_l3cache);=0A= + unsigned int tmpword;=0A= +=0A= + board_time_init =3D gt64120_time_init;=0A= +=0A= + _machine_restart =3D momenco_ocelot_restart;=0A= + _machine_halt =3D momenco_ocelot_halt;=0A= + _machine_power_off =3D momenco_ocelot_power_off;=0A= +=0A= + /*=0A= + * initrd_start =3D (ulong)ocelot_initrd_start;=0A= + * initrd_end =3D (ulong)ocelot_initrd_start + = (ulong)ocelot_initrd_size;=0A= + * initrd_below_start_ok =3D 1;=0A= + */=0A= + rtc_ops =3D &no_rtc_ops;=0A= +=0A= + /* do handoff reconfiguration */=0A= + if (gt64120_base =3D=3D KSEG1ADDR(GT_DEF_BASE))=0A= + PMON_v1_setup();=0A= + else=0A= + PMON_v2_setup();=0A= =0A= + /* Turn off the Bit-Error LED */=0A= + OCELOT_PLD_WRITE(0x80, INTCLR);=0A= +=0A= /* Relocate all the PCI1 stuff, not that we use it */=0A= GT_WRITE(GT_PCI1IOLD_OFS, 0x30000000 >> 21);=0A= GT_WRITE(GT_PCI1M0LD_OFS, 0x32000000 >> 21);=0A= GT_WRITE(GT_PCI1M1LD_OFS, 0x34000000 >> 21);=0A= +=0A= + /* Relocate PCI0 I/O and Mem0 */=0A= + GT_WRITE(GT_PCI0IOLD_OFS, 0x20000000 >> 21);=0A= + GT_WRITE(GT_PCI0M0LD_OFS, 0x22000000 >> 21);=0A= +=0A= + /* Relocate PCI0 Mem1 */=0A= + GT_WRITE(GT_PCI0M1LD_OFS, 0x36000000 >> 21);=0A= =0A= /* For the initial programming, we assume 512MB configuration */=0A= /* Relocate the CPU's view of the RAM... */=0A= Index: drivers/mtd/devices/docprobe.c=0A= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=0A= RCS file: /cvs/linux/drivers/mtd/devices/docprobe.c,v=0A= retrieving revision 1.3=0A= diff -u -r1.3 docprobe.c=0A= --- drivers/mtd/devices/docprobe.c 2001/11/05 20:15:52 1.3=0A= +++ drivers/mtd/devices/docprobe.c 2002/02/08 21:32:30=0A= @@ -88,6 +88,7 @@=0A= 0xe4000000,=0A= #elif defined(CONFIG_MOMENCO_OCELOT)=0A= 0x2f000000,=0A= + 0xff000000,=0A= #else=0A= #warning Unknown architecture for DiskOnChip. No default probe = locations defined=0A= #endif=0A= ------=_NextPart_000_0024_01C1B0AE.8B076400-- From owner-linux-mips@oss.sgi.com Fri Feb 8 14:44:40 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g18MieO12326 for linux-mips-outgoing; Fri, 8 Feb 2002 14:44:40 -0800 Received: from host099.momenco.com (IDENT:root@www.momenco.com [64.169.228.99]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g18MibA12322 for ; Fri, 8 Feb 2002 14:44:37 -0800 Received: from beagle (beagle.internal.momenco.com [192.168.0.115]) by host099.momenco.com (8.11.6/8.11.6) with SMTP id g18MibR26360 for ; Fri, 8 Feb 2002 14:44:37 -0800 From: "Matthew Dharm" To: "Linux-MIPS" Subject: ANNOUNCE: GT-64240 project Date: Fri, 8 Feb 2002 14:44:37 -0800 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0) X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400 Importance: Normal Sender: owner-linux-mips@oss.sgi.com Precedence: bulk I wanted to publically announce that I'm now working on a port of Linux to the Momentum Computer Ocelot-G board, which uses a Gallileo/Marvell GT-64240 host bridge. I know that there is at least one other person who is/will be working on a similar board. Pooling resources will be good, especially since this chip is a total nightmare. There was some earlier discussion on this list about it -- I won't rehash the details now. Suffice to say, I have a 16550A-compatible UART, and I'm feeling really lucky about it. :) If anyone has anything to contribute/share, please let me know. Since there are going to be at least two different boards which use this chip and have linux support, getting together now will be good -- if nothing else, it will eliminate the pain of trying to merge lots of functionally-equivalent code later. Matthew Dharm -- Matthew D. Dharm Senior Software Designer Momentum Computer Inc. 1815 Aston Ave. Suite 107 (760) 431-8663 X-115 Carlsbad, CA 92008-7310 Momentum Works For You www.momenco.com From owner-linux-mips@oss.sgi.com Sat Feb 9 07:15:13 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g19FFDP21238 for linux-mips-outgoing; Sat, 9 Feb 2002 07:15:13 -0800 Received: from noose.gt.owl.de (postfix@noose.gt.owl.de [62.52.19.4]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g19FF8A21235 for ; Sat, 9 Feb 2002 07:15:08 -0800 Received: by noose.gt.owl.de (Postfix, from userid 10) id D62CE843; Sat, 9 Feb 2002 16:14:46 +0100 (CET) Received: by paradigm.rfc822.org (Postfix, from userid 1000) id E646F4291; Sat, 9 Feb 2002 16:01:55 +0100 (CET) Date: Sat, 9 Feb 2002 16:01:55 +0100 From: Florian Lohoff To: linux-mips@oss.sgi.com Subject: gcc include strangeness Message-ID: <20020209150155.GA853@paradigm.rfc822.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="liOOAslEiF7prFVr" Content-Disposition: inline User-Agent: Mutt/1.3.27i Organization: rfc822 - pure communication Sender: owner-linux-mips@oss.sgi.com Precedence: bulk --liOOAslEiF7prFVr Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi, i just stumbled when i tried to compile a program (bootloader) with gcc which uses varargs. I got the error that "sgidefs.h" was missing. sgidefs.h is contained in the glibc which gets included by va-mips.h from stdarg.h - I dont think this is correct as i should be able to compile programs without glibc. Shouldnt sgidefs.h or its content be included in the gcc ? Flo --=20 Florian Lohoff flo@rfc822.org +49-5201-669912 Nine nineth on september the 9th Welcome to the new billenium --liOOAslEiF7prFVr Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.6 (GNU/Linux) Comment: For info see http://www.gnupg.org iD8DBQE8ZTnjUaz2rXW+gJcRAuTkAJ9H+sVgYOSbtXMKkXJAVyY/YcX98ACgvrws ZXWEY67msOME7XupO4kAhzE= =qKjo -----END PGP SIGNATURE----- --liOOAslEiF7prFVr-- From owner-linux-mips@oss.sgi.com Sun Feb 10 10:24:52 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g1AIOqw20653 for linux-mips-outgoing; Sun, 10 Feb 2002 10:24:52 -0800 Received: from deliverator.sgi.com (deliverator.sgi.com [204.94.214.10]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g1AIOV920649 for ; Sun, 10 Feb 2002 10:24:31 -0800 Received: from post.webmailer.de ([192.67.198.70]) by deliverator.sgi.com (980309.SGI.8.8.8-aspam-6.2/980310.SGI-aspam) via ESMTP id JAA29833 for ; Sun, 10 Feb 2002 09:20:03 -0800 (PST) mail_from (karsten@excalibur.cologne.de) Received: from excalibur.cologne.de (p50851953.dip.t-dialin.net [80.133.25.83]) by post.webmailer.de (8.9.3/8.8.7) with ESMTP id SAA18143 for ; Sun, 10 Feb 2002 18:10:42 +0100 (MET) Received: from karsten by excalibur.cologne.de with local (Exim 3.12 #1 (Debian)) id 16ZxbK-0000Am-00 for ; Sun, 10 Feb 2002 18:17:18 +0100 Date: Sun, 10 Feb 2002 18:17:18 +0100 From: Karsten Merker To: linux-mips@oss.sgi.com Subject: DECstation keyboard mappings and XFree Message-ID: <20020210181718.A641@excalibur.cologne.de> Mail-Followup-To: Karsten Merker , linux-mips@oss.sgi.com Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="h31gzZEtNLTqOjlF" Content-Disposition: inline User-Agent: Mutt/1.2.5i X-No-Archive: yes Sender: owner-linux-mips@oss.sgi.com Precedence: bulk --h31gzZEtNLTqOjlF Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Hallo everybody, I have modified the keycode remapping table in drivers/tc/lk201-remap.c to deliver PC compatible keycodes. Aim of this modification is easier use of XFree86 on DECstations (with the standard PC-keyboard map) and the possibility to use existing loadable national keymaps for i386. In theory, this should work, in practice, it does not :-(. I have encountered several problems when running the new remapping table with a standard i386 us.kmap.gz: - the "Alt Function" keys on an LK401 seem to deliver no keypress event (same behaviour with the original DECstation mapping, so this seems to be a generic problem. Does the LK401 need a particular initialization to use these keys (which do not exist on an LK201)? - When running in console mode, everything besides console switching (because of the missing ALT-keycode) and activating NumLock (keypad is always in cursor mode) works. In XFree86 the normal character keys and the main keyboard number keys work fine, but cursor keys, the Del/Insert/Pos1/End/etc. block and the numeric keyblock do not work at all or deliver wrong keycodes. I would be very grateful if somebody could give me a hint about the reason for this behaviour, the modified lk201-remap.c is attached to this mail. Regards, Karsten -- #include Nach Paragraph 28 Abs. 3 Bundesdatenschutzgesetz widerspreche ich der Nutzung oder Uebermittlung meiner Daten fuer Werbezwecke oder fuer die Markt- oder Meinungsforschung. --h31gzZEtNLTqOjlF Content-Type: text/x-csrc; charset=us-ascii Content-Disposition: attachment; filename="lk201-remap.c" /* * PC-compatible keyboard mappings for DEC LK201/401/501 keyboards * 2002/02/09 by Karsten Merker , * based on the layout of the original lk201-remap.c written * 17.05.99 by Michael Engel (engel@unix-ag.org). * This file is subject to the terms and conditions of the GNU General * Public License, version 2. See the file "COPYING" in the main * directory of this archive for more details. * * Rationale: * * DEC US keyboards generate keycodes in the range 0x55 - 0xfb * * The (historically PC-centric) Linux keycodes have to be in the * range 0x00-0x7f, so the raw keycodes from the keyboard have to * be remapped appropriately. * * This remapping table in contrast to the original lk201-remap.c (which * numbered the keys by their position from top left to lower right) * delivers PC-compatible keycodes. * * Relocated keys (from a PC-keyboard point of view): * SysReq/ScrollLock/Pause are on F13/F14/Help * Pos1/End are on Find/Select * ESC is on Do * LeftPenguin/RightPenguin are on LeftCompose/RightCompose * Menu/RightControl are on F17/F18 * The numeric keypad has PC-like layout */ unsigned char scancodeRemap[256] = { /* ----- */ /* 0 */ 0, 0, 0, 0, /* ----- */ /* 4 */ 0, 0, 0, 0, /* ----- */ /* 8 */ 0, 0, 0, 0, /* ----- */ /* c */ 0, 0, 0, 0, /* ----- */ /* 10 */ 0, 0, 0, 0, /* ----- */ /* 14 */ 0, 0, 0, 0, /* ----- */ /* 18 */ 0, 0, 0, 0, /* ----- */ /* 1c */ 0, 0, 0, 0, /* ----- */ /* 20 */ 0, 0, 0, 0, /* ----- */ /* 24 */ 0, 0, 0, 0, /* ----- */ /* 28 */ 0, 0, 0, 0, /* ----- */ /* 2c */ 0, 0, 0, 0, /* ----- */ /* 30 */ 0, 0, 0, 0, /* ----- */ /* 34 */ 0, 0, 0, 0, /* ----- */ /* 38 */ 0, 0, 0, 0, /* ----- */ /* 3c */ 0, 0, 0, 0, /* ----- */ /* 40 */ 0, 0, 0, 0, /* ----- */ /* 44 */ 0, 0, 0, 0, /* ----- */ /* 48 */ 0, 0, 0, 0, /* ----- */ /* 4c */ 0, 0, 0, 0, /* ----- */ /* 50 */ 0, 0, 0, 0, /* ----- F1 F2 */ /* 54 */ 0, 0, 59, 60, /* ----- F3 F4 F5 */ /* 58 */ 61, 62, 63, 0, /* ----- */ /* 5c */ 0, 0, 0, 0, /* ----- */ /* 60 */ 0, 0, 0, 0, /* ----- F6 F7 F8 F9 */ /* 64 */ 64, 65, 66, 67, /* ----- F10 */ /* 68 */ 68, 0, 0, 0, /* ----- */ /* 6c */ 0, 0, 0, 0, /* ----- F11 F12 F13/SYSREQ */ /* 70 */ 0, 87, 88, 99, /* ----- F14/SCR.LOCK */ /* 74 */ 70, 0, 0, 0, /* ----- */ /* 78 */ 0, 0, 0, 0, /* ----- HELP/PAUSE DO/ESC */ /* 7c */ 119, 1, 0, 0, /* ----- F17/MENU F18/R.CTRL F19 F20 */ /* 80 */ 127, 97, 0, 0, /* ----- */ /* 84 */ 0, 0, 0, 0, /* ----- FIND/POS1 INSERT */ /* 88 */ 0, 0, 102, 110, /* ----- REMOVE SELECT/END PREV/PAGEUP NEXT/PAGEDOWN */ /* 8c */ 111, 107, 104, 109, /* ----- KP 0 */ /* 90 */ 0, 0, 82, 0, /* ----- KP . KP ENTER KP 1 KP 2 */ /* 94 */ 83, 96, 79, 80, /* ----- KP 3 KP 4 KP 5 KP 6 */ /* 98 */ 81, 75, 76, 77, /* ----- KP ,/KP + KP 7 KP 8 KP 9 */ /* 9c */ 78, 71, 72, 73, /* ----- KP -/KP+ KP F1/NUM LCK KP F2/KP / KP F3/KP * */ /* a0 */ 78, 69, 98, 55, /* ----- KP F4/KP - LEFT */ /* a4 */ 74, 0, 0, 105, /* ----- RIGHT DOWN UP SHIFT Rt */ /* a8 */ 106, 108, 103, 54, /* ----- ALT R.COMP/R.TUX SHIFT CONTROL */ /* ac */ 56, 126, 42, 29, /* ----- CAPS L.COMP/L.TUX ALT Rt */ /* b0 */ 58, 125, 100, 0, /* ----- */ /* b4 */ 0, 0, 0, 0, /* ----- */ /* b8 */ 0, 0, 0, 0, /* ----- BKSP RET TAB ` */ /* bc */ 14, 28, 15, 0x15, /* ----- 1 q a z */ /* c0 */ 2, 16, 30, 44, /* ----- 2 w s */ /* c4 */ 0, 3, 17, 31, /* ----- x ; Mon, 11 Feb 2002 05:52:42 -0800 Received: from localhost by delta.ds2.pg.gda.pl (8.9.3/8.9.3) with SMTP id NAA19824; Mon, 11 Feb 2002 13:51:47 +0100 (MET) Date: Mon, 11 Feb 2002 13:51:47 +0100 (MET) From: "Maciej W. Rozycki" To: Florian Lohoff cc: linux-mips@oss.sgi.com Subject: Re: gcc include strangeness In-Reply-To: <20020209150155.GA853@paradigm.rfc822.org> Message-ID: Organization: Technical University of Gdansk MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-linux-mips@oss.sgi.com Precedence: bulk On Sat, 9 Feb 2002, Florian Lohoff wrote: > i just stumbled when i tried to compile a program (bootloader) with > gcc which uses varargs. I got the error that "sgidefs.h" was missing. > sgidefs.h is contained in the glibc which gets included by va-mips.h > from stdarg.h - I dont think this is correct as i should be able > to compile programs without glibc. Hmm, in 2.95.3 in va-mips.h I see: /* Get definitions for _MIPS_SIM_ABI64 etc. */ #ifdef _MIPS_SIM #include #endif so you shouldn't need sgidefs.h normally. Or did something get broken for 3.x? -- + Maciej W. Rozycki, Technical University of Gdansk, Poland + +--------------------------------------------------------------+ + e-mail: macro@ds2.pg.gda.pl, PGP key available + From owner-linux-mips@oss.sgi.com Mon Feb 11 06:53:18 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g1BErIp10011 for linux-mips-outgoing; Mon, 11 Feb 2002 06:53:18 -0800 Received: from noose.gt.owl.de (postfix@noose.gt.owl.de [62.52.19.4]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g1BEr9910008 for ; Mon, 11 Feb 2002 06:53:09 -0800 Received: by noose.gt.owl.de (Postfix, from userid 10) id E0F4984C; Mon, 11 Feb 2002 14:52:46 +0100 (CET) Received: by paradigm.rfc822.org (Postfix, from userid 1000) id 253384292; Mon, 11 Feb 2002 14:53:02 +0100 (CET) Date: Mon, 11 Feb 2002 14:53:02 +0100 From: Florian Lohoff To: "Maciej W. Rozycki" Cc: linux-mips@oss.sgi.com Subject: Re: gcc include strangeness Message-ID: <20020211135302.GB30314@paradigm.rfc822.org> References: <20020209150155.GA853@paradigm.rfc822.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="4bRzO86E/ozDv8r1" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.3.27i Organization: rfc822 - pure communication Sender: owner-linux-mips@oss.sgi.com Precedence: bulk --4bRzO86E/ozDv8r1 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Feb 11, 2002 at 01:51:47PM +0100, Maciej W. Rozycki wrote: > On Sat, 9 Feb 2002, Florian Lohoff wrote: >=20 > > i just stumbled when i tried to compile a program (bootloader) with > > gcc which uses varargs. I got the error that "sgidefs.h" was missing. > > sgidefs.h is contained in the glibc which gets included by va-mips.h > > from stdarg.h - I dont think this is correct as i should be able > > to compile programs without glibc. >=20 > Hmm, in 2.95.3 in va-mips.h I see:=20 >=20 > /* Get definitions for _MIPS_SIM_ABI64 etc. */ > #ifdef _MIPS_SIM > #include > #endif >=20 > so you shouldn't need sgidefs.h normally. Or did something get broken for > 3.x? revamp:/tmp/arcboot-0.2# make cd arclib; make all make[1]: Entering directory `/tmp/arcboot-0.2/arclib' cc -O -Werror -Wall -mno-abicalls -G 0 -fno-pic -c -o arc.o arc.c cc -O -Werror -Wall -mno-abicalls -G 0 -fno-pic -c -o stdio.o stdio.c In file included from /usr/lib/gcc-lib/mips-linux/2.95.4/include/stdarg.h:27, from stdio.h:8, from stdio.c:7: /usr/lib/gcc-lib/mips-linux/2.95.4/include/va-mips.h:89: sgidefs.h: No such file or directory make[1]: *** [stdio.o] Error 1 make[1]: Leaving directory `/tmp/arcboot-0.2/arclib' make: *** [all] Error 2 revamp:/tmp/arcboot-0.2# gcc -v Reading specs from /usr/lib/gcc-lib/mips-linux/2.95.4/specs gcc version 2.95.4 20011002 (Debian prerelease) revamp:/tmp/arcboot-0.2# vi /usr/lib/gcc-lib/mips-linux/2.95.4/include/va-m= ips.h [...] 87 /* Get definitions for _MIPS_SIM_ABI64 etc. */ 88 #ifdef _MIPS_SIM 89 #include 90 #endif [...] I just saw it - I cant explain it ... Flo --=20 Florian Lohoff flo@rfc822.org +49-5201-669912 Nine nineth on september the 9th Welcome to the new billenium --4bRzO86E/ozDv8r1 Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.6 (GNU/Linux) Comment: For info see http://www.gnupg.org iD8DBQE8Z8y9Uaz2rXW+gJcRAgIGAKDePhcd7reW8Dgat1jApOHOhfDbmgCgp69G urxYbdizNiUq1X7NqkuX50I= =Cfob -----END PGP SIGNATURE----- --4bRzO86E/ozDv8r1-- From owner-linux-mips@oss.sgi.com Mon Feb 11 07:07:30 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g1BF7UN10310 for linux-mips-outgoing; Mon, 11 Feb 2002 07:07:30 -0800 Received: from delta.ds2.pg.gda.pl (macro@delta.ds2.pg.gda.pl [213.192.72.1]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g1BF7N910303 for ; Mon, 11 Feb 2002 07:07:24 -0800 Received: from localhost by delta.ds2.pg.gda.pl (8.9.3/8.9.3) with SMTP id PAA22256; Mon, 11 Feb 2002 15:07:08 +0100 (MET) Date: Mon, 11 Feb 2002 15:07:08 +0100 (MET) From: "Maciej W. Rozycki" To: Karsten Merker cc: linux-mips@oss.sgi.com Subject: Re: DECstation keyboard mappings and XFree In-Reply-To: <20020210181718.A641@excalibur.cologne.de> Message-ID: Organization: Technical University of Gdansk MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-linux-mips@oss.sgi.com Precedence: bulk On Sun, 10 Feb 2002, Karsten Merker wrote: > I have modified the keycode remapping table in drivers/tc/lk201-remap.c > to deliver PC compatible keycodes. Aim of this modification is easier > use of XFree86 on DECstations (with the standard PC-keyboard map) and > the possibility to use existing loadable national keymaps for i386. > In theory, this should work, in practice, it does not :-(. Hmm, why do you need (sh*tty) PC-compatible keycodes for a keaboard that barely resembles a PC keyboard? AFAIK, XFree86 has appropriate LK201 keymaps -- see "/usr/X11R6/lib/X11/xkb/*/digital/*". Just set up your "Keyboard" section of XF86Config correctly. E.g. (completely untested): Section "Keyboard" XkbKeycodes "digital/lk(lk201)" XkbSymbols "digital/us(us)" XkbGeometry "digital/lk(lk201)" EndSection It might be nice to add these values to Xkb rules somewhere ("/usr/X11R6/lib/X11/xkb/rules/digital"?) one day, so you don't need to specify components separately for default values, but I'm not sure our XFree86 support is stable enough to consider it now. Maciej -- + Maciej W. Rozycki, Technical University of Gdansk, Poland + +--------------------------------------------------------------+ + e-mail: macro@ds2.pg.gda.pl, PGP key available + From owner-linux-mips@oss.sgi.com Mon Feb 11 07:15:55 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g1BFFtd10469 for linux-mips-outgoing; Mon, 11 Feb 2002 07:15:55 -0800 Received: from delta.ds2.pg.gda.pl (macro@delta.ds2.pg.gda.pl [213.192.72.1]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g1BFFl910463 for ; Mon, 11 Feb 2002 07:15:48 -0800 Received: from localhost by delta.ds2.pg.gda.pl (8.9.3/8.9.3) with SMTP id PAA22466; Mon, 11 Feb 2002 15:15:44 +0100 (MET) Date: Mon, 11 Feb 2002 15:15:43 +0100 (MET) From: "Maciej W. Rozycki" Reply-To: "Maciej W. Rozycki" To: Florian Lohoff cc: linux-mips@oss.sgi.com Subject: Re: gcc include strangeness In-Reply-To: <20020211135302.GB30314@paradigm.rfc822.org> Message-ID: Organization: Technical University of Gdansk MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-linux-mips@oss.sgi.com Precedence: bulk On Mon, 11 Feb 2002, Florian Lohoff wrote: > I just saw it - I cant explain it ... Hmm, it's "subtarget_cpp_spec" in gcc's specs that defines _MIPS_SIM. It seems should be a part of gcc indeed. It would let avoiding including the weird asm-mips/gcc/sgidefs.h header for the kernel as well. -- + Maciej W. Rozycki, Technical University of Gdansk, Poland + +--------------------------------------------------------------+ + e-mail: macro@ds2.pg.gda.pl, PGP key available + From owner-linux-mips@oss.sgi.com Mon Feb 11 07:20:05 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g1BFK5O10583 for linux-mips-outgoing; Mon, 11 Feb 2002 07:20:05 -0800 Received: from post.webmailer.de (natwar.webmailer.de [192.67.198.70]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g1BFK1910580 for ; Mon, 11 Feb 2002 07:20:01 -0800 Received: from excalibur.cologne.de (pD9E40306.dip.t-dialin.net [217.228.3.6]) by post.webmailer.de (8.9.3/8.8.7) with ESMTP id PAA04904 for ; Mon, 11 Feb 2002 15:19:52 +0100 (MET) Received: from karsten by excalibur.cologne.de with local (Exim 3.12 #1 (Debian)) id 16aHPR-0003jW-00 for ; Mon, 11 Feb 2002 15:26:21 +0100 Date: Mon, 11 Feb 2002 15:26:21 +0100 From: Karsten Merker To: linux-mips@oss.sgi.com Subject: Re: DECstation keyboard mappings and XFree Message-ID: <20020211152621.A14342@excalibur.cologne.de> Mail-Followup-To: Karsten Merker , linux-mips@oss.sgi.com References: <20020210181718.A641@excalibur.cologne.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: ; from macro@ds2.pg.gda.pl on Mon, Feb 11, 2002 at 03:07:08PM +0100 X-No-Archive: yes Sender: owner-linux-mips@oss.sgi.com Precedence: bulk On Mon, Feb 11, 2002 at 03:07:08PM +0100, Maciej W. Rozycki wrote: > On Sun, 10 Feb 2002, Karsten Merker wrote: > > > I have modified the keycode remapping table in drivers/tc/lk201-remap.c > > to deliver PC compatible keycodes. Aim of this modification is easier > > use of XFree86 on DECstations (with the standard PC-keyboard map) and > > the possibility to use existing loadable national keymaps for i386. > > In theory, this should work, in practice, it does not :-(. > > Hmm, why do you need (sh*tty) PC-compatible keycodes for a keaboard that > barely resembles a PC keyboard? AFAIK, XFree86 has appropriate LK201 > keymaps -- see "/usr/X11R6/lib/X11/xkb/*/digital/*". Because the original code does not deliver LK201 keycodes - LK201 keycodes are in the range 0x55 - 0xfb, but the kernel to my knowledge accepts only keycodes in the range 0x01 - 0x7f, so the original code already did a remapping of the LK201 raw codes (it delivered the key numbers from the top left to the downmost right keys, i.e. F1=1, F2=2, F3=3 etc.). This means that the XFree LK201 mapping did not work, and if we have to remap keycodes anyway into the range 0x01-0x7f, using a PC-compatible keymap seemed the best solution to me. Regards, Karsten -- #include Nach Paragraph 28 Abs. 3 Bundesdatenschutzgesetz widerspreche ich der Nutzung oder Uebermittlung meiner Daten fuer Werbezwecke oder fuer die Markt- oder Meinungsforschung. From owner-linux-mips@oss.sgi.com Mon Feb 11 07:27:44 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g1BFRit10878 for linux-mips-outgoing; Mon, 11 Feb 2002 07:27:44 -0800 Received: from hell (buserror-extern.convergence.de [212.84.236.66]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g1BFRc910873 for ; Mon, 11 Feb 2002 07:27:38 -0800 Received: from js by hell with local (Exim 3.33 #1 (Debian)) id 16aHQC-0000gD-00; Mon, 11 Feb 2002 15:27:08 +0100 Date: Mon, 11 Feb 2002 15:27:08 +0100 From: Johannes Stezenbach To: Florian Lohoff Cc: "Maciej W. Rozycki" , linux-mips@oss.sgi.com Subject: Re: gcc include strangeness Message-ID: <20020211142708.GA2577@convergence.de> Mail-Followup-To: Johannes Stezenbach , Florian Lohoff , "Maciej W. Rozycki" , linux-mips@oss.sgi.com References: <20020209150155.GA853@paradigm.rfc822.org> <20020211135302.GB30314@paradigm.rfc822.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20020211135302.GB30314@paradigm.rfc822.org> User-Agent: Mutt/1.3.27i Sender: owner-linux-mips@oss.sgi.com Precedence: bulk On Mon, Feb 11, 2002 at 02:53:02PM +0100, Florian Lohoff wrote: > On Mon, Feb 11, 2002 at 01:51:47PM +0100, Maciej W. Rozycki wrote: > > On Sat, 9 Feb 2002, Florian Lohoff wrote: > > > > > i just stumbled when i tried to compile a program (bootloader) with > > > gcc which uses varargs. I got the error that "sgidefs.h" was missing. > > > sgidefs.h is contained in the glibc which gets included by va-mips.h > > > from stdarg.h - I dont think this is correct as i should be able > > > to compile programs without glibc. The glibc-2.2.5/FAQ says: 1.20. Which tools should I use for MIPS? {AJ} You should use the current development version of gcc 3.0 or newer from CVS. gcc 2.95.x does not work correctly on mips-linux. I'm not shure if this only applies to glibc, but the gcc-2.95.x I tried to build could not even compile a kernel because of: #ifndef __linux__ #error Use a Linux compiler or give up. #endif in linux/include/asm-mips/sgidefs.h. The gcc-3.0.3 I now use has a totally different set of predefines than gcc-2.95.x, and it seems to work. > > Hmm, in 2.95.3 in va-mips.h I see: > > > > /* Get definitions for _MIPS_SIM_ABI64 etc. */ > > #ifdef _MIPS_SIM > > #include > > #endif > > > > so you shouldn't need sgidefs.h normally. Or did something get broken for > > 3.x? sgidefs.h comes from the kernel includes. gcc-3.x does not use va-mips.h or sgidefs,h, but simply has the following in stdarg.h: #define va_start(v,l) __builtin_stdarg_start((v),l) #define va_end __builtin_va_end #define va_arg __builtin_va_arg etc. Regards, Johannes From owner-linux-mips@oss.sgi.com Mon Feb 11 07:59:47 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g1BFxlt11546 for linux-mips-outgoing; Mon, 11 Feb 2002 07:59:47 -0800 Received: from deliverator.sgi.com (deliverator.sgi.com [204.94.214.10]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g1BFxh911537 for ; Mon, 11 Feb 2002 07:59:43 -0800 Received: from delta.ds2.pg.gda.pl (macro@delta.ds2.pg.gda.pl [213.192.72.1]) by deliverator.sgi.com (980309.SGI.8.8.8-aspam-6.2/980310.SGI-aspam) via ESMTP id GAA00810 for ; Mon, 11 Feb 2002 06:55:13 -0800 (PST) mail_from (macro@ds2.pg.gda.pl) Received: from localhost by delta.ds2.pg.gda.pl (8.9.3/8.9.3) with SMTP id PAA23152; Mon, 11 Feb 2002 15:49:20 +0100 (MET) Date: Mon, 11 Feb 2002 15:49:19 +0100 (MET) From: "Maciej W. Rozycki" To: Karsten Merker cc: linux-mips@oss.sgi.com Subject: Re: DECstation keyboard mappings and XFree In-Reply-To: <20020211152621.A14342@excalibur.cologne.de> Message-ID: Organization: Technical University of Gdansk MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-linux-mips@oss.sgi.com Precedence: bulk On Mon, 11 Feb 2002, Karsten Merker wrote: > > Hmm, why do you need (sh*tty) PC-compatible keycodes for a keaboard that > > barely resembles a PC keyboard? AFAIK, XFree86 has appropriate LK201 > > keymaps -- see "/usr/X11R6/lib/X11/xkb/*/digital/*". > > Because the original code does not deliver LK201 keycodes - LK201 keycodes > are in the range 0x55 - 0xfb, but the kernel to my knowledge accepts only > keycodes in the range 0x01 - 0x7f, so the original code already did a > remapping of the LK201 raw codes (it delivered the key numbers from the > top left to the downmost right keys, i.e. F1=1, F2=2, F3=3 etc.). This may be reasonable for the pc_keyb.c driver, but we don't use it, do we? > This means that the XFree LK201 mapping did not work, and if we have > to remap keycodes anyway into the range 0x01-0x7f, using a PC-compatible > keymap seemed the best solution to me. Then the kernel needs to be fixed -- raw scancodes should be passed as is and the translation should be done in kbd_translate(). I'm adding it to my to-do list (to be resolved soon, hopefully, together with the annoying indefinite timeout when no keyboard is attached). -- + Maciej W. Rozycki, Technical University of Gdansk, Poland + +--------------------------------------------------------------+ + e-mail: macro@ds2.pg.gda.pl, PGP key available + From owner-linux-mips@oss.sgi.com Mon Feb 11 08:08:30 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g1BG8U411929 for linux-mips-outgoing; Mon, 11 Feb 2002 08:08:30 -0800 Received: from aretha.informatik.uni-siegen.de (aretha.informatik.Uni-Siegen.DE [141.99.92.8]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g1BG87911925 for ; Mon, 11 Feb 2002 08:08:23 -0800 Received: (from engel@localhost) by aretha.informatik.uni-siegen.de (Mailhost) id QAA214284; Mon, 11 Feb 2002 16:07:15 +0100 (MET) Date: Mon, 11 Feb 2002 16:07:15 +0100 From: Michael Engel To: "Maciej W. Rozycki" Cc: Karsten Merker , linux-mips@oss.sgi.com Subject: Re: DECstation keyboard mappings and XFree Message-ID: <20020211160715.A214199@aretha.informatik.uni-siegen.de> References: <20020211152621.A14342@excalibur.cologne.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.2i In-Reply-To: ; from macro@ds2.pg.gda.pl on Mon, Feb 11, 2002 at 03:49:19PM +0100 Sender: owner-linux-mips@oss.sgi.com Precedence: bulk Hi, On Mon, Feb 11, 2002 at 03:49:19PM +0100, Maciej W. Rozycki wrote: > On Mon, 11 Feb 2002, Karsten Merker wrote: > > > > Hmm, why do you need (sh*tty) PC-compatible keycodes for a keaboard that > > > barely resembles a PC keyboard? AFAIK, XFree86 has appropriate LK201 > > > keymaps -- see "/usr/X11R6/lib/X11/xkb/*/digital/*". > > > > Because the original code does not deliver LK201 keycodes - LK201 keycodes > > are in the range 0x55 - 0xfb, but the kernel to my knowledge accepts only > > keycodes in the range 0x01 - 0x7f, so the original code already did a > > remapping of the LK201 raw codes (it delivered the key numbers from the > > top left to the downmost right keys, i.e. F1=1, F2=2, F3=3 etc.). > > This may be reasonable for the pc_keyb.c driver, but we don't use it, do > we? Unfortunately, handle_scancode still uses the 0x80 bit internally to indicate key up transisitions (see drivers/char/keyboard.c). So IMHO only keycodes <= 0x7f are usable. Same problem with Access.Bus LK501 keyboards, btw. > > This means that the XFree LK201 mapping did not work, and if we have > > to remap keycodes anyway into the range 0x01-0x7f, using a PC-compatible > > keymap seemed the best solution to me. > > Then the kernel needs to be fixed -- raw scancodes should be passed as is > and the translation should be done in kbd_translate(). I'm adding it to > my to-do list (to be resolved soon, hopefully, together with the annoying > indefinite timeout when no keyboard is attached). Hmmm, this change would probably affect a lot of the console infrastructure. I'm still waiting for the promised rewritten console code in 2.5 ;-). regards, Michael From owner-linux-mips@oss.sgi.com Mon Feb 11 08:08:54 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g1BG8s611944 for linux-mips-outgoing; Mon, 11 Feb 2002 08:08:54 -0800 Received: from mail.sonytel.be (mail.sonytel.be [193.74.243.200]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g1BG8l911941 for ; Mon, 11 Feb 2002 08:08:48 -0800 Received: from vervain.sonytel.be (mail.sonytel.be [10.17.0.26]) by mail.sonytel.be (8.9.0/8.8.6) with ESMTP id QAA21003; Mon, 11 Feb 2002 16:07:00 +0100 (MET) Date: Mon, 11 Feb 2002 16:07:00 +0100 (MET) From: Geert Uytterhoeven To: "Maciej W. Rozycki" cc: Karsten Merker , Linux/MIPS Development Subject: Re: DECstation keyboard mappings and XFree In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-linux-mips@oss.sgi.com Precedence: bulk On Mon, 11 Feb 2002, Maciej W. Rozycki wrote: > On Mon, 11 Feb 2002, Karsten Merker wrote: > > > Hmm, why do you need (sh*tty) PC-compatible keycodes for a keaboard that > > > barely resembles a PC keyboard? AFAIK, XFree86 has appropriate LK201 > > > keymaps -- see "/usr/X11R6/lib/X11/xkb/*/digital/*". > > > > Because the original code does not deliver LK201 keycodes - LK201 keycodes > > are in the range 0x55 - 0xfb, but the kernel to my knowledge accepts only > > keycodes in the range 0x01 - 0x7f, so the original code already did a > > remapping of the LK201 raw codes (it delivered the key numbers from the > > top left to the downmost right keys, i.e. F1=1, F2=2, F3=3 etc.). > > This may be reasonable for the pc_keyb.c driver, but we don't use it, do > we? > > > This means that the XFree LK201 mapping did not work, and if we have > > to remap keycodes anyway into the range 0x01-0x7f, using a PC-compatible > > keymap seemed the best solution to me. > > Then the kernel needs to be fixed -- raw scancodes should be passed as is > and the translation should be done in kbd_translate(). I'm adding it to > my to-do list (to be resolved soon, hopefully, together with the annoying > indefinite timeout when no keyboard is attached). The keyboard mid-layer assumes keycodes are in the range 1-127 (with some minor hack 0 can be made to work, cfr. Amiga keboards). Bit 7 is used to differentiate between up and down events. This means you cannot get keyboards with more than 128 keys to work (e.g. some specialized keyboards for old workstations). Perhaps it's different in the new input layer. I don't know. 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 owner-linux-mips@oss.sgi.com Mon Feb 11 08:11:07 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g1BGB7212086 for linux-mips-outgoing; Mon, 11 Feb 2002 08:11:07 -0800 Received: from delta.ds2.pg.gda.pl (macro@delta.ds2.pg.gda.pl [213.192.72.1]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g1BGAv912082 for ; Mon, 11 Feb 2002 08:10:57 -0800 Received: from localhost by delta.ds2.pg.gda.pl (8.9.3/8.9.3) with SMTP id QAA23750; Mon, 11 Feb 2002 16:10:37 +0100 (MET) Date: Mon, 11 Feb 2002 16:10:34 +0100 (MET) From: "Maciej W. Rozycki" To: Johannes Stezenbach cc: Florian Lohoff , linux-mips@oss.sgi.com Subject: Re: gcc include strangeness In-Reply-To: <20020211142708.GA2577@convergence.de> Message-ID: Organization: Technical University of Gdansk MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-linux-mips@oss.sgi.com Precedence: bulk On Mon, 11 Feb 2002, Johannes Stezenbach wrote: > The glibc-2.2.5/FAQ says: > 1.20. Which tools should I use for MIPS? > > {AJ} You should use the current development version of gcc 3.0 or newer from > CVS. gcc 2.95.x does not work correctly on mips-linux. Is gcc 3.x already stable enough to be used by people not directly involved in gcc development? More specifically for MIPS/Linux and i386/Linux, for both the kernel and the userland? I'm told it is not. > I'm not shure if this only applies to glibc, but the > gcc-2.95.x I tried to build could not even compile a kernel > because of: > #ifndef __linux__ > #error Use a Linux compiler or give up. > #endif > in linux/include/asm-mips/sgidefs.h. The gcc-3.0.3 I now use > has a totally different set of predefines than gcc-2.95.x, and > it seems to work. Gcc 2.95.x as distributed certainly doesn't work. With a set of patches it appears rock solid. For MIPS/Linux I'm using it for over two years for both the kernel and the userland. The last time I found bug and needed to apply a fix to gcc 2.95.3 for MIPS/Linux was in April 2001. With gcc 2.95.3 if I spot a weird behaviour, I'm pretty confident it's a bug in the kernel or in user code, and not the compiler generating bad code. > gcc-3.x does not use va-mips.h or sgidefs,h, but simply > has the following in stdarg.h: > #define va_start(v,l) __builtin_stdarg_start((v),l) > #define va_end __builtin_va_end > #define va_arg __builtin_va_arg > etc. Thanks for the info. -- + Maciej W. Rozycki, Technical University of Gdansk, Poland + +--------------------------------------------------------------+ + e-mail: macro@ds2.pg.gda.pl, PGP key available + From owner-linux-mips@oss.sgi.com Mon Feb 11 08:36:29 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g1BGaTi13005 for linux-mips-outgoing; Mon, 11 Feb 2002 08:36:29 -0800 Received: from delta.ds2.pg.gda.pl (macro@delta.ds2.pg.gda.pl [213.192.72.1]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g1BGaN913002 for ; Mon, 11 Feb 2002 08:36:26 -0800 Received: from localhost by delta.ds2.pg.gda.pl (8.9.3/8.9.3) with SMTP id QAA24431; Mon, 11 Feb 2002 16:36:13 +0100 (MET) Date: Mon, 11 Feb 2002 16:36:13 +0100 (MET) From: "Maciej W. Rozycki" To: Geert Uytterhoeven cc: Karsten Merker , Linux/MIPS Development Subject: Re: DECstation keyboard mappings and XFree In-Reply-To: Message-ID: Organization: Technical University of Gdansk MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-linux-mips@oss.sgi.com Precedence: bulk On Mon, 11 Feb 2002, Geert Uytterhoeven wrote: > The keyboard mid-layer assumes keycodes are in the range 1-127 (with some minor > hack 0 can be made to work, cfr. Amiga keboards). Bit 7 is used to > differentiate between up and down events. This means you cannot get keyboards > with more than 128 keys to work (e.g. some specialized keyboards for old > workstations). But the raw scancode should be passed as is. A brief look at drivers/char/keyboard.c suggests it's doable without breaking anything. Keycodes seem to be limited to 1 - 127, but it's not a problem -- LK keyboards do not have that many keys. -- + Maciej W. Rozycki, Technical University of Gdansk, Poland + +--------------------------------------------------------------+ + e-mail: macro@ds2.pg.gda.pl, PGP key available + From owner-linux-mips@oss.sgi.com Mon Feb 11 08:41:21 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g1BGfLx13099 for linux-mips-outgoing; Mon, 11 Feb 2002 08:41:21 -0800 Received: from delta.ds2.pg.gda.pl (macro@delta.ds2.pg.gda.pl [213.192.72.1]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g1BGf9913094 for ; Mon, 11 Feb 2002 08:41:10 -0800 Received: from localhost by delta.ds2.pg.gda.pl (8.9.3/8.9.3) with SMTP id QAA24488; Mon, 11 Feb 2002 16:39:27 +0100 (MET) Date: Mon, 11 Feb 2002 16:39:27 +0100 (MET) From: "Maciej W. Rozycki" To: Michael Engel cc: Karsten Merker , linux-mips@oss.sgi.com Subject: Re: DECstation keyboard mappings and XFree In-Reply-To: <20020211160715.A214199@aretha.informatik.uni-siegen.de> Message-ID: Organization: Technical University of Gdansk MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-linux-mips@oss.sgi.com Precedence: bulk On Mon, 11 Feb 2002, Michael Engel wrote: > > Then the kernel needs to be fixed -- raw scancodes should be passed as is > > and the translation should be done in kbd_translate(). I'm adding it to > > my to-do list (to be resolved soon, hopefully, together with the annoying > > indefinite timeout when no keyboard is attached). > > Hmmm, this change would probably affect a lot of the console > infrastructure. I'm still waiting for the promised rewritten console > code in 2.5 ;-). Not at all. There is only a small bug that needs to be fixed in drivers/char/keyboard.c. -- + Maciej W. Rozycki, Technical University of Gdansk, Poland + +--------------------------------------------------------------+ + e-mail: macro@ds2.pg.gda.pl, PGP key available + From owner-linux-mips@oss.sgi.com Mon Feb 11 08:53:29 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g1BGrTw13288 for linux-mips-outgoing; Mon, 11 Feb 2002 08:53:29 -0800 Received: from noose.gt.owl.de (postfix@noose.gt.owl.de [62.52.19.4]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g1BGrO913285 for ; Mon, 11 Feb 2002 08:53:24 -0800 Received: by noose.gt.owl.de (Postfix, from userid 10) id E8A03836; Mon, 11 Feb 2002 16:53:02 +0100 (CET) Received: by paradigm.rfc822.org (Postfix, from userid 1000) id BC3EB4292; Mon, 11 Feb 2002 16:37:32 +0100 (CET) Date: Mon, 11 Feb 2002 16:37:32 +0100 From: Florian Lohoff To: Johannes Stezenbach , "Maciej W. Rozycki" , linux-mips@oss.sgi.com Subject: Re: gcc include strangeness Message-ID: <20020211153732.GA31248@paradigm.rfc822.org> References: <20020209150155.GA853@paradigm.rfc822.org> <20020211135302.GB30314@paradigm.rfc822.org> <20020211142708.GA2577@convergence.de> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="d6Gm4EdcadzBjdND" Content-Disposition: inline In-Reply-To: <20020211142708.GA2577@convergence.de> User-Agent: Mutt/1.3.27i Organization: rfc822 - pure communication Sender: owner-linux-mips@oss.sgi.com Precedence: bulk --d6Gm4EdcadzBjdND Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Feb 11, 2002 at 03:27:08PM +0100, Johannes Stezenbach wrote: >=20 > The glibc-2.2.5/FAQ says: > 1.20. Which tools should I use for MIPS? >=20 > {AJ} You should use the current development version of gcc 3.0 or newer= from > CVS. gcc 2.95.x does not work correctly on mips-linux. >=20 Its not about gcc development but rather keeping a distribution in sync. All Debian archs try to use the same compiler which is currently 2.95.4 which we are happy with right now - Except some minor issues breaking 2-3 Packages ... Flo --=20 Florian Lohoff flo@rfc822.org +49-5201-669912 Nine nineth on september the 9th Welcome to the new billenium --d6Gm4EdcadzBjdND Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.6 (GNU/Linux) Comment: For info see http://www.gnupg.org iD8DBQE8Z+U8Uaz2rXW+gJcRAqa2AJ0TKnxZ/GCWuKkVmT4SFsJo5OnNqACcCSfU U9OAznrWIVqq8V8tvuEFjj0= =zSgo -----END PGP SIGNATURE----- --d6Gm4EdcadzBjdND-- From owner-linux-mips@oss.sgi.com Mon Feb 11 08:58:24 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g1BGwOS13471 for linux-mips-outgoing; Mon, 11 Feb 2002 08:58:24 -0800 Received: from deliverator.sgi.com (deliverator.sgi.com [204.94.214.10]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g1BGvv913465 for ; Mon, 11 Feb 2002 08:57:57 -0800 Received: from delta.ds2.pg.gda.pl (macro@delta.ds2.pg.gda.pl [213.192.72.1]) by deliverator.sgi.com (980309.SGI.8.8.8-aspam-6.2/980310.SGI-aspam) via ESMTP id HAA23298 for ; Mon, 11 Feb 2002 07:53:27 -0800 (PST) mail_from (macro@ds2.pg.gda.pl) Received: from localhost by delta.ds2.pg.gda.pl (8.9.3/8.9.3) with SMTP id QAA24645; Mon, 11 Feb 2002 16:45:54 +0100 (MET) Date: Mon, 11 Feb 2002 16:45:54 +0100 (MET) From: "Maciej W. Rozycki" To: Ralf Baechle cc: linux-mips@fnet.fr, linux-mips@oss.sgi.com Subject: [patch] linux 2.4.17: The second mb() rework (final) Message-ID: Organization: Technical University of Gdansk MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-linux-mips@oss.sgi.com Precedence: bulk Ralf, I haven't seen any objections. Could you please apply it? Maciej -- + Maciej W. Rozycki, Technical University of Gdansk, Poland + +--------------------------------------------------------------+ + e-mail: macro@ds2.pg.gda.pl, PGP key available + patch-mips-2.4.17-20020129-mb-wb-5 diff -up --recursive --new-file linux-mips-2.4.17-20020129.macro/arch/mips/config.in linux-mips-2.4.17-20020129/arch/mips/config.in --- linux-mips-2.4.17-20020129.macro/arch/mips/config.in Fri Jan 25 05:26:34 2002 +++ linux-mips-2.4.17-20020129/arch/mips/config.in Mon Feb 4 00:07:13 2002 @@ -384,6 +384,12 @@ else fi fi fi +if [ "$CONFIG_CPU_R3000" = "y" -o \ + "$CONFIG_CPU_TX39XX" = "y" ]; then + define_bool CONFIG_CPU_HAS_SYNC n +else + define_bool CONFIG_CPU_HAS_SYNC y +fi endmenu mainmenu_option next_comment diff -up --recursive --new-file linux-mips-2.4.17-20020129.macro/include/asm-mips/system.h linux-mips-2.4.17-20020129/include/asm-mips/system.h --- linux-mips-2.4.17-20020129.macro/include/asm-mips/system.h Sun Jan 27 05:27:59 2002 +++ linux-mips-2.4.17-20020129/include/asm-mips/system.h Mon Feb 4 02:10:33 2002 @@ -18,9 +18,12 @@ #include #include -#include + #include +#include +#include + __asm__ ( ".macro\t__sti\n\t" ".set\tpush\n\t" @@ -166,32 +169,57 @@ extern void __global_restore_flags(unsig #define local_irq_disable() __cli(); #define local_irq_enable() __sti(); -/* - * These are probably defined overly paranoid ... - */ +#ifdef CONFIG_CPU_HAS_SYNC +#define __sync() \ + __asm__ __volatile__( \ + ".set push\n\t" \ + ".set noreorder\n\t" \ + "sync\n\t" \ + ".set pop" \ + : /* no output */ \ + : /* no input */ \ + : "memory") +#else +#define __sync() do { } while(0) +#endif + +#define __fast_iob() \ + __asm__ __volatile__( \ + ".set push\n\t" \ + ".set noreorder\n\t" \ + "lw $0,%0\n\t" \ + "nop\n\t" \ + ".set pop" \ + : /* no output */ \ + : "m" (*(int *)KSEG1) \ + : "memory") + +#define fast_wmb() __sync() +#define fast_rmb() __sync() +#define fast_mb() __sync() +#define fast_iob() \ + do { \ + __sync(); \ + __fast_iob(); \ + } while (0) + #ifdef CONFIG_CPU_HAS_WB #include -#define rmb() do { } while(0) -#define wmb() wbflush() -#define mb() wbflush() - -#else /* CONFIG_CPU_HAS_WB */ - -#define mb() \ -__asm__ __volatile__( \ - "# prevent instructions being moved around\n\t" \ - ".set\tnoreorder\n\t" \ - "# 8 nops to fool the R4400 pipeline\n\t" \ - "nop;nop;nop;nop;nop;nop;nop;nop\n\t" \ - ".set\treorder" \ - : /* no output */ \ - : /* no input */ \ - : "memory") -#define rmb() mb() -#define wmb() mb() -#endif /* CONFIG_CPU_HAS_WB */ +#define wmb() fast_wmb() +#define rmb() fast_rmb() +#define mb() wbflush(); +#define iob() wbflush(); + +#else /* !CONFIG_CPU_HAS_WB */ + +#define wmb() fast_wmb() +#define rmb() fast_rmb() +#define mb() fast_mb() +#define iob() fast_iob() + +#endif /* !CONFIG_CPU_HAS_WB */ #ifdef CONFIG_SMP #define smp_mb() mb() diff -up --recursive --new-file linux-mips-2.4.17-20020129.macro/include/asm-mips/wbflush.h linux-mips-2.4.17-20020129/include/asm-mips/wbflush.h --- linux-mips-2.4.17-20020129.macro/include/asm-mips/wbflush.h Fri Sep 7 04:26:33 2001 +++ linux-mips-2.4.17-20020129/include/asm-mips/wbflush.h Mon Feb 4 02:52:11 2002 @@ -6,29 +6,30 @@ * for more details. * * Copyright (c) 1998 Harald Koerfgen + * Copyright (C) 2002 Maciej W. Rozycki */ #ifndef __ASM_MIPS_WBFLUSH_H #define __ASM_MIPS_WBFLUSH_H #include -#if defined(CONFIG_CPU_HAS_WB) -/* - * R2000 or R3000 - */ -extern void (*__wbflush) (void); +#ifdef CONFIG_CPU_HAS_WB -#define wbflush() __wbflush() +extern void (*__wbflush)(void); +extern void wbflush_setup(void); -#else -/* - * we don't need no stinkin' wbflush - */ +#define wbflush() \ + do { \ + __sync(); \ + __wbflush(); \ + } while (0) -#define wbflush() do { } while(0) +#else /* !CONFIG_CPU_HAS_WB */ -#endif +#define wbflush_setup() do { } while (0) -extern void wbflush_setup(void); +#define wbflush() fast_iob() + +#endif /* !CONFIG_CPU_HAS_WB */ #endif /* __ASM_MIPS_WBFLUSH_H */ diff -up --recursive --new-file linux-mips-2.4.17-20020129.macro/include/asm-mips64/system.h linux-mips-2.4.17-20020129/include/asm-mips64/system.h --- linux-mips-2.4.17-20020129.macro/include/asm-mips64/system.h Sun Jan 27 05:27:59 2002 +++ linux-mips-2.4.17-20020129/include/asm-mips64/system.h Mon Feb 4 02:12:27 2002 @@ -11,12 +11,13 @@ #define _ASM_SYSTEM_H #include - #include -#include #include +#include +#include + __asm__ ( ".macro\t__sti\n\t" ".set\tpush\n\t" @@ -163,20 +164,32 @@ extern void __global_restore_flags(unsig #define local_irq_disable() __cli(); #define local_irq_enable() __sti(); -/* - * These are probably defined overly paranoid ... - */ -#define mb() \ -__asm__ __volatile__( \ - "# prevent instructions being moved around\n\t" \ - ".set\tnoreorder\n\t" \ - "sync\n\t" \ - ".set\treorder" \ - : /* no output */ \ - : /* no input */ \ - : "memory") -#define rmb() mb() -#define wmb() mb() +#define __sync() \ + __asm__ __volatile__( \ + ".set push\n\t" \ + ".set noreorder\n\t" \ + "sync\n\t" \ + ".set pop" \ + : /* no output */ \ + : /* no input */ \ + : "memory") + +#define wmb() __sync() +#define rmb() __sync() +#define mb() __sync() +#define iob() \ + do { \ + __sync(); \ + __asm__ __volatile__( \ + ".set push\n\t" \ + ".set noreorder\n\t" \ + "lw $0,%0\n\t" \ + "nop\n\t" \ + ".set pop" \ + : /* no output */ \ + : "m" (*(int *)KSEG1) \ + : "memory"); \ + } while (0) #ifdef CONFIG_SMP #define smp_mb() mb() From owner-linux-mips@oss.sgi.com Mon Feb 11 09:29:14 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g1BHTEA13946 for linux-mips-outgoing; Mon, 11 Feb 2002 09:29:14 -0800 Received: from hell (buserror-extern.convergence.de [212.84.236.66]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g1BHT9913943 for ; Mon, 11 Feb 2002 09:29:09 -0800 Received: from js by hell with local (Exim 3.33 #1 (Debian)) id 16aJJs-0000nH-00; Mon, 11 Feb 2002 17:28:44 +0100 Date: Mon, 11 Feb 2002 17:28:44 +0100 From: Johannes Stezenbach To: "Maciej W. Rozycki" Cc: Florian Lohoff , linux-mips@oss.sgi.com Subject: Re: gcc include strangeness Message-ID: <20020211162844.GD2918@convergence.de> Mail-Followup-To: Johannes Stezenbach , "Maciej W. Rozycki" , Florian Lohoff , linux-mips@oss.sgi.com References: <20020211142708.GA2577@convergence.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.3.27i Sender: owner-linux-mips@oss.sgi.com Precedence: bulk On Mon, Feb 11, 2002 at 04:10:34PM +0100, Maciej W. Rozycki wrote: > > Is gcc 3.x already stable enough to be used by people not directly > involved in gcc development? More specifically for MIPS/Linux and > i386/Linux, for both the kernel and the userland? I'm told it is not. I'm reading about gcc 3.x code generation bugs every now and then, but so far I did not hit any of them. I would prefer gcc 2.95.x though, if I only could get it to work on MIPS. > Gcc 2.95.x as distributed certainly doesn't work. With a set of patches > it appears rock solid. For MIPS/Linux I'm using it for over two years for > both the kernel and the userland. The last time I found bug and needed to > apply a fix to gcc 2.95.3 for MIPS/Linux was in April 2001. I would certainly be interested in getting my hands on those patches. Do you mind if I ask why they did not go into gcc-2_95-branch CVS? Regards, Johannes From owner-linux-mips@oss.sgi.com Mon Feb 11 09:53:37 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g1BHrbW15206 for linux-mips-outgoing; Mon, 11 Feb 2002 09:53:37 -0800 Received: from hell (buserror-extern.convergence.de [212.84.236.66]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g1BHrY915197 for ; Mon, 11 Feb 2002 09:53:34 -0800 Received: from js by hell with local (Exim 3.33 #1 (Debian)) id 16aJhl-0000rU-00; Mon, 11 Feb 2002 17:53:25 +0100 Date: Mon, 11 Feb 2002 17:53:25 +0100 From: Johannes Stezenbach To: Florian Lohoff Cc: "Maciej W. Rozycki" , linux-mips@oss.sgi.com Subject: Re: gcc include strangeness Message-ID: <20020211165325.GB3261@convergence.de> Mail-Followup-To: Johannes Stezenbach , Florian Lohoff , "Maciej W. Rozycki" , linux-mips@oss.sgi.com References: <20020209150155.GA853@paradigm.rfc822.org> <20020211135302.GB30314@paradigm.rfc822.org> <20020211142708.GA2577@convergence.de> <20020211153732.GA31248@paradigm.rfc822.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20020211153732.GA31248@paradigm.rfc822.org> User-Agent: Mutt/1.3.27i Sender: owner-linux-mips@oss.sgi.com Precedence: bulk On Mon, Feb 11, 2002 at 04:37:32PM +0100, Florian Lohoff wrote: > On Mon, Feb 11, 2002 at 03:27:08PM +0100, Johannes Stezenbach wrote: > > > > The glibc-2.2.5/FAQ says: > > 1.20. Which tools should I use for MIPS? > > > > {AJ} You should use the current development version of gcc 3.0 or newer from > > CVS. gcc 2.95.x does not work correctly on mips-linux. > > > > Its not about gcc development but rather keeping a distribution in > sync. All Debian archs try to use the same compiler which is currently > 2.95.4 which we are happy with right now - Except some minor issues > breaking 2-3 Packages ... So does this mean that Debian's gcc 2.95.4 works on MIPS? Does it include patches which are not in CVS (gcc-2_95-branch)? Regards, Johannes From owner-linux-mips@oss.sgi.com Mon Feb 11 10:06:55 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g1BI6tl07215 for linux-mips-outgoing; Mon, 11 Feb 2002 10:06:55 -0800 Received: from delta.ds2.pg.gda.pl (macro@delta.ds2.pg.gda.pl [213.192.72.1]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g1BI6j907212 for ; Mon, 11 Feb 2002 10:06:48 -0800 Received: from localhost by delta.ds2.pg.gda.pl (8.9.3/8.9.3) with SMTP id SAA26492; Mon, 11 Feb 2002 18:06:35 +0100 (MET) Date: Mon, 11 Feb 2002 18:06:34 +0100 (MET) From: "Maciej W. Rozycki" To: Johannes Stezenbach cc: Florian Lohoff , linux-mips@oss.sgi.com Subject: Re: gcc include strangeness In-Reply-To: <20020211162844.GD2918@convergence.de> Message-ID: Organization: Technical University of Gdansk MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-linux-mips@oss.sgi.com Precedence: bulk On Mon, 11 Feb 2002, Johannes Stezenbach wrote: > I would certainly be interested in getting my hands on those > patches. Do you mind if I ask why they did not go into > gcc-2_95-branch CVS? RPM packages are available at my site -- "ftp://ftp.ds2.pg.gda.pl/pub/macro/". They used to be recommended tools for glibc 2.2 for MIPS/Linux before gcc 3.0 was released. As to why they did not go into the CVS? Well, I wasn't aware gcc 2.95.x was maintained until after 2.95.3 was released (but patches that were relevant either went in to 2.96 or were rejected). And now we have 3.x. If 2.95.x is still maintained and you feel the patches would be useful for inclusion, feel free to commit them. The change log in the spec file contains descriptions of the purpose of every patch. Maciej -- + Maciej W. Rozycki, Technical University of Gdansk, Poland + +--------------------------------------------------------------+ + e-mail: macro@ds2.pg.gda.pl, PGP key available + From owner-linux-mips@oss.sgi.com Mon Feb 11 10:08:36 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g1BI8ag07288 for linux-mips-outgoing; Mon, 11 Feb 2002 10:08:36 -0800 Received: from gandalf.physik.uni-konstanz.de (gandalf.physik.uni-konstanz.de [134.34.144.69]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g1BI8V907282 for ; Mon, 11 Feb 2002 10:08:31 -0800 Received: from agx by gandalf.physik.uni-konstanz.de with local (Exim 3.12 #1 (Debian)) id 16aJwL-0005gu-00; Mon, 11 Feb 2002 18:08:29 +0100 Date: Mon, 11 Feb 2002 18:08:29 +0100 From: Guido Guenther To: linux-mips@oss.sgi.com Subject: Re: gcc include strangeness Message-ID: <20020211180829.A21744@gandalf.physik.uni-konstanz.de> Mail-Followup-To: linux-mips@oss.sgi.com References: <20020209150155.GA853@paradigm.rfc822.org> <20020211135302.GB30314@paradigm.rfc822.org> <20020211142708.GA2577@convergence.de> <20020211153732.GA31248@paradigm.rfc822.org> <20020211165325.GB3261@convergence.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <20020211165325.GB3261@convergence.de>; from js@convergence.de on Mon, Feb 11, 2002 at 05:53:25PM +0100 Sender: owner-linux-mips@oss.sgi.com Precedence: bulk On Mon, Feb 11, 2002 at 05:53:25PM +0100, Johannes Stezenbach wrote: > On Mon, Feb 11, 2002 at 04:37:32PM +0100, Florian Lohoff wrote: > > On Mon, Feb 11, 2002 at 03:27:08PM +0100, Johannes Stezenbach wrote: > > > > > > The glibc-2.2.5/FAQ says: > > > 1.20. Which tools should I use for MIPS? > > > > > > {AJ} You should use the current development version of gcc 3.0 or newer from > > > CVS. gcc 2.95.x does not work correctly on mips-linux. > > > > > > > Its not about gcc development but rather keeping a distribution in > > sync. All Debian archs try to use the same compiler which is currently > > 2.95.4 which we are happy with right now - Except some minor issues > > breaking 2-3 Packages ... > > So does this mean that Debian's gcc 2.95.4 works on MIPS? The whole distribution is compiled with 2.95.4. > Does it include patches which are not in CVS (gcc-2_95-branch)? Yes. See the debian/patches directory after unpacking the source-package. -- Guido From owner-linux-mips@oss.sgi.com Mon Feb 11 10:18:15 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g1BIIF607492 for linux-mips-outgoing; Mon, 11 Feb 2002 10:18:15 -0800 Received: from deliverator.sgi.com (deliverator.sgi.com [204.94.214.10]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g1BIIB907488 for ; Mon, 11 Feb 2002 10:18:11 -0800 Received: from delta.ds2.pg.gda.pl (macro@delta.ds2.pg.gda.pl [213.192.72.1]) by deliverator.sgi.com (980309.SGI.8.8.8-aspam-6.2/980310.SGI-aspam) via ESMTP id JAA28413 for ; Mon, 11 Feb 2002 09:13:41 -0800 (PST) mail_from (macro@ds2.pg.gda.pl) Received: from localhost by delta.ds2.pg.gda.pl (8.9.3/8.9.3) with SMTP id SAA26492; Mon, 11 Feb 2002 18:06:35 +0100 (MET) Date: Mon, 11 Feb 2002 18:06:34 +0100 (MET) From: "Maciej W. Rozycki" To: Johannes Stezenbach cc: Florian Lohoff , linux-mips@oss.sgi.com Subject: Re: gcc include strangeness In-Reply-To: <20020211162844.GD2918@convergence.de> Message-ID: Organization: Technical University of Gdansk MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-linux-mips@oss.sgi.com Precedence: bulk On Mon, 11 Feb 2002, Johannes Stezenbach wrote: > I would certainly be interested in getting my hands on those > patches. Do you mind if I ask why they did not go into > gcc-2_95-branch CVS? RPM packages are available at my site -- "ftp://ftp.ds2.pg.gda.pl/pub/macro/". They used to be recommended tools for glibc 2.2 for MIPS/Linux before gcc 3.0 was released. As to why they did not go into the CVS? Well, I wasn't aware gcc 2.95.x was maintained until after 2.95.3 was released (but patches that were relevant either went in to 2.96 or were rejected). And now we have 3.x. If 2.95.x is still maintained and you feel the patches would be useful for inclusion, feel free to commit them. The change log in the spec file contains descriptions of the purpose of every patch. Maciej -- + Maciej W. Rozycki, Technical University of Gdansk, Poland + +--------------------------------------------------------------+ + e-mail: macro@ds2.pg.gda.pl, PGP key available + From owner-linux-mips@oss.sgi.com Mon Feb 11 12:23:40 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g1BKNe310318 for linux-mips-outgoing; Mon, 11 Feb 2002 12:23:40 -0800 Received: from host099.momenco.com (IDENT:root@www.momenco.com [64.169.228.99]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g1BKNA910310 for ; Mon, 11 Feb 2002 12:23:10 -0800 Received: from beagle (beagle.internal.momenco.com [192.168.0.115]) by host099.momenco.com (8.11.6/8.11.6) with SMTP id g1BJMZR10170; Mon, 11 Feb 2002 11:22:35 -0800 From: "Matthew Dharm" To: "Maciej W. Rozycki" , "Ralf Baechle" Cc: , Subject: RE: [patch] linux 2.4.17: The second mb() rework (final) Date: Mon, 11 Feb 2002 11:22:34 -0800 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0) X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400 In-Reply-To: Importance: Normal Sender: owner-linux-mips@oss.sgi.com Precedence: bulk My only comment about this is: Aren't there more processors that have sync? I thought the RM7000 (PMC-Sierra) did too... Matt -- Matthew D. Dharm Senior Software Designer Momentum Computer Inc. 1815 Aston Ave. Suite 107 (760) 431-8663 X-115 Carlsbad, CA 92008-7310 Momentum Works For You www.momenco.com > -----Original Message----- > From: owner-linux-mips@oss.sgi.com > [mailto:owner-linux-mips@oss.sgi.com]On Behalf Of Maciej W. Rozycki > Sent: Monday, February 11, 2002 7:46 AM > To: Ralf Baechle > Cc: linux-mips@fnet.fr; linux-mips@oss.sgi.com > Subject: [patch] linux 2.4.17: The second mb() rework (final) > > > Ralf, > > I haven't seen any objections. Could you please apply it? > > Maciej > > -- > + Maciej W. Rozycki, Technical University of Gdansk, Poland + > +--------------------------------------------------------------+ > + e-mail: macro@ds2.pg.gda.pl, PGP key available + > > patch-mips-2.4.17-20020129-mb-wb-5 > diff -up --recursive --new-file > linux-mips-2.4.17-20020129.macro/arch/mips/config.in > linux-mips-2.4.17-20020129/arch/mips/config.in > --- linux-mips-2.4.17-20020129.macro/arch/mips/config.in > Fri Jan 25 05:26:34 2002 > +++ linux-mips-2.4.17-20020129/arch/mips/config.in Mon > Feb 4 00:07:13 2002 > @@ -384,6 +384,12 @@ else > fi > fi > fi > +if [ "$CONFIG_CPU_R3000" = "y" -o \ > + "$CONFIG_CPU_TX39XX" = "y" ]; then > + define_bool CONFIG_CPU_HAS_SYNC n > +else > + define_bool CONFIG_CPU_HAS_SYNC y > +fi > endmenu > > mainmenu_option next_comment > diff -up --recursive --new-file > linux-mips-2.4.17-20020129.macro/include/asm-mips/system.h > linux-mips-2.4.17-20020129/include/asm-mips/system.h > --- > linux-mips-2.4.17-20020129.macro/include/asm-mips/system.h > Sun Jan 27 05:27:59 2002 > +++ linux-mips-2.4.17-20020129/include/asm-mips/system.h > Mon Feb 4 02:10:33 2002 > @@ -18,9 +18,12 @@ > > #include > #include > -#include > + > #include > > +#include > +#include > + > __asm__ ( > ".macro\t__sti\n\t" > ".set\tpush\n\t" > @@ -166,32 +169,57 @@ extern void __global_restore_flags(unsig > #define local_irq_disable() __cli(); > #define local_irq_enable() __sti(); > > -/* > - * These are probably defined overly paranoid ... > - */ > +#ifdef CONFIG_CPU_HAS_SYNC > +#define __sync() \ > + __asm__ __volatile__( \ > + ".set push\n\t" \ > + ".set noreorder\n\t" \ > + "sync\n\t" \ > + ".set pop" \ > + : /* no output */ \ > + : /* no input */ \ > + : "memory") > +#else > +#define __sync() do { } while(0) > +#endif > + > +#define __fast_iob() \ > + __asm__ __volatile__( \ > + ".set push\n\t" \ > + ".set noreorder\n\t" \ > + "lw $0,%0\n\t" \ > + "nop\n\t" \ > + ".set pop" \ > + : /* no output */ \ > + : "m" (*(int *)KSEG1) \ > + : "memory") > + > +#define fast_wmb() __sync() > +#define fast_rmb() __sync() > +#define fast_mb() __sync() > +#define fast_iob() \ > + do { \ > + __sync(); \ > + __fast_iob(); \ > + } while (0) > + > #ifdef CONFIG_CPU_HAS_WB > > #include > -#define rmb() do { } while(0) > -#define wmb() wbflush() > -#define mb() wbflush() > - > -#else /* CONFIG_CPU_HAS_WB */ > - > -#define mb() \ > -__asm__ __volatile__( \ > - "# prevent instructions being moved around\n\t" \ > - ".set\tnoreorder\n\t" \ > - "# 8 nops to fool the R4400 pipeline\n\t" \ > - "nop;nop;nop;nop;nop;nop;nop;nop\n\t" \ > - ".set\treorder" \ > - : /* no output */ \ > - : /* no input */ \ > - : "memory") > -#define rmb() mb() > -#define wmb() mb() > > -#endif /* CONFIG_CPU_HAS_WB */ > +#define wmb() fast_wmb() > +#define rmb() fast_rmb() > +#define mb() wbflush(); > +#define iob() wbflush(); > + > +#else /* !CONFIG_CPU_HAS_WB */ > + > +#define wmb() fast_wmb() > +#define rmb() fast_rmb() > +#define mb() fast_mb() > +#define iob() fast_iob() > + > +#endif /* !CONFIG_CPU_HAS_WB */ > > #ifdef CONFIG_SMP > #define smp_mb() mb() > diff -up --recursive --new-file > linux-mips-2.4.17-20020129.macro/include/asm-mips/wbflush.h > linux-mips-2.4.17-20020129/include/asm-mips/wbflush.h > --- > linux-mips-2.4.17-20020129.macro/include/asm-mips/wbflush.h > Fri Sep 7 04:26:33 2001 > +++ linux-mips-2.4.17-20020129/include/asm-mips/wbflush.h > Mon Feb 4 02:52:11 2002 > @@ -6,29 +6,30 @@ > * for more details. > * > * Copyright (c) 1998 Harald Koerfgen > + * Copyright (C) 2002 Maciej W. Rozycki > */ > #ifndef __ASM_MIPS_WBFLUSH_H > #define __ASM_MIPS_WBFLUSH_H > > #include > > -#if defined(CONFIG_CPU_HAS_WB) > -/* > - * R2000 or R3000 > - */ > -extern void (*__wbflush) (void); > +#ifdef CONFIG_CPU_HAS_WB > > -#define wbflush() __wbflush() > +extern void (*__wbflush)(void); > +extern void wbflush_setup(void); > > -#else > -/* > - * we don't need no stinkin' wbflush > - */ > +#define wbflush() \ > + do { \ > + __sync(); \ > + __wbflush(); \ > + } while (0) > > -#define wbflush() do { } while(0) > +#else /* !CONFIG_CPU_HAS_WB */ > > -#endif > +#define wbflush_setup() do { } while (0) > > -extern void wbflush_setup(void); > +#define wbflush() fast_iob() > + > +#endif /* !CONFIG_CPU_HAS_WB */ > > #endif /* __ASM_MIPS_WBFLUSH_H */ > diff -up --recursive --new-file > linux-mips-2.4.17-20020129.macro/include/asm-mips64/system.h > linux-mips-2.4.17-20020129/include/asm-mips64/system.h > --- > linux-mips-2.4.17-20020129.macro/include/asm-mips64/system. > h Sun Jan 27 05:27:59 2002 > +++ linux-mips-2.4.17-20020129/include/asm-mips64/system.h > Mon Feb 4 02:12:27 2002 > @@ -11,12 +11,13 @@ > #define _ASM_SYSTEM_H > > #include > - > #include > -#include > > #include > > +#include > +#include > + > __asm__ ( > ".macro\t__sti\n\t" > ".set\tpush\n\t" > @@ -163,20 +164,32 @@ extern void __global_restore_flags(unsig > #define local_irq_disable() __cli(); > #define local_irq_enable() __sti(); > > -/* > - * These are probably defined overly paranoid ... > - */ > -#define mb() \ > -__asm__ __volatile__( \ > - "# prevent instructions being moved around\n\t" \ > - ".set\tnoreorder\n\t" \ > - "sync\n\t" \ > - ".set\treorder" \ > - : /* no output */ \ > - : /* no input */ \ > - : "memory") > -#define rmb() mb() > -#define wmb() mb() > +#define __sync() \ > + __asm__ __volatile__( \ > + ".set push\n\t" \ > + ".set noreorder\n\t" \ > + "sync\n\t" \ > + ".set pop" \ > + : /* no output */ \ > + : /* no input */ \ > + : "memory") > + > +#define wmb() __sync() > +#define rmb() __sync() > +#define mb() __sync() > +#define iob() \ > + do { \ > + __sync(); \ > + __asm__ __volatile__( \ > + ".set push\n\t" \ > + ".set noreorder\n\t" \ > + "lw $0,%0\n\t" \ > + "nop\n\t" \ > + ".set pop" \ > + : /* no output */ \ > + : "m" (*(int *)KSEG1) \ > + : "memory"); \ > + } while (0) > > #ifdef CONFIG_SMP > #define smp_mb() mb() > From owner-linux-mips@oss.sgi.com Mon Feb 11 12:27:37 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g1BKRbS10679 for linux-mips-outgoing; Mon, 11 Feb 2002 12:27:37 -0800 Received: from www.transvirtual.com (root@www.transvirtual.com [206.14.214.140]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g1BKRW910669 for ; Mon, 11 Feb 2002 12:27:32 -0800 Received: from www.transvirtual.com (jsimmons@localhost [127.0.0.1]) by localhost (8.12.0.Beta7/8.12.0.Beta7/Debian 8.12.0.Beta7-1) with ESMTP id g1BJQCn4010977; Mon, 11 Feb 2002 11:26:12 -0800 Received: from localhost (jsimmons@localhost) by www.transvirtual.com (8.12.0.Beta7/8.12.0.Beta7/Debian 8.12.0.Beta7-1) with ESMTP id g1BJQA5C010973; Mon, 11 Feb 2002 11:26:11 -0800 X-Authentication-Warning: www.transvirtual.com: jsimmons owned process doing -bs Date: Mon, 11 Feb 2002 11:26:10 -0800 (PST) From: James Simmons To: Geert Uytterhoeven cc: "Maciej W. Rozycki" , Karsten Merker , Linux/MIPS Development Subject: Re: DECstation keyboard mappings and XFree In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-linux-mips@oss.sgi.com Precedence: bulk > > Then the kernel needs to be fixed -- raw scancodes should be passed as is > > and the translation should be done in kbd_translate(). I'm adding it to > > my to-do list (to be resolved soon, hopefully, together with the annoying > > indefinite timeout when no keyboard is attached). > > The keyboard mid-layer assumes keycodes are in the range 1-127 (with some minor > hack 0 can be made to work, cfr. Amiga keboards). Bit 7 is used to > differentiate between up and down events. This means you cannot get keyboards > with more than 128 keys to work (e.g. some specialized keyboards for old > workstations). > > Perhaps it's different in the new input layer. I don't know. With the input layer the below is translated to what the console system wants. struct input_event { struct timeval time; unsigned short type; unsigned short code; unsigned int value; }; The type field tells us if it is a key or mouse movement etc. The code field is the value of the key. For example if you press the A key you would get KEY_A. Now buttons and keys are considered the same thing. Because of this their is a range for keys and a range for buttons. At present you can have up to 255 types of keys. For buttons and keys you can have 0x1ff buttons. Here the value field represents the states the key press can be in: 0: The key has been released. 1: The key has been pressed. 2: The key has been pressed again. From owner-linux-mips@oss.sgi.com Mon Feb 11 13:10:47 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g1BLAl512189 for linux-mips-outgoing; Mon, 11 Feb 2002 13:10:47 -0800 Received: from dea.linux-mips.net (a1as09-p62.stg.tli.de [195.252.189.62]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g1BLAd912186 for ; Mon, 11 Feb 2002 13:10:42 -0800 Received: (from ralf@localhost) by dea.linux-mips.net (8.11.6/8.11.1) id g1ABBZX12654; Sun, 10 Feb 2002 12:11:35 +0100 Date: Sun, 10 Feb 2002 12:11:34 +0100 From: Ralf Baechle To: Florian Lohoff Cc: linux-mips@oss.sgi.com Subject: Re: gcc include strangeness Message-ID: <20020210121134.B2018@dea.linux-mips.net> References: <20020209150155.GA853@paradigm.rfc822.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <20020209150155.GA853@paradigm.rfc822.org>; from flo@rfc822.org on Sat, Feb 09, 2002 at 04:01:55PM +0100 X-Accept-Language: de,en,fr Sender: owner-linux-mips@oss.sgi.com Precedence: bulk On Sat, Feb 09, 2002 at 04:01:55PM +0100, Florian Lohoff wrote: > i just stumbled when i tried to compile a program (bootloader) with > gcc which uses varargs. I got the error that "sgidefs.h" was missing. > sgidefs.h is contained in the glibc which gets included by va-mips.h > from stdarg.h - I dont think this is correct as i should be able > to compile programs without glibc. > > Shouldnt sgidefs.h or its content be included in the gcc ? There should be a copy of sgidefs.h in /usr/include rsp. for crosscompilers in //include/sgidefs.h. However the gcc varargs stuff has been rewritten completely; the new implementation does no longer try to include sgidefs.h. Ralf From owner-linux-mips@oss.sgi.com Mon Feb 11 15:07:18 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g1BN7IN17808 for linux-mips-outgoing; Mon, 11 Feb 2002 15:07:18 -0800 Received: from dea.linux-mips.net (a1as09-p62.stg.tli.de [195.252.189.62]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g1BN7E917805 for ; Mon, 11 Feb 2002 15:07:14 -0800 Received: (from ralf@localhost) by dea.linux-mips.net (8.11.6/8.11.1) id g1BM4RA05134; Mon, 11 Feb 2002 23:04:27 +0100 Date: Mon, 11 Feb 2002 23:04:27 +0100 From: Ralf Baechle To: "Maciej W. Rozycki" Cc: Florian Lohoff , linux-mips@oss.sgi.com Subject: Re: gcc include strangeness Message-ID: <20020211230427.D4623@dea.linux-mips.net> References: <20020209150155.GA853@paradigm.rfc822.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: ; from macro@ds2.pg.gda.pl on Mon, Feb 11, 2002 at 01:51:47PM +0100 X-Accept-Language: de,en,fr Sender: owner-linux-mips@oss.sgi.com Precedence: bulk On Mon, Feb 11, 2002 at 01:51:47PM +0100, Maciej W. Rozycki wrote: > > i just stumbled when i tried to compile a program (bootloader) with > > gcc which uses varargs. I got the error that "sgidefs.h" was missing. > > sgidefs.h is contained in the glibc which gets included by va-mips.h > > from stdarg.h - I dont think this is correct as i should be able > > to compile programs without glibc. > > Hmm, in 2.95.3 in va-mips.h I see: > > /* Get definitions for _MIPS_SIM_ABI64 etc. */ > #ifdef _MIPS_SIM > #include > #endif > > so you shouldn't need sgidefs.h normally. Or did something get broken for > 3.x? Gcc is supposed to define _MIPS_SIM. Ralf From owner-linux-mips@oss.sgi.com Mon Feb 11 15:10:28 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g1BNASG17914 for linux-mips-outgoing; Mon, 11 Feb 2002 15:10:28 -0800 Received: from dea.linux-mips.net (a1as09-p62.stg.tli.de [195.252.189.62]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g1BNAO917907 for ; Mon, 11 Feb 2002 15:10:25 -0800 Received: (from ralf@localhost) by dea.linux-mips.net (8.11.6/8.11.1) id g1BM7cX05176; Mon, 11 Feb 2002 23:07:38 +0100 Date: Mon, 11 Feb 2002 23:07:38 +0100 From: Ralf Baechle To: "Maciej W. Rozycki" Cc: Johannes Stezenbach , Florian Lohoff , linux-mips@oss.sgi.com Subject: Re: gcc include strangeness Message-ID: <20020211230738.E4623@dea.linux-mips.net> References: <20020211142708.GA2577@convergence.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: ; from macro@ds2.pg.gda.pl on Mon, Feb 11, 2002 at 04:10:34PM +0100 X-Accept-Language: de,en,fr Sender: owner-linux-mips@oss.sgi.com Precedence: bulk On Mon, Feb 11, 2002 at 04:10:34PM +0100, Maciej W. Rozycki wrote: > Is gcc 3.x already stable enough to be used by people not directly > involved in gcc development? More specifically for MIPS/Linux and > i386/Linux, for both the kernel and the userland? I'm told it is not. >From the reports I'm gathering that we should ignore 3.0 and directly go for 3.1. Ralf From owner-linux-mips@oss.sgi.com Mon Feb 11 15:22:45 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g1BNMjI18900 for linux-mips-outgoing; Mon, 11 Feb 2002 15:22:45 -0800 Received: from dea.linux-mips.net (a1as09-p62.stg.tli.de [195.252.189.62]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g1BNMe918896 for ; Mon, 11 Feb 2002 15:22:40 -0800 Received: (from ralf@localhost) by dea.linux-mips.net (8.11.6/8.11.1) id g1BMK1U05333; Mon, 11 Feb 2002 23:20:01 +0100 Date: Mon, 11 Feb 2002 23:20:01 +0100 From: Ralf Baechle To: Johannes Stezenbach Cc: "Maciej W. Rozycki" , Florian Lohoff , linux-mips@oss.sgi.com Subject: Re: gcc include strangeness Message-ID: <20020211232001.G4623@dea.linux-mips.net> References: <20020211142708.GA2577@convergence.de> <20020211162844.GD2918@convergence.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <20020211162844.GD2918@convergence.de>; from js@convergence.de on Mon, Feb 11, 2002 at 05:28:44PM +0100 X-Accept-Language: de,en,fr Sender: owner-linux-mips@oss.sgi.com Precedence: bulk On Mon, Feb 11, 2002 at 05:28:44PM +0100, Johannes Stezenbach wrote: > > Is gcc 3.x already stable enough to be used by people not directly > > involved in gcc development? More specifically for MIPS/Linux and > > i386/Linux, for both the kernel and the userland? I'm told it is not. > > I'm reading about gcc 3.x code generation bugs every now and then, > but so far I did not hit any of them. I've fixed several kernel bugs that got triggered by building with 3.0. We've got an a piece of inline assembler where a constraint gets ignored by 3.0 resulting in bad code. Add slow compilation and slow code. 3.0? No way. Yet. Ralf From owner-linux-mips@oss.sgi.com Mon Feb 11 19:00:02 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g1C302C23164 for linux-mips-outgoing; Mon, 11 Feb 2002 19:00:02 -0800 Received: from topsns.toshiba-tops.co.jp (topsns.toshiba-tops.co.jp [202.230.225.5]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g1C2x3923115 for ; Mon, 11 Feb 2002 18:59:04 -0800 Received: from inside-ms1.toshiba-tops.co.jp by topsns.toshiba-tops.co.jp via smtpd (for oss.sgi.com [216.32.174.27]) with SMTP; 12 Feb 2002 01:59:03 UT 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 AB49FB46D; Tue, 12 Feb 2002 10:59:01 +0900 (JST) Received: by srd2sd.toshiba-tops.co.jp (8.9.3/3.5Wbeta-srd2sd) with ESMTP id KAA41913; Tue, 12 Feb 2002 10:59:01 +0900 (JST) Date: Tue, 12 Feb 2002 11:03:33 +0900 (JST) Message-Id: <20020212.110333.41627061.nemoto@toshiba-tops.co.jp> To: hjl@lucon.org Cc: linux-mips@oss.sgi.com Subject: Re: gcc-2.96-99 optimization bug? From: Atsushi Nemoto In-Reply-To: <20020208103047.A6079@lucon.org> References: <20020208.193731.48536791.nemoto@toshiba-tops.co.jp> <20020208103047.A6079@lucon.org> X-Fingerprint: EC 9D B9 17 2E 89 D2 25 CE F5 5D 3D 12 29 2A AD X-Pgp-Public-Key: http://pgp.nic.ad.jp/cgi-bin/pgpsearchkey.pl?op=get&search=0xB6D728B1 Organization: TOSHIBA Personal Computer System Corporation X-Mailer: Mew version 2.1 on Emacs 20.7 / Mule 4.1 (AOI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-linux-mips@oss.sgi.com Precedence: bulk >>>>> On Fri, 8 Feb 2002 10:30:47 -0800, "H . J . Lu" said: hjl> gcc 3.1 seems fine. No one is working on gcc 2.96. I am working hjl> on a new Linuxx/mips which will use gcc 3.1. Thank you. I will wait for your new package and try it. --- Atsushi Nemoto From owner-linux-mips@oss.sgi.com Tue Feb 12 04:41:45 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g1CCfjK30130 for linux-mips-outgoing; Tue, 12 Feb 2002 04:41:45 -0800 Received: from delta.ds2.pg.gda.pl (macro@delta.ds2.pg.gda.pl [213.192.72.1]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g1CCfQ930125 for ; Tue, 12 Feb 2002 04:41:27 -0800 Received: from localhost by delta.ds2.pg.gda.pl (8.9.3/8.9.3) with SMTP id MAA17975; Tue, 12 Feb 2002 12:41:02 +0100 (MET) Date: Tue, 12 Feb 2002 12:41:01 +0100 (MET) From: "Maciej W. Rozycki" To: Matthew Dharm cc: Ralf Baechle , linux-mips@fnet.fr, linux-mips@oss.sgi.com Subject: RE: [patch] linux 2.4.17: The second mb() rework (final) In-Reply-To: Message-ID: Organization: Technical University of Gdansk MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-linux-mips@oss.sgi.com Precedence: bulk On Mon, 11 Feb 2002, Matthew Dharm wrote: > Aren't there more processors that have sync? I thought the RM7000 > (PMC-Sierra) did too... Obviously there are as "sync" is standard for MIPS II and above. That's why only CONFIG_CPU_R3000 and CONFIG_CPU_TX39XX disable "sync". -- + Maciej W. Rozycki, Technical University of Gdansk, Poland + +--------------------------------------------------------------+ + e-mail: macro@ds2.pg.gda.pl, PGP key available + From owner-linux-mips@oss.sgi.com Tue Feb 12 04:50:03 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g1CCo3630240 for linux-mips-outgoing; Tue, 12 Feb 2002 04:50:03 -0800 Received: from delta.ds2.pg.gda.pl (macro@delta.ds2.pg.gda.pl [213.192.72.1]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g1CCnk930234; Tue, 12 Feb 2002 04:49:47 -0800 Received: from localhost by delta.ds2.pg.gda.pl (8.9.3/8.9.3) with SMTP id MAA18197; Tue, 12 Feb 2002 12:49:30 +0100 (MET) Date: Tue, 12 Feb 2002 12:49:29 +0100 (MET) From: "Maciej W. Rozycki" To: Ralf Baechle cc: Florian Lohoff , linux-mips@oss.sgi.com Subject: Re: gcc include strangeness In-Reply-To: <20020210121134.B2018@dea.linux-mips.net> Message-ID: Organization: Technical University of Gdansk MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-linux-mips@oss.sgi.com Precedence: bulk On Sun, 10 Feb 2002, Ralf Baechle wrote: > > Shouldnt sgidefs.h or its content be included in the gcc ? > > There should be a copy of sgidefs.h in /usr/include rsp. for crosscompilers > in //include/sgidefs.h. However the gcc varargs stuff That file is part of libc, not gcc. OTOH, gcc when configured for "mipsel-linux" is allowed to assume glibc is available. So there is no need to migrate the file after all. > has been rewritten completely; the new implementation does no longer try > to include sgidefs.h. That's fine but for 2.95.x the issue exists. -- + Maciej W. Rozycki, Technical University of Gdansk, Poland + +--------------------------------------------------------------+ + e-mail: macro@ds2.pg.gda.pl, PGP key available + From owner-linux-mips@oss.sgi.com Tue Feb 12 05:01:22 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g1CD1Ms30509 for linux-mips-outgoing; Tue, 12 Feb 2002 05:01:22 -0800 Received: from mx.mips.com (mx.mips.com [206.31.31.226]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g1CD1J930506 for ; Tue, 12 Feb 2002 05:01:20 -0800 Received: from newman.mips.com (ns-dmz [206.31.31.225]) by mx.mips.com (8.9.3/8.9.0) with ESMTP id EAA18097; Tue, 12 Feb 2002 04:01:13 -0800 (PST) Received: from Ulysses (ulysses [192.168.236.13]) by newman.mips.com (8.9.3/8.9.0) with SMTP id EAA28977; Tue, 12 Feb 2002 04:01:09 -0800 (PST) Message-ID: <010601c1b3bd$1da618e0$0deca8c0@Ulysses> From: "Kevin D. Kissell" To: "Maciej W. Rozycki" , "Matthew Dharm" Cc: "Ralf Baechle" , , References: Subject: Re: [patch] linux 2.4.17: The second mb() rework (final) Date: Tue, 12 Feb 2002 13:02:13 +0100 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.4807.1700 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4807.1700 Sender: owner-linux-mips@oss.sgi.com Precedence: bulk From: "Maciej W. Rozycki" : > On Mon, 11 Feb 2002, Matthew Dharm wrote: > > > Aren't there more processors that have sync? I thought the RM7000 > > (PMC-Sierra) did too... > > Obviously there are as "sync" is standard for MIPS II and above. That's > why only CONFIG_CPU_R3000 and CONFIG_CPU_TX39XX disable "sync". According to the (rather old) Tx39xx specs at my disposal, those parts should also support the SYNC instruction. Does anyone know for a fact that some of them do not? Kevin K. From owner-linux-mips@oss.sgi.com Tue Feb 12 05:48:54 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g1CDmsW31695 for linux-mips-outgoing; Tue, 12 Feb 2002 05:48:54 -0800 Received: from delta.ds2.pg.gda.pl (macro@delta.ds2.pg.gda.pl [213.192.72.1]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g1CDmh931692 for ; Tue, 12 Feb 2002 05:48:47 -0800 Received: from localhost by delta.ds2.pg.gda.pl (8.9.3/8.9.3) with SMTP id NAA19778; Tue, 12 Feb 2002 13:45:22 +0100 (MET) Date: Tue, 12 Feb 2002 13:45:21 +0100 (MET) From: "Maciej W. Rozycki" To: "Kevin D. Kissell" cc: Matthew Dharm , Ralf Baechle , linux-mips@fnet.fr, linux-mips@oss.sgi.com Subject: Re: [patch] linux 2.4.17: The second mb() rework (final) In-Reply-To: <010601c1b3bd$1da618e0$0deca8c0@Ulysses> Message-ID: Organization: Technical University of Gdansk MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-linux-mips@oss.sgi.com Precedence: bulk On Tue, 12 Feb 2002, Kevin D. Kissell wrote: > > Obviously there are as "sync" is standard for MIPS II and above. That's > > why only CONFIG_CPU_R3000 and CONFIG_CPU_TX39XX disable "sync". > > According to the (rather old) Tx39xx specs at my disposal, > those parts should also support the SYNC instruction. Does > anyone know for a fact that some of them do not? I set these values according to what I found in arch/mips/setup.c -- Tx39xx are marked as MIPS_CPU_ISA_I, but obviously if they still implement "sync" as an extension they should be marked to enable the code that uses it. The patch should be applied as is anyway -- until it's clear if all members of the Tx39xx family implement "sync", it's better to leave their configuration in the current state. -- + Maciej W. Rozycki, Technical University of Gdansk, Poland + +--------------------------------------------------------------+ + e-mail: macro@ds2.pg.gda.pl, PGP key available + From owner-linux-mips@oss.sgi.com Tue Feb 12 05:57:28 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g1CDvSW31873 for linux-mips-outgoing; Tue, 12 Feb 2002 05:57:28 -0800 Received: from sgi.com (sgi-too.SGI.COM [204.94.211.39]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g1CDvP931869 for ; Tue, 12 Feb 2002 05:57:25 -0800 Received: from delta.ds2.pg.gda.pl (delta.ds2.pg.gda.pl [213.192.72.1]) by sgi.com (980327.SGI.8.8.8-aspam/980304.SGI-aspam: SGI does not authorize the use of its proprietary systems or networks for unsolicited or bulk email from the Internet.) via ESMTP id EAA07047 for ; Tue, 12 Feb 2002 04:57:11 -0800 (PST) mail_from (macro@ds2.pg.gda.pl) Received: from localhost by delta.ds2.pg.gda.pl (8.9.3/8.9.3) with SMTP id NAA19778; Tue, 12 Feb 2002 13:45:22 +0100 (MET) Date: Tue, 12 Feb 2002 13:45:21 +0100 (MET) From: "Maciej W. Rozycki" To: "Kevin D. Kissell" cc: Matthew Dharm , Ralf Baechle , linux-mips@fnet.fr, linux-mips@oss.sgi.com Subject: Re: [patch] linux 2.4.17: The second mb() rework (final) In-Reply-To: <010601c1b3bd$1da618e0$0deca8c0@Ulysses> Message-ID: Organization: Technical University of Gdansk MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-linux-mips@oss.sgi.com Precedence: bulk On Tue, 12 Feb 2002, Kevin D. Kissell wrote: > > Obviously there are as "sync" is standard for MIPS II and above. That's > > why only CONFIG_CPU_R3000 and CONFIG_CPU_TX39XX disable "sync". > > According to the (rather old) Tx39xx specs at my disposal, > those parts should also support the SYNC instruction. Does > anyone know for a fact that some of them do not? I set these values according to what I found in arch/mips/setup.c -- Tx39xx are marked as MIPS_CPU_ISA_I, but obviously if they still implement "sync" as an extension they should be marked to enable the code that uses it. The patch should be applied as is anyway -- until it's clear if all members of the Tx39xx family implement "sync", it's better to leave their configuration in the current state. -- + Maciej W. Rozycki, Technical University of Gdansk, Poland + +--------------------------------------------------------------+ + e-mail: macro@ds2.pg.gda.pl, PGP key available + From owner-linux-mips@oss.sgi.com Tue Feb 12 08:55:23 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g1CGtNp12219 for linux-mips-outgoing; Tue, 12 Feb 2002 08:55:23 -0800 Received: from oval.algor.co.uk (root@oval.algor.co.uk [62.254.210.250]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g1CGtB912215; Tue, 12 Feb 2002 08:55:11 -0800 Received: from gladsmuir.algor.co.uk.algor.co.uk (IDENT:dom@gladsmuir.algor.co.uk [192.168.5.75]) by oval.algor.co.uk (8.11.6/8.10.1) with ESMTP id g1CFt5400907; Tue, 12 Feb 2002 15:55:07 GMT From: Dominic Sweetman MIME-Version: 1.0 Message-ID: <15465.15062.840707.525971@gladsmuir.algor.co.uk> Date: Tue, 12 Feb 2002 15:55:02 +0000 To: linux-mips@oss.sgi.com Cc: Johannes Stezenbach , nigel@algor.co.uk, "Hartvig Ekner \"Maciej W. Rozycki\"" , Florian Lohoff , Ralf Baechle Subject: Re: gcc include strangeness In-Reply-To: <20020211232001.G4623@dea.linux-mips.net> References: <20020211142708.GA2577@convergence.de> <20020211162844.GD2918@convergence.de> <20020211232001.G4623@dea.linux-mips.net> X-Mailer: VM 6.89 under 21.1 (patch 14) "Cuyahoga Valley" XEmacs Lucid User-Agent: SEMI/1.13.7 (Awazu) CLIME/1.13.6 (=?ISO-2022-JP?B?GyRCQ2YbKEI=?= =?ISO-2022-JP?B?GyRCJU4+MRsoQg==?=) MULE XEmacs/21.1 (patch 14) (Cuyahoga Valley) (i386-redhat-linux) Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by oss.sgi.com id g1CGtC912216 Sender: owner-linux-mips@oss.sgi.com Precedence: bulk I've been keeping quiet through all this, but perhaps I should speak up. Algorithmics maintains a GNU toolchain for embedded systems and supplies it bundled with support and a basic run-time system as our product SDE-MIPS. >From version 5.0 (just gone into beta) we are configuring and testing the compiler/assembler/object tools for Linux use. We always publish the GNU sources used to build SDE-MIPS on our web-site, but we are currently leaning towards going further and putting binary RPMs of the Linux toolchain out for free download - so those of you who want can just use it. The upside of this is that we have the resource and skill (and it looks like we'll be able to get enough support/development funding) to maintain a Linux/MIPS compiler. It would be a good thing for the Linux/MIPS community if compiler bugs and shortcomings got fixed on a fairly stable base, instead of relying on pick-your-version folklore. We should also be able to get funding to do things like fixing support for SGI n32/n64 code-generation conventions. Our compiler already has support for pretty much every wrinkle of any MIPS instruction set anywhere, and command-line-selectable machine descriptions for many different MIPS pipelines. The downside: our development process is not currently very Linux-shaped. We "release late, release rarely". In providing a stable compiler for embedded use we have found it easier to avoid the bleeding edge of GCC. We've found it necessary to make bold changes in "machine-independent" code - GCC is a wonderful multi-target compiler, but it's x86 (PPC a distant second) which is routinely tested. The leading edge is a fertile breeding ground of bugs for minor architectures. And more: our v5.0 compiler's ancestor was a 2.96 release from Cygnus' internal development tree, provided to MIPS Technologies in the fall of 2000. We picked it up because it had work MIPS had already funded, and some valuable multiple-issue machine description features which didn't make it into 3.0. But it has taken a long time to make sure the new compiler is as well-tuned and reliable as the EGCS 1.1-based compiler it replaced, and the 2.96-derived compiler is only now shipping as part of a beta release. So now we have numerous patches, many of them not in officially "MIPS machine-dependent" code, against an 18-months old and slightly strange version of GCC. Nobody is currently doing the substantial work to turn our changes into patches for GCC 3.x. What I think we ought to do is to: o Release the existing compiler for use among Linux/MIPS enthusiasts (we're hoping that some commercial developers will take support contracts, of course); o Hope that many of you will use it and feed back bug reports, and that some of you will grab the sources and help track & fix them; o Aim to make earlier and more frequent releases for adventurous Linux users (we will keep a slow-moving 'stable' release for those whose priority is elsewhere); o Aim over the next couple of years - and with all the help we can get - to converge closer to the evolving GCC 3.x mainstream. I guess the question for this list is: is anyone interested? -- Dominic Sweetman Algorithmics Ltd The Fruit Farm, Ely Road, Chittering, CAMBS CB5 9PH, ENGLAND phone +44 1223 706200/fax +44 1223 706250/direct +44 1223 706205 http://www.algor.co.uk From owner-linux-mips@oss.sgi.com Tue Feb 12 10:08:57 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g1CI8va16958 for linux-mips-outgoing; Tue, 12 Feb 2002 10:08:57 -0800 Received: from spider.cphdev.eicon.com (firewall.i-data.com [195.24.22.194]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g1CI8u916955 for ; Tue, 12 Feb 2002 10:08:56 -0800 Received: from (null) ([127.0.0.1] helo=eicon.com) by spider.cphdev.eicon.com with esmtp (Exim 3.33 #1 (Debian)) id 16agQH-0000md-00 for ; Tue, 12 Feb 2002 18:08:54 +0100 Message-ID: <3C694C25.E828889E@eicon.com> Date: Tue, 12 Feb 2002 18:08:53 +0100 From: Brian Murphy X-Mailer: Mozilla 4.77 [en] (X11; U; Linux 2.4.5 i686) X-Accept-Language: en MIME-Version: 1.0 To: "linux-mips@oss.sgi.com" Subject: Re: gcc include strangeness References: <20020211142708.GA2577@convergence.de> <20020211162844.GD2918@convergence.de> <20020211232001.G4623@dea.linux-mips.net> <15465.15062.840707.525971@gladsmuir.algor.co.uk> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-linux-mips@oss.sgi.com Precedence: bulk > I guess the question for this list is: is anyone interested? > Yes. /Brian From owner-linux-mips@oss.sgi.com Tue Feb 12 10:20:32 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g1CIKW517233 for linux-mips-outgoing; Tue, 12 Feb 2002 10:20:32 -0800 Received: from web10204.mail.yahoo.com (web10204.mail.yahoo.com [216.136.130.68]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g1CIKU917230 for ; Tue, 12 Feb 2002 10:20:30 -0800 Message-ID: <20020212172029.61237.qmail@web10204.mail.yahoo.com> Received: from [195.143.217.178] by web10204.mail.yahoo.com via HTTP; Tue, 12 Feb 2002 09:20:29 PST Date: Tue, 12 Feb 2002 09:20:29 -0800 (PST) From: Timothy Daly Subject: Re: gcc include strangeness To: linux-mips@oss.sgi.com In-Reply-To: <15465.15062.840707.525971@gladsmuir.algor.co.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Sender: owner-linux-mips@oss.sgi.com Precedence: bulk > I guess the question for this list is: is anyone interested? Hai! (yes) -Tim __________________________________________________ Do You Yahoo!? Send FREE Valentine eCards with Yahoo! Greetings! http://greetings.yahoo.com From owner-linux-mips@oss.sgi.com Tue Feb 12 18:23:39 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g1D2NdY32095 for linux-mips-outgoing; Tue, 12 Feb 2002 18:23:39 -0800 Received: from topsns.toshiba-tops.co.jp (topsns.toshiba-tops.co.jp [202.230.225.5]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g1D2Na932091 for ; Tue, 12 Feb 2002 18:23:36 -0800 Received: from inside-ms1.toshiba-tops.co.jp by topsns.toshiba-tops.co.jp via smtpd (for oss.sgi.com [216.32.174.27]) with SMTP; 13 Feb 2002 01:23:36 UT 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 EF68EB46B; Wed, 13 Feb 2002 10:23:33 +0900 (JST) Received: by srd2sd.toshiba-tops.co.jp (8.9.3/3.5Wbeta-srd2sd) with ESMTP id KAA44828; Wed, 13 Feb 2002 10:23:33 +0900 (JST) Date: Wed, 13 Feb 2002 10:28:05 +0900 (JST) Message-Id: <20020213.102805.74755945.nemoto@toshiba-tops.co.jp> To: kevink@mips.com Cc: macro@ds2.pg.gda.pl, mdharm@momenco.com, ralf@uni-koblenz.de, linux-mips@fnet.fr, linux-mips@oss.sgi.com Subject: Re: [patch] linux 2.4.17: The second mb() rework (final) From: Atsushi Nemoto In-Reply-To: <010601c1b3bd$1da618e0$0deca8c0@Ulysses> References: <010601c1b3bd$1da618e0$0deca8c0@Ulysses> X-Fingerprint: EC 9D B9 17 2E 89 D2 25 CE F5 5D 3D 12 29 2A AD X-Pgp-Public-Key: http://pgp.nic.ad.jp/cgi-bin/pgpsearchkey.pl?op=get&search=0xB6D728B1 Organization: TOSHIBA Personal Computer System Corporation X-Mailer: Mew version 2.1 on Emacs 20.7 / Mule 4.1 (AOI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-linux-mips@oss.sgi.com Precedence: bulk >>>>> On Tue, 12 Feb 2002 13:02:13 +0100, "Kevin D. Kissell" said: kevink> According to the (rather old) Tx39xx specs at my disposal, kevink> those parts should also support the SYNC instruction. Does kevink> anyone know for a fact that some of them do not? There are two types of TX39: TX39/H and TX39/H2. To my knowledge, both TX39/H (3904, 3912, etc.) and TX39/H2 (3922, 3927, etc.) have then SYNC instruction. TX39/H2 also have a write buffer but TX39/H does not. --- Atsushi Nemoto From owner-linux-mips@oss.sgi.com Wed Feb 13 12:14:03 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g1DKE3P01983 for linux-mips-outgoing; Wed, 13 Feb 2002 12:14:03 -0800 Received: from dtla2.teknuts.com (adsl-66-125-62-110.dsl.lsan03.pacbell.net [66.125.62.110]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g1DKDm901953 for ; Wed, 13 Feb 2002 12:13:50 -0800 Received: from delllaptop (whnat1.weiderpub.com [65.115.104.67]) (authenticated) by dtla2.teknuts.com (8.11.3/8.10.1) with ESMTP id g1DJDme02025 for ; Wed, 13 Feb 2002 11:13:48 -0800 From: "Robert Rusek" To: Subject: NFS ROOT Problem - boot (newbie) Date: Wed, 13 Feb 2002 11:07:44 -0800 Message-ID: <002f01c1b4c1$b7c4cb60$6d1510ac@delllaptop> 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.3416 Importance: Normal X-MIMEOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 Sender: owner-linux-mips@oss.sgi.com Precedence: bulk I am relatively new to this. I am trying to boot to an nfs root on my PC RedHat 7.2 box. I downloaded the nfs image from ftp.mips.org (nfsroot.mips.redhat7.1.eb-01.00.tar.gz). I have a working 2.4.3 kernel that I have installed on a SGI. I need to boot to the nfs image so that I can install to a local drive. I have setup nfs on my PC RedHat 7.2 box and it is working. When I boot the kernel on my SGI as follows: >> boot nfsroot=192.168.0.75:mips ip=192.168.0.50 I get the following: --- 1503232+0+147092 entry: 0x880025a8 ARCH: SGI-IP22 PROMLIB: ARC firmware Version 1 Revision 10 CPU: MIPS-R5000 FPU ICACHE DCACHE SCACHE Loading R4000 MMU routines. CPU revision is: 00002310 Primary instruction cache 32kb, linesize 32 bytes. Primary data cache 32kb, linesize 32 bytes. Linux version 2.4.3 (flo@paradigm) (gcc version 3.0 20010303 (prerelease)) #1 Thu Apr 12 22:38:03 CEST 2001 MC: SGI memory controller Revision 3 R4600/R5000 SCACHE size 512K, linesize 32 bytes. Determined physical RAM map: memory: 00001000 @ 00000000 (reserved) memory: 00001000 @ 00001000 (reserved) memory: 00193000 @ 08002000 (reserved) memory: 005ab000 @ 08195000 (usable) memory: 000c0000 @ 08740000 (ROM data) memory: 03800000 @ 08800000 (usable) On node 0 totalpages: 49152 zone(0): 49152 pages. zone(1): 0 pages. zone(2): 0 pages. Kernel command line: root=scsi(0)disk(1)rdisk(0)partition(0) nfsroot=192.168.0.75:mips ip=192.168.0.50 Calibrating system timer... 900000 [180.00 MHz CPU] zs0: console input Console: ttyS0 (Zilog8530) Calibrating delay loop... 179.81 BogoMIPS Memory: 60056k/63148k available (1311k kernel code, 3092k reserved, 83k data, 72k init) Dentry-cache hash table entries: 32768 (order: 6, 262144 bytes) Buffer-cache hash table entries: 16384 (order: 4, 65536 bytes) Page-cache hash table entries: 65536 (order: 6, 262144 bytes) Inode-cache hash table entries: 16384 (order: 5, 131072 bytes) Checking for 'wait' instruction... available. POSIX conformance testing by UNIFIX Linux NET4.0 for Linux 2.4 Based upon Swansea University Computer Society NET3.039 Starting kswapd v1.8 initialize_kbd: Keyboard reset failed, no ACK pty: 256 Unix98 ptys configured keyboard: Timeout - AT keyboard not present? keyboard: Timeout - AT keyboard not present? DS1286 Real Time Clock Driver v1.0 streamable misc devices registered (keyb:150, gfx:148) block: queued sectors max/low 39482kB/13160kB, 128 slots per queue sgiseeq.c: David S. Miller (dm@engr.sgi.com) eth0: SGI Seeq8003 08:00:69:0a:31:7a SCSI subsystem driver Revision: 1.00 wd33c93-0: chip=WD33c93B/13 no_sync=0xff no_dma=0 debug_flags=0x00 setup_args=,,,,,,,,, Version 1.25 - 09/Jul/1997, Compiled Apr 12 2001 at 22:38:57 scsi0 : SGI WD93 sending SDTR 0103013f0csync_xfer=2c Vendor: SGI Model: IBM DORS-32160 Rev: W80D Type: Direct-Access ANSI SCSI revision: 02 sending SDTR 0103013f0csync_xfer=2c Vendor: SGI Model: SEAGATE ST51080N Rev: 0950 Type: Direct-Access ANSI SCSI revision: 02 Detected scsi disk sda at scsi0, channel 0, id 1, lun 0 Detected scsi disk sdb at scsi0, channel 0, id 2, lun 0 SCSI device sda: 4197405 512-byte hdwr sectors (2149 MB) Partition check: sda: sda1 sda2 sda3 sda4 SCSI device sdb: 2070235 512-byte hdwr sectors (1060 MB) sdb: sdb1 sdb2 sdb3 sdb4 SGI Zilog8530 serial driver version 1.00 tty00 at 0xbfbd9830 (irq = 21) is a Zilog8530 tty01 at 0xbfbd9838 (irq = 21) is a Zilog8530 NET4: Linux TCP/IP 1.0 for NET4.0 IP Protocols: ICMP, UDP, TCP IP: routing cache hash table of 2048 buckets, 16Kbytes TCP: Hash tables configured (established 16384 bind 32768) IP-Config: Guessing netmask 255.255.255.0 NET4: Unix domain sockets 1.0/SMP for Linux NET4.0. Looking up port of RPC 100003/2 on 192.168.0.75 Looking up port of RPC 100005/2 on 192.168.0.75 VFS: Mounted root (nfs filesystem) readonly. Freeing prom memory: 768kb freed Freeing unused kernel memory: 72k freed nfs: server 192.168.0.75 not responding, still trying --- It seems that it initially finds the root on the nfs box but it never get to do an init. It just stops and waits... Do I need to modify any setting manually on my NFS image in order for the kernel to boot? Thanks -- Robert Rusek From owner-linux-mips@oss.sgi.com Wed Feb 13 17:17:49 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g1E1Hnn11486 for linux-mips-outgoing; Wed, 13 Feb 2002 17:17:49 -0800 Received: from spinics.net (IDENT:root@vzn1-22.ce.ftel.net [206.24.95.226]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g1E1Hl911483 for ; Wed, 13 Feb 2002 17:17:47 -0800 Received: (from ellis@localhost) by spinics.net (8.11.6/8.11.6) id g1E0HqT11565 for linux-mips@oss.sgi.com; Wed, 13 Feb 2002 16:17:52 -0800 From: ellis@spinics.net Message-Id: <200202140017.g1E0HqT11565@spinics.net> Subject: Re: NFS ROOT Problem - boot (newbie) To: linux-mips@oss.sgi.com Date: Wed, 13 Feb 2002 16:17:52 -0800 (PST) X-Mailer: ELM [version 2.5 PL5] MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-linux-mips@oss.sgi.com Precedence: bulk >It seems that it initially finds the root on the nfs box but it >never get to do an init. It just stops and waits... Do I need >to modify any setting manually on my NFS image in order for the >kernel to boot? I had something like that happen to me. It'd start mounting the NFS root but would stop sending packets after a while. I thought it was the ethernet driver but I never did find the problem before I had to move to other projects. -- http://www.spinics.net/linux/ From owner-linux-mips@oss.sgi.com Wed Feb 13 18:05:23 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g1E25Nq12384 for linux-mips-outgoing; Wed, 13 Feb 2002 18:05:23 -0800 Received: from neurosis.mit.edu (NEUROSIS.MIT.EDU [18.243.0.82]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g1E25I912378 for ; Wed, 13 Feb 2002 18:05:18 -0800 Received: (from jim@localhost) by neurosis.mit.edu (8.11.4/8.11.4) id g1E157D03578; Wed, 13 Feb 2002 20:05:07 -0500 Date: Wed, 13 Feb 2002 20:05:07 -0500 From: Jim Paris To: ellis@spinics.net Cc: linux-mips@oss.sgi.com Subject: Re: NFS ROOT Problem - boot (newbie) Message-ID: <20020213200507.A3446@neurosis.mit.edu> Reply-To: jim@jtan.com References: <200202140017.g1E0HqT11565@spinics.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <200202140017.g1E0HqT11565@spinics.net>; from ellis@spinics.net on Wed, Feb 13, 2002 at 04:17:52PM -0800 Sender: owner-linux-mips@oss.sgi.com Precedence: bulk > >It seems that it initially finds the root on the nfs box but it > >never get to do an init. It just stops and waits... Do I need > >to modify any setting manually on my NFS image in order for the > >kernel to boot? > > I had something like that happen to me. It'd start mounting the > NFS root but would stop sending packets after a while. I thought > it was the ethernet driver but I never did find the problem > before I had to move to other projects. I also saw a similar problem when booting the kernel with a ramdisk and attempting to NFS mount from there via a wireless card. I don't even remember which kernel it was now, but I eventually concluded that the issue was with fragmented UDP packets. Linux has NFS_DEF_FILE_IO_BUFFER_SIZE set to 4096, which is of course larger than an Ethernet frame (1536) and must fragment. I'm not sure if it that was the fault with the kernel or the wireless access point I was using, but my host would send all fragments, and the MIPS box would eventually send back a reassembly timeout. Anyway, my solution was: mount -o rsize=1024,wsize=1024 ... I presume you could also set those from the boot command line if you need to use nfsroot. (The symptoms were that I could mount, and a very small number of operations would occasionally work. Of course, the ones that worked were just whatever ones happened to fit in an unfragmented UDP packet) -jim From owner-linux-mips@oss.sgi.com Thu Feb 14 03:03:50 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g1EB3oU08240 for linux-mips-outgoing; Thu, 14 Feb 2002 03:03:50 -0800 Received: from topsns.toshiba-tops.co.jp (topsns.toshiba-tops.co.jp [202.230.225.5]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g1EB3f908237; Thu, 14 Feb 2002 03:03:42 -0800 Received: from inside-ms1.toshiba-tops.co.jp by topsns.toshiba-tops.co.jp via smtpd (for oss.sgi.com [216.32.174.27]) with SMTP; 14 Feb 2002 10:03:41 UT 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 D1E92B479; Thu, 14 Feb 2002 19:03:38 +0900 (JST) Received: by srd2sd.toshiba-tops.co.jp (8.9.3/3.5Wbeta-srd2sd) with ESMTP id TAA49061; Thu, 14 Feb 2002 19:03:38 +0900 (JST) Date: Thu, 14 Feb 2002 19:08:07 +0900 (JST) Message-Id: <20020214.190807.28780825.nemoto@toshiba-tops.co.jp> To: linux-mips@oss.sgi.com Cc: ralf@oss.sgi.com Subject: cvt.s.d emulation fix From: Atsushi Nemoto X-Fingerprint: EC 9D B9 17 2E 89 D2 25 CE F5 5D 3D 12 29 2A AD X-Pgp-Public-Key: http://pgp.nic.ad.jp/cgi-bin/pgpsearchkey.pl?op=get&search=0xB6D728B1 Organization: TOSHIBA Personal Computer System Corporation X-Mailer: Mew version 2.1 on Emacs 20.7 / Mule 4.1 (AOI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-linux-mips@oss.sgi.com Precedence: bulk I found two small problem on cvt.s.d emulation. 1. Converting a denormalized number does not raise Inexact exception. 2. Any denormalized double precision numbers are converted to zero regardless rounding mode. If rounding mode was "up", a positive denormalized double precision number should be converted to minimal (denormalized) single precision number. Here is a patch. --- linux-sgi-cvs/arch/mips/math-emu/sp_fdp.c Mon Oct 22 10:29:56 2001 +++ linux.new/arch/mips/math-emu/sp_fdp.c Thu Feb 14 18:56:06 2002 @@ -55,6 +55,10 @@ case IEEE754_CLASS_DNORM: /* cant possibly be sp representable */ SETCX(IEEE754_UNDERFLOW); + SETCX(IEEE754_INEXACT); + if ((ieee754_csr.rm == IEEE754_RU && !xs) || + (ieee754_csr.rm == IEEE754_RD && xs)) + return ieee754sp_xcpt(ieee754sp_mind(xs), "fdp", x); return ieee754sp_xcpt(ieee754sp_zero(xs), "fdp", x); case IEEE754_CLASS_NORM: break; --- Atsushi Nemoto From owner-linux-mips@oss.sgi.com Thu Feb 14 14:40:33 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g1EMeX201815 for linux-mips-outgoing; Thu, 14 Feb 2002 14:40:33 -0800 Received: from mailhost.taec.toshiba.com (mailhost.taec.com [209.243.128.33]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g1EMeQ901812 for ; Thu, 14 Feb 2002 14:40:26 -0800 Received: from hdqmta.taec.com (hdqmta [209.243.180.59]) by mailhost.taec.toshiba.com (8.8.8+Sun/8.8.8) with ESMTP id NAA29253 for ; Thu, 14 Feb 2002 13:40:18 -0800 (PST) Subject: Tools issue To: linux-mips@oss.sgi.com X-Mailer: Lotus Notes Release 5.0.3 March 21, 2000 Message-ID: From: Adrian.Hulse@taec.toshiba.com Date: Thu, 14 Feb 2002 13:42:31 -0800 X-MIMETrack: Serialize by Router on HDQMTA/TOSHIBA_TAEC(Release 5.0.8 |June 18, 2001) at 02/14/2002 01:39:16 PM MIME-Version: 1.0 Content-type: text/plain; charset=us-ascii Sender: owner-linux-mips@oss.sgi.com Precedence: bulk I am experiencing some strange behaviour dependent on the tools I use and I was wondering if anyone on this list, has experienced similar problems or may know the answer to my problem. To date I have been using the following tools from the SGI site to successfully compile and boot a 2.4.12 little endian mips kernel : binutils-mipsel-linux-2.8.1-2.i386.rpm egcs-mipsel-linux-1.1.2-4.i386.rpm As an experiment I decided to try the "toolchain-20011020" tools also from the SGI site to compile the exact same kernel, but the compile fails with the following 2 errors : ctfb.c:1158: warning: duplicate `const' {standard input}:11123: Error: expression too complex {standard input}:11123: Fatal Error: internal Error, line 1980, ../../tools-20011020/gas/config/tc-mips.c make[3]: ***[ctfb.o] Error 2 int-handler.s:59: Error: missing ')' int-handler.s:59: Error: illegal operands `lui' int-handler.s:60: Error: missing ')' int-handler.s:60: Error: illegal operands `sb' make[1]: *** [ int-handler.o ] Error 1 I can get around the first error by just disabling CONFIG_FB_CT in the config and recompiling. Note the monta vista toolchain also fails in the same file, with I think the same error. I can get around the second error by one of two methods : a, just comment it out because all it's doing is lighting up an led according to the interrupt received b, by changing a parenthesised define to non-parenthesised form : int-handler.S lui t1, %hi(TSDB_LED_ADDR) sb t0, %lo(TSDB_LDE_ADDR)(t1) Failed define : #define TSDB_LED_ADDR (KSEG1 + TSDB_LB_PCU_APERTURE + 0x05100020) Compilable define : #define TSDB_LED_ADDR KSEG1 + TSDB_LB_PCU_APERTURE + 0x05100020 So with the above 2 kludges I can get the kernel to compile, but now when I come to boot it, the board it just locks failing somewhere in console_init ( currently investigating ). Anyone else seen anything like this and know of a solution to the problem ? Or to paraphrase Dominic Sweetman, maybe i should just stay with the "pick your own version folklore" method of picking tools :). Thx From owner-linux-mips@oss.sgi.com Thu Feb 14 18:56:46 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g1F2ukr05499 for linux-mips-outgoing; Thu, 14 Feb 2002 18:56:46 -0800 Received: from hermes.mvista.com (gateway-1237.mvista.com [12.44.186.158]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g1F2uj905495 for ; Thu, 14 Feb 2002 18:56:45 -0800 Received: from mvista.com (IDENT:jsun@orion.mvista.com [10.0.0.75]) by hermes.mvista.com (8.11.0/8.11.0) with ESMTP id g1F1sFB10416; Thu, 14 Feb 2002 17:54:15 -0800 Message-ID: <3C6C6ACF.CAD2FFC@mvista.com> Date: Thu, 14 Feb 2002 17:56:31 -0800 From: Jun Sun X-Mailer: Mozilla 4.72 [en] (X11; U; Linux 2.2.18 i686) X-Accept-Language: en MIME-Version: 1.0 To: linux-mips@oss.sgi.com Subject: FPU emulator unsafe for SMP? Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-linux-mips@oss.sgi.com Precedence: bulk I have been chasing a FPU register corruption problem on a SMP box. The curruption seems to be caused by FPU emulator code. Is that code SMP safe? If not, what are the volunerable spots? Just thought I'd check before I dive into it .... BTW, I think even with the latest fpu emu patch, the classic fpu/signal problem is still there. I will post in a separate email later. Jun From owner-linux-mips@oss.sgi.com Thu Feb 14 19:14:49 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g1F3Ene05790 for linux-mips-outgoing; Thu, 14 Feb 2002 19:14:49 -0800 Received: from dea.linux-mips.net (a1as18-p131.stg.tli.de [195.252.193.131]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g1F3Ei905786 for ; Thu, 14 Feb 2002 19:14:44 -0800 Received: (from ralf@localhost) by dea.linux-mips.net (8.11.6/8.11.1) id g1F2BI221209; Fri, 15 Feb 2002 03:11:18 +0100 Date: Fri, 15 Feb 2002 03:11:18 +0100 From: Ralf Baechle To: Jun Sun Cc: linux-mips@oss.sgi.com Subject: Re: FPU emulator unsafe for SMP? Message-ID: <20020215031118.B21011@dea.linux-mips.net> References: <3C6C6ACF.CAD2FFC@mvista.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <3C6C6ACF.CAD2FFC@mvista.com>; from jsun@mvista.com on Thu, Feb 14, 2002 at 05:56:31PM -0800 X-Accept-Language: de,en,fr Sender: owner-linux-mips@oss.sgi.com Precedence: bulk On Thu, Feb 14, 2002 at 05:56:31PM -0800, Jun Sun wrote: > I have been chasing a FPU register corruption problem on a SMP box. The > curruption seems to be caused by FPU emulator code. Is that code SMP safe? > If not, what are the volunerable spots? > > Just thought I'd check before I dive into it .... In theory the fp emulation code should be MP safe as the full emulation is only accessing it's context in the fp register set of struct task_struct. The 32-bit kernel's fp register switching is entirely broken (read: close to non-existant). Lots of brownie points for somebody to backport that from the 64-bit kernel to the 32-bit kernel and forward port all the FPU emu bits to the 64-bit kernel ... > BTW, I think even with the latest fpu emu patch, the classic fpu/signal > problem is still there. I will post in a separate email later. Urgs ... Ralf From owner-linux-mips@oss.sgi.com Thu Feb 14 19:53:46 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g1F3rk806264 for linux-mips-outgoing; Thu, 14 Feb 2002 19:53:46 -0800 Received: from dea.linux-mips.net (a1as18-p131.stg.tli.de [195.252.193.131]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g1F3rb906261 for ; Thu, 14 Feb 2002 19:53:37 -0800 Received: (from ralf@localhost) by dea.linux-mips.net (8.11.6/8.11.1) id g1F2nwm23669; Fri, 15 Feb 2002 03:49:58 +0100 Date: Fri, 15 Feb 2002 03:49:58 +0100 From: Ralf Baechle To: Adrian.Hulse@taec.toshiba.com Cc: linux-mips@oss.sgi.com Subject: Re: Tools issue Message-ID: <20020215034958.C21011@dea.linux-mips.net> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: ; from Adrian.Hulse@taec.toshiba.com on Thu, Feb 14, 2002 at 01:42:31PM -0800 X-Accept-Language: de,en,fr Sender: owner-linux-mips@oss.sgi.com Precedence: bulk On Thu, Feb 14, 2002 at 01:42:31PM -0800, Adrian.Hulse@taec.toshiba.com wrote: > I am experiencing some strange behaviour dependent on the tools I use and I > was wondering if anyone on this list, has experienced similar problems or > may know the answer to my problem. > > To date I have been using the following tools from the SGI site to > successfully compile and boot a 2.4.12 little endian mips kernel : > > binutils-mipsel-linux-2.8.1-2.i386.rpm > egcs-mipsel-linux-1.1.2-4.i386.rpm > > As an experiment I decided to try the "toolchain-20011020" tools also from > the SGI site to compile the exact same kernel, but the compile fails with > the following 2 errors : > > ctfb.c:1158: warning: duplicate `const' > {standard input}:11123: Error: expression too complex > {standard input}:11123: Fatal Error: internal Error, line 1980, > ../../tools-20011020/gas/config/tc-mips.c > make[3]: ***[ctfb.o] Error 2 Can you post the compiler generated assembler that is causing this error? What kernel version is this? > int-handler.s:59: Error: missing ')' > int-handler.s:59: Error: illegal operands `lui' > int-handler.s:60: Error: missing ')' > int-handler.s:60: Error: illegal operands `sb' > make[1]: *** [ int-handler.o ] Error 1 > > I can get around the first error by just disabling CONFIG_FB_CT in the > config and recompiling. Note the monta vista toolchain also fails in the > same file, with I think the same error. > I can get around the second error by one of two methods : > a, just comment it out because all it's doing is lighting up an led > according to the interrupt received > b, by changing a parenthesised define to non-parenthesised form : > > int-handler.S > lui t1, %hi(TSDB_LED_ADDR) > sb t0, %lo(TSDB_LDE_ADDR)(t1) > > Failed define : > #define TSDB_LED_ADDR (KSEG1 + TSDB_LB_PCU_APERTURE + 0x05100020) > > Compilable define : > #define TSDB_LED_ADDR KSEG1 + TSDB_LB_PCU_APERTURE + 0x05100020 > > So with the above 2 kludges I can get the kernel to compile, but now when I > come to boot it, the board it just locks failing somewhere in console_init > ( currently investigating ). Binutils 2.8.x are definately buggy; 2.9.5.x on oss are the oldest version that's sortof working ... > Anyone else seen anything like this and know of a solution to the problem ? > Or to paraphrase Dominic Sweetman, maybe i should just stay with the "pick > your own version folklore" method of picking tools :). I hope that for binutils we can solve that problem when 2.9.12 gets released; as for gcc it seems Maciej's 2.95.3 version is already pretty close to what we want. C++ users may disagree ;-) Somewhat longer term Algorithmics's toolchain should resolve the situation. Ralf From owner-linux-mips@oss.sgi.com Thu Feb 14 20:27:05 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g1F4R5g06669 for linux-mips-outgoing; Thu, 14 Feb 2002 20:27:05 -0800 Received: from topsns.toshiba-tops.co.jp (topsns.toshiba-tops.co.jp [202.230.225.5]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g1F4R1906666 for ; Thu, 14 Feb 2002 20:27:02 -0800 Received: from inside-ms1.toshiba-tops.co.jp by topsns.toshiba-tops.co.jp via smtpd (for oss.sgi.com [216.32.174.27]) with SMTP; 15 Feb 2002 03:27:01 UT 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 2653AB46B; Fri, 15 Feb 2002 12:26:59 +0900 (JST) Received: by srd2sd.toshiba-tops.co.jp (8.9.3/3.5Wbeta-srd2sd) with ESMTP id MAA50808; Fri, 15 Feb 2002 12:26:58 +0900 (JST) Date: Fri, 15 Feb 2002 12:31:24 +0900 (JST) Message-Id: <20020215.123124.70226832.nemoto@toshiba-tops.co.jp> To: kevink@mips.com Cc: macro@ds2.pg.gda.pl, mdharm@momenco.com, ralf@uni-koblenz.de, linux-mips@fnet.fr, linux-mips@oss.sgi.com Subject: Re: [patch] linux 2.4.17: The second mb() rework (final) From: Atsushi Nemoto In-Reply-To: <20020213.102805.74755945.nemoto@toshiba-tops.co.jp> References: <010601c1b3bd$1da618e0$0deca8c0@Ulysses> <20020213.102805.74755945.nemoto@toshiba-tops.co.jp> X-Fingerprint: EC 9D B9 17 2E 89 D2 25 CE F5 5D 3D 12 29 2A AD X-Pgp-Public-Key: http://pgp.nic.ad.jp/cgi-bin/pgpsearchkey.pl?op=get&search=0xB6D728B1 Organization: TOSHIBA Personal Computer System Corporation X-Mailer: Mew version 2.1 on Emacs 20.7 / Mule 4.1 (AOI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-linux-mips@oss.sgi.com Precedence: bulk >>>>> On Wed, 13 Feb 2002 10:28:05 +0900 (JST), Atsushi Nemoto said: nemoto> TX39/H2 also have a write buffer but TX39/H does not. Sorry, this is wrong. TX39/H also have a write buffer. Note that SYNC on TX39/H and TX39/H2 does not flush a write buffer. Some operation (for example, bc0f loop) are required to flush a write buffer. --- Atsushi Nemoto From owner-linux-mips@oss.sgi.com Thu Feb 14 21:59:52 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g1F5xqk07727 for linux-mips-outgoing; Thu, 14 Feb 2002 21:59:52 -0800 Received: from dea.linux-mips.net (a1as18-p131.stg.tli.de [195.252.193.131]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g1F5xl907724 for ; Thu, 14 Feb 2002 21:59:47 -0800 Received: (from ralf@localhost) by dea.linux-mips.net (8.11.6/8.11.1) id g1F4uLt25251 for linux-mips@oss.sgi.com; Fri, 15 Feb 2002 05:56:21 +0100 Date: Fri, 15 Feb 2002 05:56:20 +0100 From: Ralf Baechle To: linux-mips@oss.sgi.com Subject: Re: ip22 watchdog timer Message-ID: <20020215055620.A25211@dea.linux-mips.net> References: <20020208172711.GA5605@bogon.ms20.nix> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <20020208172711.GA5605@bogon.ms20.nix>; from agx@sigxcpu.org on Fri, Feb 08, 2002 at 06:27:11PM +0100 X-Accept-Language: de,en,fr Sender: owner-linux-mips@oss.sgi.com Precedence: bulk On Fri, Feb 08, 2002 at 06:27:11PM +0100, Guido Guenther wrote: > attached is an updated patch for the ip22 watchdog timer. Please apply. Patch doesn't apply cleanly. *************** *** 574,579 **** fi # we always need the dummy console to make the serial console I2 happy define_bool CONFIG_DUMMY_CONSOLE y endmenu fi --- 574,584 ---- fi # we always need the dummy console to make the serial console I2 happy define_bool CONFIG_DUMMY_CONSOLE y + bool 'Watchdog Timer Support' CONFIG_WATCHDOG + if [ "$CONFIG_WATCHDOG" != "n" ]; then + bool ' Disable watchdog shutdown on close' CONFIG_WATCHDOG_NOWAYOUT + tristate ' Indy/I2 Hardware Watchdog' CONFIG_INDYDOG + fi endmenu fi Anyway, the comment about the I2 looks suspicious ... Ralf From owner-linux-mips@oss.sgi.com Fri Feb 15 00:20:51 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g1F8Kp609012 for linux-mips-outgoing; Fri, 15 Feb 2002 00:20:51 -0800 Received: from orion.mvista.com (gateway-1237.mvista.com [12.44.186.158]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g1F8Kj909009; Fri, 15 Feb 2002 00:20:45 -0800 Received: (from jsun@localhost) by orion.mvista.com (8.9.3/8.9.3) id XAA03608; Thu, 14 Feb 2002 23:20:30 -0800 Date: Thu, 14 Feb 2002 23:20:30 -0800 From: Jun Sun To: Ralf Baechle Cc: linux-mips@oss.sgi.com Subject: Re: FPU emulator unsafe for SMP? Message-ID: <20020214232030.A3601@mvista.com> References: <3C6C6ACF.CAD2FFC@mvista.com> <20020215031118.B21011@dea.linux-mips.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <20020215031118.B21011@dea.linux-mips.net>; from ralf@oss.sgi.com on Fri, Feb 15, 2002 at 03:11:18AM +0100 Sender: owner-linux-mips@oss.sgi.com Precedence: bulk On Fri, Feb 15, 2002 at 03:11:18AM +0100, Ralf Baechle wrote: > On Thu, Feb 14, 2002 at 05:56:31PM -0800, Jun Sun wrote: > > > I have been chasing a FPU register corruption problem on a SMP box. The > > curruption seems to be caused by FPU emulator code. Is that code SMP safe? > > If not, what are the volunerable spots? > > > > Just thought I'd check before I dive into it .... > > In theory the fp emulation code should be MP safe as the full emulation > is only accessing it's context in the fp register set of struct > task_struct. The 32-bit kernel's fp register switching is entirely broken > (read: close to non-existant). Lots of brownie points for somebody to > backport that from the 64-bit kernel to the 32-bit kernel and forward > port all the FPU emu bits to the 64-bit kernel ... > Brownie sounds good. :-) So what is the "fp register switching" you are referring to? There is set of code related to lazy fpu context switch, which seems to be working fine now. Jun From owner-linux-mips@oss.sgi.com Fri Feb 15 01:31:03 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g1F9V3Z11782 for linux-mips-outgoing; Fri, 15 Feb 2002 01:31:03 -0800 Received: from orion.mvista.com (gateway-1237.mvista.com [12.44.186.158]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g1F9Us911778; Fri, 15 Feb 2002 01:30:55 -0800 Received: (from jsun@localhost) by orion.mvista.com (8.9.3/8.9.3) id AAA03677; Fri, 15 Feb 2002 00:30:38 -0800 Date: Fri, 15 Feb 2002 00:30:37 -0800 From: Jun Sun To: Ralf Baechle Cc: linux-mips@oss.sgi.com Subject: Re: FPU emulator unsafe for SMP? Message-ID: <20020215003037.A3670@mvista.com> References: <3C6C6ACF.CAD2FFC@mvista.com> <20020215031118.B21011@dea.linux-mips.net> <20020214232030.A3601@mvista.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <20020214232030.A3601@mvista.com>; from jsun@mvista.com on Thu, Feb 14, 2002 at 11:20:30PM -0800 Sender: owner-linux-mips@oss.sgi.com Precedence: bulk On Thu, Feb 14, 2002 at 11:20:30PM -0800, Jun Sun wrote: > On Fri, Feb 15, 2002 at 03:11:18AM +0100, Ralf Baechle wrote: > > On Thu, Feb 14, 2002 at 05:56:31PM -0800, Jun Sun wrote: > > > > > I have been chasing a FPU register corruption problem on a SMP box. The > > > curruption seems to be caused by FPU emulator code. Is that code SMP safe? > > > If not, what are the volunerable spots? > > > > > > Just thought I'd check before I dive into it .... > > > > In theory the fp emulation code should be MP safe as the full emulation > > is only accessing it's context in the fp register set of struct > > task_struct. The 32-bit kernel's fp register switching is entirely broken > > (read: close to non-existant). Lots of brownie points for somebody to > > backport that from the 64-bit kernel to the 32-bit kernel and forward > > port all the FPU emu bits to the 64-bit kernel ... > > > > Brownie sounds good. :-) So what is the "fp register switching" you are > referring to? There is set of code related to lazy fpu context switch, > which seems to be working fine now. > Hmm, I see. The lazy fpu context switch code is not SMP safe. I see fishy things like "last_task_used_math" etc... Jun From owner-linux-mips@oss.sgi.com Fri Feb 15 02:49:03 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g1FAn3r13141 for linux-mips-outgoing; Fri, 15 Feb 2002 02:49:03 -0800 Received: from mx.mips.com (mx.mips.com [206.31.31.226]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g1FAn0913138 for ; Fri, 15 Feb 2002 02:49:00 -0800 Received: from newman.mips.com (ns-dmz [206.31.31.225]) by mx.mips.com (8.9.3/8.9.0) with ESMTP id BAA09495; Fri, 15 Feb 2002 01:48:55 -0800 (PST) Received: from Ulysses (ulysses [192.168.236.13]) by newman.mips.com (8.9.3/8.9.0) with SMTP id BAA08010; Fri, 15 Feb 2002 01:48:50 -0800 (PST) Message-ID: <006d01c1b606$21929c80$0deca8c0@Ulysses> From: "Kevin D. Kissell" To: "Jun Sun" , References: <3C6C6ACF.CAD2FFC@mvista.com> Subject: Re: FPU emulator unsafe for SMP? Date: Fri, 15 Feb 2002 09:14:52 +0100 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.4807.1700 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4807.1700 Sender: owner-linux-mips@oss.sgi.com Precedence: bulk > I have been chasing a FPU register corruption problem on a SMP box. The > curruption seems to be caused by FPU emulator code. Is that code SMP safe? > If not, what are the volunerable spots? > > Just thought I'd check before I dive into it .... While the very first prototype was grossly SMP unsafe, the state associated with the emulated "FPU" was migrated into the thread context area long ago. It is just possible, however, that some internal emulator state persists in a global variable somewhere, which could create problems under SMP execution. > BTW, I think even with the latest fpu emu patch, the classic fpu/signal > problem is still there. I will post in a separate email later. I submitted a series of patches a year or so ago, the last of which really should have been a comprehensive fix to the FPU context switch and signal problems. The last time I looked, that patch had never made it into the OSS repository, but neither had anyone reported any holes in it. Kevin K. From owner-linux-mips@oss.sgi.com Fri Feb 15 02:49:13 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g1FAnDX13176 for linux-mips-outgoing; Fri, 15 Feb 2002 02:49:13 -0800 Received: from mx.mips.com (mx.mips.com [206.31.31.226]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g1FAnA913170 for ; Fri, 15 Feb 2002 02:49:10 -0800 Received: from newman.mips.com (ns-dmz [206.31.31.225]) by mx.mips.com (8.9.3/8.9.0) with ESMTP id BAA09499; Fri, 15 Feb 2002 01:49:05 -0800 (PST) Received: from Ulysses (ulysses [192.168.236.13]) by newman.mips.com (8.9.3/8.9.0) with SMTP id BAA08013; Fri, 15 Feb 2002 01:48:52 -0800 (PST) Message-ID: <006e01c1b606$27b1b060$0deca8c0@Ulysses> From: "Kevin D. Kissell" To: "Atsushi Nemoto" Cc: , , , , References: <010601c1b3bd$1da618e0$0deca8c0@Ulysses><20020213.102805.74755945.nemoto@toshiba-tops.co.jp> <20020215.123124.70226832.nemoto@toshiba-tops.co.jp> Subject: Re: [patch] linux 2.4.17: The second mb() rework (final) Date: Fri, 15 Feb 2002 09:30:45 +0100 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.4807.1700 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4807.1700 Sender: owner-linux-mips@oss.sgi.com Precedence: bulk From: "Atsushi Nemoto" : > Note that SYNC on TX39/H and TX39/H2 does not flush a write buffer. > Some operation (for example, bc0f loop) are required to flush a write > buffer. That is, I would say, a bug in the TX39 implementation of SYNC. The specification is states that all stores prior to the SYNC must complete before any memory ops after the sync, and that the definition of a store completing is that all stored values be "visible to every other processor in the system", which pretty clearly implies that the write buffers must be flushed. So I think that the Linux code was perfectly correct in considering the TX39 to be without SYNC, just as a Vr4101 must be consdered to be without LL/SC. They decode the instructions, but they don't actually implement them as specified. Kevin K. From owner-linux-mips@oss.sgi.com Fri Feb 15 02:55:41 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g1FAtfr13393 for linux-mips-outgoing; Fri, 15 Feb 2002 02:55:41 -0800 Received: from mx.mips.com (mx.mips.com [206.31.31.226]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g1FAtX913378; Fri, 15 Feb 2002 02:55:33 -0800 Received: from newman.mips.com (ns-dmz [206.31.31.225]) by mx.mips.com (8.9.3/8.9.0) with ESMTP id BAA09559; Fri, 15 Feb 2002 01:55:27 -0800 (PST) Received: from grendel (grendel [192.168.236.16]) by newman.mips.com (8.9.3/8.9.0) with SMTP id BAA08131; Fri, 15 Feb 2002 01:55:22 -0800 (PST) Message-ID: <002b01c1b607$6afbd5c0$10eca8c0@grendel> From: "Kevin D. Kissell" To: "Jun Sun" , "Ralf Baechle" Cc: References: <3C6C6ACF.CAD2FFC@mvista.com> <20020215031118.B21011@dea.linux-mips.net> <20020214232030.A3601@mvista.com> <20020215003037.A3670@mvista.com> Subject: Re: FPU emulator unsafe for SMP? Date: Fri, 15 Feb 2002 10:59:09 +0100 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.4807.1700 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4807.1700 Sender: owner-linux-mips@oss.sgi.com Precedence: bulk > > > > I have been chasing a FPU register corruption problem on a SMP box. The > > > > curruption seems to be caused by FPU emulator code. Is that code SMP safe? > > > > If not, what are the volunerable spots? > > > > > > In theory the fp emulation code should be MP safe as the full emulation > > > is only accessing it's context in the fp register set of struct > > > task_struct. The 32-bit kernel's fp register switching is entirely broken > > > (read: close to non-existant). Lots of brownie points for somebody to > > > backport that from the 64-bit kernel to the 32-bit kernel and forward > > > port all the FPU emu bits to the 64-bit kernel ... > > > > > > > Brownie sounds good. :-) So what is the "fp register switching" you are > > referring to? There is set of code related to lazy fpu context switch, > > which seems to be working fine now. > > > > Hmm, I see. The lazy fpu context switch code is not SMP safe. > I see fishy things like "last_task_used_math" etc... What, you mean "last_task_used_math" isn't allocated in a processor-specific page of kseg3??? ;-) Kevin K. From owner-linux-mips@oss.sgi.com Fri Feb 15 04:50:11 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g1FCoBc16606 for linux-mips-outgoing; Fri, 15 Feb 2002 04:50:11 -0800 Received: from dea.linux-mips.net (a1as06-p212.stg.tli.de [195.252.187.212]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g1FCo7916603 for ; Fri, 15 Feb 2002 04:50:08 -0800 Received: (from ralf@localhost) by dea.linux-mips.net (8.11.6/8.11.1) id g1FAvBu26813; Fri, 15 Feb 2002 11:57:11 +0100 Date: Fri, 15 Feb 2002 11:57:11 +0100 From: Ralf Baechle To: "Kevin D. Kissell" , carstenl@mips.com Cc: Jun Sun , linux-mips@oss.sgi.com Subject: Re: FPU emulator unsafe for SMP? Message-ID: <20020215115711.A26798@dea.linux-mips.net> References: <3C6C6ACF.CAD2FFC@mvista.com> <006d01c1b606$21929c80$0deca8c0@Ulysses> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <006d01c1b606$21929c80$0deca8c0@Ulysses>; from kevink@mips.com on Fri, Feb 15, 2002 at 09:14:52AM +0100 X-Accept-Language: de,en,fr Sender: owner-linux-mips@oss.sgi.com Precedence: bulk On Fri, Feb 15, 2002 at 09:14:52AM +0100, Kevin D. Kissell wrote: > I submitted a series of patches a year or so ago, the > last of which really should have been a comprehensive > fix to the FPU context switch and signal problems. > The last time I looked, that patch had never made it into > the OSS repository, but neither had anyone reported > any holes in it. I was actually beliving that the bundle of patches I received from Carsten maybe 3 months ago did fix all the issues? Ralf From owner-linux-mips@oss.sgi.com Fri Feb 15 04:50:29 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g1FCoT016625 for linux-mips-outgoing; Fri, 15 Feb 2002 04:50:29 -0800 Received: from dea.linux-mips.net (a1as06-p212.stg.tli.de [195.252.187.212]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g1FCoP916616 for ; Fri, 15 Feb 2002 04:50:25 -0800 Received: (from ralf@localhost) by dea.linux-mips.net (8.11.6/8.11.1) id g1FAo6S26781; Fri, 15 Feb 2002 11:50:06 +0100 Date: Fri, 15 Feb 2002 11:50:06 +0100 From: Ralf Baechle To: "Kevin D. Kissell" Cc: Atsushi Nemoto , macro@ds2.pg.gda.pl, mdharm@momenco.com, linux-mips@fnet.fr, linux-mips@oss.sgi.com Subject: Re: [patch] linux 2.4.17: The second mb() rework (final) Message-ID: <20020215115006.B26756@dea.linux-mips.net> References: <010601c1b3bd$1da618e0$0deca8c0@Ulysses><20020213.102805.74755945.nemoto@toshiba-tops.co.jp> <20020215.123124.70226832.nemoto@toshiba-tops.co.jp> <006e01c1b606$27b1b060$0deca8c0@Ulysses> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <006e01c1b606$27b1b060$0deca8c0@Ulysses>; from kevink@mips.com on Fri, Feb 15, 2002 at 09:30:45AM +0100 X-Accept-Language: de,en,fr Sender: owner-linux-mips@oss.sgi.com Precedence: bulk On Fri, Feb 15, 2002 at 09:30:45AM +0100, Kevin D. Kissell wrote: > That is, I would say, a bug in the TX39 implementation of SYNC. > The specification is states that all stores prior to the SYNC must > complete before any memory ops after the sync, and that the > definition of a store completing is that all stored values be > "visible to every other processor in the system", which pretty > clearly implies that the write buffers must be flushed. In practice sync just isn't good enough. Most systems these days use an I/O bus like PCI which uses posted writes or have some other non-strongly ordered memory model. Which is why something wmb() or mb() aren't good enough in driver. I'm just having a nice discussion about this topic with SGI's IA64 people; we have to come up with a portable and efficient ABI. Ralf From owner-linux-mips@oss.sgi.com Fri Feb 15 04:58:00 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g1FCw0Y16881 for linux-mips-outgoing; Fri, 15 Feb 2002 04:58:00 -0800 Received: from oval.algor.co.uk (root@oval.algor.co.uk [62.254.210.250]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g1FCvu916878 for ; Fri, 15 Feb 2002 04:57:57 -0800 Received: from mudchute.algor.co.uk (dom@mudchute.algor.co.uk [62.254.210.251]) by oval.algor.co.uk (8.11.6/8.10.1) with ESMTP id g1FBv5402720; Fri, 15 Feb 2002 11:57:05 GMT Received: (from dom@localhost) by mudchute.algor.co.uk (8.8.5/8.8.5) id LAA17485; Fri, 15 Feb 2002 11:56:59 GMT Date: Fri, 15 Feb 2002 11:56:59 GMT Message-Id: <200202151156.LAA17485@mudchute.algor.co.uk> From: Dominic Sweetman MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit To: "Kevin D. Kissell" Cc: "Atsushi Nemoto" , , , , , Subject: Re: [patch] linux 2.4.17: The second mb() rework (final) In-Reply-To: <006e01c1b606$27b1b060$0deca8c0@Ulysses> References: <010601c1b3bd$1da618e0$0deca8c0@Ulysses> <20020213.102805.74755945.nemoto@toshiba-tops.co.jp> <20020215.123124.70226832.nemoto@toshiba-tops.co.jp> <006e01c1b606$27b1b060$0deca8c0@Ulysses> X-Mailer: VM 6.34 under 19.16 "Lille" XEmacs Lucid Sender: owner-linux-mips@oss.sgi.com Precedence: bulk Kevin D. Kissell (kevink@mips.com) writes: > > Note that SYNC on TX39/H and TX39/H2 does not flush a write buffer. > > Some operation (for example, bc0f loop) are required to flush a write > > buffer. > > That is, I would say, a bug in the TX39 implementation of SYNC. That's only a problem if the CPU permitted reads to overtake buffered writes. [Early R3000 write buffers did that (with an address check to avoid the disaster of allowing a read to overtake a write to the same location).] But my recollection is that the TX39 does all memory operations in order: so SYNC has very little to do, but it isn't a bug. Dominic Sweetman Algorithmics From owner-linux-mips@oss.sgi.com Fri Feb 15 05:06:08 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g1FD68N17220 for linux-mips-outgoing; Fri, 15 Feb 2002 05:06:08 -0800 Received: from mx.mips.com (mx.mips.com [206.31.31.226]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g1FD63917213 for ; Fri, 15 Feb 2002 05:06:03 -0800 Received: from newman.mips.com (ns-dmz [206.31.31.225]) by mx.mips.com (8.9.3/8.9.0) with ESMTP id EAA10821; Fri, 15 Feb 2002 04:05:52 -0800 (PST) Received: from copfs01.mips.com (copfs01 [192.168.205.101]) by newman.mips.com (8.9.3/8.9.0) with ESMTP id EAA10661; Fri, 15 Feb 2002 04:05:49 -0800 (PST) Received: from copsun18.mips.com (copsun18 [192.168.205.28]) by copfs01.mips.com (8.11.4/8.9.0) with ESMTP id g1FC5GA17265; Fri, 15 Feb 2002 13:05:17 +0100 (MET) From: Hartvig Ekner Received: (from hartvige@localhost) by copsun18.mips.com (8.9.1/8.9.0) id NAA25636; Fri, 15 Feb 2002 13:05:16 +0100 (MET) Message-Id: <200202151205.NAA25636@copsun18.mips.com> Subject: Re: [patch] linux 2.4.17: The second mb() rework (final) To: dom@algor.co.uk (Dominic Sweetman) Date: Fri, 15 Feb 2002 13:05:16 +0100 (MET) Cc: kevink@mips.com (Kevin D. Kissell), nemoto@toshiba-tops.co.jp (Atsushi Nemoto), macro@ds2.pg.gda.pl, mdharm@momenco.com, ralf@uni-koblenz.de, linux-mips@fnet.fr, linux-mips@oss.sgi.com In-Reply-To: <200202151156.LAA17485@mudchute.algor.co.uk> from "Dominic Sweetman" at Feb 15, 2002 11:56:59 AM X-Mailer: ELM [version 2.5 PL1] MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-linux-mips@oss.sgi.com Precedence: bulk But in-order for the CPU is not enough - it also needs to make sure all written data is visible for DMA accesses to memory from the outside, which is why the writebuffer needs to be flushed by a SYNC as well. From the definition of "SYNC": "A store is completed when the stored value is visible to every other processor in the system". Which presumably also includes DMA I/O devices... /Hartvig Dominic Sweetman writes: > > > Kevin D. Kissell (kevink@mips.com) writes: > > > > Note that SYNC on TX39/H and TX39/H2 does not flush a write buffer. > > > Some operation (for example, bc0f loop) are required to flush a write > > > buffer. > > > > That is, I would say, a bug in the TX39 implementation of SYNC. > > That's only a problem if the CPU permitted reads to overtake buffered > writes. [Early R3000 write buffers did that (with an address check to > avoid the disaster of allowing a read to overtake a write to the same > location).] > > But my recollection is that the TX39 does all memory operations in > order: so SYNC has very little to do, but it isn't a bug. > > Dominic Sweetman > Algorithmics > -- _ _ _____ ____ Hartvig Ekner Mailto:hartvige@mips.com |\ /| | |____)(____ Direct: +45 4486 5503 | \/ | | | _____) MIPS Denmark Switch: +45 4486 5555 T E C H N O L O G I E S http://www.mips.com Fax...: +45 4486 5556 From owner-linux-mips@oss.sgi.com Fri Feb 15 05:06:44 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g1FD6iF17278 for linux-mips-outgoing; Fri, 15 Feb 2002 05:06:44 -0800 Received: from gandalf.physik.uni-konstanz.de (gandalf.physik.uni-konstanz.de [134.34.144.69]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g1FD6F917263; Fri, 15 Feb 2002 05:06:15 -0800 Received: by gandalf.physik.uni-konstanz.de (Postfix, from userid 501) id 225F8B489; Fri, 15 Feb 2002 13:06:14 +0100 (CET) Date: Fri, 15 Feb 2002 13:06:14 +0100 From: Guido Guenther To: Ralf Baechle Cc: linux-mips@oss.sgi.com Subject: Re: ip22 watchdog timer Message-ID: <20020215130613.A301@gandalf.physik.uni-konstanz.de> Mail-Followup-To: Ralf Baechle , linux-mips@oss.sgi.com References: <20020208172711.GA5605@bogon.ms20.nix> <20020215055620.A25211@dea.linux-mips.net> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="8t9RHnE3ZwKMSgU+" Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <20020215055620.A25211@dea.linux-mips.net>; from ralf@oss.sgi.com on Fri, Feb 15, 2002 at 05:56:20AM +0100 Sender: owner-linux-mips@oss.sgi.com Precedence: bulk --8t9RHnE3ZwKMSgU+ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Fri, Feb 15, 2002 at 05:56:20AM +0100, Ralf Baechle wrote: > On Fri, Feb 08, 2002 at 06:27:11PM +0100, Guido Guenther wrote: > > > attached is an updated patch for the ip22 watchdog timer. Please apply. > > Patch doesn't apply cleanly. Artifacts of my other IP22 patches, I moved the config stuff to the other watchdog drivers in drivers/char/Config.in now. Applies cleanly on fresh 2.4.17 CVS checkout. -- Guido --8t9RHnE3ZwKMSgU+ Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="indydog-2002-02-15.diff" diff --exclude=CVS -Naur linux-2.4.17.orig/Documentation/Configure.help linux-2.4.17/Documentation/Configure.help --- linux-2.4.17.orig/Documentation/Configure.help Sat Dec 29 06:37:46 2001 +++ linux-2.4.17/Documentation/Configure.help Fri Feb 15 09:55:06 2002 @@ -3129,6 +3129,13 @@ via the file /proc/rtc and its behaviour is set by various ioctls on /dev/rtc. +Indy/I2 Hardware Watchdog +CONFIG_INDYDOG + Hardwaredriver for the Indy's/I2's watchdog. This is a + watchdog timer that will reboot the machine after a 60 second + timer expired and no process has written to /dev/watchdog during + that time. + Support the Bell Technologies HUB6 card CONFIG_HUB6 Say Y here to enable support in the dumb serial driver to support diff --exclude=CVS -Naur linux-2.4.17.orig/arch/mips/sgi-ip22/ip22-mc.c linux-2.4.17/arch/mips/sgi-ip22/ip22-mc.c --- linux-2.4.17.orig/arch/mips/sgi-ip22/ip22-mc.c Tue Nov 27 16:57:11 2001 +++ linux-2.4.17/arch/mips/sgi-ip22/ip22-mc.c Fri Feb 15 09:55:07 2002 @@ -82,6 +82,14 @@ * interrupts are first enabled etc. */ + /* Step 0: Make sure we turn off the watchdog in case it's + * still running (which might be the case after a + * soft reboot). + */ + tmpreg = mcmisc_regs->cpuctrl0; + tmpreg &= ~SGIMC_CCTRL0_WDOG; + mcmisc_regs->cpuctrl0 = tmpreg; + /* Step 1: The CPU/GIO error status registers will not latch * up a new error status until the register has been * cleared by the cpu. These status registers are diff --exclude=CVS -Naur linux-2.4.17.orig/drivers/char/Config.in linux-2.4.17/drivers/char/Config.in --- linux-2.4.17.orig/drivers/char/Config.in Sun Dec 2 12:34:40 2001 +++ linux-2.4.17/drivers/char/Config.in Fri Feb 15 10:00:59 2002 @@ -199,6 +199,7 @@ tristate ' SBC-60XX Watchdog Timer' CONFIG_60XX_WDT tristate ' W83877F (EMACS) Watchdog Timer' CONFIG_W83877F_WDT tristate ' ZF MachZ Watchdog' CONFIG_MACHZ_WDT + tristate ' Indy/I2 Hardware Watchdog' CONFIG_INDYDOG fi endmenu diff --exclude=CVS -Naur linux-2.4.17.orig/drivers/char/Makefile linux-2.4.17/drivers/char/Makefile --- linux-2.4.17.orig/drivers/char/Makefile Mon Jan 7 04:33:54 2002 +++ linux-2.4.17/drivers/char/Makefile Fri Feb 15 09:55:07 2002 @@ -245,6 +245,7 @@ obj-$(CONFIG_SH_WDT) += shwdt.o obj-$(CONFIG_EUROTECH_WDT) += eurotechwdt.o obj-$(CONFIG_SOFT_WATCHDOG) += softdog.o +obj-$(CONFIG_INDYDOG) += indydog.o subdir-$(CONFIG_MWAVE) += mwave ifeq ($(CONFIG_MWAVE),y) diff --exclude=CVS -Naur linux-2.4.17.orig/drivers/char/indydog.c linux-2.4.17/drivers/char/indydog.c --- linux-2.4.17.orig/drivers/char/indydog.c Thu Jan 1 01:00:00 1970 +++ linux-2.4.17/drivers/char/indydog.c Fri Feb 15 09:55:07 2002 @@ -0,0 +1,158 @@ +/* + * IndyDog 0.2 A Hardware Watchdog Device for SGI IP22 + * + * (c) Copyright 2002 Guido Guenther , 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. + * + * based on softdog.c by Alan Cox + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +static int indydog_alive; +static struct sgimc_misc_ctrl *mcmisc_regs; + +static void indydog_ping() +{ + mcmisc_regs->watchdogt = 0; +} + + +/* + * Allow only one person to hold it open + */ + +static int indydog_open(struct inode *inode, struct file *file) +{ + u32 mc_ctrl0; + + if(indydog_alive) + return -EBUSY; +#ifdef CONFIG_WATCHDOG_NOWAYOUT + MOD_INC_USE_COUNT; +#endif + /* + * Activate timer + */ + mcmisc_regs = (struct sgimc_misc_ctrl *)(KSEG1+0x1fa00000); + + mc_ctrl0 = mcmisc_regs->cpuctrl0 | SGIMC_CCTRL0_WDOG; + mcmisc_regs->cpuctrl0 = mc_ctrl0; + indydog_ping(); + + indydog_alive=1; + printk("Started watchdog timer.\n"); + return 0; +} + +static int indydog_release(struct inode *inode, struct file *file) +{ + /* + * Shut off the timer. + * Lock it in if it's a module and we defined ...NOWAYOUT + */ + lock_kernel(); +#ifndef CONFIG_WATCHDOG_NOWAYOUT + { + u32 mc_ctrl0 = mcmisc_regs->cpuctrl0; + mc_ctrl0 &= ~SGIMC_CCTRL0_WDOG; + mcmisc_regs->cpuctrl0 = mc_ctrl0; + printk("Stopped watchdog timer.\n"); + } +#endif + indydog_alive=0; + unlock_kernel(); + return 0; +} + +static ssize_t indydog_write(struct file *file, const char *data, size_t len, loff_t *ppos) +{ + /* Can't seek (pwrite) on this device */ + if (ppos != &file->f_pos) + return -ESPIPE; + + /* + * Refresh the timer. + */ + if(len) { + indydog_ping(); + return 1; + } + return 0; +} + +static int indydog_ioctl(struct inode *inode, struct file *file, + unsigned int cmd, unsigned long arg) +{ + static struct watchdog_info ident = { + identity: "Hardware Watchdog for SGI IP22", + }; + switch (cmd) { + default: + return -ENOIOCTLCMD; + case WDIOC_GETSUPPORT: + if(copy_to_user((struct watchdog_info *)arg, &ident, sizeof(ident))) + return -EFAULT; + return 0; + case WDIOC_GETSTATUS: + case WDIOC_GETBOOTSTATUS: + return put_user(0,(int *)arg); + case WDIOC_KEEPALIVE: + indydog_ping(); + return 0; + } +} + +static struct file_operations indydog_fops = { + owner: THIS_MODULE, + write: indydog_write, + ioctl: indydog_ioctl, + open: indydog_open, + release: indydog_release, +}; + +static struct miscdevice indydog_miscdev = { + minor: WATCHDOG_MINOR, + name: "watchdog", + fops: &indydog_fops, +}; + +static const char banner[] __initdata = KERN_INFO "Hardware Watchdog Timer for SGI IP22: 0.2\n"; + +static int __init watchdog_init(void) +{ + int ret; + + ret = misc_register(&indydog_miscdev); + + if (ret) + return ret; + + printk(banner); + + return 0; +} + +static void __exit watchdog_exit(void) +{ + misc_deregister(&indydog_miscdev); +} + +module_init(watchdog_init); +module_exit(watchdog_exit); +MODULE_LICENSE("GPL"); --8t9RHnE3ZwKMSgU+-- From owner-linux-mips@oss.sgi.com Fri Feb 15 05:10:34 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g1FDAYY17404 for linux-mips-outgoing; Fri, 15 Feb 2002 05:10:34 -0800 Received: from delta.ds2.pg.gda.pl (macro@delta.ds2.pg.gda.pl [213.192.72.1]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g1FDAN917400 for ; Fri, 15 Feb 2002 05:10:24 -0800 Received: from localhost by delta.ds2.pg.gda.pl (8.9.3/8.9.3) with SMTP id NAA00974; Fri, 15 Feb 2002 13:08:21 +0100 (MET) Date: Fri, 15 Feb 2002 13:08:20 +0100 (MET) From: "Maciej W. Rozycki" To: Atsushi Nemoto cc: kevink@mips.com, mdharm@momenco.com, ralf@uni-koblenz.de, linux-mips@fnet.fr, linux-mips@oss.sgi.com Subject: Re: [patch] linux 2.4.17: The second mb() rework (final) In-Reply-To: <20020215.123124.70226832.nemoto@toshiba-tops.co.jp> Message-ID: Organization: Technical University of Gdansk MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-linux-mips@oss.sgi.com Precedence: bulk On Fri, 15 Feb 2002, Atsushi Nemoto wrote: > Note that SYNC on TX39/H and TX39/H2 does not flush a write buffer. That's perfectly fine -- it does not need to. It's only a synchronization point. > Some operation (for example, bc0f loop) are required to flush a write > buffer. This is bad, though. No extra operations must be needed. After a "sync" the buffer should be written back as soon as not doing so would be visible externally. IOW, two consecutive writes separated by a "sync" need not imply a write-back, but as soon as a read happens a preceding write-back is a must. It sounds weird: it looks like "sync" is useless and basically a "nop". If this is the case the processors need their own wbflush() implementation. Can you point to specific chapters of specifications that document it? -- + Maciej W. Rozycki, Technical University of Gdansk, Poland + +--------------------------------------------------------------+ + e-mail: macro@ds2.pg.gda.pl, PGP key available + From owner-linux-mips@oss.sgi.com Fri Feb 15 05:13:07 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g1FDD7N17489 for linux-mips-outgoing; Fri, 15 Feb 2002 05:13:07 -0800 Received: from delta.ds2.pg.gda.pl (macro@delta.ds2.pg.gda.pl [213.192.72.1]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g1FDCc917484 for ; Fri, 15 Feb 2002 05:12:39 -0800 Received: from localhost by delta.ds2.pg.gda.pl (8.9.3/8.9.3) with SMTP id NAA01131; Fri, 15 Feb 2002 13:11:16 +0100 (MET) Date: Fri, 15 Feb 2002 13:11:15 +0100 (MET) From: "Maciej W. Rozycki" To: "Kevin D. Kissell" cc: Atsushi Nemoto , mdharm@momenco.com, ralf@uni-koblenz.de, linux-mips@fnet.fr, linux-mips@oss.sgi.com Subject: Re: [patch] linux 2.4.17: The second mb() rework (final) In-Reply-To: <006e01c1b606$27b1b060$0deca8c0@Ulysses> Message-ID: Organization: Technical University of Gdansk MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-linux-mips@oss.sgi.com Precedence: bulk On Fri, 15 Feb 2002, Kevin D. Kissell wrote: > So I think that the Linux code was perfectly correct in considering > the TX39 to be without SYNC, just as a Vr4101 must be > consdered to be without LL/SC. They decode the instructions, > but they don't actually implement them as specified. The code is not correct if "bc0f" is needed to be sure a write-back happened. If that is the case, the processors need their own wbflush() implementation like R2k/R3k configurations in older DECstations. -- + Maciej W. Rozycki, Technical University of Gdansk, Poland + +--------------------------------------------------------------+ + e-mail: macro@ds2.pg.gda.pl, PGP key available + From owner-linux-mips@oss.sgi.com Fri Feb 15 05:32:04 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g1FDW4E17688 for linux-mips-outgoing; Fri, 15 Feb 2002 05:32:04 -0800 Received: from delta.ds2.pg.gda.pl (delta.ds2.pg.gda.pl [213.192.72.1]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g1FDVd917684; Fri, 15 Feb 2002 05:31:40 -0800 Received: from localhost by delta.ds2.pg.gda.pl (8.9.3/8.9.3) with SMTP id NAA01735; Fri, 15 Feb 2002 13:31:44 +0100 (MET) Date: Fri, 15 Feb 2002 13:31:43 +0100 (MET) From: "Maciej W. Rozycki" To: Ralf Baechle cc: "Kevin D. Kissell" , Atsushi Nemoto , mdharm@momenco.com, linux-mips@fnet.fr, linux-mips@oss.sgi.com Subject: Re: [patch] linux 2.4.17: The second mb() rework (final) In-Reply-To: <20020215115006.B26756@dea.linux-mips.net> Message-ID: Organization: Technical University of Gdansk MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-linux-mips@oss.sgi.com Precedence: bulk On Fri, 15 Feb 2002, Ralf Baechle wrote: > In practice sync just isn't good enough. Most systems these days use > an I/O bus like PCI which uses posted writes or have some other > non-strongly ordered memory model. Which is why something wmb() or > mb() aren't good enough in driver. I'm just having a nice discussion It depends on what a driver needs. They are perfectly sufficient and actually needed for host bus devices if you need to be sure writes and/or reads happen in order. It's only when a side-effect of a write needs to happen immediately a write-back flush is needed. It doesn't happen that often. AFAIK, PCI only allows posted writes -- it doesn't allow write or read reordering, so mb() and friends are sufficient. Are there any busses we support or are going to in foreseeable future that have a weak ordering model? > about this topic with SGI's IA64 people; we have to come up with a > portable and efficient ABI. ABI? API, I suppose. I can't see anything special here -- drivers already know the bus they are on and they know if it needs any specific handling. I don't think it's possibly to define general functions for I/O buses as actions depend on the device that's being addressed. E.g. for a PCI device a driver needs to perform a read from one of the device's assigned regions and which location exactly, depends on what memory or registers the device implements (surely it can't read one that implies side effects). It can't just do an arbitrary read from a location decoded to the bus. Anyway, will my patch get applied or do we have to wait until the discussion concludes? The patch doesn't affect any I/O bus-specific operations, so it's orthogonal. Also a new API is surely a 2.5 item. -- + Maciej W. Rozycki, Technical University of Gdansk, Poland + +--------------------------------------------------------------+ + e-mail: macro@ds2.pg.gda.pl, PGP key available + From owner-linux-mips@oss.sgi.com Fri Feb 15 05:44:23 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g1FDiNc17882 for linux-mips-outgoing; Fri, 15 Feb 2002 05:44:23 -0800 Received: from mx.mips.com (mx.mips.com [206.31.31.226]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g1FDiK917878 for ; Fri, 15 Feb 2002 05:44:20 -0800 Received: from newman.mips.com (ns-dmz [206.31.31.225]) by mx.mips.com (8.9.3/8.9.0) with ESMTP id EAA11123; Fri, 15 Feb 2002 04:44:14 -0800 (PST) Received: from grendel (grendel [192.168.236.16]) by newman.mips.com (8.9.3/8.9.0) with SMTP id EAA11277; Fri, 15 Feb 2002 04:44:11 -0800 (PST) Message-ID: <008601c1b61e$ff4d88b0$10eca8c0@grendel> From: "Kevin D. Kissell" To: "Maciej W. Rozycki" Cc: "Atsushi Nemoto" , , , , References: Subject: Re: [patch] linux 2.4.17: The second mb() rework (final) Date: Fri, 15 Feb 2002 13:47:12 +0100 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.4807.1700 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4807.1700 Sender: owner-linux-mips@oss.sgi.com Precedence: bulk > On Fri, 15 Feb 2002, Kevin D. Kissell wrote: > > > So I think that the Linux code was perfectly correct in considering > > the TX39 to be without SYNC, just as a Vr4101 must be > > consdered to be without LL/SC. They decode the instructions, > > but they don't actually implement them as specified. > > The code is not correct if "bc0f" is needed to be sure a write-back > happened. If that is the case, the processors need their own wbflush() > implementation like R2k/R3k configurations in older DECstations. Note that I did not say that "the code is correct", only that it is correct *in considering the TX39 to be effectively SYNC-less*. I'm sure that the code is anyway broken six ways from Wednesday, as usual. ;-) Kevin K. From owner-linux-mips@oss.sgi.com Fri Feb 15 06:01:30 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g1FE1UN18235 for linux-mips-outgoing; Fri, 15 Feb 2002 06:01:30 -0800 Received: from sgi.com (sgi-too.SGI.COM [204.94.211.39]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g1FE1Q918232 for ; Fri, 15 Feb 2002 06:01:26 -0800 Received: from delta.ds2.pg.gda.pl (delta.ds2.pg.gda.pl [213.192.72.1]) by sgi.com (980327.SGI.8.8.8-aspam/980304.SGI-aspam: SGI does not authorize the use of its proprietary systems or networks for unsolicited or bulk email from the Internet.) via ESMTP id FAA07078 for ; Fri, 15 Feb 2002 05:01:21 -0800 (PST) mail_from (macro@ds2.pg.gda.pl) Received: from localhost by delta.ds2.pg.gda.pl (8.9.3/8.9.3) with SMTP id NAA02328; Fri, 15 Feb 2002 13:53:51 +0100 (MET) Date: Fri, 15 Feb 2002 13:53:50 +0100 (MET) From: "Maciej W. Rozycki" To: Dominic Sweetman cc: "Kevin D. Kissell" , Atsushi Nemoto , mdharm@momenco.com, ralf@uni-koblenz.de, linux-mips@fnet.fr, linux-mips@oss.sgi.com Subject: Re: [patch] linux 2.4.17: The second mb() rework (final) In-Reply-To: <200202151156.LAA17485@mudchute.algor.co.uk> Message-ID: Organization: Technical University of Gdansk MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-linux-mips@oss.sgi.com Precedence: bulk On Fri, 15 Feb 2002, Dominic Sweetman wrote: > That's only a problem if the CPU permitted reads to overtake buffered > writes. [Early R3000 write buffers did that (with an address check to > avoid the disaster of allowing a read to overtake a write to the same > location).] The R2020 and the R3220 write buffers that are used in older DECstations seem to provide buffered values themselves if hit by a read. This way they are completely safe for ordinary memory references and there is no need to stall for a write-back completion for memory operations. At least this is what DECstation specifications imply -- it seems hard to get to original docs for the chips these days. For I/O resources implying side effects a stall is needed, of course. The way the chips work is not that uncommon -- e.g. Intel's i486 does exactly the same. -- + Maciej W. Rozycki, Technical University of Gdansk, Poland + +--------------------------------------------------------------+ + e-mail: macro@ds2.pg.gda.pl, PGP key available + From owner-linux-mips@oss.sgi.com Fri Feb 15 06:14:05 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g1FEE5S18402 for linux-mips-outgoing; Fri, 15 Feb 2002 06:14:05 -0800 Received: from delta.ds2.pg.gda.pl (macro@delta.ds2.pg.gda.pl [213.192.72.1]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g1FEDa918388 for ; Fri, 15 Feb 2002 06:13:49 -0800 Received: from localhost by delta.ds2.pg.gda.pl (8.9.3/8.9.3) with SMTP id OAA02690; Fri, 15 Feb 2002 14:03:45 +0100 (MET) Date: Fri, 15 Feb 2002 14:03:45 +0100 (MET) From: "Maciej W. Rozycki" To: Hartvig Ekner cc: Dominic Sweetman , "Kevin D. Kissell" , Atsushi Nemoto , mdharm@momenco.com, ralf@uni-koblenz.de, linux-mips@fnet.fr, linux-mips@oss.sgi.com Subject: Re: [patch] linux 2.4.17: The second mb() rework (final) In-Reply-To: <200202151205.NAA25636@copsun18.mips.com> Message-ID: Organization: Technical University of Gdansk MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-linux-mips@oss.sgi.com Precedence: bulk On Fri, 15 Feb 2002, Hartvig Ekner wrote: > But in-order for the CPU is not enough - it also needs to make sure all > written data is visible for DMA accesses to memory from the outside, which > is why the writebuffer needs to be flushed by a SYNC as well. From the > definition of "SYNC": > > "A store is completed when the stored value is visible to every other > processor in the system". > > Which presumably also includes DMA I/O devices... The description found in the R4k manual seems to contradict. A "sync" on a single CPU only assures transactions on it's external bus will happen in order wrt the "sync". In a multiple-CPU environment all CPUs interested in a barrier need to execute a "sync". That's seems natural -- how would you define a synchronization point for a CPU that does not execute a "sync". Since I/O devices have no means to signal a CPU a "sync" operation, how can you expect a "sync" on the CPU to complete all preceding writes to the device? It's only a following read that may imply it. -- + Maciej W. Rozycki, Technical University of Gdansk, Poland + +--------------------------------------------------------------+ + e-mail: macro@ds2.pg.gda.pl, PGP key available + From owner-linux-mips@oss.sgi.com Fri Feb 15 06:20:27 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g1FEKRi18534 for linux-mips-outgoing; Fri, 15 Feb 2002 06:20:27 -0800 Received: from delta.ds2.pg.gda.pl (macro@delta.ds2.pg.gda.pl [213.192.72.1]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g1FEKL918531 for ; Fri, 15 Feb 2002 06:20:21 -0800 Received: from localhost by delta.ds2.pg.gda.pl (8.9.3/8.9.3) with SMTP id OAA03199; Fri, 15 Feb 2002 14:17:30 +0100 (MET) Date: Fri, 15 Feb 2002 14:17:30 +0100 (MET) From: "Maciej W. Rozycki" To: "Kevin D. Kissell" cc: Atsushi Nemoto , mdharm@momenco.com, ralf@uni-koblenz.de, linux-mips@fnet.fr, linux-mips@oss.sgi.com Subject: Re: [patch] linux 2.4.17: The second mb() rework (final) In-Reply-To: <008601c1b61e$ff4d88b0$10eca8c0@grendel> Message-ID: Organization: Technical University of Gdansk MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-linux-mips@oss.sgi.com Precedence: bulk On Fri, 15 Feb 2002, Kevin D. Kissell wrote: > > The code is not correct if "bc0f" is needed to be sure a write-back > > happened. If that is the case, the processors need their own wbflush() > > implementation like R2k/R3k configurations in older DECstations. > > Note that I did not say that "the code is correct", only that it > is correct *in considering the TX39 to be effectively SYNC-less*. Then you are probably misinterpreting CONFIG_CPU_HAS_SYNC (shame on me for not documenting it at all). It means a CPU has the "sync" instruction but it does not imply a "sync" is sufficient for mb() on the CPU. See the code in include/asm-mips/system.h in my patch. If CONFIG_CPU_HAS_WB is set wbflush() is executed for mb() regardless the setting of CONFIG_CPU_HAS_SYNC. Fast_mb() is set to a "sync" in case a wbflush() implementation needs it for something -- the DECstation's wbflush() actually uses it in a patch I have queued waiting for my pending submissions to be applied by Ralf. > I'm sure that the code is anyway broken six ways from Wednesday, > as usual. ;-) I hope with my fixes the number of ways decreases, though. ;-) -- + Maciej W. Rozycki, Technical University of Gdansk, Poland + +--------------------------------------------------------------+ + e-mail: macro@ds2.pg.gda.pl, PGP key available + From owner-linux-mips@oss.sgi.com Fri Feb 15 06:42:04 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g1FEg4K19084 for linux-mips-outgoing; Fri, 15 Feb 2002 06:42:04 -0800 Received: from server3.toshibatv.com (mail.toshibatv.com [67.32.37.75]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g1FEg1919081 for ; Fri, 15 Feb 2002 06:42:01 -0800 Received: by SERVER3 with Internet Mail Service (5.5.2653.19) id ; Fri, 15 Feb 2002 07:41:32 -0600 Message-ID: <7DF7BFDC95ECD411B4010090278A44CA1B7578@ATVX> From: "Siders, Keith" To: "Linux-Mips (E-mail)" Subject: hot patching Date: Fri, 15 Feb 2002 07:39:49 -0600 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2653.19) Content-Type: text/plain; charset="iso-8859-1" Sender: owner-linux-mips@oss.sgi.com Precedence: bulk I posted a general question a couple months back about this. Now that I have an approach in place, I wanted to see if the approach is workable before I spend a bunch of time trying to debug an approach that absolutely won't work for some fundamental reason. I am not yet a kernel guru (don't know that I want to be) but this "feature" seems to require intimate knowledge of the inner workings of the kernel's memory management. I'm attempting to set up a "hot patcher" in an embedded product. I'm attempting to use shared memory, however the "target" process is not aware of the patch being applied to it. Can a pseudo-driver attach a shared memory segment to a process which can then be executable by that process via a jump or jump-and-link, or is shared memory only for passing data and messages between collaborating processes? The references I've read only indicate the RW permissions, no X permissions. Or should I have the pseudo-driver actually allocate (by get_free_pages()) the memory required? And can it do this on behalf of the target process? If neither of these look workable, I've been thinking about the concept of using software interrupts. Any thoughts? Any constructive comments and/or insights greatly appreciated. ++++++++++++++++++++++++++++++++++++++++++++++++++ Keith Siders Software Engineer Toshiba Advanced Television Technology Center ++++++++++++++++++++++++++++++++++++++++++++++++++ From owner-linux-mips@oss.sgi.com Fri Feb 15 06:50:54 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g1FEost19289 for linux-mips-outgoing; Fri, 15 Feb 2002 06:50:54 -0800 Received: from the-village.bc.nu (lightning.swansea.linux.org.uk [194.168.151.1]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g1FEoo919286 for ; Fri, 15 Feb 2002 06:50:51 -0800 Received: from alan by the-village.bc.nu with local (Exim 3.33 #5) id 16biyn-0003EB-00; Fri, 15 Feb 2002 14:04:49 +0000 Subject: Re: hot patching To: keith_siders@toshibatv.com (Siders, Keith) Date: Fri, 15 Feb 2002 14:04:49 +0000 (GMT) Cc: linux-mips@oss.sgi.com ("Linux-Mips (E-mail)") In-Reply-To: <7DF7BFDC95ECD411B4010090278A44CA1B7578@ATVX> from "Siders, Keith" at Feb 15, 2002 07:39:49 AM X-Mailer: ELM [version 2.5 PL6] MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-Id: From: Alan Cox Sender: owner-linux-mips@oss.sgi.com Precedence: bulk > I'm attempting to set up a "hot patcher" in an embedded product. I'm > attempting to use shared memory, however the "target" process is not aware > of the patch being applied to it. Can a pseudo-driver attach a shared memory > segment to a process which can then be executable by that process via a jump > or jump-and-link, or is shared memory only for passing data and messages > between collaborating processes? The references I've read only indicate the > RW permissions, no X permissions. Or should I have the pseudo-driver > actually allocate (by get_free_pages()) the memory required? And can it do > this on behalf of the target process? You shouldnt even need a driver if you are clever. The ptrace() functionality for debuggers is sufficient to patch running code, and to do other interesting things by adding new functions and calling them From owner-linux-mips@oss.sgi.com Fri Feb 15 07:18:17 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g1FFIHI22635 for linux-mips-outgoing; Fri, 15 Feb 2002 07:18:17 -0800 Received: from delta.ds2.pg.gda.pl (macro@delta.ds2.pg.gda.pl [213.192.72.1]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g1FFHg922629; Fri, 15 Feb 2002 07:17:43 -0800 Received: from localhost by delta.ds2.pg.gda.pl (8.9.3/8.9.3) with SMTP id PAA05630; Fri, 15 Feb 2002 15:17:18 +0100 (MET) Date: Fri, 15 Feb 2002 15:17:17 +0100 (MET) From: "Maciej W. Rozycki" Reply-To: "Maciej W. Rozycki" To: Guido Guenther cc: Ralf Baechle , linux-mips@oss.sgi.com Subject: Re: ip22 watchdog timer In-Reply-To: <20020215130613.A301@gandalf.physik.uni-konstanz.de> Message-ID: Organization: Technical University of Gdansk MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-linux-mips@oss.sgi.com Precedence: bulk On Fri, 15 Feb 2002, Guido Guenther wrote: > diff --exclude=CVS -Naur linux-2.4.17.orig/drivers/char/Config.in > linux-2.4.17/drivers/char/Config.in > --- linux-2.4.17.orig/drivers/char/Config.in Sun Dec 2 12:34:40 2001 > +++ linux-2.4.17/drivers/char/Config.in Fri Feb 15 10:00:59 2002 > @@ -199,6 +199,7 @@ > tristate ' SBC-60XX Watchdog Timer' CONFIG_60XX_WDT > tristate ' W83877F (EMACS) Watchdog Timer' CONFIG_W83877F_WDT > tristate ' ZF MachZ Watchdog' CONFIG_MACHZ_WDT > + tristate ' Indy/I2 Hardware Watchdog' CONFIG_INDYDOG > fi > endmenu This looks suspicious. Haven't you meant "dep_tristate"? Especially as indydog.c doesn't seem to make any effort to validate it's running on the system it thinks it is before poking random memory locations. It won't probably even compile for a non-MIPS kernel. BTW, why do people insist on sending patches as attachments -- it makes commenting them helly twisted, sigh... -- + Maciej W. Rozycki, Technical University of Gdansk, Poland + +--------------------------------------------------------------+ + e-mail: macro@ds2.pg.gda.pl, PGP key available + From owner-linux-mips@oss.sgi.com Fri Feb 15 07:19:45 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g1FFJjn22739 for linux-mips-outgoing; Fri, 15 Feb 2002 07:19:45 -0800 Received: from server3.toshibatv.com (mail.toshibatv.com [67.32.37.75]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g1FFJf922736 for ; Fri, 15 Feb 2002 07:19:42 -0800 Received: by SERVER3 with Internet Mail Service (5.5.2653.19) id ; Fri, 15 Feb 2002 08:19:13 -0600 Message-ID: <7DF7BFDC95ECD411B4010090278A44CA1B7579@ATVX> From: "Siders, Keith" To: "'Alan Cox'" Cc: "'linux-mips@oss.sgi.com'" Subject: RE: hot patching Date: Fri, 15 Feb 2002 08:17:30 -0600 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2653.19) Content-Type: text/plain; charset="windows-1252" Sender: owner-linux-mips@oss.sgi.com Precedence: bulk -> > I'm attempting to set up a "hot patcher" in an embedded -> >product. I'm ... -> -> You shouldnt even need a driver if you are clever. The -> ptrace() functionality -> for debuggers is sufficient to patch running code, and to do -> other interesting -> things by adding new functions and calling them -> Well, I never claimed to be terribly clever... When I looked at the ptrace code it looked to me like it was intended for inserting breakpoints for the most part. Are you saying that I can patch into a process and have it vector off to executable code? At this point I've identified at least three types of patches: a jump, a call, and simply overwrite a few instructions (the easiest and common to all types). I'd love to _not_ need a driver. -------------------------------------- Keith Siders Toshiba ATVTC -------------------------------------- From owner-linux-mips@oss.sgi.com Fri Feb 15 07:25:39 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g1FFPd622962 for linux-mips-outgoing; Fri, 15 Feb 2002 07:25:39 -0800 Received: from dea.linux-mips.net (a1as07-p91.stg.tli.de [195.252.188.91]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g1FFPZ922959 for ; Fri, 15 Feb 2002 07:25:35 -0800 Received: (from ralf@localhost) by dea.linux-mips.net (8.11.6/8.11.1) id g1FELWU00640; Fri, 15 Feb 2002 15:21:32 +0100 Date: Fri, 15 Feb 2002 15:21:32 +0100 From: Ralf Baechle To: "Maciej W. Rozycki" Cc: Guido Guenther , linux-mips@oss.sgi.com Subject: Re: ip22 watchdog timer Message-ID: <20020215152132.A602@dea.linux-mips.net> References: <20020215130613.A301@gandalf.physik.uni-konstanz.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: ; from macro@ds2.pg.gda.pl on Fri, Feb 15, 2002 at 03:17:17PM +0100 X-Accept-Language: de,en,fr Sender: owner-linux-mips@oss.sgi.com Precedence: bulk On Fri, Feb 15, 2002 at 03:17:17PM +0100, Maciej W. Rozycki wrote: > This looks suspicious. Haven't you meant "dep_tristate"? Especially as > indydog.c doesn't seem to make any effort to validate it's running on the > system it thinks it is before poking random memory locations. It won't > probably even compile for a non-MIPS kernel. > > BTW, why do people insist on sending patches as attachments -- it makes > commenting them helly twisted, sigh... How true. MIME - broken solution for a broken design ;) More serious, MIME makes sense when using a MUA that garbles patches like Netscape or certain versions of Pine. Ralf (Prolly still be using Mutt + vi in 5 years ...) From owner-linux-mips@oss.sgi.com Fri Feb 15 07:41:26 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g1FFfQp25746 for linux-mips-outgoing; Fri, 15 Feb 2002 07:41:26 -0800 Received: from the-village.bc.nu (lightning.swansea.linux.org.uk [194.168.151.1]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g1FFfN925740 for ; Fri, 15 Feb 2002 07:41:23 -0800 Received: from alan by the-village.bc.nu with local (Exim 3.33 #5) id 16bjli-0003Lr-00; Fri, 15 Feb 2002 14:55:22 +0000 Subject: Re: hot patching To: keith_siders@toshibatv.com (Siders, Keith) Date: Fri, 15 Feb 2002 14:55:22 +0000 (GMT) Cc: alan@lxorguk.ukuu.org.uk ('Alan Cox'), linux-mips@oss.sgi.com ('linux-mips@oss.sgi.com') In-Reply-To: <7DF7BFDC95ECD411B4010090278A44CA1B7579@ATVX> from "Siders, Keith" at Feb 15, 2002 08:17:30 AM X-Mailer: ELM [version 2.5 PL6] MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-Id: From: Alan Cox Sender: owner-linux-mips@oss.sgi.com Precedence: bulk > When I looked at the ptrace code it looked to me like it was intended for > inserting breakpoints for the most part. Are you saying that I can patch Mostly yes > into a process and have it vector off to executable code? At this point I've > identified at least three types of patches: a jump, a call, and simply > overwrite a few instructions (the easiest and common to all types). I'd love > to _not_ need a driver. Have a look at how gdb implements "call functionname" From owner-linux-mips@oss.sgi.com Fri Feb 15 07:41:52 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g1FFfqR25815 for linux-mips-outgoing; Fri, 15 Feb 2002 07:41:52 -0800 Received: from delta.ds2.pg.gda.pl (macro@delta.ds2.pg.gda.pl [213.192.72.1]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g1FFfe925811; Fri, 15 Feb 2002 07:41:41 -0800 Received: from localhost by delta.ds2.pg.gda.pl (8.9.3/8.9.3) with SMTP id PAA06254; Fri, 15 Feb 2002 15:41:50 +0100 (MET) Date: Fri, 15 Feb 2002 15:41:49 +0100 (MET) From: "Maciej W. Rozycki" To: Ralf Baechle cc: Guido Guenther , linux-mips@oss.sgi.com Subject: Re: ip22 watchdog timer In-Reply-To: <20020215152132.A602@dea.linux-mips.net> Message-ID: Organization: Technical University of Gdansk MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-linux-mips@oss.sgi.com Precedence: bulk On Fri, 15 Feb 2002, Ralf Baechle wrote: > > BTW, why do people insist on sending patches as attachments -- it makes > > commenting them helly twisted, sigh... > > How true. MIME - broken solution for a broken design ;) More serious, Why broken? It's not broken for what it was invented to, i.e. for passing unsafe characters via SMTP. Source patches do not qualify as containing such. > MIME makes sense when using a MUA that garbles patches like Netscape or > certain versions of Pine. MIME is not a solution for broken MUAs or MDAs and was not intended as one, definitely. Pine got broken quite recently (it eats white space at line ends; that may be circumvented by using `patch -l' and may actually be advantageous in not adding white space there if present in the patch; the drawback is `patch' doesn't eat white space to be removed either) and there is a patch available (the package I have at my site doesn't have it applied, though, I admit; the next version should). The ancient version I'm using here seems safe as is. -- + Maciej W. Rozycki, Technical University of Gdansk, Poland + +--------------------------------------------------------------+ + e-mail: macro@ds2.pg.gda.pl, PGP key available + From owner-linux-mips@oss.sgi.com Fri Feb 15 08:10:06 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g1FGA6126302 for linux-mips-outgoing; Fri, 15 Feb 2002 08:10:06 -0800 Received: from dea.linux-mips.net (a1as07-p91.stg.tli.de [195.252.188.91]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g1FGA0926287 for ; Fri, 15 Feb 2002 08:10:00 -0800 Received: (from ralf@localhost) by dea.linux-mips.net (8.11.6/8.11.1) id g1FF61R01153; Fri, 15 Feb 2002 16:06:01 +0100 Date: Fri, 15 Feb 2002 16:06:01 +0100 From: Ralf Baechle To: "Maciej W. Rozycki" Cc: Guido Guenther , linux-mips@oss.sgi.com Subject: Re: ip22 watchdog timer Message-ID: <20020215160601.A845@dea.linux-mips.net> References: <20020215152132.A602@dea.linux-mips.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: ; from macro@ds2.pg.gda.pl on Fri, Feb 15, 2002 at 03:41:49PM +0100 X-Accept-Language: de,en,fr Sender: owner-linux-mips@oss.sgi.com Precedence: bulk On Fri, Feb 15, 2002 at 03:41:49PM +0100, Maciej W. Rozycki wrote: > > How true. MIME - broken solution for a broken design ;) More serious, > > Why broken? It's not broken for what it was invented to, i.e. for > passing unsafe characters via SMTP. Source patches do not qualify as > containing such. The transition time from pre-MIME to MIME was pretty painful. If you'd have gone through the same pains that I did during the MIME introduction you'd probably understand why I call it a broken fix for a broken system. Fortunately now that the childhood problems have been solved MIME looks alot saner but still I prefer plaintext for patches. Ralf From owner-linux-mips@oss.sgi.com Fri Feb 15 08:27:58 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g1FGRwK26674 for linux-mips-outgoing; Fri, 15 Feb 2002 08:27:58 -0800 Received: from hell (buserror-extern.convergence.de [212.84.236.66]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g1FGRi926670; Fri, 15 Feb 2002 08:27:45 -0800 Received: from js by hell with local (Exim 3.33 #1 (Debian)) id 16bkGv-0002Is-00; Fri, 15 Feb 2002 16:27:37 +0100 Date: Fri, 15 Feb 2002 16:27:37 +0100 From: Johannes Stezenbach To: Ralf Baechle Cc: Adrian.Hulse@taec.toshiba.com, linux-mips@oss.sgi.com Subject: Re: Tools issue Message-ID: <20020215152737.GA8809@convergence.de> Mail-Followup-To: Johannes Stezenbach , Ralf Baechle , Adrian.Hulse@taec.toshiba.com, linux-mips@oss.sgi.com References: <20020215034958.C21011@dea.linux-mips.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20020215034958.C21011@dea.linux-mips.net> User-Agent: Mutt/1.3.27i Sender: owner-linux-mips@oss.sgi.com Precedence: bulk On Fri, Feb 15, 2002 at 03:49:58AM +0100, Ralf Baechle wrote: > On Thu, Feb 14, 2002 at 01:42:31PM -0800, Adrian.Hulse@taec.toshiba.com wrote: > > > int-handler.s:59: Error: missing ')' > > int-handler.s:59: Error: illegal operands `lui' > > int-handler.s:60: Error: missing ')' > > int-handler.s:60: Error: illegal operands `sb' > > make[1]: *** [ int-handler.o ] Error 1 ... > > int-handler.S > > lui t1, %hi(TSDB_LED_ADDR) > > sb t0, %lo(TSDB_LDE_ADDR)(t1) > > > > Failed define : > > #define TSDB_LED_ADDR (KSEG1 + TSDB_LB_PCU_APERTURE + 0x05100020) > > > > Compilable define : > > #define TSDB_LED_ADDR KSEG1 + TSDB_LB_PCU_APERTURE + 0x05100020 ... > > Anyone else seen anything like this and know of a solution to the problem ? > > Or to paraphrase Dominic Sweetman, maybe i should just stay with the "pick > > your own version folklore" method of picking tools :). I had a similar problem with binutils-2.11.92.0.12.3, but Thiemo Seufer posted a patch on the binutils mailing list. Should be fixed in binutils CVS. It seems that it worked with the binutils-2.10.91.0.2 recommended here: http://www.junsun.net/linux/porting-howto/ > I hope that for binutils we can solve that problem when 2.9.12 gets > released; as for gcc it seems Maciej's 2.95.3 version is already pretty > close to what we want. C++ users may disagree ;-) Somewhat longer term > Algorithmics's toolchain should resolve the situation. ;-) Regards, Johannes From owner-linux-mips@oss.sgi.com Fri Feb 15 09:11:08 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g1FHB8H28845 for linux-mips-outgoing; Fri, 15 Feb 2002 09:11:08 -0800 Received: from deliverator.sgi.com (deliverator.sgi.com [204.94.214.10]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g1FHAa928781; Fri, 15 Feb 2002 09:10:36 -0800 Received: from gandalf.physik.uni-konstanz.de (gandalf.physik.uni-konstanz.de [134.34.144.69]) by deliverator.sgi.com (980309.SGI.8.8.8-aspam-6.2/980310.SGI-aspam) via ESMTP id IAA08397; Fri, 15 Feb 2002 08:06:11 -0800 (PST) mail_from (agx@gandalf.physik.uni-konstanz.de) Received: by gandalf.physik.uni-konstanz.de (Postfix, from userid 501) id 0EAF5B489; Fri, 15 Feb 2002 16:42:01 +0100 (CET) Date: Fri, 15 Feb 2002 16:42:01 +0100 From: Guido Guenther To: "Maciej W. Rozycki" Cc: Ralf Baechle , linux-mips@oss.sgi.com Subject: Re: ip22 watchdog timer Message-ID: <20020215164201.A21563@gandalf.physik.uni-konstanz.de> Mail-Followup-To: "Maciej W. Rozycki" , Ralf Baechle , linux-mips@oss.sgi.com References: <20020215130613.A301@gandalf.physik.uni-konstanz.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: ; from macro@ds2.pg.gda.pl on Fri, Feb 15, 2002 at 03:17:17PM +0100 Sender: owner-linux-mips@oss.sgi.com Precedence: bulk On Fri, Feb 15, 2002 at 03:17:17PM +0100, Maciej W. Rozycki wrote: > > linux-2.4.17/drivers/char/Config.in > > --- linux-2.4.17.orig/drivers/char/Config.in Sun Dec 2 12:34:40 2001 > > +++ linux-2.4.17/drivers/char/Config.in Fri Feb 15 10:00:59 2002 > > @@ -199,6 +199,7 @@ > > tristate ' SBC-60XX Watchdog Timer' CONFIG_60XX_WDT > > tristate ' W83877F (EMACS) Watchdog Timer' CONFIG_W83877F_WDT > > tristate ' ZF MachZ Watchdog' CONFIG_MACHZ_WDT > > + tristate ' Indy/I2 Hardware Watchdog' CONFIG_INDYDOG > > fi > > endmenu > > This looks suspicious. Haven't you meant "dep_tristate"? Especially as > indydog.c doesn't seem to make any effort to validate it's running on the > system it thinks it is before poking random memory locations. It won't > probably even compile for a non-MIPS kernel. Oh yes. Thanks. I missed that when moving it out of IP22 specific stuff. While we're at this: The machine selection in config.in is of type bool. Shouldn't this be of type "choice"? Do we really support several(arbitrary) machine selections in one kernel? -- Guido Does this look better? diff --exclude=CVS -Naur linux-2.4.17.orig/Documentation/Configure.help linux-2.4.17/Documentation/Configure.help --- linux-2.4.17.orig/Documentation/Configure.help Sat Dec 29 06:37:46 2001 +++ linux-2.4.17/Documentation/Configure.help Fri Feb 15 09:55:06 2002 @@ -3129,6 +3129,13 @@ via the file /proc/rtc and its behaviour is set by various ioctls on /dev/rtc. +Indy/I2 Hardware Watchdog +CONFIG_INDYDOG + Hardwaredriver for the Indy's/I2's watchdog. This is a + watchdog timer that will reboot the machine after a 60 second + timer expired and no process has written to /dev/watchdog during + that time. + Support the Bell Technologies HUB6 card CONFIG_HUB6 Say Y here to enable support in the dumb serial driver to support diff --exclude=CVS -Naur linux-2.4.17.orig/arch/mips/sgi-ip22/ip22-mc.c linux-2.4.17/arch/mips/sgi-ip22/ip22-mc.c --- linux-2.4.17.orig/arch/mips/sgi-ip22/ip22-mc.c Tue Nov 27 16:57:11 2001 +++ linux-2.4.17/arch/mips/sgi-ip22/ip22-mc.c Fri Feb 15 09:55:07 2002 @@ -82,6 +82,14 @@ * interrupts are first enabled etc. */ + /* Step 0: Make sure we turn off the watchdog in case it's + * still running (which might be the case after a + * soft reboot). + */ + tmpreg = mcmisc_regs->cpuctrl0; + tmpreg &= ~SGIMC_CCTRL0_WDOG; + mcmisc_regs->cpuctrl0 = tmpreg; + /* Step 1: The CPU/GIO error status registers will not latch * up a new error status until the register has been * cleared by the cpu. These status registers are diff --exclude=CVS -Naur linux-2.4.17.orig/drivers/char/Config.in linux-2.4.17/drivers/char/Config.in --- linux-2.4.17.orig/drivers/char/Config.in Sun Dec 2 12:34:40 2001 +++ linux-2.4.17/drivers/char/Config.in Fri Feb 15 10:00:59 2002 @@ -199,6 +199,7 @@ tristate ' SBC-60XX Watchdog Timer' CONFIG_60XX_WDT tristate ' W83877F (EMACS) Watchdog Timer' CONFIG_W83877F_WDT tristate ' ZF MachZ Watchdog' CONFIG_MACHZ_WDT + dep_tristate ' Indy/I2 Hardware Watchdog' CONFIG_INDYDOG $CONFIG_SGI_IP22 fi endmenu diff --exclude=CVS -Naur linux-2.4.17.orig/drivers/char/Makefile linux-2.4.17/drivers/char/Makefile --- linux-2.4.17.orig/drivers/char/Makefile Mon Jan 7 04:33:54 2002 +++ linux-2.4.17/drivers/char/Makefile Fri Feb 15 09:55:07 2002 @@ -245,6 +245,7 @@ obj-$(CONFIG_SH_WDT) += shwdt.o obj-$(CONFIG_EUROTECH_WDT) += eurotechwdt.o obj-$(CONFIG_SOFT_WATCHDOG) += softdog.o +obj-$(CONFIG_INDYDOG) += indydog.o subdir-$(CONFIG_MWAVE) += mwave ifeq ($(CONFIG_MWAVE),y) diff --exclude=CVS -Naur linux-2.4.17.orig/drivers/char/indydog.c linux-2.4.17/drivers/char/indydog.c --- linux-2.4.17.orig/drivers/char/indydog.c Thu Jan 1 01:00:00 1970 +++ linux-2.4.17/drivers/char/indydog.c Fri Feb 15 09:55:07 2002 @@ -0,0 +1,158 @@ +/* + * IndyDog 0.2 A Hardware Watchdog Device for SGI IP22 + * + * (c) Copyright 2002 Guido Guenther , 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. + * + * based on softdog.c by Alan Cox + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +static int indydog_alive; +static struct sgimc_misc_ctrl *mcmisc_regs; + +static void indydog_ping() +{ + mcmisc_regs->watchdogt = 0; +} + + +/* + * Allow only one person to hold it open + */ + +static int indydog_open(struct inode *inode, struct file *file) +{ + u32 mc_ctrl0; + + if(indydog_alive) + return -EBUSY; +#ifdef CONFIG_WATCHDOG_NOWAYOUT + MOD_INC_USE_COUNT; +#endif + /* + * Activate timer + */ + mcmisc_regs = (struct sgimc_misc_ctrl *)(KSEG1+0x1fa00000); + + mc_ctrl0 = mcmisc_regs->cpuctrl0 | SGIMC_CCTRL0_WDOG; + mcmisc_regs->cpuctrl0 = mc_ctrl0; + indydog_ping(); + + indydog_alive=1; + printk("Started watchdog timer.\n"); + return 0; +} + +static int indydog_release(struct inode *inode, struct file *file) +{ + /* + * Shut off the timer. + * Lock it in if it's a module and we defined ...NOWAYOUT + */ + lock_kernel(); +#ifndef CONFIG_WATCHDOG_NOWAYOUT + { + u32 mc_ctrl0 = mcmisc_regs->cpuctrl0; + mc_ctrl0 &= ~SGIMC_CCTRL0_WDOG; + mcmisc_regs->cpuctrl0 = mc_ctrl0; + printk("Stopped watchdog timer.\n"); + } +#endif + indydog_alive=0; + unlock_kernel(); + return 0; +} + +static ssize_t indydog_write(struct file *file, const char *data, size_t len, loff_t *ppos) +{ + /* Can't seek (pwrite) on this device */ + if (ppos != &file->f_pos) + return -ESPIPE; + + /* + * Refresh the timer. + */ + if(len) { + indydog_ping(); + return 1; + } + return 0; +} + +static int indydog_ioctl(struct inode *inode, struct file *file, + unsigned int cmd, unsigned long arg) +{ + static struct watchdog_info ident = { + identity: "Hardware Watchdog for SGI IP22", + }; + switch (cmd) { + default: + return -ENOIOCTLCMD; + case WDIOC_GETSUPPORT: + if(copy_to_user((struct watchdog_info *)arg, &ident, sizeof(ident))) + return -EFAULT; + return 0; + case WDIOC_GETSTATUS: + case WDIOC_GETBOOTSTATUS: + return put_user(0,(int *)arg); + case WDIOC_KEEPALIVE: + indydog_ping(); + return 0; + } +} + +static struct file_operations indydog_fops = { + owner: THIS_MODULE, + write: indydog_write, + ioctl: indydog_ioctl, + open: indydog_open, + release: indydog_release, +}; + +static struct miscdevice indydog_miscdev = { + minor: WATCHDOG_MINOR, + name: "watchdog", + fops: &indydog_fops, +}; + +static const char banner[] __initdata = KERN_INFO "Hardware Watchdog Timer for SGI IP22: 0.2\n"; + +static int __init watchdog_init(void) +{ + int ret; + + ret = misc_register(&indydog_miscdev); + + if (ret) + return ret; + + printk(banner); + + return 0; +} + +static void __exit watchdog_exit(void) +{ + misc_deregister(&indydog_miscdev); +} + +module_init(watchdog_init); +module_exit(watchdog_exit); +MODULE_LICENSE("GPL"); From owner-linux-mips@oss.sgi.com Fri Feb 15 09:19:51 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g1FHJpp29953 for linux-mips-outgoing; Fri, 15 Feb 2002 09:19:51 -0800 Received: from delta.ds2.pg.gda.pl (macro@delta.ds2.pg.gda.pl [213.192.72.1]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g1FHJc929888; Fri, 15 Feb 2002 09:19:42 -0800 Received: from localhost by delta.ds2.pg.gda.pl (8.9.3/8.9.3) with SMTP id RAA09259; Fri, 15 Feb 2002 17:19:32 +0100 (MET) Date: Fri, 15 Feb 2002 17:19:31 +0100 (MET) From: "Maciej W. Rozycki" To: Guido Guenther cc: Ralf Baechle , linux-mips@oss.sgi.com Subject: Re: ip22 watchdog timer In-Reply-To: <20020215164201.A21563@gandalf.physik.uni-konstanz.de> Message-ID: Organization: Technical University of Gdansk MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-linux-mips@oss.sgi.com Precedence: bulk On Fri, 15 Feb 2002, Guido Guenther wrote: > While we're at this: The machine selection in config.in is of type bool. Shouldn't this > be of type "choice"? Do we really support several(arbitrary) machine selections in > one kernel? Not at this time, AFAIK, but the intent is to do one day, I believe, at least for ones that it's possible. > Does this look better? OK for me. -- + Maciej W. Rozycki, Technical University of Gdansk, Poland + +--------------------------------------------------------------+ + e-mail: macro@ds2.pg.gda.pl, PGP key available + From owner-linux-mips@oss.sgi.com Fri Feb 15 11:59:27 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g1FJxRV07274 for linux-mips-outgoing; Fri, 15 Feb 2002 11:59:27 -0800 Received: from dtla2.teknuts.com (adsl-66-125-62-110.dsl.lsan03.pacbell.net [66.125.62.110]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g1FJxP907268 for ; Fri, 15 Feb 2002 11:59:25 -0800 Received: from delllaptop (whnat1.weiderpub.com [65.115.104.67]) (authenticated) by dtla2.teknuts.com (8.11.3/8.10.1) with ESMTP id g1FIxOq02065 for ; Fri, 15 Feb 2002 10:59:24 -0800 From: "Robert Rusek" To: Subject: SGI Question Date: Fri, 15 Feb 2002 10:53:38 -0800 Message-ID: <000901c1b652$146680c0$631510ac@delllaptop> 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.3416 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 Importance: Normal Sender: owner-linux-mips@oss.sgi.com Precedence: bulk Is it possible to build a linux root from within IRIX? I created an efs partition on a new drive. Can I build the root on the new drive then point to it from my Linux kernel? If not, is there any benefit of running a dual os on the system? Thanks. -- Robert Rusek From owner-linux-mips@oss.sgi.com Fri Feb 15 12:00:07 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g1FK07307396 for linux-mips-outgoing; Fri, 15 Feb 2002 12:00:07 -0800 Received: from crack-ext.ab.videon.ca (crack-ext.ab.videon.ca [206.75.216.33]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g1FK03907389 for ; Fri, 15 Feb 2002 12:00:03 -0800 Received: (qmail 7774 invoked from network); 15 Feb 2002 19:00:01 -0000 Received: from unknown (HELO wakko.debian.net) ([24.86.210.128]) (envelope-sender ) by crack-ext.ab.videon.ca (qmail-ldap-1.03) with SMTP for ; 15 Feb 2002 19:00:01 -0000 Received: from localhost ([127.0.0.1] helo=wakko.debian.net ident=jgg) by wakko.debian.net with smtp (Exim 3.16 #1 (Debian)) id 16bnaS-0002rM-00; Fri, 15 Feb 2002 12:00:00 -0700 Date: Fri, 15 Feb 2002 12:00:00 -0700 (MST) From: Jason Gunthorpe X-Sender: jgg@wakko.debian.net To: "Kevin D. Kissell" cc: linux-mips@fnet.fr, linux-mips@oss.sgi.com Subject: Re: [patch] linux 2.4.17: The second mb() rework (final) In-Reply-To: <006e01c1b606$27b1b060$0deca8c0@Ulysses> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-linux-mips@oss.sgi.com Precedence: bulk On Fri, 15 Feb 2002, Kevin D. Kissell wrote: > That is, I would say, a bug in the TX39 implementation of SYNC. > The specification is states that all stores prior to the SYNC must > complete before any memory ops after the sync, and that the > definition of a store completing is that all stored values be > "visible to every other processor in the system", which pretty > clearly implies that the write buffers must be flushed. Sorry, why? If the TX39 is the only processor in the system then write buffers can be left alone. You can't consider PCI IO devices to be processors because the bus protocols would never allow you to satisfy the requirements for 'sync'. IMHO the only time *mb should care about a write buffer is if the buffer breaks PCI ordering semantics, by, say returning reads from posted write data, re-ordering, etc. Jason From owner-linux-mips@oss.sgi.com Fri Feb 15 12:39:23 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g1FKdNY07888 for linux-mips-outgoing; Fri, 15 Feb 2002 12:39:23 -0800 Received: from delta.ds2.pg.gda.pl (macro@delta.ds2.pg.gda.pl [213.192.72.1]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g1FKdG907883 for ; Fri, 15 Feb 2002 12:39:17 -0800 Received: from localhost by delta.ds2.pg.gda.pl (8.9.3/8.9.3) with SMTP id UAA14500; Fri, 15 Feb 2002 20:39:11 +0100 (MET) Date: Fri, 15 Feb 2002 20:39:09 +0100 (MET) From: "Maciej W. Rozycki" To: Jason Gunthorpe cc: "Kevin D. Kissell" , linux-mips@fnet.fr, linux-mips@oss.sgi.com Subject: Re: [patch] linux 2.4.17: The second mb() rework (final) In-Reply-To: Message-ID: Organization: Technical University of Gdansk MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-linux-mips@oss.sgi.com Precedence: bulk On Fri, 15 Feb 2002, Jason Gunthorpe wrote: > Sorry, why? If the TX39 is the only processor in the system then write > buffers can be left alone. You can't consider PCI IO devices to be That depends on the implementation of the buffers. > processors because the bus protocols would never allow you to satisfy the > requirements for 'sync'. Fully agreed -- I've already expressed that in another mail. > IMHO the only time *mb should care about a write buffer is if the buffer > breaks PCI ordering semantics, by, say returning reads from posted write > data, re-ordering, etc. Well, the "classic" MIPS R2020 and R3220 ones would break PCI (or actually any I/O) ordering semantics as they return data from a posted write upon a hit. The affected read never appears at the I/O bus in that case. They never reorder writes though, as they work as FIFOs (the former is four stage deep and the latter is six stage deep), so wmb() may be null for them. I've read a suggestion a "bc0f" might be needed for the TX39's write buffer as a barrier. That means the buffer behaves as the "classic" ones. -- + Maciej W. Rozycki, Technical University of Gdansk, Poland + +--------------------------------------------------------------+ + e-mail: macro@ds2.pg.gda.pl, PGP key available + From owner-linux-mips@oss.sgi.com Fri Feb 15 12:40:41 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g1FKefK08086 for linux-mips-outgoing; Fri, 15 Feb 2002 12:40:41 -0800 Received: from dea.linux-mips.net (a1as10-p172.stg.tli.de [195.252.189.172]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g1FKeb908059 for ; Fri, 15 Feb 2002 12:40:38 -0800 Received: (from ralf@localhost) by dea.linux-mips.net (8.11.6/8.11.1) id g1FJapp20048; Fri, 15 Feb 2002 20:36:51 +0100 Date: Fri, 15 Feb 2002 20:36:51 +0100 From: Ralf Baechle To: Robert Rusek Cc: linux-mips@oss.sgi.com Subject: Re: SGI Question Message-ID: <20020215203651.A6491@dea.linux-mips.net> References: <000901c1b652$146680c0$631510ac@delllaptop> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <000901c1b652$146680c0$631510ac@delllaptop>; from robru@teknuts.com on Fri, Feb 15, 2002 at 10:53:38AM -0800 X-Accept-Language: de,en,fr Sender: owner-linux-mips@oss.sgi.com Precedence: bulk On Fri, Feb 15, 2002 at 10:53:38AM -0800, Robert Rusek wrote: > Is it possible to build a linux root from within IRIX? I created an efs > partition on a new drive. Can I build the root on the new drive then > point to it from my Linux kernel? Not really. Linux has only read-only support for EFS filesystems. > If not, is there any benefit of running a dual os on the system? You have twice as many possibilities to get angry about an OS ;-) Ralf > From owner-linux-mips@oss.sgi.com Fri Feb 15 13:33:13 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g1FLXDd10126 for linux-mips-outgoing; Fri, 15 Feb 2002 13:33:13 -0800 Received: from neurosis.mit.edu (NEUROSIS.MIT.EDU [18.243.0.82]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g1FLX6910110; Fri, 15 Feb 2002 13:33:07 -0800 Received: (from jim@localhost) by neurosis.mit.edu (8.11.4/8.11.4) id g1FKX5J11137; Fri, 15 Feb 2002 15:33:05 -0500 Date: Fri, 15 Feb 2002 15:33:05 -0500 From: Jim Paris To: Ralf Baechle Cc: "Maciej W. Rozycki" , Guido Guenther , linux-mips@oss.sgi.com Subject: Re: ip22 watchdog timer Message-ID: <20020215153305.A11087@neurosis.mit.edu> Reply-To: jim@jtan.com References: <20020215130613.A301@gandalf.physik.uni-konstanz.de> <20020215152132.A602@dea.linux-mips.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <20020215152132.A602@dea.linux-mips.net>; from ralf@oss.sgi.com on Fri, Feb 15, 2002 at 03:21:32PM +0100 Sender: owner-linux-mips@oss.sgi.com Precedence: bulk > > BTW, why do people insist on sending patches as attachments -- it makes > > commenting them helly twisted, sigh... > > How true. MIME - broken solution for a broken design ;) More serious, > MIME makes sense when using a MUA that garbles patches like Netscape or > certain versions of Pine. > > Ralf (Prolly still be using Mutt + vi in 5 years ...) Patches as attachments are actually really convenient with Mutt. You can view them seperately, extract and save them easily, etc. To comment on both the original message and the attachments: use view-attachments (v), use tag-entry (t) on all of the parts you want quoted in your reply, and then use tag-prefix & reply (;r) (or ;g or whatever). But I digress :) -jim From owner-linux-mips@oss.sgi.com Fri Feb 15 14:02:26 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g1FM2QV13408 for linux-mips-outgoing; Fri, 15 Feb 2002 14:02:26 -0800 Received: from host099.momenco.com (IDENT:root@www.momenco.com [64.169.228.99]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g1FM2I913403; Fri, 15 Feb 2002 14:02:18 -0800 Received: from beagle (beagle.internal.momenco.com [192.168.0.115]) by host099.momenco.com (8.11.6/8.11.6) with SMTP id g1FL2HR31050; Fri, 15 Feb 2002 13:02:17 -0800 From: "Matthew Dharm" To: "Ralf Baechle" , "Maciej W. Rozycki" Cc: "Guido Guenther" , Subject: RE: ip22 watchdog timer Date: Fri, 15 Feb 2002 13:02:17 -0800 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0) In-Reply-To: <20020215160601.A845@dea.linux-mips.net> Importance: Normal X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400 Sender: owner-linux-mips@oss.sgi.com Precedence: bulk Oddly enough, I have the exact opposite attitude... I will barely accept inlined patches (to the usb-storage driver, which I maintain). About 85-90% of the inlined patches I get won't apply cleanly because of whitespace mangling. MIME-attachments (of type text/plain) seem to have a _much_ higher success rate. Yes, the transition was painful. Heck, it still is. Some versions of Outlook still don't understand the RFC-compliant way of attaching a digital signature to a message -- I get complaints from people every so often that all they see is a blank message with two attachments, one of which is the "message" itself, and the other is my signature. Matt -- Matthew D. Dharm Senior Software Designer Momentum Computer Inc. 1815 Aston Ave. Suite 107 (760) 431-8663 X-115 Carlsbad, CA 92008-7310 Momentum Works For You www.momenco.com > -----Original Message----- > From: owner-linux-mips@oss.sgi.com > [mailto:owner-linux-mips@oss.sgi.com]On Behalf Of Ralf Baechle > Sent: Friday, February 15, 2002 7:06 AM > To: Maciej W. Rozycki > Cc: Guido Guenther; linux-mips@oss.sgi.com > Subject: Re: ip22 watchdog timer > > > On Fri, Feb 15, 2002 at 03:41:49PM +0100, Maciej W. Rozycki wrote: > > > > How true. MIME - broken solution for a broken design > ;) More serious, > > > > Why broken? It's not broken for what it was invented > to, i.e. for > > passing unsafe characters via SMTP. Source patches do > not qualify as > > containing such. > > The transition time from pre-MIME to MIME was pretty > painful. If you'd > have gone through the same pains that I did during the MIME > introduction > you'd probably understand why I call it a broken fix for a > broken system. > Fortunately now that the childhood problems have been > solved MIME looks > alot saner but still I prefer plaintext for patches. > > Ralf > From owner-linux-mips@oss.sgi.com Sat Feb 16 03:52:42 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g1GBqgQ26849 for linux-mips-outgoing; Sat, 16 Feb 2002 03:52:42 -0800 Received: from web10208.mail.yahoo.com (web10208.mail.yahoo.com [216.136.130.72]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g1GBqd926846 for ; Sat, 16 Feb 2002 03:52:39 -0800 Message-ID: <20020216105239.5160.qmail@web10208.mail.yahoo.com> Received: from [213.23.38.17] by web10208.mail.yahoo.com via HTTP; Sat, 16 Feb 2002 02:52:39 PST Date: Sat, 16 Feb 2002 02:52:39 -0800 (PST) From: Timothy Daly Subject: indigo2 video To: linux-mips@oss.sgi.com MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Sender: owner-linux-mips@oss.sgi.com Precedence: bulk Hi all. :) AFAIK, none of the SGI graphics cards for the indigo2 are yet supported by linux or X. However, it recently struck me, these machines have EISA slots. It might be pretty straightforward to use an old EISA card like an ATI Mach32 instead. Sure, it's not as cool as an Impact card, but it's perfectly adequate for emacs. Is this a good idea? How would you estimate the effort involved? Thanks for any feedback, Tim __________________________________________________ Do You Yahoo!? Yahoo! Sports - Coverage of the 2002 Olympic Games http://sports.yahoo.com From owner-linux-mips@oss.sgi.com Sat Feb 16 04:17:13 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g1GCHDb27315 for linux-mips-outgoing; Sat, 16 Feb 2002 04:17:13 -0800 Received: from ull.minus-9.com (IDENT:postfix@ull.minus-9.com [195.26.34.2]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g1GCH9927312 for ; Sat, 16 Feb 2002 04:17:09 -0800 Received: by ull.minus-9.com (Postfix, from userid 500) id DE43336C922; Sat, 16 Feb 2002 11:20:58 +0000 (GMT) Date: Sat, 16 Feb 2002 11:20:58 +0000 From: Mat Withers To: Timothy Daly Cc: linux-mips@oss.sgi.com Subject: Re: indigo2 video Message-ID: <20020216112058.C8787@minus-9.com> References: <20020216105239.5160.qmail@web10208.mail.yahoo.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5.1i In-Reply-To: <20020216105239.5160.qmail@web10208.mail.yahoo.com>; from remote_bob@yahoo.com on Sat, Feb 16, 2002 at 02:52:39 -0800 Sender: owner-linux-mips@oss.sgi.com Precedence: bulk Timothy Daly (remote_bob@yahoo.com) wrote: > > Hi all. :) > > AFAIK, none of the SGI graphics cards for the indigo2 are yet > supported by linux or X. However, it recently struck me, these > machines have EISA slots. It might be pretty straightforward to use > an old EISA card like an ATI Mach32 instead. Sure, it's not as cool > as an Impact card, but it's perfectly adequate for emacs. > > Is this a good idea? How would you estimate the effort involved? > I was also wondering this. On the intel architecture EISA slots also supported ISA cards. Is this also the case on the Indigo 2 ? or are the EISA slots a bit more "non-standard". Just a thought Mat -- Mat Withers mat@minus-9.com http://minus-9.com phone/fax: +44 7092 375299 "a sarcasm detector, *that's* a real useful invention." From owner-linux-mips@oss.sgi.com Sat Feb 16 10:32:37 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g1GIWbn30505 for linux-mips-outgoing; Sat, 16 Feb 2002 10:32:37 -0800 Received: from localhost (adsl-64-166-230-246.dsl.snfc21.pacbell.net [64.166.230.246]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g1GIWW930502 for ; Sat, 16 Feb 2002 10:32:35 -0800 Received: from localhost ([127.0.0.1] helo=snort.org) by localhost with esmtp (Exim 3.34 #1 (Debian)) id 16c8g9-0005bX-00; Sat, 16 Feb 2002 09:31:17 -0800 Message-ID: <3C6E9764.31A271D8@snort.org> Date: Sat, 16 Feb 2002 09:31:16 -0800 From: "Andrew R. Baker" X-Mailer: Mozilla 4.77 [en] (X11; U; Linux 2.4.17 i686) X-Accept-Language: en MIME-Version: 1.0 To: Mat Withers CC: Timothy Daly , linux-mips@oss.sgi.com Subject: Re: indigo2 video References: <20020216105239.5160.qmail@web10208.mail.yahoo.com> <20020216112058.C8787@minus-9.com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-linux-mips@oss.sgi.com Precedence: bulk Mat Withers wrote: > > I was also wondering this. On the intel architecture EISA slots also > supported ISA cards. Is this also the case on the Indigo 2 ? or are the > EISA slots a bit more "non-standard". The EISA slots on the Indigo2 do support ISA cards. I was running an old 3Com Etherlink III card in a Linux Indigo2 several years ago. Running a video card on one of them may be a bit more tricky, but should be possible. -Andrew From owner-linux-mips@oss.sgi.com Sat Feb 16 13:55:27 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g1GLtRM32343 for linux-mips-outgoing; Sat, 16 Feb 2002 13:55:27 -0800 Received: from neurosis.mit.edu (NEUROSIS.MIT.EDU [18.243.0.82]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g1GLtO932338 for ; Sat, 16 Feb 2002 13:55:24 -0800 Received: (from jim@localhost) by neurosis.mit.edu (8.11.4/8.11.4) id g1GKtIU19243; Sat, 16 Feb 2002 15:55:18 -0500 Date: Sat, 16 Feb 2002 15:55:18 -0500 From: Jim Paris To: "Andrew R. Baker" Cc: Mat Withers , Timothy Daly , linux-mips@oss.sgi.com Subject: Re: indigo2 video Message-ID: <20020216155518.A19235@neurosis.mit.edu> Reply-To: jim@jtan.com References: <20020216105239.5160.qmail@web10208.mail.yahoo.com> <20020216112058.C8787@minus-9.com> <3C6E9764.31A271D8@snort.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <3C6E9764.31A271D8@snort.org>; from andrewb@snort.org on Sat, Feb 16, 2002 at 09:31:16AM -0800 Sender: owner-linux-mips@oss.sgi.com Precedence: bulk > > I was also wondering this. On the intel architecture EISA slots also > > supported ISA cards. Is this also the case on the Indigo 2 ? or are the > > EISA slots a bit more "non-standard". > > The EISA slots on the Indigo2 do support ISA cards. I was running an > old 3Com Etherlink III card in a Linux Indigo2 several years ago. > Running a video card on one of them may be a bit more tricky, but should > be possible. You're going to have a problem initializing the card because you won't be able to execute the BIOS. Solutions would be to disassemble the ROM on your particular card and see what it's doing (all cards I've seen are initialized slightly differently); or perhaps some cool solution involving an x86 emulator like Bochs. -jim From owner-linux-mips@oss.sgi.com Sat Feb 16 22:54:22 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g1H6sMJ05583 for linux-mips-outgoing; Sat, 16 Feb 2002 22:54:22 -0800 Received: from rwcrmhc51.attbi.com (rwcrmhc51.attbi.com [204.127.198.38]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g1H6r8905556 for ; Sat, 16 Feb 2002 22:53:08 -0800 Received: from ocean.lucon.org ([12.234.16.87]) by rwcrmhc51.attbi.com (InterMail vM.4.01.03.27 201-229-121-127-20010626) with ESMTP id <20020217055302.PMOK2626.rwcrmhc51.attbi.com@ocean.lucon.org>; Sun, 17 Feb 2002 05:53:02 +0000 Received: by ocean.lucon.org (Postfix, from userid 1000) id B8CCC125C7; Sat, 16 Feb 2002 21:52:58 -0800 (PST) Date: Sat, 16 Feb 2002 21:52:58 -0800 From: "H . J . Lu" To: linux-gcc@vger.kernel.org, gcc@gcc.gnu.org, GNU C Library , Kenneth Albanowski , Mat Hostetter , Andy Dougherty , Warner Losh , linux-mips@oss.sgi.com, Ron Guilmette , "Polstra; John" , "Hazelwood; Galen" , Ralf Baechle , Linas Vepstas , Feher Janos , Leonard Zubkoff , "Steven J. Hill" Subject: Binutils 2.11.93.0.2 is released Message-ID: <20020216215258.A26150@lucon.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i Sender: owner-linux-mips@oss.sgi.com Precedence: bulk This is the beta release of binutils 2.11.93.0.2 for Linux, which is based on binutils 2002 0207 in CVS on sourecs.redhat.com plus various changes. It is purely for Linux. The Linux/mips support is added. You have to use # rpm --target=[mips|mipsel] -ta binutils-xx.xx.xx.xx.xx.tar.gz to build it. Or you can read mips/README in the source tree to apply the mips patches and build it by hand. FYI, the binutils man pages now are generated from the texinfo files during the build. As the result, those man pages may be changed for each build even if you only have done # ..../configure ... # make That means you may have many failures on the man pages when you apply the binutils diffs next time. Those failures can be safely ignored. You should remove all those man pages from your source tree by # find -name *.1 | xargs rm -f # find -name *.1.rej | xargs rm -f # find -name *.man | xargs rm -f # find -name *.man.rej | xargs rm -f I am planning to make the public release soon. Please test it as much as you can. Please report any bugs related to binutils 2.11.93.0.2 to hjl@lucon.org. For arm-linux targets, there are some important differences in behaviour between these tools and binutils 2.9.1.0.x. The linker emulation name has changed from elf32arm{26} to armelf_linux{26}. Also, the "-p" flag must be passed with the linker when working with object files (or static libraries) created using older versions of the assembler. If this flag is omitted the linker will silently generate bad output when given old input files. To get the correct behaviour from gcc, amend the *link section of your specs file as follows: *link: %{h*} %{version:-v} %{b} %{Wl,*:%*} %{static:-Bstatic} %{shared:-shared} %{symbolic:-Bsymbolic} %{rdynamic:-export-dynamic} %{!dynamic-linker: -dynamic-linker /lib/ld-linux.so.2} -X %{mbig-endian:-EB} %{mapcs-26:-m armelf_linux26} %{!mapcs-26:-m armelf_linux} -p Changes from binutils 2.11.92.0.12.3: 1. Update from binutils 2002 0207. 2. Fix a weak symbol alpha linker bug for glibc. 3. More support for gcc 3.1. Changes from binutils 2.11.92.0.12: 1. Fix a regression in 2.11.92.0.12 when linking with none-ELF object files. Changes from binutils 2.11.92.0.10: 1. Update from binutils 2001 1121. 2. Fix a linker symbol version bug for common symbols. 3. Update handling relocations against the discarded sections. You may need to apply the kernel patch enclosed here to your kernel source. If you still see things like drivers/char/char.o(.data+0x46b4): undefined reference to `local symbols in discarded section .text.exit' in the final kernel link, that means you have compiled a driver into the kernel which has a reference to the symbol in a discarded section. Kernel 2.4.17 or above should work fine. 4. Support "-march=xxx -mipsN" for mips gas if they are compatible. Changes from binutils 2.11.92.0.7: 1. Update from binutils 2001 1021. 2. Fix the ELF/PPC linker. 3. Fix the ELF/cris linker. 4. Fix ELF strip. Changes from binutils 2.11.92.0.5: 1. Update from binutils 2001 1016. 2. Fix all breakages introduced in 2.11.92.0.12. Changes from binutils 2.11.90.0.31: 1. Update from binutils 2001 1005. 2. Support gcc 3.1 for ia64. 3. Support prelink for ELF/PPC. 4. Fix an ELF/x86 linker bug for Oracle. 5. Fix a weak symbol bug. 6. Support locale. Changes from binutils 2.11.90.0.29: 1. Update from binutils 2001 0830. 2. Fix a mips linker bug. Changes from binutils 2.11.90.0.27: 1. Update from binutils 2001 0827. 2. Fix an alpha assembler bug. 3. Fix an ia64 linker bug. 4. Fix a mips linker bug. 5. Support `-z combreloc|nocombreloc' in linker. Changes from binutils 2.11.90.0.25: 1. Update from binutils 2001 0810. 2. Fix an x86 linker bug. Changes from binutils 2.11.90.0.24: 1. Update from binutils 2001 0726. 2. Fix an x86 assembler bug. 3. "make check" in the windres test in binutils may call uudecode. We are working on it. 4. "make check" fails the windres test in binutils if the i386/pe is enabled in bfd. Fixed in the next release. 5. "make check" has 2 failures in the ld-selective test in ld on Linux/alpha. They should be marked xfail. Fixed in the next release. Changes from binutils 2.11.90.0.23: 1. Update from binutils 2001 0714. 2. Fix Sparc/ElF for Linux/sparc. 3. Fix Alpha/ELF for gcc 3.0. Changes from binutils 2.11.90.0.19: 1. Update from binutils 2001 0706. 2. Fix objcopy/strip broken by accident. 3. Avoid COPY relocs on ia32. 4. Fix the ia64 assembler. 5. This release may not work on Linux/sparc due to the unaligned relocation changes, which are not handled by all versions of glibc. The current glibc in CVS on sourceware should be ok. The last known working binutils for Linux/sparc is 2.11.90.0.8. We are working on it. Changes from binutils 2.11.90.0.15: 1. Update from binutils 2001 0620. 2. Fix a static linking the PIC object files on ia32. 3. Add the verion script support for --export-dynamic. It can be used to selectively export dynamic symbols from the executables. Changes from binutils 2.11.90.0.8: 1. Update from binutils 2001 0610. 2. Fix a gas bug for gcc 3.0. Changes from binutils 2.11.90.0.7: 1. Update from binutils 2001 0512. 2. Fix some P/III SSE 2 assembler bugs. 3. Fix DT_NEEDED and symbol version bugs. 4. Support hidden versioned symbols in DSOs. Changes from binutils 2.11.90.0.6: 1. Update from binutils 2001 0427. 2. Fix the -Bsymbolic bug introduced in binutils 2.11.90.0.5. Changes from binutils 2.11.90.0.5: 1. Update from binutils 2001 0425. 2. Update "ld --multilib-dir PATH". Changes from binutils 2.11.90.0.4: 1. Update from binutils 2001 0414. 2. Fix an ia64 assembler bug. 3. Change Linux/MIPS to use the SVR4 MIPS ABI instead of the IRIX ABI. since there are no supports for the IRIX ABI in glibc. The current Linux/MIPS targets are elf64-tradlittlemips for little endian MIPS instead of elf32-littlemips and elf64-tradbigmips for big endian MIPS instead of elf32-bigmips. Glibc, gcc and kernel may have to be modified for this change. Changes from binutils 2.11.90.0.1: 1. Update from binutils 2001 0401. 2. Fix a gas bug for the gcc from the CVS main trunk. It involves some changes in gas. I compiled kernel 2.2.18, gcc and glibc under Linux/ia32. The resulting binaries work fine. 3. Fix the linker core dump on unsupported ELF binaries. Changes from binutils 2.10.91.0.4: 1. Update from binutils 2001 0309. Changes from binutils 2.10.91.0.2: 1. Update from binutils 2001 0223. 2. More ia64 bug fixes. Changes from binutils 2.10.1.0.7: 1. Update from binutils 2001 0215. 2. More ia64 bug fixes. Support EFI and "ld -relax" on ia64. 3. Fix a weak definition, -Bsymbolic, non-PIC bug for ia32. Changes from binutils 2.10.1.0.4: 1. Update from binutils 2001 0206. 2. Enable the IA64 support. 3. Now you need to use # ld --oformat TARGET instead of # ld -oformat TARGET The Linux kernel build may be affected. BTW # ld --oformat TARGET should work with all previous releases of binutils. Changes from binutils 2.10.1.0.2: 1. Update from binutils 2000 1221. Changes from binutils 2.10.0.33: 1. Update from binutils 2000 1119. 2. It has some symbol versioning related updates. Changes from binutils 2.10.0.32: 1. Update from binutils 2000 1018. 2. A proper ELF/PPC visibility fix. 3. m68k-a.out is supposed to be fixed. Changes from binutils 2.10.0.31: 1. Update from binutils 2000 1014. 2. An ELF/PPC weak symbol bug fix. 3. A new linkonce section name approach. 4. m68k-a.out is still broken. To be fixed. Changes from binutils 2.10.0.29: 1. Update from binutils 2000 1011. 2. Back out the linkonce section name change so that C++ will work. A different approach is being worked on. 3. m68k-a.out is known to be broken. To be fixed. Changes from binutils 2.10.0.26: 1. Update from binutils 2000 1008. Changes from binutils 2.10.0.24: 1. Update from binutils 2000 0907. Changes from binutils 2.10.0.18: 1. Update from binutils 2000 0823. Fix DT_RPATH/DT_RUNPATH handling. Fix the ELF/ia32 DSO not compiled with PIC. 2. Try to fix the ELF visibility bug on PPC with glibc 2.2. Changes from binutils 2.10.0.12: 1. Update from binutils 2000 0720. 2. Fix the DT_NEEDED link bug. 3. Add the new DT_XXXX dynamic tags. Glibc 2.2 will use them at least on libpthread.so. Changes from binutils 2.10.0.9: 1. Update from binutils 2000 0701. Fix the parallel build in ld when PE is enabled. Changes from binutils 2.9.5.0.46: 1. Update from binutils 2000 0617. The demangler support for the new g++ ABI. Minor fix for the ELF visibility. Fix linking non-ELF relocatable object files under ELF with symbol versioning. 2. Support for linking PE relocatable object files under ia32/ELF. Changes from binutils 2.9.5.0.42: 1. Update from binutils 2000 0604. The ELF visibility attribuite should work correctly now. 2. The ia32 assembler has changed the way it assembles the "jmp" instructions to the global symbols. The old assembler will optimize the jump to the global symbol defined in the same source file so that no relocation will be used. The new assembler will use relocation for global jumps. It will mainly affect PIC asm code. The segment like .globl __setjmp __setjmp: ... jmp __sigsetjmp ... .globl __sigsetjmp __sigsetjmp: is no longer PIC safe since "jmp __sigsetjmp" jumps to a global symbol and relocation will be used. Instead, it can be changed to .globl __setjmp __setjmp: ... jmp sigsetjmp ... .globl __sigsetjmp __sigsetjmp: sigsetjmp: so that "jmp sigsetjmp" jumps to a local symbol and the new assembler will optimize out the relocation. Changes from binutils 2.9.5.0.41: 1. Update from binutils 2000 0512. 2. Add testsuite for ELF visibility. Changes from binutils 2.9.5.0.37: 1. Update from binutils 2000 0502. 2. Support STV_HIDDEN and STV_INTERNAL. Changes from binutils 2.9.5.0.35: 1. Update from binutils 2000 0418. 2. Fix an ld demangle style option bug. Changes from binutils 2.9.5.0.34: 1. Update from binutils 2000 0412. Fix a relocation bug which affects the Linux kernel compilation. 2. An ELF/PPC linker script update. Changes from binutils 2.9.5.0.33: 1. Update from binutils 2000 0404. Fix the bug report bug. Changes from binutils 2.9.5.0.32: 1. Update from binutils 2000 0403. Fix the 16bit ia32 assembler bug. Changes from binutils 2.9.5.0.31: 1. Update from binutils 2000 0331. Fix the Linux/ARM assembler bug. 2. Fix a Debian assembler security bug. Changes from binutils 2.9.5.0.29: 1. Update from binutils 2000 0319. 2. An ELF/alpha bug is fixed. Changes from binutils 2.9.5.0.27: 1. Update from binutils 2000 0301. 2. A demangler bug is fixed. 3. A better fix for undefined symbols with -Bsymbolic when building shared library. Changes from binutils 2.9.5.0.24: 1. Update from binutils 2000 0204. 2. Added -taso to linker on alpha. 3. Fixed a -shared -Bsymbolic bug when PIC is not used. Changes from binutils 2.9.5.0.22: 1. Update from binutils 2000 0113. 2. A symbol version bug is fixed. 3. A -Bsymbolic bug is fixed. Changes from binutils 2.9.5.0.21: 1. Update from binutils 1999 1202. 2. Remove a MIPS/ELF change. 3. Enable SOM for HPPA. Changes from binutils 2.9.5.0.19: 1. Update from binutils 1999 1122. An ia32 gas bug is fixed. Changes from binutils 2.9.5.0.16: 1. Update from binutils 1999 1104. 2. i370 is changed to use EM_S370 and ELFOSABI_LINUX. Update readelf. 3. Fix Compaq's demangler support. Changes from binutils 2.9.5.0.14: 1. Update from binutils 1999 1012. A gas bug which affects Linux 2.3.21 is fixed. 2. i370 update. 3. The new demangler code. You should use "--style=xxx" to select the demnangle style instead of "--lang=xxx". Changes from binutils 2.9.5.0.13: 1. Update from binutils 1999 0925. 2. Fix a -s and linker script bug. Changes from binutils 2.9.5.0.12: 1. Update from binutils 1999 0922. 2. i370 update. Changes from binutils 2.9.5.0.11: 1. Update from binutils 1999 0910. It fixed a PIC linker bug on ix86 and sparc introduced in the last release. 2. i370 update. Changes from binutils 2.9.5.0.10: 1. Update from binutils 1999 0906. It fixed a PIC linker bug on ix86 and sparc. 2. Remove elf/hppa since it is WIP. Changes from binutils 2.9.5.0.8: 1. Update from binutils 1999 0831. It allows spaces around '(' and ')' in x86 FP register names. Changes from binutils 2.9.5.0.7: 1. Update from binutils 1999 0821. 2. Some MIPS changes. Changes from binutils 2.9.5.0.6: 1. Update from binutils 1999 0813. 2. i370 update. Changes from binutils 2.9.5.0.5: 1. Update from binutils 1999 0809. An ELF/Sparc ld bug is fixed. Changes from binutils 2.9.5.0.4: 1. Update from binutils 1999 0806. A Solaris/Sparc gas bug is fixed. 2. Remove mips gas patches from binutils 2.9.1.0.25. Changes from binutils 2.9.5.0.3: 1. Update from binutils 1999 0801. 2. Support for real mode x86 gcc. Changes from binutils 2.9.4.0.8: 1. Update from binutils 1999 0719. A libc 5 related bug fix. 2. Fix a typo in mips gas. Changes from binutils 2.9.4.0.7: 1. Update from binutils 1999 0710. A weak symbol bug http://egcs.cygnus.com/ml/egcs-bugs/1999-07/msg00129.html is fixed. Changes from binutils 2.9.4.0.6: 1. Update from binutils 1999 0626. Changes from binutils 2.9.4.0.5: 1. Update from binutils 1999 0620. 2. Remove my fwait fix and use the one in cvs. 3. Use "--only-section=section" instead of "--extract-section=section". for objcopy. Changes from binutils 2.9.4.0.4: 1. Update from binutils 1999 0612. 2. Remove various temporary fixes of mine since those bugs are fixed now. Changes from binutils 2.9.4.0.3: 1. Update from binutils 1999 0611. 2. Remove my ELF/Alpha bfd changes. 3. Use the local symbol copy fix in binutils 1999 0611. Changes from binutils 2.9.4.0.2: 1. Update from binutils 1999 0607. 2. Remove my Sparc hacks. 3. Fix local symbol copy. Changes from binutils 2.9.4.0.1: 1. Update from binutils 1999 0606. 2. Restore relocation overflow checking in binutils 2.9.1.0.25 so that Linux kernel can build. 3. Fix i370 for the new gas. Changes from binutils 1999 0605: 1. Fix a -Bsymbolic bug for Linux/alpha. 2. Add ELF/i370. 3. Fix 8/16-bit relocations for i386. 4. Add --redefine-sym=old_form=new_form to objcopy. 5. Add "-j section" for objcopy. 6. Fix i386 disassembler for fwait. 7. Fix a Sparc asm bug. 8. Add Ada demangle support. 9. Fix MIPS/ELF bugs. 10. Add some vxworks suppport. 11. Fix a.out assembler. The file list: 1. binutils-2.11.93.0.2.tar.gz. Source code. 2. binutils-2.11.92.0.12.3-2.11.93.0.2.diff.gz. Patch against the previous beta source code. 3. binutils-2.11.93.0.2-1.i386.rpm. IA-32 binary RPM for RedHat 7.1. There is no separate source rpm. You can do # rpm -ta binutils-2.11.93.0.2.tar.gz to create both binary and source rpms. The primary sites for the beta Linux binutils are: 1. http://ftp.kernel.org/pub/linux/devel/binutils/ Thanks. H.J. Lu hjl@lucon.org 02/08/2002 From owner-linux-mips@oss.sgi.com Mon Feb 18 00:59:58 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g1I8xwM12794 for linux-mips-outgoing; Mon, 18 Feb 2002 00:59:58 -0800 Received: from mail.ict.ac.cn ([159.226.39.4]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g1I8xr912786 for ; Mon, 18 Feb 2002 00:59:53 -0800 Message-Id: <200202180859.g1I8xr912786@oss.sgi.com> Received: (qmail 4574 invoked from network); 18 Feb 2002 08:02:33 -0000 Received: from unknown (HELO foxsen) (@159.226.40.150) by 159.226.39.4 with SMTP; 18 Feb 2002 08:02:33 -0000 Date: Mon, 18 Feb 2002 15:57:4 +0800 From: Zhang Fuxin To: "linux-mips@oss.sgi.com" CC: "libc-alpha@sources.redhat.com" , "gcc@gcc.gnu.org" Subject: math broken on mips X-mailer: FoxMail 3.11 Release [cn] Mime-Version: 1.0 Content-Type: text/plain; charset="GB2312" Content-Transfer-Encoding: 7bit Sender: owner-linux-mips@oss.sgi.com Precedence: bulk hi, There are so many problems on math handling for linux-mips,including: 1. SNaN & QNan handling(both gcc & glibc) 2. gcc2.96 generates wrong code with -O2,at least one will lead to exception handling problem(reported by me) one will lead to some 'long long' type mishandling(reported by Atsushi Nemoto) (gcc3.1 seems a lot better,but it has problem to compile glibc.I can't even compile current glibc cvs code(with dl-conflict.c etc patched) with it. The best result is a segment fault when using ld.so.1: ../elf/ld.so.1 --library-path ..:../math:../elf:../dlfcn:../nss:../nis:../rt:../resolv: ../crypt:../linuxthreads ./rpcgen -Y ../scripts -c rpcsvc/bootparam_prot.x -o xbootparam_prot.T make[1]: *** [xbootparam_prot.stmp] Segmentation fault ) 3. problems with math-emu 4. other problems to be investigated for its cause,including this one, pow(2,7) = 128.0 when rounding = TONEAREST or UPWARD = 64.1547.. when rounding = DOWNWARD or TOWARDZERO when today i find out the above problem I was feeling almost despaired:( I want to fix these problems,if i could.But it concerns so many things that i am not expert on and no time to dig:(. So any help will be highly appreciated. Regards Zhang Fuxin fxzhang@ict.ac.cn From owner-linux-mips@oss.sgi.com Mon Feb 18 01:18:13 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g1I9ID413310 for linux-mips-outgoing; Mon, 18 Feb 2002 01:18:13 -0800 Received: from rwcrmhc54.attbi.com (rwcrmhc54.attbi.com [216.148.227.87]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g1I9I8913300 for ; Mon, 18 Feb 2002 01:18:08 -0800 Received: from ocean.lucon.org ([12.234.16.87]) by rwcrmhc54.attbi.com (InterMail vM.4.01.03.27 201-229-121-127-20010626) with ESMTP id <20020218081802.UYLG1214.rwcrmhc54.attbi.com@ocean.lucon.org>; Mon, 18 Feb 2002 08:18:02 +0000 Received: by ocean.lucon.org (Postfix, from userid 1000) id A0024125C1; Mon, 18 Feb 2002 00:18:01 -0800 (PST) Date: Mon, 18 Feb 2002 00:18:01 -0800 From: "H . J . Lu" To: Zhang Fuxin Cc: "linux-mips@oss.sgi.com" , "libc-alpha@sources.redhat.com" , "gcc@gcc.gnu.org" Subject: Re: math broken on mips Message-ID: <20020218001801.A21719@lucon.org> References: <200202180859.g1I8xr912786@oss.sgi.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <200202180859.g1I8xr912786@oss.sgi.com>; from fxzhang@ict.ac.cn on Mon, Feb 18, 2002 at 03:57:04PM +0800 Sender: owner-linux-mips@oss.sgi.com Precedence: bulk On Mon, Feb 18, 2002 at 03:57:04PM +0800, Zhang Fuxin wrote: > > (gcc3.1 seems a lot better,but it has problem to compile glibc.I can't even compile > current glibc cvs code(with dl-conflict.c etc patched) with it. The best result is > a segment fault when using ld.so.1: > ../elf/ld.so.1 --library-path ..:../math:../elf:../dlfcn:../nss:../nis:../rt:../resolv: > ../crypt:../linuxthreads ./rpcgen -Y ../scripts -c rpcsvc/bootparam_prot.x -o > xbootparam_prot.T You need to get the current glibc/gcc from CVS. You also need to apply my glibc patches for mips if they are not in CVS yet. They are: 2002-01-20 H.J. Lu * config.make.in (inline-limit): New. * configure.in: Check if gcc supports -finline-limit=xxx. * configure: Rebuild. * elf/Makefile (CFLAGS-rtld.c): Set to -finline-limit=2000 if needed. 2002-02-04 H.J. Lu * elf/dl-conflict.c (_dl_resolve_conflicts): Dummy if _DL_HAVE_NO_ELF_MACHINE_RELA is defined. 2001-07-10 H.J. Lu * sysdeps/unix/sysv/linux/powerpc/mmap64.c: Moved to ... * sysdeps/unix/sysv/linux/mmap64.c: Here. * sysdeps/unix/sysv/linux/mmap64.c (MMAP2_PAGE_SHIFT): Renamed from PAGE_SHIFT. Define if not defined. Check MMAP2_PAGE_SHIFT only if __NR_mmap2 is defined. * sysdeps/unix/sysv/linux/hppa/mmap64.c : Removed. * sysdeps/unix/sysv/linux/sparc/sparc32/mmap64.c: Likewise. Please check the glibc mailing list archive for those patches. H.J. From owner-linux-mips@oss.sgi.com Mon Feb 18 02:05:36 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g1IA5at14953 for linux-mips-outgoing; Mon, 18 Feb 2002 02:05:36 -0800 Received: from mail.ict.ac.cn ([159.226.39.4]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g1IA5R914950 for ; Mon, 18 Feb 2002 02:05:27 -0800 Message-Id: <200202181005.g1IA5R914950@oss.sgi.com> Received: (qmail 6316 invoked from network); 18 Feb 2002 09:08:05 -0000 Received: from unknown (HELO foxsen) (@159.226.40.150) by 159.226.39.4 with SMTP; 18 Feb 2002 09:08:05 -0000 Date: Mon, 18 Feb 2002 17:2:22 +0800 From: Zhang Fuxin To: Hartvig Ekner CC: "linux-mips@oss.sgi.com" Subject: Re: Re: math broken on mips X-mailer: FoxMail 3.11 Release [cn] Mime-Version: 1.0 Content-Type: text/plain; charset="GB2312" Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by oss.sgi.com id g1IA5S914951 Sender: owner-linux-mips@oss.sgi.com Precedence: bulk hi, Thank you very much. I will gather all the problems and examples to show them i know and post them today. Please wait for some time. ÔÚ 2002-02-18 09:16:00 you wrote£º >Hi Zhang, > >we're talking to Algorithmics about the possibility of productizing their >SDE compiler for Linux. If this materializes, we should be able to get the >GCC issues you mention fixed. > >Could you therefore pls. send me examples showing all the GCC issues you >mention: > >1) SNan & QNan handling wrong >2) Wrong code generated with -O2 (exception handling problem) >3) Wrong code generated with -O2 (long long type problem) > >I would like (small!) examples suitable for inclusion directly in a work I like small one too:). >specification, so items like "Mozilla doesn't run" is not good enough :-) > >Finally, Kjeld E. at MIPS is spending some time on math-emu. So if you have >specific issues, you can try to mail him as well (kjelde@mips.com). > >Problem #4 you report could be either in glibc or math-emu. If it's math-emu >we'll fix it. > >/Hartvig > > >Zhang Fuxin writes: >> >> hi, >> There are so many problems on math handling for linux-mips,including: >> 1. SNaN & QNan handling(both gcc & glibc) >> 2. gcc2.96 generates wrong code with -O2,at least >> one will lead to exception handling problem(reported by me) >> one will lead to some 'long long' type mishandling(reported by Atsushi Nemoto) >> >> (gcc3.1 seems a lot better,but it has problem to compile glibc.I can't even compile >> current glibc cvs code(with dl-conflict.c etc patched) with it. The best result is >> a segment fault when using ld.so.1: >> ../elf/ld.so.1 --library-path ..:../math:../elf:../dlfcn:../nss:../nis:../rt:../resolv: >> ../crypt:../linuxthreads ./rpcgen -Y ../scripts -c rpcsvc/bootparam_prot.x -o >> xbootparam_prot.T >> make[1]: *** [xbootparam_prot.stmp] Segmentation fault >> ) >> 3. problems with math-emu >> 4. other problems to be investigated for its cause,including this one, >> >> pow(2,7) = 128.0 when rounding = TONEAREST or UPWARD >> = 64.1547.. when rounding = DOWNWARD or TOWARDZERO >> >> when today i find out the above problem I was feeling almost despaired:( >> >> I want to fix these problems,if i could.But it concerns so many things that i am not >> expert on and no time to dig:(. So any help will be highly appreciated. >> >> >> >> >> Regards >> Zhang Fuxin >> fxzhang@ict.ac.cn Regards Zhang Fuxin fxzhang@ict.ac.cn From owner-linux-mips@oss.sgi.com Mon Feb 18 02:12:44 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g1IACiJ15133 for linux-mips-outgoing; Mon, 18 Feb 2002 02:12:44 -0800 Received: from mail.ict.ac.cn ([159.226.39.4]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g1IACb915128 for ; Mon, 18 Feb 2002 02:12:37 -0800 Message-Id: <200202181012.g1IACb915128@oss.sgi.com> Received: (qmail 6526 invoked from network); 18 Feb 2002 09:15:18 -0000 Received: from unknown (HELO foxsen) (@159.226.40.150) by 159.226.39.4 with SMTP; 18 Feb 2002 09:15:18 -0000 Date: Mon, 18 Feb 2002 17:9:32 +0800 From: Zhang Fuxin To: "H . J . Lu" CC: "linux-mips@oss.sgi.com" Subject: Re: Re: math broken on mips X-mailer: FoxMail 3.11 Release [cn] Mime-Version: 1.0 Content-Type: text/plain; charset="GB2312" Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by oss.sgi.com id g1IACc915129 Sender: owner-linux-mips@oss.sgi.com Precedence: bulk hi, will try later,thank you. ÔÚ 2002-02-18 00:18:00 you wrote£º >On Mon, Feb 18, 2002 at 03:57:04PM +0800, Zhang Fuxin wrote: >> >> (gcc3.1 seems a lot better,but it has problem to compile glibc.I can't even compile >> current glibc cvs code(with dl-conflict.c etc patched) with it. The best result is >> a segment fault when using ld.so.1: >> ../elf/ld.so.1 --library-path ..:../math:../elf:../dlfcn:../nss:../nis:../rt:../resolv: >> ../crypt:../linuxthreads ./rpcgen -Y ../scripts -c rpcsvc/bootparam_prot.x -o >> xbootparam_prot.T > >You need to get the current glibc/gcc from CVS. You also need to apply >my glibc patches for mips if they are not in CVS yet. They are: > >2002-01-20 H.J. Lu > > * config.make.in (inline-limit): New. > > * configure.in: Check if gcc supports -finline-limit=xxx. > * configure: Rebuild. > > * elf/Makefile (CFLAGS-rtld.c): Set to -finline-limit=2000 if > needed. > >2002-02-04 H.J. Lu > > * elf/dl-conflict.c (_dl_resolve_conflicts): Dummy if > _DL_HAVE_NO_ELF_MACHINE_RELA is defined. > >2001-07-10 H.J. Lu > > * sysdeps/unix/sysv/linux/powerpc/mmap64.c: Moved to ... > * sysdeps/unix/sysv/linux/mmap64.c: Here. > > * sysdeps/unix/sysv/linux/mmap64.c (MMAP2_PAGE_SHIFT): Renamed > from PAGE_SHIFT. Define if not defined. Check MMAP2_PAGE_SHIFT > only if __NR_mmap2 is defined. > > * sysdeps/unix/sysv/linux/hppa/mmap64.c : Removed. > * sysdeps/unix/sysv/linux/sparc/sparc32/mmap64.c: Likewise. > >Please check the glibc mailing list archive for those patches. > > >H.J. Regards Zhang Fuxin fxzhang@ict.ac.cn From owner-linux-mips@oss.sgi.com Mon Feb 18 02:55:14 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g1IAtEB16058 for linux-mips-outgoing; Mon, 18 Feb 2002 02:55:14 -0800 Received: from mail.ict.ac.cn ([159.226.39.4]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g1IAsQ916008 for ; Mon, 18 Feb 2002 02:54:26 -0800 Message-Id: <200202181054.g1IAsQ916008@oss.sgi.com> Received: (qmail 7693 invoked from network); 18 Feb 2002 09:57:06 -0000 Received: from unknown (HELO foxsen) (@159.226.40.150) by 159.226.39.4 with SMTP; 18 Feb 2002 09:57:06 -0000 Date: Mon, 18 Feb 2002 17:51:22 +0800 From: Zhang Fuxin To: Hartvig Ekner CC: "linux-mips@oss.sgi.com" Subject: Re: Re: math broken on mips X-mailer: FoxMail 3.11 Release [cn] Mime-Version: 1.0 Content-Type: text/plain; charset="GB2312" Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by oss.sgi.com id g1IAsR916009 Sender: owner-linux-mips@oss.sgi.com Precedence: bulk hi, I find that you are asking only gcc related parts,that is related less, here they are(from posts on linux-mips,i cc them to the list in case it is useful,sorry if it brings you inconvenience): 1.about NaN handling -----------------begin of the first problem-------------------------------- I am sorry but it seems i can't fix this without ugly changes. since i am not familiar with gcc code, i decide to leave it to you, but provide some information instead. In gcc there are 3 spaces where the NaN handling is assumed the Intel way. 1. gcc/real.c (the most important one) here the author seems to have known the NaN pattern problem,so he leaves a interface macro for defining non intel NaN patterns: (comment of function "make_nan()",at about line 6219) /* Output a binary NaN bit pattern in the target machine's format. */ /* If special NaN bit patterns are required, define them in tm.h as arrays of unsigned 16-bit shorts. Otherwise, use the default patterns here. */ I have read through this file and decided that the follow defined should be enough for mips: /* NaN pattern,mips QNAN & SNAN is different from intel's * DFMODE_NAN and SFMODE_NAN is used in real.c */ #define DFMODE_NAN \ unsigned short DFbignan[4] = {0x7ff7, 0xffff, 0xffff, 0xffff}; \ unsigned short DFlittlenan[4] = {0xffff, 0xffff, 0xffff, 0xfff7} #define SFMODE_NAN \ unsigned short SFbignan[2] = {0x7fbf, 0xffff}; \ unsigned short SFlittlenan[2] = {0xffff, 0xffbf} But the problem is where to put them:(. Obviously it is target specified definitions and should be in config/mips/. Documents say tm.h is a symbol link and included in config.h,but it is no long true.If i add them to xm-mips.h then for native compilation it is ok but it fails for cross-compile. 2.gcc/reg-stack.c (H.J. tell me it is not used on mips) There is a hardcoded QNaN used around line 477: nan = gen_lowpart (SFmode, GEN_INT (0x7fc00000)); I sugest defining a macro QNAN_HAS_1ST_FRACBIT_CLEARED for mips and change it to,just don't know where to put it: #ifndef QNAN_HAS_1ST_FRACBIT_CLEARED nan = gen_lowpart (SFmode, GEN_INT (0x7fc00000)); #else nan = gen_lowpart (SFmode, GEN_INT (0x7fbfffff)); #endif 3. config/fp-bit.c (H.J. said it is not mean to target specified) this is for machine having no fpu hardware. again i susgest define QNAN_HAS_1ST_FRACBIT_CLEARED and then apply this patch: 190d189 < #ifndef QNAN_HAS_1ST_FRACBIT_CLEARED 192,195d190 < #else < fraction &= ~QUIET_NAN; < #endif < 379,380d373 < < #ifndef QNAN_HAS_1ST_FRACBIT_CLEARED 382,384d374 < #else < if (!(fraction & QUIET_NAN)) < #endif ÔÚ 2002-02-03 22:54:00 you wrote£º >On Mon, Feb 04, 2002 at 02:22:48PM +0800, Zhang Fuxin wrote: >> hi, >> >> Gcc (2.96 20000731,H.J.LU's rh port for mips) think 0x7fc00000 is QNaN and >> optimize 0.0/0.0 as 0x7fc00000 for single precision ops,while for my cpu >> (maybe most mips cpu) is a SNaN. R4k user's manual and "See Mips Run" both >> say so.And experiments confirm this. >> >> Should we correct it? > >Yes. Do you have a patch? > >Thanks. > > >H.J. -------------------------end of first problem-------------------------------- --------------------------begin of the second problem------------------------ 2. gcc -O2 optimization bug No.1 It seems gcc with optimization > -O2 will produce incorrect code for fp code: I find this example when tracking down the libm-test failures. ( expf(NaN) == NaN will report an extra "invalid operation" exception ) The faulting code snippet is(from glibc/sysdeps/ieee754/flt-32/w_expf.c): float __my_expf(float x) /* wrapper expf */ { float z; unsigned int hx; z = __ieee754_expf(x); if(_LIB_VERSION == _IEEE_) return z; if(__finitef(x)) { if(x>o_threshold) return 1.0; else if(x: 401290: 3c1c0fc0 lui gp,0xfc0 401294: 279c6dd0 addiu gp,gp,28112 401298: 0399e021 addu gp,gp,t9 40129c: 27bdffd0 addiu sp,sp,-48 4012a0: afbc0010 sw gp,16(sp) 4012a4: afbf0028 sw ra,40(sp) 4012a8: afbe0024 sw s8,36(sp) 4012ac: afbc0020 sw gp,32(sp) 4012b0: 03a0f021 move s8,sp 4012b4: e7cc0030 swc1 $f12,48(s8) 4012b8: c7cc0030 lwc1 $f12,48(s8) 4012bc: 8f998088 lw t9,-32632(gp) 4012c0: 00000000 nop 4012c4: 0320f809 jalr t9 4012c8: 00000000 nop 4012cc: 8fdc0010 lw gp,16(s8) 4012d0: e7c00018 swc1 $f0,24(s8) 4012d4: 8f8380ac lw v1,-32596(gp) 4012d8: 00000000 nop 4012dc: 8c630000 lw v1,0(v1) 4012e0: 2402ffff li v0,-1 4012e4: 14620004 bne v1,v0,4012f8 <__my_expf+0x68> 4012e8: 00000000 nop 4012ec: c7c00018 lwc1 $f0,24(s8) 4012f0: 10000032 b 4013bc <__my_expf+0x12c> 4012f4: 00000000 nop 4012f8: c7cc0030 lwc1 $f12,48(s8) 4012fc: 8f998090 lw t9,-32624(gp) 401300: 00000000 nop 401304: 0320f809 jalr t9 401308: 00000000 nop 40130c: 8fdc0010 lw gp,16(s8) 401310: 10400029 beqz v0,4013b8 <__my_expf+0x128> 401314: 00000000 nop 401318: c7c20030 lwc1 $f2,48(s8) 40131c: 8f818018 lw at,-32744(gp) 401320: 00000000 nop 401324: 242142a0 addiu at,at,17056 401328: c4200000 lwc1 $f0,0(at) 40132c: 00000000 nop 401330: 4602003c c.lt.s $f0,$f2 401334: 00000000 nop 401338: 45010003 bc1t 401348 <__my_expf+0xb8> 40133c: 00000000 nop 401340: 10000005 b 401358 <__my_expf+0xc8> 401344: 00000000 nop 401348: 3c013f80 lui at,0x3f80 40134c: 44810000 mtc1 at,$f0 401350: 1000001a b 4013bc <__my_expf+0x12c> 401354: 00000000 nop 401358: c7c20030 lwc1 $f2,48(s8) 40135c: 8f818018 lw at,-32744(gp) 401360: 00000000 nop 401364: 242142a4 addiu at,at,17060 401368: c4200000 lwc1 $f0,0(at) 40136c: 00000000 nop 401370: 4600103c c.lt.s $f2,$f0 401374: 00000000 nop 401378: 45010003 bc1t 401388 <__my_expf+0xf8> 40137c: 00000000 nop 401380: 10000005 b 401398 <__my_expf+0x108> 401384: 00000000 nop 401388: 3c014000 lui at,0x4000 40138c: 44810000 mtc1 at,$f0 401390: 1000000a b 4013bc <__my_expf+0x12c> 401394: 00000000 nop 401398: 8f848018 lw a0,-32744(gp) 40139c: 00000000 nop 4013a0: 248442a8 addiu a0,a0,17064 4013a4: 8f998058 lw t9,-32680(gp) 4013a8: 00000000 nop 4013ac: 0320f809 jalr t9 4013b0: 00000000 nop 4013b4: 8fdc0010 lw gp,16(s8) 4013b8: c7c00018 lwc1 $f0,24(s8) 4013bc: 03c0e821 move sp,s8 4013c0: 8fbf0028 lw ra,40(sp) 4013c4: 8fbe0024 lw s8,36(sp) 4013c8: 03e00008 jr ra 4013cc: 27bd0030 addiu sp,sp,48 2. with -O2 0000000000400fc0 <__my_expf>: 400fc0: 3c1c0fc0 lui gp,0xfc0 400fc4: 279c70a0 addiu gp,gp,28832 400fc8: 0399e021 addu gp,gp,t9 400fcc: 27bdffd0 addiu sp,sp,-48 400fd0: afbc0010 sw gp,16(sp) 400fd4: e7b60028 swc1 $f22,40(sp) 400fd8: e7b7002c swc1 $f23,44(sp) 400fdc: e7b40020 swc1 $f20,32(sp) 400fe0: e7b50024 swc1 $f21,36(sp) 400fe4: afbf001c sw ra,28(sp) 400fe8: 46006506 mov.s $f20,$f12 400fec: afbc0018 sw gp,24(sp) 400ff0: 8f998088 lw t9,-32632(gp) 400ff4: 00000000 nop 400ff8: 0320f809 jalr t9 400ffc: 00000000 nop 401000: 8fbc0010 lw gp,16(sp) 401004: 00000000 nop 401008: 8f8380ac lw v1,-32596(gp) 40100c: 00000000 nop 401010: 8c630000 lw v1,0(v1) 401014: 2402ffff li v0,-1 401018: 46000586 mov.s $f22,$f0 40101c: 10620021 beq v1,v0,4010a4 <__my_expf+0xe4> 401020: 4600a306 mov.s $f12,$f20 401024: 8f998090 lw t9,-32624(gp) 401028: 00000000 nop 40102c: 0320f809 jalr t9 401030: 00000000 nop 401034: 8fbc0010 lw gp,16(sp) 401038: 3c0142b1 lui at,0x42b1 40103c: 34217180 ori at,at,0x7180 401040: 44811000 mtc1 at,$f2 401044: 3c013f80 lui at,0x3f80 401048: 44810000 mtc1 at,$f0 40104c: 4614103c c.lt.s $f2,$f20 // this is wrongly put ahead ? 401050: 10400013 beqz v0,4010a0 <__my_expf+0xe0> 401054: 00000000 nop 401058: 45010012 bc1t 4010a4 <__my_expf+0xe4> 40105c: 00000000 nop 401060: 3c01c2cf lui at,0xc2cf 401064: 3421f1b5 ori at,at,0xf1b5 401068: 44810000 mtc1 at,$f0 40106c: 8f848018 lw a0,-32744(gp) 401070: 00000000 nop 401074: 24843fa8 addiu a0,a0,16296 401078: 4600a03c c.lt.s $f20,$f0 40107c: 3c014000 lui at,0x4000 401080: 44810000 mtc1 at,$f0 401084: 45010007 bc1t 4010a4 <__my_expf+0xe4> 401088: 00000000 nop 40108c: 8f998058 lw t9,-32680(gp) 401090: 00000000 nop 401094: 0320f809 jalr t9 401098: 00000000 nop 40109c: 8fbc0010 lw gp,16(sp) 4010a0: 4600b006 mov.s $f0,$f22 4010a4: 8fbf001c lw ra,28(sp) 4010a8: c7b60028 lwc1 $f22,40(sp) 4010ac: c7b7002c lwc1 $f23,44(sp) 4010b0: c7b40020 lwc1 $f20,32(sp) 4010b4: c7b50024 lwc1 $f21,36(sp) 4010b8: 03e00008 jr ra 4010bc: 27bd0030 addiu sp,sp,48 ----------------------------end of the second problem------------------------ ----------------------------begin of 3rd problem----------------------------- 3.wrong code from gcc -O2,No.2 hi, it seems fixed in latest gcc (3.1). gcc 2.96 does produce wrong code for -O2, i posted another example one or two days ago. ÔÚ 2002-02-08 19:37:00 you wrote£º >I found gcc 2.96 (gcc-2.96-99.1.mipsel.rpm in H.J.Lu's RedHat 7.1) >outputs wrong code for this short program. > >int foo(unsigned long long a, unsigned long long b) >{ > int as, bs; > as = a >> 63; > bs = b >> 63; > if (as != bs) > return as || !(b << 1); > return (a == b) || as; >} > >int main(int argc, char **argv) >{ > return foo(0, 0xffffffffffffffffull); >} > >This program must return 0. But compiling with -O2 it returns 1 !! > ># gcc -O -o foo foo.c;./foo;echo $? >0 ># gcc -O2 -o foo foo.c;./foo;echo $? >1 > >Output wth -O -g are: > >00400780 : > 400780: 3c1c0fc0 lui gp,0xfc0 > 400784: 279c78b0 addiu gp,gp,30896 > 400788: 0399e021 addu gp,gp,t9 > 40078c: 00804021 move t0,a0 > 400790: 00a04821 move t1,a1 > 400794: 000917c2 srl v0,t1,0x1f > 400798: 00402821 move a1,v0 > 40079c: 000717c2 srl v0,a3,0x1f > 4007a0: 10a2000d beq a1,v0,4007d8 > 4007a4: 00001821 move v1,zero > 4007a8: 14a00008 bnez a1,4007cc > 4007ac: 00004021 move t0,zero > 4007b0: 00071840 sll v1,a3,0x1 > 4007b4: 000627c2 srl a0,a2,0x1f > 4007b8: 00641825 or v1,v1,a0 > 4007bc: 00061040 sll v0,a2,0x1 > 4007c0: 00621025 or v0,v1,v0 > 4007c4: 14400002 bnez v0,4007d0 > 4007c8: 00000000 nop > 4007cc: 24080001 li t0,1 > 4007d0: 03e00008 jr ra > 4007d4: 01001021 move v0,t0 > 4007d8: 15060003 bne t0,a2,4007e8 > 4007dc: 00001021 move v0,zero > 4007e0: 11270003 beq t1,a3,4007f0 > 4007e4: 00000000 nop > 4007e8: 10a00002 beqz a1,4007f4 > 4007ec: 00000000 nop > 4007f0: 24020001 li v0,1 > 4007f4: 03e00008 jr ra > 4007f8: 00000000 nop > >Output with -O2 -g are: > >00400780 : > 400780: 3c1c0fc0 lui gp,0xfc0 > 400784: 279c78b0 addiu gp,gp,30896 > 400788: 0399e021 addu gp,gp,t9 > 40078c: 00805021 move t2,a0 > 400790: 00c04021 move t0,a2 > 400794: 00a05821 move t3,a1 > 400798: 00e04821 move t1,a3 > 40079c: 000b17c2 srl v0,t3,0x1f > 4007a0: 000927c2 srl a0,t1,0x1f > 4007a4: 00001821 move v1,zero > 4007a8: 1044000a beq v0,a0,4007d4 > 4007ac: 00002821 move a1,zero > 4007b0: 14400006 bnez v0,4007cc > 4007b4: 24050001 li a1,1 > 4007b8: 00091840 sll v1,t1,0x1 > 4007bc: 000827c2 srl a0,t0,0x1f > 4007c0: 00641825 or v1,v1,a0 > 4007c4: 00081040 sll v0,t0,0x1 > 4007c8: 00621025 or v0,v1,v0 > 4007cc: 03e00008 jr ra > 4007d0: 00a01021 move v0,a1 > 4007d4: 15480003 bne t2,t0,4007e4 > 4007d8: 00001821 move v1,zero > 4007dc: 11690003 beq t3,t1,4007ec > 4007e0: 00000000 nop > 4007e4: 10400002 beqz v0,4007f0 > 4007e8: 00000000 nop > 4007ec: 24030001 li v1,1 > 4007f0: 03e00008 jr ra > 4007f4: 00601021 move v0,v1 > > >It seems one 'bnez' in good code (at 4007c4) was lost in bad code. > >Is this a know problem? If so, is there any patches available? > >Thank you. >--- >Atsushi Nemoto -----------------------------end of 3rd problem------------------------ ÔÚ 2002-02-18 09:16:00 you wrote£º >Hi Zhang, > >we're talking to Algorithmics about the possibility of productizing their >SDE compiler for Linux. If this materializes, we should be able to get the >GCC issues you mention fixed. > >Could you therefore pls. send me examples showing all the GCC issues you >mention: > >1) SNan & QNan handling wrong >2) Wrong code generated with -O2 (exception handling problem) >3) Wrong code generated with -O2 (long long type problem) > >I would like (small!) examples suitable for inclusion directly in a work >specification, so items like "Mozilla doesn't run" is not good enough :-) > >Finally, Kjeld E. at MIPS is spending some time on math-emu. So if you have >specific issues, you can try to mail him as well (kjelde@mips.com). > >Problem #4 you report could be either in glibc or math-emu. If it's math-emu >we'll fix it. > >/Hartvig > > >Zhang Fuxin writes: >> >> hi, >> There are so many problems on math handling for linux-mips,including: >> 1. SNaN & QNan handling(both gcc & glibc) >> 2. gcc2.96 generates wrong code with -O2,at least >> one will lead to exception handling problem(reported by me) >> one will lead to some 'long long' type mishandling(reported by Atsushi Nemoto) >> >> (gcc3.1 seems a lot better,but it has problem to compile glibc.I can't even compile >> current glibc cvs code(with dl-conflict.c etc patched) with it. The best result is >> a segment fault when using ld.so.1: >> ../elf/ld.so.1 --library-path ..:../math:../elf:../dlfcn:../nss:../nis:../rt:../resolv: >> ../crypt:../linuxthreads ./rpcgen -Y ../scripts -c rpcsvc/bootparam_prot.x -o >> xbootparam_prot.T >> make[1]: *** [xbootparam_prot.stmp] Segmentation fault >> ) >> 3. problems with math-emu >> 4. other problems to be investigated for its cause,including this one, >> >> pow(2,7) = 128.0 when rounding = TONEAREST or UPWARD >> = 64.1547.. when rounding = DOWNWARD or TOWARDZERO >> >> when today i find out the above problem I was feeling almost despaired:( >> >> I want to fix these problems,if i could.But it concerns so many things that i am not >> expert on and no time to dig:(. So any help will be highly appreciated. >> >> >> >> >> Regards >> Zhang Fuxin >> fxzhang@ict.ac.cn Regards Zhang Fuxin fxzhang@ict.ac.cn From owner-linux-mips@oss.sgi.com Mon Feb 18 05:53:23 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g1IDrNM27233 for linux-mips-outgoing; Mon, 18 Feb 2002 05:53:23 -0800 Received: from mx.mips.com (mx.mips.com [206.31.31.226]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g1IDrG927229 for ; Mon, 18 Feb 2002 05:53:16 -0800 Received: from newman.mips.com (ns-dmz [206.31.31.225]) by mx.mips.com (8.9.3/8.9.0) with ESMTP id EAA12886; Mon, 18 Feb 2002 04:53:08 -0800 (PST) Received: from copfs01.mips.com (copfs01 [192.168.205.101]) by newman.mips.com (8.9.3/8.9.0) with ESMTP id EAA04156; Mon, 18 Feb 2002 04:53:04 -0800 (PST) Received: from copsun18.mips.com (copsun18 [192.168.205.28]) by copfs01.mips.com (8.11.4/8.9.0) with ESMTP id g1ICqKA23120; Mon, 18 Feb 2002 13:52:20 +0100 (MET) From: Hartvig Ekner Received: (from hartvige@localhost) by copsun18.mips.com (8.9.1/8.9.0) id NAA03169; Mon, 18 Feb 2002 13:52:47 +0100 (MET) Message-Id: <200202181252.NAA03169@copsun18.mips.com> Subject: Re: [patch] linux 2.4.17: The second mb() rework (final) To: macro@ds2.pg.gda.pl (Maciej W. Rozycki) Date: Mon, 18 Feb 2002 13:52:47 +0100 (MET) Cc: hartvige@mips.com (Hartvig Ekner), dom@algor.co.uk (Dominic Sweetman), kevink@mips.com (Kevin D. Kissell), nemoto@toshiba-tops.co.jp (Atsushi Nemoto), mdharm@momenco.com, ralf@uni-koblenz.de, linux-mips@fnet.fr, linux-mips@oss.sgi.com In-Reply-To: from "Maciej W. Rozycki" at Feb 15, 2002 02:03:45 PM X-Mailer: ELM [version 2.5 PL1] MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-linux-mips@oss.sgi.com Precedence: bulk Maciej W. Rozycki writes: > > On Fri, 15 Feb 2002, Hartvig Ekner wrote: > > > But in-order for the CPU is not enough - it also needs to make sure all > > written data is visible for DMA accesses to memory from the outside, which > > is why the writebuffer needs to be flushed by a SYNC as well. From the > > definition of "SYNC": > > > > "A store is completed when the stored value is visible to every other > > processor in the system". > > > > Which presumably also includes DMA I/O devices... > > The description found in the R4k manual seems to contradict. A "sync" on > a single CPU only assures transactions on it's external bus will happen in > order wrt the "sync". In a multiple-CPU environment all CPUs interested > in a barrier need to execute a "sync". That's seems natural -- how would > you define a synchronization point for a CPU that does not execute a > "sync". You are no doubt correct regarding the R4K manual - so my comment probably only applies for CPU's that claim to be MIPS32/MIPS64 compliant. All MTI's CPU offerings (cores only) do in fact flush the WB on a SYNC to comply with the current spec. > Since I/O devices have no means to signal a CPU a "sync" operation, how > can you expect a "sync" on the CPU to complete all preceding writes to the > device? It's only a following read that may imply it. This I do have a problem understanding. If the SYNC does not flush the WB on some processor/writebuffer combinations, and a read can be satisfied out of the WB, how would you ever be able to guarantee that DMA data written by the CPU has reached memory before triggering the IO device? /Hartvig > > -- > + Maciej W. Rozycki, Technical University of Gdansk, Poland + > +--------------------------------------------------------------+ > + e-mail: macro@ds2.pg.gda.pl, PGP key available + > > -- _ _ _____ ____ Hartvig Ekner Mailto:hartvige@mips.com |\ /| | |____)(____ Direct: +45 4486 5503 | \/ | | | _____) MIPS Denmark Switch: +45 4486 5555 T E C H N O L O G I E S http://www.mips.com Fax...: +45 4486 5556 From owner-linux-mips@oss.sgi.com Mon Feb 18 07:31:08 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g1IFV8d01072 for linux-mips-outgoing; Mon, 18 Feb 2002 07:31:08 -0800 Received: from delta.ds2.pg.gda.pl (delta.ds2.pg.gda.pl [213.192.72.1]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g1IFV2901052 for ; Mon, 18 Feb 2002 07:31:03 -0800 Received: from localhost by delta.ds2.pg.gda.pl (8.9.3/8.9.3) with SMTP id PAA18433; Mon, 18 Feb 2002 15:24:02 +0100 (MET) Date: Mon, 18 Feb 2002 15:24:02 +0100 (MET) From: "Maciej W. Rozycki" To: Hartvig Ekner cc: Dominic Sweetman , "Kevin D. Kissell" , Atsushi Nemoto , mdharm@momenco.com, ralf@uni-koblenz.de, linux-mips@fnet.fr, linux-mips@oss.sgi.com Subject: Re: [patch] linux 2.4.17: The second mb() rework (final) In-Reply-To: <200202181252.NAA03169@copsun18.mips.com> Message-ID: Organization: Technical University of Gdansk MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-linux-mips@oss.sgi.com Precedence: bulk On Mon, 18 Feb 2002, Hartvig Ekner wrote: > You are no doubt correct regarding the R4K manual - so my comment probably > only applies for CPU's that claim to be MIPS32/MIPS64 compliant. All MTI's > CPU offerings (cores only) do in fact flush the WB on a SYNC to comply with > the current spec. Note that the MIPS II spec doesn't forbid a "sync" implementation to be stronger than required. > This I do have a problem understanding. If the SYNC does not flush the WB > on some processor/writebuffer combinations, and a read can be satisfied > out of the WB, how would you ever be able to guarantee that DMA data written > by the CPU has reached memory before triggering the IO device? If after a "sync" an uncached read could be satisfied from an uncommittedd write pending since before the "sync" in a CPU's oncore WB, then the CPU would violate the MIPS II spec of "sync", as the order of transactions at this CPU's external bus would not be preserved. You may exploit this property to do a write-back flush to the host bus -- that's what I added iob() for. -- + Maciej W. Rozycki, Technical University of Gdansk, Poland + +--------------------------------------------------------------+ + e-mail: macro@ds2.pg.gda.pl, PGP key available + From owner-linux-mips@oss.sgi.com Mon Feb 18 12:50:49 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g1IKonS09945 for linux-mips-outgoing; Mon, 18 Feb 2002 12:50:49 -0800 Received: from moshier.net (moshier.ne.mediaone.net [65.96.130.103]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g1IKok909942 for ; Mon, 18 Feb 2002 12:50:46 -0800 Received: from moshier.ne.mediaone.net (moshier.ne.mediaone.net [65.96.130.103]) by moshier.net (8.9.3/8.9.3) with ESMTP id OAA25620; Mon, 18 Feb 2002 14:50:31 -0500 Date: Mon, 18 Feb 2002 14:50:30 -0500 (EST) From: Stephen L Moshier Reply-To: moshier@moshier.net To: Zhang Fuxin cc: linux-mips@oss.sgi.com, Subject: Re: math broken on mips Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-linux-mips@oss.sgi.com Precedence: bulk > pow(2,7) = 128.0 when rounding = TONEAREST or UPWARD > = 64.1547.. when rounding = DOWNWARD or TOWARDZERO The libm functions from IBM that were recently installed in glibc come with this remark in sysdeps/ieee754/dbl-64/MathLib.h: /* Assumption: Machine arithmetic operations are performed in */ /* round nearest mode of IEEE 754 standard. */ These math functions use a doubled-precision Dekker arithmetic which is very sensitive to rounding rules and arithetic flaws. Fixing the routines to give reasonable answers with other rounding modes would not be practical. It is customary for a system math library to expect default environment conditions, and I do not think this design actually violates any standards. If you want to use non-default arithmetic settings and have them work portably on various systems, you will have to take defensive steps to protect your program from damage by the operating system and the system library. From owner-linux-mips@oss.sgi.com Mon Feb 18 13:23:42 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g1ILNgX10652 for linux-mips-outgoing; Mon, 18 Feb 2002 13:23:42 -0800 Received: from moshier.net (moshier.ne.mediaone.net [65.96.130.103]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g1ILNe910649 for ; Mon, 18 Feb 2002 13:23:40 -0800 Received: from moshier.ne.mediaone.net (moshier.ne.mediaone.net [65.96.130.103]) by moshier.net (8.9.3/8.9.3) with ESMTP id PAA25645; Mon, 18 Feb 2002 15:23:35 -0500 Date: Mon, 18 Feb 2002 15:23:34 -0500 (EST) From: Stephen L Moshier Reply-To: moshier@moshier.net To: Geoff Keating cc: fxzhang@ict.ac.cn, , Subject: Re: math broken on mips In-Reply-To: <200202182018.g1IKIk802891@desire.geoffk.org> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-linux-mips@oss.sgi.com Precedence: bulk On Mon, 18 Feb 2002, Geoff Keating wrote: > ... actually, C99 seems to imply that all supported rounding > precisions should work for the math library Could you point out specifically where it says that? From owner-linux-mips@oss.sgi.com Mon Feb 18 13:45:31 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g1ILjVv11345 for linux-mips-outgoing; Mon, 18 Feb 2002 13:45:31 -0800 Received: from desire.geoffk.org (12-234-190-114.client.attbi.com [12.234.190.114]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g1ILjS911338 for ; Mon, 18 Feb 2002 13:45:28 -0800 Received: (from geoffk@localhost) by desire.geoffk.org (8.11.6/8.11.6) id g1IKjM702963; Mon, 18 Feb 2002 12:45:22 -0800 Date: Mon, 18 Feb 2002 12:45:22 -0800 From: Geoff Keating Message-Id: <200202182045.g1IKjM702963@desire.geoffk.org> To: moshier@moshier.net CC: fxzhang@ict.ac.cn, linux-mips@oss.sgi.com, libc-alpha@sources.redhat.com In-reply-to: (message from Stephen L Moshier on Mon, 18 Feb 2002 15:23:34 -0500 (EST)) Subject: Re: math broken on mips Reply-to: Geoff Keating References: Sender: owner-linux-mips@oss.sgi.com Precedence: bulk > Date: Mon, 18 Feb 2002 15:23:34 -0500 (EST) > From: Stephen L Moshier > On Mon, 18 Feb 2002, Geoff Keating wrote: > > > ... actually, C99 seems to imply that all supported rounding > > precisions should work for the math library > > Could you point out specifically where it says that? It would have to specifically say that it doesn't, and I can't find that. For example, in s. 7.12.1 para 4, it says that HUGE_VAL is a guaranteed result only in the default rounding mode. Appendix F says, in s. F.9 para 10, "Whether the [elementary] functions honour the rounding direction mode is implementation-defined." but this doesn't allow the functions to produce invalid results, just to ignore the mode and use some other mode instead. A good math library should honour the current rounding mode, as this is what is most useful. -- - Geoffrey Keating From owner-linux-mips@oss.sgi.com Mon Feb 18 13:45:33 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g1ILjXL11368 for linux-mips-outgoing; Mon, 18 Feb 2002 13:45:33 -0800 Received: from cygnus.com (runyon.sfbay.redhat.com [205.180.230.5]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g1ILjU911342 for ; Mon, 18 Feb 2002 13:45:30 -0800 Received: from myware.mynet (fiendish.cygnus.com [205.180.231.146]) by runyon.cygnus.com (8.8.7-cygnus/8.8.7) with ESMTP id MAA19566; Mon, 18 Feb 2002 12:44:58 -0800 (PST) Received: (from drepper@localhost) by myware.mynet (8.11.6/8.11.6) id g1IKiSY29278; Mon, 18 Feb 2002 12:44:28 -0800 X-Authentication-Warning: myware.mynet: drepper set sender to drepper@redhat.com using -f To: Geoff Keating Cc: moshier@moshier.net, fxzhang@ict.ac.cn, linux-mips@oss.sgi.com, libc-alpha@sources.redhat.com Subject: Re: math broken on mips References: <200202182018.g1IKIk802891@desire.geoffk.org> Reply-To: drepper@redhat.com (Ulrich Drepper) X-fingerprint: BE 3B 21 04 BC 77 AC F0 61 92 E4 CB AC DD B9 5A X-fingerprint: e6:49:07:36:9a:0d:b7:ba:b5:e9:06:f3:e7:e7:08:4a From: Ulrich Drepper Date: 18 Feb 2002 12:44:28 -0800 In-Reply-To: <200202182018.g1IKIk802891@desire.geoffk.org> Message-ID: Lines: 16 User-Agent: Gnus/5.0808 (Gnus v5.8.8) XEmacs/21.5 (asparagus) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Sender: owner-linux-mips@oss.sgi.com Precedence: bulk Geoff Keating writes: > Maybe we should add appropriate fesetround() calls to the math > library? No, this would punish the people who do not do stupid things with rounding modes. The user must know much better where such changes are needed. As you mentioned, there is no promise of precision in the standard therefore everything is just fine as it is, standard-wise. -- ---------------. ,-. 1325 Chesapeake Terrace Ulrich Drepper \ ,-------------------' \ Sunnyvale, CA 94089 USA Red Hat `--' drepper at redhat.com `------------------------ From owner-linux-mips@oss.sgi.com Mon Feb 18 14:06:21 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g1IM6LL13034 for linux-mips-outgoing; Mon, 18 Feb 2002 14:06:21 -0800 Received: from moshier.net (moshier.ne.mediaone.net [65.96.130.103]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g1IM6J913031 for ; Mon, 18 Feb 2002 14:06:19 -0800 Received: from moshier.ne.mediaone.net (moshier.ne.mediaone.net [65.96.130.103]) by moshier.net (8.9.3/8.9.3) with ESMTP id QAA25674; Mon, 18 Feb 2002 16:06:14 -0500 Date: Mon, 18 Feb 2002 16:06:14 -0500 (EST) From: Stephen L Moshier Reply-To: moshier@moshier.net To: Geoff Keating cc: fxzhang@ict.ac.cn, , Subject: Re: math broken on mips In-Reply-To: <200202182045.g1IKjM702963@desire.geoffk.org> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-linux-mips@oss.sgi.com Precedence: bulk > Appendix F says, in s. F.9 para 10, "Whether the [elementary] > functions honour the rounding direction mode is > implementation-defined." Does the glibc documentation define it? From owner-linux-mips@oss.sgi.com Mon Feb 18 14:08:21 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g1IM8Lc13115 for linux-mips-outgoing; Mon, 18 Feb 2002 14:08:21 -0800 Received: from Cantor.suse.de (ns.suse.de [213.95.15.193]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g1IM8J913112 for ; Mon, 18 Feb 2002 14:08:19 -0800 Received: from Hermes.suse.de (Hermes.suse.de [213.95.15.136]) by Cantor.suse.de (Postfix) with ESMTP id 0AB651EA6E; Mon, 18 Feb 2002 22:08:05 +0100 (MET) X-Authentication-Warning: sykes.suse.de: schwab set sender to schwab@suse.de using -f To: Geoff Keating Cc: moshier@moshier.net, fxzhang@ict.ac.cn, linux-mips@oss.sgi.com, libc-alpha@sources.redhat.com Subject: Re: math broken on mips References: <200202182018.g1IKIk802891@desire.geoffk.org> X-Yow: I have many CHARTS and DIAGRAMS.. From: Andreas Schwab Date: Mon, 18 Feb 2002 22:07:59 +0100 In-Reply-To: <200202182018.g1IKIk802891@desire.geoffk.org> (Geoff Keating's message of "Mon, 18 Feb 2002 12:18:46 -0800") Message-ID: Lines: 14 User-Agent: Gnus/5.090005 (Oort Gnus v0.05) Emacs/21.2.50 (ia64-suse-linux) MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Sender: owner-linux-mips@oss.sgi.com Precedence: bulk Geoff Keating writes: |> ... actually, C99 seems to imply that all supported rounding |> precisions should work for the math library Only if #pragma STDC FENV_ACCESS "on" is in effect. Andreas. -- Andreas Schwab, SuSE Labs, schwab@suse.de SuSE GmbH, Deutschherrnstr. 15-19, D-90429 Nürnberg Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5 "And now for something completely different." From owner-linux-mips@oss.sgi.com Mon Feb 18 14:39:26 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g1IMdQI13613 for linux-mips-outgoing; Mon, 18 Feb 2002 14:39:26 -0800 Received: from cygnus.com (runyon.sfbay.redhat.com [205.180.230.5]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g1IMdN913610 for ; Mon, 18 Feb 2002 14:39:23 -0800 Received: from myware.mynet (fiendish.cygnus.com [205.180.231.146]) by runyon.cygnus.com (8.8.7-cygnus/8.8.7) with ESMTP id NAA25095; Mon, 18 Feb 2002 13:39:06 -0800 (PST) Received: (from drepper@localhost) by myware.mynet (8.11.6/8.11.6) id g1ILd4829506; Mon, 18 Feb 2002 13:39:04 -0800 X-Authentication-Warning: myware.mynet: drepper set sender to drepper@redhat.com using -f To: moshier@moshier.net Cc: Geoff Keating , fxzhang@ict.ac.cn, , Subject: Re: math broken on mips References: Reply-To: drepper@redhat.com (Ulrich Drepper) X-fingerprint: BE 3B 21 04 BC 77 AC F0 61 92 E4 CB AC DD B9 5A X-fingerprint: e6:49:07:36:9a:0d:b7:ba:b5:e9:06:f3:e7:e7:08:4a From: Ulrich Drepper Date: 18 Feb 2002 13:39:04 -0800 In-Reply-To: Message-ID: Lines: 14 User-Agent: Gnus/5.0808 (Gnus v5.8.8) XEmacs/21.5 (asparagus) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Sender: owner-linux-mips@oss.sgi.com Precedence: bulk Stephen L Moshier writes: > Does the glibc documentation define it? No version of any math library reliably worked with anything but round-to-nearest. Only functions which were implemented using integer operations were immune and this set varied among different platforms. It's not written down but was always said. If somebody wants to add it to the documentation s/he can write something up. -- ---------------. ,-. 1325 Chesapeake Terrace Ulrich Drepper \ ,-------------------' \ Sunnyvale, CA 94089 USA Red Hat `--' drepper at redhat.com `------------------------ From owner-linux-mips@oss.sgi.com Mon Feb 18 16:13:59 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g1J0DxN02903 for linux-mips-outgoing; Mon, 18 Feb 2002 16:13:59 -0800 Received: from smtp013.mail.yahoo.com (smtp013.mail.yahoo.com [216.136.173.57]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g1J0Dv902900 for ; Mon, 18 Feb 2002 16:13:57 -0800 Received: from g055068.ppp.asahi-net.or.jp (HELO nazneen) (211.132.55.68) by smtp.mail.vip.sc5.yahoo.com with SMTP; 18 Feb 2002 23:13:56 -0000 Message-ID: <002301c1b8d2$22a0efe0$443784d3@gol.com> From: "Girish Gulawani" To: Subject: Page Size 16KB. Date: Tue, 19 Feb 2002 08:15:18 +0900 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.4133.2400 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400 Sender: owner-linux-mips@oss.sgi.com Precedence: bulk hi, all. while in the process of changing page size of kernel to 16KB i am facing a strange problem. the kernel boots up & user command, currently statically linked shell, loads. it displays first prompt. pressing enter keys, the serial device receives the interrupts but no activity on shell's part. where could the shell possibly be stuck? this is LSI MIPS EZ4021 implementation. please please help!!! many thanks & regards, girish. _________________________________________________________ Do You Yahoo!? Get your free @yahoo.com address at http://mail.yahoo.com From owner-linux-mips@oss.sgi.com Mon Feb 18 18:34:25 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g1J2YPW04210 for linux-mips-outgoing; Mon, 18 Feb 2002 18:34:25 -0800 Received: from host099.momenco.com (IDENT:root@www.momenco.com [64.169.228.99]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g1J2YM904207 for ; Mon, 18 Feb 2002 18:34:22 -0800 Received: (from mdharm@localhost) by host099.momenco.com (8.11.6/8.11.6) id g1J1YJN15989; Mon, 18 Feb 2002 17:34:19 -0800 Date: Mon, 18 Feb 2002 17:34:19 -0800 From: Matthew Dharm To: Girish Gulawani Cc: linux-mips@oss.sgi.com Subject: Re: Page Size 16KB. Message-ID: <20020218173419.A15980@momenco.com> References: <002301c1b8d2$22a0efe0$443784d3@gol.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <002301c1b8d2$22a0efe0$443784d3@gol.com>; from girishvg@yahoo.com on Tue, Feb 19, 2002 at 08:15:18AM +0900 Organization: Momentum Computer, Inc. X-Copyright: (C) 2002 Matthew Dharm, all rights reserved. Sender: owner-linux-mips@oss.sgi.com Precedence: bulk Does your userspace shell set the CREAD flag properly? Matt On Tue, Feb 19, 2002 at 08:15:18AM +0900, Girish Gulawani wrote: > hi, all. > while in the process of changing page size of kernel to 16KB i am facing a > strange problem. the kernel boots up & user command, currently statically > linked shell, loads. it displays first prompt. pressing enter keys, the > serial device receives the interrupts but no activity on shell's part. where > could the shell possibly be stuck? > this is LSI MIPS EZ4021 implementation. please please help!!! > many thanks & regards, > girish. > > > _________________________________________________________ > Do You Yahoo!? > Get your free @yahoo.com address at http://mail.yahoo.com -- Matthew Dharm Work: mdharm@momenco.com Senior Software Designer, Momentum Computer From owner-linux-mips@oss.sgi.com Mon Feb 18 19:23:57 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g1J3NvI04850 for linux-mips-outgoing; Mon, 18 Feb 2002 19:23:57 -0800 Received: from mail.ict.ac.cn ([159.226.39.4]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g1J3Ne904847 for ; Mon, 18 Feb 2002 19:23:40 -0800 Message-Id: <200202190323.g1J3Ne904847@oss.sgi.com> Received: (qmail 29502 invoked from network); 19 Feb 2002 02:26:24 -0000 Received: from unknown (HELO foxsen) (@159.226.40.150) by 159.226.39.4 with SMTP; 19 Feb 2002 02:26:24 -0000 Date: Tue, 19 Feb 2002 10:20:37 +0800 From: Zhang Fuxin To: "linux-mips@oss.sgi.com" CC: "libc-alpha@sources.redhat.com" Subject: endless loop in remainder() on mips X-mailer: FoxMail 3.11 Release [cn] Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=====_Dragon655117627178_=====" Sender: owner-linux-mips@oss.sgi.com Precedence: bulk This is a multi-part message in MIME format. --=====_Dragon655117627178_===== Content-Type: text/plain; charset="GB2312" Content-Transfer-Encoding: 7bit hi, for this testcase,remaider() will enter an endless loop: rounding is TONEAREST x=(7fefffff,ffffffff),y=(00000000,00000001) attached is a little program to test it(gcc t-remainder.c -lm) most important part is listed here: while (l>0) { ... printf("u=(%08lx,%08lx),d=(%08lx,%08lx),w=(%08lx,%08lx)\n",u.i[1],u.i[0],tmp2.i[1],tmp2.i[0],w.i[1],w.i[0]); tmp1.x = d*w.x; tmp2.x = u.x - tmp1.x; u.x=(u.x-d*w.x)/*-d*ww.x*/; printf("d*w=(%08lx,%08lx),u.x-d*w=(%08lx,%08lx),u=(%08lx,%08lx)\n",tmp1.i[1],tmp1.i[0],tmp2.i[1],tmp2.i[0],u.i[1],u.i[0]); l=(u.i[HIGH_HALF]&0x7ff00000)-nn; } It is weird enough for me that u doesn't equal to tmp2,that is where x86 and mips differ. the output from my P4: rounding is TONEAREST x=(7fefffff,ffffffff),y=(00000000,00000001) x=(7fefffff,ffffffff),y=(04d00000,00000000) 1/y=7b100000,00000000 n=04d00000,nn=06100000,ww=(00000000,00000000),w=(04d00000,00000000),l=79d00000 u=(7fefffff,ffffffff),d=(41400000,00000000),w=(7ea00000,00000000) d*w=(7ff00000,00000000),u.x-d*w=(fff00000,00000000),u=(fca00000,00000000) <--notice this u=(fca00000,00000000),d=(c1300000,00000000),w=(7b600000,00000000) d*w=(fca00000,00000000),u.x-d*w=(00000000,00000000),u=(00000000,00000000) x=(00000000,00000000),y=(04d00000,00000000) output from mipsel: rounding is TONEAREST x=(7fefffff,ffffffff),y=(00000000,00000001) x=(7fefffff,ffffffff),y=(04d00000,00000000) 1/y=7b100000,00000000 n=04d00000,nn=06100000,ww=(00000000,00000000),w=(04d00000,00000000),l=79d00000 u=(7fefffff,ffffffff),d=(41400000,00000000),w=(7ea00000,00000000) d*w=(7ff00000,00000000),u.x-d*w=(fff00000,00000000),u=(fff00000,00000000) <--notice this u=(fff00000,00000000),d=(fff00000,00000000),w=(7eb00000,00000000) d*w=(fff00000,00000000),u.x-d*w=(7ff7ffff,ffffffff),u=(7ff7ffff,ffffffff) u=(7ff7ffff,ffffffff),d=(7ff7ffff,ffffffff),w=(7eb00000,00000000) d*w=(7ff7ffff,ffffffff),u.x-d*w=(7ff7ffff,ffffffff),u=(7ff7ffff,ffffffff) u=(7ff7ffff,ffffffff),d=(7ff7ffff,ffffffff),w=(7eb00000,00000000) d*w=(7ff7ffff,ffffffff),u.x-d*w=(7ff7ffff,ffffffff),u=(7ff7ffff,ffffffff) u=(7ff7ffff,ffffffff),d=(7ff7ffff,ffffffff),w=(7eb00000,00000000) d*w=(7ff7ffff,ffffffff),u.x-d*w=(7ff7ffff,ffffffff),u=(7ff7ffff,ffffffff) ... Thank you. Regards Zhang Fuxin fxzhang@ict.ac.cn --=====_Dragon655117627178_===== Content-Type: application/octet-stream; name="t-remainder.c" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="t-remainder.c" I2luY2x1ZGUgPHN0ZGlvLmg+CiNpbmNsdWRlIDxtYXRoLmg+CiNpbmNsdWRlIDxmZW52Lmg+CiNp bmNsdWRlIDxlbmRpYW4uaD4KCnR5cGVkZWYgaW50IGludDQ7CnR5cGVkZWYgdW5pb24ge2ludDQg aVsyXTsgZG91YmxlIHg7fSBteW51bWJlcjsKCiNkZWZpbmUgQUJTKHgpICAgKCgoeCk+MCk/KHgp Oi0oeCkpCiNkZWZpbmUgbWF4KHgseSkgICgoKHkpPih4KSk/KHkpOih4KSkKI2RlZmluZSBtaW4o eCx5KSAgKCgoeSk8KHgpKT8oeSk6KHgpKQoKI2RlZmluZSBISUdIX0hBTEYgMQojZGVmaW5lIExP V19IQUxGIDAKI2RlZmluZSBMSVRUTEVfRU5ESQoKc3RhdGljIGNvbnN0IG15bnVtYmVyIGJpZyA9 IHt7MCwgMHg0MzM4MDAwMH19LCAgLyogNjc1NTM5OTQ0MTA1NTc0NCAqLwogICAgICAgICAgICAg ICAgICAgICB0MTI4ID0ge3swLCAweDQ3ZjAwMDAwfX0sICAvKiAgMl4gMTI4ICAgICAgICAgICov CiAgICAgICAgICAgICAgICAgICAgdG0xMjggPSB7ezAsIDB4MzdmMDAwMDB9fSwgIC8qICAyXi0x MjggICAgICAgICAgKi8KICAgICAgICAgICAgICAgICAgICAgIFpFUk8gPSB7ezAsIDB9fSwgICAg ICAgICAgLyogIDAuMCAgICAgICAgICAgICAqLwogICAgICAgICAgICAgICAgICAgICBuWkVSTyA9 IHt7MCwgMHg4MDAwMDAwMH19LCAvKiAtMC4wICAgICAgICAgICAgICovCiAgICAgICAgICAgICAg ICAgICAgICAgTkFOID0ge3swLCAweDdmZjgwMDAwfX0sIC8qICBOYU4gICAgICAgICAgICAgKi8K ICAgICAgICAgICAgICAgICAgICAgIG5OQU4gPSB7ezAsIDB4ZmZmODAwMDB9fTsgLyogLU5hTiAg ICAgICAgICAgICAqLwoKZG91YmxlIHVyZW1haW5kZXIoZG91YmxlICwgZG91YmxlICk7CgovKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKiovCi8qIEFuIHVsdGltYXRlIHJlbWFpbmRlciByb3V0aW5lLiBHaXZlbiB0 d28gSUVFRSBkb3VibGUgbWFjaGluZSBudW1iZXJzIHggKi8KLyogLHkgICBpdCBjb21wdXRlcyB0 aGUgY29ycmVjdGx5IHJvdW5kZWQgKHRvIG5lYXJlc3QpIHZhbHVlIG9mIHJlbWFpbmRlciAqLwov KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKiovCmRvdWJsZSBteV9yZW1haW5kZXIoZG91YmxlIHgsIGRvdWJsZSB5 KQp7CiAgZG91YmxlIHosZCx4eDsKI2lmIDAKICBkb3VibGUgeXk7CiNlbmRpZgogIGludDQga3gs a3ksbixubixuMSxtMSxsOwojaWYgMAogIGludDQgbTsKI2VuZGlmCiAgbXludW1iZXIgdSx0LHc9 e3swLDB9fSx2PXt7MCwwfX0sd3c9e3swLDB9fSxyLHRtcDEsdG1wMjsKICB1Lng9eDsKICB0Lng9 eTsKICBreD11LmlbSElHSF9IQUxGXSYweDdmZmZmZmZmOyAvKiBubyBzaWduICBmb3IgeCovCiAg dC5pW0hJR0hfSEFMRl0mPTB4N2ZmZmZmZmY7ICAgLypubyBzaWduIGZvciB5ICovCiAga3k9dC5p W0hJR0hfSEFMRl07CiAgcHJpbnRmKCJ4PSglMDhseCwlMDhseCkseT0oJTA4bHgsJTA4bHgpXG4i LHUuaVsxXSx1LmlbMF0sdC5pWzFdLHQuaVswXSk7CiAgLyotLS0tLS0gfHh8IDwgMl4xMDI0ICBh bmQgICAyXi05NzAgPCB8eXwgPCAyXjEwMjQgLS0tLS0tLS0tLS0tLS0tLS0tKi8KICBpZiAoa3g8 MHg3ZmYwMDAwMCAmJiBreTwweDdmZjAwMDAwICYmIGt5Pj0weDAzNTAwMDAwKSB7CiAgICBpZiAo a3grMHgwMDEwMDAwMDxreSkgcmV0dXJuIHg7CiAgICBpZiAoKGt4LTB4MDE1MDAwMDApPGt5KSB7 CiAgICAgIHo9eC90Lng7CiAgICAgIHYuaVtISUdIX0hBTEZdPXQuaVtISUdIX0hBTEZdOwogICAg ICBkPSh6K2JpZy54KS1iaWcueDsKICAgICAgeHg9KHgtZCp2LngpLWQqKHQueC12LngpOwogICAg ICBpZiAoZC16IT0wLjUmJmQteiE9LTAuNSkgcmV0dXJuICh4eCE9MCk/eHg6KCh4PjApP1pFUk8u eDpuWkVSTy54KTsKICAgICAgZWxzZSB7CglpZiAoQUJTKHh4KT4wLjUqdC54KSByZXR1cm4gKHo+ ZCk/eHgtdC54Onh4K3QueDsKCWVsc2UgcmV0dXJuIHh4OwogICAgICB9CiAgICB9ICAgLyogICAg KGt4PChreSsweDAxNTAwMDAwKSkgICAgICAgICAqLwogICAgZWxzZSAgewogICAgICByLng9MS4w L3QueDsKICAgICAgcHJpbnRmKCIxL3k9JTA4bHgsJTA4bHhcbiIsci5pWzFdLHIuaVswXSk7CQog ICAgICBuPXQuaVtISUdIX0hBTEZdOwogICAgICBubj0obiYweDdmZjAwMDAwKSsweDAxNDAwMDAw OwogICAgICB3LmlbSElHSF9IQUxGXT1uOwogICAgICB3dy54PXQueC13Lng7CiAgICAgIGw9KGt4 LW5uKSYweGZmZjAwMDAwOwogICAgICBuMT13dy5pW0hJR0hfSEFMRl07CiAgICAgIG0xPXIuaVtI SUdIX0hBTEZdOwogICAgICBwcmludGYoIm49JTA4bHgsbm49JTA4bHgsd3c9KCUwOGx4LCUwOGx4 KSx3PSglMDhseCwlMDhseCksbD0lMDhseFxuIixuLG5uLHd3LmlbMV0sd3cuaVswXSx3LmlbMV0s dy5pWzBdLGwpOwkKICAgICAgd2hpbGUgKGw+MCkgewoJci5pW0hJR0hfSEFMRl09bTEtbDsKCXo9 dS54KnIueDsKICAgICAgICB0bXAxLnggPSB6OwoJdy5pW0hJR0hfSEFMRl09bitsOwoJd3cuaVtI SUdIX0hBTEZdPShuMSk/bjErbDpuMTsKCWQ9KHorYmlnLngpLWJpZy54OwogICAgICAgIHRtcDIu eCA9IGQ7CiAgICAgICAgcHJpbnRmKCJ1PSglMDhseCwlMDhseCksZD0oJTA4bHgsJTA4bHgpLHc9 KCUwOGx4LCUwOGx4KVxuIix1LmlbMV0sdS5pWzBdLHRtcDIuaVsxXSx0bXAyLmlbMF0sdy5pWzFd LHcuaVswXSk7IAogICAgICAgIHRtcDEueCA9IGQqdy54OwoJdG1wMi54ID0gdS54IC0gdG1wMS54 OyAKCS8vdG1wMS54ID0gdS54LWQqdy54OwoJLy90bXAyLnggPSB0bXAxLnggLSBkKnd3Lng7IAoJ dS54PSh1LngtZCp3LngpLyotZCp3dy54Ki87CiAgICAgICAgcHJpbnRmKCJkKnc9KCUwOGx4LCUw OGx4KSx1LngtZCp3PSglMDhseCwlMDhseCksdT0oJTA4bHgsJTA4bHgpXG4iLHRtcDEuaVsxXSx0 bXAxLmlbMF0sdG1wMi5pWzFdLHRtcDIuaVswXSx1LmlbMV0sdS5pWzBdKTsgCglsPSh1LmlbSElH SF9IQUxGXSYweDdmZjAwMDAwKS1ubjsKCS8vcHJpbnRmKCJ1PSglMDhseCwlMDhseCksej0oJTA4 bHgsJTA4bHgpLHd3PSglMDhseCwlMDhseCksZD0oJTA4bHgsJTA4bHgpLGw9JTA4bHhcbiIsdS5p WzFdLHUuaVswXSx0bXAxLmlbMV0sdG1wMS5pWzBdLHd3LmlbMV0sd3cuaVswXSx0bXAyLmlbMV0s dG1wMi5pWzBdLGwpOwogICAgICB9CiAgICAgIHIuaVtISUdIX0hBTEZdPW0xOwogICAgICB3Lmlb SElHSF9IQUxGXT1uOwogICAgICB3dy5pW0hJR0hfSEFMRl09bjE7CiAgICAgIHo9dS54KnIueDsK ICAgICAgZD0oeitiaWcueCktYmlnLng7CiAgICAgIHUueD0odS54LWQqdy54KS1kKnd3Lng7CiAg ICAgIGlmIChBQlModS54KTwwLjUqdC54KSByZXR1cm4gKHUueCE9MCk/dS54OigoeD4wKT9aRVJP Lng6blpFUk8ueCk7CiAgICAgIGVsc2UKICAgICAgICBpZiAoQUJTKHUueCk+MC41KnQueCkgcmV0 dXJuIChkPnopP3UueCt0Lng6dS54LXQueDsKICAgICAgICBlbHNlCiAgICAgICAge3o9dS54L3Qu eDsgZD0oeitiaWcueCktYmlnLng7IHJldHVybiAoKHUueC1kKncueCktZCp3dy54KTt9CiAgICB9 CgogIH0gICAvKiAgIChreDwweDdmZjAwMDAwJiZreTwweDdmZjAwMDAwJiZreT49MHgwMzUwMDAw MCkgICAgICovCiAgZWxzZSB7CiAgICBpZiAoa3g8MHg3ZmYwMDAwMCYma3k8MHg3ZmYwMDAwMCYm KGt5PjB8fHQuaVtMT1dfSEFMRl0hPTApKSB7CiAgICAgIHk9QUJTKHkpKnQxMjgueDsKICAgICAg ej1teV9yZW1haW5kZXIoeCx5KSp0MTI4Lng7CiAgICAgIHo9bXlfcmVtYWluZGVyKHoseSkqdG0x MjgueDsKICAgICAgcmV0dXJuIHo7CiAgICB9CiAgICBlbHNlIHsgLyogaWYgeCBpcyB0b28gYmln ICovCiAgICAgIGlmIChreCA9PSAweDdmZjAwMDAwICYmIHUuaVtMT1dfSEFMRl0gPT0gMCAmJiB5 ID09IDEuMCkKCXJldHVybiB4IC8geDsKICAgICAgaWYgKGt4Pj0weDdmZjAwMDAwfHwoa3k9PTAm JnQuaVtMT1dfSEFMRl09PTApfHxreT4weDdmZjAwMDAwfHwKCSAgKGt5PT0weDdmZjAwMDAwJiZ0 LmlbTE9XX0hBTEZdIT0wKSkKCXJldHVybiAodS5pW0hJR0hfSEFMRl0mMHg4MDAwMDAwMCk/bk5B Ti54Ok5BTi54OwogICAgICBlbHNlIHJldHVybiB4OwogICAgfQogIH0KfQp2b2lkIHByaW50X3Jv dW5kKCkKewoJaW50IHI7CgoJcj1mZWdldHJvdW5kKCk7CglpZiAocj09RkVfVE9ORUFSRVNUKSB7 CgkJcHJpbnRmKCJyb3VuZGluZyBpcyBUT05FQVJFU1RcbiIpOyAKCX1lbHNlIGlmIChyPT1GRV9E T1dOV0FSRCkgewoJCXByaW50Zigicm91bmRpbmcgaXMgRE9XTldBUkRcbiIpOyAKCX1lbHNlIGlm IChyPT1GRV9VUFdBUkQpIHsKCQlwcmludGYoInJvdW5kaW5nIGlzIFVQV0FSRFxuIik7IAoJfWVs c2UgewoJCXByaW50Zigicm91bmRpbmcgaXMgVE9XQVJEWkVST1xuIik7IAoJfQp9CgoJCQppbnQg bWFpbihpbnQgYXJnYyxjaGFyICoqYXJndikKewoJbXludW1iZXIgdDsKCWRvdWJsZSB0dCx4eDsK CglwcmludF9yb3VuZCgpOwoJdC5pWzFdID0gMHgwMDAwMDAwMDsKCXQuaVswXSA9IDB4MDAwMDAw MDE7Cgl0dCA9IHQueDsKCXQuaVsxXSA9IDB4N2ZlZmZmZmY7Cgl0LmlbMF0gPSAweGZmZmZmZmZm OwoJeHggPSB0Lng7Cgl4eCA9IG15X3JlbWFpbmRlcih4eCx0dCk7CgoJcmV0dXJuIDA7Cn0K --=====_Dragon655117627178_=====-- From owner-linux-mips@oss.sgi.com Tue Feb 19 03:47:21 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g1JBlLE13877 for linux-mips-outgoing; Tue, 19 Feb 2002 03:47:21 -0800 Received: from coplin19.mips.com ([80.63.7.130]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g1JBl8913870 for ; Tue, 19 Feb 2002 03:47:08 -0800 Received: from localhost (kjelde@localhost) by coplin19.mips.com (8.11.6/8.11.6) with ESMTP id g1JAkSj26763; Tue, 19 Feb 2002 11:46:28 +0100 X-Authentication-Warning: coplin19.mips.com: kjelde owned process doing -bs Date: Tue, 19 Feb 2002 11:46:28 +0100 (CET) From: Kjeld Borch Egevang To: Zhang Fuxin cc: "linux-mips@oss.sgi.com" , "libc-alpha@sources.redhat.com" Subject: Re: endless loop in remainder() on mips In-Reply-To: <200202190323.g1J3Ne904847@oss.sgi.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-linux-mips@oss.sgi.com Precedence: bulk On Tue, 19 Feb 2002, Zhang Fuxin wrote: ... > It is weird enough for me that u doesn't equal to tmp2,that is where x86 and mips differ. > > the output from my P4: > rounding is TONEAREST > x=(7fefffff,ffffffff),y=(00000000,00000001) > x=(7fefffff,ffffffff),y=(04d00000,00000000) > 1/y=7b100000,00000000 > n=04d00000,nn=06100000,ww=(00000000,00000000),w=(04d00000,00000000),l=79d00000 > u=(7fefffff,ffffffff),d=(41400000,00000000),w=(7ea00000,00000000) > d*w=(7ff00000,00000000),u.x-d*w=(fff00000,00000000),u=(fca00000,00000000) <--notice this > u=(fca00000,00000000),d=(c1300000,00000000),w=(7b600000,00000000) > d*w=(fca00000,00000000),u.x-d*w=(00000000,00000000),u=(00000000,00000000) > x=(00000000,00000000),y=(04d00000,00000000) > > output from mipsel: > rounding is TONEAREST > x=(7fefffff,ffffffff),y=(00000000,00000001) > x=(7fefffff,ffffffff),y=(04d00000,00000000) > 1/y=7b100000,00000000 > n=04d00000,nn=06100000,ww=(00000000,00000000),w=(04d00000,00000000),l=79d00000 > u=(7fefffff,ffffffff),d=(41400000,00000000),w=(7ea00000,00000000) > d*w=(7ff00000,00000000),u.x-d*w=(fff00000,00000000),u=(fff00000,00000000) <--notice this > u=(fff00000,00000000),d=(fff00000,00000000),w=(7eb00000,00000000) > d*w=(fff00000,00000000),u.x-d*w=(7ff7ffff,ffffffff),u=(7ff7ffff,ffffffff) > u=(7ff7ffff,ffffffff),d=(7ff7ffff,ffffffff),w=(7eb00000,00000000) > d*w=(7ff7ffff,ffffffff),u.x-d*w=(7ff7ffff,ffffffff),u=(7ff7ffff,ffffffff) > u=(7ff7ffff,ffffffff),d=(7ff7ffff,ffffffff),w=(7eb00000,00000000) > d*w=(7ff7ffff,ffffffff),u.x-d*w=(7ff7ffff,ffffffff),u=(7ff7ffff,ffffffff) > u=(7ff7ffff,ffffffff),d=(7ff7ffff,ffffffff),w=(7eb00000,00000000) > d*w=(7ff7ffff,ffffffff),u.x-d*w=(7ff7ffff,ffffffff),u=(7ff7ffff,ffffffff) You're right. Not a bug. Internally your P4 uses more than 64 bits in its calculations. Here's my test and output from my AMD, Sun and MIPS: typedef union number_s { long long ll; double d; } t_number; #define P(x) printf(#x "=%e %016llx\n", x.d, x.ll) int main() { t_number u, d, w, t, r; u.ll = 0x7fefffffffffffff; d.ll = 0x4140000000000000; w.ll = 0x7ea0000000000000; t.d = d.d * w.d; t.d = u.d - t.d; r.d = (u.d - d.d * w.d); P(u); P(d); P(w); P(r); P(t); } AMD: u=1.797693e+308 7fefffffffffffff d=2.097152e+06 4140000000000000 w=8.572069e+301 7ea0000000000000 r=-1.995840e+292 fca0000000000000 t=-inf fff0000000000000 Sun: u=1.797693e+308 7fefffffffffffff d=2.097152e+06 4140000000000000 w=8.572069e+301 7ea0000000000000 r=-Inf fff0000000000000 t=-Inf fff0000000000000 MIPS: u=1.797693e+308 7fefffffffffffff d=2.097152e+06 4140000000000000 w=8.572069e+301 7ea0000000000000 r=-inf fff0000000000000 t=-inf fff0000000000000 /Kjeld -- _ _ ____ ___ Mailto:kjelde@mips.com |\ /|||___)(___ MIPS Denmark Direct: +45 44 86 55 85 | \/ ||| ____) Lautrupvang 4 B Switch: +45 44 86 55 55 TECHNOLOGIES DK-2750 Ballerup Fax...: +45 44 86 55 56 Denmark http://www.mips.com/ From owner-linux-mips@oss.sgi.com Tue Feb 19 04:22:05 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g1JCM5Y14855 for linux-mips-outgoing; Tue, 19 Feb 2002 04:22:05 -0800 Received: from dea.linux-mips.net (a1as02-p137.stg.tli.de [195.252.185.137]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g1JCLi914852 for ; Tue, 19 Feb 2002 04:21:47 -0800 Received: (from ralf@localhost) by dea.linux-mips.net (8.11.6/8.11.1) id g1JBLcc27213 for linux-mips@oss.sgi.com; Tue, 19 Feb 2002 12:21:38 +0100 Received: from desire.geoffk.org (12-234-190-114.client.attbi.com [12.234.190.114]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g1ILIp910604 for ; Mon, 18 Feb 2002 13:18:51 -0800 Received: (from geoffk@localhost) by desire.geoffk.org (8.11.6/8.11.6) id g1IKIk802891; Mon, 18 Feb 2002 12:18:46 -0800 Date: Mon, 18 Feb 2002 12:18:46 -0800 From: Geoff Keating Message-Id: <200202182018.g1IKIk802891@desire.geoffk.org> To: moshier@moshier.net CC: fxzhang@ict.ac.cn, linux-mips@oss.sgi.com, libc-alpha@sources.redhat.com In-reply-to: (message from Stephen L Moshier on Mon, 18 Feb 2002 14:50:30 -0500 (EST)) Subject: Re: math broken on mips Reply-to: Geoff Keating References: Sender: owner-linux-mips@oss.sgi.com Precedence: bulk > Mailing-List: contact libc-alpha-help@sources.redhat.com; run by ezmlm > List-Unsubscribe: > List-Subscribe: > List-Archive: > List-Post: > List-Help: , > Date: Mon, 18 Feb 2002 14:50:30 -0500 (EST) > From: Stephen L Moshier > Reply-To: moshier@moshier.net > cc: linux-mips@oss.sgi.com, > > > > pow(2,7) = 128.0 when rounding = TONEAREST or UPWARD > > = 64.1547.. when rounding = DOWNWARD or TOWARDZERO > > The libm functions from IBM that were recently installed in glibc come > with this remark in sysdeps/ieee754/dbl-64/MathLib.h: > > /* Assumption: Machine arithmetic operations are performed in */ > /* round nearest mode of IEEE 754 standard. */ > > These math functions use a doubled-precision Dekker arithmetic which is > very sensitive to rounding rules and arithetic flaws. Fixing the > routines to give reasonable answers with other rounding modes would not > be practical. > > It is customary for a system math library to expect default environment > conditions, and I do not think this design actually violates any > standards. If you want to use non-default arithmetic settings and have > them work portably on various systems, you will have to take defensive steps > to protect your program from damage by the operating system and the system > library. ... actually, C99 seems to imply that all supported rounding precisions should work for the math library, although of course C99 doesn't promise very much about accuracy of the math library in the first place. Maybe we should add appropriate fesetround() calls to the math library? Usually most of each routine should be done with round-to-nearest and then there's one or two operations at the end that should be in the user's rounding mode, to get the correctly-rounded value for the user's rounding mode. -- - Geoffrey Keating From owner-linux-mips@oss.sgi.com Tue Feb 19 04:24:44 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g1JCOi814931 for linux-mips-outgoing; Tue, 19 Feb 2002 04:24:44 -0800 Received: from mail.ict.ac.cn ([159.226.39.4]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g1JCOV914928 for ; Tue, 19 Feb 2002 04:24:32 -0800 Message-Id: <200202191224.g1JCOV914928@oss.sgi.com> Received: (qmail 12663 invoked from network); 19 Feb 2002 11:27:21 -0000 Received: from unknown (HELO foxsen) (@159.226.40.150) by 159.226.39.4 with SMTP; 19 Feb 2002 11:27:21 -0000 Date: Tue, 19 Feb 2002 19:21:57 +0800 From: Zhang Fuxin To: Kjeld Borch Egevang CC: "linux-mips@oss.sgi.com" , "libc-alpha@sources.redhat.com" Subject: Re: Re: endless loop in remainder() on mips X-mailer: FoxMail 3.11 Release [cn] Mime-Version: 1.0 Content-Type: text/plain; charset="GB2312" Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by oss.sgi.com id g1JCOW914929 Sender: owner-linux-mips@oss.sgi.com Precedence: bulk ÔÚ 2002-02-19 11:46:00 you wrote£º >.... >> It is weird enough for me that u doesn't equal to tmp2,that is where x86 and mips differ. >> >> the output from my P4: >> rounding is TONEAREST >> x=(7fefffff,ffffffff),y=(00000000,00000001) >> x=(7fefffff,ffffffff),y=(04d00000,00000000) >> 1/y=7b100000,00000000 >> n=04d00000,nn=06100000,ww=(00000000,00000000),w=(04d00000,00000000),l=79d00000 >> u=(7fefffff,ffffffff),d=(41400000,00000000),w=(7ea00000,00000000) >> d*w=(7ff00000,00000000),u.x-d*w=(fff00000,00000000),u=(fca00000,00000000) <--notice this >> u=(fca00000,00000000),d=(c1300000,00000000),w=(7b600000,00000000) >> d*w=(fca00000,00000000),u.x-d*w=(00000000,00000000),u=(00000000,00000000) >> x=(00000000,00000000),y=(04d00000,00000000) >> >> output from mipsel: >> rounding is TONEAREST >> x=(7fefffff,ffffffff),y=(00000000,00000001) >> x=(7fefffff,ffffffff),y=(04d00000,00000000) >> 1/y=7b100000,00000000 >> n=04d00000,nn=06100000,ww=(00000000,00000000),w=(04d00000,00000000),l=79d00000 >> u=(7fefffff,ffffffff),d=(41400000,00000000),w=(7ea00000,00000000) >> d*w=(7ff00000,00000000),u.x-d*w=(fff00000,00000000),u=(fff00000,00000000) <--notice this >> u=(fff00000,00000000),d=(fff00000,00000000),w=(7eb00000,00000000) >> d*w=(fff00000,00000000),u.x-d*w=(7ff7ffff,ffffffff),u=(7ff7ffff,ffffffff) >> u=(7ff7ffff,ffffffff),d=(7ff7ffff,ffffffff),w=(7eb00000,00000000) >> d*w=(7ff7ffff,ffffffff),u.x-d*w=(7ff7ffff,ffffffff),u=(7ff7ffff,ffffffff) >> u=(7ff7ffff,ffffffff),d=(7ff7ffff,ffffffff),w=(7eb00000,00000000) >> d*w=(7ff7ffff,ffffffff),u.x-d*w=(7ff7ffff,ffffffff),u=(7ff7ffff,ffffffff) >> u=(7ff7ffff,ffffffff),d=(7ff7ffff,ffffffff),w=(7eb00000,00000000) >> d*w=(7ff7ffff,ffffffff),u.x-d*w=(7ff7ffff,ffffffff),u=(7ff7ffff,ffffffff) > >You're right. Not a bug. Internally your P4 uses more than 64 bits in its Then libm needs a fix. I see,Thank you. >calculations. Here's my test and output from my AMD, Sun and MIPS: > >typedef union number_s { > long long ll; > double d; >} t_number; > >#define P(x) printf(#x "=%e %016llx\n", x.d, x.ll) > >int main() >{ > t_number u, d, w, t, r; > > u.ll = 0x7fefffffffffffff; > d.ll = 0x4140000000000000; > w.ll = 0x7ea0000000000000; > t.d = d.d * w.d; > t.d = u.d - t.d; > r.d = (u.d - d.d * w.d); > P(u); > P(d); > P(w); > P(r); > P(t); >} > >AMD: >u=1.797693e+308 7fefffffffffffff >d=2.097152e+06 4140000000000000 >w=8.572069e+301 7ea0000000000000 >r=-1.995840e+292 fca0000000000000 >t=-inf fff0000000000000 > >Sun: >u=1.797693e+308 7fefffffffffffff >d=2.097152e+06 4140000000000000 >w=8.572069e+301 7ea0000000000000 >r=-Inf fff0000000000000 >t=-Inf fff0000000000000 > >MIPS: >u=1.797693e+308 7fefffffffffffff >d=2.097152e+06 4140000000000000 >w=8.572069e+301 7ea0000000000000 >r=-inf fff0000000000000 >t=-inf fff0000000000000 > > >/Kjeld > >-- >_ _ ____ ___ Mailto:kjelde@mips.com >|\ /|||___)(___ MIPS Denmark Direct: +45 44 86 55 85 >| \/ ||| ____) Lautrupvang 4 B Switch: +45 44 86 55 55 > TECHNOLOGIES DK-2750 Ballerup Fax...: +45 44 86 55 56 > Denmark http://www.mips.com/ Regards Zhang Fuxin fxzhang@ict.ac.cn From owner-linux-mips@oss.sgi.com Tue Feb 19 06:19:15 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g1JEJFU16413 for linux-mips-outgoing; Tue, 19 Feb 2002 06:19:15 -0800 Received: from smtp010.mail.yahoo.com (smtp010.mail.yahoo.com [216.136.173.30]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g1JEJ9916410 for ; Tue, 19 Feb 2002 06:19:09 -0800 Received: from e145033.ppp.asahi-net.or.jp (HELO nazneen) (211.13.145.33) by smtp.mail.vip.sc5.yahoo.com with SMTP; 19 Feb 2002 13:19:08 -0000 Message-ID: <004101c1b948$32f9cc60$21910dd3@gol.com> From: "Girish Gulawani" To: References: <002301c1b8d2$22a0efe0$443784d3@gol.com> <20020218173419.A15980@momenco.com> Subject: Re: Page Size 16KB. Date: Tue, 19 Feb 2002 22:20:26 +0900 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.4133.2400 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400 Sender: owner-linux-mips@oss.sgi.com Precedence: bulk > Does your userspace shell set the CREAD flag properly? i think so. and btw, my kernel version is 2.4.9. i thought this CREAD problem isnt there in this version. but shall check again. thanks for this info. other than this where else could be the problem that i'm overlooking?? > Matt > > On Tue, Feb 19, 2002 at 08:15:18AM +0900, Girish Gulawani wrote: > > hi, all. > > while in the process of changing page size of kernel to 16KB i am facing a > > strange problem. the kernel boots up & user command, currently statically > > linked shell, loads. it displays first prompt. pressing enter keys, the > > serial device receives the interrupts but no activity on shell's part. where > > could the shell possibly be stuck? > > this is LSI MIPS EZ4021 implementation. please please help!!! > > many thanks & regards, > > girish. > > > > > > _________________________________________________________ > > Do You Yahoo!? > > Get your free @yahoo.com address at http://mail.yahoo.com > > -- > Matthew Dharm Work: mdharm@momenco.com > Senior Software Designer, Momentum Computer _________________________________________________________ Do You Yahoo!? Get your free @yahoo.com address at http://mail.yahoo.com From owner-linux-mips@oss.sgi.com Tue Feb 19 08:28:04 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g1JGS4318548 for linux-mips-outgoing; Tue, 19 Feb 2002 08:28:04 -0800 Received: from moshier.net (moshier.ne.mediaone.net [65.96.130.103]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g1JGS2918545 for ; Tue, 19 Feb 2002 08:28:02 -0800 Received: from moshier.ne.mediaone.net (moshier.ne.mediaone.net [65.96.130.103]) by moshier.net (8.9.3/8.9.3) with ESMTP id KAA26179; Tue, 19 Feb 2002 10:27:52 -0500 Date: Tue, 19 Feb 2002 10:27:52 -0500 (EST) From: Stephen L Moshier Reply-To: steve@moshier.net To: Zhang Fuxin cc: linux-mips@oss.sgi.com, Subject: Re: endless loop in remainder() on mips Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-linux-mips@oss.sgi.com Precedence: bulk > t-remainder.c This code does not look like the current version of sysdeps/ieee754/dbl-64/e_remainder.c IBM fixed the bug, and I thought there was acknowledgment here that the fix worked on a MIPS. The change was installed December 5, 2001 and it seems to be in glibc-2.2.5. From owner-linux-mips@oss.sgi.com Tue Feb 19 15:05:53 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g1JN5r628484 for linux-mips-outgoing; Tue, 19 Feb 2002 15:05:53 -0800 Received: from orion.mvista.com (gateway-1237.mvista.com [12.44.186.158]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g1JN5l928481; Tue, 19 Feb 2002 15:05:47 -0800 Received: (from jsun@localhost) by orion.mvista.com (8.9.3/8.9.3) id OAA25810; Tue, 19 Feb 2002 14:05:14 -0800 Date: Tue, 19 Feb 2002 14:05:14 -0800 From: Jun Sun To: "Kevin D. Kissell" Cc: Ralf Baechle , linux-mips@oss.sgi.com Subject: Re: FPU emulator unsafe for SMP? Message-ID: <20020219140514.C25739@mvista.com> References: <3C6C6ACF.CAD2FFC@mvista.com> <20020215031118.B21011@dea.linux-mips.net> <20020214232030.A3601@mvista.com> <20020215003037.A3670@mvista.com> <002b01c1b607$6afbd5c0$10eca8c0@grendel> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <002b01c1b607$6afbd5c0$10eca8c0@grendel>; from kevink@mips.com on Fri, Feb 15, 2002 at 10:59:09AM +0100 Sender: owner-linux-mips@oss.sgi.com Precedence: bulk On Fri, Feb 15, 2002 at 10:59:09AM +0100, Kevin D. Kissell wrote: > > > > > I have been chasing a FPU register corruption problem on a SMP box. The > > > > > curruption seems to be caused by FPU emulator code. Is that code SMP safe? > > > > > If not, what are the volunerable spots? > > > > > > > > In theory the fp emulation code should be MP safe as the full emulation > > > > is only accessing it's context in the fp register set of struct > > > > task_struct. The 32-bit kernel's fp register switching is entirely broken > > > > (read: close to non-existant). Lots of brownie points for somebody to > > > > backport that from the 64-bit kernel to the 32-bit kernel and forward > > > > port all the FPU emu bits to the 64-bit kernel ... > > > > > > > > > > Brownie sounds good. :-) So what is the "fp register switching" you are > > > referring to? There is set of code related to lazy fpu context switch, > > > which seems to be working fine now. > > > > > > > Hmm, I see. The lazy fpu context switch code is not SMP safe. > > I see fishy things like "last_task_used_math" etc... > > What, you mean "last_task_used_math" isn't allocated in a > processor-specific page of kseg3??? ;-) > You must be talking about another OS, right? :-) I don't think Linux has processor-specific page, although this sounds like a good idea to explore. Jun From owner-linux-mips@oss.sgi.com Tue Feb 19 15:08:36 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g1JN8ah28560 for linux-mips-outgoing; Tue, 19 Feb 2002 15:08:36 -0800 Received: from sgi.com (sgi-too.SGI.COM [204.94.211.39]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g1JN8V928557; Tue, 19 Feb 2002 15:08:31 -0800 Received: from orion.mvista.com (gateway-1237.mvista.com [12.44.186.158]) by sgi.com (980327.SGI.8.8.8-aspam/980304.SGI-aspam: SGI does not authorize the use of its proprietary systems or networks for unsolicited or bulk email from the Internet.) via ESMTP id OAA03364; Tue, 19 Feb 2002 14:08:29 -0800 (PST) mail_from (jsun@orion.mvista.com) Received: (from jsun@localhost) by orion.mvista.com (8.9.3/8.9.3) id OAA25805; Tue, 19 Feb 2002 14:02:57 -0800 Date: Tue, 19 Feb 2002 14:02:57 -0800 From: Jun Sun To: Ralf Baechle Cc: "Kevin D. Kissell" , carstenl@mips.com, linux-mips@oss.sgi.com Subject: Re: FPU emulator unsafe for SMP? Message-ID: <20020219140257.B25739@mvista.com> References: <3C6C6ACF.CAD2FFC@mvista.com> <006d01c1b606$21929c80$0deca8c0@Ulysses> <20020215115711.A26798@dea.linux-mips.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <20020215115711.A26798@dea.linux-mips.net>; from ralf@oss.sgi.com on Fri, Feb 15, 2002 at 11:57:11AM +0100 Sender: owner-linux-mips@oss.sgi.com Precedence: bulk On Fri, Feb 15, 2002 at 11:57:11AM +0100, Ralf Baechle wrote: > On Fri, Feb 15, 2002 at 09:14:52AM +0100, Kevin D. Kissell wrote: > > > I submitted a series of patches a year or so ago, the > > last of which really should have been a comprehensive > > fix to the FPU context switch and signal problems. > > The last time I looked, that patch had never made it into > > the OSS repository, but neither had anyone reported > > any holes in it. > > I was actually beliving that the bundle of patches I received from > Carsten maybe 3 months ago did fix all the issues? > False alarm - I did some tests and kgdb trace, and confirmed that the the current FPU code indeed solved all the fpu/signal problems that I know of. Good to know we can actually make things work! Jun From owner-linux-mips@oss.sgi.com Tue Feb 19 15:19:39 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g1JNJd228798 for linux-mips-outgoing; Tue, 19 Feb 2002 15:19:39 -0800 Received: from dea.linux-mips.net (a1as20-p228.stg.tli.de [195.252.194.228]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g1JNJa928795 for ; Tue, 19 Feb 2002 15:19:37 -0800 Received: (from ralf@localhost) by dea.linux-mips.net (8.11.6/8.11.1) id g1JMJLA06767; Tue, 19 Feb 2002 23:19:21 +0100 Date: Tue, 19 Feb 2002 23:19:21 +0100 From: Ralf Baechle To: Jun Sun Cc: "Kevin D. Kissell" , linux-mips@oss.sgi.com Subject: Re: FPU emulator unsafe for SMP? Message-ID: <20020219231921.B5886@dea.linux-mips.net> References: <3C6C6ACF.CAD2FFC@mvista.com> <20020215031118.B21011@dea.linux-mips.net> <20020214232030.A3601@mvista.com> <20020215003037.A3670@mvista.com> <002b01c1b607$6afbd5c0$10eca8c0@grendel> <20020219140514.C25739@mvista.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <20020219140514.C25739@mvista.com>; from jsun@mvista.com on Tue, Feb 19, 2002 at 02:05:14PM -0800 X-Accept-Language: de,en,fr Sender: owner-linux-mips@oss.sgi.com Precedence: bulk On Tue, Feb 19, 2002 at 02:05:14PM -0800, Jun Sun wrote: > You must be talking about another OS, right? :-) I don't think > Linux has processor-specific page, although this sounds like > a good idea to explore. Patches for 2.5 have been posted to l-k very recently. Ralf From owner-linux-mips@oss.sgi.com Tue Feb 19 15:41:45 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g1JNfjg29006 for linux-mips-outgoing; Tue, 19 Feb 2002 15:41:45 -0800 Received: from ns1.ltc.com (vsat-148-63-243-254.c3.sb4.mrt.starband.net [148.63.243.254]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g1JNfS929000; Tue, 19 Feb 2002 15:41:29 -0800 Received: from dev1 (unknown [10.1.1.85]) by ns1.ltc.com (Postfix) with ESMTP id BD69A590A9; Tue, 19 Feb 2002 17:30:58 -0500 (EST) Received: from brad by dev1 with local (Exim 3.33 #1 (Debian)) id 16dIos-0000W8-00; Tue, 19 Feb 2002 17:33:06 -0500 Date: Tue, 19 Feb 2002 17:33:02 -0500 To: ralf@oss.sgi.com Cc: linux-mips@oss.sgi.com Subject: [PATCH] remove die/die_if_kernel __FUNCTION__ cat for gcc 3.x's sake Message-ID: <20020219173302.A1989@dev1.ltc.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.3.20i From: "Bradley D. LaRonde " Sender: owner-linux-mips@oss.sgi.com Precedence: bulk diff -urNbB --exclude-from=diff-linux-exclude linux-oss-2.4-2002-01-20/include/asm-mips/system.h linux-encore-2.4.17-2/include/asm-mips/system.h --- linux-oss-2.4-2002-01-20/include/asm-mips/system.h Sun Dec 16 04:34:16 2001 +++ linux-encore-2.4.17-2/include/asm-mips/system.h Tue Feb 19 17:05:36 2002 @@ -276,14 +276,14 @@ extern void *set_except_vector(int n, void *addr); -extern void __die(const char *, struct pt_regs *, const char *where, - unsigned long line) __attribute__((noreturn)); -extern void __die_if_kernel(const char *, struct pt_regs *, const char *where, - unsigned long line); +extern void __die(const char *, struct pt_regs *, const char *file, + const char *function, unsigned long line) __attribute__((noreturn)); +extern void __die_if_kernel(const char *, struct pt_regs *, const char *file, + const char *function, unsigned long line); #define die(msg, regs) \ - __die(msg, regs, __FILE__ ":"__FUNCTION__, __LINE__) + __die(msg, regs, __FILE__, __FUNCTION__, __LINE__) #define die_if_kernel(msg, regs) \ - __die_if_kernel(msg, regs, __FILE__ ":"__FUNCTION__, __LINE__) + __die_if_kernel(msg, regs, __FILE__, __FUNCTION__, __LINE__) #endif /* _ASM_SYSTEM_H */ diff -urNbB --exclude-from=diff-linux-exclude linux-oss-2.4-2002-01-20/arch/mips/kernel/traps.c linux-encore-2.4.17-2/arch/mips/kernel/traps.c --- linux-oss-2.4-2002-01-20/arch/mips/kernel/traps.c Sun Jan 20 17:06:08 2002 +++ linux-encore-2.4.17-2/arch/mips/kernel/traps.c Tue Feb 19 17:20:25 2002 @@ -327,25 +327,25 @@ static spinlock_t die_lock = SPIN_LOCK_UNLOCKED; -void __die(const char * str, struct pt_regs * regs, const char *where, - unsigned long line) +void __die(const char * str, struct pt_regs * regs, const char *file, + const char *function, unsigned long line) { console_verbose(); spin_lock_irq(&die_lock); printk("%s", str); - if (where) - printk(" in %s, line %ld", where, line); + if (file && function) + printk(" in %s:%s, line %ld", file, function, line); printk(":\n"); show_registers(regs); spin_unlock_irq(&die_lock); do_exit(SIGSEGV); } -void __die_if_kernel(const char * str, struct pt_regs * regs, const char *where, - unsigned long line) +void __die_if_kernel(const char * str, struct pt_regs * regs, const char *file, + const char* function, unsigned long line) { if (!user_mode(regs)) - __die(str, regs, where, line); + __die(str, regs, file, function, line); } extern const struct exception_table_entry __start___dbe_table[]; From owner-linux-mips@oss.sgi.com Tue Feb 19 17:05:05 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g1K155N32479 for linux-mips-outgoing; Tue, 19 Feb 2002 17:05:05 -0800 Received: from mx.mips.com (mx.mips.com [206.31.31.226]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g1K14w932473 for ; Tue, 19 Feb 2002 17:04:58 -0800 Received: from newman.mips.com (ns-dmz [206.31.31.225]) by mx.mips.com (8.9.3/8.9.0) with ESMTP id QAA05743; Tue, 19 Feb 2002 16:04:50 -0800 (PST) Received: from grendel (grendel [192.168.236.16]) by newman.mips.com (8.9.3/8.9.0) with SMTP id QAA02722; Tue, 19 Feb 2002 16:04:49 -0800 (PST) Message-ID: <00af01c1b9a2$c0d6d5f0$10eca8c0@grendel> From: "Kevin D. Kissell" To: "Jun Sun" Cc: References: <3C6C6ACF.CAD2FFC@mvista.com> <20020215031118.B21011@dea.linux-mips.net> <20020214232030.A3601@mvista.com> <20020215003037.A3670@mvista.com> <002b01c1b607$6afbd5c0$10eca8c0@grendel> <20020219140514.C25739@mvista.com> Subject: Re: FPU emulator unsafe for SMP? Date: Wed, 20 Feb 2002 01:08:30 +0100 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.4807.1700 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4807.1700 Sender: owner-linux-mips@oss.sgi.com Precedence: bulk > > > Hmm, I see. The lazy fpu context switch code is not SMP safe. > > > I see fishy things like "last_task_used_math" etc... > > > > What, you mean "last_task_used_math" isn't allocated in a > > processor-specific page of kseg3??? ;-) > > You must be talking about another OS, right? :-) I don't think > Linux has processor-specific page, although this sounds like > a good idea to explore. It's gotta be done. I mean, the last I heard (which was a long time ago) mips64 Linux was keeping the CPU node number in a watchpoint register (or something equally unwholesome) and using that value as an index into tables. Sticking all the per-CPU state in a kseg3 VM page which is allocated and locked at boot time would be much cleaner and on the average probably quite a bit faster (definitely faster in the kernel but to be fair one has to factor in the increase in TLB pressure from the locked entry). But getting back to the original topic, there's another fun bug waiting for us in MIPS/Linux SMP floating point that can't be fixed as easly with VM slight-of-hand. Consider processes "A" and "B", where A uses FP and B does not: A gets scheduled on CPU 1, runs for a while, gets preempted, and B gets CPU 1. CPU 2 gets freed, so A gets scheduled on CPU 2. Unfortunately, A's FP state is still in the FP register set of CPU 1. The lazy FPU context switch either needs to be turned off (bleah!) or be fixed for SMP to handle the case where the "owner" of the FPR's on one CPU gets scheduled on another. The brute force would be somehow to send an interrupt to the CPU with the FP state that will cause it to cough it up into the thread context area. One alternative would be to give strict CPU affinity to the thread that has it's FP state on a particular CPU. That could complicate load balancing, but might not really be too bad. At most one thread per CPU will be non-migratable at a given point in time. In the above scenario, "A" could never migrate off of CPU 1, but "B" could, and would presumably be picked up by an idle CPU 2 as soon as it's time slice is up on CPU 1. That will be less efficient than doing an "FPU shootdown" in some cases, but it should also be more portable and easier to get right. Does this come up in x86-land? The FPU state is much smaller there, so lazy context switching is presumably less important. Kevin K. From owner-linux-mips@oss.sgi.com Tue Feb 19 17:49:42 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g1K1ngF00776 for linux-mips-outgoing; Tue, 19 Feb 2002 17:49:42 -0800 Received: from mail.ict.ac.cn ([159.226.39.4]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g1K1nT900770 for ; Tue, 19 Feb 2002 17:49:29 -0800 Message-Id: <200202200149.g1K1nT900770@oss.sgi.com> Received: (qmail 31397 invoked from network); 20 Feb 2002 00:52:16 -0000 Received: from unknown (HELO foxsen) (@159.226.40.150) by 159.226.39.4 with SMTP; 20 Feb 2002 00:52:16 -0000 Date: Wed, 20 Feb 2002 8:46:40 +0800 From: Zhang Fuxin To: Hartvig Ekner CC: "linux-mips@oss.sgi.com" Subject: Re: Re: Re: math broken on mips X-mailer: FoxMail 3.11 Release [cn] Mime-Version: 1.0 Content-Type: text/plain; charset="GB2312" Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by oss.sgi.com id g1K1nT900771 Sender: owner-linux-mips@oss.sgi.com Precedence: bulk hi, a quick example: main() { float t,zero=0.0; t = 0.0/0.0; printf("t=%08lx\n",*(unsigned long*)&t); (0x7fc00000) t = zero/zero; printf("t=%08lx\n",*(unsigned long*)&t); (0x7fbfffff) } you should see different output,because the first one is optimized by gcc to a QNaN,but it's signalling for MIPS. ÔÚ 2002-02-19 16:37:00 you wrote£º >Hello Zhang, > >I am going to test your reported bugs on the current SDE compiler. > >Do you have some test example for the first problem (Nan handling)? >If you have found it in the sources, and that source is actually being >used by the MIPS compiler generated, it must be possible to provide >a small example showing wrong behaviour from the compiler? > >/Hartvig > > >Zhang Fuxin writes: >> >> hi, >> I find that you are asking only gcc related parts,that is related less, >> here they are(from posts on linux-mips,i cc them to the list in case it is >> useful,sorry if it brings you inconvenience): >> >> 1.about NaN handling >> -----------------begin of the first problem-------------------------------- >> I am sorry but it seems i can't fix this without ugly changes. >> since i am not familiar with gcc code, i decide to leave it to you, >> but provide some information instead. >> >> In gcc there are 3 spaces where the NaN handling is assumed the >> Intel way. >> >> 1. gcc/real.c (the most important one) >> here the author seems to have known the NaN pattern problem,so >> he leaves a interface macro for defining non intel NaN patterns: >> (comment of function "make_nan()",at about line 6219) >> >> /* Output a binary NaN bit pattern in the target machine's format. */ >> >> /* If special NaN bit patterns are required, define them in tm.h >> as arrays of unsigned 16-bit shorts. Otherwise, use the default >> patterns here. */ >> >> I have read through this file and decided that the follow defined should >> be enough for mips: >> >> /* NaN pattern,mips QNAN & SNAN is different from intel's >> * DFMODE_NAN and SFMODE_NAN is used in real.c */ >> #define DFMODE_NAN \ >> unsigned short DFbignan[4] = {0x7ff7, 0xffff, 0xffff, 0xffff}; \ >> unsigned short DFlittlenan[4] = {0xffff, 0xffff, 0xffff, 0xfff7} >> #define SFMODE_NAN \ >> unsigned short SFbignan[2] = {0x7fbf, 0xffff}; \ >> unsigned short SFlittlenan[2] = {0xffff, 0xffbf} >> >> But the problem is where to put them:(. Obviously it is target specified >> definitions and should be in config/mips/. Documents say tm.h is a symbol >> link and included in config.h,but it is no long true.If i add them to xm-mips.h >> then for native compilation it is ok but it fails for cross-compile. >> >> 2.gcc/reg-stack.c (H.J. tell me it is not used on mips) >> There is a hardcoded QNaN used around line 477: >> nan = gen_lowpart (SFmode, GEN_INT (0x7fc00000)); >> I sugest defining a macro QNAN_HAS_1ST_FRACBIT_CLEARED for mips and change >> it to,just don't know where to put it: >> #ifndef QNAN_HAS_1ST_FRACBIT_CLEARED >> nan = gen_lowpart (SFmode, GEN_INT (0x7fc00000)); >> #else >> nan = gen_lowpart (SFmode, GEN_INT (0x7fbfffff)); >> #endif >> >> 3. config/fp-bit.c (H.J. said it is not mean to target specified) >> this is for machine having no fpu hardware. >> again i susgest define QNAN_HAS_1ST_FRACBIT_CLEARED and then apply this patch: >> >> 190d189 >> < #ifndef QNAN_HAS_1ST_FRACBIT_CLEARED >> 192,195d190 >> < #else >> < fraction &= ~QUIET_NAN; >> < #endif >> < >> 379,380d373 >> < >> < #ifndef QNAN_HAS_1ST_FRACBIT_CLEARED >> 382,384d374 >> < #else >> < if (!(fraction & QUIET_NAN)) >> < #endif >> >> >> ÔÚ 2002-02-03 22:54:00 you wrote£º >> >On Mon, Feb 04, 2002 at 02:22:48PM +0800, Zhang Fuxin wrote: >> >> hi, >> >> >> >> Gcc (2.96 20000731,H.J.LU's rh port for mips) think 0x7fc00000 is QNaN and >> >> optimize 0.0/0.0 as 0x7fc00000 for single precision ops,while for my cpu >> >> (maybe most mips cpu) is a SNaN. R4k user's manual and "See Mips Run" both >> >> say so.And experiments confirm this. >> >> >> >> Should we correct it? >> > >> >Yes. Do you have a patch? >> > >> >Thanks. >> > >> > >> >H.J. Regards Zhang Fuxin fxzhang@ict.ac.cn From owner-linux-mips@oss.sgi.com Tue Feb 19 18:13:17 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g1K2DHe01072 for linux-mips-outgoing; Tue, 19 Feb 2002 18:13:17 -0800 Received: from orion.mvista.com (gateway-1237.mvista.com [12.44.186.158]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g1K2DB901069 for ; Tue, 19 Feb 2002 18:13:11 -0800 Received: (from jsun@localhost) by orion.mvista.com (8.9.3/8.9.3) id RAA25904; Tue, 19 Feb 2002 17:12:38 -0800 Date: Tue, 19 Feb 2002 17:12:38 -0800 From: Jun Sun To: "Kevin D. Kissell" Cc: linux-mips@oss.sgi.com Subject: Re: FPU emulator unsafe for SMP? Message-ID: <20020219171238.E25739@mvista.com> References: <3C6C6ACF.CAD2FFC@mvista.com> <20020215031118.B21011@dea.linux-mips.net> <20020214232030.A3601@mvista.com> <20020215003037.A3670@mvista.com> <002b01c1b607$6afbd5c0$10eca8c0@grendel> <20020219140514.C25739@mvista.com> <00af01c1b9a2$c0d6d5f0$10eca8c0@grendel> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <00af01c1b9a2$c0d6d5f0$10eca8c0@grendel>; from kevink@mips.com on Wed, Feb 20, 2002 at 01:08:30AM +0100 Sender: owner-linux-mips@oss.sgi.com Precedence: bulk On Wed, Feb 20, 2002 at 01:08:30AM +0100, Kevin D. Kissell wrote: > > > > Hmm, I see. The lazy fpu context switch code is not SMP safe. > > > > I see fishy things like "last_task_used_math" etc... > > > > > > What, you mean "last_task_used_math" isn't allocated in a > > > processor-specific page of kseg3??? ;-) > > > > You must be talking about another OS, right? :-) I don't think > > Linux has processor-specific page, although this sounds like > > a good idea to explore. > > It's gotta be done. I mean, the last I heard (which was a long > time ago) mips64 Linux was keeping the CPU node number in > a watchpoint register (or something equally unwholesome) It seems that people are getting smarter by putting cpu id to context register. In fact isn't this part of new MIPS standard? > > But getting back to the original topic, there's another fun bug > waiting for us in MIPS/Linux SMP floating point that can't > be fixed as easly with VM slight-of-hand. Consider processes > "A" and "B", where A uses FP and B does not: A gets scheduled > on CPU 1, runs for a while, gets preempted, and B gets CPU 1. > CPU 2 gets freed, so A gets scheduled on CPU 2. Unfortunately, > A's FP state is still in the FP register set of CPU 1. The lazy FPU > context switch either needs to be turned off (bleah!) or be fixed > for SMP to handle the case where the "owner" of the FPR's > on one CPU gets scheduled on another. > > The brute force would be somehow to send an interrupt to the CPU > with the FP state that will cause it to cough it up into the thread context > area. One alternative would be to give strict CPU affinity to the thread > that has it's FP state on a particular CPU. That could complicate load > balancing, but might not really be too bad. At most one thread per CPU > will be non-migratable at a given point in time. In the above scenario, > "A" could never migrate off of CPU 1, but "B" could, and would > presumably be picked up by an idle CPU 2 as soon as it's time slice > is up on CPU 1. That will be less efficient than doing an "FPU shootdown" > in some cases, but it should also be more portable and easier > to get right. > As I looked into FPU/SMP issue, I realized this problem. I agree that locking fpu owner to the current cpu is the best solution. I bet this won't really hurt performance because any alternative would incur transferring FPU registers across cpus, which is not a small overhead. > Does this come up in x86-land? The FPU state is much smaller > there, so lazy context switching is presumably less important. > It appears x86 is not doing lazy fpu switching, at least not as agressively as MIPS. I am actually curious how IRIX handles this case, assuming IRIX is reasonable enough to have lazy FPU switching... Jun From owner-linux-mips@oss.sgi.com Tue Feb 19 18:51:02 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g1K2p2v01367 for linux-mips-outgoing; Tue, 19 Feb 2002 18:51:02 -0800 Received: from dtla2.teknuts.com (adsl-66-125-62-110.dsl.lsan03.pacbell.net [66.125.62.110]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g1K2os901361 for ; Tue, 19 Feb 2002 18:50:54 -0800 Received: from delllaptop (whnat1.weiderpub.com [65.115.104.67]) (authenticated) by dtla2.teknuts.com (8.11.3/8.10.1) with ESMTP id g1K1orZ03517 for ; Tue, 19 Feb 2002 17:50:53 -0800 From: "Robert Rusek" To: Subject: Error Compiling 2.4.3 kernel on SGI IP22... Date: Tue, 19 Feb 2002 17:45:46 -0800 Message-ID: <000901c1b9b0$51cdd0b0$0f1610ac@delllaptop> 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.3416 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 Importance: Normal Sender: owner-linux-mips@oss.sgi.com Precedence: bulk Initially I got errors telling me that mips-linux-gcc, mips-linux-ld, and mips-linux-ar did not exists. I simply made a link for: mips-linux-gcc -> gcc mips-linux-ld -> ld mips-linux-ar -> ar Once doing so I got make to complete except for the last part when it goes to make the vmlinux file. I included the last few lines before it errors out. Any help would be greatly appreciated. --- make[1]: Entering directory `/usr/src/linux-2.4.3/arch/mips/kernel' make[1]: Nothing to be done for `all'. make[1]: Leaving directory `/usr/src/linux-2.4.3/arch/mips/kernel' make CFLAGS="-I /usr/src/linux-2.4.3/include/asm/gcc -D__KERNEL__ -I/usr/src/lin ux-2.4.3/include -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer -fno-strict- aliasing -G 0 -mno-abicalls -fno-pic -mcpu=r5000 -mips2 -Wa,--trap -pipe " -C a rch/mips/mm make[1]: Entering directory `/usr/src/linux-2.4.3/arch/mips/mm' make all_targets make[2]: Entering directory `/usr/src/linux-2.4.3/arch/mips/mm' make[2]: Nothing to be done for `all_targets'. make[2]: Leaving directory `/usr/src/linux-2.4.3/arch/mips/mm' make[1]: Leaving directory `/usr/src/linux-2.4.3/arch/mips/mm' make CFLAGS="-I /usr/src/linux-2.4.3/include/asm/gcc -D__KERNEL__ -I/usr/src/lin ux-2.4.3/include -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer -fno-strict- aliasing -G 0 -mno-abicalls -fno-pic -mcpu=r5000 -mips2 -Wa,--trap -pipe " -C a rch/mips/lib make[1]: Entering directory `/usr/src/linux-2.4.3/arch/mips/lib' make all_targets make[2]: Entering directory `/usr/src/linux-2.4.3/arch/mips/lib' make[2]: Nothing to be done for `all_targets'. make[2]: Leaving directory `/usr/src/linux-2.4.3/arch/mips/lib' make[1]: Leaving directory `/usr/src/linux-2.4.3/arch/mips/lib' mips-linux-ld -static -G 0 -T arch/mips/ld.script arch/mips/kernel/head.o arch/m ips/kernel/init_task.o init/main.o init/version.o \ --start-group \ arch/mips/kernel/kernel.o arch/mips/mm/mm.o kernel/kernel.o mm/mm.o fs/f s.o ipc/ipc.o arch/mips/math-emu/fpu_emulator.o arch/mips/sgi/kernel/ip22-kern.o \ drivers/block/block.o drivers/char/char.o drivers/misc/misc.o drivers/ne t/net.o drivers/media/media.o drivers/scsi/scsidrv.o drivers/cdrom/driver.o dri vers/sgi/sgi.a drivers/video/video.o \ net/network.o \ arch/mips/lib/lib.a /usr/src/linux-2.4.3/lib/lib.a arch/mips/arc/arclib. a \ --end-group \ -o vmlinux mips-linux-ld: target elf32-bigmips not found make: *** [vmlinux] Error 1 --- -- Robert Rusek From owner-linux-mips@oss.sgi.com Tue Feb 19 18:59:10 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g1K2xAN01523 for linux-mips-outgoing; Tue, 19 Feb 2002 18:59:10 -0800 Received: from mail.ict.ac.cn ([159.226.39.4]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g1K2x2901518 for ; Tue, 19 Feb 2002 18:59:02 -0800 Message-Id: <200202200259.g1K2x2901518@oss.sgi.com> Received: (qmail 1554 invoked from network); 20 Feb 2002 02:02:00 -0000 Received: from unknown (HELO foxsen) (@159.226.40.150) by 159.226.39.4 with SMTP; 20 Feb 2002 02:02:00 -0000 Date: Wed, 20 Feb 2002 9:56:28 +0800 From: Zhang Fuxin To: Hartvig Ekner CC: "linux-mips@oss.sgi.com" Subject: Re: Your problem #2 X-mailer: FoxMail 3.11 Release [cn] Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=====_Dragon277531244025_=====" Sender: owner-linux-mips@oss.sgi.com Precedence: bulk This is a multi-part message in MIME format. --=====_Dragon277531244025_===== Content-Type: text/plain; charset="GB2312" Content-Transfer-Encoding: quoted-printable hi, My way is to extract code from glibc source,math code is= related independent so it is not so hard. But anyway for your convenience i have adapted a little program= for you. gcc t-expf.c -lm gcc -O2 t-expf.c -lm should give different output. =D4=DA 2002-02-19 22:09:00 you wrote=A3=BA >Hi Zhang, > >I have verified your problem #3 to exist on the SDE compiler as= well, >and it has been reported. > >Regarding your problem #2, do you have a self-contained example >(similar to your small program in #3) which exhibits the error?= I don't >want to spend time installing glibc and dealing with getting= that compile >to run in order to check whether this issue also exists on SDE. > >(This is similar to my request on sample failing code for= problem #1 you >reported). > >/Hartvig Regards Zhang Fuxin fxzhang@ict.ac.cn --=====_Dragon277531244025_===== Content-Type: application/octet-stream; name="t-expf.c" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="t-expf.c" I2luY2x1ZGUgPG1hdGguaD4KI2luY2x1ZGUgPGZlbnYuaD4KCnZvaWQgcHJpbnRfcm91bmQoKQp7 CglpbnQgcjsKCglyPWZlZ2V0cm91bmQoKTsKCWlmIChyPT1GRV9UT05FQVJFU1QpIHsKCQlwcmlu dGYoInJvdW5kaW5nIGlzIFRPTkVBUkVTVFxuIik7IAoJfWVsc2UgaWYgKHI9PUZFX0RPV05XQVJE KSB7CgkJcHJpbnRmKCJyb3VuZGluZyBpcyBET1dOV0FSRFxuIik7IAoJfWVsc2UgaWYgKHI9PUZF X1VQV0FSRCkgewoJCXByaW50Zigicm91bmRpbmcgaXMgVVBXQVJEXG4iKTsgCgl9ZWxzZSB7CgkJ cHJpbnRmKCJyb3VuZGluZyBpcyBUT1dBUkRaRVJPXG4iKTsgCgl9Cn0KCnZvaWQgcHJpbnRfZXhj ZXB0aW9uKCkKewoJcHJpbnRmKCJmbGFnczoiKTsKCWlmIChmZXRlc3RleGNlcHQoRkVfSU5WQUxJ RCkpIHByaW50ZigiaSIpOwoJaWYgKGZldGVzdGV4Y2VwdChGRV9ESVZCWVpFUk8pKSBwcmludGYo IjAiKTsKCWlmIChmZXRlc3RleGNlcHQoRkVfT1ZFUkZMT1cpKSBwcmludGYoIk8iKTsKCWlmIChm ZXRlc3RleGNlcHQoRkVfVU5ERVJGTE9XKSkgcHJpbnRmKCJVIik7CglpZiAoZmV0ZXN0ZXhjZXB0 KEZFX0lORVhBQ1QpKSBwcmludGYoIlgiKTsKCXByaW50ZigiXG4iKTsKfQoKc3RhdGljIGNvbnN0 IGZsb2F0Cm9fdGhyZXNob2xkPSAgOC44NzIxNjc5Njg4ZSswMSwgIC8qIDB4NDJiMTcxODAgKi8K dV90aHJlc2hvbGQ9IC0xLjAzOTcyMDg0MDVlKzAyOyAgLyogMHhjMmNmZjFiNSAqLwoKZmxvYXQg bXlleHBmKGZsb2F0IHgpCnsKCWZsb2F0IHo7Cgl1bnNpZ25lZCBpbnQgaHg7CglpZiAoX0xJQl9W RVJTSU9OID09IF9JRUVFXykgcmV0dXJuIHo7CglpZihmaW5pdGVmKHgpKSB7CgkgICAgaWYoeD5v X3RocmVzaG9sZCkKCQlyZXR1cm4gMS4wOwoJICAgIGVsc2UgaWYoeDx1X3RocmVzaG9sZCkKCQly ZXR1cm4gMi4wOwoJfSAKfQoKaW50IG1haW4oaW50IGFyZ2MsY2hhciAqKmFyZ3YpCnsKCWZsb2F0 IHgsemVybz0wLjA7CgoJeCA9IHplcm8vemVybzsKCWZlY2xlYXJleGNlcHQoRkVfQUxMX0VYQ0VQ VCk7CglwcmludF9leGNlcHRpb24oKTsKCXggPSBteWV4cGYoeCk7CglwcmludF9leGNlcHRpb24o KTsKCXJldHVybiAwOwp9Cgo= --=====_Dragon277531244025_=====-- From owner-linux-mips@oss.sgi.com Tue Feb 19 19:44:58 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g1K3iwu02059 for linux-mips-outgoing; Tue, 19 Feb 2002 19:44:58 -0800 Received: from ns1.ltc.com (vsat-148-63-243-254.c3.sb4.mrt.starband.net [148.63.243.254]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g1K3ik902055 for ; Tue, 19 Feb 2002 19:44:52 -0800 Received: from prefect (unknown [10.1.1.86]) by ns1.ltc.com (Postfix) with SMTP id 6110B590A9; Tue, 19 Feb 2002 21:35:04 -0500 (EST) Message-ID: <002501c1b9b8$a87addb0$5601010a@prefect> From: "Bradley D. LaRonde" To: "Robert Rusek" , References: <000901c1b9b0$51cdd0b0$0f1610ac@delllaptop> Subject: Re: Error Compiling 2.4.3 kernel on SGI IP22... Date: Tue, 19 Feb 2002 21:45:11 -0500 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.2600.0000 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 Sender: owner-linux-mips@oss.sgi.com Precedence: bulk Check your arch/mips/ld.script file. I think you need to remove the OUTPUT_FORMAT line in there. This was fixed in CVS on May 10, 2001; your snapshot might be right before that. Regards, Brad ----- Original Message ----- From: "Robert Rusek" To: Sent: Tuesday, February 19, 2002 8:45 PM Subject: Error Compiling 2.4.3 kernel on SGI IP22... > make[1]: Entering directory `/usr/src/linux-2.4.3/arch/mips/kernel' > mips-linux-ld: target elf32-bigmips not found > make: *** [vmlinux] Error 1 From owner-linux-mips@oss.sgi.com Tue Feb 19 20:28:44 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g1K4Si502671 for linux-mips-outgoing; Tue, 19 Feb 2002 20:28:44 -0800 Received: from nixon.xkey.com (nixon.xkey.com [209.245.148.124]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g1K4Se902668 for ; Tue, 19 Feb 2002 20:28:40 -0800 Received: (qmail 3656 invoked from network); 20 Feb 2002 03:28:40 -0000 Received: from localhost (HELO localhost.conservativecomputer.com) (127.0.0.1) by localhost with SMTP; 20 Feb 2002 03:28:40 -0000 Received: (from lindahl@localhost) by localhost.conservativecomputer.com (8.11.6/8.11.0) id g1K3SZN04338 for linux-mips@oss.sgi.com; Tue, 19 Feb 2002 22:28:35 -0500 X-Authentication-Warning: localhost.hpti.com: lindahl set sender to lindahl@conservativecomputer.com using -f Date: Tue, 19 Feb 2002 22:28:35 -0500 From: Greg Lindahl To: linux-mips@oss.sgi.com Subject: Re: FPU emulator unsafe for SMP? Message-ID: <20020219222835.A4195@wumpus.skymv.com> Mail-Followup-To: linux-mips@oss.sgi.com References: <3C6C6ACF.CAD2FFC@mvista.com> <20020215031118.B21011@dea.linux-mips.net> <20020214232030.A3601@mvista.com> <20020215003037.A3670@mvista.com> <002b01c1b607$6afbd5c0$10eca8c0@grendel> <20020219140514.C25739@mvista.com> <00af01c1b9a2$c0d6d5f0$10eca8c0@grendel> <20020219171238.E25739@mvista.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <20020219171238.E25739@mvista.com>; from jsun@mvista.com on Tue, Feb 19, 2002 at 05:12:38PM -0800 Sender: owner-linux-mips@oss.sgi.com Precedence: bulk On Tue, Feb 19, 2002 at 05:12:38PM -0800, Jun Sun wrote: > As I looked into FPU/SMP issue, I realized this problem. I agree > that locking fpu owner to the current cpu is the best solution. > I bet this won't really hurt performance because any alternative would > incur transferring FPU registers across cpus, which is not a small > overhead. There are other CPUs out there with large cpu contexts, like the Alpha and Itanium. So we can look at what Linux does with them. Alpha seems to always save the fpu state (the comments say that gcc always generates code that uses it in every user process.) The Itanium seems to be lazy only for nonSMP. If a process touches the fpu registers and doesn't own their contents, it will save the fpu contents to the appropriate process' state and load the correct fpu state. For SMP it seems to always save the fpu state, if the process modified it. I suspect that the optimization of not saving the fpu state for a process that doesn't use the fpu is the most critical optimization. And that you do already. What you propose, locking the fpu owner to the current cpu, will not result in a fair solution. Imagine a 2 cpu machine with 2 processes using integer math and 1 using floating point... how much cpu time will each process get? Imagine all the funky effects. Now add in a MIPS design in which interrupts are not delivered uniformly to all the cpus... I don't know if there are any or will ever be any, but... greg From owner-linux-mips@oss.sgi.com Tue Feb 19 21:25:12 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g1K5PC303181 for linux-mips-outgoing; Tue, 19 Feb 2002 21:25:12 -0800 Received: from orion.mvista.com (gateway-1237.mvista.com [12.44.186.158]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g1K5P8903178 for ; Tue, 19 Feb 2002 21:25:08 -0800 Received: (from jsun@localhost) by orion.mvista.com (8.9.3/8.9.3) id UAA03511; Tue, 19 Feb 2002 20:24:34 -0800 Date: Tue, 19 Feb 2002 20:24:34 -0800 From: Jun Sun To: Greg Lindahl Cc: linux-mips@oss.sgi.com Subject: Re: FPU emulator unsafe for SMP? Message-ID: <20020219202434.F25739@mvista.com> References: <3C6C6ACF.CAD2FFC@mvista.com> <20020215031118.B21011@dea.linux-mips.net> <20020214232030.A3601@mvista.com> <20020215003037.A3670@mvista.com> <002b01c1b607$6afbd5c0$10eca8c0@grendel> <20020219140514.C25739@mvista.com> <00af01c1b9a2$c0d6d5f0$10eca8c0@grendel> <20020219171238.E25739@mvista.com> <20020219222835.A4195@wumpus.skymv.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <20020219222835.A4195@wumpus.skymv.com>; from lindahl@conservativecomputer.com on Tue, Feb 19, 2002 at 10:28:35PM -0500 Sender: owner-linux-mips@oss.sgi.com Precedence: bulk On Tue, Feb 19, 2002 at 10:28:35PM -0500, Greg Lindahl wrote: > > Alpha seems to always save the fpu state (the comments say that gcc > always generates code that uses it in every user process.) > I think the comment might be an execuse. :-) Never heard of gcc generating unnecessary floating point code. > I suspect that the optimization of not saving the fpu state for a > process that doesn't use the fpu is the most critical optimization. > And that you do already. If you do use floating point, I think it is pretty common to have only process that uses fpu and runs for very long. In that case, leaving FPU owned by the process also saves quite a bit. > What you propose, locking the fpu owner to the current cpu, will not > result in a fair solution. Imagine a 2 cpu machine with 2 processes > using integer math and 1 using floating point... how much cpu time > will each process get? In this case, proc that uses fpu gets about 50% of one cpu, i.e., 25% of total load, while the other two integer math proces split the rest 75%, which gives 37.5% each. Not too bad in my opinion. > Imagine all the funky effects. Now add in a > MIPS design in which interrupts are not delivered uniformly to all the > cpus... This is chip-specific, I think. Not related to general MIPS arch. Jun From owner-linux-mips@oss.sgi.com Tue Feb 19 21:32:33 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g1K5WXo03279 for linux-mips-outgoing; Tue, 19 Feb 2002 21:32:33 -0800 Received: from nevyn.them.org (mail@NEVYN.RES.CMU.EDU [128.2.145.6]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g1K5WT903276 for ; Tue, 19 Feb 2002 21:32:30 -0800 Received: from drow by nevyn.them.org with local (Exim 3.34 #1 (Debian)) id 16dOQY-0005mZ-00; Tue, 19 Feb 2002 23:32:22 -0500 Date: Tue, 19 Feb 2002 23:32:22 -0500 From: Daniel Jacobowitz To: Jun Sun Cc: Greg Lindahl , linux-mips@oss.sgi.com Subject: Re: FPU emulator unsafe for SMP? Message-ID: <20020219233222.A22099@nevyn.them.org> References: <3C6C6ACF.CAD2FFC@mvista.com> <20020215031118.B21011@dea.linux-mips.net> <20020214232030.A3601@mvista.com> <20020215003037.A3670@mvista.com> <002b01c1b607$6afbd5c0$10eca8c0@grendel> <20020219140514.C25739@mvista.com> <00af01c1b9a2$c0d6d5f0$10eca8c0@grendel> <20020219171238.E25739@mvista.com> <20020219222835.A4195@wumpus.skymv.com> <20020219202434.F25739@mvista.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20020219202434.F25739@mvista.com> User-Agent: Mutt/1.3.23i Sender: owner-linux-mips@oss.sgi.com Precedence: bulk On Tue, Feb 19, 2002 at 08:24:34PM -0800, Jun Sun wrote: > On Tue, Feb 19, 2002 at 10:28:35PM -0500, Greg Lindahl wrote: > > > > Alpha seems to always save the fpu state (the comments say that gcc > > always generates code that uses it in every user process.) > > > > I think the comment might be an execuse. :-) Never heard of gcc > generating unnecessary floating point code. I have :) It may do memory moves in them, for instance. Not sure if that makes sense on Alpha. > > I suspect that the optimization of not saving the fpu state for a > > process that doesn't use the fpu is the most critical optimization. > > And that you do already. > > If you do use floating point, I think it is pretty common to have > only process that uses fpu and runs for very long. In that case, > leaving FPU owned by the process also saves quite a bit. Not true. For instance, on a processor with hardware FPU, setjmp() will save FPU registers. That means most processes will actually end up taking the FPU at least once. The general approach in Linux is to disable lazy switching on SMP. I'm 95% sure that PowerPC does that. -- Daniel Jacobowitz Carnegie Mellon University MontaVista Software Debian GNU/Linux Developer From owner-linux-mips@oss.sgi.com Tue Feb 19 21:33:48 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g1K5Xm803350 for linux-mips-outgoing; Tue, 19 Feb 2002 21:33:48 -0800 Received: from nevyn.them.org (mail@NEVYN.RES.CMU.EDU [128.2.145.6]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g1K5Xg903347 for ; Tue, 19 Feb 2002 21:33:42 -0800 Received: from drow by nevyn.them.org with local (Exim 3.34 #1 (Debian)) id 16dORn-0005n4-00; Tue, 19 Feb 2002 23:33:39 -0500 Date: Tue, 19 Feb 2002 23:33:39 -0500 From: Daniel Jacobowitz To: Robert Rusek Cc: linux-mips@oss.sgi.com Subject: Re: Error Compiling 2.4.3 kernel on SGI IP22... Message-ID: <20020219233339.B22099@nevyn.them.org> References: <000901c1b9b0$51cdd0b0$0f1610ac@delllaptop> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <000901c1b9b0$51cdd0b0$0f1610ac@delllaptop> User-Agent: Mutt/1.3.23i Sender: owner-linux-mips@oss.sgi.com Precedence: bulk On Tue, Feb 19, 2002 at 05:45:46PM -0800, Robert Rusek wrote: > Initially I got errors telling me that mips-linux-gcc, mips-linux-ld, > and mips-linux-ar did not exists. I simply made a link for: > > mips-linux-gcc -> gcc > mips-linux-ld -> ld > mips-linux-ar -> ar No, set CROSS_COMPILE=mips-linux- > mips-linux-ld -static -G 0 -T arch/mips/ld.script > arch/mips/kernel/head.o arch/m > ips/kernel/init_task.o init/main.o init/version.o \ > --start-group \ > arch/mips/kernel/kernel.o arch/mips/mm/mm.o kernel/kernel.o > mm/mm.o fs/f > s.o ipc/ipc.o arch/mips/math-emu/fpu_emulator.o > arch/mips/sgi/kernel/ip22-kern.o > \ > drivers/block/block.o drivers/char/char.o drivers/misc/misc.o > drivers/ne > t/net.o drivers/media/media.o drivers/scsi/scsidrv.o > drivers/cdrom/driver.o dri > vers/sgi/sgi.a drivers/video/video.o \ > net/network.o \ > arch/mips/lib/lib.a /usr/src/linux-2.4.3/lib/lib.a > arch/mips/arc/arclib. > a \ > --end-group \ > -o vmlinux > mips-linux-ld: target elf32-bigmips not found > make: *** [vmlinux] Error 1 2.4.3 is too old for your tools. I recommend you use a newer kernel. Otherwise, just changing that to elf32-tradbigmips should work. -- Daniel Jacobowitz Carnegie Mellon University MontaVista Software Debian GNU/Linux Developer From owner-linux-mips@oss.sgi.com Tue Feb 19 21:48:17 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g1K5mHV03489 for linux-mips-outgoing; Tue, 19 Feb 2002 21:48:17 -0800 Received: from nixon.xkey.com (nixon.xkey.com [209.245.148.124]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g1K5mD903486 for ; Tue, 19 Feb 2002 21:48:13 -0800 Received: (qmail 11470 invoked from network); 20 Feb 2002 04:48:13 -0000 Received: from localhost (HELO localhost.conservativecomputer.com) (127.0.0.1) by localhost with SMTP; 20 Feb 2002 04:48:13 -0000 Received: (from lindahl@localhost) by localhost.conservativecomputer.com (8.11.6/8.11.0) id g1K4m8C04590 for linux-mips@oss.sgi.com; Tue, 19 Feb 2002 23:48:08 -0500 X-Authentication-Warning: localhost.hpti.com: lindahl set sender to lindahl@conservativecomputer.com using -f Date: Tue, 19 Feb 2002 23:48:08 -0500 From: Greg Lindahl To: linux-mips@oss.sgi.com Subject: Re: FPU emulator unsafe for SMP? Message-ID: <20020219234808.A4475@wumpus.skymv.com> Mail-Followup-To: linux-mips@oss.sgi.com References: <3C6C6ACF.CAD2FFC@mvista.com> <20020215031118.B21011@dea.linux-mips.net> <20020214232030.A3601@mvista.com> <20020215003037.A3670@mvista.com> <002b01c1b607$6afbd5c0$10eca8c0@grendel> <20020219140514.C25739@mvista.com> <00af01c1b9a2$c0d6d5f0$10eca8c0@grendel> <20020219171238.E25739@mvista.com> <20020219222835.A4195@wumpus.skymv.com> <20020219202434.F25739@mvista.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <20020219202434.F25739@mvista.com>; from jsun@mvista.com on Tue, Feb 19, 2002 at 08:24:34PM -0800 Sender: owner-linux-mips@oss.sgi.com Precedence: bulk On Tue, Feb 19, 2002 at 08:24:34PM -0800, Jun Sun wrote: > I think the comment might be an execuse. :-) Never heard of gcc > generating unnecessary floating point code. I don't really remember, but I think the Alpha calling standards encourages using some of the fp registers as scratch all the time. The price is that you have to always save them, but you get more registers, which helps you avoid spills, which speeds up all kinds of code. > If you do use floating point, I think it is pretty common to have > only process that uses fpu and runs for very long. In that case, > leaving FPU owned by the process also saves quite a bit. You're assuming, I guess, that there are a lot of interrupts. OK, so how much CPU time is saved? You can't compare the cost if you don't know the number. > In this case, proc that uses fpu gets about 50% of one cpu, i.e., > 25% of total load, while the other two integer math proces split the > rest 75%, which gives 37.5% each. Not too bad in my opinion. One man's "not too bad" can be another man's "oh my God, that's horrible!" -- greg From owner-linux-mips@oss.sgi.com Tue Feb 19 22:36:40 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g1K6aee04096 for linux-mips-outgoing; Tue, 19 Feb 2002 22:36:40 -0800 Received: from gda-server ([202.88.152.146]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g1K6aa904093 for ; Tue, 19 Feb 2002 22:36:36 -0800 Received: from [192.168.0.186] by gda-server (ArGoSoft Mail Server, Version 1.5 (1.5.0.8)); Wed, 20 Feb 2002 11:09:32 Message-ID: <3C73DE53.1D7D1930@gdatech.co.in> Date: Wed, 20 Feb 2002 23:05:15 +0530 From: santhosh <ps.santhosh@gdatech.co.in> Organization: gdatech X-Mailer: Mozilla 4.77 [en] (X11; U; Linux 2.4.2-2 i686) X-Accept-Language: en MIME-Version: 1.0 To: linux-mips@oss.sgi.com Subject: MIPS64 Kernel SB1250 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-linux-mips@oss.sgi.com Precedence: bulk Hai MIPSian I am working one MIPS64 type processor(SB1250 Sibyte family) I need MIPS64 kernel to porting my project board(SB1250).. shall I get it?? or tell where can i go to collect..... with regds sant From owner-linux-mips@oss.sgi.com Wed Feb 20 01:27:34 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g1K9RYG06644 for linux-mips-outgoing; Wed, 20 Feb 2002 01:27:34 -0800 Received: from oval.algor.co.uk (root@oval.algor.co.uk [62.254.210.250]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g1K9RS906640 for ; Wed, 20 Feb 2002 01:27:29 -0800 Received: from gladsmuir.algor.co.uk.algor.co.uk (IDENT:dom@gladsmuir.algor.co.uk [192.168.5.75]) by oval.algor.co.uk (8.11.6/8.10.1) with ESMTP id g1K8RK411834; Wed, 20 Feb 2002 08:27:21 GMT From: Dominic Sweetman MIME-Version: 1.0 Message-ID: <15475.24039.877276.257999@gladsmuir.algor.co.uk> Date: Wed, 20 Feb 2002 08:27:19 +0000 To: Jun Sun Cc: "Kevin D. Kissell" , linux-mips@oss.sgi.com Subject: Re: FPU emulator unsafe for SMP? In-Reply-To: <20020219171238.E25739@mvista.com> References: <3C6C6ACF.CAD2FFC@mvista.com> <20020215031118.B21011@dea.linux-mips.net> <20020214232030.A3601@mvista.com> <20020215003037.A3670@mvista.com> <002b01c1b607$6afbd5c0$10eca8c0@grendel> <20020219140514.C25739@mvista.com> <00af01c1b9a2$c0d6d5f0$10eca8c0@grendel> <20020219171238.E25739@mvista.com> X-Mailer: VM 6.89 under 21.1 (patch 14) "Cuyahoga Valley" XEmacs Lucid User-Agent: SEMI/1.13.7 (Awazu) CLIME/1.13.6 (=?ISO-2022-JP?B?GyRCQ2YbKEI=?= =?ISO-2022-JP?B?GyRCJU4+MRsoQg==?=) MULE XEmacs/21.1 (patch 14) (Cuyahoga Valley) (i386-redhat-linux) Content-Type: text/plain; charset=US-ASCII Sender: owner-linux-mips@oss.sgi.com Precedence: bulk Somewhere in this thread: > > > > > Hmm, I see. The lazy fpu context switch code is not SMP safe. > > > > > I see fishy things like "last_task_used_math" etc... Lazy FPU context switching? Let's turn the whole thing off... It may be heretical... but the lazy FPU context switch was invented for 16MHz CPUs using a write-through cache and non-burst memory, where saving 16 x 64-bit registers took 6us or so (and quite a bit less, later, to read them back). Call it 8us. A 500MHz CPU with a writeback primary cache - which typically keeps up with the CPU pipeline - takes about 120ns to do the job (there are more registers these days). The overhead is not only less than 2% in absolute terms, but is about a third what it used to be relative to the overall CPU performance... Really, is it worth all this trouble? Dominic Sweetman Algorithmics Ltd The Fruit Farm, Ely Road, Chittering, CAMBS CB5 9PH, ENGLAND phone +44 1223 706200/fax +44 1223 706250/direct +44 1223 706205 http://www.algor.co.uk From owner-linux-mips@oss.sgi.com Wed Feb 20 02:31:10 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g1KAVAN07935 for linux-mips-outgoing; Wed, 20 Feb 2002 02:31:10 -0800 Received: from noose.gt.owl.de (postfix@noose.gt.owl.de [62.52.19.4]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g1KAV5907928 for ; Wed, 20 Feb 2002 02:31:05 -0800 Received: by noose.gt.owl.de (Postfix, from userid 10) id BB589884; Wed, 20 Feb 2002 10:30:40 +0100 (CET) Received: by localhost (Postfix, from userid 1000) id DA7E51A23B; Wed, 20 Feb 2002 10:27:35 +0100 (CET) Date: Wed, 20 Feb 2002 10:27:35 +0100 From: Florian Lohoff To: Jun Sun Cc: Greg Lindahl , linux-mips@oss.sgi.com Subject: Re: FPU emulator unsafe for SMP? Message-ID: <20020220092735.GE11654@paradigm.rfc822.org> References: <3C6C6ACF.CAD2FFC@mvista.com> <20020215031118.B21011@dea.linux-mips.net> <20020214232030.A3601@mvista.com> <20020215003037.A3670@mvista.com> <002b01c1b607$6afbd5c0$10eca8c0@grendel> <20020219140514.C25739@mvista.com> <00af01c1b9a2$c0d6d5f0$10eca8c0@grendel> <20020219171238.E25739@mvista.com> <20020219222835.A4195@wumpus.skymv.com> <20020219202434.F25739@mvista.com> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="5oH/S/bF6lOfqCQb" Content-Disposition: inline In-Reply-To: <20020219202434.F25739@mvista.com> User-Agent: Mutt/1.3.27i Organization: rfc822 - pure communication Sender: owner-linux-mips@oss.sgi.com Precedence: bulk --5oH/S/bF6lOfqCQb Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Feb 19, 2002 at 08:24:34PM -0800, Jun Sun wrote: > On Tue, Feb 19, 2002 at 10:28:35PM -0500, Greg Lindahl wrote: > > Alpha seems to always save the fpu state (the comments say that gcc > > always generates code that uses it in every user process.) >=20 > I think the comment might be an execuse. :-) Never heard of gcc > generating unnecessary floating point code. >=20 Its not gcc its glibc's startup code i guess ...=20 Flo --=20 Florian Lohoff flo@rfc822.org +49-5201-669912 Nine nineth on september the 9th Welcome to the new billenium --5oH/S/bF6lOfqCQb Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.6 (GNU/Linux) Comment: For info see http://www.gnupg.org iD8DBQE8c2wHUaz2rXW+gJcRAv0mAJ9NrdwpH2Njnrwlzg6tKsC9AJJwLgCfWuW6 GyuUi8w2+Xt/ld7S1fZuzjs= =Cpki -----END PGP SIGNATURE----- --5oH/S/bF6lOfqCQb-- From owner-linux-mips@oss.sgi.com Wed Feb 20 02:31:18 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g1KAVIS07964 for linux-mips-outgoing; Wed, 20 Feb 2002 02:31:18 -0800 Received: from noose.gt.owl.de (postfix@noose.gt.owl.de [62.52.19.4]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g1KAV5907929 for ; Wed, 20 Feb 2002 02:31:05 -0800 Received: by noose.gt.owl.de (Postfix, from userid 10) id 1C0BE883; Wed, 20 Feb 2002 10:30:41 +0100 (CET) Received: by localhost (Postfix, from userid 1000) id 838821A23B; Wed, 20 Feb 2002 10:30:12 +0100 (CET) Date: Wed, 20 Feb 2002 10:30:12 +0100 From: Florian Lohoff To: Dominic Sweetman Cc: Jun Sun , "Kevin D. Kissell" , linux-mips@oss.sgi.com Subject: Re: FPU emulator unsafe for SMP? Message-ID: <20020220093012.GF11654@paradigm.rfc822.org> References: <3C6C6ACF.CAD2FFC@mvista.com> <20020215031118.B21011@dea.linux-mips.net> <20020214232030.A3601@mvista.com> <20020215003037.A3670@mvista.com> <002b01c1b607$6afbd5c0$10eca8c0@grendel> <20020219140514.C25739@mvista.com> <00af01c1b9a2$c0d6d5f0$10eca8c0@grendel> <20020219171238.E25739@mvista.com> <15475.24039.877276.257999@gladsmuir.algor.co.uk> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="dgjlcl3Tl+kb3YDk" Content-Disposition: inline In-Reply-To: <15475.24039.877276.257999@gladsmuir.algor.co.uk> User-Agent: Mutt/1.3.27i Organization: rfc822 - pure communication Sender: owner-linux-mips@oss.sgi.com Precedence: bulk --dgjlcl3Tl+kb3YDk Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Feb 20, 2002 at 08:27:19AM +0000, Dominic Sweetman wrote: > It may be heretical... but the lazy FPU context switch was invented > for 16MHz CPUs using a write-through cache and non-burst memory, where > saving 16 x 64-bit registers took 6us or so (and quite a bit less, > later, to read them back). Call it 8us. We are still running on good ol Decstations *snief* Going the way to make it SMP only like others archs seem to do it would be good. Flo --=20 Florian Lohoff flo@rfc822.org +49-5201-669912 Nine nineth on september the 9th Welcome to the new billenium --dgjlcl3Tl+kb3YDk Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.6 (GNU/Linux) Comment: For info see http://www.gnupg.org iD8DBQE8c2ykUaz2rXW+gJcRAtT+AJ40ZITjrI5zafu+ckPVIRKwLT4UWACeJCfS pak03BnkPcyMuxk5LWtM52s= =h2CX -----END PGP SIGNATURE----- --dgjlcl3Tl+kb3YDk-- From owner-linux-mips@oss.sgi.com Wed Feb 20 02:49:00 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g1KAn0i08344 for linux-mips-outgoing; Wed, 20 Feb 2002 02:49:00 -0800 Received: from orion.mvista.com (gateway-1237.mvista.com [12.44.186.158]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g1KAmv908341 for ; Wed, 20 Feb 2002 02:48:57 -0800 Received: (from jsun@localhost) by orion.mvista.com (8.9.3/8.9.3) id BAA03695; Wed, 20 Feb 2002 01:48:22 -0800 Date: Wed, 20 Feb 2002 01:48:21 -0800 From: Jun Sun To: Daniel Jacobowitz Cc: Greg Lindahl , linux-mips@oss.sgi.com Subject: Re: FPU emulator unsafe for SMP? Message-ID: <20020220014821.H25739@mvista.com> References: <20020215031118.B21011@dea.linux-mips.net> <20020214232030.A3601@mvista.com> <20020215003037.A3670@mvista.com> <002b01c1b607$6afbd5c0$10eca8c0@grendel> <20020219140514.C25739@mvista.com> <00af01c1b9a2$c0d6d5f0$10eca8c0@grendel> <20020219171238.E25739@mvista.com> <20020219222835.A4195@wumpus.skymv.com> <20020219202434.F25739@mvista.com> <20020219233222.A22099@nevyn.them.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <20020219233222.A22099@nevyn.them.org>; from dan@debian.org on Tue, Feb 19, 2002 at 11:32:22PM -0500 Sender: owner-linux-mips@oss.sgi.com Precedence: bulk On Tue, Feb 19, 2002 at 11:32:22PM -0500, Daniel Jacobowitz wrote: > > If you do use floating point, I think it is pretty common to have > > only process that uses fpu and runs for very long. In that case, > > leaving FPU owned by the process also saves quite a bit. > > Not true. For instance, on a processor with hardware FPU, setjmp() > will save FPU registers. That means most processes will actually end > up taking the FPU at least once. > It is true that almost all process will take FPU once, but that does not affect my statement unless you have a lot of programs come in and go away. On other hand, I do agree with Greg that hand-waving does not mean much here. It would be nice to have some performance data on a benchmark apps. Any good candidate? It should be easy to do a comparison. BTW, I just found out that almost all processes have their used_math bit set - this is because init uses math at the beginning and later all forked processes inherit that bit. Interesting - that also hides a couple of bugs related to if (!current->used) branch in do_cpu(). Jun From owner-linux-mips@oss.sgi.com Wed Feb 20 02:57:35 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g1KAvZH08631 for linux-mips-outgoing; Wed, 20 Feb 2002 02:57:35 -0800 Received: from mail.sonytel.be (mail.sonytel.be [193.74.243.200]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g1KAvU908626 for ; Wed, 20 Feb 2002 02:57:31 -0800 Received: from vervain.sonytel.be (mail.sonytel.be [10.17.0.27]) by mail.sonytel.be (8.9.0/8.8.6) with ESMTP id KAA13863; Wed, 20 Feb 2002 10:56:50 +0100 (MET) Date: Wed, 20 Feb 2002 10:56:50 +0100 (MET) From: Geert Uytterhoeven To: Greg Lindahl cc: Linux/MIPS Development Subject: Re: FPU emulator unsafe for SMP? In-Reply-To: <20020219222835.A4195@wumpus.skymv.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-linux-mips@oss.sgi.com Precedence: bulk On Tue, 19 Feb 2002, Greg Lindahl wrote: > On Tue, Feb 19, 2002 at 05:12:38PM -0800, Jun Sun wrote: > > As I looked into FPU/SMP issue, I realized this problem. I agree > > that locking fpu owner to the current cpu is the best solution. > > I bet this won't really hurt performance because any alternative would > > incur transferring FPU registers across cpus, which is not a small > > overhead. [...] > What you propose, locking the fpu owner to the current cpu, will not > result in a fair solution. Imagine a 2 cpu machine with 2 processes > using integer math and 1 using floating point... how much cpu time > will each process get? Imagine all the funky effects. Now add in a > MIPS design in which interrupts are not delivered uniformly to all the > cpus... I don't know if there are any or will ever be any, but... What if you have 2 processes who are running at the same CPU when they start using the FPU? Won't they be locked to that CPU, while all other's stay idle (if no other processes are to be run)? 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 owner-linux-mips@oss.sgi.com Wed Feb 20 03:07:56 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g1KB7ux08979 for linux-mips-outgoing; Wed, 20 Feb 2002 03:07:56 -0800 Received: from oval.algor.co.uk (root@oval.algor.co.uk [62.254.210.250]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g1KB7l908974 for ; Wed, 20 Feb 2002 03:07:47 -0800 Received: from gladsmuir.algor.co.uk.algor.co.uk (IDENT:dom@gladsmuir.algor.co.uk [192.168.5.75]) by oval.algor.co.uk (8.11.6/8.10.1) with ESMTP id g1KA7e414594; Wed, 20 Feb 2002 10:07:41 GMT From: Dominic Sweetman MIME-Version: 1.0 Message-ID: <15475.30060.604015.257576@gladsmuir.algor.co.uk> Date: Wed, 20 Feb 2002 10:07:40 +0000 To: Zhang Fuxin Cc: nigel@algor.co.uk, Hartvig Ekner , "linux-mips@oss.sgi.com" Subject: Re: Re: Re: math broken on mips In-Reply-To: <200202200149.g1K1nT900770@oss.sgi.com> References: <200202200149.g1K1nT900770@oss.sgi.com> X-Mailer: VM 6.89 under 21.1 (patch 14) "Cuyahoga Valley" XEmacs Lucid User-Agent: SEMI/1.13.7 (Awazu) CLIME/1.13.6 (=?ISO-2022-JP?B?GyRCQ2YbKEI=?= =?ISO-2022-JP?B?GyRCJU4+MRsoQg==?=) MULE XEmacs/21.1 (patch 14) (Cuyahoga Valley) (i386-redhat-linux) Content-Type: text/plain; charset=US-ASCII Sender: owner-linux-mips@oss.sgi.com Precedence: bulk Zhang, > a quick example: > main() > { > float t,zero=0.0; > t = 0.0/0.0; > printf("t=%08lx\n",*(unsigned long*)&t); (0x7fc00000) > t = zero/zero; > printf("t=%08lx\n",*(unsigned long*)&t); (0x7fbfffff) > } > > you should see different output,because the first one is optimized > by gcc to a QNaN,but it's signalling for MIPS. On my RedHat 7.1 x86 machine you get something of the same kind. The constant expression ("0.0/0.0") is always computed at compile time, but the "zero/zero" is only resolved as a constant once you turn on the optimiser. So I see two different values printed without optimisation, but the same value twice with -O2. (Note that the 0.0/0.0 will be computed as a double, while zero/zero will be computed as a float - but I don't think that makes any difference in this case). A floating point purist would say that the compiler should never try to propagate floating point constants where the calculation might produce any exception or exceptional result. That's standards-correct, but unacceptable in practice. If I write float pi = 3.1415926535897932384626433832795029; the decimal->binary conversion will be inexact and might produce an exception (if that flag is set: it almost never is, but the compiler doesn't know that). But I'll be annoyed if my compiler doesn't generate a binary floating point value for 'pi' at compile time. Once you open this door and allow the compiler to work on some floating point constants, life gets tougher. It might be a good rule that if an expression produces an exceptional value (NaN, infinity), you leave it to run-time... but it may mean some ugly back-tracking. In this case gcc for x86 (and MIPS) has had no inhibitions: it's just seen a constant expression and reduced it. With no way to predict the FP mode settings which will be in effect it has no way of knowing what kind of exceptional result to produce in this case. The compiler is now kind of outside the specs: but it's still better style to produce a signalling NaN (anyone who wanted their NaNs quiet probably has exceptions turned off so won't know the difference; anyone who didn't want their NaNs quiet should probably get an exception). But frankly, it's not important. In expecting floating point maths to "just work" in corner cases, you're expecting too much. If you want to be appropriately frightened, here's a paper I came across fairly recently - David Goldberg's "What Every Computer Scientist should Know about Floating Point": http://cch.loria.fr/documentation/IEEE754/ACM/goldberg.pdf -- Dominic Sweetman Algorithmics Ltd The Fruit Farm, Ely Road, Chittering, CAMBS CB5 9PH, ENGLAND phone +44 1223 706200/fax +44 1223 706250/direct +44 1223 706205 http://www.algor.co.uk From owner-linux-mips@oss.sgi.com Wed Feb 20 03:14:32 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g1KBEWI09159 for linux-mips-outgoing; Wed, 20 Feb 2002 03:14:32 -0800 Received: from mx.mips.com (mx.mips.com [206.31.31.226]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g1KBEN909156 for ; Wed, 20 Feb 2002 03:14:23 -0800 Received: from newman.mips.com (ns-dmz [206.31.31.225]) by mx.mips.com (8.9.3/8.9.0) with ESMTP id CAA11758; Wed, 20 Feb 2002 02:14:08 -0800 (PST) Received: from Ulysses (ulysses [192.168.236.13]) by newman.mips.com (8.9.3/8.9.0) with SMTP id CAA17723; Wed, 20 Feb 2002 02:14:06 -0800 (PST) Message-ID: <006001c1b9f7$7da1c920$0deca8c0@Ulysses> From: "Kevin D. Kissell" To: "Daniel Jacobowitz" , "Jun Sun" Cc: "Greg Lindahl" , References: <3C6C6ACF.CAD2FFC@mvista.com> <20020215031118.B21011@dea.linux-mips.net> <20020214232030.A3601@mvista.com> <20020215003037.A3670@mvista.com> <002b01c1b607$6afbd5c0$10eca8c0@grendel> <20020219140514.C25739@mvista.com> <00af01c1b9a2$c0d6d5f0$10eca8c0@grendel> <20020219171238.E25739@mvista.com> <20020219222835.A4195@wumpus.skymv.com> <20020219202434.F25739@mvista.com> <20020219233222.A22099@nevyn.them.org> Subject: Re: FPU emulator unsafe for SMP? Date: Wed, 20 Feb 2002 11:14:02 +0100 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.4807.1700 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4807.1700 Sender: owner-linux-mips@oss.sgi.com Precedence: bulk Daniel Jacobowitz wrote: > On Tue, Feb 19, 2002 at 08:24:34PM -0800, Jun Sun wrote: > > On Tue, Feb 19, 2002 at 10:28:35PM -0500, Greg Lindahl wrote: > > > > > > Alpha seems to always save the fpu state (the comments say that gcc > > > always generates code that uses it in every user process.) > > > > I think the comment might be an execuse. :-) Never heard of gcc > > generating unnecessary floating point code. It ain't gcc, it's glibc. And it ain't just on the Alpha, just about every MIPS process has FP state, even those who do not declare a single FP variable. However that's not a real justification for whether or not one does lazy FPU context management. See below... > I have :) It may do memory moves in them, for instance. Not sure if > that makes sense on Alpha. It probably does on one implementation or another. We used the same trick back in the 1980's in libc for the Fairchild Clipper, since it allowed better parallelism between address computation and memory operations. Not only for memory moves, but string operations! > > > I suspect that the optimization of not saving the fpu state for a > > > process that doesn't use the fpu is the most critical optimization. > > > And that you do already. Let me rephrase that - the advantage is of not saving *or restoring* the FPU state for a process that isn't using the FPU *in its current time slice*. > > If you do use floating point, I think it is pretty common to have > > only process that uses fpu and runs for very long. In that case, > > leaving FPU owned by the process also saves quite a bit. One cannot make design decisions based on what one "thinks is pretty common". Binding threads to CPUs (CPU affinity) is almost always more efficient when the behavior of the workload looks like batch FORTRAN processing. It's when one gets a mix of computational and interactive jobs that it often creates unfortunate artifacts, and thus must be handled with care. > Not true. For instance, on a processor with hardware FPU, setjmp() > will save FPU registers. That means most processes will actually end > up taking the FPU at least once. Almost all MIPS/Linux threads, from init() onward, have FPU state, due to setjmp(), printf() (which uses the FP registers even if one does not specify a floating point data item or format), etc. > The general approach in Linux is to disable lazy switching on SMP. I'm > 95% sure that PowerPC does that. Has anyone ever measured the performance impact of lazy FPU context switching on MIPS? It's one of those ideas that was trendy in the 1980's, but I recall that when we implemented it for SVR2 on the Fairchild Clipper (which had only 16 FP registers), the measured improvement on average context switch time was tiny - a percent or so. We left it in, because it worked and it *was* an improvement, but we would never have gone through the hassle had we known how little it would buy us. It occurs to me that we can to some degree "split the difference" on FPU context management for SMP if we *always* save the FPU state when a thread switches out, but preserve the logic that schedules threads with CU1 inhibited so that the context is only *loaded* if the thread executes FP instructions. That would save about half of the context switch overhead for non-FP-intensive threads, while eliminating the migration problem. Regards, Kevin K. From owner-linux-mips@oss.sgi.com Wed Feb 20 04:13:26 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g1KCDQn10765 for linux-mips-outgoing; Wed, 20 Feb 2002 04:13:26 -0800 Received: from mx.mips.com (mx.mips.com [206.31.31.226]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g1KCDN910762 for ; Wed, 20 Feb 2002 04:13:23 -0800 Received: from newman.mips.com (ns-dmz [206.31.31.225]) by mx.mips.com (8.9.3/8.9.0) with ESMTP id DAA12341; Wed, 20 Feb 2002 03:13:16 -0800 (PST) Received: from Ulysses (ulysses [192.168.236.13]) by newman.mips.com (8.9.3/8.9.0) with SMTP id DAA19202; Wed, 20 Feb 2002 03:13:13 -0800 (PST) Message-ID: <008001c1b9ff$bffe5600$0deca8c0@Ulysses> From: "Kevin D. Kissell" To: "Geert Uytterhoeven" , "Greg Lindahl" Cc: "Linux/MIPS Development" References: Subject: Re: FPU emulator unsafe for SMP? Date: Wed, 20 Feb 2002 12:14:07 +0100 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.4807.1700 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4807.1700 Sender: owner-linux-mips@oss.sgi.com Precedence: bulk Geert wrote: > On Tue, 19 Feb 2002, Greg Lindahl wrote: > > On Tue, Feb 19, 2002 at 05:12:38PM -0800, Jun Sun wrote: > > > What you propose, locking the fpu owner to the current cpu, will not > > result in a fair solution. Imagine a 2 cpu machine with 2 processes > > using integer math and 1 using floating point... how much cpu time > > will each process get? Imagine all the funky effects. Now add in a > > MIPS design in which interrupts are not delivered uniformly to all the > > cpus... I don't know if there are any or will ever be any, but... > > What if you have 2 processes who are running at the same CPU when they start > using the FPU? Won't they be locked to that CPU, while all other's stay idle > (if no other processes are to be run)? What would bind a thread to a CPU would not be having FPU state, but owning the *current* FPU state. Only one such process has that characteristic. Any others who might or might not have used the FPU in the past have their FPU state in the thread context structure, and can be freely migrated. Kevin K. From owner-linux-mips@oss.sgi.com Wed Feb 20 07:00:22 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g1KF0Md13435 for linux-mips-outgoing; Wed, 20 Feb 2002 07:00:22 -0800 Received: from dea.linux-mips.net (a1as06-p249.stg.tli.de [195.252.187.249]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g1KF0F913425 for ; Wed, 20 Feb 2002 07:00:18 -0800 Received: (from ralf@localhost) by dea.linux-mips.net (8.11.6/8.11.1) id g1KDOGd16319; Wed, 20 Feb 2002 14:24:16 +0100 Date: Wed, 20 Feb 2002 14:24:16 +0100 From: Ralf Baechle To: Daniel Jacobowitz Cc: Jun Sun , Greg Lindahl , linux-mips@oss.sgi.com Subject: Re: FPU emulator unsafe for SMP? Message-ID: <20020220142416.F15588@dea.linux-mips.net> References: <20020215031118.B21011@dea.linux-mips.net> <20020214232030.A3601@mvista.com> <20020215003037.A3670@mvista.com> <002b01c1b607$6afbd5c0$10eca8c0@grendel> <20020219140514.C25739@mvista.com> <00af01c1b9a2$c0d6d5f0$10eca8c0@grendel> <20020219171238.E25739@mvista.com> <20020219222835.A4195@wumpus.skymv.com> <20020219202434.F25739@mvista.com> <20020219233222.A22099@nevyn.them.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <20020219233222.A22099@nevyn.them.org>; from dan@debian.org on Tue, Feb 19, 2002 at 11:32:22PM -0500 X-Accept-Language: de,en,fr Sender: owner-linux-mips@oss.sgi.com Precedence: bulk On Tue, Feb 19, 2002 at 11:32:22PM -0500, Daniel Jacobowitz wrote: > > If you do use floating point, I think it is pretty common to have > > only process that uses fpu and runs for very long. In that case, > > leaving FPU owned by the process also saves quite a bit. > > Not true. For instance, on a processor with hardware FPU, setjmp() > will save FPU registers. That means most processes will actually end > up taking the FPU at least once. The cleassic reason to take the FPU is the ctc1 $0, $31 instruction used to initalize the FPU control register rsp. it's equivalent on other architectures. This should be fixed in glibc since a few years. Ralf From owner-linux-mips@oss.sgi.com Wed Feb 20 07:01:00 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g1KF10F13620 for linux-mips-outgoing; Wed, 20 Feb 2002 07:01:00 -0800 Received: from dea.linux-mips.net (a1as06-p249.stg.tli.de [195.252.187.249]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g1KF0l913560 for ; Wed, 20 Feb 2002 07:00:48 -0800 Received: (from ralf@localhost) by dea.linux-mips.net (8.11.6/8.11.1) id g1KD3fo16150; Wed, 20 Feb 2002 14:03:41 +0100 Date: Wed, 20 Feb 2002 14:03:41 +0100 From: Ralf Baechle To: "Kevin D. Kissell" Cc: Jun Sun , linux-mips@oss.sgi.com Subject: Re: FPU emulator unsafe for SMP? Message-ID: <20020220140341.B15588@dea.linux-mips.net> References: <3C6C6ACF.CAD2FFC@mvista.com> <20020215031118.B21011@dea.linux-mips.net> <20020214232030.A3601@mvista.com> <20020215003037.A3670@mvista.com> <002b01c1b607$6afbd5c0$10eca8c0@grendel> <20020219140514.C25739@mvista.com> <00af01c1b9a2$c0d6d5f0$10eca8c0@grendel> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <00af01c1b9a2$c0d6d5f0$10eca8c0@grendel>; from kevink@mips.com on Wed, Feb 20, 2002 at 01:08:30AM +0100 X-Accept-Language: de,en,fr Sender: owner-linux-mips@oss.sgi.com Precedence: bulk On Wed, Feb 20, 2002 at 01:08:30AM +0100, Kevin D. Kissell wrote: > It's gotta be done. I mean, the last I heard (which was a long > time ago) mips64 Linux was keeping the CPU node number in > a watchpoint register (or something equally unwholesome) and > using that value as an index into tables. NUMA nitpicking: cpu number != node number. We store the CPU number in the PTEBase field from bit 23 on in the c0_context register. This number is then used to index the pgd_current[] array to find the root of the page table tree. Having some extra on-die memory for such tiny bits of frequently accessed information on the CPU die would be really cool. I bet it would make a visible difference. > Sticking all the per-CPU > state in a kseg3 VM page which is allocated and locked at boot > time would be much cleaner and on the average probably quite > a bit faster (definitely faster in the kernel but to be fair one has > to factor in the increase in TLB pressure from the locked entry). The plan is actually to map 32-bit page tables into a flat array of 4mb in size and use one wired mapping for that. The other half of the TLB entry mapping the root would still be available. > But getting back to the original topic, there's another fun bug > waiting for us in MIPS/Linux SMP floating point that can't > be fixed as easly with VM slight-of-hand. Consider processes > "A" and "B", where A uses FP and B does not: A gets scheduled > on CPU 1, runs for a while, gets preempted, and B gets CPU 1. > CPU 2 gets freed, so A gets scheduled on CPU 2. Unfortunately, > A's FP state is still in the FP register set of CPU 1. The lazy FPU > context switch either needs to be turned off (bleah!) or be fixed > for SMP to handle the case where the "owner" of the FPR's > on one CPU gets scheduled on another. > > The brute force would be somehow to send an interrupt to the CPU > with the FP state that will cause it to cough it up into the thread context > area. One alternative would be to give strict CPU affinity to the thread > that has it's FP state on a particular CPU. That could complicate load > balancing, but might not really be too bad. At most one thread per CPU > will be non-migratable at a given point in time. In the above scenario, > "A" could never migrate off of CPU 1, but "B" could, and would > presumably be picked up by an idle CPU 2 as soon as it's time slice > is up on CPU 1. That will be less efficient than doing an "FPU shootdown" > in some cases, but it should also be more portable and easier > to get right. > > Does this come up in x86-land? The FPU state is much smaller > there, so lazy context switching is presumably less important. Yes, it's an issue also on x86-land. Since the i386 code stopped using task segments for context switching their whole context switching code has actually become reasonably sane and can be used as a template. In particular I like the fact that they got away without tons of CONFIG_SMP that used to live in their kernel fp code. Time to re-read the i386 code. Using an IPI for migration of an FP context between CPUs a really bad idea which may result in rather sucky worst case context switching times. One of the facts that many performace tradeoffs in the Linux world assume to be granted is blindingly fast context switch times. The number of SMP platforms is growing. I thought it's mindboggling but people are actually building SMP on a chip systems from cores that were designed for uniprocessing. I'd expect such systems to perform like the early SMPs from the 80's, that's not very much at all ... Ralf From owner-linux-mips@oss.sgi.com Wed Feb 20 07:00:29 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g1KF0Ta13464 for linux-mips-outgoing; Wed, 20 Feb 2002 07:00:29 -0800 Received: from dea.linux-mips.net (a1as06-p249.stg.tli.de [195.252.187.249]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g1KF0N913443 for ; Wed, 20 Feb 2002 07:00:24 -0800 Received: (from ralf@localhost) by dea.linux-mips.net (8.11.6/8.11.1) id g1KDAqd16227; Wed, 20 Feb 2002 14:10:52 +0100 Date: Wed, 20 Feb 2002 14:10:51 +0100 From: Ralf Baechle To: Greg Lindahl Cc: linux-mips@oss.sgi.com Subject: Re: FPU emulator unsafe for SMP? Message-ID: <20020220141051.D15588@dea.linux-mips.net> References: <3C6C6ACF.CAD2FFC@mvista.com> <20020215031118.B21011@dea.linux-mips.net> <20020214232030.A3601@mvista.com> <20020215003037.A3670@mvista.com> <002b01c1b607$6afbd5c0$10eca8c0@grendel> <20020219140514.C25739@mvista.com> <00af01c1b9a2$c0d6d5f0$10eca8c0@grendel> <20020219171238.E25739@mvista.com> <20020219222835.A4195@wumpus.skymv.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <20020219222835.A4195@wumpus.skymv.com>; from lindahl@conservativecomputer.com on Tue, Feb 19, 2002 at 10:28:35PM -0500 X-Accept-Language: de,en,fr Sender: owner-linux-mips@oss.sgi.com Precedence: bulk On Tue, Feb 19, 2002 at 10:28:35PM -0500, Greg Lindahl wrote: > What you propose, locking the fpu owner to the current cpu, will not > result in a fair solution. Imagine a 2 cpu machine with 2 processes > using integer math and 1 using floating point... how much cpu time > will each process get? Imagine all the funky effects. Now add in a > MIPS design in which interrupts are not delivered uniformly to all the > cpus... I don't know if there are any or will ever be any, but... They already exist, SGI Origin. Ralf From owner-linux-mips@oss.sgi.com Wed Feb 20 07:00:40 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g1KF0et13515 for linux-mips-outgoing; Wed, 20 Feb 2002 07:00:40 -0800 Received: from dea.linux-mips.net (a1as06-p249.stg.tli.de [195.252.187.249]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g1KF0Z913501 for ; Wed, 20 Feb 2002 07:00:36 -0800 Received: (from ralf@localhost) by dea.linux-mips.net (8.11.6/8.11.1) id g1KD9HY16210; Wed, 20 Feb 2002 14:09:17 +0100 Date: Wed, 20 Feb 2002 14:09:17 +0100 From: Ralf Baechle To: Jun Sun Cc: "Kevin D. Kissell" , linux-mips@oss.sgi.com Subject: Re: FPU emulator unsafe for SMP? Message-ID: <20020220140917.C15588@dea.linux-mips.net> References: <3C6C6ACF.CAD2FFC@mvista.com> <20020215031118.B21011@dea.linux-mips.net> <20020214232030.A3601@mvista.com> <20020215003037.A3670@mvista.com> <002b01c1b607$6afbd5c0$10eca8c0@grendel> <20020219140514.C25739@mvista.com> <00af01c1b9a2$c0d6d5f0$10eca8c0@grendel> <20020219171238.E25739@mvista.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <20020219171238.E25739@mvista.com>; from jsun@mvista.com on Tue, Feb 19, 2002 at 05:12:38PM -0800 X-Accept-Language: de,en,fr Sender: owner-linux-mips@oss.sgi.com Precedence: bulk On Tue, Feb 19, 2002 at 05:12:38PM -0800, Jun Sun wrote: > > It's gotta be done. I mean, the last I heard (which was a long > > time ago) mips64 Linux was keeping the CPU node number in > > a watchpoint register (or something equally unwholesome) > > It seems that people are getting smarter by putting cpu id to > context register. In fact isn't this part of new MIPS > standard? The context register is actually intended to be used for indexing a flat 4mb array of pagetables on a 32-bit processor. It's a bit ill-defined on R4000-class processors as it assumes a size of 8 bytes per pte, so cannot be used in the Linux/MIPS kernel without shifting bits around. Also in case of Linux it means entering the world of cache aliases ... Ralf From owner-linux-mips@oss.sgi.com Wed Feb 20 07:00:03 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g1KF03D13368 for linux-mips-outgoing; Wed, 20 Feb 2002 07:00:03 -0800 Received: from dea.linux-mips.net (a1as06-p249.stg.tli.de [195.252.187.249]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g1KExm913344 for ; Wed, 20 Feb 2002 06:59:51 -0800 Received: (from ralf@localhost) by dea.linux-mips.net (8.11.6/8.11.1) id g1KDIfO16279; Wed, 20 Feb 2002 14:18:41 +0100 Date: Wed, 20 Feb 2002 14:18:41 +0100 From: Ralf Baechle To: Jun Sun Cc: Greg Lindahl , linux-mips@oss.sgi.com Subject: Re: FPU emulator unsafe for SMP? Message-ID: <20020220141841.E15588@dea.linux-mips.net> References: <3C6C6ACF.CAD2FFC@mvista.com> <20020215031118.B21011@dea.linux-mips.net> <20020214232030.A3601@mvista.com> <20020215003037.A3670@mvista.com> <002b01c1b607$6afbd5c0$10eca8c0@grendel> <20020219140514.C25739@mvista.com> <00af01c1b9a2$c0d6d5f0$10eca8c0@grendel> <20020219171238.E25739@mvista.com> <20020219222835.A4195@wumpus.skymv.com> <20020219202434.F25739@mvista.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <20020219202434.F25739@mvista.com>; from jsun@mvista.com on Tue, Feb 19, 2002 at 08:24:34PM -0800 X-Accept-Language: de,en,fr Sender: owner-linux-mips@oss.sgi.com Precedence: bulk On Tue, Feb 19, 2002 at 08:24:34PM -0800, Jun Sun wrote: > > What you propose, locking the fpu owner to the current cpu, will not > > result in a fair solution. Imagine a 2 cpu machine with 2 processes > > using integer math and 1 using floating point... how much cpu time > > will each process get? > > In this case, proc that uses fpu gets about 50% of one cpu, i.e., 25% of > total load, while the other two integer math proces split the rest 75%, > which gives 37.5% each. Not too bad in my opinion. Certainly not good either. Still not having checked the x86 solution I currently favor the approach of only always storing the fp context but lazily restoring it. Ralf From owner-linux-mips@oss.sgi.com Wed Feb 20 07:01:53 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g1KF1rW13757 for linux-mips-outgoing; Wed, 20 Feb 2002 07:01:53 -0800 Received: from dea.linux-mips.net (a1as06-p249.stg.tli.de [195.252.187.249]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g1KF1m913754 for ; Wed, 20 Feb 2002 07:01:49 -0800 Received: (from ralf@localhost) by dea.linux-mips.net (8.11.6/8.11.1) id g1KCNm615858; Wed, 20 Feb 2002 13:23:48 +0100 Date: Wed, 20 Feb 2002 13:23:48 +0100 From: Ralf Baechle To: santhosh <ps.santhosh@gdatech.co.in> Cc: linux-mips@oss.sgi.com Subject: Re: MIPS64 Kernel SB1250 Message-ID: <20020220132348.A15588@dea.linux-mips.net> References: <3C73DE53.1D7D1930@gdatech.co.in> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <3C73DE53.1D7D1930@gdatech.co.in>; from ps.santhosh@gdatech.co.in on Wed, Feb 20, 2002 at 11:05:15PM +0530 X-Accept-Language: de,en,fr Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by oss.sgi.com id g1KF1o913755 Sender: owner-linux-mips@oss.sgi.com Precedence: bulk On Wed, Feb 20, 2002 at 11:05:15PM +0530, santhosh wrote: To: santhosh <ps.santhosh@gdatech.co.in> ^^ (Your from address has a control-C character embedded. That will make many mailsystems drop your email!) > I am working one MIPS64 type processor(SB1250 Sibyte family) > I need MIPS64 kernel to porting my project board(SB1250).. > > shall I get it?? or tell where can i go to collect..... Ask Sibyte / Broadcom for their latest kernel. Unfortunately recently they changed the server's name so I don't know it offhand. Ralf From owner-linux-mips@oss.sgi.com Wed Feb 20 07:03:01 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g1KF31k13867 for linux-mips-outgoing; Wed, 20 Feb 2002 07:03:01 -0800 Received: from dea.linux-mips.net (a1as06-p249.stg.tli.de [195.252.187.249]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g1KF2t913847 for ; Wed, 20 Feb 2002 07:02:56 -0800 Received: (from ralf@localhost) by dea.linux-mips.net (8.11.6/8.11.1) id g1KDunJ16534; Wed, 20 Feb 2002 14:56:49 +0100 Date: Wed, 20 Feb 2002 14:56:49 +0100 From: Ralf Baechle To: Florian Lohoff Cc: Dominic Sweetman , Jun Sun , "Kevin D. Kissell" , linux-mips@oss.sgi.com Subject: Re: FPU emulator unsafe for SMP? Message-ID: <20020220145649.H15588@dea.linux-mips.net> References: <3C6C6ACF.CAD2FFC@mvista.com> <20020215031118.B21011@dea.linux-mips.net> <20020214232030.A3601@mvista.com> <20020215003037.A3670@mvista.com> <002b01c1b607$6afbd5c0$10eca8c0@grendel> <20020219140514.C25739@mvista.com> <00af01c1b9a2$c0d6d5f0$10eca8c0@grendel> <20020219171238.E25739@mvista.com> <15475.24039.877276.257999@gladsmuir.algor.co.uk> <20020220093012.GF11654@paradigm.rfc822.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <20020220093012.GF11654@paradigm.rfc822.org>; from flo@rfc822.org on Wed, Feb 20, 2002 at 10:30:12AM +0100 X-Accept-Language: de,en,fr Sender: owner-linux-mips@oss.sgi.com Precedence: bulk On Wed, Feb 20, 2002 at 10:30:12AM +0100, Florian Lohoff wrote: > > It may be heretical... but the lazy FPU context switch was invented > > for 16MHz CPUs using a write-through cache and non-burst memory, where > > saving 16 x 64-bit registers took 6us or so (and quite a bit less, > > later, to read them back). Call it 8us. > > We are still running on good ol Decstations *snief* Going the way to > make it SMP only like others archs seem to do it would be good. While I don't intend to kill support for any of the old machines like DECstations as long as anybody keeps maintaining support for them certainly performance tradeoffs in generic code will not be based on antique systems ... Ralf From owner-linux-mips@oss.sgi.com Wed Feb 20 07:23:53 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g1KFNr514515 for linux-mips-outgoing; Wed, 20 Feb 2002 07:23:53 -0800 Received: from sgi.com (sgi-too.SGI.COM [204.94.211.39]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g1KFNj914512 for ; Wed, 20 Feb 2002 07:23:45 -0800 Received: from dea.linux-mips.net (a1as06-p249.stg.tli.de [195.252.187.249]) by sgi.com (980327.SGI.8.8.8-aspam/980304.SGI-aspam: SGI does not authorize the use of its proprietary systems or networks for unsolicited or bulk email from the Internet.) via ESMTP id GAA04445 for ; Wed, 20 Feb 2002 06:23:41 -0800 (PST) mail_from (ralf@linux-mips.net) Received: (from ralf@localhost) by dea.linux-mips.net (8.11.6/8.11.1) id g1KDoNa16490; Wed, 20 Feb 2002 14:50:23 +0100 Date: Wed, 20 Feb 2002 14:50:23 +0100 From: Ralf Baechle To: "Kevin D. Kissell" Cc: Daniel Jacobowitz , Jun Sun , Greg Lindahl , linux-mips@oss.sgi.com Subject: Re: FPU emulator unsafe for SMP? Message-ID: <20020220145023.G15588@dea.linux-mips.net> References: <20020214232030.A3601@mvista.com> <20020215003037.A3670@mvista.com> <002b01c1b607$6afbd5c0$10eca8c0@grendel> <20020219140514.C25739@mvista.com> <00af01c1b9a2$c0d6d5f0$10eca8c0@grendel> <20020219171238.E25739@mvista.com> <20020219222835.A4195@wumpus.skymv.com> <20020219202434.F25739@mvista.com> <20020219233222.A22099@nevyn.them.org> <006001c1b9f7$7da1c920$0deca8c0@Ulysses> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <006001c1b9f7$7da1c920$0deca8c0@Ulysses>; from kevink@mips.com on Wed, Feb 20, 2002 at 11:14:02AM +0100 X-Accept-Language: de,en,fr Sender: owner-linux-mips@oss.sgi.com Precedence: bulk On Wed, Feb 20, 2002 at 11:14:02AM +0100, Kevin D. Kissell wrote: > One cannot make design decisions based on what one > "thinks is pretty common". Binding threads to CPUs > (CPU affinity) is almost always more efficient when > the behavior of the workload looks like batch FORTRAN > processing. It's when one gets a mix of computational > and interactive jobs that it often creates unfortunate > artifacts, and thus must be handled with care. Today's CPU performance is mainly dictated by exploiting caches as well as possible. So that means timeslices should be as long as possible. At the same time we have the contradicting issue of scheduling latency. The Linux scheduler already contains some heuristics that is trying to find a sweet spot in between those two. > > Not true. For instance, on a processor with hardware FPU, setjmp() > > will save FPU registers. That means most processes will actually end > > up taking the FPU at least once. > > Almost all MIPS/Linux threads, from init() onward, have FPU state, > due to setjmp(), printf() (which uses the FP registers even > if one does not specify a floating point data item or format), etc. Printf doesn't ever use floating point due to possible rounding errors. > Has anyone ever measured the performance impact of > lazy FPU context switching on MIPS? It's one of those > ideas that was trendy in the 1980's, but I recall that when > we implemented it for SVR2 on the Fairchild Clipper > (which had only 16 FP registers), the measured improvement > on average context switch time was tiny - a percent or so. > We left it in, because it worked and it *was* an improvement, > but we would never have gone through the hassle had we > known how little it would buy us. These days I assume the difference to be greater for cache reasons. Our stored fp registers take 256 bytes and also tend to be located at a constant offset from start of the 8kB (64-bit: 16kB) aligned task_struct. Combined with the usually low degree of cache associativity on MIPS that means we'll frequently miss L1. And many MIPS systems still don't come with L2 caches, so fiddling with anything stored in the task_struct may easily become quite expensive. In fact on the worst case CPU, the R4000PC context switching the fprs will result in guaranteed worst case performance, we'll *always* have to writeback / refill the affected cache lines from memory. In this context I should also note that the FP context used by the kernel stores in the 32-bit kernel provides space for 32 double precission registers. We only use the 16/32 register model so will pump twice as many cachelines over the memory bus at postcard speed ... Btw, Fairchild Clipper is the same Clipper that was used by Intergraph? > It occurs to me that we can to some degree "split > the difference" on FPU context management for > SMP if we *always* save the FPU state when a > thread switches out, but preserve the logic that > schedules threads with CU1 inhibited so that the > context is only *loaded* if the thread executes > FP instructions. That would save about half of > the context switch overhead for non-FP-intensive > threads, while eliminating the migration problem. As I also suggested in my other mail. Guess we got a winner. Ralf From owner-linux-mips@oss.sgi.com Wed Feb 20 07:41:44 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g1KFfi316823 for linux-mips-outgoing; Wed, 20 Feb 2002 07:41:44 -0800 Received: from mx.mips.com (mx.mips.com [206.31.31.226]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g1KFfb916814; Wed, 20 Feb 2002 07:41:37 -0800 Received: from newman.mips.com (ns-dmz [206.31.31.225]) by mx.mips.com (8.9.3/8.9.0) with ESMTP id GAA14433; Wed, 20 Feb 2002 06:41:29 -0800 (PST) Received: from Ulysses (ulysses [192.168.236.13]) by newman.mips.com (8.9.3/8.9.0) with SMTP id GAA23848; Wed, 20 Feb 2002 06:41:28 -0800 (PST) Message-ID: <002f01c1ba1c$d6d7c4c0$0deca8c0@Ulysses> From: "Kevin D. Kissell" To: "Ralf Baechle" , "Jun Sun" Cc: References: <3C6C6ACF.CAD2FFC@mvista.com> <20020215031118.B21011@dea.linux-mips.net> <20020214232030.A3601@mvista.com> <20020215003037.A3670@mvista.com> <002b01c1b607$6afbd5c0$10eca8c0@grendel> <20020219140514.C25739@mvista.com> <00af01c1b9a2$c0d6d5f0$10eca8c0@grendel> <20020219171238.E25739@mvista.com> <20020220140917.C15588@dea.linux-mips.net> Subject: Re: FPU emulator unsafe for SMP? Date: Wed, 20 Feb 2002 15:42:33 +0100 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.4807.1700 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4807.1700 Sender: owner-linux-mips@oss.sgi.com Precedence: bulk Ralf wrote: > On Tue, Feb 19, 2002 at 05:12:38PM -0800, Jun Sun wrote: > > > > It's gotta be done. I mean, the last I heard (which was a long > > > time ago) mips64 Linux was keeping the CPU node number in > > > a watchpoint register (or something equally unwholesome) > > > > It seems that people are getting smarter by putting cpu id to > > context register. In fact isn't this part of new MIPS > > standard? > > The context register is actually intended to be used for indexing a flat > 4mb array of pagetables on a 32-bit processor. It's a bit ill-defined > on R4000-class processors as it assumes a size of 8 bytes per pte, so > cannot be used in the Linux/MIPS kernel without shifting bits around. I think what Jun Sun is alluding to is the fact that MIPS has announced that the next revision of the MIPS privileged resource architecture will support "variable geometry" MMU features that will, among other things, allow for the Context register to be configured to provide for smaller PTEs and non-flat page table organizations. It was announced and described at Microprocessor Forum last year. The spec has been stable for a long time now, but I don't know if it's yet public. Regards, Kevin K. From owner-linux-mips@oss.sgi.com Wed Feb 20 07:46:58 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g1KFkwf16994 for linux-mips-outgoing; Wed, 20 Feb 2002 07:46:58 -0800 Received: from delta.ds2.pg.gda.pl (macro@delta.ds2.pg.gda.pl [213.192.72.1]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g1KFkk916990; Wed, 20 Feb 2002 07:46:46 -0800 Received: from localhost by delta.ds2.pg.gda.pl (8.9.3/8.9.3) with SMTP id PAA08601; Wed, 20 Feb 2002 15:46:32 +0100 (MET) Date: Wed, 20 Feb 2002 15:46:32 +0100 (MET) From: "Maciej W. Rozycki" To: Ralf Baechle cc: Jun Sun , "Kevin D. Kissell" , linux-mips@oss.sgi.com Subject: Re: FPU emulator unsafe for SMP? In-Reply-To: <20020220140917.C15588@dea.linux-mips.net> Message-ID: Organization: Technical University of Gdansk MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-linux-mips@oss.sgi.com Precedence: bulk On Wed, 20 Feb 2002, Ralf Baechle wrote: > The context register is actually intended to be used for indexing a flat > 4mb array of pagetables on a 32-bit processor. It's a bit ill-defined > on R4000-class processors as it assumes a size of 8 bytes per pte, so > cannot be used in the Linux/MIPS kernel without shifting bits around. Ill??? I think someone was just longsighted enough not to limit PTEs to 38-bit physical addresses. A shift costs a single cycle if we want to save memory. -- + Maciej W. Rozycki, Technical University of Gdansk, Poland + +--------------------------------------------------------------+ + e-mail: macro@ds2.pg.gda.pl, PGP key available + From owner-linux-mips@oss.sgi.com Wed Feb 20 08:06:17 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g1KG6Hf18263 for linux-mips-outgoing; Wed, 20 Feb 2002 08:06:17 -0800 Received: from dea.linux-mips.net (a1as06-p249.stg.tli.de [195.252.187.249]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g1KG6C918260 for ; Wed, 20 Feb 2002 08:06:12 -0800 Received: (from ralf@localhost) by dea.linux-mips.net (8.11.6/8.11.1) id g1KF5D817400; Wed, 20 Feb 2002 16:05:13 +0100 Date: Wed, 20 Feb 2002 16:05:13 +0100 From: Ralf Baechle To: "Maciej W. Rozycki" Cc: Jun Sun , "Kevin D. Kissell" , linux-mips@oss.sgi.com Subject: Re: FPU emulator unsafe for SMP? Message-ID: <20020220160513.A17227@dea.linux-mips.net> References: <20020220140917.C15588@dea.linux-mips.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: ; from macro@ds2.pg.gda.pl on Wed, Feb 20, 2002 at 03:46:32PM +0100 X-Accept-Language: de,en,fr Sender: owner-linux-mips@oss.sgi.com Precedence: bulk On Wed, Feb 20, 2002 at 03:46:32PM +0100, Maciej W. Rozycki wrote: > > The context register is actually intended to be used for indexing a flat > > 4mb array of pagetables on a 32-bit processor. It's a bit ill-defined > > on R4000-class processors as it assumes a size of 8 bytes per pte, so > > cannot be used in the Linux/MIPS kernel without shifting bits around. > > Ill??? I think someone was just longsighted enough not to limit PTEs to > 38-bit physical addresses. A shift costs a single cycle if we want to > save memory. The idea of the register was to directly generate the address of a PTE. An extra instruction in TLB exception handlers isn't only visible in performance, it also means introducing constraints on the address itself - an arithmetic shift by one bit for 4 byte PTEs will result in the two high bits of the address being identical, an arithmetic shift will make the high bit a null etc. Just on 32-bit kernels on 64-bit hw you're lucky, you have a bit 32 in c0_context which will be shifted into bit 31. Messy? Ralf From owner-linux-mips@oss.sgi.com Wed Feb 20 08:45:53 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g1KGjr118896 for linux-mips-outgoing; Wed, 20 Feb 2002 08:45:53 -0800 Received: from delta.ds2.pg.gda.pl (delta.ds2.pg.gda.pl [213.192.72.1]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g1KGjK918892; Wed, 20 Feb 2002 08:45:45 -0800 Received: from localhost by delta.ds2.pg.gda.pl (8.9.3/8.9.3) with SMTP id QAA10233; Wed, 20 Feb 2002 16:45:08 +0100 (MET) Date: Wed, 20 Feb 2002 16:45:08 +0100 (MET) From: "Maciej W. Rozycki" To: Ralf Baechle cc: Jun Sun , "Kevin D. Kissell" , linux-mips@oss.sgi.com Subject: Re: FPU emulator unsafe for SMP? In-Reply-To: <20020220160513.A17227@dea.linux-mips.net> Message-ID: Organization: Technical University of Gdansk MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-linux-mips@oss.sgi.com Precedence: bulk On Wed, 20 Feb 2002, Ralf Baechle wrote: > > Ill??? I think someone was just longsighted enough not to limit PTEs to > > 38-bit physical addresses. A shift costs a single cycle if we want to > > save memory. > > The idea of the register was to directly generate the address of a PTE. And it does -- doesn't it? It simply cannot fit all needs at once. What about pages larger than 4kB, for example? > An extra instruction in TLB exception handlers isn't only visible in > performance, it also means introducing constraints on the address itself - The performance is an issue, of course -- you get about 10% hit in the exception handler. You need to decide (possibly at the run time) what's more important: the gain from a faster TLB refill or the gain from a compression of page tables. > an arithmetic shift by one bit for 4 byte PTEs will result in the two > high bits of the address being identical, an arithmetic shift will make > the high bit a null etc. Just on 32-bit kernels on 64-bit hw you're > lucky, you have a bit 32 in c0_context which will be shifted into bit 31. Since the address is virtual -- what's the deal? > Messy? Hardly. -- + Maciej W. Rozycki, Technical University of Gdansk, Poland + +--------------------------------------------------------------+ + e-mail: macro@ds2.pg.gda.pl, PGP key available + From owner-linux-mips@oss.sgi.com Wed Feb 20 13:53:38 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g1KLrcA27120 for linux-mips-outgoing; Wed, 20 Feb 2002 13:53:38 -0800 Received: from nixon.xkey.com (nixon.xkey.com [209.245.148.124]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g1KLrZ927117 for ; Wed, 20 Feb 2002 13:53:35 -0800 Received: (qmail 19733 invoked from network); 20 Feb 2002 20:53:34 -0000 Received: from localhost (HELO localhost.conservativecomputer.com) (127.0.0.1) by localhost with SMTP; 20 Feb 2002 20:53:34 -0000 Received: (from lindahl@localhost) by localhost.conservativecomputer.com (8.11.6/8.11.0) id g1KKrWr02843 for linux-mips@oss.sgi.com; Wed, 20 Feb 2002 15:53:32 -0500 X-Authentication-Warning: localhost.hpti.com: lindahl set sender to lindahl@conservativecomputer.com using -f Date: Wed, 20 Feb 2002 15:53:32 -0500 From: Greg Lindahl To: linux-mips@oss.sgi.com Subject: Re: FPU emulator unsafe for SMP? Message-ID: <20020220155332.A2766@wumpus.skymv.com> Mail-Followup-To: linux-mips@oss.sgi.com References: <20020215003037.A3670@mvista.com> <002b01c1b607$6afbd5c0$10eca8c0@grendel> <20020219140514.C25739@mvista.com> <00af01c1b9a2$c0d6d5f0$10eca8c0@grendel> <20020219171238.E25739@mvista.com> <20020219222835.A4195@wumpus.skymv.com> <20020219202434.F25739@mvista.com> <20020219233222.A22099@nevyn.them.org> <006001c1b9f7$7da1c920$0deca8c0@Ulysses> <20020220145023.G15588@dea.linux-mips.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <20020220145023.G15588@dea.linux-mips.net>; from ralf@oss.sgi.com on Wed, Feb 20, 2002 at 02:50:23PM +0100 Sender: owner-linux-mips@oss.sgi.com Precedence: bulk On Wed, Feb 20, 2002 at 02:50:23PM +0100, Ralf Baechle wrote: > These days I assume the difference to be greater for cache reasons. Our > stored fp registers take 256 bytes and also tend to be located at a constant > offset from start of the 8kB (64-bit: 16kB) aligned task_struct. Combined > with the usually low degree of cache associativity on MIPS that means > we'll frequently miss L1. Ouch. That cache miss is much more expensive than saving the FPU state. Can we un-align task_struct? I see it is allocated as a whole page, but it's apparently much smaller. We could add an offset to its start (hm, should be a multiple of the cache line size), and that ought to give much nicer L1 usage. Any other struct which is allocated as a whole page but is much smaller could be a candidate for this, too. But we should experiment once to see if it's a win before getting that excited. greg From owner-linux-mips@oss.sgi.com Wed Feb 20 14:58:41 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g1KMwfk31536 for linux-mips-outgoing; Wed, 20 Feb 2002 14:58:41 -0800 Received: from dtla2.teknuts.com (adsl-66-125-62-110.dsl.lsan03.pacbell.net [66.125.62.110]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g1KMwd931533 for ; Wed, 20 Feb 2002 14:58:39 -0800 Received: from computer ([208.187.134.72]) (authenticated) by dtla2.teknuts.com (8.11.3/8.10.1) with ESMTP id g1KLwbu02589 for ; Wed, 20 Feb 2002 13:58:37 -0800 Message-ID: <000d01c1ba5a$083b1fc0$6701a8c0@computer> From: "Robert Rusek" To: Subject: Latest kernel? Date: Wed, 20 Feb 2002 14:00:36 -0800 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.2600.0000 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 Sender: owner-linux-mips@oss.sgi.com Precedence: bulk Where can I obtain the latest stable build of the kernel. I need it to work on my SGI IP22. If possible I do not want to use CSV since I do not have a high speed internet connection. Any help would be greatly appreciated. Thanks, Rob. From owner-linux-mips@oss.sgi.com Wed Feb 20 15:15:14 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g1KNFEj31962 for linux-mips-outgoing; Wed, 20 Feb 2002 15:15:14 -0800 Received: from noose.gt.owl.de (postfix@noose.gt.owl.de [62.52.19.4]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g1KNF8931958 for ; Wed, 20 Feb 2002 15:15:09 -0800 Received: by noose.gt.owl.de (Postfix, from userid 10) id DBFD87FA; Wed, 20 Feb 2002 23:14:41 +0100 (CET) Received: by localhost (Postfix, from userid 1000) id 6FE0A1A2C7; Wed, 20 Feb 2002 23:15:07 +0100 (CET) Date: Wed, 20 Feb 2002 23:15:07 +0100 From: Florian Lohoff To: Robert Rusek Cc: linux-mips@oss.sgi.com Subject: Re: Latest kernel? Message-ID: <20020220221507.GC29624@paradigm.rfc822.org> References: <000d01c1ba5a$083b1fc0$6701a8c0@computer> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="PuGuTyElPB9bOcsM" Content-Disposition: inline In-Reply-To: <000d01c1ba5a$083b1fc0$6701a8c0@computer> User-Agent: Mutt/1.3.27i Organization: rfc822 - pure communication Sender: owner-linux-mips@oss.sgi.com Precedence: bulk --PuGuTyElPB9bOcsM Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Feb 20, 2002 at 02:00:36PM -0800, Robert Rusek wrote: > Where can I obtain the latest stable build of the kernel. I need it to w= ork > on my SGI IP22. If possible I do not want to use CSV since I do not have= a > high speed internet connection. Any help would be greatly appreciated. I dont think there are regular tarballs - Take the pain once - checkout the kernel and before modifying make a tarball. Then you can just cvs -z3 update -Pd=20 Your tarball all the time. BTW: You should checkout -r linux_2_4 as i dont think 2.5 has success reports on mips already. Flo --=20 Florian Lohoff flo@rfc822.org +49-5201-669912 Nine nineth on september the 9th Welcome to the new billenium --PuGuTyElPB9bOcsM Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.6 (GNU/Linux) Comment: For info see http://www.gnupg.org iD8DBQE8dB/rUaz2rXW+gJcRAgfdAJ4ltnzDlHK7sE91tPl+Xxt3jW/X4ACg0Nhf zrbHlkNfmRLglhJx/Mgaveg= =Aaiy -----END PGP SIGNATURE----- --PuGuTyElPB9bOcsM-- From owner-linux-mips@oss.sgi.com Wed Feb 20 18:36:17 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g1L2aHd04887 for linux-mips-outgoing; Wed, 20 Feb 2002 18:36:17 -0800 Received: from host099.momenco.com (IDENT:root@www.momenco.com [64.169.228.99]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g1L2a9904884 for ; Wed, 20 Feb 2002 18:36:09 -0800 Received: from beagle (beagle.internal.momenco.com [192.168.0.115]) by host099.momenco.com (8.11.6/8.11.6) with SMTP id g1L1a5R26771 for ; Wed, 20 Feb 2002 17:36:05 -0800 From: "Matthew Dharm" To: "Linux-MIPS" Subject: set_io_port_base()? Date: Wed, 20 Feb 2002 17:36:05 -0800 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0) X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400 Importance: Normal Sender: owner-linux-mips@oss.sgi.com Precedence: bulk So, what's the proper usage for set_io_port_base()? I'm trying to bring up Linux on our newest board (the Ocelot-G -- see www.momenco.com for more information). I think I'm pretty far along, but I can't get a plug-in PCI ethernet device to work. What I get is: eepro100.c:v1.09j-t 9/29/99 Donald Becker http://cesdis.gsfc.nasa.gov/linux/drivers/eepro100.html eepro100.c: $Revision: 1.36 $ 2000/11/17 Modified by Andrey V. Savochkin and others PCI setting cache line size to 8 from 0 eth0: Invalid EEPROM checksum 0x0000, check settings before activating this device! eth0: Intel Corp. 82559ER, 00:00:00:00:00:00, IRQ 9. Receiver lock-up bug exists -- enabling work-around. Board assembly 000000-000, Physical connectors present: Primary interface chip None PHY #0. General self-test: passed. Serial sub-system self-test: passed. Internal registers self-test: passed. ROM checksum self-test: passed (0x1d68d8db). Receiver lock-up workaround activated. Now, I'm pretty sure this has something to do with the initcall to set_io_port_base() and ioremap(), which are in my setup.c (copied from linux/arch/mips/gt64120/momenco_ocelot/setup.c and modified). Without that bit of code at the bottom of that function, I don't even get this -- it just crashes. So I know I need this code, but I'm just not certain what/how I should be using it... My initial guess is that it's used to map some virtual address space onto the physical addresses needed to actually generate PCI I/O transactions, but that's just a guess. If that's right, then the code I'm using _should_ work... I call ioremap() with the physical base and size, and then set_io_port_base() using the result of ioremap(). Anyone have any thoughts? Matt -- Matthew D. Dharm Senior Software Designer Momentum Computer Inc. 1815 Aston Ave. Suite 107 (760) 431-8663 X-115 Carlsbad, CA 92008-7310 Momentum Works For You www.momenco.com From owner-linux-mips@oss.sgi.com Wed Feb 20 18:39:05 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g1L2d5T04987 for linux-mips-outgoing; Wed, 20 Feb 2002 18:39:05 -0800 Received: from host099.momenco.com (IDENT:root@www.momenco.com [64.169.228.99]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g1L2cx904982; Wed, 20 Feb 2002 18:38:59 -0800 Received: from beagle (beagle.internal.momenco.com [192.168.0.115]) by host099.momenco.com (8.11.6/8.11.6) with SMTP id g1L1cxR26789; Wed, 20 Feb 2002 17:38:59 -0800 From: "Matthew Dharm" To: "Ralf Baechle" , "Linux-MIPS" Subject: Adding code to the tree... Date: Wed, 20 Feb 2002 17:38:59 -0800 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0) X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400 Importance: Normal Sender: owner-linux-mips@oss.sgi.com Precedence: bulk So, I'm porting Linux to our latest board... and I've got this pile of new code, and I'm itching to check it in somewhere. It's not perfect yet, but the board definately starts to come up, and the Symbios 53c875 driver can probe and identify devices on the SCSI bus.... so I'm thinking that I'm doing pretty well here. So, if I send this code as is, will it be accepted into the tree? Or do I have to wait until it's completely finished before I send it? I can see arguments either way, so I'm guessing it really comes down to Ralf's personal preferences... Matt P.S. Is there any way to get permission to make CVS commits, or should everything be done via Ralf? I've got another 2 designs behind this one which will all get Linux ported to them... -- Matthew D. Dharm Senior Software Designer Momentum Computer Inc. 1815 Aston Ave. Suite 107 (760) 431-8663 X-115 Carlsbad, CA 92008-7310 Momentum Works For You www.momenco.com From owner-linux-mips@oss.sgi.com Wed Feb 20 18:51:47 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g1L2plS05167 for linux-mips-outgoing; Wed, 20 Feb 2002 18:51:47 -0800 Received: from dea.linux-mips.net (a1as20-p220.stg.tli.de [195.252.194.220]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g1L2pg905164 for ; Wed, 20 Feb 2002 18:51:42 -0800 Received: (from ralf@localhost) by dea.linux-mips.net (8.11.6/8.11.1) id g1L1pLm29629; Thu, 21 Feb 2002 02:51:21 +0100 Date: Thu, 21 Feb 2002 02:51:21 +0100 From: Ralf Baechle To: Matthew Dharm Cc: Linux-MIPS Subject: Re: Adding code to the tree... Message-ID: <20020221025121.A29466@dea.linux-mips.net> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: ; from mdharm@momenco.com on Wed, Feb 20, 2002 at 05:38:59PM -0800 X-Accept-Language: de,en,fr Sender: owner-linux-mips@oss.sgi.com Precedence: bulk On Wed, Feb 20, 2002 at 05:38:59PM -0800, Matthew Dharm wrote: > So, I'm porting Linux to our latest board... and I've got this pile of > new code, and I'm itching to check it in somewhere. It's not perfect > yet, but the board definately starts to come up, and the Symbios > 53c875 driver can probe and identify devices on the SCSI bus.... so > I'm thinking that I'm doing pretty well here. > > So, if I send this code as is, will it be accepted into the tree? Or > do I have to wait until it's completely finished before I send it? I > can see arguments either way, so I'm guessing it really comes down to > Ralf's personal preferences... I also take patches for partial support if I have confidence that the support will be completed not too far after. > P.S. Is there any way to get permission to make CVS commits, or should > everything be done via Ralf? I've got another 2 designs behind this > one which will all get Linux ported to them... The intent is to move CVS to another machine in the near future. By then I'll be able to generate accounts as I want but at this time it's a pain to go through the SGI burocracy so I'm trying to avoid it. Ralf From owner-linux-mips@oss.sgi.com Wed Feb 20 18:58:10 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g1L2wAs05358 for linux-mips-outgoing; Wed, 20 Feb 2002 18:58:10 -0800 Received: from dea.linux-mips.net (a1as20-p220.stg.tli.de [195.252.194.220]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g1L2w3905355 for ; Wed, 20 Feb 2002 18:58:04 -0800 Received: (from ralf@localhost) by dea.linux-mips.net (8.11.6/8.11.1) id g1L1vtD29867; Thu, 21 Feb 2002 02:57:55 +0100 Date: Thu, 21 Feb 2002 02:57:55 +0100 From: Ralf Baechle To: Matthew Dharm Cc: Linux-MIPS Subject: Re: set_io_port_base()? Message-ID: <20020221025755.B29466@dea.linux-mips.net> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: ; from mdharm@momenco.com on Wed, Feb 20, 2002 at 05:36:05PM -0800 X-Accept-Language: de,en,fr Sender: owner-linux-mips@oss.sgi.com Precedence: bulk On Wed, Feb 20, 2002 at 05:36:05PM -0800, Matthew Dharm wrote: > Now, I'm pretty sure this has something to do with the initcall to > set_io_port_base() and ioremap(), which are in my setup.c (copied from > linux/arch/mips/gt64120/momenco_ocelot/setup.c and modified). Without > that bit of code at the bottom of that function, I don't even get > this -- it just crashes. So I know I need this code, but I'm just not > certain what/how I should be using it... > > My initial guess is that it's used to map some virtual address space > onto the physical addresses needed to actually generate PCI I/O > transactions, but that's just a guess. If that's right, then the code > I'm using _should_ work... I call ioremap() with the physical base and > size, and then set_io_port_base() using the result of ioremap(). That is exactly the intended use. Ralf From owner-linux-mips@oss.sgi.com Wed Feb 20 18:59:50 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g1L2xoh05426 for linux-mips-outgoing; Wed, 20 Feb 2002 18:59:50 -0800 Received: from dea.linux-mips.net (a1as20-p220.stg.tli.de [195.252.194.220]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g1L2xj905423 for ; Wed, 20 Feb 2002 18:59:46 -0800 Received: (from ralf@localhost) by dea.linux-mips.net (8.11.6/8.11.1) id g1L1xUD29890; Thu, 21 Feb 2002 02:59:30 +0100 Date: Thu, 21 Feb 2002 02:59:30 +0100 From: Ralf Baechle To: Florian Lohoff Cc: Robert Rusek , linux-mips@oss.sgi.com Subject: Re: Latest kernel? Message-ID: <20020221025930.C29466@dea.linux-mips.net> References: <000d01c1ba5a$083b1fc0$6701a8c0@computer> <20020220221507.GC29624@paradigm.rfc822.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <20020220221507.GC29624@paradigm.rfc822.org>; from flo@rfc822.org on Wed, Feb 20, 2002 at 11:15:07PM +0100 X-Accept-Language: de,en,fr Sender: owner-linux-mips@oss.sgi.com Precedence: bulk On Wed, Feb 20, 2002 at 11:15:07PM +0100, Florian Lohoff wrote: > > Where can I obtain the latest stable build of the kernel. I need it to work > > on my SGI IP22. If possible I do not want to use CSV since I do not have a > > high speed internet connection. Any help would be greatly appreciated. > > I dont think there are regular tarballs - Take the pain once - checkout > the kernel and before modifying make a tarball. Then you can just > > cvs -z3 update -Pd > > Your tarball all the time. BTW: You should checkout -r linux_2_4 as > i dont think 2.5 has success reports on mips already. I received success reports for some eval boards but at the same time 2.5 is a construction zone ... Ralf From owner-linux-mips@oss.sgi.com Wed Feb 20 19:05:29 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g1L35Tf05602 for linux-mips-outgoing; Wed, 20 Feb 2002 19:05:29 -0800 Received: from host099.momenco.com (IDENT:root@www.momenco.com [64.169.228.99]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g1L35L905599; Wed, 20 Feb 2002 19:05:21 -0800 Received: from beagle (beagle.internal.momenco.com [192.168.0.115]) by host099.momenco.com (8.11.6/8.11.6) with SMTP id g1L25LR26900; Wed, 20 Feb 2002 18:05:21 -0800 From: "Matthew Dharm" To: "Ralf Baechle" Cc: "Linux-MIPS" Subject: RE: set_io_port_base()? Date: Wed, 20 Feb 2002 18:05:21 -0800 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0) X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400 In-Reply-To: <20020221025755.B29466@dea.linux-mips.net> Importance: Normal Sender: owner-linux-mips@oss.sgi.com Precedence: bulk If it works as I think it does, then is the code in linux/arch/mips/gt64120/momenco_ocelot/setup.c correct? Specifically, it calls ioremap() and then calls set_io_port_base() with a very strange value -- it's the value from ioremap() modified by the I/O physical address base... That doesn't look right to me... or I just don't quite understand how this is supposed to work. Matt -- Matthew D. Dharm Senior Software Designer Momentum Computer Inc. 1815 Aston Ave. Suite 107 (760) 431-8663 X-115 Carlsbad, CA 92008-7310 Momentum Works For You www.momenco.com > -----Original Message----- > From: Ralf Baechle [mailto:ralf@oss.sgi.com] > Sent: Wednesday, February 20, 2002 5:58 PM > To: Matthew Dharm > Cc: Linux-MIPS > Subject: Re: set_io_port_base()? > > > On Wed, Feb 20, 2002 at 05:36:05PM -0800, Matthew Dharm wrote: > > > Now, I'm pretty sure this has something to do with the initcall to > > set_io_port_base() and ioremap(), which are in my setup.c > (copied from > > linux/arch/mips/gt64120/momenco_ocelot/setup.c and > modified). Without > > that bit of code at the bottom of that function, I don't even get > > this -- it just crashes. So I know I need this code, but > I'm just not > > certain what/how I should be using it... > > > > My initial guess is that it's used to map some virtual > address space > > onto the physical addresses needed to actually generate PCI I/O > > transactions, but that's just a guess. If that's right, > then the code > > I'm using _should_ work... I call ioremap() with the > physical base and > > size, and then set_io_port_base() using the result of ioremap(). > > That is exactly the intended use. > > Ralf > From owner-linux-mips@oss.sgi.com Wed Feb 20 19:08:47 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g1L38lr05675 for linux-mips-outgoing; Wed, 20 Feb 2002 19:08:47 -0800 Received: from host099.momenco.com (IDENT:root@www.momenco.com [64.169.228.99]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g1L38e905672; Wed, 20 Feb 2002 19:08:40 -0800 Received: from beagle (beagle.internal.momenco.com [192.168.0.115]) by host099.momenco.com (8.11.6/8.11.6) with SMTP id g1L28dR26915; Wed, 20 Feb 2002 18:08:39 -0800 From: "Matthew Dharm" To: "Ralf Baechle" Cc: "Linux-MIPS" Subject: RE: set_io_port_base()? Date: Wed, 20 Feb 2002 18:08:39 -0800 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0) X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400 In-Reply-To: <20020221025755.B29466@dea.linux-mips.net> Importance: Normal Sender: owner-linux-mips@oss.sgi.com Precedence: bulk Also, does this have to be done only for PCI I/O, or PCI memory also? Matt -- Matthew D. Dharm Senior Software Designer Momentum Computer Inc. 1815 Aston Ave. Suite 107 (760) 431-8663 X-115 Carlsbad, CA 92008-7310 Momentum Works For You www.momenco.com > -----Original Message----- > From: Ralf Baechle [mailto:ralf@oss.sgi.com] > Sent: Wednesday, February 20, 2002 5:58 PM > To: Matthew Dharm > Cc: Linux-MIPS > Subject: Re: set_io_port_base()? > > > On Wed, Feb 20, 2002 at 05:36:05PM -0800, Matthew Dharm wrote: > > > Now, I'm pretty sure this has something to do with the initcall to > > set_io_port_base() and ioremap(), which are in my setup.c > (copied from > > linux/arch/mips/gt64120/momenco_ocelot/setup.c and > modified). Without > > that bit of code at the bottom of that function, I don't even get > > this -- it just crashes. So I know I need this code, but > I'm just not > > certain what/how I should be using it... > > > > My initial guess is that it's used to map some virtual > address space > > onto the physical addresses needed to actually generate PCI I/O > > transactions, but that's just a guess. If that's right, > then the code > > I'm using _should_ work... I call ioremap() with the > physical base and > > size, and then set_io_port_base() using the result of ioremap(). > > That is exactly the intended use. > > Ralf > From owner-linux-mips@oss.sgi.com Wed Feb 20 19:13:49 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g1L3DnT05756 for linux-mips-outgoing; Wed, 20 Feb 2002 19:13:49 -0800 Received: from dea.linux-mips.net (a1as20-p220.stg.tli.de [195.252.194.220]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g1L3Dj905753 for ; Wed, 20 Feb 2002 19:13:45 -0800 Received: (from ralf@localhost) by dea.linux-mips.net (8.11.6/8.11.1) id g1L2Dcu31289; Thu, 21 Feb 2002 03:13:38 +0100 Date: Thu, 21 Feb 2002 03:13:38 +0100 From: Ralf Baechle To: Matthew Dharm Cc: Linux-MIPS Subject: Re: set_io_port_base()? Message-ID: <20020221031338.A31129@dea.linux-mips.net> References: <20020221025755.B29466@dea.linux-mips.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: ; from mdharm@momenco.com on Wed, Feb 20, 2002 at 06:05:21PM -0800 X-Accept-Language: de,en,fr Sender: owner-linux-mips@oss.sgi.com Precedence: bulk On Wed, Feb 20, 2002 at 06:05:21PM -0800, Matthew Dharm wrote: > If it works as I think it does, then is the code in > linux/arch/mips/gt64120/momenco_ocelot/setup.c correct? Specifically, > it calls ioremap() and then calls set_io_port_base() with a very > strange value -- it's the value from ioremap() > modified by the I/O physical address base... ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ I was reading too fast and missed that part. > That doesn't look right to me... or I just don't quite understand how > this is supposed to work. That's definately looks fishy. Another crime people keep comitting is using the same address space for both I/O memory and the base address of the port space. Ralf From owner-linux-mips@oss.sgi.com Wed Feb 20 19:16:10 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g1L3GAg05838 for linux-mips-outgoing; Wed, 20 Feb 2002 19:16:10 -0800 Received: from dea.linux-mips.net (a1as20-p220.stg.tli.de [195.252.194.220]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g1L3G7905835 for ; Wed, 20 Feb 2002 19:16:07 -0800 Received: (from ralf@localhost) by dea.linux-mips.net (8.11.6/8.11.1) id g1L2G0d31333; Thu, 21 Feb 2002 03:16:00 +0100 Date: Thu, 21 Feb 2002 03:16:00 +0100 From: Ralf Baechle To: Matthew Dharm Cc: Linux-MIPS Subject: Re: set_io_port_base()? Message-ID: <20020221031600.B31129@dea.linux-mips.net> References: <20020221025755.B29466@dea.linux-mips.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: ; from mdharm@momenco.com on Wed, Feb 20, 2002 at 06:08:39PM -0800 X-Accept-Language: de,en,fr Sender: owner-linux-mips@oss.sgi.com Precedence: bulk On Wed, Feb 20, 2002 at 06:08:39PM -0800, Matthew Dharm wrote: > Also, does this have to be done only for PCI I/O, or PCI memory also? This is just so all the inb/inw/outl etc. functions in know how to access ioports. Ralf From owner-linux-mips@oss.sgi.com Wed Feb 20 19:28:09 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g1L3S9E05964 for linux-mips-outgoing; Wed, 20 Feb 2002 19:28:09 -0800 Received: from hermes.mvista.com (gateway-1237.mvista.com [12.44.186.158]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g1L3S1905961; Wed, 20 Feb 2002 19:28:01 -0800 Received: from mvista.com (IDENT:jsun@orion.mvista.com [10.0.0.75]) by hermes.mvista.com (8.11.0/8.11.0) with ESMTP id g1L2PFB05290; Wed, 20 Feb 2002 18:25:15 -0800 Message-ID: <3C745B0B.84203D3F@mvista.com> Date: Wed, 20 Feb 2002 18:27:23 -0800 From: Jun Sun X-Mailer: Mozilla 4.72 [en] (X11; U; Linux 2.2.18 i686) X-Accept-Language: en MIME-Version: 1.0 To: Ralf Baechle CC: Matthew Dharm , Linux-MIPS Subject: Re: set_io_port_base()? References: <20020221025755.B29466@dea.linux-mips.net> <20020221031338.A31129@dea.linux-mips.net> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-linux-mips@oss.sgi.com Precedence: bulk Ralf Baechle wrote: > > On Wed, Feb 20, 2002 at 06:05:21PM -0800, Matthew Dharm wrote: > > > If it works as I think it does, then is the code in > > linux/arch/mips/gt64120/momenco_ocelot/setup.c correct? Specifically, > > it calls ioremap() and then calls set_io_port_base() with a very > > strange value -- it's the value from ioremap() > > > modified by the I/O physical address base... > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ > > I was reading too fast and missed that part. > > > That doesn't look right to me... or I just don't quite understand how > > this is supposed to work. > > That's definately looks fishy. This is actually right. This way if you pass an virtual at (mips_io_port_base + delta), you will get a physical address (GT_PCI_IO_BASE + delta), the desired place. Most boards don't need this funky ioremap() and base addr substraction trick, but ocelot has the IO address placed beyond normal kseg1 addressing range. Jun From owner-linux-mips@oss.sgi.com Wed Feb 20 19:48:59 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g1L3mx206217 for linux-mips-outgoing; Wed, 20 Feb 2002 19:48:59 -0800 Received: from host099.momenco.com (IDENT:root@www.momenco.com [64.169.228.99]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g1L3mo906213; Wed, 20 Feb 2002 19:48:51 -0800 Received: from beagle (beagle.internal.momenco.com [192.168.0.115]) by host099.momenco.com (8.11.6/8.11.6) with SMTP id g1L2moR27080; Wed, 20 Feb 2002 18:48:50 -0800 From: "Matthew Dharm" To: , "Ralf Baechle" Cc: "Linux-MIPS" Subject: RE: set_io_port_base()? Date: Wed, 20 Feb 2002 18:48:50 -0800 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0) X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400 In-Reply-To: <3C745B0B.84203D3F@mvista.com> Importance: Normal Sender: owner-linux-mips@oss.sgi.com Precedence: bulk But isn't that what all the complicated logic in ioremap() is for? It looks like it checks to see if it can directly address the I/O space via kseg1 and if not, set up a translation for it... Matt -- Matthew D. Dharm Senior Software Designer Momentum Computer Inc. 1815 Aston Ave. Suite 107 (760) 431-8663 X-115 Carlsbad, CA 92008-7310 Momentum Works For You www.momenco.com > -----Original Message----- > From: jsun@mvista.com [mailto:jsun@mvista.com] > Sent: Wednesday, February 20, 2002 6:27 PM > To: Ralf Baechle > Cc: Matthew Dharm; Linux-MIPS > Subject: Re: set_io_port_base()? > > > Ralf Baechle wrote: > > > > On Wed, Feb 20, 2002 at 06:05:21PM -0800, Matthew Dharm wrote: > > > > > If it works as I think it does, then is the code in > > > linux/arch/mips/gt64120/momenco_ocelot/setup.c correct? > Specifically, > > > it calls ioremap() and then calls set_io_port_base() with a very > > > strange value -- it's the value from ioremap() > > > > > modified by the I/O physical address base... > > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ > > > > I was reading too fast and missed that part. > > > > > That doesn't look right to me... or I just don't quite > understand how > > > this is supposed to work. > > > > That's definately looks fishy. > > This is actually right. This way if you pass an virtual at > (mips_io_port_base > + delta), you will get a physical address (GT_PCI_IO_BASE + > delta), the > desired place. > > Most boards don't need this funky ioremap() and base addr > substraction trick, > but ocelot has the IO address placed beyond normal kseg1 > addressing range. > > Jun > From owner-linux-mips@oss.sgi.com Wed Feb 20 20:03:39 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g1L43dE06528 for linux-mips-outgoing; Wed, 20 Feb 2002 20:03:39 -0800 Received: from skip-ext.ab.videon.ca (skip-ext.ab.videon.ca [206.75.216.36]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g1L43a906524 for ; Wed, 20 Feb 2002 20:03:37 -0800 Received: (qmail 10399 invoked from network); 21 Feb 2002 03:03:35 -0000 Received: from unknown (HELO wakko.debian.net) ([24.86.210.128]) (envelope-sender ) by skip-ext.ab.videon.ca (qmail-ldap-1.03) with SMTP for ; 21 Feb 2002 03:03:35 -0000 Received: from localhost ([127.0.0.1] helo=wakko.debian.net ident=jgg) by wakko.debian.net with smtp (Exim 3.16 #1 (Debian)) id 16djWB-00016i-00; Wed, 20 Feb 2002 20:03:35 -0700 Date: Wed, 20 Feb 2002 20:03:34 -0700 (MST) From: Jason Gunthorpe X-Sender: jgg@wakko.debian.net Reply-To: Jason Gunthorpe To: Matthew Dharm cc: Linux-MIPS Subject: RE: set_io_port_base()? In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-linux-mips@oss.sgi.com Precedence: bulk On Wed, 20 Feb 2002, Matthew Dharm wrote: > But isn't that what all the complicated logic in ioremap() is for? It > looks like it checks to see if it can directly address the I/O space > via kseg1 and if not, set up a translation for it... Yes, but ioremap does not remap io.. it remamps what linux dubs MMIO regions. Look at drivers/net/8139too.c and check out the difference from io and mmio. Linux's io* primitives expect an i386 like 64K IO port space, which in mips land starts at the virtual address passed into set_io_port_base(). BTW, the 'eepro100' driver seems to default to MMIO operation so it should not care about set_io_port_base.. You might want to crank up speedo_debug and make sure of the mode. Jason From owner-linux-mips@oss.sgi.com Wed Feb 20 20:30:49 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g1L4UnB08120 for linux-mips-outgoing; Wed, 20 Feb 2002 20:30:49 -0800 Received: from dea.linux-mips.net (a1as20-p220.stg.tli.de [195.252.194.220]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g1L4Uj908116 for ; Wed, 20 Feb 2002 20:30:46 -0800 Received: (from ralf@localhost) by dea.linux-mips.net (8.11.6/8.11.1) id g1L3UY227199; Thu, 21 Feb 2002 04:30:34 +0100 Date: Thu, 21 Feb 2002 04:30:33 +0100 From: Ralf Baechle To: Jun Sun Cc: Matthew Dharm , Linux-MIPS Subject: Re: set_io_port_base()? Message-ID: <20020221043033.A1430@dea.linux-mips.net> References: <20020221025755.B29466@dea.linux-mips.net> <20020221031338.A31129@dea.linux-mips.net> <3C745B0B.84203D3F@mvista.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <3C745B0B.84203D3F@mvista.com>; from jsun@mvista.com on Wed, Feb 20, 2002 at 06:27:23PM -0800 X-Accept-Language: de,en,fr Sender: owner-linux-mips@oss.sgi.com Precedence: bulk On Wed, Feb 20, 2002 at 06:27:23PM -0800, Jun Sun wrote: > This is actually right. This way if you pass an virtual at > (mips_io_port_base + delta), you will get a physical address > (GT_PCI_IO_BASE + delta), the desired place. > > Most boards don't need this funky ioremap() and base addr substraction trick, > but ocelot has the IO address placed beyond normal kseg1 addressing range. If you ever think about the value of the the address you're making something wrong ... Ralf From owner-linux-mips@oss.sgi.com Wed Feb 20 22:36:45 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g1L6ajA10190 for linux-mips-outgoing; Wed, 20 Feb 2002 22:36:45 -0800 Received: from orion.mvista.com (gateway-1237.mvista.com [12.44.186.158]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g1L6ad910186; Wed, 20 Feb 2002 22:36:39 -0800 Received: (from jsun@localhost) by orion.mvista.com (8.9.3/8.9.3) id VAA08957; Wed, 20 Feb 2002 21:35:57 -0800 Date: Wed, 20 Feb 2002 21:35:57 -0800 From: Jun Sun To: Matthew Dharm Cc: Ralf Baechle , Linux-MIPS Subject: Re: set_io_port_base()? Message-ID: <20020220213557.A8883@mvista.com> References: <3C745B0B.84203D3F@mvista.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: ; from mdharm@momenco.com on Wed, Feb 20, 2002 at 06:48:50PM -0800 Sender: owner-linux-mips@oss.sgi.com Precedence: bulk On Wed, Feb 20, 2002 at 06:48:50PM -0800, Matthew Dharm wrote: > But isn't that what all the complicated logic in ioremap() is for? Not exactly. Here is the whole picture: drivers do inb(delta)/outb(delta) -> translated to an virtual address (mips_io_port_base + delta) -> mapped into (GT_IO_BASE + delta) physical addr -> Bingo! you got the devices. Here your goal is to make the drivers that do inb()/outb() happy (i.e., be able to reuse them without modification) If you only use drivers that directly access memory (such as drivers/net/nec_korva.c on linux-mips.sf.net), then you don't even have to set mips_io_port_base at all. The ioremap() comes into place because by default you can not set a mips_io_port_base value in kseg1 range on ocelot (it is at 0x20000000 in physical addr space). Therefore you do a ioremap(), blah blah as explained above. Someday I should finish the PCI chapter on my porting guide ... Jun From owner-linux-mips@oss.sgi.com Thu Feb 21 04:37:03 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g1LCb3825969 for linux-mips-outgoing; Thu, 21 Feb 2002 04:37:03 -0800 Received: from topsns.toshiba-tops.co.jp (topsns.toshiba-tops.co.jp [202.230.225.5]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g1LCaw925940 for ; Thu, 21 Feb 2002 04:36:58 -0800 Received: from inside-ms1.toshiba-tops.co.jp by topsns.toshiba-tops.co.jp via smtpd (for oss.sgi.com [216.32.174.27]) with SMTP; 21 Feb 2002 11:36:58 UT 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 6087BB46B; Thu, 21 Feb 2002 20:36:56 +0900 (JST) Received: by srd2sd.toshiba-tops.co.jp (8.9.3/3.5Wbeta-srd2sd) with ESMTP id UAA70710; Thu, 21 Feb 2002 20:36:56 +0900 (JST) Date: Thu, 21 Feb 2002 20:41:20 +0900 (JST) Message-Id: <20020221.204120.102764790.nemoto@toshiba-tops.co.jp> To: macro@ds2.pg.gda.pl Cc: kevink@mips.com, mdharm@momenco.com, ralf@uni-koblenz.de, linux-mips@fnet.fr, linux-mips@oss.sgi.com Subject: Re: [patch] linux 2.4.17: The second mb() rework (final) From: Atsushi Nemoto In-Reply-To: References: <20020215.123124.70226832.nemoto@toshiba-tops.co.jp> X-Fingerprint: EC 9D B9 17 2E 89 D2 25 CE F5 5D 3D 12 29 2A AD X-Pgp-Public-Key: http://pgp.nic.ad.jp/cgi-bin/pgpsearchkey.pl?op=get&search=0xB6D728B1 Organization: TOSHIBA Personal Computer System Corporation X-Mailer: Mew version 2.1 on Emacs 20.7 / Mule 4.1 (AOI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-linux-mips@oss.sgi.com Precedence: bulk >>>>> On Fri, 15 Feb 2002 13:08:20 +0100 (MET), "Maciej W. Rozycki" said: macro> IOW, two consecutive writes separated by a "sync" need not macro> imply a write-back, but as soon as a read happens a preceding macro> write-back is a must. TX39 satisfy this on uncached load/store. "sync" does not flush a write buffer, but any uncached load are executed AFTER completion of pending uncached store. On combination of cached and uncached operation, TX39 does not satisfy this order. macro> It sounds weird: it looks like "sync" is useless and basically macro> a "nop". TX39 has a function called "non-blocking load". This function is described on chapter 4.4 of TX39/H2 manual. "sync" operation is meaningful with this function. macro> If this is the case the processors need their own wbflush() macro> implementation. Can you point to specific chapters of macro> specifications that document it? Chapter 4.9.4 in TX39/H2 Japanese manual describes write buffer. But I could not find it in the English manual... --- Atsushi Nemoto From owner-linux-mips@oss.sgi.com Thu Feb 21 04:56:35 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g1LCuZj10282 for linux-mips-outgoing; Thu, 21 Feb 2002 04:56:35 -0800 Received: from topsns.toshiba-tops.co.jp (topsns.toshiba-tops.co.jp [202.230.225.5]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g1LCuU910227 for ; Thu, 21 Feb 2002 04:56:30 -0800 Received: from inside-ms1.toshiba-tops.co.jp by topsns.toshiba-tops.co.jp via smtpd (for oss.sgi.com [216.32.174.27]) with SMTP; 21 Feb 2002 11:56:30 UT 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 AE931B46B; Thu, 21 Feb 2002 20:56:28 +0900 (JST) Received: by srd2sd.toshiba-tops.co.jp (8.9.3/3.5Wbeta-srd2sd) with ESMTP id UAA70757; Thu, 21 Feb 2002 20:56:28 +0900 (JST) Date: Thu, 21 Feb 2002 21:00:52 +0900 (JST) Message-Id: <20020221.210052.38718643.nemoto@toshiba-tops.co.jp> To: macro@ds2.pg.gda.pl Cc: jgg@debian.org, kevink@mips.com, linux-mips@fnet.fr, linux-mips@oss.sgi.com Subject: Re: [patch] linux 2.4.17: The second mb() rework (final) From: Atsushi Nemoto In-Reply-To: References: X-Fingerprint: EC 9D B9 17 2E 89 D2 25 CE F5 5D 3D 12 29 2A AD X-Pgp-Public-Key: http://pgp.nic.ad.jp/cgi-bin/pgpsearchkey.pl?op=get&search=0xB6D728B1 Organization: TOSHIBA Personal Computer System Corporation X-Mailer: Mew version 2.1 on Emacs 20.7 / Mule 4.1 (AOI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-linux-mips@oss.sgi.com Precedence: bulk >>>>> On Fri, 15 Feb 2002 20:39:09 +0100 (MET), "Maciej W. Rozycki" said: macro> Well, the "classic" MIPS R2020 and R3220 ones would break PCI macro> (or actually any I/O) ordering semantics as they return data macro> from a posted write upon a hit. The affected read never macro> appears at the I/O bus in that case. They never reorder writes macro> though, as they work as FIFOs (the former is four stage deep macro> and the latter is six stage deep), so wmb() may be null for macro> them. macro> I've read a suggestion a "bc0f" might be needed for the TX39's macro> write buffer as a barrier. That means the buffer behaves as macro> the "classic" ones. As I wrote in another mail, TX39's uncached load does NOT return data from a write buffer. Uncached load/store always appears on I/O bus in same order. The problem of TX39's write buffer is that cached load/store operation can overtake preceding uncached store operation (even if "SYNC" was exist between these operations). --- Atsushi Nemoto From owner-linux-mips@oss.sgi.com Thu Feb 21 05:32:34 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g1LDWYD02999 for linux-mips-outgoing; Thu, 21 Feb 2002 05:32:34 -0800 Received: from dvmwest.gt.owl.de (dvmwest.gt.owl.de [62.52.24.140]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g1LDWS902944 for ; Thu, 21 Feb 2002 05:32:29 -0800 Received: by dvmwest.gt.owl.de (Postfix, from userid 1001) id 1B2D89EF2; Thu, 21 Feb 2002 13:32:23 +0100 (CET) Date: Thu, 21 Feb 2002 13:32:22 +0100 From: Jan-Benedict Glaw To: linux-mips@oss.sgi.com Subject: Toolchain question Message-ID: <20020221133222.J21530@lug-owl.de> Mail-Followup-To: linux-mips@oss.sgi.com Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="k1BdFSKqAqVdu8k/" Content-Disposition: inline User-Agent: Mutt/1.3.23i X-Operating-System: Linux mail 2.4.15-pre2 Sender: owner-linux-mips@oss.sgi.com Precedence: bulk --k1BdFSKqAqVdu8k/ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi! I'm to build a new toolchain and looked around. There's still the cross-all-20010423.tar package on oss.sgi.com. Is it still recommened to use this, or am I better off using a current CVS co of binutils and gcc? MfG, JBG --=20 Jan-Benedict Glaw . jbglaw@lug-owl.de . +49-172-7608481 -- New APT-Proxy written in shell script -- http://lug-owl.de/~jbglaw/software/ap2/ --k1BdFSKqAqVdu8k/ Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.6 (GNU/Linux) Comment: For info see http://www.gnupg.org iEYEARECAAYFAjx06NYACgkQHb1edYOZ4bvTJgCeIO1a/Ga3piLcOP0QoLKx90hR I9gAnjX91fXMCgpiQPC8o7IFPK9zvKSm =kOGN -----END PGP SIGNATURE----- --k1BdFSKqAqVdu8k/-- From owner-linux-mips@oss.sgi.com Thu Feb 21 07:15:33 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g1LFFXs23234 for linux-mips-outgoing; Thu, 21 Feb 2002 07:15:33 -0800 Received: from delta.ds2.pg.gda.pl (delta.ds2.pg.gda.pl [213.192.72.1]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g1LFFJ923079 for ; Thu, 21 Feb 2002 07:15:22 -0800 Received: from localhost by delta.ds2.pg.gda.pl (8.9.3/8.9.3) with SMTP id PAA08434; Thu, 21 Feb 2002 15:12:44 +0100 (MET) Date: Thu, 21 Feb 2002 15:12:43 +0100 (MET) From: "Maciej W. Rozycki" Reply-To: "Maciej W. Rozycki" To: Atsushi Nemoto cc: kevink@mips.com, mdharm@momenco.com, ralf@uni-koblenz.de, linux-mips@fnet.fr, linux-mips@oss.sgi.com Subject: Re: [patch] linux 2.4.17: The second mb() rework (final) In-Reply-To: <20020221.204120.102764790.nemoto@toshiba-tops.co.jp> Message-ID: Organization: Technical University of Gdansk MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-linux-mips@oss.sgi.com Precedence: bulk On Thu, 21 Feb 2002, Atsushi Nemoto wrote: > TX39 satisfy this on uncached load/store. "sync" does not flush a > write buffer, but any uncached load are executed AFTER completion of > pending uncached store. On combination of cached and uncached > operation, TX39 does not satisfy this order. With respect to cache refills (what is already cached is irrelevant, obviously, as read accesse to it don't appear externally), "32-bit RISC Microprocessor TX39 Family Core Architecture User's Manual" seems to contradict. In the description of the "sync" instruction it states: "Interlocks the pipeline until the load, store or data cache refill operation of the previous instruction is completed. The R3900 Processor Core can continue processing instructions following a load instruction even if a cache refill is caused by the load instruction or a load is made from a noncacheable area. Executing a SYNC instruction interlocks subsequent instructions until the SYNC instruction execution is completed. This ensures that the instructions following a load instruction are executed in the proper sequence." It's clear "sync" is strong on the TX39, stronger then required by MIPS II. > TX39 has a function called "non-blocking load". This function is > described on chapter 4.4 of TX39/H2 manual. "sync" operation is > meaningful with this function. Chapter 4.3 ("") of the quoted manual. The statement I quoted assures it, indeed (modulo errata, which hopefully don't exist here). > Chapter 4.9.4 in TX39/H2 Japanese manual describes write buffer. But > I could not find it in the English manual... The write buffer is described in the part about "TMPR3901F" (it appears two manuals are concatenated in a single file), chapter 2.3 ("Bus Interface Unit (Bus Controller / Write Buffer)"). It looks like a "bc0f" loop is needed for mb(). The only difference comparing to R2020/R3220 is only a single "nop" is needed after a write for the coprocessor status to become valid, it would seem. It's not documented explicitly but the supplied example code suggests so. The document I'm referring to is available at: "http:/pdf.toshiba.com/taec/components/Generic/TX39_Core_um.pdf". -- + Maciej W. Rozycki, Technical University of Gdansk, Poland + +--------------------------------------------------------------+ + e-mail: macro@ds2.pg.gda.pl, PGP key available + From owner-linux-mips@oss.sgi.com Thu Feb 21 07:24:36 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g1LFOa127781 for linux-mips-outgoing; Thu, 21 Feb 2002 07:24:36 -0800 Received: from delta.ds2.pg.gda.pl (delta.ds2.pg.gda.pl [213.192.72.1]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g1LFOU927699 for ; Thu, 21 Feb 2002 07:24:31 -0800 Received: from localhost by delta.ds2.pg.gda.pl (8.9.3/8.9.3) with SMTP id PAA08638; Thu, 21 Feb 2002 15:19:26 +0100 (MET) Date: Thu, 21 Feb 2002 15:19:25 +0100 (MET) From: "Maciej W. Rozycki" To: Atsushi Nemoto cc: jgg@debian.org, kevink@mips.com, linux-mips@fnet.fr, linux-mips@oss.sgi.com Subject: Re: [patch] linux 2.4.17: The second mb() rework (final) In-Reply-To: <20020221.210052.38718643.nemoto@toshiba-tops.co.jp> Message-ID: Organization: Technical University of Gdansk MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-linux-mips@oss.sgi.com Precedence: bulk On Thu, 21 Feb 2002, Atsushi Nemoto wrote: > As I wrote in another mail, TX39's uncached load does NOT return data > from a write buffer. Uncached load/store always appears on I/O bus in > same order. Well, the specification suggests that a load doesn't stall until all data from the buffer are written back. Therefore a load will appear on the host bus before pending writes. It implies mb() has to stall on the "buffer not empty" condition. > The problem of TX39's write buffer is that cached load/store operation > can overtake preceding uncached store operation (even if "SYNC" was > exist between these operations). It's implied by the above. -- + Maciej W. Rozycki, Technical University of Gdansk, Poland + +--------------------------------------------------------------+ + e-mail: macro@ds2.pg.gda.pl, PGP key available + From owner-linux-mips@oss.sgi.com Thu Feb 21 09:34:40 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g1LHYeg08283 for linux-mips-outgoing; Thu, 21 Feb 2002 09:34:40 -0800 Received: from web11907.mail.yahoo.com (web11907.mail.yahoo.com [216.136.172.191]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g1LHYb908280 for ; Thu, 21 Feb 2002 09:34:37 -0800 Message-ID: <20020221163436.76127.qmail@web11907.mail.yahoo.com> Received: from [209.243.184.191] by web11907.mail.yahoo.com via HTTP; Thu, 21 Feb 2002 08:34:36 PST Date: Thu, 21 Feb 2002 08:34:36 -0800 (PST) From: Wayne Gowcher Subject: pthread support in mipsel-linux To: Linux-MIPS In-Reply-To: <3C745B0B.84203D3F@mvista.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Sender: owner-linux-mips@oss.sgi.com Precedence: bulk Could anyone tell me if the 2.4.x kernel / redhat 7.1 mipsel-linux distribution on the sgi ftp site supports posix threads ? In particular, I have a driver that I am trying to port from x86 that links against the libraries "-lm -lpthread" can anyone tell me what rpms I might find them in ? TIA __________________________________________________ Do You Yahoo!? Yahoo! Sports - Coverage of the 2002 Olympic Games http://sports.yahoo.com From owner-linux-mips@oss.sgi.com Thu Feb 21 10:55:16 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g1LItGj09234 for linux-mips-outgoing; Thu, 21 Feb 2002 10:55:16 -0800 Received: from rwcrmhc51.attbi.com (rwcrmhc51.attbi.com [204.127.198.38]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g1LItC909231 for ; Thu, 21 Feb 2002 10:55:12 -0800 Received: from ocean.lucon.org ([12.234.16.87]) by rwcrmhc51.attbi.com (InterMail vM.4.01.03.27 201-229-121-127-20010626) with ESMTP id <20020221175507.LPDA2626.rwcrmhc51.attbi.com@ocean.lucon.org>; Thu, 21 Feb 2002 17:55:07 +0000 Received: by ocean.lucon.org (Postfix, from userid 1000) id D60BF125C1; Thu, 21 Feb 2002 09:55:05 -0800 (PST) Date: Thu, 21 Feb 2002 09:55:05 -0800 From: "H . J . Lu" To: Wayne Gowcher Cc: Linux-MIPS Subject: Re: pthread support in mipsel-linux Message-ID: <20020221095505.A28496@lucon.org> References: <3C745B0B.84203D3F@mvista.com> <20020221163436.76127.qmail@web11907.mail.yahoo.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <20020221163436.76127.qmail@web11907.mail.yahoo.com>; from wgowcher@yahoo.com on Thu, Feb 21, 2002 at 08:34:36AM -0800 Sender: owner-linux-mips@oss.sgi.com Precedence: bulk On Thu, Feb 21, 2002 at 08:34:36AM -0800, Wayne Gowcher wrote: > Could anyone tell me if the 2.4.x kernel / redhat 7.1 > mipsel-linux distribution on the sgi ftp site supports > posix threads ? The threads works well with glibc compiled with -mips2. But the threads in my RedHat 7.1 is broken when compiled with -mips2 :-(. I have fixed it in glibc CVS. > > In particular, I have a driver that I am trying to > port from x86 that links against the libraries "-lm > -lpthread" can anyone tell me what rpms I might find > them in ? It is the part of glibc. H.J. From owner-linux-mips@oss.sgi.com Thu Feb 21 11:12:08 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g1LJC8a09569 for linux-mips-outgoing; Thu, 21 Feb 2002 11:12:08 -0800 Received: from web11908.mail.yahoo.com (web11908.mail.yahoo.com [216.136.172.192]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g1LJC5909566 for ; Thu, 21 Feb 2002 11:12:05 -0800 Message-ID: <20020221181204.48818.qmail@web11908.mail.yahoo.com> Received: from [209.243.184.191] by web11908.mail.yahoo.com via HTTP; Thu, 21 Feb 2002 10:12:04 PST Date: Thu, 21 Feb 2002 10:12:04 -0800 (PST) From: Wayne Gowcher Subject: Re: pthread support in mipsel-linux To: "H . J . Lu" Cc: Linux-MIPS In-Reply-To: <20020221095505.A28496@lucon.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Sender: owner-linux-mips@oss.sgi.com Precedence: bulk H.J. Thank you for your reply. > The threads works well with glibc compiled with > -mips2. But the threads > in my RedHat 7.1 is broken when compiled with -mips2 > :-(. I have fixed > it in glibc CVS. Just to clarify, the glibc rpm in your Redhat 7.1 is compiled with -mips1 right ? So as it is broken yes ? So if I REALLY wanted to use pthreads with your redhat 7.1 distribution, could I get away with checking out the current glibc from CVS, recompiling it and installing over the rpm glibc ? Or is that too simplistic, and it will need recompilation of a lot of other applications ? If so could you give me an idea of just how big a job that is ? Wayne __________________________________________________ Do You Yahoo!? Yahoo! Sports - Coverage of the 2002 Olympic Games http://sports.yahoo.com From owner-linux-mips@oss.sgi.com Thu Feb 21 11:25:14 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g1LJPEo09792 for linux-mips-outgoing; Thu, 21 Feb 2002 11:25:14 -0800 Received: from rwcrmhc54.attbi.com (rwcrmhc54.attbi.com [216.148.227.87]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g1LJPA909789 for ; Thu, 21 Feb 2002 11:25:10 -0800 Received: from ocean.lucon.org ([12.234.16.87]) by rwcrmhc54.attbi.com (InterMail vM.4.01.03.27 201-229-121-127-20010626) with ESMTP id <20020221182504.VMBQ1214.rwcrmhc54.attbi.com@ocean.lucon.org>; Thu, 21 Feb 2002 18:25:04 +0000 Received: by ocean.lucon.org (Postfix, from userid 1000) id B0867125C1; Thu, 21 Feb 2002 10:25:03 -0800 (PST) Date: Thu, 21 Feb 2002 10:25:03 -0800 From: "H . J . Lu" To: Wayne Gowcher Cc: Linux-MIPS Subject: Re: pthread support in mipsel-linux Message-ID: <20020221102503.A28936@lucon.org> References: <20020221095505.A28496@lucon.org> <20020221181204.48818.qmail@web11908.mail.yahoo.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <20020221181204.48818.qmail@web11908.mail.yahoo.com>; from wgowcher@yahoo.com on Thu, Feb 21, 2002 at 10:12:04AM -0800 Sender: owner-linux-mips@oss.sgi.com Precedence: bulk On Thu, Feb 21, 2002 at 10:12:04AM -0800, Wayne Gowcher wrote: > H.J. > > Thank you for your reply. > > > The threads works well with glibc compiled with > > -mips2. But the threads > > in my RedHat 7.1 is broken when compiled with -mips2 > > :-(. I have fixed > > it in glibc CVS. > > Just to clarify, the glibc rpm in your Redhat 7.1 is > compiled with -mips1 right ? So as it is broken yes ? Yes. -mips1 doesn't work well with thread. > > So if I REALLY wanted to use pthreads with your redhat > 7.1 distribution, could I get away with checking out > the current glibc from CVS, recompiling it and > installing over the rpm glibc ? Or is that too > simplistic, and it will need recompilation of a lot of > other applications ? It should be mostly ok if you use gcc 2.96. But glibc in CVS lacks a few mips change in my glibc in RedHat 7.1. At least, you may want glibc-2.2-mmap64.patch in my glibc. H.J. From owner-linux-mips@oss.sgi.com Thu Feb 21 11:46:01 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g1LJk1210176 for linux-mips-outgoing; Thu, 21 Feb 2002 11:46:01 -0800 Received: from web11906.mail.yahoo.com (web11906.mail.yahoo.com [216.136.172.190]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g1LJjw910173 for ; Thu, 21 Feb 2002 11:45:58 -0800 Message-ID: <20020221184558.33231.qmail@web11906.mail.yahoo.com> Received: from [209.243.184.191] by web11906.mail.yahoo.com via HTTP; Thu, 21 Feb 2002 10:45:58 PST Date: Thu, 21 Feb 2002 10:45:58 -0800 (PST) From: Wayne Gowcher Subject: Re: pthread support in mipsel-linux To: Linux-MIPS In-Reply-To: <20020221102503.A28936@lucon.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Sender: owner-linux-mips@oss.sgi.com Precedence: bulk It seems like getting pthread support for mips1 could be a lengthy and involved process. So I was wondering has anyone out there used pthreads for with mips1 with any of the redhat distributions on sgi ? TIA __________________________________________________ Do You Yahoo!? Yahoo! Sports - Coverage of the 2002 Olympic Games http://sports.yahoo.com From owner-linux-mips@oss.sgi.com Thu Feb 21 16:10:25 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g1M0APE15119 for linux-mips-outgoing; Thu, 21 Feb 2002 16:10:25 -0800 Received: from mailo.vtcif.telstra.com.au (mailo.vtcif.telstra.com.au [202.12.144.17]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g1M0AK915115 for ; Thu, 21 Feb 2002 16:10:21 -0800 Received: (from uucp@localhost) by mailo.vtcif.telstra.com.au (8.8.2/8.6.9) id KAA21216 for ; Fri, 22 Feb 2002 10:10:13 +1100 (EST) Received: from maili.vtcif.telstra.com.au(202.12.142.17) via SMTP by mailo.vtcif.telstra.com.au, id smtpdD0Rq4_; Fri Feb 22 10:09:26 2002 Received: (from uucp@localhost) by maili.vtcif.telstra.com.au (8.8.2/8.6.9) id KAA15630 for ; Fri, 22 Feb 2002 10:09:25 +1100 (EST) Received: from localhost(127.0.0.1), claiming to be "mail.cdn.telstra.com.au" via SMTP by localhost, id smtpd0reHzv; Fri Feb 22 10:08:39 2002 Received: from ntmsg0028.corpmail.telstra.com.au (ntmsg0028.corpmail.telstra.com.au [192.168.174.24]) by mail.cdn.telstra.com.au (8.8.2/8.6.9) with ESMTP id KAA27460 for ; Fri, 22 Feb 2002 10:08:38 +1100 (EST) Received: by ntmsg0028.corpmail.telstra.com.au with Internet Mail Service (5.5.2655.55) id ; Fri, 22 Feb 2002 10:08:37 +1100 Message-ID: From: "Salisbury, Roger G" To: "'linux-mips'" Subject: Where can I find archives for this site please ??? Date: Fri, 22 Feb 2002 10:08:34 +1100 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2655.55) Content-Type: text/plain Sender: owner-linux-mips@oss.sgi.com Precedence: bulk Anybody Where can I find archives for this site please ??? for example if I wanted the 'debian-mips@lists.debian.org' archives I would go to this exellent site. http://www.geocrawler.com/lists/3/Debian-Linux/ ==== 'debian-mips@lists.debian.org' Is there a site that will do similar for linux-mips@oss.sgi.com IE ????????????????????????????????????????????/ ======= 'linux-mips@oss.sgi.com' http://www.geocrawler.com/lists/3/Debian-Linux/ ==== 'debian-mips@lists.debian.org' Thanks very much Roger Salisbury Australia From owner-linux-mips@oss.sgi.com Thu Feb 21 16:25:51 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g1M0Ppv15624 for linux-mips-outgoing; Thu, 21 Feb 2002 16:25:51 -0800 Received: from [64.152.86.3] (unknown.Level3.net [64.152.86.3] (may be forged)) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g1M0Pl915621 for ; Thu, 21 Feb 2002 16:25:47 -0800 Received: from mail.esstech.com by [64.152.86.3] via smtpd (for oss.sgi.com [216.32.174.27]) with SMTP; 21 Feb 2002 23:29:21 UT Received: from venus (venus.esstech.com [193.5.205.5]) by mail.esstech.com (8.11.6/8.11.6) with SMTP id g1LNNM522754; Thu, 21 Feb 2002 15:23:22 -0800 (PST) Received: from bud.austin.esstech.com by venus (SMI-8.6/SMI-SVR4) id PAA27655; Thu, 21 Feb 2002 15:24:54 -0800 Received: from esstech.com by bud.austin.esstech.com (SMI-8.6/SMI-SVR4) id RAA18525; Thu, 21 Feb 2002 17:17:30 -0600 Message-ID: <3C758319.2010704@esstech.com> Date: Thu, 21 Feb 2002 17:30:33 -0600 From: Gerald Champagne User-Agent: Mozilla/5.0 (Windows; U; Win 9x 4.90; en-US; rv:0.9.8) Gecko/20020204 X-Accept-Language: en-us MIME-Version: 1.0 To: "Salisbury, Roger G" CC: "'linux-mips'" Subject: Re: Where can I find archives for this site please ??? References: Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Sender: owner-linux-mips@oss.sgi.com Precedence: bulk Salisbury, Roger G wrote: > Anybody > Where can I find archives for this site please ??? > There's a web-based archive here: http://marc.theaimsgroup.com/?l=linux-mips&r=1&w=2 but it looks like it isn't archiving all of the messages. You can get the mail archive files directly from sgi here: http://oss.sgi.com/mips/archive/ You can download a file, place it in the directory where your Email package stores its folders, and it should appear as a normal folder in most Email packages. These arechives are a gold mine to anyone doing Mips development, with or without Linux as the OS. Gerald From owner-linux-mips@oss.sgi.com Thu Feb 21 16:27:30 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g1M0RUX15709 for linux-mips-outgoing; Thu, 21 Feb 2002 16:27:30 -0800 Received: from 125.26.4.3 (tnt-21-72.easynet.co.uk [212.134.228.72]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g1M0RP915704 for ; Thu, 21 Feb 2002 16:27:25 -0800 Date: Thu, 21 Feb 2002 16:27:25 -0800 From: Information Team To: Message-Id: <419.437308.98117963info@ptl-online.co.uk> Subject: Home Entertainment and Leisure Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: owner-linux-mips@oss.sgi.com Precedence: bulk *** YOU ARE NOT ON A MAILING LIST AND WILL NOT BE CONTACTED AGAIN *** We can simply provide you with the best prices on all PC and Console Games and Hardware. Playstation 1 & 2, Xbox, Game Cube, Dreamcast, Game Boy Advance, Game Boy Colour, PC etc. Tell us what you want and we will provide the best price for you! We can also provide DVD films. http:\\www.ptl-online.co.uk IF YOU CAN'T SEE WHAT YOU WANT LET US KNOW AND WE WILL FIND IT FOR YOU. From owner-linux-mips@oss.sgi.com Thu Feb 21 19:32:18 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g1M3WIw18895 for linux-mips-outgoing; Thu, 21 Feb 2002 19:32:18 -0800 Received: from topsns.toshiba-tops.co.jp (topsns.toshiba-tops.co.jp [202.230.225.5]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g1M3WC918892 for ; Thu, 21 Feb 2002 19:32:13 -0800 Received: from inside-ms1.toshiba-tops.co.jp by topsns.toshiba-tops.co.jp via smtpd (for [216.32.174.27]) with SMTP; 22 Feb 2002 02:32:12 UT 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 5D24EB474; Fri, 22 Feb 2002 11:32:10 +0900 (JST) Received: by srd2sd.toshiba-tops.co.jp (8.9.3/3.5Wbeta-srd2sd) with ESMTP id LAA72359; Fri, 22 Feb 2002 11:32:10 +0900 (JST) Date: Fri, 22 Feb 2002 11:36:34 +0900 (JST) Message-Id: <20020222.113634.45519920.nemoto@toshiba-tops.co.jp> To: macro@ds2.pg.gda.pl Cc: kevink@mips.com, mdharm@momenco.com, ralf@uni-koblenz.de, linux-mips@fnet.fr, linux-mips@oss.sgi.com Subject: Re: [patch] linux 2.4.17: The second mb() rework (final) From: Atsushi Nemoto In-Reply-To: References: <20020221.204120.102764790.nemoto@toshiba-tops.co.jp> X-Fingerprint: EC 9D B9 17 2E 89 D2 25 CE F5 5D 3D 12 29 2A AD X-Pgp-Public-Key: http://pgp.nic.ad.jp/cgi-bin/pgpsearchkey.pl?op=get&search=0xB6D728B1 Organization: TOSHIBA Personal Computer System Corporation X-Mailer: Mew version 2.1 on Emacs 20.7 / Mule 4.1 (AOI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-linux-mips@oss.sgi.com Precedence: bulk >>>>> On Thu, 21 Feb 2002 15:12:43 +0100 (MET), "Maciej W. Rozycki" said: macro> With respect to cache refills (what is already cached is macro> irrelevant, obviously, as read accesse to it don't appear macro> externally), "32-bit RISC Microprocessor TX39 Family Core macro> Architecture User's Manual" seems to contradict. In the macro> description of the "sync" instruction it states: macro> "Interlocks the pipeline until the load, store or data cache macro> refill operation of the previous instruction is completed. The macro> R3900 Processor Core can continue processing instructions macro> following a load instruction even if a cache refill is caused macro> by the load instruction or a load is made from a noncacheable macro> area. Executing a SYNC instruction interlocks subsequent macro> instructions until the SYNC instruction execution is completed. macro> This ensures that the instructions following a load instruction macro> are executed in the proper sequence." The contradiction is came from some confusion about usage of a word "Core" in TX39 manual. Maybe a writer of the quoted statements assumes a write buffer is outside of a "R3900 Processor Core". So if he said "operation is completed" it means "data are sent to a write buffer". Of course this point of view is not acceptable for software programmers... macro> It's clear "sync" is strong on the TX39, stronger then required macro> by MIPS II. So unfortunately this is not true. --- Atsushi Nemoto From owner-linux-mips@oss.sgi.com Thu Feb 21 19:49:20 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g1M3nKF19212 for linux-mips-outgoing; Thu, 21 Feb 2002 19:49:20 -0800 Received: from hermes.mvista.com (gateway-1237.mvista.com [12.44.186.158]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g1M3nE919209 for ; Thu, 21 Feb 2002 19:49:14 -0800 Received: from mvista.com (IDENT:jsun@orion.mvista.com [10.0.0.75]) by hermes.mvista.com (8.11.0/8.11.0) with ESMTP id g1M2kRB10028; Thu, 21 Feb 2002 18:46:27 -0800 Message-ID: <3C75B181.C5A065A1@mvista.com> Date: Thu, 21 Feb 2002 18:48:33 -0800 From: Jun Sun X-Mailer: Mozilla 4.72 [en] (X11; U; Linux 2.2.18 i686) X-Accept-Language: en MIME-Version: 1.0 To: linux-mips@oss.sgi.com Subject: lazy fpu switch irrelavant to no-fpu case? Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-linux-mips@oss.sgi.com Precedence: bulk It appears to me that lazy fpu switch has no relevancy to CPUs that don't have FPU. If you do a scan, you will see last_task_used_math are used in four kernel files: ptrace.c process.c signal.c traps.c In the case of ptrace.c and process.c, the variable is used only when CPU has FPU. In the case of traps.c (do_cpu()), it used redaundantly with another condition checking. In the case of signal.c, no matter what last_task_used_math is, the same code will be executed anyway. Now think about it, it actually makes sense - if we don't have hardware FPU, why do we care of fpu context switch. Anyhow, the problem I am seeing with FPU/SMP case seems to be caused by FPU emulation code itself, if we can assume it is not caused by fpu context switch. Right now the FPU is not turned on on the box. The following patch cleans it up a little based on the above observation. Make sense? Jun diff -Nru linux/arch/mips/kernel/traps.c.orig linux/arch/mips/kernel/traps.c --- linux/arch/mips/kernel/traps.c.orig Wed Jan 30 15:17:12 2002 +++ linux/arch/mips/kernel/traps.c Thu Feb 21 18:46:28 2002 @@ -678,14 +678,11 @@ return; fp_emul: - if (last_task_used_math != current) { - if (!current->used_math) { - fpu_emulator_init_fpu(); - current->used_math = 1; - } + if (!current->used_math) { + fpu_emulator_init_fpu(); + current->used_math = 1; } sig = fpu_emulator_cop1Handler(regs); - last_task_used_math = current; if (sig) force_sig(sig, current); return; From owner-linux-mips@oss.sgi.com Thu Feb 21 20:44:18 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g1M4iIM20030 for linux-mips-outgoing; Thu, 21 Feb 2002 20:44:18 -0800 Received: from host099.momenco.com (IDENT:root@www.momenco.com [64.169.228.99]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g1M4gT920013; Thu, 21 Feb 2002 20:42:29 -0800 Received: from beagle (beagle.internal.momenco.com [192.168.0.115]) by host099.momenco.com (8.11.6/8.11.6) with SMTP id g1M3gTR00321; Thu, 21 Feb 2002 19:42:29 -0800 From: "Matthew Dharm" To: "Linux-MIPS" , "Ralf Baechle" Subject: PATCH: Ocelot (resend) and Ocelot-G Date: Thu, 21 Feb 2002 19:42:29 -0800 Message-ID: MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_NextPart_000_003F_01C1BB0F.E5696E00" X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0) X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400 Importance: Normal Sender: owner-linux-mips@oss.sgi.com Precedence: bulk This is a multi-part message in MIME format. ------=_NextPart_000_003F_01C1BB0F.E5696E00 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Ralf -- Attached to this message is a patch to update the support for the Ocelot to support both v1 and v2 PROMs (with auto-detection!) and add support for the Ocelot-G. The update to the Ocelot is something I _thought_ I already sent you... but it's not in the CVS repository, so I can't be sure. It's in my development tree, so I figured I'd send it as part of this update anyway. Support for the Ocelot-G isn't quite done yet, but it's very close. The ethernet drivers need to be worked on, but the board is currently running on my workbench with an add-on ethernet card and NFS-root. So far, it seems pretty stable. This patch is against a recent CVS snapshot (from about an hour ago). Matt -- Matthew D. Dharm Senior Software Designer Momentum Computer Inc. 1815 Aston Ave. Suite 107 (760) 431-8663 X-115 Carlsbad, CA 92008-7310 Momentum Works For You www.momenco.com ------=_NextPart_000_003F_01C1BB0F.E5696E00 Content-Type: application/octet-stream; name="patch20020221-3" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="patch20020221-3" ? arch/mips/gt64240=0A= ? arch/mips/boot/elf2ecoff=0A= ? arch/mips/boot/vmlinux.ecoff=0A= ? arch/mips/boot/addinitrd=0A= Index: arch/mips/Makefile=0A= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=0A= RCS file: /cvs/linux/arch/mips/Makefile,v=0A= retrieving revision 1.78.2.2=0A= diff -u -r1.78.2.2 Makefile=0A= --- arch/mips/Makefile 2002/02/15 21:05:47 1.78.2.2=0A= +++ arch/mips/Makefile 2002/02/22 04:34:35=0A= @@ -262,6 +262,17 @@=0A= endif=0A= =0A= #=0A= +# Momentum Ocelot-G board=0A= +#=0A= +ifdef CONFIG_MOMENCO_OCELOT_G=0A= +# The Ocelot-G setup.o must be linked early - it does the ioremap() for = the=0A= +# mips_io_port_base.=0A= +CORE_FILES +=3D arch/mips/gt64240/momenco_ocelot_g.o=0A= +SUBDIRS +=3D arch/mips/gt64240=0A= +LOADADDR +=3D 0x80100000=0A= +endif=0A= +=0A= +#=0A= # Philips Nino=0A= #=0A= ifdef CONFIG_NINO=0A= Index: arch/mips/config.in=0A= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=0A= RCS file: /cvs/linux/arch/mips/config.in,v=0A= retrieving revision 1.154.2.14=0A= diff -u -r1.154.2.14 config.in=0A= --- arch/mips/config.in 2002/02/15 21:05:47 1.154.2.14=0A= +++ arch/mips/config.in 2002/02/22 04:34:37=0A= @@ -56,6 +56,7 @@=0A= fi=0A= bool 'Support for Mips Magnum 4000' CONFIG_MIPS_MAGNUM_4000=0A= bool 'Support for Momentum Ocelot board' CONFIG_MOMENCO_OCELOT=0A= +bool 'Support for Momentum Ocelot-G board' CONFIG_MOMENCO_OCELOT_G=0A= bool 'Support for NEC DDB Vrc-5476' CONFIG_DDB5476=0A= bool 'Support for NEC DDB Vrc-5477' CONFIG_DDB5477=0A= bool 'Support for NEC Osprey board' CONFIG_NEC_OSPREY=0A= @@ -161,6 +162,13 @@=0A= if [ "$CONFIG_MOMENCO_OCELOT" =3D "y" ]; then=0A= define_bool CONFIG_PCI y=0A= define_bool CONFIG_SYSCLK_100 y=0A= + define_bool CONFIG_SWAP_IO_SPACE y=0A= + define_bool CONFIG_NEW_IRQ y=0A= + define_bool CONFIG_NONCOHERENT_IO y=0A= + define_bool CONFIG_OLD_TIME_C y=0A= +fi=0A= +if [ "$CONFIG_MOMENCO_OCELOT_G" =3D "y" ]; then=0A= + define_bool CONFIG_PCI y=0A= define_bool CONFIG_SWAP_IO_SPACE y=0A= define_bool CONFIG_NEW_IRQ y=0A= define_bool CONFIG_NONCOHERENT_IO y=0A= Index: arch/mips/gt64120/momenco_ocelot/prom.c=0A= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=0A= RCS file: /cvs/linux/arch/mips/gt64120/momenco_ocelot/prom.c,v=0A= retrieving revision 1.3.2.1=0A= diff -u -r1.3.2.1 prom.c=0A= --- arch/mips/gt64120/momenco_ocelot/prom.c 2001/12/12 13:45:58 1.3.2.1=0A= +++ arch/mips/gt64120/momenco_ocelot/prom.c 2002/02/22 04:34:38=0A= @@ -15,34 +15,35 @@=0A= #include =0A= #include =0A= =0A= -#define PLD_BASE 0xbc000000=0A= +struct callvectors {=0A= + int (*open) (char*, int, int);=0A= + int (*close) (int);=0A= + int (*read) (int, void*, int);=0A= + int (*write) (int, void*, int);=0A= + off_t (*lseek) (int, off_t, int);=0A= + int (*printf) (const char*, ...);=0A= + void (*cacheflush) (void);=0A= + char* (*gets) (char*);=0A= +};=0A= =0A= -#define REV 0x0 /* Board Assembly Revision */=0A= -#define PLD1ID 0x1 /* PLD 1 ID */=0A= -#define PLD2ID 0x2 /* PLD 2 ID */=0A= -#define RESET_STAT 0x3 /* Reset Status Register */=0A= -#define BOARD_STAT 0x4 /* Board Status Register */=0A= -#define CPCI_ID 0x5 /* Compact PCI ID Register */=0A= -#define CONTROL 0x8 /* Control Register */=0A= -#define CPU_EEPROM 0x9 /* CPU Configuration EEPROM Register */=0A= -#define INTMASK 0xA /* Interrupt Mask Register */=0A= -#define INTSTAT 0xB /* Interrupt Status Register */=0A= -#define INTSET 0xC /* Interrupt Set Register */=0A= -#define INTCLR 0xD /* Interrupt Clear Register */=0A= -=0A= -#define PLD_REG(x) ((uint8_t*)(PLD_BASE+(x)))=0A= -=0A= +struct callvectors* debug_vectors;=0A= char arcs_cmdline[CL_SIZE];=0A= =0A= +extern unsigned long gt64120_base;=0A= +=0A= const char *get_system_type(void)=0A= {=0A= return "Momentum Ocelot";=0A= }=0A= =0A= /* [jsun@junsun.net] PMON passes arguments in C main() style */=0A= -void __init prom_init(int argc, const char **arg)=0A= +void __init prom_init(int argc, char **arg, char** env, struct = callvectors *cv)=0A= {=0A= int i;=0A= + uint32_t tmp;=0A= +=0A= + /* save the PROM vectors for debugging use */=0A= + debug_vectors =3D cv;=0A= =0A= /* arg[0] is "g", the rest is boot parameters */=0A= arcs_cmdline[0] =3D '\0';=0A= @@ -56,10 +57,17 @@=0A= =0A= mips_machgroup =3D MACH_GROUP_MOMENCO;=0A= mips_machtype =3D MACH_MOMENCO_OCELOT;=0A= +=0A= + while (*env) {=0A= + if (strncmp("gtbase", *env, 6) =3D=3D 0) {=0A= + gt64120_base =3D simple_strtol(*env + strlen("gtbase=3D"),=0A= + NULL, 16);=0A= + break;=0A= + }=0A= + *env++;=0A= + }=0A= =0A= - /* turn off the Bit Error LED, which comes on automatically=0A= - * at power-up reset */=0A= - *PLD_REG(INTCLR) =3D 0x80;=0A= + debug_vectors->printf("Booting Linux kernel...\n");=0A= =0A= /* All the boards have at least 64MiB. If there's more, we=0A= detect and register it later */=0A= Index: arch/mips/gt64120/momenco_ocelot/setup.c=0A= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=0A= RCS file: /cvs/linux/arch/mips/gt64120/momenco_ocelot/setup.c,v=0A= retrieving revision 1.5.2.1=0A= diff -u -r1.5.2.1 setup.c=0A= --- arch/mips/gt64120/momenco_ocelot/setup.c 2002/02/07 01:58:06 1.5.2.1=0A= +++ arch/mips/gt64120/momenco_ocelot/setup.c 2002/02/22 04:34:38=0A= @@ -83,25 +83,9 @@=0A= =0A= static void __init setup_l3cache(unsigned long size);=0A= =0A= -void __init momenco_ocelot_setup(void)=0A= +/* setup code for a handoff from a version 1 PMON 2000 PROM */=0A= +void PMON_v1_setup()=0A= {=0A= - void (*l3func)(unsigned long)=3DKSEG1ADDR(&setup_l3cache);=0A= - unsigned int tmpword;=0A= -=0A= - board_time_init =3D gt64120_time_init;=0A= -=0A= - _machine_restart =3D momenco_ocelot_restart;=0A= - _machine_halt =3D momenco_ocelot_halt;=0A= - _machine_power_off =3D momenco_ocelot_power_off;=0A= -=0A= - /*=0A= - * initrd_start =3D (ulong)ocelot_initrd_start;=0A= - * initrd_end =3D (ulong)ocelot_initrd_start + = (ulong)ocelot_initrd_size;=0A= - * initrd_below_start_ok =3D 1;=0A= - */=0A= - rtc_ops =3D &no_rtc_ops;=0A= -=0A= -=0A= /* A wired TLB entry for the GT64120A and the serial port. The=0A= GT64120A is going to be hit on every IRQ anyway - there's=0A= absolutely no point in letting it be a random TLB entry, as=0A= @@ -122,12 +106,10 @@=0A= Ocelot PLD (CS0) 0x2c000000 0xe0020000=0A= NVRAM 0x2c800000 0xe0030000=0A= */=0A= - =0A= add_temporary_entry(ENTRYLO(0x2C000000), ENTRYLO(0x2d000000), = 0xe0020000, PM_64K);=0A= =0A= -=0A= /* Relocate the CS3/BootCS region */=0A= - GT_WRITE( GT_CS3BOOTLD_OFS, 0x2f000000 >> 21);=0A= + GT_WRITE(GT_CS3BOOTLD_OFS, 0x2f000000 >> 21);=0A= =0A= /* Relocate CS[012] */=0A= GT_WRITE(GT_CS20LD_OFS, 0x2c000000 >> 21);=0A= @@ -142,18 +124,74 @@=0A= GT_WRITE(GT_PCI0_CFGDATA_OFS, 0x24000000);=0A= GT_WRITE(GT_PCI0_CFGADDR_OFS, 0x80000024);=0A= GT_WRITE(GT_PCI0_CFGDATA_OFS, 0x24000001);=0A= +}=0A= =0A= - /* Relocate PCI0 I/O and Mem0 */=0A= - GT_WRITE(GT_PCI0IOLD_OFS, 0x20000000 >> 21);=0A= - GT_WRITE(GT_PCI0M0LD_OFS, 0x22000000 >> 21);=0A= +/* setup code for a handoff from a version 2 PMON 2000 PROM */=0A= +void PMON_v2_setup()=0A= +{=0A= + /* A wired TLB entry for the GT64120A and the serial port. The=0A= + GT64120A is going to be hit on every IRQ anyway - there's=0A= + absolutely no point in letting it be a random TLB entry, as=0A= + it'll just cause needless churning of the TLB. And we use=0A= + the other half for the serial port, which is just a PITA=0A= + otherwise :)=0A= =0A= - /* Relocate PCI0 Mem1 */=0A= - GT_WRITE(GT_PCI0M1LD_OFS, 0x36000000 >> 21);=0A= + Device Physical Virtual=0A= + GT64120 Internal Regs 0xf4000000 0xe0000000=0A= + UARTs (CS2) 0xfd000000 0xe0001000=0A= + */=0A= + add_wired_entry(ENTRYLO(0xf4000000), ENTRYLO(0xfD000000), 0xe0000000, = PM_4K);=0A= +=0A= + /* Also a temporary entry to let us talk to the Ocelot PLD and NVRAM=0A= + in the CS[012] region. We can't use ioremap() yet. The NVRAM=0A= + is a ST M48T37Y, which includes NVRAM, RTC, and Watchdog functions.=0A= +=0A= + Ocelot PLD (CS0) 0xfc000000 0xe0020000=0A= + NVRAM 0xfc800000 0xe0030000=0A= + */=0A= + add_temporary_entry(ENTRYLO(0xfC000000), ENTRYLO(0xfd000000), = 0xe0020000, PM_64K);=0A= +=0A= + gt64120_base =3D 0xe0000000;=0A= +}=0A= +=0A= +void __init momenco_ocelot_setup(void)=0A= +{=0A= + void (*l3func)(unsigned long)=3DKSEG1ADDR(&setup_l3cache);=0A= + unsigned int tmpword;=0A= +=0A= + board_time_init =3D gt64120_time_init;=0A= +=0A= + _machine_restart =3D momenco_ocelot_restart;=0A= + _machine_halt =3D momenco_ocelot_halt;=0A= + _machine_power_off =3D momenco_ocelot_power_off;=0A= +=0A= + /*=0A= + * initrd_start =3D (ulong)ocelot_initrd_start;=0A= + * initrd_end =3D (ulong)ocelot_initrd_start + = (ulong)ocelot_initrd_size;=0A= + * initrd_below_start_ok =3D 1;=0A= + */=0A= + rtc_ops =3D &no_rtc_ops;=0A= +=0A= + /* do handoff reconfiguration */=0A= + if (gt64120_base =3D=3D KSEG1ADDR(GT_DEF_BASE))=0A= + PMON_v1_setup();=0A= + else=0A= + PMON_v2_setup();=0A= =0A= + /* Turn off the Bit-Error LED */=0A= + OCELOT_PLD_WRITE(0x80, INTCLR);=0A= +=0A= /* Relocate all the PCI1 stuff, not that we use it */=0A= GT_WRITE(GT_PCI1IOLD_OFS, 0x30000000 >> 21);=0A= GT_WRITE(GT_PCI1M0LD_OFS, 0x32000000 >> 21);=0A= GT_WRITE(GT_PCI1M1LD_OFS, 0x34000000 >> 21);=0A= +=0A= + /* Relocate PCI0 I/O and Mem0 */=0A= + GT_WRITE(GT_PCI0IOLD_OFS, 0x20000000 >> 21);=0A= + GT_WRITE(GT_PCI0M0LD_OFS, 0x22000000 >> 21);=0A= +=0A= + /* Relocate PCI0 Mem1 */=0A= + GT_WRITE(GT_PCI0M1LD_OFS, 0x36000000 >> 21);=0A= =0A= /* For the initial programming, we assume 512MB configuration */=0A= /* Relocate the CPU's view of the RAM... */=0A= Index: arch/mips/kernel/setup.c=0A= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=0A= RCS file: /cvs/linux/arch/mips/kernel/setup.c,v=0A= retrieving revision 1.96.2.12=0A= diff -u -r1.96.2.12 setup.c=0A= --- arch/mips/kernel/setup.c 2002/02/15 21:05:48 1.96.2.12=0A= +++ arch/mips/kernel/setup.c 2002/02/22 04:34:39=0A= @@ -665,6 +665,7 @@=0A= void malta_setup(void);=0A= void ikos_setup(void);=0A= void momenco_ocelot_setup(void);=0A= + void momenco_ocelot_g_setup(void);=0A= void nino_setup(void);=0A= void nec_osprey_setup(void);=0A= void jmr3927_setup(void);=0A= @@ -730,6 +731,11 @@=0A= #ifdef CONFIG_MOMENCO_OCELOT=0A= case MACH_GROUP_MOMENCO:=0A= momenco_ocelot_setup();=0A= + break;=0A= +#endif=0A= +#ifdef CONFIG_MOMENCO_OCELOT_G=0A= + case MACH_GROUP_MOMENCO:=0A= + momenco_ocelot_g_setup();=0A= break;=0A= #endif=0A= #ifdef CONFIG_SGI_IP22=0A= Index: drivers/mtd/devices/docprobe.c=0A= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=0A= RCS file: /cvs/linux/drivers/mtd/devices/docprobe.c,v=0A= retrieving revision 1.3=0A= diff -u -r1.3 docprobe.c=0A= --- drivers/mtd/devices/docprobe.c 2001/11/05 20:15:52 1.3=0A= +++ drivers/mtd/devices/docprobe.c 2002/02/22 04:34:53=0A= @@ -88,6 +88,9 @@=0A= 0xe4000000,=0A= #elif defined(CONFIG_MOMENCO_OCELOT)=0A= 0x2f000000,=0A= + 0xff000000,=0A= +#elif defined(CONFIG_MOMENCO_OCELOT_G)=0A= + 0xff000000,=0A= #else=0A= #warning Unknown architecture for DiskOnChip. No default probe = locations defined=0A= #endif=0A= Index: include/asm-mips/bootinfo.h=0A= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=0A= RCS file: /cvs/linux/include/asm-mips/bootinfo.h,v=0A= retrieving revision 1.43.2.8=0A= diff -u -r1.43.2.8 bootinfo.h=0A= --- include/asm-mips/bootinfo.h 2002/02/15 21:05:49 1.43.2.8=0A= +++ include/asm-mips/bootinfo.h 2002/02/22 04:35:04=0A= @@ -121,6 +121,7 @@=0A= * Valid machtype for group MOMENCO=0A= */=0A= #define MACH_MOMENCO_OCELOT 0=0A= +#define MACH_MOMENCO_OCELOT_G 1=0A= =0A= =0A= /*=0A= Index: include/asm-mips/serial.h=0A= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=0A= RCS file: /cvs/linux/include/asm-mips/serial.h,v=0A= retrieving revision 1.23.2.2=0A= diff -u -r1.23.2.2 serial.h=0A= --- include/asm-mips/serial.h 2002/01/07 03:33:54 1.23.2.2=0A= +++ include/asm-mips/serial.h 2002/02/22 04:35:04=0A= @@ -267,6 +267,23 @@=0A= #define MOMENCO_OCELOT_SERIAL_PORT_DEFNS=0A= #endif=0A= =0A= +#ifdef CONFIG_MOMENCO_OCELOT_G=0A= +/* Ordinary NS16552 duart with a 20MHz crystal. */=0A= +#define OCELOT_G_BASE_BAUD ( 20000000 / 16 )=0A= +=0A= +#define OCELOT_G_SERIAL1_IRQ 4=0A= +#define OCELOT_G_SERIAL1_BASE 0xe0001020=0A= +=0A= +#define _OCELOT_G_SERIAL_INIT(int, base) \=0A= + { baud_base: OCELOT_G_BASE_BAUD, irq: int, flags: STD_COM_FLAGS,\=0A= + iomem_base: (u8 *) base, iomem_reg_shift: 2, \=0A= + io_type: SERIAL_IO_MEM }=0A= +#define MOMENCO_OCELOT_G_SERIAL_PORT_DEFNS \=0A= + _OCELOT_G_SERIAL_INIT(OCELOT_G_SERIAL1_IRQ, OCELOT_G_SERIAL1_BASE)=0A= +#else=0A= +#define MOMENCO_OCELOT_G_SERIAL_PORT_DEFNS=0A= +#endif=0A= +=0A= #ifdef CONFIG_DDB5477=0A= #define DDB5477_SERIAL_PORT_DEFNS = \=0A= { baud_base: BASE_BAUD, irq: 12, flags: STD_COM_FLAGS, = \=0A= @@ -279,17 +296,18 @@=0A= #define DDB5477_SERIAL_PORT_DEFNS=0A= #endif=0A= =0A= -#define SERIAL_PORT_DFNS \=0A= - IVR_SERIAL_PORT_DEFNS \=0A= - ITE_SERIAL_PORT_DEFNS \=0A= - ATLAS_SERIAL_PORT_DEFNS \=0A= - COBALT_SERIAL_PORT_DEFNS \=0A= - EV96100_SERIAL_PORT_DEFNS \=0A= - JAZZ_SERIAL_PORT_DEFNS \=0A= - STD_SERIAL_PORT_DEFNS \=0A= - EXTRA_SERIAL_PORT_DEFNS \=0A= - HUB6_SERIAL_PORT_DFNS \=0A= - MOMENCO_OCELOT_SERIAL_PORT_DEFNS\=0A= - AU1000_SERIAL_PORT_DEFNS \=0A= - TXX927_SERIAL_PORT_DEFNS \=0A= +#define SERIAL_PORT_DFNS \=0A= + IVR_SERIAL_PORT_DEFNS \=0A= + ITE_SERIAL_PORT_DEFNS \=0A= + ATLAS_SERIAL_PORT_DEFNS \=0A= + COBALT_SERIAL_PORT_DEFNS \=0A= + EV96100_SERIAL_PORT_DEFNS \=0A= + JAZZ_SERIAL_PORT_DEFNS \=0A= + STD_SERIAL_PORT_DEFNS \=0A= + EXTRA_SERIAL_PORT_DEFNS \=0A= + HUB6_SERIAL_PORT_DFNS \=0A= + MOMENCO_OCELOT_SERIAL_PORT_DEFNS \=0A= + MOMENCO_OCELOT_G_SERIAL_PORT_DEFNS \=0A= + AU1000_SERIAL_PORT_DEFNS \=0A= + TXX927_SERIAL_PORT_DEFNS \=0A= DDB5477_SERIAL_PORT_DEFNS=0A= ------=_NextPart_000_003F_01C1BB0F.E5696E00-- From owner-linux-mips@oss.sgi.com Thu Feb 21 20:58:07 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g1M4w7l20275 for linux-mips-outgoing; Thu, 21 Feb 2002 20:58:07 -0800 Received: from hermes.mvista.com (gateway-1237.mvista.com [12.44.186.158]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g1M4vv920270 for ; Thu, 21 Feb 2002 20:57:57 -0800 Received: from mvista.com (IDENT:jsun@orion.mvista.com [10.0.0.75]) by hermes.mvista.com (8.11.0/8.11.0) with ESMTP id g1M3tAB13008; Thu, 21 Feb 2002 19:55:10 -0800 Message-ID: <3C75C19C.13BB0FCC@mvista.com> Date: Thu, 21 Feb 2002 19:57:16 -0800 From: Jun Sun X-Mailer: Mozilla 4.72 [en] (X11; U; Linux 2.2.18 i686) X-Accept-Language: en MIME-Version: 1.0 To: linux-mips@oss.sgi.com Subject: ieee754_csr is the problem (Re: lazy fpu switch irrelavant to no-fpu case? References: <3C75B181.C5A065A1@mvista.com> Content-Type: multipart/mixed; boundary="------------A6523E81F65DE547E9307DC0" Sender: owner-linux-mips@oss.sgi.com Precedence: bulk This is a multi-part message in MIME format. --------------A6523E81F65DE547E9307DC0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Jun Sun wrote: > Anyhow, the problem I am seeing with FPU/SMP case seems to be caused by FPU > emulation code itself, if we can assume it is not caused by fpu context > switch. Right now the FPU is not turned on on the box. > OK, I found the guilt part in FPU emul. It is the global variable ieee754_csr. The following patch seems to fix the problem. I am sure someone who are more familiar with FPU might be able to make it more elegant. There is another global variable which is potentially dangerous for SMP. It is fpuemuprivate. Currently it is used in almost used for accounting and read-only purpose. I did not bother to change it. It should be fixed too, I suppose. Cheers. Jun --------------A6523E81F65DE547E9307DC0 Content-Type: text/plain; charset=us-ascii; name="patch3" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="patch3" diff -Nru linux/arch/mips/math-emu/ieee754.h.orig linux/arch/mips/math-emu/ieee754.h --- linux/arch/mips/math-emu/ieee754.h.orig Thu Jan 31 17:13:26 2002 +++ linux/arch/mips/math-emu/ieee754.h Thu Feb 21 19:34:06 2002 @@ -323,7 +323,7 @@ /* the control status register */ -struct ieee754_csr { +struct ieee754_csr_struct { unsigned pad:13; unsigned nod:1; /* set 1 for no denormalised numbers */ unsigned cx:5; /* exceptions this operation */ @@ -331,7 +331,13 @@ unsigned sx:5; /* exceptions total */ unsigned rm:2; /* current rounding mode */ }; -extern struct ieee754_csr ieee754_csr; + +#include +#include +#include +#include +extern struct ieee754_csr_struct ieee754_csr_array[NR_CPUS]; +#define ieee754_csr ieee754_csr_array[smp_processor_id()] static __inline unsigned ieee754_getrm(void) { diff -Nru linux/arch/mips/math-emu/ieee754.c.orig linux/arch/mips/math-emu/ieee754.c --- linux/arch/mips/math-emu/ieee754.c.orig Mon Jan 28 11:17:14 2002 +++ linux/arch/mips/math-emu/ieee754.c Thu Feb 21 19:37:32 2002 @@ -52,7 +52,7 @@ /* the control status register */ -struct ieee754_csr ieee754_csr; +struct ieee754_csr_struct ieee754_csr_array[NR_CPUS]; /* special constants */ diff -Nru linux/arch/mips/math-emu/cp1emu.c.orig linux/arch/mips/math-emu/cp1emu.c --- linux/arch/mips/math-emu/cp1emu.c.orig Mon Jan 28 11:17:14 2002 +++ linux/arch/mips/math-emu/cp1emu.c Thu Feb 21 19:22:45 2002 @@ -945,7 +945,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_struct ieee754_csr_save; \ s = f1 (s, t); \ ieee754_csr_save = ieee754_csr; \ s = f2 (s, r); \ diff -Nru linux/arch/mips/math-emu/dp_sqrt.c.orig linux/arch/mips/math-emu/dp_sqrt.c --- linux/arch/mips/math-emu/dp_sqrt.c.orig Thu Feb 21 19:41:09 2002 +++ linux/arch/mips/math-emu/dp_sqrt.c Thu Feb 21 19:39:08 2002 @@ -37,7 +37,7 @@ ieee754dp ieee754dp_sqrt(ieee754dp x) { - struct ieee754_csr oldcsr; + struct ieee754_csr_struct oldcsr; ieee754dp y, z, t; unsigned scalx, yh; COMPXDP; --------------A6523E81F65DE547E9307DC0-- From owner-linux-mips@oss.sgi.com Fri Feb 22 01:54:20 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g1M9sKd27153 for linux-mips-outgoing; Fri, 22 Feb 2002 01:54:20 -0800 Received: from noose.gt.owl.de (postfix@noose.gt.owl.de [62.52.19.4]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g1M9sF927150 for ; Fri, 22 Feb 2002 01:54:15 -0800 Received: by noose.gt.owl.de (Postfix, from userid 10) id E6DE6866; Fri, 22 Feb 2002 09:53:49 +0100 (CET) Received: by localhost (Postfix, from userid 1000) id 024BC1A2C8; Fri, 22 Feb 2002 09:52:12 +0100 (CET) Date: Fri, 22 Feb 2002 09:52:12 +0100 From: Florian Lohoff To: Wayne Gowcher Cc: Linux-MIPS Subject: Re: pthread support in mipsel-linux Message-ID: <20020222085212.GB21544@paradigm.rfc822.org> References: <20020221102503.A28936@lucon.org> <20020221184558.33231.qmail@web11906.mail.yahoo.com> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="St7VIuEGZ6dlpu13" Content-Disposition: inline In-Reply-To: <20020221184558.33231.qmail@web11906.mail.yahoo.com> User-Agent: Mutt/1.3.27i Organization: rfc822 - pure communication Sender: owner-linux-mips@oss.sgi.com Precedence: bulk --St7VIuEGZ6dlpu13 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Feb 21, 2002 at 10:45:58AM -0800, Wayne Gowcher wrote: > It seems like getting pthread support for mips1 could > be a lengthy and involved process. >=20 > So I was wondering has anyone out there used pthreads > for with mips1 with any of the redhat distributions on > sgi ? Its just the matter of ll/sc support - There are also some=20 "mips2" which lack ll/sc. There is some kernel emulation for ll/sc and also SYSMIPS(MIPS_ATOMIC_SET) which should be enough to get pthreads working on mips1. Flo --=20 Florian Lohoff flo@rfc822.org +49-5201-669912 Nine nineth on september the 9th Welcome to the new billenium --St7VIuEGZ6dlpu13 Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.6 (GNU/Linux) Comment: For info see http://www.gnupg.org iD8DBQE8dga8Uaz2rXW+gJcRAiVJAKCi9LxMWEir/x18dCaO00FIe8i6egCg4L0i O9SzEGnwWIRmfvPzJWr/Ws0= =nkzU -----END PGP SIGNATURE----- --St7VIuEGZ6dlpu13-- From owner-linux-mips@oss.sgi.com Fri Feb 22 02:44:41 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g1MAifa29375 for linux-mips-outgoing; Fri, 22 Feb 2002 02:44:41 -0800 Received: from mx.mips.com (mx.mips.com [206.31.31.226]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g1MAiU929371 for ; Fri, 22 Feb 2002 02:44:30 -0800 Received: from newman.mips.com (ns-dmz [206.31.31.225]) by mx.mips.com (8.9.3/8.9.0) with ESMTP id BAA14818; Fri, 22 Feb 2002 01:44:24 -0800 (PST) Received: from Ulysses (ulysses [192.168.236.13]) by newman.mips.com (8.9.3/8.9.0) with SMTP id BAA15171; Fri, 22 Feb 2002 01:44:20 -0800 (PST) Message-ID: <005801c1bb85$a9e9c980$0deca8c0@Ulysses> From: "Kevin D. Kissell" To: "Jun Sun" , References: <3C75B181.C5A065A1@mvista.com> Subject: Re: lazy fpu switch irrelavant to no-fpu case? Date: Fri, 22 Feb 2002 10:45:14 +0100 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.4807.1700 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4807.1700 Sender: owner-linux-mips@oss.sgi.com Precedence: bulk In the very first cut at integrating the Algorithmics emulator with Linux, the emulator actually contained storage that represented the FPU registers, and FP context management was meaningful. Using thread context storage directly for the FPU registers was an optimisaton that I did after I got the code running, and I didn't bother eliminating the last_task_used_math setup, probably on the basis that it wasn't costing much and that it might still be useful in some way. I don't think you'll break anything by getting rid of it, but I don't think you'll fix anything either. As I stated in another message on the subject of SMP problems observed with the FPU emulator, while the basic mechanisms of FP emulation should be SMP safe, there may well be non-SMP artifcacts in the code. A cursory inspection shows that there is a single mips_fpu_emulator_private data structure for the emulator, which contains statistics which risk being screwed up due to non-atomic increments being used. That ought to be fixed, but should not cause any user-mode-visible problems. But I also note that the emulator uses a single global storage location for "ieee754_csr". The kernel port of the code does copies between the thread context image of the MIPS csr and this global which are manifestly SMP unsafe. Could the bugs you're seeing be explainable by corruption of rounding mode and exception state? Regards, Kevin K. ----- Original Message ----- From: "Jun Sun" To: Sent: Friday, February 22, 2002 3:48 AM Subject: lazy fpu switch irrelavant to no-fpu case? > > It appears to me that lazy fpu switch has no relevancy to CPUs that don't have > FPU. > > If you do a scan, you will see last_task_used_math are used in four kernel > files: > > ptrace.c > process.c > signal.c > traps.c > > In the case of ptrace.c and process.c, the variable is used only when CPU has > FPU. > > In the case of traps.c (do_cpu()), it used redaundantly with another condition > checking. > > In the case of signal.c, no matter what last_task_used_math is, the same code > will be executed anyway. > > Now think about it, it actually makes sense - if we don't have hardware FPU, > why do we care of fpu context switch. > > Anyhow, the problem I am seeing with FPU/SMP case seems to be caused by FPU > emulation code itself, if we can assume it is not caused by fpu context > switch. Right now the FPU is not turned on on the box. > > The following patch cleans it up a little based on the above observation. > Make sense? > > Jun > > diff -Nru linux/arch/mips/kernel/traps.c.orig linux/arch/mips/kernel/traps.c > --- linux/arch/mips/kernel/traps.c.orig Wed Jan 30 15:17:12 2002 > +++ linux/arch/mips/kernel/traps.c Thu Feb 21 18:46:28 2002 > @@ -678,14 +678,11 @@ > return; > > fp_emul: > - if (last_task_used_math != current) { > - if (!current->used_math) { > - fpu_emulator_init_fpu(); > - current->used_math = 1; > - } > + if (!current->used_math) { > + fpu_emulator_init_fpu(); > + current->used_math = 1; > } > sig = fpu_emulator_cop1Handler(regs); > - last_task_used_math = current; > if (sig) > force_sig(sig, current); > return; > From owner-linux-mips@oss.sgi.com Fri Feb 22 02:59:17 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g1MAxHc29698 for linux-mips-outgoing; Fri, 22 Feb 2002 02:59:17 -0800 Received: from mx.mips.com (mx.mips.com [206.31.31.226]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g1MAx3929693 for ; Fri, 22 Feb 2002 02:59:03 -0800 Received: from newman.mips.com (ns-dmz [206.31.31.225]) by mx.mips.com (8.9.3/8.9.0) with ESMTP id BAA15024; Fri, 22 Feb 2002 01:58:56 -0800 (PST) Received: from Ulysses (ulysses [192.168.236.13]) by newman.mips.com (8.9.3/8.9.0) with SMTP id BAA15479; Fri, 22 Feb 2002 01:58:54 -0800 (PST) Message-ID: <006701c1bb87$b2b6fb80$0deca8c0@Ulysses> From: "Kevin D. Kissell" To: "Jun Sun" , References: <3C75B181.C5A065A1@mvista.com> <3C75C19C.13BB0FCC@mvista.com> Subject: Re: ieee754_csr is the problem (Re: lazy fpu switch irrelavant to no-fpu case? Date: Fri, 22 Feb 2002 10:59:35 +0100 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.4807.1700 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4807.1700 Sender: owner-linux-mips@oss.sgi.com Precedence: bulk This is what I get for processing my mail in-order. I just got done writing a message asking if the ieee_754_csr issue might be at the root of your problem. Anyway, rather than create an array of the damned things, I would think that the "best" thing to do would be to merge the "abstract" IEEE CSR with the simulated MIPS CSR (by adding the "noq" and "nod" bits in otherwise unused/reserved bit positions), and using the thread-local CSR copy for all of the ieee_754_csr manipulations, much as I did for the FP registers. That would be a bit more intrusive than your proposed hack, however, and only slightly more efficient. Kevin K. ----- Original Message ----- From: "Jun Sun" To: Sent: Friday, February 22, 2002 4:57 AM Subject: ieee754_csr is the problem (Re: lazy fpu switch irrelavant to no-fpu case? > Jun Sun wrote: > > Anyhow, the problem I am seeing with FPU/SMP case seems to be caused by FPU > > emulation code itself, if we can assume it is not caused by fpu context > > switch. Right now the FPU is not turned on on the box. > > > > OK, I found the guilt part in FPU emul. It is the global variable > ieee754_csr. The following patch seems to fix the problem. I am sure someone > who are more familiar with FPU might be able to make it more elegant. > > There is another global variable which is potentially dangerous for SMP. It > is fpuemuprivate. Currently it is used in almost used for accounting and > read-only purpose. I did not bother to change it. It should be fixed too, I > suppose. > > Cheers. > > Jun ---------------------------------------------------------------------------- ---- > diff -Nru linux/arch/mips/math-emu/ieee754.h.orig linux/arch/mips/math-emu/ieee754.h > --- linux/arch/mips/math-emu/ieee754.h.orig Thu Jan 31 17:13:26 2002 > +++ linux/arch/mips/math-emu/ieee754.h Thu Feb 21 19:34:06 2002 > @@ -323,7 +323,7 @@ > > /* the control status register > */ > -struct ieee754_csr { > +struct ieee754_csr_struct { > unsigned pad:13; > unsigned nod:1; /* set 1 for no denormalised numbers */ > unsigned cx:5; /* exceptions this operation */ > @@ -331,7 +331,13 @@ > unsigned sx:5; /* exceptions total */ > unsigned rm:2; /* current rounding mode */ > }; > -extern struct ieee754_csr ieee754_csr; > + > +#include > +#include > +#include > +#include > +extern struct ieee754_csr_struct ieee754_csr_array[NR_CPUS]; > +#define ieee754_csr ieee754_csr_array[smp_processor_id()] > > static __inline unsigned ieee754_getrm(void) > { > diff -Nru linux/arch/mips/math-emu/ieee754.c.orig linux/arch/mips/math-emu/ieee754.c > --- linux/arch/mips/math-emu/ieee754.c.orig Mon Jan 28 11:17:14 2002 > +++ linux/arch/mips/math-emu/ieee754.c Thu Feb 21 19:37:32 2002 > @@ -52,7 +52,7 @@ > > /* the control status register > */ > -struct ieee754_csr ieee754_csr; > +struct ieee754_csr_struct ieee754_csr_array[NR_CPUS]; > > /* special constants > */ > diff -Nru linux/arch/mips/math-emu/cp1emu.c.orig linux/arch/mips/math-emu/cp1emu.c > --- linux/arch/mips/math-emu/cp1emu.c.orig Mon Jan 28 11:17:14 2002 > +++ linux/arch/mips/math-emu/cp1emu.c Thu Feb 21 19:22:45 2002 > @@ -945,7 +945,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_struct ieee754_csr_save; \ > s = f1 (s, t); \ > ieee754_csr_save = ieee754_csr; \ > s = f2 (s, r); \ > diff -Nru linux/arch/mips/math-emu/dp_sqrt.c.orig linux/arch/mips/math-emu/dp_sqrt.c > --- linux/arch/mips/math-emu/dp_sqrt.c.orig Thu Feb 21 19:41:09 2002 > +++ linux/arch/mips/math-emu/dp_sqrt.c Thu Feb 21 19:39:08 2002 > @@ -37,7 +37,7 @@ > > ieee754dp ieee754dp_sqrt(ieee754dp x) > { > - struct ieee754_csr oldcsr; > + struct ieee754_csr_struct oldcsr; > ieee754dp y, z, t; > unsigned scalx, yh; > COMPXDP; > From owner-linux-mips@oss.sgi.com Fri Feb 22 04:57:09 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g1MCv9404223 for linux-mips-outgoing; Fri, 22 Feb 2002 04:57:09 -0800 Received: from multitech.co.in ([202.54.39.98]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g1MCv4904220 for ; Fri, 22 Feb 2002 04:57:05 -0800 Received: from multitech.co.in (Venkatesh [192.168.3.26]) by multitech.co.in (8.12.1/8.12.1) with ESMTP id g1MBuBQd004928 for ; Fri, 22 Feb 2002 17:26:12 +0530 Message-ID: <3C763244.5030206@multitech.co.in> Date: Fri, 22 Feb 2002 17:27:56 +0530 From: Venkatesh M R Organization: Multitech Software Systems User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.4) Gecko/20011019 Netscape6/6.2 X-Accept-Language: en-us MIME-Version: 1.0 To: Linux-MIPS Subject: How To Remove Write Protection Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Sender: owner-linux-mips@oss.sgi.com Precedence: bulk Hello, I am presently porting RTLinux to MIPS Atlas board ( with 4Kc core ). Can you please tell me how to remove the write protection of the Linux kernel (2.4.3) . Because I am getting the page fault when i am trying to insert the Rtlinux module. Best Regards & Thanks, Venkatesh M R From owner-linux-mips@oss.sgi.com Fri Feb 22 05:00:30 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g1MD0U804382 for linux-mips-outgoing; Fri, 22 Feb 2002 05:00:30 -0800 Received: from multitech.co.in ([202.54.39.98]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g1MD0P904377 for ; Fri, 22 Feb 2002 05:00:26 -0800 Received: from multitech.co.in (Venkatesh [192.168.3.26]) by multitech.co.in (8.12.1/8.12.1) with ESMTP id g1MBxXQd005031 for ; Fri, 22 Feb 2002 17:29:34 +0530 Message-ID: <3C76330E.1080208@multitech.co.in> Date: Fri, 22 Feb 2002 17:31:18 +0530 From: Venkatesh M R Organization: Multitech Software Systems User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.4) Gecko/20011019 Netscape6/6.2 X-Accept-Language: en-us MIME-Version: 1.0 To: Linux-MIPS Subject: Porting RTLinux Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Sender: owner-linux-mips@oss.sgi.com Precedence: bulk Hello, Is any one working (or has worked ) on Porting of RTLinux to MIPS (4Kc core) . If so can you please share your Ideas with me. Best Regards Venkatesh M R From owner-linux-mips@oss.sgi.com Fri Feb 22 06:40:35 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g1MEeZT11373 for linux-mips-outgoing; Fri, 22 Feb 2002 06:40:35 -0800 Received: from delta.ds2.pg.gda.pl (macro@delta.ds2.pg.gda.pl [213.192.72.1]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g1MEeR911370 for ; Fri, 22 Feb 2002 06:40:28 -0800 Received: from localhost by delta.ds2.pg.gda.pl (8.9.3/8.9.3) with SMTP id OAA07299; Fri, 22 Feb 2002 14:38:53 +0100 (MET) Date: Fri, 22 Feb 2002 14:38:53 +0100 (MET) From: "Maciej W. Rozycki" To: "H . J . Lu" cc: Wayne Gowcher , Linux-MIPS Subject: Re: pthread support in mipsel-linux In-Reply-To: <20020221102503.A28936@lucon.org> Message-ID: Organization: Technical University of Gdansk MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-linux-mips@oss.sgi.com Precedence: bulk On Thu, 21 Feb 2002, H . J . Lu wrote: > > Just to clarify, the glibc rpm in your Redhat 7.1 is > > compiled with -mips1 right ? So as it is broken yes ? > > Yes. -mips1 doesn't work well with thread. What's wrong with -mips1 currently? It used to be OK around glibc 2.2 -- has anything changed since then that needs -mips1 to be fixed? -- + Maciej W. Rozycki, Technical University of Gdansk, Poland + +--------------------------------------------------------------+ + e-mail: macro@ds2.pg.gda.pl, PGP key available + From owner-linux-mips@oss.sgi.com Fri Feb 22 06:45:40 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g1MEje311504 for linux-mips-outgoing; Fri, 22 Feb 2002 06:45:40 -0800 Received: from ns5.sony.co.jp (NS5.Sony.CO.JP [146.215.0.45]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g1MEjb911501 for ; Fri, 22 Feb 2002 06:45:37 -0800 Received: from mail2.sony.co.jp (mail2.sony.co.jp [43.0.1.202]) by ns5.sony.co.jp (R8/Sony) with ESMTP id g1MDjQS99525; Fri, 22 Feb 2002 22:45:26 +0900 (JST) Received: from mail2.sony.co.jp (localhost [127.0.0.1]) by mail2.sony.co.jp (R8) with ESMTP id g1MDjPH12995; Fri, 22 Feb 2002 22:45:25 +0900 (JST) Received: from smail1.sm.sony.co.jp (smail1.sm.sony.co.jp [43.11.253.1]) by mail2.sony.co.jp (R8) with ESMTP id g1MDjO712958; Fri, 22 Feb 2002 22:45:24 +0900 (JST) Received: from imail.sm.sony.co.jp (imail.sm.sony.co.jp [43.2.217.16]) by smail1.sm.sony.co.jp (8.8.8/3.6W) with ESMTP id WAA15480; Fri, 22 Feb 2002 22:45:18 +0900 (JST) Received: from mach0.sm.sony.co.jp (mach0.sm.sony.co.jp [43.2.226.27]) by imail.sm.sony.co.jp (8.9.3+3.2W/3.7W) with ESMTP id WAA08343; Fri, 22 Feb 2002 22:45:23 +0900 (JST) Received: from localhost by mach0.sm.sony.co.jp (8.11.0/8.11.0) with ESMTP id g1MDjNS24593; Fri, 22 Feb 2002 22:45:23 +0900 (JST) Date: Fri, 22 Feb 2002 22:45:22 +0900 (JST) Message-Id: <20020222.224522.80690047.machida@sm.sony.co.jp> To: macro@ds2.pg.gda.pl Cc: hjl@lucon.org, wgowcher@yahoo.com, linux-mips@oss.sgi.com Subject: Re: pthread support in mipsel-linux From: Hiroyuki Machida In-Reply-To: References: <20020221102503.A28936@lucon.org> X-Mailer: Mew version 2.1.51 on Emacs 20.7 / Mule 4.0 (HANANOEN) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-linux-mips@oss.sgi.com Precedence: bulk From: "Maciej W. Rozycki" Subject: Re: pthread support in mipsel-linux Date: Fri, 22 Feb 2002 14:38:53 +0100 (MET) > On Thu, 21 Feb 2002, H . J . Lu wrote: > > > > Just to clarify, the glibc rpm in your Redhat 7.1 is > > > compiled with -mips1 right ? So as it is broken yes ? > > > > Yes. -mips1 doesn't work well with thread. > > What's wrong with -mips1 currently? It used to be OK around glibc 2.2 -- > has anything changed since then that needs -mips1 to be fixed? > Functions such as compre_and_swap() in sysdeps/mips/atomicity.h are not atmoic with -mips1 option. --- Hiroyuki Machida Sony Corp. From owner-linux-mips@oss.sgi.com Fri Feb 22 07:08:12 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g1MF8CP11931 for linux-mips-outgoing; Fri, 22 Feb 2002 07:08:12 -0800 Received: from dea.linux-mips.net (a1as04-p242.stg.tli.de [195.252.186.242]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g1MF88911928 for ; Fri, 22 Feb 2002 07:08:09 -0800 Received: (from ralf@localhost) by dea.linux-mips.net (8.11.6/8.11.1) id g1ME7jv28928; Fri, 22 Feb 2002 15:07:45 +0100 Date: Fri, 22 Feb 2002 15:07:45 +0100 From: Ralf Baechle To: Venkatesh M R Cc: Linux-MIPS Subject: Re: How To Remove Write Protection Message-ID: <20020222150745.A28918@dea.linux-mips.net> References: <3C763244.5030206@multitech.co.in> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <3C763244.5030206@multitech.co.in>; from venkatesh@multitech.co.in on Fri, Feb 22, 2002 at 05:27:56PM +0530 X-Accept-Language: de,en,fr Sender: owner-linux-mips@oss.sgi.com Precedence: bulk On Fri, Feb 22, 2002 at 05:27:56PM +0530, Venkatesh M R wrote: > I am presently porting RTLinux to MIPS Atlas board ( with 4Kc core ). > Can you please tell me how to remove the write protection of the Linux > kernel (2.4.3) . > Because I am getting the page fault when i am trying to insert the > Rtlinux module. Modules aren't write protected. Ralf From owner-linux-mips@oss.sgi.com Fri Feb 22 07:16:33 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g1MFGXY12108 for linux-mips-outgoing; Fri, 22 Feb 2002 07:16:33 -0800 Received: from delta.ds2.pg.gda.pl (delta.ds2.pg.gda.pl [213.192.72.1]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g1MFGH912102 for ; Fri, 22 Feb 2002 07:16:18 -0800 Received: from localhost by delta.ds2.pg.gda.pl (8.9.3/8.9.3) with SMTP id PAA08019; Fri, 22 Feb 2002 15:10:55 +0100 (MET) Date: Fri, 22 Feb 2002 15:10:55 +0100 (MET) From: "Maciej W. Rozycki" To: Atsushi Nemoto cc: kevink@mips.com, mdharm@momenco.com, ralf@uni-koblenz.de, linux-mips@fnet.fr, linux-mips@oss.sgi.com Subject: Re: [patch] linux 2.4.17: The second mb() rework (final) In-Reply-To: <20020222.113634.45519920.nemoto@toshiba-tops.co.jp> Message-ID: Organization: Technical University of Gdansk MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-linux-mips@oss.sgi.com Precedence: bulk On Fri, 22 Feb 2002, Atsushi Nemoto wrote: > The contradiction is came from some confusion about usage of a word > "Core" in TX39 manual. Maybe a writer of the quoted statements > assumes a write buffer is outside of a "R3900 Processor Core". So if > he said "operation is completed" it means "data are sent to a write That's how I understand it. > buffer". Of course this point of view is not acceptable for software > programmers... If we handle it for the DECstation, we can do so for the TX39 as well. > macro> It's clear "sync" is strong on the TX39, stronger then required > macro> by MIPS II. > > So unfortunately this is not true. It is, considering the write buffer is actually external to the CPU. It's even required to be executed before checking the write buffer, as otherwise you may get a false positive result. -- + Maciej W. Rozycki, Technical University of Gdansk, Poland + +--------------------------------------------------------------+ + e-mail: macro@ds2.pg.gda.pl, PGP key available + From owner-linux-mips@oss.sgi.com Fri Feb 22 07:31:59 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g1MFVxU12496 for linux-mips-outgoing; Fri, 22 Feb 2002 07:31:59 -0800 Received: from delta.ds2.pg.gda.pl (delta.ds2.pg.gda.pl [213.192.72.1]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g1MFVg912489 for ; Fri, 22 Feb 2002 07:31:43 -0800 Received: from localhost by delta.ds2.pg.gda.pl (8.9.3/8.9.3) with SMTP id PAA08463; Fri, 22 Feb 2002 15:28:58 +0100 (MET) Date: Fri, 22 Feb 2002 15:28:57 +0100 (MET) From: "Maciej W. Rozycki" To: Hiroyuki Machida cc: hjl@lucon.org, wgowcher@yahoo.com, linux-mips@oss.sgi.com Subject: Re: pthread support in mipsel-linux In-Reply-To: <20020222.224522.80690047.machida@sm.sony.co.jp> Message-ID: Organization: Technical University of Gdansk MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-linux-mips@oss.sgi.com Precedence: bulk On Fri, 22 Feb 2002, Hiroyuki Machida wrote: > > What's wrong with -mips1 currently? It used to be OK around glibc 2.2 -- > > has anything changed since then that needs -mips1 to be fixed? > > Functions such as compre_and_swap() in sysdeps/mips/atomicity.h are > not atmoic with -mips1 option. They used not to be used for threads -- has it changed recently? It would make threads non-operational on the i386 as well, yet it doesn't seem to be the case. -- + Maciej W. Rozycki, Technical University of Gdansk, Poland + +--------------------------------------------------------------+ + e-mail: macro@ds2.pg.gda.pl, PGP key available + From owner-linux-mips@oss.sgi.com Fri Feb 22 08:33:39 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g1MGXdc15072 for linux-mips-outgoing; Fri, 22 Feb 2002 08:33:39 -0800 Received: from mx.mips.com (mx.mips.com [206.31.31.226]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g1MGXc915069 for ; Fri, 22 Feb 2002 08:33:38 -0800 Received: from newman.mips.com (ns-dmz [206.31.31.225]) by mx.mips.com (8.9.3/8.9.0) with ESMTP id HAA17995; Fri, 22 Feb 2002 07:33:29 -0800 (PST) Received: from grendel (grendel [192.168.236.16]) by newman.mips.com (8.9.3/8.9.0) with SMTP id HAA21494; Fri, 22 Feb 2002 07:33:28 -0800 (PST) Message-ID: <002e01c1bbb6$d436d5d0$10eca8c0@grendel> From: "Kevin D. Kissell" To: "Venkatesh M R" , "Linux-MIPS" References: <3C763244.5030206@multitech.co.in> Subject: Re: How To Remove Write Protection Date: Fri, 22 Feb 2002 16:37:23 +0100 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.4807.1700 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4807.1700 Sender: owner-linux-mips@oss.sgi.com Precedence: bulk > I am presently porting RTLinux to MIPS Atlas board ( with 4Kc core ). > Can you please tell me how to remove the write protection of the Linux > kernel (2.4.3) . > Because I am getting the page fault when i am trying to insert the > Rtlinux module. I rather doubt that write protection has anything to do with what you are seeing. It is far more likely that you are making the kernel dereference an uninitialized pointer. Kevin K. From owner-linux-mips@oss.sgi.com Fri Feb 22 09:53:20 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g1MHrK916217 for linux-mips-outgoing; Fri, 22 Feb 2002 09:53:20 -0800 Received: from rwcrmhc53.attbi.com (rwcrmhc53.attbi.com [204.127.198.39]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g1MHrH916214 for ; Fri, 22 Feb 2002 09:53:17 -0800 Received: from ocean.lucon.org ([12.234.16.87]) by rwcrmhc53.attbi.com (InterMail vM.4.01.03.27 201-229-121-127-20010626) with ESMTP id <20020222165312.RPYZ2951.rwcrmhc53.attbi.com@ocean.lucon.org>; Fri, 22 Feb 2002 16:53:12 +0000 Received: by ocean.lucon.org (Postfix, from userid 1000) id 7A202125C1; Fri, 22 Feb 2002 08:53:11 -0800 (PST) Date: Fri, 22 Feb 2002 08:53:10 -0800 From: "H . J . Lu" To: "Maciej W. Rozycki" Cc: Wayne Gowcher , Linux-MIPS Subject: Re: pthread support in mipsel-linux Message-ID: <20020222085310.A17035@lucon.org> References: <20020221102503.A28936@lucon.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: ; from macro@ds2.pg.gda.pl on Fri, Feb 22, 2002 at 02:38:53PM +0100 Sender: owner-linux-mips@oss.sgi.com Precedence: bulk On Fri, Feb 22, 2002 at 02:38:53PM +0100, Maciej W. Rozycki wrote: > On Thu, 21 Feb 2002, H . J . Lu wrote: > > > > Just to clarify, the glibc rpm in your Redhat 7.1 is > > > compiled with -mips1 right ? So as it is broken yes ? > > > > Yes. -mips1 doesn't work well with thread. > > What's wrong with -mips1 currently? It used to be OK around glibc 2.2 -- > has anything changed since then that needs -mips1 to be fixed? > Mutex is now implemented with spin lock by default. BTW, how many people have run "make check" on glibc compiled -mips1? H.J. From owner-linux-mips@oss.sgi.com Fri Feb 22 09:57:29 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g1MHvTQ16370 for linux-mips-outgoing; Fri, 22 Feb 2002 09:57:29 -0800 Received: from rwcrmhc54.attbi.com (rwcrmhc54.attbi.com [216.148.227.87]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g1MHvR916367 for ; Fri, 22 Feb 2002 09:57:27 -0800 Received: from ocean.lucon.org ([12.234.16.87]) by rwcrmhc54.attbi.com (InterMail vM.4.01.03.27 201-229-121-127-20010626) with ESMTP id <20020222165721.YOMU1214.rwcrmhc54.attbi.com@ocean.lucon.org>; Fri, 22 Feb 2002 16:57:21 +0000 Received: by ocean.lucon.org (Postfix, from userid 1000) id 085CD125C1; Fri, 22 Feb 2002 08:57:20 -0800 (PST) Date: Fri, 22 Feb 2002 08:57:20 -0800 From: "H . J . Lu" To: "Maciej W. Rozycki" Cc: Wayne Gowcher , Linux-MIPS Subject: Re: pthread support in mipsel-linux Message-ID: <20020222085720.B17035@lucon.org> References: <20020221102503.A28936@lucon.org> <20020222085310.A17035@lucon.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <20020222085310.A17035@lucon.org>; from hjl@lucon.org on Fri, Feb 22, 2002 at 08:53:10AM -0800 Sender: owner-linux-mips@oss.sgi.com Precedence: bulk On Fri, Feb 22, 2002 at 08:53:10AM -0800, H . J . Lu wrote: > On Fri, Feb 22, 2002 at 02:38:53PM +0100, Maciej W. Rozycki wrote: > > On Thu, 21 Feb 2002, H . J . Lu wrote: > > > > > > Just to clarify, the glibc rpm in your Redhat 7.1 is > > > > compiled with -mips1 right ? So as it is broken yes ? > > > > > > Yes. -mips1 doesn't work well with thread. > > > > What's wrong with -mips1 currently? It used to be OK around glibc 2.2 -- > > has anything changed since then that needs -mips1 to be fixed? > > > > Mutex is now implemented with spin lock by default. BTW, how many > people have run "make check" on glibc compiled -mips1? Also, how many people have bootstrapped and run "make check" on gcc 3.1 from CVS on Linux/mips with glibc compiled with -mips1? There are some thread tests in libstdc++-v3. H.J. From owner-linux-mips@oss.sgi.com Fri Feb 22 10:09:02 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g1MI92N16640 for linux-mips-outgoing; Fri, 22 Feb 2002 10:09:02 -0800 Received: from coplin19.mips.com ([80.63.7.130]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g1MI8w916637 for ; Fri, 22 Feb 2002 10:08:58 -0800 Received: (from kjelde@localhost) by coplin19.mips.com (8.11.6/8.11.6) id g1MH8pX13027; Fri, 22 Feb 2002 18:08:51 +0100 Date: Fri, 22 Feb 2002 18:08:51 +0100 From: Kjeld Borch Egevang Message-Id: <200202221708.g1MH8pX13027@coplin19.mips.com> To: Subject: Re: ieee754_csr is the problem (Re: lazy fpu switch irrelavant to no-fpu case? In-Reply-To: <006701c1bb87$b2b6fb80$0deca8c0@Ulysses> References: <3C75B181.C5A065A1@mvista.com> <3C75C19C.13BB0FCC@mvista.com> <006701c1bb87$b2b6fb80$0deca8c0@Ulysses> Sender: owner-linux-mips@oss.sgi.com Precedence: bulk In mips.test, you wrote: >This is what I get for processing my mail in-order. >I just got done writing a message asking if the >ieee_754_csr issue might be at the root of your >problem. > >Anyway, rather than create an array of the damned >things, I would think that the "best" thing to do would >be to merge the "abstract" IEEE CSR with the >simulated MIPS CSR (by adding the "noq" and >"nod" bits in otherwise unused/reserved bit positions), >and using the thread-local CSR copy for all of the >ieee_754_csr manipulations, much as I did for >the FP registers. That would be a bit more intrusive >than your proposed hack, however, and only slightly >more efficient. I've been wondering: Why was the CSR copy made in the first place? /Kjeld -- _ _ ____ ___ Mailto:kjelde@mips.com |\ /|||___)(___ MIPS Denmark Direct: +45 44 86 55 85 | \/ ||| ____) Lautrupvang 4 B Switch: +45 44 86 55 55 TECHNOLOGIES DK-2750 Ballerup Fax...: +45 44 86 55 56 Denmark http://www.mips.com/ From owner-linux-mips@oss.sgi.com Fri Feb 22 10:14:27 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g1MIERK16791 for linux-mips-outgoing; Fri, 22 Feb 2002 10:14:27 -0800 Received: from rwcrmhc52.attbi.com (rwcrmhc52.attbi.com [216.148.227.88]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g1MIEO916787 for ; Fri, 22 Feb 2002 10:14:24 -0800 Received: from ocean.lucon.org ([12.234.16.87]) by rwcrmhc52.attbi.com (InterMail vM.4.01.03.27 201-229-121-127-20010626) with ESMTP id <20020222171419.YJQL1147.rwcrmhc52.attbi.com@ocean.lucon.org>; Fri, 22 Feb 2002 17:14:19 +0000 Received: by ocean.lucon.org (Postfix, from userid 1000) id 6994A125C1; Fri, 22 Feb 2002 09:14:18 -0800 (PST) Date: Fri, 22 Feb 2002 09:14:17 -0800 From: "H . J . Lu" To: "Maciej W. Rozycki" Cc: Wayne Gowcher , Linux-MIPS Subject: Re: pthread support in mipsel-linux Message-ID: <20020222091417.A17377@lucon.org> References: <20020222085310.A17035@lucon.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: ; from macro@ds2.pg.gda.pl on Fri, Feb 22, 2002 at 06:06:58PM +0100 Sender: owner-linux-mips@oss.sgi.com Precedence: bulk On Fri, Feb 22, 2002 at 06:06:58PM +0100, Maciej W. Rozycki wrote: > On Fri, 22 Feb 2002, H . J . Lu wrote: > > > Mutex is now implemented with spin lock by default. BTW, how many > > Well, testandset() from linuxthreads/sysdeps/mips/pt-machine.h should > work fine with -mips1. As should __pthread_spin_lock() from > linuxthreads/sysdeps/mips/pspinlock.c. > > > people have run "make check" on glibc compiled -mips1? > > No idea. I may run `./configure && make all && make check' tonight on my > system as it's going to be idle over the weekend anyway. It should finish > by Monday. ;-) You should also try "make check" on the current gcc 3.1. I found and fixed the MIPS II ll/sc bugs by doing that. H.J. From owner-linux-mips@oss.sgi.com Fri Feb 22 10:22:50 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g1MIMoe16951 for linux-mips-outgoing; Fri, 22 Feb 2002 10:22:50 -0800 Received: from delta.ds2.pg.gda.pl (root@delta.ds2.pg.gda.pl [213.192.72.1]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g1MILR916944 for ; Fri, 22 Feb 2002 10:21:27 -0800 Received: from localhost by delta.ds2.pg.gda.pl (8.9.3/8.9.3) with SMTP id SAA11973; Fri, 22 Feb 2002 18:06:58 +0100 (MET) Date: Fri, 22 Feb 2002 18:06:58 +0100 (MET) From: "Maciej W. Rozycki" To: "H . J . Lu" cc: Wayne Gowcher , Linux-MIPS Subject: Re: pthread support in mipsel-linux In-Reply-To: <20020222085310.A17035@lucon.org> Message-ID: Organization: Technical University of Gdansk MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-linux-mips@oss.sgi.com Precedence: bulk On Fri, 22 Feb 2002, H . J . Lu wrote: > Mutex is now implemented with spin lock by default. BTW, how many Well, testandset() from linuxthreads/sysdeps/mips/pt-machine.h should work fine with -mips1. As should __pthread_spin_lock() from linuxthreads/sysdeps/mips/pspinlock.c. > people have run "make check" on glibc compiled -mips1? No idea. I may run `./configure && make all && make check' tonight on my system as it's going to be idle over the weekend anyway. It should finish by Monday. ;-) -- + Maciej W. Rozycki, Technical University of Gdansk, Poland + +--------------------------------------------------------------+ + e-mail: macro@ds2.pg.gda.pl, PGP key available + From owner-linux-mips@oss.sgi.com Fri Feb 22 11:17:48 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g1MJHmw17810 for linux-mips-outgoing; Fri, 22 Feb 2002 11:17:48 -0800 Received: from dvmwest.gt.owl.de (dvmwest.gt.owl.de [62.52.24.140]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g1MJHc917807 for ; Fri, 22 Feb 2002 11:17:39 -0800 Received: by dvmwest.gt.owl.de (Postfix, from userid 1001) id 840FAA1CB; Fri, 22 Feb 2002 19:17:34 +0100 (CET) Date: Fri, 22 Feb 2002 19:17:34 +0100 From: Jan-Benedict Glaw To: linux-mips@oss.sgi.com Subject: Problem with delo Message-ID: <20020222191734.B15503@lug-owl.de> Mail-Followup-To: linux-mips@oss.sgi.com Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="OwLcNYc0lM97+oe1" Content-Disposition: inline User-Agent: Mutt/1.3.23i X-Operating-System: Linux mail 2.4.15-pre2 Sender: owner-linux-mips@oss.sgi.com Precedence: bulk --OwLcNYc0lM97+oe1 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi! I've just installed delo on my /125, but it doesn't boot the kernel. It *seems* (to me) that it successfully load it's second stage, but second stage bootloader failed to load /etc/delo.conf. Layout is like this: /dev/sda1 Small Linux/ext2 partition containing nothing /dev/sda2 Large Linux/ext2 partition containing the / filesystem (including /boot directory) /dev/sda3 Linux swap My delo.conf looks like this: label=3Dlinux image=3D/boot/vmlinux append=3D"root=3D/dev/sda2 init=3D/bin/bash" I recompiled delo with -DDEBUG and now, I'm getting this bootup message: >> boot 3/rz1 2/linux delo V0.7 Copyright 2000 Florian Lohoff callv addr a0002f88 clo: 0 boot clo: 1 3/rz1 clo: 2 2/linux Getting partition info Partition '2' 2 bootread returned 512 DOS disklabel found 1 0 83 62 98146 2 0 83 98208 5665374 delo_open: called delo_open: bootinit returned 0 delo_set_blksize: called 1024 delo_read_blk: called for 98210 count 1024 to 805402f8 delo_set_blksize: called 4096 delo_read_blk: called for 98216 count 4096 to 805406f8 delo_read_blk: called for 98240 count 4096 to 80542710 delo_read_blk: called for 102264 count 4096 to 805416f8 delo_read_blk: called for 3506112 count 4096 to 80542710 delo_read_blk: called for 364520 count 4096 to 805416f8 delo_read_blk: called for 364528 count 4096 to 805416f8 delo_read_blk: called for 364536 count 4096 to 805416f8 delo_read_blk: called for 156648 count 4096 to 805416f8 readfile: ext2fs_namei_follow returned 2133571404 extfs_open returned Unknown ext2 error(2133571404) Couldnt fetch config.file /etc/delo.conf I'm not exactly familiar with delo's code. Flo, do you have a hint? MfG, JBG --=20 Jan-Benedict Glaw . jbglaw@lug-owl.de . +49-172-7608481 -- New APT-Proxy written in shell script -- http://lug-owl.de/~jbglaw/software/ap2/ --OwLcNYc0lM97+oe1 Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.6 (GNU/Linux) Comment: For info see http://www.gnupg.org iEYEARECAAYFAjx2iz0ACgkQHb1edYOZ4bt/4QCgh1vjD9m+1wFD4eLz0lRzcISD E2EAnR7pb23/HKLuqVs8eUXWlxtM9yKN =Yh7R -----END PGP SIGNATURE----- --OwLcNYc0lM97+oe1-- From owner-linux-mips@oss.sgi.com Fri Feb 22 16:11:49 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g1N0BnW24140 for linux-mips-outgoing; Fri, 22 Feb 2002 16:11:49 -0800 Received: from dvmwest.gt.owl.de (dvmwest.gt.owl.de [62.52.24.140]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g1N0BP924137 for ; Fri, 22 Feb 2002 16:11:25 -0800 Received: by dvmwest.gt.owl.de (Postfix, from userid 1001) id 1ABD3A0E2; Sat, 23 Feb 2002 00:11:23 +0100 (CET) Date: Sat, 23 Feb 2002 00:11:22 +0100 From: Jan-Benedict Glaw To: Linux-MIPS Cc: "Maciej W. Rozycki" Subject: R3k and swap: Still no go? Message-ID: <20020223001122.F15503@lug-owl.de> Mail-Followup-To: Linux-MIPS , "Maciej W. Rozycki" Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="FUFe+yI/t+r3nyH4" Content-Disposition: inline User-Agent: Mutt/1.3.23i X-Operating-System: Linux mail 2.4.15-pre2 Sender: owner-linux-mips@oss.sgi.com Precedence: bulk --FUFe+yI/t+r3nyH4 Content-Type: multipart/mixed; boundary="a8sldprk+5E/pDEv" Content-Disposition: inline --a8sldprk+5E/pDEv Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi! A year or two ago we've had a thread about r3k and swap. Currently, the box will oops... There's a patch changing some magic numbers in include/asm-mips/pgtable.h (attached against current CVS), but it is not really acceptable: some numbers are changed but nobody seems to know *what* this does mean. Ralf even mentioned that there might be some bug in the whole paging mechanism hiding behind this. Flo looked into this and his resume was that even the current (oopsing) values *should* do the job IIRC. Maciej, do you have a hint on this? I'm now using this patch, because it does make the kernel useable, but I don't understand why... MfG, JBG --=20 Jan-Benedict Glaw . jbglaw@lug-owl.de . +49-172-7608481 -- New APT-Proxy written in shell script -- http://lug-owl.de/~jbglaw/software/ap2/ --a8sldprk+5E/pDEv Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename=swap-diff Content-Transfer-Encoding: quoted-printable --- linux/include/asm-mips/pgtable.h 2002/02/07 02:39:15 1.68 +++ linux/include/asm-mips/pgtable.h 2002/02/22 22:01:24 @@ -518,9 +518,16 @@ extern void update_mmu_cache(struct vm_area_struct *vma, unsigned long address, pte_t pte); =20 -#define SWP_TYPE(x) (((x).val >> 1) & 0x3f) -#define SWP_OFFSET(x) ((x).val >> 8) -#define SWP_ENTRY(type,offset) ((swp_entry_t) { ((type) << 1) | ((offset) = << 8) }) +#ifndef CONFIG_CPU_R3000 +# define SWP_TYPE(x) (((x).val >> 1) & 0x3f) +# define SWP_OFFSET(x) ((x).val >> 8) +# define SWP_ENTRY(type,offset) ((swp_entry_t) { ((type) << 1) | ((offset)= << 8) }) +#else /* CONFIG_CPU_R3000 */ +# define SWP_TYPE(x) (((x).val >> 8) & 0x7f) +# define SWP_OFFSET(x) ((x).val >> 15) +# define define SWP_ENTRY(type,offset) ((swp_entry_t) { ((type) << 8) | ((= offset) << 15) }) +#endif + #define pte_to_swp_entry(pte) ((swp_entry_t) { pte_val(pte) }) #define swp_entry_to_pte(x) ((pte_t) { (x).val }) =20 --a8sldprk+5E/pDEv Content-Type: message/rfc822 Content-Description: Flo's statement Content-Disposition: attachment; filename="resumee.mbox" From owner-linux-mips@oss.sgi.com Sun Jan 28 08:24:10 2001 Received: by oss.sgi.com id ; Sun, 28 Jan 2001 08:23:50 -0800 Received: from noose.gt.owl.de ([62.52.19.4]:26119 "HELO noose.gt.owl.de") by oss.sgi.com with SMTP id ; Sun, 28 Jan 2001 08:23:34 -0800 Received: by noose.gt.owl.de (Postfix, from userid 10) id 8852E7F8; Sun, 28 Jan 2001 17:23:31 +0100 (CET) Received: by paradigm.rfc822.org (Postfix, from userid 1000) id 15204EE9C; Sun, 28 Jan 2001 17:24:01 +0100 (CET) Date: Sun, 28 Jan 2001 17:24:01 +0100 From: Florian Lohoff To: linux-mips@oss.sgi.com Subject: [RESUME] R3000 swapping problems Message-ID: <20010128172401.B19010@paradigm.rfc822.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i Organization: rfc822 - pure communication Sender: owner-linux-mips@oss.sgi.com Precedence: bulk Return-Path: X-Orcpt: rfc822;linux-mips-outgoing Hi, after a weekend research i am a bit stuck in my understanding of the R3000 swapping problems When changing Index: include/asm-mips/pgtable.h =================================================================== RCS file: /cvs/linux/include/asm-mips/pgtable.h,v retrieving revision 1.48 diff -u -r1.48 pgtable.h --- include/asm-mips/pgtable.h 2000/12/03 15:30:52 1.48 +++ include/asm-mips/pgtable.h 2001/01/28 16:08:17 @@ -457,8 +457,8 @@ unsigned long address, pte_t pte); #define SWP_TYPE(x) (((x).val >> 1) & 0x3f) -#define SWP_OFFSET(x) ((x).val >> 8) -#define SWP_ENTRY(type,offset) ((swp_entry_t) { ((type) << 1) | ((offset) << 8) }) +#define SWP_OFFSET(x) ((x).val >> 10) +#define SWP_ENTRY(type,offset) ((swp_entry_t) { ((type) << 1) | ((offset) << 10) }) #define pte_to_swp_entry(pte) ((swp_entry_t) { pte_val(pte) }) #define swp_entry_to_pte(x) ((pte_t) { (x).val }) The R3k machine (Decstation 5000/120) does survive swapping. The idea is that the bits 9 & 10 on the R3k are #define _PAGE_VALID (1<<9) #define _PAGE_SILENT_READ (1<<9) /* synonym */ #define _PAGE_DIRTY (1<<10) /* The MIPS dirty bit */ #define _PAGE_SILENT_WRITE (1<<10) Whereas this on R4k is #define _PAGE_VALID (1<<7) #define _PAGE_SILENT_READ (1<<7) /* synonym */ #define _PAGE_DIRTY (1<<8) /* The MIPS dirty bit */ #define _PAGE_SILENT_WRITE (1<<8) OTOH when following the code paths the pte gets completely replaced with the swap entry and not bitmasked/and/ored with the original pte or the ptes flags. So i find no dependencie to the SWP_ macros. Swapin is in mm/memory.c:do_swap_page 1039 pte = mk_pte(page, vma->vm_page_prot); 1040 1041 /* 1042 * Freeze the "shared"ness of the page, ie page_count + swap_count. 1043 * Must lock page before transferring our swap count to already 1044 * obtained page count. 1045 */ 1046 lock_page(page); 1047 swap_free(entry); 1048 if (write_access && !is_page_shared(page)) 1049 pte = pte_mkwrite(pte_mkdirty(pte)); 1050 UnlockPage(page); 1051 1052 set_pte(page_table, pte); 1053 1054 /* No need to invalidate - it was non-present before */ 1055 update_mmu_cache(vma, address, pte); 1056 return 1; /* Minor fault */ The swapout code is in mm/vmscan.c:try_to_swap_out 144 entry = get_swap_page(); 145 if (!entry.val) 146 goto out_unlock_restore; /* No swap space left */ 147 148 /* Add it to the swap cache and mark it dirty */ 149 add_to_swap_cache(page, entry); 150 set_page_dirty(page); 151 goto set_swap_pte; 98 set_swap_pte: 99 swap_duplicate(entry); 100 set_pte(page_table, swp_entry_to_pte(entry)); 101 drop_pte: 102 UnlockPage(page); 103 mm->rss--; 104 deactivate_page(page); 105 page_cache_release(page); 106 out_failed: 107 return 0; 108 } When adding debug code there i can see the flags getting restored correctly on swapping in. Flo -- Florian Lohoff flo@rfc822.org +49-5201-669912 Why is it called "common sense" when nobody seems to have any? --a8sldprk+5E/pDEv-- --FUFe+yI/t+r3nyH4 Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.6 (GNU/Linux) Comment: For info see http://www.gnupg.org iEYEARECAAYFAjx20BoACgkQHb1edYOZ4bsuqACfRLnpV5dU47MKJZ+YeOJJxKIr nIwAniKUWBwQSdtkfFrhsGcVp55OpYh+ =M11q -----END PGP SIGNATURE----- --FUFe+yI/t+r3nyH4-- From owner-linux-mips@oss.sgi.com Fri Feb 22 17:23:00 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g1N1N0J28431 for linux-mips-outgoing; Fri, 22 Feb 2002 17:23:00 -0800 Received: from host099.momenco.com (IDENT:root@www.momenco.com [64.169.228.99]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g1N1Mw928427 for ; Fri, 22 Feb 2002 17:22:58 -0800 Received: from beagle (beagle.internal.momenco.com [192.168.0.115]) by host099.momenco.com (8.11.6/8.11.6) with SMTP id g1N0MvR04915 for ; Fri, 22 Feb 2002 16:22:57 -0800 From: "Matthew Dharm" To: "Linux-MIPS" Subject: Anyone have the e1000.o driver working? Date: Fri, 22 Feb 2002 16:22:57 -0800 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0) X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400 Importance: Normal Sender: owner-linux-mips@oss.sgi.com Precedence: bulk Does anyone here have the e1000.o driver from Intel for their gigabit ethernet devices working on a MIPS? After overcoming the intitial CFLAGS problem, the darned thing just seems to keep crashing on me during initialization. I'm looking for a datapoint to suggest that it's either (a) a problem with my linux port, or (b) a problem with their driver. Matt -- Matthew D. Dharm Senior Software Designer Momentum Computer Inc. 1815 Aston Ave. Suite 107 (760) 431-8663 X-115 Carlsbad, CA 92008-7310 Momentum Works For You www.momenco.com From owner-linux-mips@oss.sgi.com Fri Feb 22 18:50:36 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g1N2oaa29663 for linux-mips-outgoing; Fri, 22 Feb 2002 18:50:36 -0800 Received: from hermes.mvista.com (gateway-1237.mvista.com [12.44.186.158]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g1N2oX929660 for ; Fri, 22 Feb 2002 18:50:33 -0800 Received: from mvista.com (IDENT:jsun@orion.mvista.com [10.0.0.75]) by hermes.mvista.com (8.11.0/8.11.0) with ESMTP id g1N1liB11493; Fri, 22 Feb 2002 17:47:44 -0800 Message-ID: <3C76F53D.2C893BC7@mvista.com> Date: Fri, 22 Feb 2002 17:49:49 -0800 From: Jun Sun X-Mailer: Mozilla 4.72 [en] (X11; U; Linux 2.2.18 i686) X-Accept-Language: en MIME-Version: 1.0 To: linux-mips@oss.sgi.com Subject: FPU emul and segmentation fault bug Content-Type: text/plain; charset=gb2312 Content-Transfer-Encoding: 7bit Sender: owner-linux-mips@oss.sgi.com Precedence: bulk I remember a while back we had a problem with FPU emulation code which causes a segmentation fault. (Perhaps another symptom is bus error, but I am not 100% sure). Apparently this problem is fixed in the recent kernel. However, it shows up again in SMP mode. Does anybody remember details of the problem and the fix? I am afraid maybe something we did there is not SMP safe. Thanks. Jun From owner-linux-mips@oss.sgi.com Fri Feb 22 20:15:22 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g1N4FMf30905 for linux-mips-outgoing; Fri, 22 Feb 2002 20:15:22 -0800 Received: from mail.ict.ac.cn ([159.226.39.4]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g1N4FI930898 for ; Fri, 22 Feb 2002 20:15:18 -0800 Message-Id: <200202230415.g1N4FI930898@oss.sgi.com> Received: (qmail 13236 invoked from network); 23 Feb 2002 03:18:39 -0000 Received: from unknown (HELO foxsen) (@159.226.40.150) by 159.226.39.4 with SMTP; 23 Feb 2002 03:18:39 -0000 Date: Sat, 23 Feb 2002 11:12:6 +0800 From: Zhang Fuxin To: "H . J . Lu" CC: "linux-mips@oss.sgi.com" Subject: Re: Re: pthread support in mipsel-linux X-mailer: FoxMail 3.11 Release [cn] Mime-Version: 1.0 Content-Type: text/plain; charset="GB2312" Content-Transfer-Encoding: 7bit Sender: owner-linux-mips@oss.sgi.com Precedence: bulk hi, > >Mutex is now implemented with spin lock by default. BTW, how many >people have run "make check" on glibc compiled -mips1? I did with glibc-2.2.4 natively compiled,no failure till libm-test (i configured it by default,then it used -mips1?) > >H.J. Regards Zhang Fuxin fxzhang@ict.ac.cn From owner-linux-mips@oss.sgi.com Fri Feb 22 23:11:40 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g1N7Be600692 for linux-mips-outgoing; Fri, 22 Feb 2002 23:11:40 -0800 Received: from rwcrmhc53.attbi.com (rwcrmhc53.attbi.com [204.127.198.39]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g1N7Bb900686 for ; Fri, 22 Feb 2002 23:11:37 -0800 Received: from ocean.lucon.org ([12.234.16.87]) by rwcrmhc53.attbi.com (InterMail vM.4.01.03.27 201-229-121-127-20010626) with ESMTP id <20020223061131.LBYD2951.rwcrmhc53.attbi.com@ocean.lucon.org>; Sat, 23 Feb 2002 06:11:31 +0000 Received: by ocean.lucon.org (Postfix, from userid 1000) id D4F52125C1; Fri, 22 Feb 2002 22:11:28 -0800 (PST) Date: Fri, 22 Feb 2002 22:11:28 -0800 From: "H . J . Lu" To: Zhang Fuxin Cc: "linux-mips@oss.sgi.com" Subject: Re: Re: pthread support in mipsel-linux Message-ID: <20020222221128.A28938@lucon.org> References: <200202230415.g1N4FI930898@oss.sgi.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <200202230415.g1N4FI930898@oss.sgi.com>; from fxzhang@ict.ac.cn on Sat, Feb 23, 2002 at 11:12:06AM +0800 Sender: owner-linux-mips@oss.sgi.com Precedence: bulk On Sat, Feb 23, 2002 at 11:12:06AM +0800, Zhang Fuxin wrote: > hi, > > > > >Mutex is now implemented with spin lock by default. BTW, how many > >people have run "make check" on glibc compiled -mips1? > I did with glibc-2.2.4 natively compiled,no failure till libm-test The linuxthreads test comes after math. > (i configured it by default,then it used -mips1?) > Yes. BTW, I found the ll/sc bug by doing "make check" on gcc 3.1 in CVS. H.J. From owner-linux-mips@oss.sgi.com Sat Feb 23 00:59:11 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g1N8xB202113 for linux-mips-outgoing; Sat, 23 Feb 2002 00:59:11 -0800 Received: from ayrnetworks.com (earth.ayrnetworks.com [64.166.72.139]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g1N8x8902110 for ; Sat, 23 Feb 2002 00:59:08 -0800 Received: from [192.168.1.5] (IDENT:root@localhost.localdomain [127.0.0.1]) by ayrnetworks.com (8.11.6/8.11.2) with ESMTP id g1N7w1e20005; Fri, 22 Feb 2002 23:58:01 -0800 Mime-Version: 1.0 X-Sender: kph@127.0.0.1 Message-Id: In-Reply-To: References: Date: Fri, 22 Feb 2002 23:59:34 -0800 To: "Matthew Dharm" , "Linux-MIPS" From: Kevin Paul Herbert Subject: Re: Anyone have the e1000.o driver working? Content-Type: text/plain; charset="us-ascii" ; format="flowed" Sender: owner-linux-mips@oss.sgi.com Precedence: bulk At 4:22 PM -0800 2/22/02, Matthew Dharm wrote: >Does anyone here have the e1000.o driver from Intel for their gigabit >ethernet devices working on a MIPS? > >After overcoming the intitial CFLAGS problem, the darned thing just >seems to keep crashing on me during initialization. I'm looking for a >datapoint to suggest that it's either (a) a problem with my linux >port, or (b) a problem with their driver. > >Matt > >-- >Matthew D. Dharm Senior Software Designer >Momentum Computer Inc. 1815 Aston Ave. Suite 107 >(760) 431-8663 X-115 Carlsbad, CA 92008-7310 >Momentum Works For You www.momenco.com I have the e1000 driver working... I've had 3.0 and 3.5 working. The only changes that I made were related to the specifics of the software defined I/O pins. Are you sure that you have ioremap() and your PCI subsystem working correctly? Have you tested any other devices that use registers in PCI memory space, or just PCI i/o space? Kevin -- From owner-linux-mips@oss.sgi.com Sat Feb 23 12:12:41 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g1NKCfT11277 for linux-mips-outgoing; Sat, 23 Feb 2002 12:12:41 -0800 Received: from noose.gt.owl.de (postfix@noose.gt.owl.de [62.52.19.4]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g1NKCZ911274 for ; Sat, 23 Feb 2002 12:12:35 -0800 Received: by noose.gt.owl.de (Postfix, from userid 10) id E7BFA850; Sat, 23 Feb 2002 20:12:09 +0100 (CET) Received: by localhost (Postfix, from userid 1000) id BDE9D1A2DF; Sat, 23 Feb 2002 20:11:26 +0100 (CET) Date: Sat, 23 Feb 2002 20:11:26 +0100 From: Florian Lohoff To: Jan-Benedict Glaw Cc: linux-mips@oss.sgi.com Subject: Re: Problem with delo Message-ID: <20020223191126.GA18791@paradigm.rfc822.org> References: <20020222191734.B15503@lug-owl.de> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="VbJkn9YxBvnuCH5J" Content-Disposition: inline In-Reply-To: <20020222191734.B15503@lug-owl.de> User-Agent: Mutt/1.3.27i Organization: rfc822 - pure communication Sender: owner-linux-mips@oss.sgi.com Precedence: bulk --VbJkn9YxBvnuCH5J Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Feb 22, 2002 at 07:17:34PM +0100, Jan-Benedict Glaw wrote: > /dev/sda1 Small Linux/ext2 partition containing > /dev/sda2 Large Linux/ext2 partition containing > /dev/sda3 Linux swap > >> boot 3/rz1 2/linux > delo V0.7 Copyright 2000 Florian Lohoff > callv addr a0002f88 > clo: 0 boot > clo: 1 3/rz1 > clo: 2 2/linux > Getting partition info > Partition '2' 2 > bootread returned 512 > DOS disklabel found > 1 0 83 62 98146 > 2 0 83 98208 5665374 > extfs_open returned Unknown ext2 error(2133571404) > Couldnt fetch config.file /etc/delo.conf Hmmm - looks strange ... Flo --=20 Florian Lohoff flo@rfc822.org +49-5201-669912 Nine nineth on september the 9th Welcome to the new billenium --VbJkn9YxBvnuCH5J Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.6 (GNU/Linux) Comment: For info see http://www.gnupg.org iD8DBQE8d+leUaz2rXW+gJcRAuqaAJwNqNdCU0XogQQvdCMRRX/jQen8YQCfd8Ky BACoV0qbGfM+C5eLY4jx9tw= =wTlj -----END PGP SIGNATURE----- --VbJkn9YxBvnuCH5J-- From owner-linux-mips@oss.sgi.com Sat Feb 23 13:30:44 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g1NLUiA12350 for linux-mips-outgoing; Sat, 23 Feb 2002 13:30:44 -0800 Received: from host099.momenco.com (IDENT:root@www.momenco.com [64.169.228.99]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g1NLUc912344 for ; Sat, 23 Feb 2002 13:30:38 -0800 Received: (from mdharm@localhost) by host099.momenco.com (8.11.6/8.11.6) id g1NKUbW08334; Sat, 23 Feb 2002 12:30:37 -0800 Date: Sat, 23 Feb 2002 12:30:37 -0800 From: Matthew Dharm To: Kevin Paul Herbert Cc: Linux-MIPS Subject: Re: Anyone have the e1000.o driver working? Message-ID: <20020223123037.A8314@momenco.com> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: ; from kph@ayrnetworks.com on Fri, Feb 22, 2002 at 11:59:34PM -0800 Organization: Momentum Computer, Inc. X-Copyright: (C) 2002 Matthew Dharm, all rights reserved. Sender: owner-linux-mips@oss.sgi.com Precedence: bulk Well, I finally got the latest version running (see my other message to this list... where did that go, anyway?). The problem was that the code to deal with CONFIG_PROC_FS is causing a crash... and it looks like it might be a toolchain bug. What toolchain are you using? Hopefully my last message will get through... but basically e1000_main.c references and extern struct pointer, and the code generated doesn't look right -- it does a lui v0,0x0 and then a lw v0,0(v0) which causes a crash. If you're not seeing this, then maybe I'm doing something wrong. What CFLAGS are you using? I had to modify mine based on an old e-mail from someone (Pete?) that I found via google. Matt On Fri, Feb 22, 2002 at 11:59:34PM -0800, Kevin Paul Herbert wrote: > At 4:22 PM -0800 2/22/02, Matthew Dharm wrote: > >Does anyone here have the e1000.o driver from Intel for their gigabit > >ethernet devices working on a MIPS? > > > >After overcoming the intitial CFLAGS problem, the darned thing just > >seems to keep crashing on me during initialization. I'm looking for a > >datapoint to suggest that it's either (a) a problem with my linux > >port, or (b) a problem with their driver. > > > >Matt > > > >-- > >Matthew D. Dharm Senior Software Designer > >Momentum Computer Inc. 1815 Aston Ave. Suite 107 > >(760) 431-8663 X-115 Carlsbad, CA 92008-7310 > >Momentum Works For You www.momenco.com > > I have the e1000 driver working... I've had 3.0 and 3.5 working. The > only changes that I made were related to the specifics of the > software defined I/O pins. Are you sure that you have ioremap() and > your PCI subsystem working correctly? Have you tested any other > devices that use registers in PCI memory space, or just PCI i/o space? > > Kevin > -- -- Matthew Dharm Work: mdharm@momenco.com Senior Software Designer, Momentum Computer From owner-linux-mips@oss.sgi.com Sat Feb 23 17:49:39 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g1O1ndt15539 for linux-mips-outgoing; Sat, 23 Feb 2002 17:49:39 -0800 Received: from dea.linux-mips.net (a1as19-p83.stg.tli.de [195.252.194.83]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g1O1lY915520 for ; Sat, 23 Feb 2002 17:47:34 -0800 Received: (from ralf@localhost) by dea.linux-mips.net (8.11.6/8.11.1) id g1O0lLr31788 for linux-mips@oss.sgi.com; Sun, 24 Feb 2002 01:47:21 +0100 Received: from host099.momenco.com (IDENT:root@www.momenco.com [64.169.228.99]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g1N2vA929838 for ; Fri, 22 Feb 2002 18:57:10 -0800 Received: from beagle (beagle.internal.momenco.com [192.168.0.115]) by host099.momenco.com (8.11.6/8.11.6) with SMTP id g1N1v8R05204 for ; Fri, 22 Feb 2002 17:57:08 -0800 From: "Matthew Dharm" To: "Linux-MIPS" Subject: Is this a toolchain bug? Date: Fri, 22 Feb 2002 17:57:08 -0800 Message-ID: MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_NextPart_000_002F_01C1BBCA.589767F0" X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0) X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400 Importance: Normal Sender: owner-linux-mips@oss.sgi.com Precedence: bulk This is a multi-part message in MIME format. ------=_NextPart_000_002F_01C1BBCA.589767F0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit I'm trying to get the e1000 driver working on my MIPS target... I've managed to hack it a bit so it works, but at least one of these hacks looks like a workaround for a toolchain bug. Attached to this message is the mixed-mode (source and assembly) dump of one of the driver files. Specifically, look at the code dealing with the variable e1000_proc_dir; here is one example: if(e1000_proc_dir == NULL) 53c: 3c020000 lui v0,0x0 540: 8c420000 lw v0,0(v0) 544: 1440000d bnez v0,57c 548: 00000000 nop Is it me, or is that wrong? load-upper-immediate with zero, then load-word from that address? Clearly, v0 is _supposed_ to contain the value of e1000_proc_dir based on the branch-compare instruction.... but this code just crashes. In fact, all the references to e1000_proc_dir seem to use the same lui/lw pair of instructions. For reference e1000_proc_dir is an extern struct pointer. No compiler warnings about it. Before anyone asks, the assembly doesn't change when linked against the code that actually declares the variable. The toolchain I'm using is the one from oss.sgi.com by H.J. Liu (toolchain-20011020-1). Because of the way the e1000 driver Makefile works, I'm actually compiling it using the native compiler on-target. Full source code available on request (I don't want to spam the list), or directly from Intel. I'm using kernel 2.4.17 from CVS (plus the patch I sent yesterday) with e1000 driver version 4.0.7 If this is user-error, I'd love to know what I'm doing wrong. If this is a toolchain bug, who do I report this to? Matt -- Matthew D. Dharm Senior Software Designer Momentum Computer Inc. 1815 Aston Ave. Suite 107 (760) 431-8663 X-115 Carlsbad, CA 92008-7310 Momentum Works For You www.momenco.com ------=_NextPart_000_002F_01C1BBCA.589767F0 Content-Type: application/octet-stream; name="e1000_main.dis" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="e1000_main.dis" =0A= e1000_main.o: file format elf32-tradbigmips=0A= =0A= Disassembly of section .text:=0A= =0A= 00000000 :=0A= 0: 27bdffe8 addiu sp,sp,-24=0A= 4: afb00010 sw s0,16(sp)=0A= 8: afbf0014 sw ra,20(sp)=0A= E1000_DBG("e1000_init_module\n");=0A= =0A= /* Print the driver ID string and copyright notice */=0A= =0A= printk("%s - version %s\n%s\n", e1000_driver_string, = e1000_driver_version,=0A= c: 3c040000 lui a0,0x0=0A= 10: 24840158 addiu a0,a0,344=0A= 14: 3c050000 lui a1,0x0=0A= 18: 24a50000 addiu a1,a1,0=0A= 1c: 3c060000 lui a2,0x0=0A= 20: 24c60000 addiu a2,a2,0=0A= 24: 3c070000 lui a3,0x0=0A= 28: 24e70000 addiu a3,a3,0=0A= 2c: 3c020000 lui v0,0x0=0A= 30: 24420000 addiu v0,v0,0=0A= 34: 0040f809 jalr v0=0A= 38: 00000000 nop=0A= * This MUST stay in a header, as it checks for -DMODULE=0A= */=0A= static inline int pci_module_init(struct pci_driver *drv)=0A= {=0A= int rc =3D pci_register_driver (drv);=0A= 3c: 3c040000 lui a0,0x0=0A= 40: 24840288 addiu a0,a0,648=0A= 44: 3c020000 lui v0,0x0=0A= 48: 24420000 addiu v0,v0,0=0A= 4c: 0040f809 jalr v0=0A= 50: 00000000 nop=0A= 54: 00408021 move s0,v0=0A= =0A= if (rc > 0)=0A= return 0;=0A= =0A= /* iff CONFIG_HOTPLUG and built into kernel, we should=0A= * leave the driver around for future hotplug events.=0A= * For the module case, a hotplug daemon of some sort=0A= * should load a module in response to an insert event. */=0A= #if defined(CONFIG_HOTPLUG) && !defined(MODULE)=0A= if (rc =3D=3D 0)=0A= return 0;=0A= #else=0A= if (rc =3D=3D 0)=0A= rc =3D -ENODEV; =0A= #endif=0A= =0A= /* if we get here, we need to clean up pci driver instance=0A= * and return some sort of error */=0A= pci_unregister_driver (drv);=0A= 58: 3c040000 lui a0,0x0=0A= 5c: 24840288 addiu a0,a0,648=0A= 60: 3c030000 lui v1,0x0=0A= 64: 24630000 addiu v1,v1,0=0A= 68: 1e000006 bgtz s0,84 =0A= 6c: 00001021 move v0,zero=0A= 70: 52000001 beqzl s0,78 =0A= 74: 2410ffed li s0,-19=0A= 78: 0060f809 jalr v1=0A= 7c: 00000000 nop=0A= =0A= return rc;=0A= 80: 02001021 move v0,s0=0A= e1000_copyright);=0A= =0A= /* register the driver with the PCI subsystem */=0A= =0A= return pci_module_init(&e1000_driver);=0A= 84: 8fbf0014 lw ra,20(sp)=0A= 88: 8fb00010 lw s0,16(sp)=0A= 8c: 03e00008 jr ra=0A= 90: 27bd0018 addiu sp,sp,24=0A= =0A= 00000094 :=0A= 94: 27bdffe8 addiu sp,sp,-24=0A= }=0A= =0A= /* this macro creates a special symbol in the object file that=0A= * identifies the driver initialization routine=0A= */=0A= module_init(e1000_init_module);=0A= =0A= /**=0A= * e1000_exit_module - Driver Exit Cleanup Routine=0A= *=0A= * e1000_exit_module is called just before the driver is removed=0A= * from memory.=0A= **/=0A= =0A= void=0A= e1000_exit_module()=0A= {=0A= #ifdef CONFIG_PROC_FS=0A= struct proc_dir_entry *de;=0A= #endif=0A= =0A= E1000_DBG("e1000_exit_module\n");=0A= =0A= pci_unregister_driver(&e1000_driver);=0A= 98: 3c020000 lui v0,0x0=0A= 9c: 24420000 addiu v0,v0,0=0A= a0: afbf0010 sw ra,16(sp)=0A= a4: 3c040000 lui a0,0x0=0A= a8: 24840288 addiu a0,a0,648=0A= ac: 0040f809 jalr v0=0A= b0: 00000000 nop=0A= =0A= #ifdef CONFIG_PROC_FS=0A= /* if there is no e1000_proc_dir (proc creation failure on load)=0A= * then we're done=0A= */=0A= if(e1000_proc_dir =3D=3D NULL)=0A= b4: 3c020000 lui v0,0x0=0A= b8: 8c420000 lw v0,0(v0)=0A= bc: 1040001a beqz v0,128 =0A= c0: 8fbf0010 lw ra,16(sp)=0A= return;=0A= =0A= /* If ADAPTERS_PROC_DIR (/proc/net/PRO_LAN_Adapters) is empty=0A= * it can be removed now (might still be in use by e100)=0A= */=0A= for(de =3D e1000_proc_dir->subdir; de; de =3D de->next) {=0A= c4: 8c450034 lw a1,52(v0)=0A= c8: 10a0000e beqz a1,104 =0A= cc: 2404002e li a0,46=0A= =0A= /* ignore . and .. */=0A= =0A= if(*(de->name) =3D=3D '.')=0A= d0: 8ca20004 lw v0,4(a1)=0A= d4: 80430000 lb v1,0(v0)=0A= d8: 14640008 bne v1,a0,fc =0A= dc: 00000000 nop=0A= e0: 8ca5002c lw a1,44(a1)=0A= e4: 10a00007 beqz a1,104 =0A= e8: 00000000 nop=0A= ec: 8ca20004 lw v0,4(a1)=0A= f0: 80430000 lb v1,0(v0)=0A= f4: 5064fffb beql v1,a0,e4 =0A= f8: 8ca5002c lw a1,44(a1)=0A= continue;=0A= break;=0A= }=0A= if(de)=0A= fc: 14a0000a bnez a1,128 =0A= 100: 8fbf0010 lw ra,16(sp)=0A= return;=0A= remove_proc_entry(ADAPTERS_PROC_DIR, proc_net);=0A= 104: 3c050000 lui a1,0x0=0A= 108: 8ca50000 lw a1,0(a1)=0A= 10c: 3c040000 lui a0,0x0=0A= 110: 2484016c addiu a0,a0,364=0A= 114: 3c020000 lui v0,0x0=0A= 118: 24420000 addiu v0,v0,0=0A= 11c: 0040f809 jalr v0=0A= 120: 00000000 nop=0A= #endif=0A= =0A= return;=0A= }=0A= 124: 8fbf0010 lw ra,16(sp)=0A= 128: 03e00008 jr ra=0A= 12c: 27bd0018 addiu sp,sp,24=0A= =0A= 00000130 :=0A= 130: 27bdffd0 addiu sp,sp,-48=0A= 134: afb30024 sw s3,36(sp)=0A= 138: afb00018 sw s0,24(sp)=0A= 13c: afbf0028 sw ra,40(sp)=0A= 140: afb20020 sw s2,32(sp)=0A= 144: afb1001c sw s1,28(sp)=0A= =0A= /* this macro creates a special symbol in the object file that=0A= * identifies the driver cleanup routine=0A= */=0A= module_exit(e1000_exit_module);=0A= =0A= /**=0A= * e1000_probe - Device Initialization Routine=0A= * @pdev: PCI device information struct=0A= * @ent: entry in e1000_pci_table=0A= *=0A= * Returns 0 on success, negative on failure=0A= *=0A= * e1000_probe initializes an adapter identified by a pci_dev=0A= * structure. The OS initialization is handled here, and=0A= * e1000_sw_init and e1000_hw_init are called to handle the driver=0A= * specific software structures and hardware initialization=0A= * respectively.=0A= **/=0A= =0A= int=0A= e1000_probe(struct pci_dev *pdev,=0A= const struct pci_device_id *ent)=0A= {=0A= struct net_device *netdev =3D NULL;=0A= struct e1000_adapter *adapter;=0A= static int cards_found =3D 0;=0A= =0A= #ifdef CONFIG_PROC_FS=0A= int len;=0A= #endif=0A= =0A= E1000_DBG("e1000_probe\n");=0A= =0A= /* Make sure the PCI device has the proper resources available */=0A= =0A= if(pci_enable_device(pdev) !=3D 0) {=0A= 148: 3c020000 lui v0,0x0=0A= 14c: 24420000 addiu v0,v0,0=0A= 150: 00808021 move s0,a0=0A= 154: 0040f809 jalr v0=0A= 158: 00a09821 move s3,a1=0A= 15c: 10400005 beqz v0,174 =0A= 160: 00000000 nop=0A= E1000_ERR("pci_enable_device failed\n");=0A= 164: 3c040000 lui a0,0x0=0A= 168: 24840180 addiu a0,a0,384=0A= return -ENODEV;=0A= 16c: 0800006b j 1ac =0A= 170: 00000000 nop=0A= }=0A= =0A= /* Make sure we are enabled as a bus mastering device */=0A= =0A= pci_set_master(pdev);=0A= 174: 3c020000 lui v0,0x0=0A= 178: 24420000 addiu v0,v0,0=0A= 17c: 0040f809 jalr v0=0A= 180: 02002021 move a0,s0=0A= =0A= /* Check to see if our PCI addressing needs are supported */=0A= if(pci_set_dma_mask(pdev, E1000_DMA_MASK) < 0) {=0A= 184: 24060000 li a2,0=0A= 188: 2407ffff li a3,-1=0A= 18c: 3c020000 lui v0,0x0=0A= 190: 24420000 addiu v0,v0,0=0A= 194: 0040f809 jalr v0=0A= 198: 02002021 move a0,s0=0A= 19c: 04410009 bgez v0,1c4 =0A= 1a0: 00002021 move a0,zero=0A= E1000_ERR("PCI DMA not supported by the system\n");=0A= 1a4: 3c040000 lui a0,0x0=0A= 1a8: 248401a4 addiu a0,a0,420=0A= 1ac: 3c020000 lui v0,0x0=0A= 1b0: 24420000 addiu v0,v0,0=0A= 1b4: 0040f809 jalr v0=0A= 1b8: 00000000 nop=0A= return -ENODEV;=0A= 1bc: 0800018b j 62c =0A= 1c0: 2402ffed li v0,-19=0A= }=0A= =0A= /* Register a new network interface + allocate=0A= * private data structure (struct e1000_adapter)=0A= */=0A= netdev =3D init_etherdev(netdev, sizeof(struct e1000_adapter));=0A= 1c4: 3c020000 lui v0,0x0=0A= 1c8: 24420000 addiu v0,v0,0=0A= 1cc: 0040f809 jalr v0=0A= 1d0: 240503b0 li a1,944=0A= 1d4: 00409021 move s2,v0=0A= if(netdev =3D=3D NULL) {=0A= 1d8: 56400009 bnezl s2,200 =0A= 1dc: 8e510064 lw s1,100(s2)=0A= E1000_ERR("Unable to allocate net_device struct\n");=0A= 1e0: 3c040000 lui a0,0x0=0A= 1e4: 248401d4 addiu a0,a0,468=0A= 1e8: 3c020000 lui v0,0x0=0A= 1ec: 24420000 addiu v0,v0,0=0A= 1f0: 0040f809 jalr v0=0A= 1f4: 00000000 nop=0A= return -ENOMEM;=0A= 1f8: 0800018b j 62c =0A= 1fc: 2402fff4 li v0,-12=0A= }=0A= =0A= /* Calling init_etherdev with sizeof(struct e1000_adapter) allocates=0A= * a single buffer of size net_device + struct e1000_adapter +=0A= * alignment. If this is not done then the struct e1000_adapter needs=0A= * to be allocated and freed separately.=0A= */=0A= adapter =3D (struct e1000_adapter *) netdev->priv;=0A= memset(adapter, 0, sizeof(struct e1000_adapter));=0A= 200: 00002821 move a1,zero=0A= 204: 240603b0 li a2,944=0A= 208: 3c020000 lui v0,0x0=0A= 20c: 24420000 addiu v0,v0,0=0A= 210: 0040f809 jalr v0=0A= 214: 02202021 move a0,s1=0A= adapter->netdev =3D netdev;=0A= adapter->pdev =3D pdev;=0A= 218: ae30014c sw s0,332(s1)=0A= 21c: ae320148 sw s2,328(s1)=0A= =0A= /* link the struct e1000_adapter into the list */=0A= =0A= if(e1000_adapter_list !=3D NULL)=0A= 220: 3c020000 lui v0,0x0=0A= 224: 8c420000 lw v0,0(v0)=0A= 228: 50400005 beqzl v0,240 =0A= 22c: ae220000 sw v0,0(s1)=0A= e1000_adapter_list->prev =3D adapter;=0A= 230: ac510004 sw s1,4(v0)=0A= 234: 3c020000 lui v0,0x0=0A= 238: 8c420000 lw v0,0(v0)=0A= adapter->next =3D e1000_adapter_list;=0A= 23c: ae220000 sw v0,0(s1)=0A= e1000_adapter_list =3D adapter;=0A= 240: 3c010000 lui at,0x0=0A= 244: ac310000 sw s1,0(at)=0A= adapter->shared.back =3D (void *) adapter;=0A= 248: ae310014 sw s1,20(s1)=0A= =0A= /* reserve the MMIO region as ours */=0A= =0A= if(!request_mem_region=0A= 24c: 8e030064 lw v1,100(s0)=0A= 250: 14600005 bnez v1,268 =0A= 254: 8e020068 lw v0,104(s0)=0A= 258: 10400005 beqz v0,270 =0A= 25c: 00003021 move a2,zero=0A= 260: 0800009b j 26c =0A= 264: 00431023 subu v0,v0,v1=0A= 268: 00431023 subu v0,v0,v1=0A= 26c: 24460001 addiu a2,v0,1=0A= 270: 3c070000 lui a3,0x0=0A= 274: 24e70000 addiu a3,a3,0=0A= 278: 3c040000 lui a0,0x0=0A= 27c: 24840000 addiu a0,a0,0=0A= 280: 3c020000 lui v0,0x0=0A= 284: 24420000 addiu v0,v0,0=0A= 288: 0040f809 jalr v0=0A= 28c: 8e050064 lw a1,100(s0)=0A= 290: 54400009 bnezl v0,2b8 =0A= 294: 8e040064 lw a0,100(s0)=0A= (pci_resource_start(pdev, BAR_0), pci_resource_len(pdev, BAR_0),=0A= e1000_driver_name)) {=0A= E1000_ERR("request_mem_region failed\n");=0A= 298: 3c040000 lui a0,0x0=0A= 29c: 24840204 addiu a0,a0,516=0A= 2a0: 3c020000 lui v0,0x0=0A= 2a4: 24420000 addiu v0,v0,0=0A= 2a8: 0040f809 jalr v0=0A= 2ac: 00000000 nop=0A= e1000_remove(pdev);=0A= return -ENODEV;=0A= 2b0: 08000121 j 484 =0A= 2b4: 00000000 nop=0A= }=0A= =0A= /* map the MMIO region into the kernel virtual address space */=0A= =0A= adapter->shared.hw_addr =3D=0A= 2b8: 14800005 bnez a0,2d0 =0A= 2bc: 8e020068 lw v0,104(s0)=0A= 2c0: 10400005 beqz v0,2d8 =0A= 2c4: 00002821 move a1,zero=0A= 2c8: 080000b5 j 2d4 =0A= 2cc: 00441023 subu v0,v0,a0=0A= 2d0: 00441023 subu v0,v0,a0=0A= 2d4: 24450001 addiu a1,v0,1=0A= extern void * __ioremap(phys_t offset, phys_t size, unsigned long flags);=0A= =0A= static inline void *ioremap(phys_t offset, unsigned long size)=0A= {=0A= return __ioremap(offset, size, _CACHE_UNCACHED);=0A= 2d8: 3c020000 lui v0,0x0=0A= 2dc: 24420000 addiu v0,v0,0=0A= 2e0: 0040f809 jalr v0=0A= 2e4: 24060400 li a2,1024=0A= ioremap(pci_resource_start(pdev, BAR_0), pci_resource_len(pdev, = BAR_0));=0A= =0A= if(adapter->shared.hw_addr =3D=3D NULL) {=0A= 2e8: 1440001c bnez v0,35c =0A= 2ec: ae220008 sw v0,8(s1)=0A= E1000_ERR("ioremap failed\n");=0A= 2f0: 3c040000 lui a0,0x0=0A= 2f4: 2484022c addiu a0,a0,556=0A= 2f8: 3c020000 lui v0,0x0=0A= 2fc: 24420000 addiu v0,v0,0=0A= 300: 0040f809 jalr v0=0A= 304: 00000000 nop=0A= release_mem_region(pci_resource_start(pdev, BAR_0),=0A= 308: 8e030064 lw v1,100(s0)=0A= 30c: 14600005 bnez v1,324 =0A= 310: 8e020068 lw v0,104(s0)=0A= 314: 10400005 beqz v0,32c =0A= 318: 00003021 move a2,zero=0A= 31c: 080000ca j 328 =0A= 320: 00431023 subu v0,v0,v1=0A= 324: 00431023 subu v0,v0,v1=0A= 328: 24460001 addiu a2,v0,1=0A= 32c: 3c040000 lui a0,0x0=0A= 330: 24840000 addiu a0,a0,0=0A= 334: 3c020000 lui v0,0x0=0A= 338: 24420000 addiu v0,v0,0=0A= 33c: 0040f809 jalr v0=0A= 340: 8e050064 lw a1,100(s0)=0A= pci_resource_len(pdev, BAR_0));=0A= e1000_remove(pdev);=0A= 344: 3c020000 lui v0,0x0=0A= 348: 24420000 addiu v0,v0,0=0A= 34c: 0040f809 jalr v0=0A= 350: 02002021 move a0,s0=0A= return -ENOMEM;=0A= 354: 0800018b j 62c =0A= 358: 2402fff4 li v0,-12=0A= }=0A= =0A= /* don't actually register the interrupt handler until e1000_open */=0A= =0A= netdev->irq =3D pdev->irq;=0A= 35c: 8e02005c lw v0,92(s0)=0A= 360: ae420024 sw v0,36(s2)=0A= =0A= /* Set the MMIO base address for the NIC */=0A= =0A= #ifdef IANS=0A= netdev->base_addr =3D pci_resource_start(pdev, BAR_0);=0A= #endif=0A= netdev->mem_start =3D pci_resource_start(pdev, BAR_0);=0A= 364: 8e030064 lw v1,100(s0)=0A= 368: ae43001c sw v1,28(s2)=0A= netdev->mem_end =3D netdev->mem_start + pci_resource_len(pdev, = BAR_0);=0A= 36c: 8e040064 lw a0,100(s0)=0A= 370: 14800005 bnez a0,388 =0A= 374: 8e020068 lw v0,104(s0)=0A= 378: 10400006 beqz v0,394 =0A= 37c: 00605021 move t2,v1=0A= 380: 080000e3 j 38c =0A= 384: 00441023 subu v0,v0,a0=0A= 388: 00441023 subu v0,v0,a0=0A= 38c: 00621021 addu v0,v1,v0=0A= 390: 244a0001 addiu t2,v0,1=0A= =0A= /* set up function pointers to driver entry points */=0A= =0A= netdev->open =3D &e1000_open;=0A= netdev->stop =3D &e1000_close;=0A= netdev->hard_start_xmit =3D &e1000_xmit_frame;=0A= netdev->get_stats =3D &e1000_get_stats;=0A= netdev->set_multicast_list =3D &e1000_set_multi;=0A= netdev->set_mac_address =3D &e1000_set_mac;=0A= 394: 3c070000 lui a3,0x0=0A= 398: 24e70000 addiu a3,a3,0=0A= netdev->change_mtu =3D &e1000_change_mtu;=0A= 39c: 3c080000 lui t0,0x0=0A= 3a0: 25080000 addiu t0,t0,0=0A= netdev->do_ioctl =3D &e1000_ioctl;=0A= 3a4: 3c090000 lui t1,0x0=0A= 3a8: 25290000 addiu t1,t1,0=0A= 3ac: 3c020000 lui v0,0x0=0A= 3b0: 24420000 addiu v0,v0,0=0A= 3b4: 3c030000 lui v1,0x0=0A= 3b8: 24630000 addiu v1,v1,0=0A= 3bc: 3c040000 lui a0,0x0=0A= 3c0: 24840000 addiu a0,a0,0=0A= 3c4: 3c050000 lui a1,0x0=0A= 3c8: 24a50000 addiu a1,a1,0=0A= 3cc: 3c060000 lui a2,0x0=0A= 3d0: 24c60000 addiu a2,a2,0=0A= 3d4: ae4a0018 sw t2,24(s2)=0A= 3d8: ae470108 sw a3,264(s2)=0A= 3dc: ae48011c sw t0,284(s2)=0A= 3e0: ae49010c sw t1,268(s2)=0A= 3e4: ae4400f8 sw a0,248(s2)=0A= 3e8: ae450044 sw a1,68(s2)=0A= 3ec: ae4200f0 sw v0,240(s2)=0A= 3f0: ae4300f4 sw v1,244(s2)=0A= 3f4: ae460104 sw a2,260(s2)=0A= =0A= /* set up the struct e1000_adapter */=0A= =0A= adapter->bd_number =3D cards_found;=0A= 3f8: 3c020000 lui v0,0x0=0A= 3fc: 8c42043c lw v0,1084(v0)=0A= adapter->id_string =3D e1000_strings[ent->driver_data];=0A= printk("\n%s\n", adapter->id_string);=0A= 400: 3c040000 lui a0,0x0=0A= 404: 24840248 addiu a0,a0,584=0A= 408: ae220090 sw v0,144(s1)=0A= 40c: 8e630018 lw v1,24(s3)=0A= 410: 3c020000 lui v0,0x0=0A= 414: 24420000 addiu v0,v0,0=0A= 418: 00031880 sll v1,v1,0x2=0A= 41c: 3c060000 lui a2,0x0=0A= 420: 00c33021 addu a2,a2,v1=0A= 424: 8cc6027c lw a2,636(a2)=0A= 428: 00c02821 move a1,a2=0A= 42c: 0040f809 jalr v0=0A= 430: ae2601ac sw a2,428(s1)=0A= =0A= /* Order is important here. e1000_sw_init also identifies the=0A= * hardware, so that e1000_check_options can treat command line = parameters=0A= * differently depending on the hardware.=0A= */=0A= e1000_sw_init(adapter);=0A= 434: 3c020000 lui v0,0x0=0A= 438: 244215a0 addiu v0,v0,5536=0A= 43c: 0040f809 jalr v0=0A= 440: 02202021 move a0,s1=0A= e1000_check_options(adapter);=0A= 444: 3c030000 lui v1,0x0=0A= 448: 24630794 addiu v1,v1,1940=0A= 44c: 0060f809 jalr v1=0A= 450: 02202021 move a0,s1=0A= =0A= #ifdef MAX_SKB_FRAGS=0A= if(adapter->shared.mac_type >=3D e1000_82543) {=0A= 454: 8e22000c lw v0,12(s1)=0A= 458: 2c420002 sltiu v0,v0,2=0A= 45c: 54400002 bnezl v0,468 =0A= 460: 24020021 li v0,33=0A= netdev->features =3D NETIF_F_SG | NETIF_F_IP_CSUM | = NETIF_F_HIGHDMA;=0A= } else {=0A= 464: 24020023 li v0,35=0A= netdev->features =3D NETIF_F_SG | NETIF_F_HIGHDMA;=0A= 468: ae4200e4 sw v0,228(s2)=0A= }=0A= #endif=0A= =0A= #ifdef IANS=0A= adapter->iANSdata =3D kmalloc(sizeof(iANSsupport_t), GFP_KERNEL);=0A= if(adapter->iANSdata =3D=3D NULL) {=0A= e1000_remove(pdev);=0A= return -ENOMEM;=0A= }=0A= memset(adapter->iANSdata, 0, sizeof(iANSsupport_t));=0A= bd_ans_drv_InitANS(adapter, adapter->iANSdata);=0A= #endif=0A= =0A= /* finally, we get around to setting up the hardware */=0A= =0A= if(e1000_hw_init(adapter) < 0) {=0A= 46c: 3c020000 lui v0,0x0=0A= 470: 244217c4 addiu v0,v0,6084=0A= 474: 0040f809 jalr v0=0A= 478: 02202021 move a0,s1=0A= 47c: 04430007 bgezl v0,49c =0A= 480: 26300008 addiu s0,s1,8=0A= e1000_remove(pdev);=0A= 484: 3c020000 lui v0,0x0=0A= 488: 24420000 addiu v0,v0,0=0A= 48c: 0040f809 jalr v0=0A= 490: 02002021 move a0,s0=0A= return -ENODEV;=0A= 494: 0800018b j 62c =0A= 498: 2402ffed li v0,-19=0A= }=0A= cards_found++;=0A= 49c: 3c020000 lui v0,0x0=0A= 4a0: 8c42043c lw v0,1084(v0)=0A= 4a4: 24420001 addiu v0,v0,1=0A= =0A= /* reset stats */=0A= =0A= e1000_clear_hw_cntrs(&adapter->shared);=0A= 4a8: 3c030000 lui v1,0x0=0A= 4ac: 24630000 addiu v1,v1,0=0A= 4b0: 3c010000 lui at,0x0=0A= 4b4: ac22043c sw v0,1084(at)=0A= 4b8: 0060f809 jalr v1=0A= 4bc: 02002021 move a0,s0=0A= e1000_phy_get_info(&adapter->shared, &adapter->phy_info);=0A= 4c0: 02002021 move a0,s0=0A= 4c4: 3c020000 lui v0,0x0=0A= 4c8: 24420000 addiu v0,v0,0=0A= 4cc: 0040f809 jalr v0=0A= 4d0: 262501b8 addiu a1,s1,440=0A= =0A= #ifdef CONFIG_PROC_FS=0A= /* set up the proc fs entry */=0A= =0A= len =3D strlen(ADAPTERS_PROC_DIR);=0A= =0A= for(e1000_proc_dir =3D proc_net->subdir; e1000_proc_dir;=0A= 4d4: 3c030000 lui v1,0x0=0A= 4d8: 8c630000 lw v1,0(v1)=0A= 4dc: 24130010 li s3,16=0A= 4e0: 3c100000 lui s0,0x0=0A= 4e4: 26100000 addiu s0,s0,0=0A= 4e8: 0800013f j 4fc =0A= 4ec: 8c620034 lw v0,52(v1)=0A= e1000_proc_dir =3D e1000_proc_dir->next) {=0A= 4f0: 3c040000 lui a0,0x0=0A= 4f4: 8c840000 lw a0,0(a0)=0A= 4f8: 8c82002c lw v0,44(a0)=0A= 4fc: 3c010000 lui at,0x0=0A= 500: ac220000 sw v0,0(at)=0A= 504: 3c030000 lui v1,0x0=0A= 508: 8c630000 lw v1,0(v1)=0A= if((e1000_proc_dir->namelen =3D=3D len) &&=0A= 50c: 3c050000 lui a1,0x0=0A= 510: 24a5016c addiu a1,a1,364=0A= 514: 24060010 li a2,16=0A= 518: 1060000c beqz v1,54c =0A= 51c: 00602021 move a0,v1=0A= 520: 94620002 lhu v0,2(v1)=0A= 524: 5453fff5 bnel v0,s3,4fc =0A= 528: 8c82002c lw v0,44(a0)=0A= 52c: 0200f809 jalr s0=0A= 530: 8c640004 lw a0,4(v1)=0A= 534: 1440ffee bnez v0,4f0 =0A= 538: 00000000 nop=0A= (memcmp(e1000_proc_dir->name, ADAPTERS_PROC_DIR, len) =3D=3D = 0))=0A= break;=0A= }=0A= =0A= if(e1000_proc_dir =3D=3D NULL)=0A= 53c: 3c020000 lui v0,0x0=0A= 540: 8c420000 lw v0,0(v0)=0A= 544: 1440000d bnez v0,57c =0A= 548: 00000000 nop=0A= e1000_proc_dir =3D=0A= 54c: 3c060000 lui a2,0x0=0A= 550: 8cc60000 lw a2,0(a2)=0A= 554: 3c040000 lui a0,0x0=0A= 558: 2484016c addiu a0,a0,364=0A= 55c: 3c020000 lui v0,0x0=0A= 560: 24420000 addiu v0,v0,0=0A= 564: 0040f809 jalr v0=0A= 568: 24054000 li a1,16384=0A= 56c: 3c010000 lui at,0x0=0A= 570: ac220000 sw v0,0(at)=0A= create_proc_entry(ADAPTERS_PROC_DIR, S_IFDIR, proc_net);=0A= =0A= if(e1000_proc_dir !=3D NULL)=0A= 574: 5040000c beqzl v0,5a8 =0A= 578: 8e2300b0 lw v1,176(s1)=0A= if(e1000_create_proc_dev(adapter) < 0) {=0A= 57c: 3c020000 lui v0,0x0=0A= 580: 24420000 addiu v0,v0,0=0A= 584: 0040f809 jalr v0=0A= 588: 02202021 move a0,s1=0A= 58c: 04430006 bgezl v0,5a8 =0A= 590: 8e2300b0 lw v1,176(s1)=0A= e1000_remove_proc_dev(adapter->netdev);=0A= 594: 3c020000 lui v0,0x0=0A= 598: 24420000 addiu v0,v0,0=0A= 59c: 0040f809 jalr v0=0A= 5a0: 8e240148 lw a0,328(s1)=0A= }=0A= #endif=0A= =0A= /* print the link status */=0A= =0A= if(adapter->link_active =3D=3D 1)=0A= 5a4: 8e2300b0 lw v1,176(s1)=0A= 5a8: 24020001 li v0,1=0A= 5ac: 14620017 bne v1,v0,60c =0A= 5b0: 02402821 move a1,s2=0A= printk("%s: Mem:0x%p IRQ:%d Speed:%d Mbps Duplex:%s\n",=0A= 5b4: 962200b4 lhu v0,180(s1)=0A= 5b8: 24040002 li a0,2=0A= 5bc: afa20010 sw v0,16(sp)=0A= 5c0: 962300b6 lhu v1,182(s1)=0A= 5c4: 14640005 bne v1,a0,5dc =0A= 5c8: 00000000 nop=0A= 5cc: 3c020000 lui v0,0x0=0A= 5d0: 24420284 addiu v0,v0,644=0A= 5d4: 0800017a j 5e8 =0A= 5d8: afa20014 sw v0,20(sp)=0A= 5dc: 3c020000 lui v0,0x0=0A= 5e0: 2442028c addiu v0,v0,652=0A= 5e4: afa20014 sw v0,20(sp)=0A= 5e8: 8ca6001c lw a2,28(a1)=0A= 5ec: 3c040000 lui a0,0x0=0A= 5f0: 24840250 addiu a0,a0,592=0A= 5f4: 3c020000 lui v0,0x0=0A= 5f8: 24420000 addiu v0,v0,0=0A= 5fc: 0040f809 jalr v0=0A= 600: 8ca70024 lw a3,36(a1)=0A= 604: 0800018b j 62c =0A= 608: 00001021 move v0,zero=0A= netdev->name, (void *) netdev->mem_start, netdev->irq,=0A= adapter->link_speed,=0A= adapter->link_duplex =3D=3D FULL_DUPLEX ? "Full" : = "Half");=0A= else=0A= printk("%s: Mem:0x%p IRQ:%d Speed:N/A Duplex:N/A\n", = netdev->name,=0A= 60c: 8ca6001c lw a2,28(a1)=0A= 610: 3c040000 lui a0,0x0=0A= 614: 24840294 addiu a0,a0,660=0A= 618: 3c020000 lui v0,0x0=0A= 61c: 24420000 addiu v0,v0,0=0A= 620: 0040f809 jalr v0=0A= 624: 8ca70024 lw a3,36(a1)=0A= (void *) netdev->mem_start, netdev->irq);=0A= =0A= return 0;=0A= 628: 00001021 move v0,zero=0A= }=0A= 62c: 8fbf0028 lw ra,40(sp)=0A= 630: 8fb30024 lw s3,36(sp)=0A= 634: 8fb20020 lw s2,32(sp)=0A= 638: 8fb1001c lw s1,28(sp)=0A= 63c: 8fb00018 lw s0,24(sp)=0A= 640: 03e00008 jr ra=0A= 644: 27bd0030 addiu sp,sp,48=0A= =0A= 00000648 :=0A= 648: 27bdffd8 addiu sp,sp,-40=0A= 64c: afb00010 sw s0,16(sp)=0A= =0A= /**=0A= * e1000_remove - Device Removal Routine=0A= * @pdev: PCI device information struct=0A= *=0A= * e1000_remove is called by the PCI subsystem to alert the driver=0A= * that it should release a PCI device. The could be caused by a=0A= * Hot-Plug event, or because the driver is going to be removed from=0A= * memory.=0A= *=0A= * This routine is also called to clean up from a failure in=0A= * e1000_probe. The Adapter struct and netdev will always exist,=0A= * all other pointers must be checked for NULL before freeing.=0A= **/=0A= =0A= void=0A= e1000_remove(struct pci_dev *pdev)=0A= {=0A= struct net_device *netdev;=0A= struct e1000_adapter *adapter;=0A= =0A= /* find the Adapter struct that matches this PCI device */=0A= =0A= for(adapter =3D e1000_adapter_list; adapter !=3D NULL; adapter =3D = adapter->next) {=0A= 650: 3c100000 lui s0,0x0=0A= 654: 8e100000 lw s0,0(s0)=0A= 658: afb10014 sw s1,20(sp)=0A= 65c: afbf0020 sw ra,32(sp)=0A= 660: afb3001c sw s3,28(sp)=0A= 664: afb20018 sw s2,24(sp)=0A= if(adapter->pdev =3D=3D pdev)=0A= 668: 00808821 move s1,a0=0A= 66c: 12000043 beqz s0,77c =0A= 670: 8fbf0020 lw ra,32(sp)=0A= 674: 8e02014c lw v0,332(s0)=0A= 678: 5451fffc bnel v0,s1,66c =0A= 67c: 8e100000 lw s0,0(s0)=0A= break;=0A= }=0A= if(adapter =3D=3D NULL)=0A= 680: 1200003e beqz s0,77c =0A= 684: 26120008 addiu s2,s0,8=0A= return;=0A= =0A= netdev =3D adapter->netdev;=0A= 688: 8e130148 lw s3,328(s0)=0A= =0A= /* this must be called before freeing anything,=0A= * otherwise there is a case where the open entry point can be=0A= * running at the same time as remove. Calling unregister_netdev on = an=0A= * open interface results in a call to dev_close, which locks=0A= * properly against the other netdev entry points, so this takes=0A= * care of the hotplug issue of removing an active interface as well.=0A= */=0A= unregister_netdev(netdev);=0A= 68c: 3c020000 lui v0,0x0=0A= 690: 24420000 addiu v0,v0,0=0A= 694: 0040f809 jalr v0=0A= 698: 02602021 move a0,s3=0A= =0A= e1000_phy_hw_reset(&adapter->shared);=0A= 69c: 3c020000 lui v0,0x0=0A= 6a0: 24420000 addiu v0,v0,0=0A= 6a4: 0040f809 jalr v0=0A= 6a8: 02402021 move a0,s2=0A= =0A= #ifdef CONFIG_PROC_FS=0A= /* remove the proc nodes */=0A= =0A= if(e1000_proc_dir !=3D NULL)=0A= 6ac: 3c030000 lui v1,0x0=0A= 6b0: 8c630000 lw v1,0(v1)=0A= 6b4: 10600005 beqz v1,6cc =0A= 6b8: 00000000 nop=0A= e1000_remove_proc_dev(adapter->netdev);=0A= 6bc: 3c020000 lui v0,0x0=0A= 6c0: 24420000 addiu v0,v0,0=0A= 6c4: 0040f809 jalr v0=0A= 6c8: 8e040148 lw a0,328(s0)=0A= #endif=0A= =0A= /* remove from the adapter list */=0A= =0A= if(e1000_adapter_list =3D=3D adapter)=0A= 6cc: 3c020000 lui v0,0x0=0A= 6d0: 8c420000 lw v0,0(v0)=0A= 6d4: 54500005 bnel v0,s0,6ec =0A= 6d8: 8e030000 lw v1,0(s0)=0A= e1000_adapter_list =3D adapter->next;=0A= 6dc: 8e020000 lw v0,0(s0)=0A= 6e0: 3c010000 lui at,0x0=0A= 6e4: ac220000 sw v0,0(at)=0A= if(adapter->next !=3D NULL)=0A= 6e8: 8e030000 lw v1,0(s0)=0A= 6ec: 50600004 beqzl v1,700 =0A= 6f0: 8e030004 lw v1,4(s0)=0A= adapter->next->prev =3D adapter->prev;=0A= 6f4: 8e020004 lw v0,4(s0)=0A= 6f8: ac620004 sw v0,4(v1)=0A= if(adapter->prev !=3D NULL)=0A= 6fc: 8e030004 lw v1,4(s0)=0A= 700: 50600004 beqzl v1,714 =0A= 704: 8e440000 lw a0,0(s2)=0A= adapter->prev->next =3D adapter->next;=0A= 708: 8e020000 lw v0,0(s0)=0A= 70c: ac620000 sw v0,0(v1)=0A= =0A= /* free system resources */=0A= =0A= #ifdef IANS=0A= if(adapter->iANSdata !=3D NULL)=0A= kfree(adapter->iANSdata);=0A= #endif=0A= =0A= if(adapter->shared.hw_addr !=3D NULL) {=0A= 710: 8e440000 lw a0,0(s2)=0A= 714: 10800014 beqz a0,768 =0A= 718: 00000000 nop=0A= iounmap((void *) adapter->shared.hw_addr);=0A= 71c: 3c020000 lui v0,0x0=0A= 720: 24420000 addiu v0,v0,0=0A= 724: 0040f809 jalr v0=0A= 728: 00000000 nop=0A= release_mem_region(pci_resource_start(pdev, BAR_0),=0A= 72c: 8e230064 lw v1,100(s1)=0A= 730: 14600005 bnez v1,748 =0A= 734: 8e220068 lw v0,104(s1)=0A= 738: 10400005 beqz v0,750 =0A= 73c: 00003021 move a2,zero=0A= 740: 080001d3 j 74c =0A= 744: 00431023 subu v0,v0,v1=0A= 748: 00431023 subu v0,v0,v1=0A= 74c: 24460001 addiu a2,v0,1=0A= 750: 3c040000 lui a0,0x0=0A= 754: 24840000 addiu a0,a0,0=0A= 758: 3c020000 lui v0,0x0=0A= 75c: 24420000 addiu v0,v0,0=0A= 760: 0040f809 jalr v0=0A= 764: 8e250064 lw a1,100(s1)=0A= pci_resource_len(pdev, BAR_0));=0A= }=0A= =0A= /* free the net_device _and_ struct e1000_adapter memory */=0A= =0A= kfree(netdev);=0A= 768: 3c020000 lui v0,0x0=0A= 76c: 24420000 addiu v0,v0,0=0A= 770: 0040f809 jalr v0=0A= 774: 02602021 move a0,s3=0A= =0A= return;=0A= }=0A= 778: 8fbf0020 lw ra,32(sp)=0A= 77c: 8fb3001c lw s3,28(sp)=0A= 780: 8fb20018 lw s2,24(sp)=0A= 784: 8fb10014 lw s1,20(sp)=0A= 788: 8fb00010 lw s0,16(sp)=0A= 78c: 03e00008 jr ra=0A= 790: 27bd0028 addiu sp,sp,40=0A= =0A= 00000794 :=0A= 794: 27bdffd8 addiu sp,sp,-40=0A= 798: afb10014 sw s1,20(sp)=0A= 79c: afbf0020 sw ra,32(sp)=0A= 7a0: afb3001c sw s3,28(sp)=0A= 7a4: afb20018 sw s2,24(sp)=0A= 7a8: afb00010 sw s0,16(sp)=0A= 7ac: 00808821 move s1,a0=0A= =0A= /**=0A= * e1000_check_options - Range Checking for Command Line Parameters=0A= * @adapter: board private structure=0A= *=0A= * This routine checks all command line paramters for valid user=0A= * input. If an invalid value is given, or if no user specified=0A= * value exists, a default value is used. The final value is stored=0A= * in a variable in the Adapter structure.=0A= **/=0A= =0A= static void=0A= e1000_check_options(struct e1000_adapter *adapter)=0A= {=0A= int board =3D adapter->bd_number;=0A= 7b0: 8e250090 lw a1,144(s1)=0A= =0A= if(board >=3D E1000_MAX_NIC) {=0A= 7b4: 28a20008 slti v0,a1,8=0A= 7b8: 5440000d bnezl v0,7f0 =0A= 7bc: 00059080 sll s2,a1,0x2=0A= printk("Warning: no configuration for board #%i\n", board);=0A= 7c0: 3c040000 lui a0,0x0=0A= 7c4: 248402c4 addiu a0,a0,708=0A= 7c8: 3c130000 lui s3,0x0=0A= 7cc: 26730000 addiu s3,s3,0=0A= 7d0: 0260f809 jalr s3=0A= 7d4: 00000000 nop=0A= printk("Using defaults for all values\n");=0A= 7d8: 3c040000 lui a0,0x0=0A= 7dc: 248402f0 addiu a0,a0,752=0A= 7e0: 0260f809 jalr s3=0A= 7e4: 00000000 nop=0A= board =3D E1000_MAX_NIC;=0A= 7e8: 24050008 li a1,8=0A= }=0A= =0A= E1000_DBG("e1000_check_options\n");=0A= =0A= /* Transmit Descriptor Count */=0A= =0A= if(TxDescriptors[board] =3D=3D OPTION_UNSET) {=0A= 7ec: 00059080 sll s2,a1,0x2=0A= 7f0: 3c030000 lui v1,0x0=0A= 7f4: 246302b0 addiu v1,v1,688=0A= 7f8: 00721821 addu v1,v1,s2=0A= 7fc: 8c650000 lw a1,0(v1)=0A= 800: 2402ffff li v0,-1=0A= 804: 14a20005 bne a1,v0,81c =0A= 808: 24a2ffb0 addiu v0,a1,-80=0A= adapter->tx_ring.count =3D DEFAULT_TXD;=0A= 80c: 24020100 li v0,256=0A= 810: ae2200f0 sw v0,240(s1)=0A= TxDescriptors[board] =3D DEFAULT_TXD;=0A= } else=0A= 814: 08000234 j 8d0 =0A= 818: ac620000 sw v0,0(v1)=0A= if(((TxDescriptors[board] > MAX_TXD) ||=0A= 81c: 2c4200b1 sltiu v0,v0,177=0A= 820: 1440000d bnez v0,858 =0A= 824: 00000000 nop=0A= 828: 8e22000c lw v0,12(s1)=0A= 82c: 2c420003 sltiu v0,v0,3=0A= 830: 10400009 beqz v0,858 =0A= 834: 00000000 nop=0A= (TxDescriptors[board] < MIN_TXD)) &&=0A= (adapter->shared.mac_type <=3D e1000_82543)) {=0A= printk("Invalid TxDescriptors specified (%i), using default = %i\n",=0A= 838: 3c040000 lui a0,0x0=0A= 83c: 24840310 addiu a0,a0,784=0A= 840: 3c130000 lui s3,0x0=0A= 844: 26730000 addiu s3,s3,0=0A= 848: 0260f809 jalr s3=0A= 84c: 24060100 li a2,256=0A= TxDescriptors[board], DEFAULT_TXD);=0A= adapter->tx_ring.count =3D DEFAULT_TXD;=0A= } else=0A= 850: 08000233 j 8cc =0A= 854: 24030100 li v1,256=0A= if(((TxDescriptors[board] > MAX_82544_TXD) ||=0A= 858: 3c050000 lui a1,0x0=0A= 85c: 00b22821 addu a1,a1,s2=0A= 860: 8ca502b0 lw a1,688(a1)=0A= 864: 24a2ffb0 addiu v0,a1,-80=0A= 868: 2c420fb1 sltiu v0,v0,4017=0A= 86c: 1440000d bnez v0,8a4 =0A= 870: 00000000 nop=0A= 874: 8e22000c lw v0,12(s1)=0A= 878: 2c420003 sltiu v0,v0,3=0A= 87c: 14400009 bnez v0,8a4 =0A= 880: 00000000 nop=0A= (TxDescriptors[board] < MIN_TXD)) &&=0A= (adapter->shared.mac_type > e1000_82543)) {=0A= printk("Invalid TxDescriptors specified (%i), using default = %i\n",=0A= 884: 3c040000 lui a0,0x0=0A= 888: 24840310 addiu a0,a0,784=0A= 88c: 3c130000 lui s3,0x0=0A= 890: 26730000 addiu s3,s3,0=0A= 894: 0260f809 jalr s3=0A= 898: 24060100 li a2,256=0A= TxDescriptors[board], DEFAULT_TXD);=0A= adapter->tx_ring.count =3D DEFAULT_TXD;=0A= } else {=0A= 89c: 08000233 j 8cc =0A= 8a0: 24030100 li v1,256=0A= printk("Using specified value of %i TxDescriptors\n",=0A= 8a4: 3c100000 lui s0,0x0=0A= 8a8: 261002b0 addiu s0,s0,688=0A= 8ac: 02128021 addu s0,s0,s2=0A= 8b0: 3c040000 lui a0,0x0=0A= 8b4: 24840348 addiu a0,a0,840=0A= 8b8: 3c130000 lui s3,0x0=0A= 8bc: 26730000 addiu s3,s3,0=0A= 8c0: 0260f809 jalr s3=0A= 8c4: 8e050000 lw a1,0(s0)=0A= TxDescriptors[board]);=0A= adapter->tx_ring.count =3D TxDescriptors[board];=0A= 8c8: 8e030000 lw v1,0(s0)=0A= 8cc: ae2300f0 sw v1,240(s1)=0A= }=0A= =0A= /* tx_ring.count must be a multiple of 8 */=0A= =0A= adapter->tx_ring.count =3D E1000_ROUNDUP2(adapter->tx_ring.count,=0A= 8d0: 8e2200f0 lw v0,240(s1)=0A= 8d4: 2403fff8 li v1,-8=0A= REQ_TX_DESCRIPTOR_MULTIPLE);=0A= =0A= /* Receive Descriptor Count */=0A= =0A= if(RxDescriptors[board] =3D=3D OPTION_UNSET) {=0A= 8d8: 3c040000 lui a0,0x0=0A= 8dc: 248402d4 addiu a0,a0,724=0A= 8e0: 00922021 addu a0,a0,s2=0A= 8e4: 24420007 addiu v0,v0,7=0A= 8e8: 00431024 and v0,v0,v1=0A= 8ec: ae2200f0 sw v0,240(s1)=0A= 8f0: 8c850000 lw a1,0(a0)=0A= 8f4: 2402ffff li v0,-1=0A= 8f8: 14a20005 bne a1,v0,910 =0A= 8fc: 24a2ffb0 addiu v0,a1,-80=0A= adapter->rx_ring.count =3D DEFAULT_RXD;=0A= 900: 24020100 li v0,256=0A= 904: ae22011c sw v0,284(s1)=0A= RxDescriptors[board] =3D DEFAULT_RXD;=0A= } else=0A= 908: 08000271 j 9c4 =0A= 90c: ac820000 sw v0,0(a0)=0A= if(((RxDescriptors[board] > MAX_RXD) ||=0A= 910: 2c4200b1 sltiu v0,v0,177=0A= 914: 1440000d bnez v0,94c =0A= 918: 00000000 nop=0A= 91c: 8e22000c lw v0,12(s1)=0A= 920: 2c420003 sltiu v0,v0,3=0A= 924: 10400009 beqz v0,94c =0A= 928: 00000000 nop=0A= (RxDescriptors[board] < MIN_RXD)) &&=0A= (adapter->shared.mac_type <=3D e1000_82543)) {=0A= printk("Invalid RxDescriptors specified (%i), using default = %i\n",=0A= 92c: 3c040000 lui a0,0x0=0A= 930: 24840374 addiu a0,a0,884=0A= 934: 3c130000 lui s3,0x0=0A= 938: 26730000 addiu s3,s3,0=0A= 93c: 0260f809 jalr s3=0A= 940: 24060100 li a2,256=0A= RxDescriptors[board], DEFAULT_RXD);=0A= adapter->rx_ring.count =3D DEFAULT_RXD;=0A= } else=0A= 944: 08000270 j 9c0 =0A= 948: 24030100 li v1,256=0A= if(((RxDescriptors[board] > MAX_82544_RXD) ||=0A= 94c: 3c050000 lui a1,0x0=0A= 950: 00b22821 addu a1,a1,s2=0A= 954: 8ca502d4 lw a1,724(a1)=0A= 958: 24a2ffb0 addiu v0,a1,-80=0A= 95c: 2c420fb1 sltiu v0,v0,4017=0A= 960: 1440000d bnez v0,998 =0A= 964: 00000000 nop=0A= 968: 8e22000c lw v0,12(s1)=0A= 96c: 2c420003 sltiu v0,v0,3=0A= 970: 14400009 bnez v0,998 =0A= 974: 00000000 nop=0A= (RxDescriptors[board] < MIN_RXD)) &&=0A= (adapter->shared.mac_type > e1000_82543)) {=0A= printk("Invalid RxDescriptors specified (%i), using default = %i\n",=0A= 978: 3c040000 lui a0,0x0=0A= 97c: 24840374 addiu a0,a0,884=0A= 980: 3c130000 lui s3,0x0=0A= 984: 26730000 addiu s3,s3,0=0A= 988: 0260f809 jalr s3=0A= 98c: 24060100 li a2,256=0A= RxDescriptors[board], DEFAULT_RXD);=0A= adapter->rx_ring.count =3D DEFAULT_RXD;=0A= } else {=0A= 990: 08000270 j 9c0 =0A= 994: 24030100 li v1,256=0A= printk("Using specified value of %i RxDescriptors\n",=0A= 998: 3c100000 lui s0,0x0=0A= 99c: 261002d4 addiu s0,s0,724=0A= 9a0: 02128021 addu s0,s0,s2=0A= 9a4: 3c040000 lui a0,0x0=0A= 9a8: 248403ac addiu a0,a0,940=0A= 9ac: 3c130000 lui s3,0x0=0A= 9b0: 26730000 addiu s3,s3,0=0A= 9b4: 0260f809 jalr s3=0A= 9b8: 8e050000 lw a1,0(s0)=0A= RxDescriptors[board]);=0A= adapter->rx_ring.count =3D RxDescriptors[board];=0A= 9bc: 8e030000 lw v1,0(s0)=0A= 9c0: ae23011c sw v1,284(s1)=0A= }=0A= =0A= /* rx_ring.count must be a multiple of 8 */=0A= =0A= adapter->rx_ring.count =3D=0A= 9c4: 8e22011c lw v0,284(s1)=0A= 9c8: 2403fff8 li v1,-8=0A= E1000_ROUNDUP2(adapter->rx_ring.count, = REQ_RX_DESCRIPTOR_MULTIPLE);=0A= =0A= /* Receive Checksum Offload Enable */=0A= =0A= if(XsumRX[board] =3D=3D OPTION_UNSET) {=0A= 9cc: 3c040000 lui a0,0x0=0A= 9d0: 24840388 addiu a0,a0,904=0A= 9d4: 00922021 addu a0,a0,s2=0A= 9d8: 24420007 addiu v0,v0,7=0A= 9dc: 00431024 and v0,v0,v1=0A= 9e0: ae22011c sw v0,284(s1)=0A= 9e4: 8c850000 lw a1,0(a0)=0A= 9e8: 2402ffff li v0,-1=0A= 9ec: 14a20005 bne a1,v0,a04 =0A= 9f0: 2ca20002 sltiu v0,a1,2=0A= adapter->RxChecksum =3D XSUMRX_DEFAULT;=0A= 9f4: 24020001 li v0,1=0A= 9f8: ae2201b0 sw v0,432(s1)=0A= XsumRX[board] =3D XSUMRX_DEFAULT;=0A= } else if((XsumRX[board] !=3D OPTION_ENABLED) &&=0A= 9fc: 0800029b j a6c =0A= a00: ac820000 sw v0,0(a0)=0A= a04: 54400009 bnezl v0,a2c =0A= a08: 24020001 li v0,1=0A= (XsumRX[board] !=3D OPTION_DISABLED)) {=0A= printk("Invalid XsumRX specified (%i), using default of %i\n",=0A= a0c: 3c040000 lui a0,0x0=0A= a10: 248403d8 addiu a0,a0,984=0A= a14: 3c130000 lui s3,0x0=0A= a18: 26730000 addiu s3,s3,0=0A= a1c: 0260f809 jalr s3=0A= a20: 24060001 li a2,1=0A= XsumRX[board], XSUMRX_DEFAULT);=0A= adapter->RxChecksum =3D XSUMRX_DEFAULT;=0A= } else {=0A= a24: 0800029a j a68 =0A= a28: 24030001 li v1,1=0A= printk("Receive Checksum Offload %s\n",=0A= a2c: 3c030000 lui v1,0x0=0A= a30: 2463042c addiu v1,v1,1068=0A= a34: 10a20003 beq a1,v0,a44 =0A= a38: 00000000 nop=0A= a3c: 3c030000 lui v1,0x0=0A= a40: 24630434 addiu v1,v1,1076=0A= a44: 3c040000 lui a0,0x0=0A= a48: 2484040c addiu a0,a0,1036=0A= a4c: 3c130000 lui s3,0x0=0A= a50: 26730000 addiu s3,s3,0=0A= a54: 0260f809 jalr s3=0A= a58: 00602821 move a1,v1=0A= XsumRX[board] =3D=3D OPTION_ENABLED ? "Enabled" : = "Disabled");=0A= adapter->RxChecksum =3D XsumRX[board];=0A= a5c: 3c030000 lui v1,0x0=0A= a60: 00721821 addu v1,v1,s2=0A= a64: 8c630388 lw v1,904(v1)=0A= a68: ae2301b0 sw v1,432(s1)=0A= }=0A= =0A= /* Flow Control */=0A= =0A= if(FlowControl[board] =3D=3D OPTION_UNSET) {=0A= a6c: 3c030000 lui v1,0x0=0A= a70: 24630364 addiu v1,v1,868=0A= a74: 00721821 addu v1,v1,s2=0A= a78: 8c650000 lw a1,0(v1)=0A= a7c: 2402ffff li v0,-1=0A= a80: 14a20005 bne a1,v0,a98 =0A= a84: 2ca20004 sltiu v0,a1,4=0A= adapter->shared.fc =3D e1000_fc_default;=0A= a88: 240200ff li v0,255=0A= a8c: ae220018 sw v0,24(s1)=0A= FlowControl[board] =3D e1000_fc_default;=0A= } else if((FlowControl[board] > e1000_fc_full) ||=0A= a90: 080002dc j b70 =0A= a94: ac620000 sw v0,0(v1)=0A= a98: 1440000a bnez v0,ac4 =0A= a9c: 24020002 li v0,2=0A= (FlowControl[board] < e1000_fc_none)) {=0A= printk("Invalid FlowControl specified (%i), "=0A= aa0: 3c040000 lui a0,0x0=0A= aa4: 24840440 addiu a0,a0,1088=0A= aa8: 3c020000 lui v0,0x0=0A= aac: 24420000 addiu v0,v0,0=0A= ab0: 0040f809 jalr v0=0A= ab4: 00000000 nop=0A= "reading default settings from the EEPROM\n",=0A= FlowControl[board]);=0A= adapter->shared.fc =3D e1000_fc_default;=0A= ab8: 240300ff li v1,255=0A= } else {=0A= abc: 080002dc j b70 =0A= ac0: ae230018 sw v1,24(s1)=0A= adapter->shared.fc =3D FlowControl[board];=0A= switch (adapter->shared.fc) {=0A= ac4: 10a20018 beq a1,v0,b28 =0A= ac8: ae250018 sw a1,24(s1)=0A= acc: 2ca20003 sltiu v0,a1,3=0A= ad0: 10400007 beqz v0,af0 =0A= ad4: 24020003 li v0,3=0A= ad8: 10a0000b beqz a1,b08 =0A= adc: 24020001 li v0,1=0A= ae0: 10a2000d beq a1,v0,b18 =0A= ae4: 00000000 nop=0A= ae8: 080002dc j b70 =0A= aec: 00000000 nop=0A= af0: 10a20015 beq a1,v0,b48 =0A= af4: 240200ff li v0,255=0A= af8: 10a20019 beq a1,v0,b60 =0A= afc: 00000000 nop=0A= b00: 080002dc j b70 =0A= b04: 00000000 nop=0A= case e1000_fc_none:=0A= printk("Flow Control Disabled\n");=0A= b08: 3c040000 lui a0,0x0=0A= b0c: 24840490 addiu a0,a0,1168=0A= break;=0A= b10: 080002cc j b30 =0A= b14: 00000000 nop=0A= case e1000_fc_rx_pause:=0A= printk("Flow Control Receive Only\n");=0A= b18: 3c040000 lui a0,0x0=0A= b1c: 248404a8 addiu a0,a0,1192=0A= break;=0A= b20: 080002cc j b30 =0A= b24: 00000000 nop=0A= case e1000_fc_tx_pause:=0A= printk("Flow Control Transmit Only\n");=0A= b28: 3c040000 lui a0,0x0=0A= b2c: 248404c4 addiu a0,a0,1220=0A= b30: 3c020000 lui v0,0x0=0A= b34: 24420000 addiu v0,v0,0=0A= b38: 0040f809 jalr v0=0A= b3c: 00000000 nop=0A= break;=0A= b40: 080002dc j b70 =0A= b44: 00000000 nop=0A= case e1000_fc_full:=0A= printk("Flow Control Enabled\n");=0A= b48: 3c040000 lui a0,0x0=0A= b4c: 248404e0 addiu a0,a0,1248=0A= b50: 3c130000 lui s3,0x0=0A= b54: 26730000 addiu s3,s3,0=0A= b58: 0260f809 jalr s3=0A= b5c: 00000000 nop=0A= case e1000_fc_default:=0A= printk("Flow Control Hardware Default\n");=0A= b60: 3c040000 lui a0,0x0=0A= b64: 248404f8 addiu a0,a0,1272=0A= b68: 0260f809 jalr s3=0A= b6c: 00000000 nop=0A= }=0A= }=0A= =0A= /* Transmit Interrupt Delay */=0A= =0A= if(TxIntDelay[board] =3D=3D OPTION_UNSET) {=0A= b70: 3c100000 lui s0,0x0=0A= b74: 261003ac addiu s0,s0,940=0A= b78: 02128021 addu s0,s0,s2=0A= b7c: 8e050000 lw a1,0(s0)=0A= b80: 2402ffff li v0,-1=0A= b84: 14a20005 bne a1,v0,b9c =0A= b88: 3402ffff li v0,0xffff=0A= adapter->tx_int_delay =3D DEFAULT_TIDV;=0A= b8c: 24020040 li v0,64=0A= b90: ae220104 sw v0,260(s1)=0A= TxIntDelay[board] =3D DEFAULT_TIDV;=0A= } else if((TxIntDelay[board] > MAX_TIDV) || (TxIntDelay[board] < = MIN_TIDV)) {=0A= b94: 080002fa j be8 =0A= b98: ae020000 sw v0,0(s0)=0A= b9c: 0045102b sltu v0,v0,a1=0A= ba0: 10400009 beqz v0,bc8 =0A= ba4: 00000000 nop=0A= printk("Invalid TxIntDelay specified (%i), using default %i\n",=0A= ba8: 3c040000 lui a0,0x0=0A= bac: 24840518 addiu a0,a0,1304=0A= bb0: 3c020000 lui v0,0x0=0A= bb4: 24420000 addiu v0,v0,0=0A= bb8: 0040f809 jalr v0=0A= bbc: 24060040 li a2,64=0A= TxIntDelay[board], DEFAULT_TIDV);=0A= adapter->tx_int_delay =3D DEFAULT_TIDV;=0A= } else {=0A= bc0: 080002f9 j be4 =0A= bc4: 24030040 li v1,64=0A= printk("Using specified TxIntDelay of %i\n", TxIntDelay[board]);=0A= bc8: 3c040000 lui a0,0x0=0A= bcc: 24840550 addiu a0,a0,1360=0A= bd0: 3c020000 lui v0,0x0=0A= bd4: 24420000 addiu v0,v0,0=0A= bd8: 0040f809 jalr v0=0A= bdc: 00000000 nop=0A= adapter->tx_int_delay =3D TxIntDelay[board];=0A= be0: 8e030000 lw v1,0(s0)=0A= be4: ae230104 sw v1,260(s1)=0A= }=0A= =0A= /* Receive Interrupt Delay */=0A= =0A= if(RxIntDelay[board] =3D=3D OPTION_UNSET) {=0A= be8: 3c100000 lui s0,0x0=0A= bec: 261003d0 addiu s0,s0,976=0A= bf0: 02128021 addu s0,s0,s2=0A= bf4: 8e050000 lw a1,0(s0)=0A= bf8: 2402ffff li v0,-1=0A= bfc: 14a20005 bne a1,v0,c14 =0A= c00: 3402ffff li v0,0xffff=0A= adapter->rx_int_delay =3D DEFAULT_RIDV;=0A= c04: 24020040 li v0,64=0A= c08: ae220130 sw v0,304(s1)=0A= RxIntDelay[board] =3D DEFAULT_RIDV;=0A= } else if((RxIntDelay[board] > MAX_RIDV) || (RxIntDelay[board] < = MIN_RIDV)) {=0A= c0c: 08000318 j c60 =0A= c10: ae020000 sw v0,0(s0)=0A= c14: 0045102b sltu v0,v0,a1=0A= c18: 10400009 beqz v0,c40 =0A= c1c: 00000000 nop=0A= printk("Invalid RxIntDelay specified (%i), using default %i\n",=0A= c20: 3c040000 lui a0,0x0=0A= c24: 24840574 addiu a0,a0,1396=0A= c28: 3c020000 lui v0,0x0=0A= c2c: 24420000 addiu v0,v0,0=0A= c30: 0040f809 jalr v0=0A= c34: 24060040 li a2,64=0A= RxIntDelay[board], DEFAULT_RIDV);=0A= adapter->rx_int_delay =3D DEFAULT_RIDV;=0A= } else {=0A= c38: 08000317 j c5c =0A= c3c: 24030040 li v1,64=0A= printk("Using specified RxIntDelay of %i\n", RxIntDelay[board]);=0A= c40: 3c040000 lui a0,0x0=0A= c44: 248405ac addiu a0,a0,1452=0A= c48: 3c020000 lui v0,0x0=0A= c4c: 24420000 addiu v0,v0,0=0A= c50: 0040f809 jalr v0=0A= c54: 00000000 nop=0A= adapter->rx_int_delay =3D RxIntDelay[board];=0A= c58: 8e030000 lw v1,0(s0)=0A= c5c: ae230130 sw v1,304(s1)=0A= }=0A= =0A= if(adapter->shared.media_type =3D=3D e1000_media_type_copper) {=0A= c60: 8e330010 lw s3,16(s1)=0A= c64: 16600038 bnez s3,d48 =0A= c68: 2402ffff li v0,-1=0A= /* MDI/MDI-X Support */=0A= =0A= if(MdiX[board] =3D=3D OPTION_UNSET) {=0A= c6c: 3c100000 lui s0,0x0=0A= c70: 261003f4 addiu s0,s0,1012=0A= c74: 02128021 addu s0,s0,s2=0A= c78: 8e050000 lw a1,0(s0)=0A= c7c: 14a20004 bne a1,v0,c90 =0A= c80: 2ca20004 sltiu v0,a1,4=0A= adapter->shared.mdix =3D DEFAULT_MDIX;=0A= c84: a2200079 sb zero,121(s1)=0A= MdiX[board] =3D DEFAULT_MDIX;=0A= } else if((MdiX[board] > MAX_MDIX) || (MdiX[board] < MIN_MDIX)) {=0A= c88: 08000336 j cd8 =0A= c8c: ae000000 sw zero,0(s0)=0A= c90: 14400009 bnez v0,cb8 =0A= c94: 00000000 nop=0A= printk("Invalid MDI/MDI-X specified (%i), using default = %i\n",=0A= c98: 3c040000 lui a0,0x0=0A= c9c: 248405d0 addiu a0,a0,1488=0A= ca0: 3c020000 lui v0,0x0=0A= ca4: 24420000 addiu v0,v0,0=0A= ca8: 0040f809 jalr v0=0A= cac: 00003021 move a2,zero=0A= MdiX[board], DEFAULT_MDIX);=0A= adapter->shared.mdix =3D DEFAULT_MDIX;=0A= } else {=0A= cb0: 08000336 j cd8 =0A= cb4: a2200079 sb zero,121(s1)=0A= printk("Using specified MDI/MDI-X of %i\n", MdiX[board]);=0A= cb8: 3c040000 lui a0,0x0=0A= cbc: 24840604 addiu a0,a0,1540=0A= cc0: 3c020000 lui v0,0x0=0A= cc4: 24420000 addiu v0,v0,0=0A= cc8: 0040f809 jalr v0=0A= ccc: 00000000 nop=0A= adapter->shared.mdix =3D MdiX[board];=0A= cd0: 92030003 lbu v1,3(s0)=0A= cd4: a2230079 sb v1,121(s1)=0A= }=0A= =0A= /* Automatic Correction for Reverse Cable Polarity */=0A= =0A= if(DisablePolarityCorrection[board] =3D=3D OPTION_UNSET) {=0A= cd8: 3c100000 lui s0,0x0=0A= cdc: 26100418 addiu s0,s0,1048=0A= ce0: 02128021 addu s0,s0,s2=0A= ce4: 8e050000 lw a1,0(s0)=0A= ce8: 2402ffff li v0,-1=0A= cec: 14a20004 bne a1,v0,d00 =0A= cf0: 2ca20002 sltiu v0,a1,2=0A= adapter->shared.disable_polarity_correction =3D = OPTION_DISABLED;=0A= cf4: ae200054 sw zero,84(s1)=0A= DisablePolarityCorrection[board] =3D OPTION_DISABLED;=0A= } else if((DisablePolarityCorrection[board] !=3D OPTION_ENABLED) = &&=0A= cf8: 08000352 j d48 =0A= cfc: ae000000 sw zero,0(s0)=0A= d00: 14400009 bnez v0,d28 =0A= d04: 00000000 nop=0A= (DisablePolarityCorrection[board] !=3D = OPTION_DISABLED)) {=0A= printk("Invalid polarity correction specified (%i),"=0A= d08: 3c040000 lui a0,0x0=0A= d0c: 24840628 addiu a0,a0,1576=0A= d10: 3c020000 lui v0,0x0=0A= d14: 24420000 addiu v0,v0,0=0A= d18: 0040f809 jalr v0=0A= d1c: 00003021 move a2,zero=0A= " using default %i\n", = DisablePolarityCorrection[board],=0A= OPTION_DISABLED);=0A= adapter->shared.disable_polarity_correction =3D = OPTION_DISABLED;=0A= } else {=0A= d20: 08000352 j d48 =0A= d24: ae200054 sw zero,84(s1)=0A= printk("Using specified polarity correction of %i\n",=0A= d28: 3c040000 lui a0,0x0=0A= d2c: 2484066c addiu a0,a0,1644=0A= d30: 3c020000 lui v0,0x0=0A= d34: 24420000 addiu v0,v0,0=0A= d38: 0040f809 jalr v0=0A= d3c: 00000000 nop=0A= DisablePolarityCorrection[board]);=0A= adapter->shared.disable_polarity_correction =3D=0A= d40: 8e030000 lw v1,0(s0)=0A= d44: ae230054 sw v1,84(s1)=0A= DisablePolarityCorrection[board];=0A= }=0A= }=0A= =0A= /* Speed, Duplex, and AutoNeg */=0A= =0A= switch (adapter->shared.media_type) {=0A= d48: 12600009 beqz s3,d70 =0A= d4c: 24020001 li v0,1=0A= d50: 1662000d bne s3,v0,d88 =0A= d54: 00000000 nop=0A= =0A= case e1000_media_type_fiber:=0A= e1000_check_fiber_options(adapter);=0A= d58: 3c020000 lui v0,0x0=0A= d5c: 24420dbc addiu v0,v0,3516=0A= d60: 0040f809 jalr v0=0A= d64: 02202021 move a0,s1=0A= break;=0A= d68: 08000369 j da4 =0A= d6c: 8fbf0020 lw ra,32(sp)=0A= =0A= case e1000_media_type_copper:=0A= e1000_check_copper_options(adapter);=0A= d70: 3c020000 lui v0,0x0=0A= d74: 24420ecc addiu v0,v0,3788=0A= d78: 0040f809 jalr v0=0A= d7c: 02202021 move a0,s1=0A= break;=0A= d80: 08000369 j da4 =0A= d84: 8fbf0020 lw ra,32(sp)=0A= =0A= default:=0A= printk("Unknown Media Type\n");=0A= d88: 3c040000 lui a0,0x0=0A= d8c: 24840698 addiu a0,a0,1688=0A= d90: 3c020000 lui v0,0x0=0A= d94: 24420000 addiu v0,v0,0=0A= d98: 0040f809 jalr v0=0A= d9c: 00000000 nop=0A= break;=0A= }=0A= =0A= return;=0A= }=0A= da0: 8fbf0020 lw ra,32(sp)=0A= da4: 8fb3001c lw s3,28(sp)=0A= da8: 8fb20018 lw s2,24(sp)=0A= dac: 8fb10014 lw s1,20(sp)=0A= db0: 8fb00010 lw s0,16(sp)=0A= db4: 03e00008 jr ra=0A= db8: 27bd0028 addiu sp,sp,40=0A= =0A= 00000dbc :=0A= dbc: 27bdffd8 addiu sp,sp,-40=0A= dc0: afb40020 sw s4,32(sp)=0A= dc4: afb3001c sw s3,28(sp)=0A= dc8: afb20018 sw s2,24(sp)=0A= dcc: afb10014 sw s1,20(sp)=0A= dd0: afbf0024 sw ra,36(sp)=0A= dd4: afb00010 sw s0,16(sp)=0A= =0A= /**=0A= * e1000_check_fiber_options - Range Checking for Link Options, Fiber = Version=0A= * @adapter: board private structure=0A= *=0A= * Handles speed and duplex options on fiber based adapters=0A= **/=0A= =0A= static void=0A= e1000_check_fiber_options(struct e1000_adapter *adapter)=0A= {=0A= int board =3D=0A= dd8: 8c830090 lw v1,144(a0)=0A= adapter->bd_number > E1000_MAX_NIC ? E1000_MAX_NIC : = adapter->bd_number;=0A= =0A= E1000_DBG("CheckSpeedDuplexFiber\n");=0A= =0A= /* Speed, Duplex, and AutoNeg are not valid on fiber NICs */=0A= =0A= if((Speed[board] !=3D OPTION_UNSET)) {=0A= Speed[board] =3D 0;=0A= printk("Warning: Speed not valid for fiber adapters\n");=0A= ddc: 3c020000 lui v0,0x0=0A= de0: 244206ac addiu v0,v0,1708=0A= de4: 3c120000 lui s2,0x0=0A= de8: 26520000 addiu s2,s2,0=0A= dec: 00402021 move a0,v0=0A= printk("Speed Parameter Ignored\n");=0A= }=0A= if((Duplex[board] !=3D OPTION_UNSET)) {=0A= Duplex[board] =3D 0;=0A= printk("Warning: Duplex not valid for fiber adapters\n");=0A= df0: 02409821 move s3,s2=0A= df4: 2c620009 sltiu v0,v1,9=0A= printk("Duplex Parameter Ignored\n");=0A= }=0A= if((AutoNeg[board] !=3D OPTION_UNSET)) {=0A= AutoNeg[board] =3D AUTONEG_ADV_DEFAULT;=0A= printk("Warning: AutoNeg not valid for fiber adapters\n");=0A= df8: 0260a021 move s4,s3=0A= dfc: 14400002 bnez v0,e08 =0A= e00: 2411ffff li s1,-1=0A= e04: 24030008 li v1,8=0A= e08: 00038080 sll s0,v1,0x2=0A= e0c: 3c030000 lui v1,0x0=0A= e10: 246302f8 addiu v1,v1,760=0A= e14: 00701821 addu v1,v1,s0=0A= e18: 8c620000 lw v0,0(v1)=0A= e1c: 10510007 beq v0,s1,e3c =0A= e20: 00000000 nop=0A= e24: 0240f809 jalr s2=0A= e28: ac600000 sw zero,0(v1)=0A= e2c: 3c040000 lui a0,0x0=0A= e30: 248406dc addiu a0,a0,1756=0A= e34: 0240f809 jalr s2=0A= e38: 00000000 nop=0A= e3c: 3c030000 lui v1,0x0=0A= e40: 2463031c addiu v1,v1,796=0A= e44: 00701821 addu v1,v1,s0=0A= e48: 8c620000 lw v0,0(v1)=0A= e4c: 3c040000 lui a0,0x0=0A= e50: 248406f8 addiu a0,a0,1784=0A= e54: 10510007 beq v0,s1,e74 =0A= e58: 00000000 nop=0A= e5c: 0260f809 jalr s3=0A= e60: ac600000 sw zero,0(v1)=0A= e64: 3c040000 lui a0,0x0=0A= e68: 24840728 addiu a0,a0,1832=0A= e6c: 0260f809 jalr s3=0A= e70: 00000000 nop=0A= e74: 3c030000 lui v1,0x0=0A= e78: 24630340 addiu v1,v1,832=0A= e7c: 00701821 addu v1,v1,s0=0A= e80: 8c620000 lw v0,0(v1)=0A= e84: 3c040000 lui a0,0x0=0A= e88: 24840744 addiu a0,a0,1860=0A= e8c: 10510007 beq v0,s1,eac =0A= e90: 2402002f li v0,47=0A= e94: 0280f809 jalr s4=0A= e98: ac620000 sw v0,0(v1)=0A= printk("AutoNeg Parameter Ignored\n");=0A= e9c: 3c040000 lui a0,0x0=0A= ea0: 24840774 addiu a0,a0,1908=0A= ea4: 0280f809 jalr s4=0A= ea8: 00000000 nop=0A= }=0A= =0A= return;=0A= }=0A= eac: 8fbf0024 lw ra,36(sp)=0A= eb0: 8fb40020 lw s4,32(sp)=0A= eb4: 8fb3001c lw s3,28(sp)=0A= eb8: 8fb20018 lw s2,24(sp)=0A= ebc: 8fb10014 lw s1,20(sp)=0A= ec0: 8fb00010 lw s0,16(sp)=0A= ec4: 03e00008 jr ra=0A= ec8: 27bd0028 addiu sp,sp,40=0A= =0A= 00000ecc :=0A= ecc: 27bdffd0 addiu sp,sp,-48=0A= ed0: afb20018 sw s2,24(sp)=0A= ed4: afbf0028 sw ra,40(sp)=0A= ed8: afb50024 sw s5,36(sp)=0A= edc: afb40020 sw s4,32(sp)=0A= ee0: afb3001c sw s3,28(sp)=0A= ee4: afb10014 sw s1,20(sp)=0A= ee8: afb00010 sw s0,16(sp)=0A= eec: 00809021 move s2,a0=0A= =0A= /**=0A= * e1000_check_copper_options - Range Checking for Link Options, Copper = Version=0A= * @adapter: board private structure=0A= *=0A= * Handles speed and duplex options on copper based adapters=0A= **/=0A= =0A= static void=0A= e1000_check_copper_options(struct e1000_adapter *adapter)=0A= {=0A= int board =3D=0A= ef0: 8e430090 lw v1,144(s2)=0A= ef4: 2c620009 sltiu v0,v1,9=0A= ef8: 50400001 beqzl v0,f00 =0A= efc: 24030008 li v1,8=0A= adapter->bd_number > E1000_MAX_NIC ? E1000_MAX_NIC : = adapter->bd_number;=0A= int speed, duplex;=0A= boolean_t all_default =3D TRUE;=0A= =0A= E1000_DBG("CheckSpeedDuplexCopper\n");=0A= =0A= /* User Specified Auto-negotiation Settings */=0A= =0A= if(AutoNeg[board] =3D=3D OPTION_UNSET) {=0A= f00: 00038880 sll s1,v1,0x2=0A= f04: 3c040000 lui a0,0x0=0A= f08: 24840340 addiu a0,a0,832=0A= f0c: 00912021 addu a0,a0,s1=0A= f10: 8c850000 lw a1,0(a0)=0A= f14: 2402ffff li v0,-1=0A= f18: 14a2000a bne a1,v0,f44 =0A= f1c: 24140001 li s4,1=0A= =0A= adapter->shared.autoneg_advertised =3D AUTONEG_ADV_DEFAULT;=0A= f20: 2402002f li v0,47=0A= AutoNeg[board] =3D AUTONEG_ADV_DEFAULT;=0A= f24: 2403002f li v1,47=0A= f28: a6420048 sh v0,72(s2)=0A= =0A= } else if((Speed[board] !=3D 0 && Speed[board] !=3D OPTION_UNSET) ||=0A= f2c: 3c130000 lui s3,0x0=0A= f30: 267302f8 addiu s3,s3,760=0A= f34: 3c150000 lui s5,0x0=0A= f38: 26b5031c addiu s5,s5,796=0A= f3c: 08000463 j 118c =0A= f40: ac830000 sw v1,0(a0)=0A= f44: 3c020000 lui v0,0x0=0A= f48: 00511021 addu v0,v0,s1=0A= f4c: 8c4202f8 lw v0,760(v0)=0A= f50: 3c130000 lui s3,0x0=0A= f54: 267302f8 addiu s3,s3,760=0A= f58: 24420001 addiu v0,v0,1=0A= f5c: 2c420002 sltiu v0,v0,2=0A= f60: 1040000c beqz v0,f94 =0A= f64: 00000000 nop=0A= f68: 3c020000 lui v0,0x0=0A= f6c: 00511021 addu v0,v0,s1=0A= f70: 8c42031c lw v0,796(v0)=0A= f74: 3c150000 lui s5,0x0=0A= f78: 26b5031c addiu s5,s5,796=0A= f7c: 24420001 addiu v0,v0,1=0A= f80: 2c420002 sltiu v0,v0,2=0A= f84: 14400012 bnez v0,fd0 =0A= f88: 2402ffd0 li v0,-48=0A= f8c: 080003e7 j f9c =0A= f90: 00000000 nop=0A= f94: 3c150000 lui s5,0x0=0A= f98: 26b5031c addiu s5,s5,796=0A= (Duplex[board] !=3D 0 && Duplex[board] !=3D OPTION_UNSET)) = {=0A= =0A= printk("Warning: AutoNeg specified along with Speed or = Duplex\n");=0A= f9c: 3c040000 lui a0,0x0=0A= fa0: 24840790 addiu a0,a0,1936=0A= fa4: 3c100000 lui s0,0x0=0A= fa8: 26100000 addiu s0,s0,0=0A= fac: 0200f809 jalr s0=0A= fb0: 00000000 nop=0A= printk("AutoNeg Parameter Ignored\n");=0A= fb4: 3c040000 lui a0,0x0=0A= fb8: 24840774 addiu a0,a0,1908=0A= fbc: 0200f809 jalr s0=0A= fc0: 00000000 nop=0A= =0A= adapter->shared.autoneg_advertised =3D AUTONEG_ADV_DEFAULT;=0A= fc4: 2403002f li v1,47=0A= =0A= } else {=0A= fc8: 08000463 j 118c =0A= fcc: a6430048 sh v1,72(s2)=0A= =0A= if(AutoNeg[board] & ~AUTONEG_ADV_MASK) {=0A= fd0: 00a21024 and v0,a1,v0=0A= fd4: 5040000a beqzl v0,1000 =0A= fd8: 94820002 lhu v0,2(a0)=0A= =0A= printk("Invalid AutoNeg Specified (0x%X), Parameter = Ignored\n",=0A= fdc: 3c040000 lui a0,0x0=0A= fe0: 248407c8 addiu a0,a0,1992=0A= fe4: 3c100000 lui s0,0x0=0A= fe8: 26100000 addiu s0,s0,0=0A= fec: 0200f809 jalr s0=0A= ff0: 00000000 nop=0A= AutoNeg[board]);=0A= =0A= adapter->shared.autoneg_advertised =3D AUTONEG_ADV_DEFAULT;=0A= ff4: 2403002f li v1,47=0A= =0A= } else {=0A= ff8: 08000403 j 100c =0A= ffc: a6430048 sh v1,72(s2)=0A= =0A= adapter->shared.autoneg_advertised =3D AutoNeg[board];=0A= 1000: 3c100000 lui s0,0x0=0A= 1004: 26100000 addiu s0,s0,0=0A= 1008: a6420048 sh v0,72(s2)=0A= }=0A= =0A= printk("AutoNeg Advertising ");=0A= 100c: 3c040000 lui a0,0x0=0A= 1010: 24840800 addiu a0,a0,2048=0A= 1014: 0200f809 jalr s0=0A= 1018: 00000000 nop=0A= if(adapter->shared.autoneg_advertised & ADVERTISE_1000_FULL) {=0A= 101c: 96430048 lhu v1,72(s2)=0A= 1020: 30620020 andi v0,v1,0x20=0A= 1024: 5040000f beqzl v0,1064 =0A= 1028: 30620010 andi v0,v1,0x10=0A= printk("1000/FD");=0A= 102c: 3c040000 lui a0,0x0=0A= 1030: 24840818 addiu a0,a0,2072=0A= 1034: 0200f809 jalr s0=0A= 1038: 00000000 nop=0A= if(adapter->shared.autoneg_advertised & (ADVERTISE_1000_FULL = - 1))=0A= 103c: 96430048 lhu v1,72(s2)=0A= 1040: 3062001f andi v0,v1,0x1f=0A= 1044: 50400007 beqzl v0,1064 =0A= 1048: 30620010 andi v0,v1,0x10=0A= printk(", ");=0A= 104c: 3c040000 lui a0,0x0=0A= 1050: 24840820 addiu a0,a0,2080=0A= 1054: 0200f809 jalr s0=0A= 1058: 00000000 nop=0A= 105c: 96430048 lhu v1,72(s2)=0A= }=0A= if(adapter->shared.autoneg_advertised & ADVERTISE_1000_HALF) {=0A= 1060: 30620010 andi v0,v1,0x10=0A= 1064: 5040000f beqzl v0,10a4 =0A= 1068: 30620008 andi v0,v1,0x8=0A= printk("1000/HD");=0A= 106c: 3c040000 lui a0,0x0=0A= 1070: 24840824 addiu a0,a0,2084=0A= 1074: 0200f809 jalr s0=0A= 1078: 00000000 nop=0A= if(adapter->shared.autoneg_advertised & (ADVERTISE_1000_HALF = - 1))=0A= 107c: 96430048 lhu v1,72(s2)=0A= 1080: 3062000f andi v0,v1,0xf=0A= 1084: 50400007 beqzl v0,10a4 =0A= 1088: 30620008 andi v0,v1,0x8=0A= printk(", ");=0A= 108c: 3c040000 lui a0,0x0=0A= 1090: 24840820 addiu a0,a0,2080=0A= 1094: 0200f809 jalr s0=0A= 1098: 00000000 nop=0A= 109c: 96430048 lhu v1,72(s2)=0A= }=0A= if(adapter->shared.autoneg_advertised & ADVERTISE_100_FULL) {=0A= 10a0: 30620008 andi v0,v1,0x8=0A= 10a4: 5040000f beqzl v0,10e4 =0A= 10a8: 30620004 andi v0,v1,0x4=0A= printk("100/FD");=0A= 10ac: 3c040000 lui a0,0x0=0A= 10b0: 2484082c addiu a0,a0,2092=0A= 10b4: 0200f809 jalr s0=0A= 10b8: 00000000 nop=0A= if(adapter->shared.autoneg_advertised & (ADVERTISE_100_FULL = - 1))=0A= 10bc: 96430048 lhu v1,72(s2)=0A= 10c0: 30620007 andi v0,v1,0x7=0A= 10c4: 50400007 beqzl v0,10e4 =0A= 10c8: 30620004 andi v0,v1,0x4=0A= printk(", ");=0A= 10cc: 3c040000 lui a0,0x0=0A= 10d0: 24840820 addiu a0,a0,2080=0A= 10d4: 0200f809 jalr s0=0A= 10d8: 00000000 nop=0A= 10dc: 96430048 lhu v1,72(s2)=0A= }=0A= if(adapter->shared.autoneg_advertised & ADVERTISE_100_HALF) {=0A= 10e0: 30620004 andi v0,v1,0x4=0A= 10e4: 5040000f beqzl v0,1124 =0A= 10e8: 30620002 andi v0,v1,0x2=0A= printk("100/HD");=0A= 10ec: 3c040000 lui a0,0x0=0A= 10f0: 24840834 addiu a0,a0,2100=0A= 10f4: 0200f809 jalr s0=0A= 10f8: 00000000 nop=0A= if(adapter->shared.autoneg_advertised & (ADVERTISE_100_HALF = - 1))=0A= 10fc: 96430048 lhu v1,72(s2)=0A= 1100: 30620003 andi v0,v1,0x3=0A= 1104: 50400007 beqzl v0,1124 =0A= 1108: 30620002 andi v0,v1,0x2=0A= printk(", ");=0A= 110c: 3c040000 lui a0,0x0=0A= 1110: 24840820 addiu a0,a0,2080=0A= 1114: 0200f809 jalr s0=0A= 1118: 00000000 nop=0A= 111c: 96430048 lhu v1,72(s2)=0A= }=0A= if(adapter->shared.autoneg_advertised & ADVERTISE_10_FULL) {=0A= 1120: 30620002 andi v0,v1,0x2=0A= 1124: 5040000f beqzl v0,1164 =0A= 1128: 30620001 andi v0,v1,0x1=0A= printk("10/FD");=0A= 112c: 3c040000 lui a0,0x0=0A= 1130: 2484083c addiu a0,a0,2108=0A= 1134: 0200f809 jalr s0=0A= 1138: 00000000 nop=0A= if(adapter->shared.autoneg_advertised & (ADVERTISE_10_FULL - = 1))=0A= 113c: 96430048 lhu v1,72(s2)=0A= 1140: 30630001 andi v1,v1,0x1=0A= 1144: 1060000d beqz v1,117c =0A= 1148: 00000000 nop=0A= printk(", ");=0A= 114c: 3c040000 lui a0,0x0=0A= 1150: 24840820 addiu a0,a0,2080=0A= 1154: 0200f809 jalr s0=0A= 1158: 00000000 nop=0A= 115c: 96430048 lhu v1,72(s2)=0A= }=0A= if(adapter->shared.autoneg_advertised & ADVERTISE_10_HALF)=0A= 1160: 30620001 andi v0,v1,0x1=0A= 1164: 10400005 beqz v0,117c =0A= 1168: 00000000 nop=0A= printk("10/HD");=0A= 116c: 3c040000 lui a0,0x0=0A= 1170: 24840844 addiu a0,a0,2116=0A= 1174: 0200f809 jalr s0=0A= 1178: 00000000 nop=0A= printk("\n");=0A= 117c: 3c040000 lui a0,0x0=0A= 1180: 2484084c addiu a0,a0,2124=0A= 1184: 0200f809 jalr s0=0A= 1188: 00000000 nop=0A= }=0A= =0A= /* Forced Speed and Duplex */=0A= =0A= switch (Speed[board]) {=0A= 118c: 02331021 addu v0,s1,s3=0A= 1190: 8c440000 lw a0,0(v0)=0A= 1194: 2403000a li v1,10=0A= 1198: 10830019 beq a0,v1,1200 =0A= 119c: 2882000b slti v0,a0,11=0A= 11a0: 10400008 beqz v0,11c4 =0A= 11a4: 24020064 li v0,100=0A= 11a8: 2402ffff li v0,-1=0A= 11ac: 10820011 beq a0,v0,11f4 =0A= 11b0: 02331021 addu v0,s1,s3=0A= 11b4: 50800014 beqzl a0,1208 =0A= 11b8: 8c500000 lw s0,0(v0)=0A= 11bc: 08000476 j 11d8 =0A= 11c0: 8c450000 lw a1,0(v0)=0A= 11c4: 1082000e beq a0,v0,1200 =0A= 11c8: 240203e8 li v0,1000=0A= 11cc: 1082000c beq a0,v0,1200 =0A= 11d0: 02331021 addu v0,s1,s3=0A= default:=0A= printk("Invalid Speed Specified (%i), Parameter Ignored\n",=0A= 11d4: 8c450000 lw a1,0(v0)=0A= 11d8: 3c040000 lui a0,0x0=0A= 11dc: 24840850 addiu a0,a0,2128=0A= 11e0: 3c020000 lui v0,0x0=0A= 11e4: 24420000 addiu v0,v0,0=0A= 11e8: 0040f809 jalr v0=0A= 11ec: 0000a021 move s4,zero=0A= Speed[board]);=0A= all_default =3D FALSE;=0A= case OPTION_UNSET:=0A= speed =3D 0;=0A= Speed[board] =3D 0;=0A= 11f0: 02331021 addu v0,s1,s3=0A= 11f4: ac400000 sw zero,0(v0)=0A= break;=0A= 11f8: 08000483 j 120c =0A= 11fc: 00008021 move s0,zero=0A= case 0:=0A= case 10:=0A= case 100:=0A= case 1000:=0A= speed =3D Speed[board];=0A= 1200: 02331021 addu v0,s1,s3=0A= 1204: 8c500000 lw s0,0(v0)=0A= all_default =3D FALSE;=0A= 1208: 0000a021 move s4,zero=0A= break;=0A= }=0A= =0A= switch (Duplex[board]) {=0A= 120c: 02351021 addu v0,s1,s5=0A= 1210: 8c450000 lw a1,0(v0)=0A= 1214: 2403ffff li v1,-1=0A= 1218: 10a3000b beq a1,v1,1248 =0A= 121c: 28a2ffff slti v0,a1,-1=0A= 1220: 14400003 bnez v0,1230 =0A= 1224: 28a20003 slti v0,a1,3=0A= 1228: 5440000a bnezl v0,1254 =0A= 122c: 0000a021 move s4,zero=0A= default:=0A= printk("Invalid Duplex Specified (%i), Parameter Ignored\n",=0A= 1230: 3c040000 lui a0,0x0=0A= 1234: 24840884 addiu a0,a0,2180=0A= 1238: 3c020000 lui v0,0x0=0A= 123c: 24420000 addiu v0,v0,0=0A= 1240: 0040f809 jalr v0=0A= 1244: 0000a021 move s4,zero=0A= Duplex[board]);=0A= all_default =3D FALSE;=0A= case OPTION_UNSET:=0A= duplex =3D 0;=0A= Duplex[board] =3D 0;=0A= 1248: 02351021 addu v0,s1,s5=0A= 124c: ac400000 sw zero,0(v0)=0A= break;=0A= 1250: 00002821 move a1,zero=0A= case 0:=0A= case 1:=0A= case 2:=0A= duplex =3D Duplex[board];=0A= all_default =3D FALSE;=0A= break;=0A= }=0A= =0A= switch (speed + duplex) {=0A= 1254: 02058821 addu s1,s0,a1=0A= 1258: 2413000c li s3,12=0A= 125c: 12330069 beq s1,s3,1404 =0A= 1260: 2a22000d slti v0,s1,13=0A= 1264: 10400012 beqz v0,12b0 =0A= 1268: 24020066 li v0,102=0A= 126c: 24020002 li v0,2=0A= 1270: 12220040 beq s1,v0,1374 =0A= 1274: 2a220003 slti v0,s1,3=0A= 1278: 10400007 beqz v0,1298 =0A= 127c: 2402000a li v0,10=0A= 1280: 12200023 beqz s1,1310 =0A= 1284: 24020001 li v0,1=0A= 1288: 1222002c beq s1,v0,133c =0A= 128c: 00000000 nop=0A= 1290: 0800054d j 1534 =0A= 1294: 00000000 nop=0A= 1298: 12220043 beq s1,v0,13a8 =0A= 129c: 2402000b li v0,11=0A= 12a0: 1222004e beq s1,v0,13dc =0A= 12a4: 00000000 nop=0A= 12a8: 0800054d j 1534 =0A= 12ac: 00000000 nop=0A= 12b0: 12220072 beq s1,v0,147c =0A= 12b4: 2a220067 slti v0,s1,103=0A= 12b8: 10400008 beqz v0,12dc =0A= 12bc: 240203e9 li v0,1001=0A= 12c0: 24020064 li v0,100=0A= 12c4: 12220057 beq s1,v0,1424 =0A= 12c8: 24020065 li v0,101=0A= 12cc: 12220063 beq s1,v0,145c =0A= 12d0: 00000000 nop=0A= 12d4: 0800054d j 1534 =0A= 12d8: 00000000 nop=0A= 12dc: 1222007e beq s1,v0,14d8 =0A= 12e0: 2a2203ea slti v0,s1,1002=0A= 12e4: 10400006 beqz v0,1300 =0A= 12e8: 240203ea li v0,1002=0A= 12ec: 240203e8 li v0,1000=0A= 12f0: 1222006d beq s1,v0,14a8 =0A= 12f4: 00000000 nop=0A= 12f8: 0800054d j 1534 =0A= 12fc: 00000000 nop=0A= 1300: 12220081 beq s1,v0,1508 =0A= 1304: 00000000 nop=0A= 1308: 0800054d j 1534 =0A= 130c: 00000000 nop=0A= case 0:=0A= if(all_default =3D=3D FALSE)=0A= 1310: 16800008 bnez s4,1334 =0A= 1314: 24020001 li v0,1=0A= printk("Speed and Duplex Auto-negotiation Enabled\n");=0A= 1318: 3c040000 lui a0,0x0=0A= 131c: 248408b8 addiu a0,a0,2232=0A= 1320: 3c020000 lui v0,0x0=0A= 1324: 24420000 addiu v0,v0,0=0A= 1328: 0040f809 jalr v0=0A= 132c: 00000000 nop=0A= adapter->shared.autoneg =3D 1;=0A= 1330: 24020001 li v0,1=0A= break;=0A= 1334: 08000553 j 154c =0A= 1338: a2420078 sb v0,120(s2)=0A= case 1:=0A= printk("Warning: Half Duplex specified without Speed\n");=0A= 133c: 3c040000 lui a0,0x0=0A= 1340: 248408e4 addiu a0,a0,2276=0A= 1344: 3c100000 lui s0,0x0=0A= 1348: 26100000 addiu s0,s0,0=0A= 134c: 0200f809 jalr s0=0A= 1350: 00000000 nop=0A= printk("Using Auto-negotiation at Half Duplex only\n");=0A= 1354: 3c040000 lui a0,0x0=0A= 1358: 24840914 addiu a0,a0,2324=0A= 135c: 0200f809 jalr s0=0A= 1360: 00000000 nop=0A= adapter->shared.autoneg =3D 1;=0A= adapter->shared.autoneg_advertised =3D=0A= 1364: 24030005 li v1,5=0A= 1368: a2510078 sb s1,120(s2)=0A= ADVERTISE_10_HALF | ADVERTISE_100_HALF;=0A= break;=0A= 136c: 08000553 j 154c =0A= 1370: a6430048 sh v1,72(s2)=0A= case 2:=0A= printk("Warning: Full Duplex specified without Speed\n");=0A= 1374: 3c040000 lui a0,0x0=0A= 1378: 24840940 addiu a0,a0,2368=0A= 137c: 3c100000 lui s0,0x0=0A= 1380: 26100000 addiu s0,s0,0=0A= 1384: 0200f809 jalr s0=0A= 1388: 00000000 nop=0A= printk("Using Auto-negotiation at Full Duplex only\n");=0A= 138c: 3c040000 lui a0,0x0=0A= 1390: 24840970 addiu a0,a0,2416=0A= 1394: 0200f809 jalr s0=0A= 1398: 00000000 nop=0A= adapter->shared.autoneg =3D 1;=0A= 139c: 24030001 li v1,1=0A= adapter->shared.autoneg_advertised =3D=0A= ADVERTISE_10_FULL | ADVERTISE_100_FULL | ADVERTISE_1000_FULL;=0A= break;=0A= 13a0: 0800054a j 1528 =0A= 13a4: 2402002a li v0,42=0A= case 10:=0A= printk("Warning: 10 Mbps Speed specified without Duplex\n");=0A= 13a8: 3c040000 lui a0,0x0=0A= 13ac: 2484099c addiu a0,a0,2460=0A= 13b0: 3c100000 lui s0,0x0=0A= 13b4: 26100000 addiu s0,s0,0=0A= 13b8: 0200f809 jalr s0=0A= 13bc: 00000000 nop=0A= printk("Using Auto-negotiation at 10 Mbps only\n");=0A= 13c0: 3c040000 lui a0,0x0=0A= 13c4: 248409d0 addiu a0,a0,2512=0A= 13c8: 0200f809 jalr s0=0A= 13cc: 00000000 nop=0A= adapter->shared.autoneg =3D 1;=0A= 13d0: 24030001 li v1,1=0A= adapter->shared.autoneg_advertised =3D=0A= ADVERTISE_10_HALF | ADVERTISE_10_FULL;=0A= break;=0A= 13d4: 0800054a j 1528 =0A= 13d8: 24020003 li v0,3=0A= case 11:=0A= printk("Forcing to 10 Mbps Half Duplex\n");=0A= 13dc: 3c040000 lui a0,0x0=0A= 13e0: 248409f8 addiu a0,a0,2552=0A= 13e4: 3c020000 lui v0,0x0=0A= 13e8: 24420000 addiu v0,v0,0=0A= 13ec: 0040f809 jalr v0=0A= 13f0: 00000000 nop=0A= adapter->shared.autoneg =3D 0;=0A= 13f4: a2400078 sb zero,120(s2)=0A= adapter->shared.forced_speed_duplex =3D e1000_10_half;=0A= 13f8: a240007a sb zero,122(s2)=0A= adapter->shared.autoneg_advertised =3D 0;=0A= break;=0A= 13fc: 08000553 j 154c =0A= 1400: a6400048 sh zero,72(s2)=0A= case 12:=0A= printk("Forcing to 10 Mbps Full Duplex\n");=0A= 1404: 3c040000 lui a0,0x0=0A= 1408: 24840a18 addiu a0,a0,2584=0A= 140c: 3c020000 lui v0,0x0=0A= 1410: 24420000 addiu v0,v0,0=0A= 1414: 0040f809 jalr v0=0A= 1418: 00000000 nop=0A= adapter->shared.autoneg =3D 0;=0A= adapter->shared.forced_speed_duplex =3D e1000_10_full;=0A= adapter->shared.autoneg_advertised =3D 0;=0A= break;=0A= 141c: 08000526 j 1498 =0A= 1420: 24030001 li v1,1=0A= case 100:=0A= printk("Warning: 100 Mbps Speed specified without Duplex\n");=0A= 1424: 3c040000 lui a0,0x0=0A= 1428: 24840a38 addiu a0,a0,2616=0A= 142c: 3c100000 lui s0,0x0=0A= 1430: 26100000 addiu s0,s0,0=0A= 1434: 0200f809 jalr s0=0A= 1438: 00000000 nop=0A= printk("Using Auto-negotiation at 100 Mbps only\n");=0A= 143c: 3c040000 lui a0,0x0=0A= 1440: 24840a6c addiu a0,a0,2668=0A= 1444: 0200f809 jalr s0=0A= 1448: 00000000 nop=0A= adapter->shared.autoneg =3D 1;=0A= 144c: 24030001 li v1,1=0A= 1450: a2430078 sb v1,120(s2)=0A= adapter->shared.autoneg_advertised =3D=0A= ADVERTISE_100_HALF | ADVERTISE_100_FULL;=0A= break;=0A= 1454: 08000553 j 154c =0A= 1458: a6530048 sh s3,72(s2)=0A= case 101:=0A= printk("Forcing to 100 Mbps Half Duplex\n");=0A= 145c: 3c040000 lui a0,0x0=0A= 1460: 24840a98 addiu a0,a0,2712=0A= 1464: 3c020000 lui v0,0x0=0A= 1468: 24420000 addiu v0,v0,0=0A= 146c: 0040f809 jalr v0=0A= 1470: 00000000 nop=0A= adapter->shared.autoneg =3D 0;=0A= adapter->shared.forced_speed_duplex =3D e1000_100_half;=0A= adapter->shared.autoneg_advertised =3D 0;=0A= break;=0A= 1474: 08000526 j 1498 =0A= 1478: 24030002 li v1,2=0A= case 102:=0A= printk("Forcing to 100 Mbps Full Duplex\n");=0A= 147c: 3c040000 lui a0,0x0=0A= 1480: 24840abc addiu a0,a0,2748=0A= 1484: 3c020000 lui v0,0x0=0A= 1488: 24420000 addiu v0,v0,0=0A= 148c: 0040f809 jalr v0=0A= 1490: 00000000 nop=0A= adapter->shared.autoneg =3D 0;=0A= adapter->shared.forced_speed_duplex =3D e1000_100_full;=0A= 1494: 24030003 li v1,3=0A= 1498: a243007a sb v1,122(s2)=0A= 149c: a2400078 sb zero,120(s2)=0A= adapter->shared.autoneg_advertised =3D 0;=0A= break;=0A= 14a0: 08000553 j 154c =0A= 14a4: a6400048 sh zero,72(s2)=0A= case 1000:=0A= printk("Warning: 1000 Mbps Speed specified without Duplex\n");=0A= 14a8: 3c040000 lui a0,0x0=0A= 14ac: 24840ae0 addiu a0,a0,2784=0A= 14b0: 3c100000 lui s0,0x0=0A= 14b4: 26100000 addiu s0,s0,0=0A= 14b8: 0200f809 jalr s0=0A= 14bc: 00000000 nop=0A= printk("Using Auto-negotiation at 1000 Mbps Full Duplex only\n");=0A= 14c0: 3c040000 lui a0,0x0=0A= 14c4: 24840b14 addiu a0,a0,2836=0A= 14c8: 0200f809 jalr s0=0A= 14cc: 00000000 nop=0A= adapter->shared.autoneg =3D 1;=0A= adapter->shared.autoneg_advertised =3D ADVERTISE_1000_FULL;=0A= break;=0A= 14d0: 08000549 j 1524 =0A= 14d4: 24030001 li v1,1=0A= case 1001:=0A= printk("Warning: Half Duplex is not supported at 1000 Mbps\n");=0A= 14d8: 3c040000 lui a0,0x0=0A= 14dc: 24840b4c addiu a0,a0,2892=0A= 14e0: 3c100000 lui s0,0x0=0A= 14e4: 26100000 addiu s0,s0,0=0A= 14e8: 0200f809 jalr s0=0A= 14ec: 00000000 nop=0A= printk("Using Auto-negotiation at 1000 Mbps Full Duplex only\n");=0A= 14f0: 3c040000 lui a0,0x0=0A= 14f4: 24840b14 addiu a0,a0,2836=0A= 14f8: 0200f809 jalr s0=0A= 14fc: 00000000 nop=0A= adapter->shared.autoneg =3D 1;=0A= adapter->shared.autoneg_advertised =3D ADVERTISE_1000_FULL;=0A= break;=0A= 1500: 08000549 j 1524 =0A= 1504: 24030001 li v1,1=0A= case 1002:=0A= printk("Using Auto-negotiation at 1000 Mbps Full Duplex only\n");=0A= 1508: 3c040000 lui a0,0x0=0A= 150c: 24840b14 addiu a0,a0,2836=0A= 1510: 3c020000 lui v0,0x0=0A= 1514: 24420000 addiu v0,v0,0=0A= 1518: 0040f809 jalr v0=0A= 151c: 00000000 nop=0A= adapter->shared.autoneg =3D 1;=0A= 1520: 24030001 li v1,1=0A= adapter->shared.autoneg_advertised =3D ADVERTISE_1000_FULL;=0A= 1524: 24020020 li v0,32=0A= 1528: a2430078 sb v1,120(s2)=0A= break;=0A= 152c: 08000553 j 154c =0A= 1530: a6420048 sh v0,72(s2)=0A= default:=0A= panic("something is wrong in e1000_check_copper_options");=0A= 1534: 3c040000 lui a0,0x0=0A= 1538: 24840b80 addiu a0,a0,2944=0A= 153c: 3c020000 lui v0,0x0=0A= 1540: 24420000 addiu v0,v0,0=0A= 1544: 0040f809 jalr v0=0A= 1548: 00000000 nop=0A= }=0A= =0A= /* Speed, AutoNeg and MDI/MDI-X */=0A= if (!e1000_validate_mdi_setting(&(adapter->shared))) {=0A= 154c: 3c020000 lui v0,0x0=0A= 1550: 24420000 addiu v0,v0,0=0A= 1554: 0040f809 jalr v0=0A= 1558: 26440008 addiu a0,s2,8=0A= 155c: 14400008 bnez v0,1580 =0A= 1560: 8fbf0028 lw ra,40(sp)=0A= printk ("Speed, AutoNeg and MDI-X specifications are = incompatible."=0A= 1564: 3c040000 lui a0,0x0=0A= 1568: 24840bb4 addiu a0,a0,2996=0A= 156c: 3c020000 lui v0,0x0=0A= 1570: 24420000 addiu v0,v0,0=0A= 1574: 0040f809 jalr v0=0A= 1578: 00000000 nop=0A= " Setting MDI-X to a compatible value.\n");=0A= }=0A= =0A= return;=0A= }=0A= 157c: 8fbf0028 lw ra,40(sp)=0A= 1580: 8fb50024 lw s5,36(sp)=0A= 1584: 8fb40020 lw s4,32(sp)=0A= 1588: 8fb3001c lw s3,28(sp)=0A= 158c: 8fb20018 lw s2,24(sp)=0A= 1590: 8fb10014 lw s1,20(sp)=0A= 1594: 8fb00010 lw s0,16(sp)=0A= 1598: 03e00008 jr ra=0A= 159c: 27bd0030 addiu sp,sp,48=0A= =0A= 000015a0 :=0A= 15a0: 27bdffd8 addiu sp,sp,-40=0A= 15a4: afb20018 sw s2,24(sp)=0A= 15a8: afb10014 sw s1,20(sp)=0A= 15ac: 00809021 move s2,a0=0A= 15b0: afbf0020 sw ra,32(sp)=0A= 15b4: afb3001c sw s3,28(sp)=0A= 15b8: afb00010 sw s0,16(sp)=0A= =0A= /**=0A= * e1000_sw_init - Initialize general software structures (struct = e1000_adapter)=0A= * @adapter: board private structure to initialize=0A= *=0A= * Returns 0 on success, negative on failure=0A= *=0A= * e1000_sw_init initializes the Adapter private data structure.=0A= * Fields are initialized based on PCI device information and=0A= * OS network device settings (MTU size).=0A= **/=0A= =0A= static int=0A= e1000_sw_init(struct e1000_adapter *adapter)=0A= {=0A= struct net_device *netdev =3D adapter->netdev;=0A= struct pci_dev *pdev =3D adapter->pdev;=0A= 15bc: 8e50014c lw s0,332(s2)=0A= uint32_t status;=0A= =0A= E1000_DBG("e1000_sw_init\n");=0A= =0A= /* PCI config space info */=0A= =0A= pci_read_config_word(pdev, PCI_VENDOR_ID, &adapter->vendor_id);=0A= 15c0: 3c110000 lui s1,0x0=0A= 15c4: 26310000 addiu s1,s1,0=0A= 15c8: 264600bc addiu a2,s2,188=0A= 15cc: 02002021 move a0,s0=0A= 15d0: 00002821 move a1,zero=0A= 15d4: 0220f809 jalr s1=0A= 15d8: 8e530148 lw s3,328(s2)=0A= pci_read_config_word(pdev, PCI_DEVICE_ID, &adapter->device_id);=0A= 15dc: 264600be addiu a2,s2,190=0A= 15e0: 02002021 move a0,s0=0A= 15e4: 0220f809 jalr s1=0A= 15e8: 24050002 li a1,2=0A= pci_read_config_byte(pdev, PCI_REVISION_ID, &adapter->rev_id);=0A= 15ec: 264600c0 addiu a2,s2,192=0A= 15f0: 02002021 move a0,s0=0A= 15f4: 3c020000 lui v0,0x0=0A= 15f8: 24420000 addiu v0,v0,0=0A= 15fc: 0040f809 jalr v0=0A= 1600: 24050008 li a1,8=0A= pci_read_config_word(pdev, PCI_SUBSYSTEM_VENDOR_ID, = &adapter->subven_id);=0A= 1604: 264600c2 addiu a2,s2,194=0A= 1608: 02002021 move a0,s0=0A= 160c: 0220f809 jalr s1=0A= 1610: 2405002c li a1,44=0A= pci_read_config_word(pdev, PCI_SUBSYSTEM_ID, &adapter->subsys_id);=0A= 1614: 264600c4 addiu a2,s2,196=0A= 1618: 02002021 move a0,s0=0A= 161c: 0220f809 jalr s1=0A= 1620: 2405002e li a1,46=0A= pci_read_config_word(pdev, PCI_COMMAND, = &adapter->shared.pci_cmd_word);=0A= 1624: 2646004a addiu a2,s2,74=0A= 1628: 02002021 move a0,s0=0A= 162c: 0220f809 jalr s1=0A= 1630: 24050004 li a1,4=0A= =0A= /* Initial Receive Buffer Length */=0A= =0A= if((netdev->mtu + ENET_HEADER_SIZE + CRC_LENGTH) < = E1000_RXBUFFER_2048)=0A= 1634: 8e63005c lw v1,92(s3)=0A= 1638: 24630012 addiu v1,v1,18=0A= 163c: 2c620800 sltiu v0,v1,2048=0A= 1640: 50400003 beqzl v0,1650 =0A= 1644: 2c621000 sltiu v0,v1,4096=0A= adapter->rx_buffer_len =3D E1000_RXBUFFER_2048;=0A= 1648: 0800059b j 166c =0A= 164c: 24020800 li v0,2048=0A= else if((netdev->mtu + ENET_HEADER_SIZE + CRC_LENGTH) < = E1000_RXBUFFER_4096)=0A= 1650: 50400003 beqzl v0,1660 =0A= 1654: 2c622000 sltiu v0,v1,8192=0A= adapter->rx_buffer_len =3D E1000_RXBUFFER_4096;=0A= 1658: 0800059b j 166c =0A= 165c: 24021000 li v0,4096=0A= else if((netdev->mtu + ENET_HEADER_SIZE + CRC_LENGTH) < = E1000_RXBUFFER_8192)=0A= 1660: 50400002 beqzl v0,166c =0A= 1664: 24024000 li v0,16384=0A= adapter->rx_buffer_len =3D E1000_RXBUFFER_8192;=0A= 1668: 24022000 li v0,8192=0A= else=0A= adapter->rx_buffer_len =3D E1000_RXBUFFER_16384;=0A= 166c: ae4200b8 sw v0,184(s2)=0A= =0A= adapter->shared.max_frame_size =3D=0A= netdev->mtu + ENET_HEADER_SIZE + CRC_LENGTH;=0A= =0A= /* MAC and Phy settings */=0A= =0A= switch (adapter->device_id) {=0A= 1670: 964200be lhu v0,190(s2)=0A= 1674: 8e63005c lw v1,92(s3)=0A= 1678: 2444f000 addiu a0,v0,-4096=0A= 167c: 24630012 addiu v1,v1,18=0A= 1680: 2c82000e sltiu v0,a0,14=0A= 1684: 1040001f beqz v0,1704 =0A= 1688: ae43003c sw v1,60(s2)=0A= 168c: 00041080 sll v0,a0,0x2=0A= 1690: 3c030000 lui v1,0x0=0A= 1694: 00621821 addu v1,v1,v0=0A= 1698: 8c630c70 lw v1,3184(v1)=0A= 169c: 00600008 jr v1=0A= 16a0: 00000000 nop=0A= case E1000_DEV_ID_82542:=0A= switch (adapter->rev_id) {=0A= 16a4: 924300c0 lbu v1,192(s2)=0A= 16a8: 24020002 li v0,2=0A= 16ac: 1062000b beq v1,v0,16dc =0A= 16b0: 24020003 li v0,3=0A= 16b4: 1062000b beq v1,v0,16e4 =0A= 16b8: 24020001 li v0,1=0A= case E1000_82542_2_0_REV_ID:=0A= adapter->shared.mac_type =3D e1000_82542_rev2_0;=0A= break;=0A= case E1000_82542_2_1_REV_ID:=0A= adapter->shared.mac_type =3D e1000_82542_rev2_1;=0A= break;=0A= default:=0A= adapter->shared.mac_type =3D e1000_82542_rev2_0;=0A= E1000_ERR("Could not identify 82542 revision\n");=0A= 16bc: 3c040000 lui a0,0x0=0A= 16c0: 24840c14 addiu a0,a0,3092=0A= 16c4: 3c020000 lui v0,0x0=0A= 16c8: 24420000 addiu v0,v0,0=0A= 16cc: 0040f809 jalr v0=0A= 16d0: ae40000c sw zero,12(s2)=0A= }=0A= break;=0A= 16d4: 080005ca j 1728 =0A= 16d8: 8e42000c lw v0,12(s2)=0A= 16dc: 080005c9 j 1724 =0A= 16e0: ae40000c sw zero,12(s2)=0A= 16e4: 080005c9 j 1724 =0A= 16e8: ae42000c sw v0,12(s2)=0A= case E1000_DEV_ID_82543GC_FIBER:=0A= case E1000_DEV_ID_82543GC_COPPER:=0A= adapter->shared.mac_type =3D e1000_82543;=0A= 16ec: 24020002 li v0,2=0A= break;=0A= 16f0: 080005c9 j 1724 =0A= 16f4: ae42000c sw v0,12(s2)=0A= case E1000_DEV_ID_82544EI_COPPER:=0A= case E1000_DEV_ID_82544EI_FIBER:=0A= case E1000_DEV_ID_82544GC_COPPER:=0A= case E1000_DEV_ID_82544GC_LOM:=0A= adapter->shared.mac_type =3D e1000_82544;=0A= 16f8: 24020003 li v0,3=0A= break;=0A= 16fc: 080005c9 j 1724 =0A= 1700: ae42000c sw v0,12(s2)=0A= default:=0A= E1000_ERR("Could not identify hardware\n");=0A= 1704: 3c040000 lui a0,0x0=0A= 1708: 24840c44 addiu a0,a0,3140=0A= 170c: 3c020000 lui v0,0x0=0A= 1710: 24420000 addiu v0,v0,0=0A= 1714: 0040f809 jalr v0=0A= 1718: 00000000 nop=0A= return -ENODEV;=0A= 171c: 080005ea j 17a8 =0A= 1720: 2402ffed li v0,-19=0A= }=0A= =0A= adapter->shared.fc_high_water =3D FC_DEFAULT_HI_THRESH;=0A= adapter->shared.fc_low_water =3D FC_DEFAULT_LO_THRESH;=0A= adapter->shared.fc_pause_time =3D FC_DEFAULT_TX_TIMER;=0A= adapter->shared.fc_send_xon =3D 1;=0A= =0A= /* Identify the Hardware - this is done by the gigabit shared code=0A= * in e1000_init_hw, but it would help to identify the NIC=0A= * before bringing the hardware online for use in = e1000_check_options.=0A= */=0A= if(adapter->shared.mac_type >=3D e1000_82543) {=0A= 1724: 8e42000c lw v0,12(s2)=0A= 1728: 34048000 li a0,0x8000=0A= 172c: 24054000 li a1,16384=0A= 1730: 24030100 li v1,256=0A= 1734: 24060001 li a2,1=0A= 1738: 2c420002 sltiu v0,v0,2=0A= 173c: a644004c sh a0,76(s2)=0A= 1740: a645004e sh a1,78(s2)=0A= 1744: a6430050 sh v1,80(s2)=0A= 1748: 14400009 bnez v0,1770 =0A= 174c: ae460068 sw a2,104(s2)=0A= status =3D E1000_READ_REG(&adapter->shared, STATUS);=0A= 1750: 8e430008 lw v1,8(s2)=0A= __arch__swab16s(addr);=0A= }=0A= =0A= static __inline__ __const__ __u32 __fswab32(__u32 x)=0A= {=0A= 1754: 8c620008 lw v0,8(v1)=0A= return __arch__swab32(x);=0A= 1758: 00021602 srl v0,v0,0x18=0A= if(status & E1000_STATUS_TBIMODE) {=0A= 175c: 30420020 andi v0,v0,0x20=0A= 1760: 54400004 bnezl v0,1774 =0A= 1764: ae460010 sw a2,16(s2)=0A= adapter->shared.media_type =3D e1000_media_type_fiber;=0A= } else {=0A= adapter->shared.media_type =3D e1000_media_type_copper;=0A= }=0A= } else {=0A= 1768: 080005dd j 1774 =0A= 176c: ae400010 sw zero,16(s2)=0A= adapter->shared.media_type =3D e1000_media_type_fiber;=0A= 1770: ae460010 sw a2,16(s2)=0A= }=0A= =0A= if((E1000_REPORT_TX_EARLY =3D=3D 0) || (E1000_REPORT_TX_EARLY =3D=3D = 1)) {=0A= adapter->shared.report_tx_early =3D E1000_REPORT_TX_EARLY;=0A= } else {=0A= if(adapter->shared.mac_type < e1000_82543) {=0A= 1774: 8e42000c lw v0,12(s2)=0A= 1778: 2c420002 sltiu v0,v0,2=0A= 177c: 10400003 beqz v0,178c =0A= 1780: 24020001 li v0,1=0A= =0A= adapter->shared.report_tx_early =3D 0;=0A= } else {=0A= 1784: 080005e4 j 1790 =0A= 1788: ae40006c sw zero,108(s2)=0A= adapter->shared.report_tx_early =3D 1;=0A= 178c: ae42006c sw v0,108(s2)=0A= }=0A= }=0A= =0A= adapter->shared.wait_autoneg_complete =3D WAITFORLINK_DEFAULT;=0A= 1790: 24020001 li v0,1=0A= =0A= adapter->shared.tbi_compatibility_en =3D 1;=0A= 1794: 24030001 li v1,1=0A= 1798: a242007b sb v0,123(s2)=0A= 179c: ae43005c sw v1,92(s2)=0A= =0A= atomic_set(&adapter->tx_timeout, 0);=0A= 17a0: ae40010c sw zero,268(s2)=0A= =0A= spin_lock_init(&adapter->stats_lock);=0A= spin_lock_init(&adapter->rx_fill_lock);=0A= =0A= return 0;=0A= 17a4: 00001021 move v0,zero=0A= }=0A= 17a8: 8fbf0020 lw ra,32(sp)=0A= 17ac: 8fb3001c lw s3,28(sp)=0A= 17b0: 8fb20018 lw s2,24(sp)=0A= 17b4: 8fb10014 lw s1,20(sp)=0A= 17b8: 8fb00010 lw s0,16(sp)=0A= 17bc: 03e00008 jr ra=0A= 17c0: 27bd0028 addiu sp,sp,40=0A= =0A= 000017c4 :=0A= 17c4: 27bdffd8 addiu sp,sp,-40=0A= 17c8: afb20018 sw s2,24(sp)=0A= 17cc: afbf0024 sw ra,36(sp)=0A= 17d0: afb40020 sw s4,32(sp)=0A= 17d4: afb3001c sw s3,28(sp)=0A= 17d8: afb10014 sw s1,20(sp)=0A= 17dc: afb00010 sw s0,16(sp)=0A= 17e0: 00809021 move s2,a0=0A= =0A= /**=0A= * e1000_hw_init - prepare the hardware=0A= * @adapter: board private struct containing configuration=0A= *=0A= * Returns 0 on success, negative on failure=0A= *=0A= * Initialize the hardware to a configuration as specified by the=0A= * Adapter structure. The controler is reset, the EEPROM is=0A= * verified, the MAC address is set, then the shared initilization=0A= * routines are called.=0A= **/=0A= =0A= static int=0A= e1000_hw_init(struct e1000_adapter *adapter)=0A= {=0A= struct net_device *netdev =3D adapter->netdev;=0A= =0A= E1000_DBG("e1000_hw_init\n");=0A= =0A= /* Repartition Pba for greater than 9k mtu=0A= * To take effect Ctrl_Rst is required.=0A= */=0A= if(adapter->rx_buffer_len > E1000_RXBUFFER_8192)=0A= 17e4: 8e4200b8 lw v0,184(s2)=0A= 17e8: 2c422001 sltiu v0,v0,8193=0A= 17ec: 14400009 bnez v0,1814 =0A= 17f0: 8e540148 lw s4,328(s2)=0A= 17f4: 8e42000c lw v0,12(s2)=0A= 17f8: 2c420002 sltiu v0,v0,2=0A= 17fc: 14400003 bnez v0,180c =0A= 1800: 8e430008 lw v1,8(s2)=0A= E1000_WRITE_REG(&adapter->shared, PBA, E1000_JUMBO_PBA);=0A= 1804: 08000609 j 1824 =0A= 1808: 3c022800 lui v0,0x2800=0A= 180c: 08000609 j 1824 =0A= 1810: 3c022800 lui v0,0x2800=0A= 1814: 8e42000c lw v0,12(s2)=0A= 1818: 2c420002 sltiu v0,v0,2=0A= else=0A= E1000_WRITE_REG(&adapter->shared, PBA, E1000_DEFAULT_PBA);=0A= 181c: 8e430008 lw v1,8(s2)=0A= 1820: 3c023000 lui v0,0x3000=0A= 1824: ac621000 sw v0,4096(v1)=0A= =0A= /* Issue a global reset */=0A= =0A= E1000_DBG("about to global reset\n");=0A= adapter->shared.adapter_stopped =3D 0;=0A= e1000_adapter_stop(&adapter->shared);=0A= 1828: 26530008 addiu s3,s2,8=0A= 182c: 02602021 move a0,s3=0A= 1830: 3c020000 lui v0,0x0=0A= 1834: 24420000 addiu v0,v0,0=0A= 1838: 0040f809 jalr v0=0A= 183c: ae400064 sw zero,100(s2)=0A= adapter->shared.adapter_stopped =3D 0;=0A= 1840: ae400064 sw zero,100(s2)=0A= =0A= /* make sure the EEPROM is good */=0A= =0A= E1000_DBG("about to validate eeprom\n");=0A= if(!e1000_validate_eeprom_checksum(&adapter->shared)) {=0A= 1844: 3c020000 lui v0,0x0=0A= 1848: 24420000 addiu v0,v0,0=0A= 184c: 0040f809 jalr v0=0A= 1850: 02602021 move a0,s3=0A= 1854: 14400005 bnez v0,186c =0A= 1858: 265000a8 addiu s0,s2,168=0A= E1000_ERR("The EEPROM Checksum Is Not Valid\n");=0A= 185c: 3c040000 lui a0,0x0=0A= 1860: 24840ca8 addiu a0,a0,3240=0A= return -1;=0A= 1864: 08000638 j 18e0 =0A= 1868: 00000000 nop=0A= }=0A= =0A= /* copy the MAC address out of the EEPROM */=0A= =0A= E1000_DBG("about to get mac address\n");=0A= e1000_read_address(adapter, adapter->perm_net_addr);=0A= 186c: 3c020000 lui v0,0x0=0A= 1870: 244219d4 addiu v0,v0,6612=0A= 1874: 02002821 move a1,s0=0A= 1878: 0040f809 jalr v0=0A= 187c: 02402021 move a0,s2=0A= memcpy(netdev->dev_addr, adapter->perm_net_addr, netdev->addr_len);=0A= 1880: 9286007c lbu a2,124(s4)=0A= 1884: 26910074 addiu s1,s4,116=0A= 1888: 02002821 move a1,s0=0A= 188c: 3c100000 lui s0,0x0=0A= 1890: 26100000 addiu s0,s0,0=0A= 1894: 0200f809 jalr s0=0A= 1898: 02202021 move a0,s1=0A= memcpy(adapter->shared.mac_addr, netdev->dev_addr, netdev->addr_len);=0A= 189c: 9286007c lbu a2,124(s4)=0A= 18a0: 2644007d addiu a0,s2,125=0A= 18a4: 0200f809 jalr s0=0A= 18a8: 02202821 move a1,s1=0A= =0A= E1000_DBG("about to read part number\n");=0A= e1000_read_part_num(&adapter->shared, &(adapter->part_num));=0A= 18ac: 02602021 move a0,s3=0A= 18b0: 3c020000 lui v0,0x0=0A= 18b4: 24420000 addiu v0,v0,0=0A= 18b8: 0040f809 jalr v0=0A= 18bc: 264500c8 addiu a1,s2,200=0A= =0A= if(!e1000_init_hw(&adapter->shared)) {=0A= 18c0: 3c020000 lui v0,0x0=0A= 18c4: 24420000 addiu v0,v0,0=0A= 18c8: 0040f809 jalr v0=0A= 18cc: 02602021 move a0,s3=0A= 18d0: 14400009 bnez v0,18f8 =0A= 18d4: 00000000 nop=0A= E1000_ERR("Hardware Initialization Failed\n");=0A= 18d8: 3c040000 lui a0,0x0=0A= 18dc: 24840cd4 addiu a0,a0,3284=0A= 18e0: 3c020000 lui v0,0x0=0A= 18e4: 24420000 addiu v0,v0,0=0A= 18e8: 0040f809 jalr v0=0A= 18ec: 00000000 nop=0A= return -1;=0A= 18f0: 0800066d j 19b4 =0A= 18f4: 2402ffff li v0,-1=0A= }=0A= =0A= E1000_DBG("about to enable WOL\n");=0A= e1000_enable_WOL(adapter);=0A= 18f8: 3c020000 lui v0,0x0=0A= 18fc: 244273ec addiu v0,v0,29676=0A= 1900: 0040f809 jalr v0=0A= 1904: 02402021 move a0,s2=0A= =0A= E1000_DBG("about to check for link\n");=0A= adapter->shared.get_link_status =3D 1;=0A= 1908: 24030001 li v1,1=0A= 190c: ae430058 sw v1,88(s2)=0A= e1000_check_for_link(&adapter->shared);=0A= 1910: 3c030000 lui v1,0x0=0A= 1914: 24630000 addiu v1,v1,0=0A= 1918: 0060f809 jalr v1=0A= 191c: 02602021 move a0,s3=0A= 1920: 8e42000c lw v0,12(s2)=0A= 1924: 2c420002 sltiu v0,v0,2=0A= 1928: 14400008 bnez v0,194c =0A= 192c: 8e630000 lw v1,0(s3)=0A= __arch__swab16s(addr);=0A= }=0A= =0A= static __inline__ __const__ __u32 __fswab32(__u32 x)=0A= {=0A= 1930: 8c620008 lw v0,8(v1)=0A= return __arch__swab32(x);=0A= 1934: 00021602 srl v0,v0,0x18=0A= =0A= if(E1000_READ_REG(&adapter->shared, STATUS) & E1000_STATUS_LU)=0A= 1938: 30420002 andi v0,v0,0x2=0A= 193c: 14400008 bnez v0,1960 =0A= 1940: 24020001 li v0,1=0A= 1944: 0800065b j 196c =0A= 1948: ae4000b0 sw zero,176(s2)=0A= __arch__swab16s(addr);=0A= }=0A= =0A= static __inline__ __const__ __u32 __fswab32(__u32 x)=0A= {=0A= 194c: 8c620008 lw v0,8(v1)=0A= return __arch__swab32(x);=0A= 1950: 00021602 srl v0,v0,0x18=0A= 1954: 30420002 andi v0,v0,0x2=0A= 1958: 10400003 beqz v0,1968 =0A= 195c: 24020001 li v0,1=0A= adapter->link_active =3D TRUE;=0A= 1960: 0800065b j 196c =0A= 1964: ae4200b0 sw v0,176(s2)=0A= else=0A= adapter->link_active =3D FALSE;=0A= 1968: ae4000b0 sw zero,176(s2)=0A= =0A= if(adapter->link_active =3D=3D TRUE) {=0A= 196c: 8e4300b0 lw v1,176(s2)=0A= 1970: 24020001 li v0,1=0A= 1974: 54620009 bnel v1,v0,199c =0A= 1978: a64000b6 sh zero,182(s2)=0A= e1000_get_speed_and_duplex(&adapter->shared, = &adapter->link_speed,=0A= 197c: 264600b6 addiu a2,s2,182=0A= 1980: 264500b4 addiu a1,s2,180=0A= 1984: 3c020000 lui v0,0x0=0A= 1988: 24420000 addiu v0,v0,0=0A= 198c: 0040f809 jalr v0=0A= 1990: 02602021 move a0,s3=0A= &adapter->link_duplex);=0A= } else {=0A= 1994: 08000668 j 19a0 =0A= 1998: 00000000 nop=0A= adapter->link_speed =3D 0;=0A= 199c: a64000b4 sh zero,180(s2)=0A= adapter->link_duplex =3D 0;=0A= }=0A= =0A= E1000_DBG("about to get bus info\n");=0A= e1000_get_bus_info(&adapter->shared);=0A= 19a0: 3c020000 lui v0,0x0=0A= 19a4: 24420000 addiu v0,v0,0=0A= 19a8: 0040f809 jalr v0=0A= 19ac: 02602021 move a0,s3=0A= =0A= E1000_DBG("e1000_hw_init done\n");=0A= return 0;=0A= 19b0: 00001021 move v0,zero=0A= }=0A= 19b4: 8fbf0024 lw ra,36(sp)=0A= 19b8: 8fb40020 lw s4,32(sp)=0A= 19bc: 8fb3001c lw s3,28(sp)=0A= 19c0: 8fb20018 lw s2,24(sp)=0A= 19c4: 8fb10014 lw s1,20(sp)=0A= 19c8: 8fb00010 lw s0,16(sp)=0A= 19cc: 03e00008 jr ra=0A= 19d0: 27bd0028 addiu sp,sp,40=0A= =0A= 000019d4 :=0A= 19d4: 27bdffd8 addiu sp,sp,-40=0A= 19d8: afb3001c sw s3,28(sp)=0A= 19dc: afb20018 sw s2,24(sp)=0A= 19e0: afb10014 sw s1,20(sp)=0A= 19e4: afb00010 sw s0,16(sp)=0A= 19e8: afbf0020 sw ra,32(sp)=0A= =0A= /**=0A= * e1000_read_address - Reads the MAC address from the EEPROM=0A= * @adapter: board private structure=0A= * @addr: pointer to an array of bytes=0A= **/=0A= =0A= static void=0A= e1000_read_address(struct e1000_adapter *adapter,=0A= uint8_t *addr)=0A= {=0A= uint16_t eeprom_word;=0A= int i;=0A= =0A= E1000_DBG("e1000_read_address\n");=0A= =0A= for(i =3D 0; i < NODE_ADDRESS_SIZE; i +=3D 2) {=0A= 19ec: 24920008 addiu s2,a0,8=0A= 19f0: 00a08021 move s0,a1=0A= 19f4: 00008821 move s1,zero=0A= 19f8: 3c130000 lui s3,0x0=0A= 19fc: 26730000 addiu s3,s3,0=0A= eeprom_word =3D=0A= 1a00: 00112fc2 srl a1,s1,0x1f=0A= 1a04: 02252821 addu a1,s1,a1=0A= 1a08: 00052843 sra a1,a1,0x1=0A= 1a0c: 02402021 move a0,s2=0A= 1a10: 0260f809 jalr s3=0A= 1a14: 30a5ffff andi a1,a1,0xffff=0A= 1a18: 26310002 addiu s1,s1,2=0A= e1000_read_eeprom(&adapter->shared,=0A= EEPROM_NODE_ADDRESS_BYTE_0 + (i / 2));=0A= addr[i] =3D (uint8_t) (eeprom_word & 0x00FF);=0A= addr[i + 1] =3D (uint8_t) (eeprom_word >> 8);=0A= 1a1c: 00021a02 srl v1,v0,0x8=0A= 1a20: 2a240006 slti a0,s1,6=0A= 1a24: a2030001 sb v1,1(s0)=0A= 1a28: a2020000 sb v0,0(s0)=0A= 1a2c: 1480fff4 bnez a0,1a00 =0A= 1a30: 26100002 addiu s0,s0,2=0A= }=0A= =0A= return;=0A= }=0A= 1a34: 8fbf0020 lw ra,32(sp)=0A= 1a38: 8fb3001c lw s3,28(sp)=0A= 1a3c: 8fb20018 lw s2,24(sp)=0A= 1a40: 8fb10014 lw s1,20(sp)=0A= 1a44: 8fb00010 lw s0,16(sp)=0A= 1a48: 03e00008 jr ra=0A= 1a4c: 27bd0028 addiu sp,sp,40=0A= =0A= 00001a50 :=0A= 1a50: 27bdffd0 addiu sp,sp,-48=0A= 1a54: afb30024 sw s3,36(sp)=0A= 1a58: afb20020 sw s2,32(sp)=0A= 1a5c: afb00018 sw s0,24(sp)=0A= 1a60: afbf0028 sw ra,40(sp)=0A= 1a64: afb1001c sw s1,28(sp)=0A= 1a68: 00809821 move s3,a0=0A= =0A= /**=0A= * e1000_open - Called when a network interface is made active=0A= * @netdev: network interface device structure=0A= *=0A= * Returns 0 on success, negative value on failure=0A= *=0A= * The open entry point is called when a network interface is made=0A= * active by the system (IFF_UP). At this point all resources needed=0A= * for transmit and receive operations are allocated, the interrupt=0A= * handler is registered with the OS, the watchdog timer is started,=0A= * and the stack is notified that the interface is ready.=0A= **/=0A= =0A= int=0A= e1000_open(struct net_device *netdev)=0A= {=0A= struct e1000_adapter *adapter =3D netdev->priv;=0A= 1a6c: 8e710064 lw s1,100(s3)=0A= {=0A= unsigned long *m =3D ((unsigned long *) addr) + (nr >> 5);=0A= unsigned long temp, res;=0A= =0A= __asm__ __volatile__(=0A= 1a70: 24120001 li s2,1=0A= 1a74: 2630008c addiu s0,s1,140=0A= 1a78: c2020000 ll v0,0(s0)=0A= 1a7c: 00521825 or v1,v0,s2=0A= 1a80: e2030000 sc v1,0(s0)=0A= 1a84: 1060fffc beqz v1,1a78 =0A= 1a88: 00521824 and v1,v0,s2=0A= =0A= E1000_DBG("e1000_open\n");=0A= =0A= /* prevent multiple opens when dealing with iANS */=0A= =0A= if(test_and_set_bit(E1000_BOARD_OPEN, &adapter->flags)) {=0A= 1a8c: 1460009f bnez v1,1d0c =0A= 1a90: 2402fff0 li v0,-16=0A= return -EBUSY;=0A= }=0A= =0A= adapter->shared.fc =3D adapter->shared.original_fc;=0A= 1a94: 8e230030 lw v1,48(s1)=0A= =0A= /* e1000_close issues a global reset (e1000_adapter_stop)=0A= * so e1000_hw_init must be called again or the hardware=0A= * will resume in it's default state=0A= */=0A= if(e1000_hw_init(adapter) < 0) {=0A= 1a98: 02202021 move a0,s1=0A= 1a9c: 3c020000 lui v0,0x0=0A= 1aa0: 244217c4 addiu v0,v0,6084=0A= 1aa4: 0040f809 jalr v0=0A= 1aa8: ae230018 sw v1,24(s1)=0A= 1aac: 04430009 bgezl v0,1ad4 =0A= 1ab0: ae200064 sw zero,100(s1)=0A= {=0A= unsigned long *m =3D ((unsigned long *) addr) + (nr >> 5);=0A= unsigned long temp;=0A= =0A= __asm__ __volatile__(=0A= 1ab4: c2020000 ll v0,0(s0)=0A= 1ab8: 2401fffe li at,-2=0A= 1abc: 00411024 and v0,v0,at=0A= 1ac0: e2020000 sc v0,0(s0)=0A= 1ac4: 1040fffb beqz v0,1ab4 =0A= 1ac8: 00000000 nop=0A= clear_bit(E1000_BOARD_OPEN, &adapter->flags);=0A= return -EBUSY;=0A= 1acc: 08000743 j 1d0c =0A= 1ad0: 2402fff0 li v0,-16=0A= }=0A= #ifdef IANS=0A= /* restore VLAN settings */=0A= if((IANS_BD_TAGGING_MODE) = (ANS_PRIVATE_DATA_FIELD(adapter)->tag_mode) !=3D=0A= IANS_BD_TAGGING_NONE)=0A= bd_ans_hw_EnableVLAN(adapter);=0A= #endif=0A= =0A= adapter->shared.adapter_stopped =3D 0;=0A= =0A= /* allocate transmit descriptors */=0A= =0A= if(e1000_setup_tx_resources(adapter) !=3D 0) {=0A= 1ad4: 3c020000 lui v0,0x0=0A= 1ad8: 24421e60 addiu v0,v0,7776=0A= 1adc: 0040f809 jalr v0=0A= 1ae0: 02202021 move a0,s1=0A= 1ae4: 10400005 beqz v0,1afc =0A= 1ae8: 00000000 nop=0A= e1000_adapter_stop(&adapter->shared);=0A= 1aec: 3c020000 lui v0,0x0=0A= 1af0: 24420000 addiu v0,v0,0=0A= clear_bit(E1000_BOARD_OPEN, &adapter->flags);=0A= return -ENOMEM;=0A= 1af4: 080006d0 j 1b40 =0A= 1af8: 26240008 addiu a0,s1,8=0A= }=0A= e1000_configure_tx(adapter);=0A= 1afc: 3c020000 lui v0,0x0=0A= 1b00: 24421f60 addiu v0,v0,8032=0A= 1b04: 0040f809 jalr v0=0A= 1b08: 02202021 move a0,s1=0A= =0A= /* allocate receive descriptors and buffers */=0A= =0A= if(e1000_setup_rx_resources(adapter) !=3D 0) {=0A= 1b0c: 3c020000 lui v0,0x0=0A= 1b10: 24422208 addiu v0,v0,8712=0A= 1b14: 0040f809 jalr v0=0A= 1b18: 02202021 move a0,s1=0A= 1b1c: 10400012 beqz v0,1b68 =0A= 1b20: 00000000 nop=0A= e1000_adapter_stop(&adapter->shared);=0A= 1b24: 3c020000 lui v0,0x0=0A= 1b28: 24420000 addiu v0,v0,0=0A= 1b2c: 0040f809 jalr v0=0A= 1b30: 26240008 addiu a0,s1,8=0A= e1000_free_tx_resources(adapter);=0A= 1b34: 02202021 move a0,s1=0A= 1b38: 3c020000 lui v0,0x0=0A= 1b3c: 244226b4 addiu v0,v0,9908=0A= 1b40: 0040f809 jalr v0=0A= 1b44: 00000000 nop=0A= {=0A= unsigned long *m =3D ((unsigned long *) addr) + (nr >> 5);=0A= unsigned long temp;=0A= =0A= __asm__ __volatile__(=0A= 1b48: c2030000 ll v1,0(s0)=0A= 1b4c: 2401fffe li at,-2=0A= 1b50: 00611824 and v1,v1,at=0A= 1b54: e2030000 sc v1,0(s0)=0A= 1b58: 1060fffb beqz v1,1b48 =0A= 1b5c: 00000000 nop=0A= clear_bit(E1000_BOARD_OPEN, &adapter->flags);=0A= return -ENOMEM;=0A= 1b60: 08000743 j 1d0c =0A= 1b64: 2402fff4 li v0,-12=0A= }=0A= e1000_setup_rctl(adapter);=0A= 1b68: 3c020000 lui v0,0x0=0A= 1b6c: 24422308 addiu v0,v0,8968=0A= 1b70: 0040f809 jalr v0=0A= 1b74: 02202021 move a0,s1=0A= e1000_configure_rx(adapter);=0A= 1b78: 3c020000 lui v0,0x0=0A= 1b7c: 244223a8 addiu v0,v0,9128=0A= 1b80: 0040f809 jalr v0=0A= 1b84: 02202021 move a0,s1=0A= =0A= /* hook the interrupt */=0A= =0A= if(request_irq(netdev->irq, &e1000_intr,=0A= 1b88: 8e640024 lw a0,36(s3)=0A= 1b8c: 3c050000 lui a1,0x0=0A= 1b90: 24a50000 addiu a1,a1,0=0A= 1b94: 3c070000 lui a3,0x0=0A= 1b98: 24e70000 addiu a3,a3,0=0A= 1b9c: 3c060200 lui a2,0x200=0A= 1ba0: 3c020000 lui v0,0x0=0A= 1ba4: 24420000 addiu v0,v0,0=0A= 1ba8: 0040f809 jalr v0=0A= 1bac: afb30010 sw s3,16(sp)=0A= 1bb0: 5040001b beqzl v0,1c20 =0A= 1bb4: 263000d0 addiu s0,s1,208=0A= {=0A= unsigned long *m =3D ((unsigned long *) addr) + (nr >> 5);=0A= unsigned long temp;=0A= =0A= __asm__ __volatile__(=0A= 1bb8: c2020000 ll v0,0(s0)=0A= 1bbc: 2401fffe li at,-2=0A= 1bc0: 00411024 and v0,v0,at=0A= 1bc4: e2020000 sc v0,0(s0)=0A= 1bc8: 1040fffb beqz v0,1bb8 =0A= 1bcc: 00000000 nop=0A= SA_SHIRQ, e1000_driver_name, netdev) !=3D 0) {=0A= clear_bit(E1000_BOARD_OPEN, &adapter->flags);=0A= e1000_adapter_stop(&adapter->shared);=0A= 1bd0: 3c020000 lui v0,0x0=0A= 1bd4: 24420000 addiu v0,v0,0=0A= 1bd8: 0040f809 jalr v0=0A= 1bdc: 26240008 addiu a0,s1,8=0A= e1000_free_tx_resources(adapter);=0A= 1be0: 3c020000 lui v0,0x0=0A= 1be4: 244226b4 addiu v0,v0,9908=0A= 1be8: 0040f809 jalr v0=0A= 1bec: 02202021 move a0,s1=0A= e1000_free_rx_resources(adapter);=0A= 1bf0: 3c020000 lui v0,0x0=0A= 1bf4: 2442284c addiu v0,v0,10316=0A= 1bf8: 0040f809 jalr v0=0A= 1bfc: 02202021 move a0,s1=0A= {=0A= unsigned long *m =3D ((unsigned long *) addr) + (nr >> 5);=0A= unsigned long temp;=0A= =0A= __asm__ __volatile__(=0A= 1c00: c2030000 ll v1,0(s0)=0A= 1c04: 2401fffe li at,-2=0A= 1c08: 00611824 and v1,v1,at=0A= 1c0c: e2030000 sc v1,0(s0)=0A= 1c10: 1060fffb beqz v1,1c00 =0A= 1c14: 00000000 nop=0A= clear_bit(E1000_BOARD_OPEN, &adapter->flags);=0A= return -EBUSY;=0A= 1c18: 08000743 j 1d0c =0A= 1c1c: 2402fff0 li v0,-16=0A= }=0A= =0A= /* fill Rx ring with sk_buffs */=0A= =0A= tasklet_init(&adapter->rx_fill_tasklet, e1000_alloc_rx_buffers,=0A= 1c20: 3c050000 lui a1,0x0=0A= 1c24: 24a55e30 addiu a1,a1,24112=0A= 1c28: 02002021 move a0,s0=0A= 1c2c: 3c020000 lui v0,0x0=0A= 1c30: 24420000 addiu v0,v0,0=0A= 1c34: 0040f809 jalr v0=0A= 1c38: 02203021 move a2,s1=0A= {=0A= unsigned long *m =3D ((unsigned long *) addr) + (nr >> 5);=0A= unsigned long temp, res;=0A= =0A= __asm__ __volatile__(=0A= 1c3c: c22400d4 ll a0,212(s1)=0A= 1c40: 00921825 or v1,a0,s2=0A= 1c44: e22300d4 sc v1,212(s1)=0A= 1c48: 1060fffc beqz v1,1c3c =0A= 1c4c: 00921824 and v1,a0,s2=0A= extern void FASTCALL(__tasklet_schedule(struct tasklet_struct *t));=0A= =0A= static inline void tasklet_schedule(struct tasklet_struct *t)=0A= {=0A= if (!test_and_set_bit(TASKLET_STATE_SCHED, &t->state))=0A= 1c50: 54600006 bnezl v1,1c6c =0A= 1c54: 26240094 addiu a0,s1,148=0A= __tasklet_schedule(t);=0A= 1c58: 3c020000 lui v0,0x0=0A= 1c5c: 24420000 addiu v0,v0,0=0A= 1c60: 0040f809 jalr v0=0A= 1c64: 02002021 move a0,s0=0A= =0A= extern void it_real_fn(unsigned long);=0A= =0A= static inline void init_timer(struct timer_list * timer)=0A= {=0A= 1c68: 26240094 addiu a0,s1,148=0A= (unsigned long) adapter);=0A= =0A= tasklet_schedule(&adapter->rx_fill_tasklet);=0A= =0A= /* Set the watchdog timer for 2 seconds */=0A= =0A= init_timer(&adapter->timer_id);=0A= adapter->timer_id.function =3D &e1000_watchdog;=0A= 1c6c: 3c020000 lui v0,0x0=0A= 1c70: 24420000 addiu v0,v0,0=0A= extern void it_real_fn(unsigned long);=0A= =0A= static inline void init_timer(struct timer_list * timer)=0A= {=0A= timer->list.next =3D timer->list.prev =3D NULL;=0A= 1c74: ac800004 sw zero,4(a0)=0A= 1c78: ac800000 sw zero,0(a0)=0A= 1c7c: ae2200a4 sw v0,164(s1)=0A= adapter->timer_id.data =3D (unsigned long) netdev;=0A= 1c80: ae3300a0 sw s3,160(s1)=0A= mod_timer(&adapter->timer_id, (jiffies + 2 * HZ));=0A= 1c84: 3c050000 lui a1,0x0=0A= 1c88: 8ca50000 lw a1,0(a1)=0A= 1c8c: 3c020000 lui v0,0x0=0A= 1c90: 24420000 addiu v0,v0,0=0A= 1c94: 0040f809 jalr v0=0A= 1c98: 24a500c8 addiu a1,a1,200=0A= =0A= /* stats accumulated while down are dropped=0A= * this does not clear the running total=0A= */=0A= =0A= e1000_clear_hw_cntrs(&adapter->shared);=0A= 1c9c: 3c020000 lui v0,0x0=0A= 1ca0: 24420000 addiu v0,v0,0=0A= 1ca4: 0040f809 jalr v0=0A= 1ca8: 26240008 addiu a0,s1,8=0A= =0A= adapter->int_mask =3D IMS_ENABLE_MASK;=0A= 1cac: 2403009d li v1,157=0A= 1cb0: ae2300cc sw v1,204(s1)=0A= e1000_irq_enable(adapter);=0A= 1cb4: 3c020000 lui v0,0x0=0A= 1cb8: 244274ac addiu v0,v0,29868=0A= 1cbc: 0040f809 jalr v0=0A= 1cc0: 02202021 move a0,s1=0A= {=0A= unsigned long *m =3D ((unsigned long *) addr) + (nr >> 5);=0A= unsigned long temp;=0A= =0A= __asm__ __volatile__(=0A= 1cc4: c264002c ll a0,44(s3)=0A= 1cc8: 2401fffe li at,-2=0A= 1ccc: 00812024 and a0,a0,at=0A= 1cd0: e264002c sc a0,44(s3)=0A= 1cd4: 1080fffb beqz a0,1cc4 =0A= 1cd8: 00000000 nop=0A= * Atomically adds @i to @v. Note that the guaranteed useful range=0A= * of an atomic_t is only 24 bits.=0A= */=0A= extern __inline__ void atomic_add(int i, atomic_t * v)=0A= {=0A= 1cdc: 3c030000 lui v1,0x0=0A= 1ce0: 24630010 addiu v1,v1,16=0A= unsigned long temp;=0A= =0A= __asm__ __volatile__(=0A= 1ce4: c0620000 ll v0,0(v1)=0A= 1ce8: 00521021 addu v0,v0,s2=0A= 1cec: e0620000 sc v0,0(v1)=0A= 1cf0: 1040fffc beqz v0,1ce4 =0A= 1cf4: 00000000 nop=0A= netif_start_queue(netdev);=0A= =0A= #ifdef MODULE=0A= =0A= /* Incrementing the module use count prevents a driver from being=0A= * unloaded while an active network interface is using it.=0A= */=0A= MOD_INC_USE_COUNT;=0A= 1cf8: 24630004 addiu v1,v1,4=0A= 1cfc: 8c640000 lw a0,0(v1)=0A= =0A= #endif=0A= =0A= return 0;=0A= 1d00: 00001021 move v0,zero=0A= 1d04: 34840018 ori a0,a0,0x18=0A= 1d08: ac640000 sw a0,0(v1)=0A= }=0A= 1d0c: 8fbf0028 lw ra,40(sp)=0A= 1d10: 8fb30024 lw s3,36(sp)=0A= 1d14: 8fb20020 lw s2,32(sp)=0A= 1d18: 8fb1001c lw s1,28(sp)=0A= 1d1c: 8fb00018 lw s0,24(sp)=0A= 1d20: 03e00008 jr ra=0A= 1d24: 27bd0030 addiu sp,sp,48=0A= =0A= 00001d28 :=0A= 1d28: 27bdffd8 addiu sp,sp,-40=0A= 1d2c: afb3001c sw s3,28(sp)=0A= 1d30: afb20018 sw s2,24(sp)=0A= 1d34: afb10014 sw s1,20(sp)=0A= 1d38: afbf0020 sw ra,32(sp)=0A= 1d3c: afb00010 sw s0,16(sp)=0A= 1d40: 00808821 move s1,a0=0A= =0A= /**=0A= * e1000_close - Disables a network interface=0A= * @netdev: network interface device structure=0A= *=0A= * Returns 0, this is not allowed to fail=0A= *=0A= * The close entry point is called when an interface is de-activated=0A= * by the OS. The hardware is still under the drivers control, but=0A= * needs to be disabled. A global MAC reset is issued to stop the=0A= * hardware, and all transmit and receive resources are freed.=0A= **/=0A= =0A= int=0A= e1000_close(struct net_device *netdev)=0A= {=0A= struct e1000_adapter *adapter =3D netdev->priv;=0A= 1d44: 8e300064 lw s0,100(s1)=0A= =0A= E1000_DBG("e1000_close\n");=0A= =0A= if(!test_bit(E1000_BOARD_OPEN, &adapter->flags))=0A= return 0;=0A= =0A= /* Issue a global reset */=0A= =0A= e1000_adapter_stop((&adapter->shared));=0A= 1d48: 3c050000 lui a1,0x0=0A= 1d4c: 24a50000 addiu a1,a1,0=0A= 1d50: 00001021 move v0,zero=0A= * @nr: bit number to test=0A= * @addr: Address to start counting from=0A= */=0A= extern __inline__ int test_bit(int nr, volatile void *addr)=0A= {=0A= 1d54: 2613008c addiu s3,s0,140=0A= return ((1UL << (nr & 31)) & (((const unsigned int *) addr)[nr >> 5])) = !=3D 0;=0A= 1d58: 8e630000 lw v1,0(s3)=0A= 1d5c: 26120008 addiu s2,s0,8=0A= * @addr: Address to start counting from=0A= */=0A= extern __inline__ int test_bit(int nr, volatile void *addr)=0A= {=0A= return ((1UL << (nr & 31)) & (((const unsigned int *) addr)[nr >> 5])) = !=3D 0;=0A= 1d60: 30630001 andi v1,v1,0x1=0A= 1d64: 10600037 beqz v1,1e44 =0A= 1d68: 02402021 move a0,s2=0A= 1d6c: 00a0f809 jalr a1=0A= 1d70: 00000000 nop=0A= =0A= /* Enable receiver unit after Global reset=0A= * for WOL, so that receiver can still recive=0A= * wake up packet and will not drop it.=0A= */=0A= if(adapter->shared.mac_type > e1000_82543)=0A= 1d74: 8e02000c lw v0,12(s0)=0A= 1d78: 2c430002 sltiu v1,v0,2=0A= 1d7c: 2c420003 sltiu v0,v0,3=0A= 1d80: 14400003 bnez v0,1d90 =0A= 1d84: 3c020200 lui v0,0x200=0A= E1000_WRITE_REG(&adapter->shared, RCTL, E1000_RCTL_EN);=0A= 1d88: 8e430000 lw v1,0(s2)=0A= 1d8c: ac620100 sw v0,256(v1)=0A= {=0A= unsigned long *m =3D ((unsigned long *) addr) + (nr >> 5);=0A= unsigned long temp;=0A= =0A= __asm__ __volatile__(=0A= 1d90: c222002c ll v0,44(s1)=0A= 1d94: 34420001 ori v0,v0,0x1=0A= 1d98: e222002c sc v0,44(s1)=0A= 1d9c: 1040fffc beqz v0,1d90 =0A= 1da0: 00000000 nop=0A= =0A= /* free OS resources */=0A= =0A= netif_stop_queue(netdev);=0A= free_irq(netdev->irq, netdev);=0A= 1da4: 8e240024 lw a0,36(s1)=0A= 1da8: 3c020000 lui v0,0x0=0A= 1dac: 24420000 addiu v0,v0,0=0A= 1db0: 0040f809 jalr v0=0A= 1db4: 02202821 move a1,s1=0A= del_timer_sync(&adapter->timer_id);=0A= 1db8: 3c020000 lui v0,0x0=0A= 1dbc: 24420000 addiu v0,v0,0=0A= 1dc0: 0040f809 jalr v0=0A= 1dc4: 26040094 addiu a0,s0,148=0A= =0A= /* Make sure the tasklet won't be left after ifconfig down */=0A= =0A= /*=0A= * Assumption: tasklet is ALREADY enabled, ie, t->count =3D=3D 0.=0A= * Otherwise, tasklet is still left in the tasklet list, and,=0A= * tasklet_kill will not be able to return (hang).=0A= */=0A= tasklet_kill(&adapter->rx_fill_tasklet);=0A= 1dc8: 3c020000 lui v0,0x0=0A= 1dcc: 24420000 addiu v0,v0,0=0A= 1dd0: 0040f809 jalr v0=0A= 1dd4: 260400d0 addiu a0,s0,208=0A= =0A= /* free software resources */=0A= =0A= e1000_free_tx_resources(adapter);=0A= 1dd8: 3c020000 lui v0,0x0=0A= 1ddc: 244226b4 addiu v0,v0,9908=0A= 1de0: 0040f809 jalr v0=0A= 1de4: 02002021 move a0,s0=0A= e1000_free_rx_resources(adapter);=0A= 1de8: 3c020000 lui v0,0x0=0A= 1dec: 2442284c addiu v0,v0,10316=0A= 1df0: 0040f809 jalr v0=0A= 1df4: 02002021 move a0,s0=0A= * Atomically subtracts @i from @v. Note that the guaranteed=0A= * useful range of an atomic_t is only 24 bits.=0A= */=0A= extern __inline__ void atomic_sub(int i, atomic_t * v)=0A= {=0A= 1df8: 24030001 li v1,1=0A= 1dfc: 3c020000 lui v0,0x0=0A= 1e00: 24420010 addiu v0,v0,16=0A= unsigned long temp;=0A= =0A= __asm__ __volatile__(=0A= 1e04: c0440000 ll a0,0(v0)=0A= 1e08: 00832023 subu a0,a0,v1=0A= 1e0c: e0440000 sc a0,0(v0)=0A= 1e10: 1080fffc beqz a0,1e04 =0A= 1e14: 00000000 nop=0A= =0A= #ifdef MODULE=0A= =0A= /* decrement the module usage count=0A= * so that the driver can be unloaded=0A= */=0A= MOD_DEC_USE_COUNT;=0A= 1e18: 24420004 addiu v0,v0,4=0A= 1e1c: 8c430000 lw v1,0(v0)=0A= 1e20: 34630008 ori v1,v1,0x8=0A= 1e24: ac430000 sw v1,0(v0)=0A= {=0A= unsigned long *m =3D ((unsigned long *) addr) + (nr >> 5);=0A= unsigned long temp;=0A= =0A= __asm__ __volatile__(=0A= 1e28: c2640000 ll a0,0(s3)=0A= 1e2c: 2401fffe li at,-2=0A= 1e30: 00812024 and a0,a0,at=0A= 1e34: e2640000 sc a0,0(s3)=0A= 1e38: 1080fffb beqz a0,1e28 =0A= 1e3c: 00000000 nop=0A= =0A= #endif=0A= =0A= clear_bit(E1000_BOARD_OPEN, &adapter->flags);=0A= return 0;=0A= 1e40: 00001021 move v0,zero=0A= }=0A= 1e44: 8fbf0020 lw ra,32(sp)=0A= 1e48: 8fb3001c lw s3,28(sp)=0A= 1e4c: 8fb20018 lw s2,24(sp)=0A= 1e50: 8fb10014 lw s1,20(sp)=0A= 1e54: 8fb00010 lw s0,16(sp)=0A= 1e58: 03e00008 jr ra=0A= 1e5c: 27bd0028 addiu sp,sp,40=0A= =0A= 00001e60 :=0A= 1e60: 27bdffd8 addiu sp,sp,-40=0A= 1e64: afb3001c sw s3,28(sp)=0A= 1e68: afb10014 sw s1,20(sp)=0A= 1e6c: afb00010 sw s0,16(sp)=0A= 1e70: 00808821 move s1,a0=0A= 1e74: afbf0020 sw ra,32(sp)=0A= 1e78: afb20018 sw s2,24(sp)=0A= =0A= /**=0A= * e1000_setup_tx_resources - allocate Tx resources (Descriptors)=0A= * @adapter: board private structure=0A= *=0A= * Return 0 on success, negative on failure=0A= *=0A= * e1000_setup_tx_resources allocates all software transmit resources=0A= * and enabled the Tx unit of the MAC.=0A= **/=0A= =0A= static int=0A= e1000_setup_tx_resources(struct e1000_adapter *adapter)=0A= {=0A= struct pci_dev *pdev =3D adapter->pdev;=0A= int size;=0A= =0A= E1000_DBG("e1000_setup_tx_resources\n");=0A= =0A= size =3D sizeof(struct e1000_buffer) * adapter->tx_ring.count;=0A= 1e7c: 8e2300f0 lw v1,240(s1)=0A= adapter->tx_ring.buffer_info =3D kmalloc(size, GFP_KERNEL);=0A= 1e80: 240501f0 li a1,496=0A= 1e84: 3c020000 lui v0,0x0=0A= 1e88: 24420000 addiu v0,v0,0=0A= 1e8c: 00038040 sll s0,v1,0x1=0A= 1e90: 02038021 addu s0,s0,v1=0A= 1e94: 001080c0 sll s0,s0,0x3=0A= 1e98: 02002021 move a0,s0=0A= 1e9c: 0040f809 jalr v0=0A= 1ea0: 8e32014c lw s2,332(s1)=0A= 1ea4: 00401821 move v1,v0=0A= if(adapter->tx_ring.buffer_info =3D=3D NULL) {=0A= return -ENOMEM;=0A= }=0A= memset(adapter->tx_ring.buffer_info, 0, size);=0A= 1ea8: 3c130000 lui s3,0x0=0A= 1eac: 26730000 addiu s3,s3,0=0A= 1eb0: 00602021 move a0,v1=0A= 1eb4: 02003021 move a2,s0=0A= 1eb8: 00002821 move a1,zero=0A= 1ebc: ae230100 sw v1,256(s1)=0A= 1ec0: 10600020 beqz v1,1f44 =0A= 1ec4: 2402fff4 li v0,-12=0A= 1ec8: 0260f809 jalr s3=0A= 1ecc: 00000000 nop=0A= =0A= /* round up to nearest 4K */=0A= =0A= adapter->tx_ring.size =3D E1000_ROUNDUP2(adapter->tx_ring.count *=0A= 1ed0: 8e2300f0 lw v1,240(s1)=0A= 1ed4: 2405f000 li a1,-4096=0A= sizeof(struct e1000_tx_desc),=0A= 4096);=0A= =0A= adapter->tx_ring.desc =3D pci_alloc_consistent(pdev, = adapter->tx_ring.size,=0A= 1ed8: 02402021 move a0,s2=0A= 1edc: 00031900 sll v1,v1,0x4=0A= 1ee0: 24630fff addiu v1,v1,4095=0A= 1ee4: 00651824 and v1,v1,a1=0A= 1ee8: 00602821 move a1,v1=0A= 1eec: ae2300ec sw v1,236(s1)=0A= 1ef0: 3c020000 lui v0,0x0=0A= 1ef4: 24420000 addiu v0,v0,0=0A= 1ef8: 0040f809 jalr v0=0A= 1efc: 262600e8 addiu a2,s1,232=0A= &adapter->tx_ring.dma);=0A= if(adapter->tx_ring.desc =3D=3D NULL) {=0A= kfree(adapter->tx_ring.buffer_info);=0A= return -ENOMEM;=0A= }=0A= memset(adapter->tx_ring.desc, 0, adapter->tx_ring.size);=0A= 1f00: 00402021 move a0,v0=0A= 1f04: 00002821 move a1,zero=0A= 1f08: 3c030000 lui v1,0x0=0A= 1f0c: 24630000 addiu v1,v1,0=0A= 1f10: 14400005 bnez v0,1f28 =0A= 1f14: ae2200e4 sw v0,228(s1)=0A= 1f18: 0060f809 jalr v1=0A= 1f1c: 8e240100 lw a0,256(s1)=0A= 1f20: 080007d1 j 1f44 =0A= 1f24: 2402fff4 li v0,-12=0A= 1f28: 0260f809 jalr s3=0A= 1f2c: 8e2600ec lw a2,236(s1)=0A= =0A= atomic_set(&adapter->tx_ring.unused, adapter->tx_ring.count);=0A= 1f30: 8e2300f0 lw v1,240(s1)=0A= adapter->tx_ring.next_to_use =3D 0;=0A= adapter->tx_ring.next_to_clean =3D 0;=0A= 1f34: ae2000fc sw zero,252(s1)=0A= 1f38: ae2000f8 sw zero,248(s1)=0A= 1f3c: ae2300f4 sw v1,244(s1)=0A= =0A= return 0;=0A= 1f40: 00001021 move v0,zero=0A= }=0A= 1f44: 8fbf0020 lw ra,32(sp)=0A= 1f48: 8fb3001c lw s3,28(sp)=0A= 1f4c: 8fb20018 lw s2,24(sp)=0A= 1f50: 8fb10014 lw s1,20(sp)=0A= 1f54: 8fb00010 lw s0,16(sp)=0A= 1f58: 03e00008 jr ra=0A= 1f5c: 27bd0028 addiu sp,sp,40=0A= =0A= 00001f60 :=0A= 1f60: 00803821 move a3,a0=0A= =0A= /**=0A= * e1000_configure_tx - Configure 8254x Transmit Unit after Reset=0A= * @adapter: board private structure=0A= *=0A= * Configure the Tx unit of the MAC after a reset.=0A= **/=0A= =0A= static void=0A= e1000_configure_tx(struct e1000_adapter *adapter)=0A= {=0A= uint32_t tctl, tipg;=0A= 1f64: 8ce2000c lw v0,12(a3)=0A= 1f68: 2c420002 sltiu v0,v0,2=0A= 1f6c: 1440000e bnez v0,1fa8 =0A= 1f70: 8ce500e8 lw a1,232(a3)=0A= 1f74: 8ce60008 lw a2,8(a3)=0A= }=0A= =0A= static __inline__ __const__ __u32 __fswab32(__u32 x)=0A= {=0A= return __arch__swab32(x);=0A= 1f78: 30a4ff00 andi a0,a1,0xff00=0A= 1f7c: 00051600 sll v0,a1,0x18=0A= 1f80: 00051a02 srl v1,a1,0x8=0A= 1f84: 00042200 sll a0,a0,0x8=0A= 1f88: 00441025 or v0,v0,a0=0A= 1f8c: 3063ff00 andi v1,v1,0xff00=0A= 1f90: 00431025 or v0,v0,v1=0A= 1f94: 00052e02 srl a1,a1,0x18=0A= 1f98: 00451025 or v0,v0,a1=0A= =0A= /* Setup the Base and Length of the Rx Descriptor Ring */=0A= /* tx_ring.dma can be either a 32 or 64 bit value */=0A= =0A= #if (BITS_PER_LONG =3D=3D 32)=0A= E1000_WRITE_REG(&adapter->shared, TDBAL, adapter->tx_ring.dma);=0A= 1f9c: acc23800 sw v0,14336(a2)=0A= 1fa0: 080007f6 j 1fd8 =0A= 1fa4: 8ce2000c lw v0,12(a3)=0A= 1fa8: 8ce60008 lw a2,8(a3)=0A= }=0A= =0A= static __inline__ __const__ __u32 __fswab32(__u32 x)=0A= {=0A= return __arch__swab32(x);=0A= 1fac: 30a4ff00 andi a0,a1,0xff00=0A= 1fb0: 00051600 sll v0,a1,0x18=0A= 1fb4: 00051a02 srl v1,a1,0x8=0A= 1fb8: 00042200 sll a0,a0,0x8=0A= 1fbc: 00441025 or v0,v0,a0=0A= 1fc0: 3063ff00 andi v1,v1,0xff00=0A= 1fc4: 00431025 or v0,v0,v1=0A= 1fc8: 00052e02 srl a1,a1,0x18=0A= 1fcc: 00451025 or v0,v0,a1=0A= 1fd0: acc20420 sw v0,1056(a2)=0A= 1fd4: 8ce2000c lw v0,12(a3)=0A= 1fd8: 2c420002 sltiu v0,v0,2=0A= 1fdc: 14400004 bnez v0,1ff0 =0A= 1fe0: 8ce20008 lw v0,8(a3)=0A= E1000_WRITE_REG(&adapter->shared, TDBAH, 0);=0A= 1fe4: ac403804 sw zero,14340(v0)=0A= 1fe8: 080007fe j 1ff8 =0A= 1fec: 8ce2000c lw v0,12(a3)=0A= 1ff0: ac400424 sw zero,1060(v0)=0A= 1ff4: 8ce2000c lw v0,12(a3)=0A= 1ff8: 2c420002 sltiu v0,v0,2=0A= 1ffc: 1440000f bnez v0,203c =0A= 2000: 8ce400f0 lw a0,240(a3)=0A= 2004: 8ce60008 lw a2,8(a3)=0A= 2008: 00042100 sll a0,a0,0x4=0A= }=0A= =0A= static __inline__ __const__ __u32 __fswab32(__u32 x)=0A= {=0A= return __arch__swab32(x);=0A= 200c: 3085ff00 andi a1,a0,0xff00=0A= 2010: 00041600 sll v0,a0,0x18=0A= 2014: 00041a02 srl v1,a0,0x8=0A= 2018: 00052a00 sll a1,a1,0x8=0A= 201c: 00451025 or v0,v0,a1=0A= 2020: 3063ff00 andi v1,v1,0xff00=0A= 2024: 00431025 or v0,v0,v1=0A= 2028: 00042602 srl a0,a0,0x18=0A= 202c: 00441025 or v0,v0,a0=0A= #elif ( BITS_PER_LONG =3D=3D 64)=0A= E1000_WRITE_REG(&adapter->shared, TDBAL,=0A= (uint32_t) (adapter->tx_ring.dma & = 0x00000000FFFFFFFF));=0A= E1000_WRITE_REG(&adapter->shared, TDBAH,=0A= (uint32_t) (adapter->tx_ring.dma >> 32));=0A= #else=0A= #error "Unsupported System - does not use 32 or 64 bit pointers!"=0A= #endif=0A= =0A= E1000_WRITE_REG(&adapter->shared, TDLEN,=0A= 2030: acc23808 sw v0,14344(a2)=0A= 2034: 0800081c j 2070 =0A= 2038: 8ce2000c lw v0,12(a3)=0A= 203c: 8ce60008 lw a2,8(a3)=0A= 2040: 00042100 sll a0,a0,0x4=0A= }=0A= =0A= static __inline__ __const__ __u32 __fswab32(__u32 x)=0A= {=0A= return __arch__swab32(x);=0A= 2044: 3085ff00 andi a1,a0,0xff00=0A= 2048: 00041600 sll v0,a0,0x18=0A= 204c: 00041a02 srl v1,a0,0x8=0A= 2050: 00052a00 sll a1,a1,0x8=0A= 2054: 00451025 or v0,v0,a1=0A= 2058: 3063ff00 andi v1,v1,0xff00=0A= 205c: 00431025 or v0,v0,v1=0A= 2060: 00042602 srl a0,a0,0x18=0A= 2064: 00441025 or v0,v0,a0=0A= 2068: acc20428 sw v0,1064(a2)=0A= 206c: 8ce2000c lw v0,12(a3)=0A= 2070: 2c420002 sltiu v0,v0,2=0A= 2074: 14400004 bnez v0,2088 =0A= 2078: 8ce20008 lw v0,8(a3)=0A= adapter->tx_ring.count * sizeof(struct = e1000_tx_desc));=0A= =0A= /* Setup the HW Tx Head and Tail descriptor pointers */=0A= =0A= E1000_WRITE_REG(&adapter->shared, TDH, 0);=0A= 207c: ac403810 sw zero,14352(v0)=0A= 2080: 08000824 j 2090 =0A= 2084: 8ce2000c lw v0,12(a3)=0A= 2088: ac400430 sw zero,1072(v0)=0A= 208c: 8ce2000c lw v0,12(a3)=0A= 2090: 2c420002 sltiu v0,v0,2=0A= 2094: 14400004 bnez v0,20a8 =0A= 2098: 8ce20008 lw v0,8(a3)=0A= E1000_WRITE_REG(&adapter->shared, TDT, 0);=0A= 209c: ac403818 sw zero,14360(v0)=0A= 20a0: 0800082c j 20b0 =0A= 20a4: 8ce4000c lw a0,12(a3)=0A= 20a8: ac400438 sw zero,1080(v0)=0A= =0A= /* Set the default values for the Tx Inter Packet Gap timer */=0A= =0A= switch (adapter->shared.mac_type) {=0A= 20ac: 8ce4000c lw a0,12(a3)=0A= 20b0: 2c820002 sltiu v0,a0,2=0A= 20b4: 1440000d bnez v0,20ec =0A= 20b8: 3c0600a0 lui a2,0xa0=0A= 20bc: 2c820004 sltiu v0,a0,4=0A= 20c0: 5040000b beqzl v0,20f0 =0A= 20c4: 34c6080a ori a2,a2,0x80a=0A= case e1000_82543:=0A= case e1000_82544:=0A= if(adapter->shared.media_type =3D=3D e1000_media_type_fiber)=0A= 20c8: 8ce30010 lw v1,16(a3)=0A= 20cc: 24020001 li v0,1=0A= 20d0: 10620002 beq v1,v0,20dc =0A= 20d4: 24060006 li a2,6=0A= tipg =3D DEFAULT_82543_TIPG_IPGT_FIBER;=0A= else=0A= tipg =3D DEFAULT_82543_TIPG_IPGT_COPPER;=0A= 20d8: 24060008 li a2,8=0A= tipg |=3D DEFAULT_82543_TIPG_IPGR1 << E1000_TIPG_IPGR1_SHIFT;=0A= tipg |=3D DEFAULT_82543_TIPG_IPGR2 << E1000_TIPG_IPGR2_SHIFT;=0A= 20dc: 3c020060 lui v0,0x60=0A= 20e0: 34422000 ori v0,v0,0x2000=0A= break;=0A= 20e4: 0800083c j 20f0 =0A= 20e8: 00c23025 or a2,a2,v0=0A= case e1000_82542_rev2_0:=0A= case e1000_82542_rev2_1:=0A= default:=0A= tipg =3D DEFAULT_82542_TIPG_IPGT;=0A= tipg |=3D DEFAULT_82542_TIPG_IPGR1 << E1000_TIPG_IPGR1_SHIFT;=0A= tipg |=3D DEFAULT_82542_TIPG_IPGR2 << E1000_TIPG_IPGR2_SHIFT;=0A= 20ec: 34c6080a ori a2,a2,0x80a=0A= break;=0A= }=0A= 20f0: 2c820002 sltiu v0,a0,2=0A= }=0A= =0A= static __inline__ __const__ __u32 __fswab32(__u32 x)=0A= {=0A= return __arch__swab32(x);=0A= 20f4: 30c3ff00 andi v1,a2,0xff00=0A= 20f8: 00031a00 sll v1,v1,0x8=0A= 20fc: 00061600 sll v0,a2,0x18=0A= 2100: 00062202 srl a0,a2,0x8=0A= 2104: 00431025 or v0,v0,v1=0A= 2108: 3084ff00 andi a0,a0,0xff00=0A= E1000_WRITE_REG(&adapter->shared, TIPG, tipg);=0A= 210c: 8ce50008 lw a1,8(a3)=0A= }=0A= =0A= static __inline__ __const__ __u32 __fswab32(__u32 x)=0A= {=0A= return __arch__swab32(x);=0A= 2110: 00441025 or v0,v0,a0=0A= 2114: 00061e02 srl v1,a2,0x18=0A= 2118: 00431025 or v0,v0,v1=0A= 211c: aca20410 sw v0,1040(a1)=0A= 2120: 8ce2000c lw v0,12(a3)=0A= 2124: 2c420002 sltiu v0,v0,2=0A= 2128: 1440000e bnez v0,2164 =0A= 212c: 8ce50104 lw a1,260(a3)=0A= 2130: 8ce60008 lw a2,8(a3)=0A= }=0A= =0A= static __inline__ __const__ __u32 __fswab32(__u32 x)=0A= {=0A= return __arch__swab32(x);=0A= 2134: 30a4ff00 andi a0,a1,0xff00=0A= 2138: 00051600 sll v0,a1,0x18=0A= 213c: 00051a02 srl v1,a1,0x8=0A= 2140: 00042200 sll a0,a0,0x8=0A= 2144: 00441025 or v0,v0,a0=0A= 2148: 3063ff00 andi v1,v1,0xff00=0A= 214c: 00431025 or v0,v0,v1=0A= 2150: 00052e02 srl a1,a1,0x18=0A= 2154: 00451025 or v0,v0,a1=0A= =0A= /* Set the Tx Interrupt Delay register */=0A= =0A= E1000_WRITE_REG(&adapter->shared, TIDV, adapter->tx_int_delay);=0A= 2158: acc23820 sw v0,14368(a2)=0A= 215c: 08000865 j 2194 =0A= 2160: 8ce2000c lw v0,12(a3)=0A= 2164: 8ce60008 lw a2,8(a3)=0A= }=0A= =0A= static __inline__ __const__ __u32 __fswab32(__u32 x)=0A= {=0A= return __arch__swab32(x);=0A= 2168: 30a4ff00 andi a0,a1,0xff00=0A= 216c: 00051600 sll v0,a1,0x18=0A= 2170: 00051a02 srl v1,a1,0x8=0A= 2174: 00042200 sll a0,a0,0x8=0A= 2178: 00441025 or v0,v0,a0=0A= 217c: 3063ff00 andi v1,v1,0xff00=0A= 2180: 00431025 or v0,v0,v1=0A= 2184: 00052e02 srl a1,a1,0x18=0A= 2188: 00451025 or v0,v0,a1=0A= 218c: acc20440 sw v0,1088(a2)=0A= =0A= /* Program the Transmit Control Register */=0A= =0A= tctl =3D=0A= E1000_TCTL_PSP | E1000_TCTL_EN | (E1000_COLLISION_THRESHOLD <<=0A= E1000_CT_SHIFT);=0A= if(adapter->link_duplex =3D=3D FULL_DUPLEX) {=0A= tctl |=3D E1000_FDX_COLLISION_DISTANCE << E1000_COLD_SHIFT;=0A= } else {=0A= tctl |=3D E1000_HDX_COLLISION_DISTANCE << E1000_COLD_SHIFT;=0A= }=0A= 2190: 8ce2000c lw v0,12(a3)=0A= 2194: 2c420002 sltiu v0,v0,2=0A= E1000_WRITE_REG(&adapter->shared, TCTL, tctl);=0A= 2198: 8ce30008 lw v1,8(a3)=0A= }=0A= =0A= static __inline__ __const__ __u32 __fswab32(__u32 x)=0A= {=0A= return __arch__swab32(x);=0A= 219c: 3c020a01 lui v0,0xa01=0A= 21a0: 34420400 ori v0,v0,0x400=0A= 21a4: ac620400 sw v0,1024(v1)=0A= =0A= #if defined(CONFIG_PPC) || defined(CONFIG_MIPS)=0A= if(adapter->shared.mac_type >=3D e1000_82543) {=0A= 21a8: 8ce2000c lw v0,12(a3)=0A= 21ac: 2c420002 sltiu v0,v0,2=0A= 21b0: 54400005 bnezl v0,21c8 =0A= 21b4: 8ce30104 lw v1,260(a3)=0A= E1000_WRITE_REG(&adapter->shared, TXDCTL, 0x00020000);=0A= 21b8: 8ce30008 lw v1,8(a3)=0A= 21bc: 24020200 li v0,512=0A= 21c0: ac623828 sw v0,14376(v1)=0A= }=0A= #endif=0A= =0A= /* Setup Transmit Descriptor Settings for this adapter */=0A= adapter->TxdCmd =3D E1000_TXD_CMD_IFCS;=0A= =0A= if(adapter->tx_int_delay > 0)=0A= 21c4: 8ce30104 lw v1,260(a3)=0A= 21c8: 3c020200 lui v0,0x200=0A= 21cc: 10600003 beqz v1,21dc =0A= 21d0: ace20108 sw v0,264(a3)=0A= adapter->TxdCmd |=3D E1000_TXD_CMD_IDE;=0A= 21d4: 3c028200 lui v0,0x8200=0A= 21d8: ace20108 sw v0,264(a3)=0A= if(adapter->shared.report_tx_early =3D=3D 1)=0A= 21dc: 8ce3006c lw v1,108(a3)=0A= 21e0: 24020001 li v0,1=0A= 21e4: 14620003 bne v1,v0,21f4 =0A= 21e8: 8ce20108 lw v0,264(a3)=0A= adapter->TxdCmd |=3D E1000_TXD_CMD_RS;=0A= 21ec: 0800087e j 21f8 =0A= 21f0: 3c030800 lui v1,0x800=0A= else=0A= adapter->TxdCmd |=3D E1000_TXD_CMD_RPS;=0A= 21f4: 3c031000 lui v1,0x1000=0A= 21f8: 00431025 or v0,v0,v1=0A= 21fc: ace20108 sw v0,264(a3)=0A= =0A= adapter->ActiveChecksumContext =3D OFFLOAD_NONE;=0A= =0A= return;=0A= }=0A= 2200: 03e00008 jr ra=0A= 2204: ace001b4 sw zero,436(a3)=0A= =0A= 00002208 :=0A= 2208: 27bdffd8 addiu sp,sp,-40=0A= 220c: afb3001c sw s3,28(sp)=0A= 2210: afb10014 sw s1,20(sp)=0A= 2214: afb00010 sw s0,16(sp)=0A= 2218: 00808821 move s1,a0=0A= 221c: afbf0020 sw ra,32(sp)=0A= 2220: afb20018 sw s2,24(sp)=0A= =0A= /**=0A= * e1000_setup_rx_resources - allocate Rx resources (Descriptors, = receive SKBs)=0A= * @adapter: board private structure=0A= * =0A= * Returns 0 on success, negative on failure=0A= *=0A= * e1000_setup_rx_resources allocates all software receive resources=0A= * and network buffers, and enables the Rx unit of the MAC.=0A= **/=0A= =0A= static int=0A= e1000_setup_rx_resources(struct e1000_adapter *adapter)=0A= {=0A= struct pci_dev *pdev =3D adapter->pdev;=0A= int size;=0A= =0A= E1000_DBG("e1000_setup_rx_resources\n");=0A= =0A= size =3D sizeof(struct e1000_buffer) * adapter->rx_ring.count;=0A= 2224: 8e23011c lw v1,284(s1)=0A= adapter->rx_ring.buffer_info =3D kmalloc(size, GFP_KERNEL);=0A= 2228: 240501f0 li a1,496=0A= 222c: 3c020000 lui v0,0x0=0A= 2230: 24420000 addiu v0,v0,0=0A= 2234: 00038040 sll s0,v1,0x1=0A= 2238: 02038021 addu s0,s0,v1=0A= 223c: 001080c0 sll s0,s0,0x3=0A= 2240: 02002021 move a0,s0=0A= 2244: 0040f809 jalr v0=0A= 2248: 8e32014c lw s2,332(s1)=0A= 224c: 00401821 move v1,v0=0A= if(adapter->rx_ring.buffer_info =3D=3D NULL) {=0A= return -ENOMEM;=0A= }=0A= memset(adapter->rx_ring.buffer_info, 0, size);=0A= 2250: 3c130000 lui s3,0x0=0A= 2254: 26730000 addiu s3,s3,0=0A= 2258: 00602021 move a0,v1=0A= 225c: 02003021 move a2,s0=0A= 2260: 00002821 move a1,zero=0A= 2264: ae23012c sw v1,300(s1)=0A= 2268: 10600020 beqz v1,22ec =0A= 226c: 2402fff4 li v0,-12=0A= 2270: 0260f809 jalr s3=0A= 2274: 00000000 nop=0A= =0A= /* Round up to nearest 4K */=0A= =0A= adapter->rx_ring.size =3D E1000_ROUNDUP2(adapter->rx_ring.count *=0A= 2278: 8e23011c lw v1,284(s1)=0A= 227c: 2405f000 li a1,-4096=0A= sizeof(struct e1000_rx_desc),=0A= 4096);=0A= =0A= adapter->rx_ring.desc =3D pci_alloc_consistent(pdev, = adapter->rx_ring.size, =0A= 2280: 02402021 move a0,s2=0A= 2284: 00031900 sll v1,v1,0x4=0A= 2288: 24630fff addiu v1,v1,4095=0A= 228c: 00651824 and v1,v1,a1=0A= 2290: 00602821 move a1,v1=0A= 2294: ae230118 sw v1,280(s1)=0A= 2298: 3c020000 lui v0,0x0=0A= 229c: 24420000 addiu v0,v0,0=0A= 22a0: 0040f809 jalr v0=0A= 22a4: 26260114 addiu a2,s1,276=0A= &adapter->rx_ring.dma);=0A= =0A= if(adapter->rx_ring.desc =3D=3D NULL) {=0A= kfree(adapter->rx_ring.buffer_info);=0A= return -ENOMEM;=0A= }=0A= memset(adapter->rx_ring.desc, 0, adapter->rx_ring.size);=0A= 22a8: 00402021 move a0,v0=0A= 22ac: 00002821 move a1,zero=0A= 22b0: 3c030000 lui v1,0x0=0A= 22b4: 24630000 addiu v1,v1,0=0A= 22b8: 14400005 bnez v0,22d0 =0A= 22bc: ae220110 sw v0,272(s1)=0A= 22c0: 0060f809 jalr v1=0A= 22c4: 8e24012c lw a0,300(s1)=0A= 22c8: 080008bb j 22ec =0A= 22cc: 2402fff4 li v0,-12=0A= 22d0: 0260f809 jalr s3=0A= 22d4: 8e260118 lw a2,280(s1)=0A= =0A= adapter->rx_ring.next_to_clean =3D 0;=0A= atomic_set(&adapter->rx_ring.unused, adapter->rx_ring.count);=0A= 22d8: 8e23011c lw v1,284(s1)=0A= =0A= adapter->rx_ring.next_to_use =3D 0;=0A= 22dc: ae200124 sw zero,292(s1)=0A= 22e0: ae200128 sw zero,296(s1)=0A= 22e4: ae230120 sw v1,288(s1)=0A= =0A= return 0;=0A= 22e8: 00001021 move v0,zero=0A= }=0A= 22ec: 8fbf0020 lw ra,32(sp)=0A= 22f0: 8fb3001c lw s3,28(sp)=0A= 22f4: 8fb20018 lw s2,24(sp)=0A= 22f8: 8fb10014 lw s1,20(sp)=0A= 22fc: 8fb00010 lw s0,16(sp)=0A= 2300: 03e00008 jr ra=0A= 2304: 27bd0028 addiu sp,sp,40=0A= =0A= 00002308 :=0A= 2308: 00802821 move a1,a0=0A= =0A= /**=0A= * e1000_setup_rctl - configure the receive control register=0A= * @adapter: Board private structure=0A= **/=0A= =0A= static void=0A= e1000_setup_rctl(struct e1000_adapter *adapter)=0A= {=0A= uint32_t rctl;=0A= =0A= /* Setup the Receive Control Register */=0A= rctl =3D=0A= 230c: 8ca20040 lw v0,64(a1)=0A= E1000_RCTL_EN | E1000_RCTL_BAM | E1000_RCTL_LBM_NO |=0A= E1000_RCTL_RDMTS_HALF | (adapter->shared.=0A= mc_filter_type << E1000_RCTL_MO_SHIFT);=0A= =0A= if(adapter->shared.tbi_compatibility_on =3D=3D 1)=0A= 2310: 8ca40060 lw a0,96(a1)=0A= 2314: 24030001 li v1,1=0A= 2318: 00021300 sll v0,v0,0xc=0A= 231c: 14830002 bne a0,v1,2328 =0A= 2320: 34468002 ori a2,v0,0x8002=0A= rctl |=3D E1000_RCTL_SBP;=0A= 2324: 34468006 ori a2,v0,0x8006=0A= =0A= switch (adapter->rx_buffer_len) {=0A= 2328: 8ca300b8 lw v1,184(a1)=0A= 232c: 24021000 li v0,4096=0A= 2330: 1062000c beq v1,v0,2364 =0A= 2334: 3c020203 lui v0,0x203=0A= 2338: 2c621001 sltiu v0,v1,4097=0A= 233c: 5440000c bnezl v0,2370 =0A= 2340: 8ca2000c lw v0,12(a1)=0A= 2344: 24022000 li v0,8192=0A= 2348: 10620006 beq v1,v0,2364 =0A= 234c: 3c020202 lui v0,0x202=0A= 2350: 24024000 li v0,16384=0A= 2354: 50620003 beql v1,v0,2364 =0A= 2358: 3c020201 lui v0,0x201=0A= 235c: 080008dc j 2370 =0A= 2360: 8ca2000c lw v0,12(a1)=0A= case E1000_RXBUFFER_2048:=0A= default:=0A= rctl |=3D E1000_RCTL_SZ_2048;=0A= break;=0A= case E1000_RXBUFFER_4096:=0A= rctl |=3D E1000_RCTL_SZ_4096 | E1000_RCTL_BSEX | E1000_RCTL_LPE;=0A= break;=0A= case E1000_RXBUFFER_8192:=0A= rctl |=3D E1000_RCTL_SZ_8192 | E1000_RCTL_BSEX | E1000_RCTL_LPE;=0A= break;=0A= case E1000_RXBUFFER_16384:=0A= rctl |=3D E1000_RCTL_SZ_16384 | E1000_RCTL_BSEX | E1000_RCTL_LPE;=0A= 2364: 34420020 ori v0,v0,0x20=0A= 2368: 00c23025 or a2,a2,v0=0A= break;=0A= }=0A= 236c: 8ca2000c lw v0,12(a1)=0A= 2370: 2c420002 sltiu v0,v0,2=0A= }=0A= =0A= static __inline__ __const__ __u32 __fswab32(__u32 x)=0A= {=0A= return __arch__swab32(x);=0A= 2374: 30c3ff00 andi v1,a2,0xff00=0A= 2378: 00031a00 sll v1,v1,0x8=0A= 237c: 00061600 sll v0,a2,0x18=0A= 2380: 00062202 srl a0,a2,0x8=0A= 2384: 00431025 or v0,v0,v1=0A= =0A= E1000_WRITE_REG(&adapter->shared, RCTL, rctl);=0A= 2388: 8ca50008 lw a1,8(a1)=0A= }=0A= =0A= static __inline__ __const__ __u32 __fswab32(__u32 x)=0A= {=0A= return __arch__swab32(x);=0A= 238c: 3084ff00 andi a0,a0,0xff00=0A= 2390: 00441025 or v0,v0,a0=0A= 2394: 00061e02 srl v1,a2,0x18=0A= 2398: 00431025 or v0,v0,v1=0A= 239c: aca20100 sw v0,256(a1)=0A= }=0A= 23a0: 03e00008 jr ra=0A= 23a4: 00000000 nop=0A= =0A= 000023a8 :=0A= 23a8: 00804021 move t0,a0=0A= =0A= /**=0A= * e1000_configure_rx - Configure 8254x Receive Unit after Reset=0A= * @adapter: board private structure=0A= *=0A= * Configure the Rx unit of the MAC after a reset.=0A= **/=0A= =0A= static void=0A= e1000_configure_rx(struct e1000_adapter *adapter)=0A= {=0A= uint32_t rctl;=0A= 23ac: 8d04000c lw a0,12(t0)=0A= 23b0: 00803821 move a3,a0=0A= 23b4: 2ce20002 sltiu v0,a3,2=0A= uint32_t rxcsum;=0A= =0A= /* make sure receives are disabled while setting up the descriptor = ring */=0A= rctl =3D E1000_READ_REG(&adapter->shared, RCTL);=0A= 23b8: 8d060008 lw a2,8(t0)=0A= __arch__swab16s(addr);=0A= }=0A= =0A= static __inline__ __const__ __u32 __fswab32(__u32 x)=0A= {=0A= 23bc: 8cc50100 lw a1,256(a2)=0A= return __arch__swab32(x);=0A= 23c0: 30a3ff00 andi v1,a1,0xff00=0A= 23c4: 00052600 sll a0,a1,0x18=0A= 23c8: 00051202 srl v0,a1,0x8=0A= 23cc: 00031a00 sll v1,v1,0x8=0A= 23d0: 00832025 or a0,a0,v1=0A= 23d4: 3042ff00 andi v0,v0,0xff00=0A= 23d8: 00822025 or a0,a0,v0=0A= 23dc: 00052e02 srl a1,a1,0x18=0A= 23e0: 00854825 or t1,a0,a1=0A= 23e4: 2ce20002 sltiu v0,a3,2=0A= E1000_WRITE_REG(&adapter->shared, RCTL, rctl & ~E1000_RCTL_EN);=0A= 23e8: 2404fffd li a0,-3=0A= 23ec: 01242024 and a0,t1,a0=0A= }=0A= =0A= static __inline__ __const__ __u32 __fswab32(__u32 x)=0A= {=0A= return __arch__swab32(x);=0A= 23f0: 312200fd andi v0,t1,0xfd=0A= 23f4: 312aff00 andi t2,t1,0xff00=0A= 23f8: 00041a02 srl v1,a0,0x8=0A= 23fc: 00021600 sll v0,v0,0x18=0A= 2400: 000a2a00 sll a1,t2,0x8=0A= 2404: 00451025 or v0,v0,a1=0A= 2408: 3063ff00 andi v1,v1,0xff00=0A= 240c: 00431025 or v0,v0,v1=0A= 2410: 00042602 srl a0,a0,0x18=0A= 2414: 00441025 or v0,v0,a0=0A= 2418: acc20100 sw v0,256(a2)=0A= 241c: 8d02000c lw v0,12(t0)=0A= 2420: 2c420002 sltiu v0,v0,2=0A= 2424: 14400010 bnez v0,2468 =0A= 2428: 8d040130 lw a0,304(t0)=0A= 242c: 3c028000 lui v0,0x8000=0A= 2430: 8d060008 lw a2,8(t0)=0A= 2434: 00822025 or a0,a0,v0=0A= }=0A= =0A= static __inline__ __const__ __u32 __fswab32(__u32 x)=0A= {=0A= return __arch__swab32(x);=0A= 2438: 3085ff00 andi a1,a0,0xff00=0A= 243c: 00041600 sll v0,a0,0x18=0A= 2440: 00041a02 srl v1,a0,0x8=0A= 2444: 00052a00 sll a1,a1,0x8=0A= 2448: 00451025 or v0,v0,a1=0A= 244c: 3063ff00 andi v1,v1,0xff00=0A= 2450: 00431025 or v0,v0,v1=0A= 2454: 00042602 srl a0,a0,0x18=0A= 2458: 00441025 or v0,v0,a0=0A= =0A= /* set the Receive Delay Timer Register */=0A= E1000_WRITE_REG(&adapter->shared, RDTR,=0A= 245c: acc22820 sw v0,10272(a2)=0A= 2460: 08000928 j 24a0 =0A= 2464: 8d02000c lw v0,12(t0)=0A= 2468: 3c028000 lui v0,0x8000=0A= 246c: 8d060008 lw a2,8(t0)=0A= 2470: 00822025 or a0,a0,v0=0A= }=0A= =0A= static __inline__ __const__ __u32 __fswab32(__u32 x)=0A= {=0A= return __arch__swab32(x);=0A= 2474: 3085ff00 andi a1,a0,0xff00=0A= 2478: 00041600 sll v0,a0,0x18=0A= 247c: 00041a02 srl v1,a0,0x8=0A= 2480: 00052a00 sll a1,a1,0x8=0A= 2484: 00451025 or v0,v0,a1=0A= 2488: 3063ff00 andi v1,v1,0xff00=0A= 248c: 00431025 or v0,v0,v1=0A= 2490: 00042602 srl a0,a0,0x18=0A= 2494: 00441025 or v0,v0,a0=0A= 2498: acc20108 sw v0,264(a2)=0A= 249c: 8d02000c lw v0,12(t0)=0A= 24a0: 2c420002 sltiu v0,v0,2=0A= 24a4: 1440000e bnez v0,24e0 =0A= 24a8: 8d050114 lw a1,276(t0)=0A= 24ac: 8d060008 lw a2,8(t0)=0A= }=0A= =0A= static __inline__ __const__ __u32 __fswab32(__u32 x)=0A= {=0A= return __arch__swab32(x);=0A= 24b0: 30a4ff00 andi a0,a1,0xff00=0A= 24b4: 00051600 sll v0,a1,0x18=0A= 24b8: 00051a02 srl v1,a1,0x8=0A= 24bc: 00042200 sll a0,a0,0x8=0A= 24c0: 00441025 or v0,v0,a0=0A= 24c4: 3063ff00 andi v1,v1,0xff00=0A= 24c8: 00431025 or v0,v0,v1=0A= 24cc: 00052e02 srl a1,a1,0x18=0A= 24d0: 00451025 or v0,v0,a1=0A= adapter->rx_int_delay | E1000_RDT_FPDB);=0A= =0A= /* Setup the Base and Length of the Rx Descriptor Ring */=0A= /* rx_ring.dma can be either a 32 or 64 bit value */=0A= =0A= #if (BITS_PER_LONG =3D=3D 32)=0A= E1000_WRITE_REG(&adapter->shared, RDBAL, adapter->rx_ring.dma);=0A= 24d4: acc22800 sw v0,10240(a2)=0A= 24d8: 08000944 j 2510 =0A= 24dc: 8d02000c lw v0,12(t0)=0A= 24e0: 8d060008 lw a2,8(t0)=0A= }=0A= =0A= static __inline__ __const__ __u32 __fswab32(__u32 x)=0A= {=0A= return __arch__swab32(x);=0A= 24e4: 30a4ff00 andi a0,a1,0xff00=0A= 24e8: 00051600 sll v0,a1,0x18=0A= 24ec: 00051a02 srl v1,a1,0x8=0A= 24f0: 00042200 sll a0,a0,0x8=0A= 24f4: 00441025 or v0,v0,a0=0A= 24f8: 3063ff00 andi v1,v1,0xff00=0A= 24fc: 00431025 or v0,v0,v1=0A= 2500: 00052e02 srl a1,a1,0x18=0A= 2504: 00451025 or v0,v0,a1=0A= 2508: acc20110 sw v0,272(a2)=0A= 250c: 8d02000c lw v0,12(t0)=0A= 2510: 2c420002 sltiu v0,v0,2=0A= 2514: 14400004 bnez v0,2528 =0A= 2518: 8d020008 lw v0,8(t0)=0A= E1000_WRITE_REG(&adapter->shared, RDBAH, 0);=0A= 251c: ac402804 sw zero,10244(v0)=0A= 2520: 0800094c j 2530 =0A= 2524: 8d02000c lw v0,12(t0)=0A= 2528: ac400114 sw zero,276(v0)=0A= 252c: 8d02000c lw v0,12(t0)=0A= 2530: 2c420002 sltiu v0,v0,2=0A= 2534: 1440000f bnez v0,2574 =0A= 2538: 8d04011c lw a0,284(t0)=0A= 253c: 8d060008 lw a2,8(t0)=0A= 2540: 00042100 sll a0,a0,0x4=0A= }=0A= =0A= static __inline__ __const__ __u32 __fswab32(__u32 x)=0A= {=0A= return __arch__swab32(x);=0A= 2544: 3085ff00 andi a1,a0,0xff00=0A= 2548: 00041600 sll v0,a0,0x18=0A= 254c: 00041a02 srl v1,a0,0x8=0A= 2550: 00052a00 sll a1,a1,0x8=0A= 2554: 00451025 or v0,v0,a1=0A= 2558: 3063ff00 andi v1,v1,0xff00=0A= 255c: 00431025 or v0,v0,v1=0A= 2560: 00042602 srl a0,a0,0x18=0A= 2564: 00441025 or v0,v0,a0=0A= #elif ( BITS_PER_LONG =3D=3D 64)=0A= E1000_WRITE_REG(&adapter->shared, RDBAL,=0A= (uint32_t) (adapter->rx_ring.dma & = 0x00000000FFFFFFFF));=0A= E1000_WRITE_REG(&adapter->shared, RDBAH,=0A= (uint32_t) (adapter->rx_ring.dma >> 32));=0A= #else=0A= #error "Unsupported System - does not use 32 or 64 bit pointers!"=0A= #endif=0A= =0A= E1000_WRITE_REG(&adapter->shared, RDLEN,=0A= 2568: acc22808 sw v0,10248(a2)=0A= 256c: 0800096a j 25a8 =0A= 2570: 8d02000c lw v0,12(t0)=0A= 2574: 8d060008 lw a2,8(t0)=0A= 2578: 00042100 sll a0,a0,0x4=0A= }=0A= =0A= static __inline__ __const__ __u32 __fswab32(__u32 x)=0A= {=0A= return __arch__swab32(x);=0A= 257c: 3085ff00 andi a1,a0,0xff00=0A= 2580: 00041600 sll v0,a0,0x18=0A= 2584: 00041a02 srl v1,a0,0x8=0A= 2588: 00052a00 sll a1,a1,0x8=0A= 258c: 00451025 or v0,v0,a1=0A= 2590: 3063ff00 andi v1,v1,0xff00=0A= 2594: 00431025 or v0,v0,v1=0A= 2598: 00042602 srl a0,a0,0x18=0A= 259c: 00441025 or v0,v0,a0=0A= 25a0: acc20118 sw v0,280(a2)=0A= 25a4: 8d02000c lw v0,12(t0)=0A= 25a8: 2c420002 sltiu v0,v0,2=0A= 25ac: 14400004 bnez v0,25c0 =0A= 25b0: 8d020008 lw v0,8(t0)=0A= adapter->rx_ring.count * sizeof(struct = e1000_rx_desc));=0A= =0A= /* Setup the HW Rx Head and Tail Descriptor Pointers */=0A= E1000_WRITE_REG(&adapter->shared, RDH, 0);=0A= 25b4: ac402810 sw zero,10256(v0)=0A= 25b8: 08000972 j 25c8 =0A= 25bc: 8d02000c lw v0,12(t0)=0A= 25c0: ac400120 sw zero,288(v0)=0A= 25c4: 8d02000c lw v0,12(t0)=0A= 25c8: 2c420002 sltiu v0,v0,2=0A= 25cc: 14400004 bnez v0,25e0 =0A= 25d0: 8d020008 lw v0,8(t0)=0A= E1000_WRITE_REG(&adapter->shared, RDT, 0);=0A= 25d4: ac402818 sw zero,10264(v0)=0A= 25d8: 0800097a j 25e8 =0A= 25dc: 8d04000c lw a0,12(t0)=0A= 25e0: ac400128 sw zero,296(v0)=0A= =0A= /* Enable 82543 Receive Checksum Offload for TCP and UDP */=0A= if((adapter->shared.mac_type >=3D e1000_82543) &&=0A= 25e4: 8d04000c lw a0,12(t0)=0A= 25e8: 2c820002 sltiu v0,a0,2=0A= 25ec: 54400026 bnezl v0,2688 =0A= 25f0: 000a2200 sll a0,t2,0x8=0A= 25f4: 8d0301b0 lw v1,432(t0)=0A= 25f8: 24020001 li v0,1=0A= 25fc: 1462001a bne v1,v0,2668 =0A= 2600: 2c820002 sltiu v0,a0,2=0A= (adapter->RxChecksum =3D=3D TRUE)) {=0A= rxcsum =3D E1000_READ_REG(&adapter->shared, RXCSUM);=0A= 2604: 8d070008 lw a3,8(t0)=0A= }=0A= =0A= static __inline__ __const__ __u32 __fswab32(__u32 x)=0A= {=0A= return __arch__swab32(x);=0A= 2608: 3c0600ff lui a2,0xff=0A= 260c: 8ce55000 lw a1,20480(a3)=0A= 2610: 30a4ff00 andi a0,a1,0xff00=0A= 2614: 00a61024 and v0,a1,a2=0A= 2618: 00042200 sll a0,a0,0x8=0A= 261c: 00051e00 sll v1,a1,0x18=0A= 2620: 00641825 or v1,v1,a0=0A= 2624: 00021202 srl v0,v0,0x8=0A= 2628: 00621825 or v1,v1,v0=0A= 262c: 00052e02 srl a1,a1,0x18=0A= 2630: 00651825 or v1,v1,a1=0A= rxcsum |=3D E1000_RXCSUM_TUOFL;=0A= 2634: 34630200 ori v1,v1,0x200=0A= }=0A= =0A= static __inline__ __const__ __u32 __fswab32(__u32 x)=0A= {=0A= return __arch__swab32(x);=0A= 2638: 3064ff00 andi a0,v1,0xff00=0A= 263c: 00042200 sll a0,a0,0x8=0A= 2640: 00663024 and a2,v1,a2=0A= 2644: 00031600 sll v0,v1,0x18=0A= 2648: 00441025 or v0,v0,a0=0A= 264c: 00063202 srl a2,a2,0x8=0A= 2650: 00461025 or v0,v0,a2=0A= 2654: 00031e02 srl v1,v1,0x18=0A= 2658: 00431025 or v0,v0,v1=0A= E1000_WRITE_REG(&adapter->shared, RXCSUM, rxcsum);=0A= 265c: ace25000 sw v0,20480(a3)=0A= 2660: 8d04000c lw a0,12(t0)=0A= }=0A= #if defined(CONFIG_PPC) || defined(CONFIG_MIPS)=0A= if(adapter->shared.mac_type >=3D e1000_82543) {=0A= 2664: 2c820002 sltiu v0,a0,2=0A= 2668: 14400007 bnez v0,2688 =0A= 266c: 000a2200 sll a0,t2,0x8=0A= E1000_WRITE_REG(&adapter->shared, RXDCTL, 0x00020000);=0A= 2670: 8d040008 lw a0,8(t0)=0A= 2674: 24030200 li v1,512=0A= 2678: ac832828 sw v1,10280(a0)=0A= }=0A= 267c: 8d02000c lw v0,12(t0)=0A= 2680: 2c420002 sltiu v0,v0,2=0A= }=0A= =0A= static __inline__ __const__ __u32 __fswab32(__u32 x)=0A= {=0A= return __arch__swab32(x);=0A= 2684: 000a2200 sll a0,t2,0x8=0A= 2688: 00091600 sll v0,t1,0x18=0A= 268c: 00091a02 srl v1,t1,0x8=0A= 2690: 00441025 or v0,v0,a0=0A= #endif=0A= =0A= /* Enable Receives */=0A= E1000_WRITE_REG(&adapter->shared, RCTL, rctl);=0A= 2694: 8d050008 lw a1,8(t0)=0A= }=0A= =0A= static __inline__ __const__ __u32 __fswab32(__u32 x)=0A= {=0A= return __arch__swab32(x);=0A= 2698: 3063ff00 andi v1,v1,0xff00=0A= 269c: 00431025 or v0,v0,v1=0A= 26a0: 00092602 srl a0,t1,0x18=0A= 26a4: 00441025 or v0,v0,a0=0A= 26a8: aca20100 sw v0,256(a1)=0A= =0A= return;=0A= }=0A= 26ac: 03e00008 jr ra=0A= 26b0: 00000000 nop=0A= =0A= 000026b4 :=0A= 26b4: 27bdffe0 addiu sp,sp,-32=0A= 26b8: afbf0018 sw ra,24(sp)=0A= 26bc: afb00010 sw s0,16(sp)=0A= 26c0: afb10014 sw s1,20(sp)=0A= 26c4: 00808021 move s0,a0=0A= =0A= /**=0A= * e1000_free_tx_resources - Free Tx Resources=0A= * @adapter: board private structure=0A= *=0A= * Free all transmit software resources=0A= **/=0A= =0A= static void=0A= e1000_free_tx_resources(struct e1000_adapter *adapter)=0A= {=0A= struct pci_dev *pdev =3D adapter->pdev;=0A= =0A= E1000_DBG("e1000_free_tx_resources\n");=0A= =0A= e1000_clean_tx_ring(adapter);=0A= 26c8: 3c020000 lui v0,0x0=0A= 26cc: 24422720 addiu v0,v0,10016=0A= 26d0: 0040f809 jalr v0=0A= 26d4: 8e11014c lw s1,332(s0)=0A= =0A= kfree(adapter->tx_ring.buffer_info);=0A= 26d8: 3c020000 lui v0,0x0=0A= 26dc: 24420000 addiu v0,v0,0=0A= 26e0: 0040f809 jalr v0=0A= 26e4: 8e040100 lw a0,256(s0)=0A= adapter->tx_ring.buffer_info =3D NULL;=0A= =0A= pci_free_consistent(pdev, adapter->tx_ring.size, = adapter->tx_ring.desc,=0A= 26e8: 8e0500ec lw a1,236(s0)=0A= 26ec: 8e0600e4 lw a2,228(s0)=0A= 26f0: 8e0700e8 lw a3,232(s0)=0A= 26f4: 02202021 move a0,s1=0A= 26f8: 3c020000 lui v0,0x0=0A= 26fc: 24420000 addiu v0,v0,0=0A= 2700: 0040f809 jalr v0=0A= 2704: ae000100 sw zero,256(s0)=0A= adapter->tx_ring.dma);=0A= =0A= adapter->tx_ring.desc =3D NULL;=0A= =0A= return;=0A= }=0A= 2708: 8fbf0018 lw ra,24(sp)=0A= 270c: ae0000e4 sw zero,228(s0)=0A= 2710: 8fb10014 lw s1,20(sp)=0A= 2714: 8fb00010 lw s0,16(sp)=0A= 2718: 03e00008 jr ra=0A= 271c: 27bd0020 addiu sp,sp,32=0A= =0A= 00002720 :=0A= 2720: 27bdffd0 addiu sp,sp,-48=0A= 2724: afb10014 sw s1,20(sp)=0A= 2728: afb00010 sw s0,16(sp)=0A= 272c: afbf0028 sw ra,40(sp)=0A= 2730: afb50024 sw s5,36(sp)=0A= 2734: afb40020 sw s4,32(sp)=0A= 2738: afb3001c sw s3,28(sp)=0A= 273c: afb20018 sw s2,24(sp)=0A= 2740: 00808821 move s1,a0=0A= =0A= /**=0A= * e1000_clean_tx_ring - Free Tx Buffers=0A= * @adapter: board private structure=0A= **/=0A= =0A= static void=0A= e1000_clean_tx_ring(struct e1000_adapter *adapter)=0A= {=0A= struct pci_dev *pdev =3D adapter->pdev;=0A= unsigned long size;=0A= int i;=0A= =0A= /* Free all the Tx ring sk_buffs */=0A= =0A= for(i =3D 0; i < adapter->tx_ring.count; i++) {=0A= 2744: 8e2700f0 lw a3,240(s1)=0A= 2748: 10e00026 beqz a3,27e4 =0A= 274c: 00008021 move s0,zero=0A= 2750: 8e250100 lw a1,256(s1)=0A= 2754: 3c150000 lui s5,0x0=0A= 2758: 26b50000 addiu s5,s5,0=0A= 275c: 0000a021 move s4,zero=0A= 2760: 00009821 move s3,zero=0A= 2764: 00009021 move s2,zero=0A= if(adapter->tx_ring.buffer_info[i].skb !=3D NULL) {=0A= 2768: 02451021 addu v0,s2,a1=0A= 276c: 8c430000 lw v1,0(v0)=0A= =0A= pci_unmap_page(pdev, adapter->tx_ring.buffer_info[i].dma,=0A= adapter->tx_ring.buffer_info[i].length,=0A= PCI_DMA_TODEVICE);=0A= =0A= dev_kfree_skb(adapter->tx_ring.buffer_info[i].skb);=0A= 2770: 02652021 addu a0,s3,a1=0A= 2774: 10600013 beqz v1,27c4 =0A= 2778: 24060001 li a2,1=0A= * hit zero.=0A= */=0A= =0A= static inline void kfree_skb(struct sk_buff *skb)=0A= {=0A= 277c: 8c840000 lw a0,0(a0)=0A= if (atomic_read(&skb->users) =3D=3D 1 || = atomic_dec_and_test(&skb->users))=0A= 2780: 8c820070 lw v0,112(a0)=0A= 2784: 10460008 beq v0,a2,27a8 =0A= 2788: 24850070 addiu a1,a0,112=0A= extern __inline__ int atomic_sub_return(int i, atomic_t * v)=0A= {=0A= unsigned long temp, result;=0A= =0A= __asm__ __volatile__(=0A= 278c: c0a30000 ll v1,0(a1)=0A= 2790: 00661023 subu v0,v1,a2=0A= 2794: e0a20000 sc v0,0(a1)=0A= 2798: 1040fffc beqz v0,278c =0A= 279c: 00661023 subu v0,v1,a2=0A= */=0A= =0A= static inline void kfree_skb(struct sk_buff *skb)=0A= {=0A= if (atomic_read(&skb->users) =3D=3D 1 || = atomic_dec_and_test(&skb->users))=0A= 27a0: 54400004 bnezl v0,27b4 =0A= 27a4: 8e220100 lw v0,256(s1)=0A= __kfree_skb(skb);=0A= 27a8: 02a0f809 jalr s5=0A= 27ac: 00000000 nop=0A= =0A= adapter->tx_ring.buffer_info[i].skb =3D NULL;=0A= 27b0: 8e220100 lw v0,256(s1)=0A= 27b4: 02821021 addu v0,s4,v0=0A= 27b8: ac400000 sw zero,0(v0)=0A= 27bc: 8e250100 lw a1,256(s1)=0A= 27c0: 8e2700f0 lw a3,240(s1)=0A= 27c4: 26100001 addiu s0,s0,1=0A= 27c8: 0207102b sltu v0,s0,a3=0A= 27cc: 26940018 addiu s4,s4,24=0A= 27d0: 26730018 addiu s3,s3,24=0A= 27d4: 1440ffe4 bnez v0,2768 =0A= 27d8: 26520018 addiu s2,s2,24=0A= 27dc: 080009fb j 27ec =0A= 27e0: 00073040 sll a2,a3,0x1=0A= 27e4: 8e250100 lw a1,256(s1)=0A= }=0A= }=0A= =0A= size =3D sizeof(struct e1000_buffer) * adapter->tx_ring.count;=0A= 27e8: 00073040 sll a2,a3,0x1=0A= 27ec: 00c73021 addu a2,a2,a3=0A= memset(adapter->tx_ring.buffer_info, 0, size);=0A= 27f0: 00a02021 move a0,a1=0A= 27f4: 3c100000 lui s0,0x0=0A= 27f8: 26100000 addiu s0,s0,0=0A= 27fc: 000630c0 sll a2,a2,0x3=0A= 2800: 0200f809 jalr s0=0A= 2804: 00002821 move a1,zero=0A= =0A= /* Zero out the descriptor ring */=0A= =0A= memset(adapter->tx_ring.desc, 0, adapter->tx_ring.size);=0A= 2808: 8e2400e4 lw a0,228(s1)=0A= 280c: 8e2600ec lw a2,236(s1)=0A= 2810: 0200f809 jalr s0=0A= 2814: 00002821 move a1,zero=0A= =0A= atomic_set(&adapter->tx_ring.unused, adapter->tx_ring.count);=0A= 2818: 8e2300f0 lw v1,240(s1)=0A= adapter->tx_ring.next_to_use =3D 0;=0A= adapter->tx_ring.next_to_clean =3D 0;=0A= 281c: ae2000fc sw zero,252(s1)=0A= 2820: ae2000f8 sw zero,248(s1)=0A= 2824: ae2300f4 sw v1,244(s1)=0A= =0A= return;=0A= }=0A= 2828: 8fbf0028 lw ra,40(sp)=0A= 282c: 8fb50024 lw s5,36(sp)=0A= 2830: 8fb40020 lw s4,32(sp)=0A= 2834: 8fb3001c lw s3,28(sp)=0A= 2838: 8fb20018 lw s2,24(sp)=0A= 283c: 8fb10014 lw s1,20(sp)=0A= 2840: 8fb00010 lw s0,16(sp)=0A= 2844: 03e00008 jr ra=0A= 2848: 27bd0030 addiu sp,sp,48=0A= =0A= 0000284c :=0A= 284c: 27bdffe0 addiu sp,sp,-32=0A= 2850: afb00010 sw s0,16(sp)=0A= 2854: afbf0018 sw ra,24(sp)=0A= 2858: 00808021 move s0,a0=0A= 285c: afb10014 sw s1,20(sp)=0A= =0A= /**=0A= * e1000_free_rx_resources - Free Rx Resources=0A= * @adapter: board private structure=0A= *=0A= * Free all receive software resources=0A= **/=0A= =0A= static void=0A= e1000_free_rx_resources(struct e1000_adapter *adapter)=0A= {=0A= struct pci_dev *pdev =3D adapter->pdev;=0A= 2860: 8e11014c lw s1,332(s0)=0A= * Atomically adds @i to @v. Note that the guaranteed useful range=0A= * of an atomic_t is only 24 bits.=0A= */=0A= extern __inline__ void atomic_add(int i, atomic_t * v)=0A= {=0A= 2864: 24030001 li v1,1=0A= 2868: 260200d8 addiu v0,s0,216=0A= unsigned long temp;=0A= =0A= __asm__ __volatile__(=0A= 286c: c0440000 ll a0,0(v0)=0A= 2870: 00832021 addu a0,a0,v1=0A= 2874: e0440000 sc a0,0(v0)=0A= 2878: 1080fffc beqz a0,286c =0A= 287c: 00000000 nop=0A= =0A= E1000_DBG("e1000_free_rx_resources\n");=0A= =0A= tasklet_disable(&adapter->rx_fill_tasklet);=0A= =0A= e1000_clean_rx_ring(adapter);=0A= 2880: 3c020000 lui v0,0x0=0A= 2884: 244228d8 addiu v0,v0,10456=0A= 2888: 0040f809 jalr v0=0A= 288c: 02002021 move a0,s0=0A= =0A= kfree(adapter->rx_ring.buffer_info);=0A= 2890: 3c020000 lui v0,0x0=0A= 2894: 24420000 addiu v0,v0,0=0A= 2898: 0040f809 jalr v0=0A= 289c: 8e04012c lw a0,300(s0)=0A= adapter->rx_ring.buffer_info =3D NULL;=0A= =0A= pci_free_consistent(pdev, adapter->rx_ring.size, = adapter->rx_ring.desc,=0A= 28a0: 8e050118 lw a1,280(s0)=0A= 28a4: 8e060110 lw a2,272(s0)=0A= 28a8: 8e070114 lw a3,276(s0)=0A= 28ac: 02202021 move a0,s1=0A= 28b0: 3c020000 lui v0,0x0=0A= 28b4: 24420000 addiu v0,v0,0=0A= 28b8: 0040f809 jalr v0=0A= 28bc: ae00012c sw zero,300(s0)=0A= adapter->rx_ring.dma);=0A= =0A= adapter->rx_ring.desc =3D NULL;=0A= =0A= return;=0A= }=0A= 28c0: 8fbf0018 lw ra,24(sp)=0A= 28c4: ae000110 sw zero,272(s0)=0A= 28c8: 8fb10014 lw s1,20(sp)=0A= 28cc: 8fb00010 lw s0,16(sp)=0A= 28d0: 03e00008 jr ra=0A= 28d4: 27bd0020 addiu sp,sp,32=0A= =0A= 000028d8 :=0A= 28d8: 27bdffd0 addiu sp,sp,-48=0A= 28dc: afb10014 sw s1,20(sp)=0A= 28e0: afb00010 sw s0,16(sp)=0A= 28e4: afbf0028 sw ra,40(sp)=0A= 28e8: afb50024 sw s5,36(sp)=0A= 28ec: afb40020 sw s4,32(sp)=0A= 28f0: afb3001c sw s3,28(sp)=0A= 28f4: afb20018 sw s2,24(sp)=0A= 28f8: 00808821 move s1,a0=0A= =0A= /**=0A= * e1000_clean_rx_ring - Free Rx Buffers=0A= * @adapter: board private structure=0A= **/=0A= =0A= static void=0A= e1000_clean_rx_ring(struct e1000_adapter *adapter)=0A= {=0A= struct pci_dev *pdev =3D adapter->pdev;=0A= unsigned long size;=0A= int i;=0A= =0A= /* Free all the Rx ring sk_buffs */=0A= =0A= for(i =3D 0; i < adapter->rx_ring.count; i++) {=0A= 28fc: 8e27011c lw a3,284(s1)=0A= 2900: 10e00026 beqz a3,299c =0A= 2904: 00008021 move s0,zero=0A= 2908: 8e25012c lw a1,300(s1)=0A= 290c: 3c150000 lui s5,0x0=0A= 2910: 26b50000 addiu s5,s5,0=0A= 2914: 0000a021 move s4,zero=0A= 2918: 00009821 move s3,zero=0A= 291c: 00009021 move s2,zero=0A= if(adapter->rx_ring.buffer_info[i].skb !=3D NULL) {=0A= 2920: 02451021 addu v0,s2,a1=0A= 2924: 8c430000 lw v1,0(v0)=0A= =0A= pci_unmap_single(pdev, adapter->rx_ring.buffer_info[i].dma,=0A= adapter->rx_ring.buffer_info[i].length,=0A= PCI_DMA_FROMDEVICE);=0A= =0A= dev_kfree_skb(adapter->rx_ring.buffer_info[i].skb);=0A= 2928: 02652021 addu a0,s3,a1=0A= 292c: 10600013 beqz v1,297c =0A= 2930: 24060001 li a2,1=0A= * hit zero.=0A= */=0A= =0A= static inline void kfree_skb(struct sk_buff *skb)=0A= {=0A= 2934: 8c840000 lw a0,0(a0)=0A= if (atomic_read(&skb->users) =3D=3D 1 || = atomic_dec_and_test(&skb->users))=0A= 2938: 8c820070 lw v0,112(a0)=0A= 293c: 10460008 beq v0,a2,2960 =0A= 2940: 24850070 addiu a1,a0,112=0A= extern __inline__ int atomic_sub_return(int i, atomic_t * v)=0A= {=0A= unsigned long temp, result;=0A= =0A= __asm__ __volatile__(=0A= 2944: c0a30000 ll v1,0(a1)=0A= 2948: 00661023 subu v0,v1,a2=0A= 294c: e0a20000 sc v0,0(a1)=0A= 2950: 1040fffc beqz v0,2944 =0A= 2954: 00661023 subu v0,v1,a2=0A= */=0A= =0A= static inline void kfree_skb(struct sk_buff *skb)=0A= {=0A= if (atomic_read(&skb->users) =3D=3D 1 || = atomic_dec_and_test(&skb->users))=0A= 2958: 54400004 bnezl v0,296c =0A= 295c: 8e22012c lw v0,300(s1)=0A= __kfree_skb(skb);=0A= 2960: 02a0f809 jalr s5=0A= 2964: 00000000 nop=0A= =0A= adapter->rx_ring.buffer_info[i].skb =3D NULL;=0A= 2968: 8e22012c lw v0,300(s1)=0A= 296c: 02821021 addu v0,s4,v0=0A= 2970: ac400000 sw zero,0(v0)=0A= 2974: 8e25012c lw a1,300(s1)=0A= 2978: 8e27011c lw a3,284(s1)=0A= 297c: 26100001 addiu s0,s0,1=0A= 2980: 0207102b sltu v0,s0,a3=0A= 2984: 26940018 addiu s4,s4,24=0A= 2988: 26730018 addiu s3,s3,24=0A= 298c: 1440ffe4 bnez v0,2920 =0A= 2990: 26520018 addiu s2,s2,24=0A= 2994: 08000a69 j 29a4 =0A= 2998: 00073040 sll a2,a3,0x1=0A= 299c: 8e25012c lw a1,300(s1)=0A= }=0A= }=0A= =0A= size =3D sizeof(struct e1000_buffer) * adapter->rx_ring.count;=0A= 29a0: 00073040 sll a2,a3,0x1=0A= 29a4: 00c73021 addu a2,a2,a3=0A= memset(adapter->rx_ring.buffer_info, 0, size);=0A= 29a8: 00a02021 move a0,a1=0A= 29ac: 3c100000 lui s0,0x0=0A= 29b0: 26100000 addiu s0,s0,0=0A= 29b4: 000630c0 sll a2,a2,0x3=0A= 29b8: 0200f809 jalr s0=0A= 29bc: 00002821 move a1,zero=0A= =0A= /* Zero out the descriptor ring */=0A= =0A= memset(adapter->rx_ring.desc, 0, adapter->rx_ring.size);=0A= 29c0: 8e240110 lw a0,272(s1)=0A= 29c4: 8e260118 lw a2,280(s1)=0A= 29c8: 0200f809 jalr s0=0A= 29cc: 00002821 move a1,zero=0A= =0A= atomic_set(&adapter->rx_ring.unused, adapter->rx_ring.count);=0A= 29d0: 8e23011c lw v1,284(s1)=0A= adapter->rx_ring.next_to_clean =3D 0;=0A= adapter->rx_ring.next_to_use =3D 0;=0A= 29d4: ae200124 sw zero,292(s1)=0A= 29d8: ae200128 sw zero,296(s1)=0A= 29dc: ae230120 sw v1,288(s1)=0A= =0A= return;=0A= }=0A= 29e0: 8fbf0028 lw ra,40(sp)=0A= 29e4: 8fb50024 lw s5,36(sp)=0A= 29e8: 8fb40020 lw s4,32(sp)=0A= 29ec: 8fb3001c lw s3,28(sp)=0A= 29f0: 8fb20018 lw s2,24(sp)=0A= 29f4: 8fb10014 lw s1,20(sp)=0A= 29f8: 8fb00010 lw s0,16(sp)=0A= 29fc: 03e00008 jr ra=0A= 2a00: 27bd0030 addiu sp,sp,48=0A= =0A= 00002a04 :=0A= 2a04: 27bdfcd0 addiu sp,sp,-816=0A= 2a08: afb40320 sw s4,800(sp)=0A= 2a0c: afbf032c sw ra,812(sp)=0A= 2a10: afb60328 sw s6,808(sp)=0A= 2a14: afb50324 sw s5,804(sp)=0A= 2a18: afb3031c sw s3,796(sp)=0A= 2a1c: afb20318 sw s2,792(sp)=0A= 2a20: afb10314 sw s1,788(sp)=0A= 2a24: afb00310 sw s0,784(sp)=0A= 2a28: 0080a021 move s4,a0=0A= =0A= /**=0A= * e1000_set_multi - Multicast and Promiscuous mode set=0A= * @netdev: network interface device structure=0A= *=0A= * The set_multi entry point is called whenever the multicast address=0A= * list or the network interface flags are updated. This routine is=0A= * resposible for configuring the hardware for proper multicast,=0A= * promiscuous mode, and all-multi behavior.=0A= **/=0A= =0A= void=0A= e1000_set_multi(struct net_device *netdev)=0A= {=0A= struct e1000_adapter *adapter =3D netdev->priv;=0A= 2a2c: 8e910064 lw s1,100(s4)=0A= struct pci_dev *pdev =3D adapter->pdev;=0A= 2a30: 8e33000c lw s3,12(s1)=0A= 2a34: 8e35014c lw s5,332(s1)=0A= 2a38: 2e620002 sltiu v0,s3,2=0A= uint32_t rctl;=0A= uint8_t mta[MAX_NUM_MULTICAST_ADDRESSES * ETH_LENGTH_OF_ADDRESS];=0A= uint16_t pci_command_word;=0A= struct dev_mc_list *mc_ptr;=0A= int i;=0A= =0A= E1000_DBG("e1000_set_multi\n");=0A= =0A= rctl =3D E1000_READ_REG(&adapter->shared, RCTL);=0A= 2a3c: 8e320008 lw s2,8(s1)=0A= __arch__swab16s(addr);=0A= }=0A= =0A= static __inline__ __const__ __u32 __fswab32(__u32 x)=0A= {=0A= 2a40: 8e450100 lw a1,256(s2)=0A= return __arch__swab32(x);=0A= 2a44: 30a3ff00 andi v1,a1,0xff00=0A= 2a48: 00052600 sll a0,a1,0x18=0A= 2a4c: 00051202 srl v0,a1,0x8=0A= 2a50: 00031a00 sll v1,v1,0x8=0A= 2a54: 00832025 or a0,a0,v1=0A= 2a58: 3042ff00 andi v0,v0,0xff00=0A= 2a5c: 00822025 or a0,a0,v0=0A= 2a60: 00052e02 srl a1,a1,0x18=0A= =0A= if(adapter->shared.mac_type =3D=3D e1000_82542_rev2_0) {=0A= 2a64: 1660002d bnez s3,2b1c =0A= 2a68: 00858025 or s0,a0,a1=0A= if(adapter->shared.pci_cmd_word & PCI_COMMAND_INVALIDATE) {=0A= 2a6c: 9626004a lhu a2,74(s1)=0A= 2a70: 30c20010 andi v0,a2,0x10=0A= 2a74: 10400006 beqz v0,2a90 =0A= 2a78: 30c6ffef andi a2,a2,0xffef=0A= pci_command_word =3D=0A= adapter->shared.pci_cmd_word & ~PCI_COMMAND_INVALIDATE;=0A= pci_write_config_word(pdev, PCI_COMMAND, pci_command_word);=0A= 2a7c: 02a02021 move a0,s5=0A= 2a80: 3c020000 lui v0,0x0=0A= 2a84: 24420000 addiu v0,v0,0=0A= 2a88: 0040f809 jalr v0=0A= 2a8c: 24050004 li a1,4=0A= }=0A= rctl |=3D E1000_RCTL_RST;=0A= 2a90: 36100001 ori s0,s0,0x1=0A= }=0A= =0A= static __inline__ __const__ __u32 __fswab32(__u32 x)=0A= {=0A= return __arch__swab32(x);=0A= 2a94: 3204ff00 andi a0,s0,0xff00=0A= 2a98: 00042200 sll a0,a0,0x8=0A= 2a9c: 00101e00 sll v1,s0,0x18=0A= 2aa0: 00101202 srl v0,s0,0x8=0A= 2aa4: 00641825 or v1,v1,a0=0A= 2aa8: 3042ff00 andi v0,v0,0xff00=0A= 2aac: 00621825 or v1,v1,v0=0A= 2ab0: 00102602 srl a0,s0,0x18=0A= 2ab4: 00641825 or v1,v1,a0=0A= E1000_WRITE_REG(&adapter->shared, RCTL, rctl);=0A= 2ab8: ae430100 sw v1,256(s2)=0A= extern __inline__ void __udelay(unsigned long usecs, unsigned long lpj)=0A= {=0A= unsigned long lo;=0A= =0A= usecs *=3D 0x00068db8; /* 2**32 / (1000000 / HZ) */=0A= 2abc: 3c027fff lui v0,0x7fff=0A= 2ac0: 3c030000 lui v1,0x0=0A= 2ac4: 8c630000 lw v1,0(v1)=0A= 2ac8: 3442f1c0 ori v0,v0,0xf1c0=0A= __asm__("multu\t%2,%3"=0A= 2acc: 00430019 multu v0,v1=0A= 2ad0: 00001010 mfhi v0=0A= ...=0A= 2adc: 1440ffff bnez v0,2adc =0A= 2ae0: 2442ffff addiu v0,v0,-1=0A= * @addr: Address to start counting from=0A= */=0A= extern __inline__ int test_bit(int nr, volatile void *addr)=0A= {=0A= return ((1UL << (nr & 31)) & (((const unsigned int *) addr)[nr >> 5])) = !=3D 0;=0A= 2ae4: 8e23008c lw v1,140(s1)=0A= 2ae8: 30630001 andi v1,v1,0x1=0A= mdelay(5);=0A= if(test_bit(E1000_BOARD_OPEN, &adapter->flags)) {=0A= 2aec: 1060000b beqz v1,2b1c =0A= 2af0: 24030001 li v1,1=0A= * Atomically adds @i to @v. Note that the guaranteed useful range=0A= * of an atomic_t is only 24 bits.=0A= */=0A= extern __inline__ void atomic_add(int i, atomic_t * v)=0A= {=0A= 2af4: 262200d8 addiu v0,s1,216=0A= unsigned long temp;=0A= =0A= __asm__ __volatile__(=0A= 2af8: c0440000 ll a0,0(v0)=0A= 2afc: 00832021 addu a0,a0,v1=0A= 2b00: e0440000 sc a0,0(v0)=0A= 2b04: 1080fffc beqz a0,2af8 =0A= 2b08: 00000000 nop=0A= tasklet_disable(&adapter->rx_fill_tasklet);=0A= e1000_clean_rx_ring(adapter);=0A= 2b0c: 3c020000 lui v0,0x0=0A= 2b10: 244228d8 addiu v0,v0,10456=0A= 2b14: 0040f809 jalr v0=0A= 2b18: 02202021 move a0,s1=0A= }=0A= }=0A= =0A= /* Check for Promiscuous and All Multicast modes */=0A= =0A= if(netdev->flags & IFF_PROMISC) {=0A= 2b1c: 96830054 lhu v1,84(s4)=0A= 2b20: 30620100 andi v0,v1,0x100=0A= 2b24: 10400003 beqz v0,2b34 =0A= 2b28: 30620200 andi v0,v1,0x200=0A= rctl |=3D (E1000_RCTL_UPE | E1000_RCTL_MPE);=0A= } else if(netdev->flags & IFF_ALLMULTI) {=0A= 2b2c: 08000ad3 j 2b4c =0A= 2b30: 36100018 ori s0,s0,0x18=0A= 2b34: 10400003 beqz v0,2b44 =0A= 2b38: 2402fff7 li v0,-9=0A= rctl |=3D E1000_RCTL_MPE;=0A= rctl &=3D ~E1000_RCTL_UPE;=0A= } else {=0A= 2b3c: 08000ad2 j 2b48 =0A= 2b40: 36100010 ori s0,s0,0x10=0A= rctl &=3D ~(E1000_RCTL_UPE | E1000_RCTL_MPE);=0A= 2b44: 2402ffe7 li v0,-25=0A= 2b48: 02028024 and s0,s0,v0=0A= }=0A= =0A= if(netdev->mc_count > MAX_NUM_MULTICAST_ADDRESSES) {=0A= 2b4c: 8e820084 lw v0,132(s4)=0A= 2b50: 28420081 slti v0,v0,129=0A= 2b54: 1440000e bnez v0,2b90 =0A= 2b58: 2e620002 sltiu v0,s3,2=0A= rctl |=3D E1000_RCTL_MPE;=0A= 2b5c: 36100010 ori s0,s0,0x10=0A= }=0A= =0A= static __inline__ __const__ __u32 __fswab32(__u32 x)=0A= {=0A= return __arch__swab32(x);=0A= 2b60: 3204ff00 andi a0,s0,0xff00=0A= 2b64: 00042200 sll a0,a0,0x8=0A= 2b68: 00101600 sll v0,s0,0x18=0A= 2b6c: 00101a02 srl v1,s0,0x8=0A= 2b70: 00441025 or v0,v0,a0=0A= 2b74: 3063ff00 andi v1,v1,0xff00=0A= 2b78: 00431025 or v0,v0,v1=0A= 2b7c: 00102602 srl a0,s0,0x18=0A= 2b80: 00441025 or v0,v0,a0=0A= E1000_WRITE_REG(&adapter->shared, RCTL, rctl);=0A= 2b84: ae420100 sw v0,256(s2)=0A= } else {=0A= 2b88: 08000b05 j 2c14 =0A= 2b8c: 8e22000c lw v0,12(s1)=0A= }=0A= =0A= static __inline__ __const__ __u32 __fswab32(__u32 x)=0A= {=0A= return __arch__swab32(x);=0A= 2b90: 3204ff00 andi a0,s0,0xff00=0A= 2b94: 00042200 sll a0,a0,0x8=0A= 2b98: 00101600 sll v0,s0,0x18=0A= 2b9c: 00101a02 srl v1,s0,0x8=0A= 2ba0: 00441025 or v0,v0,a0=0A= 2ba4: 3063ff00 andi v1,v1,0xff00=0A= 2ba8: 00431025 or v0,v0,v1=0A= 2bac: 00102602 srl a0,s0,0x18=0A= 2bb0: 00441025 or v0,v0,a0=0A= E1000_WRITE_REG(&adapter->shared, RCTL, rctl);=0A= 2bb4: ae420100 sw v0,256(s2)=0A= for(i =3D 0, mc_ptr =3D netdev->mc_list; mc_ptr; i++, mc_ptr =3D = mc_ptr->next)=0A= 2bb8: 8e820080 lw v0,128(s4)=0A= 2bbc: 5040000e beqzl v0,2bf8 =0A= 2bc0: 8e860084 lw a2,132(s4)=0A= 2bc4: 02c01821 move v1,s6=0A= memcpy(&mta[i * ETH_LENGTH_OF_ADDRESS], mc_ptr->dmi_addr,=0A= 2bc8: 88440004 lwl a0,4(v0)=0A= 2bcc: 98440007 lwr a0,7(v0)=0A= 2bd0: 80450008 lb a1,8(v0)=0A= 2bd4: 80460009 lb a2,9(v0)=0A= 2bd8: a8640000 swl a0,0(v1)=0A= 2bdc: b8640003 swr a0,3(v1)=0A= 2be0: a0650004 sb a1,4(v1)=0A= 2be4: a0660005 sb a2,5(v1)=0A= 2be8: 8c420000 lw v0,0(v0)=0A= 2bec: 1440fff6 bnez v0,2bc8 =0A= 2bf0: 24630006 addiu v1,v1,6=0A= ETH_LENGTH_OF_ADDRESS);=0A= e1000_mc_addr_list_update(&adapter->shared, mta, = netdev->mc_count, 0);=0A= 2bf4: 8e860084 lw a2,132(s4)=0A= 2bf8: 26240008 addiu a0,s1,8=0A= 2bfc: 27a50010 addiu a1,sp,16=0A= 2c00: 3c020000 lui v0,0x0=0A= 2c04: 24420000 addiu v0,v0,0=0A= 2c08: 0040f809 jalr v0=0A= 2c0c: 00003821 move a3,zero=0A= }=0A= =0A= if(adapter->shared.mac_type =3D=3D e1000_82542_rev2_0) {=0A= 2c10: 8e22000c lw v0,12(s1)=0A= 2c14: 1440003b bnez v0,2d04 =0A= 2c18: 8fbf032c lw ra,812(sp)=0A= rctl =3D E1000_READ_REG(&adapter->shared, RCTL);=0A= 2c1c: 8e280008 lw t0,8(s1)=0A= }=0A= =0A= static __inline__ __const__ __u32 __fswab32(__u32 x)=0A= {=0A= return __arch__swab32(x);=0A= 2c20: 3c0700ff lui a3,0xff=0A= extern __inline__ void __udelay(unsigned long usecs, unsigned long lpj)=0A= {=0A= unsigned long lo;=0A= =0A= usecs *=3D 0x00068db8; /* 2**32 / (1000000 / HZ) */=0A= 2c24: 3c067fff lui a2,0x7fff=0A= __arch__swab16s(addr);=0A= }=0A= =0A= static __inline__ __const__ __u32 __fswab32(__u32 x)=0A= {=0A= 2c28: 8d020100 lw v0,256(t0)=0A= extern __inline__ void __udelay(unsigned long usecs, unsigned long lpj)=0A= {=0A= unsigned long lo;=0A= =0A= usecs *=3D 0x00068db8; /* 2**32 / (1000000 / HZ) */=0A= 2c2c: 34c6f1c0 ori a2,a2,0xf1c0=0A= }=0A= =0A= static __inline__ __const__ __u32 __fswab32(__u32 x)=0A= {=0A= return __arch__swab32(x);=0A= 2c30: 3043ff00 andi v1,v0,0xff00=0A= 2c34: 00472024 and a0,v0,a3=0A= 2c38: 00031a00 sll v1,v1,0x8=0A= 2c3c: 00022e00 sll a1,v0,0x18=0A= 2c40: 00a32825 or a1,a1,v1=0A= 2c44: 00042202 srl a0,a0,0x8=0A= 2c48: 00021602 srl v0,v0,0x18=0A= 2c4c: 00a42825 or a1,a1,a0=0A= rctl &=3D ~E1000_RCTL_RST;=0A= 2c50: 304200fe andi v0,v0,0xfe=0A= 2c54: 00458025 or s0,v0,a1=0A= }=0A= =0A= static __inline__ __const__ __u32 __fswab32(__u32 x)=0A= {=0A= return __arch__swab32(x);=0A= 2c58: 3204ff00 andi a0,s0,0xff00=0A= 2c5c: 00042200 sll a0,a0,0x8=0A= 2c60: 02073824 and a3,s0,a3=0A= 2c64: 00101e00 sll v1,s0,0x18=0A= 2c68: 00641825 or v1,v1,a0=0A= 2c6c: 00073a02 srl a3,a3,0x8=0A= 2c70: 00101602 srl v0,s0,0x18=0A= 2c74: 00671825 or v1,v1,a3=0A= 2c78: 00621825 or v1,v1,v0=0A= E1000_WRITE_REG(&adapter->shared, RCTL, rctl);=0A= 2c7c: ad030100 sw v1,256(t0)=0A= * first constant multiplications gets optimized away if the delay is=0A= * a constant)=0A= */=0A= extern __inline__ void __udelay(unsigned long usecs, unsigned long lpj)=0A= {=0A= 2c80: 3c020000 lui v0,0x0=0A= 2c84: 8c420000 lw v0,0(v0)=0A= unsigned long lo;=0A= =0A= usecs *=3D 0x00068db8; /* 2**32 / (1000000 / HZ) */=0A= __asm__("multu\t%2,%3"=0A= 2c88: 00c20019 multu a2,v0=0A= 2c8c: 00003010 mfhi a2=0A= ...=0A= 2c98: 14c0ffff bnez a2,2c98 =0A= 2c9c: 24c6ffff addiu a2,a2,-1=0A= mdelay(5);=0A= if(adapter->shared.pci_cmd_word & PCI_COMMAND_INVALIDATE) {=0A= 2ca0: 9622004a lhu v0,74(s1)=0A= 2ca4: 30420010 andi v0,v0,0x10=0A= 2ca8: 10400006 beqz v0,2cc4 =0A= 2cac: 02a02021 move a0,s5=0A= pci_write_config_word(pdev, PCI_COMMAND,=0A= 2cb0: 9626004a lhu a2,74(s1)=0A= 2cb4: 3c020000 lui v0,0x0=0A= 2cb8: 24420000 addiu v0,v0,0=0A= 2cbc: 0040f809 jalr v0=0A= 2cc0: 24050004 li a1,4=0A= * @addr: Address to start counting from=0A= */=0A= extern __inline__ int test_bit(int nr, volatile void *addr)=0A= {=0A= return ((1UL << (nr & 31)) & (((const unsigned int *) addr)[nr >> 5])) = !=3D 0;=0A= 2cc4: 8e22008c lw v0,140(s1)=0A= 2cc8: 30420001 andi v0,v0,0x1=0A= adapter->shared.pci_cmd_word);=0A= }=0A= if(test_bit(E1000_BOARD_OPEN, &adapter->flags)) {=0A= 2ccc: 1040000d beqz v0,2d04 =0A= 2cd0: 8fbf032c lw ra,812(sp)=0A= e1000_configure_rx(adapter);=0A= 2cd4: 3c020000 lui v0,0x0=0A= 2cd8: 244223a8 addiu v0,v0,9128=0A= 2cdc: 0040f809 jalr v0=0A= 2ce0: 02202021 move a0,s1=0A= * Atomically subtracts @i from @v. Note that the guaranteed=0A= * useful range of an atomic_t is only 24 bits.=0A= */=0A= extern __inline__ void atomic_sub(int i, atomic_t * v)=0A= {=0A= 2ce4: 262300d8 addiu v1,s1,216=0A= 2ce8: 24020001 li v0,1=0A= unsigned long temp;=0A= =0A= __asm__ __volatile__(=0A= 2cec: c0640000 ll a0,0(v1)=0A= 2cf0: 00822023 subu a0,a0,v0=0A= 2cf4: e0640000 sc a0,0(v1)=0A= 2cf8: 1080fffc beqz a0,2cec =0A= 2cfc: 00000000 nop=0A= tasklet_enable(&adapter->rx_fill_tasklet);=0A= }=0A= }=0A= =0A= return;=0A= }=0A= 2d00: 8fbf032c lw ra,812(sp)=0A= 2d04: 8fb60328 lw s6,808(sp)=0A= 2d08: 8fb50324 lw s5,804(sp)=0A= 2d0c: 8fb40320 lw s4,800(sp)=0A= 2d10: 8fb3031c lw s3,796(sp)=0A= 2d14: 8fb20318 lw s2,792(sp)=0A= 2d18: 8fb10314 lw s1,788(sp)=0A= 2d1c: 8fb00310 lw s0,784(sp)=0A= 2d20: 03e00008 jr ra=0A= 2d24: 27bd0330 addiu sp,sp,816=0A= =0A= 00002d28 :=0A= 2d28: 27bdffd0 addiu sp,sp,-48=0A= 2d2c: afb50024 sw s5,36(sp)=0A= 2d30: afb40020 sw s4,32(sp)=0A= 2d34: afb3001c sw s3,28(sp)=0A= 2d38: afbf0028 sw ra,40(sp)=0A= 2d3c: afb20018 sw s2,24(sp)=0A= 2d40: afb10014 sw s1,20(sp)=0A= 2d44: afb00010 sw s0,16(sp)=0A= 2d48: 0080a821 move s5,a0=0A= =0A= #ifdef IANS=0A= =0A= /* flush Tx queue without link */=0A= static void=0A= e1000_tx_flush(struct e1000_adapter *adapter)=0A= {=0A= uint32_t ctrl, txcw, icr;=0A= =0A= adapter->int_mask =3D 0;=0A= e1000_irq_disable(adapter);=0A= synchronize_irq();=0A= =0A= if(adapter->shared.mac_type < e1000_82543) {=0A= /* Transmit Unit Reset */=0A= E1000_WRITE_REG(&adapter->shared, TCTL, E1000_TCTL_RST);=0A= E1000_WRITE_REG(&adapter->shared, TCTL, 0);=0A= e1000_clean_tx_ring(adapter);=0A= e1000_configure_tx(adapter);=0A= } else {=0A= /* turn off autoneg, set link up, and invert loss of signal */=0A= txcw =3D E1000_READ_REG(&adapter->shared, TXCW);=0A= ctrl =3D E1000_READ_REG(&adapter->shared, CTRL);=0A= E1000_WRITE_REG(&adapter->shared, TXCW, txcw & ~E1000_TXCW_ANE);=0A= E1000_WRITE_REG(&adapter->shared, CTRL,=0A= (ctrl | E1000_CTRL_SLU | E1000_CTRL_ILOS));=0A= /* delay to flush queue, then clean up */=0A= mdelay(20);=0A= e1000_clean_tx_irq(adapter);=0A= E1000_WRITE_REG(&adapter->shared, CTRL, ctrl);=0A= E1000_WRITE_REG(&adapter->shared, TXCW, txcw);=0A= /* clear the link status change interrupts this caused */=0A= icr =3D E1000_READ_REG(&adapter->shared, ICR);=0A= }=0A= =0A= adapter->int_mask =3D IMS_ENABLE_MASK;=0A= e1000_irq_enable(adapter);=0A= return;=0A= }=0A= #endif=0A= =0A= /**=0A= * e1000_watchdog - Timer Call-back=0A= * @data: pointer to netdev cast into an unsigned long=0A= **/=0A= =0A= void=0A= e1000_watchdog(unsigned long data)=0A= {=0A= struct net_device *netdev =3D (struct net_device *) data;=0A= struct e1000_adapter *adapter =3D netdev->priv;=0A= 2d4c: 8eb20064 lw s2,100(s5)=0A= =0A= #ifdef IANS=0A= #if (LINUX_VERSION_CODE >=3D KERNEL_VERSION(2,4,0))=0A= int flags;=0A= #endif=0A= #endif=0A= =0A= e1000_check_for_link(&adapter->shared);=0A= 2d50: 3c020000 lui v0,0x0=0A= 2d54: 24420000 addiu v0,v0,0=0A= 2d58: 26540008 addiu s4,s2,8=0A= 2d5c: 0040f809 jalr v0=0A= 2d60: 02802021 move a0,s4=0A= * It also implies a memory barrier.=0A= */=0A= extern __inline__ int=0A= test_and_clear_bit(int nr, volatile void *addr)=0A= {=0A= 2d64: 2653008c addiu s3,s2,140=0A= unsigned long *m =3D ((unsigned long *) addr) + (nr >> 5);=0A= unsigned long temp, res;=0A= =0A= __asm__ __volatile__(=0A= 2d68: 24020008 li v0,8=0A= 2d6c: c2640000 ll a0,0(s3)=0A= 2d70: 00821825 or v1,a0,v0=0A= 2d74: 00621826 xor v1,v1,v0=0A= 2d78: e2630000 sc v1,0(s3)=0A= 2d7c: 1060fffb beqz v1,2d6c =0A= 2d80: 00821824 and v1,a0,v0=0A= =0A= if (test_and_clear_bit(E1000_LINK_STATUS_CHANGED, &adapter->flags))=0A= 2d84: 50600007 beqzl v1,2da4 =0A= 2d88: 8e42000c lw v0,12(s2)=0A= e1000_phy_get_info(&adapter->shared, &adapter->phy_info);=0A= 2d8c: 264501b8 addiu a1,s2,440=0A= 2d90: 3c020000 lui v0,0x0=0A= 2d94: 24420000 addiu v0,v0,0=0A= 2d98: 0040f809 jalr v0=0A= 2d9c: 02802021 move a0,s4=0A= 2da0: 8e42000c lw v0,12(s2)=0A= 2da4: 2c420002 sltiu v0,v0,2=0A= 2da8: 14400008 bnez v0,2dcc =0A= 2dac: 8e830000 lw v1,0(s4)=0A= __arch__swab16s(addr);=0A= }=0A= =0A= static __inline__ __const__ __u32 __fswab32(__u32 x)=0A= {=0A= 2db0: 8c620008 lw v0,8(v1)=0A= return __arch__swab32(x);=0A= 2db4: 00021602 srl v0,v0,0x18=0A= =0A= if(E1000_READ_REG(&adapter->shared, STATUS) & E1000_STATUS_LU) {=0A= 2db8: 30420002 andi v0,v0,0x2=0A= 2dbc: 14400008 bnez v0,2de0 =0A= 2dc0: 8e4200b0 lw v0,176(s2)=0A= 2dc4: 08000bc6 j 2f18 =0A= 2dc8: 00000000 nop=0A= __arch__swab16s(addr);=0A= }=0A= =0A= static __inline__ __const__ __u32 __fswab32(__u32 x)=0A= {=0A= 2dcc: 8c620008 lw v0,8(v1)=0A= return __arch__swab32(x);=0A= 2dd0: 00021602 srl v0,v0,0x18=0A= 2dd4: 30420002 andi v0,v0,0x2=0A= 2dd8: 1040004f beqz v0,2f18 =0A= 2ddc: 8e4200b0 lw v0,176(s2)=0A= if(adapter->link_active !=3D TRUE) {=0A= 2de0: 24030001 li v1,1=0A= 2de4: 10430058 beq v0,v1,2f48 =0A= 2de8: 00000000 nop=0A= * It also implies a memory barrier.=0A= */=0A= extern __inline__ int=0A= test_and_clear_bit(int nr, volatile void *addr)=0A= {=0A= 2dec: 26a5002c addiu a1,s5,44=0A= unsigned long *m =3D ((unsigned long *) addr) + (nr >> 5);=0A= unsigned long temp, res;=0A= =0A= __asm__ __volatile__(=0A= 2df0: c0a40000 ll a0,0(a1)=0A= 2df4: 00831025 or v0,a0,v1=0A= 2df8: 00431026 xor v0,v0,v1=0A= 2dfc: e0a20000 sc v0,0(a1)=0A= 2e00: 1040fffb beqz v0,2df0 =0A= 2e04: 00831024 and v0,a0,v1=0A= }=0A= =0A= static inline void netif_wake_queue(struct net_device *dev)=0A= {=0A= if (test_and_clear_bit(__LINK_STATE_XOFF, &dev->state))=0A= 2e08: 10400025 beqz v0,2ea0 =0A= 2e0c: 265100b4 addiu s1,s2,180=0A= {=0A= unsigned long *m =3D ((unsigned long *) addr) + (nr >> 5);=0A= unsigned long temp, res;=0A= =0A= __asm__ __volatile__(=0A= 2e10: 24020008 li v0,8=0A= 2e14: c0a40000 ll a0,0(a1)=0A= 2e18: 00821825 or v1,a0,v0=0A= 2e1c: e0a30000 sc v1,0(a1)=0A= 2e20: 1060fffc beqz v1,2e14 =0A= 2e24: 00821824 and v1,a0,v0=0A= #define HAVE_NETIF_QUEUE=0A= =0A= static inline void __netif_schedule(struct net_device *dev)=0A= {=0A= if (!test_and_set_bit(__LINK_STATE_SCHED, &dev->state)) {=0A= 2e28: 1460001d bnez v1,2ea0 =0A= 2e2c: 265100b4 addiu s1,s2,180=0A= unsigned long flags;=0A= int cpu =3D smp_processor_id();=0A= =0A= local_irq_save(flags);=0A= 2e30: 40106000 mfc0 s0,$12=0A= 2e34: 00000000 nop=0A= 2e38: 36010001 ori at,s0,0x1=0A= 2e3c: 38210001 xori at,at,0x1=0A= 2e40: 40816000 mtc0 at,$12=0A= 2e44: 00000040 sll zero,zero,0x1=0A= 2e48: 00000040 sll zero,zero,0x1=0A= 2e4c: 00000040 sll zero,zero,0x1=0A= dev->next_sched =3D softnet_data[cpu].output_queue;=0A= 2e50: 3c030000 lui v1,0x0=0A= 2e54: 8c63001c lw v1,28(v1)=0A= softnet_data[cpu].output_queue =3D dev;=0A= cpu_raise_softirq(cpu, NET_TX_SOFTIRQ);=0A= 2e58: 00002021 move a0,zero=0A= 2e5c: aea30038 sw v1,56(s5)=0A= 2e60: 3c020000 lui v0,0x0=0A= 2e64: 24420000 addiu v0,v0,0=0A= 2e68: 3c010000 lui at,0x0=0A= 2e6c: ac35001c sw s5,28(at)=0A= 2e70: 0040f809 jalr v0=0A= 2e74: 24050001 li a1,1=0A= local_irq_restore(flags);=0A= 2e78: 40016000 mfc0 at,$12=0A= 2e7c: 32100001 andi s0,s0,0x1=0A= 2e80: 34210001 ori at,at,0x1=0A= 2e84: 38210001 xori at,at,0x1=0A= 2e88: 02018025 or s0,s0,at=0A= 2e8c: 40906000 mtc0 s0,$12=0A= ...=0A= =0A= #ifdef IANS=0A= if((adapter->iANSdata->iANS_status =3D=3D = IANS_COMMUNICATION_UP) &&=0A= (adapter->iANSdata->reporting_mode =3D=3D = IANS_STATUS_REPORTING_ON))=0A= if(ans_notify)=0A= ans_notify(netdev, IANS_IND_XMIT_QUEUE_READY);=0A= #endif=0A= netif_wake_queue(netdev);=0A= =0A= e1000_get_speed_and_duplex(&adapter->shared, = &adapter->link_speed,=0A= 2e9c: 265100b4 addiu s1,s2,180=0A= 2ea0: 265000b6 addiu s0,s2,182=0A= 2ea4: 02003021 move a2,s0=0A= 2ea8: 3c020000 lui v0,0x0=0A= 2eac: 24420000 addiu v0,v0,0=0A= 2eb0: 02802021 move a0,s4=0A= 2eb4: 0040f809 jalr v0=0A= 2eb8: 02202821 move a1,s1=0A= &adapter->link_duplex);=0A= printk(KERN_ERR "e1000: %s NIC Link is Up %d Mbps %s\n",=0A= 2ebc: 96030000 lhu v1,0(s0)=0A= 2ec0: 24020002 li v0,2=0A= 2ec4: 3c070000 lui a3,0x0=0A= 2ec8: 24e70d28 addiu a3,a3,3368=0A= 2ecc: 10620003 beq v1,v0,2edc =0A= 2ed0: 96260000 lhu a2,0(s1)=0A= 2ed4: 3c070000 lui a3,0x0=0A= 2ed8: 24e70d34 addiu a3,a3,3380=0A= 2edc: 3c040000 lui a0,0x0=0A= 2ee0: 24840d00 addiu a0,a0,3328=0A= 2ee4: 3c020000 lui v0,0x0=0A= 2ee8: 24420000 addiu v0,v0,0=0A= 2eec: 0040f809 jalr v0=0A= 2ef0: 02a02821 move a1,s5=0A= netdev->name, adapter->link_speed,=0A= adapter->link_duplex =3D=3D=0A= FULL_DUPLEX ? "Full Duplex" : "Half Duplex");=0A= =0A= adapter->link_active =3D TRUE;=0A= 2ef4: 24030001 li v1,1=0A= 2ef8: ae4300b0 sw v1,176(s2)=0A= {=0A= unsigned long *m =3D ((unsigned long *) addr) + (nr >> 5);=0A= unsigned long temp;=0A= =0A= __asm__ __volatile__(=0A= 2efc: c2620000 ll v0,0(s3)=0A= 2f00: 34420008 ori v0,v0,0x8=0A= 2f04: e2620000 sc v0,0(s3)=0A= 2f08: 1040fffc beqz v0,2efc =0A= 2f0c: 00000000 nop=0A= set_bit(E1000_LINK_STATUS_CHANGED, &adapter->flags);=0A= }=0A= } else {=0A= 2f10: 08000bd2 j 2f48 =0A= 2f14: 00000000 nop=0A= if(adapter->link_active !=3D FALSE) {=0A= 2f18: 1040000b beqz v0,2f48 =0A= 2f1c: 00000000 nop=0A= adapter->link_speed =3D 0;=0A= adapter->link_duplex =3D 0;=0A= printk(KERN_ERR "e1000: %s NIC Link is Down\n", = netdev->name);=0A= 2f20: 3c040000 lui a0,0x0=0A= 2f24: 24840d40 addiu a0,a0,3392=0A= 2f28: a64000b4 sh zero,180(s2)=0A= 2f2c: a64000b6 sh zero,182(s2)=0A= 2f30: 3c020000 lui v0,0x0=0A= 2f34: 24420000 addiu v0,v0,0=0A= 2f38: 0040f809 jalr v0=0A= 2f3c: 02a02821 move a1,s5=0A= adapter->link_active =3D FALSE;=0A= 2f40: ae4000b0 sw zero,176(s2)=0A= atomic_set(&adapter->tx_timeout, 0);=0A= 2f44: ae40010c sw zero,268(s2)=0A= }=0A= }=0A= =0A= e1000_update_stats(adapter);=0A= 2f48: 3c030000 lui v1,0x0=0A= 2f4c: 24634044 addiu v1,v1,16452=0A= 2f50: 0060f809 jalr v1=0A= 2f54: 02402021 move a0,s2=0A= =0A= if(atomic_read(&adapter->tx_timeout) > 1)=0A= 2f58: 8e42010c lw v0,268(s2)=0A= 2f5c: 28420002 slti v0,v0,2=0A= 2f60: 54400009 bnezl v0,2f88 =0A= 2f64: 8e4300b0 lw v1,176(s2)=0A= * Atomically subtracts @i from @v. Note that the guaranteed=0A= * useful range of an atomic_t is only 24 bits.=0A= */=0A= extern __inline__ void atomic_sub(int i, atomic_t * v)=0A= {=0A= 2f68: 24020001 li v0,1=0A= 2f6c: 2643010c addiu v1,s2,268=0A= unsigned long temp;=0A= =0A= __asm__ __volatile__(=0A= 2f70: c0640000 ll a0,0(v1)=0A= 2f74: 00822023 subu a0,a0,v0=0A= 2f78: e0640000 sc a0,0(v1)=0A= 2f7c: 1080fffc beqz a0,2f70 =0A= 2f80: 00000000 nop=0A= atomic_dec(&adapter->tx_timeout);=0A= =0A= if((adapter->link_active =3D=3D TRUE) && =0A= 2f84: 8e4300b0 lw v1,176(s2)=0A= 2f88: 24020001 li v0,1=0A= 2f8c: 54620021 bnel v1,v0,3014 =0A= 2f90: 8e620000 lw v0,0(s3)=0A= 2f94: 8e42010c lw v0,268(s2)=0A= 2f98: 5443001e bnel v0,v1,3014 =0A= 2f9c: 8e620000 lw v0,0(s3)=0A= (atomic_read(&adapter->tx_timeout) =3D=3D 1)) {=0A= =0A= if(E1000_READ_REG(&adapter->shared, STATUS) & = E1000_STATUS_TXOFF) {=0A= 2fa0: 8e42000c lw v0,12(s2)=0A= 2fa4: 2c420002 sltiu v0,v0,2=0A= 2fa8: 14400008 bnez v0,2fcc =0A= 2fac: 8e430008 lw v1,8(s2)=0A= __arch__swab16s(addr);=0A= }=0A= =0A= static __inline__ __const__ __u32 __fswab32(__u32 x)=0A= {=0A= 2fb0: 8c620008 lw v0,8(v1)=0A= return __arch__swab32(x);=0A= 2fb4: 00021602 srl v0,v0,0x18=0A= 2fb8: 30420010 andi v0,v0,0x10=0A= 2fbc: 14400008 bnez v0,2fe0 =0A= 2fc0: 24020003 li v0,3=0A= 2fc4: 08000bfb j 2fec =0A= 2fc8: 00000000 nop=0A= __arch__swab16s(addr);=0A= }=0A= =0A= static __inline__ __const__ __u32 __fswab32(__u32 x)=0A= {=0A= 2fcc: 8c620008 lw v0,8(v1)=0A= return __arch__swab32(x);=0A= 2fd0: 00021602 srl v0,v0,0x18=0A= 2fd4: 30420010 andi v0,v0,0x10=0A= 2fd8: 10400004 beqz v0,2fec =0A= 2fdc: 24020003 li v0,3=0A= atomic_set(&adapter->tx_timeout, 3);=0A= 2fe0: ae42010c sw v0,268(s2)=0A= } else {=0A= 2fe4: 08000c05 j 3014 =0A= 2fe8: 8e620000 lw v0,0(s3)=0A= =0A= e1000_hibernate_adapter(netdev);=0A= 2fec: 3c020000 lui v0,0x0=0A= 2ff0: 24420000 addiu v0,v0,0=0A= 2ff4: 0040f809 jalr v0=0A= 2ff8: 02a02021 move a0,s5=0A= =0A= #ifdef IANS=0A= if((adapter->iANSdata->iANS_status =3D=3D IANS_COMMUNICATION_UP) = &&=0A= (adapter->iANSdata->reporting_mode =3D=3D = IANS_STATUS_REPORTING_ON)) {=0A= adapter->link_active =3D FALSE;=0A= bd_ans_os_Watchdog(netdev, adapter);=0A= adapter->link_active =3D TRUE;=0A= }=0A= #endif=0A= atomic_set(&adapter->tx_timeout, 0);=0A= 2ffc: ae40010c sw zero,268(s2)=0A= e1000_wakeup_adapter(netdev);=0A= 3000: 3c020000 lui v0,0x0=0A= 3004: 24420000 addiu v0,v0,0=0A= 3008: 0040f809 jalr v0=0A= 300c: 02a02021 move a0,s5=0A= * @addr: Address to start counting from=0A= */=0A= extern __inline__ int test_bit(int nr, volatile void *addr)=0A= {=0A= return ((1UL << (nr & 31)) & (((const unsigned int *) addr)[nr >> 5])) = !=3D 0;=0A= 3010: 8e620000 lw v0,0(s3)=0A= 3014: 00021042 srl v0,v0,0x1=0A= 3018: 30420001 andi v0,v0,0x1=0A= }=0A= }=0A= #ifdef IANS=0A= if(adapter->iANSdata->iANS_status =3D=3D IANS_COMMUNICATION_UP) {=0A= =0A= if(adapter->iANSdata->reporting_mode =3D=3D = IANS_STATUS_REPORTING_ON)=0A= bd_ans_os_Watchdog(netdev, adapter);=0A= =0A= if(adapter->link_active =3D=3D FALSE) {=0A= /* don't sit on SKBs while link is down */=0A= =0A= if(atomic_read(&adapter->tx_ring.unused) < = adapter->tx_ring.count) {=0A= =0A= #if (LINUX_VERSION_CODE >=3D KERNEL_VERSION(2,4,0))=0A= spin_lock_irqsave(&netdev->xmit_lock, flags);=0A= e1000_tx_flush(adapter);=0A= spin_unlock_irqrestore(&netdev->xmit_lock, flags);=0A= #else=0A= e1000_tx_flush(adapter);=0A= #endif=0A= }=0A= #if (LINUX_VERSION_CODE >=3D KERNEL_VERSION(2,4,0))=0A= spin_lock_irqsave(&netdev->queue_lock, flags);=0A= qdisc_reset(netdev->qdisc);=0A= spin_unlock_irqrestore(&netdev->queue_lock, flags);=0A= #else=0A= qdisc_reset(netdev->qdisc);=0A= #endif=0A= }=0A= }=0A= #endif=0A= =0A= if(test_bit(E1000_RX_REFILL, &adapter->flags)) {=0A= 301c: 1040000d beqz v0,3054 =0A= 3020: 24020001 li v0,1=0A= =0A= extern void FASTCALL(__tasklet_schedule(struct tasklet_struct *t));=0A= =0A= static inline void tasklet_schedule(struct tasklet_struct *t)=0A= {=0A= 3024: 264500d0 addiu a1,s2,208=0A= {=0A= unsigned long *m =3D ((unsigned long *) addr) + (nr >> 5);=0A= unsigned long temp, res;=0A= =0A= __asm__ __volatile__(=0A= 3028: c24400d4 ll a0,212(s2)=0A= 302c: 00821825 or v1,a0,v0=0A= 3030: e24300d4 sc v1,212(s2)=0A= 3034: 1060fffc beqz v1,3028 =0A= 3038: 00821824 and v1,a0,v0=0A= extern void FASTCALL(__tasklet_schedule(struct tasklet_struct *t));=0A= =0A= static inline void tasklet_schedule(struct tasklet_struct *t)=0A= {=0A= if (!test_and_set_bit(TASKLET_STATE_SCHED, &t->state))=0A= 303c: 14600005 bnez v1,3054 =0A= 3040: 00000000 nop=0A= __tasklet_schedule(t);=0A= 3044: 3c020000 lui v0,0x0=0A= 3048: 24420000 addiu v0,v0,0=0A= 304c: 0040f809 jalr v0=0A= 3050: 00a02021 move a0,a1=0A= tasklet_schedule(&adapter->rx_fill_tasklet);=0A= }=0A= =0A= /* Reset the timer */=0A= mod_timer(&adapter->timer_id, jiffies + 2 * HZ);=0A= 3054: 3c050000 lui a1,0x0=0A= 3058: 8ca50000 lw a1,0(a1)=0A= 305c: 26440094 addiu a0,s2,148=0A= 3060: 3c020000 lui v0,0x0=0A= 3064: 24420000 addiu v0,v0,0=0A= 3068: 0040f809 jalr v0=0A= 306c: 24a500c8 addiu a1,a1,200=0A= =0A= return;=0A= }=0A= 3070: 8fbf0028 lw ra,40(sp)=0A= 3074: 8fb50024 lw s5,36(sp)=0A= 3078: 8fb40020 lw s4,32(sp)=0A= 307c: 8fb3001c lw s3,28(sp)=0A= 3080: 8fb20018 lw s2,24(sp)=0A= 3084: 8fb10014 lw s1,20(sp)=0A= 3088: 8fb00010 lw s0,16(sp)=0A= 308c: 03e00008 jr ra=0A= 3090: 27bd0030 addiu sp,sp,48=0A= =0A= 00003094 :=0A= 3094: 27bdff80 addiu sp,sp,-128=0A= 3098: afbf007c sw ra,124(sp)=0A= 309c: afbe0078 sw s8,120(sp)=0A= 30a0: afb70074 sw s7,116(sp)=0A= 30a4: afb60070 sw s6,112(sp)=0A= 30a8: afb5006c sw s5,108(sp)=0A= 30ac: afb40068 sw s4,104(sp)=0A= 30b0: afb30064 sw s3,100(sp)=0A= 30b4: afb20060 sw s2,96(sp)=0A= 30b8: afb1005c sw s1,92(sp)=0A= 30bc: afb00058 sw s0,88(sp)=0A= 30c0: afa50084 sw a1,132(sp)=0A= =0A= /**=0A= * e1000_tx_checksum_setup=0A= * @adapter:=0A= * @skb:=0A= * @txd_upper:=0A= * @txd_lower:=0A= **/=0A= =0A= static inline void=0A= e1000_tx_checksum_setup(struct e1000_adapter *adapter,=0A= struct sk_buff *skb,=0A= uint32_t *txd_upper,=0A= uint32_t *txd_lower)=0A= {=0A= =0A= struct e1000_context_desc *desc;=0A= int i;=0A= =0A= if(skb->protocol !=3D __constant_htons(ETH_P_IP)) {=0A= *txd_upper =3D 0;=0A= *txd_lower =3D adapter->TxdCmd;=0A= return;=0A= }=0A= =0A= switch (skb->nh.iph->protocol) {=0A= case IPPROTO_TCP:=0A= /* Offload TCP checksum */=0A= *txd_upper =3D E1000_TXD_POPTS_TXSM << 8;=0A= *txd_lower =3D adapter->TxdCmd | E1000_TXD_CMD_DEXT | = E1000_TXD_DTYP_D;=0A= if(adapter->ActiveChecksumContext =3D=3D OFFLOAD_TCP_IP)=0A= return;=0A= else=0A= adapter->ActiveChecksumContext =3D OFFLOAD_TCP_IP;=0A= break;=0A= case IPPROTO_UDP:=0A= /* Offload UDP checksum */=0A= *txd_upper =3D E1000_TXD_POPTS_TXSM << 8;=0A= *txd_lower =3D adapter->TxdCmd | E1000_TXD_CMD_DEXT | = E1000_TXD_DTYP_D;=0A= if(adapter->ActiveChecksumContext =3D=3D OFFLOAD_UDP_IP)=0A= return;=0A= else=0A= adapter->ActiveChecksumContext =3D OFFLOAD_UDP_IP;=0A= break;=0A= default:=0A= /* no checksum to offload */=0A= *txd_upper =3D 0;=0A= *txd_lower =3D adapter->TxdCmd;=0A= return;=0A= }=0A= =0A= /* If we reach this point, the checksum offload context=0A= * needs to be reset=0A= */=0A= =0A= i =3D adapter->tx_ring.next_to_use;=0A= desc =3D E1000_CONTEXT_DESC(adapter->tx_ring, i);=0A= =0A= desc->lower_setup.ip_fields.ipcss =3D skb->nh.raw - skb->data;=0A= desc->lower_setup.ip_fields.ipcso =3D=0A= ((skb->nh.raw + offsetof(struct iphdr, check)) - skb->data);=0A= desc->lower_setup.ip_fields.ipcse =3D cpu_to_le16(skb->h.raw - = skb->data - 1);=0A= =0A= desc->upper_setup.tcp_fields.tucss =3D (skb->h.raw - skb->data);=0A= desc->upper_setup.tcp_fields.tucso =3D ((skb->h.raw + skb->csum) - = skb->data);=0A= desc->upper_setup.tcp_fields.tucse =3D 0;=0A= =0A= desc->tcp_seg_setup.data =3D 0;=0A= desc->cmd_and_length =3D cpu_to_le32(E1000_TXD_CMD_DEXT) | = adapter->TxdCmd;=0A= =0A= i =3D (i + 1) % adapter->tx_ring.count;=0A= atomic_dec(&adapter->tx_ring.unused);=0A= adapter->tx_ring.next_to_use =3D i;=0A= E1000_WRITE_REG(&adapter->shared, TDT, adapter->tx_ring.next_to_use);=0A= return;=0A= }=0A= =0A= /**=0A= * e1000_xmit_frame - Transmit entry point=0A= * @skb: buffer with frame data to transmit=0A= * @netdev: network interface device structure=0A= *=0A= * Returns 0 on success, negative on error=0A= *=0A= * e1000_xmit_frame is called by the stack to initiate a transmit.=0A= * The out of resource condition is checked after each successful Tx=0A= * so that the stack can be notified, preventing the driver from=0A= * ever needing to drop a frame. The atomic operations on=0A= * tx_ring.unused are used to syncronize with the transmit=0A= * interrupt processing code without the need for a spinlock.=0A= **/=0A= =0A= int=0A= e1000_xmit_frame(struct sk_buff *skb,=0A= struct net_device *netdev)=0A= {=0A= struct e1000_adapter *adapter =3D netdev->priv;=0A= 30c4: 8cb30064 lw s3,100(a1)=0A= 30c8: afa40080 sw a0,128(sp)=0A= struct pci_dev *pdev =3D adapter->pdev;=0A= struct e1000_tx_desc *tx_desc;=0A= int i, len, offset, txd_needed;=0A= uint32_t txd_upper, txd_lower;=0A= =0A= #define TXD_USE_COUNT(x) (((x) >> 12) + ((x) & 0x0fff ? 1 : 0))=0A= =0A= #ifdef MAX_SKB_FRAGS=0A= int f;=0A= skb_frag_t *frag;=0A= #endif=0A= =0A= E1000_DBG("e1000_xmit_frame\n");=0A= =0A= if(adapter->link_active =3D=3D FALSE) {=0A= 30cc: 8e6200b0 lw v0,176(s3)=0A= 30d0: 54400008 bnezl v0,30f4 =0A= 30d4: 8fa20080 lw v0,128(sp)=0A= {=0A= unsigned long *m =3D ((unsigned long *) addr) + (nr >> 5);=0A= unsigned long temp;=0A= =0A= __asm__ __volatile__(=0A= 30d8: c0a2002c ll v0,44(a1)=0A= 30dc: 34420001 ori v0,v0,0x1=0A= 30e0: e0a2002c sc v0,44(a1)=0A= 30e4: 1040fffc beqz v0,30d8 =0A= 30e8: 00000000 nop=0A= #ifdef IANS=0A= if((adapter->iANSdata->iANS_status =3D=3D IANS_COMMUNICATION_UP) = &&=0A= (adapter->iANSdata->reporting_mode =3D=3D = IANS_STATUS_REPORTING_ON))=0A= if(ans_notify)=0A= ans_notify(netdev, IANS_IND_XMIT_QUEUE_FULL);=0A= #endif=0A= netif_stop_queue(netdev);=0A= return 1;=0A= 30ec: 08000ee6 j 3b98 =0A= 30f0: 24020001 li v0,1=0A= }=0A= =0A= #ifdef MAX_SKB_FRAGS=0A= txd_needed =3D TXD_USE_COUNT(skb->len - skb->data_len);=0A= for(f =3D 0; f < skb_shinfo(skb)->nr_frags; f++) {=0A= 30f4: 00006821 move t5,zero=0A= 30f8: 8c470088 lw a3,136(v0)=0A= 30fc: 8c48005c lw t0,92(v0)=0A= 3100: 8c450060 lw a1,96(v0)=0A= 3104: 8ce40004 lw a0,4(a3)=0A= 3108: 01051023 subu v0,t0,a1=0A= 310c: 30430fff andi v1,v0,0xfff=0A= 3110: 0003182b sltu v1,zero,v1=0A= 3114: 00021302 srl v0,v0,0xc=0A= 3118: 1080000d beqz a0,3150 =0A= 311c: 00433021 addu a2,v0,v1=0A= frag =3D &skb_shinfo(skb)->frags[f];=0A= 3120: 000d10c0 sll v0,t5,0x3=0A= 3124: 00e21021 addu v0,a3,v0=0A= txd_needed +=3D TXD_USE_COUNT(frag->size);=0A= 3128: 94430012 lhu v1,18(v0)=0A= 312c: 8ce40004 lw a0,4(a3)=0A= 3130: 25ad0001 addiu t5,t5,1=0A= 3134: 30620fff andi v0,v1,0xfff=0A= 3138: 00031b02 srl v1,v1,0xc=0A= 313c: 00c31821 addu v1,a2,v1=0A= 3140: 0002102b sltu v0,zero,v0=0A= 3144: 01a4202b sltu a0,t5,a0=0A= 3148: 1480fff5 bnez a0,3120 =0A= 314c: 00623021 addu a2,v1,v0=0A= }=0A= #else=0A= txd_needed =3D TXD_USE_COUNT(skb->len);=0A= #endif=0A= =0A= /* make sure there are enough Tx descriptors available in the ring */=0A= if(atomic_read(&adapter->tx_ring.unused) <=3D (txd_needed + 1)) {=0A= 3150: 8e6300f4 lw v1,244(s3)=0A= 3154: 24c20001 addiu v0,a2,1=0A= 3158: 0043102a slt v0,v0,v1=0A= 315c: 5440000c bnezl v0,3190 =0A= 3160: 8fa70080 lw a3,128(sp)=0A= adapter->net_stats.tx_dropped++;=0A= 3164: 8e62016c lw v0,364(s3)=0A= 3168: 24420001 addiu v0,v0,1=0A= 316c: ae62016c sw v0,364(s3)=0A= {=0A= unsigned long *m =3D ((unsigned long *) addr) + (nr >> 5);=0A= unsigned long temp;=0A= =0A= __asm__ __volatile__(=0A= 3170: 8fa40084 lw a0,132(sp)=0A= 3174: c083002c ll v1,44(a0)=0A= 3178: 34630001 ori v1,v1,0x1=0A= 317c: e083002c sc v1,44(a0)=0A= 3180: 1060fffc beqz v1,3174 =0A= 3184: 00000000 nop=0A= #ifdef IANS=0A= if((adapter->iANSdata->iANS_status =3D=3D IANS_COMMUNICATION_UP) = &&=0A= (adapter->iANSdata->reporting_mode =3D=3D = IANS_STATUS_REPORTING_ON))=0A= if(ans_notify)=0A= ans_notify(netdev, IANS_IND_XMIT_QUEUE_FULL);=0A= #endif=0A= netif_stop_queue(netdev);=0A= =0A= return 1;=0A= 3188: 08000ee6 j 3b98 =0A= 318c: 24020001 li v0,1=0A= }=0A= =0A= if(skb->ip_summed =3D=3D CHECKSUM_HW) {=0A= 3190: 24020001 li v0,1=0A= 3194: 90e6006b lbu a2,107(a3)=0A= 3198: 54c20084 bnel a2,v0,33ac =0A= 319c: afa00010 sw zero,16(sp)=0A= 31a0: 94e30074 lhu v1,116(a3)=0A= 31a4: 24020800 li v0,2048=0A= 31a8: 10620006 beq v1,v0,31c4 =0A= 31ac: 266300f4 addiu v1,s3,244=0A= 31b0: afa00010 sw zero,16(sp)=0A= 31b4: 8e620108 lw v0,264(s3)=0A= 31b8: afa30040 sw v1,64(sp)=0A= 31bc: 08000cef j 33bc =0A= 31c0: afa20014 sw v0,20(sp)=0A= 31c4: 8fa40080 lw a0,128(sp)=0A= 31c8: 24030006 li v1,6=0A= 31cc: 8c820020 lw v0,32(a0)=0A= 31d0: 90440009 lbu a0,9(v0)=0A= 31d4: 10830005 beq a0,v1,31ec =0A= 31d8: 24020011 li v0,17=0A= 31dc: 5082000d beql a0,v0,3214 =0A= 31e0: 8e620108 lw v0,264(s3)=0A= 31e4: 08000ceb j 33ac =0A= 31e8: afa00010 sw zero,16(sp)=0A= 31ec: 8e620108 lw v0,264(s3)=0A= 31f0: 8e6401b4 lw a0,436(s3)=0A= 31f4: 3c032010 lui v1,0x2010=0A= 31f8: 00431025 or v0,v0,v1=0A= 31fc: 266700f4 addiu a3,s3,244=0A= 3200: 24030200 li v1,512=0A= 3204: afa20014 sw v0,20(sp)=0A= 3208: afa30010 sw v1,16(sp)=0A= 320c: 08000c8e j 3238 =0A= 3210: afa70040 sw a3,64(sp)=0A= 3214: 8e6401b4 lw a0,436(s3)=0A= 3218: 3c032010 lui v1,0x2010=0A= 321c: 00431025 or v0,v0,v1=0A= 3220: afa20014 sw v0,20(sp)=0A= 3224: 266300f4 addiu v1,s3,244=0A= 3228: 24020200 li v0,512=0A= 322c: 24060002 li a2,2=0A= 3230: afa20010 sw v0,16(sp)=0A= 3234: afa30040 sw v1,64(sp)=0A= 3238: 50860061 beql a0,a2,33c0 =0A= 323c: 8e7500f8 lw s5,248(s3)=0A= 3240: ae6601b4 sw a2,436(s3)=0A= 3244: 8fa80080 lw t0,128(sp)=0A= 3248: 8e6700f8 lw a3,248(s3)=0A= 324c: 8e6500e4 lw a1,228(s3)=0A= 3250: 91030083 lbu v1,131(t0)=0A= 3254: 91040023 lbu a0,35(t0)=0A= 3258: 00071100 sll v0,a3,0x4=0A= 325c: 00a22821 addu a1,a1,v0=0A= 3260: 00832023 subu a0,a0,v1=0A= 3264: a0a40000 sb a0,0(a1)=0A= 3268: 91020083 lbu v0,131(t0)=0A= 326c: 91030023 lbu v1,35(t0)=0A= * Atomically subtracts @i from @v. Note that the guaranteed=0A= * useful range of an atomic_t is only 24 bits.=0A= */=0A= extern __inline__ void atomic_sub(int i, atomic_t * v)=0A= {=0A= 3270: 266400f4 addiu a0,s3,244=0A= 3274: 24e70001 addiu a3,a3,1=0A= 3278: 00621823 subu v1,v1,v0=0A= 327c: 2463000a addiu v1,v1,10=0A= 3280: a0a30001 sb v1,1(a1)=0A= 3284: 95030082 lhu v1,130(t0)=0A= 3288: 9502001e lhu v0,30(t0)=0A= * Atomically subtracts @i from @v. Note that the guaranteed=0A= * useful range of an atomic_t is only 24 bits.=0A= */=0A= extern __inline__ void atomic_sub(int i, atomic_t * v)=0A= {=0A= 328c: afa40040 sw a0,64(sp)=0A= 3290: 24060001 li a2,1=0A= 3294: 00431023 subu v0,v0,v1=0A= 3298: 2442ffff addiu v0,v0,-1=0A= 329c: 3042ffff andi v0,v0,0xffff=0A= =0A= =0A= static __inline__ __const__ __u16 __fswab16(__u16 x)=0A= {=0A= return __arch__swab16(x);=0A= 32a0: 304300ff andi v1,v0,0xff=0A= 32a4: 00031a00 sll v1,v1,0x8=0A= 32a8: 00021202 srl v0,v0,0x8=0A= 32ac: 00621825 or v1,v1,v0=0A= 32b0: a4a30002 sh v1,2(a1)=0A= 32b4: 91030083 lbu v1,131(t0)=0A= 32b8: 9102001f lbu v0,31(t0)=0A= 32bc: 00431023 subu v0,v0,v1=0A= 32c0: a0a20004 sb v0,4(a1)=0A= 32c4: 8d020064 lw v0,100(t0)=0A= 32c8: 8d03001c lw v1,28(t0)=0A= 32cc: 91040083 lbu a0,131(t0)=0A= 32d0: a4a00006 sh zero,6(a1)=0A= 32d4: 00621821 addu v1,v1,v0=0A= 32d8: 00641823 subu v1,v1,a0=0A= 32dc: a0a30005 sb v1,5(a1)=0A= 32e0: aca0000c sw zero,12(a1)=0A= 32e4: 8e620108 lw v0,264(s3)=0A= 32e8: 34420020 ori v0,v0,0x20=0A= 32ec: aca20008 sw v0,8(a1)=0A= 32f0: 8e6300f0 lw v1,240(s3)=0A= 32f4: 00e3001b divu zero,a3,v1=0A= 32f8: 50600001 beqzl v1,3300 =0A= 32fc: 0007000d break 0x7=0A= extern __inline__ void atomic_sub(int i, atomic_t * v)=0A= {=0A= unsigned long temp;=0A= =0A= __asm__ __volatile__(=0A= 3300: 8fa20040 lw v0,64(sp)=0A= 3304: 00003810 mfhi a3=0A= ...=0A= extern __inline__ void atomic_sub(int i, atomic_t * v)=0A= {=0A= unsigned long temp;=0A= =0A= __asm__ __volatile__(=0A= 3310: c0440000 ll a0,0(v0)=0A= 3314: 00862023 subu a0,a0,a2=0A= 3318: e0440000 sc a0,0(v0)=0A= 331c: 1080fffc beqz a0,3310 =0A= 3320: 00000000 nop=0A= 3324: 8e62000c lw v0,12(s3)=0A= 3328: 2c420002 sltiu v0,v0,2=0A= 332c: 14400010 bnez v0,3370 =0A= 3330: ae6700f8 sw a3,248(s3)=0A= }=0A= =0A= static __inline__ __const__ __u32 __fswab32(__u32 x)=0A= {=0A= return __arch__swab32(x);=0A= 3334: 30e3ff00 andi v1,a3,0xff00=0A= 3338: 00031a00 sll v1,v1,0x8=0A= 333c: 00071600 sll v0,a3,0x18=0A= 3340: 00072202 srl a0,a3,0x8=0A= 3344: 00431025 or v0,v0,v1=0A= 3348: 8e650008 lw a1,8(s3)=0A= }=0A= =0A= static __inline__ __const__ __u32 __fswab32(__u32 x)=0A= {=0A= return __arch__swab32(x);=0A= 334c: 3084ff00 andi a0,a0,0xff00=0A= 3350: 00071e02 srl v1,a3,0x18=0A= 3354: 00441025 or v0,v0,a0=0A= 3358: 00431025 or v0,v0,v1=0A= 335c: aca23818 sw v0,14360(a1)=0A= 3360: 8fa30080 lw v1,128(sp)=0A= 3364: 8c68005c lw t0,92(v1)=0A= 3368: 08000cef j 33bc =0A= 336c: 8c650060 lw a1,96(v1)=0A= }=0A= =0A= static __inline__ __const__ __u32 __fswab32(__u32 x)=0A= {=0A= return __arch__swab32(x);=0A= 3370: 30e3ff00 andi v1,a3,0xff00=0A= 3374: 00031a00 sll v1,v1,0x8=0A= 3378: 00071600 sll v0,a3,0x18=0A= 337c: 00072202 srl a0,a3,0x8=0A= 3380: 00431025 or v0,v0,v1=0A= 3384: 3084ff00 andi a0,a0,0xff00=0A= 3388: 8e650008 lw a1,8(s3)=0A= }=0A= =0A= static __inline__ __const__ __u32 __fswab32(__u32 x)=0A= {=0A= return __arch__swab32(x);=0A= 338c: 00441025 or v0,v0,a0=0A= 3390: 00071e02 srl v1,a3,0x18=0A= 3394: 00431025 or v0,v0,v1=0A= 3398: aca20438 sw v0,1080(a1)=0A= 339c: 8fa40080 lw a0,128(sp)=0A= 33a0: 8c88005c lw t0,92(a0)=0A= 33a4: 08000cef j 33bc =0A= 33a8: 8c850060 lw a1,96(a0)=0A= e1000_tx_checksum_setup(adapter, skb, &txd_upper, &txd_lower);=0A= } else {=0A= txd_upper =3D 0;=0A= txd_lower =3D adapter->TxdCmd;=0A= 33ac: 8e670108 lw a3,264(s3)=0A= 33b0: 266200f4 addiu v0,s3,244=0A= 33b4: afa20040 sw v0,64(sp)=0A= 33b8: afa70014 sw a3,20(sp)=0A= }=0A= =0A= i =3D adapter->tx_ring.next_to_use;=0A= 33bc: 8e7500f8 lw s5,248(s3)=0A= tx_desc =3D E1000_TX_DESC(adapter->tx_ring, i);=0A= 33c0: 8e6200e4 lw v0,228(s3)=0A= =0A= #ifdef IANS=0A= if(adapter->iANSdata->iANS_status =3D=3D IANS_COMMUNICATION_UP) {=0A= tx_desc->lower.data =3D cpu_to_le32(txd_lower);=0A= tx_desc->upper.data =3D cpu_to_le32(txd_upper);=0A= if(bd_ans_os_Transmit(adapter, tx_desc, &skb) =3D=3D = BD_ANS_FAILURE) {=0A= return 1;=0A= }=0A= txd_lower =3D le32_to_cpu(tx_desc->lower.data);=0A= txd_upper =3D le32_to_cpu(tx_desc->upper.data);=0A= }=0A= #endif=0A= =0A= #ifdef MAX_SKB_FRAGS=0A= len =3D skb->len - skb->data_len;=0A= 33c4: 0105b823 subu s7,t0,a1=0A= 33c8: 00151900 sll v1,s5,0x4=0A= #else=0A= len =3D skb->len;=0A= #endif=0A= offset =3D 0;=0A= =0A= while(len > 4096) {=0A= 33cc: 2ae41001 slti a0,s7,4097=0A= 33d0: 0043b021 addu s6,v0,v1=0A= 33d4: 14800070 bnez a0,3598 =0A= 33d8: 00007821 move t7,zero=0A= 33dc: 8fa30014 lw v1,20(sp)=0A= 33e0: 3c0d00ff lui t5,0xff=0A= 33e4: 8fb20040 lw s2,64(sp)=0A= 33e8: 34651000 ori a1,v1,0x1000=0A= 33ec: 30a3ff00 andi v1,a1,0xff00=0A= 33f0: 00052600 sll a0,a1,0x18=0A= 33f4: 00ad1024 and v0,a1,t5=0A= 33f8: 00031a00 sll v1,v1,0x8=0A= 33fc: 00832025 or a0,a0,v1=0A= 3400: 00021202 srl v0,v0,0x8=0A= 3404: 00822025 or a0,a0,v0=0A= 3408: 00052e02 srl a1,a1,0x18=0A= 340c: 00852025 or a0,a0,a1=0A= 3410: afa40018 sw a0,24(sp)=0A= 3414: 8fa40010 lw a0,16(sp)=0A= 3418: 3c1eff00 lui s8,0xff00=0A= 341c: 24140001 li s4,1=0A= 3420: 00042200 sll a0,a0,0x8=0A= 3424: afa4001c sw a0,28(sp)=0A= adapter->tx_ring.buffer_info[i].length =3D 4096;=0A= 3428: 8e630100 lw v1,256(s3)=0A= 342c: 00158840 sll s1,s5,0x1=0A= 3430: 02358821 addu s1,s1,s5=0A= 3434: 001188c0 sll s1,s1,0x3=0A= 3438: 02231821 addu v1,s1,v1=0A= 343c: 24021000 li v0,4096=0A= 3440: ac620010 sw v0,16(v1)=0A= adapter->tx_ring.buffer_info[i].dma =3D=0A= 3444: 8fa50080 lw a1,128(sp)=0A= */=0A= static inline dma_addr_t pci_map_page(struct pci_dev *hwdev, struct page = *page,=0A= unsigned long offset, size_t size,=0A= int direction)=0A= {=0A= 3448: 3c030000 lui v1,0x0=0A= 344c: 8c630000 lw v1,0(v1)=0A= 3450: 8ca40080 lw a0,128(a1)=0A= 3454: 008f2021 addu a0,a0,t7=0A= 3458: 3c028000 lui v0,0x8000=0A= 345c: 00441021 addu v0,v0,a0=0A= 3460: 00021302 srl v0,v0,0xc=0A= */=0A= static inline dma_addr_t pci_map_page(struct pci_dev *hwdev, struct page = *page,=0A= unsigned long offset, size_t size,=0A= int direction)=0A= {=0A= 3464: 00021180 sll v0,v0,0x6=0A= 3468: 00431021 addu v0,v0,v1=0A= 346c: 30840fff andi a0,a0,0xfff=0A= =0A= if (direction =3D=3D PCI_DMA_NONE)=0A= BUG();=0A= =0A= addr =3D (unsigned long) page_address(page);=0A= 3470: 8c500038 lw s0,56(v0)=0A= addr +=3D offset;=0A= #ifdef CONFIG_NONCOHERENT_IO=0A= dma_cache_wback_inv(addr, size);=0A= 3474: 3c030000 lui v1,0x0=0A= 3478: 8c630000 lw v1,0(v1)=0A= 347c: 24051000 li a1,4096=0A= 3480: 02048021 addu s0,s0,a0=0A= 3484: 02002021 move a0,s0=0A= 3488: afad0048 sw t5,72(sp)=0A= 348c: 0060f809 jalr v1=0A= 3490: afaf0050 sw t7,80(sp)=0A= pci_map_page(pdev, virt_to_page(skb->data + offset),=0A= (unsigned long) (skb->data + offset) & = ~~PAGE_MASK,=0A= 4096, PCI_DMA_TODEVICE);=0A= 3494: 8e650100 lw a1,256(s3)=0A= * IO bus memory addresses are also 1:1 with the physical address=0A= */=0A= static inline unsigned long virt_to_bus(volatile void * address)=0A= {=0A= return PHYSADDR(address);=0A= 3498: 3c041fff lui a0,0x1fff=0A= 349c: 3484ffff ori a0,a0,0xffff=0A= 34a0: 02041824 and v1,s0,a0=0A= 34a4: 02252821 addu a1,s1,a1=0A= 34a8: 00001021 move v0,zero=0A= 34ac: aca20008 sw v0,8(a1)=0A= 34b0: aca3000c sw v1,12(a1)=0A= 34b4: 8e640100 lw a0,256(s3)=0A= {=0A= # ifdef __SWAB_64_THRU_32__=0A= __u32 h =3D x >> 32;=0A= __u32 l =3D x & ((1ULL<<32)-1);=0A= return (((__u64)__swab32(l)) << 32) | ((__u64)(__swab32(h)));=0A= 34b8: 00003021 move a2,zero=0A= =0A= tx_desc->buffer_addr =3D = cpu_to_le64(adapter->tx_ring.buffer_info[i].dma);=0A= tx_desc->lower.data =3D cpu_to_le32(txd_lower | 4096);=0A= tx_desc->upper.data =3D cpu_to_le32(txd_upper);=0A= =0A= len -=3D 4096;=0A= 34bc: 26f7f000 addiu s7,s7,-4096=0A= 34c0: 02248821 addu s1,s1,a0=0A= 34c4: 8fa4001c lw a0,28(sp)=0A= static __inline__ __const__ __u64 __fswab64(__u64 x)=0A= {=0A= # ifdef __SWAB_64_THRU_32__=0A= __u32 h =3D x >> 32;=0A= __u32 l =3D x & ((1ULL<<32)-1);=0A= 34c8: 8e25000c lw a1,12(s1)=0A= 34cc: 8e280008 lw t0,8(s1)=0A= 34d0: aec4000c sw a0,12(s6)=0A= }=0A= =0A= static __inline__ __const__ __u32 __fswab32(__u32 x)=0A= {=0A= return __arch__swab32(x);=0A= 34d4: 8fad0048 lw t5,72(sp)=0A= 34d8: 30a4ff00 andi a0,a1,0xff00=0A= 34dc: 00042200 sll a0,a0,0x8=0A= 34e0: 00ad5024 and t2,a1,t5=0A= 34e4: 00056600 sll t4,a1,0x18=0A= 34e8: 310bff00 andi t3,t0,0xff00=0A= 34ec: 01846025 or t4,t4,a0=0A= 34f0: 000a5202 srl t2,t2,0x8=0A= 34f4: 010d2024 and a0,t0,t5=0A= 34f8: 00be2824 and a1,a1,s8=0A= 34fc: 000b5a00 sll t3,t3,0x8=0A= 3500: 00084e00 sll t1,t0,0x18=0A= 3504: 018a6025 or t4,t4,t2=0A= 3508: 012b4825 or t1,t1,t3=0A= 350c: 00052e02 srl a1,a1,0x18=0A= 3510: 00042202 srl a0,a0,0x8=0A= 3514: 011e4024 and t0,t0,s8=0A= }=0A= static __inline__ __u32 __swab32p(__u32 *x)=0A= {=0A= return __arch__swab32p(x);=0A= }=0A= static __inline__ void __swab32s(__u32 *addr)=0A= {=0A= __arch__swab32s(addr);=0A= }=0A= =0A= #ifdef __BYTEORDER_HAS_U64__=0A= static __inline__ __const__ __u64 __fswab64(__u64 x)=0A= {=0A= # ifdef __SWAB_64_THRU_32__=0A= __u32 h =3D x >> 32;=0A= __u32 l =3D x & ((1ULL<<32)-1);=0A= return (((__u64)__swab32(l)) << 32) | ((__u64)(__swab32(h)));=0A= 3518: 01851825 or v1,t4,a1=0A= 351c: 01244825 or t1,t1,a0=0A= 3520: 00084602 srl t0,t0,0x18=0A= 3524: 01283825 or a3,t1,t0=0A= 3528: 00031000 sll v0,v1,0x0=0A= 352c: 00001821 move v1,zero=0A= 3530: 00461025 or v0,v0,a2=0A= 3534: 00671825 or v1,v1,a3=0A= 3538: aec20000 sw v0,0(s6)=0A= 353c: aec30004 sw v1,4(s6)=0A= 3540: 8fa50018 lw a1,24(sp)=0A= offset +=3D 4096;=0A= i =3D (i + 1) % adapter->tx_ring.count;=0A= 3544: 26a30001 addiu v1,s5,1=0A= 3548: aec50008 sw a1,8(s6)=0A= 354c: 8e6200f0 lw v0,240(s3)=0A= 3550: 0062001b divu zero,v1,v0=0A= 3554: 50400001 beqzl v0,355c =0A= 3558: 0007000d break 0x7=0A= 355c: 8faf0050 lw t7,80(sp)=0A= 3560: 25ef1000 addiu t7,t7,4096=0A= 3564: 00002010 mfhi a0=0A= 3568: 0080a821 move s5,a0=0A= 356c: 00000000 nop=0A= extern __inline__ void atomic_sub(int i, atomic_t * v)=0A= {=0A= unsigned long temp;=0A= =0A= __asm__ __volatile__(=0A= 3570: c2420000 ll v0,0(s2)=0A= 3574: 00541023 subu v0,v0,s4=0A= 3578: e2420000 sc v0,0(s2)=0A= 357c: 1040fffc beqz v0,3570 =0A= 3580: 00000000 nop=0A= atomic_dec(&adapter->tx_ring.unused);=0A= tx_desc =3D E1000_TX_DESC(adapter->tx_ring, i);=0A= 3584: 8e6400e4 lw a0,228(s3)=0A= 3588: 00151100 sll v0,s5,0x4=0A= }=0A= 358c: 2ae31001 slti v1,s7,4097=0A= 3590: 1060ffa5 beqz v1,3428 =0A= 3594: 0082b021 addu s6,a0,v0=0A= adapter->tx_ring.buffer_info[i].length =3D len;=0A= 3598: 8e620100 lw v0,256(s3)=0A= 359c: 00159040 sll s2,s5,0x1=0A= 35a0: 02558821 addu s1,s2,s5=0A= 35a4: 001188c0 sll s1,s1,0x3=0A= 35a8: 02221021 addu v0,s1,v0=0A= 35ac: ac570010 sw s7,16(v0)=0A= adapter->tx_ring.buffer_info[i].dma =3D=0A= 35b0: 8fa20080 lw v0,128(sp)=0A= */=0A= static inline dma_addr_t pci_map_page(struct pci_dev *hwdev, struct page = *page,=0A= unsigned long offset, size_t size,=0A= int direction)=0A= {=0A= 35b4: 3c040000 lui a0,0x0=0A= 35b8: 8c840000 lw a0,0(a0)=0A= 35bc: 8c430080 lw v1,128(v0)=0A= 35c0: 006f1821 addu v1,v1,t7=0A= 35c4: 3c028000 lui v0,0x8000=0A= 35c8: 00431021 addu v0,v0,v1=0A= 35cc: 00021302 srl v0,v0,0xc=0A= */=0A= static inline dma_addr_t pci_map_page(struct pci_dev *hwdev, struct page = *page,=0A= unsigned long offset, size_t size,=0A= int direction)=0A= {=0A= 35d0: 00021180 sll v0,v0,0x6=0A= 35d4: 00441021 addu v0,v0,a0=0A= 35d8: 30630fff andi v1,v1,0xfff=0A= =0A= if (direction =3D=3D PCI_DMA_NONE)=0A= BUG();=0A= =0A= addr =3D (unsigned long) page_address(page);=0A= 35dc: 8c500038 lw s0,56(v0)=0A= addr +=3D offset;=0A= #ifdef CONFIG_NONCOHERENT_IO=0A= dma_cache_wback_inv(addr, size);=0A= 35e0: 3c060000 lui a2,0x0=0A= 35e4: 8cc60000 lw a2,0(a2)=0A= 35e8: 02038021 addu s0,s0,v1=0A= 35ec: 02002021 move a0,s0=0A= 35f0: 00c0f809 jalr a2=0A= 35f4: 02e02821 move a1,s7=0A= pci_map_page(pdev, virt_to_page(skb->data + offset),=0A= (unsigned long) (skb->data + offset) & ~PAGE_MASK, = len,=0A= PCI_DMA_TODEVICE);=0A= 35f8: 8e650100 lw a1,256(s3)=0A= * IO bus memory addresses are also 1:1 with the physical address=0A= */=0A= static inline unsigned long virt_to_bus(volatile void * address)=0A= {=0A= return PHYSADDR(address);=0A= 35fc: 3c041fff lui a0,0x1fff=0A= 3600: 3484ffff ori a0,a0,0xffff=0A= 3604: 02041824 and v1,s0,a0=0A= 3608: 02252821 addu a1,s1,a1=0A= 360c: 00001021 move v0,zero=0A= 3610: aca20008 sw v0,8(a1)=0A= 3614: aca3000c sw v1,12(a1)=0A= 3618: 8e640100 lw a0,256(s3)=0A= =0A= tx_desc->buffer_addr =3D = cpu_to_le64(adapter->tx_ring.buffer_info[i].dma);=0A= 361c: 8fa30014 lw v1,20(sp)=0A= }=0A= =0A= static __inline__ __const__ __u32 __fswab32(__u32 x)=0A= {=0A= return __arch__swab32(x);=0A= 3620: 3c0700ff lui a3,0xff=0A= 3624: 02248821 addu s1,s1,a0=0A= static __inline__ __const__ __u64 __fswab64(__u64 x)=0A= {=0A= # ifdef __SWAB_64_THRU_32__=0A= __u32 h =3D x >> 32;=0A= __u32 l =3D x & ((1ULL<<32)-1);=0A= 3628: 8e2a000c lw t2,12(s1)=0A= 362c: 8e2b0008 lw t3,8(s1)=0A= 3630: 00776025 or t4,v1,s7=0A= }=0A= =0A= static __inline__ __const__ __u32 __fswab32(__u32 x)=0A= {=0A= return __arch__swab32(x);=0A= 3634: 3142ff00 andi v0,t2,0xff00=0A= 3638: 01471824 and v1,t2,a3=0A= 363c: 318dff00 andi t5,t4,0xff00=0A= 3640: 00021200 sll v0,v0,0x8=0A= 3644: 000a4600 sll t0,t2,0x18=0A= 3648: 3164ff00 andi a0,t3,0xff00=0A= 364c: 01024025 or t0,t0,v0=0A= 3650: 00031a02 srl v1,v1,0x8=0A= 3654: 01671024 and v0,t3,a3=0A= 3658: 00042200 sll a0,a0,0x8=0A= 365c: 000b4e00 sll t1,t3,0x18=0A= 3660: 01873824 and a3,t4,a3=0A= 3664: 000c3600 sll a2,t4,0x18=0A= 3668: 000d6a00 sll t5,t5,0x8=0A= 366c: 01034025 or t0,t0,v1=0A= 3670: 01244825 or t1,t1,a0=0A= 3674: 00021202 srl v0,v0,0x8=0A= 3678: 00073a02 srl a3,a3,0x8=0A= 367c: 000a5602 srl t2,t2,0x18=0A= 3680: 00cd3025 or a2,a2,t5=0A= 3684: 01224825 or t1,t1,v0=0A= }=0A= static __inline__ __u32 __swab32p(__u32 *x)=0A= {=0A= return __arch__swab32p(x);=0A= }=0A= static __inline__ void __swab32s(__u32 *addr)=0A= {=0A= __arch__swab32s(addr);=0A= }=0A= =0A= #ifdef __BYTEORDER_HAS_U64__=0A= static __inline__ __const__ __u64 __fswab64(__u64 x)=0A= {=0A= # ifdef __SWAB_64_THRU_32__=0A= __u32 h =3D x >> 32;=0A= __u32 l =3D x & ((1ULL<<32)-1);=0A= return (((__u64)__swab32(l)) << 32) | ((__u64)(__swab32(h)));=0A= 3688: 010a2825 or a1,t0,t2=0A= 368c: 00c73025 or a2,a2,a3=0A= 3690: 000b5e02 srl t3,t3,0x18=0A= 3694: 8fa70010 lw a3,16(sp)=0A= 3698: 00002021 move a0,zero=0A= 369c: 012b1825 or v1,t1,t3=0A= 36a0: 00001021 move v0,zero=0A= 36a4: 00052000 sll a0,a1,0x0=0A= 36a8: 00002821 move a1,zero=0A= 36ac: 00822025 or a0,a0,v0=0A= 36b0: 000c6602 srl t4,t4,0x18=0A= 36b4: 00a32825 or a1,a1,v1=0A= 36b8: 00cc3025 or a2,a2,t4=0A= 36bc: 00071200 sll v0,a3,0x8=0A= 36c0: aec40000 sw a0,0(s6)=0A= 36c4: aec50004 sw a1,4(s6)=0A= tx_desc->lower.data =3D cpu_to_le32(txd_lower | len);=0A= 36c8: aec60008 sw a2,8(s6)=0A= tx_desc->upper.data =3D cpu_to_le32(txd_upper);=0A= 36cc: aec2000c sw v0,12(s6)=0A= =0A= #ifdef MAX_SKB_FRAGS=0A= if(skb_shinfo(skb)->nr_frags > 0) {=0A= 36d0: 8fa80080 lw t0,128(sp)=0A= }=0A= =0A= static __inline__ __const__ __u32 __fswab32(__u32 x)=0A= {=0A= return __arch__swab32(x);=0A= 36d4: 00003021 move a2,zero=0A= 36d8: 00001821 move v1,zero=0A= 36dc: 8d070088 lw a3,136(t0)=0A= 36e0: 8ce20004 lw v0,4(a3)=0A= 36e4: 104000eb beqz v0,3a94 =0A= 36e8: 00002021 move a0,zero=0A= for(f =3D 0; f < skb_shinfo(skb)->nr_frags; f++) {=0A= 36ec: 104000e9 beqz v0,3a94 =0A= 36f0: 00006821 move t5,zero=0A= 36f4: 8fa20014 lw v0,20(sp)=0A= 36f8: afa30038 sw v1,56(sp)=0A= 36fc: 8fa30010 lw v1,16(sp)=0A= 3700: 34421000 ori v0,v0,0x1000=0A= 3704: 8fb40040 lw s4,64(sp)=0A= 3708: afa4003c sw a0,60(sp)=0A= 370c: 00022600 sll a0,v0,0x18=0A= 3710: afa20024 sw v0,36(sp)=0A= 3714: afa60034 sw a2,52(sp)=0A= 3718: 240e0001 li t6,1=0A= 371c: afa30030 sw v1,48(sp)=0A= 3720: afa40028 sw a0,40(sp)=0A= frag =3D &skb_shinfo(skb)->frags[f];=0A= i =3D (i + 1) % adapter->tx_ring.count;=0A= 3724: 8e6400f0 lw a0,240(s3)=0A= 3728: 26a20001 addiu v0,s5,1=0A= 372c: 000d18c0 sll v1,t5,0x3=0A= 3730: 0044001b divu zero,v0,a0=0A= 3734: 00e31821 addu v1,a3,v1=0A= 3738: 50800001 beqzl a0,3740 =0A= 373c: 0007000d break 0x7=0A= 3740: 247e000c addiu s8,v1,12=0A= 3744: 00002810 mfhi a1=0A= 3748: 00a0a821 move s5,a1=0A= 374c: 00000000 nop=0A= extern __inline__ void atomic_sub(int i, atomic_t * v)=0A= {=0A= unsigned long temp;=0A= =0A= __asm__ __volatile__(=0A= 3750: c2820000 ll v0,0(s4)=0A= 3754: 004e1023 subu v0,v0,t6=0A= 3758: e2820000 sc v0,0(s4)=0A= 375c: 1040fffc beqz v0,3750 =0A= 3760: 00000000 nop=0A= atomic_dec(&adapter->tx_ring.unused);=0A= tx_desc =3D E1000_TX_DESC(adapter->tx_ring, i);=0A= =0A= len =3D frag->size;=0A= 3764: 97d70006 lhu s7,6(s8)=0A= 3768: 8e6300e4 lw v1,228(s3)=0A= 376c: 00151100 sll v0,s5,0x4=0A= offset =3D 0;=0A= =0A= while(len > 4096) {=0A= 3770: 2ae41001 slti a0,s7,4097=0A= 3774: 0062b021 addu s6,v1,v0=0A= 3778: 1480006a bnez a0,3924 =0A= 377c: 00007821 move t7,zero=0A= 3780: 8fa30024 lw v1,36(sp)=0A= 3784: 8fa40028 lw a0,40(sp)=0A= 3788: 3c1900ff lui t9,0xff=0A= 378c: 3062ff00 andi v0,v1,0xff00=0A= 3790: 8fa50024 lw a1,36(sp)=0A= 3794: 00021200 sll v0,v0,0x8=0A= 3798: 00791824 and v1,v1,t9=0A= 379c: 8fa70010 lw a3,16(sp)=0A= 37a0: 00821025 or v0,a0,v0=0A= 37a4: 00031a02 srl v1,v1,0x8=0A= 37a8: 00431025 or v0,v0,v1=0A= 37ac: 00052602 srl a0,a1,0x18=0A= 37b0: 00441025 or v0,v0,a0=0A= 37b4: 00073a00 sll a3,a3,0x8=0A= 37b8: afa20020 sw v0,32(sp)=0A= 37bc: 3c12ff00 lui s2,0xff00=0A= 37c0: afa7002c sw a3,44(sp)=0A= adapter->tx_ring.buffer_info[i].length =3D 4096;=0A= 37c4: 8e630100 lw v1,256(s3)=0A= 37c8: 00158040 sll s0,s5,0x1=0A= 37cc: 02158021 addu s0,s0,s5=0A= 37d0: 001080c0 sll s0,s0,0x3=0A= 37d4: 02031821 addu v1,s0,v1=0A= 37d8: 24021000 li v0,4096=0A= 37dc: ac620010 sw v0,16(v1)=0A= adapter->tx_ring.buffer_info[i].dma =3D=0A= 37e0: 97c40004 lhu a0,4(s8)=0A= */=0A= static inline dma_addr_t pci_map_page(struct pci_dev *hwdev, struct page = *page,=0A= unsigned long offset, size_t size,=0A= int direction)=0A= {=0A= 37e4: 8fc20000 lw v0,0(s8)=0A= 37e8: 008f2021 addu a0,a0,t7=0A= unsigned long addr;=0A= =0A= if (direction =3D=3D PCI_DMA_NONE)=0A= BUG();=0A= =0A= addr =3D (unsigned long) page_address(page);=0A= 37ec: 8c510038 lw s1,56(v0)=0A= addr +=3D offset;=0A= #ifdef CONFIG_NONCOHERENT_IO=0A= dma_cache_wback_inv(addr, size);=0A= 37f0: 3c030000 lui v1,0x0=0A= 37f4: 8c630000 lw v1,0(v1)=0A= 37f8: 24051000 li a1,4096=0A= 37fc: 02248821 addu s1,s1,a0=0A= 3800: 02202021 move a0,s1=0A= 3804: afae004c sw t6,76(sp)=0A= 3808: afaf0050 sw t7,80(sp)=0A= 380c: afb90054 sw t9,84(sp)=0A= 3810: 0060f809 jalr v1=0A= 3814: afad0048 sw t5,72(sp)=0A= pci_map_page(pdev, frag->page, frag->page_offset + = offset,=0A= 4096, PCI_DMA_TODEVICE);=0A= 3818: 8e650100 lw a1,256(s3)=0A= * IO bus memory addresses are also 1:1 with the physical address=0A= */=0A= static inline unsigned long virt_to_bus(volatile void * address)=0A= {=0A= return PHYSADDR(address);=0A= 381c: 3c041fff lui a0,0x1fff=0A= 3820: 3484ffff ori a0,a0,0xffff=0A= 3824: 02241824 and v1,s1,a0=0A= 3828: 02052821 addu a1,s0,a1=0A= 382c: 00001021 move v0,zero=0A= 3830: aca20008 sw v0,8(a1)=0A= 3834: aca3000c sw v1,12(a1)=0A= =0A= tx_desc->buffer_addr =3D=0A= 3838: 8e640100 lw a0,256(s3)=0A= cpu_to_le64(adapter->tx_ring.buffer_info[i].dma);=0A= tx_desc->lower.data =3D cpu_to_le32(txd_lower | 4096);=0A= tx_desc->upper.data =3D cpu_to_le32(txd_upper);=0A= 383c: 8fa8002c lw t0,44(sp)=0A= {=0A= # ifdef __SWAB_64_THRU_32__=0A= __u32 h =3D x >> 32;=0A= __u32 l =3D x & ((1ULL<<32)-1);=0A= return (((__u64)__swab32(l)) << 32) | ((__u64)(__swab32(h)));=0A= 3840: 00003021 move a2,zero=0A= 3844: 02048021 addu s0,s0,a0=0A= static __inline__ __const__ __u64 __fswab64(__u64 x)=0A= {=0A= # ifdef __SWAB_64_THRU_32__=0A= __u32 h =3D x >> 32;=0A= __u32 l =3D x & ((1ULL<<32)-1);=0A= 3848: 8e05000c lw a1,12(s0)=0A= 384c: 8e0a0008 lw t2,8(s0)=0A= 3850: aec8000c sw t0,12(s6)=0A= }=0A= =0A= static __inline__ __const__ __u32 __fswab32(__u32 x)=0A= {=0A= return __arch__swab32(x);=0A= 3854: 8fb90054 lw t9,84(sp)=0A= 3858: 30a4ff00 andi a0,a1,0xff00=0A= 385c: 00042200 sll a0,a0,0x8=0A= 3860: 00b95824 and t3,a1,t9=0A= 3864: 00054600 sll t0,a1,0x18=0A= 3868: 314cff00 andi t4,t2,0xff00=0A= 386c: 01594824 and t1,t2,t9=0A= 3870: 01044025 or t0,t0,a0=0A= 3874: 000b5a02 srl t3,t3,0x8=0A= 3878: 00b22824 and a1,a1,s2=0A= 387c: 000c6200 sll t4,t4,0x8=0A= 3880: 000a2600 sll a0,t2,0x18=0A= 3884: 010b4025 or t0,t0,t3=0A= 3888: 008c2025 or a0,a0,t4=0A= 388c: 00052e02 srl a1,a1,0x18=0A= 3890: 00094a02 srl t1,t1,0x8=0A= 3894: 01525024 and t2,t2,s2=0A= 3898: 00892025 or a0,a0,t1=0A= }=0A= static __inline__ __u32 __swab32p(__u32 *x)=0A= {=0A= return __arch__swab32p(x);=0A= }=0A= static __inline__ void __swab32s(__u32 *addr)=0A= {=0A= __arch__swab32s(addr);=0A= }=0A= =0A= #ifdef __BYTEORDER_HAS_U64__=0A= static __inline__ __const__ __u64 __fswab64(__u64 x)=0A= {=0A= # ifdef __SWAB_64_THRU_32__=0A= __u32 h =3D x >> 32;=0A= __u32 l =3D x & ((1ULL<<32)-1);=0A= return (((__u64)__swab32(l)) << 32) | ((__u64)(__swab32(h)));=0A= 389c: 01051825 or v1,t0,a1=0A= 38a0: 000a5602 srl t2,t2,0x18=0A= 38a4: 008a3825 or a3,a0,t2=0A= 38a8: 00031000 sll v0,v1,0x0=0A= 38ac: 00001821 move v1,zero=0A= 38b0: 00461025 or v0,v0,a2=0A= 38b4: 00671825 or v1,v1,a3=0A= 38b8: aec20000 sw v0,0(s6)=0A= 38bc: aec30004 sw v1,4(s6)=0A= 38c0: 8fa20020 lw v0,32(sp)=0A= =0A= len -=3D 4096;=0A= 38c4: 26f7f000 addiu s7,s7,-4096=0A= 38c8: aec20008 sw v0,8(s6)=0A= offset +=3D 4096;=0A= i =3D (i + 1) % adapter->tx_ring.count;=0A= 38cc: 8e6300f0 lw v1,240(s3)=0A= 38d0: 26a20001 addiu v0,s5,1=0A= 38d4: 0043001b divu zero,v0,v1=0A= 38d8: 50600001 beqzl v1,38e0 =0A= 38dc: 0007000d break 0x7=0A= 38e0: 8faf0050 lw t7,80(sp)=0A= extern __inline__ void atomic_sub(int i, atomic_t * v)=0A= {=0A= unsigned long temp;=0A= =0A= __asm__ __volatile__(=0A= 38e4: 8fae004c lw t6,76(sp)=0A= 38e8: 25ef1000 addiu t7,t7,4096=0A= 38ec: 00002010 mfhi a0=0A= 38f0: 0080a821 move s5,a0=0A= 38f4: 00000000 nop=0A= extern __inline__ void atomic_sub(int i, atomic_t * v)=0A= {=0A= unsigned long temp;=0A= =0A= __asm__ __volatile__(=0A= 38f8: c2820000 ll v0,0(s4)=0A= 38fc: 004e1023 subu v0,v0,t6=0A= 3900: e2820000 sc v0,0(s4)=0A= 3904: 1040fffc beqz v0,38f8 =0A= 3908: 00000000 nop=0A= atomic_dec(&adapter->tx_ring.unused);=0A= tx_desc =3D E1000_TX_DESC(adapter->tx_ring, i);=0A= 390c: 8e6400e4 lw a0,228(s3)=0A= 3910: 00151100 sll v0,s5,0x4=0A= }=0A= 3914: 2ae31001 slti v1,s7,4097=0A= 3918: 0082b021 addu s6,a0,v0=0A= 391c: 1060ffa9 beqz v1,37c4 =0A= 3920: 8fad0048 lw t5,72(sp)=0A= adapter->tx_ring.buffer_info[i].length =3D len;=0A= 3924: 8e620100 lw v0,256(s3)=0A= 3928: 00159040 sll s2,s5,0x1=0A= 392c: 02558821 addu s1,s2,s5=0A= 3930: 001188c0 sll s1,s1,0x3=0A= 3934: 02221021 addu v0,s1,v0=0A= 3938: ac570010 sw s7,16(v0)=0A= adapter->tx_ring.buffer_info[i].dma =3D=0A= 393c: 97c30004 lhu v1,4(s8)=0A= */=0A= static inline dma_addr_t pci_map_page(struct pci_dev *hwdev, struct page = *page,=0A= unsigned long offset, size_t size,=0A= int direction)=0A= {=0A= 3940: 8fc20000 lw v0,0(s8)=0A= 3944: 006f1821 addu v1,v1,t7=0A= unsigned long addr;=0A= =0A= if (direction =3D=3D PCI_DMA_NONE)=0A= BUG();=0A= =0A= addr =3D (unsigned long) page_address(page);=0A= 3948: 8c500038 lw s0,56(v0)=0A= addr +=3D offset;=0A= #ifdef CONFIG_NONCOHERENT_IO=0A= dma_cache_wback_inv(addr, size);=0A= 394c: 3c060000 lui a2,0x0=0A= 3950: 8cc60000 lw a2,0(a2)=0A= 3954: 02038021 addu s0,s0,v1=0A= 3958: 02002021 move a0,s0=0A= 395c: 02e02821 move a1,s7=0A= 3960: afad0048 sw t5,72(sp)=0A= 3964: 00c0f809 jalr a2=0A= 3968: afae004c sw t6,76(sp)=0A= pci_map_page(pdev, frag->page, frag->page_offset + = offset, len,=0A= PCI_DMA_TODEVICE);=0A= 396c: 8e650100 lw a1,256(s3)=0A= * IO bus memory addresses are also 1:1 with the physical address=0A= */=0A= static inline unsigned long virt_to_bus(volatile void * address)=0A= {=0A= return PHYSADDR(address);=0A= 3970: 3c041fff lui a0,0x1fff=0A= 3974: 3484ffff ori a0,a0,0xffff=0A= 3978: 02041824 and v1,s0,a0=0A= 397c: 02252821 addu a1,s1,a1=0A= 3980: 00001021 move v0,zero=0A= 3984: aca20008 sw v0,8(a1)=0A= 3988: aca3000c sw v1,12(a1)=0A= tx_desc->buffer_addr =3D=0A= 398c: 8e640100 lw a0,256(s3)=0A= cpu_to_le64(adapter->tx_ring.buffer_info[i].dma);=0A= 3990: 8fa20014 lw v0,20(sp)=0A= }=0A= =0A= static __inline__ __const__ __u32 __fswab32(__u32 x)=0A= {=0A= return __arch__swab32(x);=0A= 3994: 3c0500ff lui a1,0xff=0A= 3998: 02248821 addu s1,s1,a0=0A= static __inline__ __const__ __u64 __fswab64(__u64 x)=0A= {=0A= # ifdef __SWAB_64_THRU_32__=0A= __u32 h =3D x >> 32;=0A= __u32 l =3D x & ((1ULL<<32)-1);=0A= 399c: 8e23000c lw v1,12(s1)=0A= 39a0: 8e290008 lw t1,8(s1)=0A= 39a4: 00575825 or t3,v0,s7=0A= }=0A= =0A= static __inline__ __const__ __u32 __fswab32(__u32 x)=0A= {=0A= return __arch__swab32(x);=0A= 39a8: 3062ff00 andi v0,v1,0xff00=0A= 39ac: 00652024 and a0,v1,a1=0A= 39b0: 00021200 sll v0,v0,0x8=0A= 39b4: 00033600 sll a2,v1,0x18=0A= 39b8: 3125ff00 andi a1,t1,0xff00=0A= 39bc: 3c0800ff lui t0,0xff=0A= 39c0: 00c23025 or a2,a2,v0=0A= 39c4: 00052a00 sll a1,a1,0x8=0A= 39c8: 01281024 and v0,t1,t0=0A= 39cc: 00095600 sll t2,t1,0x18=0A= 39d0: 01455025 or t2,t2,a1=0A= 39d4: 00021202 srl v0,v0,0x8=0A= 39d8: 3c07ff00 lui a3,0xff00=0A= 39dc: 01425025 or t2,t2,v0=0A= 39e0: 8fa20030 lw v0,48(sp)=0A= 39e4: 00042202 srl a0,a0,0x8=0A= 39e8: 00671824 and v1,v1,a3=0A= 39ec: 00c43025 or a2,a2,a0=0A= 39f0: 00031e02 srl v1,v1,0x18=0A= }=0A= static __inline__ __u32 __swab32p(__u32 *x)=0A= {=0A= return __arch__swab32p(x);=0A= }=0A= static __inline__ void __swab32s(__u32 *addr)=0A= {=0A= __arch__swab32s(addr);=0A= }=0A= =0A= #ifdef __BYTEORDER_HAS_U64__=0A= static __inline__ __const__ __u64 __fswab64(__u64 x)=0A= {=0A= # ifdef __SWAB_64_THRU_32__=0A= __u32 h =3D x >> 32;=0A= __u32 l =3D x & ((1ULL<<32)-1);=0A= return (((__u64)__swab32(l)) << 32) | ((__u64)(__swab32(h)));=0A= 39f4: 00c32825 or a1,a2,v1=0A= 39f8: 00023200 sll a2,v0,0x8=0A= 39fc: 8fa20034 lw v0,52(sp)=0A= 3a00: 316cff00 andi t4,t3,0xff00=0A= 3a04: 01274824 and t1,t1,a3=0A= 3a08: 01684024 and t0,t3,t0=0A= 3a0c: 000b3e00 sll a3,t3,0x18=0A= 3a10: 3c03ff00 lui v1,0xff00=0A= 3a14: 000c6200 sll t4,t4,0x8=0A= 3a18: 00094e02 srl t1,t1,0x18=0A= 3a1c: 00002021 move a0,zero=0A= 3a20: 00084202 srl t0,t0,0x8=0A= 3a24: 01635824 and t3,t3,v1=0A= 3a28: 00463025 or a2,v0,a2=0A= 3a2c: 01491825 or v1,t2,t1=0A= 3a30: 00001021 move v0,zero=0A= 3a34: 00ec3825 or a3,a3,t4=0A= 3a38: 00052000 sll a0,a1,0x0=0A= 3a3c: 00002821 move a1,zero=0A= 3a40: 00822025 or a0,a0,v0=0A= 3a44: 00e83825 or a3,a3,t0=0A= 3a48: 8fa80038 lw t0,56(sp)=0A= 3a4c: 00a32825 or a1,a1,v1=0A= 3a50: 8fa2003c lw v0,60(sp)=0A= 3a54: 000b5e02 srl t3,t3,0x18=0A= 3a58: 00c83025 or a2,a2,t0=0A= 3a5c: 00eb3825 or a3,a3,t3=0A= 3a60: 00c23025 or a2,a2,v0=0A= 3a64: aec40000 sw a0,0(s6)=0A= 3a68: aec50004 sw a1,4(s6)=0A= tx_desc->lower.data =3D cpu_to_le32(txd_lower | len);=0A= 3a6c: aec70008 sw a3,8(s6)=0A= tx_desc->upper.data =3D cpu_to_le32(txd_upper);=0A= 3a70: aec6000c sw a2,12(s6)=0A= 3a74: 8fa30080 lw v1,128(sp)=0A= 3a78: 8fad0048 lw t5,72(sp)=0A= 3a7c: 8c670088 lw a3,136(v1)=0A= 3a80: 25ad0001 addiu t5,t5,1=0A= 3a84: 8ce20004 lw v0,4(a3)=0A= 3a88: 01a2102b sltu v0,t5,v0=0A= 3a8c: 1440ff25 bnez v0,3724 =0A= 3a90: 8fae004c lw t6,76(sp)=0A= }=0A= }=0A= 3a94: 8ec20008 lw v0,8(s6)=0A= #endif=0A= /* EOP and SKB pointer go with the last fragment */=0A= tx_desc->lower.data |=3D cpu_to_le32(E1000_TXD_CMD_EOP);=0A= adapter->tx_ring.buffer_info[i].skb =3D skb;=0A= 3a98: 02552021 addu a0,s2,s5=0A= 3a9c: 000420c0 sll a0,a0,0x3=0A= 3aa0: 34420001 ori v0,v0,0x1=0A= 3aa4: aec20008 sw v0,8(s6)=0A= 3aa8: 8e630100 lw v1,256(s3)=0A= 3aac: 8fa70080 lw a3,128(sp)=0A= =0A= i =3D (i + 1) % adapter->tx_ring.count;=0A= 3ab0: 26a50001 addiu a1,s5,1=0A= 3ab4: 00832021 addu a0,a0,v1=0A= 3ab8: ac870000 sw a3,0(a0)=0A= 3abc: 8e6300f0 lw v1,240(s3)=0A= 3ac0: 3c0600ff lui a2,0xff=0A= 3ac4: 3c11ff00 lui s1,0xff00=0A= 3ac8: 00a3001b divu zero,a1,v1=0A= 3acc: 50600001 beqzl v1,3ad4 =0A= 3ad0: 0007000d break 0x7=0A= 3ad4: 24020001 li v0,1=0A= extern __inline__ void atomic_sub(int i, atomic_t * v)=0A= {=0A= unsigned long temp;=0A= =0A= __asm__ __volatile__(=0A= 3ad8: 8fa30040 lw v1,64(sp)=0A= 3adc: 00008010 mfhi s0=0A= ...=0A= extern __inline__ void atomic_sub(int i, atomic_t * v)=0A= {=0A= unsigned long temp;=0A= =0A= __asm__ __volatile__(=0A= 3ae8: c0640000 ll a0,0(v1)=0A= 3aec: 00822023 subu a0,a0,v0=0A= 3af0: e0640000 sc a0,0(v1)=0A= 3af4: 1080fffc beqz a0,3ae8 =0A= 3af8: 00000000 nop=0A= atomic_dec(&adapter->tx_ring.unused);=0A= =0A= /* Move the HW Tx Tail Pointer */=0A= adapter->tx_ring.next_to_use =3D i;=0A= 3afc: 8e63000c lw v1,12(s3)=0A= 3b00: 2c630002 sltiu v1,v1,2=0A= 3b04: 1460000f bnez v1,3b44 =0A= 3b08: ae7000f8 sw s0,248(s3)=0A= }=0A= =0A= static __inline__ __const__ __u32 __fswab32(__u32 x)=0A= {=0A= return __arch__swab32(x);=0A= 3b0c: 3203ff00 andi v1,s0,0xff00=0A= 3b10: 00031a00 sll v1,v1,0x8=0A= 3b14: 02062824 and a1,s0,a2=0A= 3b18: 00101600 sll v0,s0,0x18=0A= 3b1c: 00431025 or v0,v0,v1=0A= 3b20: 02112024 and a0,s0,s1=0A= 3b24: 00052a02 srl a1,a1,0x8=0A= 3b28: 8e630008 lw v1,8(s3)=0A= }=0A= =0A= static __inline__ __const__ __u32 __fswab32(__u32 x)=0A= {=0A= return __arch__swab32(x);=0A= 3b2c: 00451025 or v0,v0,a1=0A= 3b30: 00042602 srl a0,a0,0x18=0A= 3b34: 00441025 or v0,v0,a0=0A= =0A= E1000_WRITE_REG(&adapter->shared, TDT, adapter->tx_ring.next_to_use);=0A= 3b38: ac623818 sw v0,14360(v1)=0A= 3b3c: 08000edd j 3b74 =0A= 3b40: 00000000 nop=0A= }=0A= =0A= static __inline__ __const__ __u32 __fswab32(__u32 x)=0A= {=0A= return __arch__swab32(x);=0A= 3b44: 3203ff00 andi v1,s0,0xff00=0A= 3b48: 00031a00 sll v1,v1,0x8=0A= 3b4c: 02062824 and a1,s0,a2=0A= 3b50: 00101600 sll v0,s0,0x18=0A= 3b54: 00431025 or v0,v0,v1=0A= 3b58: 02112024 and a0,s0,s1=0A= 3b5c: 00052a02 srl a1,a1,0x8=0A= 3b60: 8e630008 lw v1,8(s3)=0A= }=0A= =0A= static __inline__ __const__ __u32 __fswab32(__u32 x)=0A= {=0A= return __arch__swab32(x);=0A= 3b64: 00451025 or v0,v0,a1=0A= 3b68: 00042602 srl a0,a0,0x18=0A= 3b6c: 00441025 or v0,v0,a0=0A= 3b70: ac620438 sw v0,1080(v1)=0A= =0A= if(atomic_read(&adapter->tx_timeout) =3D=3D 0)=0A= 3b74: 8e62010c lw v0,268(s3)=0A= 3b78: 14400002 bnez v0,3b84 =0A= 3b7c: 24020003 li v0,3=0A= atomic_set(&adapter->tx_timeout, 3);=0A= 3b80: ae62010c sw v0,268(s3)=0A= =0A= netdev->trans_start =3D jiffies;=0A= 3b84: 3c030000 lui v1,0x0=0A= 3b88: 8c630000 lw v1,0(v1)=0A= 3b8c: 8fa40084 lw a0,132(sp)=0A= =0A= return 0;=0A= 3b90: 00001021 move v0,zero=0A= 3b94: ac83004c sw v1,76(a0)=0A= }=0A= 3b98: 8fbf007c lw ra,124(sp)=0A= 3b9c: 8fbe0078 lw s8,120(sp)=0A= 3ba0: 8fb70074 lw s7,116(sp)=0A= 3ba4: 8fb60070 lw s6,112(sp)=0A= 3ba8: 8fb5006c lw s5,108(sp)=0A= 3bac: 8fb40068 lw s4,104(sp)=0A= 3bb0: 8fb30064 lw s3,100(sp)=0A= 3bb4: 8fb20060 lw s2,96(sp)=0A= 3bb8: 8fb1005c lw s1,92(sp)=0A= 3bbc: 8fb00058 lw s0,88(sp)=0A= 3bc0: 03e00008 jr ra=0A= 3bc4: 27bd0080 addiu sp,sp,128=0A= =0A= 00003bc8 :=0A= =0A= /**=0A= * e1000_get_stats - Get System Network Statistics=0A= * @netdev: network interface device structure=0A= *=0A= * Returns the address of the device statistics structure.=0A= * The statistics are actually updated from the timer callback.=0A= **/=0A= =0A= struct net_device_stats *=0A= e1000_get_stats(struct net_device *netdev)=0A= {=0A= struct e1000_adapter *adapter =3D netdev->priv;=0A= 3bc8: 8c820064 lw v0,100(a0)=0A= =0A= E1000_DBG("e1000_get_stats\n");=0A= =0A= return &adapter->net_stats;=0A= 3bcc: 03e00008 jr ra=0A= 3bd0: 24420150 addiu v0,v0,336=0A= =0A= 00003bd4 :=0A= 3bd4: 27bdffd0 addiu sp,sp,-48=0A= 3bd8: afb50024 sw s5,36(sp)=0A= 3bdc: afb40020 sw s4,32(sp)=0A= 3be0: afbf0028 sw ra,40(sp)=0A= 3be4: afb3001c sw s3,28(sp)=0A= 3be8: afb20018 sw s2,24(sp)=0A= 3bec: afb10014 sw s1,20(sp)=0A= 3bf0: afb00010 sw s0,16(sp)=0A= 3bf4: 0080a821 move s5,a0=0A= 3bf8: 00a0a021 move s4,a1=0A= }=0A= =0A= /**=0A= * e1000_change_mtu - Change the Maximum Transfer Unit=0A= * @netdev: network interface device structure=0A= * @new_mtu: new value for maximum frame size=0A= *=0A= * Returns 0 on success, negative on failure=0A= **/=0A= =0A= int=0A= e1000_change_mtu(struct net_device *netdev,=0A= int new_mtu)=0A= {=0A= struct e1000_adapter *adapter =3D netdev->priv;=0A= 3bfc: 8eb20064 lw s2,100(s5)=0A= uint32_t old_mtu =3D adapter->rx_buffer_len;=0A= =0A= E1000_DBG("e1000_change_mtu\n");=0A= if((new_mtu < MINIMUM_ETHERNET_PACKET_SIZE - ENET_HEADER_SIZE) ||=0A= 3c00: 2682ffd2 addiu v0,s4,-46=0A= 3c04: 2c423ec5 sltiu v0,v0,16069=0A= 3c08: 14400005 bnez v0,3c20 =0A= 3c0c: 8e4300b8 lw v1,184(s2)=0A= (new_mtu > MAX_JUMBO_FRAME_SIZE - ENET_HEADER_SIZE)) {=0A= E1000_ERR("Invalid MTU setting\n");=0A= 3c10: 3c040000 lui a0,0x0=0A= 3c14: 24840d60 addiu a0,a0,3424=0A= return -EINVAL;=0A= 3c18: 08000f12 j 3c48 =0A= 3c1c: 00000000 nop=0A= }=0A= =0A= if(new_mtu <=3D MAXIMUM_ETHERNET_PACKET_SIZE - ENET_HEADER_SIZE) {=0A= 3c20: 2a8205dd slti v0,s4,1501=0A= 3c24: 50400003 beqzl v0,3c34 =0A= 3c28: 8e42000c lw v0,12(s2)=0A= /* 2k buffers */=0A= adapter->rx_buffer_len =3D E1000_RXBUFFER_2048;=0A= =0A= } else if(adapter->shared.mac_type < e1000_82543) {=0A= 3c2c: 08000f1f j 3c7c =0A= 3c30: 24020800 li v0,2048=0A= 3c34: 2c420002 sltiu v0,v0,2=0A= 3c38: 10400009 beqz v0,3c60 =0A= 3c3c: 2a820fef slti v0,s4,4079=0A= E1000_ERR("Jumbo Frames not supported on 82542\n");=0A= 3c40: 3c040000 lui a0,0x0=0A= 3c44: 24840d80 addiu a0,a0,3456=0A= 3c48: 3c020000 lui v0,0x0=0A= 3c4c: 24420000 addiu v0,v0,0=0A= 3c50: 0040f809 jalr v0=0A= 3c54: 00000000 nop=0A= return -EINVAL;=0A= 3c58: 08000f70 j 3dc0 =0A= 3c5c: 2402ffea li v0,-22=0A= =0A= } else if(new_mtu <=3D E1000_RXBUFFER_4096 - ENET_HEADER_SIZE - = CRC_LENGTH) {=0A= 3c60: 50400003 beqzl v0,3c70 =0A= 3c64: 2a821fef slti v0,s4,8175=0A= /* 4k buffers */=0A= adapter->rx_buffer_len =3D E1000_RXBUFFER_4096;=0A= =0A= } else if(new_mtu <=3D E1000_RXBUFFER_8192 - ENET_HEADER_SIZE - = CRC_LENGTH) {=0A= 3c68: 08000f1f j 3c7c =0A= 3c6c: 24021000 li v0,4096=0A= 3c70: 50400002 beqzl v0,3c7c =0A= 3c74: 24024000 li v0,16384=0A= /* 8k buffers */=0A= adapter->rx_buffer_len =3D E1000_RXBUFFER_8192;=0A= =0A= } else {=0A= 3c78: 24022000 li v0,8192=0A= /* 16k buffers */=0A= adapter->rx_buffer_len =3D E1000_RXBUFFER_16384;=0A= 3c7c: ae4200b8 sw v0,184(s2)=0A= }=0A= =0A= if(old_mtu !=3D adapter->rx_buffer_len &&=0A= 3c80: 8e4200b8 lw v0,184(s2)=0A= 3c84: 1062004b beq v1,v0,3db4 =0A= 3c88: 26820012 addiu v0,s4,18=0A= * @addr: Address to start counting from=0A= */=0A= extern __inline__ int test_bit(int nr, volatile void *addr)=0A= {=0A= return ((1UL << (nr & 31)) & (((const unsigned int *) addr)[nr >> 5])) = !=3D 0;=0A= 3c8c: 8e42008c lw v0,140(s2)=0A= 3c90: 30420001 andi v0,v0,0x1=0A= test_bit(E1000_BOARD_OPEN, &adapter->flags)) {=0A= 3c94: 10400046 beqz v0,3db0 =0A= 3c98: 24100001 li s0,1=0A= * Atomically adds @i to @v. Note that the guaranteed useful range=0A= * of an atomic_t is only 24 bits.=0A= */=0A= extern __inline__ void atomic_add(int i, atomic_t * v)=0A= {=0A= 3c9c: 265100d8 addiu s1,s2,216=0A= unsigned long temp;=0A= =0A= __asm__ __volatile__(=0A= 3ca0: c2220000 ll v0,0(s1)=0A= 3ca4: 00501021 addu v0,v0,s0=0A= 3ca8: e2220000 sc v0,0(s1)=0A= 3cac: 1040fffc beqz v0,3ca0 =0A= 3cb0: 00000000 nop=0A= * restricted to acting on a single-word quantity.=0A= */=0A= extern __inline__ void=0A= set_bit(int nr, volatile void *addr)=0A= {=0A= 3cb4: 26b3002c addiu s3,s5,44=0A= unsigned long *m =3D ((unsigned long *) addr) + (nr >> 5);=0A= unsigned long temp;=0A= =0A= __asm__ __volatile__(=0A= 3cb8: c2620000 ll v0,0(s3)=0A= 3cbc: 34420001 ori v0,v0,0x1=0A= 3cc0: e2620000 sc v0,0(s3)=0A= 3cc4: 1040fffc beqz v0,3cb8 =0A= 3cc8: 00000000 nop=0A= =0A= /* stop */=0A= tasklet_disable(&adapter->rx_fill_tasklet);=0A= netif_stop_queue(netdev);=0A= adapter->shared.adapter_stopped =3D 0;=0A= e1000_adapter_stop(&adapter->shared);=0A= 3ccc: 26440008 addiu a0,s2,8=0A= 3cd0: 3c020000 lui v0,0x0=0A= 3cd4: 24420000 addiu v0,v0,0=0A= 3cd8: 0040f809 jalr v0=0A= 3cdc: ae400064 sw zero,100(s2)=0A= =0A= /* clean out old buffers */=0A= e1000_clean_rx_ring(adapter);=0A= 3ce0: 3c020000 lui v0,0x0=0A= 3ce4: 244228d8 addiu v0,v0,10456=0A= 3ce8: 0040f809 jalr v0=0A= 3cec: 02402021 move a0,s2=0A= e1000_clean_tx_ring(adapter);=0A= 3cf0: 3c020000 lui v0,0x0=0A= 3cf4: 24422720 addiu v0,v0,10016=0A= 3cf8: 0040f809 jalr v0=0A= 3cfc: 02402021 move a0,s2=0A= =0A= /* reset hardware */=0A= adapter->shared.adapter_stopped =3D 0;=0A= e1000_hw_init(adapter);=0A= 3d00: 02402021 move a0,s2=0A= 3d04: 3c020000 lui v0,0x0=0A= 3d08: 244217c4 addiu v0,v0,6084=0A= 3d0c: 0040f809 jalr v0=0A= 3d10: ae400064 sw zero,100(s2)=0A= =0A= /* go */=0A= e1000_setup_rctl(adapter);=0A= 3d14: 3c020000 lui v0,0x0=0A= 3d18: 24422308 addiu v0,v0,8968=0A= 3d1c: 0040f809 jalr v0=0A= 3d20: 02402021 move a0,s2=0A= e1000_configure_rx(adapter);=0A= 3d24: 3c020000 lui v0,0x0=0A= 3d28: 244223a8 addiu v0,v0,9128=0A= 3d2c: 0040f809 jalr v0=0A= 3d30: 02402021 move a0,s2=0A= e1000_configure_tx(adapter);=0A= 3d34: 3c020000 lui v0,0x0=0A= 3d38: 24421f60 addiu v0,v0,8032=0A= 3d3c: 0040f809 jalr v0=0A= 3d40: 02402021 move a0,s2=0A= smp_mb();=0A= }=0A= =0A= static inline void tasklet_enable(struct tasklet_struct *t)=0A= {=0A= 3d44: 264500d0 addiu a1,s2,208=0A= extern __inline__ void atomic_sub(int i, atomic_t * v)=0A= {=0A= unsigned long temp;=0A= =0A= __asm__ __volatile__(=0A= 3d48: c2230000 ll v1,0(s1)=0A= 3d4c: 00701823 subu v1,v1,s0=0A= 3d50: e2230000 sc v1,0(s1)=0A= 3d54: 1060fffc beqz v1,3d48 =0A= 3d58: 00000000 nop=0A= {=0A= unsigned long *m =3D ((unsigned long *) addr) + (nr >> 5);=0A= unsigned long temp, res;=0A= =0A= __asm__ __volatile__(=0A= 3d5c: c24400d4 ll a0,212(s2)=0A= 3d60: 00901025 or v0,a0,s0=0A= 3d64: e24200d4 sc v0,212(s2)=0A= 3d68: 1040fffc beqz v0,3d5c =0A= 3d6c: 00901024 and v0,a0,s0=0A= extern void FASTCALL(__tasklet_schedule(struct tasklet_struct *t));=0A= =0A= static inline void tasklet_schedule(struct tasklet_struct *t)=0A= {=0A= if (!test_and_set_bit(TASKLET_STATE_SCHED, &t->state))=0A= 3d70: 14400005 bnez v0,3d88 =0A= 3d74: 00000000 nop=0A= __tasklet_schedule(t);=0A= 3d78: 3c020000 lui v0,0x0=0A= 3d7c: 24420000 addiu v0,v0,0=0A= 3d80: 0040f809 jalr v0=0A= 3d84: 00a02021 move a0,a1=0A= #ifdef IANS=0A= /* restore VLAN settings */=0A= if((IANS_BD_TAGGING_MODE) = (ANS_PRIVATE_DATA_FIELD(adapter)->tag_mode)=0A= !=3D IANS_BD_TAGGING_NONE)=0A= bd_ans_hw_EnableVLAN(adapter);=0A= #endif=0A= tasklet_enable(&adapter->rx_fill_tasklet);=0A= tasklet_schedule(&adapter->rx_fill_tasklet);=0A= e1000_irq_enable(adapter);=0A= 3d88: 3c020000 lui v0,0x0=0A= 3d8c: 244274ac addiu v0,v0,29868=0A= 3d90: 0040f809 jalr v0=0A= 3d94: 02402021 move a0,s2=0A= {=0A= unsigned long *m =3D ((unsigned long *) addr) + (nr >> 5);=0A= unsigned long temp;=0A= =0A= __asm__ __volatile__(=0A= 3d98: c2630000 ll v1,0(s3)=0A= 3d9c: 2401fffe li at,-2=0A= 3da0: 00611824 and v1,v1,at=0A= 3da4: e2630000 sc v1,0(s3)=0A= 3da8: 1060fffb beqz v1,3d98 =0A= 3dac: 00000000 nop=0A= netif_start_queue(netdev);=0A= }=0A= =0A= netdev->mtu =3D new_mtu;=0A= adapter->shared.max_frame_size =3D new_mtu + ENET_HEADER_SIZE + = CRC_LENGTH;=0A= 3db0: 26820012 addiu v0,s4,18=0A= 3db4: aeb4005c sw s4,92(s5)=0A= 3db8: ae42003c sw v0,60(s2)=0A= =0A= return 0;=0A= 3dbc: 00001021 move v0,zero=0A= }=0A= 3dc0: 8fbf0028 lw ra,40(sp)=0A= 3dc4: 8fb50024 lw s5,36(sp)=0A= 3dc8: 8fb40020 lw s4,32(sp)=0A= 3dcc: 8fb3001c lw s3,28(sp)=0A= 3dd0: 8fb20018 lw s2,24(sp)=0A= 3dd4: 8fb10014 lw s1,20(sp)=0A= 3dd8: 8fb00010 lw s0,16(sp)=0A= 3ddc: 03e00008 jr ra=0A= 3de0: 27bd0030 addiu sp,sp,48=0A= =0A= 00003de4 :=0A= 3de4: 27bdffd0 addiu sp,sp,-48=0A= 3de8: afb20018 sw s2,24(sp)=0A= 3dec: afb00010 sw s0,16(sp)=0A= 3df0: afbf0028 sw ra,40(sp)=0A= 3df4: afb50024 sw s5,36(sp)=0A= 3df8: afb40020 sw s4,32(sp)=0A= 3dfc: afb3001c sw s3,28(sp)=0A= 3e00: afb10014 sw s1,20(sp)=0A= 3e04: 00808021 move s0,a0=0A= =0A= /**=0A= * e1000_set_mac - Change the Ethernet Address of the NIC=0A= * @netdev: network interface device structure=0A= * @p: pointer to an address structure=0A= * =0A= * Returns 0 on success, negative on failure=0A= **/=0A= =0A= int=0A= e1000_set_mac(struct net_device *netdev,=0A= void *p)=0A= {=0A= struct e1000_adapter *adapter =3D netdev->priv;=0A= 3e08: 8e130064 lw s3,100(s0)=0A= 3e0c: 00a09021 move s2,a1=0A= struct pci_dev *pdev =3D adapter->pdev;=0A= struct sockaddr *addr =3D (struct sockaddr *) p;=0A= 3e10: 8e66000c lw a2,12(s3)=0A= 3e14: 8e75014c lw s5,332(s3)=0A= 3e18: 2cc20002 sltiu v0,a2,2=0A= 3e1c: 00c04021 move t0,a2=0A= uint32_t pci_command;=0A= uint32_t rctl;=0A= =0A= E1000_DBG("e1000_set_mac\n");=0A= =0A= rctl =3D E1000_READ_REG(&adapter->shared, RCTL);=0A= 3e20: 8e670008 lw a3,8(s3)=0A= __arch__swab16s(addr);=0A= }=0A= =0A= static __inline__ __const__ __u32 __fswab32(__u32 x)=0A= {=0A= 3e24: 8ce50100 lw a1,256(a3)=0A= return __arch__swab32(x);=0A= 3e28: 30a3ff00 andi v1,a1,0xff00=0A= 3e2c: 00052600 sll a0,a1,0x18=0A= 3e30: 00051202 srl v0,a1,0x8=0A= 3e34: 00031a00 sll v1,v1,0x8=0A= 3e38: 00832025 or a0,a0,v1=0A= 3e3c: 3042ff00 andi v0,v0,0xff00=0A= 3e40: 00822025 or a0,a0,v0=0A= 3e44: 00052e02 srl a1,a1,0x18=0A= =0A= if(adapter->shared.mac_type =3D=3D e1000_82542_rev2_0) {=0A= 3e48: 15000031 bnez t0,3f10 =0A= 3e4c: 0085a025 or s4,a0,a1=0A= if(adapter->shared.pci_cmd_word & PCI_COMMAND_INVALIDATE) {=0A= 3e50: 9662004a lhu v0,74(s3)=0A= 3e54: 30420010 andi v0,v0,0x10=0A= 3e58: 10400009 beqz v0,3e80 =0A= 3e5c: 02a02021 move a0,s5=0A= pci_command =3D=0A= 3e60: 9666004a lhu a2,74(s3)=0A= adapter->shared.pci_cmd_word & ~PCI_COMMAND_INVALIDATE;=0A= pci_write_config_word(pdev, PCI_COMMAND, pci_command);=0A= 3e64: 24050004 li a1,4=0A= 3e68: 3c020000 lui v0,0x0=0A= 3e6c: 24420000 addiu v0,v0,0=0A= 3e70: 0040f809 jalr v0=0A= 3e74: 30c6ffef andi a2,a2,0xffef=0A= 3e78: 8e66000c lw a2,12(s3)=0A= 3e7c: 8e670008 lw a3,8(s3)=0A= }=0A= 3e80: 2cc20002 sltiu v0,a2,2=0A= E1000_WRITE_REG(&adapter->shared, RCTL, rctl | E1000_RCTL_RST);=0A= 3e84: 36850001 ori a1,s4,0x1=0A= }=0A= =0A= static __inline__ __const__ __u32 __fswab32(__u32 x)=0A= {=0A= return __arch__swab32(x);=0A= 3e88: 30a4ff00 andi a0,a1,0xff00=0A= 3e8c: 00051600 sll v0,a1,0x18=0A= 3e90: 00051a02 srl v1,a1,0x8=0A= 3e94: 00042200 sll a0,a0,0x8=0A= 3e98: 00441025 or v0,v0,a0=0A= 3e9c: 3063ff00 andi v1,v1,0xff00=0A= 3ea0: 00431025 or v0,v0,v1=0A= 3ea4: 00052e02 srl a1,a1,0x18=0A= 3ea8: 00451025 or v0,v0,a1=0A= 3eac: ace20100 sw v0,256(a3)=0A= extern __inline__ void __udelay(unsigned long usecs, unsigned long lpj)=0A= {=0A= unsigned long lo;=0A= =0A= usecs *=3D 0x00068db8; /* 2**32 / (1000000 / HZ) */=0A= 3eb0: 3c027fff lui v0,0x7fff=0A= 3eb4: 3c030000 lui v1,0x0=0A= 3eb8: 8c630000 lw v1,0(v1)=0A= 3ebc: 3442f1c0 ori v0,v0,0xf1c0=0A= __asm__("multu\t%2,%3"=0A= 3ec0: 00430019 multu v0,v1=0A= 3ec4: 00001010 mfhi v0=0A= ...=0A= 3ed0: 1440ffff bnez v0,3ed0 =0A= 3ed4: 2442ffff addiu v0,v0,-1=0A= * @addr: Address to start counting from=0A= */=0A= extern __inline__ int test_bit(int nr, volatile void *addr)=0A= {=0A= return ((1UL << (nr & 31)) & (((const unsigned int *) addr)[nr >> 5])) = !=3D 0;=0A= 3ed8: 8e63008c lw v1,140(s3)=0A= 3edc: 30630001 andi v1,v1,0x1=0A= mdelay(5);=0A= if(test_bit(E1000_BOARD_OPEN, &adapter->flags)) {=0A= 3ee0: 1060000b beqz v1,3f10 =0A= 3ee4: 24030001 li v1,1=0A= * Atomically adds @i to @v. Note that the guaranteed useful range=0A= * of an atomic_t is only 24 bits.=0A= */=0A= extern __inline__ void atomic_add(int i, atomic_t * v)=0A= {=0A= 3ee8: 266200d8 addiu v0,s3,216=0A= unsigned long temp;=0A= =0A= __asm__ __volatile__(=0A= 3eec: c0440000 ll a0,0(v0)=0A= 3ef0: 00832021 addu a0,a0,v1=0A= 3ef4: e0440000 sc a0,0(v0)=0A= 3ef8: 1080fffc beqz a0,3eec =0A= 3efc: 00000000 nop=0A= tasklet_disable(&adapter->rx_fill_tasklet);=0A= e1000_clean_rx_ring(adapter);=0A= 3f00: 3c020000 lui v0,0x0=0A= 3f04: 244228d8 addiu v0,v0,10456=0A= 3f08: 0040f809 jalr v0=0A= 3f0c: 02602021 move a0,s3=0A= }=0A= }=0A= =0A= memcpy(netdev->dev_addr, addr->sa_data, netdev->addr_len);=0A= 3f10: 9206007c lbu a2,124(s0)=0A= 3f14: 26520002 addiu s2,s2,2=0A= 3f18: 26040074 addiu a0,s0,116=0A= 3f1c: 3c110000 lui s1,0x0=0A= 3f20: 26310000 addiu s1,s1,0=0A= 3f24: 0220f809 jalr s1=0A= 3f28: 02402821 move a1,s2=0A= memcpy(adapter->shared.mac_addr, addr->sa_data, netdev->addr_len);=0A= 3f2c: 9206007c lbu a2,124(s0)=0A= 3f30: 2670007d addiu s0,s3,125=0A= 3f34: 02402821 move a1,s2=0A= 3f38: 02002021 move a0,s0=0A= 3f3c: 0220f809 jalr s1=0A= 3f40: 26720008 addiu s2,s3,8=0A= =0A= e1000_rar_set(&adapter->shared, adapter->shared.mac_addr, 0);=0A= 3f44: 02002821 move a1,s0=0A= 3f48: 02402021 move a0,s2=0A= 3f4c: 3c020000 lui v0,0x0=0A= 3f50: 24420000 addiu v0,v0,0=0A= 3f54: 0040f809 jalr v0=0A= 3f58: 00003021 move a2,zero=0A= =0A= if(adapter->shared.mac_type =3D=3D e1000_82542_rev2_0) {=0A= 3f5c: 8e63000c lw v1,12(s3)=0A= 3f60: 1460002f bnez v1,4020 =0A= 3f64: 8fbf0028 lw ra,40(sp)=0A= }=0A= =0A= static __inline__ __const__ __u32 __fswab32(__u32 x)=0A= {=0A= return __arch__swab32(x);=0A= 3f68: 3282ff00 andi v0,s4,0xff00=0A= 3f6c: 00021200 sll v0,v0,0x8=0A= 3f70: 00141e00 sll v1,s4,0x18=0A= 3f74: 00142202 srl a0,s4,0x8=0A= 3f78: 00621825 or v1,v1,v0=0A= E1000_WRITE_REG(&adapter->shared, RCTL, rctl);=0A= 3f7c: 8e450000 lw a1,0(s2)=0A= }=0A= =0A= static __inline__ __const__ __u32 __fswab32(__u32 x)=0A= {=0A= return __arch__swab32(x);=0A= 3f80: 3084ff00 andi a0,a0,0xff00=0A= 3f84: 00141602 srl v0,s4,0x18=0A= 3f88: 00641825 or v1,v1,a0=0A= 3f8c: 00621825 or v1,v1,v0=0A= 3f90: aca30100 sw v1,256(a1)=0A= extern __inline__ void __udelay(unsigned long usecs, unsigned long lpj)=0A= {=0A= unsigned long lo;=0A= =0A= usecs *=3D 0x00068db8; /* 2**32 / (1000000 / HZ) */=0A= 3f94: 3c027fff lui v0,0x7fff=0A= 3f98: 3c030000 lui v1,0x0=0A= 3f9c: 8c630000 lw v1,0(v1)=0A= 3fa0: 3442f1c0 ori v0,v0,0xf1c0=0A= __asm__("multu\t%2,%3"=0A= 3fa4: 00430019 multu v0,v1=0A= 3fa8: 00001010 mfhi v0=0A= ...=0A= 3fb4: 1440ffff bnez v0,3fb4 =0A= 3fb8: 2442ffff addiu v0,v0,-1=0A= mdelay(5);=0A= if(adapter->shared.pci_cmd_word & PCI_COMMAND_INVALIDATE) {=0A= 3fbc: 9663004a lhu v1,74(s3)=0A= 3fc0: 30630010 andi v1,v1,0x10=0A= 3fc4: 10600006 beqz v1,3fe0 =0A= 3fc8: 02a02021 move a0,s5=0A= pci_write_config_word(pdev, PCI_COMMAND,=0A= 3fcc: 9666004a lhu a2,74(s3)=0A= 3fd0: 3c020000 lui v0,0x0=0A= 3fd4: 24420000 addiu v0,v0,0=0A= 3fd8: 0040f809 jalr v0=0A= 3fdc: 24050004 li a1,4=0A= * @addr: Address to start counting from=0A= */=0A= extern __inline__ int test_bit(int nr, volatile void *addr)=0A= {=0A= return ((1UL << (nr & 31)) & (((const unsigned int *) addr)[nr >> 5])) = !=3D 0;=0A= 3fe0: 8e62008c lw v0,140(s3)=0A= 3fe4: 30420001 andi v0,v0,0x1=0A= adapter->shared.pci_cmd_word);=0A= }=0A= if(test_bit(E1000_BOARD_OPEN, &adapter->flags)) {=0A= 3fe8: 1040000d beqz v0,4020 =0A= 3fec: 8fbf0028 lw ra,40(sp)=0A= e1000_configure_rx(adapter);=0A= 3ff0: 3c020000 lui v0,0x0=0A= 3ff4: 244223a8 addiu v0,v0,9128=0A= 3ff8: 0040f809 jalr v0=0A= 3ffc: 02602021 move a0,s3=0A= * Atomically subtracts @i from @v. Note that the guaranteed=0A= * useful range of an atomic_t is only 24 bits.=0A= */=0A= extern __inline__ void atomic_sub(int i, atomic_t * v)=0A= {=0A= 4000: 266300d8 addiu v1,s3,216=0A= 4004: 24020001 li v0,1=0A= unsigned long temp;=0A= =0A= __asm__ __volatile__(=0A= 4008: c0640000 ll a0,0(v1)=0A= 400c: 00822023 subu a0,a0,v0=0A= 4010: e0640000 sc a0,0(v1)=0A= 4014: 1080fffc beqz a0,4008 =0A= 4018: 00000000 nop=0A= tasklet_enable(&adapter->rx_fill_tasklet);=0A= }=0A= }=0A= =0A= return 0;=0A= 401c: 8fbf0028 lw ra,40(sp)=0A= 4020: 8fb50024 lw s5,36(sp)=0A= 4024: 8fb40020 lw s4,32(sp)=0A= 4028: 8fb3001c lw s3,28(sp)=0A= 402c: 8fb20018 lw s2,24(sp)=0A= 4030: 8fb10014 lw s1,20(sp)=0A= 4034: 8fb00010 lw s0,16(sp)=0A= 4038: 00001021 move v0,zero=0A= 403c: 03e00008 jr ra=0A= 4040: 27bd0030 addiu sp,sp,48=0A= =0A= 00004044 :=0A= 4044: 27bdffd8 addiu sp,sp,-40=0A= 4048: afb3001c sw s3,28(sp)=0A= 404c: afbf0024 sw ra,36(sp)=0A= 4050: afb40020 sw s4,32(sp)=0A= 4054: afb20018 sw s2,24(sp)=0A= 4058: afb10014 sw s1,20(sp)=0A= 405c: afb00010 sw s0,16(sp)=0A= 4060: 00809821 move s3,a0=0A= }=0A= =0A= /**=0A= * e1000_update_stats - Update the board statistics counters=0A= * @adapter: board private structure=0A= **/=0A= =0A= static void=0A= e1000_update_stats(struct e1000_adapter *adapter)=0A= {=0A= unsigned long flags;=0A= =0A= #define PHY_IDLE_ERROR_COUNT_MASK 0x00FF=0A= =0A= spin_lock_irqsave(&adapter->stats_lock, flags);=0A= 4064: 40146000 mfc0 s4,$12=0A= 4068: 00000000 nop=0A= 406c: 36810001 ori at,s4,0x1=0A= 4070: 38210001 xori at,at,0x1=0A= 4074: 40816000 mtc0 at,$12=0A= 4078: 00000040 sll zero,zero,0x1=0A= 407c: 00000040 sll zero,zero,0x1=0A= 4080: 00000040 sll zero,zero,0x1=0A= 4084: 8e6801d8 lw t0,472(s3)=0A= 4088: 8e6901dc lw t1,476(s3)=0A= 408c: 8e62000c lw v0,12(s3)=0A= 4090: 2c420002 sltiu v0,v0,2=0A= =0A= adapter->stats.crcerrs +=3D E1000_READ_REG(&adapter->shared, = CRCERRS);=0A= 4094: 8e640008 lw a0,8(s3)=0A= 4098: 00001021 move v0,zero=0A= __arch__swab16s(addr);=0A= }=0A= =0A= static __inline__ __const__ __u32 __fswab32(__u32 x)=0A= {=0A= 409c: 8c874000 lw a3,16384(a0)=0A= return __arch__swab32(x);=0A= 40a0: 30e5ff00 andi a1,a3,0xff00=0A= 40a4: 00073600 sll a2,a3,0x18=0A= 40a8: 00072202 srl a0,a3,0x8=0A= 40ac: 00052a00 sll a1,a1,0x8=0A= 40b0: 3084ff00 andi a0,a0,0xff00=0A= 40b4: 00c53025 or a2,a2,a1=0A= 40b8: 00c43025 or a2,a2,a0=0A= 40bc: 00073e02 srl a3,a3,0x18=0A= 40c0: 00c71825 or v1,a2,a3=0A= 40c4: 01233821 addu a3,t1,v1=0A= 40c8: 00e3202b sltu a0,a3,v1=0A= 40cc: 01023021 addu a2,t0,v0=0A= 40d0: 00c43021 addu a2,a2,a0=0A= 40d4: 8e62000c lw v0,12(s3)=0A= 40d8: ae6601d8 sw a2,472(s3)=0A= 40dc: ae6701dc sw a3,476(s3)=0A= 40e0: 8e6801e8 lw t0,488(s3)=0A= 40e4: 8e6901ec lw t1,492(s3)=0A= 40e8: 2c420002 sltiu v0,v0,2=0A= adapter->stats.symerrs +=3D E1000_READ_REG(&adapter->shared, = SYMERRS);=0A= 40ec: 8e640008 lw a0,8(s3)=0A= 40f0: 00001021 move v0,zero=0A= __arch__swab16s(addr);=0A= }=0A= =0A= static __inline__ __const__ __u32 __fswab32(__u32 x)=0A= {=0A= 40f4: 8c874008 lw a3,16392(a0)=0A= return __arch__swab32(x);=0A= 40f8: 30e5ff00 andi a1,a3,0xff00=0A= 40fc: 00073600 sll a2,a3,0x18=0A= 4100: 00072202 srl a0,a3,0x8=0A= 4104: 00052a00 sll a1,a1,0x8=0A= 4108: 3084ff00 andi a0,a0,0xff00=0A= 410c: 00c53025 or a2,a2,a1=0A= 4110: 00c43025 or a2,a2,a0=0A= 4114: 00073e02 srl a3,a3,0x18=0A= 4118: 00c71825 or v1,a2,a3=0A= 411c: 01233821 addu a3,t1,v1=0A= 4120: 00e3202b sltu a0,a3,v1=0A= 4124: 01023021 addu a2,t0,v0=0A= 4128: 00c43021 addu a2,a2,a0=0A= 412c: 8e62000c lw v0,12(s3)=0A= 4130: ae6601e8 sw a2,488(s3)=0A= 4134: ae6701ec sw a3,492(s3)=0A= 4138: 8e6801f8 lw t0,504(s3)=0A= 413c: 8e6901fc lw t1,508(s3)=0A= 4140: 2c420002 sltiu v0,v0,2=0A= adapter->stats.mpc +=3D E1000_READ_REG(&adapter->shared, MPC);=0A= 4144: 8e640008 lw a0,8(s3)=0A= 4148: 00001021 move v0,zero=0A= __arch__swab16s(addr);=0A= }=0A= =0A= static __inline__ __const__ __u32 __fswab32(__u32 x)=0A= {=0A= 414c: 8c874010 lw a3,16400(a0)=0A= return __arch__swab32(x);=0A= 4150: 30e5ff00 andi a1,a3,0xff00=0A= 4154: 00073600 sll a2,a3,0x18=0A= 4158: 00072202 srl a0,a3,0x8=0A= 415c: 00052a00 sll a1,a1,0x8=0A= 4160: 3084ff00 andi a0,a0,0xff00=0A= 4164: 00c53025 or a2,a2,a1=0A= 4168: 00c43025 or a2,a2,a0=0A= 416c: 00073e02 srl a3,a3,0x18=0A= 4170: 00c71825 or v1,a2,a3=0A= 4174: 01233821 addu a3,t1,v1=0A= 4178: 00e3202b sltu a0,a3,v1=0A= 417c: 01023021 addu a2,t0,v0=0A= 4180: 00c43021 addu a2,a2,a0=0A= 4184: 8e62000c lw v0,12(s3)=0A= 4188: ae6601f8 sw a2,504(s3)=0A= 418c: ae6701fc sw a3,508(s3)=0A= 4190: 8e680200 lw t0,512(s3)=0A= 4194: 8e690204 lw t1,516(s3)=0A= 4198: 2c420002 sltiu v0,v0,2=0A= adapter->stats.scc +=3D E1000_READ_REG(&adapter->shared, SCC);=0A= 419c: 8e640008 lw a0,8(s3)=0A= 41a0: 00001021 move v0,zero=0A= __arch__swab16s(addr);=0A= }=0A= =0A= static __inline__ __const__ __u32 __fswab32(__u32 x)=0A= {=0A= 41a4: 8c874014 lw a3,16404(a0)=0A= return __arch__swab32(x);=0A= 41a8: 30e5ff00 andi a1,a3,0xff00=0A= 41ac: 00073600 sll a2,a3,0x18=0A= 41b0: 00072202 srl a0,a3,0x8=0A= 41b4: 00052a00 sll a1,a1,0x8=0A= 41b8: 3084ff00 andi a0,a0,0xff00=0A= 41bc: 00c53025 or a2,a2,a1=0A= 41c0: 00c43025 or a2,a2,a0=0A= 41c4: 00073e02 srl a3,a3,0x18=0A= 41c8: 00c71825 or v1,a2,a3=0A= 41cc: 01233821 addu a3,t1,v1=0A= 41d0: 00e3202b sltu a0,a3,v1=0A= 41d4: 01023021 addu a2,t0,v0=0A= 41d8: 00c43021 addu a2,a2,a0=0A= 41dc: 8e62000c lw v0,12(s3)=0A= 41e0: ae660200 sw a2,512(s3)=0A= 41e4: ae670204 sw a3,516(s3)=0A= 41e8: 8e680208 lw t0,520(s3)=0A= 41ec: 8e69020c lw t1,524(s3)=0A= 41f0: 2c420002 sltiu v0,v0,2=0A= adapter->stats.ecol +=3D E1000_READ_REG(&adapter->shared, ECOL);=0A= 41f4: 8e640008 lw a0,8(s3)=0A= 41f8: 00001021 move v0,zero=0A= __arch__swab16s(addr);=0A= }=0A= =0A= static __inline__ __const__ __u32 __fswab32(__u32 x)=0A= {=0A= 41fc: 8c874018 lw a3,16408(a0)=0A= return __arch__swab32(x);=0A= 4200: 30e5ff00 andi a1,a3,0xff00=0A= 4204: 00073600 sll a2,a3,0x18=0A= 4208: 00072202 srl a0,a3,0x8=0A= 420c: 00052a00 sll a1,a1,0x8=0A= 4210: 3084ff00 andi a0,a0,0xff00=0A= 4214: 00c53025 or a2,a2,a1=0A= 4218: 00c43025 or a2,a2,a0=0A= 421c: 00073e02 srl a3,a3,0x18=0A= 4220: 00c71825 or v1,a2,a3=0A= 4224: 01233821 addu a3,t1,v1=0A= 4228: 00e3202b sltu a0,a3,v1=0A= 422c: 01023021 addu a2,t0,v0=0A= 4230: 00c43021 addu a2,a2,a0=0A= 4234: 8e62000c lw v0,12(s3)=0A= 4238: ae660208 sw a2,520(s3)=0A= 423c: ae67020c sw a3,524(s3)=0A= 4240: 8e680210 lw t0,528(s3)=0A= 4244: 8e690214 lw t1,532(s3)=0A= 4248: 2c420002 sltiu v0,v0,2=0A= adapter->stats.mcc +=3D E1000_READ_REG(&adapter->shared, MCC);=0A= 424c: 8e640008 lw a0,8(s3)=0A= 4250: 00001021 move v0,zero=0A= __arch__swab16s(addr);=0A= }=0A= =0A= static __inline__ __const__ __u32 __fswab32(__u32 x)=0A= {=0A= 4254: 8c87401c lw a3,16412(a0)=0A= return __arch__swab32(x);=0A= 4258: 30e5ff00 andi a1,a3,0xff00=0A= 425c: 00073600 sll a2,a3,0x18=0A= 4260: 00072202 srl a0,a3,0x8=0A= 4264: 00052a00 sll a1,a1,0x8=0A= 4268: 3084ff00 andi a0,a0,0xff00=0A= 426c: 00c53025 or a2,a2,a1=0A= 4270: 00c43025 or a2,a2,a0=0A= 4274: 00073e02 srl a3,a3,0x18=0A= 4278: 00c71825 or v1,a2,a3=0A= 427c: 01233821 addu a3,t1,v1=0A= 4280: 00e3202b sltu a0,a3,v1=0A= 4284: 01023021 addu a2,t0,v0=0A= 4288: 00c43021 addu a2,a2,a0=0A= 428c: 8e62000c lw v0,12(s3)=0A= 4290: ae660210 sw a2,528(s3)=0A= 4294: ae670214 sw a3,532(s3)=0A= 4298: 8e680218 lw t0,536(s3)=0A= 429c: 8e69021c lw t1,540(s3)=0A= 42a0: 2c420002 sltiu v0,v0,2=0A= adapter->stats.latecol +=3D E1000_READ_REG(&adapter->shared, = LATECOL);=0A= 42a4: 8e640008 lw a0,8(s3)=0A= 42a8: 00001021 move v0,zero=0A= __arch__swab16s(addr);=0A= }=0A= =0A= static __inline__ __const__ __u32 __fswab32(__u32 x)=0A= {=0A= 42ac: 8c874020 lw a3,16416(a0)=0A= return __arch__swab32(x);=0A= 42b0: 30e5ff00 andi a1,a3,0xff00=0A= 42b4: 00073600 sll a2,a3,0x18=0A= 42b8: 00072202 srl a0,a3,0x8=0A= 42bc: 00052a00 sll a1,a1,0x8=0A= 42c0: 3084ff00 andi a0,a0,0xff00=0A= 42c4: 00c53025 or a2,a2,a1=0A= 42c8: 00c43025 or a2,a2,a0=0A= 42cc: 00073e02 srl a3,a3,0x18=0A= 42d0: 00c71825 or v1,a2,a3=0A= 42d4: 01233821 addu a3,t1,v1=0A= 42d8: 00e3202b sltu a0,a3,v1=0A= 42dc: 01023021 addu a2,t0,v0=0A= 42e0: 00c43021 addu a2,a2,a0=0A= 42e4: 8e62000c lw v0,12(s3)=0A= 42e8: ae660218 sw a2,536(s3)=0A= 42ec: ae67021c sw a3,540(s3)=0A= 42f0: 8e680220 lw t0,544(s3)=0A= 42f4: 8e690224 lw t1,548(s3)=0A= 42f8: 2c420002 sltiu v0,v0,2=0A= adapter->stats.colc +=3D E1000_READ_REG(&adapter->shared, COLC);=0A= 42fc: 8e640008 lw a0,8(s3)=0A= 4300: 00001021 move v0,zero=0A= __arch__swab16s(addr);=0A= }=0A= =0A= static __inline__ __const__ __u32 __fswab32(__u32 x)=0A= {=0A= 4304: 8c874028 lw a3,16424(a0)=0A= return __arch__swab32(x);=0A= 4308: 30e5ff00 andi a1,a3,0xff00=0A= 430c: 00073600 sll a2,a3,0x18=0A= 4310: 00072202 srl a0,a3,0x8=0A= 4314: 00052a00 sll a1,a1,0x8=0A= 4318: 3084ff00 andi a0,a0,0xff00=0A= 431c: 00c53025 or a2,a2,a1=0A= 4320: 00c43025 or a2,a2,a0=0A= 4324: 00073e02 srl a3,a3,0x18=0A= 4328: 00c71825 or v1,a2,a3=0A= 432c: 01233821 addu a3,t1,v1=0A= 4330: 00e3202b sltu a0,a3,v1=0A= 4334: 01023021 addu a2,t0,v0=0A= 4338: 00c43021 addu a2,a2,a0=0A= 433c: 8e62000c lw v0,12(s3)=0A= 4340: ae660220 sw a2,544(s3)=0A= 4344: ae670224 sw a3,548(s3)=0A= 4348: 8e680228 lw t0,552(s3)=0A= 434c: 8e69022c lw t1,556(s3)=0A= 4350: 2c420002 sltiu v0,v0,2=0A= adapter->stats.dc +=3D E1000_READ_REG(&adapter->shared, DC);=0A= 4354: 8e640008 lw a0,8(s3)=0A= 4358: 00001021 move v0,zero=0A= __arch__swab16s(addr);=0A= }=0A= =0A= static __inline__ __const__ __u32 __fswab32(__u32 x)=0A= {=0A= 435c: 8c874030 lw a3,16432(a0)=0A= return __arch__swab32(x);=0A= 4360: 30e5ff00 andi a1,a3,0xff00=0A= 4364: 00073600 sll a2,a3,0x18=0A= 4368: 00072202 srl a0,a3,0x8=0A= 436c: 00052a00 sll a1,a1,0x8=0A= 4370: 3084ff00 andi a0,a0,0xff00=0A= 4374: 00c53025 or a2,a2,a1=0A= 4378: 00c43025 or a2,a2,a0=0A= 437c: 00073e02 srl a3,a3,0x18=0A= 4380: 00c71825 or v1,a2,a3=0A= 4384: 01233821 addu a3,t1,v1=0A= 4388: 00e3202b sltu a0,a3,v1=0A= 438c: 01023021 addu a2,t0,v0=0A= 4390: 00c43021 addu a2,a2,a0=0A= 4394: 8e62000c lw v0,12(s3)=0A= 4398: ae660228 sw a2,552(s3)=0A= 439c: ae67022c sw a3,556(s3)=0A= 43a0: 8e680238 lw t0,568(s3)=0A= 43a4: 8e69023c lw t1,572(s3)=0A= 43a8: 2c420002 sltiu v0,v0,2=0A= adapter->stats.sec +=3D E1000_READ_REG(&adapter->shared, SEC);=0A= 43ac: 8e640008 lw a0,8(s3)=0A= 43b0: 00001021 move v0,zero=0A= __arch__swab16s(addr);=0A= }=0A= =0A= static __inline__ __const__ __u32 __fswab32(__u32 x)=0A= {=0A= 43b4: 8c874038 lw a3,16440(a0)=0A= return __arch__swab32(x);=0A= 43b8: 30e5ff00 andi a1,a3,0xff00=0A= 43bc: 00073600 sll a2,a3,0x18=0A= 43c0: 00072202 srl a0,a3,0x8=0A= 43c4: 00052a00 sll a1,a1,0x8=0A= 43c8: 3084ff00 andi a0,a0,0xff00=0A= 43cc: 00c53025 or a2,a2,a1=0A= 43d0: 00c43025 or a2,a2,a0=0A= 43d4: 00073e02 srl a3,a3,0x18=0A= 43d8: 00c71825 or v1,a2,a3=0A= 43dc: 01233821 addu a3,t1,v1=0A= 43e0: 00e3202b sltu a0,a3,v1=0A= 43e4: 01023021 addu a2,t0,v0=0A= 43e8: 00c43021 addu a2,a2,a0=0A= 43ec: 8e62000c lw v0,12(s3)=0A= 43f0: ae660238 sw a2,568(s3)=0A= 43f4: ae67023c sw a3,572(s3)=0A= 43f8: 8e680248 lw t0,584(s3)=0A= 43fc: 8e69024c lw t1,588(s3)=0A= 4400: 2c420002 sltiu v0,v0,2=0A= adapter->stats.rlec +=3D E1000_READ_REG(&adapter->shared, RLEC);=0A= 4404: 8e640008 lw a0,8(s3)=0A= 4408: 00001021 move v0,zero=0A= __arch__swab16s(addr);=0A= }=0A= =0A= static __inline__ __const__ __u32 __fswab32(__u32 x)=0A= {=0A= 440c: 8c874040 lw a3,16448(a0)=0A= return __arch__swab32(x);=0A= 4410: 30e5ff00 andi a1,a3,0xff00=0A= 4414: 00073600 sll a2,a3,0x18=0A= 4418: 00072202 srl a0,a3,0x8=0A= 441c: 00052a00 sll a1,a1,0x8=0A= 4420: 3084ff00 andi a0,a0,0xff00=0A= 4424: 00c53025 or a2,a2,a1=0A= 4428: 00c43025 or a2,a2,a0=0A= 442c: 00073e02 srl a3,a3,0x18=0A= 4430: 00c71825 or v1,a2,a3=0A= 4434: 01233821 addu a3,t1,v1=0A= 4438: 00e3202b sltu a0,a3,v1=0A= 443c: 01023021 addu a2,t0,v0=0A= 4440: 00c43021 addu a2,a2,a0=0A= 4444: 8e62000c lw v0,12(s3)=0A= 4448: ae660248 sw a2,584(s3)=0A= 444c: ae67024c sw a3,588(s3)=0A= 4450: 8e680250 lw t0,592(s3)=0A= 4454: 8e690254 lw t1,596(s3)=0A= 4458: 2c420002 sltiu v0,v0,2=0A= adapter->stats.xonrxc +=3D E1000_READ_REG(&adapter->shared, XONRXC);=0A= 445c: 8e640008 lw a0,8(s3)=0A= 4460: 00001021 move v0,zero=0A= __arch__swab16s(addr);=0A= }=0A= =0A= static __inline__ __const__ __u32 __fswab32(__u32 x)=0A= {=0A= 4464: 8c874048 lw a3,16456(a0)=0A= return __arch__swab32(x);=0A= 4468: 30e5ff00 andi a1,a3,0xff00=0A= 446c: 00073600 sll a2,a3,0x18=0A= 4470: 00072202 srl a0,a3,0x8=0A= 4474: 00052a00 sll a1,a1,0x8=0A= 4478: 3084ff00 andi a0,a0,0xff00=0A= 447c: 00c53025 or a2,a2,a1=0A= 4480: 00c43025 or a2,a2,a0=0A= 4484: 00073e02 srl a3,a3,0x18=0A= 4488: 00c71825 or v1,a2,a3=0A= 448c: 01233821 addu a3,t1,v1=0A= 4490: 00e3202b sltu a0,a3,v1=0A= 4494: 01023021 addu a2,t0,v0=0A= 4498: 00c43021 addu a2,a2,a0=0A= 449c: 8e62000c lw v0,12(s3)=0A= 44a0: ae660250 sw a2,592(s3)=0A= 44a4: ae670254 sw a3,596(s3)=0A= 44a8: 8e680258 lw t0,600(s3)=0A= 44ac: 8e69025c lw t1,604(s3)=0A= 44b0: 2c420002 sltiu v0,v0,2=0A= adapter->stats.xontxc +=3D E1000_READ_REG(&adapter->shared, XONTXC);=0A= 44b4: 8e640008 lw a0,8(s3)=0A= 44b8: 00001021 move v0,zero=0A= __arch__swab16s(addr);=0A= }=0A= =0A= static __inline__ __const__ __u32 __fswab32(__u32 x)=0A= {=0A= 44bc: 8c87404c lw a3,16460(a0)=0A= return __arch__swab32(x);=0A= 44c0: 30e5ff00 andi a1,a3,0xff00=0A= 44c4: 00073600 sll a2,a3,0x18=0A= 44c8: 00072202 srl a0,a3,0x8=0A= 44cc: 00052a00 sll a1,a1,0x8=0A= 44d0: 3084ff00 andi a0,a0,0xff00=0A= 44d4: 00c53025 or a2,a2,a1=0A= 44d8: 00c43025 or a2,a2,a0=0A= 44dc: 00073e02 srl a3,a3,0x18=0A= 44e0: 00c71825 or v1,a2,a3=0A= 44e4: 01233821 addu a3,t1,v1=0A= 44e8: 00e3202b sltu a0,a3,v1=0A= 44ec: 01023021 addu a2,t0,v0=0A= 44f0: 00c43021 addu a2,a2,a0=0A= 44f4: 8e62000c lw v0,12(s3)=0A= 44f8: ae660258 sw a2,600(s3)=0A= 44fc: ae67025c sw a3,604(s3)=0A= 4500: 8e680260 lw t0,608(s3)=0A= 4504: 8e690264 lw t1,612(s3)=0A= 4508: 2c420002 sltiu v0,v0,2=0A= adapter->stats.xoffrxc +=3D E1000_READ_REG(&adapter->shared, = XOFFRXC);=0A= 450c: 8e640008 lw a0,8(s3)=0A= 4510: 00001021 move v0,zero=0A= __arch__swab16s(addr);=0A= }=0A= =0A= static __inline__ __const__ __u32 __fswab32(__u32 x)=0A= {=0A= 4514: 8c874050 lw a3,16464(a0)=0A= return __arch__swab32(x);=0A= 4518: 30e5ff00 andi a1,a3,0xff00=0A= 451c: 00073600 sll a2,a3,0x18=0A= 4520: 00072202 srl a0,a3,0x8=0A= 4524: 00052a00 sll a1,a1,0x8=0A= 4528: 3084ff00 andi a0,a0,0xff00=0A= 452c: 00c53025 or a2,a2,a1=0A= 4530: 00c43025 or a2,a2,a0=0A= 4534: 00073e02 srl a3,a3,0x18=0A= 4538: 00c71825 or v1,a2,a3=0A= 453c: 01233821 addu a3,t1,v1=0A= 4540: 00e3202b sltu a0,a3,v1=0A= 4544: 01023021 addu a2,t0,v0=0A= 4548: 00c43021 addu a2,a2,a0=0A= 454c: 8e62000c lw v0,12(s3)=0A= 4550: ae660260 sw a2,608(s3)=0A= 4554: ae670264 sw a3,612(s3)=0A= 4558: 8e680268 lw t0,616(s3)=0A= 455c: 8e69026c lw t1,620(s3)=0A= 4560: 2c420002 sltiu v0,v0,2=0A= adapter->stats.xofftxc +=3D E1000_READ_REG(&adapter->shared, = XOFFTXC);=0A= 4564: 8e640008 lw a0,8(s3)=0A= 4568: 00001021 move v0,zero=0A= __arch__swab16s(addr);=0A= }=0A= =0A= static __inline__ __const__ __u32 __fswab32(__u32 x)=0A= {=0A= 456c: 8c874054 lw a3,16468(a0)=0A= return __arch__swab32(x);=0A= 4570: 30e5ff00 andi a1,a3,0xff00=0A= 4574: 00073600 sll a2,a3,0x18=0A= 4578: 00072202 srl a0,a3,0x8=0A= 457c: 00052a00 sll a1,a1,0x8=0A= 4580: 3084ff00 andi a0,a0,0xff00=0A= 4584: 00c53025 or a2,a2,a1=0A= 4588: 00c43025 or a2,a2,a0=0A= 458c: 00073e02 srl a3,a3,0x18=0A= 4590: 00c71825 or v1,a2,a3=0A= 4594: 01233821 addu a3,t1,v1=0A= 4598: 00e3202b sltu a0,a3,v1=0A= 459c: 01023021 addu a2,t0,v0=0A= 45a0: 00c43021 addu a2,a2,a0=0A= 45a4: 8e62000c lw v0,12(s3)=0A= 45a8: ae660268 sw a2,616(s3)=0A= 45ac: ae67026c sw a3,620(s3)=0A= 45b0: 8e680270 lw t0,624(s3)=0A= 45b4: 8e690274 lw t1,628(s3)=0A= 45b8: 2c420002 sltiu v0,v0,2=0A= adapter->stats.fcruc +=3D E1000_READ_REG(&adapter->shared, FCRUC);=0A= 45bc: 8e640008 lw a0,8(s3)=0A= 45c0: 00001021 move v0,zero=0A= __arch__swab16s(addr);=0A= }=0A= =0A= static __inline__ __const__ __u32 __fswab32(__u32 x)=0A= {=0A= 45c4: 8c874058 lw a3,16472(a0)=0A= return __arch__swab32(x);=0A= 45c8: 30e5ff00 andi a1,a3,0xff00=0A= 45cc: 00073600 sll a2,a3,0x18=0A= 45d0: 00072202 srl a0,a3,0x8=0A= 45d4: 00052a00 sll a1,a1,0x8=0A= 45d8: 3084ff00 andi a0,a0,0xff00=0A= 45dc: 00c53025 or a2,a2,a1=0A= 45e0: 00c43025 or a2,a2,a0=0A= 45e4: 00073e02 srl a3,a3,0x18=0A= 45e8: 00c71825 or v1,a2,a3=0A= 45ec: 01233821 addu a3,t1,v1=0A= 45f0: 00e3202b sltu a0,a3,v1=0A= 45f4: 01023021 addu a2,t0,v0=0A= 45f8: 00c43021 addu a2,a2,a0=0A= 45fc: 8e62000c lw v0,12(s3)=0A= 4600: ae660270 sw a2,624(s3)=0A= 4604: ae670274 sw a3,628(s3)=0A= 4608: 8e680278 lw t0,632(s3)=0A= 460c: 8e69027c lw t1,636(s3)=0A= 4610: 2c420002 sltiu v0,v0,2=0A= adapter->stats.prc64 +=3D E1000_READ_REG(&adapter->shared, PRC64);=0A= 4614: 8e640008 lw a0,8(s3)=0A= 4618: 00001021 move v0,zero=0A= __arch__swab16s(addr);=0A= }=0A= =0A= static __inline__ __const__ __u32 __fswab32(__u32 x)=0A= {=0A= 461c: 8c87405c lw a3,16476(a0)=0A= return __arch__swab32(x);=0A= 4620: 30e5ff00 andi a1,a3,0xff00=0A= 4624: 00073600 sll a2,a3,0x18=0A= 4628: 00072202 srl a0,a3,0x8=0A= 462c: 00052a00 sll a1,a1,0x8=0A= 4630: 3084ff00 andi a0,a0,0xff00=0A= 4634: 00c53025 or a2,a2,a1=0A= 4638: 00c43025 or a2,a2,a0=0A= 463c: 00073e02 srl a3,a3,0x18=0A= 4640: 00c71825 or v1,a2,a3=0A= 4644: 01233821 addu a3,t1,v1=0A= 4648: 00e3202b sltu a0,a3,v1=0A= 464c: 01023021 addu a2,t0,v0=0A= 4650: 00c43021 addu a2,a2,a0=0A= 4654: 8e62000c lw v0,12(s3)=0A= 4658: ae660278 sw a2,632(s3)=0A= 465c: ae67027c sw a3,636(s3)=0A= 4660: 8e680280 lw t0,640(s3)=0A= 4664: 8e690284 lw t1,644(s3)=0A= 4668: 2c420002 sltiu v0,v0,2=0A= adapter->stats.prc127 +=3D E1000_READ_REG(&adapter->shared, PRC127);=0A= 466c: 8e640008 lw a0,8(s3)=0A= 4670: 00001021 move v0,zero=0A= __arch__swab16s(addr);=0A= }=0A= =0A= static __inline__ __const__ __u32 __fswab32(__u32 x)=0A= {=0A= 4674: 8c874060 lw a3,16480(a0)=0A= return __arch__swab32(x);=0A= 4678: 30e5ff00 andi a1,a3,0xff00=0A= 467c: 00073600 sll a2,a3,0x18=0A= 4680: 00072202 srl a0,a3,0x8=0A= 4684: 00052a00 sll a1,a1,0x8=0A= 4688: 3084ff00 andi a0,a0,0xff00=0A= 468c: 00c53025 or a2,a2,a1=0A= 4690: 00c43025 or a2,a2,a0=0A= 4694: 00073e02 srl a3,a3,0x18=0A= 4698: 00c71825 or v1,a2,a3=0A= 469c: 01233821 addu a3,t1,v1=0A= 46a0: 00e3202b sltu a0,a3,v1=0A= 46a4: 01023021 addu a2,t0,v0=0A= 46a8: 00c43021 addu a2,a2,a0=0A= 46ac: 8e62000c lw v0,12(s3)=0A= 46b0: ae660280 sw a2,640(s3)=0A= 46b4: ae670284 sw a3,644(s3)=0A= 46b8: 8e680288 lw t0,648(s3)=0A= 46bc: 8e69028c lw t1,652(s3)=0A= 46c0: 2c420002 sltiu v0,v0,2=0A= adapter->stats.prc255 +=3D E1000_READ_REG(&adapter->shared, PRC255);=0A= 46c4: 8e640008 lw a0,8(s3)=0A= 46c8: 00001021 move v0,zero=0A= __arch__swab16s(addr);=0A= }=0A= =0A= static __inline__ __const__ __u32 __fswab32(__u32 x)=0A= {=0A= 46cc: 8c874064 lw a3,16484(a0)=0A= return __arch__swab32(x);=0A= 46d0: 30e5ff00 andi a1,a3,0xff00=0A= 46d4: 00073600 sll a2,a3,0x18=0A= 46d8: 00072202 srl a0,a3,0x8=0A= 46dc: 00052a00 sll a1,a1,0x8=0A= 46e0: 3084ff00 andi a0,a0,0xff00=0A= 46e4: 00c53025 or a2,a2,a1=0A= 46e8: 00c43025 or a2,a2,a0=0A= 46ec: 00073e02 srl a3,a3,0x18=0A= 46f0: 00c71825 or v1,a2,a3=0A= 46f4: 01233821 addu a3,t1,v1=0A= 46f8: 00e3202b sltu a0,a3,v1=0A= 46fc: 01023021 addu a2,t0,v0=0A= 4700: 00c43021 addu a2,a2,a0=0A= 4704: 8e62000c lw v0,12(s3)=0A= 4708: ae660288 sw a2,648(s3)=0A= 470c: ae67028c sw a3,652(s3)=0A= 4710: 8e680290 lw t0,656(s3)=0A= 4714: 8e690294 lw t1,660(s3)=0A= 4718: 2c420002 sltiu v0,v0,2=0A= adapter->stats.prc511 +=3D E1000_READ_REG(&adapter->shared, PRC511);=0A= 471c: 8e640008 lw a0,8(s3)=0A= 4720: 00001021 move v0,zero=0A= __arch__swab16s(addr);=0A= }=0A= =0A= static __inline__ __const__ __u32 __fswab32(__u32 x)=0A= {=0A= 4724: 8c874068 lw a3,16488(a0)=0A= return __arch__swab32(x);=0A= 4728: 30e5ff00 andi a1,a3,0xff00=0A= 472c: 00073600 sll a2,a3,0x18=0A= 4730: 00072202 srl a0,a3,0x8=0A= 4734: 00052a00 sll a1,a1,0x8=0A= 4738: 3084ff00 andi a0,a0,0xff00=0A= 473c: 00c53025 or a2,a2,a1=0A= 4740: 00c43025 or a2,a2,a0=0A= 4744: 00073e02 srl a3,a3,0x18=0A= 4748: 00c71825 or v1,a2,a3=0A= 474c: 01233821 addu a3,t1,v1=0A= 4750: 00e3202b sltu a0,a3,v1=0A= 4754: 01023021 addu a2,t0,v0=0A= 4758: 00c43021 addu a2,a2,a0=0A= 475c: 8e62000c lw v0,12(s3)=0A= 4760: ae660290 sw a2,656(s3)=0A= 4764: ae670294 sw a3,660(s3)=0A= 4768: 8e680298 lw t0,664(s3)=0A= 476c: 8e69029c lw t1,668(s3)=0A= 4770: 2c420002 sltiu v0,v0,2=0A= adapter->stats.prc1023 +=3D E1000_READ_REG(&adapter->shared, = PRC1023);=0A= 4774: 8e640008 lw a0,8(s3)=0A= 4778: 00001021 move v0,zero=0A= __arch__swab16s(addr);=0A= }=0A= =0A= static __inline__ __const__ __u32 __fswab32(__u32 x)=0A= {=0A= 477c: 8c87406c lw a3,16492(a0)=0A= return __arch__swab32(x);=0A= 4780: 30e5ff00 andi a1,a3,0xff00=0A= 4784: 00073600 sll a2,a3,0x18=0A= 4788: 00072202 srl a0,a3,0x8=0A= 478c: 00052a00 sll a1,a1,0x8=0A= 4790: 3084ff00 andi a0,a0,0xff00=0A= 4794: 00c53025 or a2,a2,a1=0A= 4798: 00c43025 or a2,a2,a0=0A= 479c: 00073e02 srl a3,a3,0x18=0A= 47a0: 00c71825 or v1,a2,a3=0A= 47a4: 01233821 addu a3,t1,v1=0A= 47a8: 00e3202b sltu a0,a3,v1=0A= 47ac: 01023021 addu a2,t0,v0=0A= 47b0: 00c43021 addu a2,a2,a0=0A= 47b4: 8e62000c lw v0,12(s3)=0A= 47b8: ae660298 sw a2,664(s3)=0A= 47bc: ae67029c sw a3,668(s3)=0A= 47c0: 8e6802a0 lw t0,672(s3)=0A= 47c4: 8e6902a4 lw t1,676(s3)=0A= 47c8: 2c420002 sltiu v0,v0,2=0A= adapter->stats.prc1522 +=3D E1000_READ_REG(&adapter->shared, = PRC1522);=0A= 47cc: 8e640008 lw a0,8(s3)=0A= 47d0: 00001021 move v0,zero=0A= __arch__swab16s(addr);=0A= }=0A= =0A= static __inline__ __const__ __u32 __fswab32(__u32 x)=0A= {=0A= 47d4: 8c874070 lw a3,16496(a0)=0A= return __arch__swab32(x);=0A= 47d8: 30e5ff00 andi a1,a3,0xff00=0A= 47dc: 00073600 sll a2,a3,0x18=0A= 47e0: 00072202 srl a0,a3,0x8=0A= 47e4: 00052a00 sll a1,a1,0x8=0A= 47e8: 3084ff00 andi a0,a0,0xff00=0A= 47ec: 00c53025 or a2,a2,a1=0A= 47f0: 00c43025 or a2,a2,a0=0A= 47f4: 00073e02 srl a3,a3,0x18=0A= 47f8: 00c71825 or v1,a2,a3=0A= 47fc: 01233821 addu a3,t1,v1=0A= 4800: 00e3202b sltu a0,a3,v1=0A= 4804: 01023021 addu a2,t0,v0=0A= 4808: 00c43021 addu a2,a2,a0=0A= 480c: 8e62000c lw v0,12(s3)=0A= 4810: ae6602a0 sw a2,672(s3)=0A= 4814: ae6702a4 sw a3,676(s3)=0A= 4818: 8e6802a8 lw t0,680(s3)=0A= 481c: 8e6902ac lw t1,684(s3)=0A= 4820: 2c420002 sltiu v0,v0,2=0A= adapter->stats.gprc +=3D E1000_READ_REG(&adapter->shared, GPRC);=0A= 4824: 8e640008 lw a0,8(s3)=0A= 4828: 00001021 move v0,zero=0A= __arch__swab16s(addr);=0A= }=0A= =0A= static __inline__ __const__ __u32 __fswab32(__u32 x)=0A= {=0A= 482c: 8c874074 lw a3,16500(a0)=0A= return __arch__swab32(x);=0A= 4830: 30e5ff00 andi a1,a3,0xff00=0A= 4834: 00073600 sll a2,a3,0x18=0A= 4838: 00072202 srl a0,a3,0x8=0A= 483c: 00052a00 sll a1,a1,0x8=0A= 4840: 3084ff00 andi a0,a0,0xff00=0A= 4844: 00c53025 or a2,a2,a1=0A= 4848: 00c43025 or a2,a2,a0=0A= 484c: 00073e02 srl a3,a3,0x18=0A= 4850: 00c71825 or v1,a2,a3=0A= 4854: 01233821 addu a3,t1,v1=0A= 4858: 00e3202b sltu a0,a3,v1=0A= 485c: 01023021 addu a2,t0,v0=0A= 4860: 00c43021 addu a2,a2,a0=0A= 4864: 8e62000c lw v0,12(s3)=0A= 4868: ae6602a8 sw a2,680(s3)=0A= 486c: ae6702ac sw a3,684(s3)=0A= 4870: 8e6802b0 lw t0,688(s3)=0A= 4874: 8e6902b4 lw t1,692(s3)=0A= 4878: 2c420002 sltiu v0,v0,2=0A= adapter->stats.bprc +=3D E1000_READ_REG(&adapter->shared, BPRC);=0A= 487c: 8e640008 lw a0,8(s3)=0A= 4880: 00001021 move v0,zero=0A= __arch__swab16s(addr);=0A= }=0A= =0A= static __inline__ __const__ __u32 __fswab32(__u32 x)=0A= {=0A= 4884: 8c874078 lw a3,16504(a0)=0A= return __arch__swab32(x);=0A= 4888: 30e5ff00 andi a1,a3,0xff00=0A= 488c: 00073600 sll a2,a3,0x18=0A= 4890: 00072202 srl a0,a3,0x8=0A= 4894: 00052a00 sll a1,a1,0x8=0A= 4898: 3084ff00 andi a0,a0,0xff00=0A= 489c: 00c53025 or a2,a2,a1=0A= 48a0: 00c43025 or a2,a2,a0=0A= 48a4: 00073e02 srl a3,a3,0x18=0A= 48a8: 00c71825 or v1,a2,a3=0A= 48ac: 01233821 addu a3,t1,v1=0A= 48b0: 00e3202b sltu a0,a3,v1=0A= 48b4: 01023021 addu a2,t0,v0=0A= 48b8: 00c43021 addu a2,a2,a0=0A= 48bc: 8e62000c lw v0,12(s3)=0A= 48c0: ae6602b0 sw a2,688(s3)=0A= 48c4: ae6702b4 sw a3,692(s3)=0A= 48c8: 8e6802b8 lw t0,696(s3)=0A= 48cc: 8e6902bc lw t1,700(s3)=0A= 48d0: 2c420002 sltiu v0,v0,2=0A= adapter->stats.mprc +=3D E1000_READ_REG(&adapter->shared, MPRC);=0A= 48d4: 8e640008 lw a0,8(s3)=0A= 48d8: 00001021 move v0,zero=0A= __arch__swab16s(addr);=0A= }=0A= =0A= static __inline__ __const__ __u32 __fswab32(__u32 x)=0A= {=0A= 48dc: 8c87407c lw a3,16508(a0)=0A= return __arch__swab32(x);=0A= 48e0: 30e5ff00 andi a1,a3,0xff00=0A= 48e4: 00073600 sll a2,a3,0x18=0A= 48e8: 00072202 srl a0,a3,0x8=0A= 48ec: 00052a00 sll a1,a1,0x8=0A= 48f0: 3084ff00 andi a0,a0,0xff00=0A= 48f4: 00c53025 or a2,a2,a1=0A= 48f8: 00c43025 or a2,a2,a0=0A= 48fc: 00073e02 srl a3,a3,0x18=0A= 4900: 00c71825 or v1,a2,a3=0A= 4904: 01233821 addu a3,t1,v1=0A= 4908: 00e3202b sltu a0,a3,v1=0A= 490c: 01023021 addu a2,t0,v0=0A= 4910: 00c43021 addu a2,a2,a0=0A= 4914: 8e62000c lw v0,12(s3)=0A= 4918: ae6602b8 sw a2,696(s3)=0A= 491c: ae6702bc sw a3,700(s3)=0A= 4920: 8e6802c0 lw t0,704(s3)=0A= 4924: 8e6902c4 lw t1,708(s3)=0A= 4928: 2c420002 sltiu v0,v0,2=0A= adapter->stats.gptc +=3D E1000_READ_REG(&adapter->shared, GPTC);=0A= 492c: 8e640008 lw a0,8(s3)=0A= 4930: 00001021 move v0,zero=0A= __arch__swab16s(addr);=0A= }=0A= =0A= static __inline__ __const__ __u32 __fswab32(__u32 x)=0A= {=0A= 4934: 8c874080 lw a3,16512(a0)=0A= return __arch__swab32(x);=0A= 4938: 30e5ff00 andi a1,a3,0xff00=0A= 493c: 00073600 sll a2,a3,0x18=0A= 4940: 00072202 srl a0,a3,0x8=0A= 4944: 00052a00 sll a1,a1,0x8=0A= 4948: 3084ff00 andi a0,a0,0xff00=0A= 494c: 00c53025 or a2,a2,a1=0A= 4950: 00c43025 or a2,a2,a0=0A= 4954: 00073e02 srl a3,a3,0x18=0A= 4958: 00c71825 or v1,a2,a3=0A= 495c: 01233821 addu a3,t1,v1=0A= 4960: 00e3202b sltu a0,a3,v1=0A= 4964: 01023021 addu a2,t0,v0=0A= 4968: 00c43021 addu a2,a2,a0=0A= 496c: 8e62000c lw v0,12(s3)=0A= 4970: ae6602c0 sw a2,704(s3)=0A= 4974: ae6702c4 sw a3,708(s3)=0A= 4978: 8e6802c8 lw t0,712(s3)=0A= 497c: 8e6902cc lw t1,716(s3)=0A= 4980: 2c420002 sltiu v0,v0,2=0A= =0A= /* for the 64-bit byte counters the low dword must be read first */=0A= /* both registers clear on the read of the high dword */=0A= =0A= adapter->stats.gorcl +=3D E1000_READ_REG(&adapter->shared, GORCL);=0A= 4984: 8e640008 lw a0,8(s3)=0A= 4988: 00001021 move v0,zero=0A= __arch__swab16s(addr);=0A= }=0A= =0A= static __inline__ __const__ __u32 __fswab32(__u32 x)=0A= {=0A= 498c: 8c874088 lw a3,16520(a0)=0A= return __arch__swab32(x);=0A= 4990: 30e5ff00 andi a1,a3,0xff00=0A= 4994: 00073600 sll a2,a3,0x18=0A= 4998: 00072202 srl a0,a3,0x8=0A= 499c: 00052a00 sll a1,a1,0x8=0A= 49a0: 3084ff00 andi a0,a0,0xff00=0A= 49a4: 00c53025 or a2,a2,a1=0A= 49a8: 00c43025 or a2,a2,a0=0A= 49ac: 00073e02 srl a3,a3,0x18=0A= 49b0: 00c71825 or v1,a2,a3=0A= 49b4: 01233821 addu a3,t1,v1=0A= 49b8: 00e3202b sltu a0,a3,v1=0A= 49bc: 01023021 addu a2,t0,v0=0A= 49c0: 00c43021 addu a2,a2,a0=0A= 49c4: 8e62000c lw v0,12(s3)=0A= 49c8: ae6602c8 sw a2,712(s3)=0A= 49cc: ae6702cc sw a3,716(s3)=0A= 49d0: 8e6802d0 lw t0,720(s3)=0A= 49d4: 8e6902d4 lw t1,724(s3)=0A= 49d8: 2c420002 sltiu v0,v0,2=0A= adapter->stats.gorch +=3D E1000_READ_REG(&adapter->shared, GORCH);=0A= 49dc: 8e640008 lw a0,8(s3)=0A= 49e0: 00001021 move v0,zero=0A= __arch__swab16s(addr);=0A= }=0A= =0A= static __inline__ __const__ __u32 __fswab32(__u32 x)=0A= {=0A= 49e4: 8c87408c lw a3,16524(a0)=0A= return __arch__swab32(x);=0A= 49e8: 30e5ff00 andi a1,a3,0xff00=0A= 49ec: 00073600 sll a2,a3,0x18=0A= 49f0: 00072202 srl a0,a3,0x8=0A= 49f4: 00052a00 sll a1,a1,0x8=0A= 49f8: 3084ff00 andi a0,a0,0xff00=0A= 49fc: 00c53025 or a2,a2,a1=0A= 4a00: 00c43025 or a2,a2,a0=0A= 4a04: 00073e02 srl a3,a3,0x18=0A= 4a08: 00c71825 or v1,a2,a3=0A= 4a0c: 01233821 addu a3,t1,v1=0A= 4a10: 00e3202b sltu a0,a3,v1=0A= 4a14: 01023021 addu a2,t0,v0=0A= 4a18: 00c43021 addu a2,a2,a0=0A= 4a1c: 8e62000c lw v0,12(s3)=0A= 4a20: ae6602d0 sw a2,720(s3)=0A= 4a24: ae6702d4 sw a3,724(s3)=0A= 4a28: 8e6802d8 lw t0,728(s3)=0A= 4a2c: 8e6902dc lw t1,732(s3)=0A= 4a30: 2c420002 sltiu v0,v0,2=0A= adapter->stats.gotcl +=3D E1000_READ_REG(&adapter->shared, GOTCL);=0A= 4a34: 8e640008 lw a0,8(s3)=0A= 4a38: 00001021 move v0,zero=0A= __arch__swab16s(addr);=0A= }=0A= =0A= static __inline__ __const__ __u32 __fswab32(__u32 x)=0A= {=0A= 4a3c: 8c874090 lw a3,16528(a0)=0A= return __arch__swab32(x);=0A= 4a40: 30e5ff00 andi a1,a3,0xff00=0A= 4a44: 00073600 sll a2,a3,0x18=0A= 4a48: 00072202 srl a0,a3,0x8=0A= 4a4c: 00052a00 sll a1,a1,0x8=0A= 4a50: 3084ff00 andi a0,a0,0xff00=0A= 4a54: 00c53025 or a2,a2,a1=0A= 4a58: 00c43025 or a2,a2,a0=0A= 4a5c: 00073e02 srl a3,a3,0x18=0A= 4a60: 00c71825 or v1,a2,a3=0A= 4a64: 01233821 addu a3,t1,v1=0A= 4a68: 00e3202b sltu a0,a3,v1=0A= 4a6c: 01023021 addu a2,t0,v0=0A= 4a70: 00c43021 addu a2,a2,a0=0A= 4a74: 8e62000c lw v0,12(s3)=0A= 4a78: ae6602d8 sw a2,728(s3)=0A= 4a7c: ae6702dc sw a3,732(s3)=0A= 4a80: 8e6802e0 lw t0,736(s3)=0A= 4a84: 8e6902e4 lw t1,740(s3)=0A= 4a88: 2c420002 sltiu v0,v0,2=0A= adapter->stats.gotch +=3D E1000_READ_REG(&adapter->shared, GOTCH);=0A= 4a8c: 8e640008 lw a0,8(s3)=0A= 4a90: 00001021 move v0,zero=0A= __arch__swab16s(addr);=0A= }=0A= =0A= static __inline__ __const__ __u32 __fswab32(__u32 x)=0A= {=0A= 4a94: 8c874094 lw a3,16532(a0)=0A= return __arch__swab32(x);=0A= 4a98: 30e5ff00 andi a1,a3,0xff00=0A= 4a9c: 00073600 sll a2,a3,0x18=0A= 4aa0: 00072202 srl a0,a3,0x8=0A= 4aa4: 00052a00 sll a1,a1,0x8=0A= 4aa8: 3084ff00 andi a0,a0,0xff00=0A= 4aac: 00c53025 or a2,a2,a1=0A= 4ab0: 00c43025 or a2,a2,a0=0A= 4ab4: 00073e02 srl a3,a3,0x18=0A= 4ab8: 00c71825 or v1,a2,a3=0A= 4abc: 01233821 addu a3,t1,v1=0A= 4ac0: 00e3202b sltu a0,a3,v1=0A= 4ac4: 01023021 addu a2,t0,v0=0A= 4ac8: 00c43021 addu a2,a2,a0=0A= 4acc: 8e62000c lw v0,12(s3)=0A= 4ad0: ae6602e0 sw a2,736(s3)=0A= 4ad4: ae6702e4 sw a3,740(s3)=0A= 4ad8: 8e6802e8 lw t0,744(s3)=0A= 4adc: 8e6902ec lw t1,748(s3)=0A= 4ae0: 2c420002 sltiu v0,v0,2=0A= =0A= adapter->stats.rnbc +=3D E1000_READ_REG(&adapter->shared, RNBC);=0A= 4ae4: 8e640008 lw a0,8(s3)=0A= 4ae8: 00001021 move v0,zero=0A= __arch__swab16s(addr);=0A= }=0A= =0A= static __inline__ __const__ __u32 __fswab32(__u32 x)=0A= {=0A= 4aec: 8c8740a0 lw a3,16544(a0)=0A= return __arch__swab32(x);=0A= 4af0: 30e5ff00 andi a1,a3,0xff00=0A= 4af4: 00073600 sll a2,a3,0x18=0A= 4af8: 00072202 srl a0,a3,0x8=0A= 4afc: 00052a00 sll a1,a1,0x8=0A= 4b00: 3084ff00 andi a0,a0,0xff00=0A= 4b04: 00c53025 or a2,a2,a1=0A= 4b08: 00c43025 or a2,a2,a0=0A= 4b0c: 00073e02 srl a3,a3,0x18=0A= 4b10: 00c71825 or v1,a2,a3=0A= 4b14: 01233821 addu a3,t1,v1=0A= 4b18: 00e3202b sltu a0,a3,v1=0A= 4b1c: 01023021 addu a2,t0,v0=0A= 4b20: 00c43021 addu a2,a2,a0=0A= 4b24: 8e62000c lw v0,12(s3)=0A= 4b28: ae6602e8 sw a2,744(s3)=0A= 4b2c: ae6702ec sw a3,748(s3)=0A= 4b30: 8e6802f0 lw t0,752(s3)=0A= 4b34: 8e6902f4 lw t1,756(s3)=0A= 4b38: 2c420002 sltiu v0,v0,2=0A= adapter->stats.ruc +=3D E1000_READ_REG(&adapter->shared, RUC);=0A= 4b3c: 8e640008 lw a0,8(s3)=0A= 4b40: 00001021 move v0,zero=0A= __arch__swab16s(addr);=0A= }=0A= =0A= static __inline__ __const__ __u32 __fswab32(__u32 x)=0A= {=0A= 4b44: 8c8740a4 lw a3,16548(a0)=0A= return __arch__swab32(x);=0A= 4b48: 30e5ff00 andi a1,a3,0xff00=0A= 4b4c: 00073600 sll a2,a3,0x18=0A= 4b50: 00072202 srl a0,a3,0x8=0A= 4b54: 00052a00 sll a1,a1,0x8=0A= 4b58: 3084ff00 andi a0,a0,0xff00=0A= 4b5c: 00c53025 or a2,a2,a1=0A= 4b60: 00c43025 or a2,a2,a0=0A= 4b64: 00073e02 srl a3,a3,0x18=0A= 4b68: 00c71825 or v1,a2,a3=0A= 4b6c: 01233821 addu a3,t1,v1=0A= 4b70: 00e3202b sltu a0,a3,v1=0A= 4b74: 01023021 addu a2,t0,v0=0A= 4b78: 00c43021 addu a2,a2,a0=0A= 4b7c: 8e62000c lw v0,12(s3)=0A= 4b80: ae6602f0 sw a2,752(s3)=0A= 4b84: ae6702f4 sw a3,756(s3)=0A= 4b88: 8e6802f8 lw t0,760(s3)=0A= 4b8c: 8e6902fc lw t1,764(s3)=0A= 4b90: 2c420002 sltiu v0,v0,2=0A= adapter->stats.rfc +=3D E1000_READ_REG(&adapter->shared, RFC);=0A= 4b94: 8e640008 lw a0,8(s3)=0A= 4b98: 00001021 move v0,zero=0A= __arch__swab16s(addr);=0A= }=0A= =0A= static __inline__ __const__ __u32 __fswab32(__u32 x)=0A= {=0A= 4b9c: 8c8740a8 lw a3,16552(a0)=0A= return __arch__swab32(x);=0A= 4ba0: 30e5ff00 andi a1,a3,0xff00=0A= 4ba4: 00073600 sll a2,a3,0x18=0A= 4ba8: 00072202 srl a0,a3,0x8=0A= 4bac: 00052a00 sll a1,a1,0x8=0A= 4bb0: 3084ff00 andi a0,a0,0xff00=0A= 4bb4: 00c53025 or a2,a2,a1=0A= 4bb8: 00c43025 or a2,a2,a0=0A= 4bbc: 00073e02 srl a3,a3,0x18=0A= 4bc0: 00c71825 or v1,a2,a3=0A= 4bc4: 01233821 addu a3,t1,v1=0A= 4bc8: 00e3202b sltu a0,a3,v1=0A= 4bcc: 01023021 addu a2,t0,v0=0A= 4bd0: 00c43021 addu a2,a2,a0=0A= 4bd4: 8e62000c lw v0,12(s3)=0A= 4bd8: ae6602f8 sw a2,760(s3)=0A= 4bdc: ae6702fc sw a3,764(s3)=0A= 4be0: 8e680300 lw t0,768(s3)=0A= 4be4: 8e690304 lw t1,772(s3)=0A= 4be8: 2c420002 sltiu v0,v0,2=0A= adapter->stats.roc +=3D E1000_READ_REG(&adapter->shared, ROC);=0A= 4bec: 8e640008 lw a0,8(s3)=0A= 4bf0: 00001021 move v0,zero=0A= __arch__swab16s(addr);=0A= }=0A= =0A= static __inline__ __const__ __u32 __fswab32(__u32 x)=0A= {=0A= 4bf4: 8c8740ac lw a3,16556(a0)=0A= return __arch__swab32(x);=0A= 4bf8: 30e5ff00 andi a1,a3,0xff00=0A= 4bfc: 00073600 sll a2,a3,0x18=0A= 4c00: 00072202 srl a0,a3,0x8=0A= 4c04: 00052a00 sll a1,a1,0x8=0A= 4c08: 3084ff00 andi a0,a0,0xff00=0A= 4c0c: 00c53025 or a2,a2,a1=0A= 4c10: 00c43025 or a2,a2,a0=0A= 4c14: 00073e02 srl a3,a3,0x18=0A= 4c18: 00c71825 or v1,a2,a3=0A= 4c1c: 01233821 addu a3,t1,v1=0A= 4c20: 00e3202b sltu a0,a3,v1=0A= 4c24: 01023021 addu a2,t0,v0=0A= 4c28: 00c43021 addu a2,a2,a0=0A= 4c2c: 8e62000c lw v0,12(s3)=0A= 4c30: ae660300 sw a2,768(s3)=0A= 4c34: ae670304 sw a3,772(s3)=0A= 4c38: 8e680308 lw t0,776(s3)=0A= 4c3c: 8e69030c lw t1,780(s3)=0A= 4c40: 2c420002 sltiu v0,v0,2=0A= adapter->stats.rjc +=3D E1000_READ_REG(&adapter->shared, RJC);=0A= 4c44: 8e640008 lw a0,8(s3)=0A= 4c48: 00001021 move v0,zero=0A= __arch__swab16s(addr);=0A= }=0A= =0A= static __inline__ __const__ __u32 __fswab32(__u32 x)=0A= {=0A= 4c4c: 8c8740b0 lw a3,16560(a0)=0A= return __arch__swab32(x);=0A= 4c50: 30e5ff00 andi a1,a3,0xff00=0A= 4c54: 00073600 sll a2,a3,0x18=0A= 4c58: 00072202 srl a0,a3,0x8=0A= 4c5c: 00052a00 sll a1,a1,0x8=0A= 4c60: 3084ff00 andi a0,a0,0xff00=0A= 4c64: 00c53025 or a2,a2,a1=0A= 4c68: 00c43025 or a2,a2,a0=0A= 4c6c: 00073e02 srl a3,a3,0x18=0A= 4c70: 00c71825 or v1,a2,a3=0A= 4c74: 01233821 addu a3,t1,v1=0A= 4c78: 00e3202b sltu a0,a3,v1=0A= 4c7c: 01023021 addu a2,t0,v0=0A= 4c80: 00c43021 addu a2,a2,a0=0A= 4c84: 8e62000c lw v0,12(s3)=0A= 4c88: ae660308 sw a2,776(s3)=0A= 4c8c: ae67030c sw a3,780(s3)=0A= 4c90: 8e680328 lw t0,808(s3)=0A= 4c94: 8e69032c lw t1,812(s3)=0A= 4c98: 2c420002 sltiu v0,v0,2=0A= =0A= adapter->stats.torl +=3D E1000_READ_REG(&adapter->shared, TORL);=0A= 4c9c: 8e640008 lw a0,8(s3)=0A= 4ca0: 00001021 move v0,zero=0A= __arch__swab16s(addr);=0A= }=0A= =0A= static __inline__ __const__ __u32 __fswab32(__u32 x)=0A= {=0A= 4ca4: 8c8740c0 lw a3,16576(a0)=0A= return __arch__swab32(x);=0A= 4ca8: 30e5ff00 andi a1,a3,0xff00=0A= 4cac: 00073600 sll a2,a3,0x18=0A= 4cb0: 00072202 srl a0,a3,0x8=0A= 4cb4: 00052a00 sll a1,a1,0x8=0A= 4cb8: 3084ff00 andi a0,a0,0xff00=0A= 4cbc: 00c53025 or a2,a2,a1=0A= 4cc0: 00c43025 or a2,a2,a0=0A= 4cc4: 00073e02 srl a3,a3,0x18=0A= 4cc8: 00c71825 or v1,a2,a3=0A= 4ccc: 01233821 addu a3,t1,v1=0A= 4cd0: 00e3202b sltu a0,a3,v1=0A= 4cd4: 01023021 addu a2,t0,v0=0A= 4cd8: 00c43021 addu a2,a2,a0=0A= 4cdc: 8e62000c lw v0,12(s3)=0A= 4ce0: ae660328 sw a2,808(s3)=0A= 4ce4: ae67032c sw a3,812(s3)=0A= 4ce8: 8e680330 lw t0,816(s3)=0A= 4cec: 8e690334 lw t1,820(s3)=0A= 4cf0: 2c420002 sltiu v0,v0,2=0A= adapter->stats.torh +=3D E1000_READ_REG(&adapter->shared, TORH);=0A= 4cf4: 8e640008 lw a0,8(s3)=0A= 4cf8: 00001021 move v0,zero=0A= __arch__swab16s(addr);=0A= }=0A= =0A= static __inline__ __const__ __u32 __fswab32(__u32 x)=0A= {=0A= 4cfc: 8c8740c4 lw a3,16580(a0)=0A= return __arch__swab32(x);=0A= 4d00: 30e5ff00 andi a1,a3,0xff00=0A= 4d04: 00073600 sll a2,a3,0x18=0A= 4d08: 00072202 srl a0,a3,0x8=0A= 4d0c: 00052a00 sll a1,a1,0x8=0A= 4d10: 3084ff00 andi a0,a0,0xff00=0A= 4d14: 00c53025 or a2,a2,a1=0A= 4d18: 00c43025 or a2,a2,a0=0A= 4d1c: 00073e02 srl a3,a3,0x18=0A= 4d20: 00c71825 or v1,a2,a3=0A= 4d24: 01233821 addu a3,t1,v1=0A= 4d28: 00e3202b sltu a0,a3,v1=0A= 4d2c: 01023021 addu a2,t0,v0=0A= 4d30: 00c43021 addu a2,a2,a0=0A= 4d34: 8e62000c lw v0,12(s3)=0A= 4d38: ae660330 sw a2,816(s3)=0A= 4d3c: ae670334 sw a3,820(s3)=0A= 4d40: 8e680338 lw t0,824(s3)=0A= 4d44: 8e69033c lw t1,828(s3)=0A= 4d48: 2c420002 sltiu v0,v0,2=0A= adapter->stats.totl +=3D E1000_READ_REG(&adapter->shared, TOTL);=0A= 4d4c: 8e640008 lw a0,8(s3)=0A= 4d50: 00001021 move v0,zero=0A= __arch__swab16s(addr);=0A= }=0A= =0A= static __inline__ __const__ __u32 __fswab32(__u32 x)=0A= {=0A= 4d54: 8c8740c8 lw a3,16584(a0)=0A= return __arch__swab32(x);=0A= 4d58: 30e5ff00 andi a1,a3,0xff00=0A= 4d5c: 00073600 sll a2,a3,0x18=0A= 4d60: 00072202 srl a0,a3,0x8=0A= 4d64: 00052a00 sll a1,a1,0x8=0A= 4d68: 3084ff00 andi a0,a0,0xff00=0A= 4d6c: 00c53025 or a2,a2,a1=0A= 4d70: 00c43025 or a2,a2,a0=0A= 4d74: 00073e02 srl a3,a3,0x18=0A= 4d78: 00c71825 or v1,a2,a3=0A= 4d7c: 01233821 addu a3,t1,v1=0A= 4d80: 00e3202b sltu a0,a3,v1=0A= 4d84: 01023021 addu a2,t0,v0=0A= 4d88: 00c43021 addu a2,a2,a0=0A= 4d8c: 8e62000c lw v0,12(s3)=0A= 4d90: ae660338 sw a2,824(s3)=0A= 4d94: ae67033c sw a3,828(s3)=0A= 4d98: 8e680340 lw t0,832(s3)=0A= 4d9c: 8e690344 lw t1,836(s3)=0A= 4da0: 2c420002 sltiu v0,v0,2=0A= adapter->stats.toth +=3D E1000_READ_REG(&adapter->shared, TOTH);=0A= 4da4: 8e640008 lw a0,8(s3)=0A= 4da8: 00001021 move v0,zero=0A= __arch__swab16s(addr);=0A= }=0A= =0A= static __inline__ __const__ __u32 __fswab32(__u32 x)=0A= {=0A= 4dac: 8c8740cc lw a3,16588(a0)=0A= return __arch__swab32(x);=0A= 4db0: 30e5ff00 andi a1,a3,0xff00=0A= 4db4: 00073600 sll a2,a3,0x18=0A= 4db8: 00072202 srl a0,a3,0x8=0A= 4dbc: 00052a00 sll a1,a1,0x8=0A= 4dc0: 3084ff00 andi a0,a0,0xff00=0A= 4dc4: 00c53025 or a2,a2,a1=0A= 4dc8: 00c43025 or a2,a2,a0=0A= 4dcc: 00073e02 srl a3,a3,0x18=0A= 4dd0: 00c71825 or v1,a2,a3=0A= 4dd4: 01233821 addu a3,t1,v1=0A= 4dd8: 00e3202b sltu a0,a3,v1=0A= 4ddc: 01023021 addu a2,t0,v0=0A= 4de0: 00c43021 addu a2,a2,a0=0A= 4de4: 8e62000c lw v0,12(s3)=0A= 4de8: ae660340 sw a2,832(s3)=0A= 4dec: ae670344 sw a3,836(s3)=0A= 4df0: 8e680348 lw t0,840(s3)=0A= 4df4: 8e69034c lw t1,844(s3)=0A= 4df8: 2c420002 sltiu v0,v0,2=0A= =0A= adapter->stats.tpr +=3D E1000_READ_REG(&adapter->shared, TPR);=0A= 4dfc: 8e640008 lw a0,8(s3)=0A= 4e00: 00001021 move v0,zero=0A= __arch__swab16s(addr);=0A= }=0A= =0A= static __inline__ __const__ __u32 __fswab32(__u32 x)=0A= {=0A= 4e04: 8c8740d0 lw a3,16592(a0)=0A= return __arch__swab32(x);=0A= 4e08: 30e5ff00 andi a1,a3,0xff00=0A= 4e0c: 00073600 sll a2,a3,0x18=0A= 4e10: 00072202 srl a0,a3,0x8=0A= 4e14: 00052a00 sll a1,a1,0x8=0A= 4e18: 3084ff00 andi a0,a0,0xff00=0A= 4e1c: 00c53025 or a2,a2,a1=0A= 4e20: 00c43025 or a2,a2,a0=0A= 4e24: 00073e02 srl a3,a3,0x18=0A= 4e28: 00c71825 or v1,a2,a3=0A= 4e2c: 01233821 addu a3,t1,v1=0A= 4e30: 00e3202b sltu a0,a3,v1=0A= 4e34: 01023021 addu a2,t0,v0=0A= 4e38: 00c43021 addu a2,a2,a0=0A= 4e3c: 8e62000c lw v0,12(s3)=0A= 4e40: ae660348 sw a2,840(s3)=0A= 4e44: ae67034c sw a3,844(s3)=0A= 4e48: 8e680350 lw t0,848(s3)=0A= 4e4c: 8e690354 lw t1,852(s3)=0A= 4e50: 2c420002 sltiu v0,v0,2=0A= adapter->stats.tpt +=3D E1000_READ_REG(&adapter->shared, TPT);=0A= 4e54: 8e640008 lw a0,8(s3)=0A= 4e58: 00001021 move v0,zero=0A= __arch__swab16s(addr);=0A= }=0A= =0A= static __inline__ __const__ __u32 __fswab32(__u32 x)=0A= {=0A= 4e5c: 8c8740d4 lw a3,16596(a0)=0A= return __arch__swab32(x);=0A= 4e60: 30e5ff00 andi a1,a3,0xff00=0A= 4e64: 00073600 sll a2,a3,0x18=0A= 4e68: 00072202 srl a0,a3,0x8=0A= 4e6c: 00052a00 sll a1,a1,0x8=0A= 4e70: 3084ff00 andi a0,a0,0xff00=0A= 4e74: 00c53025 or a2,a2,a1=0A= 4e78: 00c43025 or a2,a2,a0=0A= 4e7c: 00073e02 srl a3,a3,0x18=0A= 4e80: 00c71825 or v1,a2,a3=0A= 4e84: 01233821 addu a3,t1,v1=0A= 4e88: 00e3202b sltu a0,a3,v1=0A= 4e8c: 01023021 addu a2,t0,v0=0A= 4e90: 00c43021 addu a2,a2,a0=0A= 4e94: 8e62000c lw v0,12(s3)=0A= 4e98: ae660350 sw a2,848(s3)=0A= 4e9c: ae670354 sw a3,852(s3)=0A= 4ea0: 8e680358 lw t0,856(s3)=0A= 4ea4: 8e69035c lw t1,860(s3)=0A= 4ea8: 2c420002 sltiu v0,v0,2=0A= adapter->stats.ptc64 +=3D E1000_READ_REG(&adapter->shared, PTC64);=0A= 4eac: 8e640008 lw a0,8(s3)=0A= 4eb0: 00001021 move v0,zero=0A= __arch__swab16s(addr);=0A= }=0A= =0A= static __inline__ __const__ __u32 __fswab32(__u32 x)=0A= {=0A= 4eb4: 8c8740d8 lw a3,16600(a0)=0A= return __arch__swab32(x);=0A= 4eb8: 30e5ff00 andi a1,a3,0xff00=0A= 4ebc: 00073600 sll a2,a3,0x18=0A= 4ec0: 00072202 srl a0,a3,0x8=0A= 4ec4: 00052a00 sll a1,a1,0x8=0A= 4ec8: 3084ff00 andi a0,a0,0xff00=0A= 4ecc: 00c53025 or a2,a2,a1=0A= 4ed0: 00c43025 or a2,a2,a0=0A= 4ed4: 00073e02 srl a3,a3,0x18=0A= 4ed8: 00c71825 or v1,a2,a3=0A= 4edc: 01233821 addu a3,t1,v1=0A= 4ee0: 00e3202b sltu a0,a3,v1=0A= 4ee4: 01023021 addu a2,t0,v0=0A= 4ee8: 00c43021 addu a2,a2,a0=0A= 4eec: 8e62000c lw v0,12(s3)=0A= 4ef0: ae660358 sw a2,856(s3)=0A= 4ef4: ae67035c sw a3,860(s3)=0A= 4ef8: 8e680360 lw t0,864(s3)=0A= 4efc: 8e690364 lw t1,868(s3)=0A= 4f00: 2c420002 sltiu v0,v0,2=0A= adapter->stats.ptc127 +=3D E1000_READ_REG(&adapter->shared, PTC127);=0A= 4f04: 8e640008 lw a0,8(s3)=0A= 4f08: 00001021 move v0,zero=0A= __arch__swab16s(addr);=0A= }=0A= =0A= static __inline__ __const__ __u32 __fswab32(__u32 x)=0A= {=0A= 4f0c: 8c8740dc lw a3,16604(a0)=0A= return __arch__swab32(x);=0A= 4f10: 30e5ff00 andi a1,a3,0xff00=0A= 4f14: 00073600 sll a2,a3,0x18=0A= 4f18: 00072202 srl a0,a3,0x8=0A= 4f1c: 00052a00 sll a1,a1,0x8=0A= 4f20: 3084ff00 andi a0,a0,0xff00=0A= 4f24: 00c53025 or a2,a2,a1=0A= 4f28: 00c43025 or a2,a2,a0=0A= 4f2c: 00073e02 srl a3,a3,0x18=0A= 4f30: 00c71825 or v1,a2,a3=0A= 4f34: 01233821 addu a3,t1,v1=0A= 4f38: 00e3202b sltu a0,a3,v1=0A= 4f3c: 01023021 addu a2,t0,v0=0A= 4f40: 00c43021 addu a2,a2,a0=0A= 4f44: 8e62000c lw v0,12(s3)=0A= 4f48: ae660360 sw a2,864(s3)=0A= 4f4c: ae670364 sw a3,868(s3)=0A= 4f50: 8e680368 lw t0,872(s3)=0A= 4f54: 8e69036c lw t1,876(s3)=0A= 4f58: 2c420002 sltiu v0,v0,2=0A= adapter->stats.ptc255 +=3D E1000_READ_REG(&adapter->shared, PTC255);=0A= 4f5c: 8e640008 lw a0,8(s3)=0A= 4f60: 00001021 move v0,zero=0A= __arch__swab16s(addr);=0A= }=0A= =0A= static __inline__ __const__ __u32 __fswab32(__u32 x)=0A= {=0A= 4f64: 8c8740e0 lw a3,16608(a0)=0A= return __arch__swab32(x);=0A= 4f68: 30e5ff00 andi a1,a3,0xff00=0A= 4f6c: 00073600 sll a2,a3,0x18=0A= 4f70: 00072202 srl a0,a3,0x8=0A= 4f74: 00052a00 sll a1,a1,0x8=0A= 4f78: 3084ff00 andi a0,a0,0xff00=0A= 4f7c: 00c53025 or a2,a2,a1=0A= 4f80: 00c43025 or a2,a2,a0=0A= 4f84: 00073e02 srl a3,a3,0x18=0A= 4f88: 00c71825 or v1,a2,a3=0A= 4f8c: 01233821 addu a3,t1,v1=0A= 4f90: 00e3202b sltu a0,a3,v1=0A= 4f94: 01023021 addu a2,t0,v0=0A= 4f98: 00c43021 addu a2,a2,a0=0A= 4f9c: 8e62000c lw v0,12(s3)=0A= 4fa0: ae660368 sw a2,872(s3)=0A= 4fa4: ae67036c sw a3,876(s3)=0A= 4fa8: 8e680370 lw t0,880(s3)=0A= 4fac: 8e690374 lw t1,884(s3)=0A= 4fb0: 2c420002 sltiu v0,v0,2=0A= adapter->stats.ptc511 +=3D E1000_READ_REG(&adapter->shared, PTC511);=0A= 4fb4: 8e640008 lw a0,8(s3)=0A= 4fb8: 00001021 move v0,zero=0A= __arch__swab16s(addr);=0A= }=0A= =0A= static __inline__ __const__ __u32 __fswab32(__u32 x)=0A= {=0A= 4fbc: 8c8740e4 lw a3,16612(a0)=0A= return __arch__swab32(x);=0A= 4fc0: 30e5ff00 andi a1,a3,0xff00=0A= 4fc4: 00073600 sll a2,a3,0x18=0A= 4fc8: 00072202 srl a0,a3,0x8=0A= 4fcc: 00052a00 sll a1,a1,0x8=0A= 4fd0: 3084ff00 andi a0,a0,0xff00=0A= 4fd4: 00c53025 or a2,a2,a1=0A= 4fd8: 00c43025 or a2,a2,a0=0A= 4fdc: 00073e02 srl a3,a3,0x18=0A= 4fe0: 00c71825 or v1,a2,a3=0A= 4fe4: 01233821 addu a3,t1,v1=0A= 4fe8: 00e3202b sltu a0,a3,v1=0A= 4fec: 01023021 addu a2,t0,v0=0A= 4ff0: 00c43021 addu a2,a2,a0=0A= 4ff4: 8e62000c lw v0,12(s3)=0A= 4ff8: ae660370 sw a2,880(s3)=0A= 4ffc: ae670374 sw a3,884(s3)=0A= 5000: 8e680378 lw t0,888(s3)=0A= 5004: 8e69037c lw t1,892(s3)=0A= 5008: 2c420002 sltiu v0,v0,2=0A= adapter->stats.ptc1023 +=3D E1000_READ_REG(&adapter->shared, = PTC1023);=0A= 500c: 8e640008 lw a0,8(s3)=0A= 5010: 00001021 move v0,zero=0A= __arch__swab16s(addr);=0A= }=0A= =0A= static __inline__ __const__ __u32 __fswab32(__u32 x)=0A= {=0A= 5014: 8c8740e8 lw a3,16616(a0)=0A= return __arch__swab32(x);=0A= 5018: 30e5ff00 andi a1,a3,0xff00=0A= 501c: 00073600 sll a2,a3,0x18=0A= 5020: 00072202 srl a0,a3,0x8=0A= 5024: 00052a00 sll a1,a1,0x8=0A= 5028: 3084ff00 andi a0,a0,0xff00=0A= 502c: 00c53025 or a2,a2,a1=0A= 5030: 00c43025 or a2,a2,a0=0A= 5034: 00073e02 srl a3,a3,0x18=0A= 5038: 00c71825 or v1,a2,a3=0A= 503c: 01233821 addu a3,t1,v1=0A= 5040: 00e3202b sltu a0,a3,v1=0A= 5044: 01023021 addu a2,t0,v0=0A= 5048: 00c43021 addu a2,a2,a0=0A= 504c: 8e62000c lw v0,12(s3)=0A= 5050: ae660378 sw a2,888(s3)=0A= 5054: ae67037c sw a3,892(s3)=0A= 5058: 8e680380 lw t0,896(s3)=0A= 505c: 8e690384 lw t1,900(s3)=0A= 5060: 2c420002 sltiu v0,v0,2=0A= adapter->stats.ptc1522 +=3D E1000_READ_REG(&adapter->shared, = PTC1522);=0A= 5064: 8e640008 lw a0,8(s3)=0A= 5068: 00001021 move v0,zero=0A= __arch__swab16s(addr);=0A= }=0A= =0A= static __inline__ __const__ __u32 __fswab32(__u32 x)=0A= {=0A= 506c: 8c8740ec lw a3,16620(a0)=0A= return __arch__swab32(x);=0A= 5070: 30e5ff00 andi a1,a3,0xff00=0A= 5074: 00073600 sll a2,a3,0x18=0A= 5078: 00072202 srl a0,a3,0x8=0A= 507c: 00052a00 sll a1,a1,0x8=0A= 5080: 3084ff00 andi a0,a0,0xff00=0A= 5084: 00c53025 or a2,a2,a1=0A= 5088: 00c43025 or a2,a2,a0=0A= 508c: 00073e02 srl a3,a3,0x18=0A= 5090: 00c71825 or v1,a2,a3=0A= 5094: 01233821 addu a3,t1,v1=0A= 5098: 00e3202b sltu a0,a3,v1=0A= 509c: 01023021 addu a2,t0,v0=0A= 50a0: 00c43021 addu a2,a2,a0=0A= 50a4: 8e62000c lw v0,12(s3)=0A= 50a8: ae660380 sw a2,896(s3)=0A= 50ac: ae670384 sw a3,900(s3)=0A= 50b0: 8e680388 lw t0,904(s3)=0A= 50b4: 8e69038c lw t1,908(s3)=0A= 50b8: 2c420002 sltiu v0,v0,2=0A= adapter->stats.mptc +=3D E1000_READ_REG(&adapter->shared, MPTC);=0A= 50bc: 8e640008 lw a0,8(s3)=0A= 50c0: 00001021 move v0,zero=0A= __arch__swab16s(addr);=0A= }=0A= =0A= static __inline__ __const__ __u32 __fswab32(__u32 x)=0A= {=0A= 50c4: 8c8740f0 lw a3,16624(a0)=0A= return __arch__swab32(x);=0A= 50c8: 30e5ff00 andi a1,a3,0xff00=0A= 50cc: 00073600 sll a2,a3,0x18=0A= 50d0: 00072202 srl a0,a3,0x8=0A= 50d4: 00052a00 sll a1,a1,0x8=0A= 50d8: 3084ff00 andi a0,a0,0xff00=0A= 50dc: 00c53025 or a2,a2,a1=0A= 50e0: 00c43025 or a2,a2,a0=0A= 50e4: 00073e02 srl a3,a3,0x18=0A= 50e8: 00c71825 or v1,a2,a3=0A= 50ec: 01233821 addu a3,t1,v1=0A= 50f0: 00e3202b sltu a0,a3,v1=0A= 50f4: 01023021 addu a2,t0,v0=0A= 50f8: 00c43021 addu a2,a2,a0=0A= 50fc: 8e62000c lw v0,12(s3)=0A= 5100: ae660388 sw a2,904(s3)=0A= 5104: ae67038c sw a3,908(s3)=0A= 5108: 8e680390 lw t0,912(s3)=0A= 510c: 8e690394 lw t1,916(s3)=0A= 5110: 2c420002 sltiu v0,v0,2=0A= adapter->stats.bptc +=3D E1000_READ_REG(&adapter->shared, BPTC);=0A= 5114: 8e640008 lw a0,8(s3)=0A= 5118: 00001021 move v0,zero=0A= __arch__swab16s(addr);=0A= }=0A= =0A= static __inline__ __const__ __u32 __fswab32(__u32 x)=0A= {=0A= 511c: 8c8740f4 lw a3,16628(a0)=0A= return __arch__swab32(x);=0A= 5120: 30e5ff00 andi a1,a3,0xff00=0A= 5124: 00073600 sll a2,a3,0x18=0A= 5128: 00072202 srl a0,a3,0x8=0A= 512c: 00052a00 sll a1,a1,0x8=0A= 5130: 3084ff00 andi a0,a0,0xff00=0A= 5134: 00c53025 or a2,a2,a1=0A= 5138: 00c43025 or a2,a2,a0=0A= 513c: 00073e02 srl a3,a3,0x18=0A= 5140: 00c71825 or v1,a2,a3=0A= 5144: 01233821 addu a3,t1,v1=0A= 5148: 00e3202b sltu a0,a3,v1=0A= 514c: 01023021 addu a2,t0,v0=0A= 5150: 00c43021 addu a2,a2,a0=0A= =0A= if(adapter->shared.mac_type >=3D e1000_82543) {=0A= 5154: 8e62000c lw v0,12(s3)=0A= 5158: ae660390 sw a2,912(s3)=0A= 515c: ae670394 sw a3,916(s3)=0A= 5160: 2c420002 sltiu v0,v0,2=0A= 5164: 5440008c bnezl v0,5398 =0A= 5168: 8e6301dc lw v1,476(s3)=0A= adapter->stats.algnerrc +=3D E1000_READ_REG(&adapter->shared, = ALGNERRC);=0A= 516c: 8e620008 lw v0,8(s3)=0A= }=0A= =0A= static __inline__ __const__ __u32 __fswab32(__u32 x)=0A= {=0A= return __arch__swab32(x);=0A= 5170: 3c0c00ff lui t4,0xff=0A= 5174: 8e6801e0 lw t0,480(s3)=0A= 5178: 8e6901e4 lw t1,484(s3)=0A= __arch__swab16s(addr);=0A= }=0A= =0A= static __inline__ __const__ __u32 __fswab32(__u32 x)=0A= {=0A= 517c: 8c474004 lw a3,16388(v0)=0A= 5180: 8e6a000c lw t2,12(s3)=0A= 5184: 00001021 move v0,zero=0A= }=0A= =0A= static __inline__ __const__ __u32 __fswab32(__u32 x)=0A= {=0A= return __arch__swab32(x);=0A= 5188: 30e5ff00 andi a1,a3,0xff00=0A= 518c: 00073600 sll a2,a3,0x18=0A= 5190: 00ec2024 and a0,a3,t4=0A= 5194: 00052a00 sll a1,a1,0x8=0A= 5198: 00042202 srl a0,a0,0x8=0A= 519c: 00c53025 or a2,a2,a1=0A= 51a0: 00c43025 or a2,a2,a0=0A= 51a4: 00073e02 srl a3,a3,0x18=0A= 51a8: 00c71825 or v1,a2,a3=0A= 51ac: 01234821 addu t1,t1,v1=0A= 51b0: 0123202b sltu a0,t1,v1=0A= 51b4: 01024021 addu t0,t0,v0=0A= 51b8: 01044021 addu t0,t0,a0=0A= 51bc: 2d4a0002 sltiu t2,t2,2=0A= 51c0: ae6801e0 sw t0,480(s3)=0A= 51c4: ae6901e4 sw t1,484(s3)=0A= 51c8: 8e6801f0 lw t0,496(s3)=0A= 51cc: 8e6901f4 lw t1,500(s3)=0A= 51d0: 15400003 bnez t2,51e0 =0A= 51d4: 3c0bff00 lui t3,0xff00=0A= adapter->stats.rxerrc +=3D E1000_READ_REG(&adapter->shared, = RXERRC);=0A= 51d8: 0800147a j 51e8 =0A= 51dc: 8e660008 lw a2,8(s3)=0A= 51e0: 8e660008 lw a2,8(s3)=0A= 51e4: 00001021 move v0,zero=0A= __arch__swab16s(addr);=0A= }=0A= =0A= static __inline__ __const__ __u32 __fswab32(__u32 x)=0A= {=0A= 51e8: 8cc4400c lw a0,16396(a2)=0A= return __arch__swab32(x);=0A= 51ec: 3085ff00 andi a1,a0,0xff00=0A= 51f0: 008c3824 and a3,a0,t4=0A= 51f4: 00043600 sll a2,a0,0x18=0A= 51f8: 00052a00 sll a1,a1,0x8=0A= 51fc: 00073a02 srl a3,a3,0x8=0A= 5200: 00c53025 or a2,a2,a1=0A= 5204: 008b2024 and a0,a0,t3=0A= 5208: 00c73025 or a2,a2,a3=0A= 520c: 00042602 srl a0,a0,0x18=0A= 5210: 00c41825 or v1,a2,a0=0A= 5214: 01233821 addu a3,t1,v1=0A= 5218: 00e3202b sltu a0,a3,v1=0A= 521c: 01023021 addu a2,t0,v0=0A= 5220: 00c43021 addu a2,a2,a0=0A= 5224: 8e62000c lw v0,12(s3)=0A= 5228: ae6601f0 sw a2,496(s3)=0A= 522c: ae6701f4 sw a3,500(s3)=0A= 5230: 8e680230 lw t0,560(s3)=0A= 5234: 8e690234 lw t1,564(s3)=0A= 5238: 2c420002 sltiu v0,v0,2=0A= adapter->stats.tncrs +=3D E1000_READ_REG(&adapter->shared, = TNCRS);=0A= 523c: 8e640008 lw a0,8(s3)=0A= 5240: 00001021 move v0,zero=0A= __arch__swab16s(addr);=0A= }=0A= =0A= static __inline__ __const__ __u32 __fswab32(__u32 x)=0A= {=0A= 5244: 8c874034 lw a3,16436(a0)=0A= return __arch__swab32(x);=0A= 5248: 30e5ff00 andi a1,a3,0xff00=0A= 524c: 00073600 sll a2,a3,0x18=0A= 5250: 00072202 srl a0,a3,0x8=0A= 5254: 00052a00 sll a1,a1,0x8=0A= 5258: 3084ff00 andi a0,a0,0xff00=0A= 525c: 00c53025 or a2,a2,a1=0A= 5260: 00c43025 or a2,a2,a0=0A= 5264: 00073e02 srl a3,a3,0x18=0A= 5268: 00c71825 or v1,a2,a3=0A= 526c: 01233821 addu a3,t1,v1=0A= 5270: 00e3202b sltu a0,a3,v1=0A= 5274: 01023021 addu a2,t0,v0=0A= 5278: 00c43021 addu a2,a2,a0=0A= 527c: 8e62000c lw v0,12(s3)=0A= 5280: ae660230 sw a2,560(s3)=0A= 5284: ae670234 sw a3,564(s3)=0A= 5288: 8e680240 lw t0,576(s3)=0A= 528c: 8e690244 lw t1,580(s3)=0A= 5290: 2c420002 sltiu v0,v0,2=0A= adapter->stats.cexterr +=3D E1000_READ_REG(&adapter->shared, = CEXTERR);=0A= 5294: 8e640008 lw a0,8(s3)=0A= 5298: 00001021 move v0,zero=0A= __arch__swab16s(addr);=0A= }=0A= =0A= static __inline__ __const__ __u32 __fswab32(__u32 x)=0A= {=0A= 529c: 8c87403c lw a3,16444(a0)=0A= return __arch__swab32(x);=0A= 52a0: 30e5ff00 andi a1,a3,0xff00=0A= 52a4: 00073600 sll a2,a3,0x18=0A= 52a8: 00072202 srl a0,a3,0x8=0A= 52ac: 00052a00 sll a1,a1,0x8=0A= 52b0: 3084ff00 andi a0,a0,0xff00=0A= 52b4: 00c53025 or a2,a2,a1=0A= 52b8: 00c43025 or a2,a2,a0=0A= 52bc: 00073e02 srl a3,a3,0x18=0A= 52c0: 00c71825 or v1,a2,a3=0A= 52c4: 01233821 addu a3,t1,v1=0A= 52c8: 00e3202b sltu a0,a3,v1=0A= 52cc: 01023021 addu a2,t0,v0=0A= 52d0: 00c43021 addu a2,a2,a0=0A= 52d4: 8e62000c lw v0,12(s3)=0A= 52d8: ae660240 sw a2,576(s3)=0A= 52dc: ae670244 sw a3,580(s3)=0A= 52e0: 8e680398 lw t0,920(s3)=0A= 52e4: 8e69039c lw t1,924(s3)=0A= 52e8: 2c420002 sltiu v0,v0,2=0A= adapter->stats.tsctc +=3D E1000_READ_REG(&adapter->shared, = TSCTC);=0A= 52ec: 8e640008 lw a0,8(s3)=0A= 52f0: 00001021 move v0,zero=0A= __arch__swab16s(addr);=0A= }=0A= =0A= static __inline__ __const__ __u32 __fswab32(__u32 x)=0A= {=0A= 52f4: 8c8740f8 lw a3,16632(a0)=0A= return __arch__swab32(x);=0A= 52f8: 30e5ff00 andi a1,a3,0xff00=0A= 52fc: 00073600 sll a2,a3,0x18=0A= 5300: 00072202 srl a0,a3,0x8=0A= 5304: 00052a00 sll a1,a1,0x8=0A= 5308: 3084ff00 andi a0,a0,0xff00=0A= 530c: 00c53025 or a2,a2,a1=0A= 5310: 00c43025 or a2,a2,a0=0A= 5314: 00073e02 srl a3,a3,0x18=0A= 5318: 00c71825 or v1,a2,a3=0A= 531c: 01233821 addu a3,t1,v1=0A= 5320: 00e3202b sltu a0,a3,v1=0A= 5324: 01023021 addu a2,t0,v0=0A= 5328: 00c43021 addu a2,a2,a0=0A= 532c: 8e62000c lw v0,12(s3)=0A= 5330: ae660398 sw a2,920(s3)=0A= 5334: ae67039c sw a3,924(s3)=0A= 5338: 8e6803a0 lw t0,928(s3)=0A= 533c: 8e6903a4 lw t1,932(s3)=0A= 5340: 2c420002 sltiu v0,v0,2=0A= adapter->stats.tsctfc +=3D E1000_READ_REG(&adapter->shared, = TSCTFC);=0A= 5344: 8e640008 lw a0,8(s3)=0A= 5348: 00001021 move v0,zero=0A= __arch__swab16s(addr);=0A= }=0A= =0A= static __inline__ __const__ __u32 __fswab32(__u32 x)=0A= {=0A= 534c: 8c8740fc lw a3,16636(a0)=0A= return __arch__swab32(x);=0A= 5350: 30e5ff00 andi a1,a3,0xff00=0A= 5354: 00073600 sll a2,a3,0x18=0A= 5358: 00072202 srl a0,a3,0x8=0A= 535c: 00052a00 sll a1,a1,0x8=0A= 5360: 3084ff00 andi a0,a0,0xff00=0A= 5364: 00c53025 or a2,a2,a1=0A= 5368: 00c43025 or a2,a2,a0=0A= 536c: 00073e02 srl a3,a3,0x18=0A= 5370: 00c71825 or v1,a2,a3=0A= 5374: 01233821 addu a3,t1,v1=0A= 5378: 00e3202b sltu a0,a3,v1=0A= 537c: 01023021 addu a2,t0,v0=0A= 5380: 00c43021 addu a2,a2,a0=0A= 5384: 00c01021 move v0,a2=0A= 5388: 00e01821 move v1,a3=0A= 538c: ae6203a0 sw v0,928(s3)=0A= 5390: ae6303a4 sw v1,932(s3)=0A= }=0A= =0A= /* Fill out the OS statistics structure */=0A= =0A= adapter->net_stats.rx_packets =3D adapter->stats.gprc;=0A= adapter->net_stats.tx_packets =3D adapter->stats.gptc;=0A= adapter->net_stats.rx_bytes =3D adapter->stats.gorcl;=0A= adapter->net_stats.tx_bytes =3D adapter->stats.gotcl;=0A= adapter->net_stats.multicast =3D adapter->stats.mprc;=0A= adapter->net_stats.collisions =3D adapter->stats.colc;=0A= =0A= /* Rx Errors */=0A= =0A= adapter->net_stats.rx_errors =3D=0A= 5394: 8e6301dc lw v1,476(s3)=0A= 5398: 8e6201f4 lw v0,500(s3)=0A= 539c: 8e6401e4 lw a0,484(s3)=0A= 53a0: 8e65024c lw a1,588(s3)=0A= 53a4: 8e6602ec lw a2,748(s3)=0A= 53a8: 00431021 addu v0,v0,v1=0A= 53ac: 8e7201fc lw s2,508(s3)=0A= 53b0: 00441021 addu v0,v0,a0=0A= 53b4: 00451021 addu v0,v0,a1=0A= 53b8: 8e710244 lw s1,580(s3)=0A= 53bc: 8e6402ac lw a0,684(s3)=0A= 53c0: 00461021 addu v0,v0,a2=0A= adapter->stats.rxerrc + adapter->stats.crcerrs +=0A= adapter->stats.algnerrc + adapter->stats.rlec + = adapter->stats.rnbc +=0A= adapter->stats.mpc + adapter->stats.cexterr;=0A= adapter->net_stats.rx_dropped =3D adapter->stats.rnbc;=0A= adapter->net_stats.rx_length_errors =3D adapter->stats.rlec;=0A= adapter->net_stats.rx_crc_errors =3D adapter->stats.crcerrs;=0A= adapter->net_stats.rx_frame_errors =3D adapter->stats.algnerrc;=0A= adapter->net_stats.rx_fifo_errors =3D adapter->stats.mpc;=0A= adapter->net_stats.rx_missed_errors =3D adapter->stats.mpc;=0A= =0A= /* Tx Errors */=0A= =0A= adapter->net_stats.tx_errors =3D adapter->stats.ecol + = adapter->stats.latecol;=0A= 53c4: 8e6a021c lw t2,540(s3)=0A= 53c8: 8e63020c lw v1,524(s3)=0A= 53cc: 00521021 addu v0,v0,s2=0A= 53d0: 00511021 addu v0,v0,s1=0A= 53d4: 8e6502c4 lw a1,708(s3)=0A= 53d8: 8e6602cc lw a2,716(s3)=0A= 53dc: 8e6702dc lw a3,732(s3)=0A= 53e0: 8e6802bc lw t0,700(s3)=0A= 53e4: 8e690224 lw t1,548(s3)=0A= 53e8: 8e6b02ec lw t3,748(s3)=0A= 53ec: 8e6c024c lw t4,588(s3)=0A= 53f0: 8e6d01dc lw t5,476(s3)=0A= 53f4: 8e6e01e4 lw t6,484(s3)=0A= 53f8: ae640150 sw a0,336(s3)=0A= 53fc: ae620160 sw v0,352(s3)=0A= adapter->net_stats.tx_aborted_errors =3D adapter->stats.ecol;=0A= adapter->net_stats.tx_window_errors =3D adapter->stats.latecol;=0A= =0A= /* Tx Dropped needs to be maintained elsewhere */=0A= =0A= if(adapter->shared.media_type =3D=3D e1000_media_type_copper) {=0A= 5400: 8e640010 lw a0,16(s3)=0A= 5404: 8e62020c lw v0,524(s3)=0A= 5408: 02407821 move t7,s2=0A= 540c: 006a1821 addu v1,v1,t2=0A= 5410: ae630164 sw v1,356(s3)=0A= 5414: 01e08021 move s0,t7=0A= 5418: 01401821 move v1,t2=0A= 541c: ae650154 sw a1,340(s3)=0A= 5420: ae660158 sw a2,344(s3)=0A= 5424: ae67015c sw a3,348(s3)=0A= 5428: ae680170 sw t0,368(s3)=0A= 542c: ae690174 sw t1,372(s3)=0A= 5430: ae6b0168 sw t3,360(s3)=0A= 5434: ae6c0178 sw t4,376(s3)=0A= 5438: ae6d0180 sw t5,384(s3)=0A= 543c: ae6e0184 sw t6,388(s3)=0A= 5440: ae6f0188 sw t7,392(s3)=0A= 5444: ae70018c sw s0,396(s3)=0A= 5448: ae620190 sw v0,400(s3)=0A= 544c: 14800011 bnez a0,5494 =0A= 5450: ae6301a0 sw v1,416(s3)=0A= adapter->idle_errors +=3D=0A= 5454: 26700008 addiu s0,s3,8=0A= 5458: 02002021 move a0,s0=0A= 545c: 3c110000 lui s1,0x0=0A= 5460: 26310000 addiu s1,s1,0=0A= 5464: 0220f809 jalr s1=0A= 5468: 2405000a li a1,10=0A= 546c: 8e6303ac lw v1,940(s3)=0A= 5470: 304200ff andi v0,v0,0xff=0A= (e1000_read_phy_reg(&adapter->shared, PHY_1000T_STATUS)=0A= & PHY_IDLE_ERROR_COUNT_MASK);=0A= adapter->receive_errors +=3D=0A= 5474: 02002021 move a0,s0=0A= 5478: 00621821 addu v1,v1,v0=0A= 547c: ae6303ac sw v1,940(s3)=0A= 5480: 0220f809 jalr s1=0A= 5484: 24050015 li a1,21=0A= 5488: 8e6303a8 lw v1,936(s3)=0A= 548c: 00621821 addu v1,v1,v0=0A= 5490: ae6303a8 sw v1,936(s3)=0A= e1000_read_phy_reg(&adapter->shared, M88E1000_RX_ERR_CNTR);=0A= }=0A= =0A= spin_unlock_irqrestore(&adapter->stats_lock, flags);=0A= 5494: 40016000 mfc0 at,$12=0A= 5498: 32940001 andi s4,s4,0x1=0A= 549c: 34210001 ori at,at,0x1=0A= 54a0: 38210001 xori at,at,0x1=0A= 54a4: 0281a025 or s4,s4,at=0A= 54a8: 40946000 mtc0 s4,$12=0A= ...=0A= return;=0A= }=0A= 54b8: 8fbf0024 lw ra,36(sp)=0A= 54bc: 8fb40020 lw s4,32(sp)=0A= 54c0: 8fb3001c lw s3,28(sp)=0A= 54c4: 8fb20018 lw s2,24(sp)=0A= 54c8: 8fb10014 lw s1,20(sp)=0A= 54cc: 8fb00010 lw s0,16(sp)=0A= 54d0: 03e00008 jr ra=0A= 54d4: 27bd0028 addiu sp,sp,40=0A= =0A= 000054d8 :=0A= 54d8: 27bdffd0 addiu sp,sp,-48=0A= 54dc: afb10014 sw s1,20(sp)=0A= 54e0: afbf002c sw ra,44(sp)=0A= 54e4: afb60028 sw s6,40(sp)=0A= 54e8: afb50024 sw s5,36(sp)=0A= 54ec: afb40020 sw s4,32(sp)=0A= 54f0: afb3001c sw s3,28(sp)=0A= 54f4: afb20018 sw s2,24(sp)=0A= 54f8: afb00010 sw s0,16(sp)=0A= =0A= /**=0A= * e1000_irq_disable - Mask off interrupt generation on the NIC=0A= * @adapter: board private structure=0A= **/=0A= =0A= static inline void=0A= e1000_irq_disable(struct e1000_adapter *adapter)=0A= {=0A= E1000_DBG("e1000_irq_disable\n");=0A= =0A= /* Mask off all interrupts */=0A= =0A= E1000_WRITE_REG(&adapter->shared, IMC, ~0);=0A= return;=0A= }=0A= =0A= /**=0A= * e1000_irq_enable - Enable default interrupt generation settings=0A= * @adapter: board private structure=0A= **/=0A= =0A= static inline void=0A= e1000_irq_enable(struct e1000_adapter *adapter)=0A= {=0A= E1000_DBG("e1000_irq_enable\n");=0A= =0A= E1000_WRITE_REG(&adapter->shared, IMS, adapter->int_mask);=0A= return;=0A= }=0A= =0A= /**=0A= * e1000_intr - Interrupt Handler=0A= * @irq: interrupt number=0A= * @data: pointer to a network interface device structure=0A= * @pt_regs: CPU registers structure=0A= **/=0A= =0A= void=0A= e1000_intr(int irq,=0A= void *data,=0A= struct pt_regs *regs)=0A= {=0A= struct net_device *netdev =3D (struct net_device *) data;=0A= struct e1000_adapter *adapter =3D netdev->priv;=0A= 54fc: 8cb00064 lw s0,100(a1)=0A= uint32_t icr;=0A= uint loop_count =3D E1000_MAX_INTR;=0A= 5500: 24110001 li s1,1=0A= 5504: 8e02000c lw v0,12(s0)=0A= 5508: 2c420002 sltiu v0,v0,2=0A= 550c: 8e030008 lw v1,8(s0)=0A= 5510: 2402ffff li v0,-1=0A= 5514: ac6200d8 sw v0,216(v1)=0A= =0A= E1000_DBG("e1000_intr\n");=0A= =0A= e1000_irq_disable(adapter);=0A= =0A= while(loop_count > 0 && (icr =3D E1000_READ_REG(&adapter->shared, = ICR)) !=3D 0) {=0A= 5518: 3c1300ff lui s3,0xff=0A= 551c: 3c12ff00 lui s2,0xff00=0A= 5520: 24160001 li s6,1=0A= 5524: 3c150000 lui s5,0x0=0A= 5528: 26b50000 addiu s5,s5,0=0A= 552c: 3c140000 lui s4,0x0=0A= 5530: 269458dc addiu s4,s4,22748=0A= 5534: 8e07000c lw a3,12(s0)=0A= 5538: 2ce20002 sltiu v0,a3,2=0A= 553c: 8e060008 lw a2,8(s0)=0A= __arch__swab16s(addr);=0A= }=0A= =0A= static __inline__ __const__ __u32 __fswab32(__u32 x)=0A= {=0A= 5540: 8cc200c0 lw v0,192(a2)=0A= return __arch__swab32(x);=0A= 5544: 3043ff00 andi v1,v0,0xff00=0A= 5548: 00022e00 sll a1,v0,0x18=0A= 554c: 00532024 and a0,v0,s3=0A= 5550: 00031a00 sll v1,v1,0x8=0A= 5554: 00a32825 or a1,a1,v1=0A= 5558: 00042202 srl a0,a0,0x8=0A= 555c: 00521024 and v0,v0,s2=0A= 5560: 00a42825 or a1,a1,a0=0A= 5564: 00021602 srl v0,v0,0x18=0A= 5568: 00a22825 or a1,a1,v0=0A= 556c: 10a00017 beqz a1,55cc =0A= 5570: 30a2000c andi v0,a1,0xc=0A= =0A= if(icr & (E1000_ICR_RXSEQ | E1000_ICR_LSC)) {=0A= 5574: 1040000b beqz v0,55a4 =0A= 5578: 00000000 nop=0A= adapter->shared.get_link_status =3D 1;=0A= 557c: ae160058 sw s6,88(s0)=0A= {=0A= unsigned long *m =3D ((unsigned long *) addr) + (nr >> 5);=0A= unsigned long temp;=0A= =0A= __asm__ __volatile__(=0A= 5580: c202008c ll v0,140(s0)=0A= 5584: 34420008 ori v0,v0,0x8=0A= 5588: e202008c sc v0,140(s0)=0A= 558c: 1040fffc beqz v0,5580 =0A= 5590: 00000000 nop=0A= set_bit(E1000_LINK_STATUS_CHANGED, &adapter->flags);=0A= /* run the watchdog ASAP */=0A= mod_timer(&adapter->timer_id, jiffies);=0A= 5594: 3c050000 lui a1,0x0=0A= 5598: 8ca50000 lw a1,0(a1)=0A= 559c: 02a0f809 jalr s5=0A= 55a0: 26040094 addiu a0,s0,148=0A= }=0A= =0A= e1000_clean_rx_irq(adapter);=0A= 55a4: 0280f809 jalr s4=0A= 55a8: 02002021 move a0,s0=0A= e1000_clean_tx_irq(adapter);=0A= loop_count--;=0A= 55ac: 2631ffff addiu s1,s1,-1=0A= 55b0: 3c020000 lui v0,0x0=0A= 55b4: 24425624 addiu v0,v0,22052=0A= 55b8: 0040f809 jalr v0=0A= 55bc: 02002021 move a0,s0=0A= }=0A= 55c0: 1620ffdd bnez s1,5538 =0A= 55c4: 8e07000c lw a3,12(s0)=0A= 55c8: 8e060008 lw a2,8(s0)=0A= 55cc: 2ce20002 sltiu v0,a3,2=0A= __arch__swab16s(addr);=0A= }=0A= =0A= static __inline__ __const__ __u32 __fswab32(__u32 x)=0A= {=0A= 55d0: 8e0500cc lw a1,204(s0)=0A= return __arch__swab32(x);=0A= 55d4: 30a4ff00 andi a0,a1,0xff00=0A= 55d8: 00051600 sll v0,a1,0x18=0A= 55dc: 00051a02 srl v1,a1,0x8=0A= 55e0: 00042200 sll a0,a0,0x8=0A= 55e4: 00441025 or v0,v0,a0=0A= 55e8: 3063ff00 andi v1,v1,0xff00=0A= 55ec: 00431025 or v0,v0,v1=0A= 55f0: 00052e02 srl a1,a1,0x18=0A= 55f4: 00451025 or v0,v0,a1=0A= 55f8: acc200d0 sw v0,208(a2)=0A= =0A= e1000_irq_enable(adapter);=0A= =0A= return;=0A= }=0A= 55fc: 8fbf002c lw ra,44(sp)=0A= 5600: 8fb60028 lw s6,40(sp)=0A= 5604: 8fb50024 lw s5,36(sp)=0A= 5608: 8fb40020 lw s4,32(sp)=0A= 560c: 8fb3001c lw s3,28(sp)=0A= 5610: 8fb20018 lw s2,24(sp)=0A= 5614: 8fb10014 lw s1,20(sp)=0A= 5618: 8fb00010 lw s0,16(sp)=0A= 561c: 03e00008 jr ra=0A= 5620: 27bd0030 addiu sp,sp,48=0A= =0A= 00005624 :=0A= 5624: 27bdffd0 addiu sp,sp,-48=0A= 5628: afb50024 sw s5,36(sp)=0A= 562c: afb40020 sw s4,32(sp)=0A= 5630: afbf002c sw ra,44(sp)=0A= 5634: afb60028 sw s6,40(sp)=0A= 5638: afb3001c sw s3,28(sp)=0A= 563c: afb20018 sw s2,24(sp)=0A= 5640: afb10014 sw s1,20(sp)=0A= 5644: afb00010 sw s0,16(sp)=0A= 5648: 0080a021 move s4,a0=0A= =0A= /**=0A= * e1000_clean_tx_irq - Reclaim resources after transmit completes=0A= * @adapter: board private structure=0A= **/=0A= =0A= static void=0A= e1000_clean_tx_irq(struct e1000_adapter *adapter)=0A= {=0A= struct pci_dev *pdev =3D adapter->pdev;=0A= int i;=0A= =0A= struct e1000_tx_desc *tx_desc;=0A= struct net_device *netdev =3D adapter->netdev;=0A= =0A= E1000_DBG("e1000_clean_tx_irq\n");=0A= =0A= i =3D adapter->tx_ring.next_to_clean;=0A= 564c: 8e9200fc lw s2,252(s4)=0A= tx_desc =3D E1000_TX_DESC(adapter->tx_ring, i);=0A= 5650: 8e8400e4 lw a0,228(s4)=0A= =0A= while(tx_desc->upper.data & cpu_to_le32(E1000_TXD_STAT_DD)) {=0A= 5654: 3c050100 lui a1,0x100=0A= 5658: 00121900 sll v1,s2,0x4=0A= 565c: 0083a821 addu s5,a0,v1=0A= 5660: 8ea2000c lw v0,12(s5)=0A= 5664: 00451024 and v0,v0,a1=0A= 5668: 10400051 beqz v0,57b0 =0A= 566c: 8e960148 lw s6,328(s4)=0A= 5670: 269300f4 addiu s3,s4,244=0A= =0A= if(adapter->tx_ring.buffer_info[i].dma !=3D 0) {=0A= 5674: 8e860100 lw a2,256(s4)=0A= 5678: 00121040 sll v0,s2,0x1=0A= 567c: 00521021 addu v0,v0,s2=0A= 5680: 000288c0 sll s1,v0,0x3=0A= 5684: 02262021 addu a0,s1,a2=0A= 5688: 8c820008 lw v0,8(a0)=0A= 568c: 8c83000c lw v1,12(a0)=0A= 5690: 00431025 or v0,v0,v1=0A= 5694: 10400006 beqz v0,56b0 =0A= 5698: 24050001 li a1,1=0A= pci_unmap_page(pdev, adapter->tx_ring.buffer_info[i].dma,=0A= adapter->tx_ring.buffer_info[i].length,=0A= PCI_DMA_TODEVICE);=0A= adapter->tx_ring.buffer_info[i].dma =3D 0;=0A= 569c: 00001021 move v0,zero=0A= 56a0: 00001821 move v1,zero=0A= 56a4: ac820008 sw v0,8(a0)=0A= 56a8: ac83000c sw v1,12(a0)=0A= 56ac: 8e860100 lw a2,256(s4)=0A= }=0A= =0A= if(adapter->tx_ring.buffer_info[i].skb !=3D NULL) {=0A= 56b0: 02261021 addu v0,s1,a2=0A= 56b4: 8c460000 lw a2,0(v0)=0A= 56b8: 10c00026 beqz a2,5754 =0A= 56bc: 24c40070 addiu a0,a2,112=0A= extern __inline__ int atomic_sub_return(int i, atomic_t * v)=0A= {=0A= unsigned long temp, result;=0A= =0A= __asm__ __volatile__(=0A= 56c0: c0830000 ll v1,0(a0)=0A= 56c4: 00651023 subu v0,v1,a1=0A= 56c8: e0820000 sc v0,0(a0)=0A= 56cc: 1040fffc beqz v0,56c0 =0A= 56d0: 00651023 subu v0,v1,a1=0A= * is executing from interrupt context.=0A= */=0A= static inline void dev_kfree_skb_irq(struct sk_buff *skb)=0A= {=0A= if (atomic_dec_and_test(&skb->users)) {=0A= 56d4: 5440001d bnezl v0,574c =0A= 56d8: 8e820100 lw v0,256(s4)=0A= int cpu =3Dsmp_processor_id();=0A= unsigned long flags;=0A= =0A= local_irq_save(flags);=0A= 56dc: 40106000 mfc0 s0,$12=0A= 56e0: 00000000 nop=0A= 56e4: 36010001 ori at,s0,0x1=0A= 56e8: 38210001 xori at,at,0x1=0A= 56ec: 40816000 mtc0 at,$12=0A= 56f0: 00000040 sll zero,zero,0x1=0A= 56f4: 00000040 sll zero,zero,0x1=0A= 56f8: 00000040 sll zero,zero,0x1=0A= skb->next =3D softnet_data[cpu].completion_queue;=0A= 56fc: 3c030000 lui v1,0x0=0A= 5700: 8c630020 lw v1,32(v1)=0A= softnet_data[cpu].completion_queue =3D skb;=0A= cpu_raise_softirq(cpu, NET_TX_SOFTIRQ);=0A= 5704: 00002021 move a0,zero=0A= 5708: acc30000 sw v1,0(a2)=0A= 570c: 3c020000 lui v0,0x0=0A= 5710: 24420000 addiu v0,v0,0=0A= 5714: 3c010000 lui at,0x0=0A= 5718: ac260020 sw a2,32(at)=0A= 571c: 0040f809 jalr v0=0A= 5720: 24050001 li a1,1=0A= local_irq_restore(flags);=0A= 5724: 40016000 mfc0 at,$12=0A= 5728: 32100001 andi s0,s0,0x1=0A= 572c: 34210001 ori at,at,0x1=0A= 5730: 38210001 xori at,at,0x1=0A= 5734: 02018025 or s0,s0,at=0A= 5738: 40906000 mtc0 s0,$12=0A= ...=0A= dev_kfree_skb_irq(adapter->tx_ring.buffer_info[i].skb);=0A= adapter->tx_ring.buffer_info[i].skb =3D NULL;=0A= 5748: 8e820100 lw v0,256(s4)=0A= 574c: 02221021 addu v0,s1,v0=0A= 5750: ac400000 sw zero,0(v0)=0A= * Atomically adds @i to @v. Note that the guaranteed useful range=0A= * of an atomic_t is only 24 bits.=0A= */=0A= extern __inline__ void atomic_add(int i, atomic_t * v)=0A= {=0A= 5754: 24020001 li v0,1=0A= unsigned long temp;=0A= =0A= __asm__ __volatile__(=0A= 5758: c2640000 ll a0,0(s3)=0A= 575c: 00822021 addu a0,a0,v0=0A= 5760: e2640000 sc a0,0(s3)=0A= 5764: 1080fffc beqz a0,5758 =0A= 5768: 00000000 nop=0A= }=0A= =0A= atomic_inc(&adapter->tx_ring.unused);=0A= i =3D (i + 1) % adapter->tx_ring.count;=0A= 576c: 8e8300f0 lw v1,240(s4)=0A= 5770: 26420001 addiu v0,s2,1=0A= =0A= tx_desc->upper.data =3D 0;=0A= tx_desc =3D E1000_TX_DESC(adapter->tx_ring, i);=0A= }=0A= 5774: 3c060100 lui a2,0x100=0A= 5778: 0043001b divu zero,v0,v1=0A= 577c: 50600001 beqzl v1,5784 =0A= 5780: 0007000d break 0x7=0A= 5784: aea0000c sw zero,12(s5)=0A= 5788: 8e8400e4 lw a0,228(s4)=0A= 578c: 00002810 mfhi a1=0A= 5790: 00a09021 move s2,a1=0A= 5794: 00000000 nop=0A= 5798: 00121900 sll v1,s2,0x4=0A= 579c: 0083a821 addu s5,a0,v1=0A= 57a0: 8ea2000c lw v0,12(s5)=0A= 57a4: 00461024 and v0,v0,a2=0A= 57a8: 5440ffb3 bnezl v0,5678 =0A= 57ac: 8e860100 lw a2,256(s4)=0A= =0A= adapter->tx_ring.next_to_clean =3D i;=0A= =0A= if(adapter->tx_ring.next_to_clean =3D=3D = adapter->tx_ring.next_to_use)=0A= 57b0: 8e8200f8 lw v0,248(s4)=0A= 57b4: 16420004 bne s2,v0,57c8 =0A= 57b8: ae9200fc sw s2,252(s4)=0A= atomic_set(&adapter->tx_timeout, 0);=0A= 57bc: ae80010c sw zero,268(s4)=0A= 57c0: 080015f5 j 57d4 =0A= 57c4: 26c5002c addiu a1,s6,44=0A= else=0A= atomic_set(&adapter->tx_timeout, 3);=0A= 57c8: 24020003 li v0,3=0A= 57cc: ae82010c sw v0,268(s4)=0A= * @nr: bit number to test=0A= * @addr: Address to start counting from=0A= */=0A= extern __inline__ int test_bit(int nr, volatile void *addr)=0A= {=0A= 57d0: 26c5002c addiu a1,s6,44=0A= return ((1UL << (nr & 31)) & (((const unsigned int *) addr)[nr >> 5])) = !=3D 0;=0A= 57d4: 8ca20000 lw v0,0(a1)=0A= 57d8: 30420001 andi v0,v0,0x1=0A= =0A= if(netif_queue_stopped(netdev) &&=0A= (atomic_read(&adapter->tx_ring.unused) >=0A= (adapter->tx_ring.count * 3 / 4))) {=0A= 57dc: 10400036 beqz v0,58b8 =0A= 57e0: 8fbf002c lw ra,44(sp)=0A= 57e4: 8e8200f0 lw v0,240(s4)=0A= 57e8: 8e8400f4 lw a0,244(s4)=0A= 57ec: 00021840 sll v1,v0,0x1=0A= 57f0: 00621821 addu v1,v1,v0=0A= 57f4: 00031882 srl v1,v1,0x2=0A= 57f8: 0064182b sltu v1,v1,a0=0A= 57fc: 5060002f beqzl v1,58bc =0A= 5800: 8fb60028 lw s6,40(sp)=0A= {=0A= unsigned long *m =3D ((unsigned long *) addr) + (nr >> 5);=0A= unsigned long temp, res;=0A= =0A= __asm__ __volatile__(=0A= 5804: 24020001 li v0,1=0A= 5808: c0a40000 ll a0,0(a1)=0A= 580c: 00821825 or v1,a0,v0=0A= 5810: 00621826 xor v1,v1,v0=0A= 5814: e0a30000 sc v1,0(a1)=0A= 5818: 1060fffb beqz v1,5808 =0A= 581c: 00821824 and v1,a0,v0=0A= }=0A= =0A= static inline void netif_wake_queue(struct net_device *dev)=0A= {=0A= if (test_and_clear_bit(__LINK_STATE_XOFF, &dev->state))=0A= 5820: 50600025 beqzl v1,58b8 =0A= 5824: 8fbf002c lw ra,44(sp)=0A= {=0A= unsigned long *m =3D ((unsigned long *) addr) + (nr >> 5);=0A= unsigned long temp, res;=0A= =0A= __asm__ __volatile__(=0A= 5828: 24020008 li v0,8=0A= 582c: c0a40000 ll a0,0(a1)=0A= 5830: 00821825 or v1,a0,v0=0A= 5834: e0a30000 sc v1,0(a1)=0A= 5838: 1060fffc beqz v1,582c =0A= 583c: 00821824 and v1,a0,v0=0A= #define HAVE_NETIF_QUEUE=0A= =0A= static inline void __netif_schedule(struct net_device *dev)=0A= {=0A= if (!test_and_set_bit(__LINK_STATE_SCHED, &dev->state)) {=0A= 5840: 5460001d bnezl v1,58b8 =0A= 5844: 8fbf002c lw ra,44(sp)=0A= unsigned long flags;=0A= int cpu =3D smp_processor_id();=0A= =0A= local_irq_save(flags);=0A= 5848: 40106000 mfc0 s0,$12=0A= 584c: 00000000 nop=0A= 5850: 36010001 ori at,s0,0x1=0A= 5854: 38210001 xori at,at,0x1=0A= 5858: 40816000 mtc0 at,$12=0A= 585c: 00000040 sll zero,zero,0x1=0A= 5860: 00000040 sll zero,zero,0x1=0A= 5864: 00000040 sll zero,zero,0x1=0A= dev->next_sched =3D softnet_data[cpu].output_queue;=0A= 5868: 3c030000 lui v1,0x0=0A= 586c: 8c63001c lw v1,28(v1)=0A= softnet_data[cpu].output_queue =3D dev;=0A= cpu_raise_softirq(cpu, NET_TX_SOFTIRQ);=0A= 5870: 00002021 move a0,zero=0A= 5874: aec30038 sw v1,56(s6)=0A= 5878: 3c020000 lui v0,0x0=0A= 587c: 24420000 addiu v0,v0,0=0A= 5880: 3c010000 lui at,0x0=0A= 5884: ac36001c sw s6,28(at)=0A= 5888: 0040f809 jalr v0=0A= 588c: 24050001 li a1,1=0A= local_irq_restore(flags);=0A= 5890: 40016000 mfc0 at,$12=0A= 5894: 32100001 andi s0,s0,0x1=0A= 5898: 34210001 ori at,at,0x1=0A= 589c: 38210001 xori at,at,0x1=0A= 58a0: 02018025 or s0,s0,at=0A= 58a4: 40906000 mtc0 s0,$12=0A= ...=0A= =0A= #ifdef IANS=0A= if((adapter->iANSdata->iANS_status =3D=3D IANS_COMMUNICATION_UP) = &&=0A= (adapter->iANSdata->reporting_mode =3D=3D = IANS_STATUS_REPORTING_ON))=0A= if(ans_notify)=0A= ans_notify(netdev, IANS_IND_XMIT_QUEUE_READY);=0A= #endif=0A= netif_wake_queue(netdev);=0A= }=0A= =0A= return;=0A= }=0A= 58b4: 8fbf002c lw ra,44(sp)=0A= 58b8: 8fb60028 lw s6,40(sp)=0A= 58bc: 8fb50024 lw s5,36(sp)=0A= 58c0: 8fb40020 lw s4,32(sp)=0A= 58c4: 8fb3001c lw s3,28(sp)=0A= 58c8: 8fb20018 lw s2,24(sp)=0A= 58cc: 8fb10014 lw s1,20(sp)=0A= 58d0: 8fb00010 lw s0,16(sp)=0A= 58d4: 03e00008 jr ra=0A= 58d8: 27bd0030 addiu sp,sp,48=0A= =0A= 000058dc :=0A= 58dc: 27bdffc0 addiu sp,sp,-64=0A= 58e0: afb60030 sw s6,48(sp)=0A= 58e4: afb30024 sw s3,36(sp)=0A= 58e8: afbf003c sw ra,60(sp)=0A= 58ec: afbe0038 sw s8,56(sp)=0A= 58f0: afb70034 sw s7,52(sp)=0A= 58f4: afb5002c sw s5,44(sp)=0A= 58f8: afb40028 sw s4,40(sp)=0A= 58fc: afb20020 sw s2,32(sp)=0A= 5900: afb1001c sw s1,28(sp)=0A= 5904: afb00018 sw s0,24(sp)=0A= 5908: 0080b021 move s6,a0=0A= =0A= /**=0A= * e1000_clean_rx_irq - Send received data up the network stack,=0A= * @adapter: board private structure=0A= **/=0A= =0A= static void=0A= e1000_clean_rx_irq(struct e1000_adapter *adapter)=0A= {=0A= struct net_device *netdev =3D adapter->netdev;=0A= struct pci_dev *pdev =3D adapter->pdev;=0A= struct e1000_rx_desc *rx_desc;=0A= int i;=0A= uint32_t length;=0A= struct sk_buff *skb;=0A= uint8_t last_byte;=0A= unsigned long flags;=0A= =0A= E1000_DBG("e1000_clean_rx_irq\n");=0A= =0A= i =3D adapter->rx_ring.next_to_clean;=0A= 590c: 8ed50128 lw s5,296(s6)=0A= 5910: 8ec30148 lw v1,328(s6)=0A= rx_desc =3D E1000_RX_DESC(adapter->rx_ring, i);=0A= 5914: 8ec20110 lw v0,272(s6)=0A= 5918: afa30010 sw v1,16(sp)=0A= 591c: 00151900 sll v1,s5,0x4=0A= 5920: 00439821 addu s3,v0,v1=0A= =0A= while(rx_desc->status & E1000_RXD_STAT_DD) {=0A= 5924: 9267000c lbu a3,12(s3)=0A= 5928: 30e20001 andi v0,a3,0x1=0A= 592c: 10400120 beqz v0,5db0 =0A= 5930: 26d40120 addiu s4,s6,288=0A= pci_unmap_single(pdev, adapter->rx_ring.buffer_info[i].dma,=0A= adapter->rx_ring.buffer_info[i].length,=0A= PCI_DMA_FROMDEVICE);=0A= =0A= skb =3D adapter->rx_ring.buffer_info[i].skb;=0A= 5934: 96640008 lhu a0,8(s3)=0A= 5938: 8ec5012c lw a1,300(s6)=0A= 593c: 0015f040 sll s8,s5,0x1=0A= 5940: 03d51021 addu v0,s8,s5=0A= 5944: 0002b8c0 sll s7,v0,0x3=0A= =0A= =0A= static __inline__ __const__ __u16 __fswab16(__u16 x)=0A= {=0A= return __arch__swab16(x);=0A= 5948: 00041a02 srl v1,a0,0x8=0A= 594c: 00042200 sll a0,a0,0x8=0A= 5950: 00832025 or a0,a0,v1=0A= 5954: 02e52821 addu a1,s7,a1=0A= length =3D le16_to_cpu(rx_desc->length);=0A= =0A= if(!(rx_desc->status & E1000_RXD_STAT_EOP)) {=0A= 5958: 30e20002 andi v0,a3,0x2=0A= 595c: 8cb10000 lw s1,0(a1)=0A= 5960: 1440003d bnez v0,5a58 =0A= 5964: 3092ffff andi s2,a0,0xffff=0A= return result;=0A= }=0A= =0A= extern __inline__ int atomic_sub_return(int i, atomic_t * v)=0A= {=0A= 5968: 24120001 li s2,1=0A= 596c: 26220070 addiu v0,s1,112=0A= unsigned long temp, result;=0A= =0A= __asm__ __volatile__(=0A= 5970: c0440000 ll a0,0(v0)=0A= 5974: 00921823 subu v1,a0,s2=0A= 5978: e0430000 sc v1,0(v0)=0A= 597c: 1060fffc beqz v1,5970 =0A= 5980: 00921823 subu v1,a0,s2=0A= * is executing from interrupt context.=0A= */=0A= static inline void dev_kfree_skb_irq(struct sk_buff *skb)=0A= {=0A= if (atomic_dec_and_test(&skb->users)) {=0A= 5984: 1460001d bnez v1,59fc =0A= 5988: 02602021 move a0,s3=0A= int cpu =3Dsmp_processor_id();=0A= unsigned long flags;=0A= =0A= local_irq_save(flags);=0A= 598c: 40106000 mfc0 s0,$12=0A= 5990: 00000000 nop=0A= 5994: 36010001 ori at,s0,0x1=0A= 5998: 38210001 xori at,at,0x1=0A= 599c: 40816000 mtc0 at,$12=0A= 59a0: 00000040 sll zero,zero,0x1=0A= 59a4: 00000040 sll zero,zero,0x1=0A= 59a8: 00000040 sll zero,zero,0x1=0A= skb->next =3D softnet_data[cpu].completion_queue;=0A= 59ac: 3c030000 lui v1,0x0=0A= 59b0: 8c630020 lw v1,32(v1)=0A= softnet_data[cpu].completion_queue =3D skb;=0A= cpu_raise_softirq(cpu, NET_TX_SOFTIRQ);=0A= 59b4: 00002021 move a0,zero=0A= 59b8: ae230000 sw v1,0(s1)=0A= 59bc: 3c020000 lui v0,0x0=0A= 59c0: 24420000 addiu v0,v0,0=0A= 59c4: 3c010000 lui at,0x0=0A= 59c8: ac310020 sw s1,32(at)=0A= 59cc: 0040f809 jalr v0=0A= 59d0: 24050001 li a1,1=0A= local_irq_restore(flags);=0A= 59d4: 40016000 mfc0 at,$12=0A= 59d8: 32100001 andi s0,s0,0x1=0A= 59dc: 34210001 ori at,at,0x1=0A= 59e0: 38210001 xori at,at,0x1=0A= 59e4: 02018025 or s0,s0,at=0A= 59e8: 40906000 mtc0 s0,$12=0A= ...=0A= =0A= /* All receives must fit into a single buffer */=0A= =0A= E1000_DBG("Receive packet consumed multiple buffers\n");=0A= =0A= dev_kfree_skb_irq(skb);=0A= memset(rx_desc, 0, 16);=0A= 59f8: 02602021 move a0,s3=0A= 59fc: 00002821 move a1,zero=0A= 5a00: 3c020000 lui v0,0x0=0A= 5a04: 24420000 addiu v0,v0,0=0A= 5a08: 0040f809 jalr v0=0A= 5a0c: 24060010 li a2,16=0A= ...=0A= mb();=0A= adapter->rx_ring.buffer_info[i].skb =3D NULL;=0A= 5a30: 8ec2012c lw v0,300(s6)=0A= 5a34: 02e21021 addu v0,s7,v0=0A= 5a38: ac400000 sw zero,0(v0)=0A= extern __inline__ void atomic_add(int i, atomic_t * v)=0A= {=0A= unsigned long temp;=0A= =0A= __asm__ __volatile__(=0A= 5a3c: c2830000 ll v1,0(s4)=0A= 5a40: 00721821 addu v1,v1,s2=0A= 5a44: e2830000 sc v1,0(s4)=0A= 5a48: 1060fffc beqz v1,5a3c =0A= 5a4c: 00000000 nop=0A= =0A= atomic_inc(&adapter->rx_ring.unused);=0A= =0A= i =3D (i + 1) % adapter->rx_ring.count;=0A= =0A= rx_desc =3D E1000_RX_DESC(adapter->rx_ring, i);=0A= continue;=0A= 5a50: 0800175b j 5d6c =0A= 5a54: 8ec6011c lw a2,284(s6)=0A= }=0A= =0A= if(rx_desc->errors & E1000_RXD_ERR_FRAME_ERR_MASK) {=0A= 5a58: 9262000d lbu v0,13(s3)=0A= 5a5c: 30440097 andi a0,v0,0x97=0A= 5a60: 5080007b beqzl a0,5c50 =0A= 5a64: 8e220060 lw v0,96(s1)=0A= =0A= last_byte =3D *(skb->data + length - 1);=0A= 5a68: 8e220080 lw v0,128(s1)=0A= =0A= if(TBI_ACCEPT=0A= 5a6c: 8ec30060 lw v1,96(s6)=0A= 5a70: 00521021 addu v0,v0,s2=0A= 5a74: 10600037 beqz v1,5b54 =0A= 5a78: 9042ffff lbu v0,-1(v0)=0A= 5a7c: 38830001 xori v1,a0,0x1=0A= 5a80: 3842000f xori v0,v0,0xf=0A= 5a84: 2c630001 sltiu v1,v1,1=0A= 5a88: 2c420001 sltiu v0,v0,1=0A= 5a8c: 00621824 and v1,v1,v0=0A= 5a90: 50600031 beqzl v1,5b58 =0A= 5a94: 24120001 li s2,1=0A= 5a98: 9662000e lhu v0,14(s3)=0A= 5a9c: 1440000b bnez v0,5acc =0A= 5aa0: 8ec2003c lw v0,60(s6)=0A= 5aa4: 2e430041 sltiu v1,s2,65=0A= 5aa8: 38630001 xori v1,v1,0x1=0A= 5aac: 24420001 addiu v0,v0,1=0A= 5ab0: 0052102b sltu v0,v0,s2=0A= 5ab4: 38420001 xori v0,v0,0x1=0A= 5ab8: 00431024 and v0,v0,v1=0A= 5abc: 1440000b bnez v0,5aec =0A= 5ac0: 00000000 nop=0A= 5ac4: 080016d6 j 5b58 =0A= 5ac8: 24120001 li s2,1=0A= 5acc: 2e43003d sltiu v1,s2,61=0A= 5ad0: 38630001 xori v1,v1,0x1=0A= 5ad4: 2442fffd addiu v0,v0,-3=0A= 5ad8: 0052102b sltu v0,v0,s2=0A= 5adc: 38420001 xori v0,v0,0x1=0A= 5ae0: 00431024 and v0,v0,v1=0A= 5ae4: 5040001c beqzl v0,5b58 =0A= 5ae8: 24120001 li s2,1=0A= (&adapter->shared, rx_desc->special, rx_desc->errors, = length,=0A= last_byte)) {=0A= spin_lock_irqsave(&adapter->stats_lock, flags);=0A= 5aec: 40106000 mfc0 s0,$12=0A= 5af0: 00000000 nop=0A= 5af4: 36010001 ori at,s0,0x1=0A= 5af8: 38210001 xori at,at,0x1=0A= 5afc: 40816000 mtc0 at,$12=0A= 5b00: 00000040 sll zero,zero,0x1=0A= 5b04: 00000040 sll zero,zero,0x1=0A= 5b08: 00000040 sll zero,zero,0x1=0A= e1000_tbi_adjust_stats(&adapter->shared, &adapter->stats,=0A= 5b0c: 26c40008 addiu a0,s6,8=0A= 5b10: 8e270080 lw a3,128(s1)=0A= 5b14: 26c501d8 addiu a1,s6,472=0A= 5b18: 3c020000 lui v0,0x0=0A= 5b1c: 24420000 addiu v0,v0,0=0A= 5b20: 0040f809 jalr v0=0A= 5b24: 02403021 move a2,s2=0A= length, skb->data);=0A= spin_unlock_irqrestore(&adapter->stats_lock, flags);=0A= 5b28: 40016000 mfc0 at,$12=0A= 5b2c: 32100001 andi s0,s0,0x1=0A= 5b30: 34210001 ori at,at,0x1=0A= 5b34: 38210001 xori at,at,0x1=0A= 5b38: 02018025 or s0,s0,at=0A= 5b3c: 40906000 mtc0 s0,$12=0A= ...=0A= length--;=0A= } else {=0A= 5b4c: 08001713 j 5c4c =0A= 5b50: 2652ffff addiu s2,s2,-1=0A= return result;=0A= }=0A= =0A= extern __inline__ int atomic_sub_return(int i, atomic_t * v)=0A= {=0A= 5b54: 24120001 li s2,1=0A= 5b58: 26220070 addiu v0,s1,112=0A= unsigned long temp, result;=0A= =0A= __asm__ __volatile__(=0A= 5b5c: c0440000 ll a0,0(v0)=0A= 5b60: 00921823 subu v1,a0,s2=0A= 5b64: e0430000 sc v1,0(v0)=0A= 5b68: 1060fffc beqz v1,5b5c =0A= 5b6c: 00921823 subu v1,a0,s2=0A= * is executing from interrupt context.=0A= */=0A= static inline void dev_kfree_skb_irq(struct sk_buff *skb)=0A= {=0A= if (atomic_dec_and_test(&skb->users)) {=0A= 5b70: 1460001d bnez v1,5be8 =0A= 5b74: 02602021 move a0,s3=0A= int cpu =3Dsmp_processor_id();=0A= unsigned long flags;=0A= =0A= local_irq_save(flags);=0A= 5b78: 40106000 mfc0 s0,$12=0A= 5b7c: 00000000 nop=0A= 5b80: 36010001 ori at,s0,0x1=0A= 5b84: 38210001 xori at,at,0x1=0A= 5b88: 40816000 mtc0 at,$12=0A= 5b8c: 00000040 sll zero,zero,0x1=0A= 5b90: 00000040 sll zero,zero,0x1=0A= 5b94: 00000040 sll zero,zero,0x1=0A= skb->next =3D softnet_data[cpu].completion_queue;=0A= 5b98: 3c030000 lui v1,0x0=0A= 5b9c: 8c630020 lw v1,32(v1)=0A= softnet_data[cpu].completion_queue =3D skb;=0A= cpu_raise_softirq(cpu, NET_TX_SOFTIRQ);=0A= 5ba0: 00002021 move a0,zero=0A= 5ba4: ae230000 sw v1,0(s1)=0A= 5ba8: 3c020000 lui v0,0x0=0A= 5bac: 24420000 addiu v0,v0,0=0A= 5bb0: 3c010000 lui at,0x0=0A= 5bb4: ac310020 sw s1,32(at)=0A= 5bb8: 0040f809 jalr v0=0A= 5bbc: 24050001 li a1,1=0A= local_irq_restore(flags);=0A= 5bc0: 40016000 mfc0 at,$12=0A= 5bc4: 32100001 andi s0,s0,0x1=0A= 5bc8: 34210001 ori at,at,0x1=0A= 5bcc: 38210001 xori at,at,0x1=0A= 5bd0: 02018025 or s0,s0,at=0A= 5bd4: 40906000 mtc0 s0,$12=0A= ...=0A= =0A= E1000_DBG("Receive Errors Reported by Hardware\n");=0A= =0A= dev_kfree_skb_irq(skb);=0A= memset(rx_desc, 0, 16);=0A= 5be4: 02602021 move a0,s3=0A= 5be8: 00002821 move a1,zero=0A= 5bec: 3c020000 lui v0,0x0=0A= 5bf0: 24420000 addiu v0,v0,0=0A= 5bf4: 0040f809 jalr v0=0A= 5bf8: 24060010 li a2,16=0A= ...=0A= mb();=0A= adapter->rx_ring.buffer_info[i].skb =3D NULL;=0A= 5c1c: 8ec3012c lw v1,300(s6)=0A= 5c20: 03d51021 addu v0,s8,s5=0A= 5c24: 000210c0 sll v0,v0,0x3=0A= 5c28: 00431021 addu v0,v0,v1=0A= 5c2c: ac400000 sw zero,0(v0)=0A= extern __inline__ void atomic_add(int i, atomic_t * v)=0A= {=0A= unsigned long temp;=0A= =0A= __asm__ __volatile__(=0A= 5c30: c2830000 ll v1,0(s4)=0A= 5c34: 00721821 addu v1,v1,s2=0A= 5c38: e2830000 sc v1,0(s4)=0A= 5c3c: 1060fffc beqz v1,5c30 =0A= 5c40: 00000000 nop=0A= =0A= atomic_inc(&adapter->rx_ring.unused);=0A= i =3D (i + 1) % adapter->rx_ring.count;=0A= =0A= rx_desc =3D E1000_RX_DESC(adapter->rx_ring, i);=0A= continue;=0A= 5c44: 0800175b j 5d6c =0A= 5c48: 8ec6011c lw a2,284(s6)=0A= }=0A= =0A= static inline int skb_is_nonlinear(const struct sk_buff *skb)=0A= {=0A= return skb->data_len;=0A= 5c4c: 8e220060 lw v0,96(s1)=0A= }=0A= =0A= static inline int skb_headlen(const struct sk_buff *skb)=0A= {=0A= return skb->len - skb->data_len;=0A= }=0A= =0A= #define SKB_PAGE_ASSERT(skb) do { if (skb_shinfo(skb)->nr_frags) BUG(); = } while (0)=0A= #define SKB_FRAG_ASSERT(skb) do { if (skb_shinfo(skb)->frag_list) BUG(); = } while (0)=0A= #define SKB_LINEAR_ASSERT(skb) do { if (skb_is_nonlinear(skb)) BUG(); } = while (0)=0A= =0A= /*=0A= * Add data to an sk_buff=0A= */=0A= =0A= static inline unsigned char *__skb_put(struct sk_buff *skb, unsigned int = len)=0A= {=0A= unsigned char *tmp=3Dskb->tail;=0A= SKB_LINEAR_ASSERT(skb);=0A= skb->tail+=3Dlen;=0A= skb->len+=3Dlen;=0A= return tmp;=0A= }=0A= =0A= /**=0A= * skb_put - add data to a buffer=0A= * @skb: buffer to use =0A= * @len: amount of data to add=0A= *=0A= * This function extends the used data area of the buffer. If this would=0A= * exceed the total buffer size the kernel will panic. A pointer to the=0A= * first byte of the extra data is returned.=0A= */=0A= =0A= static inline unsigned char *skb_put(struct sk_buff *skb, unsigned int = len)=0A= {=0A= unsigned char *tmp=3Dskb->tail;=0A= SKB_LINEAR_ASSERT(skb);=0A= 5c50: 1040000a beqz v0,5c7c =0A= 5c54: 2650fffc addiu s0,s2,-4=0A= 5c58: 3c040000 lui a0,0x0=0A= 5c5c: 24840000 addiu a0,a0,0=0A= 5c60: 3c050000 lui a1,0x0=0A= 5c64: 24a500b4 addiu a1,a1,180=0A= 5c68: 3c020000 lui v0,0x0=0A= 5c6c: 24420000 addiu v0,v0,0=0A= 5c70: 0040f809 jalr v0=0A= 5c74: 24060315 li a2,789=0A= 5c78: ac000000 sw zero,0(zero)=0A= skb->tail+=3Dlen;=0A= 5c7c: 8e220084 lw v0,132(s1)=0A= skb->len+=3Dlen;=0A= 5c80: 8e23005c lw v1,92(s1)=0A= if(skb->tail>skb->end) {=0A= 5c84: 8e240088 lw a0,136(s1)=0A= 5c88: 00501021 addu v0,v0,s0=0A= 5c8c: 00701821 addu v1,v1,s0=0A= 5c90: 0082202b sltu a0,a0,v0=0A= 5c94: ae23005c sw v1,92(s1)=0A= 5c98: 10800008 beqz a0,5cbc =0A= 5c9c: ae220084 sw v0,132(s1)=0A= skb_over_panic(skb, len, current_text_addr());=0A= 5ca0: 02002821 move a1,s0=0A= 5ca4: 3c060000 lui a2,0x0=0A= 5ca8: 24c65ca0 addiu a2,a2,23712=0A= 5cac: 3c020000 lui v0,0x0=0A= 5cb0: 24420000 addiu v0,v0,0=0A= 5cb4: 0040f809 jalr v0=0A= 5cb8: 02202021 move a0,s1=0A= }=0A= }=0A= =0A= /* Good Receive */=0A= skb_put(skb, length - CRC_LENGTH);=0A= =0A= /* Adjust socket buffer accounting to only cover the ethernet = frame=0A= * Not what the stack intends, but there exist TCP problems that=0A= * break NFS for network interfaces that need 2k receive buffers=0A= */=0A= skb->truesize =3D skb->len;=0A= 5cbc: 8e22005c lw v0,92(s1)=0A= =0A= /* Receive Checksum Offload */=0A= e1000_rx_checksum(adapter, rx_desc, skb);=0A= 5cc0: 02203021 move a2,s1=0A= 5cc4: 02c02021 move a0,s6=0A= 5cc8: ae220078 sw v0,120(s1)=0A= 5ccc: 3c020000 lui v0,0x0=0A= 5cd0: 244274ec addiu v0,v0,29932=0A= 5cd4: 0040f809 jalr v0=0A= 5cd8: 02602821 move a1,s3=0A= =0A= #ifdef IANS=0A= if(adapter->iANSdata->iANS_status =3D=3D IANS_COMMUNICATION_UP) {=0A= if(bd_ans_os_Receive(adapter, rx_desc, skb) =3D=3D = BD_ANS_FAILURE)=0A= dev_kfree_skb_irq(skb);=0A= else=0A= netif_rx(skb);=0A= } else {=0A= skb->protocol =3D eth_type_trans(skb, netdev);=0A= netif_rx(skb);=0A= }=0A= #else=0A= skb->protocol =3D eth_type_trans(skb, netdev);=0A= 5cdc: 8fa50010 lw a1,16(sp)=0A= 5ce0: 3c020000 lui v0,0x0=0A= 5ce4: 24420000 addiu v0,v0,0=0A= 5ce8: 0040f809 jalr v0=0A= 5cec: 02202021 move a0,s1=0A= 5cf0: a6220074 sh v0,116(s1)=0A= netif_rx(skb);=0A= 5cf4: 3c020000 lui v0,0x0=0A= 5cf8: 24420000 addiu v0,v0,0=0A= 5cfc: 0040f809 jalr v0=0A= 5d00: 02202021 move a0,s1=0A= #endif=0A= memset(rx_desc, 0, 16);=0A= 5d04: 02602021 move a0,s3=0A= 5d08: 00002821 move a1,zero=0A= 5d0c: 3c020000 lui v0,0x0=0A= 5d10: 24420000 addiu v0,v0,0=0A= 5d14: 0040f809 jalr v0=0A= 5d18: 24060010 li a2,16=0A= ...=0A= mb();=0A= adapter->rx_ring.buffer_info[i].skb =3D NULL;=0A= 5d3c: 8ec2012c lw v0,300(s6)=0A= 5d40: 03d51821 addu v1,s8,s5=0A= 5d44: 000318c0 sll v1,v1,0x3=0A= 5d48: 00621821 addu v1,v1,v0=0A= 5d4c: ac600000 sw zero,0(v1)=0A= * Atomically adds @i to @v. Note that the guaranteed useful range=0A= * of an atomic_t is only 24 bits.=0A= */=0A= extern __inline__ void atomic_add(int i, atomic_t * v)=0A= {=0A= 5d50: 24020001 li v0,1=0A= unsigned long temp;=0A= =0A= __asm__ __volatile__(=0A= 5d54: c2830000 ll v1,0(s4)=0A= 5d58: 00621821 addu v1,v1,v0=0A= 5d5c: e2830000 sc v1,0(s4)=0A= 5d60: 1060fffc beqz v1,5d54 =0A= 5d64: 00000000 nop=0A= =0A= atomic_inc(&adapter->rx_ring.unused);=0A= =0A= i =3D (i + 1) % adapter->rx_ring.count;=0A= 5d68: 8ec6011c lw a2,284(s6)=0A= 5d6c: 26a20001 addiu v0,s5,1=0A= 5d70: 0046001b divu zero,v0,a2=0A= 5d74: 50c00001 beqzl a2,5d7c =0A= 5d78: 0007000d break 0x7=0A= =0A= rx_desc =3D E1000_RX_DESC(adapter->rx_ring, i);=0A= 5d7c: 8ec40110 lw a0,272(s6)=0A= 5d80: 00001810 mfhi v1=0A= 5d84: 0060a821 move s5,v1=0A= 5d88: 00000000 nop=0A= 5d8c: 00151100 sll v0,s5,0x4=0A= 5d90: 00829821 addu s3,a0,v0=0A= }=0A= 5d94: 9262000c lbu v0,12(s3)=0A= 5d98: 00403821 move a3,v0=0A= 5d9c: 30e30001 andi v1,a3,0x1=0A= 5da0: 5460fee5 bnezl v1,5938 =0A= 5da4: 96640008 lhu a0,8(s3)=0A= 5da8: 0800176d j 5db4 =0A= 5dac: 00000000 nop=0A= 5db0: 8ec6011c lw a2,284(s6)=0A= =0A= /* if the Rx ring is less than 3/4 full, allocate more sk_buffs */=0A= =0A= if(atomic_read(&adapter->rx_ring.unused) > (adapter->rx_ring.count / = 4)) {=0A= 5db4: 8ec30120 lw v1,288(s6)=0A= 5db8: 00061082 srl v0,a2,0x2=0A= 5dbc: 0043102b sltu v0,v0,v1=0A= 5dc0: 5040000f beqzl v0,5e00 =0A= 5dc4: aed50128 sw s5,296(s6)=0A= =0A= extern void FASTCALL(__tasklet_schedule(struct tasklet_struct *t));=0A= =0A= static inline void tasklet_schedule(struct tasklet_struct *t)=0A= {=0A= 5dc8: 26c500d0 addiu a1,s6,208=0A= {=0A= unsigned long *m =3D ((unsigned long *) addr) + (nr >> 5);=0A= unsigned long temp, res;=0A= =0A= __asm__ __volatile__(=0A= 5dcc: 24020001 li v0,1=0A= 5dd0: c2c400d4 ll a0,212(s6)=0A= 5dd4: 00821825 or v1,a0,v0=0A= 5dd8: e2c300d4 sc v1,212(s6)=0A= 5ddc: 1060fffc beqz v1,5dd0 =0A= 5de0: 00821824 and v1,a0,v0=0A= extern void FASTCALL(__tasklet_schedule(struct tasklet_struct *t));=0A= =0A= static inline void tasklet_schedule(struct tasklet_struct *t)=0A= {=0A= if (!test_and_set_bit(TASKLET_STATE_SCHED, &t->state))=0A= 5de4: 54600006 bnezl v1,5e00 =0A= 5de8: aed50128 sw s5,296(s6)=0A= __tasklet_schedule(t);=0A= 5dec: 3c020000 lui v0,0x0=0A= 5df0: 24420000 addiu v0,v0,0=0A= 5df4: 0040f809 jalr v0=0A= 5df8: 00a02021 move a0,a1=0A= tasklet_schedule(&adapter->rx_fill_tasklet);=0A= }=0A= adapter->rx_ring.next_to_clean =3D i;=0A= 5dfc: aed50128 sw s5,296(s6)=0A= =0A= return;=0A= }=0A= 5e00: 8fbf003c lw ra,60(sp)=0A= 5e04: 8fbe0038 lw s8,56(sp)=0A= 5e08: 8fb70034 lw s7,52(sp)=0A= 5e0c: 8fb60030 lw s6,48(sp)=0A= 5e10: 8fb5002c lw s5,44(sp)=0A= 5e14: 8fb40028 lw s4,40(sp)=0A= 5e18: 8fb30024 lw s3,36(sp)=0A= 5e1c: 8fb20020 lw s2,32(sp)=0A= 5e20: 8fb1001c lw s1,28(sp)=0A= 5e24: 8fb00018 lw s0,24(sp)=0A= 5e28: 03e00008 jr ra=0A= 5e2c: 27bd0040 addiu sp,sp,64=0A= =0A= 00005e30 :=0A= 5e30: 27bdffb8 addiu sp,sp,-72=0A= 5e34: afb20028 sw s2,40(sp)=0A= 5e38: 00809021 move s2,a0=0A= 5e3c: afb40030 sw s4,48(sp)=0A= 5e40: afbf0044 sw ra,68(sp)=0A= 5e44: afbe0040 sw s8,64(sp)=0A= 5e48: afb7003c sw s7,60(sp)=0A= 5e4c: afb60038 sw s6,56(sp)=0A= 5e50: afb50034 sw s5,52(sp)=0A= 5e54: afb3002c sw s3,44(sp)=0A= 5e58: afb10024 sw s1,36(sp)=0A= 5e5c: afb00020 sw s0,32(sp)=0A= * @nr: bit number to test=0A= * @addr: Address to start counting from=0A= */=0A= extern __inline__ int test_bit(int nr, volatile void *addr)=0A= {=0A= 5e60: 2654008c addiu s4,s2,140=0A= return ((1UL << (nr & 31)) & (((const unsigned int *) addr)[nr >> 5])) = !=3D 0;=0A= 5e64: 8e820000 lw v0,0(s4)=0A= =0A= /**=0A= * e1000_alloc_rx_buffers - Replace used receive buffers=0A= * @data: address of board private structure=0A= **/=0A= =0A= static void=0A= e1000_alloc_rx_buffers(unsigned long data)=0A= {=0A= struct e1000_adapter *adapter =3D (struct e1000_adapter *) data;=0A= struct net_device *netdev =3D adapter->netdev;=0A= 5e68: 8e430148 lw v1,328(s2)=0A= * @addr: Address to start counting from=0A= */=0A= extern __inline__ int test_bit(int nr, volatile void *addr)=0A= {=0A= return ((1UL << (nr & 31)) & (((const unsigned int *) addr)[nr >> 5])) = !=3D 0;=0A= 5e6c: 30420001 andi v0,v0,0x1=0A= struct pci_dev *pdev =3D adapter->pdev;=0A= struct e1000_rx_desc *rx_desc;=0A= struct sk_buff *skb;=0A= int i;=0A= int reserve_len;=0A= =0A= E1000_DBG("e1000_alloc_rx_buffers\n");=0A= =0A= /* kernel 2.4.7 seems to be broken with respect to tasklet locking */=0A= if(!spin_trylock(&adapter->rx_fill_lock))=0A= return;=0A= =0A= if(!test_bit(E1000_BOARD_OPEN, &adapter->flags)) {=0A= 5e70: 104000a9 beqz v0,6118 =0A= 5e74: afa30010 sw v1,16(sp)=0A= spin_unlock(&adapter->rx_fill_lock);=0A= return;=0A= }=0A= =0A= #ifdef IANS=0A= reserve_len =3D E1000_ROUNDUP2(BD_ANS_INFO_SIZE, 16) + 2;=0A= #else=0A= reserve_len =3D 2;=0A= #endif=0A= =0A= i =3D adapter->rx_ring.next_to_use;=0A= 5e78: 8e530124 lw s3,292(s2)=0A= =0A= while(adapter->rx_ring.buffer_info[i].skb =3D=3D NULL) {=0A= 5e7c: 8e42012c lw v0,300(s2)=0A= 5e80: 00131840 sll v1,s3,0x1=0A= 5e84: 00731821 addu v1,v1,s3=0A= 5e88: 000318c0 sll v1,v1,0x3=0A= 5e8c: 00621821 addu v1,v1,v0=0A= 5e90: 8c640000 lw a0,0(v1)=0A= 5e94: 548000a0 bnezl a0,6118 =0A= 5e98: ae530124 sw s3,292(s2)=0A= 5e9c: 3c0d00ff lui t5,0xff=0A= 5ea0: 3c1eff00 lui s8,0xff00=0A= 5ea4: 24170001 li s7,1=0A= 5ea8: 26550120 addiu s5,s2,288=0A= rx_desc =3D E1000_RX_DESC(adapter->rx_ring, i);=0A= =0A= skb =3D alloc_skb(adapter->rx_buffer_len + reserve_len, = GFP_ATOMIC);=0A= 5eac: 8e4400b8 lw a0,184(s2)=0A= 5eb0: 8e460110 lw a2,272(s2)=0A= 5eb4: 00131900 sll v1,s3,0x4=0A= 5eb8: 24050020 li a1,32=0A= 5ebc: afad0018 sw t5,24(sp)=0A= 5ec0: 24840002 addiu a0,a0,2=0A= 5ec4: 3c020000 lui v0,0x0=0A= 5ec8: 24420000 addiu v0,v0,0=0A= 5ecc: 0040f809 jalr v0=0A= 5ed0: 00c3b021 addu s6,a2,v1=0A= 5ed4: 00402821 move a1,v0=0A= =0A= if(skb =3D=3D NULL) {=0A= 5ed8: 14a00008 bnez a1,5efc =0A= 5edc: 8fad0018 lw t5,24(sp)=0A= {=0A= unsigned long *m =3D ((unsigned long *) addr) + (nr >> 5);=0A= unsigned long temp;=0A= =0A= __asm__ __volatile__(=0A= 5ee0: c2820000 ll v0,0(s4)=0A= 5ee4: 34420002 ori v0,v0,0x2=0A= 5ee8: e2820000 sc v0,0(s4)=0A= 5eec: 1040fffc beqz v0,5ee0 =0A= 5ef0: 00000000 nop=0A= /* Alloc Failed; If we could not allocate a=0A= * skb during this schedule. Wait for a while before=0A= * tasklet to allocate skb is called again.=0A= */=0A= set_bit(E1000_RX_REFILL, &adapter->flags);=0A= break;=0A= 5ef4: 08001846 j 6118 =0A= 5ef8: ae530124 sw s3,292(s2)=0A= */=0A= =0A= static inline void skb_reserve(struct sk_buff *skb, unsigned int len)=0A= {=0A= skb->data+=3Dlen;=0A= 5efc: 8ca20080 lw v0,128(a1)=0A= skb->tail+=3Dlen;=0A= 5f00: 8ca30084 lw v1,132(a1)=0A= }=0A= =0A= /* Make buffer alignment 2 beyond a 16 byte boundary=0A= * this will result in a 16 byte aligned IP header after=0A= * the 14 byte MAC header is removed=0A= */=0A= skb_reserve(skb, reserve_len);=0A= =0A= skb->dev =3D netdev;=0A= 5f04: 8fa40010 lw a0,16(sp)=0A= */=0A= =0A= static inline void skb_reserve(struct sk_buff *skb, unsigned int len)=0A= {=0A= skb->data+=3Dlen;=0A= 5f08: 24420002 addiu v0,v0,2=0A= skb->tail+=3Dlen;=0A= 5f0c: 24630002 addiu v1,v1,2=0A= 5f10: aca20080 sw v0,128(a1)=0A= 5f14: aca40018 sw a0,24(a1)=0A= =0A= static inline void skb_reserve(struct sk_buff *skb, unsigned int len)=0A= {=0A= skb->data+=3Dlen;=0A= skb->tail+=3Dlen;=0A= 5f18: aca30084 sw v1,132(a1)=0A= =0A= adapter->rx_ring.buffer_info[i].skb =3D skb;=0A= 5f1c: 8e44012c lw a0,300(s2)=0A= 5f20: 00138040 sll s0,s3,0x1=0A= 5f24: 02138021 addu s0,s0,s3=0A= 5f28: 001080c0 sll s0,s0,0x3=0A= 5f2c: 02042021 addu a0,s0,a0=0A= 5f30: ac850000 sw a1,0(a0)=0A= adapter->rx_ring.buffer_info[i].length =3D = adapter->rx_buffer_len;=0A= 5f34: 8e42012c lw v0,300(s2)=0A= 5f38: 8e4300b8 lw v1,184(s2)=0A= 5f3c: 02021021 addu v0,s0,v0=0A= 5f40: ac430010 sw v1,16(v0)=0A= * until either pci_unmap_single or pci_dma_sync_single is performed.=0A= */=0A= static inline dma_addr_t pci_map_single(struct pci_dev *hwdev, void *ptr,=0A= size_t size, int direction)=0A= {=0A= 5f44: 8cb10080 lw s1,128(a1)=0A= 5f48: 8e4500b8 lw a1,184(s2)=0A= if (direction =3D=3D PCI_DMA_NONE)=0A= BUG();=0A= =0A= #ifdef CONFIG_NONCOHERENT_IO=0A= dma_cache_wback_inv((unsigned long)ptr, size);=0A= 5f4c: 3c020000 lui v0,0x0=0A= 5f50: 8c420000 lw v0,0(v0)=0A= 5f54: 02202021 move a0,s1=0A= 5f58: 0040f809 jalr v0=0A= 5f5c: afad0018 sw t5,24(sp)=0A= adapter->rx_ring.buffer_info[i].dma =3D=0A= pci_map_single(pdev, skb->data, adapter->rx_buffer_len,=0A= PCI_DMA_FROMDEVICE);=0A= 5f60: 8e45012c lw a1,300(s2)=0A= * IO bus memory addresses are also 1:1 with the physical address=0A= */=0A= static inline unsigned long virt_to_bus(volatile void * address)=0A= {=0A= return PHYSADDR(address);=0A= 5f64: 3c041fff lui a0,0x1fff=0A= 5f68: 3484ffff ori a0,a0,0xffff=0A= 5f6c: 02241824 and v1,s1,a0=0A= 5f70: 02052821 addu a1,s0,a1=0A= 5f74: 00001021 move v0,zero=0A= 5f78: aca20008 sw v0,8(a1)=0A= 5f7c: aca3000c sw v1,12(a1)=0A= 5f80: 8e48012c lw t0,300(s2)=0A= }=0A= =0A= static __inline__ __const__ __u32 __fswab32(__u32 x)=0A= {=0A= return __arch__swab32(x);=0A= 5f84: 8fad0018 lw t5,24(sp)=0A= }=0A= static __inline__ __u32 __swab32p(__u32 *x)=0A= {=0A= return __arch__swab32p(x);=0A= }=0A= static __inline__ void __swab32s(__u32 *addr)=0A= {=0A= __arch__swab32s(addr);=0A= }=0A= =0A= #ifdef __BYTEORDER_HAS_U64__=0A= static __inline__ __const__ __u64 __fswab64(__u64 x)=0A= {=0A= # ifdef __SWAB_64_THRU_32__=0A= __u32 h =3D x >> 32;=0A= __u32 l =3D x & ((1ULL<<32)-1);=0A= return (((__u64)__swab32(l)) << 32) | ((__u64)(__swab32(h)));=0A= 5f88: 00002021 move a0,zero=0A= 5f8c: 02088021 addu s0,s0,t0=0A= static __inline__ __const__ __u64 __fswab64(__u64 x)=0A= {=0A= # ifdef __SWAB_64_THRU_32__=0A= __u32 h =3D x >> 32;=0A= __u32 l =3D x & ((1ULL<<32)-1);=0A= 5f90: 8e03000c lw v1,12(s0)=0A= 5f94: 8e080008 lw t0,8(s0)=0A= return (((__u64)__swab32(l)) << 32) | ((__u64)(__swab32(h)));=0A= 5f98: 00003021 move a2,zero=0A= 5f9c: 3062ff00 andi v0,v1,0xff00=0A= 5fa0: 00021200 sll v0,v0,0x8=0A= 5fa4: 00036600 sll t4,v1,0x18=0A= 5fa8: 006d5024 and t2,v1,t5=0A= 5fac: 310bff00 andi t3,t0,0xff00=0A= 5fb0: 01826025 or t4,t4,v0=0A= 5fb4: 00084e00 sll t1,t0,0x18=0A= 5fb8: 010d1024 and v0,t0,t5=0A= 5fbc: 000a5202 srl t2,t2,0x8=0A= 5fc0: 007e1824 and v1,v1,s8=0A= 5fc4: 000b5a00 sll t3,t3,0x8=0A= 5fc8: 00021202 srl v0,v0,0x8=0A= 5fcc: 018a6025 or t4,t4,t2=0A= 5fd0: 012b4825 or t1,t1,t3=0A= 5fd4: 00031e02 srl v1,v1,0x18=0A= 5fd8: 011e4024 and t0,t0,s8=0A= 5fdc: 01224825 or t1,t1,v0=0A= 5fe0: 01832825 or a1,t4,v1=0A= 5fe4: 00084602 srl t0,t0,0x18=0A= 5fe8: 01283825 or a3,t1,t0=0A= 5fec: 00052000 sll a0,a1,0x0=0A= 5ff0: 00002821 move a1,zero=0A= 5ff4: 00862025 or a0,a0,a2=0A= 5ff8: 00a72825 or a1,a1,a3=0A= =0A= rx_desc->buffer_addr =3D = cpu_to_le64(adapter->rx_ring.buffer_info[i].dma);=0A= 5ffc: aec40000 sw a0,0(s6)=0A= 6000: aec50004 sw a1,4(s6)=0A= 6004: 8e42000c lw v0,12(s2)=0A= 6008: 2c420002 sltiu v0,v0,2=0A= 600c: 1440000e bnez v0,6048 =0A= 6010: 3262ff00 andi v0,s3,0xff00=0A= }=0A= =0A= static __inline__ __const__ __u32 __fswab32(__u32 x)=0A= {=0A= return __arch__swab32(x);=0A= 6014: 00021200 sll v0,v0,0x8=0A= 6018: 00131e00 sll v1,s3,0x18=0A= 601c: 026d2024 and a0,s3,t5=0A= 6020: 00621825 or v1,v1,v0=0A= 6024: 00042202 srl a0,a0,0x8=0A= 6028: 8e450008 lw a1,8(s2)=0A= }=0A= =0A= static __inline__ __const__ __u32 __fswab32(__u32 x)=0A= {=0A= return __arch__swab32(x);=0A= 602c: 027e1024 and v0,s3,s8=0A= 6030: 00641825 or v1,v1,a0=0A= 6034: 00021602 srl v0,v0,0x18=0A= 6038: 00621825 or v1,v1,v0=0A= =0A= /* move tail */=0A= E1000_WRITE_REG(&adapter->shared, RDT, i);=0A= 603c: aca32818 sw v1,10264(a1)=0A= 6040: 0800181d j 6074 =0A= 6044: 00000000 nop=0A= }=0A= =0A= static __inline__ __const__ __u32 __fswab32(__u32 x)=0A= {=0A= return __arch__swab32(x);=0A= 6048: 00021200 sll v0,v0,0x8=0A= 604c: 00131e00 sll v1,s3,0x18=0A= 6050: 026d2024 and a0,s3,t5=0A= 6054: 00621825 or v1,v1,v0=0A= 6058: 00042202 srl a0,a0,0x8=0A= 605c: 8e450008 lw a1,8(s2)=0A= }=0A= =0A= static __inline__ __const__ __u32 __fswab32(__u32 x)=0A= {=0A= return __arch__swab32(x);=0A= 6060: 027e1024 and v0,s3,s8=0A= 6064: 00641825 or v1,v1,a0=0A= 6068: 00021602 srl v0,v0,0x18=0A= 606c: 00621825 or v1,v1,v0=0A= 6070: aca30128 sw v1,296(a1)=0A= extern __inline__ void atomic_sub(int i, atomic_t * v)=0A= {=0A= unsigned long temp;=0A= =0A= __asm__ __volatile__(=0A= 6074: c2a20000 ll v0,0(s5)=0A= 6078: 00571023 subu v0,v0,s7=0A= 607c: e2a20000 sc v0,0(s5)=0A= 6080: 1040fffc beqz v0,6074 =0A= 6084: 00000000 nop=0A= =0A= atomic_dec(&adapter->rx_ring.unused);=0A= =0A= i =3D (i + 1) % adapter->rx_ring.count;=0A= 6088: 8e43011c lw v1,284(s2)=0A= 608c: 26640001 addiu a0,s3,1=0A= {=0A= unsigned long *m =3D ((unsigned long *) addr) + (nr >> 5);=0A= unsigned long temp, res;=0A= =0A= __asm__ __volatile__(=0A= 6090: 24020002 li v0,2=0A= 6094: 0083001b divu zero,a0,v1=0A= 6098: 50600001 beqzl v1,60a0 =0A= 609c: 0007000d break 0x7=0A= 60a0: 00008010 mfhi s0=0A= 60a4: 02009821 move s3,s0=0A= 60a8: 00000000 nop=0A= {=0A= unsigned long *m =3D ((unsigned long *) addr) + (nr >> 5);=0A= unsigned long temp, res;=0A= =0A= __asm__ __volatile__(=0A= 60ac: c2840000 ll a0,0(s4)=0A= 60b0: 00821825 or v1,a0,v0=0A= 60b4: 00621826 xor v1,v1,v0=0A= 60b8: e2830000 sc v1,0(s4)=0A= 60bc: 1060fffb beqz v1,60ac =0A= 60c0: 00821824 and v1,a0,v0=0A= =0A= if(test_and_clear_bit(E1000_RX_REFILL, &adapter->flags)) {=0A= 60c4: 5060000c beqzl v1,60f8 =0A= 60c8: 8e42012c lw v0,300(s2)=0A= /* Trigger Soft Interrupt */=0A= E1000_WRITE_REG(&adapter->shared, ICS, E1000_ICS_RXT0);=0A= 60cc: 8e42000c lw v0,12(s2)=0A= 60d0: 2c420002 sltiu v0,v0,2=0A= 60d4: 14400005 bnez v0,60ec =0A= 60d8: 8e420008 lw v0,8(s2)=0A= 60dc: 3c038000 lui v1,0x8000=0A= 60e0: ac4300c8 sw v1,200(v0)=0A= 60e4: 0800183e j 60f8 =0A= 60e8: 8e42012c lw v0,300(s2)=0A= 60ec: 3c048000 lui a0,0x8000=0A= 60f0: ac4400c8 sw a0,200(v0)=0A= }=0A= }=0A= 60f4: 8e42012c lw v0,300(s2)=0A= 60f8: 00101840 sll v1,s0,0x1=0A= 60fc: 00701821 addu v1,v1,s0=0A= 6100: 000318c0 sll v1,v1,0x3=0A= 6104: 00621821 addu v1,v1,v0=0A= 6108: 8c640000 lw a0,0(v1)=0A= 610c: 5080ff68 beqzl a0,5eb0 =0A= 6110: 8e4400b8 lw a0,184(s2)=0A= =0A= adapter->rx_ring.next_to_use =3D i;=0A= 6114: ae530124 sw s3,292(s2)=0A= =0A= spin_unlock(&adapter->rx_fill_lock);=0A= return;=0A= }=0A= 6118: 8fbf0044 lw ra,68(sp)=0A= 611c: 8fbe0040 lw s8,64(sp)=0A= 6120: 8fb7003c lw s7,60(sp)=0A= 6124: 8fb60038 lw s6,56(sp)=0A= 6128: 8fb50034 lw s5,52(sp)=0A= 612c: 8fb40030 lw s4,48(sp)=0A= 6130: 8fb3002c lw s3,44(sp)=0A= 6134: 8fb20028 lw s2,40(sp)=0A= 6138: 8fb10024 lw s1,36(sp)=0A= 613c: 8fb00020 lw s0,32(sp)=0A= 6140: 03e00008 jr ra=0A= 6144: 27bd0048 addiu sp,sp,72=0A= =0A= 00006148 :=0A= 6148: 27bdffe8 addiu sp,sp,-24=0A= =0A= /**=0A= * e1000_ioctl - =0A= * @netdev:=0A= * @ifreq:=0A= * @cmd:=0A= **/=0A= =0A= int=0A= e1000_ioctl(struct net_device *netdev,=0A= struct ifreq *ifr,=0A= int cmd)=0A= {=0A= #ifdef IANS=0A= IANS_BD_PARAM_HEADER *header;=0A= #endif=0A= =0A= E1000_DBG("e1000_do_ioctl\n");=0A= =0A= switch (cmd) {=0A= 614c: 34028946 li v0,0x8946=0A= 6150: afbf0010 sw ra,16(sp)=0A= =0A= #ifdef IANS=0A= case IANS_BASE_SIOC:=0A= header =3D (IANS_BD_PARAM_HEADER *) ifr->ifr_data;=0A= if((header->Opcode !=3D IANS_OP_EXT_GET_STATUS) &&=0A= (!capable(CAP_NET_ADMIN)))=0A= return -EPERM;=0A= return bd_ans_os_Ioctl(netdev, ifr, cmd);=0A= break;=0A= #endif=0A= =0A= #ifdef IDIAG=0A= case IDIAG_PRO_BASE_SIOC:=0A= if(!capable(CAP_NET_ADMIN))=0A= return -EPERM;=0A= =0A= #ifdef DIAG_DEBUG=0A= printk("Entering diagnostics\n");=0A= #endif=0A= e1000_diag_ioctl(netdev, ifr);=0A= break;=0A= #endif /* IDIAG */=0A= =0A= #ifdef SIOCETHTOOL=0A= case SIOCETHTOOL:=0A= =0A= return e1000_ethtool_ioctl(netdev, ifr);=0A= 6154: 3c090000 lui t1,0x0=0A= 6158: 25296dd8 addiu t1,t1,28120=0A= 615c: 340389f2 li v1,0x89f2=0A= 6160: 00804021 move t0,a0=0A= 6164: 10c20013 beq a2,v0,61b4 =0A= 6168: 00a03821 move a3,a1=0A= 616c: 14c30018 bne a2,v1,61d0 =0A= 6170: 2402ff86 li v0,-122=0A= =0A= static inline int capable(int cap)=0A= {=0A= #if 1 /* ok now */=0A= if (cap_raised(current->cap_effective, cap))=0A= 6174: 8f8301d4 lw v1,468(gp)=0A= 6178: 30631000 andi v1,v1,0x1000=0A= #else=0A= if (cap_is_fs_cap(cap) ? current->fsuid =3D=3D 0 : current->euid =3D=3D = 0)=0A= #endif=0A= {=0A= current->flags |=3D PF_SUPERPRIV;=0A= return 1;=0A= 617c: 24060001 li a2,1=0A= 6180: 3c070000 lui a3,0x0=0A= 6184: 24e70000 addiu a3,a3,0=0A= =0A= static inline int capable(int cap)=0A= {=0A= #if 1 /* ok now */=0A= if (cap_raised(current->cap_effective, cap))=0A= 6188: 10600005 beqz v1,61a0 =0A= 618c: 2402ffff li v0,-1=0A= #else=0A= if (cap_is_fs_cap(cap) ? current->fsuid =3D=3D 0 : current->euid =3D=3D = 0)=0A= #endif=0A= {=0A= current->flags |=3D PF_SUPERPRIV;=0A= 6190: 8f830004 lw v1,4(gp)=0A= 6194: 34630100 ori v1,v1,0x100=0A= return 1;=0A= 6198: 08001869 j 61a4 =0A= 619c: af830004 sw v1,4(gp)=0A= }=0A= return 0;=0A= 61a0: 00003021 move a2,zero=0A= 61a4: 14c00007 bnez a2,61c4 =0A= 61a8: 8fbf0010 lw ra,16(sp)=0A= 61ac: 08001875 j 61d4 =0A= 61b0: 00000000 nop=0A= 61b4: 0120f809 jalr t1=0A= 61b8: 00000000 nop=0A= 61bc: 08001875 j 61d4 =0A= 61c0: 8fbf0010 lw ra,16(sp)=0A= 61c4: 00e0f809 jalr a3=0A= 61c8: 00000000 nop=0A= =0A= break;=0A= #endif=0A= =0A= default:=0A= return -EOPNOTSUPP;=0A= }=0A= =0A= return 0;=0A= 61cc: 00001021 move v0,zero=0A= }=0A= 61d0: 8fbf0010 lw ra,16(sp)=0A= 61d4: 03e00008 jr ra=0A= 61d8: 27bd0018 addiu sp,sp,24=0A= =0A= 000061dc :=0A= 61dc: 27bdffe0 addiu sp,sp,-32=0A= 61e0: afb20018 sw s2,24(sp)=0A= 61e4: afbf001c sw ra,28(sp)=0A= 61e8: afb10014 sw s1,20(sp)=0A= 61ec: afb00010 sw s0,16(sp)=0A= 61f0: 00809021 move s2,a0=0A= =0A= /**=0A= * e1000_rx_checksum - Receive Checksum Offload for 82543=0A= * @adapter: board private structure=0A= * @rx_desc: receive descriptor=0A= * @sk_buff: socket buffer with received data=0A= **/=0A= =0A= static inline void=0A= e1000_rx_checksum(struct e1000_adapter *adapter,=0A= struct e1000_rx_desc *rx_desc,=0A= struct sk_buff *skb)=0A= {=0A= /* 82543 or newer only */=0A= if((adapter->shared.mac_type < e1000_82543) ||=0A= /* Ignore Checksum bit is set */=0A= (rx_desc->status & E1000_RXD_STAT_IXSM) ||=0A= /* TCP Checksum has not been calculated */=0A= (!(rx_desc->status & E1000_RXD_STAT_TCPCS))) {=0A= =0A= skb->ip_summed =3D CHECKSUM_NONE;=0A= return;=0A= }=0A= =0A= /* At this point we know the hardware did the TCP checksum */=0A= /* now look at the TCP checksum error bit */=0A= if(rx_desc->errors & E1000_RXD_ERR_TCPE) {=0A= /* let the stack verify checksum errors */=0A= skb->ip_summed =3D CHECKSUM_NONE;=0A= adapter->XsumRXError++;=0A= } else {=0A= /* TCP checksum is good */=0A= skb->ip_summed =3D CHECKSUM_UNNECESSARY;=0A= adapter->XsumRXGood++;=0A= }=0A= =0A= return;=0A= }=0A= =0A= void=0A= e1000_hibernate_adapter(struct net_device *netdev)=0A= {=0A= uint32_t icr;=0A= struct e1000_adapter *adapter =3D netdev->priv;=0A= 61f4: 8e500064 lw s0,100(s2)=0A= 61f8: 8e02000c lw v0,12(s0)=0A= 61fc: 2c420002 sltiu v0,v0,2=0A= 6200: 8e030008 lw v1,8(s0)=0A= 6204: 2402ffff li v0,-1=0A= 6208: ac6200d8 sw v0,216(v1)=0A= {=0A= unsigned long *m =3D ((unsigned long *) addr) + (nr >> 5);=0A= unsigned long temp;=0A= =0A= __asm__ __volatile__(=0A= 620c: c242002c ll v0,44(s2)=0A= 6210: 34420001 ori v0,v0,0x1=0A= 6214: e242002c sc v0,44(s2)=0A= 6218: 1040fffc beqz v0,620c =0A= 621c: 00000000 nop=0A= =0A= e1000_irq_disable(adapter);=0A= netif_stop_queue(netdev);=0A= adapter->shared.adapter_stopped =3D 0;=0A= e1000_adapter_stop(&adapter->shared);=0A= 6220: 26110008 addiu s1,s0,8=0A= 6224: ae000064 sw zero,100(s0)=0A= 6228: 3c030000 lui v1,0x0=0A= 622c: 24630000 addiu v1,v1,0=0A= 6230: 0060f809 jalr v1=0A= 6234: 02202021 move a0,s1=0A= * @addr: Address to start counting from=0A= */=0A= extern __inline__ int test_bit(int nr, volatile void *addr)=0A= {=0A= return ((1UL << (nr & 31)) & (((const unsigned int *) addr)[nr >> 5])) = !=3D 0;=0A= 6238: 8e02008c lw v0,140(s0)=0A= 623c: 30420001 andi v0,v0,0x1=0A= =0A= if(test_bit(E1000_BOARD_OPEN, &adapter->flags)) {=0A= 6240: 10400021 beqz v0,62c8 =0A= 6244: 24030001 li v1,1=0A= * Atomically adds @i to @v. Note that the guaranteed useful range=0A= * of an atomic_t is only 24 bits.=0A= */=0A= extern __inline__ void atomic_add(int i, atomic_t * v)=0A= {=0A= 6248: 260200d8 addiu v0,s0,216=0A= unsigned long temp;=0A= =0A= __asm__ __volatile__(=0A= 624c: c0440000 ll a0,0(v0)=0A= 6250: 00832021 addu a0,a0,v1=0A= 6254: e0440000 sc a0,0(v0)=0A= 6258: 1080fffc beqz a0,624c =0A= 625c: 00000000 nop=0A= =0A= /* Disable tasklet only when interface is opened. */=0A= tasklet_disable(&adapter->rx_fill_tasklet);=0A= =0A= /* clean out old buffers */=0A= e1000_clean_rx_ring(adapter);=0A= 6260: 3c020000 lui v0,0x0=0A= 6264: 244228d8 addiu v0,v0,10456=0A= 6268: 0040f809 jalr v0=0A= 626c: 02002021 move a0,s0=0A= e1000_clean_tx_ring(adapter);=0A= 6270: 3c020000 lui v0,0x0=0A= 6274: 24422720 addiu v0,v0,10016=0A= 6278: 0040f809 jalr v0=0A= 627c: 02002021 move a0,s0=0A= =0A= /* Delete watchdog timer */=0A= del_timer(&adapter->timer_id);=0A= 6280: 3c020000 lui v0,0x0=0A= 6284: 24420000 addiu v0,v0,0=0A= 6288: 0040f809 jalr v0=0A= 628c: 26040094 addiu a0,s0,148=0A= 6290: 8e03000c lw v1,12(s0)=0A= 6294: 2c630002 sltiu v1,v1,2=0A= 6298: 8e230000 lw v1,0(s1)=0A= 629c: 2402ffff li v0,-1=0A= 62a0: ac6200d8 sw v0,216(v1)=0A= =0A= /* Unhook irq */=0A= e1000_irq_disable(adapter);=0A= 62a4: 8e02000c lw v0,12(s0)=0A= 62a8: 2c420002 sltiu v0,v0,2=0A= icr =3D E1000_READ_REG(&adapter->shared, ICR);=0A= 62ac: 8e020008 lw v0,8(s0)=0A= __arch__swab16s(addr);=0A= }=0A= =0A= static __inline__ __const__ __u32 __fswab32(__u32 x)=0A= {=0A= 62b0: 8c4300c0 lw v1,192(v0)=0A= free_irq(netdev->irq, netdev);=0A= 62b4: 8e440024 lw a0,36(s2)=0A= 62b8: 3c020000 lui v0,0x0=0A= 62bc: 24420000 addiu v0,v0,0=0A= 62c0: 0040f809 jalr v0=0A= 62c4: 02402821 move a1,s2=0A= }=0A= }=0A= 62c8: 8fbf001c lw ra,28(sp)=0A= 62cc: 8fb20018 lw s2,24(sp)=0A= 62d0: 8fb10014 lw s1,20(sp)=0A= 62d4: 8fb00010 lw s0,16(sp)=0A= 62d8: 03e00008 jr ra=0A= 62dc: 27bd0020 addiu sp,sp,32=0A= =0A= 000062e0 :=0A= 62e0: 27bdffd8 addiu sp,sp,-40=0A= 62e4: afb20020 sw s2,32(sp)=0A= 62e8: afb1001c sw s1,28(sp)=0A= 62ec: afbf0024 sw ra,36(sp)=0A= 62f0: afb00018 sw s0,24(sp)=0A= 62f4: 00809021 move s2,a0=0A= =0A= void=0A= e1000_wakeup_adapter(struct net_device *netdev)=0A= {=0A= uint32_t icr;=0A= struct e1000_adapter *adapter =3D netdev->priv;=0A= 62f8: 8e500064 lw s0,100(s2)=0A= =0A= adapter->shared.adapter_stopped =3D 0;=0A= e1000_adapter_stop(&adapter->shared);=0A= 62fc: 3c030000 lui v1,0x0=0A= 6300: 24630000 addiu v1,v1,0=0A= 6304: 26110008 addiu s1,s0,8=0A= 6308: 02202021 move a0,s1=0A= 630c: 0060f809 jalr v1=0A= 6310: ae000064 sw zero,100(s0)=0A= adapter->shared.adapter_stopped =3D 0;=0A= adapter->shared.fc =3D adapter->shared.original_fc;=0A= 6314: 8e020030 lw v0,48(s0)=0A= 6318: ae000064 sw zero,100(s0)=0A= 631c: ae020018 sw v0,24(s0)=0A= =0A= if(!e1000_init_hw(&adapter->shared))=0A= 6320: 3c020000 lui v0,0x0=0A= 6324: 24420000 addiu v0,v0,0=0A= 6328: 0040f809 jalr v0=0A= 632c: 02202021 move a0,s1=0A= 6330: 54400008 bnezl v0,6354 =0A= 6334: 8e02008c lw v0,140(s0)=0A= printk("Hardware Init Failed at wakeup\n");=0A= 6338: 3c040000 lui a0,0x0=0A= 633c: 24840db0 addiu a0,a0,3504=0A= 6340: 3c020000 lui v0,0x0=0A= 6344: 24420000 addiu v0,v0,0=0A= 6348: 0040f809 jalr v0=0A= 634c: 00000000 nop=0A= * @addr: Address to start counting from=0A= */=0A= extern __inline__ int test_bit(int nr, volatile void *addr)=0A= {=0A= return ((1UL << (nr & 31)) & (((const unsigned int *) addr)[nr >> 5])) = !=3D 0;=0A= 6350: 8e02008c lw v0,140(s0)=0A= 6354: 30420001 andi v0,v0,0x1=0A= =0A= if(test_bit(E1000_BOARD_OPEN, &adapter->flags)) {=0A= 6358: 10400059 beqz v0,64c0 =0A= 635c: 8fbf0024 lw ra,36(sp)=0A= =0A= /* Setup Rctl */=0A= e1000_setup_rctl(adapter);=0A= 6360: 3c020000 lui v0,0x0=0A= 6364: 24422308 addiu v0,v0,8968=0A= 6368: 0040f809 jalr v0=0A= 636c: 02002021 move a0,s0=0A= e1000_configure_rx(adapter);=0A= 6370: 3c020000 lui v0,0x0=0A= 6374: 244223a8 addiu v0,v0,9128=0A= 6378: 0040f809 jalr v0=0A= 637c: 02002021 move a0,s0=0A= e1000_alloc_rx_buffers((unsigned long) adapter);=0A= 6380: 3c020000 lui v0,0x0=0A= 6384: 24425e30 addiu v0,v0,24112=0A= 6388: 0040f809 jalr v0=0A= 638c: 02002021 move a0,s0=0A= e1000_set_multi(netdev);=0A= 6390: 3c020000 lui v0,0x0=0A= 6394: 24420000 addiu v0,v0,0=0A= 6398: 0040f809 jalr v0=0A= 639c: 02402021 move a0,s2=0A= e1000_configure_tx(adapter);=0A= 63a0: 3c020000 lui v0,0x0=0A= 63a4: 24421f60 addiu v0,v0,8032=0A= 63a8: 0040f809 jalr v0=0A= 63ac: 02002021 move a0,s0=0A= =0A= extern void it_real_fn(unsigned long);=0A= =0A= static inline void init_timer(struct timer_list * timer)=0A= {=0A= 63b0: 26040094 addiu a0,s0,148=0A= =0A= #ifdef IANS=0A= if((IANS_BD_TAGGING_MODE) = (ANS_PRIVATE_DATA_FIELD(adapter)->tag_mode)=0A= !=3D IANS_BD_TAGGING_NONE)=0A= bd_ans_hw_EnableVLAN(adapter);=0A= #endif=0A= =0A= /* Set the watchdog timer for 2 seconds */=0A= init_timer(&adapter->timer_id);=0A= adapter->timer_id.function =3D &e1000_watchdog;=0A= 63b4: 3c020000 lui v0,0x0=0A= 63b8: 24420000 addiu v0,v0,0=0A= extern void it_real_fn(unsigned long);=0A= =0A= static inline void init_timer(struct timer_list * timer)=0A= {=0A= timer->list.next =3D timer->list.prev =3D NULL;=0A= 63bc: ac800004 sw zero,4(a0)=0A= 63c0: ac800000 sw zero,0(a0)=0A= 63c4: ae0200a4 sw v0,164(s0)=0A= adapter->timer_id.data =3D (unsigned long) netdev;=0A= 63c8: ae1200a0 sw s2,160(s0)=0A= mod_timer(&adapter->timer_id, (jiffies + 2 * HZ));=0A= 63cc: 3c050000 lui a1,0x0=0A= 63d0: 8ca50000 lw a1,0(a1)=0A= 63d4: 3c020000 lui v0,0x0=0A= 63d8: 24420000 addiu v0,v0,0=0A= 63dc: 0040f809 jalr v0=0A= 63e0: 24a500c8 addiu a1,a1,200=0A= * Atomically subtracts @i from @v. Note that the guaranteed=0A= * useful range of an atomic_t is only 24 bits.=0A= */=0A= extern __inline__ void atomic_sub(int i, atomic_t * v)=0A= {=0A= 63e4: 260300d8 addiu v1,s0,216=0A= 63e8: 24020001 li v0,1=0A= unsigned long temp;=0A= =0A= __asm__ __volatile__(=0A= 63ec: c0650000 ll a1,0(v1)=0A= 63f0: 00a22823 subu a1,a1,v0=0A= 63f4: e0650000 sc a1,0(v1)=0A= 63f8: 10a0fffc beqz a1,63ec =0A= 63fc: 00000000 nop=0A= 6400: 8e04000c lw a0,12(s0)=0A= 6404: 2c840002 sltiu a0,a0,2=0A= 6408: 8e230000 lw v1,0(s1)=0A= 640c: 2402ffff li v0,-1=0A= 6410: ac6200d8 sw v0,216(v1)=0A= =0A= tasklet_enable(&adapter->rx_fill_tasklet);=0A= =0A= /* Hook irq */=0A= e1000_irq_disable(adapter);=0A= 6414: 8e02000c lw v0,12(s0)=0A= 6418: 2c420002 sltiu v0,v0,2=0A= icr =3D E1000_READ_REG(&adapter->shared, ICR);=0A= 641c: 8e020008 lw v0,8(s0)=0A= __arch__swab16s(addr);=0A= }=0A= =0A= static __inline__ __const__ __u32 __fswab32(__u32 x)=0A= {=0A= 6420: 8c4300c0 lw v1,192(v0)=0A= if(request_irq=0A= 6424: 8e440024 lw a0,36(s2)=0A= 6428: 3c050000 lui a1,0x0=0A= 642c: 24a50000 addiu a1,a1,0=0A= 6430: 3c070000 lui a3,0x0=0A= 6434: 24e70000 addiu a3,a3,0=0A= 6438: 3c060200 lui a2,0x200=0A= 643c: 3c020000 lui v0,0x0=0A= 6440: 24420000 addiu v0,v0,0=0A= 6444: 0040f809 jalr v0=0A= 6448: afb20010 sw s2,16(sp)=0A= 644c: 50400008 beqzl v0,6470 =0A= 6450: 8e02000c lw v0,12(s0)=0A= (netdev->irq, &e1000_intr, SA_SHIRQ, e1000_driver_name, = netdev) !=3D 0)=0A= printk(KERN_ERR "e1000: Unable to hook irq.\n");=0A= 6454: 3c040000 lui a0,0x0=0A= 6458: 24840dd0 addiu a0,a0,3536=0A= 645c: 3c020000 lui v0,0x0=0A= 6460: 24420000 addiu v0,v0,0=0A= 6464: 0040f809 jalr v0=0A= 6468: 00000000 nop=0A= 646c: 8e02000c lw v0,12(s0)=0A= 6470: 2c420002 sltiu v0,v0,2=0A= __arch__swab16s(addr);=0A= }=0A= =0A= static __inline__ __const__ __u32 __fswab32(__u32 x)=0A= {=0A= 6474: 8e0500cc lw a1,204(s0)=0A= 6478: 8e060008 lw a2,8(s0)=0A= }=0A= =0A= static __inline__ __const__ __u32 __fswab32(__u32 x)=0A= {=0A= return __arch__swab32(x);=0A= 647c: 30a4ff00 andi a0,a1,0xff00=0A= 6480: 00051600 sll v0,a1,0x18=0A= 6484: 00051a02 srl v1,a1,0x8=0A= 6488: 00042200 sll a0,a0,0x8=0A= 648c: 00441025 or v0,v0,a0=0A= 6490: 3063ff00 andi v1,v1,0xff00=0A= 6494: 00431025 or v0,v0,v1=0A= 6498: 00052e02 srl a1,a1,0x18=0A= 649c: 00451025 or v0,v0,a1=0A= 64a0: acc200d0 sw v0,208(a2)=0A= {=0A= unsigned long *m =3D ((unsigned long *) addr) + (nr >> 5);=0A= unsigned long temp;=0A= =0A= __asm__ __volatile__(=0A= 64a4: c242002c ll v0,44(s2)=0A= 64a8: 2401fffe li at,-2=0A= 64ac: 00411024 and v0,v0,at=0A= 64b0: e242002c sc v0,44(s2)=0A= 64b4: 1040fffb beqz v0,64a4 =0A= 64b8: 00000000 nop=0A= =0A= e1000_irq_enable(adapter);=0A= netif_start_queue(netdev);=0A= }=0A= }=0A= 64bc: 8fbf0024 lw ra,36(sp)=0A= 64c0: 8fb20020 lw s2,32(sp)=0A= 64c4: 8fb1001c lw s1,28(sp)=0A= 64c8: 8fb00018 lw s0,24(sp)=0A= 64cc: 03e00008 jr ra=0A= 64d0: 27bd0028 addiu sp,sp,40=0A= =0A= 000064d4 :=0A= 64d4: 27bdffd8 addiu sp,sp,-40=0A= 64d8: afb40020 sw s4,32(sp)=0A= 64dc: afb3001c sw s3,28(sp)=0A= 64e0: afb20018 sw s2,24(sp)=0A= 64e4: afb10014 sw s1,20(sp)=0A= 64e8: afbf0024 sw ra,36(sp)=0A= 64ec: afb00010 sw s0,16(sp)=0A= 64f0: 00a09821 move s3,a1=0A= =0A= #ifdef IDIAG=0A= int=0A= e1000_xmit_lbtest_frame(struct sk_buff *skb,=0A= struct e1000_adapter *adapter)=0A= {=0A= /*struct e1000_adapter *adapter =3D netdev->priv; */=0A= struct pci_dev *pdev =3D adapter->pdev;=0A= struct e1000_tx_desc *tx_desc;=0A= int i;=0A= =0A= i =3D adapter->tx_ring.next_to_use;=0A= 64f4: 8e6600f8 lw a2,248(s3)=0A= tx_desc =3D E1000_TX_DESC(adapter->tx_ring, i);=0A= =0A= adapter->tx_ring.buffer_info[i].skb =3D skb;=0A= 64f8: 8e630100 lw v1,256(s3)=0A= 64fc: 00809021 move s2,a0=0A= 6500: 00068840 sll s1,a2,0x1=0A= 6504: 02268821 addu s1,s1,a2=0A= 6508: 001188c0 sll s1,s1,0x3=0A= 650c: 02231821 addu v1,s1,v1=0A= 6510: 8e6700e4 lw a3,228(s3)=0A= 6514: ac720000 sw s2,0(v1)=0A= adapter->tx_ring.buffer_info[i].length =3D skb->len;=0A= 6518: 8e620100 lw v0,256(s3)=0A= 651c: 8e44005c lw a0,92(s2)=0A= 6520: 00063100 sll a2,a2,0x4=0A= 6524: 02221021 addu v0,s1,v0=0A= 6528: ac440010 sw a0,16(v0)=0A= adapter->tx_ring.buffer_info[i].dma =3D=0A= 652c: 8e430080 lw v1,128(s2)=0A= */=0A= static inline dma_addr_t pci_map_page(struct pci_dev *hwdev, struct page = *page,=0A= unsigned long offset, size_t size,=0A= int direction)=0A= {=0A= 6530: 3c040000 lui a0,0x0=0A= 6534: 8c840000 lw a0,0(a0)=0A= 6538: 8e45005c lw a1,92(s2)=0A= 653c: 3c028000 lui v0,0x8000=0A= 6540: 00431021 addu v0,v0,v1=0A= 6544: 00021302 srl v0,v0,0xc=0A= */=0A= static inline dma_addr_t pci_map_page(struct pci_dev *hwdev, struct page = *page,=0A= unsigned long offset, size_t size,=0A= int direction)=0A= {=0A= 6548: 00021180 sll v0,v0,0x6=0A= 654c: 00e6a021 addu s4,a3,a2=0A= */=0A= static inline dma_addr_t pci_map_page(struct pci_dev *hwdev, struct page = *page,=0A= unsigned long offset, size_t size,=0A= int direction)=0A= {=0A= 6550: 00441021 addu v0,v0,a0=0A= 6554: 30630fff andi v1,v1,0xfff=0A= =0A= if (direction =3D=3D PCI_DMA_NONE)=0A= BUG();=0A= =0A= addr =3D (unsigned long) page_address(page);=0A= 6558: 8c500038 lw s0,56(v0)=0A= addr +=3D offset;=0A= #ifdef CONFIG_NONCOHERENT_IO=0A= dma_cache_wback_inv(addr, size);=0A= 655c: 3c060000 lui a2,0x0=0A= 6560: 8cc60000 lw a2,0(a2)=0A= 6564: 02038021 addu s0,s0,v1=0A= 6568: 00c0f809 jalr a2=0A= 656c: 02002021 move a0,s0=0A= pci_map_page(pdev, virt_to_page(skb->data),=0A= (unsigned long) skb->data & ~PAGE_MASK, skb->len,=0A= PCI_DMA_TODEVICE);=0A= 6570: 8e650100 lw a1,256(s3)=0A= * IO bus memory addresses are also 1:1 with the physical address=0A= */=0A= static inline unsigned long virt_to_bus(volatile void * address)=0A= {=0A= return PHYSADDR(address);=0A= 6574: 3c041fff lui a0,0x1fff=0A= 6578: 3484ffff ori a0,a0,0xffff=0A= 657c: 02041824 and v1,s0,a0=0A= 6580: 02252821 addu a1,s1,a1=0A= 6584: 00001021 move v0,zero=0A= 6588: aca20008 sw v0,8(a1)=0A= 658c: aca3000c sw v1,12(a1)=0A= 6590: 8e640100 lw a0,256(s3)=0A= }=0A= =0A= static __inline__ __const__ __u32 __fswab32(__u32 x)=0A= {=0A= return __arch__swab32(x);=0A= 6594: 3c0d00ff lui t5,0xff=0A= 6598: 02248821 addu s1,s1,a0=0A= static __inline__ __const__ __u64 __fswab64(__u64 x)=0A= {=0A= # ifdef __SWAB_64_THRU_32__=0A= __u32 h =3D x >> 32;=0A= __u32 l =3D x & ((1ULL<<32)-1);=0A= 659c: 8e2b000c lw t3,12(s1)=0A= 65a0: 8e2c0008 lw t4,8(s1)=0A= return (((__u64)__swab32(l)) << 32) | ((__u64)(__swab32(h)));=0A= 65a4: 00002021 move a0,zero=0A= 65a8: 3166ff00 andi a2,t3,0xff00=0A= 65ac: 016d4024 and t0,t3,t5=0A= 65b0: 00063200 sll a2,a2,0x8=0A= 65b4: 000b5600 sll t2,t3,0x18=0A= 65b8: 3189ff00 andi t1,t4,0xff00=0A= 65bc: 01465025 or t2,t2,a2=0A= 65c0: 000c3e00 sll a3,t4,0x18=0A= 65c4: 018d3024 and a2,t4,t5=0A= 65c8: 00084202 srl t0,t0,0x8=0A= 65cc: 00094a00 sll t1,t1,0x8=0A= 65d0: 00063202 srl a2,a2,0x8=0A= 65d4: 01485025 or t2,t2,t0=0A= 65d8: 00e93825 or a3,a3,t1=0A= 65dc: 000b5e02 srl t3,t3,0x18=0A= 65e0: 00e63825 or a3,a3,a2=0A= 65e4: 014b1825 or v1,t2,t3=0A= 65e8: 000c6602 srl t4,t4,0x18=0A= 65ec: 00ec2825 or a1,a3,t4=0A= 65f0: 00031000 sll v0,v1,0x0=0A= 65f4: 00001821 move v1,zero=0A= 65f8: 00441025 or v0,v0,a0=0A= 65fc: 00651825 or v1,v1,a1=0A= =0A= tx_desc->buffer_addr =3D = cpu_to_le64(adapter->tx_ring.buffer_info[i].dma);=0A= 6600: ae820000 sw v0,0(s4)=0A= 6604: ae830004 sw v1,4(s4)=0A= __arch__swab16s(addr);=0A= }=0A= =0A= static __inline__ __const__ __u32 __fswab32(__u32 x)=0A= {=0A= 6608: 8e44005c lw a0,92(s2)=0A= tx_desc->lower.data =3D cpu_to_le32(skb->len);=0A= =0A= /* zero out the status field in the descriptor */=0A= =0A= tx_desc->upper.data =3D 0;=0A= =0A= tx_desc->lower.data |=3D E1000_TXD_CMD_EOP;=0A= 660c: 3c050100 lui a1,0x100=0A= tx_desc->lower.data |=3D E1000_TXD_CMD_IFCS;=0A= 6610: 3c060200 lui a2,0x200=0A= }=0A= =0A= static __inline__ __const__ __u32 __fswab32(__u32 x)=0A= {=0A= return __arch__swab32(x);=0A= 6614: 3083ff00 andi v1,a0,0xff00=0A= 6618: 00031a00 sll v1,v1,0x8=0A= 661c: 008d6824 and t5,a0,t5=0A= 6620: 00041600 sll v0,a0,0x18=0A= 6624: 00431025 or v0,v0,v1=0A= 6628: 000d6a02 srl t5,t5,0x8=0A= 662c: 00042602 srl a0,a0,0x18=0A= 6630: 004d1025 or v0,v0,t5=0A= 6634: 00441025 or v0,v0,a0=0A= 6638: 00451025 or v0,v0,a1=0A= 663c: 00461025 or v0,v0,a2=0A= tx_desc->lower.data |=3D E1000_TXD_CMD_IDE;=0A= 6640: 3c038000 lui v1,0x8000=0A= 6644: 00432025 or a0,v0,v1=0A= 6648: ae80000c sw zero,12(s4)=0A= 664c: ae840008 sw a0,8(s4)=0A= =0A= if(adapter->shared.report_tx_early =3D=3D 1)=0A= 6650: 8e63006c lw v1,108(s3)=0A= 6654: 24020001 li v0,1=0A= 6658: 54620002 bnel v1,v0,6664 =0A= 665c: 3c021000 lui v0,0x1000=0A= tx_desc->lower.data |=3D E1000_TXD_CMD_RS;=0A= 6660: 3c020800 lui v0,0x800=0A= else=0A= tx_desc->lower.data |=3D E1000_TXD_CMD_RPS;=0A= 6664: 00821025 or v0,a0,v0=0A= 6668: ae820008 sw v0,8(s4)=0A= =0A= /* Move the HW Tx Tail Pointer */=0A= =0A= adapter->tx_ring.next_to_use++;=0A= 666c: 8e6200f8 lw v0,248(s3)=0A= adapter->tx_ring.next_to_use %=3D adapter->tx_ring.count;=0A= 6670: 8e6300f0 lw v1,240(s3)=0A= 6674: 24420001 addiu v0,v0,1=0A= 6678: 0043001b divu zero,v0,v1=0A= 667c: ae6200f8 sw v0,248(s3)=0A= 6680: 50600001 beqzl v1,6688 =0A= 6684: 0007000d break 0x7=0A= 6688: 8e62000c lw v0,12(s3)=0A= 668c: 2c420002 sltiu v0,v0,2=0A= 6690: 00003010 mfhi a2=0A= 6694: 1440000e bnez v0,66d0 =0A= 6698: ae6600f8 sw a2,248(s3)=0A= }=0A= =0A= static __inline__ __const__ __u32 __fswab32(__u32 x)=0A= {=0A= return __arch__swab32(x);=0A= 669c: 30c3ff00 andi v1,a2,0xff00=0A= 66a0: 00031a00 sll v1,v1,0x8=0A= 66a4: 00061600 sll v0,a2,0x18=0A= 66a8: 00062202 srl a0,a2,0x8=0A= 66ac: 00431025 or v0,v0,v1=0A= 66b0: 3084ff00 andi a0,a0,0xff00=0A= 66b4: 8e650008 lw a1,8(s3)=0A= }=0A= =0A= static __inline__ __const__ __u32 __fswab32(__u32 x)=0A= {=0A= return __arch__swab32(x);=0A= 66b8: 00441025 or v0,v0,a0=0A= 66bc: 00061e02 srl v1,a2,0x18=0A= 66c0: 00431025 or v0,v0,v1=0A= =0A= E1000_WRITE_REG(&adapter->shared, TDT, adapter->tx_ring.next_to_use);=0A= 66c4: aca23818 sw v0,14360(a1)=0A= 66c8: 080019bf j 66fc =0A= 66cc: 00000000 nop=0A= }=0A= =0A= static __inline__ __const__ __u32 __fswab32(__u32 x)=0A= {=0A= return __arch__swab32(x);=0A= 66d0: 30c3ff00 andi v1,a2,0xff00=0A= 66d4: 00031a00 sll v1,v1,0x8=0A= 66d8: 00061600 sll v0,a2,0x18=0A= 66dc: 00062202 srl a0,a2,0x8=0A= 66e0: 00431025 or v0,v0,v1=0A= 66e4: 3084ff00 andi a0,a0,0xff00=0A= 66e8: 8e650008 lw a1,8(s3)=0A= }=0A= =0A= static __inline__ __const__ __u32 __fswab32(__u32 x)=0A= {=0A= return __arch__swab32(x);=0A= 66ec: 00441025 or v0,v0,a0=0A= 66f0: 00061e02 srl v1,a2,0x18=0A= 66f4: 00431025 or v0,v0,v1=0A= 66f8: aca20438 sw v0,1080(a1)=0A= mdelay(10);=0A= 66fc: 3c040000 lui a0,0x0=0A= 6700: 8c840000 lw a0,0(a0)=0A= 6704: 3c031999 lui v1,0x1999=0A= 6708: 24050009 li a1,9=0A= 670c: 346396c0 ori v1,v1,0x96c0=0A= 6710: 2406ffff li a2,-1=0A= {=0A= unsigned long lo;=0A= =0A= usecs *=3D 0x00068db8; /* 2**32 / (1000000 / HZ) */=0A= __asm__("multu\t%2,%3"=0A= 6714: 00640019 multu v1,a0=0A= 6718: 00001010 mfhi v0=0A= ...=0A= 6724: 1440ffff bnez v0,6724 =0A= 6728: 2442ffff addiu v0,v0,-1=0A= 672c: 24a5ffff addiu a1,a1,-1=0A= 6730: 14a6fff8 bne a1,a2,6714 =0A= 6734: 266200f4 addiu v0,s3,244=0A= * Atomically subtracts @i from @v. Note that the guaranteed=0A= * useful range of an atomic_t is only 24 bits.=0A= */=0A= extern __inline__ void atomic_sub(int i, atomic_t * v)=0A= {=0A= 6738: 24030001 li v1,1=0A= unsigned long temp;=0A= =0A= __asm__ __volatile__(=0A= 673c: c0450000 ll a1,0(v0)=0A= 6740: 00a32823 subu a1,a1,v1=0A= 6744: e0450000 sc a1,0(v0)=0A= 6748: 10a0fffc beqz a1,673c =0A= 674c: 00000000 nop=0A= =0A= atomic_dec(&adapter->tx_ring.unused);=0A= =0A= if(atomic_read(&adapter->tx_ring.unused) <=3D 1) {=0A= 6750: 8c440000 lw a0,0(v0)=0A= 6754: 28840002 slti a0,a0,2=0A= 6758: 50800005 beqzl a0,6770 =0A= 675c: 24020001 li v0,1=0A= =0A= /* this driver never actually drops transmits,=0A= * so use tx_dropped count to indicate the number of times=0A= * netif_stop_queue is called due to no available descriptors=0A= */=0A= =0A= adapter->net_stats.tx_dropped++;=0A= 6760: 8e63016c lw v1,364(s3)=0A= return (0);=0A= 6764: 00001021 move v0,zero=0A= 6768: 24630001 addiu v1,v1,1=0A= 676c: ae63016c sw v1,364(s3)=0A= }=0A= return (1);=0A= }=0A= 6770: 8fbf0024 lw ra,36(sp)=0A= 6774: 8fb40020 lw s4,32(sp)=0A= 6778: 8fb3001c lw s3,28(sp)=0A= 677c: 8fb20018 lw s2,24(sp)=0A= 6780: 8fb10014 lw s1,20(sp)=0A= 6784: 8fb00010 lw s0,16(sp)=0A= 6788: 03e00008 jr ra=0A= 678c: 27bd0028 addiu sp,sp,40=0A= =0A= 00006790 :=0A= =0A= int=0A= e1000_rcv_lbtest_frame(struct e1000_adapter *adapter,=0A= unsigned int frame_size)=0A= {=0A= struct pci_dev *pdev =3D adapter->pdev;=0A= struct e1000_rx_desc *rx_desc;=0A= int i, j =3D 0, rcved_pkt =3D 0;=0A= uint32_t Length;=0A= struct sk_buff *skb;=0A= =0A= mdelay(500);=0A= 6790: 3c060000 lui a2,0x0=0A= 6794: 8cc60000 lw a2,0(a2)=0A= 6798: 27bdffb8 addiu sp,sp,-72=0A= 679c: 3c031999 lui v1,0x1999=0A= 67a0: afbe0040 sw s8,64(sp)=0A= 67a4: afa5004c sw a1,76(sp)=0A= 67a8: 0080f021 move s8,a0=0A= 67ac: afbf0044 sw ra,68(sp)=0A= 67b0: afb7003c sw s7,60(sp)=0A= 67b4: afb60038 sw s6,56(sp)=0A= 67b8: afb50034 sw s5,52(sp)=0A= 67bc: afb40030 sw s4,48(sp)=0A= 67c0: afb3002c sw s3,44(sp)=0A= 67c4: afb20028 sw s2,40(sp)=0A= 67c8: afb10024 sw s1,36(sp)=0A= 67cc: afb00020 sw s0,32(sp)=0A= 67d0: afa00010 sw zero,16(sp)=0A= 67d4: 00003821 move a3,zero=0A= 67d8: 240401f3 li a0,499=0A= 67dc: 346396c0 ori v1,v1,0x96c0=0A= 67e0: 2405ffff li a1,-1=0A= {=0A= unsigned long lo;=0A= =0A= usecs *=3D 0x00068db8; /* 2**32 / (1000000 / HZ) */=0A= __asm__("multu\t%2,%3"=0A= 67e4: 00660019 multu v1,a2=0A= 67e8: 00001010 mfhi v0=0A= ...=0A= 67f4: 1440ffff bnez v0,67f4 =0A= 67f8: 2442ffff addiu v0,v0,-1=0A= 67fc: 2484ffff addiu a0,a0,-1=0A= 6800: 1485fff8 bne a0,a1,67e4 =0A= 6804: 00000000 nop=0A= i =3D adapter->rx_ring.next_to_clean;=0A= 6808: 8fd20128 lw s2,296(s8)=0A= rx_desc =3D E1000_RX_DESC(adapter->rx_ring, i);=0A= 680c: 8fc40110 lw a0,272(s8)=0A= 6810: 00121900 sll v1,s2,0x4=0A= 6814: 0083b021 addu s6,a0,v1=0A= =0A= while(rx_desc->status & E1000_RXD_STAT_DD) {=0A= 6818: 92c2000c lbu v0,12(s6)=0A= 681c: 30420001 andi v0,v0,0x1=0A= 6820: 1040005e beqz v0,699c =0A= 6824: 3c157fff lui s5,0x7fff=0A= 6828: 24130001 li s3,1=0A= 682c: 27d40120 addiu s4,s8,288=0A= 6830: 36b5f1c0 ori s5,s5,0xf1c0=0A= Length =3D le16_to_cpu(rx_desc->length) - CRC_LENGTH;=0A= skb =3D adapter->rx_ring.buffer_info[i].skb;=0A= 6834: 8fc3012c lw v1,300(s8)=0A= 6838: 00121040 sll v0,s2,0x1=0A= 683c: 00521021 addu v0,v0,s2=0A= 6840: 0002b8c0 sll s7,v0,0x3=0A= 6844: 02e31821 addu v1,s7,v1=0A= 6848: 8c710000 lw s1,0(v1)=0A= =0A= /* Snoop the packet for pattern */=0A= rcved_pkt =3D e1000_check_lbtest_frame(skb, frame_size);=0A= 684c: 8fa5004c lw a1,76(sp)=0A= 6850: 3c020000 lui v0,0x0=0A= 6854: 24426d8c addiu v0,v0,28044=0A= 6858: 0040f809 jalr v0=0A= 685c: 02202021 move a0,s1=0A= 6860: 00403821 move a3,v0=0A= return result;=0A= }=0A= =0A= extern __inline__ int atomic_sub_return(int i, atomic_t * v)=0A= {=0A= 6864: 26220070 addiu v0,s1,112=0A= unsigned long temp, result;=0A= =0A= __asm__ __volatile__(=0A= 6868: c0440000 ll a0,0(v0)=0A= 686c: 00931823 subu v1,a0,s3=0A= 6870: e0430000 sc v1,0(v0)=0A= 6874: 1060fffc beqz v1,6868 =0A= 6878: 00931823 subu v1,a0,s3=0A= * is executing from interrupt context.=0A= */=0A= static inline void dev_kfree_skb_irq(struct sk_buff *skb)=0A= {=0A= if (atomic_dec_and_test(&skb->users)) {=0A= 687c: 5460001f bnezl v1,68fc =0A= 6880: 8fc2012c lw v0,300(s8)=0A= int cpu =3Dsmp_processor_id();=0A= unsigned long flags;=0A= =0A= local_irq_save(flags);=0A= 6884: 40106000 mfc0 s0,$12=0A= 6888: 00000000 nop=0A= 688c: 36010001 ori at,s0,0x1=0A= 6890: 38210001 xori at,at,0x1=0A= 6894: 40816000 mtc0 at,$12=0A= 6898: 00000040 sll zero,zero,0x1=0A= 689c: 00000040 sll zero,zero,0x1=0A= 68a0: 00000040 sll zero,zero,0x1=0A= skb->next =3D softnet_data[cpu].completion_queue;=0A= 68a4: 3c030000 lui v1,0x0=0A= 68a8: 8c630020 lw v1,32(v1)=0A= softnet_data[cpu].completion_queue =3D skb;=0A= cpu_raise_softirq(cpu, NET_TX_SOFTIRQ);=0A= 68ac: 00002021 move a0,zero=0A= 68b0: 24050001 li a1,1=0A= 68b4: ae230000 sw v1,0(s1)=0A= 68b8: 3c020000 lui v0,0x0=0A= 68bc: 24420000 addiu v0,v0,0=0A= 68c0: 3c010000 lui at,0x0=0A= 68c4: ac310020 sw s1,32(at)=0A= 68c8: 0040f809 jalr v0=0A= 68cc: afa70018 sw a3,24(sp)=0A= local_irq_restore(flags);=0A= 68d0: 40016000 mfc0 at,$12=0A= 68d4: 32100001 andi s0,s0,0x1=0A= 68d8: 34210001 ori at,at,0x1=0A= 68dc: 38210001 xori at,at,0x1=0A= 68e0: 02018025 or s0,s0,at=0A= 68e4: 40906000 mtc0 s0,$12=0A= ...=0A= 68f4: 8fa70018 lw a3,24(sp)=0A= =0A= pci_unmap_single(pdev, adapter->rx_ring.buffer_info[i].dma,=0A= adapter->rx_ring.buffer_info[i].length,=0A= PCI_DMA_FROMDEVICE);=0A= =0A= dev_kfree_skb_irq(skb);=0A= adapter->rx_ring.buffer_info[i].skb =3D NULL;=0A= 68f8: 8fc2012c lw v0,300(s8)=0A= 68fc: 02e21021 addu v0,s7,v0=0A= 6900: ac400000 sw zero,0(v0)=0A= =0A= rx_desc->status =3D 0;=0A= 6904: a2c0000c sb zero,12(s6)=0A= extern __inline__ void atomic_add(int i, atomic_t * v)=0A= {=0A= unsigned long temp;=0A= =0A= __asm__ __volatile__(=0A= 6908: c2830000 ll v1,0(s4)=0A= 690c: 00731821 addu v1,v1,s3=0A= 6910: e2830000 sc v1,0(s4)=0A= 6914: 1060fffc beqz v1,6908 =0A= 6918: 00000000 nop=0A= atomic_inc(&adapter->rx_ring.unused);=0A= =0A= i++;=0A= i %=3D adapter->rx_ring.count;=0A= 691c: 8fc2011c lw v0,284(s8)=0A= 6920: 26520001 addiu s2,s2,1=0A= rx_desc =3D E1000_RX_DESC(adapter->rx_ring, i);=0A= =0A= if(rcved_pkt)=0A= break;=0A= =0A= /* waited enough */=0A= if(j++ >=3D adapter->rx_ring.count)=0A= 6924: 8fa30010 lw v1,16(sp)=0A= 6928: 0242001b divu zero,s2,v0=0A= 692c: 50400001 beqzl v0,6934 =0A= 6930: 0007000d break 0x7=0A= 6934: 8fc50110 lw a1,272(s8)=0A= 6938: 0062302b sltu a2,v1,v0=0A= 693c: 00601021 move v0,v1=0A= 6940: 24420001 addiu v0,v0,1=0A= 6944: afa20010 sw v0,16(sp)=0A= 6948: 00001021 move v0,zero=0A= 694c: 00002010 mfhi a0=0A= 6950: 00809021 move s2,a0=0A= 6954: 00000000 nop=0A= 6958: 00121900 sll v1,s2,0x4=0A= 695c: 14e0000f bnez a3,699c =0A= 6960: 00a3b021 addu s6,a1,v1=0A= 6964: 10c00010 beqz a2,69a8 =0A= 6968: 8fbf0044 lw ra,68(sp)=0A= * first constant multiplications gets optimized away if the delay is=0A= * a constant)=0A= */=0A= extern __inline__ void __udelay(unsigned long usecs, unsigned long lpj)=0A= {=0A= 696c: 3c020000 lui v0,0x0=0A= 6970: 8c420000 lw v0,0(v0)=0A= unsigned long lo;=0A= =0A= usecs *=3D 0x00068db8; /* 2**32 / (1000000 / HZ) */=0A= __asm__("multu\t%2,%3"=0A= 6974: 02a20019 multu s5,v0=0A= 6978: 00001010 mfhi v0=0A= ...=0A= 6984: 1440ffff bnez v0,6984 =0A= 6988: 2442ffff addiu v0,v0,-1=0A= return 0;=0A= =0A= mdelay(5);=0A= =0A= }=0A= 698c: 92c3000c lbu v1,12(s6)=0A= 6990: 30630001 andi v1,v1,0x1=0A= 6994: 5460ffa8 bnezl v1,6838 =0A= 6998: 8fc3012c lw v1,300(s8)=0A= =0A= adapter->rx_ring.next_to_clean =3D i;=0A= 699c: afd20128 sw s2,296(s8)=0A= =0A= return (rcved_pkt);=0A= 69a0: 00e01021 move v0,a3=0A= =0A= }=0A= 69a4: 8fbf0044 lw ra,68(sp)=0A= 69a8: 8fbe0040 lw s8,64(sp)=0A= 69ac: 8fb7003c lw s7,60(sp)=0A= 69b0: 8fb60038 lw s6,56(sp)=0A= 69b4: 8fb50034 lw s5,52(sp)=0A= 69b8: 8fb40030 lw s4,48(sp)=0A= 69bc: 8fb3002c lw s3,44(sp)=0A= 69c0: 8fb20028 lw s2,40(sp)=0A= 69c4: 8fb10024 lw s1,36(sp)=0A= 69c8: 8fb00020 lw s0,32(sp)=0A= 69cc: 03e00008 jr ra=0A= 69d0: 27bd0048 addiu sp,sp,72=0A= =0A= 000069d4 :=0A= 69d4: 27bdffe0 addiu sp,sp,-32=0A= 69d8: afb10014 sw s1,20(sp)=0A= 69dc: afbf0018 sw ra,24(sp)=0A= 69e0: afb00010 sw s0,16(sp)=0A= =0A= void=0A= e1000_selective_wakeup_adapter(struct net_device *netdev)=0A= {=0A= struct e1000_adapter *adapter =3D netdev->priv;=0A= 69e4: 8c900064 lw s0,100(a0)=0A= uint32_t ctrl, txcw;=0A= =0A= e1000_init_hw(&adapter->shared);=0A= 69e8: 3c020000 lui v0,0x0=0A= 69ec: 24420000 addiu v0,v0,0=0A= 69f0: 26110008 addiu s1,s0,8=0A= 69f4: 0040f809 jalr v0=0A= 69f8: 02202021 move a0,s1=0A= =0A= if((adapter->link_active =3D=3D FALSE) &&=0A= 69fc: 8e0300b0 lw v1,176(s0)=0A= 6a00: 14600048 bnez v1,6b24 =0A= 6a04: 2604008c addiu a0,s0,140=0A= 6a08: 8e0a000c lw t2,12(s0)=0A= 6a0c: 24020002 li v0,2=0A= 6a10: 55420045 bnel t2,v0,6b28 = =0A= 6a14: 8c820000 lw v0,0(a0)=0A= (adapter->shared.mac_type =3D=3D e1000_82543)) {=0A= =0A= txcw =3D E1000_READ_REG(&adapter->shared, TXCW);=0A= 6a18: 8e220000 lw v0,0(s1)=0A= }=0A= =0A= static __inline__ __const__ __u32 __fswab32(__u32 x)=0A= {=0A= return __arch__swab32(x);=0A= 6a1c: 3c0700ff lui a3,0xff=0A= ctrl =3D E1000_READ_REG(&adapter->shared, CTRL);=0A= 6a20: 2d4a0002 sltiu t2,t2,2=0A= 6a24: 00405821 move t3,v0=0A= __arch__swab16s(addr);=0A= }=0A= =0A= static __inline__ __const__ __u32 __fswab32(__u32 x)=0A= {=0A= 6a28: 8c480178 lw t0,376(v0)=0A= 6a2c: 8d690000 lw t1,0(t3)=0A= return __arch__swab32(x);=0A= 6a30: 3104ff00 andi a0,t0,0xff00=0A= 6a34: 3125ff00 andi a1,t1,0xff00=0A= 6a38: 01273024 and a2,t1,a3=0A= 6a3c: 00081e00 sll v1,t0,0x18=0A= 6a40: 01073824 and a3,t0,a3=0A= 6a44: 00091600 sll v0,t1,0x18=0A= 6a48: 00042200 sll a0,a0,0x8=0A= 6a4c: 00052a00 sll a1,a1,0x8=0A= 6a50: 00063202 srl a2,a2,0x8=0A= 6a54: 00641825 or v1,v1,a0=0A= 6a58: 00451025 or v0,v0,a1=0A= 6a5c: 00073a02 srl a3,a3,0x8=0A= 6a60: 00671825 or v1,v1,a3=0A= 6a64: 00461025 or v0,v0,a2=0A= 6a68: 00084602 srl t0,t0,0x18=0A= 6a6c: 00094e02 srl t1,t1,0x18=0A= 6a70: 00681825 or v1,v1,t0=0A= 6a74: 00493025 or a2,v0,t1=0A= E1000_WRITE_REG(&adapter->shared, TXCW, txcw & ~E1000_TXCW_ANE);=0A= 6a78: 3c047fff lui a0,0x7fff=0A= 6a7c: 3484ffff ori a0,a0,0xffff=0A= 6a80: 00642024 and a0,v1,a0=0A= }=0A= =0A= static __inline__ __const__ __u32 __fswab32(__u32 x)=0A= {=0A= return __arch__swab32(x);=0A= 6a84: 3065ff00 andi a1,v1,0xff00=0A= 6a88: 00031600 sll v0,v1,0x18=0A= 6a8c: 00052a00 sll a1,a1,0x8=0A= 6a90: 00041a02 srl v1,a0,0x8=0A= 6a94: 00451025 or v0,v0,a1=0A= 6a98: 3063ff00 andi v1,v1,0xff00=0A= 6a9c: 00431025 or v0,v0,v1=0A= 6aa0: 00042602 srl a0,a0,0x18=0A= 6aa4: 00441025 or v0,v0,a0=0A= 6aa8: ad620178 sw v0,376(t3)=0A= 6aac: 8e02000c lw v0,12(s0)=0A= 6ab0: 2c420002 sltiu v0,v0,2=0A= E1000_WRITE_REG(&adapter->shared, CTRL,=0A= 6ab4: 34c500c1 ori a1,a2,0xc1=0A= }=0A= =0A= static __inline__ __const__ __u32 __fswab32(__u32 x)=0A= {=0A= return __arch__swab32(x);=0A= 6ab8: 30a3ff00 andi v1,a1,0xff00=0A= 6abc: 00031a00 sll v1,v1,0x8=0A= 6ac0: 00051600 sll v0,a1,0x18=0A= 6ac4: 00052202 srl a0,a1,0x8=0A= 6ac8: 00431025 or v0,v0,v1=0A= 6acc: 3084ff00 andi a0,a0,0xff00=0A= 6ad0: 8e030008 lw v1,8(s0)=0A= }=0A= =0A= static __inline__ __const__ __u32 __fswab32(__u32 x)=0A= {=0A= return __arch__swab32(x);=0A= 6ad4: 00441025 or v0,v0,a0=0A= 6ad8: 00052e02 srl a1,a1,0x18=0A= 6adc: 00451025 or v0,v0,a1=0A= 6ae0: ac620000 sw v0,0(v1)=0A= (ctrl | E1000_CTRL_SLU | E1000_CTRL_ILOS |=0A= E1000_CTRL_FD));=0A= mdelay(20);=0A= 6ae4: 3c040000 lui a0,0x0=0A= 6ae8: 8c840000 lw a0,0(a0)=0A= 6aec: 3c031999 lui v1,0x1999=0A= 6af0: 24050013 li a1,19=0A= 6af4: 346396c0 ori v1,v1,0x96c0=0A= 6af8: 2406ffff li a2,-1=0A= {=0A= unsigned long lo;=0A= =0A= usecs *=3D 0x00068db8; /* 2**32 / (1000000 / HZ) */=0A= __asm__("multu\t%2,%3"=0A= 6afc: 00640019 multu v1,a0=0A= 6b00: 00001010 mfhi v0=0A= ...=0A= 6b0c: 1440ffff bnez v0,6b0c =0A= 6b10: 2442ffff addiu v0,v0,-1=0A= 6b14: 24a5ffff addiu a1,a1,-1=0A= 6b18: 14a6fff8 bne a1,a2,6afc =0A= 6b1c: 00000000 nop=0A= * @nr: bit number to test=0A= * @addr: Address to start counting from=0A= */=0A= extern __inline__ int test_bit(int nr, volatile void *addr)=0A= {=0A= 6b20: 2604008c addiu a0,s0,140=0A= return ((1UL << (nr & 31)) & (((const unsigned int *) addr)[nr >> 5])) = !=3D 0;=0A= 6b24: 8c820000 lw v0,0(a0)=0A= 6b28: 30420001 andi v0,v0,0x1=0A= }=0A= =0A= if(!test_bit(E1000_BOARD_OPEN, &adapter->flags)) {=0A= 6b2c: 14400013 bnez v0,6b7c =0A= 6b30: 00000000 nop=0A= {=0A= unsigned long *m =3D ((unsigned long *) addr) + (nr >> 5);=0A= unsigned long temp;=0A= =0A= __asm__ __volatile__(=0A= 6b34: c0820000 ll v0,0(a0)=0A= 6b38: 34420001 ori v0,v0,0x1=0A= 6b3c: e0820000 sc v0,0(a0)=0A= 6b40: 1040fffc beqz v0,6b34 =0A= 6b44: 00000000 nop=0A= 6b48: c0830000 ll v1,0(a0)=0A= 6b4c: 34630004 ori v1,v1,0x4=0A= 6b50: e0830000 sc v1,0(a0)=0A= 6b54: 1060fffc beqz v1,6b48 =0A= 6b58: 00000000 nop=0A= set_bit(E1000_BOARD_OPEN, &adapter->flags);=0A= set_bit(E1000_DIAG_OPEN, &adapter->flags);=0A= e1000_setup_tx_resources(adapter);=0A= 6b5c: 3c020000 lui v0,0x0=0A= 6b60: 24421e60 addiu v0,v0,7776=0A= 6b64: 0040f809 jalr v0=0A= 6b68: 02002021 move a0,s0=0A= e1000_setup_rx_resources(adapter);=0A= 6b6c: 3c020000 lui v0,0x0=0A= 6b70: 24422208 addiu v0,v0,8712=0A= 6b74: 0040f809 jalr v0=0A= 6b78: 02002021 move a0,s0=0A= }=0A= e1000_setup_rctl(adapter);=0A= 6b7c: 3c020000 lui v0,0x0=0A= 6b80: 24422308 addiu v0,v0,8968=0A= 6b84: 0040f809 jalr v0=0A= 6b88: 02002021 move a0,s0=0A= e1000_configure_rx(adapter);=0A= 6b8c: 3c020000 lui v0,0x0=0A= 6b90: 244223a8 addiu v0,v0,9128=0A= 6b94: 0040f809 jalr v0=0A= 6b98: 02002021 move a0,s0=0A= e1000_alloc_rx_buffers((unsigned long) adapter);=0A= 6b9c: 3c020000 lui v0,0x0=0A= 6ba0: 24425e30 addiu v0,v0,24112=0A= 6ba4: 0040f809 jalr v0=0A= 6ba8: 02002021 move a0,s0=0A= e1000_configure_tx(adapter);=0A= 6bac: 3c020000 lui v0,0x0=0A= 6bb0: 24421f60 addiu v0,v0,8032=0A= 6bb4: 0040f809 jalr v0=0A= 6bb8: 02002021 move a0,s0=0A= }=0A= 6bbc: 8fbf0018 lw ra,24(sp)=0A= 6bc0: 8fb10014 lw s1,20(sp)=0A= 6bc4: 8fb00010 lw s0,16(sp)=0A= 6bc8: 03e00008 jr ra=0A= 6bcc: 27bd0020 addiu sp,sp,32=0A= =0A= 00006bd0 :=0A= 6bd0: 27bdffe0 addiu sp,sp,-32=0A= 6bd4: afbf0018 sw ra,24(sp)=0A= 6bd8: afb10014 sw s1,20(sp)=0A= 6bdc: afb00010 sw s0,16(sp)=0A= =0A= void=0A= e1000_selective_hibernate_adapter(struct net_device *netdev)=0A= {=0A= struct e1000_adapter *adapter =3D netdev->priv;=0A= 6be0: 8c910064 lw s1,100(a0)=0A= uint32_t ctrl, txcw;=0A= =0A= if((adapter->link_active =3D=3D FALSE) &&=0A= 6be4: 8e2200b0 lw v0,176(s1)=0A= 6be8: 14400043 bnez v0,6cf8 = =0A= 6bec: 24020002 li v0,2=0A= 6bf0: 8e2a000c lw t2,12(s1)=0A= 6bf4: 15420040 bne t2,v0,6cf8 = =0A= 6bf8: 3c0700ff lui a3,0xff=0A= (adapter->shared.mac_type =3D=3D e1000_82543)) {=0A= =0A= txcw =3D E1000_READ_REG(&adapter->shared, TXCW);=0A= 6bfc: 8e2b0008 lw t3,8(s1)=0A= ctrl =3D E1000_READ_REG(&adapter->shared, CTRL);=0A= ctrl &=3D ~E1000_CTRL_SLU & ~E1000_CTRL_ILOS;=0A= 6c00: 2d4a0002 sltiu t2,t2,2=0A= __arch__swab16s(addr);=0A= }=0A= =0A= static __inline__ __const__ __u32 __fswab32(__u32 x)=0A= {=0A= 6c04: 8d690178 lw t1,376(t3)=0A= 6c08: 8d620000 lw v0,0(t3)=0A= return __arch__swab32(x);=0A= 6c0c: 3124ff00 andi a0,t1,0xff00=0A= 6c10: 3045ff00 andi a1,v0,0xff00=0A= 6c14: 00474024 and t0,v0,a3=0A= 6c18: 00093600 sll a2,t1,0x18=0A= 6c1c: 01273824 and a3,t1,a3=0A= 6c20: 00021e00 sll v1,v0,0x18=0A= 6c24: 00042200 sll a0,a0,0x8=0A= 6c28: 00052a00 sll a1,a1,0x8=0A= 6c2c: 00073a02 srl a3,a3,0x8=0A= 6c30: 00c43025 or a2,a2,a0=0A= 6c34: 00651825 or v1,v1,a1=0A= 6c38: 00084202 srl t0,t0,0x8=0A= 6c3c: 00021602 srl v0,v0,0x18=0A= 6c40: 00c73025 or a2,a2,a3=0A= 6c44: 00681825 or v1,v1,t0=0A= 6c48: 00094e02 srl t1,t1,0x18=0A= 6c4c: 3042003f andi v0,v0,0x3f=0A= }=0A= =0A= static __inline__ __const__ __u32 __fswab32(__u32 x)=0A= {=0A= return __arch__swab32(x);=0A= 6c50: 00c93025 or a2,a2,t1=0A= 6c54: 00433825 or a3,v0,v1=0A= E1000_WRITE_REG(&adapter->shared, TXCW, txcw | E1000_TXCW_ANE);=0A= 6c58: 3c038000 lui v1,0x8000=0A= 6c5c: 00c31825 or v1,a2,v1=0A= }=0A= =0A= static __inline__ __const__ __u32 __fswab32(__u32 x)=0A= {=0A= return __arch__swab32(x);=0A= 6c60: 3065ff00 andi a1,v1,0xff00=0A= 6c64: 00031600 sll v0,v1,0x18=0A= 6c68: 00032202 srl a0,v1,0x8=0A= 6c6c: 00052a00 sll a1,a1,0x8=0A= 6c70: 00451025 or v0,v0,a1=0A= 6c74: 3084ff00 andi a0,a0,0xff00=0A= 6c78: 00441025 or v0,v0,a0=0A= 6c7c: 00031e02 srl v1,v1,0x18=0A= 6c80: 00431025 or v0,v0,v1=0A= 6c84: ad620178 sw v0,376(t3)=0A= 6c88: 8e22000c lw v0,12(s1)=0A= 6c8c: 2c420002 sltiu v0,v0,2=0A= }=0A= =0A= static __inline__ __const__ __u32 __fswab32(__u32 x)=0A= {=0A= return __arch__swab32(x);=0A= 6c90: 30e3ff00 andi v1,a3,0xff00=0A= 6c94: 00031a00 sll v1,v1,0x8=0A= 6c98: 00071600 sll v0,a3,0x18=0A= 6c9c: 00072202 srl a0,a3,0x8=0A= 6ca0: 00431025 or v0,v0,v1=0A= 6ca4: 3084ff00 andi a0,a0,0xff00=0A= E1000_WRITE_REG(&adapter->shared, CTRL, ctrl);=0A= 6ca8: 8e250008 lw a1,8(s1)=0A= }=0A= =0A= static __inline__ __const__ __u32 __fswab32(__u32 x)=0A= {=0A= return __arch__swab32(x);=0A= 6cac: 00441025 or v0,v0,a0=0A= 6cb0: 00071e02 srl v1,a3,0x18=0A= 6cb4: 00431025 or v0,v0,v1=0A= 6cb8: aca20000 sw v0,0(a1)=0A= mdelay(20);=0A= 6cbc: 3c040000 lui a0,0x0=0A= 6cc0: 8c840000 lw a0,0(a0)=0A= 6cc4: 3c031999 lui v1,0x1999=0A= 6cc8: 24050013 li a1,19=0A= 6ccc: 346396c0 ori v1,v1,0x96c0=0A= 6cd0: 2406ffff li a2,-1=0A= {=0A= unsigned long lo;=0A= =0A= usecs *=3D 0x00068db8; /* 2**32 / (1000000 / HZ) */=0A= __asm__("multu\t%2,%3"=0A= 6cd4: 00640019 multu v1,a0=0A= 6cd8: 00001010 mfhi v0=0A= ...=0A= 6ce4: 1440ffff bnez v0,6ce4 = =0A= 6ce8: 2442ffff addiu v0,v0,-1=0A= 6cec: 24a5ffff addiu a1,a1,-1=0A= 6cf0: 14a6fff8 bne a1,a2,6cd4 = =0A= 6cf4: 00000000 nop=0A= }=0A= /* clean out old buffers */=0A= e1000_clean_rx_ring(adapter);=0A= 6cf8: 3c020000 lui v0,0x0=0A= 6cfc: 244228d8 addiu v0,v0,10456=0A= 6d00: 0040f809 jalr v0=0A= 6d04: 02202021 move a0,s1=0A= e1000_clean_tx_ring(adapter);=0A= 6d08: 3c020000 lui v0,0x0=0A= 6d0c: 24422720 addiu v0,v0,10016=0A= 6d10: 0040f809 jalr v0=0A= 6d14: 02202021 move a0,s1=0A= * It also implies a memory barrier.=0A= */=0A= extern __inline__ int=0A= test_and_clear_bit(int nr, volatile void *addr)=0A= {=0A= 6d18: 2630008c addiu s0,s1,140=0A= unsigned long *m =3D ((unsigned long *) addr) + (nr >> 5);=0A= unsigned long temp, res;=0A= =0A= __asm__ __volatile__(=0A= 6d1c: 24020004 li v0,4=0A= 6d20: c2040000 ll a0,0(s0)=0A= 6d24: 00821825 or v1,a0,v0=0A= 6d28: 00621826 xor v1,v1,v0=0A= 6d2c: e2030000 sc v1,0(s0)=0A= 6d30: 1060fffb beqz v1,6d20 = =0A= 6d34: 00821824 and v1,a0,v0=0A= if(test_and_clear_bit(E1000_DIAG_OPEN, &adapter->flags)) {=0A= 6d38: 10600010 beqz v1,6d7c = =0A= 6d3c: 8fbf0018 lw ra,24(sp)=0A= e1000_free_tx_resources(adapter);=0A= 6d40: 3c020000 lui v0,0x0=0A= 6d44: 244226b4 addiu v0,v0,9908=0A= 6d48: 0040f809 jalr v0=0A= 6d4c: 02202021 move a0,s1=0A= e1000_free_rx_resources(adapter);=0A= 6d50: 3c020000 lui v0,0x0=0A= 6d54: 2442284c addiu v0,v0,10316=0A= 6d58: 0040f809 jalr v0=0A= 6d5c: 02202021 move a0,s1=0A= {=0A= unsigned long *m =3D ((unsigned long *) addr) + (nr >> 5);=0A= unsigned long temp;=0A= =0A= __asm__ __volatile__(=0A= 6d60: c2030000 ll v1,0(s0)=0A= 6d64: 2401fffe li at,-2=0A= 6d68: 00611824 and v1,v1,at=0A= 6d6c: e2030000 sc v1,0(s0)=0A= 6d70: 1060fffb beqz v1,6d60 = =0A= 6d74: 00000000 nop=0A= clear_bit(E1000_BOARD_OPEN, &adapter->flags);=0A= }=0A= }=0A= 6d78: 8fbf0018 lw ra,24(sp)=0A= 6d7c: 8fb10014 lw s1,20(sp)=0A= 6d80: 8fb00010 lw s0,16(sp)=0A= 6d84: 03e00008 jr ra=0A= 6d88: 27bd0020 addiu sp,sp,32=0A= =0A= 00006d8c :=0A= =0A= static int=0A= e1000_check_lbtest_frame(struct sk_buff *skb,=0A= unsigned int frame_size)=0A= {=0A= frame_size =3D (frame_size % 2) ? (frame_size - 1) : frame_size;=0A= if(*(skb->data + 3) =3D=3D 0xFF) {=0A= 6d8c: 8c860080 lw a2,128(a0)=0A= 6d90: 30a20001 andi v0,a1,0x1=0A= 6d94: 00a22823 subu a1,a1,v0=0A= 6d98: 90c40003 lbu a0,3(a2)=0A= if((*(skb->data + frame_size / 2 + 10) =3D=3D 0xBE) &&=0A= 6d9c: 00052842 srl a1,a1,0x1=0A= 6da0: 240300ff li v1,255=0A= 6da4: 240700be li a3,190=0A= 6da8: 14830008 bne a0,v1,6dcc =0A= 6dac: 00c53021 addu a2,a2,a1=0A= 6db0: 90c3000a lbu v1,10(a2)=0A= 6db4: 240400af li a0,175=0A= 6db8: 14670004 bne v1,a3,6dcc =0A= 6dbc: 24020001 li v0,1=0A= 6dc0: 90c3000c lbu v1,12(a2)=0A= 6dc4: 10640002 beq v1,a0,6dd0 =0A= 6dc8: 00000000 nop=0A= (*(skb->data + frame_size / 2 + 12) =3D=3D 0xAF)) {=0A= return 1;=0A= }=0A= }=0A= return 0;=0A= 6dcc: 00001021 move v0,zero=0A= }=0A= 6dd0: 03e00008 jr ra=0A= 6dd4: 00000000 nop=0A= =0A= 00006dd8 :=0A= 6dd8: 27bdfeb8 addiu sp,sp,-328=0A= 6ddc: afb5013c sw s5,316(sp)=0A= 6de0: afb40138 sw s4,312(sp)=0A= 6de4: afb30134 sw s3,308(sp)=0A= 6de8: afb1012c sw s1,300(sp)=0A= 6dec: afbf0140 sw ra,320(sp)=0A= 6df0: afb20130 sw s2,304(sp)=0A= 6df4: afb00128 sw s0,296(sp)=0A= 6df8: 00a09821 move s3,a1=0A= #endif /* IDIAG */=0A= =0A= #ifdef SIOCETHTOOL=0A= /**=0A= * e1000_ethtool_ioctl - Ethtool Ioctl Support =0A= * @netdev: net device structure =0A= * @ifr: interface request structure =0A= **/=0A= =0A= static int=0A= e1000_ethtool_ioctl(struct net_device *netdev,=0A= struct ifreq *ifr)=0A= {=0A= struct ethtool_cmd eth_cmd;=0A= struct e1000_adapter *adapter =3D netdev->priv;=0A= boolean_t re_initiate =3D FALSE;=0A= =0A= #ifdef ETHTOOL_GLINK=0A= struct ethtool_value eth_e1000_linkinfo;=0A= #endif=0A= #ifdef ETHTOOL_GDRVINFO=0A= struct ethtool_drvinfo eth_e1000_info;=0A= #endif=0A= #ifdef ETHTOOL_GWOL=0A= struct ethtool_wolinfo eth_e1000_wolinfo;=0A= #endif=0A= =0A= /* Get the data structure */=0A= if(copy_from_user(ð_cmd, ifr->ifr_data, sizeof(eth_cmd)))=0A= 6dfc: 8e650010 lw a1,16(s3)=0A= 6e00: 8f8303bc lw v1,956(gp)=0A= 6e04: 0080a821 move s5,a0=0A= 6e08: 24a2002c addiu v0,a1,44=0A= 6e0c: 00a21025 or v0,a1,v0=0A= 6e10: 00621824 and v1,v1,v0=0A= 6e14: 8eb20064 lw s2,100(s5)=0A= 6e18: 00008821 move s1,zero=0A= 6e1c: 27b40010 addiu s4,sp,16=0A= 6e20: 04600006 bltz v1,6e3c =0A= 6e24: 2406002c li a2,44=0A= 6e28: 02802021 move a0,s4=0A= 6e2c: 3c010000 lui at,0x0=0A= 6e30: 24210000 addiu at,at,0=0A= 6e34: 0020f809 jalr at=0A= 6e38: 00a60821 addu at,a1,a2=0A= 6e3c: 14c00162 bnez a2,73c8 =0A= 6e40: 2402fff2 li v0,-14=0A= return -EFAULT;=0A= =0A= switch (eth_cmd.cmd) {=0A= 6e44: 8fa20010 lw v0,16(sp)=0A= 6e48: 2442ffff addiu v0,v0,-1=0A= 6e4c: 2c43000a sltiu v1,v0,10=0A= 6e50: 5060015d beqzl v1,73c8 =0A= 6e54: 2402ff86 li v0,-122=0A= 6e58: 00021080 sll v0,v0,0x2=0A= 6e5c: 3c030000 lui v1,0x0=0A= 6e60: 00621821 addu v1,v1,v0=0A= 6e64: 8c630f48 lw v1,3912(v1)=0A= 6e68: 00600008 jr v1=0A= 6e6c: 00000000 nop=0A= /* Get the information */=0A= case ETHTOOL_GSET:=0A= if(adapter->shared.media_type =3D=3D e1000_media_type_copper) {=0A= 6e70: 8e420010 lw v0,16(s2)=0A= 6e74: 1440000c bnez v0,6ea8 =0A= 6e78: 24030440 li v1,1088=0A= eth_cmd.supported =3D = E1000_ETHTOOL_COPPER_INTERFACE_SUPPORTS;=0A= 6e7c: 2404026f li a0,623=0A= eth_cmd.advertising =3D = E1000_ETHTOOL_COPPER_INTERFACE_ADVERTISE;=0A= eth_cmd.port =3D PORT_MII;=0A= 6e80: 24020002 li v0,2=0A= 6e84: afa40018 sw a0,24(sp)=0A= 6e88: a3a2001f sb v0,31(sp)=0A= 6e8c: afa40014 sw a0,20(sp)=0A= eth_cmd.phy_address =3D adapter->shared.phy_addr;=0A= 6e90: 9243002f lbu v1,47(s2)=0A= 6e94: a3a30020 sb v1,32(sp)=0A= eth_cmd.transceiver =3D=0A= 6e98: 8e42000c lw v0,12(s2)=0A= 6e9c: 2c420003 sltiu v0,v0,3=0A= (adapter->shared.mac_type >=0A= e1000_82543) ? XCVR_INTERNAL : XCVR_EXTERNAL;=0A= } else {=0A= 6ea0: 08001bae j 6eb8 =0A= 6ea4: a3a20021 sb v0,33(sp)=0A= eth_cmd.supported =3D E1000_ETHTOOL_FIBER_INTERFACE_SUPPORTS;=0A= eth_cmd.advertising =3D = E1000_ETHTOOL_FIBER_INTERFACE_ADVERTISE;=0A= eth_cmd.port =3D PORT_FIBRE;=0A= 6ea8: 24020003 li v0,3=0A= 6eac: afa30018 sw v1,24(sp)=0A= 6eb0: a3a2001f sb v0,31(sp)=0A= 6eb4: afa30014 sw v1,20(sp)=0A= }=0A= =0A= if(adapter->link_active =3D=3D TRUE) {=0A= 6eb8: 8e4300b0 lw v1,176(s2)=0A= 6ebc: 24020001 li v0,1=0A= 6ec0: 54620010 bnel v1,v0,6f04 =0A= 6ec4: a7a0001c sh zero,28(sp)=0A= e1000_get_speed_and_duplex(&adapter->shared, = &adapter->link_speed,=0A= 6ec8: 265000b4 addiu s0,s2,180=0A= 6ecc: 265100b6 addiu s1,s2,182=0A= 6ed0: 3c020000 lui v0,0x0=0A= 6ed4: 24420000 addiu v0,v0,0=0A= 6ed8: 26440008 addiu a0,s2,8=0A= 6edc: 02002821 move a1,s0=0A= 6ee0: 0040f809 jalr v0=0A= 6ee4: 02203021 move a2,s1=0A= &adapter->link_duplex);=0A= eth_cmd.speed =3D adapter->link_speed;=0A= 6ee8: 96030000 lhu v1,0(s0)=0A= 6eec: a7a3001c sh v1,28(sp)=0A= eth_cmd.duplex =3D=0A= 6ef0: 96220000 lhu v0,0(s1)=0A= 6ef4: 38420002 xori v0,v0,0x2=0A= 6ef8: 2c420001 sltiu v0,v0,1=0A= (adapter->link_duplex =3D=3D=0A= FULL_DUPLEX) ? DUPLEX_FULL : DUPLEX_HALF;=0A= } else {=0A= 6efc: 08001bc2 j 6f08 =0A= 6f00: a3a2001e sb v0,30(sp)=0A= eth_cmd.speed =3D 0;=0A= eth_cmd.duplex =3D 0;=0A= 6f04: a3a0001e sb zero,30(sp)=0A= }=0A= =0A= if(adapter->shared.autoneg)=0A= 6f08: 92420078 lbu v0,120(s2)=0A= 6f0c: 10400003 beqz v0,6f1c =0A= 6f10: 24020001 li v0,1=0A= eth_cmd.autoneg =3D AUTONEG_ENABLE;=0A= 6f14: 08001bc8 j 6f20 =0A= 6f18: a3a20022 sb v0,34(sp)=0A= else=0A= eth_cmd.autoneg =3D AUTONEG_DISABLE;=0A= 6f1c: a3a00022 sb zero,34(sp)=0A= =0A= if(copy_to_user(ifr->ifr_data, ð_cmd, sizeof(eth_cmd)))=0A= 6f20: 8e640010 lw a0,16(s3)=0A= 6f24: 8f8303bc lw v1,956(gp)=0A= 6f28: 2482002c addiu v0,a0,44=0A= 6f2c: 00821025 or v0,a0,v0=0A= 6f30: 00621824 and v1,v1,v0=0A= 6f34: 0460011d bltz v1,73ac =0A= 6f38: 2406002c li a2,44=0A= 6f3c: 02802821 move a1,s4=0A= 6f40: 3c010000 lui at,0x0=0A= 6f44: 24210000 addiu at,at,0=0A= 6f48: 0020f809 jalr at=0A= 6f4c: 00000000 nop=0A= return -EFAULT;=0A= 6f50: 08001ceb j 73ac =0A= 6f54: 00000000 nop=0A= =0A= static inline int capable(int cap)=0A= {=0A= #if 1 /* ok now */=0A= if (cap_raised(current->cap_effective, cap))=0A= 6f58: 8f8201d4 lw v0,468(gp)=0A= 6f5c: 30421000 andi v0,v0,0x1000=0A= 6f60: 10400005 beqz v0,6f78 =0A= 6f64: 24030001 li v1,1=0A= #else=0A= if (cap_is_fs_cap(cap) ? current->fsuid =3D=3D 0 : current->euid =3D=3D = 0)=0A= #endif=0A= {=0A= current->flags |=3D PF_SUPERPRIV;=0A= 6f68: 8f820004 lw v0,4(gp)=0A= 6f6c: 34420100 ori v0,v0,0x100=0A= return 1;=0A= 6f70: 08001bdf j 6f7c =0A= 6f74: af820004 sw v0,4(gp)=0A= }=0A= return 0;=0A= 6f78: 00001821 move v1,zero=0A= =0A= break;=0A= =0A= /* set information */=0A= case ETHTOOL_SSET:=0A= /* need proper permission to do set */=0A= if(!capable(CAP_NET_ADMIN))=0A= 6f7c: 10600112 beqz v1,73c8 =0A= 6f80: 2402ffff li v0,-1=0A= return -EPERM;=0A= =0A= /* Cannot Force speed/duplex and at the same time autoneg.=0A= * Autoneg will override forcing. =0A= * For example to force speed/duplex pass in =0A= * 'speed 100 duplex half autoneg off'=0A= * pass in 'autoneg on' to start autoneg.=0A= */=0A= printk("e1000: Requested link to be forced to %d Speed, %s = Duplex "=0A= 6f84: 93a2001e lbu v0,30(sp)=0A= 6f88: 3c060000 lui a2,0x0=0A= 6f8c: 24c60284 addiu a2,a2,644=0A= 6f90: 14400003 bnez v0,6fa0 =0A= 6f94: 97a5001c lhu a1,28(sp)=0A= 6f98: 3c060000 lui a2,0x0=0A= 6f9c: 24c6028c addiu a2,a2,652=0A= 6fa0: 93a20022 lbu v0,34(sp)=0A= 6fa4: 3c070000 lui a3,0x0=0A= 6fa8: 24e70e30 addiu a3,a3,3632=0A= 6fac: 14400003 bnez v0,6fbc =0A= 6fb0: 00000000 nop=0A= 6fb4: 3c070000 lui a3,0x0=0A= 6fb8: 24e70e44 addiu a3,a3,3652=0A= 6fbc: 3c040000 lui a0,0x0=0A= 6fc0: 24840df0 addiu a0,a0,3568=0A= 6fc4: 3c100000 lui s0,0x0=0A= 6fc8: 26100000 addiu s0,s0,0=0A= 6fcc: 0200f809 jalr s0=0A= 6fd0: 00000000 nop=0A= "%s\n", eth_cmd.speed, (eth_cmd.duplex ? "Full" : "Half"),=0A= (eth_cmd.autoneg ? "and Autonegotiate" : "."));=0A= =0A= if(eth_cmd.autoneg && eth_cmd.speed)=0A= 6fd4: 93a30022 lbu v1,34(sp)=0A= 6fd8: 10600016 beqz v1,7034 =0A= 6fdc: 97a2001c lhu v0,28(sp)=0A= 6fe0: 10400006 beqz v0,6ffc =0A= 6fe4: 00000000 nop=0A= printk("e1000: Autoneg request will over-ride speed = forcing\n");=0A= 6fe8: 3c040000 lui a0,0x0=0A= 6fec: 24840e48 addiu a0,a0,3656=0A= 6ff0: 0200f809 jalr s0=0A= 6ff4: 00000000 nop=0A= 6ff8: 93a30022 lbu v1,34(sp)=0A= =0A= /* if not in autoneg mode and have been asked to enable autoneg = */=0A= if(eth_cmd.autoneg) {=0A= 6ffc: 1060000d beqz v1,7034 =0A= 7000: 97a2001c lhu v0,28(sp)=0A= if(adapter->shared.autoneg &&=0A= 7004: 92420078 lbu v0,120(s2)=0A= 7008: 10400004 beqz v0,701c =0A= 700c: 2403002f li v1,47=0A= 7010: 96440048 lhu a0,72(s2)=0A= 7014: 108300ec beq a0,v1,73c8 =0A= 7018: 00001021 move v0,zero=0A= adapter->shared.autoneg_advertised =3D=3D = AUTONEG_ADV_DEFAULT)=0A= /* If already in Autoneg */=0A= return 0;=0A= else {=0A= adapter->shared.autoneg =3D 1;=0A= 701c: 24030001 li v1,1=0A= adapter->shared.autoneg_advertised =3D = AUTONEG_ADV_DEFAULT;=0A= 7020: 2402002f li v0,47=0A= 7024: a6420048 sh v0,72(s2)=0A= 7028: a2430078 sb v1,120(s2)=0A= re_initiate =3D TRUE;=0A= }=0A= }=0A= 702c: 08001c6c j 71b0 =0A= 7030: 24110001 li s1,1=0A= /* Force link to whatever speed and duplex */=0A= /* Also turning off Autoneg in case of non-gig speeds */=0A= else if(eth_cmd.speed) {=0A= 7034: 1040005e beqz v0,71b0 =0A= 7038: 00402021 move a0,v0=0A= /* Check for invalid request */=0A= if(((eth_cmd.speed !=3D SPEED_10) && (eth_cmd.speed !=3D = SPEED_100) &&=0A= 703c: 3883000a xori v1,a0,0xa=0A= 7040: 38820064 xori v0,a0,0x64=0A= 7044: 0003182b sltu v1,zero,v1=0A= 7048: 0002102b sltu v0,zero,v0=0A= 704c: 00621824 and v1,v1,v0=0A= 7050: 10600003 beqz v1,7060 =0A= 7054: 240203e8 li v0,1000=0A= 7058: 148200db bne a0,v0,73c8 =0A= 705c: 2402ffea li v0,-22=0A= 7060: 93a2001e lbu v0,30(sp)=0A= 7064: 2c420002 sltiu v0,v0,2=0A= 7068: 104000d7 beqz v0,73c8 =0A= 706c: 2402ffea li v0,-22=0A= 7070: 8e430010 lw v1,16(s2)=0A= 7074: 24020001 li v0,1=0A= 7078: 10620063 beq v1,v0,7208 =0A= 707c: 265000b4 addiu s0,s2,180=0A= (eth_cmd.speed !=3D SPEED_1000)) ||=0A= ((eth_cmd.duplex !=3D DUPLEX_HALF) &&=0A= (eth_cmd.duplex !=3D DUPLEX_FULL)) ||=0A= (adapter->shared.media_type =3D=3D = e1000_media_type_fiber))=0A= return -EINVAL;=0A= =0A= e1000_get_speed_and_duplex(&adapter->shared, = &adapter->link_speed,=0A= 7080: 265100b6 addiu s1,s2,182=0A= 7084: 26440008 addiu a0,s2,8=0A= 7088: 02002821 move a1,s0=0A= 708c: 3c020000 lui v0,0x0=0A= 7090: 24420000 addiu v0,v0,0=0A= 7094: 0040f809 jalr v0=0A= 7098: 02203021 move a2,s1=0A= &adapter->link_duplex);=0A= /* If we are already forced to requested speed and duplex=0A= * Donot do anything, just return=0A= */=0A= if(!adapter->shared.autoneg &&=0A= 709c: 92430078 lbu v1,120(s2)=0A= 70a0: 5460000b bnezl v1,70d0 =0A= 70a4: a2400078 sb zero,120(s2)=0A= 70a8: 96030000 lhu v1,0(s0)=0A= 70ac: 97a2001c lhu v0,28(sp)=0A= 70b0: 54620007 bnel v1,v0,70d0 =0A= 70b4: a2400078 sb zero,120(s2)=0A= 70b8: 93a3001e lbu v1,30(sp)=0A= 70bc: 96240000 lhu a0,0(s1)=0A= 70c0: 24630001 addiu v1,v1,1=0A= 70c4: 108300c0 beq a0,v1,73c8 =0A= 70c8: 00001021 move v0,zero=0A= (adapter->link_speed =3D=3D eth_cmd.speed) &&=0A= (adapter->link_duplex =3D=3D (eth_cmd.duplex + 1)))=0A= =0A= return 0;=0A= =0A= adapter->shared.autoneg =3D 0;=0A= 70cc: a2400078 sb zero,120(s2)=0A= adapter->shared.autoneg_advertised =3D 0;=0A= 70d0: a6400048 sh zero,72(s2)=0A= re_initiate =3D TRUE;=0A= switch (eth_cmd.speed + eth_cmd.duplex) {=0A= 70d4: 97a2001c lhu v0,28(sp)=0A= 70d8: 93a3001e lbu v1,30(sp)=0A= 70dc: 24040064 li a0,100=0A= 70e0: 00431821 addu v1,v0,v1=0A= 70e4: 1064001a beq v1,a0,7150 =0A= 70e8: 24110001 li s1,1=0A= 70ec: 28620065 slti v0,v1,101=0A= 70f0: 10400008 beqz v0,7114 =0A= 70f4: 240203e8 li v0,1000=0A= 70f8: 2402000a li v0,10=0A= 70fc: 10620012 beq v1,v0,7148 =0A= 7100: 2402000b li v0,11=0A= 7104: 10620015 beq v1,v0,715c =0A= 7108: 24030001 li v1,1=0A= 710c: 08001c6a j 71a8 =0A= 7110: 24020020 li v0,32=0A= 7114: 10620016 beq v1,v0,7170 =0A= 7118: 286203e9 slti v0,v1,1001=0A= 711c: 10400006 beqz v0,7138 =0A= 7120: 240203e9 li v0,1001=0A= 7124: 24020065 li v0,101=0A= 7128: 1062000e beq v1,v0,7164 =0A= 712c: 24030001 li v1,1=0A= 7130: 08001c6a j 71a8 =0A= 7134: 24020020 li v0,32=0A= 7138: 10620013 beq v1,v0,7188 =0A= 713c: 24030001 li v1,1=0A= 7140: 08001c6a j 71a8 =0A= 7144: 24020020 li v0,32=0A= case (SPEED_10 + DUPLEX_HALF):=0A= adapter->shared.forced_speed_duplex =3D e1000_10_half;=0A= break;=0A= 7148: 08001c6c j 71b0 =0A= 714c: a240007a sb zero,122(s2)=0A= case (SPEED_100 + DUPLEX_HALF):=0A= adapter->shared.forced_speed_duplex =3D e1000_100_half;=0A= 7150: 24020002 li v0,2=0A= break;=0A= 7154: 08001c6c j 71b0 =0A= 7158: a242007a sb v0,122(s2)=0A= case (SPEED_10 + DUPLEX_FULL):=0A= adapter->shared.forced_speed_duplex =3D e1000_10_full;=0A= break;=0A= 715c: 08001c6c j 71b0 =0A= 7160: a251007a sb s1,122(s2)=0A= case (SPEED_100 + DUPLEX_FULL):=0A= adapter->shared.forced_speed_duplex =3D e1000_100_full;=0A= 7164: 24020003 li v0,3=0A= break;=0A= 7168: 08001c6c j 71b0 =0A= 716c: a242007a sb v0,122(s2)=0A= case (SPEED_1000 + DUPLEX_HALF):=0A= printk("Half Duplex is not supported at 1000 Mbps\n");=0A= 7170: 3c040000 lui a0,0x0=0A= 7174: 24840e80 addiu a0,a0,3712=0A= 7178: 3c020000 lui v0,0x0=0A= 717c: 24420000 addiu v0,v0,0=0A= 7180: 0040f809 jalr v0=0A= 7184: 00000000 nop=0A= case (SPEED_1000 + DUPLEX_FULL):=0A= printk("Using Auto-neg at 1000 Mbps Full Duplex\n");=0A= 7188: 3c040000 lui a0,0x0=0A= 718c: 24840eac addiu a0,a0,3756=0A= 7190: 3c020000 lui v0,0x0=0A= 7194: 24420000 addiu v0,v0,0=0A= 7198: 0040f809 jalr v0=0A= 719c: 00000000 nop=0A= default:=0A= adapter->shared.autoneg =3D 1;=0A= 71a0: 24030001 li v1,1=0A= adapter->shared.autoneg_advertised =3D = ADVERTISE_1000_FULL;=0A= 71a4: 24020020 li v0,32=0A= 71a8: a6420048 sh v0,72(s2)=0A= 71ac: a2430078 sb v1,120(s2)=0A= break;=0A= }=0A= }=0A= =0A= /* End of force */=0A= /* Put the adapter to new settings */=0A= if(re_initiate =3D=3D TRUE) {=0A= 71b0: 24020001 li v0,1=0A= 71b4: 56220005 bnel s1,v0,71cc =0A= 71b8: 93a20022 lbu v0,34(sp)=0A= e1000_hibernate_adapter(netdev);=0A= 71bc: 3c020000 lui v0,0x0=0A= 71c0: 24420000 addiu v0,v0,0=0A= e1000_wakeup_adapter(netdev);=0A= } else if(!eth_cmd.autoneg && !eth_cmd.speed) {=0A= 71c4: 08001c96 j 7258 =0A= 71c8: 02a02021 move a0,s5=0A= 71cc: 1440007e bnez v0,73c8 =0A= 71d0: 2402ff86 li v0,-122=0A= 71d4: 97a2001c lhu v0,28(sp)=0A= 71d8: 5440007b bnezl v0,73c8 =0A= 71dc: 2402ff86 li v0,-122=0A= printk("Cannot turn off autoneg without "=0A= 71e0: 3c040000 lui a0,0x0=0A= 71e4: 24840ed8 addiu a0,a0,3800=0A= 71e8: 3c100000 lui s0,0x0=0A= 71ec: 26100000 addiu s0,s0,0=0A= 71f0: 0200f809 jalr s0=0A= 71f4: 00000000 nop=0A= "knowing what speed to force the link\n");=0A= printk("Speed specified was %dMbps\n", eth_cmd.speed);=0A= 71f8: 3c040000 lui a0,0x0=0A= 71fc: 24840f20 addiu a0,a0,3872=0A= 7200: 0200f809 jalr s0=0A= 7204: 97a5001c lhu a1,28(sp)=0A= return -EINVAL;=0A= 7208: 08001cf2 j 73c8 =0A= 720c: 2402ffea li v0,-22=0A= =0A= static inline int capable(int cap)=0A= {=0A= #if 1 /* ok now */=0A= if (cap_raised(current->cap_effective, cap))=0A= 7210: 8f8201d4 lw v0,468(gp)=0A= 7214: 30421000 andi v0,v0,0x1000=0A= 7218: 10400005 beqz v0,7230 =0A= 721c: 24030001 li v1,1=0A= #else=0A= if (cap_is_fs_cap(cap) ? current->fsuid =3D=3D 0 : current->euid =3D=3D = 0)=0A= #endif=0A= {=0A= current->flags |=3D PF_SUPERPRIV;=0A= 7220: 8f820004 lw v0,4(gp)=0A= 7224: 34420100 ori v0,v0,0x100=0A= return 1;=0A= 7228: 08001c8d j 7234 =0A= 722c: af820004 sw v0,4(gp)=0A= }=0A= return 0;=0A= 7230: 00001821 move v1,zero=0A= }=0A= /* We donot support setting of =0A= * whatever else that was requested */=0A= else=0A= return -EOPNOTSUPP;=0A= =0A= break;=0A= =0A= #ifdef ETHTOOL_NWAY_RST=0A= case ETHTOOL_NWAY_RST:=0A= /* need proper permission to restart auto-negotiation */=0A= if(!capable(CAP_NET_ADMIN))=0A= 7234: 10600064 beqz v1,73c8 =0A= 7238: 2402ffff li v0,-1=0A= return -EPERM;=0A= =0A= adapter->shared.autoneg =3D 1;=0A= 723c: 24030001 li v1,1=0A= adapter->shared.autoneg_advertised =3D AUTONEG_ADV_DEFAULT;=0A= 7240: 2402002f li v0,47=0A= 7244: a6420048 sh v0,72(s2)=0A= e1000_hibernate_adapter(netdev);=0A= 7248: 02a02021 move a0,s5=0A= 724c: 3c020000 lui v0,0x0=0A= 7250: 24420000 addiu v0,v0,0=0A= 7254: a2430078 sb v1,120(s2)=0A= 7258: 0040f809 jalr v0=0A= 725c: 00000000 nop=0A= e1000_wakeup_adapter(netdev);=0A= 7260: 3c020000 lui v0,0x0=0A= 7264: 24420000 addiu v0,v0,0=0A= 7268: 0040f809 jalr v0=0A= 726c: 02a02021 move a0,s5=0A= =0A= break;=0A= 7270: 08001cf2 j 73c8 =0A= 7274: 00001021 move v0,zero=0A= #endif=0A= =0A= #ifdef ETHTOOL_GLINK=0A= case ETHTOOL_GLINK:=0A= eth_e1000_linkinfo.data =3D adapter->link_active;=0A= 7278: 8e4200b0 lw v0,176(s2)=0A= if(copy_to_user(ifr->ifr_data, ð_e1000_linkinfo, = sizeof(eth_e1000_linkinfo)))=0A= 727c: 8e640010 lw a0,16(s3)=0A= 7280: 27a50040 addiu a1,sp,64=0A= 7284: afa20044 sw v0,68(sp)=0A= 7288: 8f8303bc lw v1,956(gp)=0A= 728c: 24820008 addiu v0,a0,8=0A= 7290: 00821025 or v0,a0,v0=0A= 7294: 00621824 and v1,v1,v0=0A= 7298: 04600044 bltz v1,73ac =0A= 729c: 24060008 li a2,8=0A= 72a0: 3c010000 lui at,0x0=0A= 72a4: 24210000 addiu at,at,0=0A= 72a8: 0020f809 jalr at=0A= 72ac: 00000000 nop=0A= return -EFAULT;=0A= 72b0: 08001ceb j 73ac =0A= 72b4: 00000000 nop=0A= break;=0A= #endif=0A= =0A= #ifdef ETHTOOL_GDRVINFO=0A= case ETHTOOL_GDRVINFO:=0A= strcpy(eth_e1000_info.driver, e1000_driver_name);=0A= 72b8: 27a3004c addiu v1,sp,76=0A= 72bc: 3c020000 lui v0,0x0=0A= 72c0: 24420000 addiu v0,v0,0=0A= extern __inline__ char *strcpy(char *__dest, __const__ char *__src)=0A= {=0A= char *__xdest =3D __dest;=0A= =0A= __asm__ __volatile__(=0A= 72c4: 90410000 lbu at,0(v0)=0A= 72c8: 24420001 addiu v0,v0,1=0A= 72cc: a0610000 sb at,0(v1)=0A= 72d0: 1420fffc bnez at,72c4 =0A= 72d4: 24630001 addiu v1,v1,1=0A= strcpy(eth_e1000_info.version, e1000_driver_version);=0A= 72d8: 27a4006c addiu a0,sp,108=0A= 72dc: 3c020000 lui v0,0x0=0A= 72e0: 24420000 addiu v0,v0,0=0A= extern __inline__ char *strcpy(char *__dest, __const__ char *__src)=0A= {=0A= char *__xdest =3D __dest;=0A= =0A= __asm__ __volatile__(=0A= 72e4: 90410000 lbu at,0(v0)=0A= 72e8: 24420001 addiu v0,v0,1=0A= 72ec: a0810000 sb at,0(a0)=0A= 72f0: 1420fffc bnez at,72e4 =0A= 72f4: 24840001 addiu a0,a0,1=0A= strcpy(eth_e1000_info.fw_version, "None");=0A= 72f8: 27a3008c addiu v1,sp,140=0A= 72fc: 3c020000 lui v0,0x0=0A= 7300: 24420f3c addiu v0,v0,3900=0A= extern __inline__ char *strcpy(char *__dest, __const__ char *__src)=0A= {=0A= char *__xdest =3D __dest;=0A= =0A= __asm__ __volatile__(=0A= 7304: 90410000 lbu at,0(v0)=0A= 7308: 24420001 addiu v0,v0,1=0A= 730c: a0610000 sb at,0(v1)=0A= 7310: 1420fffc bnez at,7304 =0A= 7314: 24630001 addiu v1,v1,1=0A= strcpy(eth_e1000_info.bus_info, adapter->pdev->slot_name);=0A= 7318: 8e44014c lw a0,332(s2)=0A= 731c: 27a200ac addiu v0,sp,172=0A= 7320: 24840270 addiu a0,a0,624=0A= extern __inline__ char *strcpy(char *__dest, __const__ char *__src)=0A= {=0A= char *__xdest =3D __dest;=0A= =0A= __asm__ __volatile__(=0A= 7324: 90810000 lbu at,0(a0)=0A= 7328: 24840001 addiu a0,a0,1=0A= 732c: a0410000 sb at,0(v0)=0A= 7330: 1420fffc bnez at,7324 =0A= 7334: 24420001 addiu v0,v0,1=0A= if(copy_to_user(ifr->ifr_data, ð_e1000_info, = sizeof(eth_e1000_info)))=0A= 7338: 8e640010 lw a0,16(s3)=0A= 733c: 8f8303bc lw v1,956(gp)=0A= 7340: 27a50048 addiu a1,sp,72=0A= 7344: 248200c4 addiu v0,a0,196=0A= 7348: 00821025 or v0,a0,v0=0A= 734c: 00621824 and v1,v1,v0=0A= 7350: 04600016 bltz v1,73ac =0A= 7354: 240600c4 li a2,196=0A= 7358: 3c010000 lui at,0x0=0A= 735c: 24210000 addiu at,at,0=0A= 7360: 0020f809 jalr at=0A= 7364: 00000000 nop=0A= return -EFAULT;=0A= 7368: 08001ceb j 73ac =0A= 736c: 00000000 nop=0A= break;=0A= #endif=0A= =0A= #ifdef ETHTOOL_GWOL=0A= case ETHTOOL_GWOL:=0A= eth_e1000_wolinfo.supported =3D eth_e1000_wolinfo.wolopts =3D = WAKE_MAGIC;=0A= if(copy_to_user=0A= 7370: 8e640010 lw a0,16(s3)=0A= 7374: 24020020 li v0,32=0A= 7378: afa20114 sw v0,276(sp)=0A= 737c: afa20118 sw v0,280(sp)=0A= 7380: 8f8303bc lw v1,956(gp)=0A= 7384: 24820014 addiu v0,a0,20=0A= 7388: 00821025 or v0,a0,v0=0A= 738c: 00621824 and v1,v1,v0=0A= 7390: 27a50110 addiu a1,sp,272=0A= 7394: 04600005 bltz v1,73ac =0A= 7398: 24060014 li a2,20=0A= 739c: 3c010000 lui at,0x0=0A= 73a0: 24210000 addiu at,at,0=0A= 73a4: 0020f809 jalr at=0A= 73a8: 00000000 nop=0A= 73ac: 10c00005 beqz a2,73c4 =0A= 73b0: 2402fff2 li v0,-14=0A= (ifr->ifr_data, ð_e1000_wolinfo, = sizeof(eth_e1000_wolinfo)))=0A= return -EFAULT;=0A= 73b4: 08001cf3 j 73cc =0A= 73b8: 8fbf0140 lw ra,320(sp)=0A= break;=0A= #endif=0A= =0A= default:=0A= return -EOPNOTSUPP;=0A= 73bc: 08001cf2 j 73c8 =0A= 73c0: 2402ff86 li v0,-122=0A= }=0A= =0A= return 0;=0A= 73c4: 00001021 move v0,zero=0A= =0A= }=0A= 73c8: 8fbf0140 lw ra,320(sp)=0A= 73cc: 8fb5013c lw s5,316(sp)=0A= 73d0: 8fb40138 lw s4,312(sp)=0A= 73d4: 8fb30134 lw s3,308(sp)=0A= 73d8: 8fb20130 lw s2,304(sp)=0A= 73dc: 8fb1012c lw s1,300(sp)=0A= 73e0: 8fb00128 lw s0,296(sp)=0A= 73e4: 03e00008 jr ra=0A= 73e8: 27bd0148 addiu sp,sp,328=0A= =0A= 000073ec :=0A= 73ec: 00804021 move t0,a0=0A= #endif /* SIOCETHTOOL */=0A= =0A= /**=0A= * e1000_enable_WOL - Wake On Lan Support (Magic Pkt)=0A= * @adapter: Adapter structure =0A= **/=0A= =0A= static void=0A= e1000_enable_WOL(struct e1000_adapter *adapter)=0A= {=0A= uint32_t wuc_val;=0A= =0A= if(adapter->shared.mac_type <=3D e1000_82543)=0A= 73f0: 8d06000c lw a2,12(t0)=0A= 73f4: 2cc20003 sltiu v0,a2,3=0A= 73f8: 1440001f bnez v0,7478 =0A= 73fc: 2cc20002 sltiu v0,a2,2=0A= return;=0A= =0A= /* Set up Wake-Up Ctrl reg */=0A= wuc_val =3D E1000_READ_REG(&adapter->shared, WUC);=0A= 7400: 8d070008 lw a3,8(t0)=0A= __arch__swab16s(addr);=0A= }=0A= =0A= static __inline__ __const__ __u32 __fswab32(__u32 x)=0A= {=0A= 7404: 8ce55800 lw a1,22528(a3)=0A= return __arch__swab32(x);=0A= 7408: 30a3ff00 andi v1,a1,0xff00=0A= 740c: 00052600 sll a0,a1,0x18=0A= 7410: 00051202 srl v0,a1,0x8=0A= 7414: 00031a00 sll v1,v1,0x8=0A= 7418: 00832025 or a0,a0,v1=0A= 741c: 3042ff00 andi v0,v0,0xff00=0A= 7420: 00822025 or a0,a0,v0=0A= 7424: 00052e02 srl a1,a1,0x18=0A= 7428: 00852825 or a1,a0,a1=0A= wuc_val &=3D ~(E1000_WUC_APME | E1000_WUC_APMPME);=0A= 742c: 2402fff6 li v0,-10=0A= 7430: 00a22824 and a1,a1,v0=0A= wuc_val |=3D (E1000_WUC_PME_STATUS | E1000_WUC_PME_EN);=0A= 7434: 2cc30002 sltiu v1,a2,2=0A= 7438: 34a50006 ori a1,a1,0x6=0A= }=0A= =0A= static __inline__ __const__ __u32 __fswab32(__u32 x)=0A= {=0A= return __arch__swab32(x);=0A= 743c: 30a4ff00 andi a0,a1,0xff00=0A= 7440: 00042200 sll a0,a0,0x8=0A= 7444: 00051600 sll v0,a1,0x18=0A= 7448: 00051a02 srl v1,a1,0x8=0A= 744c: 00441025 or v0,v0,a0=0A= 7450: 3063ff00 andi v1,v1,0xff00=0A= 7454: 00431025 or v0,v0,v1=0A= 7458: 00052602 srl a0,a1,0x18=0A= 745c: 00441025 or v0,v0,a0=0A= =0A= E1000_WRITE_REG(&adapter->shared, WUC, wuc_val);=0A= 7460: ace25800 sw v0,22528(a3)=0A= 7464: 8d02000c lw v0,12(t0)=0A= 7468: 2c420002 sltiu v0,v0,2=0A= =0A= /* Set up Wake-up Filter */=0A= E1000_WRITE_REG(&adapter->shared, WUFC, E1000_WUFC_MAG);=0A= =0A= return;=0A= }=0A= 746c: 8d030008 lw v1,8(t0)=0A= 7470: 3c020200 lui v0,0x200=0A= 7474: ac625808 sw v0,22536(v1)=0A= 7478: 03e00008 jr ra=0A= 747c: 00000000 nop=0A= =0A= 00007480 :=0A= 7480: 27bdffe8 addiu sp,sp,-24=0A= 7484: afbf0010 sw ra,16(sp)=0A= =0A= /**=0A= * e1000_write_pci_cg -=0A= * @shared:=0A= * @reg:=0A= * @value:=0A= **/=0A= =0A= void=0A= e1000_write_pci_cfg(struct e1000_shared_adapter *shared,=0A= uint32_t reg,=0A= uint16_t *value)=0A= {=0A= struct e1000_adapter *adapter =3D (struct e1000_adapter *) = shared->back;=0A= 7488: 8c82000c lw v0,12(a0)=0A= =0A= pci_write_config_word(adapter->pdev, reg, *value);=0A= 748c: 8c44014c lw a0,332(v0)=0A= 7490: 3c020000 lui v0,0x0=0A= 7494: 24420000 addiu v0,v0,0=0A= 7498: 0040f809 jalr v0=0A= 749c: 94c60000 lhu a2,0(a2)=0A= return;=0A= }=0A= 74a0: 8fbf0010 lw ra,16(sp)=0A= 74a4: 03e00008 jr ra=0A= 74a8: 27bd0018 addiu sp,sp,24=0A= =0A= 000074ac :=0A= 74ac: 8c82000c lw v0,12(a0)=0A= 74b0: 2c420002 sltiu v0,v0,2=0A= __arch__swab16s(addr);=0A= }=0A= =0A= static __inline__ __const__ __u32 __fswab32(__u32 x)=0A= {=0A= 74b4: 8c8500cc lw a1,204(a0)=0A= 74b8: 8c860008 lw a2,8(a0)=0A= }=0A= =0A= static __inline__ __const__ __u32 __fswab32(__u32 x)=0A= {=0A= return __arch__swab32(x);=0A= 74bc: 30a4ff00 andi a0,a1,0xff00=0A= 74c0: 00051600 sll v0,a1,0x18=0A= 74c4: 00051a02 srl v1,a1,0x8=0A= 74c8: 00042200 sll a0,a0,0x8=0A= 74cc: 00441025 or v0,v0,a0=0A= 74d0: 3063ff00 andi v1,v1,0xff00=0A= 74d4: 00431025 or v0,v0,v1=0A= 74d8: 00052e02 srl a1,a1,0x18=0A= 74dc: 00451025 or v0,v0,a1=0A= 74e0: acc200d0 sw v0,208(a2)=0A= 74e4: 03e00008 jr ra=0A= 74e8: 00000000 nop=0A= =0A= 000074ec :=0A= 74ec: 00803821 move a3,a0=0A= 74f0: 8ce2000c lw v0,12(a3)=0A= 74f4: 2c420002 sltiu v0,v0,2=0A= 74f8: 14400006 bnez v0,7514 =0A= 74fc: 3c042000 lui a0,0x2000=0A= 7500: 8ca2000c lw v0,12(a1)=0A= 7504: 3c032400 lui v1,0x2400=0A= 7508: 00431024 and v0,v0,v1=0A= 750c: 50440003 beql v0,a0,751c =0A= 7510: 90a2000d lbu v0,13(a1)=0A= 7514: 03e00008 jr ra=0A= 7518: a0c0006b sb zero,107(a2)=0A= 751c: 30420020 andi v0,v0,0x20=0A= 7520: 1040000b beqz v0,7550 =0A= 7524: 24020002 li v0,2=0A= 7528: a0c0006b sb zero,107(a2)=0A= 752c: 8ce20140 lw v0,320(a3)=0A= 7530: 8ce30144 lw v1,324(a3)=0A= 7534: 24630001 addiu v1,v1,1=0A= 7538: 2c640001 sltiu a0,v1,1=0A= 753c: 00441021 addu v0,v0,a0=0A= 7540: ace20140 sw v0,320(a3)=0A= 7544: ace30144 sw v1,324(a3)=0A= 7548: 03e00008 jr ra=0A= 754c: 00000000 nop=0A= 7550: a0c2006b sb v0,107(a2)=0A= 7554: 8ce40138 lw a0,312(a3)=0A= 7558: 8ce5013c lw a1,316(a3)=0A= 755c: 24a50001 addiu a1,a1,1=0A= 7560: 2ca20001 sltiu v0,a1,1=0A= 7564: 00822021 addu a0,a0,v0=0A= 7568: ace40138 sw a0,312(a3)=0A= 756c: ace5013c sw a1,316(a3)=0A= 7570: 03e00008 jr ra=0A= ...=0A= ------=_NextPart_000_002F_01C1BBCA.589767F0-- From owner-linux-mips@oss.sgi.com Sat Feb 23 19:06:44 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g1O36iU16550 for linux-mips-outgoing; Sat, 23 Feb 2002 19:06:44 -0800 Received: from nevyn.them.org (mail@NEVYN.RES.CMU.EDU [128.2.145.6]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g1O36g916547 for ; Sat, 23 Feb 2002 19:06:42 -0800 Received: from drow by nevyn.them.org with local (Exim 3.34 #1 (Debian)) id 16eo3E-0000Oj-00; Sat, 23 Feb 2002 21:06:08 -0500 Date: Sat, 23 Feb 2002 21:06:08 -0500 From: Daniel Jacobowitz To: Matthew Dharm Cc: Linux-MIPS Subject: Re: Is this a toolchain bug? Message-ID: <20020223210608.A1424@nevyn.them.org> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.3.23i Sender: owner-linux-mips@oss.sgi.com Precedence: bulk On Fri, Feb 22, 2002 at 05:57:08PM -0800, Matthew Dharm wrote: > If this is user-error, I'd love to know what I'm doing wrong. If this > is a toolchain bug, who do I report this to? User error, at least what you've described. Add the -r flag to the objdump command line, or look at a statically linked object. -- Daniel Jacobowitz Carnegie Mellon University MontaVista Software Debian GNU/Linux Developer From owner-linux-mips@oss.sgi.com Sun Feb 24 00:17:06 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g1O8H6E23250 for linux-mips-outgoing; Sun, 24 Feb 2002 00:17:06 -0800 Received: from mail.ict.ac.cn ([159.226.39.4]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g1O8H2923246 for ; Sun, 24 Feb 2002 00:17:02 -0800 Message-Id: <200202240817.g1O8H2923246@oss.sgi.com> Received: (qmail 19959 invoked from network); 24 Feb 2002 07:20:38 -0000 Received: from unknown (HELO foxsen) (@159.226.40.150) by 159.226.39.4 with SMTP; 24 Feb 2002 07:20:38 -0000 Date: Sun, 24 Feb 2002 15:13:50 +0800 From: Zhang Fuxin To: "H . J . Lu" CC: "linux-mips@oss.sgi.com" Subject: Re: Re: Re: pthread support in mipsel-linux X-mailer: FoxMail 3.11 Release [cn] Mime-Version: 1.0 Content-Type: text/plain; charset="GB2312" Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by oss.sgi.com id g1O8H3923247 Sender: owner-linux-mips@oss.sgi.com Precedence: bulk hi, finally i manage to compile glibc-2.2.5 with gcc-3.1(both from latest cvs, with some patches for glibc),and 'make check' finish successfully after i comment out some math tests. ÔÚ 2002-02-22 22:11:00 you wrote£º >On Sat, Feb 23, 2002 at 11:12:06AM +0800, Zhang Fuxin wrote: >> hi, >> >> > >> >Mutex is now implemented with spin lock by default. BTW, how many >> >people have run "make check" on glibc compiled -mips1? >> I did with glibc-2.2.4 natively compiled,no failure till libm-test > >The linuxthreads test comes after math. > >> (i configured it by default,then it used -mips1?) >> > >Yes. BTW, I found the ll/sc bug by doing "make check" on gcc 3.1 in >CVS. > > >H.J. Regards Zhang Fuxin fxzhang@ict.ac.cn From owner-linux-mips@oss.sgi.com Sun Feb 24 00:22:45 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g1O8Mj023350 for linux-mips-outgoing; Sun, 24 Feb 2002 00:22:45 -0800 Received: from dtla2.teknuts.com (adsl-66-125-62-110.dsl.lsan03.pacbell.net [66.125.62.110]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g1O8Mh923347 for ; Sun, 24 Feb 2002 00:22:43 -0800 Received: from delllaptop ([208.187.134.66]) (authenticated) by dtla2.teknuts.com (8.11.3/8.10.1) with ESMTP id g1O7MhC03802 for ; Sat, 23 Feb 2002 23:22:44 -0800 From: "Robert Rusek" To: Subject: Working kernel 2.4.x for IP22 Date: Sat, 23 Feb 2002 23:18:13 -0800 Message-ID: <001501c1bd03$6ca133e0$6601a8c0@delllaptop> 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.3416 Importance: Normal X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 Sender: owner-linux-mips@oss.sgi.com Precedence: bulk Does anyone know of a 2.4.x working kernel for IP22? If so where do I get the source or the binary? I am currently using 2.4.3, but it seems to have a bug, that if you are doing heavy IO operations on a filesystem other then the root, the machine completely locks up. Any help would be greatly appreciated. Thanks -- Robert Rusek From owner-linux-mips@oss.sgi.com Sun Feb 24 04:10:40 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g1OCAe426505 for linux-mips-outgoing; Sun, 24 Feb 2002 04:10:40 -0800 Received: from noose.gt.owl.de (postfix@noose.gt.owl.de [62.52.19.4]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g1OCAZ926501 for ; Sun, 24 Feb 2002 04:10:35 -0800 Received: by noose.gt.owl.de (Postfix, from userid 10) id 801FE84F; Sun, 24 Feb 2002 12:10:09 +0100 (CET) Received: by localhost (Postfix, from userid 1000) id F2A231A2DF; Sun, 24 Feb 2002 12:10:38 +0100 (CET) Date: Sun, 24 Feb 2002 12:10:38 +0100 From: Florian Lohoff To: Robert Rusek Cc: linux-mips@oss.sgi.com Subject: Re: Working kernel 2.4.x for IP22 Message-ID: <20020224111038.GB30796@paradigm.rfc822.org> References: <001501c1bd03$6ca133e0$6601a8c0@delllaptop> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="vGgW1X5XWziG23Ko" Content-Disposition: inline In-Reply-To: <001501c1bd03$6ca133e0$6601a8c0@delllaptop> User-Agent: Mutt/1.3.27i Organization: rfc822 - pure communication Sender: owner-linux-mips@oss.sgi.com Precedence: bulk --vGgW1X5XWziG23Ko Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sat, Feb 23, 2002 at 11:18:13PM -0800, Robert Rusek wrote: > Does anyone know of a 2.4.x working kernel for IP22? If so where do I > get the source or the binary? I am currently using 2.4.3, but it seems > to have a bug, that if you are doing heavy IO operations on a filesystem > other then the root, the machine completely locks up. =20 The 2.4 branch in the oss.sgi.com cvs works as far as i used it. 2.4.16 and 2.4.17 have been running here. Flo --=20 Florian Lohoff flo@rfc822.org +49-5201-669912 Nine nineth on september the 9th Welcome to the new billenium --vGgW1X5XWziG23Ko Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.6 (GNU/Linux) Comment: For info see http://www.gnupg.org iD8DBQE8eMouUaz2rXW+gJcRAqDDAKCP2RXwHhAoJTXyC689+DYonfzwOgCeIGwF WZokkGLBu/IheoptvO4w8rs= =l5sN -----END PGP SIGNATURE----- --vGgW1X5XWziG23Ko-- From owner-linux-mips@oss.sgi.com Sun Feb 24 12:44:02 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g1OKi2L05237 for linux-mips-outgoing; Sun, 24 Feb 2002 12:44:02 -0800 Received: from dvmwest.gt.owl.de (dvmwest.gt.owl.de [62.52.24.140]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g1OKhv905233 for ; Sun, 24 Feb 2002 12:43:57 -0800 Received: by dvmwest.gt.owl.de (Postfix, from userid 1001) id 7ACF4A056; Sun, 24 Feb 2002 20:43:54 +0100 (CET) Date: Sun, 24 Feb 2002 20:43:54 +0100 From: Jan-Benedict Glaw To: linux-mips@oss.sgi.com Subject: Re: Problem with delo Message-ID: <20020224204354.C18596@lug-owl.de> Mail-Followup-To: linux-mips@oss.sgi.com References: <20020222191734.B15503@lug-owl.de> <20020223191126.GA18791@paradigm.rfc822.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="JWEK1jqKZ6MHAcjA" Content-Disposition: inline In-Reply-To: <20020223191126.GA18791@paradigm.rfc822.org> User-Agent: Mutt/1.3.23i X-Operating-System: Linux mail 2.4.15-pre2 Sender: owner-linux-mips@oss.sgi.com Precedence: bulk --JWEK1jqKZ6MHAcjA Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sat, 2002-02-23 20:11:26 +0100, Florian Lohoff wrote in message <20020223191126.GA18791@paradigm.rfc822.org>: > On Fri, Feb 22, 2002 at 07:17:34PM +0100, Jan-Benedict Glaw wrote: > > extfs_open returned Unknown ext2 error(2133571404) > > Couldnt fetch config.file /etc/delo.conf >=20 > Hmmm - looks strange ... =46rom my understanding, the stage-2 part is loaded by a known block list, but the kernel is then fetched with the help of the e2fs lib. Delo contains an own version of this lib. Does it work with the current ext2 code? ...or is there maybe a Problem with only supporting the "old" ext2 code (from 2.0.x time)? I'll test this as soon as I've again placed the box on a desk. MfG, JBG PS: Windowmaker is running fine on it, but the keyboard mapping is a bit wrong when running X11. There's no space on the space key:-( --=20 Jan-Benedict Glaw . jbglaw@lug-owl.de . +49-172-7608481 -- New APT-Proxy written in shell script -- http://lug-owl.de/~jbglaw/software/ap2/ --JWEK1jqKZ6MHAcjA Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.6 (GNU/Linux) Comment: For info see http://www.gnupg.org iEYEARECAAYFAjx5QnkACgkQHb1edYOZ4bv90QCeMQK36Dtx3o6EGEDZjzB9mZlt 1ooAn1S/oITuVT74ul7IrGnEAtPKyYEA =skmb -----END PGP SIGNATURE----- --JWEK1jqKZ6MHAcjA-- From owner-linux-mips@oss.sgi.com Sun Feb 24 19:30:57 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g1P3Uvp24789 for linux-mips-outgoing; Sun, 24 Feb 2002 19:30:57 -0800 Received: from host099.momenco.com (IDENT:root@www.momenco.com [64.169.228.99]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g1P3Ur924766 for ; Sun, 24 Feb 2002 19:30:53 -0800 Received: (from mdharm@localhost) by host099.momenco.com (8.11.6/8.11.6) id g1P2UpC17314; Sun, 24 Feb 2002 18:30:51 -0800 Date: Sun, 24 Feb 2002 18:30:51 -0800 From: Matthew Dharm To: Daniel Jacobowitz Cc: Linux-MIPS Subject: Re: Is this a toolchain bug? Message-ID: <20020224183051.B17291@momenco.com> References: <20020223210608.A1424@nevyn.them.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <20020223210608.A1424@nevyn.them.org>; from dan@debian.org on Sat, Feb 23, 2002 at 09:06:08PM -0500 Organization: Momentum Computer, Inc. X-Copyright: (C) 2002 Matthew Dharm, all rights reserved. Sender: owner-linux-mips@oss.sgi.com Precedence: bulk Okay, so I added that flag, and it actually seems to be correct. But, the question remains, why does accessing that variable cause a problem? I'm going to do some more digging when I'm in the office tomorrow, but one of the tests I already did was to put e1000_proc_dev = NULL; at one point in the code. That line caused a crash with what looked like a NULL-ptr dereference. I'm going to re-examine this tomorrow, but I'm wondering if any of the people on this list that are using this driver have CONFIG_PROC_FS turned on. Matt On Sat, Feb 23, 2002 at 09:06:08PM -0500, Daniel Jacobowitz wrote: > On Fri, Feb 22, 2002 at 05:57:08PM -0800, Matthew Dharm wrote: > > If this is user-error, I'd love to know what I'm doing wrong. If this > > is a toolchain bug, who do I report this to? > > User error, at least what you've described. Add the -r flag to the > objdump command line, or look at a statically linked object. > > -- > Daniel Jacobowitz Carnegie Mellon University > MontaVista Software Debian GNU/Linux Developer -- Matthew Dharm Work: mdharm@momenco.com Senior Software Designer, Momentum Computer From owner-linux-mips@oss.sgi.com Sun Feb 24 19:47:59 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g1P3lx529625 for linux-mips-outgoing; Sun, 24 Feb 2002 19:47:59 -0800 Received: from dtla2.teknuts.com (adsl-66-125-62-110.dsl.lsan03.pacbell.net [66.125.62.110]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g1P3lt929605 for ; Sun, 24 Feb 2002 19:47:55 -0800 Received: from delllaptop ([208.187.134.59]) (authenticated) by dtla2.teknuts.com (8.11.3/8.10.1) with ESMTP id g1P2llP09699; Sun, 24 Feb 2002 18:47:49 -0800 From: "Robert Rusek" To: "'Florian Lohoff'" Cc: Subject: RE: Latest kernel? Date: Sun, 24 Feb 2002 18:43:17 -0800 Message-ID: <001401c1bda6$352f7d10$6601a8c0@delllaptop> 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.3416 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 In-Reply-To: <20020220221507.GC29624@paradigm.rfc822.org> Importance: Normal Sender: owner-linux-mips@oss.sgi.com Precedence: bulk Florian, I checked the oss.sgi.com cvs and they do not seem to have linux_2_4 only linux-2.4-xfs. Is that what I am looking for? Will that give me a working 2.4.x kernel? Thanks in advance, Rob. -----Original Message----- From: owner-linux-mips@oss.sgi.com [mailto:owner-linux-mips@oss.sgi.com] On Behalf Of Florian Lohoff Sent: Wednesday, February 20, 2002 2:15 PM To: Robert Rusek Cc: linux-mips@oss.sgi.com Subject: Re: Latest kernel? On Wed, Feb 20, 2002 at 02:00:36PM -0800, Robert Rusek wrote: > Where can I obtain the latest stable build of the kernel. I need it > to work on my SGI IP22. If possible I do not want to use CSV since I > do not have a high speed internet connection. Any help would be > greatly appreciated. I dont think there are regular tarballs - Take the pain once - checkout the kernel and before modifying make a tarball. Then you can just cvs -z3 update -Pd Your tarball all the time. BTW: You should checkout -r linux_2_4 as i dont think 2.5 has success reports on mips already. Flo -- Florian Lohoff flo@rfc822.org +49-5201-669912 Nine nineth on september the 9th Welcome to the new billenium From owner-linux-mips@oss.sgi.com Sun Feb 24 20:12:09 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g1P4C9V03575 for linux-mips-outgoing; Sun, 24 Feb 2002 20:12:09 -0800 Received: from dea.linux-mips.net (a1as13-p121.stg.tli.de [195.252.191.121]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g1P4C4903553 for ; Sun, 24 Feb 2002 20:12:05 -0800 Received: (from ralf@localhost) by dea.linux-mips.net (8.11.6/8.11.1) id g1P3BtV03165; Mon, 25 Feb 2002 04:11:55 +0100 Date: Mon, 25 Feb 2002 04:11:54 +0100 From: Ralf Baechle To: Jun Sun Cc: linux-mips@oss.sgi.com Subject: Re: FPU emul and segmentation fault bug Message-ID: <20020225041154.A2993@dea.linux-mips.net> References: <3C76F53D.2C893BC7@mvista.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <3C76F53D.2C893BC7@mvista.com>; from jsun@mvista.com on Fri, Feb 22, 2002 at 05:49:49PM -0800 X-Accept-Language: de,en,fr Sender: owner-linux-mips@oss.sgi.com Precedence: bulk On Fri, Feb 22, 2002 at 05:49:49PM -0800, Jun Sun wrote: > I remember a while back we had a problem with FPU emulation code which causes > a segmentation fault. (Perhaps another symptom is bus error, but I am not > 100% sure). > > Apparently this problem is fixed in the recent kernel. However, it shows up > again in SMP mode. > > Does anybody remember details of the problem and the fix? I am afraid maybe > something we did there is not SMP safe. That's most probably a SMP cache invalidation bug. What happens is that remote CPUs try to invalidate the same address range as a local CPU as well without any consideration that the active context of the remote CPU might be different from the local one. In combination with another bug this may actually crash the whole system. Ralf From owner-linux-mips@oss.sgi.com Sun Feb 24 20:49:33 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g1P4nXU13298 for linux-mips-outgoing; Sun, 24 Feb 2002 20:49:33 -0800 Received: from dtla2.teknuts.com (adsl-66-125-62-110.dsl.lsan03.pacbell.net [66.125.62.110]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g1P4nV913288 for ; Sun, 24 Feb 2002 20:49:31 -0800 Received: from delllaptop ([208.187.134.59]) (authenticated) by dtla2.teknuts.com (8.11.3/8.10.1) with ESMTP id g1P3nTP09901 for ; Sun, 24 Feb 2002 19:49:29 -0800 From: "Robert Rusek" To: Subject: System lockup problem. . . Date: Sun, 24 Feb 2002 19:45:06 -0800 Message-ID: <000701c1bdae$d226c580$6601a8c0@delllaptop> 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.3416 Importance: Normal X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 Sender: owner-linux-mips@oss.sgi.com Precedence: bulk I am running Kernel 2.4.3 on an SGI Indy (IP22). I built the RedHat 7.1 system from the NFS root obtained from ftp.mips.com. Everything seems to be working until I added an additional drive. Now when I do an heavy IO operation on the additional drive my system locks up. It seems like there is not enough buffer allocated somewhere. I know that the drive is not an issue since when I boot the system up under IRIX 5.3 all works well.. Has anyone had a similar problem? Where should I look? Is is an Kernel issue or a setting in the OS? Thanks in advance, -- Robert Rusek From owner-linux-mips@oss.sgi.com Sun Feb 24 23:06:19 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g1P76JY14229 for linux-mips-outgoing; Sun, 24 Feb 2002 23:06:19 -0800 Received: from post.webmailer.de (natwar.webmailer.de [192.67.198.70]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g1P76C914202 for ; Sun, 24 Feb 2002 23:06:15 -0800 Received: from excalibur.cologne.de (p508519A6.dip.t-dialin.net [80.133.25.166]) by post.webmailer.de (8.9.3/8.8.7) with ESMTP id HAA24893; Mon, 25 Feb 2002 07:05:51 +0100 (MET) Received: from karsten by excalibur.cologne.de with local (Exim 3.12 #1 (Debian)) id 16fENx-00007r-00; Mon, 25 Feb 2002 07:13:17 +0100 Date: Mon, 25 Feb 2002 07:13:16 +0100 From: Karsten Merker To: Robert Rusek Cc: linux-mips@oss.sgi.com Subject: Re: Latest kernel? Message-ID: <20020225071315.A256@excalibur.cologne.de> Mail-Followup-To: Karsten Merker , Robert Rusek , linux-mips@oss.sgi.com References: <20020220221507.GC29624@paradigm.rfc822.org> <001401c1bda6$352f7d10$6601a8c0@delllaptop> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <001401c1bda6$352f7d10$6601a8c0@delllaptop>; from robru@teknuts.com on Sun, Feb 24, 2002 at 06:43:17PM -0800 X-No-Archive: yes Sender: owner-linux-mips@oss.sgi.com Precedence: bulk On Sun, Feb 24, 2002 at 06:43:17PM -0800, Robert Rusek wrote: > I checked the oss.sgi.com cvs and they do not seem to have linux_2_4 > only linux-2.4-xfs. Is that what I am looking for? Will that give me a > working 2.4.x kernel? cvs -z3 -d :pserver:cvs@oss.sgi.com:/cvs co -rlinux_2_4 linux Regards, Karsten -- #include Nach Paragraph 28 Abs. 3 Bundesdatenschutzgesetz widerspreche ich der Nutzung oder Uebermittlung meiner Daten fuer Werbezwecke oder fuer die Markt- oder Meinungsforschung. From owner-linux-mips@oss.sgi.com Mon Feb 25 00:20:01 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g1P8K1i31255 for linux-mips-outgoing; Mon, 25 Feb 2002 00:20:01 -0800 Received: from mail.yacme.com (adsl-133-11.38-151.net24.it [151.38.11.133]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g1P8Jh931196 for ; Mon, 25 Feb 2002 00:19:44 -0800 Received: (qmail 2524 invoked from network); 25 Feb 2002 07:19:36 -0000 Received: from cannonau.cantina.yacme (HELO yacme.com) (192.168.1.1) by lambrusco.cantina.yacme with SMTP; 25 Feb 2002 07:19:36 -0000 Message-ID: <3C79E588.19C0FE18@yacme.com> Date: Mon, 25 Feb 2002 08:19:36 +0100 From: Carlo Agostini X-Mailer: Mozilla 4.77 [en] (X11; U; Linux 2.4.17-kipsec i686) X-Accept-Language: en MIME-Version: 1.0 To: linux-mips@oss.sgi.com Subject: Problems compiling . soft-float Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-linux-mips@oss.sgi.com Precedence: bulk Hi All Just to introduce the problem, here is a summary of what I have done. I work on an Linux port on an MIPS tx39(R3000) based hardware without hw floating point support . I finally managed to compile the glibc 2.2.5 for an mipstx39el-linux configuration for 2.2.14 Kernel . I'm working on a Pentium III PC with RedHat7.1 I used binutils 2.11.2 and gcc 3.0.3 The parameters I have used for configuration were the following: ---- configure glibc-2.2.5 ---- configure --host=mipsel-linux\ --target=mipstx39el-linux\ --enable-add-ons\ --build=i686-pc-linux-gnu\ --prefix=$PREFIX \ --without-fp -v I first generated a glibc (just typing make, with the default Makefiles). ..... problem, it seems that the --without-fp has not the expected effects. I am trying to port microwindows on an mips tx39 Then, I tried to pass explicitly -msoft-float to gcc as an argument ..... mipstx39el-linux-gcc -v -I/utenti/agostini/prova/mw/src/include -msoft-float -Wall -O3 -s -L/utenti/agostini/prova/mw/src/lib -o /utenti/agostini/prova/mw/src/bin/nano-X srvmain.o srvfunc.o srvutil.o srvevent.o srvclip.o srvnet.o /utenti/agostini/prova/mw/src/lib/libmwengine.a /utenti/agostini/prova/mw/src/lib/libmwdrivers.a /utenti/agostini/prova/mw/src/lib/libmwfonts.a -L/utenti/agostini/prova/mw/src/lib Reading specs from /utenti/agostini/mipstx39-linux/lib/gcc-lib/mipstx39el-linux/3.0.3/specs Configured with: ../../gcc-3.0.3/configure --with-gcc-version-trigger=/utenti/agostini/mipstx39-linux/src/gcc-3.0.3/gcc/version.c --host=i686-pc-linux-gnu --prefix=/utenti/agostini/mipstx39-linux --target=mipstx39el-linux --with-gnu-ld --with-gnu-as --disable-shared --enable-languages=c -v Thread model: single gcc version 3.0.3 /utenti/agostini/mipstx39-linux/lib/gcc-lib/mipstx39el-linux/3.0.3/collect2 -EL -dynamic-linker /lib/ld.so.1 -o /utenti/agostini/prova/mw/src/bin/nano-X -s /utenti/agostini/mipstx39-linux/lib/gcc-lib/mipstx39el-linux/3.0.3/../../../../mipstx39el-linux/lib/crt1.o /utenti/agostini/mipstx39-linux/lib/gcc-lib/mipstx39el-linux/3.0.3/../../../../mipstx39el-linux/lib/crti.o /utenti/agostini/mipstx39-linux/lib/gcc-lib/mipstx39el-linux/3.0.3/crtbegin.o -L/utenti/agostini/prova/mw/src/lib -L/utenti/agostini/prova/mw/src/lib -L/utenti/agostini/mipstx39-linux/lib/gcc-lib/mipstx39el-linux/3.0.3 -L/utenti/agostini/mipstx39-linux/lib/gcc-lib/mipstx39el-linux/3.0.3/../../../../mipstx39el-linux/lib srvmain.o srvfunc.o srvutil.o srvevent.o srvclip.o srvnet.o /utenti/agostini/prova/mw/src/lib/libmwengine.a /utenti/agostini/prova/mw/src/lib/libmwdrivers.a /utenti/agostini/prova/mw/src/lib/libmwfonts.a -lgcc -lc -lgcc /utenti/agostini/mipstx39-linux/lib/gcc-lib/mipstx39el-linux/3.0.3/crtend.o /utenti/agostini/mipstx39-linux/lib/gcc-lib/mipstx39el-linux/3.0.3/../../../../mipstx39el-linux/lib/crtn.o /utenti/agostini/prova/mw/src/lib/libmwengine.a(devarc.o): In function `qcos': devarc.o(.text+0x28): undefined reference to `fptosi' devarc.o(.text+0x4c): undefined reference to `sitofp' devarc.o(.text+0x64): undefined reference to `fpsub' devarc.o(.text+0x104): undefined reference to `fpmul' devarc.o(.text+0x11c): undefined reference to `fpadd' devarc.o(.text+0x164): undefined reference to `fpmul' devarc.o(.text+0x18c): undefined reference to `fpsub' devarc.o(.text+0x1d4): undefined reference to `fpmul' devarc.o(.text+0x1ec): undefined reference to `fpsub' devarc.o(.text+0x220): undefined reference to `fpmul' devarc.o(.text+0x238): undefined reference to `fpadd' devarc.o(.text+0x250): undefined reference to `fpsub' devarc.o(.text+0x268): undefined reference to `sitofp' devarc.o(.text+0x280): undefined reference to `fpsub' /utenti/agostini/prova/mw/src/lib/libmwengine.a(devarc.o): In function `qsin': devarc.o(.text+0x2cc): undefined reference to `fptosi' devarc.o(.text+0x2f4): undefined reference to `sitofp' devarc.o(.text+0x30c): undefined reference to `fpsub' devarc.o(.text+0x3ac): undefined reference to `fpmul' devarc.o(.text+0x3c4): undefined reference to `fpadd' devarc.o(.text+0x40c): undefined reference to `fpmul' devarc.o(.text+0x434): undefined reference to `fpsub' devarc.o(.text+0x47c): undefined reference to `fpmul' devarc.o(.text+0x494): undefined reference to `fpsub' devarc.o(.text+0x4c8): undefined reference to `fpmul' devarc.o(.text+0x4e0): undefined reference to `fpadd' devarc.o(.text+0x4f8): undefined reference to `fpsub' devarc.o(.text+0x510): undefined reference to `sitofp' devarc.o(.text+0x528): undefined reference to `fpsub' /utenti/agostini/prova/mw/src/lib/libmwengine.a(devarc.o): In function `GdArcAngle': devarc.o(.text+0xc14): undefined reference to `litodp' devarc.o(.text+0xc34): undefined reference to `dpmul' devarc.o(.text+0xc4c): undefined reference to `dptofp' devarc.o(.text+0xc84): undefined reference to `sitofp' devarc.o(.text+0xca0): undefined reference to `fpmul' devarc.o(.text+0xcb4): undefined reference to `fptosi' devarc.o(.text+0xccc): undefined reference to `litodp' devarc.o(.text+0xcec): undefined reference to `dpmul' devarc.o(.text+0xd04): undefined reference to `dptofp' devarc.o(.text+0xd3c): undefined reference to `fpmul' devarc.o(.text+0xd50): undefined reference to `fptosi' devarc.o(.text+0xd8c): undefined reference to `fpsub' devarc.o(.text+0xdc4): undefined reference to `fpsub' devarc.o(.text+0xddc): undefined reference to `sitofp' devarc.o(.text+0xdf8): undefined reference to `fpmul' devarc.o(.text+0xe0c): undefined reference to `fptosi' devarc.o(.text+0xe28): undefined reference to `fpmul' devarc.o(.text+0xe3c): undefined reference to `fptosi' /utenti/agostini/mipstx39-linux/lib/libc.so.6: undefined reference to `no symbol' collect2: ld returned 1 exit status Has anyone information about this problem ? Does anyone know where could I find a set of floating-point instructions library ? you can help me ? Thanking you in advance Carlo. From owner-linux-mips@oss.sgi.com Mon Feb 25 02:46:58 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g1PAkwR03289 for linux-mips-outgoing; Mon, 25 Feb 2002 02:46:58 -0800 Received: from noose.gt.owl.de (postfix@noose.gt.owl.de [62.52.19.4]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g1PAkr903264 for ; Mon, 25 Feb 2002 02:46:54 -0800 Received: by noose.gt.owl.de (Postfix, from userid 10) id 539F883E; Mon, 25 Feb 2002 10:46:28 +0100 (CET) Received: by localhost (Postfix, from userid 1000) id 418331A3AC; Mon, 25 Feb 2002 10:45:25 +0100 (CET) Date: Mon, 25 Feb 2002 10:45:25 +0100 From: Florian Lohoff To: Robert Rusek Cc: linux-mips@oss.sgi.com Subject: Re: Latest kernel? Message-ID: <20020225094525.GA16992@paradigm.rfc822.org> References: <20020220221507.GC29624@paradigm.rfc822.org> <001401c1bda6$352f7d10$6601a8c0@delllaptop> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="82I3+IH0IqGh5yIs" Content-Disposition: inline In-Reply-To: <001401c1bda6$352f7d10$6601a8c0@delllaptop> User-Agent: Mutt/1.3.27i Organization: rfc822 - pure communication Sender: owner-linux-mips@oss.sgi.com Precedence: bulk --82I3+IH0IqGh5yIs Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sun, Feb 24, 2002 at 06:43:17PM -0800, Robert Rusek wrote: > Florian, >=20 > I checked the oss.sgi.com cvs and they do not seem to have linux_2_4 > only linux-2.4-xfs. Is that what I am looking for? Will that give me a > working 3.4.x kernel? Nope - The repository is "linux" and the tag is "linux_2_4" Flo --=20 Florian Lohoff flo@rfc822.org +49-5201-669912 Nine nineth on september the 9th Welcome to the new billenium --82I3+IH0IqGh5yIs Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.6 (GNU/Linux) Comment: For info see http://www.gnupg.org iD8DBQE8ege1Uaz2rXW+gJcRAkEmAJ9bpKO0s8Rt9zeQW1WosZ2cxMSMygCfa6PM mm/FNFkCTL11LcsmWAde6AE= =DWc3 -----END PGP SIGNATURE----- --82I3+IH0IqGh5yIs-- From owner-linux-mips@oss.sgi.com Mon Feb 25 02:53:35 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g1PArZ905340 for linux-mips-outgoing; Mon, 25 Feb 2002 02:53:35 -0800 Received: from noose.gt.owl.de (postfix@noose.gt.owl.de [62.52.19.4]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g1PArS905296 for ; Mon, 25 Feb 2002 02:53:29 -0800 Received: by noose.gt.owl.de (Postfix, from userid 10) id 0ADAC836; Mon, 25 Feb 2002 10:53:03 +0100 (CET) Received: by localhost (Postfix, from userid 1000) id 78C0D1A3AC; Mon, 25 Feb 2002 10:52:43 +0100 (CET) Date: Mon, 25 Feb 2002 10:52:43 +0100 From: Florian Lohoff To: Robert Rusek Cc: linux-mips@oss.sgi.com Subject: Re: System lockup problem. . . Message-ID: <20020225095243.GC16992@paradigm.rfc822.org> References: <000701c1bdae$d226c580$6601a8c0@delllaptop> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="JWEK1jqKZ6MHAcjA" Content-Disposition: inline In-Reply-To: <000701c1bdae$d226c580$6601a8c0@delllaptop> User-Agent: Mutt/1.3.27i Organization: rfc822 - pure communication Sender: owner-linux-mips@oss.sgi.com Precedence: bulk --JWEK1jqKZ6MHAcjA Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sun, Feb 24, 2002 at 07:45:06PM -0800, Robert Rusek wrote: > I am running Kernel 2.4.3 on an SGI Indy (IP22). I built the RedHat 7.1 > system from the NFS root obtained from ftp.mips.com. Everything seems to > be working until I added an additional drive. Now when I do an heavy IO > operation on the additional drive my system locks up. It seems like > there is not enough buffer allocated somewhere. I know that the drive is > not an issue since when I boot the system up under IRIX 5.3 all works > well.. Has anyone had a similar problem? Where should I look? Is is > an Kernel issue or a setting in the OS? Its a know bug in the scsi drivers. Its been fixed since 2.4.16. Its a problem with scattered DMA etc. Flo --=20 Florian Lohoff flo@rfc822.org +49-5201-669912 Nine nineth on september the 9th Welcome to the new billenium --JWEK1jqKZ6MHAcjA Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.6 (GNU/Linux) Comment: For info see http://www.gnupg.org iD8DBQE8eglrUaz2rXW+gJcRArx6AJwJTWGMhGl6syiBkWqU72dgqh+5owCgxbz4 0VcaNtaOTp+1d/15yVIqB+g= =kRw6 -----END PGP SIGNATURE----- --JWEK1jqKZ6MHAcjA-- From owner-linux-mips@oss.sgi.com Mon Feb 25 02:53:35 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g1PArZe05329 for linux-mips-outgoing; Mon, 25 Feb 2002 02:53:35 -0800 Received: from noose.gt.owl.de (postfix@noose.gt.owl.de [62.52.19.4]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g1PArS905295 for ; Mon, 25 Feb 2002 02:53:29 -0800 Received: by noose.gt.owl.de (Postfix, from userid 10) id DEAB57FA; Mon, 25 Feb 2002 10:53:03 +0100 (CET) Received: by localhost (Postfix, from userid 1000) id 98A661A3AC; Mon, 25 Feb 2002 10:51:11 +0100 (CET) Date: Mon, 25 Feb 2002 10:51:11 +0100 From: Florian Lohoff To: Jan-Benedict Glaw Cc: linux-mips@oss.sgi.com Subject: Re: Problem with delo Message-ID: <20020225095111.GB16992@paradigm.rfc822.org> References: <20020222191734.B15503@lug-owl.de> <20020223191126.GA18791@paradigm.rfc822.org> <20020224204354.C18596@lug-owl.de> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="R3G7APHDIzY6R/pk" Content-Disposition: inline In-Reply-To: <20020224204354.C18596@lug-owl.de> User-Agent: Mutt/1.3.27i Organization: rfc822 - pure communication Sender: owner-linux-mips@oss.sgi.com Precedence: bulk --R3G7APHDIzY6R/pk Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sun, Feb 24, 2002 at 08:43:54PM +0100, Jan-Benedict Glaw wrote: > From my understanding, the stage-2 part is loaded by a known block > list, but the kernel is then fetched with the help of the e2fs lib. Which is in the first 512 byte of the DISK > Delo contains an own version of this lib. Does it work with the > current ext2 code? ...or is there maybe a Problem with only supporting > the "old" ext2 code (from 2.0.x time)? I'll test this as soon as I've > again placed the box on a desk. Nope - The lib should be quiet recent - My guess was that either you have a /boot partition and delo trys to follow an interpartition symlink (Which it cant) Delo needs a major cleanup - The ELF loader needs to be fully rewritten=20 which i already did in Konstanz (Untestet - Unfinished). Flo --=20 Florian Lohoff flo@rfc822.org +49-5201-669912 Nine nineth on september the 9th Welcome to the new billenium --R3G7APHDIzY6R/pk Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.6 (GNU/Linux) Comment: For info see http://www.gnupg.org iD8DBQE8egkPUaz2rXW+gJcRAhnkAKDiuaX7rHolMyON+BeQWXNvkZBhFwCeOPZi rgRRj1PF1/1jle5zDJv0Rto= =Y6j2 -----END PGP SIGNATURE----- --R3G7APHDIzY6R/pk-- From owner-linux-mips@oss.sgi.com Mon Feb 25 06:13:20 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g1PEDKN29564 for linux-mips-outgoing; Mon, 25 Feb 2002 06:13:20 -0800 Received: from delta.ds2.pg.gda.pl (delta.ds2.pg.gda.pl [213.192.72.1]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g1PED1929502 for ; Mon, 25 Feb 2002 06:13:02 -0800 Received: from localhost by delta.ds2.pg.gda.pl (8.9.3/8.9.3) with SMTP id OAA15341; Mon, 25 Feb 2002 14:10:37 +0100 (MET) Date: Mon, 25 Feb 2002 14:10:36 +0100 (MET) From: "Maciej W. Rozycki" To: Matthew Dharm cc: Kevin Paul Herbert , Linux-MIPS Subject: Re: Anyone have the e1000.o driver working? In-Reply-To: <20020223123037.A8314@momenco.com> Message-ID: Organization: Technical University of Gdansk MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-linux-mips@oss.sgi.com Precedence: bulk On Sat, 23 Feb 2002, Matthew Dharm wrote: > Hopefully my last message will get through... but basically e1000_main.c > references and extern struct pointer, and the code generated doesn't look > right -- it does a lui v0,0x0 and then a lw v0,0(v0) which causes a crash. What's wrong with it? Doesn't it have a relocation attached (check with `objdump -r')? If so, that's a problem, otherwise there is nothing wrong with it. Since addresses of external symbols are only known at the load time, relocations in kernel modules are resolved by insmod. -- + Maciej W. Rozycki, Technical University of Gdansk, Poland + +--------------------------------------------------------------+ + e-mail: macro@ds2.pg.gda.pl, PGP key available + From owner-linux-mips@oss.sgi.com Mon Feb 25 07:02:39 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g1PF2dk08250 for linux-mips-outgoing; Mon, 25 Feb 2002 07:02:39 -0800 Received: from dea.linux-mips.net (a1as05-p32.stg.tli.de [195.252.187.32]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g1PF2Z908237 for ; Mon, 25 Feb 2002 07:02:36 -0800 Received: (from ralf@localhost) by dea.linux-mips.net (8.11.6/8.11.1) id g1PCPx003503; Mon, 25 Feb 2002 13:25:59 +0100 Date: Mon, 25 Feb 2002 13:25:59 +0100 From: Ralf Baechle To: Carlo Agostini Cc: linux-mips@oss.sgi.com Subject: Re: Problems compiling . soft-float Message-ID: <20020225132559.A3500@dea.linux-mips.net> References: <3C79E588.19C0FE18@yacme.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <3C79E588.19C0FE18@yacme.com>; from carlo.agostini@yacme.com on Mon, Feb 25, 2002 at 08:19:36AM +0100 X-Accept-Language: de,en,fr Sender: owner-linux-mips@oss.sgi.com Precedence: bulk On Mon, Feb 25, 2002 at 08:19:36AM +0100, Carlo Agostini wrote: > Then, I tried to pass explicitly -msoft-float to gcc as an argument > ..... Not supported. Use the kernel fp emulation. Ralf From owner-linux-mips@oss.sgi.com Mon Feb 25 08:17:06 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g1PGH6R19872 for linux-mips-outgoing; Mon, 25 Feb 2002 08:17:06 -0800 Received: from mx.mips.com (mx.mips.com [206.31.31.226]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g1PGH2919869 for ; Mon, 25 Feb 2002 08:17:02 -0800 Received: from newman.mips.com (ns-dmz [206.31.31.225]) by mx.mips.com (8.9.3/8.9.0) with ESMTP id HAA20689 for ; Mon, 25 Feb 2002 07:16:55 -0800 (PST) Received: from copfs01.mips.com (copfs01 [192.168.205.101]) by newman.mips.com (8.9.3/8.9.0) with ESMTP id HAA04455 for ; Mon, 25 Feb 2002 07:16:54 -0800 (PST) Received: from copsun18.mips.com (copsun18 [192.168.205.28]) by copfs01.mips.com (8.11.4/8.9.0) with ESMTP id g1PFGLA23624 for ; Mon, 25 Feb 2002 16:16:21 +0100 (MET) From: Hartvig Ekner Received: (from hartvige@localhost) by copsun18.mips.com (8.9.1/8.9.0) id QAA22570 for linux-mips@oss.sgi.com; Mon, 25 Feb 2002 16:16:20 +0100 (MET) Message-Id: <200202251516.QAA22570@copsun18.mips.com> Subject: Setting up of GP in static, non-PIC version of glibc? To: linux-mips@oss.sgi.com Date: Mon, 25 Feb 2002 16:16:20 +0100 (MET) X-Mailer: ELM [version 2.5 PL1] MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-linux-mips@oss.sgi.com Precedence: bulk I compiled a static, non-PIC version of glibc (from H.J's miniport SRPM) to allow testing of MIPS16[e] apps. One of the things that did not work, is that nobody sets up GP correctly in this case. Modifying "/usr/src/redhat/BUILD/glibc-2.2.4/sysdeps/mips/elf/start.S" to setup GP: .text .globl ENTRY_POINT .type ENTRY_POINT,@function ENTRY_POINT: #ifdef __PIC__ SET_GP #else la $28, _gp #endif Makes things work (this code ends in crt1.o). Is this the right place to fix it? /Hartvig From owner-linux-mips@oss.sgi.com Mon Feb 25 09:34:52 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g1PHYqQ21981 for linux-mips-outgoing; Mon, 25 Feb 2002 09:34:52 -0800 Received: from dea.linux-mips.net (a1as16-p206.stg.tli.de [195.252.192.206]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g1PHYm921978 for ; Mon, 25 Feb 2002 09:34:48 -0800 Received: (from ralf@localhost) by dea.linux-mips.net (8.11.6/8.11.1) id g1PGYXW03690; Mon, 25 Feb 2002 17:34:33 +0100 Date: Mon, 25 Feb 2002 17:34:33 +0100 From: Ralf Baechle To: Hartvig Ekner Cc: linux-mips@oss.sgi.com Subject: Re: Setting up of GP in static, non-PIC version of glibc? Message-ID: <20020225173433.B3680@dea.linux-mips.net> References: <200202251516.QAA22570@copsun18.mips.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <200202251516.QAA22570@copsun18.mips.com>; from hartvige@mips.com on Mon, Feb 25, 2002 at 04:16:20PM +0100 X-Accept-Language: de,en,fr Sender: owner-linux-mips@oss.sgi.com Precedence: bulk On Mon, Feb 25, 2002 at 04:16:20PM +0100, Hartvig Ekner wrote: > .globl ENTRY_POINT > .type ENTRY_POINT,@function > ENTRY_POINT: > #ifdef __PIC__ > SET_GP > #else > la $28, _gp > #endif > > Makes things work (this code ends in crt1.o). Is this the right place to > fix it? Non-PIC code doesn't use $gp, so any reference to $gp is a bug. Note that we don't support global data optimization for ELF either that is, -G 0 is the default. Ralf From owner-linux-mips@oss.sgi.com Mon Feb 25 10:06:40 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g1PI6eI24875 for linux-mips-outgoing; Mon, 25 Feb 2002 10:06:40 -0800 Received: from delta.ds2.pg.gda.pl (delta.ds2.pg.gda.pl [213.192.72.1]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g1PI63924869 for ; Mon, 25 Feb 2002 10:06:04 -0800 Received: from localhost by delta.ds2.pg.gda.pl (8.9.3/8.9.3) with SMTP id SAA20371; Mon, 25 Feb 2002 18:04:56 +0100 (MET) Date: Mon, 25 Feb 2002 18:04:55 +0100 (MET) From: "Maciej W. Rozycki" To: Jan-Benedict Glaw cc: Linux-MIPS Subject: Re: R3k and swap: Still no go? In-Reply-To: <20020223001122.F15503@lug-owl.de> Message-ID: Organization: Technical University of Gdansk MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-linux-mips@oss.sgi.com Precedence: bulk On Sat, 23 Feb 2002, Jan-Benedict Glaw wrote: > A year or two ago we've had a thread about r3k and swap. Currently, > the box will oops... There's a patch changing some magic numbers > in include/asm-mips/pgtable.h (attached against current CVS), but > it is not really acceptable: some numbers are changed but nobody > seems to know *what* this does mean. Ralf even mentioned that there > might be some bug in the whole paging mechanism hiding behind this. Indeed, for good code you need to inspect why things work after an uncertain fix (for commercial one, you probably don't). > Flo looked into this and his resume was that even the current > (oopsing) values *should* do the job IIRC. Maciej, do you have > a hint on this? I'm now using this patch, because it does make > the kernel useable, but I don't understand why... I browsed through the kernel and it seems the fix is twiddling in the right area, although a minor clean up seems to be needed. > +#else /* CONFIG_CPU_R3000 */ > +# define SWP_TYPE(x) (((x).val >> 8) & 0x7f) > +# define SWP_OFFSET(x) ((x).val >> 15) > +# define define SWP_ENTRY(type,offset) ((swp_entry_t) { ((type) << 8) | ((offset) << 15) }) > +#endif This is an overkill -- you limit yourself to 128kB of swap per device/file. ;-) Except that there is a typo in the SWP_ENTRY definition, so it can't work anyway. > [ Part 1.3: "Flo's statement" ] [...] > -#define SWP_OFFSET(x) ((x).val >> 8) > -#define SWP_ENTRY(type,offset) ((swp_entry_t) { ((type) << 1) | ((offset) << 8) }) > +#define SWP_OFFSET(x) ((x).val >> 10) > +#define SWP_ENTRY(type,offset) ((swp_entry_t) { ((type) << 1) | ((offset) << 10) }) This is a move in the right direction. I'd shift bits and mask them a bit differently, though. The point is to have _PAGE_VALID cleared for paged-out entries. > The R3k machine (Decstation 5000/120) does survive swapping. The > idea is that the bits 9 & 10 on the R3k are > > #define _PAGE_VALID (1<<9) > #define _PAGE_SILENT_READ (1<<9) /* synonym */ > #define _PAGE_DIRTY (1<<10) /* The MIPS dirty bit */ > #define _PAGE_SILENT_WRITE (1<<10) Yep, that's the culprit. > Whereas this on R4k is > > #define _PAGE_VALID (1<<7) > #define _PAGE_SILENT_READ (1<<7) /* synonym */ > #define _PAGE_DIRTY (1<<8) /* The MIPS dirty bit */ > #define _PAGE_SILENT_WRITE (1<<8) Remember these are shifted left by six. > OTOH when following the code paths the pte gets completely replaced > with the swap entry and not bitmasked/and/ored with the original > pte or the ptes flags. So i find no dependencie to the SWP_ macros. Well, when loaded into the TLB paged-out entries absolutely must have their _PAGE_VALID bit cleared. Otherwise you don't get a TLBL/TLBS exception upon an address dereference and a random (not quite, but still irrelevant to the page map) page address is used instead. And as I see SWP_ENTRY is used to make swap PTE entries which are to fault upon a dereference. > When adding debug code there i can see the flags getting restored > correctly on swapping in. Unless _PAGE_VALID is set and you don't reach the code at all. Actually the R4k variant seems to be broken as well -- it's only MAX_SWAPFILES that protects _PAGE_VALID from being set here as well. Anyone knows why we don't use _PAGE_VALID as a presence mark and have separate software-maintained _PAGE_PRESENT for this purpose? Other archs don't seem to need such a mess... I should have a patch ready soon. -- + Maciej W. Rozycki, Technical University of Gdansk, Poland + +--------------------------------------------------------------+ + e-mail: macro@ds2.pg.gda.pl, PGP key available + From owner-linux-mips@oss.sgi.com Mon Feb 25 11:21:38 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g1PJLca26951 for linux-mips-outgoing; Mon, 25 Feb 2002 11:21:38 -0800 Received: from ayrnetworks.com (earth.ayrnetworks.com [64.166.72.139]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g1PJLX926936 for ; Mon, 25 Feb 2002 11:21:33 -0800 Received: from [192.168.1.5] (IDENT:root@localhost.localdomain [127.0.0.1]) by ayrnetworks.com (8.11.6/8.11.2) with ESMTP id g1PIKKe03336; Mon, 25 Feb 2002 10:20:20 -0800 Mime-Version: 1.0 X-Sender: kph@127.0.0.1 Message-Id: In-Reply-To: <20020223123037.A8314@momenco.com> References: <20020223123037.A8314@momenco.com> Date: Mon, 25 Feb 2002 10:21:24 -0800 To: Matthew Dharm From: Kevin Paul Herbert Subject: Re: Anyone have the e1000.o driver working? Cc: Linux-MIPS Content-Type: text/plain; charset="us-ascii" ; format="flowed" Sender: owner-linux-mips@oss.sgi.com Precedence: bulk At 12:30 PM -0800 2/23/02, Matthew Dharm wrote: >Well, I finally got the latest version running (see my other message to >this list... where did that go, anyway?). The problem was that the code to >deal with CONFIG_PROC_FS is causing a crash... and it looks like it might >be a toolchain bug. I'm building with CONFIG_PROC_FS, and it works fine for me. It seems that your problem may be with ld or insmod; it seems that your .data section is getting placed at zero. Does the address for objects in .data seem reasonable when you get a map from insmod? Here is my gcc command line to build e1000_main.o for a RM7000. /opt/local/mips-ayr-linux-gnu/bin//gcc -Wall -DLINUX -D__KERNEL__ -DMODULE -DEXPORT_SYMTAB -O2 -pipe -I../../../linux-2.4.2/include -I. -DMODVERSIONS -include ../../../linux-2.4.2/include/linux/modversions.h -mno-abicalls -fno-pic -mcpu=r8000 -mips2 -Wa,--trap -mlong-calls -fomit-frame-pointer -fno-strict-aliasing -G 0 -c e1000_main.c > >What toolchain are you using? gcc --version reports 2.97. We got our tools from MonteVista Hard Hat Linux... I'm not sure about the actual toolchain version, but I can ask around here if you need. I'm running the 3.5.19 driver and the only modifications that I made are due to our hardware (we use the i82543 but in our own board, so the usage of the software defined I/O pins is different than intel), and we don't use an intel format serial eeprom for mac address and setup. I also had 3.0. working without problems. Our hardware is RM7000, big endian. I hope this helps... good luck with your bringup. Kevin -- From owner-linux-mips@oss.sgi.com Mon Feb 25 11:31:55 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g1PJVt727269 for linux-mips-outgoing; Mon, 25 Feb 2002 11:31:55 -0800 Received: from hell (buserror-extern.convergence.de [212.84.236.66]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g1PJVm927266; Mon, 25 Feb 2002 11:31:48 -0800 Received: from js by hell with local (Exim 3.33 #1 (Debian)) id 16fPuX-0000x8-00; Mon, 25 Feb 2002 19:31:41 +0100 Date: Mon, 25 Feb 2002 19:31:41 +0100 From: Johannes Stezenbach To: Ralf Baechle Cc: Hartvig Ekner , linux-mips@oss.sgi.com Subject: Re: Setting up of GP in static, non-PIC version of glibc? Message-ID: <20020225183141.GA3560@convergence.de> Mail-Followup-To: Johannes Stezenbach , Ralf Baechle , Hartvig Ekner , linux-mips@oss.sgi.com References: <200202251516.QAA22570@copsun18.mips.com> <20020225173433.B3680@dea.linux-mips.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20020225173433.B3680@dea.linux-mips.net> User-Agent: Mutt/1.3.27i Sender: owner-linux-mips@oss.sgi.com Precedence: bulk On Mon, Feb 25, 2002 at 05:34:33PM +0100, Ralf Baechle wrote: > On Mon, Feb 25, 2002 at 04:16:20PM +0100, Hartvig Ekner wrote: > > > .globl ENTRY_POINT > > .type ENTRY_POINT,@function > > ENTRY_POINT: > > #ifdef __PIC__ > > SET_GP > > #else > > la $28, _gp > > #endif > > > > Makes things work (this code ends in crt1.o). Is this the right place to > > fix it? > > Non-PIC code doesn't use $gp, so any reference to $gp is a bug. Note > that we don't support global data optimization for ELF either that is, > -G 0 is the default. I recently experimented with dietlibc and tried to create static, non-PIC binaries, with some success. Contradicting the docs (gcc info), -G 0 is not the default but has to be passed explicitely (even when using the GNU assembler). BTW: Who is "we"? Do you mean global data optimization is broken in gcc/binutils or just that no one at SGI is using it? Regards, Johannes From owner-linux-mips@oss.sgi.com Mon Feb 25 11:36:20 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g1PJaKB27379 for linux-mips-outgoing; Mon, 25 Feb 2002 11:36:20 -0800 Received: from ayrnetworks.com (earth.ayrnetworks.com [64.166.72.139]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g1PJaI927376 for ; Mon, 25 Feb 2002 11:36:18 -0800 Received: from [192.168.1.5] (IDENT:root@localhost.localdomain [127.0.0.1]) by ayrnetworks.com (8.11.6/8.11.2) with ESMTP id g1PIZ5e03585; Mon, 25 Feb 2002 10:35:05 -0800 Mime-Version: 1.0 X-Sender: kph@127.0.0.1 Message-Id: In-Reply-To: References: Date: Mon, 25 Feb 2002 10:36:09 -0800 To: "Matthew Dharm" , "Linux-MIPS" From: Kevin Paul Herbert Subject: Re: Is this a toolchain bug? Content-Type: text/plain; charset="us-ascii" ; format="flowed" Sender: owner-linux-mips@oss.sgi.com Precedence: bulk At 5:57 PM -0800 2/22/02, Matthew Dharm wrote: > >The toolchain I'm using is the one from oss.sgi.com by H.J. Liu >(toolchain-20011020-1). Because of the way the e1000 driver Makefile >works, I'm actually compiling it using the native compiler on-target. I just tossed out most of intel's makefile so that I could build it as part of our cross-build (hosted on RedHat i386), building it as a module. When I was using the 3.0 driver, I hacked it to be built with the kernel (not a module at all). It was just a few minutes of makefile hacking, and may save you some grief. There is a driver V4.0.7? I *just* picked up 3.5 a little while ago... can you point me at where on intel's website you got your driver? Thanks, Kevin -- From owner-linux-mips@oss.sgi.com Mon Feb 25 11:39:45 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g1PJdjU27473 for linux-mips-outgoing; Mon, 25 Feb 2002 11:39:45 -0800 Received: from dea.linux-mips.net (a1as07-p84.stg.tli.de [195.252.188.84]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g1PJde927470 for ; Mon, 25 Feb 2002 11:39:41 -0800 Received: (from ralf@localhost) by dea.linux-mips.net (8.11.6/8.11.1) id g1PIdSf04410; Mon, 25 Feb 2002 19:39:28 +0100 Date: Mon, 25 Feb 2002 19:39:28 +0100 From: Ralf Baechle To: Johannes Stezenbach , Hartvig Ekner , linux-mips@oss.sgi.com Subject: Re: Setting up of GP in static, non-PIC version of glibc? Message-ID: <20020225193928.A4385@dea.linux-mips.net> References: <200202251516.QAA22570@copsun18.mips.com> <20020225173433.B3680@dea.linux-mips.net> <20020225183141.GA3560@convergence.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <20020225183141.GA3560@convergence.de>; from js@convergence.de on Mon, Feb 25, 2002 at 07:31:41PM +0100 X-Accept-Language: de,en,fr Sender: owner-linux-mips@oss.sgi.com Precedence: bulk On Mon, Feb 25, 2002 at 07:31:41PM +0100, Johannes Stezenbach wrote: > > > > Non-PIC code doesn't use $gp, so any reference to $gp is a bug. Note > > that we don't support global data optimization for ELF either that is, > > -G 0 is the default. > > I recently experimented with dietlibc and tried to create > static, non-PIC binaries, with some success. > Contradicting the docs (gcc info), -G 0 is not the default but > has to be passed explicitely (even when using the GNU assembler). It always was until somebody broke gcc. > BTW: Who is "we"? Do you mean global data optimization is broken > in gcc/binutils or just that no one at SGI is using it? It's an ECOFF specific optimization that just has been forward ported into the ELF world. And what does this have to do with SGI anyway? Ralf From owner-linux-mips@oss.sgi.com Mon Feb 25 11:51:19 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g1PJpJR27664 for linux-mips-outgoing; Mon, 25 Feb 2002 11:51:19 -0800 Received: from real.realitydiluted.com (real.realitydiluted.com [208.242.241.164]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g1PJp1927661 for ; Mon, 25 Feb 2002 11:51:01 -0800 Received: from dsl73.cedar-rapids.net ([208.242.241.39] helo=cotw.com) by real.realitydiluted.com with esmtp (Exim 3.22 #1 (Red Hat Linux)) id 16fQD8-0001fM-00 for ; Mon, 25 Feb 2002 12:50:54 -0600 Message-ID: <3C7A9579.BE02A838@cotw.com> Date: Mon, 25 Feb 2002 13:50:17 -0600 From: Scott A McConnell X-Mailer: Mozilla 4.77 [en] (X11; U; Linux 2.4.17-xfs i686) X-Accept-Language: en MIME-Version: 1.0 To: linux-mips@oss.sgi.com Subject: MIPS, i8259 and spurious interrupts. Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-linux-mips@oss.sgi.com Precedence: bulk I have been trying to track down and resolve a spurious interrupt problem. I have attached some output and the code used to generate it in i8259.c. enable_8259A_irq is called but disable_8259A_irq is never called. My i8259 is mapped to MIPS IRQ 6. As you will see below all my spurious interrupts happen to be on 8259 irq 6. (Which is my ethernet card) It appears that a new interrput is occuring before the last one is finished. What should be done with MIPS irq 6? Should I clear the status? clear_cp0_status(STATUSF_IP6); Instead of implementing i8259_do_irq is it ok to use do_irq in arch/mips/kernel/irq.c? Can anyone explain the following behavior: Sometimes this code get caught in an endless loop. Sometimes I see the: printk("spurious 8259A interrupt: IRQ%d.\n", irq); Sometimes I see: *** SP 1 irq: 6*** *** SP 1.1 *** *** SP 1.2 *** *** SP 1 irq: 6*** *** SP 1.1 *** *** SP 1.2 *** *** SP 1 irq: 6*** *** SP 1.1 *** *** SP 1.2 *** *** SP 1 irq: 6*** *** SP 1.1 *** *** SP 1.2 *** *** SP 1 irq: 6*** *** SP 1.1 *** *** SP 1.2 *** *** SP 1 irq: 6*** *** SP 1.1 *** *** SP 1.2 *** *** SP 1 irq: 6*** *** SP 1.1 *** *** SP 1.2 *** ---- Modified code ---- static inline int i8259A_irq_real(unsigned int irq) { int value; int irqmask = 1 << irq; if (irq < 8) { printk("*** SP 1.1 ***\n"); outb(0x0B,0x20); /* ISR register */ value = inb(0x20) & irqmask; outb(0x0A,0x20); /* back to the IRR register */ printk("*** SP 1.2 ***\n"); return value; } if (irq<14) printk("*** SP 1.3 ***\n"); outb(0x0B,0xA0); /* ISR register */ value = inb(0xA0) & (irqmask >> 8); outb(0x0A,0xA0); /* back to the IRR register */ return value; } /* * Careful! The 8259A is a fragile beast, it pretty * much _has_ to be done exactly like this (mask it * first, _then_ send the EOI, and the order of EOI * to the two 8259s is important! */ void mask_and_ack_8259A(unsigned int irq) { unsigned int irqmask = 1 << irq; unsigned long flags; spin_lock_irqsave(&i8259A_lock, flags); /* * Lightweight spurious IRQ detection. We do not want to overdo * spurious IRQ handling - it's usually a sign of hardware problems, so * we only do the checks we can do without slowing down good hardware * nnecesserily. * * Note that IRQ7 and IRQ15 (the two spurious IRQs usually resulting * rom the 8259A-1|2 PICs) occur even if the IRQ is masked in the 8259A. * Thus we can check spurious 8259A IRQs without doing the quite slow * i8259A_irq_real() call for every IRQ. This does not cover 100% of * spurious interrupts, but should be enough to warn the user that * there is something bad going on ... */ if (cached_irq_mask & irqmask) goto spurious_8259A_irq; cached_irq_mask |= irqmask; handle_real_irq: if (irq & 8) { inb(0xA1); /* DUMMY - (do we need this?) */ outb(cached_A1,0xA1); outb(0x60+(irq&7),0xA0);/* 'Specific EOI' to slave */ outb(0x62,0x20); /* 'Specific EOI' to master-IRQ2 */ } else { inb(0x21); /* DUMMY - (do we need this?) */ outb(cached_21,0x21); outb(0x60+irq,0x20); /* 'Specific EOI' to master */ } spin_unlock_irqrestore(&i8259A_lock, flags); return; spurious_8259A_irq: /* * this is the slow path - should happen rarely. */ /************************************************************************************/ /* Why am I not returning from the following call? */ /************************************************************************************/ printk("*** SP 1 irq: %d***\n", irq); if (i8259A_irq_real(irq)) /* * oops, the IRQ _is_ in service according to the * 8259A - not spurious, go handle it. */ printk("*** SP 2 ***\n"); goto handle_real_irq; { static int spurious_irq_mask = 0; printk("*** SP 3 ***\n"); /* * At this point we can be sure the IRQ is spurious, * lets ACK and report it. [once per IRQ] */ printk("*** SP 4 ***\n"); if (!(spurious_irq_mask & irqmask)) { printk("spurious 8259A interrupt: IRQ%d.\n", irq); spurious_irq_mask |= irqmask; } printk("*** SP 5 ***\n"); irq_err_count++; /* * Theoretically we do not have to handle this IRQ, * but in Linux this does not cause problems and is * simpler for us. */ printk("*** SP 6 ***\n"); goto handle_real_irq; } } Thanks in advance for any advice... -- Scott A. McConnell From owner-linux-mips@oss.sgi.com Mon Feb 25 12:21:16 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g1PKLGs28141 for linux-mips-outgoing; Mon, 25 Feb 2002 12:21:16 -0800 Received: from mx.mips.com (mx.mips.com [206.31.31.226]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g1PKLB928134; Mon, 25 Feb 2002 12:21:11 -0800 Received: from newman.mips.com (ns-dmz [206.31.31.225]) by mx.mips.com (8.9.3/8.9.0) with ESMTP id LAA24373; Mon, 25 Feb 2002 11:21:03 -0800 (PST) Received: from copfs01.mips.com (copfs01 [192.168.205.101]) by newman.mips.com (8.9.3/8.9.0) with ESMTP id LAA14534; Mon, 25 Feb 2002 11:21:03 -0800 (PST) Received: from copsun18.mips.com (copsun18 [192.168.205.28]) by copfs01.mips.com (8.11.4/8.9.0) with ESMTP id g1PJKUA05311; Mon, 25 Feb 2002 20:20:30 +0100 (MET) From: Hartvig Ekner Received: (from hartvige@localhost) by copsun18.mips.com (8.9.1/8.9.0) id UAA27344; Mon, 25 Feb 2002 20:21:00 +0100 (MET) Message-Id: <200202251921.UAA27344@copsun18.mips.com> Subject: Re: Setting up of GP in static, non-PIC version of glibc? To: ralf@oss.sgi.com (Ralf Baechle) Date: Mon, 25 Feb 2002 20:21:00 +0100 (MET) Cc: js@convergence.de (Johannes Stezenbach), hartvige@mips.com (Hartvig Ekner), linux-mips@oss.sgi.com In-Reply-To: <20020225193928.A4385@dea.linux-mips.net> from "Ralf Baechle" at Feb 25, 2002 07:39:28 PM X-Mailer: ELM [version 2.5 PL1] MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-linux-mips@oss.sgi.com Precedence: bulk Ralf Baechle writes: > > On Mon, Feb 25, 2002 at 07:31:41PM +0100, Johannes Stezenbach wrote: > > BTW: Who is "we"? Do you mean global data optimization is broken > > in gcc/binutils or just that no one at SGI is using it? > > It's an ECOFF specific optimization that just has been forward ported into > the ELF world. And what does this have to do with SGI anyway? I still don't get it. Why would one not use GP optimization with non-shared non-PIC code? It certainly is used throughout in the non-Linux MIPS world, and on the limited testing I did today it also worked fine. Is there something which is known not to work, or some conflict somewhere which prevents the general use of GP? /Hartvig From owner-linux-mips@oss.sgi.com Mon Feb 25 12:33:02 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g1PKX2F28416 for linux-mips-outgoing; Mon, 25 Feb 2002 12:33:02 -0800 Received: from hell (buserror-extern.convergence.de [212.84.236.66]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g1PKWu928413; Mon, 25 Feb 2002 12:32:56 -0800 Received: from js by hell with local (Exim 3.33 #1 (Debian)) id 16fQri-0000zp-00; Mon, 25 Feb 2002 20:32:50 +0100 Date: Mon, 25 Feb 2002 20:32:50 +0100 From: Johannes Stezenbach To: Ralf Baechle Cc: Hartvig Ekner , linux-mips@oss.sgi.com Subject: Re: Setting up of GP in static, non-PIC version of glibc? Message-ID: <20020225193250.GA3789@convergence.de> Mail-Followup-To: Johannes Stezenbach , Ralf Baechle , Hartvig Ekner , linux-mips@oss.sgi.com References: <200202251516.QAA22570@copsun18.mips.com> <20020225173433.B3680@dea.linux-mips.net> <20020225183141.GA3560@convergence.de> <20020225193928.A4385@dea.linux-mips.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20020225193928.A4385@dea.linux-mips.net> User-Agent: Mutt/1.3.27i Sender: owner-linux-mips@oss.sgi.com Precedence: bulk On Mon, Feb 25, 2002 at 07:39:28PM +0100, Ralf Baechle wrote: > On Mon, Feb 25, 2002 at 07:31:41PM +0100, Johannes Stezenbach wrote: > > BTW: Who is "we"? Do you mean global data optimization is broken > > in gcc/binutils or just that no one at SGI is using it? > > It's an ECOFF specific optimization that just has been forward ported into > the ELF world. And what does this have to do with SGI anyway? I was wondering who you speak for when you say "we don't support foobar", and your email is @oss.sgi.com. I was just trying to decode the meaning of what you said. Like, did you mean "I don't care about it" or "The tools are totally broken and you have to go along way to use it"? The global data optimization would fit dietlibc's goal of as-small-as-possible, statically linked binaries. But from what you said I gather I would have to fix gcc and binutils first. Johannes From owner-linux-mips@oss.sgi.com Mon Feb 25 12:54:13 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g1PKsDd28718 for linux-mips-outgoing; Mon, 25 Feb 2002 12:54:13 -0800 Received: from host099.momenco.com (IDENT:root@www.momenco.com [64.169.228.99]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g1PKs7928715 for ; Mon, 25 Feb 2002 12:54:07 -0800 Received: from beagle (beagle.internal.momenco.com [192.168.0.115]) by host099.momenco.com (8.11.6/8.11.6) with SMTP id g1PJs6R20891; Mon, 25 Feb 2002 11:54:06 -0800 From: "Matthew Dharm" To: "Kevin Paul Herbert" , "Linux-MIPS" Subject: RE: Is this a toolchain bug? Date: Mon, 25 Feb 2002 11:54:06 -0800 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0) In-Reply-To: X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400 Importance: Normal Sender: owner-linux-mips@oss.sgi.com Precedence: bulk Umm... http://downloadfinder2.intel.com/scripts-df/filter_results.asp?strOSs= 39&strTypes=DRV%2CUTL&ProductID=415&OSFullName=Linux*&submit=Go%21 Or, click support -> downloads -> enter 82543 as the product, and then follow the links from there. Matt -- Matthew D. Dharm Senior Software Designer Momentum Computer Inc. 1815 Aston Ave. Suite 107 (760) 431-8663 X-115 Carlsbad, CA 92008-7310 Momentum Works For You www.momenco.com > -----Original Message----- > From: owner-linux-mips@oss.sgi.com > [mailto:owner-linux-mips@oss.sgi.com]On Behalf Of Kevin Paul Herbert > Sent: Monday, February 25, 2002 10:36 AM > To: Matthew Dharm; Linux-MIPS > Subject: Re: Is this a toolchain bug? > > > At 5:57 PM -0800 2/22/02, Matthew Dharm wrote: > > > >The toolchain I'm using is the one from oss.sgi.com by H.J. Liu > >(toolchain-20011020-1). Because of the way the e1000 > driver Makefile > >works, I'm actually compiling it using the native compiler > on-target. > I just tossed out most of intel's makefile so that I could build it > as part of our cross-build (hosted on RedHat i386), > building it as a > module. When I was using the 3.0 driver, I hacked it to be > built with > the kernel (not a module at all). It was just a few minutes of > makefile hacking, and may save you some grief. > > There is a driver V4.0.7? I *just* picked up 3.5 a little while > ago... can you point me at where on intel's website you got your > driver? > > Thanks, > Kevin > -- > From owner-linux-mips@oss.sgi.com Mon Feb 25 13:24:17 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g1PLOHq29449 for linux-mips-outgoing; Mon, 25 Feb 2002 13:24:17 -0800 Received: from dea.linux-mips.net (a1as07-p84.stg.tli.de [195.252.188.84]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g1PLOC929446 for ; Mon, 25 Feb 2002 13:24:12 -0800 Received: (from ralf@localhost) by dea.linux-mips.net (8.11.6/8.11.1) id g1PKNw906584; Mon, 25 Feb 2002 21:23:58 +0100 Date: Mon, 25 Feb 2002 21:23:58 +0100 From: Ralf Baechle To: Hartvig Ekner Cc: Johannes Stezenbach , linux-mips@oss.sgi.com Subject: Re: Setting up of GP in static, non-PIC version of glibc? Message-ID: <20020225212358.A4935@dea.linux-mips.net> References: <20020225193928.A4385@dea.linux-mips.net> <200202251921.UAA27344@copsun18.mips.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <200202251921.UAA27344@copsun18.mips.com>; from hartvige@mips.com on Mon, Feb 25, 2002 at 08:21:00PM +0100 X-Accept-Language: de,en,fr Sender: owner-linux-mips@oss.sgi.com Precedence: bulk On Mon, Feb 25, 2002 at 08:21:00PM +0100, Hartvig Ekner wrote: > > > BTW: Who is "we"? Do you mean global data optimization is broken > > > in gcc/binutils or just that no one at SGI is using it? > > > > It's an ECOFF specific optimization that just has been forward ported into > > the ELF world. And what does this have to do with SGI anyway? > > I still don't get it. Why would one not use GP optimization with non-shared > non-PIC code? It certainly is used throughout in the non-Linux MIPS world, > and on the limited testing I did today it also worked fine. Is there > something which is known not to work, or some conflict somewhere which > prevents the general use of GP? I thought gcc would would for no good reason plain refuse to use global pointer optimization with ELF - but I was wrong, just tested it again. I also noticed that older gcc would emit initialized data to .data with -G even though small data should go to .sdata. Won't work by just enabeling for the kernel though. The kernel has it's own idea of how to use the $gp register. Ralf From owner-linux-mips@oss.sgi.com Mon Feb 25 13:30:44 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g1PLUiA29607 for linux-mips-outgoing; Mon, 25 Feb 2002 13:30:44 -0800 Received: from host099.momenco.com (IDENT:root@www.momenco.com [64.169.228.99]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g1PLUc929604 for ; Mon, 25 Feb 2002 13:30:38 -0800 Received: from beagle (beagle.internal.momenco.com [192.168.0.115]) by host099.momenco.com (8.11.6/8.11.6) with SMTP id g1PKUcR21061; Mon, 25 Feb 2002 12:30:38 -0800 From: "Matthew Dharm" To: "Kevin Paul Herbert" , "Linux-MIPS" Subject: RE: Is this a toolchain bug? Date: Mon, 25 Feb 2002 12:30:38 -0800 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0) In-Reply-To: X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400 Importance: Normal Sender: owner-linux-mips@oss.sgi.com Precedence: bulk Well, that fixes it. The driver works out-of-the-box with just some minor makefile modifications. So, we've got a problem somewhere in the module handling. Either the symbol wasn't being relocated properly, or it wasn't being allocated properly, or something. I'm not an expert in this region of the kernel, but my guess is that we're going to see this more and more often, so someone with a clue should take a look at this. I'm more than willing to help, as I seem to be the only person with a 100% reproducable situation. But I really have no idea even where to begin looking... my expertise ends right about at objdump, and even then I'm not certain how some of that data should look for loadable modules. Matt -- Matthew D. Dharm Senior Software Designer Momentum Computer Inc. 1815 Aston Ave. Suite 107 (760) 431-8663 X-115 Carlsbad, CA 92008-7310 Momentum Works For You www.momenco.com > -----Original Message----- > From: owner-linux-mips@oss.sgi.com > [mailto:owner-linux-mips@oss.sgi.com]On Behalf Of Kevin Paul Herbert > Sent: Monday, February 25, 2002 10:36 AM > To: Matthew Dharm; Linux-MIPS > Subject: Re: Is this a toolchain bug? > > > At 5:57 PM -0800 2/22/02, Matthew Dharm wrote: > > > >The toolchain I'm using is the one from oss.sgi.com by H.J. Liu > >(toolchain-20011020-1). Because of the way the e1000 > driver Makefile > >works, I'm actually compiling it using the native compiler > on-target. > I just tossed out most of intel's makefile so that I could build it > as part of our cross-build (hosted on RedHat i386), > building it as a > module. When I was using the 3.0 driver, I hacked it to be > built with > the kernel (not a module at all). It was just a few minutes of > makefile hacking, and may save you some grief. > > There is a driver V4.0.7? I *just* picked up 3.5 a little while > ago... can you point me at where on intel's website you got your > driver? > > Thanks, > Kevin > -- > From owner-linux-mips@oss.sgi.com Mon Feb 25 13:39:52 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g1PLdqK29878 for linux-mips-outgoing; Mon, 25 Feb 2002 13:39:52 -0800 Received: from dea.linux-mips.net (a1as07-p84.stg.tli.de [195.252.188.84]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g1PLdl929874 for ; Mon, 25 Feb 2002 13:39:48 -0800 Received: (from ralf@localhost) by dea.linux-mips.net (8.11.6/8.11.1) id g1PKdcQ06718; Mon, 25 Feb 2002 21:39:38 +0100 Date: Mon, 25 Feb 2002 21:39:38 +0100 From: Ralf Baechle To: Johannes Stezenbach , Hartvig Ekner , linux-mips@oss.sgi.com Subject: Re: Setting up of GP in static, non-PIC version of glibc? Message-ID: <20020225213938.D4935@dea.linux-mips.net> References: <200202251516.QAA22570@copsun18.mips.com> <20020225173433.B3680@dea.linux-mips.net> <20020225183141.GA3560@convergence.de> <20020225193928.A4385@dea.linux-mips.net> <20020225193250.GA3789@convergence.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <20020225193250.GA3789@convergence.de>; from js@convergence.de on Mon, Feb 25, 2002 at 08:32:50PM +0100 X-Accept-Language: de,en,fr Sender: owner-linux-mips@oss.sgi.com Precedence: bulk On Mon, Feb 25, 2002 at 08:32:50PM +0100, Johannes Stezenbach wrote: > > It's an ECOFF specific optimization that just has been forward ported into > > the ELF world. And what does this have to do with SGI anyway? > > I was wondering who you speak for when you say "we don't > support foobar", and your email is @oss.sgi.com. You seem to be unaware that half of oss users are ex-sgi employees :-) > I was just trying to decode the meaning of what you said. > Like, did you mean "I don't care about it" or "The tools are > totally broken and you have to go along way to use it"? > > The global data optimization would fit dietlibc's goal > of as-small-as-possible, statically linked binaries. But > from what you said I gather I would have to fix gcc and > binutils first. See also my other email about the status of -G. Ralf From owner-linux-mips@oss.sgi.com Mon Feb 25 18:14:09 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g1Q2E9R03884 for linux-mips-outgoing; Mon, 25 Feb 2002 18:14:09 -0800 Received: from nevyn.them.org (mail@NEVYN.RES.CMU.EDU [128.2.145.6]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g1Q2E3903880 for ; Mon, 25 Feb 2002 18:14:03 -0800 Received: from drow by nevyn.them.org with local (Exim 3.34 #1 (Debian)) id 16fWBL-0000dx-00; Mon, 25 Feb 2002 20:13:27 -0500 Date: Mon, 25 Feb 2002 20:13:27 -0500 From: Daniel Jacobowitz To: Matthew Dharm Cc: Kevin Paul Herbert , Linux-MIPS Subject: Re: Is this a toolchain bug? Message-ID: <20020225201327.A2427@nevyn.them.org> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.3.23i Sender: owner-linux-mips@oss.sgi.com Precedence: bulk On Mon, Feb 25, 2002 at 12:30:38PM -0800, Matthew Dharm wrote: > Well, that fixes it. The driver works out-of-the-box with just some > minor makefile modifications. > > So, we've got a problem somewhere in the module handling. Either the > symbol wasn't being relocated properly, or it wasn't being allocated > properly, or something. I'm not an expert in this region of the > kernel, but my guess is that we're going to see this more and more > often, so someone with a clue should take a look at this. > > I'm more than willing to help, as I seem to be the only person with a > 100% reproducable situation. But I really have no idea even where to > begin looking... my expertise ends right about at objdump, and even > then I'm not certain how some of that data should look for loadable > modules. Silly question... was the module built with the correct flags? Look at a command line; does it have all the same options as when you build a module in the kernel source? I bet something's missing. Probably -G 0... -- Daniel Jacobowitz Carnegie Mellon University MontaVista Software Debian GNU/Linux Developer From owner-linux-mips@oss.sgi.com Mon Feb 25 18:18:17 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g1Q2IHk03995 for linux-mips-outgoing; Mon, 25 Feb 2002 18:18:17 -0800 Received: from host099.momenco.com (IDENT:root@www.momenco.com [64.169.228.99]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g1Q2IB903991 for ; Mon, 25 Feb 2002 18:18:11 -0800 Received: from beagle (beagle.internal.momenco.com [192.168.0.115]) by host099.momenco.com (8.11.6/8.11.6) with SMTP id g1Q1I9R22356; Mon, 25 Feb 2002 17:18:09 -0800 From: "Matthew Dharm" To: "Daniel Jacobowitz" Cc: "Kevin Paul Herbert" , "Linux-MIPS" Subject: RE: Is this a toolchain bug? Date: Mon, 25 Feb 2002 17:18:09 -0800 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0) In-Reply-To: <20020225201327.A2427@nevyn.them.org> X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400 Importance: Normal Sender: owner-linux-mips@oss.sgi.com Precedence: bulk Got the -G 0.... Honestly, I'm pretty sure it was compiled with the right flags. They match the flags I'm using to build the kernel, at least as far as I can see. Matt -- Matthew D. Dharm Senior Software Designer Momentum Computer Inc. 1815 Aston Ave. Suite 107 (760) 431-8663 X-115 Carlsbad, CA 92008-7310 Momentum Works For You www.momenco.com > -----Original Message----- > From: Daniel Jacobowitz [mailto:dan@debian.org] > Sent: Monday, February 25, 2002 5:13 PM > To: Matthew Dharm > Cc: Kevin Paul Herbert; Linux-MIPS > Subject: Re: Is this a toolchain bug? > > > On Mon, Feb 25, 2002 at 12:30:38PM -0800, Matthew Dharm wrote: > > Well, that fixes it. The driver works out-of-the-box > with just some > > minor makefile modifications. > > > > So, we've got a problem somewhere in the module handling. > Either the > > symbol wasn't being relocated properly, or it wasn't > being allocated > > properly, or something. I'm not an expert in this region of the > > kernel, but my guess is that we're going to see this more and more > > often, so someone with a clue should take a look at this. > > > > I'm more than willing to help, as I seem to be the only > person with a > > 100% reproducable situation. But I really have no idea > even where to > > begin looking... my expertise ends right about at > objdump, and even > > then I'm not certain how some of that data should look > for loadable > > modules. > > Silly question... was the module built with the correct > flags? Look at > a command line; does it have all the same options as when > you build a > module in the kernel source? > > I bet something's missing. Probably -G 0... > > -- > Daniel Jacobowitz Carnegie Mellon > University > MontaVista Software Debian > GNU/Linux Developer > From owner-linux-mips@oss.sgi.com Mon Feb 25 21:48:47 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g1Q5mlN01068 for linux-mips-outgoing; Mon, 25 Feb 2002 21:48:47 -0800 Received: from chmls05.mediaone.net (chmls05.ne.ipsvc.net [24.147.1.143]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g1Q5mZ901061; Mon, 25 Feb 2002 21:48:36 -0800 Received: from localhost (h00a0cc39f081.ne.mediaone.net [65.96.250.215]) by chmls05.mediaone.net (8.11.1/8.11.1) with ESMTP id g1Q4lWu06551; Mon, 25 Feb 2002 23:47:32 -0500 (EST) Date: Mon, 25 Feb 2002 23:47:44 -0500 Subject: Re: Problems compiling . soft-float Content-Type: text/plain; charset=US-ASCII; format=flowed Mime-Version: 1.0 (Apple Message framework v481) Cc: Jay Carlson , Carlo Agostini , linux-mips@oss.sgi.com To: Ralf Baechle , mad-dev@lists.mars.org From: Jay Carlson In-Reply-To: <20020225132559.A3500@dea.linux-mips.net> Message-Id: Content-Transfer-Encoding: 7bit X-Mailer: Apple Mail (2.481) Sender: owner-linux-mips@oss.sgi.com Precedence: bulk On Monday, February 25, 2002, at 07:25 AM, Ralf Baechle wrote: > On Mon, Feb 25, 2002 at 08:19:36AM +0100, Carlo Agostini wrote: [link fails due to missing "dpmul", "dpadd", etc.] > >> Then, I tried to pass explicitly -msoft-float to gcc as an argument >> ..... > > Not supported. Use the kernel fp emulation. This works fine if you undo the mistake in gcc/config/mips/t-linux, or in elf.h, your choice. The default on MIPS is for gcc to use the GOFAST style of soft-float calls. gcc/config/mips/elf.h sets this up via #include "gofast.h". Now, t-linux *does* include the right goo to get all the software floating point emulation code compiled into libgcc.a. But it's defaulting not to the GNU style but to the GOFAST style calls: echo '#undef US_SOFTWARE_GOFAST' >> dp-bit.c So everything works if we just make the two consistent. The old(er) Agenda toolchain takes the position that "every other gcc MIPS target uses GOFAST, so should we"; you can just change that #undef to #define. But I (now) think the better path is to stick to the GNU-style softfloat calls, Unless you want to modify elf.h, the best you can do is undo the #include "gofast.h" damage in linux.h. Near the end: +/* undo the effects of elf.h including gofast.h */ +#undef US_SOFTWARE_GOFAST +#undef INIT_GOFAST_OPTABS +#define INIT_GOFAST_OPTABS + +#undef GOFAST_CLEAR_NEG_FLOAT_OPTAB +#undef GOFAST_RENAME_LIBCALLS This of course requires knowledge of what exactly gofast.h did, so it's not optimal either. Ralf is right that the kernel emulator is the supported route. But if you're willing to go to the trouble of building everything from scratch, this does work. Jay From owner-linux-mips@oss.sgi.com Mon Feb 25 22:03:59 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g1Q63xh02092 for linux-mips-outgoing; Mon, 25 Feb 2002 22:03:59 -0800 Received: from dea.linux-mips.net (a1as07-p84.stg.tli.de [195.252.188.84]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g1Q63q902085 for ; Mon, 25 Feb 2002 22:03:54 -0800 Received: (from ralf@localhost) by dea.linux-mips.net (8.11.6/8.11.1) id g1Q52bK05330; Tue, 26 Feb 2002 06:02:37 +0100 Date: Tue, 26 Feb 2002 06:02:37 +0100 From: Ralf Baechle To: Jay Carlson Cc: mad-dev@lists.mars.org, Carlo Agostini , linux-mips@oss.sgi.com Subject: Re: Problems compiling . soft-float Message-ID: <20020226060236.A5293@dea.linux-mips.net> References: <20020225132559.A3500@dea.linux-mips.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: ; from nop@nop.com on Mon, Feb 25, 2002 at 11:47:44PM -0500 X-Accept-Language: de,en,fr Sender: owner-linux-mips@oss.sgi.com Precedence: bulk On Mon, Feb 25, 2002 at 11:47:44PM -0500, Jay Carlson wrote: > Ralf is right that the kernel emulator is the supported route. But if > you're willing to go to the trouble of building everything from scratch, > this does work. It's really a major pain. Softfp isn't defined in the ABI which assumes an FPU is available. As the result there is no provision for mixing softfp and fp-less code. Something for the binutils to-do list - ld should make mixing hard-fp and soft-fp binaries impossible. Ralf From owner-linux-mips@oss.sgi.com Mon Feb 25 22:10:50 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g1Q6Aor02306 for linux-mips-outgoing; Mon, 25 Feb 2002 22:10:50 -0800 Received: from nevyn.them.org (mail@NEVYN.RES.CMU.EDU [128.2.145.6]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g1Q6AY902301; Mon, 25 Feb 2002 22:10:34 -0800 Received: from drow by nevyn.them.org with local (Exim 3.34 #1 (Debian)) id 16fZsW-0000sq-00; Tue, 26 Feb 2002 00:10:16 -0500 Date: Tue, 26 Feb 2002 00:10:16 -0500 From: Daniel Jacobowitz To: Ralf Baechle Cc: Jay Carlson , mad-dev@lists.mars.org, Carlo Agostini , linux-mips@oss.sgi.com Subject: Re: Problems compiling . soft-float Message-ID: <20020226001016.A3303@nevyn.them.org> References: <20020225132559.A3500@dea.linux-mips.net> <20020226060236.A5293@dea.linux-mips.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20020226060236.A5293@dea.linux-mips.net> User-Agent: Mutt/1.3.23i Sender: owner-linux-mips@oss.sgi.com Precedence: bulk On Tue, Feb 26, 2002 at 06:02:37AM +0100, Ralf Baechle wrote: > On Mon, Feb 25, 2002 at 11:47:44PM -0500, Jay Carlson wrote: > > > Ralf is right that the kernel emulator is the supported route. But if > > you're willing to go to the trouble of building everything from scratch, > > this does work. > > It's really a major pain. Softfp isn't defined in the ABI which assumes > an FPU is available. As the result there is no provision for mixing > softfp and fp-less code. > > Something for the binutils to-do list - ld should make mixing hard-fp > and soft-fp binaries impossible. Or we could see if it is possible to define the ABIs in such a way that they can call each other... I don't immediately see a problem. The only code that will clobber FP registers is FP code. -- Daniel Jacobowitz Carnegie Mellon University MontaVista Software Debian GNU/Linux Developer From owner-linux-mips@oss.sgi.com Mon Feb 25 22:11:17 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g1Q6BHN02371 for linux-mips-outgoing; Mon, 25 Feb 2002 22:11:17 -0800 Received: from chmls20.mediaone.net (chmls20.ne.ipsvc.net [24.147.1.156]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g1Q6BA902368; Mon, 25 Feb 2002 22:11:10 -0800 Received: from localhost (h00a0cc39f081.ne.mediaone.net [65.96.250.215]) by chmls20.mediaone.net (8.11.1/8.11.1) with ESMTP id g1Q5DCx07363; Tue, 26 Feb 2002 00:13:12 -0500 (EST) Date: Tue, 26 Feb 2002 00:10:50 -0500 Subject: Re: Setting up of GP in static, non-PIC version of glibc? Content-Type: text/plain; charset=US-ASCII; format=flowed Mime-Version: 1.0 (Apple Message framework v481) Cc: Jay Carlson , Hartvig Ekner , linux-mips@oss.sgi.com To: Ralf Baechle From: Jay Carlson In-Reply-To: <20020225173433.B3680@dea.linux-mips.net> Message-Id: <334839BA-2A77-11D6-AB38-0030658AB11E@nop.com> Content-Transfer-Encoding: 7bit X-Mailer: Apple Mail (2.481) Sender: owner-linux-mips@oss.sgi.com Precedence: bulk On Monday, February 25, 2002, at 11:34 AM, Ralf Baechle wrote: > On Mon, Feb 25, 2002 at 04:16:20PM +0100, Hartvig Ekner wrote: > >> .globl ENTRY_POINT >> .type ENTRY_POINT,@function >> ENTRY_POINT: >> #ifdef __PIC__ >> SET_GP >> #else >> la $28, _gp >> #endif >> >> Makes things work (this code ends in crt1.o). Is this the right place >> to >> fix it? > > Non-PIC code doesn't use $gp, so any reference to $gp is a bug. Note > that we don't support global data optimization for ELF either that is, > -G 0 is the default. By default non-PIC code *does* use $gp due to the brain damage in gas; gas defaults to -G 8 unless told otherwise (-KPIC implies -G0 so we don't see this in PIC code.) gcc won't know anything about this, of course. What I'm doing in SUBTARGET_ASM_SPEC is to write something like "%{fno-pic: %{!G: -G0}}"--if we're not in PIC mode, pass -G0 to gas by default. Anyway, once that's straightened out, -G8 does appear to work the way you'd expect, with the code that Hartvig pasted above---I had written a byte-for-byte identical patch :-) Jay From owner-linux-mips@oss.sgi.com Mon Feb 25 22:23:39 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g1Q6NdL02577 for linux-mips-outgoing; Mon, 25 Feb 2002 22:23:39 -0800 Received: from chmls06.mediaone.net (chmls06.ne.ipsvc.net [24.147.1.144]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g1Q6NV902571; Mon, 25 Feb 2002 22:23:31 -0800 Received: from localhost (h00a0cc39f081.ne.mediaone.net [65.96.250.215]) by chmls06.mediaone.net (8.11.1/8.11.1) with ESMTP id g1Q5OYr11951; Tue, 26 Feb 2002 00:24:34 -0500 (EST) Date: Tue, 26 Feb 2002 00:23:12 -0500 Subject: Re: Problems compiling . soft-float Content-Type: text/plain; charset=US-ASCII; format=flowed Mime-Version: 1.0 (Apple Message framework v481) Cc: Jay Carlson , Ralf Baechle , mad-dev@lists.mars.org, Carlo Agostini , linux-mips@oss.sgi.com To: Daniel Jacobowitz From: Jay Carlson In-Reply-To: <20020226001016.A3303@nevyn.them.org> Message-Id: Content-Transfer-Encoding: 7bit X-Mailer: Apple Mail (2.481) Sender: owner-linux-mips@oss.sgi.com Precedence: bulk On Tuesday, February 26, 2002, at 12:10 AM, Daniel Jacobowitz wrote: > On Tue, Feb 26, 2002 at 06:02:37AM +0100, Ralf Baechle wrote: >> On Mon, Feb 25, 2002 at 11:47:44PM -0500, Jay Carlson wrote: >> >>> Ralf is right that the kernel emulator is the supported route. But if >>> you're willing to go to the trouble of building everything from >>> scratch, >>> this does work. >> >> It's really a major pain. Softfp isn't defined in the ABI which >> assumes >> an FPU is available. As the result there is no provision for mixing >> softfp and fp-less code. >> >> Something for the binutils to-do list - ld should make mixing hard-fp >> and soft-fp binaries impossible. > > Or we could see if it is possible to define the ABIs in such a way that > they can call each other... I don't immediately see a problem. The > only code that will clobber FP registers is FP code. Oh, they can intercall without any error until you call sin(1.0), at which point one side's calling convention places 1.0 in integer registers and the other places it in fp registers. Lots of fun to debug this one, especially once you have a kernel emulator that won't SIGILL for the hardfp ops :-) Seriously, this was a common screwup in the Agenda world until the snow specs file. Jay From owner-linux-mips@oss.sgi.com Mon Feb 25 22:29:33 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g1Q6TXG02692 for linux-mips-outgoing; Mon, 25 Feb 2002 22:29:33 -0800 Received: from chmls18.ne.ipsvc.net (chmls18.ne.ipsvc.net [24.147.1.153]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g1Q6TS902688; Mon, 25 Feb 2002 22:29:28 -0800 Received: from localhost (h00a0cc39f081.ne.mediaone.net [65.96.250.215]) by chmls18.ne.ipsvc.net (8.11.6/8.11.6) with ESMTP id g1Q5Sx806553; Tue, 26 Feb 2002 00:29:00 -0500 (EST) Date: Tue, 26 Feb 2002 00:28:52 -0500 Subject: Re: Problems compiling . soft-float Content-Type: text/plain; charset=US-ASCII; format=flowed Mime-Version: 1.0 (Apple Message framework v481) Cc: Jay Carlson , mad-dev@lists.mars.org, Carlo Agostini , linux-mips@oss.sgi.com To: Ralf Baechle From: Jay Carlson In-Reply-To: <20020226060236.A5293@dea.linux-mips.net> Message-Id: Content-Transfer-Encoding: 7bit X-Mailer: Apple Mail (2.481) Sender: owner-linux-mips@oss.sgi.com Precedence: bulk On Tuesday, February 26, 2002, at 12:02 AM, Ralf Baechle wrote: > Something for the binutils to-do list - ld should make mixing hard-fp > and soft-fp binaries impossible. Agreed. So do we need a special flag/directive for gas to say "I'm using soft float"? Jay From owner-linux-mips@oss.sgi.com Mon Feb 25 22:51:48 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g1Q6pml03017 for linux-mips-outgoing; Mon, 25 Feb 2002 22:51:48 -0800 Received: from nevyn.them.org (mail@NEVYN.RES.CMU.EDU [128.2.145.6]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g1Q6ph903014; Mon, 25 Feb 2002 22:51:43 -0800 Received: from drow by nevyn.them.org with local (Exim 3.34 #1 (Debian)) id 16faWY-0001CW-00; Tue, 26 Feb 2002 00:51:38 -0500 Date: Tue, 26 Feb 2002 00:51:38 -0500 From: Daniel Jacobowitz To: Jay Carlson Cc: Ralf Baechle , mad-dev@lists.mars.org, Carlo Agostini , linux-mips@oss.sgi.com Subject: Re: Problems compiling . soft-float Message-ID: <20020226005138.A4594@nevyn.them.org> References: <20020226060236.A5293@dea.linux-mips.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.3.23i Sender: owner-linux-mips@oss.sgi.com Precedence: bulk On Tue, Feb 26, 2002 at 12:28:52AM -0500, Jay Carlson wrote: > > On Tuesday, February 26, 2002, at 12:02 AM, Ralf Baechle wrote: > > >Something for the binutils to-do list - ld should make mixing hard-fp > >and soft-fp binaries impossible. > > Agreed. So do we need a special flag/directive for gas to say "I'm > using soft float"? And bit in the ELF header. We can talk about this in a couple weeks once binutils 2.12 is out :) -- Daniel Jacobowitz Carnegie Mellon University MontaVista Software Debian GNU/Linux Developer From owner-linux-mips@oss.sgi.com Mon Feb 25 23:52:34 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g1Q7qYf04673 for linux-mips-outgoing; Mon, 25 Feb 2002 23:52:34 -0800 Received: from mail.ict.ac.cn ([159.226.39.4]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g1Q7qP904669 for ; Mon, 25 Feb 2002 23:52:26 -0800 Message-Id: <200202260752.g1Q7qP904669@oss.sgi.com> Received: (qmail 24010 invoked from network); 26 Feb 2002 06:56:18 -0000 Received: from unknown (HELO foxsen) (@159.226.40.150) by 159.226.39.4 with SMTP; 26 Feb 2002 06:56:19 -0000 Date: Tue, 26 Feb 2002 14:50:9 +0800 From: Zhang Fuxin To: Scott A McConnell CC: "linux-mips@oss.sgi.com" Subject: Re: MIPS, i8259 and spurious interrupts. X-mailer: FoxMail 3.11 Release [cn] Mime-Version: 1.0 Content-Type: text/plain; charset="GB2312" Content-Transfer-Encoding: 7bit Sender: owner-linux-mips@oss.sgi.com Precedence: bulk hi, >/************************************************************************************/ >/* Why am I not returning from the following >call? */ >/************************************************************************************/ > > printk("*** SP 1 irq: %d***\n", irq); > if (i8259A_irq_real(irq)) > /* > * oops, the IRQ _is_ in service according to the > * 8259A - not spurious, go handle it. > */ > printk("*** SP 2 ***\n"); > goto handle_real_irq; do you really mean it? the goto is unconditional now? but your output susgest that i8259A_irq_real never return true > > { > static int spurious_irq_mask = 0; > > printk("*** SP 3 ***\n"); > > /* > * At this point we can be sure the IRQ is spurious, > * lets ACK and report it. [once per IRQ] > */ > printk("*** SP 4 ***\n"); > > if (!(spurious_irq_mask & irqmask)) { > printk("spurious 8259A interrupt: IRQ%d.\n", irq); > spurious_irq_mask |= irqmask; > } > printk("*** SP 5 ***\n"); > > irq_err_count++; > /* > * Theoretically we do not have to handle this IRQ, > * but in Linux this does not cause problems and is > * simpler for us. > */ > printk("*** SP 6 ***\n"); > > goto handle_real_irq; > } >} > > >Thanks in advance for any advice... > >-- >Scott A. McConnell Regards Zhang Fuxin fxzhang@ict.ac.cn From owner-linux-mips@oss.sgi.com Tue Feb 26 03:29:21 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g1QBTLe12069 for linux-mips-outgoing; Tue, 26 Feb 2002 03:29:21 -0800 Received: from firewall.i-data.com (firewall.i-data.com [195.24.22.194]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g1QBTI912065 for ; Tue, 26 Feb 2002 03:29:18 -0800 Received: (qmail 23919 invoked from network); 26 Feb 2002 11:34:35 -0000 Received: from idahub2000.i-data.com (HELO idanshub.i-data.com) (172.16.1.8) by firewall.i-data.com with SMTP; 26 Feb 2002 11:34:35 -0000 Received: from eicon.com ([172.17.159.1]) by idanshub.i-data.com (Lotus Domino Release 5.0.8) with ESMTP id 2002022611291552:46028 ; Tue, 26 Feb 2002 11:29:15 +0100 Message-ID: <3C7B63E7.8DFF9D89@eicon.com> Date: Tue, 26 Feb 2002 11:31:03 +0100 From: "Tommy S. Christensen" X-Mailer: Mozilla 4.76 [en] (X11; U; Linux 2.2.17-14 i686) X-Accept-Language: en MIME-Version: 1.0 To: Matthew Dharm CC: Kevin Paul Herbert , Linux-MIPS Subject: Re: Is this a toolchain bug? References: X-MIMETrack: Itemize by SMTP Server on idaHUB2000/INT(Release 5.0.8 |June 18, 2001) at 26-02-2002 11:29:15, Serialize by Router on idaHUB2000/INT(Release 5.0.8 |June 18, 2001) at 26-02-2002 11:29:16, Serialize complete at 26-02-2002 11:29:16 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=us-ascii Sender: owner-linux-mips@oss.sgi.com Precedence: bulk Matthew Dharm wrote: > > So, we've got a problem somewhere in the module handling. Either the > symbol wasn't being relocated properly, or it wasn't being allocated > properly, or something. I'm not an expert in this region of the > kernel, but my guess is that we're going to see this more and more > often, so someone with a clue should take a look at this. To me, this looks like a problem with common symbols that I have run into a couple of times (I think it was in i2o). Compiling with -fno-common or linking with -d worked for me. (Or avoid having uninitialized global variables.) I guess insmod should actually complain in this case ?! -Tommy From owner-linux-mips@oss.sgi.com Tue Feb 26 03:49:19 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g1QBnJ212542 for linux-mips-outgoing; Tue, 26 Feb 2002 03:49:19 -0800 Received: from oval.algor.co.uk (root@oval.algor.co.uk [62.254.210.250]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g1QBnC912536 for ; Tue, 26 Feb 2002 03:49:13 -0800 Received: from gladsmuir.algor.co.uk.algor.co.uk (IDENT:dom@gladsmuir.algor.co.uk [192.168.5.75]) by oval.algor.co.uk (8.11.6/8.10.1) with ESMTP id g1QAn6413505; Tue, 26 Feb 2002 10:49:07 GMT From: Dominic Sweetman MIME-Version: 1.0 Message-ID: <15483.26654.874273.652089@gladsmuir.algor.co.uk> Date: Tue, 26 Feb 2002 10:49:02 +0000 To: Scott A McConnell Cc: linux-mips@oss.sgi.com Subject: Re: MIPS, i8259 and spurious interrupts. In-Reply-To: <3C7A9579.BE02A838@cotw.com> References: <3C7A9579.BE02A838@cotw.com> X-Mailer: VM 6.89 under 21.1 (patch 14) "Cuyahoga Valley" XEmacs Lucid User-Agent: SEMI/1.13.7 (Awazu) CLIME/1.13.6 (=?ISO-2022-JP?B?GyRCQ2YbKEI=?= =?ISO-2022-JP?B?GyRCJU4+MRsoQg==?=) MULE XEmacs/21.1 (patch 14) (Cuyahoga Valley) (i386-redhat-linux) Content-Type: text/plain; charset=US-ASCII Sender: owner-linux-mips@oss.sgi.com Precedence: bulk Scott A McConnell (samcconn@cotw.com) writes: > I have been trying to track down and resolve a spurious interrupt > problem. I have attached some output and the code used to generate it in > i8259.c. Part of your problem may be write buffer hell. Whatever you do to clear the interrupt when you've done with it involves writing to the 8259 controller. It's probably a long way away - probably through a PCI bus to a simulated ISA bus. Somewhere along the line the writes will be 'posted'; your CPU is fast, so when your CPU emerges from its interrupt routine the write may not have reached the 8259 yet, and you'll get a spurious interrupt. The code which switches off the interrupt at the 8259 should probably be equipped with a 'barrier' call to some system function which waits until the write has really happened. Then 8259s are ugly things which have some very CPU-specific interactions with x86 CPUs. In a non-x86 context you need to initialise them in particular ways. -- Dominic Sweetman Algorithmics Ltd The Fruit Farm, Ely Road, Chittering, CAMBS CB5 9PH, ENGLAND phone +44 1223 706200/fax +44 1223 706250/direct +44 1223 706205 http://www.algor.co.uk From owner-linux-mips@oss.sgi.com Tue Feb 26 03:56:06 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g1QBu6k12691 for linux-mips-outgoing; Tue, 26 Feb 2002 03:56:06 -0800 Received: from oval.algor.co.uk (root@oval.algor.co.uk [62.254.210.250]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g1QBtV912684; Tue, 26 Feb 2002 03:55:31 -0800 Received: from gladsmuir.algor.co.uk.algor.co.uk (IDENT:dom@gladsmuir.algor.co.uk [192.168.5.75]) by oval.algor.co.uk (8.11.6/8.10.1) with ESMTP id g1QAtK413844; Tue, 26 Feb 2002 10:55:21 GMT From: Dominic Sweetman MIME-Version: 1.0 Message-ID: <15483.27029.29266.976139@gladsmuir.algor.co.uk> Date: Tue, 26 Feb 2002 10:55:17 +0000 To: Ralf Baechle Cc: Jay Carlson , mad-dev@lists.mars.org, Carlo Agostini , linux-mips@oss.sgi.com Subject: Re: Problems compiling . soft-float In-Reply-To: <20020226060236.A5293@dea.linux-mips.net> References: <20020225132559.A3500@dea.linux-mips.net> <20020226060236.A5293@dea.linux-mips.net> X-Mailer: VM 6.89 under 21.1 (patch 14) "Cuyahoga Valley" XEmacs Lucid User-Agent: SEMI/1.13.7 (Awazu) CLIME/1.13.6 (=?ISO-2022-JP?B?GyRCQ2YbKEI=?= =?ISO-2022-JP?B?GyRCJU4+MRsoQg==?=) MULE XEmacs/21.1 (patch 14) (Cuyahoga Valley) (i386-redhat-linux) Content-Type: text/plain; charset=US-ASCII Sender: owner-linux-mips@oss.sgi.com Precedence: bulk Ralf, > It's really a major pain. Softfp isn't defined in the ABI which assumes > an FPU is available. As the result there is no provision for mixing > softfp and fp-less code. > > Something for the binutils to-do list - ld should make mixing hard-fp > and soft-fp binaries impossible. Incremental changes to the ABI are pretty bad news. Isn't it avoidable in this case? It seems to me that soft-float programs are either carefully controlled test cases, or used as part of a 100% soft-float system. In the first case the programmer had better take care, and in the second the kernel should have been changed to kill any program with an FP op-code. -- Dominic Sweetman Algorithmics Ltd The Fruit Farm, Ely Road, Chittering, CAMBS CB5 9PH, ENGLAND phone +44 1223 706200/fax +44 1223 706250/direct +44 1223 706205 http://www.algor.co.uk From owner-linux-mips@oss.sgi.com Tue Feb 26 03:56:41 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g1QBufS12767 for linux-mips-outgoing; Tue, 26 Feb 2002 03:56:41 -0800 Received: from the-village.bc.nu (lightning.swansea.linux.org.uk [194.168.151.1]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g1QBuc912755 for ; Tue, 26 Feb 2002 03:56:39 -0800 Received: from alan by the-village.bc.nu with local (Exim 3.33 #5) id 16ffVG-0000IW-00; Tue, 26 Feb 2002 11:10:38 +0000 Subject: Re: MIPS, i8259 and spurious interrupts. To: dom@algor.co.uk (Dominic Sweetman) Date: Tue, 26 Feb 2002 11:10:38 +0000 (GMT) Cc: samcconn@cotw.com (Scott A McConnell), linux-mips@oss.sgi.com In-Reply-To: <15483.26654.874273.652089@gladsmuir.algor.co.uk> from "Dominic Sweetman" at Feb 26, 2002 10:49:02 AM X-Mailer: ELM [version 2.5 PL6] MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-Id: From: Alan Cox Sender: owner-linux-mips@oss.sgi.com Precedence: bulk > Then 8259s are ugly things which have some very CPU-specific > interactions with x86 CPUs. In a non-x86 context you need to > initialise them in particular ways. Like with a soldering iron 8) In paticular if you are getting hangs at the point where you allow an IRQ to come in check the level/edge behaviour and see if in fact you are taking a continuous stream of interrupts jamming the CPU in irq handling From owner-linux-mips@oss.sgi.com Tue Feb 26 04:38:38 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g1QCcc214012 for linux-mips-outgoing; Tue, 26 Feb 2002 04:38:38 -0800 Received: from hotmail.com (f107.law11.hotmail.com [64.4.17.107]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g1QCcW914009 for ; Tue, 26 Feb 2002 04:38:32 -0800 Received: from mail pickup service by hotmail.com with Microsoft SMTPSVC; Tue, 26 Feb 2002 03:38:27 -0800 Received: from 203.196.146.27 by lw11fd.law11.hotmail.msn.com with HTTP; Tue, 26 Feb 2002 11:38:26 GMT X-Originating-IP: [203.196.146.27] From: "Samiran S" To: linux-mips@oss.sgi.com Subject: Help about loading the kernel from host PC to board Date: Tue, 26 Feb 2002 17:08:26 +0530 Mime-Version: 1.0 Content-Type: text/plain; format=flowed Message-ID: X-OriginalArrivalTime: 26 Feb 2002 11:38:27.0223 (UTC) FILETIME=[1B2D4270:01C1BEBA] Sender: owner-linux-mips@oss.sgi.com Precedence: bulk Hi all , I had the whole set up of MIPS Malta board with its linux OS , 1) how can I start Linux on that board ? I got that monitor program ( YEMMON) I set the IP addrs. and related things. For loading the linux kernel I am using load tftp://path of vmlinux then it is not loading that kernel , it is giving some error it is given below YAMON> load tftp://175.150.125.170/home/mipsel/vmlinux About to load tftp://175.150.125.170/home/mipsel/vmlinux Press Ctrl-C to break Error : TFTP READ-REQ ERROR Diag : Host returned: ErrorCode = 1, ErrorMsg = File not found Hint : Check TFTP-server: file-existence, directory/file-attributes if any body can help please reply me thanks Simun **** Info cpu **** Processor Company ID = 0x01 (MIPS Technologies, Inc.) ProcessorID/revision = 0x80(MIPS 4Kc) / 0x01 Endianness = Little CPU/Bus frequency =80 MHz / 4 0 MHz ICACHE size = 16384bytes ICACHE linesize = 16 bytes ICACHE associativity= 4-way DCACHE size = 16384bytes DCACHE linesize = 16 bytes DCACHE associativity = 4-way TLB entries = 16 ~ ~ ~ ~ _________________________________________________________________ Join the world’s largest e-mail service with MSN Hotmail. http://www.hotmail.com From owner-linux-mips@oss.sgi.com Tue Feb 26 04:52:48 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g1QCqm514292 for linux-mips-outgoing; Tue, 26 Feb 2002 04:52:48 -0800 Received: from scan2.fhg.de (scan2.fhg.de [153.96.1.37]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g1QCqf914285 for ; Tue, 26 Feb 2002 04:52:41 -0800 Received: from scan2.fhg.de (localhost [127.0.0.1]) by scan2.fhg.de (8.11.1/8.11.1) with ESMTP id g1QBqUx06679; Tue, 26 Feb 2002 12:52:30 +0100 (MET) Received: from esk.esk.fhg.de (esk.esk.fhg.de [153.96.161.2]) by scan2.fhg.de (8.11.1/8.11.1) with ESMTP id g1QBqT606669; Tue, 26 Feb 2002 12:52:29 +0100 (MET) Received: from esk.fhg.de (host4-40 [192.168.4.40]) by esk.esk.fhg.de (8.9.3/8.9.3) with ESMTP id MAA12889; Tue, 26 Feb 2002 12:52:27 +0100 (MET) Message-ID: <3C7B76C9.48B9D395@esk.fhg.de> Date: Tue, 26 Feb 2002 12:51:37 +0100 From: Wolfgang Heidrich Organization: FhG - ESK X-Mailer: Mozilla 4.7 [de] (WinNT; I) X-Accept-Language: de MIME-Version: 1.0 To: Samiran S CC: linux-mips@oss.sgi.com Subject: Re: Help about loading the kernel from host PC to board References: Content-Type: text/plain; charset=iso-8859-1 X-MIME-Autoconverted: from 8bit to quoted-printable by scan2.fhg.de id g1QBqUx06679 Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by oss.sgi.com id g1QCqg914288 Sender: owner-linux-mips@oss.sgi.com Precedence: bulk Hi Samiran, Samiran S wrote: > > Hi all , > > I had the whole set up of MIPS Malta board with its linux OS , > > 1) how can I start Linux on that board ? > > I got that monitor program ( YEMMON) > > I set the IP addrs. and related things. For loading the linux kernel I am > using > > load tftp://path of vmlinux > > then it is not loading that kernel , it is giving some error it is given > below > > YAMON> load tftp://175.150.125.170/home/mipsel/vmlinux > About to load tftp://175.150.125.170/home/mipsel/vmlinux The slash separates the ip-address and the file. So you chose the file home/mipsel/vmlinux, but probably you want /home/mipsel/vmlinux (because home is located in the root-directory). So you have to type with two slashes: YAMON> load tftp://175.150.125.170//home/mipsel/vmlinux Greetings -- Fraunhofer Einrichtung für Systeme der Kommunikationstechnik (ESK) Wolfgang Heidrich Hansastraße 32 Dipl.-Ing. 80686 München / Germany Phone : +49(0)89-547088-376 E-Mail: wolfgang.heidrich@esk.fhg.de Fax : +49(0)89-547088-221 From owner-linux-mips@oss.sgi.com Tue Feb 26 04:57:23 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g1QCvNW14474 for linux-mips-outgoing; Tue, 26 Feb 2002 04:57:23 -0800 Received: from dea.linux-mips.net (a1as04-p167.stg.tli.de [195.252.186.167]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g1QCvE914469 for ; Tue, 26 Feb 2002 04:57:15 -0800 Received: (from ralf@localhost) by dea.linux-mips.net (8.11.6/8.11.1) id g1QBtXZ18135; Tue, 26 Feb 2002 12:55:33 +0100 Date: Tue, 26 Feb 2002 12:55:32 +0100 From: Ralf Baechle To: Jay Carlson Cc: Hartvig Ekner , linux-mips@oss.sgi.com Subject: Re: Setting up of GP in static, non-PIC version of glibc? Message-ID: <20020226125532.B7497@dea.linux-mips.net> References: <20020225173433.B3680@dea.linux-mips.net> <334839BA-2A77-11D6-AB38-0030658AB11E@nop.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <334839BA-2A77-11D6-AB38-0030658AB11E@nop.com>; from nop@nop.com on Tue, Feb 26, 2002 at 12:10:50AM -0500 X-Accept-Language: de,en,fr Sender: owner-linux-mips@oss.sgi.com Precedence: bulk On Tue, Feb 26, 2002 at 12:10:50AM -0500, Jay Carlson wrote: > By default non-PIC code *does* use $gp due to the brain damage in gas; > gas defaults to -G 8 unless told otherwise (-KPIC implies -G0 so we > don't see this in PIC code.) gcc won't know anything about this, of > course. > > What I'm doing in SUBTARGET_ASM_SPEC is to write something like > "%{fno-pic: %{!G: -G0}}"--if we're not in PIC mode, pass -G0 to gas by > default. > > Anyway, once that's straightened out, -G8 does appear to work the way > you'd expect, with the code that Hartvig pasted above---I had written a > byte-for-byte identical patch :-) I agree on that one except that 64kB of small data no longer seem to be sufficient for every common application in the world. So I'd vote for a more defensive choice of the -G value, that is 0. Ralf From owner-linux-mips@oss.sgi.com Tue Feb 26 05:27:46 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g1QDRkI15097 for linux-mips-outgoing; Tue, 26 Feb 2002 05:27:46 -0800 Received: from dea.linux-mips.net (a1as04-p167.stg.tli.de [195.252.186.167]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g1QDRe915093 for ; Tue, 26 Feb 2002 05:27:40 -0800 Received: (from ralf@localhost) by dea.linux-mips.net (8.11.6/8.11.1) id g1QCRCG18470; Tue, 26 Feb 2002 13:27:12 +0100 Date: Tue, 26 Feb 2002 13:27:12 +0100 From: Ralf Baechle To: Dominic Sweetman Cc: Jay Carlson , mad-dev@lists.mars.org, Carlo Agostini , linux-mips@oss.sgi.com Subject: Re: Problems compiling . soft-float Message-ID: <20020226132711.A18296@dea.linux-mips.net> References: <20020225132559.A3500@dea.linux-mips.net> <20020226060236.A5293@dea.linux-mips.net> <15483.27029.29266.976139@gladsmuir.algor.co.uk> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <15483.27029.29266.976139@gladsmuir.algor.co.uk>; from dom@algor.co.uk on Tue, Feb 26, 2002 at 10:55:17AM +0000 X-Accept-Language: de,en,fr Sender: owner-linux-mips@oss.sgi.com Precedence: bulk On Tue, Feb 26, 2002 at 10:55:17AM +0000, Dominic Sweetman wrote: > Incremental changes to the ABI are pretty bad news. Isn't it > avoidable in this case? > > It seems to me that soft-float programs are either carefully > controlled test cases, or used as part of a 100% soft-float system. > > In the first case the programmer had better take care, and in the > second the kernel should have been changed to kill any program with an > FP op-code. Experience shows that people will use every opportunity to shot themselfes into their foot ... Even a soft-fp system may still have the in-kernel emulator, so be able to execute both soft-fp and hard-fp binaries correctly. But it won't be able to support a mix of both nor would the kernel know that an application is just mixing hard and soft fp. Ralf From owner-linux-mips@oss.sgi.com Tue Feb 26 06:03:21 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g1QE3L016061 for linux-mips-outgoing; Tue, 26 Feb 2002 06:03:21 -0800 Received: from delta.ds2.pg.gda.pl (delta.ds2.pg.gda.pl [213.192.72.1]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g1QE1q916029; Tue, 26 Feb 2002 06:02:03 -0800 Received: from localhost by delta.ds2.pg.gda.pl (8.9.3/8.9.3) with SMTP id NAA15051; Tue, 26 Feb 2002 13:59:46 +0100 (MET) Date: Tue, 26 Feb 2002 13:59:46 +0100 (MET) From: "Maciej W. Rozycki" To: Daniel Jacobowitz cc: Jay Carlson , Ralf Baechle , mad-dev@lists.mars.org, Carlo Agostini , linux-mips@oss.sgi.com Subject: Re: Problems compiling . soft-float In-Reply-To: <20020226005138.A4594@nevyn.them.org> Message-ID: Organization: Technical University of Gdansk MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-linux-mips@oss.sgi.com Precedence: bulk On Tue, 26 Feb 2002, Daniel Jacobowitz wrote: > > Agreed. So do we need a special flag/directive for gas to say "I'm > > using soft float"? > > And bit in the ELF header. We can talk about this in a couple weeks > once binutils 2.12 is out :) And a way for an override for ones who know what they are doing. -- + Maciej W. Rozycki, Technical University of Gdansk, Poland + +--------------------------------------------------------------+ + e-mail: macro@ds2.pg.gda.pl, PGP key available + From owner-linux-mips@oss.sgi.com Tue Feb 26 06:11:36 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g1QEBap17006 for linux-mips-outgoing; Tue, 26 Feb 2002 06:11:36 -0800 Received: from delta.ds2.pg.gda.pl (macro@delta.ds2.pg.gda.pl [213.192.72.1]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g1QEBL916995; Tue, 26 Feb 2002 06:11:24 -0800 Received: from localhost by delta.ds2.pg.gda.pl (8.9.3/8.9.3) with SMTP id NAA15043; Tue, 26 Feb 2002 13:59:29 +0100 (MET) Date: Tue, 26 Feb 2002 13:59:29 +0100 (MET) From: "Maciej W. Rozycki" To: Daniel Jacobowitz cc: Jay Carlson , Ralf Baechle , mad-dev@lists.mars.org, Carlo Agostini , linux-mips@oss.sgi.com Subject: Re: Problems compiling . soft-float In-Reply-To: <20020226005138.A4594@nevyn.them.org> Message-ID: Organization: Technical University of Gdansk MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-linux-mips@oss.sgi.com Precedence: bulk On Tue, 26 Feb 2002, Daniel Jacobowitz wrote: > > Agreed. So do we need a special flag/directive for gas to say "I'm > > using soft float"? > > And bit in the ELF header. We can talk about this in a couple weeks > once binutils 2.12 is out :) And a way for an override for ones who know what they are doing. -- + Maciej W. Rozycki, Technical University of Gdansk, Poland + +--------------------------------------------------------------+ + e-mail: macro@ds2.pg.gda.pl, PGP key available + From owner-linux-mips@oss.sgi.com Tue Feb 26 06:35:23 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g1QEZN320337 for linux-mips-outgoing; Tue, 26 Feb 2002 06:35:23 -0800 Received: from mail.ict.ac.cn ([159.226.39.4]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g1QEZI920334 for ; Tue, 26 Feb 2002 06:35:18 -0800 Message-Id: <200202261435.g1QEZI920334@oss.sgi.com> Received: (qmail 31202 invoked from network); 26 Feb 2002 13:39:13 -0000 Received: from unknown (HELO foxsen) (@159.226.40.150) by 159.226.39.4 with SMTP; 26 Feb 2002 13:39:13 -0000 Date: Tue, 26 Feb 2002 21:32:8 +0800 From: Zhang Fuxin To: Scott A McConnell CC: "linux-mips@oss.sgi.com" Subject: Re: Re: MIPS, i8259 and spurious interrupts. X-mailer: FoxMail 3.11 Release [cn] Mime-Version: 1.0 Content-Type: text/plain; charset="GB2312" Content-Transfer-Encoding: 7bit Sender: owner-linux-mips@oss.sgi.com Precedence: bulk hi, then check your interrupt mask code,i suffered from this problem some time ago too. You can check the list for those threads(more than one). In short,the reason i was seeing spurious interrupt is: 1. the code i used to decide which interrupt coming in used to have a bug (the IRR bit may still set for current interrupt even after i masked it, when a new 8259 interrupt come in,i detect it as the old one) 2. write to 8259 didn't really reach device for some time,some barrier needed > >No this is an instrumentation mistake. Yes it never returns... >Because I reenter the interrupt handler before it completes. Regards Zhang Fuxin fxzhang@ict.ac.cn From owner-linux-mips@oss.sgi.com Tue Feb 26 07:56:10 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g1QFuAv23737 for linux-mips-outgoing; Tue, 26 Feb 2002 07:56:10 -0800 Received: from chmls16.mediaone.net (chmls16.ne.ipsvc.net [24.147.1.151]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g1QFu2923733; Tue, 26 Feb 2002 07:56:03 -0800 Received: from localhost (h00a0cc39f081.ne.mediaone.net [65.96.250.215]) by chmls16.mediaone.net (8.11.1/8.11.1) with ESMTP id g1QEtdP28335; Tue, 26 Feb 2002 09:55:39 -0500 (EST) Date: Tue, 26 Feb 2002 09:55:30 -0500 Subject: Re: Setting up of GP in static, non-PIC version of glibc? Content-Type: text/plain; charset=US-ASCII; format=flowed Mime-Version: 1.0 (Apple Message framework v481) Cc: Jay Carlson , Hartvig Ekner , linux-mips@oss.sgi.com To: Ralf Baechle From: Jay Carlson In-Reply-To: <20020226125532.B7497@dea.linux-mips.net> Message-Id: Content-Transfer-Encoding: 7bit X-Mailer: Apple Mail (2.481) Sender: owner-linux-mips@oss.sgi.com Precedence: bulk On Tuesday, February 26, 2002, at 06:55 AM, Ralf Baechle wrote: > On Tue, Feb 26, 2002 at 12:10:50AM -0500, Jay Carlson wrote: > >> By default non-PIC code *does* use $gp due to the brain damage in gas; >> gas defaults to -G 8 unless told otherwise (-KPIC implies -G0 so we >> don't see this in PIC code.) gcc won't know anything about this, of >> course. >> >> What I'm doing in SUBTARGET_ASM_SPEC is to write something like >> "%{fno-pic: %{!G: -G0}}"--if we're not in PIC mode, pass -G0 to gas by >> default. >> >> Anyway, once that's straightened out, -G8 does appear to work the way >> you'd expect, with the code that Hartvig pasted above---I had written a >> byte-for-byte identical patch :-) > > I agree on that one except that 64kB of small data no longer seem to be > sufficient for every common application in the world. So I'd vote for a > more defensive choice of the -G value, that is 0. Right. In my ideal world, here's how it would work: cc1 defaults to -G0. I think we have that now. gas defaults to -G0. Messing with SUBTARGET_ASM_SPEC has that effect for people who use the gcc driver, but anybody invoking gas directly will still hit this problem, but too bad. So I think the primary constituency for gas defaulting to -G8 are existing cygnuhhhh I mean redhat embedded MIPS customers, outside of Linux; that's who we should check with before we change the default. Jay From owner-linux-mips@oss.sgi.com Tue Feb 26 09:59:14 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g1QHxEW29230 for linux-mips-outgoing; Tue, 26 Feb 2002 09:59:14 -0800 Received: from web11902.mail.yahoo.com (web11902.mail.yahoo.com [216.136.172.186]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g1QHx2929226 for ; Tue, 26 Feb 2002 09:59:02 -0800 Message-ID: <20020226165902.73329.qmail@web11902.mail.yahoo.com> Received: from [209.243.184.191] by web11902.mail.yahoo.com via HTTP; Tue, 26 Feb 2002 08:59:02 PST Date: Tue, 26 Feb 2002 08:59:02 -0800 (PST) From: Wayne Gowcher Subject: Problem Cross compiling simple test program To: linux-mips@oss.sgi.com In-Reply-To: <20020225094525.GA16992@paradigm.rfc822.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Sender: owner-linux-mips@oss.sgi.com Precedence: bulk I am trying to cross compile a simple "Hello World" use app. I have the rpms (obtained from sgi site ) for binutils-mipsel-linux-2.8.1-2 and egcs-mipsel-linux-1.1.2-4 installed. I first started using redhat 6.1 available on the sgi website and extracted the glibc libraries from glibc-2.0.6-5lm.mipsel.rpm glibc-devel-2.0.6-5lm.mipsel.rpm to /usr/mipsel-linux/lib & /usr/mipsel-linux/include When I compile my little test app using the following it compiles OK and when executed on the MIPS target it prints out "Hello World" on cue. mipsel-linux-gcc -o hello hello.c I wanted to use the redhat 7.0 distribution on sgi, so I backed up the include and lib directories of /usr/mipsel-linux and cleaned them out, then extracted the redhat 7.0 glibc libraries. I then compiled the same hello user app, but this time the app won't even link and gives me the error : /usr/mipsel-linux/bin/ld: /usr/mipsel-linux/lib/libc.so.6: __libc_enable_secure: invalid version 6 (max 5) /usr/mipsel-linux/lib/libc.so.6: could not read symbols: Bad value Note, I hand edit /usr/mipsel-linux/lib/libc.so to reflect the path to /usr/mipsel-linux instead of /lib and /usr/lib. Note if I go back to the backed up dirs I can still compile hello.c. I used the following files to extarct the glibc libraries : glibc-2.2.2-1.mipsel.rpm glibc-common-2.2.2-1.mipsel.rpm I use the following simple script to extract libraries in both cases : --start script--- mkdir tmp cd tmp # fileone=glibc-2.0.6-5lm.mipsel.rpm # filetwo=glibc-devel-2.0.6-5lm.mipsel.rpm fileone=glibc-2.2.2-1.mipsel.rpm filetwo=glibc-devel-2.2.2-1.mipsel.rpm rpm2cpio ../$fileone | cpio --extract --make-directories rpm2cpio ../$filetwo | cpio --extract --make-directories cp -a usr/include /usr/mipsel-linux cp -a lib/* /usr/mipsel-linux/lib cp -a usr/lib/* /usr/mipsel-linux/lib cd ../ rm -fr tmp cd /usr/mipsel-linux/lib ls -l | grep "../../lib" | sed 's|../../lib/||' | awk '{print "ln -sf", $11, $9 }' | tee fixit sh fixit rm fixit --- end of simple script --- So that's what I am doing, and I would really appreciate if anyone on the list could answer my questions : 1, To cross compile target apps for redhat7.0, I do really need to cross compile against the glibc-2.2.2 libraries don't I ? Could I get away with compiling against the glibc-2.0.6 libraries ? 2, Has anyone managed to cross compile user apps against redhat 7.0 ? If so how did you do it ? Please give details. 3, Can anyone see anything wrong in what I have done and if so, can you tell me what and where ? TIA Wayne __________________________________________________ Do You Yahoo!? Yahoo! Sports - Coverage of the 2002 Olympic Games http://sports.yahoo.com From owner-linux-mips@oss.sgi.com Tue Feb 26 10:35:24 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g1QIZOB30294 for linux-mips-outgoing; Tue, 26 Feb 2002 10:35:24 -0800 Received: from dea.linux-mips.net (a1as04-p167.stg.tli.de [195.252.186.167]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g1QIZJ930290 for ; Tue, 26 Feb 2002 10:35:20 -0800 Received: (from ralf@localhost) by dea.linux-mips.net (8.11.6/8.11.1) id g1QHMV725531; Tue, 26 Feb 2002 18:22:31 +0100 Date: Tue, 26 Feb 2002 18:22:31 +0100 From: Ralf Baechle To: Jay Carlson Cc: Hartvig Ekner , linux-mips@oss.sgi.com Subject: Re: Setting up of GP in static, non-PIC version of glibc? Message-ID: <20020226182231.A25493@dea.linux-mips.net> References: <20020226125532.B7497@dea.linux-mips.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: ; from nop@nop.com on Tue, Feb 26, 2002 at 09:55:30AM -0500 X-Accept-Language: de,en,fr Sender: owner-linux-mips@oss.sgi.com Precedence: bulk On Tue, Feb 26, 2002 at 09:55:30AM -0500, Jay Carlson wrote: > Right. In my ideal world, here's how it would work: > > cc1 defaults to -G0. I think we have that now. > > gas defaults to -G0. Messing with SUBTARGET_ASM_SPEC has that effect > for people who use the gcc driver, but anybody invoking gas directly > will still hit this problem, but too bad. > > So I think the primary constituency for gas defaulting to -G8 are > existing cygnuhhhh I mean redhat embedded MIPS customers, outside of > Linux; that's who we should check with before we change the default. So far we've been following the MIPS-UNIX tradition more than anything else. Ralf From owner-linux-mips@oss.sgi.com Tue Feb 26 13:30:00 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g1QLU0D04617 for linux-mips-outgoing; Tue, 26 Feb 2002 13:30:00 -0800 Received: from host099.momenco.com (IDENT:root@www.momenco.com [64.169.228.99]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g1QLTt904611 for ; Tue, 26 Feb 2002 13:29:55 -0800 Received: from beagle (beagle.internal.momenco.com [192.168.0.115]) by host099.momenco.com (8.11.6/8.11.6) with SMTP id g1QKTrR26308; Tue, 26 Feb 2002 12:29:53 -0800 From: "Matthew Dharm" To: "Tommy S. Christensen" Cc: "Kevin Paul Herbert" , "Linux-MIPS" Subject: RE: Is this a toolchain bug? Date: Tue, 26 Feb 2002 12:29:53 -0800 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0) In-Reply-To: <3C7B63E7.8DFF9D89@eicon.com> X-MIMEOLE: Produced By Microsoft MimeOLE V5.50.4133.2400 Importance: Normal Sender: owner-linux-mips@oss.sgi.com Precedence: bulk Either insmod or depmod should complain if it can detect a scenario like this. Matt -- Matthew D. Dharm Senior Software Designer Momentum Computer Inc. 1815 Aston Ave. Suite 107 (760) 431-8663 X-115 Carlsbad, CA 92008-7310 Momentum Works For You www.momenco.com > -----Original Message----- > From: owner-linux-mips@oss.sgi.com > [mailto:owner-linux-mips@oss.sgi.com]On Behalf Of Tommy S. > Christensen > Sent: Tuesday, February 26, 2002 2:31 AM > To: Matthew Dharm > Cc: Kevin Paul Herbert; Linux-MIPS > Subject: Re: Is this a toolchain bug? > > > Matthew Dharm wrote: > > > > So, we've got a problem somewhere in the module handling. > Either the > > symbol wasn't being relocated properly, or it wasn't > being allocated > > properly, or something. I'm not an expert in this region of the > > kernel, but my guess is that we're going to see this more and more > > often, so someone with a clue should take a look at this. > > To me, this looks like a problem with common symbols that I have run > into a couple of times (I think it was in i2o). > > Compiling with -fno-common or linking with -d worked for me. > (Or avoid having uninitialized global variables.) > > I guess insmod should actually complain in this case ?! > > -Tommy > From owner-linux-mips@oss.sgi.com Wed Feb 27 08:09:32 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g1RG9WH07532 for linux-mips-outgoing; Wed, 27 Feb 2002 08:09:32 -0800 Received: from sgi.com (sgi-too.SGI.COM [204.94.211.39] (may be forged)) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g1RG7h907505 for ; Wed, 27 Feb 2002 08:09:29 -0800 Received: from mail1.infineon.com ([192.35.17.229]) by sgi.com (980327.SGI.8.8.8-aspam/980304.SGI-aspam: SGI does not authorize the use of its proprietary systems or networks for unsolicited or bulk email from the Internet.) via ESMTP id HAA01743 for ; Wed, 27 Feb 2002 07:05:03 -0800 (PST) mail_from (Andre.Messerschmidt@infineon.com) From: Andre.Messerschmidt@infineon.com X-Envelope-Sender-Is: Andre.Messerschmidt@infineon.com (at relayer mail1.infineon.com) Received: from mchb0b1w.muc.infineon.com ([172.31.102.53]) by mail1.infineon.com (8.11.1/8.11.1) with ESMTP id g1RF0Ic19732 for ; Wed, 27 Feb 2002 16:00:48 +0100 (MET) Received: from mchb0b5w.muc.infineon.com ([172.31.102.49]) by mchb0b1w.muc.infineon.com with SMTP (Microsoft Exchange Internet Mail Service Version 5.5.2653.13) id F4K6CNGZ; Wed, 27 Feb 2002 16:00:16 +0100 Received: from 172.29.128.3 by mchb0b5w.muc.infineon.com (InterScan E-Mail VirusWall NT); Wed, 27 Feb 2002 16:00:15 +0100 Received: by dlfw003a.dus.infineon.com with Internet Mail Service (5.5.2653.19) id ; Wed, 27 Feb 2002 16:02:51 +0100 Message-ID: <86048F07C015D311864100902760F1DD01B5E73C@dlfw003a.dus.infineon.com> To: linux-mips@oss.sgi.com Subject: Wait instruction on 5kc Date: Wed, 27 Feb 2002 16:02:50 +0100 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2653.19) Content-Type: text/plain Sender: owner-linux-mips@oss.sgi.com Precedence: bulk Hi. Is there a patch available for the wait instruction bug in the 5kc (RTL Revision >= 2.1)? As a hack I changed it to nop (in r4k_wait() ), but I believe there is a clever solution for this. regards -- Andre Messerschmidt Application Engineer Infineon Technologies AG From owner-linux-mips@oss.sgi.com Wed Feb 27 10:57:12 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g1RIvCG12560 for linux-mips-outgoing; Wed, 27 Feb 2002 10:57:12 -0800 Received: from mx2.mips.com (ftp.mips.com [206.31.31.227]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g1RIv8912556 for ; Wed, 27 Feb 2002 10:57:08 -0800 Received: from newman.mips.com (ns-dmz [206.31.31.225]) by mx2.mips.com (8.9.3/8.9.0) with ESMTP id JAA13001 for ; Wed, 27 Feb 2002 09:56:59 -0800 (PST) Received: from copfs01.mips.com (copfs01 [192.168.205.101]) by newman.mips.com (8.9.3/8.9.0) with ESMTP id JAA15608 for ; Wed, 27 Feb 2002 09:57:00 -0800 (PST) Received: from copsun18.mips.com (copsun18 [192.168.205.28]) by copfs01.mips.com (8.11.4/8.9.0) with ESMTP id g1RHuSA09406 for ; Wed, 27 Feb 2002 18:56:28 +0100 (MET) From: Hartvig Ekner Received: (from hartvige@localhost) by copsun18.mips.com (8.9.1/8.9.0) id SAA26112 for linux-mips@oss.sgi.com; Wed, 27 Feb 2002 18:56:58 +0100 (MET) Message-Id: <200202271756.SAA26112@copsun18.mips.com> Subject: Re: Setting up of GP in static, non-PIC version of glibc? To: linux-mips@oss.sgi.com Date: Wed, 27 Feb 2002 18:56:58 +0100 (MET) In-Reply-To: <20020226182231.A25493@dea.linux-mips.net> from "Ralf Baechle" at Feb 26, 2002 06:22:31 PM X-Mailer: ELM [version 2.5 PL1] MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-linux-mips@oss.sgi.com Precedence: bulk Hi, On Tue, Feb 26, 2002 at 09:55:30AM -0500, Jay Carlson wrote: > Right. In my ideal world, here's how it would work: > > cc1 defaults to -G0. I think we have that now. > > gas defaults to -G0. Messing with SUBTARGET_ASM_SPEC has that effect > for people who use the gcc driver, but anybody invoking gas directly > will still hit this problem, but too bad. > > So I think the primary constituency for gas defaulting to -G8 are > existing cygnuhhhh I mean redhat embedded MIPS customers, outside of > Linux; that's who we should check with before we change the default. We cannot change the default for non-Linux MIPS users without causing massive problems. As far as I know, everybody uses -G8 as the default, which can include such things as libraries (which may be delivered as binary only). So this is probably one of these things where the Linux/MIPS world will do one thing, and the rest something else. /Hartvig From owner-linux-mips@oss.sgi.com Wed Feb 27 11:23:35 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g1RJNZm13087 for linux-mips-outgoing; Wed, 27 Feb 2002 11:23:35 -0800 Received: from mx2.mips.com (ftp.mips.com [206.31.31.227]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g1RJNT913082 for ; Wed, 27 Feb 2002 11:23:30 -0800 Received: from newman.mips.com (ns-dmz [206.31.31.225]) by mx2.mips.com (8.9.3/8.9.0) with ESMTP id KAA13109; Wed, 27 Feb 2002 10:23:19 -0800 (PST) Received: from copfs01.mips.com (copfs01 [192.168.205.101]) by newman.mips.com (8.9.3/8.9.0) with ESMTP id KAA16699; Wed, 27 Feb 2002 10:23:09 -0800 (PST) Received: from mips.com ([172.18.27.100]) by copfs01.mips.com (8.11.4/8.9.0) with ESMTP id g1RIMaA10945; Wed, 27 Feb 2002 19:22:36 +0100 (MET) Message-ID: <3C7D2474.6A2F3CA2@mips.com> Date: Wed, 27 Feb 2002 19:24:52 +0100 From: Carsten Langgaard Organization: MIPS Technologies X-Mailer: Mozilla 4.76 [en] (Windows NT 5.0; U) X-Accept-Language: en MIME-Version: 1.0 To: Andre.Messerschmidt@infineon.com CC: linux-mips@oss.sgi.com Subject: Re: Wait instruction on 5kc References: <86048F07C015D311864100902760F1DD01B5E73C@dlfw003a.dus.infineon.com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-linux-mips@oss.sgi.com Precedence: bulk Andre.Messerschmidt@infineon.com wrote: > Hi. > > Is there a patch available for the wait instruction bug in the 5kc (RTL > Revision >= 2.1)? It's been fixed in RTL revision >=2.3. > > As a hack I changed it to nop (in r4k_wait() ), but I believe there is a > clever solution for this. You can remove CPU_5KC from the case statement in check_wait in the file arch/mips/kernel/setup.c > > regards > -- > Andre Messerschmidt > > Application Engineer > Infineon Technologies AG From owner-linux-mips@oss.sgi.com Wed Feb 27 12:01:05 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g1RK15F14200 for linux-mips-outgoing; Wed, 27 Feb 2002 12:01:05 -0800 Received: from gda-server ([202.88.152.146]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g1RK10914191 for ; Wed, 27 Feb 2002 12:01:01 -0800 Received: from [192.168.0.186] by gda-server (ArGoSoft Mail Server, Version 1.5 (1.5.0.8)); Thu, 28 Feb 2002 00:33:43 Message-ID: <3C7DD53B.754E4BCD@gdatech.co.in> Date: Thu, 28 Feb 2002 12:29:07 +0530 From: santhosh <ps.santhosh@gdatech.co.in> Organization: gdatech X-Mailer: Mozilla 4.77 [en] (X11; U; Linux 2.4.2-2 i686) X-Accept-Language: en MIME-Version: 1.0 To: linux-mips@oss.sgi.com Subject: Error Linux Krenel for SWARM (SB1250) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-linux-mips@oss.sgi.com Precedence: bulk I have a got a error when I build linux kernel for SWARM board(SB1250). send a query to solve.. [root@gda_Santhosh kernel]# gmake vmlinux mips-linux-gcc -I /home/revathy/linux/src/kernel/include/asm/gcc -D__KERNEL__ -I/home/revathy/linux/src/kernel/include -Wall -Wstrict-prototypes -Wno-trigraphs -O2 -fomit-frame-pointer -fno-strict-aliasing -fno-common -G 0 -mno-abicalls -fno-pic -mcpu=sb1 -mips2 -Wa,--trap -pipe -c -o init/main.o init/main.c Assembler messages: Error: invalid architecture -mcpu=sb1 cc1: bad value (sb1) for -mcpu= switch init/main.c:198: output pipe has been closed cpp: output pipe has been closed gmake: *** [init/main.o] Error 1 From owner-linux-mips@oss.sgi.com Wed Feb 27 13:06:22 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g1RL6Me17039 for linux-mips-outgoing; Wed, 27 Feb 2002 13:06:22 -0800 Received: from ux3.sp.cs.cmu.edu (UX3.SP.CS.CMU.EDU [128.2.198.103]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g1RL6H917035 for ; Wed, 27 Feb 2002 13:06:17 -0800 Received: from GS256.SP.CS.CMU.EDU ([128.2.199.27]) by ux3.sp.cs.cmu.edu id aa28013; 27 Feb 2002 15:05 EST Subject: Re: Error Linux Krenel for SWARM (SB1250) From: Justin Carlson To: santhosh Cc: linux-mips@oss.sgi.com In-Reply-To: <3C7DD53B.754E4BCD@gdatech.co.in> References: <3C7DD53B.754E4BCD@gdatech.co.in> Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="=-QIpXqjbSx+jMaZOkPzL7" X-Mailer: Evolution/1.0.2 Date: 27 Feb 2002 15:05:34 -0500 Message-Id: <1014840340.26864.3.camel@gs256.sp.cs.cmu.edu> Mime-Version: 1.0 Sender: owner-linux-mips@oss.sgi.com Precedence: bulk --=-QIpXqjbSx+jMaZOkPzL7 Content-Type: text/plain Content-Transfer-Encoding: quoted-printable On Thu, 2002-02-28 at 01:59, santhosh=03 wrote: >=20 > I have a got a error when I build linux kernel for SWARM > board(SB1250). > send a query to solve.. > Sounds like the version of gcc you're using doesn't know about the sb1.=20 Are you using the tools from SiByte? -Justin =20 --=-QIpXqjbSx+jMaZOkPzL7 Content-Type: application/pgp-signature; name=signature.asc Content-Description: This is a digitally signed message part -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.6 (GNU/Linux) Comment: For info see http://www.gnupg.org iD8DBQA8fTwO47Lg4cGgb74RAlYmAJ9cgZmw0cRFAevaIYH+DOkqVHHovACgyDmp p/sDHIzGAf4qiAPxB7ecX4o= =wxlQ -----END PGP SIGNATURE----- --=-QIpXqjbSx+jMaZOkPzL7-- From owner-linux-mips@oss.sgi.com Wed Feb 27 14:00:38 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g1RM0cr18352 for linux-mips-outgoing; Wed, 27 Feb 2002 14:00:38 -0800 Received: from ayrnetworks.com (earth.ayrnetworks.com [64.166.72.139]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g1RM0a918349 for ; Wed, 27 Feb 2002 14:00:36 -0800 Received: from [192.168.1.5] (IDENT:root@localhost.localdomain [127.0.0.1]) by ayrnetworks.com (8.11.6/8.11.2) with ESMTP id g1RKxGe14556 for ; Wed, 27 Feb 2002 12:59:17 -0800 Mime-Version: 1.0 X-Sender: kph@127.0.0.1 Message-Id: Date: Wed, 27 Feb 2002 13:00:22 -0800 To: linux-mips@oss.sgi.com From: Kevin Paul Herbert Subject: CONFIG_CPU_HAS_WB (or to sync or to nop) Content-Type: text/plain; charset="us-ascii" ; format="flowed" Sender: owner-linux-mips@oss.sgi.com Precedence: bulk What is the intention of CONFIG_CPU_HAS_WB? On an RM7000, am I better off doing a pipeline flush (the nops in wbflush.h) or a sync instruction? Also, any guidance on whether I should go out and ensure writes have completed in PCI host adapters and bridges, or whether this is excessive paranoia. Thanks, Kevin -- From owner-linux-mips@oss.sgi.com Wed Feb 27 15:53:17 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g1RNrHj22509 for linux-mips-outgoing; Wed, 27 Feb 2002 15:53:17 -0800 Received: from hermes.mvista.com (gateway-1237.mvista.com [12.44.186.158]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g1RNrE922505 for ; Wed, 27 Feb 2002 15:53:14 -0800 Received: from mvista.com (IDENT:jsun@orion.mvista.com [10.0.0.75]) by hermes.mvista.com (8.11.0/8.11.0) with ESMTP id g1RMoAB25236; Wed, 27 Feb 2002 14:50:10 -0800 Message-ID: <3C7D6353.3030001@mvista.com> Date: Wed, 27 Feb 2002 14:53:07 -0800 From: Jun Sun User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.4) Gecko/20011126 Netscape6/6.2.1 X-Accept-Language: en-us MIME-Version: 1.0 To: Zhang Fuxin CC: "linux-mips@oss.sgi.com" Subject: Re: used_math not cleared for new processes? References: <200202020723.g127N4d30447@oss.sgi.com> Content-Type: text/plain; charset=GB2312 Content-Transfer-Encoding: 7bit Sender: owner-linux-mips@oss.sgi.com Precedence: bulk Zhang Fuxin wrote: > hi,linux-mips, > I find that current->used_math isn't cleared when we start a new process.Is it > intended? I mean 'start_thread' in do_exec but not 'copy_thread' in do_fork when > speaking 'start a new process'. We can/should? keep used_math for the latter,but for > the former? > I think it make sense to clear used_math in do_exec(). It also improvies the performance slightly by not loading the parent's FPU context when it uses the FPU for the first time. Do you have a patch for this? Jun From owner-linux-mips@oss.sgi.com Wed Feb 27 16:06:28 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g1S06SQ22972 for linux-mips-outgoing; Wed, 27 Feb 2002 16:06:28 -0800 Received: from skip-ext.ab.videon.ca (skip-ext.ab.videon.ca [206.75.216.36]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g1S06P922969 for ; Wed, 27 Feb 2002 16:06:25 -0800 Received: (qmail 26592 invoked from network); 27 Feb 2002 23:06:22 -0000 Received: from unknown (HELO wakko.debian.net) ([24.86.210.128]) (envelope-sender ) by skip-ext.ab.videon.ca (qmail-ldap-1.03) with SMTP for ; 27 Feb 2002 23:06:22 -0000 Received: from localhost ([127.0.0.1] helo=wakko.debian.net ident=jgg) by wakko.debian.net with smtp (Exim 3.16 #1 (Debian)) id 16gD9R-0008Ag-00; Wed, 27 Feb 2002 16:06:21 -0700 Date: Wed, 27 Feb 2002 16:06:21 -0700 (MST) From: Jason Gunthorpe X-Sender: jgg@wakko.debian.net Reply-To: Jason Gunthorpe To: Kevin Paul Herbert cc: linux-mips@oss.sgi.com Subject: Re: CONFIG_CPU_HAS_WB (or to sync or to nop) In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-linux-mips@oss.sgi.com Precedence: bulk On Wed, 27 Feb 2002, Kevin Paul Herbert wrote: > What is the intention of CONFIG_CPU_HAS_WB? On an RM7000, am I better > off doing a pipeline flush (the nops in wbflush.h) or a sync > instruction? Also, any guidance on whether I should go out and ensure > writes have completed in PCI host adapters and bridges, or whether > this is excessive paranoia. The conclusion seems to have been that CPU_HAS_WB is only for a particular kind of WB that did not maintain PCI-type ordering rules on uncached accesses. RM7K assures ordering of uncached reads/writes and does not return read data from the WB so the WB is transparent. The MB fixup patch that Maciej has seems to clean up most of the rest of the issues with WB's and MB's by using sync in the proper places. Linux has no primitives that assure memory operations have been flushed through the entire PCI bus tree (there is no PCI op that will do this).. Jason From owner-linux-mips@oss.sgi.com Wed Feb 27 22:32:31 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g1S6WV330833 for linux-mips-outgoing; Wed, 27 Feb 2002 22:32:31 -0800 Received: from gda-server ([202.88.152.146]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g1S6V9930823 for ; Wed, 27 Feb 2002 22:31:10 -0800 Received: from [192.168.0.186] by gda-server (ArGoSoft Mail Server, Version 1.5 (1.5.0.8)); Thu, 28 Feb 2002 11:03:49 Message-ID: <3C7E68ED.93B565AB@gdatech.co.in> Date: Thu, 28 Feb 2002 22:59:17 +0530 From: santhosh <ps.santhosh@gdatech.co.in> Organization: gdatech X-Mailer: Mozilla 4.77 [en] (X11; U; Linux 2.4.2-2 i686) X-Accept-Language: en MIME-Version: 1.0 To: linux-mips@oss.sgi.com Subject: compiler error Content-Type: multipart/mixed; boundary="------------9DA6765BB54D5478D8D854B8" Sender: owner-linux-mips@oss.sgi.com Precedence: bulk This is a multi-part message in MIME format. --------------9DA6765BB54D5478D8D854B8 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit hi all, i am working on MIPS64 based (SB1250) board. when i tried to compile the kernel i am getting the following error messages Assembler messages: Error: invalid architecture -mcpu=sb1 cc1: bad value (sb1) for -mcpu= switch init/main.c:198: output pipe has been closed cpp: output pipe has been closed make: *** [init/main.o] Error 1 i am attaching the configuration file (.config file) with this. can anyone direct me in correct path santhosh --------------9DA6765BB54D5478D8D854B8 Content-Type: text/plain; charset=us-ascii; name=".config" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename=".config" # # Automatically generated make config: don't edit # CONFIG_MIPS=y CONFIG_MIPS32=y # # Code maturity level options # CONFIG_EXPERIMENTAL=y # # Machine selection # # CONFIG_ACER_PICA_61 is not set # CONFIG_ALGOR_P4032 is not set # CONFIG_BAGET_MIPS is not set # CONFIG_MIPS_COBALT is not set # CONFIG_DECSTATION is not set # CONFIG_DDB5074 is not set # CONFIG_MIPS_EV64120 is not set # CONFIG_MIPS_EV96100 is not set # CONFIG_MIPS_ATLAS is not set # CONFIG_MIPS_MALTA is not set CONFIG_SIBYTE_SB1xxx_SOC=y CONFIG_SIBYTE_SB1250=y # CONFIG_SIBYTE_BCM1120 is not set # CONFIG_SIBYTE_BCM1125 is not set # CONFIG_SIBYTE_BCM1125H is not set # CONFIG_SIMULATION is not set # CONFIG_SIBYTE_STANDALONE is not set # CONFIG_SIBYTE_SB1250_PROF is not set # CONFIG_BCM1250_TBPROF is not set CONFIG_SMP=y # CONFIG_PCI is not set CONFIG_SIBYTE_SWARM=y # CONFIG_L3DEMO is not set # CONFIG_NINO is not set # CONFIG_MIPS_MAGNUM_4000 is not set # CONFIG_MOMENCO_OCELOT is not set # CONFIG_DDB5476 is not set # CONFIG_DDB5477 is not set # CONFIG_NEC_OSPREY is not set # CONFIG_OLIVETTI_M700 is not set # CONFIG_SGI_IP22 is not set # CONFIG_SNI_RM200_PCI is not set # CONFIG_MIPS_ITE8172 is not set # CONFIG_MIPS_IVR is not set # CONFIG_MIPS_PB1000 is not set # CONFIG_TOSHIBA_JMR3927 is not set # CONFIG_HP_LASERJET is not set # CONFIG_HIGHMEM is not set CONFIG_RWSEM_GENERIC_SPINLOCK=y # CONFIG_RWSEM_XCHGADD_ALGORITHM is not set # CONFIG_MCA is not set # CONFIG_SBUS is not set CONFIG_NEW_IRQ=y CONFIG_NEW_TIME_C=y CONFIG_DUMMY_KEYB=y CONFIG_SWAP_IO_SPACE=y # CONFIG_ISA is not set # CONFIG_EISA is not set # # Loadable module support # CONFIG_MODULES=y # CONFIG_MODVERSIONS is not set CONFIG_KMOD=y # # CPU selection # # CONFIG_CPU_R3000 is not set # CONFIG_CPU_TX39XX is not set # CONFIG_CPU_R6000 is not set # CONFIG_CPU_VR41XX is not set # CONFIG_CPU_R4300 is not set # CONFIG_CPU_R4X00 is not set # CONFIG_CPU_TX49XX is not set # CONFIG_CPU_R5000 is not set # CONFIG_CPU_R5432 is not set # CONFIG_CPU_RM7000 is not set # CONFIG_CPU_NEVADA is not set # CONFIG_CPU_R10000 is not set CONFIG_CPU_SB1=y # CONFIG_CPU_MIPS32 is not set # CONFIG_CPU_MIPS64 is not set CONFIG_SB1_PASS_1_WORKAROUNDS=y CONFIG_SB1_CACHE_ERROR=y CONFIG_VTAG_ICACHE=y CONFIG_CPU_HAS_PREFETCH=y # CONFIG_64BIT_PHYS_ADDR is not set # CONFIG_CPU_ADVANCED is not set CONFIG_CPU_HAS_LLSC=y CONFIG_CPU_HAS_LLDSCD=y # CONFIG_CPU_HAS_WB is not set # # General setup # # CONFIG_CPU_LITTLE_ENDIAN is not set CONFIG_KCORE_ELF=y CONFIG_ELF_KERNEL=y # CONFIG_BINFMT_IRIX is not set # CONFIG_FORWARD_KEYBOARD is not set # CONFIG_BINFMT_AOUT is not set CONFIG_BINFMT_ELF=y # CONFIG_BINFMT_MISC is not set CONFIG_NET=y CONFIG_HOTPLUG=y # # PCMCIA/CardBus support # CONFIG_PCMCIA=y # CONFIG_I82365 is not set # CONFIG_TCIC is not set # # PCI Hotplug Support # CONFIG_HOTPLUG_PCI=y # CONFIG_HOTPLUG_PCI_COMPAQ is not set CONFIG_SYSVIPC=y # CONFIG_BSD_PROCESS_ACCT is not set # CONFIG_SYSCTL is not set # # Memory Technology Devices (MTD) # CONFIG_MTD=y # CONFIG_MTD_DEBUG is not set # CONFIG_MTD_PARTITIONS is not set # # User Modules And Translation Layers # # CONFIG_MTD_CHAR is not set # CONFIG_MTD_BLOCK is not set # CONFIG_MTD_BLOCK_RO is not set # CONFIG_FTL is not set # CONFIG_NFTL is not set # # RAM/ROM/Flash chip drivers # CONFIG_MTD_CFI=y # CONFIG_MTD_JEDECPROBE is not set CONFIG_MTD_GEN_PROBE=y # CONFIG_MTD_CFI_ADV_OPTIONS is not set CONFIG_MTD_CFI_INTELEXT=y # CONFIG_MTD_CFI_AMDSTD is not set # CONFIG_MTD_RAM is not set # CONFIG_MTD_ROM is not set # CONFIG_MTD_ABSENT is not set # CONFIG_MTD_OBSOLETE_CHIPS is not set # # Mapping drivers for chip access # CONFIG_MTD_PHYSMAP=y CONFIG_MTD_PHYSMAP_START=0 CONFIG_MTD_PHYSMAP_LEN=0 CONFIG_MTD_PHYSMAP_BUSWIDTH=1 # # Self-contained MTD device drivers # # CONFIG_MTD_SLRAM is not set # CONFIG_MTD_MTDRAM is not set # CONFIG_MTD_BLKMTD is not set # # Disk-On-Chip Device Drivers # # CONFIG_MTD_DOC1000 is not set # CONFIG_MTD_DOC2000 is not set # CONFIG_MTD_DOC2001 is not set # CONFIG_MTD_DOCPROBE is not set # # NAND Flash Device Drivers # # CONFIG_MTD_NAND is not set # # Parallel port support # # CONFIG_PARPORT is not set # # Block devices # # CONFIG_BLK_DEV_FD is not set # CONFIG_BLK_DEV_LOOP is not set # CONFIG_BLK_DEV_NBD is not set CONFIG_BLK_DEV_RAM=y CONFIG_BLK_DEV_RAM_SIZE=4096 CONFIG_BLK_DEV_INITRD=y # # MIPS initrd options # CONFIG_EMBEDDED_RAMDISK=y # CONFIG_SIBYTE_RAMDISK_SIMPLE_INIT is not set CONFIG_SIBYTE_RAMDISK_GENERAL=y # CONFIG_SIBYTE_RAMDISK_PROMICE_CONSOLE is not set # CONFIG_SIBYTE_RAMDISK_NIDEMO is not set # CONFIG_SIBYTE_RAMDISK_SCREENING is not set # # Multi-device support (RAID and LVM) # # CONFIG_MD is not set # # Networking options # # CONFIG_PACKET is not set # CONFIG_NETLINK_DEV is not set # CONFIG_NETFILTER is not set # CONFIG_FILTER is not set CONFIG_UNIX=y CONFIG_INET=y # CONFIG_IP_MULTICAST is not set # CONFIG_IP_ADVANCED_ROUTER is not set CONFIG_IP_PNP=y CONFIG_IP_PNP_DHCP=y CONFIG_IP_PNP_BOOTP=y CONFIG_IP_PNP_RARP=y # CONFIG_NET_IPIP is not set # CONFIG_NET_IPGRE is not set CONFIG_ARPD=y # CONFIG_INET_ECN is not set # CONFIG_SYN_COOKIES is not set CONFIG_IPV6=y # CONFIG_KHTTPD is not set # CONFIG_ATM is not set # CONFIG_VLAN_8021Q is not set # # # # CONFIG_IPX is not set # CONFIG_ATALK is not set # CONFIG_DECNET is not set CONFIG_BRIDGE=y # CONFIG_X25 is not set # CONFIG_LAPB is not set # CONFIG_LLC is not set # CONFIG_NET_DIVERT is not set # CONFIG_ECONET is not set # CONFIG_WAN_ROUTER is not set # CONFIG_NET_FASTROUTE is not set # CONFIG_NET_HW_FLOWCONTROL is not set # # QoS and/or fair queueing # CONFIG_NET_SCHED=y # CONFIG_NET_SCH_CBQ is not set # CONFIG_NET_SCH_CSZ is not set # CONFIG_NET_SCH_PRIO is not set # CONFIG_NET_SCH_RED is not set # CONFIG_NET_SCH_SFQ is not set # CONFIG_NET_SCH_TEQL is not set # CONFIG_NET_SCH_TBF is not set # CONFIG_NET_SCH_GRED is not set CONFIG_NET_SCH_DSMARK=y CONFIG_NET_QOS=y # CONFIG_NET_ESTIMATOR is not set CONFIG_NET_CLS=y # CONFIG_NET_CLS_TCINDEX is not set CONFIG_NET_CLS_ROUTE4=y CONFIG_NET_CLS_ROUTE=y # CONFIG_NET_CLS_FW is not set # CONFIG_NET_CLS_U32 is not set # CONFIG_NET_CLS_RSVP is not set # CONFIG_NET_CLS_RSVP6 is not set # CONFIG_NET_CLS_POLICE is not set # # Telephony Support # # CONFIG_PHONE is not set # # ATA/IDE/MFM/RLL support # # CONFIG_IDE is not set # CONFIG_BLK_DEV_IDE_MODES is not set # CONFIG_BLK_DEV_HD is not set # # SCSI support # # CONFIG_SCSI is not set # # I2O device support # # CONFIG_I2O is not set # # Network device support # CONFIG_NETDEVICES=y # # ARCnet devices # # CONFIG_ARCNET is not set # CONFIG_DUMMY is not set # CONFIG_BONDING is not set # CONFIG_EQUALIZER is not set # CONFIG_TUN is not set # CONFIG_ETHERTAP is not set # # Ethernet (10 or 100Mbit) # CONFIG_NET_ETHERNET=y CONFIG_NET_SB1250_MAC=y # CONFIG_NET_SB1250_MAC_QUIET is not set # CONFIG_NET_VENDOR_3COM is not set # CONFIG_NET_VENDOR_SMC is not set # CONFIG_NET_VENDOR_RACAL is not set # CONFIG_NET_PCI is not set # CONFIG_NET_POCKET is not set # # Ethernet (1000 Mbit) # # CONFIG_ACENIC_OMIT_TIGON_I is not set # CONFIG_FDDI is not set # CONFIG_HIPPI is not set # CONFIG_PPP is not set # CONFIG_SLIP is not set # # Wireless LAN (non-hamradio) # # CONFIG_NET_RADIO is not set # # Token Ring devices # # CONFIG_TR is not set CONFIG_NET_FC=y # CONFIG_SHAPER is not set # # Wan interfaces # # CONFIG_WAN is not set # # PCMCIA network device support # # CONFIG_NET_PCMCIA is not set # # Amateur Radio support # # CONFIG_HAMRADIO is not set # # IrDA (infrared) support # # CONFIG_IRDA is not set # # ISDN subsystem # # CONFIG_ISDN is not set # # Old CD-ROM drivers (not SCSI, not IDE) # # CONFIG_CD_NO_IDESCSI is not set # # Character devices # # CONFIG_VT is not set CONFIG_SERIAL=y CONFIG_SERIAL_CONSOLE=y # CONFIG_SERIAL_EXTENDED is not set CONFIG_SERIAL_NONSTANDARD=y # CONFIG_COMPUTONE is not set # CONFIG_ROCKETPORT is not set # CONFIG_CYCLADES is not set # CONFIG_DIGIEPCA is not set # CONFIG_DIGI is not set # CONFIG_ESPSERIAL is not set # CONFIG_MOXA_INTELLIO is not set # CONFIG_MOXA_SMARTIO is not set # CONFIG_ISI is not set # CONFIG_SYNCLINK is not set # CONFIG_N_HDLC is not set # CONFIG_RISCOM8 is not set # CONFIG_SPECIALIX is not set # CONFIG_SX is not set # CONFIG_RIO is not set # CONFIG_STALDRV is not set # CONFIG_SERIAL_TX3912 is not set # CONFIG_AU1000_UART is not set # CONFIG_TXX927_SERIAL is not set CONFIG_SIBYTE_SB1250_DUART=y CONFIG_SIBYTE_SB1250_DUART_CONSOLE=y CONFIG_SB1250_DUART_OUTPUT_BUF_SIZE=1024 # CONFIG_SIBYTE_SB1250_DUART_NO_PORT_1 is not set # CONFIG_PROMICE is not set CONFIG_SIBYTE_SB1250_JTAG=y CONFIG_SIBYTE_SB1250_JTAG_CONSOLE=y CONFIG_SB1250_JTAG_OUTPUT_BUF_SIZE=1024 CONFIG_SERIAL_CONSOLE=y # CONFIG_UNIX98_PTYS is not set # # I2C support # CONFIG_I2C=y # CONFIG_I2C_ALGOBIT is not set # CONFIG_I2C_SWARM is not set # CONFIG_I2C_ALGOPCF is not set CONFIG_I2C_CHARDEV=y # CONFIG_I2C_PROC is not set # # Mice # # CONFIG_BUSMOUSE is not set # CONFIG_MOUSE is not set # # Joysticks # # CONFIG_INPUT_GAMEPORT is not set # # Input core support is needed for gameports # # # Input core support is needed for joysticks # # CONFIG_QIC02_TAPE is not set # # Watchdog Cards # CONFIG_WATCHDOG=y # CONFIG_WATCHDOG_NOWAYOUT is not set CONFIG_SOFT_WATCHDOG=y # CONFIG_WDT is not set CONFIG_WDTPCI=y # CONFIG_PCWATCHDOG is not set # CONFIG_ACQUIRE_WDT is not set # CONFIG_ADVANTECH_WDT is not set # CONFIG_EUROTECH_WDT is not set # CONFIG_IB700_WDT is not set # CONFIG_I810_TCO is not set # CONFIG_MIXCOMWD is not set # CONFIG_60XX_WDT is not set # CONFIG_W83877F_WDT is not set # CONFIG_MACHZ_WDT is not set # CONFIG_NVRAM is not set # CONFIG_RTC is not set # CONFIG_DTLK is not set # CONFIG_R3964 is not set # CONFIG_APPLICOM is not set # # Ftape, the floppy tape device driver # # CONFIG_FTAPE is not set # CONFIG_AGP is not set # CONFIG_DRM is not set # # PCMCIA character devices # # CONFIG_PCMCIA_SERIAL_CS is not set # # Multimedia devices # # CONFIG_VIDEO_DEV is not set # # File systems # # CONFIG_QUOTA is not set # CONFIG_AUTOFS_FS is not set # CONFIG_AUTOFS4_FS is not set # CONFIG_REISERFS_FS is not set # CONFIG_ADFS_FS is not set # CONFIG_AFFS_FS is not set # CONFIG_HFS_FS is not set # CONFIG_BFS_FS is not set CONFIG_EXT3_FS=y CONFIG_JBD=y # CONFIG_JBD_DEBUG is not set CONFIG_FAT_FS=y CONFIG_MSDOS_FS=y # CONFIG_UMSDOS_FS is not set # CONFIG_VFAT_FS is not set CONFIG_EFS_FS=y CONFIG_JFFS_FS=y CONFIG_JFFS_FS_VERBOSE=0 # CONFIG_JFFS_PROC_FS is not set CONFIG_JFFS2_FS=y CONFIG_JFFS2_FS_DEBUG=0 # CONFIG_CRAMFS is not set CONFIG_TMPFS=y # CONFIG_RAMFS is not set # CONFIG_ISO9660_FS is not set # CONFIG_MINIX_FS is not set # CONFIG_VXFS_FS is not set # CONFIG_NTFS_FS is not set # CONFIG_HPFS_FS is not set CONFIG_PROC_FS=y # CONFIG_DEVFS_FS is not set # CONFIG_QNX4FS_FS is not set # CONFIG_ROMFS_FS is not set CONFIG_EXT2_FS=y # CONFIG_SYSV_FS is not set # CONFIG_UDF_FS is not set # CONFIG_UFS_FS is not set # # Network File Systems # # CONFIG_CODA_FS is not set # CONFIG_INTERMEZZO_FS is not set CONFIG_NFS_FS=y CONFIG_NFS_V3=y # CONFIG_ROOT_NFS is not set # CONFIG_NFSD is not set CONFIG_SUNRPC=y CONFIG_LOCKD=y CONFIG_LOCKD_V4=y # CONFIG_SMB_FS is not set # CONFIG_NCP_FS is not set # CONFIG_ZISOFS_FS is not set # CONFIG_ZLIB_FS_INFLATE is not set # # Partition Types # # CONFIG_PARTITION_ADVANCED is not set CONFIG_MSDOS_PARTITION=y # CONFIG_SMB_NLS is not set CONFIG_NLS=y # # Native Language Support # CONFIG_NLS_DEFAULT="iso8859-1" # CONFIG_NLS_CODEPAGE_437 is not set # CONFIG_NLS_CODEPAGE_737 is not set # CONFIG_NLS_CODEPAGE_775 is not set # CONFIG_NLS_CODEPAGE_850 is not set # CONFIG_NLS_CODEPAGE_852 is not set # CONFIG_NLS_CODEPAGE_855 is not set # CONFIG_NLS_CODEPAGE_857 is not set # CONFIG_NLS_CODEPAGE_860 is not set # CONFIG_NLS_CODEPAGE_861 is not set # CONFIG_NLS_CODEPAGE_862 is not set # CONFIG_NLS_CODEPAGE_863 is not set # CONFIG_NLS_CODEPAGE_864 is not set # CONFIG_NLS_CODEPAGE_865 is not set # CONFIG_NLS_CODEPAGE_866 is not set # CONFIG_NLS_CODEPAGE_869 is not set # CONFIG_NLS_CODEPAGE_936 is not set # CONFIG_NLS_CODEPAGE_950 is not set # CONFIG_NLS_CODEPAGE_932 is not set # CONFIG_NLS_CODEPAGE_949 is not set # CONFIG_NLS_CODEPAGE_874 is not set # CONFIG_NLS_ISO8859_8 is not set # CONFIG_NLS_CODEPAGE_1251 is not set # CONFIG_NLS_ISO8859_1 is not set # CONFIG_NLS_ISO8859_2 is not set # CONFIG_NLS_ISO8859_3 is not set # CONFIG_NLS_ISO8859_4 is not set # CONFIG_NLS_ISO8859_5 is not set # CONFIG_NLS_ISO8859_6 is not set # CONFIG_NLS_ISO8859_7 is not set # CONFIG_NLS_ISO8859_9 is not set # CONFIG_NLS_ISO8859_13 is not set # CONFIG_NLS_ISO8859_14 is not set # CONFIG_NLS_ISO8859_15 is not set # CONFIG_NLS_KOI8_R is not set # CONFIG_NLS_KOI8_U is not set # CONFIG_NLS_UTF8 is not set # # Sound # # CONFIG_SOUND is not set # # USB support # # # USB Controllers # # # USB Device Class drivers # # # USB Human Interface Devices (HID) # # # Input core support is needed for USB HID # # # USB Imaging devices # # # USB Multimedia devices # # # Video4Linux support is needed for USB Multimedia device support # # # USB Network adaptors # # # USB port drivers # # # USB Serial Converter support # # # USB Miscellaneous drivers # # # Input core support # # CONFIG_INPUT is not set CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024 CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768 # # Kernel hacking # CONFIG_CROSSCOMPILE=y # CONFIG_REMOTE_DEBUG is not set # CONFIG_DEBUG_INFO is not set # CONFIG_DEBUG is not set # CONFIG_MAGIC_SYSRQ is not set --------------9DA6765BB54D5478D8D854B8-- From owner-linux-mips@oss.sgi.com Thu Feb 28 00:14:22 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g1S8EMN32386 for linux-mips-outgoing; Thu, 28 Feb 2002 00:14:22 -0800 Received: from mail.ict.ac.cn ([159.226.39.4]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g1S8EF932382 for ; Thu, 28 Feb 2002 00:14:15 -0800 Message-Id: <200202280814.g1S8EF932382@oss.sgi.com> Received: (qmail 6828 invoked from network); 28 Feb 2002 07:18:33 -0000 Received: from unknown (HELO foxsen) (@159.226.40.150) by 159.226.39.4 with SMTP; 28 Feb 2002 07:18:33 -0000 Date: Thu, 28 Feb 2002 15:10:57 +0800 From: Zhang Fuxin To: Jun Sun CC: "linux-mips@oss.sgi.com" Subject: Re: Re: used_math not cleared for new processes? X-mailer: FoxMail 3.11 Release [cn] Mime-Version: 1.0 Content-Type: text/plain; charset="GB2312" Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by oss.sgi.com id g1S8EG932383 Sender: owner-linux-mips@oss.sgi.com Precedence: bulk hi, ÔÚ 2002-02-27 14:53:00 you wrote£º >Zhang Fuxin wrote: > >> hi,linux-mips, >> I find that current->used_math isn't cleared when we start a new process.Is it >> intended? I mean 'start_thread' in do_exec but not 'copy_thread' in do_fork when >> speaking 'start a new process'. We can/should? keep used_math for the latter,but for >> the former? >> > > >I think it make sense to clear used_math in do_exec(). It also improvies the > performance slightly by not loading the parent's FPU context when it uses the >FPU for the first time. > >Do you have a patch for this? Yes. Here it is. --- processor.h.ori Thu Feb 28 15:02:20 2002 +++ processor.h Thu Feb 28 15:00:10 2002 @@ -215,6 +215,7 @@ regs->cp0_epc = new_pc; \ regs->regs[29] = new_sp; \ current->thread.current_ds = USER_DS; \ + current->used_math = 0; \ } while (0) unsigned long get_wchan(struct task_struct *p); --- traps.c.ori Thu Feb 28 15:04:48 2002 +++ traps.c Thu Feb 28 15:05:23 2002 @@ -668,8 +668,12 @@ if (current->used_math) { /* Using the FPU again. */ lazy_fpu_switch(last_task_used_math); } else { /* First time FPU user. */ - if (last_task_used_math != NULL) + if (last_task_used_math != NULL) { + int status = read_32bit_cp0_register(CP0_STATUS); + write_32bit_cp0_register(CP0_STATUS,status|ST0_CU1); + save_fp(last_task_used_math); + } init_fpu(); current->used_math = 1; } > >Jun Regards Zhang Fuxin fxzhang@ict.ac.cn From owner-linux-mips@oss.sgi.com Thu Feb 28 10:06:50 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g1SI6oc17069 for linux-mips-outgoing; Thu, 28 Feb 2002 10:06:50 -0800 Received: from dea.linux-mips.net (a1as05-p107.stg.tli.de [195.252.187.107]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g1SI6j917063 for ; Thu, 28 Feb 2002 10:06:46 -0800 Received: (from ralf@localhost) by dea.linux-mips.net (8.11.6/8.11.1) id g1SBYua25814; Thu, 28 Feb 2002 12:34:56 +0100 Date: Thu, 28 Feb 2002 12:34:56 +0100 From: Ralf Baechle To: santhosh Cc: linux-mips@oss.sgi.com Subject: Re: compiler error Message-ID: <20020228123456.A25783@dea.linux-mips.net> References: <3C7E68ED.93B565AB@gdatech.co.in> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <3C7E68ED.93B565AB@gdatech.co.in>; from ps.santhosh@gdatech.co.in on Thu, Feb 28, 2002 at 10:59:17PM +0530 X-Accept-Language: de,en,fr Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by oss.sgi.com id g1SI6l917064 Sender: owner-linux-mips@oss.sgi.com Precedence: bulk On Thu, Feb 28, 2002 at 10:59:17PM +0530, santhosh wrote: > i am working on MIPS64 based (SB1250) board. > when i tried to compile the kernel i am getting the following > error messages > > Assembler messages: > Error: invalid architecture -mcpu=sb1 > cc1: bad value (sb1) for -mcpu= switch > init/main.c:198: output pipe has been closed > cpp: output pipe has been closed > make: *** [init/main.o] Error 1 You should use the gcc variant from Sibyte or a recent Montavista compiler for the SB1250 SOC. > To: santhosh <ps.santhosh@gdatech.co.in> ^^^ And please finally remove that damn control character from your email address in your headers or I'm going to unsubscribe you from the list. I'm fedup of dealing with the bounces caused by that. Ralf From owner-linux-mips@oss.sgi.com Thu Feb 28 10:07:02 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g1SI72j17099 for linux-mips-outgoing; Thu, 28 Feb 2002 10:07:02 -0800 Received: from dea.linux-mips.net (a1as05-p107.stg.tli.de [195.252.187.107]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g1SI6x917093 for ; Thu, 28 Feb 2002 10:06:59 -0800 Received: (from ralf@localhost) by dea.linux-mips.net (8.11.6/8.11.1) id g1SBcRG25832; Thu, 28 Feb 2002 12:38:27 +0100 Date: Thu, 28 Feb 2002 12:38:27 +0100 From: Ralf Baechle To: Carsten Langgaard Cc: Andre.Messerschmidt@infineon.com, linux-mips@oss.sgi.com Subject: Re: Wait instruction on 5kc Message-ID: <20020228123827.B25783@dea.linux-mips.net> References: <86048F07C015D311864100902760F1DD01B5E73C@dlfw003a.dus.infineon.com> <3C7D2474.6A2F3CA2@mips.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <3C7D2474.6A2F3CA2@mips.com>; from carstenl@mips.com on Wed, Feb 27, 2002 at 07:24:52PM +0100 X-Accept-Language: de,en,fr Sender: owner-linux-mips@oss.sgi.com Precedence: bulk On Wed, Feb 27, 2002 at 07:24:52PM +0100, Carsten Langgaard wrote: > > As a hack I changed it to nop (in r4k_wait() ), but I believe there is a > > clever solution for this. > > You can remove CPU_5KC from the case statement in check_wait in the file > arch/mips/kernel/setup.c Is there a way to probe for this bug, for example based on the ProductId register? Ralf From owner-linux-mips@oss.sgi.com Thu Feb 28 20:14:04 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g214E4701980 for linux-mips-outgoing; Thu, 28 Feb 2002 20:14:04 -0800 Received: from mail.ict.ac.cn ([159.226.39.4]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g214Dv901970 for ; Thu, 28 Feb 2002 20:13:57 -0800 Message-Id: <200203010413.g214Dv901970@oss.sgi.com> Received: (qmail 6579 invoked from network); 1 Mar 2002 03:18:26 -0000 Received: from unknown (HELO foxsen) (@159.226.40.150) by 159.226.39.4 with SMTP; 1 Mar 2002 03:18:26 -0000 Date: Fri, 1 Mar 2002 11:11:22 +0800 From: Zhang Fuxin To: "linux-mips@oss.sgi.com" CC: "jsun@mvista.com" Subject: Re: Re: Re: used_math not cleared for new processes? X-mailer: FoxMail 3.11 Release [cn] Mime-Version: 1.0 Content-Type: text/plain; charset="GB2312" Content-Transfer-Encoding: 7bit Sender: owner-linux-mips@oss.sgi.com Precedence: bulk hi, sorry,it seems this patch bring other problem,please don't use. i am investigating it. >> >>I think it make sense to clear used_math in do_exec(). It also improvies the >> performance slightly by not loading the parent's FPU context when it uses the >>FPU for the first time. >> >>Do you have a patch for this? >Yes. Here it is. > >--- processor.h.ori Thu Feb 28 15:02:20 2002 >+++ processor.h Thu Feb 28 15:00:10 2002 >@@ -215,6 +215,7 @@ > regs->cp0_epc = new_pc; \ > regs->regs[29] = new_sp; \ > current->thread.current_ds = USER_DS; \ >+ current->used_math = 0; \ > } while (0) > > unsigned long get_wchan(struct task_struct *p); > > >--- traps.c.ori Thu Feb 28 15:04:48 2002 >+++ traps.c Thu Feb 28 15:05:23 2002 >@@ -668,8 +668,12 @@ > if (current->used_math) { /* Using the FPU again. */ > lazy_fpu_switch(last_task_used_math); > } else { /* First time FPU user. */ >- if (last_task_used_math != NULL) >+ if (last_task_used_math != NULL) { >+ int status = read_32bit_cp0_register(CP0_STATUS); >+ write_32bit_cp0_register(CP0_STATUS,status|ST0_CU1); >+ > save_fp(last_task_used_math); >+ } > init_fpu(); > current->used_math = 1; > } > > >> >>Jun > >Regards > Zhang Fuxin > fxzhang@ict.ac.cn Regards Zhang Fuxin fxzhang@ict.ac.cn From owner-linux-mips@oss.sgi.com Thu Feb 28 22:25:26 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g216PQK04280 for linux-mips-outgoing; Thu, 28 Feb 2002 22:25:26 -0800 Received: from real.realitydiluted.com (real.realitydiluted.com [208.242.241.164]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g216PL904274; Thu, 28 Feb 2002 22:25:21 -0800 Received: from localhost.localdomain ([127.0.0.1] helo=cotw.com) by real.realitydiluted.com with esmtp (Exim 3.22 #1 (Red Hat Linux)) id 16gfXf-0004mm-00; Thu, 28 Feb 2002 23:25:15 -0600 Message-ID: <3C7F10C1.AE5C6035@cotw.com> Date: Thu, 28 Feb 2002 23:25:21 -0600 From: "Steven J. Hill" Reply-To: sjhill@cotw.com X-Mailer: Mozilla 4.77 [en] (X11; U; Linux 2.4.17-xfs i686) X-Accept-Language: en MIME-Version: 1.0 To: linux-mips@oss.sgi.com, ralf@oss.sgi.com Subject: Repaired ABI documents in PDF and PS format... Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-linux-mips@oss.sgi.com Precedence: bulk Greetings. If you have ever attempted to download and use the ABI documents from either Caldera or from SGI for the MIPS ABI and or the System V Interface Definition Fourth Edition documents, you will find that they are corrupted. I have uploaded the repaired documents in both PDF and PS format: ftp://ftp.cotw.com/ABI Ralf, would you please replace the files on the SGI FTP site with these? I have already emailed Caldera to update the documents. Thanks. -Steve -- Steven J. Hill - Embedded SW Engineer .