1. 17 Mar, 2012 2 commits
  2. 16 Mar, 2012 9 commits
    • Rafael J. Wysocki's avatar
      Merge branch 'pm-domains' · 62dc7c02
      Rafael J. Wysocki authored
      * pm-domains:
        PM / shmobile: Make MTU2 driver use pm_genpd_dev_always_on()
        PM / shmobile: Make CMT driver use pm_genpd_dev_always_on()
        PM / shmobile: Make TMU driver use pm_genpd_dev_always_on()
        PM / Domains: Introduce "always on" device flag
        PM / Domains: Fix hibernation restore of devices, v2
        PM / Domains: Fix handling of wakeup devices during system resume
      62dc7c02
    • Rafael J. Wysocki's avatar
      Merge branch 'pm-sleep' · cf3bbcaf
      Rafael J. Wysocki authored
      * pm-sleep:
        PM / Sleep: JBD and JBD2 missing set_freezable()
      cf3bbcaf
    • Rafael J. Wysocki's avatar
      Merge branch 'pm-qos' · 59fb53ea
      Rafael J. Wysocki authored
      * pm-qos:
        sh_mmcif / PM: Use PM QoS latency constraint
        tmio_mmc / PM: Use PM QoS latency constraint
        PM / QoS: Make it possible to expose PM QoS latency constraints
      59fb53ea
    • Rafael J. Wysocki's avatar
      PM / shmobile: Make MTU2 driver use pm_genpd_dev_always_on() · 57d13370
      Rafael J. Wysocki authored
      Make the MTU2 clocksource driver mark its device as "always on"
      using pm_genpd_dev_always_on() to protect it from surprise power
      removals.
      Signed-off-by: default avatarRafael J. Wysocki <rjw@sisk.pl>
      Tested-by: default avatarSimon Horman <horms@verge.net.au>
      Acked-by: default avatarPaul Mundt <lethal@linux-sh.org>
      Cc: stable@vger.kernel.org
      57d13370
    • Rafael J. Wysocki's avatar
      PM / shmobile: Make CMT driver use pm_genpd_dev_always_on() · 615a445f
      Rafael J. Wysocki authored
      Make the CMT clocksource driver mark its device as "always on"
      using pm_genpd_dev_always_on() to protect it from surprise power
      removals.
      Signed-off-by: default avatarRafael J. Wysocki <rjw@sisk.pl>
      Tested-by: default avatarSimon Horman <horms@verge.net.au>
      Acked-by: default avatarPaul Mundt <lethal@linux-sh.org>
      Cc: stable@vger.kernel.org
      615a445f
    • Rafael J. Wysocki's avatar
      PM / shmobile: Make TMU driver use pm_genpd_dev_always_on() · 2ee619f9
      Rafael J. Wysocki authored
      Make the TMU clocksource driver mark its device as "always on"
      using pm_genpd_dev_always_on() to protect it from surprise power
      removals and make sh7372_add_standard_devices() add TMU devices on
      sh7372 to the A4R power domain so that their "always on" flags
      are taken into account as appropriate.
      Signed-off-by: default avatarRafael J. Wysocki <rjw@sisk.pl>
      Tested-by: default avatarSimon Horman <horms@verge.net.au>
      Acked-by: default avatarPaul Mundt <lethal@linux-sh.org>
      Cc: stable@vger.kernel.org
      2ee619f9
    • Rafael J. Wysocki's avatar
      PM / Domains: Introduce "always on" device flag · 1e78a0c7
      Rafael J. Wysocki authored
      The TMU device on the Mackerel board belongs to the A4R power domain
      and loses power when the domain is turned off.  Unfortunately, the
      TMU driver is not prepared to cope with such situations and crashes
      the system when that happens.  To work around this problem introduce
      a new helper function, pm_genpd_dev_always_on(), allowing a device
      driver to mark its device as "always on" in case it belongs to a PM
      domain, which will make the generic PM domains core code avoid
      powering off the domain containing the device, both at run time and
      during system suspend.
      Signed-off-by: default avatarRafael J. Wysocki <rjw@sisk.pl>
      Tested-by: default avatarSimon Horman <horms@verge.net.au>
      Acked-by: default avatarPaul Mundt <lethal@linux-sh.org>
      Cc: stable@vger.kernel.org
      1e78a0c7
    • Rafael J. Wysocki's avatar
      PM / Domains: Fix hibernation restore of devices, v2 · 65533bbf
      Rafael J. Wysocki authored
      During resume from hibernation pm_genpd_restore_noirq() should only
      power off domains whose suspend_power_off flags are set once and
      not every time it is called for a device in the given domain.
      Moreover, it shouldn't decrement genpd->suspended_count, because
      that field is not touched during device freezing and therefore it is
      always equal to 0 when pm_genpd_restore_noirq() runs for the first
      device in the given domain.
      
      This means pm_genpd_restore_noirq() may use genpd->suspended_count
      to determine whether or not it it has been called for the domain in
      question already in this cycle (it only needs to increment that
      field every time it runs for this purpose) and whether or not it
      should check if the domain needs to be powered off.  For that to
      work, though, pm_genpd_prepare() has to clear genpd->suspended_count
      when it runs for the first device in the given domain (in which case
      that flag need not be cleared during domain initialization).
      Signed-off-by: default avatarRafael J. Wysocki <rjw@sisk.pl>
      Cc: stable@vger.kernel.org
      65533bbf
    • Rafael J. Wysocki's avatar
      PM / Domains: Fix handling of wakeup devices during system resume · cc85b207
      Rafael J. Wysocki authored
      During system suspend pm_genpd_suspend_noirq() checks if the given
      device is in a wakeup path (i.e. it appears to be needed for one or
      more wakeup devices to work or is a wakeup device itself) and if it
      needs to be "active" for wakeup to work.  If that is the case, the
      function returns 0 without incrementing the device domain's counter
      of suspended devices and without executing genpd_stop_dev() for the
      device.  In consequence, the device is not stopped (e.g. its clock
      isn't disabled) and power is always supplied to its domain in the
      resulting system sleep state.
      
      However, pm_genpd_resume_noirq() doesn't repeat that check and it
      runs genpd_start_dev() and decrements the domain's counter of
      suspended devices even for the wakeup device that weren't stopped by
      pm_genpd_suspend_noirq().  As a result, the start callback may be run
      unnecessarily for them and their domains' counters of suspended
      devices may become negative.  Both outcomes aren't desirable, so fix
      pm_genpd_resume_noirq() to look for wakeup devices that might not be
      stopped by during system suspend.
      Signed-off-by: default avatarRafael J. Wysocki <rjw@sisk.pl>
      Tested-by: default avatarSimon Horman <horms@verge.net.au>
      Cc: stable@vger.kernel.org
      cc85b207
  3. 13 Mar, 2012 4 commits
  4. 04 Mar, 2012 14 commits
    • Rafael J. Wysocki's avatar
      Merge branch 'pm-qos' · ed819e3b
      Rafael J. Wysocki authored
      * pm-qos:
        PM / QoS: unconditionally build the feature
        PM / QoS: Simplify PM QoS expansion/merge
      ed819e3b
    • Rafael J. Wysocki's avatar
      Merge branch 'pm-domains' · 48ed0003
      Rafael J. Wysocki authored
      * pm-domains:
        PM / Domains: Fix include for PM_GENERIC_DOMAINS=n case
        PM / Domains: Provide a dummy dev_gpd_data() when generic domains are not used
        PM / Domains: Run late/early device suspend callbacks at the right time
        ARM: EXYNOS: Hook up power domains to generic power domain infrastructure
        PM / Domains: Add OF support
      48ed0003
    • Rafael J. Wysocki's avatar
      Merge branch 'pm-sleep' · 643161ac
      Rafael J. Wysocki authored
      * pm-sleep:
        PM / Freezer: Remove references to TIF_FREEZE in comments
        PM / Sleep: Add more wakeup source initialization routines
        PM / Hibernate: Enable usermodehelpers in hibernate() error path
        PM / Sleep: Make __pm_stay_awake() delete wakeup source timers
        PM / Sleep: Fix race conditions related to wakeup source timer function
        PM / Sleep: Fix possible infinite loop during wakeup source destruction
        PM / Hibernate: print physical addresses consistently with other parts of kernel
        PM: Add comment describing relationships between PM callbacks to pm.h
        PM / Sleep: Drop suspend_stats_update()
        PM / Sleep: Make enter_state() in kernel/power/suspend.c static
        PM / Sleep: Unify kerneldoc comments in kernel/power/suspend.c
        PM / Sleep: Remove unnecessary label from suspend_freeze_processes()
        PM / Sleep: Do not check wakeup too often in try_to_freeze_tasks()
        PM / Sleep: Initialize wakeup source locks in wakeup_source_add()
        PM / Hibernate: Refactor and simplify freezer_test_done
        PM / Hibernate: Thaw kernel threads in hibernation_snapshot() in error/test path
        PM / Freezer / Docs: Document the beauty of freeze/thaw semantics
        PM / Suspend: Avoid code duplication in suspend statistics update
        PM / Sleep: Introduce generic callbacks for new device PM phases
        PM / Sleep: Introduce "late suspend" and "early resume" of devices
      643161ac
    • Rafael J. Wysocki's avatar
      Merge branch 'pm-devfreq' · 743c5bc2
      Rafael J. Wysocki authored
      * pm-devfreq:
        PM / devfreq: add min/max_freq limit requested by users.
        PM / devfreq: fixed syntax errors.
        devfreq: Remove MODULE_ALIAS for exynos4 busfreq driver
        devfreq: exynos4_bus: Use dev_get_drvdata at appropriate places
      743c5bc2
    • Magnus Damm's avatar
      PM / Domains: Fix include for PM_GENERIC_DOMAINS=n case · b642631d
      Magnus Damm authored
      Fix pm_genpd_init() arguments and make sure dev_gpd_data() and
      simple_qos_governor exist regardless of CONFIG_PM_GENERIC_DOMAINS
      setting.
      Signed-off-by: default avatarMagnus Damm <damm@opensource.se>
      Signed-off-by: default avatarRafael J. Wysocki <rjw@sisk.pl>
      b642631d
    • Marcos Paulo de Souza's avatar
      PM / Freezer: Remove references to TIF_FREEZE in comments · 37f08be1
      Marcos Paulo de Souza authored
      This patch removes all the references in the code about the TIF_FREEZE
      flag removed by commit a3201227
      
          freezer: make freezing() test freeze conditions in effect instead of TIF_FREEZE
      
      There still are some references to TIF_FREEZE in
      Documentation/power/freezing-of-tasks.txt, but it looks like that
      documentation needs more thorough work to reflect how the new
      freezer works, and hence merely removing the references to TIF_FREEZE
      won't really help. So I have not touched that part in this patch.
      Suggested-by: default avatarSrivatsa S. Bhat <srivatsa.bhat@linux.vnet.ibm.com>
      Signed-off-by: default avatarMarcos Paulo de Souza <marcos.mage@gmail.com>
      Signed-off-by: default avatarRafael J. Wysocki <rjw@sisk.pl>
      37f08be1
    • 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
    • Linus Torvalds's avatar
      Linux 3.3-rc6 · 192cfd58
      Linus Torvalds authored
      192cfd58
    • Linus Torvalds's avatar
      Merge tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-rc-fixes-2.6 · 8482a0ab
      Linus Torvalds authored
      SCSI fixes from James Bottomley:
       "There's just a single fix in here: the osd max device number fix."
      
      * tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-rc-fixes-2.6:
        [SCSI] osd_uld: Bump MAX_OSD_DEVICES from 64 to 1,048,576
      8482a0ab
    • Linus Torvalds's avatar
      Merge tag 'parisc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/parisc-2.6 · 233ba2c5
      Linus Torvalds authored
      PARISC fixes from James Bottomley:
       "This is a set of build fixes to get the cross compiled architecture
        testbeds building again"
      
      * tag 'parisc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/parisc-2.6:
        [PARISC] don't unconditionally override CROSS_COMPILE for 64 bit.
        [PARISC] include <linux/prefetch.h> in drivers/parisc/iommu-helpers.h
        [PARISC] fix compile break caused by iomap: make IOPORT/PCI mapping functions conditional
      233ba2c5
  5. 03 Mar, 2012 3 commits
  6. 02 Mar, 2012 8 commits
    • Linus Torvalds's avatar
      Merge tag 'hwmon-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging · 62d222b8
      Linus Torvalds authored
      hhwmon fixes for 3.3-rc6 from Guenter Roeck:
      
      These patches are necessary for correct operation and management of
      F75387.
      
      * tag 'hwmon-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging:
        hwmon: (f75375s) Catch some attempts to write to r/o registers
        hwmon: (f75375s) Properly map the F75387 automatic modes to pwm_enable
        hwmon: (f75375s) Make pwm*_mode writable for the F75387
        hwmon: (f75375s) Fix writes to the pwm* attribute for the F75387
      62d222b8
    • Linus Torvalds's avatar
      Merge tag 'fbdev-fixes-for-3.3-2' of git://github.com/schandinat/linux-2.6 · d085a09c
      Linus Torvalds authored
      fbdev fixes for 3.3 from Florian Tobias Schandinat
      
      It includes:
       - two fixes for OMAP HDMI
       - one fix to make new OMAP functions behave as they are supposed to
       - one Kconfig dependency fix
       - two fixes for viafb for modesetting on VX900 hardware
      
      * tag 'fbdev-fixes-for-3.3-2' of git://github.com/schandinat/linux-2.6:
        OMAPDSS: APPLY: make ovl_enable/disable synchronous
        OMAPDSS: panel-dvi: Add Kconfig dependency on I2C
        viafb: fix IGA1 modesetting on VX900
        viafb: select HW scaling on VX900 for IGA2
        OMAPDSS: HDMI: hot plug detect fix
        OMAPDSS: HACK: Ensure DSS clock domain gets out of idle when HDMI is enabled
      d085a09c
    • Linus Torvalds's avatar
      Merge tag 'sound-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound · 5e8063d7
      Linus Torvalds authored
      sound fixes for 3.3-rc6 from Takashi Iwai
      
      This contains again regression fixes for various HD-audio and ASoC
      regarding SSI and dapm shutdown path.  In addition, a minor azt3328
      fix and the correction of the new jack-notification strings in HD-audio.
      
      * tag 'sound-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound:
        ALSA: hda - Kill hyphenated names
        ALSA: hda - Add a fake mute feature
        ALSA: hda - Always set HP pin in unsol handler for STAC/IDT codecs
        ALSA: azt3328 - Fix NULL ptr dereference on cards without OPL3
        ALSA: hda/realtek - Fix resume of multiple input sources
        ASoC: i.MX SSI: Fix DSP_A format.
        ASoC: dapm: Check for bias level when powering down
      5e8063d7
    • Linus Torvalds's avatar
      vfs: split up name hashing in link_path_walk() into helper function · 200e9ef7
      Linus Torvalds authored
      The code in link_path_walk() that finds out the length and the hash of
      the next path component is some of the hottest code in the kernel.  And
      I have a version of it that does things at the full width of the CPU
      wordsize at a time, but that means that we *really* want to split it up
      into a separate helper function.
      
      So this re-organizes the code a bit and splits the hashing part into a
      helper function called "hash_name()".  It returns the length of the
      pathname component, while at the same time computing and writing the
      hash to the appropriate location.
      
      The code generation is slightly changed by this patch, but generally for
      the better - and the added abstraction actually makes the code easier to
      read too.  And the new interface is well suited for replacing just the
      "hash_name()" function with alternative implementations.
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      200e9ef7
    • Linus Torvalds's avatar
      vfs: clarify and clean up dentry_cmp() · 5707c87f
      Linus Torvalds authored
      It did some odd things for unclear reasons.  As this is one of the
      functions that gets changed when doing word-at-a-time compares, this is
      yet another of the "don't change any semantics, but clean things up so
      that subsequent patches don't get obscured by the cleanups".
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      5707c87f
    • Linus Torvalds's avatar
      vfs: uninline full_name_hash() · 0145acc2
      Linus Torvalds authored
      .. and also use it in lookup_one_len() rather than open-coding it.
      
      There aren't any performance-critical users, so inlining it is silly.
      But it wouldn't matter if it wasn't for the fact that the word-at-a-time
      dentry name patches want to conditionally replace the function, and
      uninlining it sets the stage for that.
      
      So again, this is a preparatory patch that doesn't change any semantics,
      and only prepares for a much cleaner and testable word-at-a-time dentry
      name accessor patch.
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      0145acc2
    • Linus Torvalds's avatar
      vfs: trivial __d_lookup_rcu() cleanups · 8966be90
      Linus Torvalds authored
      These don't change any semantics, but they clean up the code a bit and
      mark some arguments appropriately 'const'.
      
      They came up as I was doing the word-at-a-time dcache name accessor
      code, and cleaning this up now allows me to send out a smaller relevant
      interesting patch for the experimental stuff.
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      8966be90
    • Nikolaus Schulz's avatar
      hwmon: (f75375s) Catch some attempts to write to r/o registers · 15d1ad0c
      Nikolaus Schulz authored
      It makes no sense to attempt to manually configure the fan in auto mode,
      or set the duty cycle directly in closed loop mode.  The corresponding
      registers are then read-only.  If the user tries it nonetheless, error out
      with EINVAL instead of silently doing nothing.
      Signed-off-by: default avatarNikolaus Schulz <mail@microschulz.de>
      [guenter.roeck@ericsson.com: Minor formatting cleanup]
      Signed-off-by: default avatarGuenter Roeck <guenter.roeck@ericsson.com>
      15d1ad0c