Bug 153161 - libcpupower: cpupower_is_cpu_online is not in public API
Summary: libcpupower: cpupower_is_cpu_online is not in public API
Status: NEW
Alias: None
Product: Tools
Classification: Unclassified
Component: Other (show other bugs)
Hardware: All Linux
: P1 low
Assignee: Tools.Other
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-08-15 18:25 UTC by Vlad Orlov
Modified: 2018-02-03 12:44 UTC (History)
3 users (show)

See Also:
Kernel Version: 4.7-rc7
Subsystem:
Regression: No
Bisected commit-id:


Attachments

Description Vlad Orlov 2016-08-15 18:25:50 UTC
Hi,

I've noticed that cpupower_is_cpu_online function isn't declared neither in /usr/include/cpufreq.h nor in /usr/include/cpuidle.h. It's only declared in cpupower.h which isn't installed to /usr/include in Makefile.

So, migrating software [1] from using cpufreq_cpu_exists (pre-4.7) to cpupower_is_cpu_online makes gcc show implicit declaration warning.

It's not major issue since the build succeeds anyway, just thought I'd notify you about it.


[1] https://github.com/mate-desktop/mate-applets/commit/1b4478eab642787c43601259611f7b27e0bb473b
Comment 1 NP-Hardass 2016-09-12 11:34:12 UTC
Unlike Vlad, on Gentoo, we are unable to compile mate-applets successfully for this very reason.  Gentoo packaging, just as a side note, has cpupower extracted from linux sources to be installed as a separate package.  Version 4.7.0 of this package contains the cpufreq.h, cpuidle.h, and cpupower.h files, but the Makefile doesn't install cpupower.h.

Presumably since cpufreq_cpu_exists was a public function, its replacement, cpupower_is_cpu_online, should be too.  Is it worth having cpupower install cpupower.h in addition to cpufreq.h and cpuidle.h, or is there a better way to handle the situation?

Personally, because a public function was removed and its replacement is private, I'd consider the loss of functionality a regression, but I don't know the specifics of the design decisions that went into the current setup.  Any recommendations on how to proceed if this decision was intentional and will persist would be appreciated.
Comment 2 Vlad Orlov 2018-02-03 12:44:05 UTC
There's a patch for this at:
https://patchwork.kernel.org/patch/10009599/

Note You need to log in before you can comment on or make changes to this bug.