1. 14 4月, 2014 1 次提交
    • X
      regmap: implement LE formatting/parsing for 16/32-bit values. · 4aa8c069
      Xiubo Li 提交于
      Allow busses to request little endianness formatting and
      parsing for 16- and 32-bit values. This will be useful to
      support regmap-mmio.
      
      For the following the scenarios using the regmap-mmio,
      for example:
      
      Index    CPU       Device     Endianess flag for values
      ----------------------------------------------------------
      1        LE        LE         REGMAP_ENDIAN_DEFAULT/NATIVE
      2        LE        BE         REGMAP_ENDIAN_BIG
      3        BE        BE         REGMAP_ENDIAN_DEFAULT/NATIVE
      4        BE        LE         REGMAP_ENDIAN_LITTLE
      
      For one device driver, which will support all the cases above,
      needs two boolean properties in DT node like: 'big-endian'
      for case 2 and 'little-endian' for case 4, and for cases 1
      and 3 they all will be absent.
      Signed-off-by: NXiubo Li <Li.Xiubo@freescale.com>
      Signed-off-by: NMark Brown <broonie@linaro.org>
      4aa8c069
  2. 07 4月, 2014 1 次提交
  3. 01 4月, 2014 1 次提交
  4. 28 3月, 2014 1 次提交
  5. 27 3月, 2014 2 次提交
  6. 26 3月, 2014 2 次提交
  7. 20 3月, 2014 1 次提交
    • S
      drivers/base/topology.c: Fix CPU hotplug callback registration · e12b7111
      Srivatsa S. Bhat 提交于
      Subsystems that want to register CPU hotplug callbacks, as well as perform
      initialization for the CPUs that are already online, often do it as shown
      below:
      
      	get_online_cpus();
      
      	for_each_online_cpu(cpu)
      		init_cpu(cpu);
      
      	register_cpu_notifier(&foobar_cpu_notifier);
      
      	put_online_cpus();
      
      This is wrong, since it is prone to ABBA deadlocks involving the
      cpu_add_remove_lock and the cpu_hotplug.lock (when running concurrently
      with CPU hotplug operations).
      
      Instead, the correct and race-free way of performing the callback
      registration is:
      
      	cpu_notifier_register_begin();
      
      	for_each_online_cpu(cpu)
      		init_cpu(cpu);
      
      	/* Note the use of the double underscored version of the API */
      	__register_cpu_notifier(&foobar_cpu_notifier);
      
      	cpu_notifier_register_done();
      
      Fix the topology code by using this latter form of callback registration.
      
      Cc: Ingo Molnar <mingo@kernel.org>
      Acked-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      Signed-off-by: NSrivatsa S. Bhat <srivatsa.bhat@linux.vnet.ibm.com>
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      e12b7111
  8. 19 3月, 2014 2 次提交
  9. 18 3月, 2014 2 次提交
  10. 14 3月, 2014 1 次提交
  11. 12 3月, 2014 1 次提交
  12. 11 3月, 2014 1 次提交
  13. 10 3月, 2014 1 次提交
  14. 09 3月, 2014 2 次提交
    • X
      numa: fix NULL pointer access and memory leak in unregister_one_node() · 92d585ef
      Xishi Qiu 提交于
      When doing socket hot remove, "node_devices[nid]" is set to NULL;
      acpi_processor_remove()
      	try_offline_node()
      		unregister_one_node()
      
      Then hot add a socket, but do not echo 1 > /sys/devices/system/cpu/cpuXX/online,
      so register_one_node() will not be called, and "node_devices[nid]"
      is still NULL.
      
      If doing socket hot remove again, NULL pointer access will be happen.
      unregister_one_node()
      	unregister_node()
      
      Another, we should free the memory used by "node_devices[nid]" in
      unregister_one_node().
      Signed-off-by: NXishi Qiu <qiuxishi@huawei.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      92d585ef
    • R
      Revert "driver core: synchronize device shutdown" · aa0689b3
      Roland Dreier 提交于
      This reverts commit 401097ea.  The
      original changelog said:
      
          A patch series to make .shutdown execute asynchronously.  Some drivers's
          shutdown can take a lot of time.  The patches can help save some shutdown
          time.  The patches use Arjan's async API.
      
          This patch:
      
          synchronize all tasks submitted by .shutdown
      
      However, I'm not able to find any evidence that any other patches from
      this series were applied, nor am I able to find any async tasks that are
      scheduled in a .shutdown context.
      
      On the other hand, we see occasional hangs on shutdown that appear to be
      caused by the async_synchronize_full() in device_shutdown() waiting
      forever for the async probing in sd if a SCSI disk shows up at just the
      wrong time — the system starts the probe, but begins shutting down and
      tears down too much of the SCSI driver to finish the probe.
      
      If we had any async shutdown tasks, I guess the right fix would be to
      create a "shutdown" async domain and have device_shutdown() only wait
      for that domain.  But since there apparently are no async shutdown
      tasks, we can just revert the waiting.
      Signed-off-by: NRoland Dreier <roland@purestorage.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      aa0689b3
  15. 06 3月, 2014 2 次提交
    • V
      cpufreq: suspend governors on system suspend/hibernate · 2f0aea93
      Viresh Kumar 提交于
      This patch adds cpufreq suspend/resume calls to dpm_{suspend|resume}()
      for handling suspend/resume of cpufreq governors.
      
      Lan Tianyu (Intel) & Jinhyuk Choi (Broadcom) found an issue where the
      tunables configuration for clusters/sockets with non-boot CPUs was
      lost after system suspend/resume, as we were notifying governors with
      CPUFREQ_GOV_POLICY_EXIT on removal of the last CPU for that policy
      which caused the tunables memory to be freed.
      
      This is fixed by preventing any governor operations from being
      carried out between the device suspend and device resume stages of
      system suspend and resume, respectively.
      
      We could have added these callbacks at dpm_{suspend|resume}_noirq()
      level, but there is an additional problem that the majority of I/O
      devices is already suspended at that point and if cpufreq drivers
      want to change the frequency before suspending, then that not be
      possible on some platforms (which depend on peripherals like i2c,
      regulators, etc).
      Reported-and-tested-by: NLan Tianyu <tianyu.lan@intel.com>
      Reported-by: NJinhyuk Choi <jinchoi@broadcom.com>
      Signed-off-by: NViresh Kumar <viresh.kumar@linaro.org>
      [rjw: Changelog]
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      2f0aea93
    • N
      regmap: add regmap_parse_val api · 13ff50c8
      Nenghua Cao 提交于
          In some cases, we need regmap's format parse_val function
      to do be/le translation according to the bus configuration.
      For example, snd_soc_bytes_put() uses regmap to write/read values,
      and use cpu_to_be() directly to covert MASK into big endian. This
      is a defect, and should use regmap's format function to do it according
      to bus configuration.
      Signed-off-by: NNenghua Cao <nhcao@marvell.com>
      Signed-off-by: NMark Brown <broonie@linaro.org>
      13ff50c8
  16. 02 3月, 2014 2 次提交
    • U
      PM: Add pm_runtime_suspend|resume_force functions · 37f20416
      Ulf Hansson 提交于
      This patch provides two new runtime PM helper functions which intend to
      be used from system suspend/resume callbacks, to make sure devices are
      put into low power state during system suspend and brought back to full
      power at system resume.
      
      The prerequisite is to have all levels of a device's runtime PM
      callbacks to be defined through the SET_PM_RUNTIME_PM_OPS macro, which
      means these are available for CONFIG_PM.
      
      By using the new runtime PM helper functions especially the two
      scenarios below will be addressed.
      
      1) The PM core prevents .runtime_suspend callbacks from being invoked
      during system suspend. That means even for a runtime PM centric
      subsystem and driver, the device needs to be put into low power state
      from a system suspend callback. Otherwise it may very well be left in
      full power state (runtime resumed) while the system is suspended. By
      using the new helper functions, we make sure to walk the hierarchy of
      a device's power domain, subsystem and driver.
      
      2) Subsystems and drivers need to cope with all the combinations of
      CONFIG_PM_SLEEP and CONFIG_PM_RUNTIME. The two new helper functions
      smothly addresses this.
      Signed-off-by: NUlf Hansson <ulf.hansson@linaro.org>
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      37f20416
    • U
      PM / runtime: Fetch runtime PM callbacks using a macro · 5f59df79
      Ulf Hansson 提交于
      While fetching the proper runtime PM callback, we walk the hierarchy of
      device's power domains, subsystems and drivers.
      
      This is common for rpm_suspend(), rpm_idle() and rpm_resume(). Let's
      clean up the code by using a macro that handles this.
      Signed-off-by: NUlf Hansson <ulf.hansson@linaro.org>
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      5f59df79
  17. 01 3月, 2014 1 次提交
  18. 26 2月, 2014 4 次提交
  19. 22 2月, 2014 2 次提交
  20. 20 2月, 2014 6 次提交
  21. 19 2月, 2014 3 次提交
  22. 16 2月, 2014 1 次提交