1. 08 11月, 2014 1 次提交
  2. 30 10月, 2014 1 次提交
  3. 28 10月, 2014 1 次提交
    • I
      PM / Sleep: fix async suspend_late/freeze_late error handling · 246ef766
      Imre Deak 提交于
      If an asynchronous suspend_late or freeze_late callback fails
      during the SUSPEND, FREEZE or QUIESCE phases, we don't propagate the
      corresponding error correctly, in effect ignoring the error and
      continuing the suspend-to-ram/hibernation. During suspend-to-ram this
      could leave some devices without a valid saved context, leading to a
      failure to reinitialize them during resume. During hibernation this
      could leave some devices active interfeering with the creation /
      restoration of the hibernation image. Also this could leave the
      corresponding devices without a valid saved context and failure to
      reinitialize them during resume.
      
      Fixes: de377b39 (PM / sleep: Asynchronous threads for suspend_late)
      Signed-off-by: NImre Deak <imre.deak@intel.com>
      Cc: 3.15+ <stable@vger.kernel.org> # 3.15+
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      246ef766
  4. 14 10月, 2014 2 次提交
  5. 10 10月, 2014 4 次提交
    • J
      CMA: document cma=0 · f0d6d1f6
      Jean Delvare 提交于
      It isn't obvious that CMA can be disabled on the kernel's command line, so
      document it.
      Signed-off-by: NJean Delvare <jdelvare@suse.de>
      Cc: Joonsoo Kim <iamjoonsoo.kim@lge.com>
      Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
      Cc: Akinobu Mita <akinobu.mita@gmail.com>
      Cc: Chuck Ebbert <cebbert.lkml@gmail.com>
      Cc: Marek Szyprowski <m.szyprowski@samsung.com>
      Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      f0d6d1f6
    • J
      mm: remove noisy remainder of the scan_unevictable interface · 1f13ae39
      Johannes Weiner 提交于
      The deprecation warnings for the scan_unevictable interface triggers by
      scripts doing `sysctl -a | grep something else'.  This is annoying and not
      helpful.
      
      The interface has been defunct since 264e56d8 ("mm: disable user
      interface to manually rescue unevictable pages"), which was in 2011, and
      there haven't been any reports of usecases for it, only reports that the
      deprecation warnings are annying.  It's unlikely that anybody is using
      this interface specifically at this point, so remove it.
      Signed-off-by: NJohannes Weiner <hannes@cmpxchg.org>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      1f13ae39
    • L
      common: dma-mapping: introduce common remapping functions · 513510dd
      Laura Abbott 提交于
      For architectures without coherent DMA, memory for DMA may need to be
      remapped with coherent attributes.  Factor out the the remapping code from
      arm and put it in a common location to reduce code duplication.
      
      As part of this, the arm APIs are now migrated away from
      ioremap_page_range to the common APIs which use map_vm_area for remapping.
       This should be an equivalent change and using map_vm_area is more correct
      as ioremap_page_range is intended to bring in io addresses into the cpu
      space and not regular kernel managed memory.
      Signed-off-by: NLaura Abbott <lauraa@codeaurora.org>
      Reviewed-by: NCatalin Marinas <catalin.marinas@arm.com>
      Cc: Arnd Bergmann <arnd@arndb.de>
      Cc: David Riley <davidriley@chromium.org>
      Cc: Olof Johansson <olof@lixom.net>
      Cc: Ritesh Harjain <ritesh.harjani@gmail.com>
      Cc: Russell King <linux@arm.linux.org.uk>
      Cc: Thierry Reding <thierry.reding@gmail.com>
      Cc: Will Deacon <will.deacon@arm.com>
      Cc: James Hogan <james.hogan@imgtec.com>
      Cc: Laura Abbott <lauraa@codeaurora.org>
      Cc: Mitchel Humpherys <mitchelh@codeaurora.org>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      513510dd
    • Z
      memory-hotplug: add sysfs valid_zones attribute · ed2f2400
      Zhang Zhen 提交于
      Currently memory-hotplug has two limits:
      
      1. If the memory block is in ZONE_NORMAL, you can change it to
         ZONE_MOVABLE, but this memory block must be adjacent to ZONE_MOVABLE.
      
      2. If the memory block is in ZONE_MOVABLE, you can change it to
         ZONE_NORMAL, but this memory block must be adjacent to ZONE_NORMAL.
      
      With this patch, we can easy to know a memory block can be onlined to
      which zone, and don't need to know the above two limits.
      
      Updated the related Documentation.
      
      [akpm@linux-foundation.org: use conventional comment layout]
      [akpm@linux-foundation.org: fix build with CONFIG_MEMORY_HOTREMOVE=n]
      [akpm@linux-foundation.org: remove unused local zone_prev]
      Signed-off-by: NZhang Zhen <zhenzhang.zhang@huawei.com>
      Cc: Dave Hansen <dave.hansen@intel.com>
      Cc: David Rientjes <rientjes@google.com>
      Cc: Toshi Kani <toshi.kani@hp.com>
      Cc: Yasuaki Ishimatsu <isimatu.yasuaki@jp.fujitsu.com>
      Cc: Naoya Horiguchi <n-horiguchi@ah.jp.nec.com>
      Cc: Wang Nan <wangnan0@huawei.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      ed2f2400
  6. 04 10月, 2014 1 次提交
    • Y
      driver/base/node: remove unnecessary kfree of node struct from unregister_one_node · 33ead538
      Yasuaki Ishimatsu 提交于
      Commit 92d585ef ("numa: fix NULL pointer access and memory
      leak in unregister_one_node()") added kfree() of node struct in
      unregister_one_node(). But node struct is freed by node_device_release()
      which is called in  unregister_node(). So by adding the kfree(),
      node struct is freed two times.
      
      While hot removing memory, the commit leads the following BUG_ON():
      
        kernel BUG at mm/slub.c:3346!
        invalid opcode: 0000 [#1] SMP
        [...]
        Call Trace:
         [...] unregister_one_node
         [...] try_offline_node
         [...] remove_memory
         [...] acpi_memory_device_remove
         [...] acpi_bus_trim
         [...] acpi_bus_trim
         [...] acpi_device_hotplug
         [...] acpi_hotplug_work_fn
         [...] process_one_work
         [...] worker_thread
         [...] ? rescuer_thread
         [...] kthread
         [...] ? kthread_create_on_node
         [...] ret_from_fork
         [...] ? kthread_create_on_node
      
      This patch removes unnecessary kfree() from unregister_one_node().
      Signed-off-by: NYasuaki Ishimatsu <isimatu.yasuaki@jp.fujitsu.com>
      Cc: Xishi Qiu <qiuxishi@huawei.com>
      Cc: stable@vger.kernel.org # v3.16+
      Fixes: 92d585ef "numa: fix NULL pointer access and memory leak in unregister_one_node()"
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      33ead538
  7. 03 10月, 2014 2 次提交
  8. 02 10月, 2014 1 次提交
    • J
      driver core: Add BUS_NOTIFY_REMOVED_DEVICE event · 599bad38
      Joerg Roedel 提交于
      This event closes an important gap in the bus notifiers.
      There is already the BUS_NOTIFY_DEL_DEVICE event, but that
      is sent when the device is still bound to its device driver.
      
      This is too early for the IOMMU code to destroy any mappings
      for the device, as they might still be in use by the driver.
      
      The new BUS_NOTIFY_REMOVED_DEVICE event introduced with this
      patch closes this gap as it is sent when the device is
      already unbound from its device driver and almost completly
      removed from the driver core.
      
      With this event the IOMMU code can safely destroy any
      mappings and other data structures when a device is removed.
      Signed-off-by: NJoerg Roedel <jroedel@suse.de>
      Acked-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      Tested-by: NJerry Hoemann <jerry.hoemann@hp.com>
      599bad38
  9. 01 10月, 2014 1 次提交
  10. 30 9月, 2014 2 次提交
  11. 28 9月, 2014 2 次提交
  12. 27 9月, 2014 1 次提交
  13. 26 9月, 2014 2 次提交
  14. 24 9月, 2014 8 次提交
    • G
      devres: Improve devm_kasprintf()/kvasprintf() support · bef59c50
      Geert Uytterhoeven 提交于
        - Add devm_kasprintf()/kvasprintf(), introduced by commit
          75f2a4ea ("devres: Add
          devm_kasprintf and devm_kvasprintf API"), to
          Documentation/driver-model/devres.txt,
        - Improve kernel doc: the string is not an existing formatted string,
          but is formatted into the newly-allocated buffer,
        - Add a __printf() annotation to devm_kasprintf(), so the compiler
          will verify the format string argument types.
      Signed-off-by: NGeert Uytterhoeven <geert+renesas@glider.be>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      bef59c50
    • K
      firmware_class: make sure fw requests contain a name · 471b095d
      Kees Cook 提交于
      An empty firmware request name will trigger warnings when building
      device names. Make sure this is caught earlier and rejected.
      
      The warning was visible via the test_firmware.ko module interface:
      
      echo -ne "\x00" > /sys/devices/virtual/misc/test_firmware/trigger_request
      Reported-by: NSasha Levin <sasha.levin@oracle.com>
      Signed-off-by: NKees Cook <keescook@chromium.org>
      Cc: stable@vger.kernel.org
      Tested-by: NSasha Levin <sasha.levin@oracle.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      471b095d
    • T
      driver core: Remove kerneldoc from local function · 41575335
      Thierry Reding 提交于
      The deferred_probe_work_func() function is locally scoped, therefore an
      associated kerneldoc comment isn't very useful. Replace the kerneldoc
      opening marker (/**) with a regular block comment marker (/*) to avoid
      the comment from being parsed by kerneldoc. This gets rid of a warning
      caused by a missing description for the "work" argument.
      Signed-off-by: NThierry Reding <treding@nvidia.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      41575335
    • T
      attribute_container: fix coding style issues · 287f9bd9
      Tina Johnson 提交于
      Fix checkpatch.pl issues with coding style. Added and removed spaces
      accordingly.
      Signed-off-by: NTina Johnson <tinajohnson.1234@gmail.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      287f9bd9
    • T
      attribute_container: fix whitespace errors · 24a7d36a
      Tina Johnson 提交于
      This is a clean-up patch to the attribute_container.c file to fix
      the whitespace errors.
      Signed-off-by: NTina Johnson <tinajohnson.1234@gmail.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      24a7d36a
    • B
      drivers/base: Fix length checks in create_syslog_header()/dev_vprintk_emit() · 655e5b7c
      Ben Hutchings 提交于
      snprintf() returns the number of bytes that could have been written
      (excluding the null), not the actual number of bytes written.  Given a
      long enough subsystem or device name, these functions will advance
      beyond the end of the on-stack buffer in dev_vprintk_exit(), resulting
      in an information leak or stack corruption.  I don't know whether such
      a long name is currently possible.
      
      In case snprintf() returns a value >= the buffer size, do not add
      structured logging information.  Also WARN if this happens, so we can
      fix the driver or increase the buffer size.
      Signed-off-by: NBen Hutchings <ben@decadent.org.uk>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      655e5b7c
    • J
      device coredump: add new device coredump class · 833c9545
      Johannes Berg 提交于
      Many devices run firmware and/or complex hardware, and most of that
      can have bugs. When it misbehaves, however, it is often much harder
      to debug than software running on the host.
      
      Introduce a "device coredump" mechanism to allow dumping internal
      device/firmware state through a generalized mechanism. As devices
      are different and information needed can vary accordingly, this
      doesn't prescribe a file format - it just provides mechanism to
      get data to be able to capture it in a generalized way (e.g. in
      distributions.)
      
      The dumped data will be readable in sysfs in the virtual device's
      data file under /sys/class/devcoredump/devcd*/. Writing to it will
      free the data and remove the device, as does a 5-minute timeout.
      
      Note that generalized capturing of such data may result in privacy
      issues, so users generally need to be involved. In order to allow
      certain users/system integrators/... to disable the feature at all,
      introduce a Kconfig option to override the drivers that would like
      to have the feature.
      
      For now, this provides two ways of dumping data:
       1) with a vmalloc'ed area, that is then given to the subsystem
          and freed after retrieval or timeout
       2) with a generalized reader/free function method
      
      We could/should add more options, e.g. a list of pages, since the
      vmalloc area is very limited on some architectures.
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      833c9545
    • M
      PM / Domains: add debugfs listing of struct generic_pm_domain-s · 2bd5306a
      Maciej Matraszek 提交于
      Add /sys/kernel/debug/pm_genpd/pm_genpd_summary file, which
      lists power domains in the system, their statuses and attached devices,
      resembling /sys/kernel/debug/clk/clk_summary.
      
      Currently it is impossible to inspect (from userland) whether
      a power domain is on or off. And, if it is on, which device blocks it
      from powering down. This change allows developers working on
      embedded devices power efficiency to list all necessary information
      about generic power domains in one place.
      
      The content of pm_genpd/pm_genpd_summary file is generated by iterating
      over all generic power domain in the system, and, for each,
      over registered devices and over the subdomains, if present.
      
      Example output:
      $ cat  /sys/kernel/debug/pm_genpd/pm_genpd_summary
          domain                      status         slaves
                 /device                                      runtime status
      ----------------------------------------------------------------------
      a4su                            off
      a3sg                            off
      a3sm                            on
      a3sp                            on
          /devices/e6600000.pwm                               suspended
          /devices/e6c50000.serial                            active
          /devices/e6850000.sd                                suspended
          /devices/e6bd0000.mmc                               active
      a4s                             on               a3sp, a3sm, a3sg
          /devices/e6900000.irqpin                            unsupported
          /devices/e6900004.irqpin                            unsupported
          /devices/e6900008.irqpin                            unsupported
          /devices/e690000c.irqpin                            unsupported
          /devices/e9a00000.ethernet                          active
      a3rv                            off
      a4r                             off              a3rv
          /devices/fff20000.i2c                               suspended
      a4lc                            off
      c5                              on               a4lc, a4r, a4s, a4su
          /devices/e6050000.pfc                               unsupported
          /devices/e6138000.timer                             active
      
      To enable this feature, compile the kernel with debugfs
      and CONFIG_PM_ADVANCED_DEBUG enabled.
      Signed-off-by: NMaciej Matraszek <m.matraszek@samsung.com>
      Tested-by: NGeert Uytterhoeven <geert+renesas@glider.be>
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      2bd5306a
  15. 22 9月, 2014 4 次提交
  16. 19 9月, 2014 1 次提交
  17. 17 9月, 2014 1 次提交
  18. 12 9月, 2014 1 次提交
  19. 09 9月, 2014 4 次提交