Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 663424 - =dev-perl/Sys-CPU-0.610.0-r1: CPU speed detection does not work on sparc
Summary: =dev-perl/Sys-CPU-0.610.0-r1: CPU speed detection does not work on sparc
Status: CONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: Sparc64 Linux
: Normal normal (vote)
Assignee: Gentoo Perl team
URL: https://rt.cpan.org/Public/Bug/Displa...
Whiteboard:
Keywords:
Depends on:
Blocks: 662392
  Show dependency tree
 
Reported: 2018-08-12 08:29 UTC by Rolf Eike Beer
Modified: 2020-04-26 15:03 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Rolf Eike Beer 2018-08-12 08:29:31 UTC
Test Summary Report
-------------------
t/Sys-CPU.t (Wstat: 0 Tests: 4 Failed: 2)
  Failed tests:  3-4
Files=1, Tests=4,  1 wallclock secs ( 0.17 usr  0.00 sys +  0.07 cusr  0.02 csys =  0.26 CPU)
Result: FAIL
Failed 1/1 test programs. 2/4 subtests failed.

I was told it just reads /proc/cpuinfo, which then probably fails because of the unusual layout of that file on sparc:

cpu             : UltraSparc T2 (Niagara2)
fpu             : UltraSparc T2 integrated FPU
pmu             : niagara2
prom            : OBP 4.33.6 2012/03/14 08:07
type            : sun4v
ncpus probed    : 64
ncpus active    : 64
D$ parity tl1   : 0
I$ parity tl1   : 0
cpucaps         : flush,stbar,swap,muldiv,v9,blkinit,n2,mul32,div32,v8plus,popc,vis,vis2,ASIBlkInit
Cpu0ClkTck      : 000000005458c3a0
Cpu1ClkTck      : 000000005458c3a0
[…]
Cpu63ClkTck     : 000000005458c3a0
MMU Type        : Hypervisor (sun4v)
MMU PGSZs       : 8K,64K,4MB,256MB
State:
CPU0:           online
CPU1:           online
Comment 1 Matt Turner gentoo-dev 2018-08-20 01:18:11 UTC
The Cpu0ClkTck number is hex and is the frequency (in Hz) of the CPU.

0x000000005458c3a0 == 0x000000005458c3a0 == 1.4~ GHz.

Adding upstream bug link as well.
Comment 2 Matt Turner gentoo-dev 2018-08-20 01:48:28 UTC
There's a patch upstream for ARM. I noticed Alpha is broken as well.
Comment 3 Rolf Eike Beer 2018-08-20 05:30:48 UTC
The Cpu0Bogo field mentioned in that upstream bug does no longer exist.
Comment 4 Rolf Eike Beer 2018-09-19 17:17:33 UTC
A better way on sparc is probably to look into /sys/devices/system/cpu/cpu0/clock_tick. This is not portable e.g. to amd64, but since a special case is needed on sparc anyway this can make implementation easier.
Comment 5 Kent Fredric (IRC: kent\n) gentoo-dev 2019-07-17 08:11:00 UTC
This package has fallen off CPAN :/

Sys::CPU                           0.52  M/MK/MKODERER/Sys-CPU-0.52.tar.gz
Sys::CPU                           0.53  M/MZ/MZSANFORD/Sys-CPU-0.53.tar.gz
Sys::CPU                           0.54  M/MZ/MZSANFORD/Sys-CPU-0.54.tar.gz
Sys::CPU                           0.61  M/MZ/MZSANFORD/Sys-CPU-0.61.tar.gz
Sys::CPU                          undef  P/PA/PABLROD/Chart-Plotly-0.014.tar.gz


....

https://metacpan.org/permission/author/MZSANFORD

Sys::CPU 	MKODERER 	MZSANFORD

https://metacpan.org/author/MKODERER
https://metacpan.org/author/MZSANFORD