1. 26 Jul, 2016 2 commits
    • Sam Mendoza-Jonas's avatar
      tty/hvc: Use opal irqchip interface if available · 00dab818
      Sam Mendoza-Jonas authored
      Update the hvc driver to use the OPAL irqchip if made available by the
      running firmware. If it is not present, the driver falls back to the
      existing OPAL event number.
      Signed-off-by: 's avatarSamuel Mendoza-Jonas <sam@mendozajonas.com>
      Signed-off-by: 's avatarMichael Ellerman <mpe@ellerman.id.au>
    • Sam Mendoza-Jonas's avatar
      tty/hvc: Use IRQF_SHARED for OPAL hvc consoles · bbc3dfe8
      Sam Mendoza-Jonas authored
      Commit 2def86a7 ("hvc: Convert to using interrupts instead of opal
      events") enabled the use of interrupts in the hvc_driver for OPAL
      platforms. However on machines with more than one hvc console, any
      console after the first will fail to register an interrupt handler in
      notifier_add_irq() since all consoles share the same IRQ number but do
      not set the IRQF_SHARED flag:
        genirq: Flags mismatch irq 31. 00000000 (hvc_console) vs. 00000000 (hvc_console)
        hvc_open: request_irq failed with rc -16.
      This error propagates up to hvc_open() and the console is closed, but
      OPAL will still generate interrupts that are not handled, leading to
      rcu_sched stall warnings.
      Set IRQF_SHARED when calling request_irq(), allowing additional consoles
      to start properly. This is only set for consoles handled by
      hvc_opal_probe(), leaving other types unaffected.
      Signed-off-by: 's avatarSamuel Mendoza-Jonas <sam@mendozajonas.com>
      Signed-off-by: 's avatarMichael Ellerman <mpe@ellerman.id.au>
  2. 30 Apr, 2016 2 commits
  3. 26 Feb, 2016 3 commits
  4. 09 Feb, 2016 1 commit
  5. 07 Feb, 2016 2 commits
    • Arnd Bergmann's avatar
      tty: hvc_xen: hide xen_console_remove when unused · e36ae343
      Arnd Bergmann authored
      xencons_disconnect_backend() is only called from xen_console_remove(),
      which is conditionally compiled, so we get a harmless warning when
      hvc/hvc_xen.c:350:12: error: 'xen_console_remove' defined but not used [-Werror=unused-function]
      This moves the function down into the same #ifdef section to silence
      the warning.
      Signed-off-by: 's avatarArnd Bergmann <arnd@arndb.de>
      Signed-off-by: 's avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
    • Paul Gortmaker's avatar
      drivers/tty: make hvc/hvc_vio.c explicitly non-modular · e3c5fc4d
      Paul Gortmaker authored
      The Kconfig currently controlling compilation of this code is:
      drivers/tty/hvc/Kconfig:config HVC_CONSOLE
      drivers/tty/hvc/Kconfig:        bool "pSeries Hypervisor Virtual Console support"
      ...meaning that it currently is not being built as a module by anyone.
      Lets remove the modular code that is essentially orphaned, so that
      when reading the driver there is no doubt it is builtin-only.
      Since module_init translates to device_initcall in the non-modular
      case, the init ordering remains unchanged with this commit.
      We explicitly disallow a driver unbind, since that doesn't have a
      sensible use case anyway, and it allows us to drop the ".remove"
      code for non-modular drivers.
      We don't replace module.h with init.h since the file already has that.
      Also note that MODULE_DEVICE_TABLE is a no-op for non-modular code.
      Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
      Cc: Jiri Slaby <jslaby@suse.com>
      Cc: Michael Ellerman <mpe@ellerman.id.au>
      Cc: Anton Blanchard <anton@samba.org>
      Cc: linuxppc-dev@lists.ozlabs.org
      Signed-off-by: 's avatarPaul Gortmaker <paul.gortmaker@windriver.com>
      Signed-off-by: 's avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
  6. 23 Oct, 2015 1 commit
  7. 17 Oct, 2015 1 commit
    • Peter Hurley's avatar
      tty: Remove tty_wait_until_sent_from_close() · 79c1faa4
      Peter Hurley authored
      tty_wait_until_sent_from_close() drops the tty lock while waiting
      for the tty driver to finish sending previously accepted data (ie.,
      data remaining in its write buffer and transmit fifo).
      tty_wait_until_sent_from_close() was added by commit a57a7bf3
      ("TTY: define tty_wait_until_sent_from_close") to prevent the entire
      tty subsystem from being unable to open new ttys while waiting for
      one tty to close while output drained.
      However, since commit 0911261d ("tty: Don't take tty_mutex for tty
      count changes"), holding a tty lock while closing does not prevent other
      ttys from being opened/closed/hung up, but only prevents lifetime event
      changes for the tty under lock.
      Holding the tty lock while waiting for output to drain does prevent
      parallel non-blocking opens (O_NONBLOCK) from advancing or returning
      while the tty lock is held. However, all parallel opens _already_
      block even if the tty lock is dropped while closing and the parallel
      open advances. Blocking in open has been in mainline since at least 2.6.29
      (see tty_port_block_til_ready(); note the test for O_NONBLOCK is _after_
      the wait while ASYNC_CLOSING).
      IOW, before this patch a non-blocking open will sleep anyway for the
      _entire_ duration of a parallel hardware shutdown, and when it wakes, the
      error return will cause a release of its tty, and it will restart with
      a fresh attempt to open. Similarly with a blocking open that is already
      waiting; when it's woken, the hardware shutdown has already completed
      to ASYNC_INITIALIZED is not set, which forces a release and restart as
      So, holding the tty lock across the _entire_ close (which is what this
      patch does), even while waiting for output to drain, is equivalent to
      the current outcome wrt parallel opens.
      Cc: Alan Cox <alan@linux.intel.com>
      Cc: David Laight <David.Laight@aculab.com>
      CC: Arnd Bergmann <arnd@arndb.de>
      CC: Karsten Keil <isdn@linux-pingi.de>
      CC: linuxppc-dev@lists.ozlabs.org
      Signed-off-by: 's avatarPeter Hurley <peter@hurleysoftware.com>
      Signed-off-by: 's avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
  8. 04 Oct, 2015 3 commits
  9. 21 Sep, 2015 1 commit
  10. 08 Sep, 2015 2 commits
  11. 20 Aug, 2015 1 commit
    • Laurent Dufour's avatar
      powerpc/hvsi: Fix endianness issues in the HVSI driver · 48079804
      Laurent Dufour authored
      This patch fixes several endianness issues detected when running the HVSI
      driver in little endian mode.
      These issues are raised in little endian mode because the data exchanged in
      memory between the kernel and the hypervisor has to be in big endian
      format. This exhibits as errors such as:
        irq: (null) didn't like hwirq-0x1000a00 to VIRQ16 mapping (rc=-22)
        hvsi_console_init: couldn't create irq mapping for 0x1000a00
      The data structures already have endian annotations, and sparse is
      generating numerous warnings based on those. This commit fixes all of
      Signed-off-by: 's avatarLaurent Dufour <ldufour@linux.vnet.ibm.com>
      CC: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
      CC: Jiri Slaby <jslaby@suse.cz>
      CC: linuxppc-dev@lists.ozlabs.org
      CC: linux-kernel@vger.kernel.org
      [mpe: Flesh out change log]
      Signed-off-by: 's avatarMichael Ellerman <mpe@ellerman.id.au>
  12. 28 May, 2015 1 commit
  13. 27 May, 2015 1 commit
    • Luis R. Rodriguez's avatar
      kernel/params: constify struct kernel_param_ops uses · 9c27847d
      Luis R. Rodriguez authored
      Most code already uses consts for the struct kernel_param_ops,
      sweep the kernel for the last offending stragglers. Other than
      include/linux/moduleparam.h and kernel/params.c all other changes
      were generated with the following Coccinelle SmPL patch. Merge
      conflicts between trees can be handled with Coccinelle.
      In the future git could get Coccinelle merge support to deal with
      patch --> fail --> grammar --> Coccinelle --> new patch conflicts
      automatically for us on patches where the grammar is available and
      the patch is of high confidence. Consider this a feature request.
      Test compiled on x86_64 against:
      	* allnoconfig
      	* allmodconfig
      	* allyesconfig
      @ const_found @
      identifier ops;
      const struct kernel_param_ops ops = {
      @ const_not_found depends on !const_found @
      identifier ops;
      -struct kernel_param_ops ops = {
      +const struct kernel_param_ops ops = {
      Generated-by: Coccinelle SmPL
      Cc: Rusty Russell <rusty@rustcorp.com.au>
      Cc: Junio C Hamano <gitster@pobox.com>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Cc: Kees Cook <keescook@chromium.org>
      Cc: Tejun Heo <tj@kernel.org>
      Cc: Ingo Molnar <mingo@kernel.org>
      Cc: cocci@systeme.lip6.fr
      Cc: linux-kernel@vger.kernel.org
      Signed-off-by: 's avatarLuis R. Rodriguez <mcgrof@suse.com>
      Signed-off-by: 's avatarRusty Russell <rusty@rustcorp.com.au>
  14. 21 May, 2015 1 commit
  15. 19 May, 2015 1 commit
    • David Vrabel's avatar
      xen/events: don't bind non-percpu VIRQs with percpu chip · 77bb3dfd
      David Vrabel authored
      A non-percpu VIRQ (e.g., VIRQ_CONSOLE) may be freed on a different
      VCPU than it is bound to.  This can result in a race between
      handle_percpu_irq() and removing the action in __free_irq() because
      handle_percpu_irq() does not take desc->lock.  The interrupt handler
      sees a NULL action and oopses.
      Only use the percpu chip/handler for per-CPU VIRQs (like VIRQ_TIMER).
        # cat /proc/interrupts | grep virq
         40:      87246          0  xen-percpu-virq      timer0
         44:          0          0  xen-percpu-virq      debug0
         47:          0      20995  xen-percpu-virq      timer1
         51:          0          0  xen-percpu-virq      debug1
         69:          0          0   xen-dyn-virq      xen-pcpu
         74:          0          0   xen-dyn-virq      mce
         75:         29          0   xen-dyn-virq      hvc_console
      Signed-off-by: 's avatarDavid Vrabel <david.vrabel@citrix.com>
      Cc: <stable@vger.kernel.org>
  16. 11 May, 2015 1 commit
  17. 10 May, 2015 3 commits
  18. 05 May, 2015 1 commit
  19. 26 Mar, 2015 1 commit
  20. 22 Jan, 2015 1 commit
  21. 26 Nov, 2014 1 commit
  22. 05 Nov, 2014 1 commit
  23. 20 Oct, 2014 1 commit
  24. 06 Oct, 2014 1 commit
  25. 02 Oct, 2014 1 commit
  26. 28 Sep, 2014 1 commit
  27. 26 Jun, 2014 1 commit
  28. 02 Jun, 2014 1 commit
  29. 28 May, 2014 2 commits