1. 21 Jun, 2019 2 commits
    • Yegor Yefremov's avatar
      tty/serial/8250: use mctrl_gpio helpers · 4a96895f
      Yegor Yefremov authored
      This patch permits the usage for GPIOs to control
      the CTS/RTS/DTR/DSR/DCD/RI signals.
      
      Changed by Stefan:
      Only call mctrl_gpio_init(), if the device has no ACPI companion device
      to not break existing ACPI based systems. Also only use the mctrl_gpio_
      functions when "gpios" is available.
      
      Use MSR / MCR <-> TIOCM wrapper functions.
      Signed-off-by: default avatarYegor Yefremov <yegorslists@googlemail.com>
      Signed-off-by: default avatarStefan Roese <sr@denx.de>
      Reviewed-by: default avatarAndy Shevchenko <andriy.shevchenko@linux.intel.com>
      Reviewed-by: default avatarMika Westerberg <mika.westerberg@linux.intel.com>
      Tested-by: default avatarYegor Yefremov <yegorslists@googlemail.com>
      Cc: Mika Westerberg <mika.westerberg@linux.intel.com>
      Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
      Cc: Giulio Benetti <giulio.benetti@micronovasrl.com>
      Cc: Yegor Yefremov <yegorslists@googlemail.com>
      Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      4a96895f
    • Stefan Roese's avatar
      serial: mctrl_gpio: Check if GPIO property exisits before requesting it · d9948267
      Stefan Roese authored
      This patch adds a check for the GPIOs property existence, before the
      GPIO is requested. This fixes an issue seen when the 8250 mctrl_gpio
      support is added (2nd patch in this patch series) on x86 platforms using
      ACPI.
      
      Here Mika's comments from 2016-08-09:
      
      "
      I noticed that with v4.8-rc1 serial console of some of our Broxton
      systems does not work properly anymore. I'm able to see output but input
      does not work.
      
      I bisected it down to commit 4ef03d32
      ("tty/serial/8250: use mctrl_gpio helpers").
      
      The reason why it fails is that in ACPI we do not have names for GPIOs
      (except when _DSD is used) so we use the "idx" to index into _CRS GPIO
      resources. Now mctrl_gpio_init_noauto() goes through a list of GPIOs
      calling devm_gpiod_get_index_optional() passing "idx" of 0 for each. The
      UART device in Broxton has following (simplified) ACPI description:
      
          Device (URT4)
          {
              ...
              Name (_CRS, ResourceTemplate () {
                  GpioIo (Exclusive, PullDefault, 0x0000, 0x0000, IoRestrictionOutputOnly,
                          "\\_SB.GPO0", 0x00, ResourceConsumer)
                  {
                      0x003A
                  }
                  GpioIo (Exclusive, PullDefault, 0x0000, 0x0000, IoRestrictionOutputOnly,
                          "\\_SB.GPO0", 0x00, ResourceConsumer)
                  {
                      0x003D
                  }
              })
      
      In this case it finds the first GPIO (0x003A which happens to be RX pin
      for that UART), turns it into GPIO which then breaks input for the UART
      device. This also breaks systems with bluetooth connected to UART (those
      typically have some GPIOs in their _CRS).
      
      Any ideas how to fix this?
      
      We cannot just drop the _CRS index lookup fallback because that would
      break many existing machines out there so maybe we can limit this to
      only DT enabled machines. Or alternatively probe if the property first
      exists before trying to acquire the GPIOs (using
      device_property_present()).
      "
      
      This patch implements the fix suggested by Mika in his statement above.
      Signed-off-by: default avatarStefan Roese <sr@denx.de>
      Reviewed-by: default avatarMika Westerberg <mika.westerberg@linux.intel.com>
      Reviewed-by: default avatarAndy Shevchenko <andriy.shevchenko@linux.intel.com>
      Tested-by: default avatarYegor Yefremov <yegorslists@googlemail.com>
      Cc: Mika Westerberg <mika.westerberg@linux.intel.com>
      Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
      Cc: Yegor Yefremov <yegorslists@googlemail.com>
      Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
      Cc: Giulio Benetti <giulio.benetti@micronovasrl.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      d9948267
  2. 18 Jun, 2019 13 commits
  3. 13 Jun, 2019 1 commit
  4. 10 Jun, 2019 13 commits
  5. 04 Jun, 2019 1 commit
    • Ben Hutchings's avatar
      Revert "consolemap: Fix a memory leaking bug in drivers/tty/vt/consolemap.c" · 15b3cd8e
      Ben Hutchings authored
      This reverts commit 84ecc2f6.
      
      con_insert_unipair() is working with a sparse 3-dimensional array:
      
      - p->uni_pgdir[] is the top layer
      - p1 points to a middle layer
      - p2 points to a bottom layer
      
      If it needs to allocate a new middle layer, and then fails to allocate
      a new bottom layer, it would previously free only p2, and now it frees
      both p1 and p2.  But since the new middle layer was already registered
      in the top layer, it was not leaked.
      
      However, if it looks up an *existing* middle layer and then fails to
      allocate a bottom layer, it now frees both p1 and p2 but does *not*
      free any other bottom layers under p1.  So it *introduces* a memory
      leak.
      
      The error path also cleared the wrong index in p->uni_pgdir[],
      introducing a use-after-free.
      Signed-off-by: default avatarBen Hutchings <ben@decadent.org.uk>
      Fixes: 84ecc2f6 ("consolemap: Fix a memory leaking bug in drivers/tty/vt/consolemap.c")
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      15b3cd8e
  6. 03 Jun, 2019 1 commit
  7. 02 Jun, 2019 9 commits
    • Linus Torvalds's avatar
      Linux 5.2-rc3 · f2c7c76c
      Linus Torvalds authored
      f2c7c76c
    • Linus Torvalds's avatar
      Merge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 7bd1d5ed
      Linus Torvalds authored
      Pull x86 fixes from Ingo Molnar:
       "Two fixes: a quirk for KVM guests running on certain AMD CPUs, and a
        KASAN related build fix"
      
      * 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        x86/CPU/AMD: Don't force the CPB cap when running under a hypervisor
        x86/boot: Provide KASAN compatible aliases for string routines
      7bd1d5ed
    • Linus Torvalds's avatar
      Merge branch 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 6751b8d9
      Linus Torvalds authored
      Pull perf fixes from Ingo Molnar:
       "On the kernel side there's a bunch of ring-buffer ordering fixes for a
        reproducible bug, plus a PEBS constraints regression fix.
      
        Plus tooling fixes"
      
      * 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        tools headers UAPI: Sync kvm.h headers with the kernel sources
        perf record: Fix s390 missing module symbol and warning for non-root users
        perf machine: Read also the end of the kernel
        perf test vmlinux-kallsyms: Ignore aliases to _etext when searching on kallsyms
        perf session: Add missing swap ops for namespace events
        perf namespace: Protect reading thread's namespace
        tools headers UAPI: Sync drm/drm.h with the kernel
        tools headers UAPI: Sync drm/i915_drm.h with the kernel
        tools headers UAPI: Sync linux/fs.h with the kernel
        tools headers UAPI: Sync linux/sched.h with the kernel
        tools arch x86: Sync asm/cpufeatures.h with the with the kernel
        tools include UAPI: Update copy of files related to new fspick, fsmount, fsconfig, fsopen, move_mount and open_tree syscalls
        perf arm64: Fix mksyscalltbl when system kernel headers are ahead of the kernel
        perf data: Fix 'strncat may truncate' build failure with recent gcc
        perf/ring-buffer: Use regular variables for nesting
        perf/ring-buffer: Always use {READ,WRITE}_ONCE() for rb->user_page data
        perf/ring_buffer: Add ordering to rb->nest increment
        perf/ring_buffer: Fix exposing a temporarily decreased data_head
        perf/x86/intel/ds: Fix EVENT vs. UEVENT PEBS constraints
      6751b8d9
    • Linus Torvalds's avatar
      Merge branch 'efi-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · af042452
      Linus Torvalds authored
      Pull EFI fixes from Ingo Molnar:
       "Two EFI fixes: a quirk for weird systabs, plus add more robust error
        handling in the old 1:1 mapping code"
      
      * 'efi-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        efi: Allow the number of EFI configuration tables entries to be zero
        efi/x86/Add missing error handling to old_memmap 1:1 mapping code
      af042452
    • Linus Torvalds's avatar
      Merge branch 'core-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 4fb5741c
      Linus Torvalds authored
      Pull stacktrace fix from Ingo Molnar:
       "Fix a stack_trace_save_tsk_reliable() regression"
      
      * 'core-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        stacktrace: Unbreak stack_trace_save_tsk_reliable()
      4fb5741c
    • Linus Torvalds's avatar
      Merge tag 'spdx-5.2-rc3-2' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core · a68dc618
      Linus Torvalds authored
      Pull SPDX fixes from Greg KH:
       "Here are just two small patches, that fix up some found SPDX
        identifier issues.
      
        The first patch fixes an error in a previous SPDX fixup patch, that
        causes build errors when doing 'make clean' on the tree (the fact that
        almost no one noticed it reflects the fact that kernel developers
        don't like doing that option very often...)
      
        The second patch fixes up a number of places in the tree where people
        mistyped the string "SPDX-License-Identifier". Given that people can
        not even type their own name all the time without mistakes, this was
        bound to happen, and odds are, we will have to add some type of check
        for this to checkpatch.pl to catch this happening in the future.
      
        Both of these have passed testing by 0-day"
      
      * tag 'spdx-5.2-rc3-2' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core:
        treewide: fix typos of SPDX-License-Identifier
        crypto: ux500 - fix license comment syntax error
      a68dc618
    • Linus Torvalds's avatar
      Merge tag 'powerpc-5.2-3' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux · 460b48a0
      Linus Torvalds authored
      Pull powerpc fixes from Michael Ellerman:
       "A minor fix to our IMC PMU code to print a less confusing error
        message when the driver can't initialise properly.
      
        A fix for a bug where a user requesting an unsupported branch sampling
        filter can corrupt PMU state, preventing the PMU from counting
        properly.
      
        And finally a fix for a bug in our support for kexec_file_load(),
        which prevented loading a kernel and initramfs. Most versions of kexec
        don't yet use kexec_file_load().
      
        Thanks to: Anju T Sudhakar, Dave Young, Madhavan Srinivasan, Ravi
        Bangoria, Thiago Jung Bauermann"
      
      * tag 'powerpc-5.2-3' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux:
        powerpc/kexec: Fix loading of kernel + initramfs with kexec_file_load()
        powerpc/perf: Fix MMCRA corruption by bhrb_filter
        powerpc/powernv: Return for invalid IMC domain
      460b48a0
    • Linus Torvalds's avatar
      Merge tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm · b44a1dd3
      Linus Torvalds authored
      Pull KVM fixes from Paolo Bonzini:
       "Fixes for PPC and s390"
      
      * tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm:
        KVM: PPC: Book3S HV: Restore SPRG3 in kvmhv_p9_guest_entry()
        KVM: PPC: Book3S HV: Fix lockdep warning when entering guest on POWER9
        KVM: PPC: Book3S HV: XIVE: Fix page offset when clearing ESB pages
        KVM: PPC: Book3S HV: XIVE: Take the srcu read lock when accessing memslots
        KVM: PPC: Book3S HV: XIVE: Do not clear IRQ data of passthrough interrupts
        KVM: PPC: Book3S HV: XIVE: Introduce a new mutex for the XIVE device
        KVM: PPC: Book3S HV: XIVE: Fix the enforced limit on the vCPU identifier
        KVM: PPC: Book3S HV: XIVE: Do not test the EQ flag validity when resetting
        KVM: PPC: Book3S HV: XIVE: Clear file mapping when device is released
        KVM: PPC: Book3S HV: Don't take kvm->lock around kvm_for_each_vcpu
        KVM: PPC: Book3S: Use new mutex to synchronize access to rtas token list
        KVM: PPC: Book3S HV: Use new mutex to synchronize MMU setup
        KVM: PPC: Book3S HV: Avoid touching arch.mmu_ready in XIVE release functions
        KVM: s390: Do not report unusabled IDs via KVM_CAP_MAX_VCPU_ID
        kvm: fix compile on s390 part 2
      b44a1dd3
    • Linus Torvalds's avatar
      Merge branch 'i2c/for-current' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux · 38baf0bb
      Linus Torvalds authored
      Pull i2c fixes from Wolfram Sang:
       "A memleak fix for the core, two driver bugfixes, as well as fixing
        missing file patterns to MAINTAINERS"
      
      * 'i2c/for-current' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux:
        MAINTAINERS: add I2C DT bindings to ARM platforms
        MAINTAINERS: add DT bindings to i2c drivers
        i2c: synquacer: fix synquacer_i2c_doxfer() return value
        i2c: mlxcpld: Fix wrong initialization order in probe
        i2c: dev: fix potential memory leak in i2cdev_ioctl_rdwr
      38baf0bb