1. 21 Dec, 2022 17 commits
  2. 20 Dec, 2022 8 commits
    • Namhyung Kim's avatar
      perf lock contention: Factor out lock_type_table · 59119c09
      Namhyung Kim authored
      Move it out of get_type_str() so that we can reuse the table for others
      later.
      Signed-off-by: default avatarNamhyung Kim <namhyung@kernel.org>
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      Cc: Blake Jones <blakejones@google.com>
      Cc: Ian Rogers <irogers@google.com>
      Cc: Ingo Molnar <mingo@kernel.org>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Song Liu <song@kernel.org>
      Cc: bpf@vger.kernel.org
      Link: https://lore.kernel.org/r/20221219201732.460111-2-namhyung@kernel.orgSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      59119c09
    • Yang Jihong's avatar
      perf probe: Check -v and -q options in the right place · 8b269b75
      Yang Jihong authored
      Check the -q and -v options first to return earlier on error.
      
      Before:
      
        # perf probe -q -v test
        probe-definition(0): test
        symbol:test file:(null) line:0 offset:0 return:0 lazy:(null)
        0 arguments
          Error: -v and -q are exclusive.
      
      After:
      
        # perf probe -q -v test
          Error: -v and -q are exclusive.
      
      Fixes: 5e17b28f ("perf probe: Add --quiet option to suppress output result message")
      Reviewed-by: default avatarAdrian Hunter <adrian.hunter@intel.com>
      Signed-off-by: default avatarYang Jihong <yangjihong1@huawei.com>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Andi Kleen <ak@linux.intel.com>
      Cc: Carsten Haitzler <carsten.haitzler@arm.com>
      Cc: Ian Rogers <irogers@google.com>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Leo Yan <leo.yan@linaro.org>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Cc: Martin KaFai Lau <martin.lau@kernel.org>
      Cc: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
      Cc: Masami Hiramatsu <mhiramat@kernel.org>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Ravi Bangoria <ravi.bangoria@amd.com>
      Link: https://lore.kernel.org/r/20221220035702.188413-4-yangjihong1@huawei.comSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      8b269b75
    • Yang Jihong's avatar
      perf tools: Fix usage of the verbose variable · 7c0a6144
      Yang Jihong authored
      The data type of the verbose variable is integer and can be negative,
      replace improperly used cases in a unified manner:
       1. if (verbose)        => if (verbose > 0)
       2. if (!verbose)       => if (verbose <= 0)
       3. if (XX && verbose)  => if (XX && verbose > 0)
       4. if (XX && !verbose) => if (XX && verbose <= 0)
      Reviewed-by: default avatarAdrian Hunter <adrian.hunter@intel.com>
      Signed-off-by: default avatarYang Jihong <yangjihong1@huawei.com>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Andi Kleen <ak@linux.intel.com>
      Cc: Carsten Haitzler <carsten.haitzler@arm.com>
      Cc: Ian Rogers <irogers@google.com>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Leo Yan <leo.yan@linaro.org>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Cc: Martin KaFai Lau <martin.lau@kernel.org>
      Cc: Masami Hiramatsu <mhiramat@kernel.org>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Ravi Bangoria <ravi.bangoria@amd.com>
      Link: https://lore.kernel.org/r/20221220035702.188413-3-yangjihong1@huawei.comSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      7c0a6144
    • Yang Jihong's avatar
      perf debug: Set debug_peo_args and redirect_to_stderr variable to correct... · 188ac720
      Yang Jihong authored
      perf debug: Set debug_peo_args and redirect_to_stderr variable to correct values in perf_quiet_option()
      
      When perf uses quiet mode, perf_quiet_option() sets the 'debug_peo_args'
      variable to -1, and display_attr() incorrectly determines the value of
      'debug_peo_args'.  As a result, unexpected information is displayed.
      
      Before:
      
        # perf record --quiet -- ls > /dev/null
        ------------------------------------------------------------
        perf_event_attr:
          size                             128
          { sample_period, sample_freq }   4000
          sample_type                      IP|TID|TIME|PERIOD
          read_format                      ID|LOST
          disabled                         1
          inherit                          1
          mmap                             1
          comm                             1
          freq                             1
          enable_on_exec                   1
          task                             1
          precise_ip                       3
          sample_id_all                    1
          exclude_guest                    1
          mmap2                            1
          comm_exec                        1
          ksymbol                          1
          bpf_event                        1
        ------------------------------------------------------------
        ...
      
      After:
        # perf record --quiet -- ls > /dev/null
        #
      
      redirect_to_stderr is a similar problem.
      
      Fixes: f78eaef0 ("perf tools: Allow to force redirect pr_debug to stderr.")
      Fixes: ccd26741 ("perf tool: Provide an option to print perf_event_open args and return value")
      Suggested-by: default avatarAdrian Hunter <adrian.hunter@intel.com>
      Reviewed-by: default avatarAdrian Hunter <adrian.hunter@intel.com>
      Signed-off-by: default avatarYang Jihong <yangjihong1@huawei.com>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Andi Kleen <ak@linux.intel.com>
      Cc: Carsten Haitzler <carsten.haitzler@arm.com>
      Cc: Ian Rogers <irogers@google.com>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Leo Yan <leo.yan@linaro.org>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Cc: martin.lau@kernel.org
      Cc: Masami Hiramatsu <mhiramat@kernel.org>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Ravi Bangoria <ravi.bangoria@amd.com>
      Cc: Ravi Bangoria <ravi.bangoria@linux.ibm.com>
      Link: https://lore.kernel.org/r/20221220035702.188413-2-yangjihong1@huawei.comSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      188ac720
    • Arnaldo Carvalho de Melo's avatar
      tools headers UAPI: Sync linux/kvm.h with the kernel sources · b235e5b5
      Arnaldo Carvalho de Melo authored
      To pick the changes in:
      
        86bdf3eb ("KVM: Support dirty ring in conjunction with bitmap")
      
      That just rebuilds perf, as these patches don't add any new KVM ioctl to
      be harvested for the the 'perf trace' ioctl syscall argument
      beautifiers.
      
      This is also by now used by tools/testing/selftests/kvm/, a simple test
      build didn't succeed, but for another reason:
      
        lib/kvm_util.c: In function ‘vm_enable_dirty_ring’:
        lib/kvm_util.c:125:30: error: ‘KVM_CAP_DIRTY_LOG_RING_ACQ_REL’ undeclared (first use in this function); did you mean ‘KVM_CAP_DIRTY_LOG_RING’?
          125 |         if (vm_check_cap(vm, KVM_CAP_DIRTY_LOG_RING_ACQ_REL))
              |                              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
              |                              KVM_CAP_DIRTY_LOG_RING
      
      I'll send a separate patch for that.
      
      This silences this perf build warning:
      
        Warning: Kernel ABI header at 'tools/include/uapi/linux/kvm.h' differs from latest version at 'include/uapi/linux/kvm.h'
        diff -u tools/include/uapi/linux/kvm.h include/uapi/linux/kvm.h
      
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      Cc: Gavin Shan <gshan@redhat.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: Paolo Bonzini <pbonzini@redhat.com>
      Link: http://lore.kernel.org/lkml/Y6H3b1Q4Msjy5Yz3@kernel.orgSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      b235e5b5
    • Arnaldo Carvalho de Melo's avatar
      tools headers UAPI: Sync powerpc syscall table with the kernel sources · 6d5edd15
      Arnaldo Carvalho de Melo authored
      To pick the changes in these csets:
      
        ce883a2b ("powerpc/32: fix syscall wrappers with 64-bit arguments")
      
      That doesn't cause any changes in the perf tools.
      
      This table is used in tools perf to allow features as described in the
      last update to this file.
      
      This addresses this perf build warning:
      
        Warning: Kernel ABI header at 'tools/perf/arch/powerpc/entry/syscalls/syscall.tbl' differs from latest version at 'arch/powerpc/kernel/syscalls/syscall.tbl'
        diff -u tools/perf/arch/powerpc/entry/syscalls/syscall.tbl arch/powerpc/kernel/syscalls/syscall.tbl
      
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      Cc: Andreas Schwab <schwab@linux-m68k.org>
      Cc: Ian Rogers <irogers@google.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Michael Ellerman <mpe@ellerman.id.au>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Link: https://lore.kernel.org/lkml/Y6H0C5plZ4V4aiPm@kernel.orgSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      6d5edd15
    • Arnaldo Carvalho de Melo's avatar
      tools arch x86: Sync the msr-index.h copy with the kernel sources · a66558dc
      Arnaldo Carvalho de Melo authored
      To pick up the changes in:
      
        97fa21f6 ("x86/resctrl: Move MSR defines into msr-index.h")
        7420ae3b ("x86/intel_epb: Set Alder Lake N and Raptor Lake P normal EPB")
      
      Addressing these tools/perf build warnings:
      
          diff -u tools/arch/x86/include/asm/msr-index.h arch/x86/include/asm/msr-index.h
          Warning: Kernel ABI header at 'tools/arch/x86/include/asm/msr-index.h' differs from latest version at 'arch/x86/include/asm/msr-index.h'
      
      That makes the beautification scripts to pick some new entries:
      
        $ tools/perf/trace/beauty/tracepoints/x86_msr.sh > before
        $ cp arch/x86/include/asm/msr-index.h tools/arch/x86/include/asm/msr-index.h
        $ tools/perf/trace/beauty/tracepoints/x86_msr.sh > after
        $ diff -u before after
        --- before	2022-12-20 14:28:40.893794072 -0300
        +++ after	2022-12-20 14:28:54.831993914 -0300
        @@ -266,6 +266,7 @@
         	[0xc0000104 - x86_64_specific_MSRs_offset] = "AMD64_TSC_RATIO",
         	[0xc000010e - x86_64_specific_MSRs_offset] = "AMD64_LBR_SELECT",
         	[0xc000010f - x86_64_specific_MSRs_offset] = "AMD_DBG_EXTN_CFG",
        +	[0xc0000200 - x86_64_specific_MSRs_offset] = "IA32_MBA_BW_BASE",
         	[0xc0000300 - x86_64_specific_MSRs_offset] = "AMD64_PERF_CNTR_GLOBAL_STATUS",
         	[0xc0000301 - x86_64_specific_MSRs_offset] = "AMD64_PERF_CNTR_GLOBAL_CTL",
         	[0xc0000302 - x86_64_specific_MSRs_offset] = "AMD64_PERF_CNTR_GLOBAL_STATUS_CLR",
        $
      
      Now one can trace systemwide asking to see backtraces to where that MSR
      is being read/written, see this example with a previous update:
      
        # perf trace -e msr:*_msr/max-stack=32/ --filter="msr>=IA32_U_CET && msr<=IA32_INT_SSP_TAB"
        ^C#
      
      If we use -v (verbose mode) we can see what it does behind the scenes:
      
        # perf trace -v -e msr:*_msr/max-stack=32/ --filter="msr>=IA32_U_CET && msr<=IA32_INT_SSP_TAB"
        Using CPUID AuthenticAMD-25-21-0
        0x6a0
        0x6a8
        New filter for msr:read_msr: (msr>=0x6a0 && msr<=0x6a8) && (common_pid != 597499 && common_pid != 3313)
        0x6a0
        0x6a8
        New filter for msr:write_msr: (msr>=0x6a0 && msr<=0x6a8) && (common_pid != 597499 && common_pid != 3313)
        mmap size 528384B
        ^C#
      
      Example with a frequent msr:
      
        # perf trace -v -e msr:*_msr/max-stack=32/ --filter="msr==IA32_SPEC_CTRL" --max-events 2
        Using CPUID AuthenticAMD-25-21-0
        0x48
        New filter for msr:read_msr: (msr==0x48) && (common_pid != 2612129 && common_pid != 3841)
        0x48
        New filter for msr:write_msr: (msr==0x48) && (common_pid != 2612129 && common_pid != 3841)
        mmap size 528384B
        Looking at the vmlinux_path (8 entries long)
        symsrc__init: build id mismatch for vmlinux.
        Using /proc/kcore for kernel data
        Using /proc/kallsyms for symbols
           0.000 Timer/2525383 msr:write_msr(msr: IA32_SPEC_CTRL, val: 6)
                                             do_trace_write_msr ([kernel.kallsyms])
                                             do_trace_write_msr ([kernel.kallsyms])
                                             __switch_to_xtra ([kernel.kallsyms])
                                             __switch_to ([kernel.kallsyms])
                                             __schedule ([kernel.kallsyms])
                                             schedule ([kernel.kallsyms])
                                             futex_wait_queue_me ([kernel.kallsyms])
                                             futex_wait ([kernel.kallsyms])
                                             do_futex ([kernel.kallsyms])
                                             __x64_sys_futex ([kernel.kallsyms])
                                             do_syscall_64 ([kernel.kallsyms])
                                             entry_SYSCALL_64_after_hwframe ([kernel.kallsyms])
                                             __futex_abstimed_wait_common64 (/usr/lib64/libpthread-2.33.so)
           0.030 :0/0 msr:write_msr(msr: IA32_SPEC_CTRL, val: 2)
                                             do_trace_write_msr ([kernel.kallsyms])
                                             do_trace_write_msr ([kernel.kallsyms])
                                             __switch_to_xtra ([kernel.kallsyms])
                                             __switch_to ([kernel.kallsyms])
                                             __schedule ([kernel.kallsyms])
                                             schedule_idle ([kernel.kallsyms])
                                             do_idle ([kernel.kallsyms])
                                             cpu_startup_entry ([kernel.kallsyms])
                                             secondary_startup_64_no_verify ([kernel.kallsyms])
        #
      
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      Cc: Borislav Petkov <bp@suse.de>
      Cc: Dave Hansen <dave.hansen@linux.intel.com>
      Cc: Ian Rogers <irogers@google.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
      Link: https://lore.kernel.org/lkml/Y6HyTOGRNvKfCVe4@kernel.orgSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      a66558dc
    • Arnaldo Carvalho de Melo's avatar
      tools headers UAPI: Sync drm/i915_drm.h with the kernel sources · eeac18e2
      Arnaldo Carvalho de Melo authored
      To pick up the changes in:
      
        bc7ed4d3 ("drm/i915/perf: Apply Wa_18013179988")
        81d5f7d9 ("drm/i915/perf: Add 32-bit OAG and OAR formats for DG2")
        8133a6da ("drm/i915: enable PS64 support for DG2")
        b76c14c8 ("drm/i915/huc: better define HuC status getparam possible return values.")
        94dfc73e ("treewide: uapi: Replace zero-length arrays with flexible-array members")
      
      That doesn't add any ioctl, so no changes in tooling.
      
      This silences this perf build warning:
      
        Warning: Kernel ABI header at 'tools/include/uapi/drm/i915_drm.h' differs from latest version at 'include/uapi/drm/i915_drm.h'
        diff -u tools/include/uapi/drm/i915_drm.h include/uapi/drm/i915_drm.h
      
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      Cc: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
      Cc: Gustavo A. R. Silva <gustavoars@kernel.org>
      Cc: Ian Rogers <irogers@google.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: John Harrison <John.C.Harrison@Intel.com>
      Cc: Matthew Auld <matthew.auld@intel.com>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Umesh Nerlige Ramappa <umesh.nerlige.ramappa@intel.com>
      Link: https://lore.kernel.org/lkml/Y6HukoRaZh2R4j5U@kernel.orgSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      eeac18e2
  3. 19 Dec, 2022 15 commits
    • Arnaldo Carvalho de Melo's avatar
      tools headers UAPI: Sync linux/fscrypt.h with the kernel sources · 43a3ce77
      Arnaldo Carvalho de Melo authored
      To pick the changes from:
      
        f8b435f9 ("fscrypt: remove unused Speck definitions")
        e0cefada ("fscrypt: Add SM4 XTS/CTS symmetric algorithm support")
      
      That don't result in any changes in tooling, just causes this to be
      rebuilt:
      
        CC      /tmp/build/perf-urgent/trace/beauty/sync_file_range.o
        LD      /tmp/build/perf-urgent/trace/beauty/perf-in.o
      
      addressing this perf build warning:
      
        Warning: Kernel ABI header at 'tools/include/uapi/linux/fscrypt.h' differs from latest version at 'include/uapi/linux/fscrypt.h'
        diff -u tools/include/uapi/linux/fscrypt.h include/uapi/linux/fscrypt.h
      
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      Cc: Eric Biggers <ebiggers@google.com>
      Cc: Ian Rogers <irogers@google.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Tianjia Zhang <tianjia.zhang@linux.alibaba.com>
      Link: https://lore.kernel.org/lkml/Y6CHSS6Rn9YOqpAd@kernel.orgSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      43a3ce77
    • Arnaldo Carvalho de Melo's avatar
      tools headers cpufeatures: Sync with the kernel sources · 51c4f2bf
      Arnaldo Carvalho de Melo authored
      To pick the changes from:
      
        5e85c4eb ("x86: KVM: Advertise AVX-IFMA CPUID to user space")
        af2872f6 ("x86: KVM: Advertise AMX-FP16 CPUID to user space")
        6a19d7aa ("x86: KVM: Advertise CMPccXADD CPUID to user space")
        aaa65d17 ("x86/tsx: Add a feature bit for TSX control MSR support")
        b1599915 ("x86/cpufeatures: Move X86_FEATURE_CALL_DEPTH from bit 18 to bit 19 of word 11, to leave space for WIP X86_FEATURE_SGX_EDECCSSA bit")
        16a7fe37 ("KVM/VMX: Allow exposing EDECCSSA user leaf function to KVM guest")
        80e4c1cd ("x86/retbleed: Add X86_FEATURE_CALL_DEPTH")
        7df54884 ("x86/bugs: Add "unknown" reporting for MMIO Stale Data")
      
      This only causes these perf files to be rebuilt:
      
        CC       /tmp/build/perf/bench/mem-memcpy-x86-64-asm.o
        CC       /tmp/build/perf/bench/mem-memset-x86-64-asm.o
      
      And addresses this perf build warning:
      
        Warning: Kernel ABI header at 'tools/arch/x86/include/asm/cpufeatures.h' differs from latest version at 'arch/x86/include/asm/cpufeatures.h'
        diff -u tools/arch/x86/include/asm/cpufeatures.h arch/x86/include/asm/cpufeatures.h
      
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      Cc: Borislav Petkov <bp@suse.de>
      Cc: Chang S. Bae <chang.seok.bae@intel.com>
      Cc: Dave Hansen <dave.hansen@linux.intel.com>
      Cc: Ian Rogers <irogers@google.com>
      Cc: Ingo Molnar <mingo@kernel.org>
      Cc: Jiaxi Chen <jiaxi.chen@linux.intel.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Kai Huang <kai.huang@intel.com>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Pawan Gupta <pawan.kumar.gupta@linux.intel.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Link: https://lore.kernel.org/lkml/Y6CD%2FIcEbDW5X%2FpN@kernel.org/Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      51c4f2bf
    • Arnaldo Carvalho de Melo's avatar
      tools headers disabled-cpufeatures: Sync with the kernel sources · 0bc1d0e2
      Arnaldo Carvalho de Melo authored
      To pick the changes from:
      
        15e15d64 ("x86/cpufeatures: Add X86_FEATURE_XENPV to disabled-features.h")
      
      This only causes these perf files to be rebuilt:
      
        CC       /tmp/build/perf/bench/mem-memcpy-x86-64-asm.o
        CC       /tmp/build/perf/bench/mem-memset-x86-64-asm.o
      
      And addresses this perf build warning:
      
        Warning: Kernel ABI header at 'tools/arch/x86/include/asm/disabled-features.h' differs from latest version at 'arch/x86/include/asm/disabled-features.h'
        diff -u tools/arch/x86/include/asm/disabled-features.h arch/x86/include/asm/disabled-features.h
      
      Cc:  Hunter <adrian.hunter@intel.com>
      Cc: Borislav Petkov <bp@suse.de>
      Cc: Ian Rogers <irogers@google.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Juergen Gross <jgross@suse.com>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Link: https://lore.kernel.org/lkml/Y6B2w3WqifB%2FV70T@kernel.orgSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      0bc1d0e2
    • Arnaldo Carvalho de Melo's avatar
      30d647f5
    • Arnaldo Carvalho de Melo's avatar
      perf python: Don't stop building if python setuptools isn't installed · 66dfc517
      Arnaldo Carvalho de Melo authored
      The python3-setuptools package is needed to build the python binding, so
      that one can use things like:
      
        # ~acme/git/perf/tools/perf/python/twatch.py
        cpu: 6, pid: 4573, tid: 2184618 { type: exit, pid: 4573, ppid: 4172, tid: 2184618, ptid: 4172, time: 12563190090107}
        cpu: 24, pid: 4573, tid: 4573 { type: fork, pid: 4573, ppid: 4573, tid: 2190991e, ptid: 4573, time: 12563415289331}
        cpu: 29, pid: 4573, tid: 2190991e { type: comm, pid: 4573, tid: 2190991e, comm: StreamT~ns #401 }
        cpu: 29, pid: 4573, tid: 2190991e { type: comm, pid: 4573, tid: 2190991e, comm: StreamT~ns #401 }
        ^CTraceback (most recent call last):
          File "/var/home/acme/git/perf/tools/perf/python/twatch.py", line 61, in <module>
            main()
          File "/var/home/acme/git/perf/tools/perf/python/twatch.py", line 33, in main
            evlist.poll(timeout = -1)
        KeyboardInterrupt
      
        #
      
      That have 'import perf;'.
      
      But distros don't always have that python3-setuptools (or equivalent)
      installed, which was breaking the build. Just check if it is installed
      and emit a warning that such binding isn't being built and continue the
      build without it:
      
      With it:
      
        $ rpm -q python3-setuptools
        python3-setuptools-59.6.0-3.fc36.noarch
        $ rm -rf /tmp/build/perf; mkdir -p /tmp/build/perf
        $ make O=/tmp/build/perf -C tools/perf install-bin
        make: Entering directory '/var/home/acme/git/perf/tools/perf'
        <SNIP>
        ...                               libpython: [ on  ]
        <SNIP>
          GEN     /tmp/build/perf/python/perf.cpython-310-x86_64-linux-gnu.so
        <SNIP>
        $ ls -la /tmp/build/perf/python/perf.cpython-310-x86_64-linux-gnu.so
        -rwxr-xr-x. 1 acme acme 1609112 Dec 17 11:39 /tmp/build/perf/python/perf.cpython-310-x86_64-linux-gnu.so
        $
      
      Without it:
      
        $ sudo rpm -e python3-setuptools
        $ rm -rf /tmp/build/perf ; mkdir -p /tmp/build/perf
        $ make O=/tmp/build/perf -C tools/perf install-bin
        make: Entering directory '/var/home/acme/git/perf/tools/perf'
        <SNIP>
        ...                               libpython: [ on  ]
        <SNIP>
        $ ls -la /tmp/build/perf/python/perf.cpython-310-x86_64-linux-gnu.so
        ls: cannot access '/tmp/build/perf/python/perf.cpython-310-x86_64-linux-gnu.so': No such file or directory
        $
      Reported-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      Cc: Ian Rogers <irogers@google.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Link: http://lore.kernel.org/lkml/Y53XHw3rlsaaUgOs@kernel.orgSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      66dfc517
    • Linus Torvalds's avatar
      Merge tag 'nfsd-6.2-1' of git://git.kernel.org/pub/scm/linux/kernel/git/cel/linux · aeba12b2
      Linus Torvalds authored
      Pull more nfsd updates from Chuck Lever:
       "This contains a number of crasher fixes that were not ready for the
        initial pull request last week.
      
        In particular, Jeff's patch attempts to address reference count
        underflows in NFSD's filecache, which have been very difficult to
        track down because there is no reliable reproducer.
      
        Common failure modes:
            https://bugzilla.kernel.org/show_bug.cgi?id=216691#c11
            https://bugzilla.kernel.org/show_bug.cgi?id=216674#c6
            https://bugzilla.redhat.com/show_bug.cgi?id=2138605
      
        The race windows were found by inspection and the clean-ups appear
        sensible and pass regression testing, so we include them here in the
        hope that they address the problem. However we remain vigilant because
        we don't have 100% certainty yet that the problem is fully addressed.
      
        Summary:
      
         - Address numerous reports of refcount underflows in NFSD's filecache
      
         - Address a UAF in callback setup error handling
      
         - Address a UAF during server-to-server copy"
      
      * tag 'nfsd-6.2-1' of git://git.kernel.org/pub/scm/linux/kernel/git/cel/linux:
        NFSD: fix use-after-free in __nfs42_ssc_open()
        nfsd: under NFSv4.1, fix double svc_xprt_put on rpc_create failure
        nfsd: rework refcounting in filecache
      aeba12b2
    • Linus Torvalds's avatar
      Merge tag 'rtc-6.2' of git://git.kernel.org/pub/scm/linux/kernel/git/abelloni/linux · acd04af6
      Linus Torvalds authored
      Pull RTC updates from Alexandre Belloni:
       "Most of the changes are a rework of the cmos driver by Rafael and
        fixes for issues found using static checkers. The removal of a driver
        leads to a reduction of the number of LOC of the subsystem.
      
        Removed driver:
         - davinci
      
        Updates:
         - convert i2c drivers to .probe_new
         - fix spelling mistakes and duplicated words in comments
         - cmos: rework wake setup and ACPI event handling
         - cros-ec: Limit RTC alarm range to fix alarmtimer
         - ds1347: fix century register handling
         - efi: wakeup support
         - isl12022: temperature sensor support
         - pcf85063: fix read_alarm and clkout
         - pcf8523: use stop bit to detect invalid time
         - pcf8563: use RTC_FEATURE_ALARM
         - snvs: be more flexible on LPSRT reads
         - many static checker fixes"
      
      * tag 'rtc-6.2' of git://git.kernel.org/pub/scm/linux/kernel/git/abelloni/linux: (48 commits)
        rtc: ds1742: use devm_platform_get_and_ioremap_resource()
        rtc: mxc_v2: Add missing clk_disable_unprepare()
        rtc: rs5c313: correct some spelling mistakes
        rtc: at91rm9200: Fix syntax errors in comments
        rtc: remove duplicated words in comments
        rtc: rv3028: Use IRQ flags obtained from device tree if available
        rtc: ds1307: use sysfs_emit() to instead of scnprintf()
        rtc: isl12026: drop obsolete dependency on COMPILE_TEST
        dt-bindings: rtc: m41t80: Convert text schema to YAML one
        rtc: pcf85063: fix pcf85063_clkout_control
        rtc: rx6110: fix warning with !OF
        rtc: rk808: reduce 'struct rk808' usage
        rtc: msc313: Fix function prototype mismatch in msc313_rtc_probe()
        dt-bindings: rtc: convert rtc-meson.txt to dt-schema
        rtc: pic32: Move devm_rtc_allocate_device earlier in pic32_rtc_probe()
        rtc: st-lpc: Add missing clk_disable_unprepare in st_rtc_probe()
        rtc: pcf85063: Fix reading alarm
        rtc: pcf8523: fix for stop bit
        rtc: efi: Add wakeup support
        rtc: pcf8563: clear RTC_FEATURE_ALARM if no irq
        ...
      acd04af6
    • Linus Torvalds's avatar
      Merge tag 'dmaengine-6.2-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/vkoul/dmaengine · 9322af3e
      Linus Torvalds authored
      Pull dmaengine updates from Vinod Koul:
       "New support:
      
          - Qualcomm SDM670, SM6115 and SM6375 GPI controller support
      
          - Ingenic JZ4755 dmaengine support
      
          - Removal of iop-adma driver
      
        Updates:
      
         - Tegra support for dma-channel-mask
      
         - at_hdmac cleanup and virt-chan support for this driver"
      
      * tag 'dmaengine-6.2-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/vkoul/dmaengine: (46 commits)
        dmaengine: Revert "dmaengine: remove s3c24xx driver"
        dmaengine: tegra: Add support for dma-channel-mask
        dt-bindings: dmaengine: Add dma-channel-mask to Tegra GPCDMA
        dmaengine: idxd: Remove linux/msi.h include
        dt-bindings: dmaengine: qcom: gpi: add compatible for SM6375
        dmaengine: idxd: Fix crc_val field for completion record
        dmaengine: at_hdmac: Convert driver to use virt-dma
        dmaengine: at_hdmac: Remove unused member of at_dma_chan
        dmaengine: at_hdmac: Rename "chan_common" to "dma_chan"
        dmaengine: at_hdmac: Rename "dma_common" to "dma_device"
        dmaengine: at_hdmac: Use bitfield access macros
        dmaengine: at_hdmac: Keep register definitions and structures private to at_hdmac.c
        dmaengine: at_hdmac: Set include entries in alphabetic order
        dmaengine: at_hdmac: Use pm_ptr()
        dmaengine: at_hdmac: Use devm_clk_get()
        dmaengine: at_hdmac: Use devm_platform_ioremap_resource
        dmaengine: at_hdmac: Use devm_kzalloc() and struct_size()
        dmaengine: at_hdmac: Introduce atc_get_llis_residue()
        dmaengine: at_hdmac: s/atc_get_bytes_left/atc_get_residue
        dmaengine: at_hdmac: Pass residue by address to avoid unnecessary implicit casts
        ...
      9322af3e
    • Linus Torvalds's avatar
      Merge tag 'soundwire-6.2-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/vkoul/soundwire · 1b6a349a
      Linus Torvalds authored
      Pull soundwire updates from Vinod Koul:
       "This include bunch of Intel driver code reorganization and support for
        qcom v1.7.0 controller:
      
         - intel: reorganization of hw_ops callbacks, splitting files etc
      
         - qcom: support for v1.7.0 qcom controllers"
      
      * tag 'soundwire-6.2-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/vkoul/soundwire:
        soundwire: intel: split auxdevice to different file
        soundwire: intel: add in-band wake callbacks in hw_ops
        soundwire: intel: add link power management callbacks in hw_ops
        soundwire: intel: add bus management callbacks in hw_ops
        soundwire: intel: add register_dai callback in hw_ops
        soundwire: intel: add debugfs callbacks in hw_ops
        soundwire: intel: start using hw_ops
        dt-bindings: soundwire: Convert text bindings to DT Schema
        soundwire: cadence: use dai_runtime_array instead of dma_data
        soundwire: cadence: rename sdw_cdns_dai_dma_data as sdw_cdns_dai_runtime
        soundwire: qcom: add support for v1.7 Soundwire Controller
        dt-bindings: soundwire: qcom: add v1.7.0 support
        soundwire: qcom: make reset optional for v1.6 controller
        soundwire: qcom: remove unused SWRM_SPECIAL_CMD_ID
        soundwire: dmi-quirks: add quirk variant for LAPBC710 NUC15
      1b6a349a
    • Linus Torvalds's avatar
      Merge tag 'phy-for-6.2' of git://git.kernel.org/pub/scm/linux/kernel/git/phy/linux-phy · e7904111
      Linus Torvalds authored
      Pull phy updates from Vinod Koul:
       "This tme we have again a big pile of qcom-qmp-* changes, one new
        driver and bunch of new hardware support.
      
        New hardware support:
      
         - Allwinner H616 USB PHY and A100 DPHY support
      
         - TI J721s2, J784s4 and J721e support
      
         - Freescale i.MX8MP PCIe PHY support
      
         - New driver for Renesas Ethernet SERDES supporting R-Car S4-8
      
         - Qualcomm SM8450 PCIe1 PHY support in EP mode
      
         - Qualcomm SC8280XP PCIe PHY support (including x4 mode)
      
         - Fixed Qualcomm SC8280XP USB4-USB3-DP PHY DT bindings
      
        Updates:
      
         - A big pile of updates on qcom-qmp-* drivers following the driver
           split and reorganization merged earlier
      
         - Phy order of API calls documentation update"
      
      * tag 'phy-for-6.2' of git://git.kernel.org/pub/scm/linux/kernel/git/phy/linux-phy: (174 commits)
        phy: ti: phy-j721e-wiz: add j721s2-wiz-10g module support
        dt-bindings: phy-j721e-wiz: add j721s2 compatible string
        phy: use devm_platform_get_and_ioremap_resource()
        phy: allwinner: phy-sun6i-mipi-dphy: Add the A100 DPHY variant
        phy: allwinner: phy-sun6i-mipi-dphy: Add a variant power-on hook
        phy: allwinner: phy-sun6i-mipi-dphy: Set the enable bit last
        phy: allwinner: phy-sun6i-mipi-dphy: Make RX support optional
        dt-bindings: sun6i-a31-mipi-dphy: Add the A100 DPHY variant
        dt-bindings: sun6i-a31-mipi-dphy: Add the interrupts property
        phy: qcom-qmp-pcie: drop redundant clock allocation
        phy: qcom-qmp-usb: drop redundant clock allocation
        phy: qcom-qmp: drop unused type header
        phy: qcom-qmp-usb: drop sc8280xp reference-clock source
        dt-bindings: phy: qcom,sc8280xp-qmp-usb3-uni: drop reference-clock source
        phy: qcom-qmp-combo: add support for updated sc8280xp binding
        phy: qcom-qmp-combo: rename DP_PHY register pointer
        phy: qcom-qmp-combo: rename common-register pointers
        phy: qcom-qmp-combo: clean up DP clock callbacks
        phy: qcom-qmp-combo: separate clock and provider registration
        phy: qcom-qmp-combo: add clock registration helper
        ...
      e7904111
    • Linus Torvalds's avatar
      Merge tag 'iommu-updates-v6.2' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu · b8fd76f4
      Linus Torvalds authored
      Pull iommu updates from Joerg Roedel:
       "Core code:
         - map/unmap_pages() cleanup
         - SVA and IOPF refactoring
         - Clean up and document return codes from device/domain attachment
      
        AMD driver:
         - Rework and extend parsing code for ivrs_ioapic, ivrs_hpet and
           ivrs_acpihid command line options
         - Some smaller cleanups
      
        Intel driver:
         - Blocking domain support
         - Cleanups
      
        S390 driver:
         - Fixes and improvements for attach and aperture handling
      
        PAMU driver:
         - Resource leak fix and cleanup
      
        Rockchip driver:
         - Page table permission bit fix
      
        Mediatek driver:
         - Improve safety from invalid dts input
         - Smaller fixes and improvements
      
        Exynos driver:
         - Fix driver initialization sequence
      
        Sun50i driver:
         - Remove IOMMU_DOMAIN_IDENTITY as it has not been working forever
         - Various other fixes"
      
      * tag 'iommu-updates-v6.2' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu: (74 commits)
        iommu/mediatek: Fix forever loop in error handling
        iommu/mediatek: Fix crash on isr after kexec()
        iommu/sun50i: Remove IOMMU_DOMAIN_IDENTITY
        iommu/amd: Fix typo in macro parameter name
        iommu/mediatek: Remove unused "mapping" member from mtk_iommu_data
        iommu/mediatek: Improve safety for mediatek,smi property in larb nodes
        iommu/mediatek: Validate number of phandles associated with "mediatek,larbs"
        iommu/mediatek: Add error path for loop of mm_dts_parse
        iommu/mediatek: Use component_match_add
        iommu/mediatek: Add platform_device_put for recovering the device refcnt
        iommu/fsl_pamu: Fix resource leak in fsl_pamu_probe()
        iommu/vt-d: Use real field for indication of first level
        iommu/vt-d: Remove unnecessary domain_context_mapped()
        iommu/vt-d: Rename domain_add_dev_info()
        iommu/vt-d: Rename iommu_disable_dev_iotlb()
        iommu/vt-d: Add blocking domain support
        iommu/vt-d: Add device_block_translation() helper
        iommu/vt-d: Allocate pasid table in device probe path
        iommu/amd: Check return value of mmu_notifier_register()
        iommu/amd: Fix pci device refcount leak in ppr_notifier()
        ...
      b8fd76f4
    • Linus Torvalds's avatar
      Merge tag 'loongarch-6.2' of... · 2f26e424
      Linus Torvalds authored
      Merge tag 'loongarch-6.2' of git://git.kernel.org/pub/scm/linux/kernel/git/chenhuacai/linux-loongson
      
      Pull LoongArch updates from Huacai Chen:
      
       - Switch to relative exception tables
      
       - Add unaligned access support
      
       - Add alternative runtime patching mechanism
      
       - Add FDT booting support from efi system table
      
       - Add suspend/hibernation (ACPI S3/S4) support
      
       - Add basic STACKPROTECTOR support
      
       - Add ftrace (function tracer) support
      
       - Update the default config file
      
      * tag 'loongarch-6.2' of git://git.kernel.org/pub/scm/linux/kernel/git/chenhuacai/linux-loongson: (24 commits)
        LoongArch: Update Loongson-3 default config file
        LoongArch: modules/ftrace: Initialize PLT at load time
        LoongArch/ftrace: Add HAVE_FUNCTION_GRAPH_RET_ADDR_PTR support
        LoongArch/ftrace: Add HAVE_DYNAMIC_FTRACE_WITH_ARGS support
        LoongArch/ftrace: Add HAVE_DYNAMIC_FTRACE_WITH_REGS support
        LoongArch/ftrace: Add dynamic function graph tracer support
        LoongArch/ftrace: Add dynamic function tracer support
        LoongArch/ftrace: Add recordmcount support
        LoongArch/ftrace: Add basic support
        LoongArch: module: Use got/plt section indices for relocations
        LoongArch: Add basic STACKPROTECTOR support
        LoongArch: Add hibernation (ACPI S4) support
        LoongArch: Add suspend (ACPI S3) support
        LoongArch: Add processing ISA Node in DeviceTree
        LoongArch: Add FDT booting support from efi system table
        LoongArch: Use alternative to optimize libraries
        LoongArch: Add alternative runtime patching mechanism
        LoongArch: Add unaligned access support
        LoongArch: BPF: Add BPF exception tables
        LoongArch: Remove the .fixup section usage
        ...
      2f26e424
    • Linus Torvalds's avatar
      Merge tag 'csky-for-linus-6.2-rc1' of https://github.com/c-sky/csky-linux · 96bab5b9
      Linus Torvalds authored
      Pull arch/csky updates from Guo Ren:
      
       - Revert rseq support - it wasn't ready
      
       - Add current_stack_pointer support
      
       - Typo fixup
      
      * tag 'csky-for-linus-6.2-rc1' of https://github.com/c-sky/csky-linux:
        Revert "csky: Add support for restartable sequence"
        Revert "csky: Fixup CONFIG_DEBUG_RSEQ"
        csky: Kconfig: Fix spelling mistake "Meory" -> "Memory"
        csky: add arch support current_stack_pointer
      96bab5b9
    • Linus Torvalds's avatar
      Merge tag 'powerpc-6.2-1' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux · 5f6e430f
      Linus Torvalds authored
      Pull powerpc updates from Michael Ellerman:
      
       - Add powerpc qspinlock implementation optimised for large system
         scalability and paravirt. See the merge message for more details
      
       - Enable objtool to be built on powerpc to generate mcount locations
      
       - Use a temporary mm for code patching with the Radix MMU, so the
         writable mapping is restricted to the patching CPU
      
       - Add an option to build the 64-bit big-endian kernel with the ELFv2
         ABI
      
       - Sanitise user registers on interrupt entry on 64-bit Book3S
      
       - Many other small features and fixes
      
      Thanks to Aboorva Devarajan, Angel Iglesias, Benjamin Gray, Bjorn
      Helgaas, Bo Liu, Chen Lifu, Christoph Hellwig, Christophe JAILLET,
      Christophe Leroy, Christopher M. Riedl, Colin Ian King, Deming Wang,
      Disha Goel, Dmitry Torokhov, Finn Thain, Geert Uytterhoeven, Gustavo A.
      R. Silva, Haowen Bai, Joel Stanley, Jordan Niethe, Julia Lawall, Kajol
      Jain, Laurent Dufour, Li zeming, Miaoqian Lin, Michael Jeanson, Nathan
      Lynch, Naveen N. Rao, Nayna Jain, Nicholas Miehlbradt, Nicholas Piggin,
      Pali Rohár, Randy Dunlap, Rohan McLure, Russell Currey, Sathvika
      Vasireddy, Shaomin Deng, Stephen Kitt, Stephen Rothwell, Thomas
      Weißschuh, Tiezhu Yang, Uwe Kleine-König, Xie Shaowen, Xiu Jianfeng,
      XueBing Chen, Yang Yingliang, Zhang Jiaming, ruanjinjie, Jessica Yu,
      and Wolfram Sang.
      
      * tag 'powerpc-6.2-1' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux: (181 commits)
        powerpc/code-patching: Fix oops with DEBUG_VM enabled
        powerpc/qspinlock: Fix 32-bit build
        powerpc/prom: Fix 32-bit build
        powerpc/rtas: mandate RTAS syscall filtering
        powerpc/rtas: define pr_fmt and convert printk call sites
        powerpc/rtas: clean up includes
        powerpc/rtas: clean up rtas_error_log_max initialization
        powerpc/pseries/eeh: use correct API for error log size
        powerpc/rtas: avoid scheduling in rtas_os_term()
        powerpc/rtas: avoid device tree lookups in rtas_os_term()
        powerpc/rtasd: use correct OF API for event scan rate
        powerpc/rtas: document rtas_call()
        powerpc/pseries: unregister VPA when hot unplugging a CPU
        powerpc/pseries: reset the RCU watchdogs after a LPM
        powerpc: Take in account addition CPU node when building kexec FDT
        powerpc: export the CPU node count
        powerpc/cpuidle: Set CPUIDLE_FLAG_POLLING for snooze state
        powerpc/dts/fsl: Fix pca954x i2c-mux node names
        cxl: Remove unnecessary cxl_pci_window_alignment()
        selftests/powerpc: Fix resource leaks
        ...
      5f6e430f
    • Linus Torvalds's avatar
      Merge tag 'mm-nonmm-stable-2022-12-17-20-32' of... · a6e3e6f1
      Linus Torvalds authored
      Merge tag 'mm-nonmm-stable-2022-12-17-20-32' of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
      
      Pull fault-injection updates from Andrew Morton:
       "Some fault-injection improvements from Wei Yongjun which enable
        stacktrace filtering on x86_64"
      
      * tag 'mm-nonmm-stable-2022-12-17-20-32' of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm:
        fault-injection: make stacktrace filter works as expected
        fault-injection: make some stack filter attrs more readable
        fault-injection: skip stacktrace filtering by default
        fault-injection: allow stacktrace filter for x86-64
      a6e3e6f1