Skip to content
  1. Aug 27, 2022
    • Zhengjun Xing's avatar
      perf stat: Capitalize topdown metrics' names · 48648548
      Zhengjun Xing authored
      
      
      Capitalize topdown metrics' names to follow the intel SDM.
      
      Before:
      
       # ./perf stat -a  sleep 1
      
       Performance counter stats for 'system wide':
      
              228,094.05 msec cpu-clock                        #  225.026 CPUs utilized
                     842      context-switches                 #    3.691 /sec
                     224      cpu-migrations                   #    0.982 /sec
                      70      page-faults                      #    0.307 /sec
              23,164,105      cycles                           #    0.000 GHz
              29,403,446      instructions                     #    1.27  insn per cycle
               5,268,185      branches                         #   23.097 K/sec
                  33,239      branch-misses                    #    0.63% of all branches
             136,248,990      slots                            #  597.337 K/sec
              32,976,450      topdown-retiring                 #     24.2% retiring
               4,651,918      topdown-bad-spec                 #      3.4% bad speculation
              26,148,695      topdown-fe-bound                 #     19.2% frontend bound
              72,515,776      topdown-be-bound                 #     53.2% backend bound
               6,008,540      topdown-heavy-ops                #      4.4% heavy operations       #     19.8% light operations
               3,934,049      topdown-br-mispredict            #      2.9% branch mispredict      #      0.5% machine clears
              16,655,439      topdown-fetch-lat                #     12.2% fetch latency          #      7.0% fetch bandwidth
              41,635,972      topdown-mem-bound                #     30.5% memory bound           #     22.7% Core bound
      
             1.013634593 seconds time elapsed
      
      After:
      
       # ./perf stat -a  sleep 1
      
       Performance counter stats for 'system wide':
      
              228,081.94 msec cpu-clock                        #  225.003 CPUs utilized
                     824      context-switches                 #    3.613 /sec
                     224      cpu-migrations                   #    0.982 /sec
                      67      page-faults                      #    0.294 /sec
              22,647,423      cycles                           #    0.000 GHz
              28,870,551      instructions                     #    1.27  insn per cycle
               5,167,099      branches                         #   22.655 K/sec
                  32,383      branch-misses                    #    0.63% of all branches
             133,411,074      slots                            #  584.926 K/sec
              32,352,607      topdown-retiring                 #     24.3% Retiring
               4,456,977      topdown-bad-spec                 #      3.3% Bad Speculation
              25,626,487      topdown-fe-bound                 #     19.2% Frontend Bound
              70,955,316      topdown-be-bound                 #     53.2% Backend Bound
               5,834,844      topdown-heavy-ops                #      4.4% Heavy Operations       #     19.9% Light Operations
               3,738,781      topdown-br-mispredict            #      2.8% Branch Mispredict      #      0.5% Machine Clears
              16,286,803      topdown-fetch-lat                #     12.2% Fetch Latency          #      7.0% Fetch Bandwidth
              40,802,069      topdown-mem-bound                #     30.6% Memory Bound           #     22.6% Core Bound
      
             1.013683125 seconds time elapsed
      
      Reviewed-by: default avatarKan Liang <kan.liang@linux.intel.com>
      Signed-off-by: default avatarXing Zhengjun <zhengjun.xing@linux.intel.com>
      Acked-by: default avatarIan Rogers <irogers@google.com>
      Cc: Alexander Shishkin <alexander.shishkin@intel.com>
      Cc: Andi Kleen <ak@linux.intel.com>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Link: https://lore.kernel.org/r/20220825015458.3252239-1-zhengjun.xing@linux.intel.com
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      48648548
    • Kan Liang's avatar
      perf docs: Update the documentation for the save_type filter · 3126204c
      Kan Liang authored
      
      
      Update the documentation to reflect the kernel changes.
      
      Signed-off-by: default avatarKan Liang <kan.liang@linux.intel.com>
      Cc: Andi Kleen <ak@linux.intel.com>
      Cc: Ian Rogers <irogers@google.com>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Stephane Eranian <eranian@google.com>
      Link: https://lore.kernel.org/r/20220816125612.2042397-2-kan.liang@linux.intel.com
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      3126204c
    • Ian Rogers's avatar
      perf sched: Fix memory leaks in __cmd_record detected with -fsanitize=address · d72e5cf3
      Ian Rogers authored
      
      
      An array of strings is passed to cmd_record but not freed. As
      cmd_record modifies the array, add another array as a copy that can be
      mutated allowing the original array contents to all be freed.
      
      Detected with -fsanitize=address.
      
      Signed-off-by: default avatarIan Rogers <irogers@google.com>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Stephane Eranian <eranian@google.com>
      Link: https://lore.kernel.org/r/20220824145733.409005-1-irogers@google.com
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      d72e5cf3
    • Andi Kleen's avatar
      perf record: Fix manpage formatting of description of support to hybrid systems · e89eaa61
      Andi Kleen authored
      
      
      The Intel hybrid description is written in a different style than the
      rest of the perf record man page. There were some new command line
      options added after it which resulted in very strange section ordering.
      Move the hybrid include last.
      
      Also the sub sections in the hybrid document don't fit the record
      manpage well (especially since it talks about all kinds of unrelated
      commands). I left this for now, but would be better to separate this
      properly in the different man pages.
      
      It would be better to use sub sections for the other sections, but these
      don't seem to be supported in AsciiDoc?
      
      Some of the examples are still misrendered in the manpage with an
      indented troff command, but I don't know how to fix that.
      
      In any case it's now better than before.
      
      Signed-off-by: default avatarAndi Kleen <ak@linux.intel.com>
      Cc: zhengjun.xing@intel.com
      Link: https://lore.kernel.org/r/20220818100127.249401-1-ak@linux.intel.com
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      e89eaa61
    • Ian Rogers's avatar
      perf test: Stat test for repeat with a weak group · 0c361c6e
      Ian Rogers authored
      
      
      Breaking a weak group requires multiple passes of an evlist, with
      multiple runs this can introduce bugs ultimately leading to
      segfaults. Add a test to cover this.
      
      Signed-off-by: default avatarIan Rogers <irogers@google.com>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Andi Kleen <ak@linux.intel.com>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Kan Liang <kan.liang@linux.intel.com>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Stephane Eranian <eranian@google.com>
      Link: https://lore.kernel.org/r/20220822213352.75721-2-irogers@google.com
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      0c361c6e
    • Ian Rogers's avatar
      perf stat: Clear evsel->reset_group for each stat run · bf515f02
      Ian Rogers authored
      If a weak group is broken then the reset_group flag remains set for
      the next run. Having reset_group set means the counter isn't created
      and ultimately a segfault.
      
      A simple reproduction of this is:
      
        # perf stat -r2 -e '{cycles,cycles,cycles,cycles,cycles,cycles,cycles,cycles,cycles,cycles}:W
      
      which will be added as a test in the next patch.
      
      Fixes: 4804e011
      
       ("perf stat: Use affinity for opening events")
      Reviewed-by: default avatarAndi Kleen <ak@linux.intel.com>
      Signed-off-by: default avatarIan Rogers <irogers@google.com>
      Tested-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      Tested-by: default avatarXing Zhengjun <zhengjun.xing@linux.intel.com>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Andi Kleen <ak@linux.intel.com>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Kan Liang <kan.liang@linux.intel.com>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Stephane Eranian <eranian@google.com>
      Link: https://lore.kernel.org/r/20220822213352.75721-1-irogers@google.com
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      bf515f02
    • Arnaldo Carvalho de Melo's avatar
      tools kvm headers arm64: Update KVM header from the kernel sources · dbcfe5ec
      Arnaldo Carvalho de Melo authored
      To pick the changes from:
      
        ae3b1da9
      
       ("KVM: arm64: Fix compile error due to sign extension")
      
      That doesn't result in any changes in tooling (when built on x86), only
      addresses this perf build warning:
      
        Warning: Kernel ABI header at 'tools/arch/arm64/include/uapi/asm/kvm.h' differs from latest version at 'arch/arm64/include/uapi/asm/kvm.h'
        diff -u tools/arch/arm64/include/uapi/asm/kvm.h arch/arm64/include/uapi/asm/kvm.h
      
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      Cc: Ian Rogers <irogers@google.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Marc Zyngier <maz@kernel.org>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Yang Yingliang <yangyingliang@huawei.com>
      Link: https://lore.kernel.org/all/YwOMCCc4E79FuvDe@kernel.org
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      dbcfe5ec
    • James Clark's avatar
      perf python: Fix build when PYTHON_CONFIG is user supplied · bc9e7fe3
      James Clark authored
      The previous change to Python autodetection had a small mistake where
      the auto value was used to determine the Python binary, rather than the
      user supplied value. The Python binary is only used for one part of the
      build process, rather than the final linking, so it was producing
      correct builds in most scenarios, especially when the auto detected
      value matched what the user wanted, or the system only had a valid set
      of Pythons.
      
      Change it so that the Python binary path is derived from either the
      PYTHON_CONFIG value or PYTHON value, depending on what is specified by
      the user. This was the original intention.
      
      This error was spotted in a build failure an odd cross compilation
      environment after commit 4c41cb46 ("perf python: Prefer
      python3") was merged.
      
      Fixes: 630af16e
      
       ("perf tools: Use Python devtools for version autodetection rather than runtime")
      Signed-off-by: default avatarJames Clark <james.clark@arm.com>
      Acked-by: default avatarIan Rogers <irogers@google.com>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: James Clark <james.clark@arm.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Link: https://lore.kernel.org/r/20220728093946.1337642-1-james.clark@arm.com
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      bc9e7fe3
    • Linus Torvalds's avatar
      Merge tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux · e022620b
      Linus Torvalds authored
      Pull arm64 fixes from Will Deacon:
       "A bumper crop of arm64 fixes for -rc3.
      
        The largest change is fixing our parsing of the 'rodata=full' command
        line option, which kstrtobool() started treating as 'rodata=false'.
        The fix actually makes the parsing of that option much less fragile
        and updates the documentation at the same time.
      
        We still have a boot issue pending when KASLR is disabled at compile
        time, but there's a fresh fix on the list which I'll send next week if
        it holds up to testing.
      
        Summary:
      
         - Fix workaround for Cortex-A76 erratum #1286807
      
         - Add workaround for AMU erratum #2457168 on Cortex-A510
      
         - Drop reference to removed CONFIG_ARCH_RANDOM #define
      
         - Fix parsing of the "rodata=full" cmdline option
      
         - Fix a bunch of issues in the SME register state switching and sigframe code
      
         - Fix incorrect extraction of the CTR_EL0.CWG register field
      
         - Fix ACPI cache topology probing when the PPTT is not present
      
         - Trivial comment and whitespace fixes"
      
      * tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux:
        arm64/sme: Don't flush SVE register state when handling SME traps
        arm64/sme: Don't flush SVE register state when allocating SME storage
        arm64/signal: Flush FPSIMD register state when disabling streaming mode
        arm64/signal: Raise limit on stack frames
        arm64/cache: Fix cache_type_cwg() for register generation
        arm64/sysreg: Guard SYS_FIELD_ macros for asm
        arm64/sysreg: Directly include bitfield.h
        arm64: cacheinfo: Fix incorrect assignment of signed error value to unsigned fw_level
        arm64: errata: add detection for AMEVCNTR01 incrementing incorrectly
        arm64: fix rodata=full
        arm64: Fix comment typo
        docs/arm64: elf_hwcaps: unify newlines in HWCAP lists
        arm64: adjust KASLR relocation after ARCH_RANDOM removal
        arm64: Fix match_list for erratum 1286807 on Arm Cortex-A76
      e022620b
    • Linus Torvalds's avatar
      Merge tag 'riscv-for-linus-6.0-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux · 012bd7e8
      Linus Torvalds authored
      Pull RISC-V fixes from Palmer Dabbelt:
      
       - A handful of fixes for the Microchip device trees
      
       - A pair of fixes to eliminate build warnings
      
      * tag 'riscv-for-linus-6.0-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux:
        riscv: dts: microchip: mpfs: remove pci axi address translation property
        riscv: dts: microchip: mpfs: remove bogus card-detect-delay
        riscv: dts: microchip: mpfs: remove ti,fifo-depth property
        riscv: dts: microchip: mpfs: fix incorrect pcie child node name
        riscv: traps: add missing prototype
        riscv: signal: fix missing prototype warning
        riscv: dts: microchip: correct L2 cache interrupts
      012bd7e8
    • Linus Torvalds's avatar
      Merge tag 'loongarch-fixes-6.0-1' of... · c23f864d
      Linus Torvalds authored
      Merge tag 'loongarch-fixes-6.0-1' of git://git.kernel.org/pub/scm/linux/kernel/git/chenhuacai/linux-loongson
      
      Pull LoongArch fixes from Huacai Chen:
       "Fix a bunch of build errors/warnings, a poweroff error and an
        unbalanced locking in do_page_fault()"
      
      * tag 'loongarch-fixes-6.0-1' of git://git.kernel.org/pub/scm/linux/kernel/git/chenhuacai/linux-loongson:
        LoongArch: mm: Avoid unnecessary page fault retires on shared memory types
        LoongArch: Add subword xchg/cmpxchg emulation
        LoongArch: Cleanup headers to avoid circular dependency
        LoongArch: Cleanup reset routines with new API
        LoongArch: Fix build warnings in VDSO
        LoongArch: Select PCI_QUIRKS to avoid build error
      c23f864d
    • Linus Torvalds's avatar
      Merge tag 'drm-fixes-2022-08-26-1' of git://anongit.freedesktop.org/drm/drm · 78effb4a
      Linus Torvalds authored
      Pull drm fixes from Dave Airlie:
       "Weekly fixes, lots of amdgpu fixes mostly for IP blocks introduced in
        6.0-rc1, otherwise vc4, nouveau fixes.
      
        gem:
         - Fix handle release leak
      
        nouveau:
         - Fix fencing when moving BO
      
        vc4:
         - HDMI fixes
      
        amdgpu:
         - GFX 11.0 fixes
         - PSP XGMI handling fixes
         - GFX9 fix for compute-only IPs
         - Drop duplicated function call
         - Fix warning due to missing header
         - NBIO 7.7 fixes
         - DCN 3.1.4 fixes
         - SDMA 6.0 fixes
         - SMU 13.0 fixes
         - Arcturus GPUVM page table fix
         - MMHUB 1.0 fix
      
        amdkfd:
         - GC 10.3.7 fix
      
        radeon:
         - Delayed work flush fix"
      
      * tag 'drm-fixes-2022-08-26-1' of git://anongit.freedesktop.org/drm/drm: (21 commits)
        drm/amdgpu: mmVM_L2_CNTL3 register not initialized correctly
        drm/amdgpu: add MGCG perfmon setting for gfx11
        drm/amdkfd: Fix isa version for the GC 10.3.7
        drm/amdgpu: Fix page table setup on Arcturus
        drm/amd/pm: update SMU 13.0.0 driver_if header
        drm/amdgpu: add sdma instance check for gfx11 CGCG
        drm/amd/display: enable PCON support for dcn314
        drm/amdgpu: enable NBIO IP v7.7.0 Clock Gating
        drm/amdgpu: add NBIO IP v7.7.0 Clock Gating support
        drm/amdgpu: add TX_POWER_CTRL_1 macro definitions for NBIO IP v7.7.0
        nouveau: explicitly wait on the fence in nouveau_bo_move_m2mf
        drm/radeon: add a force flush to delay work when radeon
        drm/amd/display: Include missing header
        drm/amdgpu: Remove the additional kfd pre reset call for sriov
        drm/amdgpu: Check num_gfx_rings for gfx v9_0 rb setup.
        drm/amdgpu: fix hive reference leak when adding xgmi device
        drm/amdgpu: Move psp_xgmi_terminate call from amdgpu_xgmi_remove_device to psp_hw_fini
        drm/amdgpu: enable GFXOFF allow control for GC IP v11.0.1
        drm/gem: Fix GEM handle release errors
        drm/vc4: hdmi: Rework power up
        ...
      78effb4a
    • Linus Torvalds's avatar
      Merge tag 'block-6.0-2022-08-26' of git://git.kernel.dk/linux-block · 3e5c673f
      Linus Torvalds authored
      Pull block fixes from Jens Axboe:
      
       - MD pull request via Song:
            - Fix for clustered raid (Guoqing Jiang)
            - req_op fix (Bart Van Assche)
            - Fix race condition in raid recreate (David Sloan)
      
       - loop configuration overflow fix (Siddh)
      
       - Fix missing commit_rqs call for certain conditions (Yu)
      
      * tag 'block-6.0-2022-08-26' of git://git.kernel.dk/linux-block:
        md: call __md_stop_writes in md_stop
        Revert "md-raid: destroy the bitmap after destroying the thread"
        md: Flush workqueue md_rdev_misc_wq in md_alloc()
        md/raid10: Fix the data type of an r10_sync_page_io() argument
        loop: Check for overflow while configuring loop
        blk-mq: fix io hung due to missing commit_rqs
      3e5c673f
    • Linus Torvalds's avatar
      Merge tag 'io_uring-6.0-2022-08-26' of git://git.kernel.dk/linux-block · 0b0861eb
      Linus Torvalds authored
      Pull io_uring fixes from Jens Axboe:
      
       - Add missing header file to the MAINTAINERS entry for io_uring (Ammar)
      
       - liburing and the kernel ship the same io_uring.h header, but one
         change we've had for a long time only in liburing is to ensure it's
         C++ safe. Add extern C around it, so we can more easily sync them in
         the future (Ammar)
      
       - Fix an off-by-one in the sync cancel added in this merge window (me)
      
       - Error handling fix for passthrough (Kanchan)
      
       - Fix for address saving for async execution for the zc tx support
         (Pavel)
      
       - Fix ordering for TCP zc notifications, so we always have them ordered
         correctly between "data was sent" and "data was acked". This isn't
         strictly needed with the notification slots, but we've been pondering
         disabling the slot support for 6.0 - and if we do, then we do require
         the ordering to be sane. Regardless of that, it's the sane thing to
         do in terms of API (Pavel)
      
       - Minor cleanup for indentation and lockdep annotation (Pavel)
      
      * tag 'io_uring-6.0-2022-08-26' of git://git.kernel.dk/linux-block:
        io_uring/net: save address for sendzc async execution
        io_uring: conditional ->async_data allocation
        io_uring/notif: order notif vs send CQEs
        io_uring/net: fix indentation
        io_uring/net: fix zc send link failing
        io_uring/net: fix must_hold annotation
        io_uring: fix submission-failure handling for uring-cmd
        io_uring: fix off-by-one in sync cancelation file check
        io_uring: uapi: Add `extern "C"` in io_uring.h for liburing
        MAINTAINERS: Add `include/linux/io_uring_types.h`
      0b0861eb
    • Linus Torvalds's avatar
      Merge tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi · 5373081b
      Linus Torvalds authored
      Pull SCSI fixes from James Bottomley:
       "Ten fixes.
      
        Of the three core changes, the two large ones are a complete reversion
        of the async rework and an ALUA timing rework (the latter shouldn't
        affect non-ALUA paths).
      
        The remaining patches are all small and all but one in drivers"
      
      * tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi:
        scsi: sd: Revert "Rework asynchronous resume support"
        scsi: core: Fix passthrough retry counter handling
        scsi: ufs: core: Reduce the power mode change timeout
        scsi: storvsc: Remove WQ_MEM_RECLAIM from storvsc_error_wq
        scsi: ufs: host: ufs-exynos: Make fsd_ufs_drvs static
        scsi: megaraid_sas: Remove unnecessary kfree()
        scsi: megaraid_sas: Fix double kfree()
        scsi: ufs: core: Enable link lost interrupt
        scsi: core: Allow the ALUA transitioning state enough time
        scsi: qla2xxx: Disable ATIO interrupt coalesce for quad port ISP27XX
      5373081b
    • Mikulas Patocka's avatar
      wait_on_bit: add an acquire memory barrier · 8238b457
      Mikulas Patocka authored
      
      
      There are several places in the kernel where wait_on_bit is not followed
      by a memory barrier (for example, in drivers/md/dm-bufio.c:new_read).
      
      On architectures with weak memory ordering, it may happen that memory
      accesses that follow wait_on_bit are reordered before wait_on_bit and
      they may return invalid data.
      
      Fix this class of bugs by introducing a new function "test_bit_acquire"
      that works like test_bit, but has acquire memory ordering semantics.
      
      Signed-off-by: default avatarMikulas Patocka <mpatocka@redhat.com>
      Acked-by: default avatarWill Deacon <will@kernel.org>
      Cc: stable@vger.kernel.org
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      8238b457
  2. Aug 26, 2022
    • Dave Airlie's avatar
      Merge tag 'amd-drm-fixes-6.0-2022-08-25' of... · 100d0ae8
      Dave Airlie authored
      
      Merge tag 'amd-drm-fixes-6.0-2022-08-25' of https://gitlab.freedesktop.org/agd5f/linux into drm-fixes
      
      amd-drm-fixes-6.0-2022-08-25:
      
      amdgpu:
      - GFX 11.0 fixes
      - PSP XGMI handling fixes
      - GFX9 fix for compute-only IPs
      - Drop duplicated function call
      - Fix warning due to missing header
      - NBIO 7.7 fixes
      - DCN 3.1.4 fixes
      - SDMA 6.0 fixes
      - SMU 13.0 fixes
      - Arcturus GPUVM page table fix
      - MMHUB 1.0 fix
      
      amdkfd:
      - GC 10.3.7 fix
      
      radeon:
      - Delayed work flush fix
      
      Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
      From: Alex Deucher <alexander.deucher@amd.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20220825181243.5853-1-alexander.deucher@amd.com
      100d0ae8
    • Dave Airlie's avatar
      Merge tag 'drm-misc-fixes-2022-08-25' of git://anongit.freedesktop.org/drm/drm-misc into drm-fixes · 064d491f
      Dave Airlie authored
      
      
      Short summary of fixes pull:
      
       * gem: Fixes handle release leak
       * nouveau: Fix fencing when moving BO
       * vc4: HDMI fixes
       * Backmerging for v6.0-rc1
      
      Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
      
      From: Thomas Zimmermann <tzimmermann@suse.de>
      Link: https://patchwork.freedesktop.org/patch/msgid/YwclSWheC+Ai+u+v@linux-uq9g
      064d491f
    • Palmer Dabbelt's avatar
      Merge branch 'riscv-variable_fixes_without_kvm' of... · 1709c70c
      Palmer Dabbelt authored
      Merge branch 'riscv-variable_fixes_without_kvm' of git://git.kernel.org/pub/scm/linux/kernel/git/palmer/linux.git into fixes
      
      This contains a pair of fixes for build-time warnings.
      
      * 'riscv-variable_fixes_without_kvm' of git://git.kernel.org/pub/scm/linux/kernel/git/palmer/linux.git:
        riscv: traps: add missing prototype
        riscv: signal: fix missing prototype warning
      1709c70c
    • Palmer Dabbelt's avatar
      Merge tag 'dt-fixes-for-palmer-6.0-rc3' of... · 92e55a86
      Palmer Dabbelt authored
      
      Merge tag 'dt-fixes-for-palmer-6.0-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/conor/linux.git into fixes
      
      Microchip RISC-V devicetree fixes for 6.0-rc3
      
      Two sets of fixes this time around:
      - A fix for the interrupt ordering of the l2-cache controller. If the
        driver is enabled, it would spam the console /constantly/, rendering
        the system useless.
      - General cleanup for some bogus properties in the dt, part of my quest
        for zero dtbs_check warnings.
      
      On that note, the interrupt ordering adds a dtbs_check warning - but I
      considered that fixing the potentially useless system was more of a
      priority.
      
      Signed-off-by: default avatarConor Dooley <conor.dooley@microchip.com>
      
      * tag 'dt-fixes-for-palmer-6.0-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/conor/linux.git:
        riscv: dts: microchip: mpfs: remove pci axi address translation property
        riscv: dts: microchip: mpfs: remove bogus card-detect-delay
        riscv: dts: microchip: mpfs: remove ti,fifo-depth property
        riscv: dts: microchip: mpfs: fix incorrect pcie child node name
        riscv: dts: microchip: correct L2 cache interrupts
      92e55a86
    • Linus Torvalds's avatar
      Merge tag 'net-6.0-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net · 4c612826
      Linus Torvalds authored
      Pull networking fixes from Jakub Kicinski:
       "Including fixes from ipsec and netfilter (with one broken Fixes tag).
      
        Current release - new code bugs:
      
         - dsa: don't dereference NULL extack in dsa_slave_changeupper()
      
         - dpaa: fix <1G ethernet on LS1046ARDB
      
         - neigh: don't call kfree_skb() under spin_lock_irqsave()
      
        Previous releases - regressions:
      
         - r8152: fix the RX FIFO settings when suspending
      
         - dsa: microchip: keep compatibility with device tree blobs with no
           phy-mode
      
         - Revert "net: macsec: update SCI upon MAC address change."
      
         - Revert "xfrm: update SA curlft.use_time", comply with RFC 2367
      
        Previous releases - always broken:
      
         - netfilter: conntrack: work around exceeded TCP receive window
      
         - ipsec: fix a null pointer dereference of dst->dev on a metadata dst
           in xfrm_lookup_with_ifid
      
         - moxa: get rid of asymmetry in DMA mapping/unmapping
      
         - dsa: microchip: make learning configurable and keep it off while
           standalone
      
         - ice: xsk: prohibit usage of non-balanced queue id
      
         - rxrpc: fix locking in rxrpc's sendmsg
      
        Misc:
      
         - another chunk of sysctl data race silencing"
      
      * tag 'net-6.0-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net: (87 commits)
        net: lantiq_xrx200: restore buffer if memory allocation failed
        net: lantiq_xrx200: fix lock under memory pressure
        net: lantiq_xrx200: confirm skb is allocated before using
        net: stmmac: work around sporadic tx issue on link-up
        ionic: VF initial random MAC address if no assigned mac
        ionic: fix up issues with handling EAGAIN on FW cmds
        ionic: clear broken state on generation change
        rxrpc: Fix locking in rxrpc's sendmsg
        net: ethernet: mtk_eth_soc: fix hw hash reporting for MTK_NETSYS_V2
        MAINTAINERS: rectify file entry in BONDING DRIVER
        i40e: Fix incorrect address type for IPv6 flow rules
        ixgbe: stop resetting SYSTIME in ixgbe_ptp_start_cyclecounter
        net: Fix a data-race around sysctl_somaxconn.
        net: Fix a data-race around netdev_unregister_timeout_secs.
        net: Fix a data-race around gro_normal_batch.
        net: Fix data-races around sysctl_devconf_inherit_init_net.
        net: Fix data-races around sysctl_fb_tunnels_only_for_init_net.
        net: Fix a data-race around netdev_budget_usecs.
        net: Fix data-races around sysctl_max_skb_frags.
        net: Fix a data-race around netdev_budget.
        ...
      4c612826
    • Jakub Kicinski's avatar
      Merge branch 'net-lantiq_xrx200-fix-errors-under-memory-pressure' · d974730c
      Jakub Kicinski authored
      
      
      Aleksander Jan Bajkowski says:
      
      ====================
      net: lantiq_xrx200: fix errors under memory pressure
      
      This series fixes issues that can occur in the driver under memory pressure.
      Situations when the system cannot allocate memory are rare, so the mentioned
      bugs have been fixed recently. The patches have been tested on a BT Home
      router with the Lantiq xRX200 chipset.
      
      Changelog:
        v3: - removed netdev_err() log from the first patch
        v2:
         - the second patch has been changed, so that under memory pressure situation
           the driver will not receive packets indefinitely regardless of the NAPI budget,
         - the third patch has been added.
      ====================
      
      Link: https://lore.kernel.org/r/20220824215408.4695-1-olek2@wp.pl
      Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      d974730c
    • Aleksander Jan Bajkowski's avatar
      net: lantiq_xrx200: restore buffer if memory allocation failed · c9c3b177
      Aleksander Jan Bajkowski authored
      In a situation where memory allocation fails, an invalid buffer address
      is stored. When this descriptor is used again, the system panics in the
      build_skb() function when accessing memory.
      
      Fixes: 7ea6cd16
      
       ("lantiq: net: fix duplicated skb in rx descriptor ring")
      Signed-off-by: default avatarAleksander Jan Bajkowski <olek2@wp.pl>
      Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      c9c3b177
    • Aleksander Jan Bajkowski's avatar
      net: lantiq_xrx200: fix lock under memory pressure · c4b6e934
      Aleksander Jan Bajkowski authored
      When the xrx200_hw_receive() function returns -ENOMEM, the NAPI poll
      function immediately returns an error.
      This is incorrect for two reasons:
      * the function terminates without enabling interrupts or scheduling NAPI,
      * the error code (-ENOMEM) is returned instead of the number of received
      packets.
      
      After the first memory allocation failure occurs, packet reception is
      locked due to disabled interrupts from DMA..
      
      Fixes: fe1a5642
      
       ("net: lantiq: Add Lantiq / Intel VRX200 Ethernet driver")
      Signed-off-by: default avatarAleksander Jan Bajkowski <olek2@wp.pl>
      Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      c4b6e934
    • Aleksander Jan Bajkowski's avatar
      net: lantiq_xrx200: confirm skb is allocated before using · c8b04370
      Aleksander Jan Bajkowski authored
      xrx200_hw_receive() assumes build_skb() always works and goes straight
      to skb_reserve(). However, build_skb() can fail under memory pressure.
      
      Add a check in case build_skb() failed to allocate and return NULL.
      
      Fixes: e0155935
      
       ("net: lantiq_xrx200: convert to build_skb")
      Reported-by: default avatarEric Dumazet <edumazet@google.com>
      Signed-off-by: default avatarAleksander Jan Bajkowski <olek2@wp.pl>
      Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      c8b04370
    • Heiner Kallweit's avatar
      net: stmmac: work around sporadic tx issue on link-up · a3a57bf0
      Heiner Kallweit authored
      This is a follow-up to the discussion in [0]. It seems to me that
      at least the IP version used on Amlogic SoC's sometimes has a problem
      if register MAC_CTRL_REG is written whilst the chip is still processing
      a previous write. But that's just a guess.
      Adding a delay between two writes to this register helps, but we can
      also simply omit the offending second write. This patch uses the second
      approach and is based on a suggestion from Qi Duan.
      Benefit of this approach is that we can save few register writes, also
      on not affected chip versions.
      
      [0] https://www.spinics.net/lists/netdev/msg831526.html
      
      Fixes: bfab27a1
      
       ("stmmac: add the experimental PCI support")
      Suggested-by: default avatarQi Duan <qi.duan@amlogic.com>
      Suggested-by: default avatarJerome Brunet <jbrunet@baylibre.com>
      Signed-off-by: default avatarHeiner Kallweit <hkallweit1@gmail.com>
      Link: https://lore.kernel.org/r/e99857ce-bd90-5093-ca8c-8cd480b5a0a2@gmail.com
      Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      a3a57bf0
    • Jakub Kicinski's avatar
      Merge branch '10GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/net-queue · ef332fe1
      Jakub Kicinski authored
      
      
      Tony Nguyen says:
      
      ====================
      Intel Wired LAN Driver Updates 2022-08-24 (ixgbe, i40e)
      
      This series contains updates to ixgbe and i40e drivers.
      
      Jake stops incorrect resetting of SYSTIME registers when starting
      cyclecounter for ixgbe.
      
      Sylwester corrects a check on source IP address when validating destination
      for i40e.
      
      * '10GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/net-queue:
        i40e: Fix incorrect address type for IPv6 flow rules
        ixgbe: stop resetting SYSTIME in ixgbe_ptp_start_cyclecounter
      ====================
      
      Link: https://lore.kernel.org/r/20220824193748.874343-1-anthony.l.nguyen@intel.com
      Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      ef332fe1
    • Jakub Kicinski's avatar
      Merge branch 'ionic-bug-fixes' · 92df825a
      Jakub Kicinski authored
      
      
      Shannon Nelson says:
      
      ====================
      ionic: bug fixes
      
      These are a couple of maintenance bug fixes for the Pensando ionic
      networking driver.
      
      Mohamed takes care of a "plays well with others" issue where the
      VF spec is a bit vague on VF mac addresses, but certain customers
      have come to expect behavior based on other vendor drivers.
      
      Shannon addresses a couple of corner cases seen in internal
      stress testing.
      ====================
      
      Link: https://lore.kernel.org/r/20220824165051.6185-1-snelson@pensando.io
      Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      92df825a
    • R Mohamed Shah's avatar
      ionic: VF initial random MAC address if no assigned mac · 19058be7
      R Mohamed Shah authored
      Assign a random mac address to the VF interface station
      address if it boots with a zero mac address in order to match
      similar behavior seen in other VF drivers.  Handle the errors
      where the older firmware does not allow the VF to set its own
      station address.
      
      Newer firmware will allow the VF to set the station mac address
      if it hasn't already been set administratively through the PF.
      Setting it will also be allowed if the VF has trust.
      
      Fixes: fbb39807
      
       ("ionic: support sr-iov operations")
      Signed-off-by: default avatarR Mohamed Shah <mohamed@pensando.io>
      Signed-off-by: default avatarShannon Nelson <snelson@pensando.io>
      Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      19058be7
    • Shannon Nelson's avatar
      ionic: fix up issues with handling EAGAIN on FW cmds · 0fc4dd45
      Shannon Nelson authored
      In looping on FW update tests we occasionally see the
      FW_ACTIVATE_STATUS command fail while it is in its EAGAIN loop
      waiting for the FW activate step to finsh inside the FW.  The
      firmware is complaining that the done bit is set when a new
      dev_cmd is going to be processed.
      
      Doing a clean on the cmd registers and doorbell before exiting
      the wait-for-done and cleaning the done bit before the sleep
      prevents this from occurring.
      
      Fixes: fbfb8031
      
       ("ionic: Add hardware init and device commands")
      Signed-off-by: default avatarShannon Nelson <snelson@pensando.io>
      Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      0fc4dd45
    • Shannon Nelson's avatar
      ionic: clear broken state on generation change · 9cb9dadb
      Shannon Nelson authored
      There is a case found in heavy testing where a link flap happens just
      before a firmware Recovery event and the driver gets stuck in the
      BROKEN state.  This comes from the driver getting interrupted by a FW
      generation change when coming back up from the link flap, and the call
      to ionic_start_queues() in ionic_link_status_check() fails.  This can be
      addressed by having the fw_up code clear the BROKEN bit if seen, rather
      than waiting for a user to manually force the interface down and then
      back up.
      
      Fixes: 9e8eaf84
      
       ("ionic: stop watchdog when in broken state")
      Signed-off-by: default avatarShannon Nelson <snelson@pensando.io>
      Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      9cb9dadb
    • David Howells's avatar
      rxrpc: Fix locking in rxrpc's sendmsg · b0f571ec
      David Howells authored
      Fix three bugs in the rxrpc's sendmsg implementation:
      
       (1) rxrpc_new_client_call() should release the socket lock when returning
           an error from rxrpc_get_call_slot().
      
       (2) rxrpc_wait_for_tx_window_intr() will return without the call mutex
           held in the event that we're interrupted by a signal whilst waiting
           for tx space on the socket or relocking the call mutex afterwards.
      
           Fix this by: (a) moving the unlock/lock of the call mutex up to
           rxrpc_send_data() such that the lock is not held around all of
           rxrpc_wait_for_tx_window*() and (b) indicating to higher callers
           whether we're return with the lock dropped.  Note that this means
           recvmsg() will not block on this call whilst we're waiting.
      
       (3) After dropping and regaining the call mutex, rxrpc_send_data() needs
           to go and recheck the state of the tx_pending buffer and the
           tx_total_len check in case we raced with another sendmsg() on the same
           call.
      
      Thinking on this some more, it might make sense to have different locks for
      sendmsg() and recvmsg().  There's probably no need to make recvmsg() wait
      for sendmsg().  It does mean that recvmsg() can return MSG_EOR indicating
      that a call is dead before a sendmsg() to that call returns - but that can
      currently happen anyway.
      
      Without fix (2), something like the following can be induced:
      
      	WARNING: bad unlock balance detected!
      	5.16.0-rc6-syzkaller #0 Not tainted
      	-------------------------------------
      	syz-executor011/3597 is trying to release lock (&call->user_mutex) at:
      	[<ffffffff885163a3>] rxrpc_do_sendmsg+0xc13/0x1350 net/rxrpc/sendmsg.c:748
      	but there are no more locks to release!
      
      	other info that might help us debug this:
      	no locks held by syz-executor011/3597.
      	...
      	Call Trace:
      	 <TASK>
      	 __dump_stack lib/dump_stack.c:88 [inline]
      	 dump_stack_lvl+0xcd/0x134 lib/dump_stack.c:106
      	 print_unlock_imbalance_bug include/trace/events/lock.h:58 [inline]
      	 __lock_release kernel/locking/lockdep.c:5306 [inline]
      	 lock_release.cold+0x49/0x4e kernel/locking/lockdep.c:5657
      	 __mutex_unlock_slowpath+0x99/0x5e0 kernel/locking/mutex.c:900
      	 rxrpc_do_sendmsg+0xc13/0x1350 net/rxrpc/sendmsg.c:748
      	 rxrpc_sendmsg+0x420/0x630 net/rxrpc/af_rxrpc.c:561
      	 sock_sendmsg_nosec net/socket.c:704 [inline]
      	 sock_sendmsg+0xcf/0x120 net/socket.c:724
      	 ____sys_sendmsg+0x6e8/0x810 net/socket.c:2409
      	 ___sys_sendmsg+0xf3/0x170 net/socket.c:2463
      	 __sys_sendmsg+0xe5/0x1b0 net/socket.c:2492
      	 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
      	 do_syscall_64+0x35/0xb0 arch/x86/entry/common.c:80
      	 entry_SYSCALL_64_after_hwframe+0x44/0xae
      
      [Thanks to Hawkins Jiawei and Khalid Masum for their attempts to fix this]
      
      Fixes: bc5e3a54
      
       ("rxrpc: Use MSG_WAITALL to tell sendmsg() to temporarily ignore signals")
      Reported-by: default avatar <syzbot+7f0483225d0c94cb3441@syzkaller.appspotmail.com>
      Signed-off-by: default avatarDavid Howells <dhowells@redhat.com>
      Reviewed-by: default avatarMarc Dionne <marc.dionne@auristor.com>
      Tested-by: default avatar <syzbot+7f0483225d0c94cb3441@syzkaller.appspotmail.com>
      cc: Hawkins Jiawei <yin31149@gmail.com>
      cc: Khalid Masum <khalid.masum.92@gmail.com>
      cc: Dan Carpenter <dan.carpenter@oracle.com>
      cc: linux-afs@lists.infradead.org
      Link: https://lore.kernel.org/r/166135894583.600315.7170979436768124075.stgit@warthog.procyon.org.uk
      Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      b0f571ec
    • Qu Huang's avatar
      drm/amdgpu: mmVM_L2_CNTL3 register not initialized correctly · b8983d42
      Qu Huang authored
      
      
      The mmVM_L2_CNTL3 register is not assigned an initial value
      
      Signed-off-by: default avatarQu Huang <jinsdb@126.com>
      Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
      b8983d42
    • Likun Gao's avatar
      drm/amdgpu: add MGCG perfmon setting for gfx11 · 61251b2c
      Likun Gao authored
      
      
      Enable GFX11 MGCG perfmon setting.
      V2: set rlc to saft mode before setting.
      
      Signed-off-by: default avatarLikun Gao <Likun.Gao@amd.com>
      Reviewed-by: default avatarHawking Zhang <Hawking.Zhang@amd.com>
      Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
      61251b2c
    • Prike Liang's avatar
      drm/amdkfd: Fix isa version for the GC 10.3.7 · ee8086db
      Prike Liang authored
      Correct the isa version for handling KFD test.
      
      Fixes: 7c4f4f19
      
       ("drm/amdkfd: Add GC 10.3.6 and 10.3.7 KFD definitions")
      Signed-off-by: default avatarPrike Liang <Prike.Liang@amd.com>
      Reviewed-by: default avatarAaron Liu <aaron.liu@amd.com>
      Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
      ee8086db
    • Mukul Joshi's avatar
      drm/amdgpu: Fix page table setup on Arcturus · 894c9c54
      Mukul Joshi authored
      When translate_further is enabled, page table depth needs to
      be updated. This was missing on Arcturus MMHUB init. This was
      causing address translations to fail for SDMA user-mode queues.
      
      Fixes: 352e683b
      
       ("drm/amdgpu: Enable translate_further to extend UTCL2 reach")
      Reviewed-by: default avatarFelix Kuehling <Felix.Kuehling@amd.com>
      Acked-by: default avatarChristian König <christian.koenig@amd.com>
      Signed-off-by: default avatarMukul Joshi <mukul.joshi@amd.com>
      Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
      894c9c54
    • Evan Quan's avatar
      drm/amd/pm: update SMU 13.0.0 driver_if header · da1acbb1
      Evan Quan authored
      
      
      To fit the latest 78.53 PMFW.
      
      Signed-off-by: default avatarEvan Quan <evan.quan@amd.com>
      Reviewed-by: default avatarFeifei Xu <Feifei.Xu@amd.com>
      Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
      da1acbb1
    • Tim Huang's avatar
      drm/amdgpu: add sdma instance check for gfx11 CGCG · 00047c3d
      Tim Huang authored
      
      
      For some ASICs, like GFX IP v11.0.1, only have one SDMA instance,
      so not need to configure SDMA1_RLC_CGCG_CTRL for this case.
      
      Signed-off-by: default avatarTim Huang <tim.huang@amd.com>
      Reviewed-by: default avatarYifan Zhang <yifan1.zhang@amd.com>
      Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
      00047c3d
    • Roman Li's avatar
      drm/amd/display: enable PCON support for dcn314 · 4e3464ba
      Roman Li authored
      
      
      [Why]
      DCN314 supports PCON.
      
      [How]
      Explicitly enable it in dcn314 resources.
      
      Signed-off-by: default avatarRoman Li <roman.li@amd.com>
      Reviewed-by: default avatarHamza Mahfooz <hamza.mahfooz@amd.com>
      Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
      4e3464ba
    • Tim Huang's avatar
      drm/amdgpu: enable NBIO IP v7.7.0 Clock Gating · 16c01544
      Tim Huang authored
      
      
      Enable AMD_CG_SUPPORT_BIF_MGCG and AMD_CG_SUPPORT_BIF_LS support.
      
      Signed-off-by: default avatarTim Huang <tim.huang@amd.com>
      Reviewed-by: default avatarYifan Zhang <yifan1.zhang@amd.com>
      Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
      16c01544