Wind River Support Network

HomeDefectsLIN8-4612
Fixed

LIN8-4612 : fsl-t4xxx: sensors-detect can not initialize correct cpu list

Created: Sep 1, 2016    Updated: Dec 3, 2018
Resolved Date: Sep 11, 2016
Found In Version: 8.0
Fix Version: 8.0.0.10
Severity: Standard
Applicable for: Wind River Linux 8
Component/s: Userspace

Description

root@localhost:~# echo yes | sensors-detect # sensors-detect revision 6284 (2015-05-31 14:00:33 +0200) # Kernel: 4.1.21-WR8.0.0.9_cgl ppc64 Use of uninitialized value in concatenation (.) or string at /usr/sbin/sensors-detect line 2869.
Use of uninitialized value in concatenation (.) or string at /usr/sbin/sensors-detect line 2869.
Use of uninitialized value in concatenation (.) or string at /usr/sbin/sensors-detect line 2869.
Use of uninitialized value in concatenation (.) or string at /usr/sbin/sensors-detect line 2869.
# Processor:  (//)                                          <=======here is bug

This program will help you determine which kernel modules you need to load to use lm_sensors most effectively. It is generally safe and recommended to accept the default answers to all questions, unless you know what you're doing.

Some south bridges, CPUs or memory controllers contain embedded sensors.
Do you want to scan for them? This is totally safe. (YES/no): modprobe: FATAL: Module cpuid not found.
Failed to load module cpuid.
Silicon Integrated Systems SIS5595...                       No
VIA VT82C686 Integrated Sensors...                          No
VIA VT8231 Integrated Sensors...                            No
AMD K8 thermal sensors...                                   No
AMD Family 10h thermal sensors...                           No
AMD Family 11h thermal sensors...                           No
AMD Family 12h and 14h thermal sensors...                   No
AMD Family 15h thermal sensors...                           No
AMD Family 16h thermal sensors...                           No
AMD Family 15h power sensors...                             No
AMD Family 16h power sensors...                             No
Intel digital thermal sensor...                             No
Intel AMB FB-DIMM thermal sensor...                         No
Intel 5500/5520/X58 thermal sensor...                       No
VIA C7 thermal sensor...                                    No
VIA Nano thermal sensor...                                  No

Lastly, we can probe the I2C/SMBus adapters for connected hardware monitoring devices. This is the most risky part, and while it works reasonably well on most systems, it has been reported to cause trouble on some systems.
Do you want to probe the I2C/SMBus adapters now? (YES/no): Sorry, no supported PCI bus adapters found.

Next adapter: MPC adapter at 0xffe118000 (i2c-0) Do you want to scan it? (YES/no/selectively): Adapter cannot be probed, skipping.
Next adapter: MPC adapter at 0xffe118100 (i2c-1) Do you want to scan it? (YES/no/selectively): Adapter cannot be probed, skipping.
Next adapter: MPC adapter at 0xffe119000 (i2c-2) Do you want to scan it? (YES/no/selectively): Adapter cannot be probed, skipping.
Next adapter: MPC adapter at 0xffe119100 (i2c-3) Do you want to scan it? (YES/no/selectively): Adapter cannot be probed, skipping.
Next adapter: i2c-0-mux (chan_id 0) (i2c-4) Do you want to scan it? (YES/no/selectively): Adapter cannot be probed, skipping.
Next adapter: i2c-0-mux (chan_id 1) (i2c-5) Do you want to scan it? (YES/no/selectively): Adapter cannot be probed, skipping.
Next adapter: i2c-0-mux (chan_id 2) (i2c-6) Do you want to scan it? (YES/no/selectively): Adapter cannot be probed, skipping.
Next adapter: i2c-0-mux (chan_id 3) (i2c-7) Do you want to scan it? (YES/no/selectively): Adapter cannot be probed, skipping.
Next adapter: i2c-0-mux (chan_id 4) (i2c-8) Do you want to scan it? (YES/no/selectively): Adapter cannot be probed, skipping.
Next adapter: i2c-0-mux (chan_id 5) (i2c-9) Do you want to scan it? (YES/no/selectively): Adapter cannot be probed, skipping.
Next adapter: i2c-0-mux (chan_id 6) (i2c-10) Do you want to scan it? (YES/no/selectively): Adapter cannot be probed, skipping.
Next adapter: i2c-0-mux (chan_id 7) (i2c-11) Do you want to scan it? (YES/no/selectively): Adapter cannot be probed, skipping.
Sorry, no sensors were detected.
Either your system has no sensors, or they are not supported, or they are connected to an I2C or SMBus adapter that is not supported. If you find out what chips are on your board, check http://www.lm-sensors.org/wiki/Devices for driver status.
root@localhost:~# 

