1. 19 2月, 2016 3 次提交
  2. 04 2月, 2016 1 次提交
  3. 03 2月, 2016 1 次提交
  4. 28 1月, 2016 2 次提交
  5. 27 1月, 2016 1 次提交
    • M
      base/platform: Fix platform drivers with no probe callback · 25cad69f
      Martin Wilck 提交于
      Since b8b2c7d8, platform_drv_probe() is called for all platform
      devices. If drv->probe is NULL, and dev_pm_domain_attach() fails,
      platform_drv_probe() will return the error code from dev_pm_domain_attach().
      
      This causes real_probe() to enter the "probe_failed" path and set
      dev->driver to NULL. Before b8b2c7d8, real_probe() would assume
      success if both dev->bus->probe and drv->probe were missing. As a result,
      a device and driver could be "bound" together just by matching their names;
      this doesn't work any more after b8b2c7d8.
      
      This may cause problems later for certain usage of platform_driver_register()
      and platform_device_register_simple(). I observed a panic while loading
      the tpm_tis driver with parameter "force=1" (i.e. registering tpm_tis as
      a platform driver), because tpm_tis_init's assumption that the device
      returned by platform_device_register_simple() was bound didn't hold any more
      (tpmm_chip_alloc() dereferences chip->pdev->driver, causing panic).
      
      This patch restores the previous (4.3.0 and earlier) behavior of
      platform_drv_probe() in the case when the associated platform driver has
      no "probe" function.
      
      Fixes: b8b2c7d8 ("base/platform: assert that dev_pm_domain callbacks are called unconditionally")
      Signed-off-by: NMartin Wilck <Martin.Wilck@ts.fujitsu.com>
      Cc: stable <stable@vger.kernel.org> # 4.4
      Cc: Martin Fuzzey <mfuzzey@parkeon.com>
      Acked-by: NJarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      25cad69f
  6. 26 1月, 2016 1 次提交
  7. 23 1月, 2016 1 次提交
    • A
      wrappers for ->i_mutex access · 5955102c
      Al Viro 提交于
      parallel to mutex_{lock,unlock,trylock,is_locked,lock_nested},
      inode_foo(inode) being mutex_foo(&inode->i_mutex).
      
      Please, use those for access to ->i_mutex; over the coming cycle
      ->i_mutex will become rwsem, with ->lookup() done with it held
      only shared.
      Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
      5955102c
  8. 22 1月, 2016 1 次提交
    • M
      PM / domains: fix lockdep issue for all subdomains · 0106ef51
      Marek Szyprowski 提交于
      During genpd_poweron, genpd->lock is acquired recursively for each
      parent (master) domain, which are separate objects. This confuses
      lockdep, which considers every operation on genpd->lock as being done on
      the same lock class. This leads to the following false positive warning:
      
      =============================================
      [ INFO: possible recursive locking detected ]
      4.4.0-rc4-xu3s #32 Not tainted
      ---------------------------------------------
      swapper/0/1 is trying to acquire lock:
       (&genpd->lock){+.+...}, at: [<c0361550>] __genpd_poweron+0x64/0x108
      
      but task is already holding lock:
       (&genpd->lock){+.+...}, at: [<c0361af8>] genpd_dev_pm_attach+0x168/0x1b8
      
      other info that might help us debug this:
       Possible unsafe locking scenario:
      
             CPU0
             ----
        lock(&genpd->lock);
        lock(&genpd->lock);
      
       *** DEADLOCK ***
      
       May be due to missing lock nesting notation
      
      3 locks held by swapper/0/1:
       #0:  (&dev->mutex){......}, at: [<c0350910>] __driver_attach+0x48/0x98
       #1:  (&dev->mutex){......}, at: [<c0350920>] __driver_attach+0x58/0x98
       #2:  (&genpd->lock){+.+...}, at: [<c0361af8>] genpd_dev_pm_attach+0x168/0x1b8
      
      stack backtrace:
      CPU: 0 PID: 1 Comm: swapper/0 Not tainted 4.4.0-rc4-xu3s #32
      Hardware name: SAMSUNG EXYNOS (Flattened Device Tree)
      [<c0016c98>] (unwind_backtrace) from [<c00139c4>] (show_stack+0x10/0x14)
      [<c00139c4>] (show_stack) from [<c0270df0>] (dump_stack+0x84/0xc4)
      [<c0270df0>] (dump_stack) from [<c00780b8>] (__lock_acquire+0x1f88/0x215c)
      [<c00780b8>] (__lock_acquire) from [<c007886c>] (lock_acquire+0xa4/0xd0)
      [<c007886c>] (lock_acquire) from [<c0641f2c>] (mutex_lock_nested+0x70/0x4d4)
      [<c0641f2c>] (mutex_lock_nested) from [<c0361550>] (__genpd_poweron+0x64/0x108)
      [<c0361550>] (__genpd_poweron) from [<c0361b00>] (genpd_dev_pm_attach+0x170/0x1b8)
      [<c0361b00>] (genpd_dev_pm_attach) from [<c03520a8>] (platform_drv_probe+0x2c/0xac)
      [<c03520a8>] (platform_drv_probe) from [<c03507d4>] (driver_probe_device+0x208/0x2fc)
      [<c03507d4>] (driver_probe_device) from [<c035095c>] (__driver_attach+0x94/0x98)
      [<c035095c>] (__driver_attach) from [<c034ec14>] (bus_for_each_dev+0x68/0x9c)
      [<c034ec14>] (bus_for_each_dev) from [<c034fec8>] (bus_add_driver+0x1a0/0x218)
      [<c034fec8>] (bus_add_driver) from [<c035115c>] (driver_register+0x78/0xf8)
      [<c035115c>] (driver_register) from [<c0338488>] (exynos_drm_register_drivers+0x28/0x74)
      [<c0338488>] (exynos_drm_register_drivers) from [<c0338594>] (exynos_drm_init+0x6c/0xc4)
      [<c0338594>] (exynos_drm_init) from [<c00097f4>] (do_one_initcall+0x90/0x1dc)
      [<c00097f4>] (do_one_initcall) from [<c0895e08>] (kernel_init_freeable+0x158/0x1f8)
      [<c0895e08>] (kernel_init_freeable) from [<c063ecac>] (kernel_init+0x8/0xe8)
      [<c063ecac>] (kernel_init) from [<c000f7d0>] (ret_from_fork+0x14/0x24)
      
      This patch replaces mutex_lock with mutex_lock_nested() and uses
      recursion depth to annotate each genpd->lock operation with separate
      lockdep subclass.
      Reported-by: NAnand Moon <linux.amoon@gmail.com>
      Signed-off-by: NMarek Szyprowski <m.szyprowski@samsung.com>
      Tested-by: NAnand Moon <linux.amoon@gmail.com>
      Tested-by: NTobias Jakobi <tjakobi@math.uni-bielefeld.de>
      Acked-by: NUlf Hansson <ulf.hansson@linaro.org>
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      0106ef51
  9. 21 1月, 2016 3 次提交
    • C
      dma-mapping: remove <asm-generic/dma-coherent.h> · 20d666e4
      Christoph Hellwig 提交于
      This wasn't an asm-generic header to start with, and can be merged into
      dma-mapping.h trivially.
      Signed-off-by: NChristoph Hellwig <hch@lst.de>
      Cc: "David S. Miller" <davem@davemloft.net>
      Cc: Aurelien Jacquiot <a-jacquiot@ti.com>
      Cc: Chris Metcalf <cmetcalf@ezchip.com>
      Cc: David Howells <dhowells@redhat.com>
      Cc: Geert Uytterhoeven <geert@linux-m68k.org>
      Cc: Haavard Skinnemoen <hskinnemoen@gmail.com>
      Cc: Hans-Christian Egtvedt <egtvedt@samfundet.no>
      Cc: Helge Deller <deller@gmx.de>
      Cc: James Hogan <james.hogan@imgtec.com>
      Cc: Jesper Nilsson <jesper.nilsson@axis.com>
      Cc: Koichi Yasutake <yasutake.koichi@jp.panasonic.com>
      Cc: Ley Foon Tan <lftan@altera.com>
      Cc: Mark Salter <msalter@redhat.com>
      Cc: Mikael Starvik <starvik@axis.com>
      Cc: Steven Miao <realmz6@gmail.com>
      Cc: Vineet Gupta <vgupta@synopsys.com>
      Cc: Christian Borntraeger <borntraeger@de.ibm.com>
      Cc: Joerg Roedel <jroedel@suse.de>
      Cc: Sebastian Ott <sebott@linux.vnet.ibm.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      20d666e4
    • C
      dma-mapping: make the generic coherent dma mmap implementation optional · 0d4a619b
      Christoph Hellwig 提交于
      This series converts all remaining architectures to use dma_map_ops and
      the generic implementation of the DMA API.  This not only simplifies the
      code a lot, but also prepares for possible future changes like more
      generic non-iommu dma_ops implementations or generic per-device
      dma_map_ops.
      
      This patch (of 16):
      
      We have a couple architectures that do not want to support this code, so
      add another Kconfig symbol that disables the code similar to what we do
      for the nommu case.
      Signed-off-by: NChristoph Hellwig <hch@lst.de>
      Cc: Haavard Skinnemoen <hskinnemoen@gmail.com>
      Cc: Hans-Christian Egtvedt <egtvedt@samfundet.no>
      Cc: Steven Miao <realmz6@gmail.com>
      Cc: Ley Foon Tan <lftan@altera.com>
      Cc: David Howells <dhowells@redhat.com>
      Cc: Koichi Yasutake <yasutake.koichi@jp.panasonic.com>
      Cc: Chris Metcalf <cmetcalf@ezchip.com>
      Cc: "David S. Miller" <davem@davemloft.net>
      Cc: Aurelien Jacquiot <a-jacquiot@ti.com>
      Cc: Geert Uytterhoeven <geert@linux-m68k.org>
      Cc: Helge Deller <deller@gmx.de>
      Cc: James Hogan <james.hogan@imgtec.com>
      Cc: Jesper Nilsson <jesper.nilsson@axis.com>
      Cc: Mark Salter <msalter@redhat.com>
      Cc: Mikael Starvik <starvik@axis.com>
      Cc: Vineet Gupta <vgupta@synopsys.com>
      Cc: Christian Borntraeger <borntraeger@de.ibm.com>
      Cc: Joerg Roedel <jroedel@suse.de>
      Cc: Sebastian Ott <sebott@linux.vnet.ibm.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      0d4a619b
    • R
      drivers/base/cpu.c: use __cpu_*_mask directly · 848e2391
      Rasmus Villemoes 提交于
      The only user of the lvalue-ness of the cpu_*_mask variables is in
      drivers/base/cpu.c, and that is mostly a work-around for the fact that not
      even const variables can be used in static initialization.  Now that the
      underlying struct cpumasks are exposed we can take their address.
      Signed-off-by: NRasmus Villemoes <linux@rasmusvillemoes.dk>
      Acked-by: NRusty Russell <rusty@rustcorp.com.au>
      Acked-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      Cc: Michael Ellerman <mpe@ellerman.id.au>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      848e2391
  10. 16 1月, 2016 1 次提交
  11. 15 1月, 2016 3 次提交
    • J
      drivers/base/memory.c: fix kernel warning during memory hotplug on ppc64 · cb5490a5
      John Allen 提交于
      Fix a bug where a kernel warning is triggered when performing a memory
      hotplug on ppc64.  This warning may also occur on any architecture that
      uses the memory_probe_store interface.
      
        WARNING: at drivers/base/memory.c:200
        CPU: 9 PID: 13042 Comm: systemd-udevd Not tainted 4.4.0-rc4-00113-g0bd0f1e6-dirty #7
        NIP [c00000000055e034] pages_correctly_reserved+0x134/0x1b0
        LR [c00000000055e7f8] memory_subsys_online+0x68/0x140
        Call Trace:
          memory_subsys_online+0x68/0x140
          device_online+0xb4/0x120
          store_mem_state+0xb0/0x180
          dev_attr_store+0x34/0x60
          sysfs_kf_write+0x64/0xa0
          kernfs_fop_write+0x17c/0x1e0
          __vfs_write+0x40/0x160
          vfs_write+0xb8/0x200
          SyS_write+0x60/0x110
          system_call+0x38/0xd0
      
      The warning is triggered because there is a udev rule that automatically
      tries to online memory after it has been added.  The udev rule varies
      from distro to distro, but will generally look something like:
      
        SUBSYSTEM=="memory", ACTION=="add", ATTR{state}=="offline", ATTR{state}="online"
      
      On any architecture that uses memory_probe_store to reserve memory, the
      udev rule will be triggered after the first section of the block is
      reserved and will subsequently attempt to online the entire block,
      interrupting the memory reservation process and causing the warning.
      This patch modifies memory_probe_store to add a block of memory with a
      single call to add_memory as opposed to looping through and adding each
      section individually.  A single call to add_memory is protected by the
      mem_hotplug mutex which will prevent the udev rule from onlining memory
      until the reservation of the entire block is complete.
      Signed-off-by: NJohn Allen <jallen@linux.vnet.ibm.com>
      Acked-by: NDave Hansen <dave.hansen@intel.com>
      Cc: Nathan Fontenot <nfont@linux.vnet.ibm.com>
      Cc: Michael Ellerman <mpe@ellerman.id.au>
      Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      cb5490a5
    • S
      drivers/base/memory.c: rename remove_memory_block() to remove_memory_section() · cc292b0b
      Seth Jennings 提交于
      The function removes a section, not a block.  Rename to reflect actual
      functionality.
      Signed-off-by: NSeth Jennings <sjennings@variantweb.net>
      Cc: Andrew Banman <abanman@sgi.com>
      Cc: Daniel J Blueman <daniel@numascale.com>
      Cc: Yinghai Lu <yinghai@kernel.org>
      Cc: Greg KH <greg@kroah.com>
      Cc: Russ Anderson <rja@sgi.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      cc292b0b
    • S
      drivers/base/memory.c: clean up section counting · 56c6b5d3
      Seth Jennings 提交于
      Right now, section_count is calculated in add_memory_block().  However,
      init_memory_block() increments section_count as well, which, at first,
      seems like it would lead to an off-by-one error.  There is no harm done
      because add_memory_block() immediately overwrites the
      mem->section_count, but it is messy.
      
      This commit moves the increment out of the common init_memory_block()
      (called by both add_memory_block() and register_new_memory()) and adds
      it to register_new_memory().
      Signed-off-by: NSeth Jennings <sjennings@variantweb.net>
      Cc: Andrew Banman <abanman@sgi.com>
      Cc: Daniel J Blueman <daniel@numascale.com>
      Cc: Yinghai Lu <yinghai@kernel.org>
      Cc: Greg KH <greg@kroah.com>
      Cc: Russ Anderson <rja@sgi.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      56c6b5d3
  12. 12 1月, 2016 2 次提交
  13. 08 1月, 2016 5 次提交
    • T
      PM / sleep: Go direct_complete if driver has no callbacks · aa8e54b5
      Tomeu Vizoso 提交于
      If a suitable prepare callback cannot be found for a given device and
      its driver has no PM callbacks at all, assume that it can go direct to
      complete when the system goes to sleep.
      
      The reason for this is that there's lots of devices in a system that do
      no PM at all and there's no reason for them to prevent their ancestors
      to do direct_complete if they can support it.
      Signed-off-by: NTomeu Vizoso <tomeu.vizoso@collabora.com>
      Reviewed-by: NUlf Hansson <ulf.hansson@linaro.org>
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      aa8e54b5
    • T
      PM / Domains: add setter for dev.pm_domain · 989561de
      Tomeu Vizoso 提交于
      Adds a function that sets the pointer to dev_pm_domain in struct device
      and that warns if the device has already finished probing. The reason
      why we want to enforce that is because in the general case that can
      cause problems and also that we can simplify code quite a bit if we can
      always assume that.
      
      This patch also changes all current code that directly sets the
      dev.pm_domain pointer.
      Signed-off-by: NTomeu Vizoso <tomeu.vizoso@collabora.com>
      Reviewed-by: NUlf Hansson <ulf.hansson@linaro.org>
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      989561de
    • T
      device core: add device_is_bound() · 6b9cb427
      Tomeu Vizoso 提交于
      Adds a function that tells whether a device is already bound to a
      driver.
      
      This is needed to warn when there is an attempt to change the PM domain
      of a device that has finished probing already. The reason why we want to
      enforce that is because in the general case that can cause problems and
      also that we can simplify code quite a bit if we can always assume that.
      Signed-off-by: NTomeu Vizoso <tomeu.vizoso@collabora.com>
      Reviewed-by: NUlf Hansson <ulf.hansson@linaro.org>
      Acked-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      6b9cb427
    • A
      PM / clk: don't leave clocks enabled when driver not bound · d35818a9
      Andy Shevchenko 提交于
      There is a new notification BUS_NOTIFY_DRIVER_NOT_BOUND that is issued when
      driver fails during binding. In such case pm_clk_notify(), when PM_CLK=n,
      leaves clocks enabled. Undo operations that have been done in
      BUS_NOTIFY_BIND_DRIVER case.
      Signed-off-by: NAndy Shevchenko <andriy.shevchenko@linux.intel.com>
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      d35818a9
    • B
      firmware: actually return NULL on failed request_firmware_nowait() · 715780ae
      Brian Norris 提交于
      The kerneldoc for request_firmware_nowait() says that it may call the
      provided cont() callback with @fw == NULL, if the firmware request
      fails. However, this is not the case when called with an empty string
      (""). This case is short-circuited by the 'name[0] == '\0'' check
      introduced in commit 471b095d ("firmware_class: make sure fw requests
      contain a name"), so _request_firmware() never gets to set the fw to
      NULL.
      
      Noticed while using the new 'trigger_async_request' testing hook:
      
          # printf '\x00' > /sys/devices/virtual/misc/test_firmware/trigger_async_request
          [10553.726178] test_firmware: loading ''
          [10553.729859] test_firmware: loaded: 995209091
          # printf '\x00' > /sys/devices/virtual/misc/test_firmware/trigger_async_request
          [10733.676184] test_firmware: loading ''
          [10733.679855] Unable to handle kernel NULL pointer dereference at virtual address 00000004
          [10733.687951] pgd = ec188000
          [10733.690655] [00000004] *pgd=00000000
          [10733.694240] Internal error: Oops: 5 [#1] SMP ARM
          [10733.698847] Modules linked in: btmrvl_sdio btmrvl bluetooth sbs_battery nf_conntrack_ipv6 nf_defrag_ipv6 ip6table_filter ip6_tables asix usbnet mwifiex_sdio mwifiex cfg80211 jitterentropy_rng drbg joydev snd_seq_midi snd_seq_midi_event snd_rawmidi snd_seq snd_seq_device ppp_async ppp_generic slhc tun
          [10733.725670] CPU: 0 PID: 6600 Comm: bash Not tainted 4.4.0-rc4-00351-g63d0877 #178
          [10733.733137] Hardware name: Rockchip (Device Tree)
          [10733.737831] task: ed24f6c0 ti: ee322000 task.ti: ee322000
          [10733.743222] PC is at do_raw_spin_lock+0x18/0x1a0
          [10733.747831] LR is at _raw_spin_lock+0x18/0x1c
          [10733.752180] pc : [<c00653a0>]    lr : [<c054c204>]    psr: a00d0013
          [10733.752180] sp : ee323df8  ip : ee323e20  fp : ee323e1c
          [10733.763634] r10: 00000051  r9 : b6f18000  r8 : ee323f80
          [10733.768847] r7 : c089cebc  r6 : 00000001  r5 : 00000000  r4 : ec0e6000
          [10733.775360] r3 : dead4ead  r2 : c06bd140  r1 : eef913b4  r0 : 00000000
          [10733.781874] Flags: NzCv  IRQs on  FIQs on  Mode SVC_32  ISA ARM  Segment none
          [10733.788995] Control: 10c5387d  Table: 2c18806a  DAC: 00000051
          [10733.794728] Process bash (pid: 6600, stack limit = 0xee322218)
          [10733.800549] Stack: (0xee323df8 to 0xee324000)
          [10733.804896] 3de0:                                                       ec0e6000 00000000
          [10733.813059] 3e00: 00000001 c089cebc ee323f80 b6f18000 ee323e2c ee323e20 c054c204 c0065394
          [10733.821221] 3e20: ee323e44 ee323e30 c02fec60 c054c1f8 ec0e7ec0 ec3fcfc0 ee323e5c ee323e48
          [10733.829384] 3e40: c02fed08 c02fec48 c07dbf74 eeb05a00 ee323e8c ee323e60 c0253828 c02fecac
          [10733.837547] 3e60: 00000001 c0116950 ee323eac ee323e78 00000001 ec3fce00 ed2d9700 ed2d970c
          [10733.845710] 3e80: ee323e9c ee323e90 c02e873c c02537d4 ee323eac ee323ea0 c017bd40 c02e8720
          [10733.853873] 3ea0: ee323ee4 ee323eb0 c017b250 c017bd00 00000000 00000000 f3e47a54 ec128b00
          [10733.862035] 3ec0: c017b10c ee323f80 00000001 c000f504 ee322000 00000000 ee323f4c ee323ee8
          [10733.870197] 3ee0: c011b71c c017b118 ee323fb0 c011bc90 becfa8d9 00000001 ec128b00 00000001
          [10733.878359] 3f00: b6f18000 ee323f80 ee323f4c ee323f18 c011bc90 c0063950 ee323f3c ee323f28
          [10733.886522] 3f20: c0063950 c0549138 00000001 ec128b00 00000001 ec128b00 b6f18000 ee323f80
          [10733.894684] 3f40: ee323f7c ee323f50 c011bed8 c011b6ec c0135fb8 c0135f24 ec128b00 ec128b00
          [10733.902847] 3f60: 00000001 b6f18000 c000f504 ee322000 ee323fa4 ee323f80 c011c664 c011be24
          [10733.911009] 3f80: 00000000 00000000 00000001 b6f18000 b6e79be0 00000004 00000000 ee323fa8
          [10733.919172] 3fa0: c000f340 c011c618 00000001 b6f18000 00000001 b6f18000 00000001 00000000
          [10733.927334] 3fc0: 00000001 b6f18000 b6e79be0 00000004 00000001 00000001 8068a3f1 b6e79c84
          [10733.935496] 3fe0: 00000000 becfa7dc b6de194d b6e20246 400d0030 00000001 7a4536e8 49bda390
          [10733.943664] [<c00653a0>] (do_raw_spin_lock) from [<c054c204>] (_raw_spin_lock+0x18/0x1c)
          [10733.951743] [<c054c204>] (_raw_spin_lock) from [<c02fec60>] (fw_free_buf+0x24/0x64)
          [10733.959388] [<c02fec60>] (fw_free_buf) from [<c02fed08>] (release_firmware+0x68/0x74)
          [10733.967207] [<c02fed08>] (release_firmware) from [<c0253828>] (trigger_async_request_store+0x60/0x124)
          [10733.976501] [<c0253828>] (trigger_async_request_store) from [<c02e873c>] (dev_attr_store+0x28/0x34)
          [10733.985533] [<c02e873c>] (dev_attr_store) from [<c017bd40>] (sysfs_kf_write+0x4c/0x58)
          [10733.993437] [<c017bd40>] (sysfs_kf_write) from [<c017b250>] (kernfs_fop_write+0x144/0x1a8)
          [10734.001689] [<c017b250>] (kernfs_fop_write) from [<c011b71c>] (__vfs_write+0x3c/0xe4)
      
      After this patch:
      
          # printf '\x00' > /sys/devices/virtual/misc/test_firmware/trigger_async_request
          [   32.126322] test_firmware: loading ''
          [   32.129995] test_firmware: failed to async load firmware
          -bash: printf: write error: No such device
      
      Fixes: 471b095d ("firmware_class: make sure fw requests contain a name")
      Signed-off-by: NBrian Norris <computersforpeace@gmail.com>
      Acked-by: NMing Lei <ming.lei@canonical.com>
      Acked-by: NKees Cook <keescook@chromium.org>
      Signed-off-by: NShuah Khan <shuahkh@osg.samsung.com>
      715780ae
  14. 07 1月, 2016 1 次提交
    • S
      driver-core: platform: Add platform_irq_count() · 4b83555d
      Stephen Boyd 提交于
      A recent patch added calls to of_irq_count() in the qcom pinctrl
      drivers and that caused module build failures because
      of_irq_count() is not an exported symbol. We shouldn't export
      of_irq_count() to modules because it's an internal OF API that
      shouldn't be used by drivers. Platform drivers should use
      platform device APIs instead. Therefore, add a platform_irq_count()
      API that mirrors the of_irq_count() API so that platform drivers
      can stay DT agnostic.
      
      Cc: Andy Gross <andy.gross@linaro.org>
      Acked-by: NRob Herring <robh@kernel.org>
      Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org
      Signed-off-by: NStephen Boyd <sboyd@codeaurora.org>
      Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
      4b83555d
  15. 06 1月, 2016 3 次提交
  16. 02 1月, 2016 2 次提交
  17. 01 1月, 2016 2 次提交
  18. 29 12月, 2015 1 次提交
  19. 28 12月, 2015 1 次提交
  20. 21 12月, 2015 1 次提交
  21. 16 12月, 2015 4 次提交
    • M
      platform-msi: Allow creation of a MSI-based stacked irq domain · 552c494a
      Marc Zyngier 提交于
      We almost have all the needed bits requiredable to create a irq domain
      on top of a MSI domain.
      
      For this, we enable a few things:
      - the virq is stored in the msi_desc
      - device, msi_alloc_info and domain-specific data
        are stored in the platform_priv_data structure
      - we introduce a new API for platform-msi:
      
        /* Create a MSI-based domain */
        struct irq_domain *
        platform_msi_create_device_domain(struct device *dev,
                                          unsigned int nvec,
                                          irq_write_msi_msg_t write_msi_msg,
                                          const struct irq_domain_ops *ops,
                                          void *host_data);
      
        /* Allocate MSIs in an MSI domain */
        int platform_msi_domain_alloc(struct irq_domain *domain,
      				unsigned int virq,
      				unsigned int nr_irqs);
      
        /* Free MSIs from an MSI domain */
        void platform_msi_domain_free(struct irq_domain *domain,
      				unsigned int virq,
      				unsigned int nvec);
      
        /* Obtain the host data passed to platform_msi_create_device_domain */
        void *platform_msi_get_host_data(struct irq_domain *domain);
      
      platform_msi_create_device_domain() is a hybrid of irqdomain creation
      and interrupt allocation, creating a domain backed by the MSIs associated
      to a device. IRQs can then be allocated in that domain using
      platform_msi_domain_alloc().
      
      This now allows a wired irq to MSI bridge to be created.
      Signed-off-by: NMarc Zyngier <marc.zyngier@arm.com>
      552c494a
    • M
      platform-msi: Factor out allocation/free of private data · 72f57f2f
      Marc Zyngier 提交于
      As we're going to have multiple paths to allocate/free the
      platform-msi private data, factor this out into separate
      utility functions.
      Signed-off-by: NMarc Zyngier <marc.zyngier@arm.com>
      72f57f2f
    • M
      platform-msi: Allow MSIs to be allocated in chunks · ab6484ee
      Marc Zyngier 提交于
      MSIs for a given device are normally all allocated in one go.
      Make sure the internal code can allocate them one at a time
      if required.
      Signed-off-by: NMarc Zyngier <marc.zyngier@arm.com>
      ab6484ee
    • X
      regmap: use IS_ALIGNED instead of % to improve the performance · fcac0233
      Xiubo Li 提交于
      The stride value should always equal to 2^n, so we can use bit
      rotation instead of % to improve the performance.
      Signed-off-by: NXiubo Li <lixiubo@cmss.chinamobile.com>
      Signed-off-by: NMark Brown <broonie@kernel.org>
      fcac0233