1. 04 Mar, 2012 5 commits
    • Rafael J. Wysocki's avatar
      PM / Sleep: Add more wakeup source initialization routines · 8671bbc1
      Rafael J. Wysocki authored
      The existing wakeup source initialization routines are not
      particularly useful for wakeup sources that aren't created by
      wakeup_source_create(), because their users have to open code
      filling the objects with zeros and setting their names.  For this
      reason, introduce routines that can be used for initializing, for
      example, static wakeup source objects.
      Requested-by: default avatarArve Hjønnevåg <arve@android.com>
      Signed-off-by: default avatarRafael J. Wysocki <rjw@sisk.pl>
      8671bbc1
    • Srivatsa S. Bhat's avatar
      PM / Hibernate: Enable usermodehelpers in hibernate() error path · 05b4877f
      Srivatsa S. Bhat authored
      If create_basic_memory_bitmaps() fails, usermodehelpers are not re-enabled
      before returning. Fix this. And while at it, reword the goto labels so that
      they look more meaningful.
      Signed-off-by: default avatarSrivatsa S. Bhat <srivatsa.bhat@linux.vnet.ibm.com>
      Cc: stable@vger.kernel.org
      Signed-off-by: default avatarRafael J. Wysocki <rjw@sisk.pl>
      05b4877f
    • Rafael J. Wysocki's avatar
      PM / Sleep: Make __pm_stay_awake() delete wakeup source timers · 4782e165
      Rafael J. Wysocki authored
      If __pm_stay_awake() is called after __pm_wakeup_event() for the same
      wakep source object before its timer expires, it won't cancel the
      timer, so the wakeup source will be deactivated from the timer
      function as scheduled by __pm_wakeup_event().  In that case
      __pm_stay_awake() doesn't have any effect beyond incrementing
      the wakeup source's event_count field, although it should cancel
      the timer and make the wakeup source stay active until __pm_relax()
      is called for it.
      
      To fix this problem make __pm_stay_awake() delete the wakeup source's
      timer and ensure that it won't be deactivated from the timer funtion
      afterwards by clearing its timer_expires field.
      Reported-by: default avatarArve Hjønnevåg <arve@android.com>
      Signed-off-by: default avatarRafael J. Wysocki <rjw@sisk.pl>
      4782e165
    • Rafael J. Wysocki's avatar
      PM / Sleep: Fix race conditions related to wakeup source timer function · da863cdd
      Rafael J. Wysocki authored
      If __pm_wakeup_event() has been used (with a nonzero timeout) to
      report a wakeup event and then __pm_relax() immediately followed by
      __pm_stay_awake() is called or __pm_wakeup_event() is called once
      again for the same wakeup source object before its timer expires, the
      timer function pm_wakeup_timer_fn() may still be run as a result of
      the previous __pm_wakeup_event() call.  In either of those cases it
      may mistakenly deactivate the wakeup source that has just been
      activated.
      
      To prevent that from happening, make wakeup_source_deactivate()
      clear the wakeup source's timer_expires field and make
      pm_wakeup_timer_fn() check if timer_expires is different from zero
      and if it's not in future before calling wakeup_source_deactivate()
      (if timer_expires is 0, it means that the timer has just been
      deleted and if timer_expires is in future, it means that the timer
      has just been rescheduled to a different time).
      Reported-by: default avatarArve Hjønnevåg <arve@android.com>
      Signed-off-by: default avatarRafael J. Wysocki <rjw@sisk.pl>
      da863cdd
    • Rafael J. Wysocki's avatar
      PM / Sleep: Fix possible infinite loop during wakeup source destruction · d94aff87
      Rafael J. Wysocki authored
      If wakeup_source_destroy() is called for an active wakeup source that
      is never deactivated, it will spin forever.  To prevent that from
      happening, make wakeup_source_destroy() call __pm_relax() for the
      wakeup source object it is about to free instead of waiting until
      it will be deactivated by someone else.  However, for this to work
      it also needs to make sure that the timer function will not be
      executed after the final __pm_relax(), so make it run
      del_timer_sync() on the wakeup source's timer beforehand.
      
      Additionally, update the kerneldoc comment to document the
      requirement that __pm_stay_awake() and __pm_wakeup_event() must not
      be run in parallel with wakeup_source_destroy().
      Reported-by: default avatarArve Hjønnevåg <arve@android.com>
      Signed-off-by: default avatarRafael J. Wysocki <rjw@sisk.pl>
      d94aff87
  2. 17 Feb, 2012 5 commits
  3. 13 Feb, 2012 3 commits
  4. 09 Feb, 2012 5 commits
  5. 04 Feb, 2012 2 commits
    • Venkatesh Pallipadi's avatar
      PM / QoS: CPU C-state breakage with PM Qos change · d020283d
      Venkatesh Pallipadi authored
      Looks like change "PM QoS: Move and rename the implementation files"
      merged during the 3.2 development cycle made PM QoS depend on
      CONFIG_PM which depends on (PM_SLEEP || PM_RUNTIME).
      
      That breaks CPU C-states with kernels not having these CONFIGs, causing CPUs
      to spend time in Polling loop idle instead of going into deep C-states,
      consuming way way more power. This is with either acpi idle or intel idle
      enabled.
      
      Either CONFIG_PM should be enabled with any pm_qos users or
      the !CONFIG_PM pm_qos_request() should return sane defaults not to break
      the existing users. Here's is the patch for the latter option.
      
      [rjw: Modified the changelog slightly.]
      Signed-off-by: default avatarVenkatesh Pallipadi <venki@google.com>
      Signed-off-by: default avatarRafael J. Wysocki <rjw@sisk.pl>
      Cc: stable@vger.kernel.org
      d020283d
    • Srivatsa S. Bhat's avatar
      PM / Freezer: Thaw only kernel threads if freezing of kernel threads fails · 379e0be8
      Srivatsa S. Bhat authored
      If freezing of kernel threads fails, we are expected to automatically
      thaw tasks in the error recovery path. However, at times, we encounter
      situations in which we would like the automatic error recovery path
      to thaw only the kernel threads, because we want to be able to do
      some more cleanup before we thaw userspace. Something like:
      
      error = freeze_kernel_threads();
      if (error) {
      	/* Do some cleanup */
      
      	/* Only then thaw userspace tasks*/
      	thaw_processes();
      }
      
      An example of such a situation is where we freeze/thaw filesystems
      during suspend/hibernation. There, if freezing of kernel threads
      fails, we would like to thaw the frozen filesystems before thawing
      the userspace tasks.
      
      So, modify freeze_kernel_threads() to thaw only kernel threads in
      case of freezing failure. And change suspend_freeze_processes()
      accordingly. (At the same time, let us also get rid of the rather
      cryptic usage of the conditional operator (:?) in that function.)
      
      [rjw: In fact, this patch fixes a regression introduced during the
       3.3 merge window, because without it thaw_processes() may be called
       before swsusp_free() in some situations and that may lead to massive
       memory allocation failures.]
      Signed-off-by: default avatarSrivatsa S. Bhat <srivatsa.bhat@linux.vnet.ibm.com>
      Acked-by: default avatarTejun Heo <tj@kernel.org>
      Acked-by: default avatarNigel Cunningham <nigel@tuxonice.net>
      Signed-off-by: default avatarRafael J. Wysocki <rjw@sisk.pl>
      379e0be8
  6. 01 Feb, 2012 1 commit
  7. 31 Jan, 2012 4 commits
    • Linus Torvalds's avatar
      Linux 3.3-rc2 · 62aa2b53
      Linus Torvalds authored
      62aa2b53
    • Linus Torvalds's avatar
      Merge tag 'for-linus' of git://github.com/prasad-joshi/logfs_upstream · d3712b9d
      Linus Torvalds authored
      There are few important bug fixes for LogFS
      
      * tag 'for-linus' of git://github.com/prasad-joshi/logfs_upstream:
        Logfs: Allow NULL block_isbad() methods
        logfs: Grow inode in delete path
        logfs: Free areas before calling generic_shutdown_super()
        logfs: remove useless BUG_ON
        MAINTAINERS: Add Prasad Joshi in LogFS maintiners
        logfs: Propagate page parameter to __logfs_write_inode
        logfs: set superblock shutdown flag after generic sb shutdown
        logfs: take write mutex lock during fsync and sync
        logfs: Prevent memory corruption
        logfs: update page reference count for pined pages
      
      Fix up conflict in fs/logfs/dev_mtd.c due to semantic change in what
      "mtd->block_isbad" means in commit f2933e86: "Logfs: Allow NULL
      block_isbad() methods" clashing with the abstraction changes in the
      commits 7086c19d: "mtd: introduce mtd_block_isbad interface" and
      d58b27ed: "logfs: do not use 'mtd->block_isbad' directly".
      
      This resolution takes the semantics from commit f2933e86, and just
      makes mtd_block_isbad() return zero (false) if the 'block_isbad'
      function is NULL.  But that also means that now "mtd_can_have_bb()"
      always returns 0.
      
      Now, "mtd_block_markbad()" will obviously return an error if the
      low-level driver doesn't support bad blocks, so this is somewhat
      non-symmetric, but it actually makes sense if a NULL "block_isbad"
      function is considered to mean "I assume that all my blocks are always
      good".
      d3712b9d
    • Linus Torvalds's avatar
      Merge branch 'hwmon-for-linus' of... · c5d2bc11
      Linus Torvalds authored
      Merge branch 'hwmon-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging
      
      * 'hwmon-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging:
        hwmon: (w83627ehf) Disable setting DC mode for pwm2, pwm3 on NCT6776F
        hwmon: (sht15) fix bad error code
        MAINTAINERS: Drop maintainer for MAX1668 hwmon driver
        MAINTAINERS: Add hwmon entries for Wolfson
        hwmon: (f71805f) Fix clamping of temperature limits
      c5d2bc11
    • Linus Torvalds's avatar
      Merge branch 'for-torvalds' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl · 8e2a2880
      Linus Torvalds authored
      Here are some fixes to the pin control system that has accumulated since
      -rc1.  Mainly Tony Lindgren fixed the module load/unload logic and the
      rest are minor fixes and documentation.
      
      * 'for-torvalds' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl:
        pinctrl: add checks for empty function names
        pinctrl: fix pinmux_hog_maps when ctrl_dev_name is not set
        pinctrl: fix some pinmux typos
        pinctrl: free debugfs entries when unloading a pinmux driver
        pinctrl: unbreak error messages
        Documentation/pinctrl: fix a few syntax errors in code examples
        pinctrl: fix pinconf_pins_show iteration
      8e2a2880
  8. 30 Jan, 2012 15 commits