1. 30 Aug, 2019 5 commits
  2. 29 Aug, 2019 5 commits
    • Linus Torvalds's avatar
      Merge tag 'Wimplicit-fallthrough-5.3-rc7' of... · 4a64489c
      Linus Torvalds authored
      Merge tag 'Wimplicit-fallthrough-5.3-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/gustavoars/linux
      
      Pull fallthrough fixes from Gustavo A. R. Silva:
       "Fix fall-through warnings on arc and nds32 for multiple
        configurations"
      
      * tag 'Wimplicit-fallthrough-5.3-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/gustavoars/linux:
        nds32: Mark expected switch fall-throughs
        ARC: unwind: Mark expected switch fall-through
      4a64489c
    • Linus Torvalds's avatar
      Merge tag 'mtd/fixes-for-5.3-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux · 4e73079d
      Linus Torvalds authored
      Pull mtd fix from Miquel Raynal:
       "Add a 'depends on' in the core Hyperbus Kconfig entry to avoid build
        errors"
      
      * tag 'mtd/fixes-for-5.3-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux:
        mtd: hyperbus: fix dependency and build error
      4e73079d
    • Gustavo A. R. Silva's avatar
      nds32: Mark expected switch fall-throughs · 7c9eb2db
      Gustavo A. R. Silva authored
      Mark switch cases where we are expecting to fall through.
      
      This patch fixes the following warnings (Building: allmodconfig nds32):
      
      include/math-emu/soft-fp.h:124:8: warning: this statement may fall through [-Wimplicit-fallthrough=]
      arch/nds32/kernel/signal.c:362:20: warning: this statement may fall through [-Wimplicit-fallthrough=]
      arch/nds32/kernel/signal.c:315:7: warning: this statement may fall through [-Wimplicit-fallthrough=]
      include/math-emu/op-common.h:417:11: warning: this statement may fall through [-Wimplicit-fallthrough=]
      include/math-emu/op-common.h:430:11: warning: this statement may fall through [-Wimplicit-fallthrough=]
      include/math-emu/op-common.h:310:11: warning: this statement may fall through [-Wimplicit-fallthrough=]
      include/math-emu/op-common.h:320:11: warning: this statement may fall through [-Wimplicit-fallthrough=]
      include/math-emu/op-common.h:310:11: warning: this statement may fall through [-Wimplicit-fallthrough=]
      include/math-emu/op-common.h:320:11: warning: this statement may fall through [-Wimplicit-fallthrough=]
      include/math-emu/soft-fp.h:124:8: warning: this statement may fall through [-Wimplicit-fallthrough=]
      include/math-emu/op-common.h:417:11: warning: this statement may fall through [-Wimplicit-fallthrough=]
      include/math-emu/op-common.h:430:11: warning: this statement may fall through [-Wimplicit-fallthrough=]
      include/math-emu/op-common.h:310:11: warning: this statement may fall through [-Wimplicit-fallthrough=]
      include/math-emu/op-common.h:320:11: warning: this statement may fall through [-Wimplicit-fallthrough=]
      include/math-emu/op-common.h:310:11: warning: this statement may fall through [-Wimplicit-fallthrough=]
      include/math-emu/op-common.h:320:11: warning: this statement may fall through [-Wimplicit-fallthrough=]
      Reported-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
      Signed-off-by: default avatarGustavo A. R. Silva <gustavo@embeddedor.com>
      7c9eb2db
    • Gustavo A. R. Silva's avatar
      ARC: unwind: Mark expected switch fall-through · 00a0c845
      Gustavo A. R. Silva authored
      Mark switch cases where we are expecting to fall through.
      
      This patch fixes the following warnings (Building: haps_hs_defconfig arc):
      
      arch/arc/kernel/unwind.c: In function ‘read_pointer’:
      ./include/linux/compiler.h:328:5: warning: this statement may fall through [-Wimplicit-fallthrough=]
        do {        \
           ^
      ./include/linux/compiler.h:338:2: note: in expansion of macro ‘__compiletime_assert’
        __compiletime_assert(condition, msg, prefix, suffix)
        ^~~~~~~~~~~~~~~~~~~~
      ./include/linux/compiler.h:350:2: note: in expansion of macro ‘_compiletime_assert’
        _compiletime_assert(condition, msg, __compiletime_assert_, __LINE__)
        ^~~~~~~~~~~~~~~~~~~
      ./include/linux/build_bug.h:39:37: note: in expansion of macro ‘compiletime_assert’
       #define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
                                           ^~~~~~~~~~~~~~~~~~
      ./include/linux/build_bug.h:50:2: note: in expansion of macro ‘BUILD_BUG_ON_MSG’
        BUILD_BUG_ON_MSG(condition, "BUILD_BUG_ON failed: " #condition)
        ^~~~~~~~~~~~~~~~
      arch/arc/kernel/unwind.c:573:3: note: in expansion of macro ‘BUILD_BUG_ON’
         BUILD_BUG_ON(sizeof(u32) != sizeof(value));
         ^~~~~~~~~~~~
      arch/arc/kernel/unwind.c:575:2: note: here
        case DW_EH_PE_native:
        ^~~~
      Signed-off-by: default avatarGustavo A. R. Silva <gustavo@embeddedor.com>
      00a0c845
    • Randy Dunlap's avatar
      mtd: hyperbus: fix dependency and build error · dc9cfd26
      Randy Dunlap authored
      lib/devres.c, which implements devm_ioremap_resource(), is only built
      when CONFIG_HAS_IOMEM is set/enabled, so MTD_HYPERBUS should depend
      on HAS_IOMEM.  Fixes a build error and a Kconfig warning (as seen on
      UML builds):
      
      WARNING: unmet direct dependencies detected for MTD_COMPLEX_MAPPINGS
        Depends on [n]: MTD [=m] && HAS_IOMEM [=n]
        Selected by [m]:
        - MTD_HYPERBUS [=m] && MTD [=m]
      
      ERROR: "devm_ioremap_resource" [drivers/mtd/hyperbus/hyperbus-core.ko] undefined!
      
      Fixes: dcc7d344 ("mtd: Add support for HyperBus memory devices")
      Signed-off-by: default avatarRandy Dunlap <rdunlap@infradead.org>
      Cc: Vignesh Raghavendra <vigneshr@ti.com>
      Cc: Miquel Raynal <miquel.raynal@bootlin.com>
      Cc: Geert Uytterhoeven <geert@linux-m68k.org>
      Cc: linux-mtd@lists.infradead.org
      Acked-by: default avatarVignesh Raghavendra <vigneshr@ti.com>
      Signed-off-by: default avatarMiquel Raynal <miquel.raynal@bootlin.com>
      dc9cfd26
  3. 28 Aug, 2019 3 commits
  4. 27 Aug, 2019 23 commits
    • Steve French's avatar
      cifs: update internal module number · 36e33774
      Steve French authored
      To 2.22
      Signed-off-by: default avatarSteve French <stfrench@microsoft.com>
      36e33774
    • Ronnie Sahlberg's avatar
      cifs: replace various strncpy with strscpy and similar · 340625e6
      Ronnie Sahlberg authored
      Using strscpy is cleaner, and avoids some problems with
      handling maximum length strings.  Linus noticed the
      original problem and Aurelien pointed out some additional
      problems. Fortunately most of this is SMB1 code (and
      in particular the ASCII string handling older, which
      is less common).
      Reported-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      Reviewed-by: default avatarAurelien Aptel <aaptel@suse.com>
      Signed-off-by: default avatarRonnie Sahlberg <lsahlber@redhat.com>
      Signed-off-by: default avatarSteve French <stfrench@microsoft.com>
      340625e6
    • Dan Carpenter's avatar
      cifs: Use kzfree() to zero out the password · 478228e5
      Dan Carpenter authored
      It's safer to zero out the password so that it can never be disclosed.
      
      Fixes: 0c219f5799c7 ("cifs: set domainName when a domain-key is used in multiuser")
      Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
      Signed-off-by: default avatarSteve French <stfrench@microsoft.com>
      478228e5
    • Ronnie Sahlberg's avatar
      cifs: set domainName when a domain-key is used in multiuser · f2aee329
      Ronnie Sahlberg authored
      RHBZ: 1710429
      
      When we use a domain-key to authenticate using multiuser we must also set
      the domainnmame for the new volume as it will be used and passed to the server
      in the NTLMSSP Domain-name.
      Signed-off-by: default avatarRonnie Sahlberg <lsahlber@redhat.com>
      Signed-off-by: default avatarSteve French <stfrench@microsoft.com>
      f2aee329
    • Linus Torvalds's avatar
      Merge tag 'nfs-for-5.3-3' of git://git.linux-nfs.org/projects/trondmy/linux-nfs · 9e8312f5
      Linus Torvalds authored
      Pull NFS client bugfixes from Trond Myklebust:
       "Highlights include:
      
        Stable fixes:
      
         - Fix a page lock leak in nfs_pageio_resend()
      
         - Ensure O_DIRECT reports an error if the bytes read/written is 0
      
         - Don't handle errors if the bind/connect succeeded
      
         - Revert "NFSv4/flexfiles: Abort I/O early if the layout segment was
           invalidat ed"
      
        Bugfixes:
      
         - Don't refresh attributes with mounted-on-file information
      
         - Fix return values for nfs4_file_open() and nfs_finish_open()
      
         - Fix pnfs layoutstats reporting of I/O errors
      
         - Don't use soft RPC calls for pNFS/flexfiles I/O, and don't abort
           for soft I/O errors when the user specifies a hard mount.
      
         - Various fixes to the error handling in sunrpc
      
         - Don't report writepage()/writepages() errors twice"
      
      * tag 'nfs-for-5.3-3' of git://git.linux-nfs.org/projects/trondmy/linux-nfs:
        NFS: remove set but not used variable 'mapping'
        NFSv2: Fix write regression
        NFSv2: Fix eof handling
        NFS: Fix writepage(s) error handling to not report errors twice
        NFS: Fix spurious EIO read errors
        pNFS/flexfiles: Don't time out requests on hard mounts
        SUNRPC: Handle connection breakages correctly in call_status()
        Revert "NFSv4/flexfiles: Abort I/O early if the layout segment was invalidated"
        SUNRPC: Handle EADDRINUSE and ENOBUFS correctly
        pNFS/flexfiles: Turn off soft RPC calls
        SUNRPC: Don't handle errors if the bind/connect succeeded
        NFS: On fatal writeback errors, we need to call nfs_inode_remove_request()
        NFS: Fix initialisation of I/O result struct in nfs_pgio_rpcsetup
        NFS: Ensure O_DIRECT reports an error if the bytes read/written is 0
        NFSv4/pnfs: Fix a page lock leak in nfs_pageio_resend()
        NFSv4: Fix return value in nfs_finish_open()
        NFSv4: Fix return values for nfs4_file_open()
        NFS: Don't refresh attributes with mounted-on-file information
      9e8312f5
    • Linus Torvalds's avatar
      Merge tag 'arc-5.3-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/vgupta/arc · 6525771f
      Linus Torvalds authored
      Pull ARC updates from Vineet Gupta:
      
       - support for Edge Triggered IRQs in ARC IDU intc
      
       - other fixes here and there
      
      * tag 'arc-5.3-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/vgupta/arc:
        arc: prefer __section from compiler_attributes.h
        dt-bindings: IDU-intc: Add support for edge-triggered interrupts
        dt-bindings: IDU-intc: Clean up documentation
        ARCv2: IDU-intc: Add support for edge-triggered interrupts
        ARC: unwind: Mark expected switch fall-throughs
        ARC: [plat-hsdk]: allow to switch between AXI DMAC port configurations
        ARC: fix typo in setup_dma_ops log message
        ARCv2: entry: early return from exception need not clear U & DE bits
      6525771f
    • Linus Torvalds's avatar
      Merge tag 'mfd-fixes-5.3' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd · 8d645408
      Linus Torvalds authored
      Pull MFD fix from Lee Jones:
       "Identify potentially unused functions in rk808 driver when !PM"
      
      * tag 'mfd-fixes-5.3' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd:
        mfd: rk808: Make PM function declaration static
        mfd: rk808: Mark pm functions __maybe_unused
      8d645408
    • Linus Torvalds's avatar
      Merge tag 'sound-5.3-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound · 0004654f
      Linus Torvalds authored
      Pull sound fixes from Takashi Iwai:
       "A collection of small fixes as usual:
      
         - More coverage of USB-audio descriptor sanity checks
      
         - A fix for mute LED regression on Conexant HD-audio codecs
      
         - A few device-specific fixes and quirks for USB-audio and HD-audio
      
         - A fix for (die-hard remaining) possible race in sequencer core
      
         - FireWire oxfw regression fix that was introduced in 5.3-rc1"
      
      * tag 'sound-5.3-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound:
        ALSA: oxfw: fix to handle correct stream for PCM playback
        ALSA: seq: Fix potential concurrent access to the deleted pool
        ALSA: usb-audio: Check mixer unit bitmap yet more strictly
        ALSA: line6: Fix memory leak at line6_init_pcm() error path
        ALSA: usb-audio: Fix invalid NULL check in snd_emuusb_set_samplerate()
        ALSA: hda/ca0132 - Add new SBZ quirk
        ALSA: usb-audio: Add implicit fb quirk for Behringer UFX1604
        ALSA: hda - Fixes inverted Conexant GPIO mic mute led
      0004654f
    • Aaron Liu's avatar
      drm/amdgpu: fix GFXOFF on Picasso and Raven2 · 41940ff5
      Aaron Liu authored
      For picasso(adev->pdev->device == 0x15d8)&raven2(adev->rev_id >= 0x8),
      firmware is sufficient to support gfxoff.
      In commit 98f58ada, for picasso&raven2,
      return directly and cause gfxoff disabled.
      
      Fixes: 98f58ada ("drm/amdgpu/gfx9: update pg_flags after determining if gfx off is possible")
      Reviewed-by: default avatarHuang Rui <ray.huang@amd.com>
      Reviewed-by: default avatarAlex Deucher <alexander.deucher@amd.com>
      Signed-off-by: default avatarAaron Liu <aaron.liu@amd.com>
      Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
      Cc: stable@vger.kernel.org
      41940ff5
    • Kai-Heng Feng's avatar
      drm/amdgpu: Add APTX quirk for Dell Latitude 5495 · 317a3aae
      Kai-Heng Feng authored
      Needs ATPX rather than _PR3 to really turn off the dGPU. This can save
      ~5W when dGPU is runtime-suspended.
      Signed-off-by: default avatarKai-Heng Feng <kai.heng.feng@canonical.com>
      Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
      Cc: stable@vger.kernel.org
      317a3aae
    • Evan Quan's avatar
      drm/amd/powerplay: correct Vega20 dpm level related settings · 83e09d5b
      Evan Quan authored
      Correct the settings for auto mode and skip the unnecessary
      settings for dcefclk and fclk.
      Signed-off-by: default avatarEvan Quan <evan.quan@amd.com>
      Acked-by: default avatarAlex Deucher <alexander.deucher@amd.com>
      Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
      83e09d5b
    • Linus Torvalds's avatar
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net · 452a0444
      Linus Torvalds authored
      Pull networking fixes from David Miller:
      
       1) Use 32-bit index for tails calls in s390 bpf JIT, from Ilya
          Leoshkevich.
      
       2) Fix missed EPOLLOUT events in TCP, from Eric Dumazet. Same fix for
          SMC from Jason Baron.
      
       3) ipv6_mc_may_pull() should return 0 for malformed packets, not
          -EINVAL. From Stefano Brivio.
      
       4) Don't forget to unpin umem xdp pages in error path of
          xdp_umem_reg(). From Ivan Khoronzhuk.
      
       5) Fix sta object leak in mac80211, from Johannes Berg.
      
       6) Fix regression by not configuring PHYLINK on CPU port of bcm_sf2
          switches. From Florian Fainelli.
      
       7) Revert DMA sync removal from r8169 which was causing regressions on
          some MIPS Loongson platforms. From Heiner Kallweit.
      
       8) Use after free in flow dissector, from Jakub Sitnicki.
      
       9) Fix NULL derefs of net devices during ICMP processing across
          collect_md tunnels, from Hangbin Liu.
      
      10) proto_register() memory leaks, from Zhang Lin.
      
      11) Set NLM_F_MULTI flag in multipart netlink messages consistently,
          from John Fastabend.
      
      * git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net: (66 commits)
        r8152: Set memory to all 0xFFs on failed reg reads
        openvswitch: Fix conntrack cache with timeout
        ipv4: mpls: fix mpls_xmit for iptunnel
        nexthop: Fix nexthop_num_path for blackhole nexthops
        net: rds: add service level support in rds-info
        net: route dump netlink NLM_F_MULTI flag missing
        s390/qeth: reject oversized SNMP requests
        sock: fix potential memory leak in proto_register()
        MAINTAINERS: Add phylink keyword to SFF/SFP/SFP+ MODULE SUPPORT
        xfrm/xfrm_policy: fix dst dev null pointer dereference in collect_md mode
        ipv4/icmp: fix rt dst dev null pointer dereference
        openvswitch: Fix log message in ovs conntrack
        bpf: allow narrow loads of some sk_reuseport_md fields with offset > 0
        bpf: fix use after free in prog symbol exposure
        bpf: fix precision tracking in presence of bpf2bpf calls
        flow_dissector: Fix potential use-after-free on BPF_PROG_DETACH
        Revert "r8169: remove not needed call to dma_sync_single_for_device"
        ipv6: propagate ipv6_add_dev's error returns out of ipv6_find_idev
        net/ncsi: Fix the payload copying for the request coming from Netlink
        qed: Add cleanup in qed_slowpath_start()
        ...
      452a0444
    • Heyi Guo's avatar
      KVM: arm/arm64: vgic: Fix potential deadlock when ap_list is long · d4a8061a
      Heyi Guo authored
      If the ap_list is longer than 256 entries, merge_final() in list_sort()
      will call the comparison callback with the same element twice, causing
      a deadlock in vgic_irq_cmp().
      
      Fix it by returning early when irqa == irqb.
      
      Cc: stable@vger.kernel.org # 4.7+
      Fixes: 8e444745 ("KVM: arm/arm64: vgic-new: Add IRQ sorting")
      Signed-off-by: default avatarZenghui Yu <yuzenghui@huawei.com>
      Signed-off-by: default avatarHeyi Guo <guoheyi@huawei.com>
      [maz: massaged commit log and patch, added Fixes and Cc-stable]
      Signed-off-by: default avatarMarc Zyngier <maz@kernel.org>
      Signed-off-by: default avatarWill Deacon <will@kernel.org>
      d4a8061a
    • Marc Zyngier's avatar
      kallsyms: Don't let kallsyms_lookup_size_offset() fail on retrieving the first symbol · 2a1a3fa0
      Marc Zyngier authored
      An arm64 kernel configured with
      
        CONFIG_KPROBES=y
        CONFIG_KALLSYMS=y
        # CONFIG_KALLSYMS_ALL is not set
        CONFIG_KALLSYMS_BASE_RELATIVE=y
      
      reports the following kprobe failure:
      
        [    0.032677] kprobes: failed to populate blacklist: -22
        [    0.033376] Please take care of using kprobes.
      
      It appears that kprobe fails to retrieve the symbol at address
      0xffff000010081000, despite this symbol being in System.map:
      
        ffff000010081000 T __exception_text_start
      
      This symbol is part of the first group of aliases in the
      kallsyms_offsets array (symbol names generated using ugly hacks in
      scripts/kallsyms.c):
      
        kallsyms_offsets:
                .long   0x1000 // do_undefinstr
                .long   0x1000 // efi_header_end
                .long   0x1000 // _stext
                .long   0x1000 // __exception_text_start
                .long   0x12b0 // do_cp15instr
      
      Looking at the implementation of get_symbol_pos(), it returns the
      lowest index for aliasing symbols. In this case, it return 0.
      
      But kallsyms_lookup_size_offset() considers 0 as a failure, which
      is obviously wrong (there is definitely a valid symbol living there).
      In turn, the kprobe blacklisting stops abruptly, hence the original
      error.
      
      A CONFIG_KALLSYMS_ALL kernel wouldn't fail as there is always
      some random symbols at the beginning of this array, which are never
      looked up via kallsyms_lookup_size_offset.
      
      Fix it by considering that get_symbol_pos() is always successful
      (which is consistent with the other uses of this function).
      
      Fixes: ffc50891 ("[PATCH] Create kallsyms_lookup_size_offset()")
      Reviewed-by: default avatarMasami Hiramatsu <mhiramat@kernel.org>
      Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Will Deacon <will@kernel.org>
      Cc: Catalin Marinas <catalin.marinas@arm.com>
      Signed-off-by: default avatarMarc Zyngier <maz@kernel.org>
      Signed-off-by: default avatarWill Deacon <will@kernel.org>
      2a1a3fa0
    • YueHaibing's avatar
      NFS: remove set but not used variable 'mapping' · 99300a85
      YueHaibing authored
      Fixes gcc '-Wunused-but-set-variable' warning:
      
      fs/nfs/write.c: In function nfs_page_async_flush:
      fs/nfs/write.c:609:24: warning: variable mapping set but not used [-Wunused-but-set-variable]
      
      It is not use since commit aefb623c422e ("NFS: Fix
      writepage(s) error handling to not report errors twice")
      Reported-by: default avatarHulk Robot <hulkci@huawei.com>
      Signed-off-by: default avatarYueHaibing <yuehaibing@huawei.com>
      Signed-off-by: default avatarTrond Myklebust <trond.myklebust@hammerspace.com>
      99300a85
    • Trond Myklebust's avatar
      NFSv2: Fix write regression · d33d4beb
      Trond Myklebust authored
      Ensure we update the write result count on success, since the
      RPC call itself does not do so.
      Reported-by: default avatarJan Stancek <jstancek@redhat.com>
      Reported-by: default avatarNaresh Kamboju <naresh.kamboju@linaro.org>
      Signed-off-by: default avatarTrond Myklebust <trond.myklebust@hammerspace.com>
      Tested-by: default avatarJan Stancek <jstancek@redhat.com>
      d33d4beb
    • Trond Myklebust's avatar
      NFSv2: Fix eof handling · 71affe9b
      Trond Myklebust authored
      If we received a reply from the server with a zero length read and
      no error, then that implies we are at eof.
      Signed-off-by: default avatarTrond Myklebust <trond.myklebust@hammerspace.com>
      71affe9b
    • Lee Jones's avatar
      mfd: rk808: Make PM function declaration static · 4d82fa67
      Lee Jones authored
      Avoids:
        ../drivers/mfd/rk808.c:771:1: warning: symbol 'rk8xx_pm_ops' \
          was not declared. Should it be static?
      
      Fixes: 5752bc43 ("mfd: rk808: Mark pm functions __maybe_unused")
      Reviewed-by: default avatarArnd Bergmann <arnd@arndb.de>
      Signed-off-by: default avatarLee Jones <lee.jones@linaro.org>
      4d82fa67
    • Lyude Paul's avatar
      drm/i915: Call dma_set_max_seg_size() in i915_driver_hw_probe() · 32f0a982
      Lyude Paul authored
      Currently, we don't call dma_set_max_seg_size() for i915 because we
      intentionally do not limit the segment length that the device supports.
      However, this results in a warning being emitted if we try to map
      anything larger than SZ_64K on a kernel with CONFIG_DMA_API_DEBUG_SG
      enabled:
      
      [    7.751926] DMA-API: i915 0000:00:02.0: mapping sg segment longer
      than device claims to support [len=98304] [max=65536]
      [    7.751934] WARNING: CPU: 5 PID: 474 at kernel/dma/debug.c:1220
      debug_dma_map_sg+0x20f/0x340
      
      This was originally brought up on
      https://bugs.freedesktop.org/show_bug.cgi?id=108517 , and the consensus
      there was it wasn't really useful to set a limit (and that dma-debug
      isn't really all that useful for i915 in the first place). Unfortunately
      though, CONFIG_DMA_API_DEBUG_SG is enabled in the debug configs for
      various distro kernels. Since a WARN_ON() will disable automatic problem
      reporting (and cause any CI with said option enabled to start
      complaining), we really should just fix the problem.
      
      Note that as me and Chris Wilson discussed, the other solution for this
      would be to make DMA-API not make such assumptions when a driver hasn't
      explicitly set a maximum segment size. But, taking a look at the commit
      which originally introduced this behavior, commit 78c47830
      ("dma-debug: check scatterlist segments"), there is an explicit mention
      of this assumption and how it applies to devices with no segment size:
      
      	Conversely, devices which are less limited than the rather
      	conservative defaults, or indeed have no limitations at all
      	(e.g. GPUs with their own internal MMU), should be encouraged to
      	set appropriate dma_parms, as they may get more efficient DMA
      	mapping performance out of it.
      
      So unless there's any concerns (I'm open to discussion!), let's just
      follow suite and call dma_set_max_seg_size() with UINT_MAX as our limit
      to silence any warnings.
      
      Changes since v3:
      * Drop patch for enabling CONFIG_DMA_API_DEBUG_SG in CI. It looks like
        just turning it on causes the kernel to spit out bogus WARN_ONs()
        during some igt tests which would otherwise require teaching igt to
        disable the various DMA-API debugging options causing this. This is
        too much work to be worth it, since DMA-API debugging is useless for
        us. So, we'll just settle with this single patch to squelch WARN_ONs()
        during driver load for users that have CONFIG_DMA_API_DEBUG_SG turned
        on for some reason.
      * Move dma_set_max_seg_size() call into i915_driver_hw_probe() - Chris
        Wilson
      Signed-off-by: default avatarLyude Paul <lyude@redhat.com>
      Reviewed-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
      Cc: <stable@vger.kernel.org> # v4.18+
      Link: https://patchwork.freedesktop.org/patch/msgid/20190823205251.14298-1-lyude@redhat.com
      (cherry picked from commit acd674af95d3f627062007429b9c195c6b32361d)
      Signed-off-by: default avatarJani Nikula <jani.nikula@intel.com>
      32f0a982
    • Manasi Navare's avatar
      drm/i915/dp: Fix DSC enable code to use cpu_transcoder instead of encoder->type · 5b6eefd6
      Manasi Navare authored
      This patch fixes the intel_configure_pps_for_dsc_encoder() function to use
      cpu_transcoder instead of encoder->type to select the correct DSC registers
      that was wrongly used in the original patch for one DSC register isntance.
      
      Fixes: 7182414e ("drm/i915/dp: Configure i915 Picture parameter Set registers during DSC enabling")
      Cc: Ville Syrjala <ville.syrjala@linux.intel.com>
      Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
      Cc: Jani Nikula <jani.nikula@linux.intel.com>
      Cc: <stable@vger.kernel.org> # v5.0+
      Signed-off-by: default avatarManasi Navare <manasi.d.navare@intel.com>
      Reviewed-by: default avatarMaarten Lankhorst <maarten.lankhorst@linux.intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20190821215950.24223-1-manasi.d.navare@intel.com
      (cherry picked from commit d4c61c4a16decd8ace8660f22c81609a539fccba)
      Signed-off-by: default avatarJani Nikula <jani.nikula@intel.com>
      5b6eefd6
    • Xiong Zhang's avatar
      drm/i915: Don't deballoon unused ggtt drm_mm_node in linux guest · 0a3dfbb5
      Xiong Zhang authored
      The following call trace may exist in linux guest dmesg when guest i915
      driver is unloaded.
      [   90.776610] [drm:vgt_deballoon_space.isra.0 [i915]] deballoon space: range [0x0 - 0x0] 0 KiB.
      [   90.776621] BUG: unable to handle kernel NULL pointer dereference at 00000000000000c0
      [   90.776691] IP: drm_mm_remove_node+0x4d/0x320 [drm]
      [   90.776718] PGD 800000012c7d0067 P4D 800000012c7d0067 PUD 138e4c067 PMD 0
      [   90.777091] task: ffff9adab60f2f00 task.stack: ffffaf39c0fe0000
      [   90.777142] RIP: 0010:drm_mm_remove_node+0x4d/0x320 [drm]
      [   90.777573] Call Trace:
      [   90.777653]  intel_vgt_deballoon+0x4c/0x60 [i915]
      [   90.777729]  i915_ggtt_cleanup_hw+0x121/0x190 [i915]
      [   90.777792]  i915_driver_unload+0x145/0x180 [i915]
      [   90.777856]  i915_pci_remove+0x15/0x20 [i915]
      [   90.777890]  pci_device_remove+0x3b/0xc0
      [   90.777916]  device_release_driver_internal+0x157/0x220
      [   90.777945]  driver_detach+0x39/0x70
      [   90.777967]  bus_remove_driver+0x51/0xd0
      [   90.777990]  pci_unregister_driver+0x23/0x90
      [   90.778019]  SyS_delete_module+0x1da/0x240
      [   90.778045]  entry_SYSCALL_64_fastpath+0x24/0x87
      [   90.778072] RIP: 0033:0x7f34312af067
      [   90.778092] RSP: 002b:00007ffdea3da0d8 EFLAGS: 00000206
      [   90.778297] RIP: drm_mm_remove_node+0x4d/0x320 [drm] RSP: ffffaf39c0fe3dc0
      [   90.778344] ---[ end trace f4b1bc8305fc59dd ]---
      
      Four drm_mm_node are used to reserve guest ggtt space, but some of them
      may be skipped and not initialised due to space constraints in
      intel_vgt_balloon(). If drm_mm_remove_node() is called with
      uninitialized drm_mm_node, the above call trace occurs.
      
      This patch check drm_mm_node's validity before calling
      drm_mm_remove_node().
      
      Fixes: ff8f7975("drm/i915: return the correct usable aperture size under gvt environment")
      Cc: stable@vger.kernel.org
      Signed-off-by: default avatarXiong Zhang <xiong.y.zhang@intel.com>
      Acked-by: default avatarZhenyu Wang <zhenyuw@linux.intel.com>
      Reviewed-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
      Signed-off-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
      Link: https://patchwork.freedesktop.org/patch/msgid/1566279978-9659-1-git-send-email-xiong.y.zhang@intel.com
      (cherry picked from commit 4776f3529d6b1e47f02904ad1d264d25ea22b27b)
      Signed-off-by: default avatarJani Nikula <jani.nikula@intel.com>
      0a3dfbb5
    • Ville Syrjälä's avatar
      drm/i915: Do not create a new max_bpc prop for MST connectors · ed5fa906
      Ville Syrjälä authored
      We're not allowed to create new properties after device registration
      so for MST connectors we need to either create the max_bpc property
      earlier, or we reuse one we already have. Let's do the latter apporach
      since the corresponding SST connector already has the prop and its
      min/max are correct also for the MST connector.
      
      The problem was highlighted by commit 4f5368b5541a ("drm/kms:
      Catch mode_object lifetime errors") which results in the following
      spew:
      [ 1330.878941] WARNING: CPU: 2 PID: 1554 at drivers/gpu/drm/drm_mode_object.c:45 __drm_mode_object_add+0xa0/0xb0 [drm]
      ...
      [ 1330.879008] Call Trace:
      [ 1330.879023]  drm_property_create+0xba/0x180 [drm]
      [ 1330.879036]  drm_property_create_range+0x15/0x30 [drm]
      [ 1330.879048]  drm_connector_attach_max_bpc_property+0x62/0x80 [drm]
      [ 1330.879086]  intel_dp_add_mst_connector+0x11f/0x140 [i915]
      [ 1330.879094]  drm_dp_add_port.isra.20+0x20b/0x440 [drm_kms_helper]
      ...
      
      Cc: stable@vger.kernel.org
      Cc: Lyude Paul <lyude@redhat.com>
      Cc: sunpeng.li@amd.com
      Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
      Cc: Sean Paul <sean@poorly.run>
      Fixes: 5ca0ef8a ("drm/i915: Add max_bpc property for DP MST")
      Signed-off-by: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20190820161657.9658-1-ville.syrjala@linux.intel.comReviewed-by: default avatarJosé Roberto de Souza <jose.souza@intel.com>
      Reviewed-by: default avatarLyude Paul <lyude@redhat.com>
      (cherry picked from commit 1b9bd09630d4db4827cc04d358a41a16a6bc2cb0)
      Signed-off-by: default avatarJani Nikula <jani.nikula@intel.com>
      ed5fa906
    • Arnd Bergmann's avatar
      mfd: rk808: Mark pm functions __maybe_unused · 5752bc43
      Arnd Bergmann authored
      The newly added suspend/resume functions are only used if CONFIG_PM
      is enabled:
      
      drivers/mfd/rk808.c:752:12: error: 'rk8xx_resume' defined but not used [-Werror=unused-function]
      drivers/mfd/rk808.c:732:12: error: 'rk8xx_suspend' defined but not used [-Werror=unused-function]
      
      Mark them as __maybe_unused so the compiler can silently drop them
      when they are not needed.
      
      Fixes: 586c1b41 ("mfd: rk808: Add RK817 and RK809 support")
      Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
      Signed-off-by: default avatarLee Jones <lee.jones@linaro.org>
      5752bc43
  5. 26 Aug, 2019 4 commits