1. 12 1月, 2017 19 次提交
  2. 25 12月, 2016 1 次提交
  3. 30 11月, 2016 5 次提交
    • L
      serial: 8250_mid fix calltrace when hotplug 8250 serial controller · a9b01b58
      Liwei Song 提交于
      Fix the following Calltrace:
      [   77.768221] WARNING: CPU: 5 PID: 645 at drivers/dma/dmaengine.c:1069 dma_async_device_unregister+0xe2/0xf0
      [   77.775058] dma_async_device_unregister called while 1 clients hold a reference
      [   77.825048] CPU: 5 PID: 645 Comm: sh Not tainted 4.8.8-WR9.0.0.0_standard+ #3
      [   77.832550] Hardware name: Intel Corp. Aspen Cove/Server, BIOS HAVLCRB1.X64.0012.D58.1604140405 04/14/2016
      [   77.840396]  0000000000000000 ffffc90008adbc80 ffffffff81403456 ffffc90008adbcd0
      [   77.848245]  0000000000000000 ffffc90008adbcc0 ffffffff8105e2e1 0000042d08adbf20
      [   77.855934]  ffff88046a861c18 ffff88046a85c420 ffffffff820d4200 ffff88046ae92318
      [   77.863601] Call Trace:
      [   77.871113]  [<ffffffff81403456>] dump_stack+0x4f/0x69
      [   77.878655]  [<ffffffff8105e2e1>] __warn+0xd1/0xf0
      [   77.886102]  [<ffffffff8105e34f>] warn_slowpath_fmt+0x4f/0x60
      [   77.893508]  [<ffffffff814187a9>] ? find_next_bit+0x19/0x20
      [   77.900730]  [<ffffffff814bf83e>] ? dma_channel_rebalance+0x23e/0x270
      [   77.907814]  [<ffffffff814bfee2>] dma_async_device_unregister+0xe2/0xf0
      [   77.914992]  [<ffffffff814c53aa>] hsu_dma_remove+0x1a/0x60
      [   77.921977]  [<ffffffff814ee14c>] dnv_exit+0x1c/0x20
      [   77.928752]  [<ffffffff814edff6>] mid8250_remove+0x26/0x40
      [   77.935607]  [<ffffffff8144f1b9>] pci_device_remove+0x39/0xc0
      [   77.942292]  [<ffffffff8160cfea>] __device_release_driver+0x9a/0x140
      [   77.948836]  [<ffffffff8160d0b3>] device_release_driver+0x23/0x30
      [   77.955364]  [<ffffffff81447dcc>] pci_stop_bus_device+0x8c/0xa0
      [   77.961769]  [<ffffffff81447f0a>] pci_stop_and_remove_bus_device_locked+0x1a/0x30
      [   77.968113]  [<ffffffff81450d4e>] remove_store+0x5e/0x70
      [   77.974267]  [<ffffffff81607ed8>] dev_attr_store+0x18/0x30
      [   77.980243]  [<ffffffff8123006a>] sysfs_kf_write+0x3a/0x50
      [   77.986180]  [<ffffffff8122f5ab>] kernfs_fop_write+0x10b/0x190
      [   77.992118]  [<ffffffff811bf1c8>] __vfs_write+0x18/0x40
      [   77.998032]  [<ffffffff811bfdee>] vfs_write+0xae/0x190
      [   78.003747]  [<ffffffff811c1016>] SyS_write+0x46/0xb0
      [   78.009234]  [<ffffffff81a4c31b>] entry_SYSCALL_64_fastpath+0x13/0x8f
      [   78.014809] ---[ end trace 0c36dd73b7408eb2 ]---
      
      This happens when the 8250 serial controller is hotplugged as follows:
      echo 1 > /sys/bus/pci/devices/0000:00:1a.0/remove
      
      This trace happens due to the serial port still holding a reference when
      the dma device is unregistered.
      The dma unregister routine will check if there is still a reference exist,
      if so it will give the WARNING(here serial port still was not unregister).
      
      To fix this, We need to unregister the serial port first, then do DMA
      device unregister to make sure there is no reference when to DMA routine.
      Signed-off-by: NLiwei Song <liwei.song@windriver.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      a9b01b58
    • E
      dmaengine: DW DMAC: add multi-block property to device tree · bd2c6636
      Eugeniy Paltsev 提交于
      Several versions of DW DMAC have multi block transfers hardware
      support. Hardware support of multi block transfers is disabled
      by default if we use DT to configure DMAC and software emulation
      of multi block transfers used instead.
      Add multi-block property, so it is possible to enable hardware
      multi block transfers (if present) via DT.
      
      Switch from per device is_nollp variable to multi_block array
      to be able enable/disable multi block transfers separately per
      channel.
      Acked-by: NAndy Shevchenko <andriy.shevchenko@linux.intel.com>
      Signed-off-by: NEugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>
      Signed-off-by: NVinod Koul <vinod.koul@intel.com>
      bd2c6636
    • W
      console: Move userspace I/O out of console_lock to fix lockdep warning · 7edd7e82
      Waiman Long 提交于
      When running certain workload on a debug kernel with lockdep turned on,
      a ppc64 kvm guest could sometimes hit the following lockdep warning:
      
        [ INFO: possible circular locking dependency detected ]
        Possible unsafe locking scenario:
      
              CPU0                    CPU1
              ----                    ----
         lock(&mm->mmap_sem);
                                      lock(console_lock);
                                      lock(&mm->mmap_sem);
         lock(cpu_hotplug.lock);
      
        *** DEADLOCK ***
      
      Looking at the console code, the console_lock-->mmap_sem scenario will
      only happen when reading or writing the console unicode map leading to
      a page fault.
      
      To break this circular locking dependency, all the userspace I/O
      operations in consolemap.c are now moved outside of the console_lock
      critical sections so that the mmap_sem won't be acquired when holding
      the console_lock.
      Signed-off-by: NWaiman Long <longman@redhat.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      7edd7e82
    • A
      tty: nozomi: avoid sprintf buffer overflow · 5020ded7
      Arnd Bergmann 提交于
      Testing with a gcc-7 snapshot produced an internal compiler error
      for this file:
      
      drivers/tty/nozomi.c: In function 'receive_flow_control':
      drivers/tty/nozomi.c:919:12: internal compiler error: in get_substring_ranges_for_loc, at input.c:1388
       static int receive_flow_control(struct nozomi *dc)
      
      I've reported this at https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78569
      but also noticed that the code line contains a stack overflow, as it prints
      a string into a slightly shorter fixed-length 'tmp' variable.
      
      A lot of the code here is unnecessary and can be expressed in a simpler
      way, relying on the fact that removing the 'DEBUG' macro will also get
      rid of all pr_debug() calls. This change should not change any of the
      output but avoids both the stack overflow and the gcc crash.
      
      The stack overflow will not happen unless a module load parameter is
      also set to enable the debug messages.
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      5020ded7
    • G
      serial: 8250_pci: Detach low-level driver during PCI error recovery · f209fa03
      Gabriel Krisman Bertazi 提交于
      During a PCI error recovery, like the ones provoked by EEH in the ppc64
      platform, all IO to the device must be blocked while the recovery is
      completed.  Current 8250_pci implementation only suspends the port
      instead of detaching it, which doesn't prevent incoming accesses like
      TIOCMGET and TIOCMSET calls from reaching the device.  Those end up
      racing with the EEH recovery, crashing it.  Similar races were also
      observed when opening the device and when shutting it down during
      recovery.
      
      This patch implements a more robust IO blockage for the 8250_pci
      recovery by unregistering the port at the beginning of the procedure and
      re-adding it afterwards.  Since the port is detached from the uart
      layer, we can be sure that no request will make through to the device
      during recovery.  This is similar to the solution used by the JSM serial
      driver.
      
      I thank Peter Hurley <peter@hurleysoftware.com> for valuable input on
      this one over one year ago.
      Signed-off-by: NGabriel Krisman Bertazi <krisman@linux.vnet.ibm.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      f209fa03
  4. 28 11月, 2016 1 次提交
  5. 17 11月, 2016 1 次提交
  6. 16 11月, 2016 8 次提交
  7. 10 11月, 2016 5 次提交