1. 05 Mar, 2020 1 commit
  2. 04 Mar, 2020 7 commits
    • Mark Brown's avatar
      Merge series "Compatible string consolidation for NXP DSPI driver" from... · cb71d8ef
      Mark Brown authored
      Merge series "Compatible string consolidation for NXP DSPI driver" from Vladimir Oltean <olteanv@gmail.com>:
      
      This series makes room in the driver for differentiation between the
      controllers which currently operate in TCFQ mode. Most of these are
      actually capable of a lot more in terms of throughput. This is in
      preparation of a second series which will convert the remaining users of
      TCFQ mode altogether to XSPI mode with command cycling.
      
      Vladimir Oltean (6):
        doc: spi-fsl-dspi: Add specific compatibles for all Layerscape SoCs
        spi: spi-fsl-dspi: Use specific compatible strings for all SoC
          instantiations
        spi: spi-fsl-dspi: Parameterize the FIFO size and DMA buffer size
        spi: spi-fsl-dspi: LS2080A and LX2160A support XSPI mode
        spi: spi-fsl-dspi: Support SPI software timestamping in all non-DMA
          modes
        spi: spi-fsl-dspi: Convert the instantiations that support it to DMA
      
       .../devicetree/bindings/spi/spi-fsl-dspi.txt  |  17 +-
       drivers/spi/spi-fsl-dspi.c                    | 162 +++++++++++++-----
       2 files changed, 128 insertions(+), 51 deletions(-)
      
      --
      2.17.1
      cb71d8ef
    • Vladimir Oltean's avatar
      spi: spi-fsl-dspi: Add specific compatibles for all Layerscape SoCs · 50b62071
      Vladimir Oltean authored
      Make the second compatible string optional for LS1012A, LS1088A and
      LS2080A. Old versions of the spi-fsl-dspi.c driver still need to probe
      on the old, generic compatible string for these controllers (such as
      "fsl,ls1021a-v1.0-dspi") which provides less functionality.
      
      Document the device tree bindings for LS1043A and LS1046A, whose
      bindings are already in use in fsl-ls1043a.dtsi and fsl-ls1046a.dtsi.
      
      Introduce new compatible strings for LS1028A and LX2160A. There will be
      no second compatible string for these.
      Signed-off-by: default avatarVladimir Oltean <vladimir.oltean@nxp.com>
      Message-Id: <20200302001958.11105-2-olteanv@gmail.com>
      Signed-off-by: default avatarMark Brown <broonie@kernel.org>
      50b62071
    • Vladimir Oltean's avatar
      spi: spi-fsl-dspi: Convert the instantiations that support it to DMA · 0feaf8f5
      Vladimir Oltean authored
      The A-011218 eDMA/DSPI erratum affects most of the older Layerscape SoCs
      with DSPI, and its workaround is a bit intrusive.
      
      After this patch, there are no users of TCFQ mode that don't also
      support XSPI (previously there was LS2085A).
      Signed-off-by: default avatarVladimir Oltean <vladimir.oltean@nxp.com>
      Message-Id: <20200302001958.11105-7-olteanv@gmail.com>
      Signed-off-by: default avatarMark Brown <broonie@kernel.org>
      0feaf8f5
    • Vladimir Oltean's avatar
      spi: spi-fsl-dspi: Support SPI software timestamping in all non-DMA modes · 63669902
      Vladimir Oltean authored
      There's no reason to keep this .ptp_sts_supported property explicitly in
      devtype_data, since it can be deduced from the operating mode alone.
      Signed-off-by: default avatarVladimir Oltean <vladimir.oltean@nxp.com>
      Message-Id: <20200302001958.11105-6-olteanv@gmail.com>
      Signed-off-by: default avatarMark Brown <broonie@kernel.org>
      63669902
    • Vladimir Oltean's avatar
      spi: spi-fsl-dspi: LS2080A and LX2160A support XSPI mode · ca5052c8
      Vladimir Oltean authored
      XSPI allows for 2 extra features:
      - Command cycling (use a single TX command with more than 1 word in the
        TX FIFO).
      - Increased word size (from 16 bits to 32 bits)
      Signed-off-by: default avatarVladimir Oltean <vladimir.oltean@nxp.com>
      Message-Id: <20200302001958.11105-5-olteanv@gmail.com>
      Signed-off-by: default avatarMark Brown <broonie@kernel.org>
      ca5052c8
    • Vladimir Oltean's avatar
      spi: spi-fsl-dspi: Parameterize the FIFO size and DMA buffer size · 1d8b4c95
      Vladimir Oltean authored
      Get rid of the ifdef for Coldfire and make these hardware
      characteristics part of dspi->devtype_data.
      Signed-off-by: default avatarVladimir Oltean <vladimir.oltean@nxp.com>
      Message-Id: <20200302001958.11105-4-olteanv@gmail.com>
      Signed-off-by: default avatarMark Brown <broonie@kernel.org>
      1d8b4c95
    • Vladimir Oltean's avatar
      spi: spi-fsl-dspi: Use specific compatible strings for all SoC instantiations · d3505401
      Vladimir Oltean authored
      Currently, the device tree bindings submitted in mainline for Layerscape
      SoCs look like this:
      
      LS1021A:
      compatible = "fsl,ls1021a-v1.0-dspi";
      
      LS1012A:
      compatible = "fsl,ls1012a-dspi", "fsl,ls1021a-v1.0-dspi";
      
      LS2085A:
      compatible = "fsl,ls2085a-dspi";
      
      LS2088A:
      compatible = "fsl,ls2080a-dspi", "fsl,ls2085a-dspi";
      
      LX2160A:
      compatible = "fsl,lx2160a-dspi", "fsl,ls2085a-dspi";
      
      LS1043A:
      compatible = "fsl,ls1043a-dspi", "fsl,ls1021a-v1.0-dspi";
      
      LS1046A:
      compatible = "fsl,ls1021a-v1.0-dspi";
      
      Due to a lack of a more specific compatible string, LS1012A, LS1043A and
      LS1046A will fall under the LS1021A umbrella, and LS2088A and LX2160A
      under the LS2085A umbrella.
      
      They do work in those modes, but there are slight differences in the
      hardware instantiations, mostly related to FIFO sizes (with the more
      specific compatible strings, the FIFO size can be increased properly).
      Signed-off-by: default avatarVladimir Oltean <vladimir.oltean@nxp.com>
      Message-Id: <20200302001958.11105-3-olteanv@gmail.com>
      Signed-off-by: default avatarMark Brown <broonie@kernel.org>
      d3505401
  3. 03 Mar, 2020 4 commits
  4. 02 Mar, 2020 10 commits
  5. 01 Mar, 2020 5 commits
  6. 29 Feb, 2020 7 commits
    • Dan Carpenter's avatar
      ext4: potential crash on allocation error in ext4_alloc_flex_bg_array() · 37b0b6b8
      Dan Carpenter authored
      If sbi->s_flex_groups_allocated is zero and the first allocation fails
      then this code will crash.  The problem is that "i--" will set "i" to
      -1 but when we compare "i >= sbi->s_flex_groups_allocated" then the -1
      is type promoted to unsigned and becomes UINT_MAX.  Since UINT_MAX
      is more than zero, the condition is true so we call kvfree(new_groups[-1]).
      The loop will carry on freeing invalid memory until it crashes.
      
      Fixes: 7c990728 ("ext4: fix potential race between s_flex_groups online resizing and access")
      Reviewed-by: default avatarSuraj Jitindar Singh <surajjs@amazon.com>
      Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
      Cc: stable@kernel.org
      Link: https://lore.kernel.org/r/20200228092142.7irbc44yaz3by7nb@kili.mountainSigned-off-by: default avatarTheodore Ts'o <tytso@mit.edu>
      37b0b6b8
    • Wolfram Sang's avatar
      macintosh: therm_windtunnel: fix regression when instantiating devices · 38b17afb
      Wolfram Sang authored
      Removing attach_adapter from this driver caused a regression for at
      least some machines. Those machines had the sensors described in their
      DT, too, so they didn't need manual creation of the sensor devices. The
      old code worked, though, because manual creation came first. Creation of
      DT devices then failed later and caused error logs, but the sensors
      worked nonetheless because of the manually created devices.
      
      When removing attach_adaper, manual creation now comes later and loses
      the race. The sensor devices were already registered via DT, yet with
      another binding, so the driver could not be bound to it.
      
      This fix refactors the code to remove the race and only manually creates
      devices if there are no DT nodes present. Also, the DT binding is updated
      to match both, the DT and manually created devices. Because we don't
      know which device creation will be used at runtime, the code to start
      the kthread is moved to do_probe() which will be called by both methods.
      
      Fixes: 3e7bed52 ("macintosh: therm_windtunnel: drop using attach_adapter")
      Link: https://bugzilla.kernel.org/show_bug.cgi?id=201723Reported-by: default avatarErhard Furtner <erhard_f@mailbox.org>
      Tested-by: default avatarErhard Furtner <erhard_f@mailbox.org>
      Acked-by: Michael Ellerman <mpe@ellerman.id.au> (powerpc)
      Signed-off-by: default avatarWolfram Sang <wsa@the-dreams.de>
      Cc: stable@kernel.org # v4.19+
      38b17afb
    • Qian Cai's avatar
      jbd2: fix data races at struct journal_head · 6c5d9112
      Qian Cai authored
      journal_head::b_transaction and journal_head::b_next_transaction could
      be accessed concurrently as noticed by KCSAN,
      
       LTP: starting fsync04
       /dev/zero: Can't open blockdev
       EXT4-fs (loop0): mounting ext3 file system using the ext4 subsystem
       EXT4-fs (loop0): mounted filesystem with ordered data mode. Opts: (null)
       ==================================================================
       BUG: KCSAN: data-race in __jbd2_journal_refile_buffer [jbd2] / jbd2_write_access_granted [jbd2]
      
       write to 0xffff99f9b1bd0e30 of 8 bytes by task 25721 on cpu 70:
        __jbd2_journal_refile_buffer+0xdd/0x210 [jbd2]
        __jbd2_journal_refile_buffer at fs/jbd2/transaction.c:2569
        jbd2_journal_commit_transaction+0x2d15/0x3f20 [jbd2]
        (inlined by) jbd2_journal_commit_transaction at fs/jbd2/commit.c:1034
        kjournald2+0x13b/0x450 [jbd2]
        kthread+0x1cd/0x1f0
        ret_from_fork+0x27/0x50
      
       read to 0xffff99f9b1bd0e30 of 8 bytes by task 25724 on cpu 68:
        jbd2_write_access_granted+0x1b2/0x250 [jbd2]
        jbd2_write_access_granted at fs/jbd2/transaction.c:1155
        jbd2_journal_get_write_access+0x2c/0x60 [jbd2]
        __ext4_journal_get_write_access+0x50/0x90 [ext4]
        ext4_mb_mark_diskspace_used+0x158/0x620 [ext4]
        ext4_mb_new_blocks+0x54f/0xca0 [ext4]
        ext4_ind_map_blocks+0xc79/0x1b40 [ext4]
        ext4_map_blocks+0x3b4/0x950 [ext4]
        _ext4_get_block+0xfc/0x270 [ext4]
        ext4_get_block+0x3b/0x50 [ext4]
        __block_write_begin_int+0x22e/0xae0
        __block_write_begin+0x39/0x50
        ext4_write_begin+0x388/0xb50 [ext4]
        generic_perform_write+0x15d/0x290
        ext4_buffered_write_iter+0x11f/0x210 [ext4]
        ext4_file_write_iter+0xce/0x9e0 [ext4]
        new_sync_write+0x29c/0x3b0
        __vfs_write+0x92/0xa0
        vfs_write+0x103/0x260
        ksys_write+0x9d/0x130
        __x64_sys_write+0x4c/0x60
        do_syscall_64+0x91/0xb05
        entry_SYSCALL_64_after_hwframe+0x49/0xbe
      
       5 locks held by fsync04/25724:
        #0: ffff99f9911093f8 (sb_writers#13){.+.+}, at: vfs_write+0x21c/0x260
        #1: ffff99f9db4c0348 (&sb->s_type->i_mutex_key#15){+.+.}, at: ext4_buffered_write_iter+0x65/0x210 [ext4]
        #2: ffff99f5e7dfcf58 (jbd2_handle){++++}, at: start_this_handle+0x1c1/0x9d0 [jbd2]
        #3: ffff99f9db4c0168 (&ei->i_data_sem){++++}, at: ext4_map_blocks+0x176/0x950 [ext4]
        #4: ffffffff99086b40 (rcu_read_lock){....}, at: jbd2_write_access_granted+0x4e/0x250 [jbd2]
       irq event stamp: 1407125
       hardirqs last  enabled at (1407125): [<ffffffff980da9b7>] __find_get_block+0x107/0x790
       hardirqs last disabled at (1407124): [<ffffffff980da8f9>] __find_get_block+0x49/0x790
       softirqs last  enabled at (1405528): [<ffffffff98a0034c>] __do_softirq+0x34c/0x57c
       softirqs last disabled at (1405521): [<ffffffff97cc67a2>] irq_exit+0xa2/0xc0
      
       Reported by Kernel Concurrency Sanitizer on:
       CPU: 68 PID: 25724 Comm: fsync04 Tainted: G L 5.6.0-rc2-next-20200221+ #7
       Hardware name: HPE ProLiant DL385 Gen10/ProLiant DL385 Gen10, BIOS A40 07/10/2019
      
      The plain reads are outside of jh->b_state_lock critical section which result
      in data races. Fix them by adding pairs of READ|WRITE_ONCE().
      Reviewed-by: default avatarJan Kara <jack@suse.cz>
      Signed-off-by: default avatarQian Cai <cai@lca.pw>
      Link: https://lore.kernel.org/r/20200222043111.2227-1-cai@lca.pwSigned-off-by: default avatarTheodore Ts'o <tytso@mit.edu>
      6c5d9112
    • Linus Torvalds's avatar
      Merge tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi · 7557c1b3
      Linus Torvalds authored
      Pull SCSI fixes from James Bottomley:
       "Four small fixes.
      
        Three are in drivers for fairly obvious bugs. The fourth is a set of
        regressions introduced by the compat_ioctl changes because some of the
        compat updates wrongly replaced .ioctl instead of .compat_ioctl"
      
      * tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi:
        scsi: compat_ioctl: cdrom: Replace .ioctl with .compat_ioctl in four appropriate places
        scsi: zfcp: fix wrong data and display format of SFP+ temperature
        scsi: sd_sbc: Fix sd_zbc_report_zones()
        scsi: libfc: free response frame from GPN_ID
      7557c1b3
    • Juergen Gross's avatar
      x86/mm: Fix dump_pagetables with Xen PV · bba42aff
      Juergen Gross authored
      Commit 2ae27137 ("x86: mm: convert dump_pagetables to use
      walk_page_range") broke Xen PV guests as the hypervisor reserved hole in
      the memory map was not taken into account.
      
      Fix that by starting the kernel range only at GUARD_HOLE_END_ADDR.
      
      Fixes: 2ae27137 ("x86: mm: convert dump_pagetables to use walk_page_range")
      Reported-by: default avatarJulien Grall <julien@xen.org>
      Signed-off-by: default avatarJuergen Gross <jgross@suse.com>
      Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
      Tested-by: default avatarJulien Grall <julien@xen.org>
      Link: https://lkml.kernel.org/r/20200221103851.7855-1-jgross@suse.com
      bba42aff
    • Juergen Gross's avatar
      x86/ioperm: Add new paravirt function update_io_bitmap() · 99bcd4a6
      Juergen Gross authored
      Commit 111e7b15 ("x86/ioperm: Extend IOPL config to control ioperm()
      as well") reworked the iopl syscall to use I/O bitmaps.
      
      Unfortunately this broke Xen PV domains using that syscall as there is
      currently no I/O bitmap support in PV domains.
      
      Add I/O bitmap support via a new paravirt function update_io_bitmap which
      Xen PV domains can use to update their I/O bitmaps via a hypercall.
      
      Fixes: 111e7b15 ("x86/ioperm: Extend IOPL config to control ioperm() as well")
      Reported-by: default avatarJan Beulich <jbeulich@suse.com>
      Signed-off-by: default avatarJuergen Gross <jgross@suse.com>
      Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
      Tested-by: default avatarJan Beulich <jbeulich@suse.com>
      Reviewed-by: default avatarJan Beulich <jbeulich@suse.com>
      Cc: <stable@vger.kernel.org> # 5.5
      Link: https://lkml.kernel.org/r/20200218154712.25490-1-jgross@suse.com
      99bcd4a6
    • Ingo Molnar's avatar
      Merge tag 'perf-urgent-for-mingo-5.6-20200228' of... · 7977fed9
      Ingo Molnar authored
      Merge tag 'perf-urgent-for-mingo-5.6-20200228' 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 annotate:
      
        Ravi Bangoria:
      
        - Fix segfault with source toggle.
      
        - Fix --show-total-period and --show-nr-samples for tui/stdio2.
      
        - Fix handling of settings in ~/.perfconfig versus the ones passed
          in the command line
      
        - Re-render title bar after switching back from script browser.
      
        - Fix options man page, document some missing ones.
      
      perf probe:
      
        He Zhe:
      
        - Check return value of strlist__add() for -ENOMEM.
      
      tools UAPI:
      
        Arnaldo Carvalho de Melo:
      
        - Sync x86's msr-index.h copy with the kernel sources.
      
        - Update tools's copy of x86's kvm.h headers.
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
      7977fed9
  7. 28 Feb, 2020 6 commits