1. 12 Mar, 2023 1 commit
    • Linus Torvalds's avatar
      cpumask: relax sanity checking constraints · e7304080
      Linus Torvalds authored
      The cpumask_check() was unnecessarily tight, and causes problems for the
      users of cpumask_next().
      
      We have a number of users that take the previous return value of one of
      the bit scanning functions and subtract one to keep it in "range".  But
      since the scanning functions end up returning up to 'small_cpumask_bits'
      instead of the tighter 'nr_cpumask_bits', the range really needs to be
      using that widened form.
      
      [ This "previous-1" behavior is also the reason we have all those
        comments about /* -1 is a legal arg here. */ and separate checks for
        that being ok.  So we could have just made "small_cpumask_bits-1"
        be a similar special "don't check this" value.
      
        Tetsuo Handa even suggested a patch that only does that for
        cpumask_next(), since that seems to be the only actual case that
        triggers, but that all makes it even _more_ magical and special. So
        just relax the check ]
      
      One example of this kind of pattern being the 'c_start()' function in
      arch/x86/kernel/cpu/proc.c, but also duplicated in various forms on
      other architectures.
      
      Reported-by: syzbot+96cae094d90877641f32@syzkaller.appspotmail.com
      Link: https://syzkaller.appspot.com/bug?extid=96cae094d90877641f32Reported-by: default avatarTetsuo Handa <penguin-kernel@i-love.sakura.ne.jp>
      Link: https://lore.kernel.org/lkml/c1f4cc16-feea-b83c-82cf-1a1f007b7eb9@I-love.SAKURA.ne.jp/
      Fixes: 596ff4a0 ("cpumask: re-introduce constant-sized cpumask optimizations")
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      e7304080
  2. 11 Mar, 2023 7 commits
    • Linus Torvalds's avatar
      Merge tag 'i2c-for-6.3-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux · 81ff8554
      Linus Torvalds authored
      Pull i2c updates from Wolfram Sang:
       "This marks the end of a transition to let I2C have the same probe
        semantics as other subsystems. Uwe took care that no drivers in the
        current tree nor in -next use the deprecated .probe call. So, it is a
        good time to switch to the new, standard semantics now.
      
        There is also a regression fix:
      
         - regression fix for the notifier handling of the I2C core
      
         - final coversions of drivers away from deprecated .probe
      
         - make .probe_new the standard probe and convert I2C core to use it
      
      * tag 'i2c-for-6.3-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux:
        i2c: dev: Fix bus callback return values
        i2c: Convert drivers to new .probe() callback
        i2c: mux: Convert all drivers to new .probe() callback
        i2c: Switch .probe() to not take an id parameter
        media: i2c: ov2685: convert to i2c's .probe_new()
        media: i2c: ov5695: convert to i2c's .probe_new()
        w1: ds2482: Convert to i2c's .probe_new()
        serial: sc16is7xx: Convert to i2c's .probe_new()
        mtd: maps: pismo: Convert to i2c's .probe_new()
        misc: ad525x_dpot-i2c: Convert to i2c's .probe_new()
      81ff8554
    • Richard Weinberger's avatar
      ubi: block: Fix missing blk_mq_end_request · e25c54d1
      Richard Weinberger authored
      Switching to BLK_MQ_F_BLOCKING wrongly removed the call to
      blk_mq_end_request(). Add it back to have our IOs finished
      
      Fixes: 91cc8fbc ("ubi: block: set BLK_MQ_F_BLOCKING")
      Analyzed-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      Reported-by: default avatarDaniel Palmer <daniel@0x0f.com>
      Link: https://lore.kernel.org/linux-mtd/CAHk-=wi29bbBNh3RqJKu3PxzpjDN5D5K17gEVtXrb7-6bfrnMQ@mail.gmail.com/Signed-off-by: default avatarRichard Weinberger <richard@nod.at>
      Reviewed-by: default avatarChristoph Hellwig <hch@lst.de>
      Tested-by: default avatarDaniel Palmer <daniel@0x0f.com>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      e25c54d1
    • Linus Torvalds's avatar
      Merge tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi · ef5f68cc
      Linus Torvalds authored
      Pull SCSI fixes from James Bottomley:
       "Twenty fixes all in drivers except the one zone storage revalidation
        fix to sd.
      
        The megaraid_sas fixes are more on the level of a driver update
        (enabling crash dump and increasing lun number) but I thought you
        could let this slide on -rc1 and the next most extensive update is a
        load of fixes to mpi3mr"
      
      * tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi:
        scsi: sd: Fix wrong zone_write_granularity value during revalidate
        scsi: storvsc: Handle BlockSize change in Hyper-V VHD/VHDX file
        scsi: megaraid_sas: Driver version update to 07.725.01.00-rc1
        scsi: megaraid_sas: Add crash dump mode capability bit in MFI capabilities
        scsi: megaraid_sas: Update max supported LD IDs to 240
        scsi: mpi3mr: Bad drive in topology results kernel crash
        scsi: mpi3mr: NVMe command size greater than 8K fails
        scsi: mpi3mr: Return proper values for failures in firmware init path
        scsi: mpi3mr: Wait for diagnostic save during controller init
        scsi: mpi3mr: Driver unload crashes host when enhanced logging is enabled
        scsi: mpi3mr: ioctl timeout when disabling/enabling interrupt
        scsi: lpfc: Avoid usage of list iterator variable after loop
        scsi: lpfc: Check kzalloc() in lpfc_sli4_cgn_params_read()
        scsi: ufs: mcq: qcom: Clean the return path of ufs_qcom_mcq_config_resource()
        scsi: ufs: mcq: qcom: Fix passing zero to PTR_ERR
        scsi: ufs: ufs-qcom: Remove impossible check
        scsi: ufs: core: Add soft dependency on governor_simpleondemand
        scsi: hisi_sas: Check devm_add_action() return value
        scsi: qla2xxx: Add option to disable FC2 Target support
        scsi: target: iscsi: Fix an error message in iscsi_check_key()
      ef5f68cc
    • Linus Torvalds's avatar
      Merge tag 'block-6.3-2023-03-09' of git://git.kernel.dk/linux · 40f879bd
      Linus Torvalds authored
      Pull block fixes from Jens Axboe:
      
       - Fix a regression in exclusive mode handling of the partition code,
         introduced in this merge windoe (Yu)
      
       - Fix for a use-after-free in BFQ (Yu)
      
       - Add sysfs documentation for the 'hidden' attribute (Sagi)
      
      * tag 'block-6.3-2023-03-09' of git://git.kernel.dk/linux:
        block, bfq: fix uaf for 'stable_merge_bfqq'
        docs: sysfs-block: document hidden sysfs entry
        block: fix wrong mode for blkdev_put() from disk_scan_partitions()
      40f879bd
    • Linus Torvalds's avatar
      Merge tag 'pull-highmem' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs · d33d4c9e
      Linus Torvalds authored
      Pull put_and_unmap_page() helper from Al Viro:
       "kmap_local_page() conversions in local filesystems keep running into
        kunmap_local_page()+put_page() combinations.  We can keep inventing
        names for identical inline helpers, but it's getting rather
        inconvenient. I've added a trivial helper to linux/highmem.h instead.
      
        I would've held that back until the merge window, if not for the mess
        it causes in tree topology - I've several branches merging from that
        one, and it's only going to get worse if e.g. ext2 stuff gets picked
        by Jan"
      
      * tag 'pull-highmem' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs:
        new helper: put_and_unmap_page()
      d33d4c9e
    • Linus Torvalds's avatar
      Merge tag 'pull-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs · 4831f762
      Linus Torvalds authored
      Pull misc fixes from Al Viro:
       "pick_file() speculation fix + fix for alpha mis(merge,cherry-pick)
      
        The fs/file.c one is a genuine missing speculation barrier in
        pick_file() (reachable e.g. via close(2)). The alpha one is strictly
        speaking not a bug fix, but only because confusion between
        preempt_enable() and preempt_disable() is harmless on architecture
        without CONFIG_PREEMPT.
      
        Looks like alpha.git picked the wrong version of patch - that braino
        used to be there in early versions, but it had been fixed quite a
        while ago..."
      
      * tag 'pull-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs:
        fs: prevent out-of-bounds array speculation when closing a file descriptor
        alpha: fix lazy-FPU mis(merged/applied/whatnot)
      4831f762
    • Linus Torvalds's avatar
      Merge tag 'thermal-6.3-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm · a0aefd30
      Linus Torvalds authored
      Pull thermal control fix from Rafael Wysocki:
       "Fix a recently introduced deadlock in the int340x thermal control
        driver (Srinivas Pandruvada)"
      
      * tag 'thermal-6.3-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
        thermal: intel: int340x: processor_thermal: Fix deadlock
      a0aefd30
  3. 10 Mar, 2023 17 commits
    • Linus Torvalds's avatar
      Merge tag 'riscv-for-linus-6.3-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux · 55a21105
      Linus Torvalds authored
      Pull RISC-V fixes from Palmer Dabbelt:
      
       - RISC-V architecture-specific ELF attributes have been disabled in the
         kernel builds
      
       - A fix for a locking failure while during errata patching that
         manifests on SiFive-based systems
      
       - A fix for a KASAN failure during stack unwinding
      
       - A fix for some lockdep failures during text patching
      
      * tag 'riscv-for-linus-6.3-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux:
        RISC-V: Don't check text_mutex during stop_machine
        riscv: Use READ_ONCE_NOCHECK in imprecise unwinding stack mode
        RISC-V: fix taking the text_mutex twice during sifive errata patching
        RISC-V: Stop emitting attributes
      55a21105
    • Linus Torvalds's avatar
      Merge tag 'drm-fixes-2023-03-10' of git://anongit.freedesktop.org/drm/drm · b0d14d2a
      Linus Torvalds authored
      Pull drm fixes from Dave Airlie:
       "Weekly fixes.
      
        msm and amdgpu are the vast majority of these, otherwise some
        straggler misc from last week for nouveau and cirrus and a mailmap
        update for a drm developer.
      
        mailmap:
         - add an entry
      
        nouveau:
         - fix system shutdown regression
         - build warning fix
      
        cirrus:
         - NULL ptr deref fix
      
        msm:
         - fix invalid ptr free in syncobj cleanup
         - sync GMU removal in teardown
         - a5xx preemption fixes
         - fix runpm imbalance
         - DPU hw fixes
         - stack corruption fix
         - clear DSPP reservation
      
        amdgpu:
         - Misc display fixes
         - UMC 8.10 fixes
         - Driver unload fixes
         - NBIO 7.3.0 fix
         - Error checking fixes for soc15, nv, soc21 read register interface
         - Fix video cap query for VCN 4.0.4
      
        amdkfd:
         - Fix return check in doorbell handling"
      
      * tag 'drm-fixes-2023-03-10' of git://anongit.freedesktop.org/drm/drm: (42 commits)
        drm/amdgpu/soc21: Add video cap query support for VCN_4_0_4
        drm/amdgpu: fix error checking in amdgpu_read_mm_registers for nv
        drm/amdgpu: fix error checking in amdgpu_read_mm_registers for soc21
        drm/amdgpu: fix error checking in amdgpu_read_mm_registers for soc15
        drm/amdgpu: Fix the warning info when removing amdgpu device
        drm/amdgpu: fix return value check in kfd
        drm/amd: Fix initialization mistake for NBIO 7.3.0
        drm/amdgpu: Fix call trace warning and hang when removing amdgpu device
        mailmap: add mailmap entries for Faith.
        drm/msm: DEVFREQ_GOV_SIMPLE_ONDEMAND is no longer needed
        drm/amd/display: Update clock table to include highest clock setting
        drm/amd/pm: Enable ecc_info table support for smu v13_0_10
        drm/amdgpu: Support umc node harvest config on umc v8_10
        drm/connector: print max_requested_bpc in state debugfs
        drm/display: Don't block HDR_OUTPUT_METADATA on unknown EOTF
        drm/msm/dpu: clear DSPP reservations in rm release
        drm/msm/disp/dpu: fix sc7280_pp base offset
        drm/msm/dpu: fix stack smashing in dpu_hw_ctl_setup_blendstage
        drm/msm/dpu: don't use DPU_CLK_CTRL_CURSORn for DMA SSPP clocks
        drm/msm/dpu: fix clocks settings for msm8998 SSPP blocks
        ...
      b0d14d2a
    • Linus Torvalds's avatar
      Merge tag 'erofs-for-6.3-rc2-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/xiang/erofs · 388a8101
      Linus Torvalds authored
      Pull erofs fixes from Gao Xiang:
       "The most important one reverts an improper fix which can cause an
        unexpected warning more often on specific images, and another one
        fixes LZMA decompression on 32-bit platforms. The others are minor
        fixes and cleanups.
      
         - Fix LZMA decompression failure on HIGHMEM platforms
      
         - Revert an inproper fix since it is actually an implementation issue
           of vmalloc()
      
         - Avoid a wrong DBG_BUGON since it could be triggered with -EINTR
      
         - Minor cleanups"
      
      * tag 'erofs-for-6.3-rc2-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/xiang/erofs:
        erofs: use wrapper i_blocksize() in erofs_file_read_iter()
        erofs: get rid of a useless DBG_BUGON
        erofs: Revert "erofs: fix kvcalloc() misuse with __GFP_NOFAIL"
        erofs: fix wrong kunmap when using LZMA on HIGHMEM platforms
        erofs: mark z_erofs_lzma_init/erofs_pcpubuf_init w/ __init
      388a8101
    • Linus Torvalds's avatar
      Merge tag 'nfsd-6.3-2' of git://git.kernel.org/pub/scm/linux/kernel/git/cel/linux · 92cadfcf
      Linus Torvalds authored
      Pull nfsd fixes from Chuck Lever:
      
       - Protect NFSD writes against filesystem freezing
      
       - Fix a potential memory leak during server shutdown
      
      * tag 'nfsd-6.3-2' of git://git.kernel.org/pub/scm/linux/kernel/git/cel/linux:
        SUNRPC: Fix a server shutdown leak
        NFSD: Protect against filesystem freezing
      92cadfcf
    • Linus Torvalds's avatar
      Merge tag 'for-6.3-rc1-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux · ae195ca1
      Linus Torvalds authored
      Pull btrfs fixes from David Sterba:
       "First batch of fixes. Among them there are two updates to sysfs and
        ioctl which are not strictly fixes but are used for testing so there's
        no reason to delay them.
      
         - fix block group item corruption after inserting new block group
      
         - fix extent map logging bit not cleared for split maps after
           dropping range
      
         - fix calculation of unusable block group space reporting bogus
           values due to 32/64b division
      
         - fix unnecessary increment of read error stat on write error
      
         - improve error handling in inode update
      
         - export per-device fsid in DEV_INFO ioctl to distinguish seeding
           devices, needed for testing
      
         - allocator size classes:
            - fix potential dead lock in size class loading logic
            - print sysfs stats for the allocation classes"
      
      * tag 'for-6.3-rc1-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux:
        btrfs: fix block group item corruption after inserting new block group
        btrfs: fix extent map logging bit not cleared for split maps after dropping range
        btrfs: fix percent calculation for bg reclaim message
        btrfs: fix unnecessary increment of read error stat on write error
        btrfs: handle btrfs_del_item errors in __btrfs_update_delayed_inode
        btrfs: ioctl: return device fsid from DEV_INFO ioctl
        btrfs: fix potential dead lock in size class loading logic
        btrfs: sysfs: add size class stats
      ae195ca1
    • Linus Torvalds's avatar
      Merge tag 'io_uring-6.3-2023-03-09' of git://git.kernel.dk/linux · f331c5de
      Linus Torvalds authored
      Pull io_uring fixes from Jens Axboe:
      
       - Stop setting PF_NO_SETAFFINITY on io-wq workers.
      
         This has been reported in the past as it confuses some applications,
         as some of their threads will fail with -1/EINVAL if attempted
         affinitized. Most recent report was on cpusets, where enabling that
         with io-wq workers active will fail.
      
         Just deal with the mask changing by checking when a worker times out,
         and then exit if we have no work pending.
      
       - Fix an issue with passthrough support where we don't properly check
         if the file type has pollable uring_cmd support.
      
       - Fix a reported W=1 warning on a variable being set and unused. Add a
         special helper for iterating these lists that doesn't save the
         previous list element, if that iterator never ends up using it.
      
      * tag 'io_uring-6.3-2023-03-09' of git://git.kernel.dk/linux:
        io_uring: silence variable ‘prev’ set but not used warning
        io_uring/uring_cmd: ensure that device supports IOPOLL
        io_uring/io-wq: stop setting PF_NO_SETAFFINITY on io-wq workers
      f331c5de
    • Linus Torvalds's avatar
      Merge tag 'perf-tools-fixes-for-v6.3-1-2023-03-09' of... · 49be4fb2
      Linus Torvalds authored
      Merge tag 'perf-tools-fixes-for-v6.3-1-2023-03-09' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux
      
      Pull perf tools fixes from Arnaldo Carvalho de Melo:
      
       - Add Adrian Hunter to MAINTAINERS as a perf tools reviewer
      
       - Sync various tools/ copies of kernel headers with the kernel sources,
         this time trying to avoid first merging with upstream to then update
         but instead copy from upstream so that a merge is avoided and the end
         result after merging this pull request is the one expected,
         tools/perf/check-headers.sh (mostly) happy, less warnings while
         building tools/perf/
      
       - Fix counting when initial delay configured by setting
         perf_attr.enable_on_exec when starting workloads from the perf
         command line
      
       - Don't avoid emitting a PERF_RECORD_MMAP2 in 'perf inject
         --buildid-all' when that record comes with a build-id, otherwise we
         end up not being able to resolve symbols
      
       - Don't use comma as the CSV output separator the "stat+csv_output"
         test, as comma can appear on some tests as a modifier for an event,
         use @ instead, ditto for the JSON linter test
      
       - The offcpu test was looking for some bits being set on
         task_struct->prev_state without masking other bits not important for
         this specific 'perf test', fix it
      
      * tag 'perf-tools-fixes-for-v6.3-1-2023-03-09' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux:
        perf tools: Add Adrian Hunter to MAINTAINERS as a reviewer
        tools headers UAPI: Sync linux/perf_event.h with the kernel sources
        tools headers x86 cpufeatures: Sync with the kernel sources
        tools include UAPI: Sync linux/vhost.h with the kernel sources
        tools arch x86: Sync the msr-index.h copy with the kernel sources
        tools headers kvm: Sync uapi/{asm/linux} kvm.h headers with the kernel sources
        tools include UAPI: Synchronize linux/fcntl.h with the kernel sources
        tools headers: Synchronize {linux,vdso}/bits.h with the kernel sources
        tools headers UAPI: Sync linux/prctl.h with the kernel sources
        tools headers: Update the copy of x86's mem{cpy,set}_64.S used in 'perf bench'
        perf stat: Fix counting when initial delay configured
        tools headers svm: Sync svm headers with the kernel sources
        perf test: Avoid counting commas in json linter
        perf tests stat+csv_output: Switch CSV separator to @
        perf inject: Fix --buildid-all not to eat up MMAP2
        tools arch x86: Sync the msr-index.h copy with the kernel sources
        perf test: Fix offcpu test prev_state check
      49be4fb2
    • Dave Airlie's avatar
      Merge tag 'amd-drm-fixes-6.3-2023-03-09' of... · 519b2331
      Dave Airlie authored
      Merge tag 'amd-drm-fixes-6.3-2023-03-09' of https://gitlab.freedesktop.org/agd5f/linux into drm-fixes
      
      amd-drm-fixes-6.3-2023-03-09:
      
      amdgpu:
      - Misc display fixes
      - UMC 8.10 fixes
      - Driver unload fixes
      - NBIO 7.3.0 fix
      - Error checking fixes for soc15, nv, soc21 read register interface
      - Fix video cap query for VCN 4.0.4
      
      amdkfd:
      - Fix return check in doorbell handling
      Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
      From: Alex Deucher <alexander.deucher@amd.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20230310031314.1296929-1-alexander.deucher@amd.com
      519b2331
    • Theodore Ts'o's avatar
      fs: prevent out-of-bounds array speculation when closing a file descriptor · 609d5444
      Theodore Ts'o authored
      Google-Bug-Id: 114199369
      Signed-off-by: default avatarTheodore Ts'o <tytso@mit.edu>
      Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
      609d5444
    • Veerabadhran Gopalakrishnan's avatar
      drm/amdgpu/soc21: Add video cap query support for VCN_4_0_4 · 6ce2ea07
      Veerabadhran Gopalakrishnan authored
      Added the video capability query support for VCN version 4_0_4
      Signed-off-by: default avatarVeerabadhran Gopalakrishnan <veerabadhran.gopalakrishnan@amd.com>
      Reviewed-by: default avatarLeo Liu <leo.liu@amd.com>
      Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
      Cc: stable@vger.kernel.org # 6.1.x
      6ce2ea07
    • Alex Deucher's avatar
      drm/amdgpu: fix error checking in amdgpu_read_mm_registers for nv · b42fee5e
      Alex Deucher authored
      Properly skip non-existent registers as well.
      
      Bug: https://gitlab.freedesktop.org/drm/amd/-/issues/2442Reviewed-by: default avatarHawking Zhang <Hawking.Zhang@amd.com>
      Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
      Cc: stable@vger.kernel.org
      b42fee5e
    • Alex Deucher's avatar
      drm/amdgpu: fix error checking in amdgpu_read_mm_registers for soc21 · 2915e43a
      Alex Deucher authored
      Properly skip non-existent registers as well.
      
      Bug: https://gitlab.freedesktop.org/drm/amd/-/issues/2442Reviewed-by: default avatarHawking Zhang <Hawking.Zhang@amd.com>
      Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
      Cc: stable@vger.kernel.org
      2915e43a
    • Alex Deucher's avatar
      drm/amdgpu: fix error checking in amdgpu_read_mm_registers for soc15 · 0dcdf849
      Alex Deucher authored
      Properly skip non-existent registers as well.
      
      Bug: https://gitlab.freedesktop.org/drm/amd/-/issues/2442Reviewed-by: default avatarHawking Zhang <Hawking.Zhang@amd.com>
      Reviewed-by: default avatarEvan Quan <evan.quan@amd.com>
      Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
      Cc: stable@vger.kernel.org
      0dcdf849
    • lyndonli's avatar
      drm/amdgpu: Fix the warning info when removing amdgpu device · 8879ec6d
      lyndonli authored
      Actually, the drm_dev_enter in psp_cmd_submit_buf does not
      protect anything. If DRM device is unplugged, it will always
      check the condition in WARN_ON. So drop drm_dev_enter and
      drm_dev_exit in psp_cmd_submit_buf.
      
      When removing amdgpu, the calling order is as follows:
      amdgpu_pci_remove
          drm_dev_unplug
          amdgpu_driver_unload_kms
              amdgpu_device_fini_hw
                  amdgpu_device_ip_fini_early
                      psp_hw_fini
                          psp_ras_terminate
                              psp_ta_unloadye
                                  psp_cmd_submit_buf
      
      [ 4507.740388] Call Trace:
      [ 4507.740389]  <TASK>
      [ 4507.740391]  psp_ta_unload+0x44/0x70 [amdgpu]
      [ 4507.740485]  psp_ras_terminate+0x4d/0x70 [amdgpu]
      [ 4507.740575]  psp_hw_fini+0x28/0xa0 [amdgpu]
      [ 4507.740662]  amdgpu_device_fini_hw+0x328/0x442 [amdgpu]
      [ 4507.740791]  amdgpu_driver_unload_kms+0x51/0x60 [amdgpu]
      [ 4507.740875]  amdgpu_pci_remove+0x5a/0x140 [amdgpu]
      [ 4507.740962]  ? _raw_spin_unlock_irqrestore+0x27/0x43
      [ 4507.740965]  ? __pm_runtime_resume+0x60/0x90
      [ 4507.740968]  pci_device_remove+0x39/0xb0
      [ 4507.740971]  device_remove+0x46/0x70
      [ 4507.740972]  device_release_driver_internal+0xd1/0x160
      [ 4507.740974]  driver_detach+0x4a/0x90
      [ 4507.740975]  bus_remove_driver+0x6c/0xf0
      [ 4507.740976]  driver_unregister+0x31/0x50
      [ 4507.740977]  pci_unregister_driver+0x40/0x90
      [ 4507.740978]  amdgpu_exit+0x15/0x120 [amdgpu]
      
      v2: fix commit message style issue
      Signed-off-by: default avatarlyndonli <Lyndon.Li@amd.com>
      Reviewed-by: default avatarGuchun Chen <guchun.chen@amd.com>
      Acked-by: default avatarChristian König <christian.koenig@amd.com>
      Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
      8879ec6d
    • Shashank Sharma's avatar
      drm/amdgpu: fix return value check in kfd · 20534dbc
      Shashank Sharma authored
      This patch fixes a return value check in kfd doorbell handling.
      This function should return 0(error) only when the ida_simple_get
      returns < 0(error), return > 0 is a success case.
      
      Cc: Felix Kuehling <Felix.Kuehling@amd.com>
      Cc: Alex Deucher <alexander.deucher@amd.com>
      Fixes: 16f00131 ("drm/amdkfd: Allocate doorbells only when needed")
      Acked-by: default avatarChristian Koenig <chriatian.koenig@amd.com>
      Reviewed-by: default avatarFelix Kuehling <Felix.Kuehling@amd.com>
      Signed-off-by: default avatarShashank Sharma <shashank.sharma@amd.com>
      Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
      20534dbc
    • Mario Limonciello's avatar
      drm/amd: Fix initialization mistake for NBIO 7.3.0 · 1717cc5f
      Mario Limonciello authored
      The same strapping initialization issue that happened on NBIO 7.5.1
      appears to be happening on NBIO 7.3.0.
      Apply the same fix to 7.3.0 as well.
      
      Note: This workaround relies upon the integrated GPU being enabled
      in BIOS. If the integrated GPU is disabled in BIOS a different
      workaround will be required.
      Reported-by: default avatarThomas Glanzmann <thomas@glanzmann.de>
      Cc: Basavaraj Natikar <Basavaraj.Natikar@amd.com>
      Link: https://lore.kernel.org/linux-usb/Y%2Fz9GdHjPyF2rNG3@glanzmann.de/T/#uSigned-off-by: default avatarMario Limonciello <mario.limonciello@amd.com>
      Reviewed-by: default avatarAlex Deucher <alexander.deucher@amd.com>
      Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
      1717cc5f
    • lyndonli's avatar
      drm/amdgpu: Fix call trace warning and hang when removing amdgpu device · 93bb18d2
      lyndonli authored
      On GPUs with RAS enabled, below call trace and hang are observed when
      shutting down device.
      
      v2: use DRM device unplugged flag instead of shutdown flag as the check to
      prevent memory wipe in shutdown stage.
      
      [ +0.000000] RIP: 0010:amdgpu_vram_mgr_fini+0x18d/0x1c0 [amdgpu]
      [ +0.000001] PKRU: 55555554
      [ +0.000001] Call Trace:
      [ +0.000001] <TASK>
      [ +0.000002] amdgpu_ttm_fini+0x140/0x1c0 [amdgpu]
      [ +0.000183] amdgpu_bo_fini+0x27/0xa0 [amdgpu]
      [ +0.000184] gmc_v11_0_sw_fini+0x2b/0x40 [amdgpu]
      [ +0.000163] amdgpu_device_fini_sw+0xb6/0x510 [amdgpu]
      [ +0.000152] amdgpu_driver_release_kms+0x16/0x30 [amdgpu]
      [ +0.000090] drm_dev_release+0x28/0x50 [drm]
      [ +0.000016] devm_drm_dev_init_release+0x38/0x60 [drm]
      [ +0.000011] devm_action_release+0x15/0x20
      [ +0.000003] release_nodes+0x40/0xc0
      [ +0.000001] devres_release_all+0x9e/0xe0
      [ +0.000001] device_unbind_cleanup+0x12/0x80
      [ +0.000003] device_release_driver_internal+0xff/0x160
      [ +0.000001] driver_detach+0x4a/0x90
      [ +0.000001] bus_remove_driver+0x6c/0xf0
      [ +0.000001] driver_unregister+0x31/0x50
      [ +0.000001] pci_unregister_driver+0x40/0x90
      [ +0.000003] amdgpu_exit+0x15/0x120 [amdgpu]
      Signed-off-by: default avatarlyndonli <Lyndon.Li@amd.com>
      Reviewed-by: default avatarGuchun Chen <guchun.chen@amd.com>
      Reviewed-by: default avatarChristian König <christian.koenig@amd.com>
      Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
      93bb18d2
  4. 09 Mar, 2023 15 commits