[Precise SRU PATCH 3/3] hwmon: fam15h_power: fix bogus values with current BIOSes

Herton Ronaldo Krzesinski herton.krzesinski at canonical.com
Wed Jun 13 22:54:39 UTC 2012


On Wed, Jun 13, 2012 at 02:52:56PM -0600, Tim Gardner wrote:
> (cherry picked from commit 00250ec90963b7ef6678438888f3244985ecde14)
> 
> Signed-off-by: Tim Gardner <tim.gardner at canonical.com>
> ---
>  drivers/hwmon/fam15h_power.c |   39 +++++++++++++++++++++++++++++++++++++++
>  1 file changed, 39 insertions(+)
> 
> diff --git a/drivers/hwmon/fam15h_power.c b/drivers/hwmon/fam15h_power.c
> index b7494af..37a8fc9 100644
> --- a/drivers/hwmon/fam15h_power.c
> +++ b/drivers/hwmon/fam15h_power.c
> @@ -122,6 +122,38 @@ static bool __devinit fam15h_power_is_internal_node0(struct pci_dev *f4)
>  	return true;
>  }
>  
> +/*
> + * Newer BKDG versions have an updated recommendation on how to properly
> + * initialize the running average range (was: 0xE, now: 0x9). This avoids
> + * counter saturations resulting in bogus power readings.
> + * We correct this value ourselves to cope with older BIOSes.
> + */
> +static void __devinit tweak_runavg_range(struct pci_dev *pdev)
> +{
> +	u32 val;
> +	const struct pci_device_id affected_device = {
> +		PCI_VDEVICE(AMD, PCI_DEVICE_ID_AMD_15H_NB_F4) };

This original change introduced a problem, we should also cherry-pick 
commit c3e40a9972428d6e2d8e287ed0233a57a218c30f, ack for the 3 patches
plus the fix.

-- 
[]'s
Herton




More information about the kernel-team mailing list