Merge branches 'pm-sleep', 'pm-cpuidle', 'pm-cpufreq', 'pm-devfreq' and 'pm-avs'
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>
Wed, 4 Dec 2019 09:20:17 +0000 (10:20 +0100)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Wed, 4 Dec 2019 09:20:17 +0000 (10:20 +0100)
* 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

1  2  3  4  5  6 
drivers/acpi/ec.c

index 4fd84fbdac29bddc311d5d868823d79b348cf86e,bd75caff83229aafad9cf273fe3f830c8ccf2f10,da1e5c5ce15065dbddac0e6c0b6abe1bde43fe2d,da1e5c5ce15065dbddac0e6c0b6abe1bde43fe2d,da1e5c5ce15065dbddac0e6c0b6abe1bde43fe2d,da1e5c5ce15065dbddac0e6c0b6abe1bde43fe2d..d05be13c1022c240b58da328da71b946e0854397
@@@@@@@ -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)