1. 28 Jul, 2014 3 commits
    • Andy Whitcroft's avatar
      ACPI / resources: only reject zero length resources based at address zero · cff58058
      Andy Whitcroft authored
      commit 867f9d46 upstream.
      
      The recently merged change (in v3.14-rc6) to ACPI resource detection
      (below) causes all zero length ACPI resources to be elided from the
      table:
      
        commit b355cee8
        Author: Zhang Rui <rui.zhang@intel.com>
        Date:   Thu Feb 27 11:37:15 2014 +0800
      
          ACPI / resources: ignore invalid ACPI device resources
      
      This change has caused a regression in (at least) serial port detection
      for a number of machines (see LP#1313981 [1]).  These seem to represent
      their IO regions (presumably incorrectly) as a zero length region.
      Reverting the above commit restores these serial devices.
      
      Only elide zero length resources which lie at address 0.
      
      Fixes: b355cee8 (ACPI / resources: ignore invalid ACPI device resources)
      Signed-off-by: default avatarAndy Whitcroft <apw@canonical.com>
      Acked-by: default avatarZhang Rui <rui.zhang@intel.com>
      Cc: 3.14+ <stable@vger.kernel.org> # 3.14+
      Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
      Signed-off-by: default avatarJiri Slaby <jslaby@suse.cz>
      cff58058
    • Daniel Thompson's avatar
      serial: sirf: Fix compilation failure · a2c27add
      Daniel Thompson authored
      commit 58eb97c9 upstream.
      
      After 07d410e0) serial: sirf: fix spinlock deadlock issue it is no longer
      possiblet to compile this driver. The rename of one of the spinlocks is
      faulty. After looking at the original patch I believe this is the correct
      fix.
      
      Compile tested using ARM's multi_v7_defconfig
      Reported-by: default avatarStephen Rothwell <sfr@canb.auug.org.au>
      Cc: Jiri Slaby <jslaby@suse.cz>
      Cc: Qipan Li <Qipan.Li@csr.com>
      Signed-off-by: default avatarDaniel Thompson <daniel.thompson@linaro.org>
      Acked-by: default avatarBarry Song <baohua@kernel.org>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      Signed-off-by: default avatarJiri Slaby <jslaby@suse.cz>
      a2c27add
    • Qipan Li's avatar
      serial: sirf: fix spinlock deadlock issue · 67aedbd9
      Qipan Li authored
      commit 07d410e0 upstream.
      
      commit fb78b811 provide a workaround for
      kernel panic, but bring potential deadlock risk. that is in
      sirfsoc_rx_tmo_process_tl while enter into sirfsoc_uart_pio_rx_chars
      cpu hold uart_port->lock, if uart interrupt comes cpu enter into
      sirfsoc_uart_isr and deadlock occurs in getting uart_port->lock.
      
      the patch replace spin_lock version to spin_lock_irq* version to avoid
      spinlock dead lock issue. let function tty_flip_buffer_push in tasklet
      outof spin_lock_irq* protect area to avoid add the pair of spin_lock and
      spin_unlock for tty_flip_buffer_push.
      BTW drop self defined unused spinlock protect of tx_lock/rx_lock.
      
      56274.220464] BUG: spinlock lockup suspected on CPU#0, swapper/0/0
      [56274.223648]  lock: 0xc05d9db0, .magic: dead4ead, .owner: swapper/0/0,
      	.owner_cpu: 0
      	[56274.231278] CPU: 0 PID: 0 Comm: swapper/0 Tainted: G
      	O 3.10.35 #1
      	[56274.238241] [<c0015530>] (unwind_backtrace+0x0/0xf4) from
      	[<c00120d8>] (show_stack+0x10/0x14)
      	[56274.246742] [<c00120d8>] (show_stack+0x10/0x14) from
      	[<c01b11b0>] (do_raw_spin_lock+0x110/0x184)
      	[56274.255501] [<c01b11b0>] (do_raw_spin_lock+0x110/0x184) from
      	[<c02124c8>] (sirfsoc_uart_isr+0x20/0x42c)
      	[56274.264874] [<c02124c8>] (sirfsoc_uart_isr+0x20/0x42c) from
      	[<c0075790>] (handle_irq_event_percpu+0x54/0x17c)
      	[56274.274758] [<c0075790>] (handle_irq_event_percpu+0x54/0x17c)
      	from [<c00758f4>] (handle_irq_event+0x3c/0x5c)
      	[56274.284561] [<c00758f4>] (handle_irq_event+0x3c/0x5c) from
      	[<c0077fa0>] (handle_level_irq+0x98/0xfc)
      	[56274.293670] [<c0077fa0>] (handle_level_irq+0x98/0xfc) from
      	[<c0074f44>] (generic_handle_irq+0x2c/0x3c)
      	[56274.302952] [<c0074f44>] (generic_handle_irq+0x2c/0x3c) from
      	[<c000ef80>] (handle_IRQ+0x40/0x90)
      	[56274.311706] [<c000ef80>] (handle_IRQ+0x40/0x90) from
      	[<c000dc80>] (__irq_svc+0x40/0x70)
      	[56274.319697] [<c000dc80>] (__irq_svc+0x40/0x70) from
      	[<c038113c>] (_raw_spin_unlock_irqrestore+0x10/0x48)
      	[56274.329158] [<c038113c>]
      	(_raw_spin_unlock_irqrestore+0x10/0x48) from [<c0200034>]
      	(tty_port_tty_get+0x58/0x90)
      	[56274.339213] [<c0200034>] (tty_port_tty_get+0x58/0x90) from
      	[<c0212008>] (sirfsoc_uart_pio_rx_chars+0x1c/0xc8)
      	[56274.349097] [<c0212008>]
      	(sirfsoc_uart_pio_rx_chars+0x1c/0xc8) from [<c0212ef8>]
      	(sirfsoc_rx_tmo_process_tl+0xe4/0x1fc)
      	[56274.359853] [<c0212ef8>]
      	(sirfsoc_rx_tmo_process_tl+0xe4/0x1fc) from [<c0027c04>]
      	(tasklet_action+0x84/0x114)
      	[56274.369739] [<c0027c04>] (tasklet_action+0x84/0x114) from
      	[<c0027db4>] (__do_softirq+0x120/0x200)
      	[56274.378585] [<c0027db4>] (__do_softirq+0x120/0x200) from
      	[<c0027f44>] (do_softirq+0x54/0x5c)
      	[56274.386998] [<c0027f44>] (do_softirq+0x54/0x5c) from
      	[<c00281ec>] (irq_exit+0x9c/0xd0)
      	[56274.394899] [<c00281ec>] (irq_exit+0x9c/0xd0) from
      	[<c000ef84>] (handle_IRQ+0x44/0x90)
      	[56274.402790] [<c000ef84>] (handle_IRQ+0x44/0x90) from
      	[<c000dc80>] (__irq_svc+0x40/0x70)
      	[56274.410774] [<c000dc80>] (__irq_svc+0x40/0x70) from
      	[<c0288af4>] (cpuidle_enter_state+0x50/0xe0)
      	[56274.419532] [<c0288af4>] (cpuidle_enter_state+0x50/0xe0) from
      	[<c0288c34>] (cpuidle_idle_call+0xb0/0x148)
      	[56274.429080] [<c0288c34>] (cpuidle_idle_call+0xb0/0x148) from
      	[<c000f3ac>] (arch_cpu_idle+0x8/0x38)
      	[56274.438016] [<c000f3ac>] (arch_cpu_idle+0x8/0x38) from
      	[<c0059344>] (cpu_startup_entry+0xfc/0x140)
      	[56274.446956] [<c0059344>] (cpu_startup_entry+0xfc/0x140) from
      	[<c04a3a54>] (start_kernel+0x2d8/0x2e4)
      Signed-off-by: default avatarQipan Li <Qipan.Li@csr.com>
      Signed-off-by: default avatarBarry Song <Baohua.Song@csr.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      Signed-off-by: default avatarJiri Slaby <jslaby@suse.cz>
      67aedbd9
  2. 22 Jul, 2014 2 commits
    • Thomas Gleixner's avatar
      can: c_can: Remove EOB exit · 9b448624
      Thomas Gleixner authored
      commit 710c5610 upstream.
      
      The rx_poll code has the following gem:
      
      	if (msg_ctrl_save & IF_MCONT_EOB)
      		return num_rx_pkts;
      
      The EOB bit is the indicator for the hardware that this is the last
      configured FIFO object. But this object can contain valid data, if we
      manage to free up objects before the overrun case hits.
      
      Now if the code exits due to the EOB bit set, then this buffer is
      stale and the interrupt bit and NewDat bit of the buffer are still
      set. Results in a nice interrupt storm unless we come into an overrun
      situation where the MSGLST bit gets set.
      
           ksoftirqd/0-3     [000] ..s.    79.124101: c_can_poll: rx_poll: val: 00008001 pend 00008001
           ksoftirqd/0-3     [000] ..s.    79.124176: c_can_poll: rx_poll: val: 00008000 pend 00008000
           ksoftirqd/0-3     [000] ..s.    79.124187: c_can_poll: rx_poll: val: 00008002 pend 00008002
           ksoftirqd/0-3     [000] ..s.    79.124256: c_can_poll: rx_poll: val: 00008000 pend 00008000
           ksoftirqd/0-3     [000] ..s.    79.124267: c_can_poll: rx_poll: val: 00008000 pend 00008000
      
      The amazing thing is that the check of the MSGLST (aka overrun bit)
      used to be after the check of the EOB bit. That was "fixed" in commit
      5d0f801a(can: c_can: Fix RX message handling, handle lost message
      before EOB). But the author of this "fix" did not even understand that
      the EOB check is broken as well.
      
      Again a simple solution: Remove
      Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
      [mkl: adjusted subject and commit message]
      Signed-off-by: default avatarMarc Kleine-Budde <mkl@pengutronix.de>
      Signed-off-by: default avatarJiri Slaby <jslaby@suse.cz>
      9b448624
    • Linus Torvalds's avatar
      Don't trigger congestion wait on dirty-but-not-writeout pages · e43bbc2c
      Linus Torvalds authored
      commit b738d764 upstream.
      
      shrink_inactive_list() used to wait 0.1s to avoid congestion when all
      the pages that were isolated from the inactive list were dirty but not
      under active writeback.  That makes no real sense, and apparently causes
      major interactivity issues under some loads since 3.11.
      
      The ostensible reason for it was to wait for kswapd to start writing
      pages, but that seems questionable as well, since the congestion wait
      code seems to trigger for kswapd itself as well.  Also, the logic behind
      delaying anything when we haven't actually started writeback is not
      clear - it only delays actually starting that writeback.
      
      We'll still trigger the congestion waiting if
      
       (a) the process is kswapd, and we hit pages flagged for immediate
           reclaim
      
       (b) the process is not kswapd, and the zone backing dev writeback is
           actually congested.
      
      This probably needs to be revisited, but as it is this fixes a reported
      regression.
      
      [mhocko@suse.cz: backport to 3.12 stable tree]
      Fixes: e2be15f6 ('mm: vmscan: stall page reclaim and writeback pages based on dirty/writepage pages encountered')
      Reported-by: default avatarFelipe Contreras <felipe.contreras@gmail.com>
      Pinpointed-by: default avatarHillf Danton <dhillf@gmail.com>
      Cc: Michal Hocko <mhocko@suse.cz>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Cc: Mel Gorman <mgorman@suse.de>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      Signed-off-by: default avatarMichal Hocko <mhocko@suse.cz>
      Signed-off-by: default avatarJiri Slaby <jslaby@suse.cz>
      e43bbc2c
  3. 18 Jul, 2014 35 commits