1. 20 Nov, 2018 1 commit
    • Will Deacon's avatar
      Documentation: Use "while" instead of "whilst" · 806654a9
      Will Deacon authored
      Whilst making an unrelated change to some Documentation, Linus sayeth:
        | Afaik, even in Britain, "whilst" is unusual and considered more
        | formal, and "while" is the common word.
        | [...]
        | Can we just admit that we work with computers, and we don't need to
        | use þe eald Englisc spelling of words that most of the world never
        | uses?
      dictionary.com refers to the word as "Chiefly British", which is
      probably an undesirable attribute for technical documentation.
      Replace all occurrences under Documentation/ with "while".
      Cc: David Howells <dhowells@redhat.com>
      Cc: Liam Girdwood <lgirdwood@gmail.com>
      Cc: Chris Wilson <chris@chris-wilson.co.uk>
      Cc: Michael Halcrow <mhalcrow@google.com>
      Cc: Jonathan Corbet <corbet@lwn.net>
      Reported-by: 's avatarLinus Torvalds <torvalds@linux-foundation.org>
      Signed-off-by: 's avatarWill Deacon <will.deacon@arm.com>
      Signed-off-by: 's avatarJonathan Corbet <corbet@lwn.net>
  2. 10 Sep, 2018 1 commit
  3. 09 Sep, 2018 1 commit
    • Henrik Austad's avatar
      Drop all 00-INDEX files from Documentation/ · a7ddcea5
      Henrik Austad authored
      This is a respin with a wider audience (all that get_maintainer returned)
      and I know this spams a *lot* of people. Not sure what would be the correct
      way, so my apologies for ruining your inbox.
      The 00-INDEX files are supposed to give a summary of all files present
      in a directory, but these files are horribly out of date and their
      usefulness is brought into question. Often a simple "ls" would reveal
      the same information as the filenames are generally quite descriptive as
      a short introduction to what the file covers (it should not surprise
      anyone what Documentation/sched/sched-design-CFS.txt covers)
      A few years back it was mentioned that these files were no longer really
      needed, and they have since then grown further out of date, so perhaps
      it is time to just throw them out.
      A short status yields the following _outdated_ 00-INDEX files, first
      counter is files listed in 00-INDEX but missing in the directory, last
      is files present but not listed in 00-INDEX.
      List of outdated 00-INDEX:
      Documentation: (4/10)
      Documentation/sysctl: (0/1)
      Documentation/timers: (1/0)
      Documentation/blockdev: (3/1)
      Documentation/w1/slaves: (0/1)
      Documentation/locking: (0/1)
      Documentation/devicetree: (0/5)
      Documentation/power: (1/1)
      Documentation/powerpc: (0/5)
      Documentation/arm: (1/0)
      Documentation/x86: (0/9)
      Documentation/x86/x86_64: (1/1)
      Documentation/scsi: (4/4)
      Documentation/filesystems: (2/9)
      Documentation/filesystems/nfs: (0/2)
      Documentation/cgroup-v1: (0/2)
      Documentation/kbuild: (0/4)
      Documentation/spi: (1/0)
      Documentation/virtual/kvm: (1/0)
      Documentation/scheduler: (0/2)
      Documentation/fb: (0/1)
      Documentation/block: (0/1)
      Documentation/networking: (6/37)
      Documentation/vm: (1/3)
      Then there are 364 subdirectories in Documentation/ with several files that
      are missing 00-INDEX alltogether (and another 120 with a single file and no
      I don't really have an opinion to whether or not we /should/ have 00-INDEX,
      but the above 00-INDEX should either be removed or be kept up to date. If
      we should keep the files, I can try to keep them updated, but I rather not
      if we just want to delete them anyway.
      As a starting point, remove all index-files and references to 00-INDEX and
      see where the discussion is going.
      Signed-off-by: 's avatarHenrik Austad <henrik@austad.us>
      Acked-by: 's avatar"Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
      Just-do-it-by: 's avatarSteven Rostedt <rostedt@goodmis.org>
      Reviewed-by: 's avatarJens Axboe <axboe@kernel.dk>
      Acked-by: 's avatarPaul Moore <paul@paul-moore.com>
      Acked-by: 's avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      Acked-by: 's avatarMark Brown <broonie@kernel.org>
      Acked-by: 's avatarMike Rapoport <rppt@linux.vnet.ibm.com>
      Cc: [Almost everybody else]
      Signed-off-by: 's avatarJonathan Corbet <corbet@lwn.net>
  4. 06 Aug, 2018 1 commit
  5. 23 Apr, 2018 1 commit
  6. 30 Mar, 2018 1 commit
  7. 29 Nov, 2017 1 commit
  8. 27 Nov, 2017 1 commit
  9. 16 Nov, 2017 1 commit
    • Rafael J. Wysocki's avatar
      PM / runtime: Drop children check from __pm_runtime_set_status() · f8817f61
      Rafael J. Wysocki authored
      The check for "active" children in __pm_runtime_set_status(), when
      trying to set the parent device status to "suspended", doesn't
      really make sense, because in fact it is not invalid to set the
      status of a device with runtime PM disabled to "suspended" in any
      case.  It is invalid to enable runtime PM for a device with its
      status set to "suspended" while its child_count reference counter
      is nonzero, but the check in __pm_runtime_set_status() doesn't
      really cover that situation.
      For this reason, drop the children check from __pm_runtime_set_status()
      and add a check against child_count reference counters of "suspended"
      devices to pm_runtime_enable().
      Fixes: a8636c89 (PM / Runtime: Don't allow to suspend a device with an active child)
      Signed-off-by: 's avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
      Reviewed-by: 's avatarUlf Hansson <ulf.hansson@linaro.org>
      Reviewed-by: 's avatarJohan Hovold <johan@kernel.org>
  10. 13 Nov, 2017 1 commit
  11. 06 Nov, 2017 2 commits
    • Rafael J. Wysocki's avatar
      PCI / PM: Take SMART_SUSPEND driver flag into account · c4b65157
      Rafael J. Wysocki authored
      Make the PCI bus type take DPM_FLAG_SMART_SUSPEND into account in its
      system-wide PM callbacks and make sure that all code that should not
      run in parallel with pci_pm_runtime_resume() is executed in the "late"
      phases of system suspend, freeze and poweroff transitions.
      [Note that the pm_runtime_suspended() check in pci_dev_keep_suspended()
      is an optimization, because if is not passed, all of the subsequent
      checks may be skipped and some of them are much more overhead in
      Also use the observation that if the device is in runtime suspend
      at the beginning of the "late" phase of a system-wide suspend-like
      transition, its state cannot change going forward (runtime PM is
      disabled for it at that time) until the transition is over and the
      subsequent system-wide PM callbacks should be skipped for it (as
      they generally assume the device to not be suspended), so add checks
      for that in pci_pm_suspend_late/noirq(), pci_pm_freeze_late/noirq()
      and pci_pm_poweroff_late/noirq().
      Moreover, if pci_pm_resume_noirq() or pci_pm_restore_noirq() is
      called during the subsequent system-wide resume transition and if
      the device was left in runtime suspend previously, its runtime PM
      status needs to be changed to "active" as it is going to be put
      into the full-power state, so add checks for that too to these
      In turn, if pci_pm_thaw_noirq() runs after the device has been
      left in runtime suspend, the subsequent "thaw" callbacks need
      to be skipped for it (as they may not work correctly with a
      suspended device), so set the power.direct_complete flag for the
      device then to make the PM core skip those callbacks.
      In addition to the above add a core helper for checking if
      DPM_FLAG_SMART_SUSPEND is set and the device runtime PM status is
      "suspended" at the same time, which is done quite often in the new
      code (and will be done elsewhere going forward too).
      Signed-off-by: 's avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
      Acked-by: 's avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      Acked-by: 's avatarBjorn Helgaas <bhelgaas@google.com>
    • Rafael J. Wysocki's avatar
      PM / core: Add NEVER_SKIP and SMART_PREPARE driver flags · 08810a41
      Rafael J. Wysocki authored
      The motivation for this change is to provide a way to work around
      a problem with the direct-complete mechanism used for avoiding
      system suspend/resume handling for devices in runtime suspend.
      The problem is that some middle layer code (the PCI bus type and
      the ACPI PM domain in particular) returns positive values from its
      system suspend ->prepare callbacks regardless of whether the driver's
      ->prepare returns a positive value or 0, which effectively prevents
      drivers from being able to control the direct-complete feature.
      Some drivers need that control, however, and the PCI bus type has
      grown its own flag to deal with this issue, but since it is not
      limited to PCI, it is better to address it by adding driver flags at
      the core level.
      To that end, add a driver_flags field to struct dev_pm_info for flags
      that can be set by device drivers at the probe time to inform the PM
      core and/or bus types, PM domains and so on on the capabilities and/or
      preferences of device drivers.  Also add two static inline helpers
      for setting that field and testing it against a given set of flags
      and make the driver core clear it automatically on driver remove
      and probe failures.
      Define and document two PM driver flags related to the direct-
      complete feature: NEVER_SKIP and SMART_PREPARE that can be used,
      respectively, to indicate to the PM core that the direct-complete
      mechanism should never be used for the device and to inform the
      middle layer code (bus types, PM domains etc) that it can only
      request the PM core to use the direct-complete mechanism for
      the device (by returning a positive value from its ->prepare
      callback) if it also has been requested by the driver.
      While at it, make the core check pm_runtime_suspended() when
      setting power.direct_complete so that it doesn't need to be
      checked by ->prepare callbacks.
      Signed-off-by: 's avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
      Acked-by: 's avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      Acked-by: 's avatarBjorn Helgaas <bhelgaas@google.com>
      Reviewed-by: 's avatarUlf Hansson <ulf.hansson@linaro.org>
  12. 19 Oct, 2017 1 commit
  13. 13 Oct, 2017 1 commit
  14. 12 Oct, 2017 2 commits
  15. 28 Aug, 2017 1 commit
  16. 04 Aug, 2017 1 commit
    • Rafael J. Wysocki's avatar
      ACPI / PM: Prefer suspend-to-idle over S3 on some systems · e870c6c8
      Rafael J. Wysocki authored
      Modify the ACPI system sleep support setup code to select
      suspend-to-idle as the default system sleep state if
      (1) the ACPI_FADT_LOW_POWER_S0 flag is set in the FADT and
      (2) the Low Power Idle S0 _DSM interface has been discovered and
      (3) the default sleep state was not selected from the kernel command
      The main motivation for this change is that systems where the (1) and
      (2) conditions are met typically ship with OSes that don't exercise
      the S3 path in the platform firmware which remains untested and turns
      out to be non-functional at least in some cases.
      Signed-off-by: 's avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
      Tested-by: 's avatarMario Limonciello <mario.limonciello@dell.com>
  17. 27 Jul, 2017 1 commit
  18. 27 Jun, 2017 1 commit
  19. 08 Jun, 2017 2 commits
  20. 19 Apr, 2017 2 commits
    • Johan Hovold's avatar
      PM / runtime: Document autosuspend-helper side effects · bafdcde7
      Johan Hovold authored
      Document the fact that the autosuspend delay and enable helpers may
      change the power.usage_count and resume or suspend a device depending on
      the values of power.autosuspend_delay and power.use_autosuspend.
      Note that this means that a driver must disable autosuspend before
      disabling runtime pm on probe errors and on driver unbind if the device
      is to be suspended upon return (as a negative delay may otherwise keep
      the device resumed).
      Signed-off-by: 's avatarJohan Hovold <johan@kernel.org>
      Acked-by: 's avatarTony Lindgren <tony@atomide.com>
      Signed-off-by: 's avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
    • Johan Hovold's avatar
      PM / runtime: Fix autosuspend documentation · 72ec2e17
      Johan Hovold authored
      Update the autosuspend documentation which claimed that the autosuspend
      delay is not taken into account when using the non-autosuspend helper
      functions, something which is no longer true since commit d66e6db2
      ("PM / Runtime: Respect autosuspend when idle triggers suspend").
      This specifically means that drivers must now disable autosuspend before
      disabling runtime pm in probe error paths and remove callbacks if
      pm_runtime_put_sync was being used to suspend the device before
      returning. (If an idle callback can prevent suspend,
      pm_runtime_put_sync_suspend must be used instead of pm_runtime_put_sync
      as before.)
      Also remove the claim that the autosuspend helpers behave "just like
      the non-autosuspend counterparts", something which have never really
      been true as some of the latter use idle notifications.
      Signed-off-by: 's avatarJohan Hovold <johan@kernel.org>
      Acked-by: 's avatarTony Lindgren <tony@atomide.com>
      Signed-off-by: 's avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
  21. 11 Apr, 2017 1 commit
  22. 23 Feb, 2017 2 commits
  23. 18 Feb, 2017 1 commit
  24. 06 Feb, 2017 2 commits
  25. 30 Jan, 2017 1 commit
  26. 20 Jan, 2017 1 commit
  27. 21 Nov, 2016 2 commits
    • Rafael J. Wysocki's avatar
      PM / sleep / ACPI: Use the ACPI_FADT_LOW_POWER_S0 flag · 08b98d32
      Rafael J. Wysocki authored
      Modify the ACPI system sleep support setup code to select
      suspend-to-idle as the default system sleep state if the
      ACPI_FADT_LOW_POWER_S0 flag is set in the FADT and the
      default sleep state was not selected from the kernel command
      Signed-off-by: 's avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
      Tested-by: 's avatarMario Limonciello <mario.limonciello@dell.com>
    • Rafael J. Wysocki's avatar
      PM / sleep: System sleep state selection interface rework · 406e7938
      Rafael J. Wysocki authored
      There are systems in which the platform doesn't support any special
      sleep states, so suspend-to-idle (PM_SUSPEND_FREEZE) is the only
      available system sleep state.  However, some user space frameworks
      only use the "mem" and (sometimes) "standby" sleep state labels, so
      the users of those systems need to modify user space in order to be
      able to use system suspend at all and that may be a pain in practice.
      Commit 0399d4db (PM / sleep: Introduce command line argument for
      sleep state enumeration) attempted to address this problem by adding
      a command line argument to change the meaning of the "mem" string in
      /sys/power/state to make it trigger suspend-to-idle (instead of
      However, there also are systems in which the platform does support
      special sleep states, but suspend-to-idle is the preferred one anyway
      (it even may save more energy than the platform-provided sleep states
      in some cases) and the above commit doesn't help in those cases.
      For this reason, rework the system sleep state selection interface
      again (but preserve backwards compatibiliby).  Namely, add a new
      sysfs file, /sys/power/mem_sleep, that will control the system
      suspend mode triggered by writing "mem" to /sys/power/state (in
      analogy with what /sys/power/disk does for hibernation).  Make it
      select suspend-to-RAM ("deep" sleep) by default (if supported) and
      fall back to suspend-to-idle ("s2idle") otherwise and add a new
      command line argument, mem_sleep_default, allowing that default to
      be overridden if need be.
      At the same time, drop the relative_sleep_states command line
      argument that doesn't make sense any more.
      Signed-off-by: 's avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
      Tested-by: 's avatarMario Limonciello <mario.limonciello@dell.com>
  28. 24 Oct, 2016 2 commits
  29. 13 Aug, 2016 1 commit
  30. 10 Aug, 2016 1 commit
  31. 05 Apr, 2016 1 commit
  32. 21 Dec, 2015 1 commit