Re: fix typo in geode_configre()@cyrix.c

From: Juergen Beisert
Date: Tue Jan 16 2007 - 19:24:58 EST


On Tuesday 09 January 2007 18:33, Lennart Sorensen wrote:
> Then for the next one it does:
> ccr3 = GetCx86(CX86_CCR3);
> setCx86(CX86_CCR3, (ccr3 & 0x0f) | 0x10);
>
> Couldn't that have been:
> setCx86(CX86_CCR3, (getCx86(CX86_CCR3) & 0x0f) | 0x10);
>
> No temp variable, and again it clearly does not intend to restore the
> value again later (even though the bug actually did cause the value to
> be restored by accident).

No, ccr3 should be restored to protect some registers (or at least bit 4
should be cleared in ccr3).

BTW:
In function set_cx86_inc()
[...]
/* PCR1 -- Performance Control */
/* Incrementor on, whatever that is */
setCx86(CX86_PCR1, getCx86(CX86_PCR1) | 0x02);
/* PCR0 -- Performance Control */
/* Incrementor Margin 10 */
setCx86(CX86_PCR0, getCx86(CX86_PCR0) | 0x04);
[...]

This setting is only valid for 200MHz...266MHz CPUs, for 300MHz and 333MHz
CPUs the Incrementor Margin should be 1-1.

There is an AppNote about this setting:
AMD Geode GX1 Processor Memory Timings for Maximum Performance.

Juergen
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/