mirror of
https://github.com/xen-project/xen.git
synced 2026-10-28 02:01:24 +01:00
x86/ACPI: Move scheduler enable/disable calls out of {freeze,thaw}_domains()
... and into their parent, enter_state(). This change addresses the concern about misleading function semantics, as the scheduler operations are not directly related to the domain pausing/resuming implied by the freeze/thaw naming. Suggested-by: Jan Beulich <jbeulich@suse.com> Signed-off-by: Mykola Kvach <mykola_kvach@epam.com> Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
This commit is contained in:
1 parent
0e7f6c6098
commit
1099bdd24f
1 file changed
+2
-4
@@ -151,16 +151,12 @@ static void freeze_domains(void)
|
|||||||
for_each_domain ( d )
|
for_each_domain ( d )
|
||||||
domain_pause(d);
|
domain_pause(d);
|
||||||
rcu_read_unlock(&domlist_read_lock);
|
rcu_read_unlock(&domlist_read_lock);
|
||||||
|
|
||||||
scheduler_disable();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void thaw_domains(void)
|
static void thaw_domains(void)
|
||||||
{
|
{
|
||||||
struct domain *d;
|
struct domain *d;
|
||||||
|
|
||||||
scheduler_enable();
|
|
||||||
|
|
||||||
rcu_read_lock(&domlist_read_lock);
|
rcu_read_lock(&domlist_read_lock);
|
||||||
for_each_domain ( d )
|
for_each_domain ( d )
|
||||||
domain_unpause(d);
|
domain_unpause(d);
|
||||||
@@ -216,6 +212,7 @@ static int enter_state(u32 state)
|
|||||||
printk(XENLOG_INFO "Preparing system for ACPI S%d state.\n", state);
|
printk(XENLOG_INFO "Preparing system for ACPI S%d state.\n", state);
|
||||||
|
|
||||||
freeze_domains();
|
freeze_domains();
|
||||||
|
scheduler_disable();
|
||||||
|
|
||||||
acpi_dmar_reinstate();
|
acpi_dmar_reinstate();
|
||||||
|
|
||||||
@@ -334,6 +331,7 @@ static int enter_state(u32 state)
|
|||||||
mtrr_aps_sync_end();
|
mtrr_aps_sync_end();
|
||||||
iommu_adjust_irq_affinities();
|
iommu_adjust_irq_affinities();
|
||||||
acpi_dmar_zap();
|
acpi_dmar_zap();
|
||||||
|
scheduler_enable();
|
||||||
thaw_domains();
|
thaw_domains();
|
||||||
system_state = SYS_STATE_active;
|
system_state = SYS_STATE_active;
|
||||||
spin_unlock(&pm_lock);
|
spin_unlock(&pm_lock);
|
||||||
|
|||||||