Skip to content

powercap/intel_rapl: Fixes, hotplug conversion and simplifcation

Thomas Gleixner linux-pm lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest5 patches 5 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/5powercap/intel_rapl: Add missing domain data update on hotplugdrivers/powercap/intel_rapl.c+18 -241 reply
2/5powercap/intel_rapl: Propagate error code when registration failsdrivers/powercap/intel_rapl.c+4 -40 replies
3/5powercap/intel rapl: Convert to hotplug state machinedrivers/powercap/intel_rapl.c+49 -450 replies
4/5powercap/intel_rapl: Cleanup duplicated init codedrivers/powercap/intel_rapl.c+46 -1880 replies
5/5powercap/intel_rapl: Track active CPUs internallydrivers/powercap/intel_rapl.c+24 -350 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [patch 0/5] powercap/intel_rapl: Fixes, hotplug conversion and simplifcation

The driver fails to:

- initialize packages which are not available at driver init time, though the value of that initialization is completely unclear as nothing ever uses these values. I fixed it up nevertheless and leave it to the maintainers to decide whether it should completely go away.

- to propagate error codes in the hotplug online path, where a registration fails and the package data is freed, but return code is 0.

The initialization/removal code of that driver is a maze of duplicated code which is more or less the same as the cpu hotplug code. After switching over the driver to the hotplug statemachine, the whole init/removal machinery can be replaced by installing/removing the hotplug state.

The total damage is:

 intel_rapl.c |  363 ++++++++++++++++-------------------------------------------
 1 file changed, 104 insertions(+), 259 deletions(-)

and the binary size shrinks as well:

text data bss dec hex

   7996	    625	     32	   8653	   21cd	  Before
   7216	    593	     32	   7841	   1ea1	  After

Thanks,

tglx