Subject: Re: Decstation broken Was: CVS [email-masked]: linux

From: Florian Lohoff <[email-masked]>
Date: Sun, 1 Oct 2000 18:46:18 +0200

On Sat, Sep 30, 2000 at 12:18:23PM +0200, Ralf Baechle wrote:
> On Fri, Sep 29, 2000 at 11:36:07AM +0200, Maciej W. Rozycki wrote:
> 
> >  Well, I asked for testing before the commit, but nobody bothered to write
> > anything, so I assumed everything is correct, sigh...
> 
> Not sigh ...  The lesson that not speaking up is a also wrong!
> 

I talked to a couple of people and everybody thought they made something
wrong and waited ...

Flo
-- 
Florian Lohoff		[email-masked]		      	+49-5201-669912
      "Write only memory - Oops. Time for my medication again ..."

---

From: "Maciej W. Rozycki" <[email-masked]>
Date: Mon, 2 Oct 2000 13:59:03 +0200 (MET DST)

> Not sigh ...  The lesson that not speaking up is a also wrong!

 Well, if nobody reports a problem with a patch, it means it's either fine
or nobody bothered to test it.  For me both cases mean it's OK to apply
it. 

> The ddiv usage outside of do_div / do_div64_32 is actually ok because

 But can't we receive an exception for some reason???

> interrupts are always disabled.  We don't have the same guarantee for
> do_div / do_div64_32 calls.

 Yep -- it's used for printk.

> Hmm...  We got two error scenarios left - bus errors and cache errors.  If
> we get one of those doomsday is near anyway ...  Anyway, these are rare,
> so we rather make these exception handlers pay the price.

 I'd see two approaches: either wipe 64-bit code out completely (clean and
elegant -- I'd vote for it, even though there is performance penalty) or
disable interrupts around the 64-bit division (the window would be small
and it would still be a performance win, but it's ugly as hell).  What do
you think? 

  Maciej

-- 
+  Maciej W. Rozycki, Technical University of Gdansk, Poland   +
+--------------------------------------------------------------+
+        e-mail: [email-masked], PGP key available        +

---

From: Ralf Baechle <[email-masked]>
Date: Tue, 3 Oct 2000 01:44:51 +0200

> or nobody bothered to test it.  For me both cases mean it's OK to apply

Sure.

>  But can't we receive an exception for some reason???

No, the only exceptions we still may have to deal with are asynchronous
ones, that is cache error and bus error.  Oh yes, trace exception on
certain special CPUs that have support for tracing in hw.

> and it would still be a performance win, but it's ugly as hell).  What do

I have a nice little solution, we can wrap the divide with ll / sc.  If
the sc ever fails we took an exception and retry ...

(I think I just felt like comming up with a coding stunt ;-)

  Ralf

---

From: Harald Koerfgen <[email-masked]>
Date: Tue, 03 Oct 2000 11:41:54 +0200 (CEST)

Hi,

On 28-Sep-00 Florian Lohoff wrote:
[...]

> since this commit my machines are all broken (5000/260, 5000/150 
> and 5000/125) - They all hang in the "Calibrating delay loop ...".

Fixed.

-- 
Regards,
Harald

---

From: "Maciej W. Rozycki" <[email-masked]>
Date: Tue, 3 Oct 2000 12:08:31 +0200 (MET DST)

> the sc ever fails we took an exception and retry ...

 Could be, but I'm still uncertain whether we want to keep 64-bit code at
all. 

  Maciej

---

From: "Maciej W. Rozycki" <[email-masked]>
Date: Tue, 3 Oct 2000 12:31:08 +0200 (MET DST)

> > and 5000/125) - They all hang in the "Calibrating delay loop ...".

 Thanks -- I've found the typo yesterday evening, too.  I knew it must
have been a stupid error.

---

From: Harald Koerfgen <[email-masked]>
Date: Tue, 03 Oct 2000 20:21:25 +0200 (CEST)

> have been a stupid error.

Exactly this type of error is often enough difficult to find. At least for the
one who wrote it :)

-- 
Regards,
Harald