From: Rafael J. Wysocki Date: Wed, 4 Dec 2019 09:20:17 +0000 (+0100) Subject: Merge branches 'pm-sleep', 'pm-cpuidle', 'pm-cpufreq', 'pm-devfreq' and 'pm-avs' X-Git-Tag: v5.15~4969^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=1e4230f56dac141eb149ebec01f41b6fad27e503;p=platform%2Fkernel%2Flinux-starfive.git Merge branches 'pm-sleep', 'pm-cpuidle', 'pm-cpufreq', 'pm-devfreq' and 'pm-avs' * pm-sleep: ACPI: PM: s2idle: Rework ACPI events synchronization ACPI: EC: Rework flushing of pending work * pm-cpuidle: cpuidle: minor Kconfig help text fixes cpuidle: Drop disabled field from struct cpuidle_state cpuidle: Fix Kconfig indentation * pm-cpufreq: cpufreq: Fix Kconfig indentation * pm-devfreq: PM / devfreq: Add missing locking while setting suspend_freq * pm-avs: power: avs: Fix Kconfig indentation --- 1e4230f56dac141eb149ebec01f41b6fad27e503 diff --cc drivers/acpi/ec.c index 4fd84fb,bd75caf,da1e5c5,da1e5c5,da1e5c5,da1e5c5..d05be13c --- a/drivers/acpi/ec.c +++ b/drivers/acpi/ec.c @@@@@@@ -533,26 -525,10 -525,26 -525,26 -525,26 -525,26 +533,10 @@@@@@@ static void acpi_ec_enable_event(struc } #ifdef CONFIG_PM_SLEEP - ----static bool acpi_ec_query_flushed(struct acpi_ec *ec) ----{ ---- bool flushed; ---- unsigned long flags; ---- ---- spin_lock_irqsave(&ec->lock, flags); ---- flushed = !ec->nr_pending_queries; ---- spin_unlock_irqrestore(&ec->lock, flags); ---- return flushed; ----} ---- ----static void __acpi_ec_flush_event(struct acpi_ec *ec) + ++++static void __acpi_ec_flush_work(void) { - bool flushed; - unsigned long flags; - - spin_lock_irqsave(&ec->lock, flags); - flushed = !ec->nr_pending_queries; - spin_unlock_irqrestore(&ec->lock, flags); - return flushed; - } - - static void __acpi_ec_flush_event(struct acpi_ec *ec) - { - ---- /* - ---- * When ec_freeze_events is true, we need to flush events in - ---- * the proper position before entering the noirq stage. - ---- */ - ---- wait_event(ec->wait, acpi_ec_query_flushed(ec)); - ---- if (ec_query_wq) - ---- flush_workqueue(ec_query_wq); + ++++ flush_scheduled_work(); /* flush ec->work */ + ++++ flush_workqueue(ec_query_wq); /* flush queries */ } static void acpi_ec_disable_event(struct acpi_ec *ec)