More power management updates for 6.1-rc1
- Add an error message to be printed when a power domain marked as "always on" is not actually on during initialization (Johan Hovold). - Extend macros used for defining power management callbacks to allow conditional exporting of noirq and late/early suspend/resume PM callbacks (Paul Cercueil). - Update the turbostat utility: * Add support for two new platforms (Zhang Rui). * Adjust energy unit for Sapphire Rapids (Zhang Rui). * Do not dump TRL if turbo is not supported (Artem Bityutskiy). -----BEGIN PGP SIGNATURE----- iQJGBAABCAAwFiEE4fcc61cGeeHD/fCwgsRv/nhiVHEFAmNEVSISHHJqd0Byand5 c29ja2kubmV0AAoJEILEb/54YlRxKqUP/2Etq/OiSpMx7TYfLw9wpR6o+QOMSPuz fjEByubypGBA387Z7F3siRBhy0tRiiU0h3Ti/cPtxkNVx7lLc+yEJYYvbkIvm9Fg lhev8ky9m/JB9vq+r4GWnUWW3DntM84a3f/iNoqEMDeUUy0YhsPLfdIcEKN5y/qU Q1BQ+4XY4PSwY0G315JT+EDxkMK/YcoJyi+1dlSO5iilwz9DJBT2iD8M+18Lz1k4 GWUryTvcANSimx4WzLFvCXGHagA5Yv7czgIMI3eBhTaln7P2G/Jn0LCrbVcHJk0t dBgoK/FN9akbXzg6697No32soDLxf5uLzsUsYS3Xn/tdfp1b5jTX2o548qKjNBl7 x0ot2hUp713fS/4RVGeRTQcwzy1dMyzp35pMh+B61qKyVZTPcOXC6OcXRR5FmXOP iZo84snmPRhQPT387HpRwhpv6Pm/M9EIdCpXY1e21V8fpGdwxAbo+sLN4Kh+bkbS McxC7q5gOKFij8ucyVGUFQPMkkOuRi0kQMNVH8raobVUvsI8bAGau61LTpudyG6p 6kmcaKu4oEpl2cYpgQwdF5fT8NAp3H8cGuzkJRJqHijs0E4Kuqd9bigoPigUQTT2 1D92S/kiUcxJo4pJZ0eDaxB05LDPMeGjnm1DUz5kh8PJE060tjUMlaTG9Gh4HjlH uQjgblji2NVc =IsN+ -----END PGP SIGNATURE----- Merge tag 'pm-6.1-rc1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull more power management updates from Rafael Wysocki: "These update the turbostat utility, extend the macros used for defining device power management callbacks and add a diagnostic message to the generic power domains code. Specifics: - Add an error message to be printed when a power domain marked as "always on" is not actually on during initialization (Johan Hovold). - Extend macros used for defining power management callbacks to allow conditional exporting of noirq and late/early suspend/resume PM callbacks (Paul Cercueil). - Update the turbostat utility: - Add support for two new platforms (Zhang Rui). - Adjust energy unit for Sapphire Rapids (Zhang Rui). - Do not dump TRL if turbo is not supported (Artem Bityutskiy)" * tag 'pm-6.1-rc1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: tools/power turbostat: version 2022.10.04 tools/power turbostat: Use standard Energy Unit for SPR Dram RAPL domain tools/power turbostat: Do not dump TRL if turbo is not supported tools/power turbostat: Add support for MeteorLake platforms tools/power turbostat: Add support for RPL-S PM: Improve EXPORT_*_DEV_PM_OPS macros PM: domains: log failures to register always-on domains
This commit is contained in:
commit
f848b3cda3
@ -2085,8 +2085,10 @@ int pm_genpd_init(struct generic_pm_domain *genpd,
|
||||
|
||||
/* Always-on domains must be powered on at initialization. */
|
||||
if ((genpd_is_always_on(genpd) || genpd_is_rpm_always_on(genpd)) &&
|
||||
!genpd_status_on(genpd))
|
||||
!genpd_status_on(genpd)) {
|
||||
pr_err("always-on PM domain %s is not on\n", genpd->name);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
/* Multiple states but no governor doesn't make sense. */
|
||||
if (!gov && genpd->state_count > 1)
|
||||
|
@ -375,19 +375,20 @@ const struct dev_pm_ops name = { \
|
||||
}
|
||||
|
||||
#ifdef CONFIG_PM
|
||||
#define _EXPORT_DEV_PM_OPS(name, suspend_fn, resume_fn, runtime_suspend_fn, \
|
||||
runtime_resume_fn, idle_fn, sec, ns) \
|
||||
_DEFINE_DEV_PM_OPS(name, suspend_fn, resume_fn, runtime_suspend_fn, \
|
||||
runtime_resume_fn, idle_fn); \
|
||||
__EXPORT_SYMBOL(name, sec, ns)
|
||||
#define _EXPORT_DEV_PM_OPS(name, sec, ns) \
|
||||
const struct dev_pm_ops name; \
|
||||
__EXPORT_SYMBOL(name, sec, ns); \
|
||||
const struct dev_pm_ops name
|
||||
#else
|
||||
#define _EXPORT_DEV_PM_OPS(name, suspend_fn, resume_fn, runtime_suspend_fn, \
|
||||
runtime_resume_fn, idle_fn, sec, ns) \
|
||||
static __maybe_unused _DEFINE_DEV_PM_OPS(__static_##name, suspend_fn, \
|
||||
resume_fn, runtime_suspend_fn, \
|
||||
runtime_resume_fn, idle_fn)
|
||||
#define _EXPORT_DEV_PM_OPS(name, sec, ns) \
|
||||
static __maybe_unused const struct dev_pm_ops __static_##name
|
||||
#endif
|
||||
|
||||
#define EXPORT_DEV_PM_OPS(name) _EXPORT_DEV_PM_OPS(name, "", "")
|
||||
#define EXPORT_GPL_DEV_PM_OPS(name) _EXPORT_DEV_PM_OPS(name, "_gpl", "")
|
||||
#define EXPORT_NS_DEV_PM_OPS(name, ns) _EXPORT_DEV_PM_OPS(name, "", #ns)
|
||||
#define EXPORT_NS_GPL_DEV_PM_OPS(name, ns) _EXPORT_DEV_PM_OPS(name, "_gpl", #ns)
|
||||
|
||||
/*
|
||||
* Use this if you want to use the same suspend and resume callbacks for suspend
|
||||
* to RAM and hibernation.
|
||||
@ -399,13 +400,21 @@ static __maybe_unused _DEFINE_DEV_PM_OPS(__static_##name, suspend_fn, \
|
||||
_DEFINE_DEV_PM_OPS(name, suspend_fn, resume_fn, NULL, NULL, NULL)
|
||||
|
||||
#define EXPORT_SIMPLE_DEV_PM_OPS(name, suspend_fn, resume_fn) \
|
||||
_EXPORT_DEV_PM_OPS(name, suspend_fn, resume_fn, NULL, NULL, NULL, "", "")
|
||||
EXPORT_DEV_PM_OPS(name) = { \
|
||||
SYSTEM_SLEEP_PM_OPS(suspend_fn, resume_fn) \
|
||||
}
|
||||
#define EXPORT_GPL_SIMPLE_DEV_PM_OPS(name, suspend_fn, resume_fn) \
|
||||
_EXPORT_DEV_PM_OPS(name, suspend_fn, resume_fn, NULL, NULL, NULL, "_gpl", "")
|
||||
EXPORT_GPL_DEV_PM_OPS(name) = { \
|
||||
SYSTEM_SLEEP_PM_OPS(suspend_fn, resume_fn) \
|
||||
}
|
||||
#define EXPORT_NS_SIMPLE_DEV_PM_OPS(name, suspend_fn, resume_fn, ns) \
|
||||
_EXPORT_DEV_PM_OPS(name, suspend_fn, resume_fn, NULL, NULL, NULL, "", #ns)
|
||||
EXPORT_NS_DEV_PM_OPS(name, ns) = { \
|
||||
SYSTEM_SLEEP_PM_OPS(suspend_fn, resume_fn) \
|
||||
}
|
||||
#define EXPORT_NS_GPL_SIMPLE_DEV_PM_OPS(name, suspend_fn, resume_fn, ns) \
|
||||
_EXPORT_DEV_PM_OPS(name, suspend_fn, resume_fn, NULL, NULL, NULL, "_gpl", #ns)
|
||||
EXPORT_NS_GPL_DEV_PM_OPS(name, ns) = { \
|
||||
SYSTEM_SLEEP_PM_OPS(suspend_fn, resume_fn) \
|
||||
}
|
||||
|
||||
/* Deprecated. Use DEFINE_SIMPLE_DEV_PM_OPS() instead. */
|
||||
#define SIMPLE_DEV_PM_OPS(name, suspend_fn, resume_fn) \
|
||||
|
@ -40,17 +40,21 @@
|
||||
resume_fn, idle_fn)
|
||||
|
||||
#define EXPORT_RUNTIME_DEV_PM_OPS(name, suspend_fn, resume_fn, idle_fn) \
|
||||
_EXPORT_DEV_PM_OPS(name, pm_runtime_force_suspend, pm_runtime_force_resume, \
|
||||
suspend_fn, resume_fn, idle_fn, "", "")
|
||||
EXPORT_DEV_PM_OPS(name) = { \
|
||||
RUNTIME_PM_OPS(suspend_fn, resume_fn, idle_fn) \
|
||||
}
|
||||
#define EXPORT_GPL_RUNTIME_DEV_PM_OPS(name, suspend_fn, resume_fn, idle_fn) \
|
||||
_EXPORT_DEV_PM_OPS(name, pm_runtime_force_suspend, pm_runtime_force_resume, \
|
||||
suspend_fn, resume_fn, idle_fn, "_gpl", "")
|
||||
EXPORT_GPL_DEV_PM_OPS(name) = { \
|
||||
RUNTIME_PM_OPS(suspend_fn, resume_fn, idle_fn) \
|
||||
}
|
||||
#define EXPORT_NS_RUNTIME_DEV_PM_OPS(name, suspend_fn, resume_fn, idle_fn, ns) \
|
||||
_EXPORT_DEV_PM_OPS(name, pm_runtime_force_suspend, pm_runtime_force_resume, \
|
||||
suspend_fn, resume_fn, idle_fn, "", #ns)
|
||||
EXPORT_NS_DEV_PM_OPS(name, ns) = { \
|
||||
RUNTIME_PM_OPS(suspend_fn, resume_fn, idle_fn) \
|
||||
}
|
||||
#define EXPORT_NS_GPL_RUNTIME_DEV_PM_OPS(name, suspend_fn, resume_fn, idle_fn, ns) \
|
||||
_EXPORT_DEV_PM_OPS(name, pm_runtime_force_suspend, pm_runtime_force_resume, \
|
||||
suspend_fn, resume_fn, idle_fn, "_gpl", #ns)
|
||||
EXPORT_NS_GPL_DEV_PM_OPS(name, ns) = { \
|
||||
RUNTIME_PM_OPS(suspend_fn, resume_fn, idle_fn) \
|
||||
}
|
||||
|
||||
#ifdef CONFIG_PM
|
||||
extern struct workqueue_struct *pm_wq;
|
||||
|
@ -230,6 +230,7 @@ unsigned int do_slm_cstates;
|
||||
unsigned int use_c1_residency_msr;
|
||||
unsigned int has_aperf;
|
||||
unsigned int has_epb;
|
||||
unsigned int has_turbo;
|
||||
unsigned int is_hybrid;
|
||||
unsigned int do_irtl_snb;
|
||||
unsigned int do_irtl_hsw;
|
||||
@ -4080,13 +4081,11 @@ static void remove_underbar(char *s)
|
||||
*to = 0;
|
||||
}
|
||||
|
||||
static void dump_cstate_pstate_config_info(unsigned int family, unsigned int model)
|
||||
static void dump_turbo_ratio_info(unsigned int family, unsigned int model)
|
||||
{
|
||||
if (!do_nhm_platform_info)
|
||||
if (!has_turbo)
|
||||
return;
|
||||
|
||||
dump_nhm_platform_info();
|
||||
|
||||
if (has_hsw_turbo_ratio_limit(family, model))
|
||||
dump_hsw_turbo_ratio_limits();
|
||||
|
||||
@ -4108,7 +4107,15 @@ static void dump_cstate_pstate_config_info(unsigned int family, unsigned int mod
|
||||
|
||||
if (has_config_tdp(family, model))
|
||||
dump_config_tdp();
|
||||
}
|
||||
|
||||
static void dump_cstate_pstate_config_info(unsigned int family, unsigned int model)
|
||||
{
|
||||
if (!do_nhm_platform_info)
|
||||
return;
|
||||
|
||||
dump_nhm_platform_info();
|
||||
dump_turbo_ratio_info(family, model);
|
||||
dump_nhm_cst_cfg();
|
||||
}
|
||||
|
||||
@ -4560,7 +4567,6 @@ static double rapl_dram_energy_units_probe(int model, double rapl_energy_units)
|
||||
case INTEL_FAM6_SKYLAKE_X: /* SKX */
|
||||
case INTEL_FAM6_XEON_PHI_KNL: /* KNL */
|
||||
case INTEL_FAM6_ICELAKE_X: /* ICX */
|
||||
case INTEL_FAM6_SAPPHIRERAPIDS_X: /* SPR */
|
||||
return (rapl_dram_energy_units = 15.3 / 1000000);
|
||||
default:
|
||||
return (rapl_energy_units);
|
||||
@ -5447,6 +5453,9 @@ unsigned int intel_model_duplicates(unsigned int model)
|
||||
case INTEL_FAM6_ALDERLAKE_N:
|
||||
case INTEL_FAM6_RAPTORLAKE:
|
||||
case INTEL_FAM6_RAPTORLAKE_P:
|
||||
case INTEL_FAM6_RAPTORLAKE_S:
|
||||
case INTEL_FAM6_METEORLAKE:
|
||||
case INTEL_FAM6_METEORLAKE_L:
|
||||
return INTEL_FAM6_CANNONLAKE_L;
|
||||
|
||||
case INTEL_FAM6_ATOM_TREMONT_L:
|
||||
@ -5505,7 +5514,6 @@ void process_cpuid()
|
||||
{
|
||||
unsigned int eax, ebx, ecx, edx;
|
||||
unsigned int fms, family, model, stepping, ecx_flags, edx_flags;
|
||||
unsigned int has_turbo;
|
||||
unsigned long long ucode_patch = 0;
|
||||
|
||||
eax = ebx = ecx = edx = 0;
|
||||
@ -6217,7 +6225,7 @@ int get_and_dump_counters(void)
|
||||
|
||||
void print_version()
|
||||
{
|
||||
fprintf(outf, "turbostat version 2022.07.28 - Len Brown <lenb@kernel.org>\n");
|
||||
fprintf(outf, "turbostat version 2022.10.04 - Len Brown <lenb@kernel.org>\n");
|
||||
}
|
||||
|
||||
#define COMMAND_LINE_SIZE 2048
|
||||
|
Loading…
x
Reference in New Issue
Block a user