1. 26 Feb, 2019 4 commits
    • Lubomir Rintel's avatar
      serial: 8250_of: assume reg-shift of 2 for mrvl,mmp-uart · f4817843
      Lubomir Rintel authored
      There are two other drivers that bind to mrvl,mmp-uart and both of them
      assume register shift of 2 bits. There are device trees that lack the
      property and rely on that assumption.
      
      If this driver wins the race to bind to those devices, it should behave
      the same as the older deprecated driver.
      Signed-off-by: default avatarLubomir Rintel <lkundrak@v3.sk>
      Cc: stable@vger.kernel.org
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      f4817843
    • Lubomir Rintel's avatar
      serial: 8250_pxa: honor the port number from devicetree · fe9ed6d2
      Lubomir Rintel authored
      Like the other OF-enabled drivers, use the port number from the firmware if
      the devicetree specifies an alias:
      
        aliases {
            ...
            serial2 = &uart2; /* Should be ttyS2 */
        }
      
      This is how the deprecated pxa.c driver behaved, switching to 8250_pxa
      messes up the numbering.
      Signed-off-by: default avatarLubomir Rintel <lkundrak@v3.sk>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      fe9ed6d2
    • Gustavo A. R. Silva's avatar
      tty: hvc_xen: Mark expected switch fall-through · d56f00fd
      Gustavo A. R. Silva authored
      In preparation to enabling -Wimplicit-fallthrough, mark switch cases
      where we are expecting to fall through.
      
      This patch fixes the following warning:
      
      drivers/tty/hvc/hvc_xen.c: In function ‘xencons_backend_changed’:
      drivers/tty/hvc/hvc_xen.c:493:6: warning: this statement may fall through [-Wimplicit-fallthrough=]
         if (dev->state == XenbusStateClosed)
            ^
      drivers/tty/hvc/hvc_xen.c:496:2: note: here
        case XenbusStateClosing:
        ^~~~
      
      Warning level 3 was used: -Wimplicit-fallthrough=3
      
      Notice that, in this particular case, the code comment is modified
      in accordance with what GCC is expecting to find.
      
      This patch is part of the ongoing efforts to enable
      -Wimplicit-fallthrough
      Signed-off-by: default avatarGustavo A. R. Silva <gustavo@embeddedor.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      d56f00fd
    • Gustavo A. R. Silva's avatar
      tty: n_gsm: Mark expected switch fall-throughs · 3e913eeb
      Gustavo A. R. Silva authored
      In preparation to enabling -Wimplicit-fallthrough, mark switch
      cases where we are expecting to fall through.
      
      This patch fixes the following warnings:
      
      drivers/tty/n_gsm.c: In function ‘gsm_dlci_data’:
      drivers/tty/n_gsm.c:1582:6: warning: this statement may fall through [-Wimplicit-fallthrough=]
         if (tty) {
            ^
      drivers/tty/n_gsm.c:1587:2: note: here
        case 1:
        ^~~~
      drivers/tty/n_gsm.c: In function ‘gsm1_receive’:
        CC [M]  drivers/scsi/snic/snic_disc.o
        CC [M]  drivers/net/wireless/realtek/rtlwifi/pci.o
        CC      drivers/usb/early/xhci-dbc.o
      drivers/tty/n_gsm.c:1981:12: warning: this statement may fall through [-Wimplicit-fallthrough=]
         gsm->fcs = INIT_FCS;
                  ^
      drivers/tty/n_gsm.c:1983:2: note: here
        case GSM_ADDRESS: /* Address continuation */
        ^~~~
      
      Warning level 3 was used: -Wimplicit-fallthrough=3
      
      Notice that, in this particular case, the code comment is modified
      in accordance with what GCC is expecting to find.
      
      This patch is part of the ongoing efforts to enable
      -Wimplicit-fallthrough.
      Signed-off-by: default avatarGustavo A. R. Silva <gustavo@embeddedor.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      3e913eeb
  2. 19 Feb, 2019 4 commits
    • Jeffrey Hugo's avatar
      tty: serial: msm_serial: Remove __init from msm_console_setup() · be24c270
      Jeffrey Hugo authored
      Due to the complexities of modern Qualcomm SoCs, about a half dozen drivers
      must successfully probe before the clocks for the console are present, and
      the console can successfully probe.  Depending on several random factors
      such as probe order and modules vs builtin, msm_serial may not be able to
      successfully probe for some, at which point, __init annotated functions
      may become unmapped.  If this occurs, msm_console_setup() will be called
      from the probe path, but will no longer exist, resulting in a kernel
      panic.
      
      Resolve this issue by removing the __init annotation from
      msm_console_setup().
      Signed-off-by: default avatarJeffrey Hugo <jhugo@codeaurora.org>
      Reviewed-by: default avatarBjorn Andersson <bjorn.andersson@linaro.org>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      be24c270
    • Stuart Menefy's avatar
      tty: serial: samsung: Enable baud clock during initialisation · 5086e0a4
      Stuart Menefy authored
      The Exynos 5260, like the 5433, appears to require baud clock as
      well as pclk to be running before accessing any of the registers,
      otherwise an external abort is raised.
      
      The serial driver already enables baud clock when required, but only
      if it knows which clock is baud clock. On older SoCs baud clock may be
      selected from a number of possible clocks so to support this the driver
      only selects which clock to use for baud clock when a port is opened,
      at which point the desired baud rate is known and the best clock can be
      selected.
      
      The result is that there are a number of circumstances in which
      registers are accessed without first explicitly enabling baud clock:
       - while the driver is being initialised
       - the initial parts of opening a port for the first time
       - when resuming if the port hasn't been already opened
      
      The 5433 overcomes this currently by marking the baud clock as
      CLK_IGNORE_UNUSED, so the clock is always enabled, however
      for the 5260 I've been trying to avoid this.
      
      This change adds code to pick the first available clock to use
      as baud clock and enables it while initialising the driver.
      
      This code wouldn't be sufficient on a SoC which supports
      multiple possible baud clock sources _and_ requires the
      correct baud clock to be enabled before accessing any of the
      serial port registers (in particular the register which selects
      which clock to use as the baud clock).  As far as I know
      such hardware doesn't exist.
      Signed-off-by: default avatarStuart Menefy <stuart.menefy@mathembedded.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      5086e0a4
    • Anssi Hannula's avatar
      serial: uartps: Fix stuck ISR if RX disabled with non-empty FIFO · 7abab160
      Anssi Hannula authored
      If RX is disabled while there are still unprocessed bytes in RX FIFO,
      cdns_uart_handle_rx() called from interrupt handler will get stuck in
      the receive loop as read bytes will not get removed from the RX FIFO
      and CDNS_UART_SR_RXEMPTY bit will never get set.
      
      Avoid the stuck handler by checking first if RX is disabled. port->lock
      protects against race with RX-disabling functions.
      
      This HW behavior was mentioned by Nathan Rossi in 43e98facc4a3 ("tty:
      xuartps: Fix RX hang, and TX corruption in termios call") which fixed a
      similar issue in cdns_uart_set_termios().
      The behavior can also be easily verified by e.g. setting
      CDNS_UART_CR_RX_DIS at the beginning of cdns_uart_handle_rx() - the
      following loop will then get stuck.
      
      Resetting the FIFO using RXRST would not set RXEMPTY either so simply
      issuing a reset after RX-disable would not work.
      
      I observe this frequently on a ZynqMP board during heavy RX load at 1M
      baudrate when the reader process exits and thus RX gets disabled.
      
      Fixes: 61ec9016 ("tty/serial: add support for Xilinx PS UART")
      Signed-off-by: default avatarAnssi Hannula <anssi.hannula@bitwise.fi>
      Cc: stable@vger.kernel.org
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      7abab160
    • Chengguang Xu's avatar
      tty: serial: remove redundant likely annotation · b289c496
      Chengguang Xu authored
      unlikely has already included in IS_ERR(),
      so just remove redundant likely annotation.
      Signed-off-by: default avatarChengguang Xu <cgxu519@gmx.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      b289c496
  3. 14 Feb, 2019 1 commit
    • Gustavo A. R. Silva's avatar
      tty/n_hdlc: mark expected switch fall-through · 361bf8a9
      Gustavo A. R. Silva authored
      In preparation to enabling -Wimplicit-fallthrough, mark switch
      cases where we are expecting to fall through.
      
      This patch fixes the following warning:
      
      drivers/tty/n_hdlc.c: In function ‘n_hdlc_tty_ioctl’:
      drivers/tty/n_hdlc.c:775:3: warning: this statement may fall through [-Wimplicit-fallthrough=]
         switch (arg) {
         ^~~~~~
      drivers/tty/n_hdlc.c:782:2: note: here
        default:
        ^~~~~~~
      
      Warning level 3 was used: -Wimplicit-fallthrough=3
      
      Notice that, in this particular case, the code comment is modified
      in accordance with what GCC is expecting to find.
      
      This patch is part of the ongoing efforts to enable
      -Wimplicit-fallthrough.
      Signed-off-by: default avatarGustavo A. R. Silva <gustavo@embeddedor.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      361bf8a9
  4. 13 Feb, 2019 2 commits
  5. 12 Feb, 2019 3 commits
  6. 11 Feb, 2019 2 commits
  7. 10 Feb, 2019 7 commits
  8. 09 Feb, 2019 9 commits
    • Linus Torvalds's avatar
      Merge branch 'i2c/for-current' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux · df3865f8
      Linus Torvalds authored
      Pull i2c fixes from Wolfram Sang:
       "One PM related driver bugfix and a MAINTAINERS update"
      
      * 'i2c/for-current' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux:
        MAINTAINERS: Update the ocores i2c bus driver maintainer, etc
        i2c: omap: Use noirq system sleep pm ops to idle device for suspend
      df3865f8
    • Linus Torvalds's avatar
      Merge tag 'mips_fixes_5.0_3' of git://git.kernel.org/pub/scm/linux/kernel/git/mips/linux · e8b50608
      Linus Torvalds authored
      Pull MIPS fixes from Paul Burton:
       "A batch of MIPS fixes for 5.0, nothing too scary.
      
         - A workaround for a Loongson 3 CPU bug is the biggest change, but
           still fairly straightforward. It adds extra memory barriers (sync
           instructions) around atomics to avoid a CPU bug that can break
           atomicity.
      
         - Loongson64 also sees a fix for powering off some systems which
           would incorrectly reboot rather than waiting for the power down
           sequence to complete.
      
         - We have DT fixes for the Ingenic JZ4740 SoC & the JZ4780-based Ci20
           board, and a DT warning fix for the Nexsys4/MIPSfpga board.
      
         - The Cavium Octeon platform sees a further fix to the behaviour of
           the pcie_disable command line argument that was introduced in v3.3.
      
         - The VDSO, introduced in v4.4, sees build fixes for configurations
           of GCC that were built using the --with-fp-32= flag to specify a
           default 32-bit floating point ABI.
      
         - get_frame_info() sees a fix for configurations with
           CONFIG_KALLSYMS=n, for which it previously always returned an
           error.
      
         - If the MIPS Coherence Manager (CM) reports an error then we'll now
           clear that error correctly so that the GCR_ERROR_CAUSE register
           will be updated with information about any future errors"
      
      * tag 'mips_fixes_5.0_3' of git://git.kernel.org/pub/scm/linux/kernel/git/mips/linux:
        mips: cm: reprime error cause
        mips: loongson64: remove unreachable(), fix loongson_poweroff().
        MIPS: Remove function size check in get_frame_info()
        MIPS: Use lower case for addresses in nexys4ddr.dts
        MIPS: Loongson: Introduce and use loongson_llsc_mb()
        MIPS: VDSO: Include $(ccflags-vdso) in o32,n32 .lds builds
        MIPS: VDSO: Use same -m%-float cflag as the kernel proper
        MIPS: OCTEON: don't set octeon_dma_bar_type if PCI is disabled
        DTS: CI20: Fix bugs in ci20's device tree.
        MIPS: DTS: jz4740: Correct interrupt number of DMA core
      e8b50608
    • Linus Torvalds's avatar
      Merge tag 'for-linus-20190209' of git://git.kernel.dk/linux-block · e5a8a116
      Linus Torvalds authored
      Pull block fixes from Jens Axboe:
      
       - NVMe pull request from Christoph, fixing namespace locking when
         dealing with the effects log, and a rapid add/remove issue (Keith)
      
       - blktrace tweak, ensuring requests with -1 sectors are shown (Jan)
      
       - link power management quirk for a Smasung SSD (Hans)
      
       - m68k nfblock dynamic major number fix (Chengguang)
      
       - series fixing blk-iolatency inflight counter issue (Liu)
      
       - ensure that we clear ->private when setting up the aio kiocb (Mike)
      
       - __find_get_block_slow() rate limit print (Tetsuo)
      
      * tag 'for-linus-20190209' of git://git.kernel.dk/linux-block:
        blk-mq: remove duplicated definition of blk_mq_freeze_queue
        Blk-iolatency: warn on negative inflight IO counter
        blk-iolatency: fix IO hang due to negative inflight counter
        blktrace: Show requests without sector
        fs: ratelimit __find_get_block_slow() failure message.
        m68k: set proper major_num when specifying module param major_num
        libata: Add NOLPM quirk for SAMSUNG MZ7TE512HMHP-000L1 SSD
        nvme-pci: fix rapid add remove sequence
        nvme: lock NS list changes while handling command effects
        aio: initialize kiocb private in case any filesystems expect it.
      e5a8a116
    • Linus Torvalds's avatar
      Merge tag 'mtd/fixes-for-5.0-rc6' of git://git.infradead.org/linux-mtd · 5610789a
      Linus Torvalds authored
      Pull mtd fixes from Boris Brezillon:
      
       - Fix a problem with the imx28 ECC engine
      
       - Remove a debug trace introduced in 2b6f0090 ("mtd: Check
         add_mtd_device() ret code")
      
       - Make sure partitions of size 0 can be registered
      
       - Fix kernel-doc warning in the rawnand core
      
       - Fix the error path of spinand_init() (missing manufacturer cleanup in
         a few places)
      
       - Address a problem with the SPI NAND PROGRAM LOAD operation which does
         not work as expected on some parts.
      
      * tag 'mtd/fixes-for-5.0-rc6' of git://git.infradead.org/linux-mtd:
        mtd: rawnand: gpmi: fix MX28 bus master lockup problem
        mtd: Make sure mtd->erasesize is valid even if the partition is of size 0
        mtd: Remove a debug trace in mtdpart.c
        mtd: rawnand: fix kernel-doc warnings
        mtd: spinand: Fix the error/cleanup path in spinand_init()
        mtd: spinand: Handle the case where PROGRAM LOAD does not reset the cache
      5610789a
    • Linus Torvalds's avatar
      Merge tag 'for-linus-5.0-rc6-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip · 3e5e692f
      Linus Torvalds authored
      Pull xen fixes from Juergen Gross:
       "Two very minor fixes: one remove of a #include for an unused header
        and a fix of the xen ML address in MAINTAINERS"
      
      * tag 'for-linus-5.0-rc6-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip:
        MAINTAINERS: unify reference to xen-devel list
        arch/arm/xen: Remove duplicate header
      3e5e692f
    • Ingo Molnar's avatar
      Merge tag 'perf-urgent-for-mingo-5.0-20190205' of... · 3bb26006
      Ingo Molnar authored
      Merge tag 'perf-urgent-for-mingo-5.0-20190205' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/urgent
      
      Pull perf/urgent fixes from Arnaldo Carvalho de Melo:
      
      perf trace:
      
        Arnaldo Carvalho de Melo:
      
          Fix handling of probe:vfs_getname when the probed routine is
          inlined in multiple places, fixing the collection of the 'filename'
          parameter in open syscalls.
      
      perf test:
      
        Gustavo A. R. Silva:
      
          Fix bitwise operator usage in evsel-tp-sched test, which made tat
          test always detect fields as signed.
      
        Jiri Olsa:
      
          Filter out hidden symbols from labels, added in systems where the
          annobin plugin is used, such as RHEL8, which, if left in place make
          the DWARF unwind 'perf test' to fail on PPC.
      
        Tony Jones:
      
          Fix 'perf_event_attr' tests when building with python3.
      
      perf mem/c2c:
      
        Ravi Bangoria:
      
          Fix perf_mem_events on PowerPC.
      
      tools headers UAPI:
      
        Arnaldo Carvalho de Melo:
      
          Sync linux/in.h copy from the kernel sources, silencing a perf build warning.
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
      3bb26006
    • Linus Torvalds's avatar
      Merge tag 'armsoc-fixes-5.0' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc · 46c291e2
      Linus Torvalds authored
      Pull ARM SoC fixes from Arnd Bergmann:
       "This is a bit larger than normal, as we had not managed to send out a
        pull request before traveling for a week without my signing key.
      
        There are multiple code fixes for older bugs, all of which should get
        backported into stable kernels:
      
         - tango: one fix for multiplatform configurations broken on other
           platforms when tango is enabled
      
         - arm_scmi: device unregistration fix
      
         - iop32x: fix kernel oops from extraneous __init annotation
      
         - pxa: remove a double kfree
      
         - fsl qbman: close an interrupt clearing race
      
        The rest is the usual collection of smaller fixes for device tree
        files, on the renesas, allwinner, meson, omap, davinci, qualcomm and
        imx platforms.
      
        Some of these are for compile-time warnings, most are for board
        specific functionality that fails to work because of incorrect
        settings"
      
      * tag 'armsoc-fixes-5.0' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc: (30 commits)
        ARM: tango: Improve ARCH_MULTIPLATFORM compatibility
        firmware: arm_scmi: provide the mandatory device release callback
        ARM: iop32x/n2100: fix PCI IRQ mapping
        arm64: dts: add msm8996 compatible to gicv3
        ARM: dts: am335x-shc.dts: fix wrong cd pin level
        ARM: dts: n900: fix mmc1 card detect gpio polarity
        ARM: dts: omap3-gta04: Fix graph_port warning
        ARM: pxa: ssp: unneeded to free devm_ allocated data
        ARM: dts: r8a7743: Convert to new LVDS DT bindings
        soc: fsl: qbman: avoid race in clearing QMan interrupt
        arm64: dts: renesas: r8a77965: Enable DMA for SCIF2
        arm64: dts: renesas: r8a7796: Enable DMA for SCIF2
        arm64: dts: renesas: r8a774a1: Enable DMA for SCIF2
        ARM: dts: da850: fix interrupt numbers for clocksource
        dt-bindings: imx8mq: Number clocks consecutively
        arm64: dts: meson: Fix mmc cd-gpios polarity
        ARM: dts: imx6sx: correct backward compatible of gpt
        ARM: dts: imx: replace gpio-key,wakeup with wakeup-source property
        ARM: dts: vf610-bk4: fix incorrect #address-cells for dspi3
        ARM: dts: meson8m2: mxiii-plus: mark the SD card detection GPIO active-low
        ...
      46c291e2
    • Linus Torvalds's avatar
      Merge tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux · 5bb513ed
      Linus Torvalds authored
      Pull arm64 fixes from Will Deacon:
       "Two arm64 fixes for -rc6. They resolve a kernel NULL dereference in
        kexec and bogus kernel page table dumping when userspace is configured
        for 52-bit virtual addressing.
      
        Summary:
      
         - Fix kernel oops when attemping kexec_file() with a NULL cmdline
      
         - Fix page table output in debugfs when ARM64_USER_VA_BITS_52=y"
      
      * tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux:
        arm64: kexec_file: handle empty command-line
        arm64: ptdump: Don't iterate kernel page tables using PTRS_PER_PXX
      5bb513ed
    • Linus Torvalds's avatar
      Merge tag 'powerpc-5.0-4' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux · 820828bf
      Linus Torvalds authored
      Pull powerpc fixes from Michael Ellerman:
       "Just two fixes, both going to stable.
      
         - Our support for split pmd page table lock had a bug which could
           lead to a crash on mremap() when using the Radix MMU (Power9 only).
      
         - A fix for the PAPR SCM driver (nvdimm) we added last release, which
           had a bug where we might mis-handle a hypervisor response leading
           to us failing to attach the memory region.
      
        Thanks to: Aneesh Kumar K.V, Oliver O'Halloran"
      
      * tag 'powerpc-5.0-4' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux:
        powerpc/papr_scm: Use the correct bind address
        powerpc/radix: Fix kernel crash with mremap()
      820828bf
  9. 08 Feb, 2019 8 commits