Re: [PATCH] bogoRe: [PATCH] bogo-resource-management for 2.2.15 bios32.c (Miata+SRM+IDE fix)

From: Jay Estabrook (
Date: Sat May 13 2000 - 15:09:13 EST

On Fri, May 12, 2000 at 02:06:30PM -0600, Michal Jaegermann wrote:
> No, it is not bios32. I know now more. The problem turned out to be,
> as expected :-), in changes from arch/alpha/kernel/time.c.
> If hwrpb->cycle_freq is 0, and it is in UX case, then ppm_error
> calculation divides by zero and I was ending up with a pretty
> small error of 0 (why not? it can be anything :-). As a result
> cycle_freq was left at 0 and a calibrating loop was stuck.

Sigh; I'm afraid cycle_freq may be 0 for more than UX, it may be
that way for all MILOs. I can' remember if we'd put in setup of
that field or not, but if we did, I can't understand why the UX
MILO doesn't use it...

Anyway, I'd like it better to *force* the use of the calculation, if
equal to 0; try replacing:

        cycle_freq = hwrpb->cycle_freq;


        if (!(cycle_freq = hwrpb->cycle_freq)) cycle_freq = est_cycle_freq;

Then you are dividing 0 by something non-zero, and so long as the result
is 0, we should be OK, and using the estimated one...

Sorry about that... ;-}


Jay A Estabrook Alpha Engineering - LINUX Project
Compaq Computer Corp. - MRO1-2/K20 (508) 467-2080
200 Forest Street, Marlboro MA 01752

This archive was generated by hypermail 2b29 : Mon May 15 2000 - 21:00:29 EST