lkml.org 
[lkml]   [2003]   [Dec]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Date
    From
    SubjectRe: [2.6.0 cpufreq] longhaul trouble
    On Fri, Dec 19, 2003 at 05:32:11PM +0100, Jurgen Kramer wrote:
    > When I insert the longhaul cpufreq module on my VIA EPIA 800 the system
    > completely freezes. It does not give any oops or other helpful error
    > message.
    >

    Does this help ?

    Dave

    diff -urpN --exclude-from=/home/davej/.exclude bk-linus/arch/i386/kernel/cpu/cpufreq/longhaul.c cpufreq/arch/i386/kernel/cpu/cpufreq/longhaul.c
    --- bk-linus/arch/i386/kernel/cpu/cpufreq/longhaul.c 2003-10-15 05:00:29.000000000 +0100
    +++ cpufreq/arch/i386/kernel/cpu/cpufreq/longhaul.c 2003-11-21 02:20:59.000000000 +0000
    @@ -170,6 +170,9 @@ static void longhaul_setstate (unsigned
    * between that value multiplied by possible FSBs and cpu_mhz which
    * was calculated at boot time. Really ugly, but no other way to do this.
    */
    +
    +#define ROUNDING 0xf
    +
    static int _guess (int guess, int maxmult)
    {
    int target;
    @@ -177,16 +180,20 @@ static int _guess (int guess, int maxmul
    target = ((maxmult/10)*guess);
    if (maxmult%10 != 0)
    target += (guess/2);
    - target &= ~0xf;
    + target += ROUNDING/2;
    + target &= ~ROUNDING;
    return target;
    }

    static int guess_fsb(int maxmult)
    {
    - int speed = (cpu_khz/1000) & ~0xf;
    + int speed = (cpu_khz/1000);
    int i;
    int speeds[3] = { 66, 100, 133 };

    + speed += ROUNDING/2;
    + speed &= ~ROUNDING;
    +
    for (i=0; i<3; i++) {
    if (_guess(speeds[i],maxmult) == speed)
    return speeds[i];
    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

    \
     
     \ /
      Last update: 2005-03-22 13:59    [W:0.027 / U:150.048 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site