Skip to content
  1. Jan 16, 2021
    • Namhyung Kim's avatar
      perf stat: Introduce struct runtime_stat_data · 3ff1e718
      Namhyung Kim authored
      
      
      To pass more info to the saved_value in the runtime_stat, add a new
      struct runtime_stat_data.  Currently it only has 'ctx' field but later
      patch will add more.
      
      Note that we intentionally pass 0 as ctx to clock-related events for
      compatibility.  It was already there in a few places.  So move the code
      into the saved_value_lookup() explicitly and add a comment.
      
      Suggested-by: default avatarAndi Kleen <ak@linux.intel.com>
      Signed-off-by: default avatarNamhyung Kim <namhyung@kernel.org>
      Acked-by: default avatarJiri Olsa <jolsa@redhat.com>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Andi Kleen <ak@linux.intel.com>
      Cc: Ian Rogers <irogers@google.com>
      Cc: Jin Yao <yao.jin@linux.intel.com>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Stephane Eranian <eranian@google.com>
      Link: http://lore.kernel.org/lkml/20210115071139.257042-1-namhyung@kernel.org
      
      
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      3ff1e718
    • Ian Rogers's avatar
      libperf tests: Fail when failing to get a tracepoint id · 66dd86b2
      Ian Rogers authored
      
      
      Permissions are necessary to get a tracepoint id. Fail the test when the
      read fails.
      
      Signed-off-by: default avatarIan Rogers <irogers@google.com>
      Acked-by: default avatarJiri Olsa <jolsa@redhat.com>
      Cc: Alexander Shishkin <alexander.shishkin@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: http://lore.kernel.org/lkml/20210114180250.3853825-2-irogers@google.com
      
      
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      66dd86b2
    • Ian Rogers's avatar
      libperf tests: If a test fails return non-zero · bba2ea17
      Ian Rogers authored
      
      
      If a test fails return -1 rather than 0. This is consistent with the
      return value in test-cpumap.c
      
      Signed-off-by: default avatarIan Rogers <irogers@google.com>
      Acked-by: default avatarJiri Olsa <jolsa@redhat.com>
      Cc: Alexander Shishkin <alexander.shishkin@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: http://lore.kernel.org/lkml/20210114180250.3853825-1-irogers@google.com
      
      
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      bba2ea17
    • Ian Rogers's avatar
      libperf tests: Avoid uninitialized variable warning · be82fddc
      Ian Rogers authored
      
      
      The variable 'bf' is read (for a write call) without being initialized
      triggering a memory sanitizer warning. Use 'bf' in the read and switch
      the write to reading from a string.
      
      Signed-off-by: default avatarIan Rogers <irogers@google.com>
      Acked-by: default avatarJiri Olsa <jolsa@redhat.com>
      Acked-by: default avatarNamhyung Kim <namhyung@kernel.org>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Stephane Eranian <eranian@google.com>
      Link: http://lore.kernel.org/lkml/20210114212304.4018119-1-irogers@google.com
      
      
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      be82fddc
    • Namhyung Kim's avatar
      perf test: Fix shadow stat test for non-bash shells · a042a82d
      Namhyung Kim authored
      
      
      It was using some bash-specific features and failed to parse when
      running with a different shell like below:
      
        root@kbl-ppc:~/kbl-ws/perf-dev/lck-9077/acme.tmp/tools/perf# ./perf test 83 -vv
        83: perf stat metrics (shadow stat) test                            :
        --- start ---
        test child forked, pid 3922
        ./tests/shell/stat+shadow_stat.sh: 19: ./tests/shell/stat+shadow_stat.sh: [[: not found
        ./tests/shell/stat+shadow_stat.sh: 24: ./tests/shell/stat+shadow_stat.sh: [[: not found
        ./tests/shell/stat+shadow_stat.sh: 30: ./tests/shell/stat+shadow_stat.sh: [[: not found
        (standard_in) 2: syntax error
        ./tests/shell/stat+shadow_stat.sh: 36: ./tests/shell/stat+shadow_stat.sh: [[: not found
        ./tests/shell/stat+shadow_stat.sh: 19: ./tests/shell/stat+shadow_stat.sh: [[: not found
        ./tests/shell/stat+shadow_stat.sh: 24: ./tests/shell/stat+shadow_stat.sh: [[: not found
        ./tests/shell/stat+shadow_stat.sh: 30: ./tests/shell/stat+shadow_stat.sh: [[: not found
        (standard_in) 2: syntax error
        ./tests/shell/stat+shadow_stat.sh: 36: ./tests/shell/stat+shadow_stat.sh: [[: not found
        ./tests/shell/stat+shadow_stat.sh: 45: ./tests/shell/stat+shadow_stat.sh: declare: not found
        test child finished with -1
        ---- end ----
        perf stat metrics (shadow stat) test: FAILED!
      
      Reported-by: default avatarJin Yao <yao.jin@linux.intel.com>
      Signed-off-by: default avatarNamhyung Kim <namhyung@kernel.org>
      Acked-by: default avatarJiri Olsa <jolsa@redhat.com>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Andi Kleen <ak@linux.intel.com>
      Cc: David Laight <david.laight@aculab.com>
      Cc: Ian Rogers <irogers@google.com>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Stephane Eranian <eranian@google.com>
      Link: http://lore.kernel.org/lkml/20210114050609.1258820-1-namhyung@kernel.org
      
      
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      a042a82d
    • Arnaldo Carvalho de Melo's avatar
      tools headers: Syncronize linux/build_bug.h with the kernel sources · addbdff2
      Arnaldo Carvalho de Melo authored
      To pick up the changes in:
      
        3a176b94
      
       ("Revert "kbuild: avoid static_assert for genksyms"")
      
      And silence this perf build warning:
      
        Warning: Kernel ABI header at 'tools/include/linux/build_bug.h' differs from latest version at 'include/linux/build_bug.h'
        diff -u tools/include/linux/build_bug.h include/linux/build_bug.h
      
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      Cc: Ian Rogers <irogers@google.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Masahiro Yamada <masahiroy@kernel.org>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      addbdff2
    • Arnaldo Carvalho de Melo's avatar
      tools headers UAPI: Sync kvm.h headers with the kernel sources · 38c53947
      Arnaldo Carvalho de Melo authored
      To pick the changes in:
      
        647daca2
      
       ("KVM: SVM: Add support for booting APs in an SEV-ES guest")
      
      That don't cause any tooling change, just 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: Ian Rogers <irogers@google.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Paolo Bonzini <pbonzini@redhat.com>
      Cc: Tom Lendacky <thomas.lendacky@amd.com>
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      38c53947
    • Arnaldo Carvalho de Melo's avatar
      perf bpf examples: Fix bpf.h header include directive in 5sec.c example · 301f0203
      Arnaldo Carvalho de Melo authored
      
      
      It was looking at bpf/bpf.h, which caused this problem:
      
        # perf trace -e tools/perf/examples/bpf/5sec.c
        /home/acme/git/perf/tools/perf/examples/bpf/5sec.c:42:10: fatal error: 'bpf/bpf.h' file not found
        #include <bpf/bpf.h>
                 ^~~~~~~~~~~
        1 error generated.
        ERROR:	unable to compile tools/perf/examples/bpf/5sec.c
        Hint:	Check error message shown above.
        Hint:	You can also pre-compile it into .o using:
             		clang -target bpf -O2 -c tools/perf/examples/bpf/5sec.c
             	with proper -I and -D options.
        event syntax error: 'tools/perf/examples/bpf/5sec.c'
                             \___ Failed to load tools/perf/examples/bpf/5sec.c from source: Error when compiling BPF scriptlet
        #
      
      Change that to plain bpf.h, to make it work again:
      
        # perf trace -e tools/perf/examples/bpf/5sec.c sleep 5s
             0.000 perf_bpf_probe:hrtimer_nanosleep(__probe_ip: -1776891872, rqtp: 5000000000)
        # perf trace -e tools/perf/examples/bpf/5sec.c/max-stack=16/ sleep 5s
             0.000 perf_bpf_probe:hrtimer_nanosleep(__probe_ip: -1776891872, rqtp: 5000000000)
                                               hrtimer_nanosleep ([kernel.kallsyms])
                                               common_nsleep ([kernel.kallsyms])
                                               __x64_sys_clock_nanosleep ([kernel.kallsyms])
                                               do_syscall_64 ([kernel.kallsyms])
                                               entry_SYSCALL_64_after_hwframe ([kernel.kallsyms])
                                               __clock_nanosleep_2 (/usr/lib64/libc-2.32.so)
        # perf trace -e tools/perf/examples/bpf/5sec.c sleep 4s
        #
      
      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>
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      301f0203
    • Linus Torvalds's avatar
      Merge tag 'acpi-5.11-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm · f4e087c6
      Linus Torvalds authored
      Pull ACPI fixes from Rafael Wysocki:
       "These address a device ID bounds check error in the device enumeration
        code and fix a mistake in the documentation.
      
        Specifics:
      
         - Harden the ACPI device enumeration code against device ID length
           overflows to address a Linux VM cash on Hyper-V (Dexuan Cui).
      
         - Fix a mistake in the documentation of error type values for PCIe
           errors (Qiuxu Zhuo)"
      
      * tag 'acpi-5.11-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
        Documentation: ACPI: EINJ: Fix error type values for PCIe errors
        ACPI: scan: Harden acpi_device_add() against device ID overflows
      f4e087c6
    • Linus Torvalds's avatar
      Merge tag 'for-linus-5.11-rc4-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip · dcda487c
      Linus Torvalds authored
      Pull xen fixes from Juergen Gross:
      
       - A series to fix a regression when running as a fully virtualized
         guest on an old Xen hypervisor not supporting PV interrupt callbacks
         for HVM guests.
      
       - A patch to add support to query Xen resource sizes (setting was
         possible already) from user mode.
      
      * tag 'for-linus-5.11-rc4-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip:
        x86/xen: Fix xen_hvm_smp_init() when vector callback not available
        x86/xen: Don't register Xen IPIs when they aren't going to be used
        x86/xen: Add xen_no_vector_callback option to test PCI INTX delivery
        xen: Set platform PCI device INTX affinity to CPU0
        xen: Fix event channel callback via INTX/GSI
        xen/privcmd: allow fetching resource sizes
      dcda487c
    • Linus Torvalds's avatar
      Merge tag 'iommu-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux · 7aec71cd
      Linus Torvalds authored
      Pull iommu fixes from Will Deacon:
       "Three IOMMU fixes for -rc4.
      
        The main one is a change to the Intel IOMMU driver to fix the handling
        of unaligned addresses when invalidating the TLB.
      
        The fix itself is a bit ugly (the caller does a bunch of shifting
        which is then effectively undone later in the callchain), but Lu has
        patches to clean all of this up in 5.12.
      
        Summary:
      
         - Fix address alignment handling for VT-D TLB invalidation
      
         - Enable workarounds for buggy Qualcomm firmware on two more SoCs
      
         - Drop duplicate #include"
      
      * tag 'iommu-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux:
        iommu/vt-d: Fix duplicate included linux/dma-map-ops.h
        iommu: arm-smmu-qcom: Add sdm630/msm8998 compatibles for qcom quirks
        iommu/vt-d: Fix unaligned addresses for intel_flush_svm_range_dev()
      7aec71cd
    • Linus Torvalds's avatar
      Merge tag 'topic/nouveau-ampere-modeset-2021-01-15' of git://anongit.freedesktop.org/drm/drm · 02c06dc3
      Linus Torvalds authored
      Pull drm nouveau ampere display support from Dave Airlie:
       "Ben has requested if we can include Ampere modesetting support under
        fixes, it's for new GPUs and shouldn't affect existing hardware.
      
        It's a bit bigger than just adding a PCI ID, but It has no effect on
        older GPUs"
      
      * tag 'topic/nouveau-ampere-modeset-2021-01-15' of git://anongit.freedesktop.org/drm/drm:
        drm/nouveau/disp/ga10[24]: initial support
        drm/nouveau/dmaobj/ga10[24]: initial support
        drm/nouveau/i2c/ga10[024]: initial support
        drm/nouveau/gpio/ga10[024]: initial support
        drm/nouveau/bar/ga10[024]: initial support
        drm/nouveau/mmu/ga10[024]: initial support
        drm/nouveau/timer/ga10[024]: initial support
        drm/nouveau/fb/ga10[024]: initial support
        drm/nouveau/imem/ga10[024]: initial support
        drm/nouveau/privring/ga10[024]: initial support
        drm/nouveau/mc/ga10[024]: initial support
        drm/nouveau/devinit/ga10[024]: initial support
        drm/nouveau/bios/ga10[024]: initial support
        drm/nouveau/pci/ga10[024]: initial support
        drm/nouveau/core: recognise GA10[024]
      02c06dc3
    • Rafael J. Wysocki's avatar
      Merge branch 'acpi-docs' · 179892ad
      Rafael J. Wysocki authored
      * acpi-docs:
        Documentation: ACPI: EINJ: Fix error type values for PCIe errors
      179892ad
  2. Jan 15, 2021