Should like below:
root@localhost:~# echo yes | sensors-detect # sensors-detect revision 6284 (2015-05-31 14:00:33 +0200) # Kernel: 4.1.21-WR8.0.0.9_cgl ppc64
#vendor_id: GenuineIntel
# Processor: Intel(R) Core(TM) i5 CPU M 580 @ 2.67GHz (6/37/5) ...

+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Due to PPC cpu has no all fields, so the code can not get the cpu info.

cat /usr/sbin/sensors-detect
...
sub initialize_cpu_list
{
        local $_;
        my $entry;

        open(local *INPUTFILE, "/proc/cpuinfo") or die "Can't access /proc/cpuinfo!";
        #open(local *INPUTFILE, "/root/cpuinfo") or die "Can't access /proc/cpuinfo!";
        while (<INPUTFILE>) {
                if (m/^processor\s*:\s*(\d+)/) {
                        push @cpu, $entry if scalar keys(%{$entry}); # Previous entry
                        $entry = { # New entry
                                nr => $1,
                                vendor_id => "undefined_jhu2",
                        };
                        next;
                }
                if (m/^(vendor_id|cpu family|model|model name|stepping|cpuid level)\s*:\s*(.+)$/) {
                        my $k = $1;
                        my $v = $2;
                        $v =~ s/\s+/ /g;        # Merge multiple spaces
                        $v =~ s/ $//;           # Trim trailing space
                        $entry->{$k} = $v;
                        next;
                }
        }
        close(INPUTFILE);
        push @cpu, $entry if scalar keys(%{$entry}); # Last entry } ...

root@localhost:~# cat /proc/cpuinfo 
processor	: 0
cpu		: e6500, altivec supported
clock		: 1666.666650MHz
revision	: 2.0 (pvr 8040 0120)

processor	: 1
cpu		: e6500, altivec supported
clock		: 1666.666650MHz
revision	: 2.0 (pvr 8040 0120)
...


one intel cpu info as below:
processor	: 0
vendor_id	: GenuineIntel
cpu family	: 6
model		: 37
model name	: Intel(R) Core(TM) i5 CPU       M 580  @ 2.67GHz
stepping	: 5
microcode	: 0x4
cpu MHz		: 1199.000
cache size	: 3072 KB
physical id	: 0
siblings	: 4
core id		: 0
cpu cores	: 2
apicid		: 0
initial apicid	: 0
fpu		: yes
fpu_exception	: yes
cpuid level	: 11
wp		: yes
flags		: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc aperfmperf pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 cx16 xtpr pdcm pcid sse4_1 sse4_2 popcnt aes lahf_lm ida arat dtherm tpr_shadow vnmi flexpriority ept vpid
bogomips	: 5320.11
clflush size	: 64
cache_alignment	: 64
address sizes	: 36 bits physical, 48 bits virtual
power management:

Steps to Reproduce

1. build on cgl and rt kernel, command line as below:
xxxx@pek-lpgtest20:/buildarea1/xxxx/ppc/rt$ cat config.log # Generated by wrlinux configure at 2016? 08? 22? ??? 14:50:01 CST /net/pek-hostel-deb04/buildarea1/xxxxxxx/WRL8/product_install/wrlinux-8/wrlinux/configure --enable-board=fsl-t4xxx --enable-kernel=preempt-rt --enable-rootfs=glibc-std --with-layer=/lpg-build/cdc/WASSP_LINUX_80/testcases/wrlinux/wr-testing/bts-dev --with-template=feature/bts --enable-internet-download=yes --enable-jobs=8 --enable-parallel-pkgbuilds=8 --enable-reconfig=yes --with-rcpl-version=0 #make

2.echo yes | sensors-detect

Other Downloads


Live chat
Online