1. 22 5月, 2010 5 次提交
  2. 18 5月, 2010 1 次提交
  3. 13 5月, 2010 1 次提交
    • P
      driver core: Early dev_name() depends on slab_is_available(). · 06fe53be
      Paul Mundt 提交于
      The early dev_name() setup needs to do an allocation which can only be
      satisfied under slab_is_available() conditions. Some of the early
      platform drivers may be initialized before this point, and those still
      need to contend themselves with an empty dev_name.
      
      This fixes up a regression with the SH earlyprintk which was bailing out
      prior to hitting the early probe path due to not being able to satisfy
      the early allocation. Other early platform drivers (such as the early
      timers) that need to match the dev name are sufficiently late that
      allocations are already possible.
      Signed-off-by: NPaul Mundt <lethal@linux-sh.org>
      06fe53be
  4. 11 5月, 2010 3 次提交
    • M
      PM / platform_bus: Allow runtime PM by default · 543f2503
      Mark Brown 提交于
      Currently the default runtime PM callbacks for platform devices return
      -ENOSYS, preventing the use of runtime PM platforms until they have
      provided at least a default implementation. This hinders the use of
      runtime PM by devices which work with many platforms such as memory
      mapped devices, MFDs and on chip IPs shared by multiple architectures.
      
      Change the default implementation to the standard pm_generic_runtime
      one, allowing drivers to use runtime PM without per-architecture
      changes.
      Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com>
      Acked-by: NGreg Kroah-Hartman <gregkh@suse.de>
      Signed-off-by: NRafael J. Wysocki <rjw@sisk.pl>
      543f2503
    • D
      PM / Runtime: Add sysfs debug files · c92445fa
      Dominik Brodowski 提交于
      Add a few sysfs files relating to runtime power management for
      advanced debug purposes:
      
      runtime_enabled: is runtime PM enabled for this device? States
      	are "enabled", "disabled", "forbidden" or a combination
      	of the latter two.
      
      runtime_status:	what state is the device in currently? E.g., it
      	reports "suspended" for runtime-suspended devices, and
              "active" for active devices. NOTE: if runtime_enabled
      	returns "disabled", the value of this file may not
      	reflect its physical state.
      
      runtime_usage: the runtime PM usage count of a device
      
      runtime_active_kids: the runtime PM children usage count of a device, or
      	0 if the ignore_children flag is set.
      
      Also, CONFIG_PM_SLEEP_ADVANCED_DEBUG is not defined in any Kconfig
      file, so replace it with CONFIG_PM_ADVANCED_DEBUG.
      Signed-off-by: NDominik Brodowski <linux@dominikbrodowski.net>
      Acked-by: NAlan Stern <stern@rowland.harvard.edu>
      Signed-off-by: NRafael J. Wysocki <rjw@sisk.pl>
      c92445fa
    • A
      PM: Allow runtime_suspend methods to call pm_schedule_suspend() · 240c7337
      Alan Stern 提交于
      This patch (as1361) changes the runtime PM interface slightly; it
      allows suspend requests to be scheduled while the runtime_suspend
      method is running.  If the method succeeds then the scheduled request
      is cancelled, whereas if the method fails then an idle notification is
      sent only if no request was scheduled.
      
      Being able to schedule suspend requests from within a runtime_suspend
      method is useful for drivers that need to test for idleness and
      suspend the device all while holding a single spinlock, or for drivers
      that want to check for idleness by polling.
      Signed-off-by: NAlan Stern <stern@rowland.harvard.edu>
      Signed-off-by: NRafael J. Wysocki <rjw@sisk.pl>
      240c7337
  5. 10 4月, 2010 1 次提交
  6. 07 4月, 2010 1 次提交
    • T
      nodemask: include slab.h from drivers/base/node.c · 18e5b539
      Tejun Heo 提交于
      NODEMASK_ALLOC/FREE are mapped to kmalloc/free if NODES_SHIFT > 8.
      Among its several users, drivers/base/node.c wasn't including slab.h
      leading to build failure if NODES_SHIFT > 8.  Include slab.h from
      drivers/base/node.c.
      
      This isn't an ideal solution but including slab.h directly from
      nodemask.h is not an option because nodemask.h gets included
      everywhere.  For now, make it work by including slab.h from its users.
      Signed-off-by: NTejun Heo <tj@kernel.org>
      Reported-by: NIngo Molnar <mingo@elte.hu>
      18e5b539
  7. 30 3月, 2010 1 次提交
    • T
      include cleanup: Update gfp.h and slab.h includes to prepare for breaking... · 5a0e3ad6
      Tejun Heo 提交于
      include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h
      
      percpu.h is included by sched.h and module.h and thus ends up being
      included when building most .c files.  percpu.h includes slab.h which
      in turn includes gfp.h making everything defined by the two files
      universally available and complicating inclusion dependencies.
      
      percpu.h -> slab.h dependency is about to be removed.  Prepare for
      this change by updating users of gfp and slab facilities include those
      headers directly instead of assuming availability.  As this conversion
      needs to touch large number of source files, the following script is
      used as the basis of conversion.
      
        http://userweb.kernel.org/~tj/misc/slabh-sweep.py
      
      The script does the followings.
      
      * Scan files for gfp and slab usages and update includes such that
        only the necessary includes are there.  ie. if only gfp is used,
        gfp.h, if slab is used, slab.h.
      
      * When the script inserts a new include, it looks at the include
        blocks and try to put the new include such that its order conforms
        to its surrounding.  It's put in the include block which contains
        core kernel includes, in the same order that the rest are ordered -
        alphabetical, Christmas tree, rev-Xmas-tree or at the end if there
        doesn't seem to be any matching order.
      
      * If the script can't find a place to put a new include (mostly
        because the file doesn't have fitting include block), it prints out
        an error message indicating which .h file needs to be added to the
        file.
      
      The conversion was done in the following steps.
      
      1. The initial automatic conversion of all .c files updated slightly
         over 4000 files, deleting around 700 includes and adding ~480 gfp.h
         and ~3000 slab.h inclusions.  The script emitted errors for ~400
         files.
      
      2. Each error was manually checked.  Some didn't need the inclusion,
         some needed manual addition while adding it to implementation .h or
         embedding .c file was more appropriate for others.  This step added
         inclusions to around 150 files.
      
      3. The script was run again and the output was compared to the edits
         from #2 to make sure no file was left behind.
      
      4. Several build tests were done and a couple of problems were fixed.
         e.g. lib/decompress_*.c used malloc/free() wrappers around slab
         APIs requiring slab.h to be added manually.
      
      5. The script was run on all .h files but without automatically
         editing them as sprinkling gfp.h and slab.h inclusions around .h
         files could easily lead to inclusion dependency hell.  Most gfp.h
         inclusion directives were ignored as stuff from gfp.h was usually
         wildly available and often used in preprocessor macros.  Each
         slab.h inclusion directive was examined and added manually as
         necessary.
      
      6. percpu.h was updated not to include slab.h.
      
      7. Build test were done on the following configurations and failures
         were fixed.  CONFIG_GCOV_KERNEL was turned off for all tests (as my
         distributed build env didn't work with gcov compiles) and a few
         more options had to be turned off depending on archs to make things
         build (like ipr on powerpc/64 which failed due to missing writeq).
      
         * x86 and x86_64 UP and SMP allmodconfig and a custom test config.
         * powerpc and powerpc64 SMP allmodconfig
         * sparc and sparc64 SMP allmodconfig
         * ia64 SMP allmodconfig
         * s390 SMP allmodconfig
         * alpha SMP allmodconfig
         * um on x86_64 SMP allmodconfig
      
      8. percpu.h modifications were reverted so that it could be applied as
         a separate patch and serve as bisection point.
      
      Given the fact that I had only a couple of failures from tests on step
      6, I'm fairly confident about the coverage of this conversion patch.
      If there is a breakage, it's likely to be something in one of the arch
      headers which should be easily discoverable easily on most builds of
      the specific arch.
      Signed-off-by: NTejun Heo <tj@kernel.org>
      Guess-its-ok-by: NChristoph Lameter <cl@linux-foundation.org>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: Lee Schermerhorn <Lee.Schermerhorn@hp.com>
      5a0e3ad6
  8. 29 3月, 2010 1 次提交
  9. 28 3月, 2010 1 次提交
  10. 24 3月, 2010 1 次提交
  11. 19 3月, 2010 6 次提交
  12. 18 3月, 2010 1 次提交
    • H
      memory hotplug: allow setting of phys_device · bc32df00
      Heiko Carstens 提交于
      /sys/devices/system/memory/memoryX/phys_device is supposed to contain the
      number of the physical device that the corresponding piece of memory
      belongs to.
      
      In case a physical device should be replaced or taken offline for whatever
      reason it is necessary to set all corresponding memory pieces offline.
      The current implementation always sets phys_device to '0' and there is no
      way or hook to change that.  Seems like there was a plan to implement that
      but it wasn't finished for whatever reason.
      
      So add a weak function which architectures can override to actually set
      the phys_device from within add_memory_block().
      Signed-off-by: NHeiko Carstens <heiko.carstens@de.ibm.com>
      Cc: Dave Hansen <haveblue@us.ibm.com>
      Cc: Gerald Schaefer <gerald.schaefer@de.ibm.com>
      Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      bc32df00
  13. 10 3月, 2010 1 次提交
    • P
      driver core: Early dev_name() support. · a636ee7f
      Paul Mundt 提交于
      Presently early platform devices suffer from the fact they are unable to
      use dev_xxx() calls early on due to dev_name() and others being
      unavailable at the time ->probe() is called.
      
      This implements early init_name construction from the matched name/id
      pair following the semantics of the late device/driver match. As a
      result, matched IDs (inclusive of requested ones) are preserved when the
      handoff from the early platform code happens at kobject initialization
      time.
      
      Since we still require kmalloc slabs to be available at this point, using
      kstrdup() for establishing the init_name works fine. This subsequently
      needs to be tested from dev_name() prior to the init_name being cleared
      by the driver core. We don't kfree() since others will already have a
      handle on the string long before the kobject initialization takes place.
      
      This is also needed to permit drivers to use the clock framework early,
      without having to manually construct their own device IDs from the match
      id/name pair locally (needed by the early console and timer code on sh
      and arm).
      Signed-off-by: NPaul Mundt <lethal@linux-sh.org>
      Acked-by: NGreg Kroah-Hartman <gregkh@suse.de>
      a636ee7f
  14. 08 3月, 2010 16 次提交