summaryrefslogtreecommitdiff
path: root/Documentation/controllers/git@git.tavy.me:linux.git
diff options
context:
space:
mode:
authorKuppuswamy Sathyanarayanan <sathyanarayanan.kuppuswamy@linux.intel.com>2026-02-12 15:30:40 -0800
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2026-03-05 15:52:39 +0100
commitd7ca7d1488cc916dbf0a6a594abbda81d4eaeee9 (patch)
tree3dc60aae756a5c207f7c5d43609976ca9076da01 /Documentation/controllers/git@git.tavy.me:linux.git
parent90503f9ffee927c3abdc94a4862d13ae71ea9442 (diff)
powercap: intel_rapl: Allow interface drivers to configure rapl_defaults
RAPL default settings vary across different RAPL interfaces (MSR, TPMI, MMIO). Currently, these defaults are stored in the common RAPL driver, which requires interface-specific handling logic and makes the common layer unnecessarily complex. There is no strong reason for the common code to own these defaults, since they are inherently interface-specific. To prepare for moving default configuration into the individual interface drivers, 1. Move struct rapl_defaults into a shared header so that interface drivers can directly populate their own default settings. 2. Change the @defaults field in struct rapl_if_priv from void * to const struct rapl_defaults * to improve type safety and readability and update the common driver to use the typed defaults structure. 3. Update all internal getter functions and local pointers to use const struct rapl_defaults * to maintain const-correctness. 4. Rename and export the common helper functions (check_unit, set_floor_freq, compute_time_window) so interface drivers may reuse or override them as appropriate. No functional changes. This is a preparatory refactoring to allow interface drivers to supply their own RAPL default settings. Co-developed-by: Zhang Rui <rui.zhang@intel.com> Signed-off-by: Zhang Rui <rui.zhang@intel.com> Signed-off-by: Kuppuswamy Sathyanarayanan <sathyanarayanan.kuppuswamy@linux.intel.com> Acked-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> Link: https://patch.msgid.link/20260212233044.329790-9-sathyanarayanan.kuppuswamy@linux.intel.com Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'Documentation/controllers/git@git.tavy.me:linux.git')
0 files changed, 0 insertions, 0 deletions