1. 16 9月, 2015 4 次提交
  2. 15 9月, 2015 9 次提交
    • G
      irqchip/renesas-irqc: Propagate wake-up settings to parent · 4cd7863e
      Geert Uytterhoeven 提交于
      The renesas-irqc interrupt controller is cascaded to the GIC, but its
      driver doesn't propagate wake-up settings to the parent interrupt
      controller.
      
      Since commit aec89ef7 ("irqchip/gic: Enable SKIP_SET_WAKE and
      MASK_ON_SUSPEND"), the GIC driver masks interrupts during suspend, and
      wake-up through gpio-keys now fails on r8a73a4/ape6evm.
      
      Fix this by propagating wake-up settings to the parent interrupt
      controller. There's no need to handle irq_set_irq_wake() failures, as
      the renesas-irqc interrupt controller is always cascaded to a GIC, and
      the GIC driver always sets SKIP_SET_WAKE since the aforementioned
      commit.
      Signed-off-by: NGeert Uytterhoeven <geert+renesas@glider.be>
      Cc: Sudeep Holla <sudeep.holla@arm.com>
      Cc: Magnus Damm <magnus.damm@gmail.com>
      Cc: Jason Cooper <jason@lakedaemon.net>
      Cc: Marc Zyngier <marc.zyngier@arm.com>
      Link: http://lkml.kernel.org/r/1441731636-17610-3-git-send-email-geert%2Brenesas@glider.beSigned-off-by: NThomas Gleixner <tglx@linutronix.de>
      4cd7863e
    • G
      irqchip/renesas-intc-irqpin: Propagate wake-up settings to parent · f4e209cd
      Geert Uytterhoeven 提交于
      The renesas-intc-irqpin interrupt controller is cascaded to the GIC, but
      its driver doesn't propagate wake-up settings to the parent interrupt
      controller.
      
      Since commit aec89ef7 ("irqchip/gic: Enable SKIP_SET_WAKE and
      MASK_ON_SUSPEND"), the GIC driver masks interrupts during suspend, and
      wake-up through gpio-keys now fails on r8a7740/armadillo and
      sh73a0/kzm9g.
      
      Fix this by propagating wake-up settings to the parent interrupt
      controller. There's no need to handle irq_set_irq_wake() failures, as
      the renesas-intc-irqpin interrupt controller is always cascaded to a
      GIC, and the GIC driver always sets SKIP_SET_WAKE since the
      aforementioned commit.
      Signed-off-by: NGeert Uytterhoeven <geert+renesas@glider.be>
      Cc: Sudeep Holla <sudeep.holla@arm.com>
      Cc: Magnus Damm <magnus.damm@gmail.com>
      Cc: Jason Cooper <jason@lakedaemon.net>
      Cc: Marc Zyngier <marc.zyngier@arm.com>
      Link: http://lkml.kernel.org/r/1441731636-17610-2-git-send-email-geert%2Brenesas@glider.beSigned-off-by: NThomas Gleixner <tglx@linutronix.de>
      f4e209cd
    • G
      irqchip/renesas-intc-irqpin: Use a separate lockdep class · 769b5cf7
      Geert Uytterhoeven 提交于
      The renesas-intc-irqpin interrupt controller is cascaded to the GIC.
      Hence when propagating wake-up settings to its parent interrupt
      controller, the following lockdep warning is printed:
      
          =============================================
          [ INFO: possible recursive locking detected ]
          4.2.0-armadillo-10725-g50fcd7643c034198 #781 Not tainted
          ---------------------------------------------
          s2ram/1179 is trying to acquire lock:
          (&irq_desc_lock_class){-.-...}, at: [<c005bb54>] __irq_get_desc_lock+0x78/0x94
      
          but task is already holding lock:
          (&irq_desc_lock_class){-.-...}, at: [<c005bb54>] __irq_get_desc_lock+0x78/0x94
      
          other info that might help us debug this:
          Possible unsafe locking scenario:
      
      	  CPU0
      	  ----
           lock(&irq_desc_lock_class);
           lock(&irq_desc_lock_class);
      
          *** DEADLOCK ***
      
          May be due to missing lock nesting notation
      
          7 locks held by s2ram/1179:
          #0:  (sb_writers#7){.+.+.+}, at: [<c00c9708>] __sb_start_write+0x64/0xb8
          #1:  (&of->mutex){+.+.+.}, at: [<c0125a00>] kernfs_fop_write+0x78/0x1a0
          #2:  (s_active#23){.+.+.+}, at: [<c0125a08>] kernfs_fop_write+0x80/0x1a0
          #3:  (autosleep_lock){+.+.+.}, at: [<c0058244>] pm_autosleep_lock+0x18/0x20
          #4:  (pm_mutex){+.+.+.}, at: [<c0057e50>] pm_suspend+0x54/0x248
          #5:  (&dev->mutex){......}, at: [<c0243a20>] __device_suspend+0xdc/0x240
          #6:  (&irq_desc_lock_class){-.-...}, at: [<c005bb54>] __irq_get_desc_lock+0x78/0x94
      
          stack backtrace:
          CPU: 0 PID: 1179 Comm: s2ram Not tainted 4.2.0-armadillo-10725-g50fcd7643c034198
      
          Hardware name: Generic R8A7740 (Flattened Device Tree)
          [<c00129f4>] (dump_backtrace) from [<c0012bec>] (show_stack+0x18/0x1c)
          [<c0012bd4>] (show_stack) from [<c03f5d94>] (dump_stack+0x20/0x28)
          [<c03f5d74>] (dump_stack) from [<c00514d4>] (__lock_acquire+0x67c/0x1b88)
          [<c0050e58>] (__lock_acquire) from [<c0052df8>] (lock_acquire+0x9c/0xbc)
          [<c0052d5c>] (lock_acquire) from [<c03fb068>] (_raw_spin_lock_irqsave+0x44/0x58)
          [<c03fb024>] (_raw_spin_lock_irqsave) from [<c005bb54>] (__irq_get_desc_lock+0x78/0x94
          [<c005badc>] (__irq_get_desc_lock) from [<c005c3d8>] (irq_set_irq_wake+0x28/0x100)
          [<c005c3b0>] (irq_set_irq_wake) from [<c01e50d0>] (intc_irqpin_irq_set_wake+0x24/0x4c)
          [<c01e50ac>] (intc_irqpin_irq_set_wake) from [<c005c17c>] (set_irq_wake_real+0x3c/0x50
          [<c005c140>] (set_irq_wake_real) from [<c005c414>] (irq_set_irq_wake+0x64/0x100)
          [<c005c3b0>] (irq_set_irq_wake) from [<c02a19b4>] (gpio_keys_suspend+0x60/0xa0)
          [<c02a1954>] (gpio_keys_suspend) from [<c023b750>] (platform_pm_suspend+0x3c/0x5c)
      
      Avoid this false positive by using a separate lockdep class for INTC
      External IRQ Pin interrupts.
      Signed-off-by: NGeert Uytterhoeven <geert+renesas@glider.be>
      Cc: Grygorii Strashko <grygorii.strashko@ti.com>
      Cc: Magnus Damm <magnus.damm@gmail.com>
      Cc: Jason Cooper <jason@lakedaemon.net>
      Link: http://lkml.kernel.org/r/1441798974-25716-3-git-send-email-geert%2Brenesas@glider.beSigned-off-by: NThomas Gleixner <tglx@linutronix.de>
      769b5cf7
    • G
      irqchip/renesas-irqc: Use a separate lockdep class · b1370658
      Geert Uytterhoeven 提交于
      The renesas-irqc interrupt controller is cascaded to the GIC. Hence when
      propagating wake-up settings to its parent interrupt controller, the
      following lockdep warning is printed:
      
          =============================================
          [ INFO: possible recursive locking detected ]
          4.2.0-ape6evm-10725-g50fcd7643c034198 #280 Not tainted
          ---------------------------------------------
          s2ram/1072 is trying to acquire lock:
          (&irq_desc_lock_class){-.-...}, at: [<c008d3fc>] __irq_get_desc_lock+0x58/0x98
      
          but task is already holding lock:
          (&irq_desc_lock_class){-.-...}, at: [<c008d3fc>] __irq_get_desc_lock+0x58/0x98
      
          other info that might help us debug this:
          Possible unsafe locking scenario:
      
      	  CPU0
      	  ----
           lock(&irq_desc_lock_class);
           lock(&irq_desc_lock_class);
      
          *** DEADLOCK ***
      
          May be due to missing lock nesting notation
      
          6 locks held by s2ram/1072:
          #0:  (sb_writers#7){.+.+.+}, at: [<c012eb14>] __sb_start_write+0xa0/0xa8
          #1:  (&of->mutex){+.+.+.}, at: [<c019396c>] kernfs_fop_write+0x4c/0x1bc
          #2:  (s_active#24){.+.+.+}, at: [<c0193974>] kernfs_fop_write+0x54/0x1bc
          #3:  (pm_mutex){+.+.+.}, at: [<c008213c>] pm_suspend+0x10c/0x510
          #4:  (&dev->mutex){......}, at: [<c02af3c4>] __device_suspend+0xdc/0x2cc
          #5:  (&irq_desc_lock_class){-.-...}, at: [<c008d3fc>] __irq_get_desc_lock+0x58/0x98
      
          stack backtrace:
          CPU: 0 PID: 1072 Comm: s2ram Not tainted 4.2.0-ape6evm-10725-g50fcd7643c034198 #280
          Hardware name: Generic R8A73A4 (Flattened Device Tree)
          [<c0018078>] (unwind_backtrace) from [<c00144f0>] (show_stack+0x10/0x14)
          [<c00144f0>] (show_stack) from [<c0451f14>] (dump_stack+0x88/0x98)
          [<c0451f14>] (dump_stack) from [<c007b29c>] (__lock_acquire+0x15cc/0x20e4)
          [<c007b29c>] (__lock_acquire) from [<c007c6e0>] (lock_acquire+0xac/0x12c)
          [<c007c6e0>] (lock_acquire) from [<c0457c00>] (_raw_spin_lock_irqsave+0x40/0x54)
          [<c0457c00>] (_raw_spin_lock_irqsave) from [<c008d3fc>] (__irq_get_desc_lock+0x58/0x98)
          [<c008d3fc>] (__irq_get_desc_lock) from [<c008ebbc>] (irq_set_irq_wake+0x20/0xf8)
          [<c008ebbc>] (irq_set_irq_wake) from [<c0260770>] (irqc_irq_set_wake+0x20/0x4c)
          [<c0260770>] (irqc_irq_set_wake) from [<c008ec28>] (irq_set_irq_wake+0x8c/0xf8)
          [<c008ec28>] (irq_set_irq_wake) from [<c02cb8c0>] (gpio_keys_suspend+0x74/0xc0)
          [<c02cb8c0>] (gpio_keys_suspend) from [<c02ae8cc>] (dpm_run_callback+0x54/0x124)
      
      Avoid this false positive by using a separate lockdep class for IRQC
      interrupts.
      Signed-off-by: NGeert Uytterhoeven <geert+renesas@glider.be>
      Cc: Grygorii Strashko <grygorii.strashko@ti.com>
      Cc: Magnus Damm <magnus.damm@gmail.com>
      Cc: Jason Cooper <jason@lakedaemon.net>
      Link: http://lkml.kernel.org/r/1441798974-25716-2-git-send-email-geert%2Brenesas@glider.beSigned-off-by: NThomas Gleixner <tglx@linutronix.de>
      b1370658
    • P
      irqchip/GICv2m: Fix GICv2m build warning on 32 bits · 157add60
      Pavel Fedin 提交于
      After GICv2m was enabled for 32-bit ARM kernel, a warning popped up:
      
      drivers/irqchip/irq-gic-v2m.c: In function gicv2m_compose_msi_msg:
      drivers/irqchip/irq-gic-v2m.c:100:2: warning: right shift count >= width
      of type [enabled by default]
        msg->address_hi = (u32) (addr >> 32);
        ^
      
      This patch fixes it by using proper macros for splitting up the value.
      Signed-off-by: NPavel Fedin <p.fedin@samsung.com>
      Reviewed-by: NMarc Zyngier <marc.zyngier@arm.com>
      Signed-off-by: NMarc Zyngier <marc.zyngier@arm.com>
      Cc: linux-arm-kernel@lists.infradead.org
      Cc: Stuart Yoder <stuart.yoder@freescale.com>
      Cc: Jason Cooper <jason@lakedaemon.net>
      Link: http://lkml.kernel.org/r/1442142873-20213-4-git-send-email-marc.zyngier@arm.comSigned-off-by: NThomas Gleixner <tglx@linutronix.de>
      157add60
    • M
      irqchip/gic-v3-its: Add missing cache flushes · 5a9a8915
      Marc Zyngier 提交于
      When the ITS is configured for non-cacheable transactions, make sure
      that the allocated, zeroed memory is flushed to the Point of
      Coherency, allowing the ITS to observe the zeros instead of random
      garbage (or even get its own data overwritten by zeros being evicted
      from the cache...).
      
      Fixes: 241a386c "irqchip: gicv3-its: Use non-cacheable accesses when no shareability"
      Reported-and-tested-by: NStuart Yoder <stuart.yoder@freescale.com>
      Signed-off-by: NMarc Zyngier <marc.zyngier@arm.com>
      Cc: linux-arm-kernel@lists.infradead.org
      Cc: Pavel Fedin <p.fedin@samsung.com>
      Cc: Jason Cooper <jason@lakedaemon.net>
      Link: http://lkml.kernel.org/r/1442142873-20213-3-git-send-email-marc.zyngier@arm.comSigned-off-by: NThomas Gleixner <tglx@linutronix.de>
      5a9a8915
    • M
      irqchip/GIC: Add workaround for aliased GIC400 · 12e14066
      Marc Zyngier 提交于
      The GICv2 architecture mandates that the two 4kB GIC regions are
      contiguous, and on two separate physical pages (so that access to
      the second page can be trapped by a hypervisor). This doesn't work
      very well when PAGE_SIZE is 64kB.
      
      A relatively common hack^Wway to work around this is to alias each
      4kB region over its own 64kB page. Of course in this case, the base
      address you want to use is not really the begining of the region,
      but base + 60kB (so that you get a contiguous 8kB region over two
      distinct pages).
      
      Normally, this would be described in DT with a new property, but
      some HW is already out there, and the firmware makes sure that
      it will override whatever you put in the GIC node. Duh. And of course,
      said firmware source code is not available, despite being based
      on u-boot.
      
      The workaround is to detect the case where the CPU interface size
      is set to 128kB, and verify the aliasing by checking that the ID
      register for GIC400 (which is the only GIC wired this way so far)
      is the same at base and base + 0xF000. In this case, we update
      the GIC base address and let it roll.
      
      And if you feel slightly sick by looking at this, rest assured that
      I do too...
      Reported-by: NJulien Grall <julien.grall@citrix.com>
      Signed-off-by: NMarc Zyngier <marc.zyngier@arm.com>
      Cc: linux-arm-kernel@lists.infradead.org
      Cc: Stuart Yoder <stuart.yoder@freescale.com>
      Cc: Pavel Fedin <p.fedin@samsung.com>
      Cc: Jason Cooper <jason@lakedaemon.net>
      Link: http://lkml.kernel.org/r/1442142873-20213-2-git-send-email-marc.zyngier@arm.comSigned-off-by: NThomas Gleixner <tglx@linutronix.de>
      12e14066
    • M
      platform-msi: Do not cache msi_desc in handler_data · e4084a16
      Marc Zyngier 提交于
      The current implementation of platform MSI caches the msi_desc
      pointer in irq_data::handler_data. This is a bit silly, as
      we also have irq_data::msi_desc, which is perfectly valid.
      
      Remove the useless assignment and simplify the whole flow.
      Reported-by: NMa Jun <majun258@huawei.com>
      Signed-off-by: NMarc Zyngier <marc.zyngier@arm.com>
      Reviewed-by: NJiang Liu <jiang.liu@linux.intel.com>
      Link: http://lkml.kernel.org/r/1442147824-20971-1-git-send-email-marc.zyngier@arm.comSigned-off-by: NThomas Gleixner <tglx@linutronix.de>
      e4084a16
    • T
      net/mlx4_en: Use access helper irq_data_get_affinity_mask() · dc2ec62f
      Thomas Gleixner 提交于
      This is a preparatory patch for moving irq_data struct members. Search
      and replace was done with coccinelle
      Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
      Cc: Julia Lawall <Julia.Lawall@lip6.fr>
      Cc: Jiang Liu <jiang.liu@linux.intel.com>
      Cc: Amir Vadai <amirv@mellanox.com>
      dc2ec62f
  3. 14 9月, 2015 2 次提交
  4. 12 9月, 2015 3 次提交
    • L
      thermal: fix intel PCH thermal driver mismerge · dfb22fc5
      Linus Torvalds 提交于
      I didn't notice this when merging the thermal code from Zhang, but his
      merge (commit 5a924a07: "Merge branches 'thermal-core' and
      'thermal-intel' of .git into next") of the thermal-core and
      thermal-intel branches was wrong.
      
      In thermal-core, commit 17e8351a ("thermal: consistently use int for
      temperatures") converted the thermal layer to use "int" for
      temperatures.
      
      But in parallel, in the thermal-intel branch commit d0a12625
      ("thermal: Add Intel PCH thermal driver") added support for the intel
      PCH thermal sensor using the old interfaces that used "unsigned long"
      pointers.
      
      This resulted in warnings like this:
      
        drivers/thermal/intel_pch_thermal.c:184:14: warning: initialization from incompatible pointer type [-Wincompatible-pointer-types]
          .get_temp = pch_thermal_get_temp,
                      ^
        drivers/thermal/intel_pch_thermal.c:184:14: note: (near initialization for ‘tzd_ops.get_temp’)
        drivers/thermal/intel_pch_thermal.c:186:19: warning: initialization from incompatible pointer type [-Wincompatible-pointer-types]
          .get_trip_temp = pch_get_trip_temp,
                           ^
        drivers/thermal/intel_pch_thermal.c:186:19: note: (near initialization for ‘tzd_ops.get_trip_temp’)
      
      This fixes it.
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      dfb22fc5
    • J
      fs/seq_file: convert int seq_vprint/seq_printf/etc... returns to void · 6798a8ca
      Joe Perches 提交于
      The seq_<foo> function return values were frequently misused.
      
      See: commit 1f33c41c ("seq_file: Rename seq_overflow() to
           seq_has_overflowed() and make public")
      
      All uses of these return values have been removed, so convert the
      return types to void.
      
      Miscellanea:
      
      o Move seq_put_decimal_<type> and seq_escape prototypes closer the
        other seq_vprintf prototypes
      o Reorder seq_putc and seq_puts to return early on overflow
      o Add argument names to seq_vprintf and seq_printf
      o Update the seq_escape kernel-doc
      o Convert a couple of leading spaces to tabs in seq_escape
      Signed-off-by: NJoe Perches <joe@perches.com>
      Cc: Al Viro <viro@ZenIV.linux.org.uk>
      Cc: Steven Rostedt <rostedt@goodmis.org>
      Cc: Mark Brown <broonie@kernel.org>
      Cc: Stephen Rothwell <sfr@canb.auug.org.au>
      Cc: Joerg Roedel <jroedel@suse.de>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      6798a8ca
    • C
      scsi_dh: fix randconfig build error · 294ab783
      Christoph Hellwig 提交于
      It looks like the Kconfig check that was meant to fix this (commit
      fe9233fb [SCSI] scsi_dh: fix kconfig related
      build errors) was actually reversed, but no-one noticed until the new set of
      patches which separated DM and SCSI_DH).
      
      Fixes: fe9233fbSigned-off-by: NChristoph Hellwig <hch@lst.de>
      Tested-by: NMike Snitzer <snitzer@redhat.com>
      Signed-off-by: NJames Bottomley <JBottomley@Odin.com>
      294ab783
  5. 11 9月, 2015 21 次提交
  6. 10 9月, 2015 1 次提交