1. 15 1月, 2014 2 次提交
    • B
      PM / clock_ops: check return of clk_enable() in pm_clk_resume() · afdd3ab3
      Ben Dooks 提交于
      The clk_enable() call in the pm_clk_resume() call returns an error
      that is not being checked. If clk_enable() fails then we should
      not set the state of the clock to PCE_STATUS_ENABLED.
      
      Note, the issue of warning the user if this fails has not been
      addressed in this patch as this is not the only place the driver
      calls clk_enable().
      Signed-off-by: NBen Dooks <ben.dooks@codethink.co.uk>
      Reviewed-by: NIan Molton <ian.molton@codethink.co.uk>
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      afdd3ab3
    • B
      PM / clock_ops: fix up clk prepare/unprepare count · 8a6720ec
      Ben Dooks 提交于
      The drivers/base/power/clock_ops.c file is causing warnings from
      the clock driver (as shown below) due to failing to do a clk_prepare()
      call before enabling a clock. It also fails to check the balance of
      prepare/unprepare as __pm_clk_remove() do clk_disable_unprepare() call.
      
      This bug has probably been in since commit b2476490 ("clk: introduce
      the common clock framework") as the warning was part of the original
      commit. It is strange that it has not been noticed (although this has
      also been coupled with a failure for certain SH builds to not build the
      necessary glue to use this method of controlling the clocks).
      
      In summary, this is probably needed in several stable branches but need
      advice on which ones.
      
      On the Renesas Lager board, this causes numerous warnings of the following
      and even worse the clock system will not enable clocks, causing drivers
      that are in development to fail to work:
      
      WARNING: CPU: 0 PID: 1 at drivers/clk/clk.c:883 __clk_enable+0x2c/0xa0()
      Signed-off-by: NBen Dooks <ben.dooks@codethink.co.uk>
      Reviewed-by: NIan Molton <ian.molton@codethink.co.uk>
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      8a6720ec
  2. 08 12月, 2013 1 次提交
  3. 28 11月, 2013 1 次提交
  4. 26 11月, 2013 1 次提交
  5. 21 11月, 2013 1 次提交
  6. 15 11月, 2013 2 次提交
    • W
      tree-wide: use reinit_completion instead of INIT_COMPLETION · 16735d02
      Wolfram Sang 提交于
      Use this new function to make code more comprehensible, since we are
      reinitialzing the completion, not initializing.
      
      [akpm@linux-foundation.org: linux-next resyncs]
      Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
      Acked-by: Linus Walleij <linus.walleij@linaro.org> (personally at LCE13)
      Cc: Ingo Molnar <mingo@kernel.org>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      16735d02
    • R
      ACPI / driver core: Store an ACPI device pointer in struct acpi_dev_node · 7b199811
      Rafael J. Wysocki 提交于
      Modify struct acpi_dev_node to contain a pointer to struct acpi_device
      associated with the given device object (that is, its ACPI companion
      device) instead of an ACPI handle corresponding to it.  Introduce two
      new macros for manipulating that pointer in a CONFIG_ACPI-safe way,
      ACPI_COMPANION() and ACPI_COMPANION_SET(), and rework the
      ACPI_HANDLE() macro to take the above changes into account.
      Drop the ACPI_HANDLE_SET() macro entirely and rework its users to
      use ACPI_COMPANION_SET() instead.  For some of them who used to
      pass the result of acpi_get_child() directly to ACPI_HANDLE_SET()
      introduce a helper routine acpi_preset_companion() doing an
      equivalent thing.
      
      The main motivation for doing this is that there are things
      represented by struct acpi_device objects that don't have valid
      ACPI handles (so called fixed ACPI hardware features, such as
      power and sleep buttons) and we would like to create platform
      device objects for them and "glue" them to their ACPI companions
      in the usual way (which currently is impossible due to the
      lack of valid ACPI handles).  However, there are more reasons
      why it may be useful.
      
      First, struct acpi_device pointers allow of much better type checking
      than void pointers which are ACPI handles, so it should be more
      difficult to write buggy code using modified struct acpi_dev_node
      and the new macros.  Second, the change should help to reduce (over
      time) the number of places in which the result of ACPI_HANDLE() is
      passed to acpi_bus_get_device() in order to obtain a pointer to the
      struct acpi_device associated with the given "physical" device,
      because now that pointer is returned by ACPI_COMPANION() directly.
      Finally, the change should make it easier to write generic code that
      will build both for CONFIG_ACPI set and unset without adding explicit
      compiler directives to it.
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      Acked-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      Tested-by: Mika Westerberg <mika.westerberg@linux.intel.com> # on Haswell
      Reviewed-by: NMika Westerberg <mika.westerberg@linux.intel.com>
      Reviewed-by: Aaron Lu <aaron.lu@intel.com> # for ATA and SDIO part
      7b199811
  7. 14 11月, 2013 1 次提交
  8. 12 11月, 2013 1 次提交
  9. 09 11月, 2013 2 次提交
    • J
      locks: break delegations on any attribute modification · 27ac0ffe
      J. Bruce Fields 提交于
      NFSv4 uses leases to guarantee that clients can cache metadata as well
      as data.
      
      Cc: Mikulas Patocka <mikulas@artax.karlin.mff.cuni.cz>
      Cc: David Howells <dhowells@redhat.com>
      Cc: Tyler Hicks <tyhicks@canonical.com>
      Cc: Dustin Kirkland <dustin.kirkland@gazzang.com>
      Acked-by: NJeff Layton <jlayton@redhat.com>
      Signed-off-by: NJ. Bruce Fields <bfields@redhat.com>
      Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
      27ac0ffe
    • J
      locks: break delegations on unlink · b21996e3
      J. Bruce Fields 提交于
      We need to break delegations on any operation that changes the set of
      links pointing to an inode.  Start with unlink.
      
      Such operations also hold the i_mutex on a parent directory.  Breaking a
      delegation may require waiting for a timeout (by default 90 seconds) in
      the case of a unresponsive NFS client.  To avoid blocking all directory
      operations, we therefore drop locks before waiting for the delegation.
      The logic then looks like:
      
      	acquire locks
      	...
      	test for delegation; if found:
      		take reference on inode
      		release locks
      		wait for delegation break
      		drop reference on inode
      		retry
      
      It is possible this could never terminate.  (Even if we take precautions
      to prevent another delegation being acquired on the same inode, we could
      get a different inode on each retry.)  But this seems very unlikely.
      
      The initial test for a delegation happens after the lock on the target
      inode is acquired, but the directory inode may have been acquired
      further up the call stack.  We therefore add a "struct inode **"
      argument to any intervening functions, which we use to pass the inode
      back up to the caller in the case it needs a delegation synchronously
      broken.
      
      Cc: David Howells <dhowells@redhat.com>
      Cc: Tyler Hicks <tyhicks@canonical.com>
      Cc: Dustin Kirkland <dustin.kirkland@gazzang.com>
      Acked-by: NJeff Layton <jlayton@redhat.com>
      Signed-off-by: NJ. Bruce Fields <bfields@redhat.com>
      Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
      b21996e3
  10. 08 11月, 2013 1 次提交
  11. 29 10月, 2013 1 次提交
  12. 26 10月, 2013 3 次提交
  13. 25 10月, 2013 1 次提交
  14. 24 10月, 2013 1 次提交
  15. 22 10月, 2013 1 次提交
    • Y
      regmap: irq: clear status when disable irq · 4bd7145b
      Yi Zhang 提交于
      clear the status bit if the mask register doesn't prevent
      the chip level irq from being asserted
      
      OR in the following sequence, there will be irq storm happens:
      1) interrupt is triggered;
      2) another thread disables it(the mask bit is set);
      3) _Then_ the interrupt thread is not ACKed(the status bit is not cleared),
         and it's ignored;
      4) if the irq is still asserted because of the uncleared status bit,
         the irq storm happens;
      Signed-off-by: NYi Zhang <yizhang@marvell.com>
      Signed-off-by: NMark Brown <broonie@linaro.org>
      4bd7145b
  16. 18 10月, 2013 1 次提交
    • B
      PM / Sleep: Detect device suspend/resume lockup and log event · 70fea60d
      Benoit Goby 提交于
      Rather than hard-lock the kernel, dump the suspend/resume thread stack
      and panic() to capture a message in pstore when a driver takes too long
      to suspend/resume. Default suspend/resume watchdog timeout is set to 12
      seconds to be longer than the usbhid 10 second timeout, but could be
      changed at compile time.
      
      Exclude from the watchdog the time spent waiting for children that
      are resumed asynchronously and time every device, whether or not they
      resumed synchronously.
      
      This patch is targeted for mobile devices where a suspend/resume lockup
      could cause a system reboot. Information about failing device can be
      retrieved in subsequent boot session by mounting pstore and inspecting
      the log. Laptops with EFI-enabled pstore could also benefit from
      this feature.
      
      The hardware watchdog timer is likely suspended during this time and
      couldn't be relied upon. The soft-lockup detector would eventually tell
      that tasks are not scheduled, but would provide little context as to why.
      The patch hence uses system timer and assumes it is still active while the
      devices are suspended/resumed.
      
      This feature can be enabled/disabled during kernel configuration.
      
      This change is based on earlier work by San Mehat.
      Signed-off-by: NBenoit Goby <benoit@android.com>
      Signed-off-by: NZoran Markovic <zoran.markovic@linaro.org>
      Acked-by: NUlf Hansson <ulf.hansson@linaro.org>
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      70fea60d
  17. 17 10月, 2013 3 次提交
  18. 16 10月, 2013 1 次提交
  19. 15 10月, 2013 2 次提交
  20. 14 10月, 2013 2 次提交
  21. 11 10月, 2013 2 次提交
  22. 10 10月, 2013 1 次提交
    • A
      regmap: Fix regmap_bulk_write single-rw mutex deadlock · 4174a7a4
      Anthony Olech 提交于
      When regmap_bulk_write() is called with the map->use_single_rw flag set
      an immediate mutex deadlock happens because regmap_raw_write() is called
      after obtaining the mutex and regmap_raw_write() itself then tries to
      obtain the mutex as well.
      
      It is obvious that no one other than myself tried it with a real device.
      I did, but only for the purposes of an experiment and demonstration.
      
      But even if this situation will never ever happen with a real device, it
      is a bug and therefore should be fixed.
      Signed-off-by: NAnthony Olech <anthony.olech.opensource@diasemi.com>
      Signed-off-by: NMark Brown <broonie@linaro.org>
      4174a7a4
  23. 09 10月, 2013 3 次提交
  24. 08 10月, 2013 1 次提交
  25. 06 10月, 2013 2 次提交
  26. 01 10月, 2013 1 次提交
    • T
      hotplug, powerpc, x86: Remove cpu_hotplug_driver_lock() · 6dedcca6
      Toshi Kani 提交于
      cpu_hotplug_driver_lock() serializes CPU online/offline operations
      when ARCH_CPU_PROBE_RELEASE is set.  This lock interface is no longer
      necessary with the following reason:
      
       - lock_device_hotplug() now protects CPU online/offline operations,
         including the probe & release interfaces enabled by
         ARCH_CPU_PROBE_RELEASE.  The use of cpu_hotplug_driver_lock() is
         redundant.
       - cpu_hotplug_driver_lock() is only valid when ARCH_CPU_PROBE_RELEASE
         is defined, which is misleading and is only enabled on powerpc.
      
      This patch removes the cpu_hotplug_driver_lock() interface.  As
      a result, ARCH_CPU_PROBE_RELEASE only enables / disables the cpu
      probe & release interface as intended.  There is no functional change
      in this patch.
      Signed-off-by: NToshi Kani <toshi.kani@hp.com>
      Reviewed-by: NNathan Fontenot <nfont@linux.vnet.ibm.com>
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      6dedcca6
  27. 29 9月, 2013 1 次提交