lkml.org 
[lkml]   [2003]   [Aug]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRE: Cpufreq for opteron
Date
It appears to me that the BUG_ON() macro will take the machine
down ? The BUG_ON() checks in this code (a sample below, but
this applies to all of the driver) are not fatal conditions -
execution can continue if an error is returned. Taking the
machine down to report on a non-fatal condition seems somewhat
rude.

Paul.

> -----Original Message-----
> From: Pavel Machek [mailto:pavel@suse.cz]
> Sent: Friday, August 22, 2003 3:06 PM
> To: Dave Jones; kernel list; Devriendt, Paul; aj@suse.de; Langsdorf,
> Mark; Brunner, Richard
> Subject: Re: Cpufreq for opteron
>
>
> Hi!
>
> Here's an updated version. It is quite a bit shorter, and thats
> good. Does it look good enough for inclusion?
> Pavel
>
> +static int
> +write_new_fid(u32 fid)
> +{
> + u32 lo;
> + u32 savevid = currvid;
> +
> + if ((fid & INVALID_FID_MASK) || (currvid & INVALID_VID_MASK)) {
> + printk(KERN_ERR PFX
> + "internal error - fid/vid overflow on fid write\n");
> + return 1;
> + }
> +
> + lo = fid | (currvid << MSR_C_LO_VID_SHIFT) | MSR_C_LO_INIT_FID_VID;
> +
> + dprintk(KERN_DEBUG PFX "writing fid %x, lo %x, hi %x\n",
> + fid, lo, plllock * PLL_LOCK_CONVERSION);
> +
> + wrmsr(MSR_FIDVID_CTL, lo, plllock * PLL_LOCK_CONVERSION);
> +
> + if (query_current_values_with_pending_wait())
> + return 1;
> +
> + count_off_irt();
> +
> + BUG_ON(savevid != currvid);
> + BUG_ON(fid != currfid);
> + return 0;
> +}

-
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:48    [W:0.045 / U:4.020 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site