fam15h_power on a4-4000?
reading the specs, it seems to me that the a4-4000 processor (amd fam 15h model 13h) has the tdp running average feature, implemented in the fam15h_power module:
D18F5xE0, page 456, BKDG for AMD Family 15h Models 10h-1Fh Processors
http://support.amd.com/TechDocs/42300_15h_Mod_10h-1Fh_BKDG.pdf
if this assumption is correct, the module fails to probe the device only because the pci id to query is different, so the attached patch should fix the detection
it is untested as i'm not familiar with the hardware and i really appreciate some suggestion from an expert here
c-ya!
drivers/hwmon/fam15h_power.c +1 -0
@@ -304,6 +304,7 @@static const struct pci_device_id fam15h_power_id_table[] = { {PCI_VDEVICE (AMD ,PCI_DEVICE_ID_AMD_15H_NB_F4 ) }, + {PCI_VDEVICE (AMD ,PCI_DEVICE_ID_AMD_15H_M10H_NB_F4 ) }, {PCI_VDEVICE (AMD ,PCI_DEVICE_ID_AMD_15H_M30H_NB_F4 ) }, {PCI_VDEVICE (AMD ,PCI_DEVICE_ID_AMD_15H_M60H_NB_F4 ) }, {PCI_VDEVICE (AMD ,PCI_DEVICE_ID_AMD_15H_M70H_NB_F4 ) },
include/linux/pci_ids.h +1 -0
@@ -521,6 +521,7 @@#define PCI_DEVICE_ID_AMD_11H_NB_MISC 0x1303#define PCI_DEVICE_ID_AMD_11H_NB_LINK 0x1304#define PCI_DEVICE_ID_AMD_15H_M10H_F3 0x1403 +#define PCI_DEVICE_ID_AMD_15H_M10H_NB_F4 0x1404#define PCI_DEVICE_ID_AMD_15H_M30H_NB_F3 0x141d#define PCI_DEVICE_ID_AMD_15H_M30H_NB_F4 0x141e#define PCI_DEVICE_ID_AMD_15H_M60H_NB_F3 0x1573
Guenter Roeck
maintainerQuoted 7 lines · Trek
reading the specs, it seems to me that the a4-4000 processor (amd fam 15h model 13h) has the tdp running average feature, implemented in the
fam15h_powermodule:D18F5xE0, page 456, BKDG for AMD Family 15h Models 10h-1Fh Processors
http://support.amd.com/TechDocs/42300_15h_Mod_10h-1Fh_BKDG.pdf
Quoted 8 lines
if this assumption is correct, the module fails to probe the device only because the pci id to query is different, so the attached patch should fix the detection
it is untested as i'm not familiar with the hardware and i really appreciate some suggestion from an expert here
c-ya!
Let's ask the maintainer. Huang, is this correct ?
Also see comment inline.
Thanks,
Guenter
Quoted 15 lines
diff -ur
linux/drivers/hwmon/fam15h_power.clinux-fam15h_power-10h/drivers/hwmon/fam15h_power.cdrivers/hwmon/fam15h_power.c +1
-0@@ -304,6 +304,7 @@static const struct pci_device_id fam15h_power_id_table[] = { {PCI_VDEVICE (AMD ,PCI_DEVICE_ID_AMD_15H_NB_F4 ) }, + {PCI_VDEVICE (AMD ,PCI_DEVICE_ID_AMD_15H_M10H_NB_F4 ) }, {PCI_VDEVICE (AMD ,PCI_DEVICE_ID_AMD_15H_M30H_NB_F4 ) }, {PCI_VDEVICE (AMD ,PCI_DEVICE_ID_AMD_15H_M60H_NB_F4 ) }, {PCI_VDEVICE (AMD ,PCI_DEVICE_ID_AMD_15H_M70H_NB_F4 ) },diff -ur
linux/include/linux/pci_ids.hlinux-fam15h_power-10h/include/linux/pci_ids.h
include/linux/pci_ids.h line 524
Quoted 4 lines
include/linux/pci_ids.h +1
-0@@ -521,6 +521,7 @@#define PCI_DEVICE_ID_AMD_11H_NB_MISC 0x1303#define PCI_DEVICE_ID_AMD_11H_NB_LINK 0x1304#define PCI_DEVICE_ID_AMD_15H_M10H_F3 0x1403 +#define PCI_DEVICE_ID_AMD_15H_M10H_NB_F4 0x1404
New PCI IDs should not be added to this file unless used more than once. Please see the comment at the top of the file.
Quoted 3 lines
include/linux/pci_ids.h +0
-0#define PCI_DEVICE_ID_AMD_15H_M30H_NB_F3 0x141d#define PCI_DEVICE_ID_AMD_15H_M30H_NB_F4 0x141e#define PCI_DEVICE_ID_AMD_15H_M60H_NB_F3 0x1573
Huang Rui
maintainerQuoted 12 lines · Guenter Roeck
Quoted 11 lines · Trek
reading the specs, it seems to me that the a4-4000 processor (amd fam 15h model 13h) has the tdp running average feature, implemented in the
fam15h_powermodule:D18F5xE0, page 456, BKDG for AMD Family 15h Models 10h-1Fh Processors
http://support.amd.com/TechDocs/42300_15h_Mod_10h-1Fh_BKDG.pdfif this assumption is correct, the module fails to probe the device only because the pci id to query is different, so the attached patch should fix the detection
Quoted 9 lines
Quoted 4 lines
it is untested as i'm not familiar with the hardware and i really appreciate some suggestion from an expert here
c-ya!
Let's ask the maintainer. Huang, is this correct ?
Also see comment inline.
OK.
Trek, have you tested it on Fam15h Models 10h-1fh platforms? I seem to remember I tried it on that type of platforms, but the test data was not right. So I didn't expose it at that time.
Thanks,
Rui
Quoted 3 lines · On Mon, 28 Mar 2016 10:19:23 +0800 Huang Rui <[email protected]> wrote:
Trek, have you tested it on Fam15h Models 10h-1fh platforms? I seem to remember I tried it on that type of platforms, but the test data was not right. So I didn't expose it at that time.
thanks for your replies, I have just compiled the module for my kernel version (3.16) with the patch applied and it returns these values:
fam15h_power-pci-00c4
Adapter: PCI adapter
power1: 10.56 W (crit = 65.18 W)
the crit value is correct (the TDP of the a4-4000 is 65W) but the actual usage is "fixed", always the same even at 100% usage of all cpu cores and the integrated gpu
so the readings are incorrect and the patch is useless
I have strange readings also for the other drivers concerned with monitoring my cpu/gpu:
k10temp-pci-00c3
Adapter: PCI adapter
temp1: +0.0 C (high = +70.0 C)
(crit = +70.0 C, hyst = +69.0 C)
radeon-pci-0008
Adapter: PCI adapter
temp1: -1.0 C (crit = +120.0 C, hyst = +90.0 C)
but at least they are incremented under full load and, reading the docs, they are not really physical degrees, but some other measuring unit
thanks & c-ya!