mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-09 00:43:08 -04:00
Merge branches 'pm-em', 'pm-powercap' and 'pm-sleep'
Merge additional updates related to the Energy Model, power capping and system-wide power management for 6.9-rc1: - Modify the Energy Model code to bail out and complain if the unit of power is not uW to prevent errors due to unit mismatches (Lukasz Luba). - Make the intel_rapl platform driver use a remove callback returning void (Uwe Kleine-König). - Fix typo in the suspend and interrupts document (Saravana Kannan). * pm-em: PM: EM: Force device drivers to provide power in uW * pm-powercap: powercap: intel_rapl: Convert to platform remove callback returning void * pm-sleep: Documentation: power: Fix typo in suspend and interrupts doc
This commit is contained in:
@@ -78,7 +78,7 @@ handling the given IRQ as a system wakeup interrupt line and disable_irq_wake()
|
||||
turns that logic off.
|
||||
|
||||
Calling enable_irq_wake() causes suspend_device_irqs() to treat the given IRQ
|
||||
in a special way. Namely, the IRQ remains enabled, by on the first interrupt
|
||||
in a special way. Namely, the IRQ remains enabled, but on the first interrupt
|
||||
it will be disabled, marked as pending and "suspended" so that it will be
|
||||
re-enabled by resume_device_irqs() during the subsequent system resume. Also
|
||||
the PM core is notified about the event which causes the system suspend in
|
||||
|
||||
@@ -197,11 +197,10 @@ static int rapl_msr_probe(struct platform_device *pdev)
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int rapl_msr_remove(struct platform_device *pdev)
|
||||
static void rapl_msr_remove(struct platform_device *pdev)
|
||||
{
|
||||
cpuhp_remove_state(rapl_msr_priv->pcap_rapl_online);
|
||||
powercap_unregister_control_type(rapl_msr_priv->control_type);
|
||||
return 0;
|
||||
}
|
||||
|
||||
static const struct platform_device_id rapl_msr_ids[] = {
|
||||
@@ -212,7 +211,7 @@ MODULE_DEVICE_TABLE(platform, rapl_msr_ids);
|
||||
|
||||
static struct platform_driver intel_rapl_msr_driver = {
|
||||
.probe = rapl_msr_probe,
|
||||
.remove = rapl_msr_remove,
|
||||
.remove_new = rapl_msr_remove,
|
||||
.id_table = rapl_msr_ids,
|
||||
.driver = {
|
||||
.name = "intel_rapl_msr",
|
||||
|
||||
@@ -612,6 +612,17 @@ int em_dev_register_perf_domain(struct device *dev, unsigned int nr_states,
|
||||
else if (cb->get_cost)
|
||||
flags |= EM_PERF_DOMAIN_ARTIFICIAL;
|
||||
|
||||
/*
|
||||
* EM only supports uW (exception is artificial EM).
|
||||
* Therefore, check and force the drivers to provide
|
||||
* power in uW.
|
||||
*/
|
||||
if (!microwatts && !(flags & EM_PERF_DOMAIN_ARTIFICIAL)) {
|
||||
dev_err(dev, "EM: only supports uW power values\n");
|
||||
ret = -EINVAL;
|
||||
goto unlock;
|
||||
}
|
||||
|
||||
ret = em_create_pd(dev, nr_states, cb, cpus, flags);
|
||||
if (ret)
|
||||
goto unlock;
|
||||
|
||||
Reference in New Issue
Block a user