1. 07 2月, 2012 2 次提交
  2. 31 1月, 2012 2 次提交
  3. 30 1月, 2012 1 次提交
  4. 28 1月, 2012 1 次提交
  5. 27 1月, 2012 1 次提交
  6. 26 1月, 2012 1 次提交
  7. 20 1月, 2012 1 次提交
  8. 14 1月, 2012 2 次提交
  9. 13 1月, 2012 2 次提交
    • D
      dma-buf: drop option text so users don't select it. · 3b32a592
      Dave Airlie 提交于
      This is going to be used by other subsystems so they should select it.
      Signed-off-by: NDave Airlie <airlied@redhat.com>
      3b32a592
    • M
      kdump: add udev events for memory online/offline · f5138e42
      Michael Holzheu 提交于
      Currently no udev events for memory hotplug "online" and "offline" are
      generated:
      
        # udevadm monitor
        # echo offline > /sys/devices/system/memory/memory4/state
        ==> No event
      
      When kdump is loaded, kexec detects the current memory configuration and
      stores it in the pre-allocated ELF core header.  Therefore, for kdump it
      is necessary to reload the kdump kernel with kexec when the memory
      configuration changes (e.g.  for online/offline hotplug memory).
      
      In order to do this automatically, udev rules should be used.  This kernel
      patch adds udev events for "online" and "offline".  Together with this
      kernel patch, the following udev rules for online/offline have to be added
      to "/etc/udev/rules.d/98-kexec.rules":
      
        SUBSYSTEM=="memory", ACTION=="online", PROGRAM="/etc/init.d/kdump restart"
        SUBSYSTEM=="memory", ACTION=="offline", PROGRAM="/etc/init.d/kdump restart"
      
      [sfr@canb.auug.org.au: fixups for class to subsystem conversion]
      Signed-off-by: NMichael Holzheu <holzheu@linux.vnet.ibm.com>
      Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
      Cc: Vivek Goyal <vgoyal@redhat.com>
      Cc: "Eric W. Biederman" <ebiederm@xmission.com>
      Cc: Kay Sievers <kay.sievers@vrfy.org>
      Cc: Dave Hansen <haveblue@us.ibm.com>
      Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
      Cc: Greg KH <greg@kroah.com>
      Signed-off-by: NStephen Rothwell <sfr@canb.auug.org.au>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      f5138e42
  10. 12 1月, 2012 2 次提交
  11. 06 1月, 2012 2 次提交
    • S
      dma-buf: mark EXPERIMENTAL for 1st release. · a125a394
      Sumit Semwal 提交于
      Mark dma-buf buffer sharing API as EXPERIMENTAL for first release.
      We will remove this in later versions, once it gets smoothed out
      and has more users.
      Signed-off-by: NSumit Semwal <sumit.semwal@linaro.org>
      Signed-off-by: NSumit Semwal <sumit.semwal@ti.com>
      Signed-off-by: NDave Airlie <airlied@redhat.com>
      a125a394
    • S
      dma-buf: Introduce dma buffer sharing mechanism · d15bd7ee
      Sumit Semwal 提交于
      This is the first step in defining a dma buffer sharing mechanism.
      
      A new buffer object dma_buf is added, with operations and API to allow easy
      sharing of this buffer object across devices.
      
      The framework allows:
      - creation of a buffer object, its association with a file pointer, and
         associated allocator-defined operations on that buffer. This operation is
         called the 'export' operation.
      - different devices to 'attach' themselves to this exported buffer object, to
        facilitate backing storage negotiation, using dma_buf_attach() API.
      - the exported buffer object to be shared with the other entity by asking for
         its 'file-descriptor (fd)', and sharing the fd across.
      - a received fd to get the buffer object back, where it can be accessed using
         the associated exporter-defined operations.
      - the exporter and user to share the scatterlist associated with this buffer
         object using map_dma_buf and unmap_dma_buf operations.
      
      Atleast one 'attach()' call is required to be made prior to calling the
      map_dma_buf() operation.
      
      Couple of building blocks in map_dma_buf() are added to ease introduction
      of sync'ing across exporter and users, and late allocation by the exporter.
      
      For this first version, this framework will work with certain conditions:
      - *ONLY* exporter will be allowed to mmap to userspace (outside of this
         framework - mmap is not a buffer object operation),
      - currently, *ONLY* users that do not need CPU access to the buffer are
         allowed.
      
      More details are there in the documentation patch.
      
      This is based on design suggestions from many people at the mini-summits[1],
      most notably from Arnd Bergmann <arnd@arndb.de>, Rob Clark <rob@ti.com> and
      Daniel Vetter <daniel@ffwll.ch>.
      
      The implementation is inspired from proof-of-concept patch-set from
      Tomasz Stanislawski <t.stanislaws@samsung.com>, who demonstrated buffer sharing
      between two v4l2 devices. [2]
      
      [1]: https://wiki.linaro.org/OfficeofCTO/MemoryManagement
      [2]: http://lwn.net/Articles/454389Signed-off-by: NSumit Semwal <sumit.semwal@linaro.org>
      Signed-off-by: NSumit Semwal <sumit.semwal@ti.com>
      Reviewed-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      Reviewed-by: NDave Airlie <airlied@redhat.com>
      Reviewed-and-Tested-by: NRob Clark <rob.clark@linaro.org>
      Signed-off-by: NDave Airlie <airlied@redhat.com>
      d15bd7ee
  12. 05 1月, 2012 1 次提交
    • N
      firmware: Fix an oops on reading fw_priv->fw in sysfs loading file · eea915bb
      Neil Horman 提交于
      This oops was reported recently:
      firmware_loading_store+0xf9/0x17b
      dev_attr_store+0x20/0x22
      sysfs_write_file+0x101/0x134
      vfs_write+0xac/0xf3
      sys_write+0x4a/0x6e
      system_call_fastpath+0x16/0x1b
      
      The complete backtrace was unfortunately not captured, but details can be found
      here:
      https://bugzilla.redhat.com/show_bug.cgi?id=769920
      
      The cause is fairly clear.
      
      Its caused by the fact that firmware_loading_store has a case 0 in its
      switch statement that reads and writes the fw_priv->fw poniter without the
      protection of the fw_lock mutex.  since there is a window between the time that
      _request_firmware sets fw_priv->fw to NULL and the time the corresponding sysfs
      file is unregistered, its possible for a user space application to race in, and
      write a zero to the loading file, causing a NULL dereference in
      firmware_loading_store.  Fix it by extending the protection of the fw_lock mutex
      to cover all of the firware_loading_store function.
      Signed-off-by: NNeil Horman <nhorman@tuxdriver.com>
      Cc: stable <stable@vger.kernel.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      eea915bb
  13. 04 1月, 2012 2 次提交
  14. 26 12月, 2011 1 次提交
    • R
      PM / QoS: Introduce dev_pm_qos_add_ancestor_request() · 40a5f8be
      Rafael J. Wysocki 提交于
      Some devices, like the I2C controller on SH7372, are not
      necessary for providing power to their children or forwarding
      wakeup signals (and generally interrupts) from them.  They are
      only needed by their children when there's some data to transfer,
      so they may be suspended for the majority of time and resumed
      on demand, when the children have data to send or receive.  For this
      purpose, however, their power.ignore_children flags have to be set,
      or the PM core wouldn't allow them to be suspended while their
      children were active.
      
      Unfortunately, in some situations it may take too much time to
      resume such devices so that they can assist their children in
      transferring data.  For example, if such a device belongs to a PM
      domain which goes to the "power off" state when that device is
      suspended, it may take too much time to restore power to the
      domain in response to the request from one of the device's
      children.  In that case, if the parent's resume time is critical,
      the domain should stay in the "power on" state, although it still may
      be desirable to power manage the parent itself (e.g. by manipulating
      its clock).
      
      In general, device PM QoS may be used to address this problem.
      Namely, if the device's children added PM QoS latency constraints
      for it, they would be able to prevent it from being put into an
      overly deep low-power state.  However, in some cases the devices
      needing to be serviced are not the immediate children of a
      "children-ignoring" device, but its grandchildren or even less
      direct descendants.  In those cases, the entity wanting to add a
      PM QoS request for a given device's ancestor that ignores its
      children will have to find it in the first place, so introduce a new
      helper function that may be used to achieve that.  This function,
      dev_pm_qos_add_ancestor_request(), will search for the first
      ancestor of the given device whose power.ignore_children flag is
      set and will add a device PM QoS latency request for that ancestor
      on behalf of the caller.  The request added this way may be removed
      with the help of dev_pm_qos_remove_request() in the future, like
      any other device PM QoS latency request.
      Signed-off-by: NRafael J. Wysocki <rjw@sisk.pl>
      40a5f8be
  15. 22 12月, 2011 6 次提交
    • K
      convert 'memory' sysdev_class to a regular subsystem · 10fbcf4c
      Kay Sievers 提交于
      This moves the 'memory sysdev_class' over to a regular 'memory' subsystem
      and converts the devices to regular devices. The sysdev drivers are
      implemented as subsystem interfaces now.
      
      After all sysdev classes are ported to regular driver core entities, the
      sysdev implementation will be entirely removed from the kernel.
      Signed-off-by: NKay Sievers <kay.sievers@vrfy.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      10fbcf4c
    • K
      cpu: convert 'cpu' and 'machinecheck' sysdev_class to a regular subsystem · 8a25a2fd
      Kay Sievers 提交于
      This moves the 'cpu sysdev_class' over to a regular 'cpu' subsystem
      and converts the devices to regular devices. The sysdev drivers are
      implemented as subsystem interfaces now.
      
      After all sysdev classes are ported to regular driver core entities, the
      sysdev implementation will be entirely removed from the kernel.
      
      Userspace relies on events and generic sysfs subsystem infrastructure
      from sysdev devices, which are made available with this conversion.
      
      Cc: Haavard Skinnemoen <hskinnemoen@gmail.com>
      Cc: Hans-Christian Egtvedt <egtvedt@samfundet.no>
      Cc: Tony Luck <tony.luck@intel.com>
      Cc: Fenghua Yu <fenghua.yu@intel.com>
      Cc: Arnd Bergmann <arnd@arndb.de>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
      Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
      Cc: Paul Mundt <lethal@linux-sh.org>
      Cc: "David S. Miller" <davem@davemloft.net>
      Cc: Chris Metcalf <cmetcalf@tilera.com>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: "H. Peter Anvin" <hpa@zytor.com>
      Cc: Borislav Petkov <bp@amd64.org>
      Cc: Tigran Aivazian <tigran@aivazian.fsnet.co.uk>
      Cc: Len Brown <lenb@kernel.org>
      Cc: Zhang Rui <rui.zhang@intel.com>
      Cc: Dave Jones <davej@redhat.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Russell King <rmk+kernel@arm.linux.org.uk>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Cc: Arjan van de Ven <arjan@linux.intel.com>
      Cc: "Rafael J. Wysocki" <rjw@sisk.pl>
      Cc: "Srivatsa S. Bhat" <srivatsa.bhat@linux.vnet.ibm.com>
      Signed-off-by: NKay Sievers <kay.sievers@vrfy.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      8a25a2fd
    • R
      PM: Drop generic_subsys_pm_ops · 90363ddf
      Rafael J. Wysocki 提交于
      Since the PM core is now going to execute driver callbacks directly
      if the corresponding subsystem callbacks are not present,
      forward-only subsystem callbacks (i.e. such that only execute the
      corresponding driver callbacks) are not necessary any more.  Thus
      it is possible to remove generic_subsys_pm_ops, because the only
      callback in there that is not forward-only, .runtime_idle, is not
      really used by the only user of generic_subsys_pm_ops, which is
      vio_bus_type.
      
      However, the generic callback routines themselves cannot be removed
      from generic_ops.c, because they are used individually by a number
      of subsystems.
      Signed-off-by: NRafael J. Wysocki <rjw@sisk.pl>
      90363ddf
    • R
      PM / Sleep: Remove forward-only callbacks from platform bus type · 9b39e73d
      Rafael J. Wysocki 提交于
      The forward-only PM callbacks provided by the platform bus type are
      not necessary any more, because the PM core executes driver callbacks
      when the corresponding subsystem callbacks are not present, so drop
      them.
      Signed-off-by: NRafael J. Wysocki <rjw@sisk.pl>
      9b39e73d
    • R
      PM: Run the driver callback directly if the subsystem one is not there · 35cd133c
      Rafael J. Wysocki 提交于
      Make the PM core execute driver PM callbacks directly if the
      corresponding subsystem callbacks are not present.
      
      There are three reasons for doing that.  First, it reflects the
      behavior of drivers/base/dd.c:really_probe() that runs the driver's
      .probe() callback directly if the bus type's one is not defined, so
      this change will remove one arbitrary difference between the PM core
      and the remaining parts of the driver core.  Second, it will allow
      some subsystems, whose PM callbacks don't do anything except for
      executing driver callbacks, to be simplified quite a bit by removing
      those "forward-only" callbacks.  Finally, it will allow us to remove
      one level of indirection in the system suspend and resume code paths
      where it is not necessary, which is going to lead to less debug noise
      with initcall_debug passed in the kernel command line (messages won't
      be printed for driverless devices whose subsystems don't provide
      PM callbacks among other things).
      Signed-off-by: NRafael J. Wysocki <rjw@sisk.pl>
      35cd133c
    • R
      PM / Sleep: Make pm_op() and pm_noirq_op() return callback pointers · 9cf519d1
      Rafael J. Wysocki 提交于
      Make the pm_op() and pm_noirq_op() functions return pointers to
      appropriate callbacks instead of executing those callbacks and
      returning their results.
      
      This change is required for a subsequent modification that will
      execute the corresponding driver callback if the subsystem
      callback returned by either pm_op(), or pm_noirq_op() is NULL.
      Signed-off-by: NRafael J. Wysocki <rjw@sisk.pl>
      9cf519d1
  16. 21 12月, 2011 1 次提交
  17. 18 12月, 2011 2 次提交
    • R
      PM / Sleep: Merge internal functions in generic_ops.c · 1eac8111
      Rafael J. Wysocki 提交于
      After the change that removed the code related to runtime PM
      from __pm_generic_call() and __pm_generic_resume() these two
      functions need not be separate any more, so merge them.
      Signed-off-by: NRafael J. Wysocki <rjw@sisk.pl>
      1eac8111
    • R
      PM / Sleep: Simplify generic system suspend callbacks · 8ca6d9bc
      Rafael J. Wysocki 提交于
      The pm_runtime_suspended() check in __pm_generic_call() doesn't
      really help and may cause problems to happen, because in some cases
      the system suspend callbacks need to be called even if the given
      device has been suspended by runtime PM.  For example, if the device
      generally supports remote wakeup and is not enabled to wake up
      the system from sleep, it should be prevented from generating wakeup
      signals during system suspend and that has to be done by the
      suspend callbacks that the pm_runtime_suspended() check prevents from
      being executed.
      
      Similarly, it may not be a good idea to unconditionally change
      the runtime PM status of the device to 'active' in
      __pm_generic_resume(), because the driver may want to leave the
      device in the 'suspended' state, depending on what happened to it
      before the system suspend and whether or not it is enabled to
      wake up the system.
      
      For the above reasons, remove the pm_runtime_suspended()
      check from __pm_generic_call() and remove the code changing the
      device's runtime PM status from __pm_generic_resume().
      Signed-off-by: NRafael J. Wysocki <rjw@sisk.pl>
      8ca6d9bc
  18. 15 12月, 2011 1 次提交
    • K
      driver-core: implement 'sysdev' functionality for regular devices and buses · ca22e56d
      Kay Sievers 提交于
      All sysdev classes and sysdev devices will converted to regular devices
      and buses to properly hook userspace into the event processing.
      
      There is no interesting difference between a 'sysdev' and 'device' which
      would justify to roll an entire own subsystem with different userspace
      export semantics. Userspace relies on events and generic sysfs subsystem
      infrastructure from sysdev devices, which are currently not properly
      available.
      
      Every converted sysdev class will create a regular device with the class
      name in /sys/devices/system and all registered devices will becom a children
      of theses devices.
      
      For compatibility reasons, the sysdev class-wide attributes are created
      at this parent device. (Do not copy that logic for anything new, subsystem-
      wide properties belong to the subsystem, not to some fake parent device
      created in /sys/devices.)
      
      Every sysdev driver is implemented as a simple subsystem interface now,
      and no longer called a driver.
      
      After all sysdev classes are ported to regular driver core entities, the
      sysdev implementation will be entirely removed from the kernel.
      Signed-off-by: NKay Sievers <kay.sievers@vrfy.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      ca22e56d
  19. 13 12月, 2011 1 次提交
  20. 12 12月, 2011 1 次提交
    • J
      driver-core/cpu: Expose hotpluggability to the rest of the kernel · 2987557f
      Josh Triplett 提交于
      When architectures register CPUs, they indicate whether the CPU allows
      hotplugging; notably, x86 and ARM don't allow hotplugging CPU 0.
      Userspace can easily query the hotpluggability of a CPU via sysfs;
      however, the kernel has no convenient way of accessing that property in
      an architecture-independent way.  While the kernel can simply try it and
      see, some code needs to distinguish between "hotplug failed" and
      "hotplug has no hope of working on this CPU"; for example, rcutorture's
      CPU hotplug tests want to avoid drowning out real hotplug failures with
      expected failures.
      
      Expose this property via a new cpu_is_hotpluggable function, so that the
      rest of the kernel can access it in an architecture-independent way.
      Signed-off-by: NJosh Triplett <josh@joshtriplett.org>
      Signed-off-by: NPaul E. McKenney <paulmck@linux.vnet.ibm.com>
      2987557f
  21. 10 12月, 2011 3 次提交
    • U
      drivers_base: make argument to platform_device_register_full const · 5a3072be
      Uwe Kleine-König 提交于
      platform_device_register_full doesn't modify *pdevinfo so it can be
      marked as const without further adaptions.
      Signed-off-by: NUwe Kleine-König <u.kleine-koenig@pengutronix.de>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      5a3072be
    • S
      PM / Sleep: Fix freezer failures due to racy usermodehelper_is_disabled() · b298d289
      Srivatsa S. Bhat 提交于
      Commit a144c6a6 (PM: Print a warning if firmware is requested when tasks
      are frozen) introduced usermodehelper_is_disabled() to warn and exit
      immediately if firmware is requested when usermodehelpers are disabled.
      
      However, it is racy. Consider the following scenario, currently used in
      drivers/base/firmware_class.c:
      
      ...
      if (usermodehelper_is_disabled())
              goto out;
      
      /* Do actual work */
      ...
      
      out:
              return err;
      
      Nothing prevents someone from disabling usermodehelpers just after the check
      in the 'if' condition, which means that it is quite possible to try doing the
      "actual work" with usermodehelpers disabled, leading to undesirable
      consequences.
      
      In particular, this race condition in _request_firmware() causes task freezing
      failures whenever suspend/hibernation is in progress because, it wrongly waits
      to get the firmware/microcode image from userspace when actually the
      usermodehelpers are disabled or userspace has been frozen.
      Some of the example scenarios that cause freezing failures due to this race
      are those that depend on userspace via request_firmware(), such as x86
      microcode module initialization and microcode image reload.
      
      Previous discussions about this issue can be found at:
      http://thread.gmane.org/gmane.linux.kernel/1198291/focus=1200591
      
      This patch adds proper synchronization to fix this issue.
      
      It is to be noted that this patchset fixes the freezing failures but doesn't
      remove the warnings. IOW, it does not attempt to add explicit synchronization
      to x86 microcode driver to avoid requesting microcode image at inopportune
      moments. Because, the warnings were introduced to highlight such cases, in the
      first place. And we need not silence the warnings, since we take care of the
      *real* problem (freezing failure) and hence, after that, the warnings are
      pretty harmless anyway.
      Signed-off-by: NSrivatsa S. Bhat <srivatsa.bhat@linux.vnet.ibm.com>
      Signed-off-by: NRafael J. Wysocki <rjw@sisk.pl>
      b298d289
    • M
      PM / Domains: Provide an always on power domain governor · 925b44a2
      Mark Brown 提交于
      Since systems are likely to have power domains that can't be turned off
      for various reasons at least temporarily while implementing power domain
      support provide a default governor which will always refuse to power off
      the domain, saving platforms having to implement their own.
      
      Since the code is so tiny don't bother with a Kconfig symbol for it.
      Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com>
      Signed-off-by: NRafael J. Wysocki <rjw@sisk.pl>
      925b44a2
  22. 09 12月, 2011 1 次提交
  23. 08 12月, 2011 1 次提交
    • A
      PM / Driver core: leave runtime PM enabled during system shutdown · fe6b91f4
      Alan Stern 提交于
      Disabling all runtime PM during system shutdown turns out not to be a
      good idea, because some devices may need to be woken up from a
      low-power state at that time.
      
      The whole point of disabling runtime PM for system shutdown was to
      prevent untimely runtime-suspend method calls.  This patch (as1504)
      accomplishes the same result by incrementing the usage count for each
      device and waiting for ongoing runtime-PM callbacks to finish.  This
      is what we already do during system suspend and hibernation, which
      makes sense since the shutdown method is pretty much a legacy analog
      of the pm->poweroff method.
      
      This fixes a recent regression on some OMAP systems introduced by
      commit af8db150 (PM / driver core:
      disable device's runtime PM during shutdown).
      Reported-and-tested-by: NNeilBrown <neilb@suse.de>
      Signed-off-by: NAlan Stern <stern@rowland.harvard.edu>
      Acked-by: NGreg Kroah-Hartman <gregkh@suse.de>
      Signed-off-by: NRafael J. Wysocki <rjw@sisk.pl>
      fe6b91f4
  24. 07 12月, 2011 2 次提交