1. 02 Dec, 2019 6 commits
    • Arnaldo Carvalho de Melo's avatar
      tools headers UAPI: Sync sched.h with the kernel · 2603a490
      Arnaldo Carvalho de Melo authored
      To get the changes in:
      
        0acefef5 ("Merge tag 'threads-v5.5' of git://git.kernel.org/pub/scm/linux/kernel/git/brauner/linux")
        49cb2fc4 ("fork: extend clone3() to support setting a PID")
        fa729c4d ("clone3: validate stack arguments")
        b612e5df ("clone3: add CLONE_CLEAR_SIGHAND")
      
      This file gets rebuilt, but no changes ensues:
      
         CC       /tmp/build/perf/trace/beauty/clone.o
      
      This addresses this perf build warning:
      
        Warning: Kernel ABI header at 'tools/include/uapi/linux/sched.h' differs from latest version at 'include/uapi/linux/sched.h'
        diff -u tools/include/uapi/linux/sched.h include/uapi/linux/sched.
      
      The CLONE_CLEAR_SIGHAND one will be used in tools/perf/trace/beauty/clone.c
      in a followup patch to show that string when this bit is set in the
      syscall arg. Keeping a copy of this file allows us to build this in
      older systems and have the binary support printing that flag whenever
      that system gets its kernel updated to one where this feature is
      present.
      
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      Cc: Adrian Reber <areber@redhat.com>
      Cc: Christian Brauner <christian.brauner@ubuntu.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Link: https://lkml.kernel.org/n/tip-nprqsvvzbhzoy64cbvos6c5b@git.kernel.orgSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      2603a490
    • Arnaldo Carvalho de Melo's avatar
      tools headers kvm: Sync kvm headers with the kernel sources · 1fc3d0ee
      Arnaldo Carvalho de Melo authored
      To pick up the changes from:
      
        14edff88 Merge tag 'kvmarm-5.5' of git://git.kernel.org/pub/scm/linux/kernel/git/kvmarm/kvmarm into HEAD
        a4b28f5c Merge remote-tracking branch 'kvmarm/kvm-arm64/stolen-time' into kvmarm-master/next
        58772e9a ("KVM: arm64: Provide VCPU attributes for stolen time")
        da345174 ("KVM: arm/arm64: Allow user injection of external data aborts")
        c726200d ("KVM: arm/arm64: Allow reporting non-ISV data aborts to userspace")
        efe5ddca ("KVM: PPC: Book3S HV: XIVE: Allow userspace to set the # of VPs")
      
      No tools changes are caused by this, as the only defines so far used
      from these files are for syscall arg pretty printing are:
      
        $ grep KVM tools/perf/trace/beauty/*.sh
        tools/perf/trace/beauty/kvm_ioctl.sh:regex='^#[[:space:]]*define[[:space:]]+KVM_(\w+)[[:space:]]+_IO[RW]*\([[:space:]]*KVMIO[[:space:]]*,[[:space:]]*(0x[[:xdigit:]]+).*'
        $
      
      Some are also include by:
      
        tools/perf/arch/x86/util/kvm-stat.c
        tools/perf/arch/powerpc/util/kvm-stat.c
      
      This addresses these tools/perf build warnings:
      
        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
        Warning: Kernel ABI header at 'tools/arch/powerpc/include/uapi/asm/kvm.h' differs from latest version at 'arch/powerpc/include/uapi/asm/kvm.h'
        diff -u tools/arch/powerpc/include/uapi/asm/kvm.h arch/powerpc/include/uapi/asm/kvm.h
        Warning: Kernel ABI header at 'tools/arch/arm/include/uapi/asm/kvm.h' differs from latest version at 'arch/arm/include/uapi/asm/kvm.h'
        diff -u tools/arch/arm/include/uapi/asm/kvm.h arch/arm/include/uapi/asm/kvm.h
        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: Christoffer Dall <christoffer.dall@arm.com>
      Cc: Fabiano Rosas <farosas@linux.ibm.com>
      Cc: Greg Kurz <groug@kaod.org>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Marc Zyngier <maz@kernel.org>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Paul Mackerras <paulus@ozlabs.org>
      Cc: Steven Price <steven.price@arm.com>
      Link: https://lkml.kernel.org/n/tip-qrjdudhq25mk5bfnhveofbm4@git.kernel.orgSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      1fc3d0ee
    • Arnaldo Carvalho de Melo's avatar
      tools headers uapi: Sync linux/stat.h with the kernel sources · c66f2566
      Arnaldo Carvalho de Melo authored
      To pick the changes from:
      
        3ad2522c ("statx: define STATX_ATTR_VERITY")
      
      That don't trigger any changes in tooling.
      
      This silences this perf build warning:
      
        Warning: Kernel ABI header at 'tools/include/uapi/linux/stat.h' differs from latest version at 'include/uapi/linux/stat.h'
        diff -u tools/include/uapi/linux/stat.h include/uapi/linux/stat.h
      
      At some point we wi'll beautify structs passed in pointers to syscalls
      and then we'll need to have tables for these defines, for now update the
      file to silence the warning as this file is used for doing this type of
      number -> string translations for other defines found in these file.
      
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      Cc: Eric Biggers <ebiggers@google.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Link: https://lkml.kernel.org/n/tip-thcy60dpry5qrpn7nmc58bwg@git.kernel.orgSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      c66f2566
    • Arnaldo Carvalho de Melo's avatar
      tools headers uapi: Sync linux/fscrypt.h with the kernel sources · ad46f35c
      Arnaldo Carvalho de Melo authored
      To pick the changes from:
      
        b103fb76 ("fscrypt: add support for IV_INO_LBLK_64 policies")
      
      That don't trigger any changes in tooling.
      
      This silences 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: Jiri Olsa <jolsa@kernel.org>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Link: https://lkml.kernel.org/n/tip-cgfz3ffe07pw2m8hmstvkudl@git.kernel.orgSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      ad46f35c
    • Arnaldo Carvalho de Melo's avatar
      tools arch x86: Sync the msr-index.h copy with the kernel sources · 8122b047
      Arnaldo Carvalho de Melo authored
      To pick up the changes from these csets:
      
        3f3c8be9 Merge tag 'for-linus-5.5a-rc1-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip
        4e3f77d8 ("xen/mcelog: add PPIN to record when available")
        db4d30fb ("x86/bugs: Add ITLB_MULTIHIT bug infrastructure")
        1b42f017 ("x86/speculation/taa: Add mitigation for TSX Async Abort")
        c2955f27 ("x86/msr: Add the IA32_TSX_CTRL MSR")
      
      These are the changes in tooling that this udpate ensues:
      
        $ tools/perf/trace/beauty/tracepoints/x86_msr.sh > /tmp/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 > /tmp/after
        $ diff -u /tmp/before /tmp/after
        --- /tmp/before	2019-12-02 11:54:44.371035723 -0300
        +++ /tmp/after	2019-12-02 11:55:31.847859784 -0300
        @@ -48,6 +48,7 @@
         	[0x00000119] = "IA32_BBL_CR_CTL",
         	[0x0000011e] = "IA32_BBL_CR_CTL3",
         	[0x00000120] = "IDT_MCR_CTRL",
        +	[0x00000122] = "IA32_TSX_CTRL",
         	[0x00000140] = "MISC_FEATURES_ENABLES",
         	[0x00000174] = "IA32_SYSENTER_CS",
         	[0x00000175] = "IA32_SYSENTER_ESP",
        @@ -283,4 +284,6 @@
         	[0xc0010240 - x86_AMD_V_KVM_MSRs_offset] = "F15H_NB_PERF_CTL",
         	[0xc0010241 - x86_AMD_V_KVM_MSRs_offset] = "F15H_NB_PERF_CTR",
         	[0xc0010280 - x86_AMD_V_KVM_MSRs_offset] = "F15H_PTSC",
        +	[0xc00102f0 - x86_AMD_V_KVM_MSRs_offset] = "AMD_PPIN_CTL",
        +	[0xc00102f1 - x86_AMD_V_KVM_MSRs_offset] = "AMD_PPIN",
         };
        $
      
        CC       /tmp/build/perf/trace/beauty/tracepoints/x86_msr.o
        LD       /tmp/build/perf/trace/beauty/tracepoints/perf-in.o
        LD       /tmp/build/perf/trace/beauty/perf-in.o
        LD       /tmp/build/perf/perf-in.o
      
      Now it is possible to use these strings when setting up filters for the msr:*
      tracepoints, like:
      
        # perf trace -e msr:* --filter=msr==IA32_TSX_CTRL
        ^C[root@quaco ~]#
      
      If we use an invalid operator we can check what is the filter that is put in
      place:
      
        # perf trace -e msr:* --filter=msr=IA32_TSX_CTRL
        Failed to set filter "(msr=0x122) && (common_pid != 25976 && common_pid != 25860)" on event msr:read_msr with 22 (Invalid argument)
      
      One can as well use -v to see the tracepoints and its filters:
      
        # perf trace -v -e msr:* --filter=msr==IA32_TSX_CTRL
        Using CPUID GenuineIntel-6-8E-A
        New filter for msr:read_msr: (msr==0x122) && (common_pid != 26110 && common_pid != 25860)
        New filter for msr:write_msr: (msr==0x122) && (common_pid != 26110 && common_pid != 25860)
        New filter for msr:rdpmc: (msr==0x122) && (common_pid != 26110 && common_pid != 25860)
        mmap size 528384B
        ^C#
      
      Better than keep looking up those numbers, works with callchains as
      well, e.g. for something more common:
      
        # perf trace -e msr:*/max-stack=16/ --filter="msr==IA32_SPEC_CTRL" --max-events=2
             0.000 SCTP timer/6158 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])
                                               __sched_text_start ([kernel.kallsyms])
                                               schedule ([kernel.kallsyms])
                                               schedule_hrtimeout_range_clock ([kernel.kallsyms])
                                               poll_schedule_timeout.constprop.0 ([kernel.kallsyms])
                                               do_select ([kernel.kallsyms])
                                               core_sys_select ([kernel.kallsyms])
                                               kern_select ([kernel.kallsyms])
                                               __x64_sys_select ([kernel.kallsyms])
                                               do_syscall_64 ([kernel.kallsyms])
                                               entry_SYSCALL_64 ([kernel.kallsyms])
                                               __select (/usr/lib64/libc-2.29.so)
                                               [0] ([unknown])
             0.024 :0/0 msr:write_msr(msr: IA32_SPEC_CTRL)
                                               do_trace_write_msr ([kernel.kallsyms])
                                               do_trace_write_msr ([kernel.kallsyms])
                                               __switch_to_xtra ([kernel.kallsyms])
                                               __switch_to ([kernel.kallsyms])
                                               __sched_text_start ([kernel.kallsyms])
                                               schedule_idle ([kernel.kallsyms])
                                               do_idle ([kernel.kallsyms])
                                               cpu_startup_entry ([kernel.kallsyms])
                                               start_secondary ([kernel.kallsyms])
                                               [0x2000d4] ([kernel.kallsyms])
        #
      
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      Cc: Jan Beulich <jbeulich@suse.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Juergen Gross <jgross@suse.com>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Pawan Gupta <pawan.kumar.gupta@linux.intel.com>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Vineela Tummalapalli <vineela.tummalapalli@intel.com>
      Link: https://lkml.kernel.org/n/tip-n1xd78fpd5lxn4q1brqi2jl6@git.kernel.orgSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      8122b047
    • Arnaldo Carvalho de Melo's avatar
      perf bench: Update the copies of x86's mem{cpy,set}_64.S · bd5c6b81
      Arnaldo Carvalho de Melo authored
      And update linux/linkage.h, which requires in turn that we make these
      files switch from ENTRY()/ENDPROC() to SYM_FUNC_START()/SYM_FUNC_END():
      
        tools/perf/arch/arm64/tests/regs_load.S
        tools/perf/arch/arm/tests/regs_load.S
        tools/perf/arch/powerpc/tests/regs_load.S
        tools/perf/arch/x86/tests/regs_load.S
      
      We also need to switch SYM_FUNC_START_LOCAL() to SYM_FUNC_START() for
      the functions used directly by 'perf bench', and update
      tools/perf/check_headers.sh to ignore those changes when checking if the
      kernel original files drifted from the copies we carry.
      
      This is to get the changes from:
      
        6dcc5627 ("x86/asm: Change all ENTRY+ENDPROC to SYM_FUNC_*")
        ef1e0315 ("x86/asm: Make some functions local")
        e9b9d020 ("x86/asm: Annotate aliases")
      
      And address these tools/perf build warnings:
      
        Warning: Kernel ABI header at 'tools/arch/x86/lib/memcpy_64.S' differs from latest version at 'arch/x86/lib/memcpy_64.S'
        diff -u tools/arch/x86/lib/memcpy_64.S arch/x86/lib/memcpy_64.S
        Warning: Kernel ABI header at 'tools/arch/x86/lib/memset_64.S' differs from latest version at 'arch/x86/lib/memset_64.S'
        diff -u tools/arch/x86/lib/memset_64.S arch/x86/lib/memset_64.S
      
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      Cc: Borislav Petkov <bp@suse.de>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Jiri Slaby <jslaby@suse.cz>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Link: https://lkml.kernel.org/n/tip-tay3l8x8k11p7y3qcpqh9qh5@git.kernel.orgSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      bd5c6b81
  2. 29 Nov, 2019 13 commits
  3. 28 Nov, 2019 7 commits
    • Adrian Hunter's avatar
      perf script: Fix invalid LBR/binary mismatch error · 5172672d
      Adrian Hunter authored
      The 'len' returned by grab_bb() includes an extra MAXINSN bytes to allow
      for the last instruction, so the the final 'offs' will not be 'len'.
      Fix the error condition logic accordingly.
      
      Before:
      
        $ perf record -e '{intel_pt//,cpu/mem_inst_retired.all_loads,aux-sample-size=8192/pp}:u' grep -rqs jhgjhg /boot
        [ perf record: Woken up 19 times to write data ]
        [ perf record: Captured and wrote 2.274 MB perf.data ]
        $ perf script -F +brstackinsn --xed --itrace=i1usl100 | head
                  grep 13759 [002]  8091.310257:       1862                                        instructions:uH:      5641d58069eb bmexec+0x86b (/bin/grep)
              bmexec+2485:
              00005641d5806b35                        jnz 0x5641d5806bd0              # MISPRED
              00005641d5806bd0                        movzxb  (%r13,%rdx,1), %eax
              00005641d5806bd6                        add %rdi, %rax
              00005641d5806bd9                        movzxb  -0x1(%rax), %edx
              00005641d5806bdd                        cmp %rax, %r14
              00005641d5806be0                        jnb 0x5641d58069c0              # MISPRED
              mismatch of LBR data and executable
              00005641d58069c0                        movzxb  (%r13,%rdx,1), %edi
      
      After:
      
        $ perf script -F +brstackinsn --xed --itrace=i1usl100 | head
                  grep 13759 [002]  8091.310257:       1862                                        instructions:uH:      5641d58069eb bmexec+0x86b (/bin/grep)
              bmexec+2485:
              00005641d5806b35                        jnz 0x5641d5806bd0              # MISPRED
              00005641d5806bd0                        movzxb  (%r13,%rdx,1), %eax
              00005641d5806bd6                        add %rdi, %rax
              00005641d5806bd9                        movzxb  -0x1(%rax), %edx
              00005641d5806bdd                        cmp %rax, %r14
              00005641d5806be0                        jnb 0x5641d58069c0              # MISPRED
              00005641d58069c0                        movzxb  (%r13,%rdx,1), %edi
              00005641d58069c6                        add %rax, %rdi
      
      Fixes: e98df280 ("perf script brstackinsn: Fix recovery from LBR/binary mismatch")
      Reported-by: default avatarAndi Kleen <ak@linux.intel.com>
      Signed-off-by: default avatarAdrian Hunter <adrian.hunter@intel.com>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Link: http://lore.kernel.org/lkml/20191127095631.15663-1-adrian.hunter@intel.comSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      5172672d
    • Adrian Hunter's avatar
      perf script: Fix brstackinsn for AUXTRACE · 0cd032d3
      Adrian Hunter authored
      brstackinsn must be allowed to be set by the user when AUX area data has
      been captured because, in that case, the branch stack might be
      synthesized on the fly. This fixes the following error:
      
      Before:
      
        $ perf record -e '{intel_pt//,cpu/mem_inst_retired.all_loads,aux-sample-size=8192/pp}:u' grep -rqs jhgjhg /boot
        [ perf record: Woken up 19 times to write data ]
        [ perf record: Captured and wrote 2.274 MB perf.data ]
        $ perf script -F +brstackinsn --xed --itrace=i1usl100 | head
        Display of branch stack assembler requested, but non all-branch filter set
        Hint: run 'perf record -b ...'
      
      After:
      
        $ perf record -e '{intel_pt//,cpu/mem_inst_retired.all_loads,aux-sample-size=8192/pp}:u' grep -rqs jhgjhg /boot
        [ perf record: Woken up 19 times to write data ]
        [ perf record: Captured and wrote 2.274 MB perf.data ]
        $ perf script -F +brstackinsn --xed --itrace=i1usl100 | head
                  grep 13759 [002]  8091.310257:       1862                                        instructions:uH:      5641d58069eb bmexec+0x86b (/bin/grep)
              bmexec+2485:
              00005641d5806b35                        jnz 0x5641d5806bd0              # MISPRED
              00005641d5806bd0                        movzxb  (%r13,%rdx,1), %eax
              00005641d5806bd6                        add %rdi, %rax
              00005641d5806bd9                        movzxb  -0x1(%rax), %edx
              00005641d5806bdd                        cmp %rax, %r14
              00005641d5806be0                        jnb 0x5641d58069c0              # MISPRED
              mismatch of LBR data and executable
              00005641d58069c0                        movzxb  (%r13,%rdx,1), %edi
      
      Fixes: 48d02a1d ("perf script: Add 'brstackinsn' for branch stacks")
      Reported-by: default avatarAndi Kleen <ak@linux.intel.com>
      Signed-off-by: default avatarAdrian Hunter <adrian.hunter@intel.com>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Link: http://lore.kernel.org/lkml/20191127095322.15417-1-adrian.hunter@intel.comSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      0cd032d3
    • Andi Kleen's avatar
      perf affinity: Add infrastructure to save/restore affinity · 267ed5d8
      Andi Kleen authored
      The kernel perf subsystem has to IPI to the target CPU for many
      operations. On systems with many CPUs and when managing many events the
      overhead can be dominated by lots of IPIs.
      
      An alternative is to set up CPU affinity in the perf tool, then set up
      all the events for that CPU, and then move on to the next CPU.
      
      Add some affinity management infrastructure to enable such a model.
      Used in followon patches.
      
      Committer notes:
      
      Use zfree() in some places, add missing stdbool.h header, some minor
      coding style changes.
      Signed-off-by: default avatarAndi Kleen <ak@linux.intel.com>
      Acked-by: default avatarJiri Olsa <jolsa@kernel.org>
      Link: http://lore.kernel.org/lkml/20191121001522.180827-3-andi@firstfloor.orgSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      267ed5d8
    • Andi Kleen's avatar
      perf pmu: Use file system cache to optimize sysfs access · d9664582
      Andi Kleen authored
      pmu.c does a lot of redundant /sys accesses while parsing aliases
      and probing for PMUs. On large systems with a lot of PMUs this
      can get expensive (>2s):
      
        % time     seconds  usecs/call     calls    errors syscall
        ------ ----------- ----------- --------- --------- ----------------
         27.25    1.227847           8    160888     16976 openat
         26.42    1.190481           7    164224    164077 stat
      
      Add a cache to remember if specific file names exist or don't
      exist, which eliminates most of this overhead.
      
      Also optimize some stat() calls to be slightly cheaper access()
      
      Resulting in:
      
          0.18    0.004166           2      1851       305 open
          0.08    0.001970           2       829       622 access
      Signed-off-by: default avatarAndi Kleen <ak@linux.intel.com>
      Acked-by: default avatarJiri Olsa <jolsa@kernel.org>
      Link: http://lore.kernel.org/lkml/20191121001522.180827-2-andi@firstfloor.orgSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      d9664582
    • Arnaldo Carvalho de Melo's avatar
      perf regs: Make perf_reg_name() return "unknown" instead of NULL · 5b596e0f
      Arnaldo Carvalho de Melo authored
      To avoid breaking the build on arches where this is not wired up, at
      least all the other features should be made available and when using
      this specific routine, the "unknown" should point the user/developer to
      the need to wire this up on this particular hardware architecture.
      
      Detected in a container mipsel debian cross build environment, where it
      shows up as:
      
        In file included from /usr/mipsel-linux-gnu/include/stdio.h:867,
                         from /git/linux/tools/perf/lib/include/perf/cpumap.h:6,
                         from util/session.c:13:
        In function 'printf',
            inlined from 'regs_dump__printf' at util/session.c:1103:3,
            inlined from 'regs__printf' at util/session.c:1131:2:
        /usr/mipsel-linux-gnu/include/bits/stdio2.h:107:10: error: '%-5s' directive argument is null [-Werror=format-overflow=]
          107 |   return __printf_chk (__USE_FORTIFY_LEVEL - 1, __fmt, __va_arg_pack ());
              |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      
      cross compiler details:
      
        mipsel-linux-gnu-gcc (Debian 9.2.1-8) 9.2.1 20190909
      
      Also on mips64:
      
        In file included from /usr/mips64-linux-gnuabi64/include/stdio.h:867,
                         from /git/linux/tools/perf/lib/include/perf/cpumap.h:6,
                         from util/session.c:13:
        In function 'printf',
            inlined from 'regs_dump__printf' at util/session.c:1103:3,
            inlined from 'regs__printf' at util/session.c:1131:2,
            inlined from 'regs_user__printf' at util/session.c:1139:3,
            inlined from 'dump_sample' at util/session.c:1246:3,
            inlined from 'machines__deliver_event' at util/session.c:1421:3:
        /usr/mips64-linux-gnuabi64/include/bits/stdio2.h:107:10: error: '%-5s' directive argument is null [-Werror=format-overflow=]
          107 |   return __printf_chk (__USE_FORTIFY_LEVEL - 1, __fmt, __va_arg_pack ());
              |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        In function 'printf',
            inlined from 'regs_dump__printf' at util/session.c:1103:3,
            inlined from 'regs__printf' at util/session.c:1131:2,
            inlined from 'regs_intr__printf' at util/session.c:1147:3,
            inlined from 'dump_sample' at util/session.c:1249:3,
            inlined from 'machines__deliver_event' at util/session.c:1421:3:
        /usr/mips64-linux-gnuabi64/include/bits/stdio2.h:107:10: error: '%-5s' directive argument is null [-Werror=format-overflow=]
          107 |   return __printf_chk (__USE_FORTIFY_LEVEL - 1, __fmt, __va_arg_pack ());
              |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      
      cross compiler details:
      
        mips64-linux-gnuabi64-gcc (Debian 9.2.1-8) 9.2.1 20190909
      
      Fixes: 2bcd355b ("perf tools: Add interface to arch registers sets")
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Link: https://lkml.kernel.org/n/tip-95wjyv4o65nuaeweq31t7l1s@git.kernel.orgSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      5b596e0f
    • Arnaldo Carvalho de Melo's avatar
      perf diff: Use llabs() with 64-bit values · 2b1ac640
      Arnaldo Carvalho de Melo authored
      To fix this build error on a debian mipsel cross build environment:
      
        builtin-diff.c: In function 'compute_cycles_diff':
        builtin-diff.c:649:10: error: absolute value function 'labs' given an argument of type 's64' {aka 'long long int'} but has parameter of type 'long int' which may cause truncation of value [-Werror=absolute-value]
          649 |    val = labs(pair->block_info->cycles_spark[i] -
              |          ^~~~
      
      Fixes: cebf7d51 ("perf diff: Report noisy for cycles diff")
      Cc: Jin Yao <yao.jin@linux.intel.com>
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Link: https://lkml.kernel.org/n/tip-pn7szy5uw384ntjgk6zckh6a@git.kernel.orgSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      2b1ac640
    • Arnaldo Carvalho de Melo's avatar
      perf diff: Use llabs() with 64-bit values · 98e93245
      Arnaldo Carvalho de Melo authored
      To fix these build errors on a debian mipsel cross build environment:
      
        builtin-diff.c: In function 'block_cycles_diff_cmp':
        builtin-diff.c:550:6: error: absolute value function 'labs' given an argument of type 's64' {aka 'long long int'} but has parameter of type 'long int' which may cause truncation of value [-Werror=absolute-value]
          550 |  l = labs(left->diff.cycles);
              |      ^~~~
        builtin-diff.c:551:6: error: absolute value function 'labs' given an argument of type 's64' {aka 'long long int'} but has parameter of type 'long int' which may cause truncation of value [-Werror=absolute-value]
          551 |  r = labs(right->diff.cycles);
              |      ^~~~
      
      Fixes: 99150a1f ("perf diff: Use hists to manage basic blocks per symbol")
      Cc: Jin Yao <yao.jin@linux.intel.com>
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Link: https://lkml.kernel.org/n/tip-pn7szy5uw384ntjgk6zckh6a@git.kernel.orgSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      98e93245
  4. 27 Nov, 2019 8 commits
    • Anthony Steinhauser's avatar
      perf/x86: Implement immediate enforcement of /sys/devices/cpu/rdpmc value of 0 · 405b4537
      Anthony Steinhauser authored
      When you successfully write 0 to /sys/devices/cpu/rdpmc, the RDPMC
      instruction should be disabled unconditionally and immediately (after you
      close the SYSFS file) by the documentation.
      
      Instead, in the current implementation the PMU must be reloaded which
      happens only eventually some time in the future. Only after that the RDPMC
      instruction becomes disabled (on ring 3) on the respective core.
      
      This change makes the treatment of the 0 value as blocking and as
      unconditional as the current treatment of the 2 value, only the CR4.PCE
      bit is naturally set to false instead of true.
      Signed-off-by: default avatarAnthony Steinhauser <asteinhauser@google.com>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Cc: Linus Torvalds <torvalds@linux-foundation.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>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Vince Weaver <vincent.weaver@maine.edu>
      Cc: acme@kernel.org
      Link: https://lkml.kernel.org/r/20191125054838.137615-1-asteinhauser@google.comSigned-off-by: default avatarIngo Molnar <mingo@kernel.org>
      405b4537
    • Linus Torvalds's avatar
      Merge tag 'media/v5.5-1' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media · 89d57ddd
      Linus Torvalds authored
      Pull media updates from Mauro Carvalho Chehab:
      
       - uAPI documentation for stateless decoders
      
       - Added a new CEC ioctl together with its documentation
      
       - Improved IPU3 documentation
      
       - New i2c drivers: hi556 and imx290
      
       - Added support on Vivid driver for meta streams
      
       - Added de-interlace support for sunxi subdriver
      
       - Added a few new remote controler keymaps
      
       - Added H.265 support for Sunxi Cedrus driver
      
       - Another round of random driver cleanups, fixes and improvements
      
      * tag 'media/v5.5-1' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media: (361 commits)
        media: Revert "media: mtk-vcodec: Remove extra area allocation in an input buffer on encoding"
        media: hantro: Set H264 FIELDPIC_FLAG_E flag correctly
        media: hantro: Remove now unused H264 pic_size
        media: hantro: Use output buffer width and height for H264 decoding
        media: hantro: Reduce H264 extra space for motion vectors
        media: hantro: Fix H264 motion vector buffer offset
        media: ti-vpe: vpe: fix compatible to match bindings
        media: dt-bindings: media: ti-vpe: Document VPE driver
        media: zr364xx: remove redundant assigmnent to idx, clean up code
        media: Documentation: media: *_DEFAULT targets for subdevs
        media: hantro: Fix s_fmt for dynamic resolution changes
        media: i2c: Use the correct style for SPDX License Identifier
        media: siano: Use the correct style for SPDX License Identifier
        media: vicodec: media_device_cleanup was called too early
        media: vim2m: media_device_cleanup was called too early
        media: cedrus: Increase maximum supported size
        media: cedrus: Fix H264 4k support
        media: cedrus: Properly signal size in mode register
        media: v4l2-ctrl: Lock main_hdl on operations of requests_queued.
        media: si470x-i2c: add missed operations in remove
        ...
      89d57ddd
    • Linus Torvalds's avatar
      Merge tag 'sound-5.5-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound · 3f1b210a
      Linus Torvalds authored
      Pull sound updates from Takashi Iwai:
       "There have been some significant changes in the core side, both for
        ALSA and ASoC, while lots of development have been seen in SOF, as
        well as many small fixes/improvements for ASoC codecs and platforms.
        Below is a highlight in this cycle:
      
        Core:
         - The unification of PCM vmalloc buffer allocation helpers into the
           standard API
         - Clean up of the default PCM mmap handling for vmalloc & SG-buffer
         - Fix potential races at ALSA timer open
         - A few new PCM API extensions; just preliminary core changes, the
           actual changes in drivers will be merged in 5.6
         - Continued ASoC componentization works; now almost everything is a
           common ASoC component object. A lot of refactoring and
           simplification have been done along with it.
      
        ASoC:
         - Many fixes to the Sound Open Firmware (SOF) code
         - Wake on voice support for Chromebooks
         - SPI support and trigger word detection for RT5677
         - New drivers for Analog Devices ADAU7118, Intel Cannonlake systems
           with RT1011 and RT5682, Texas Instruments TAS2562 and TAS2770
      
        HD-audio:
         - Improved Intel DSP configuration / probe code for SOF
         - Plumbing the legacy HD-audio driver with Intel SOF HDMI
         - DP-MST support for Nvidia HDMI codecs
         - Realtek quirks cleanups and new additions as usual
      
        Others:
         - Lots of refactoring and cleanups for FireWire; period-size sharing,
           h/w IRQ interval configuration, clock recovery improvements, etc
         - USB-audio: Scarlett mixer quirks
         - Cleanups of PCM calls in various drivers (including media and USB)
           to adapt the core API changes"
      
      * tag 'sound-5.5-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: (497 commits)
        ALSA: usb-audio: Fix Focusrite Scarlett 6i6 gen1 - input handling
        ALSA: hda/realtek - Enable internal speaker of ASUS UX431FLC
        ALSA: aloop: Fix dependency on timer API
        ASoC: DMI long name - avoid to add board name if matches with product name
        ASoC: improve the DMI long card code in asoc-core
        ASoC: rsnd: fix DALIGN register for SSIU
        ALSA: aloop: Avoid unexpected timer event callback tasklets
        ALSA: aloop: Remove redundant locking in timer open function
        ASoC: component: Add sync_stop PCM ops
        ASoC: pcm: Make ioctl ops optional
        ALSA: hda/hdmi - Clear codec->relaxed_resume flag at unbinding
        ALSA: hda - Disable audio component for legacy Nvidia HDMI codecs
        ALSA: cs4236: fix error return comparison of an unsigned integer
        ALSA: usb-audio: Fix NULL dereference at parsing BADD
        ALSA: usb-audio: Fix Scarlett 6i6 Gen 2 port data
        ALSA: hda/realtek - Enable the headset-mic on a Xiaomi's laptop
        ALSA: hda/realtek - Move some alc236 pintbls to fallback table
        ALSA: hda/realtek - Move some alc256 pintbls to fallback table
        ALSA: docs: Update about the new PCM sync_stop ops
        ALSA: pcm: Add card sync_irq field
        ...
      3f1b210a
    • Linus Torvalds's avatar
      Merge tag 'devprop-5.5-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm · 361b0d28
      Linus Torvalds authored
      Pull device properties framework updates from Rafael Wysocki:
       "Add support for printing fwnode names using a new conversion specifier
        "%pfw" (Sakari Ailus), clean up the software node and
        efi/apple-properties code in preparation for improved software node
        reference properties handling (Dmitry Torokhov) and fix the struct
        fwnode_operations description (Heikki Krogerus)"
      
      * tag 'devprop-5.5-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: (22 commits)
        software node: simplify property_entry_read_string_array()
        software node: unify PROPERTY_ENTRY_XXX macros
        software node: remove property_entry_read_uNN_array functions
        software node: get rid of property_set_pointer()
        software node: clean up property_copy_string_array()
        software node: mark internal macros with double underscores
        efi/apple-properties: use PROPERTY_ENTRY_U8_ARRAY_LEN
        software node: introduce PROPERTY_ENTRY_XXX_ARRAY_LEN()
        software node: remove DEV_PROP_MAX
        device property: Fix the description of struct fwnode_operations
        lib/test_printf: Add tests for %pfw printk modifier
        lib/vsprintf: Add %pfw conversion specifier for printing fwnode names
        lib/vsprintf: OF nodes are first and foremost, struct device_nodes
        lib/vsprintf: Make use of fwnode API to obtain node names and separators
        lib/vsprintf: Add a note on re-using %pf or %pF
        lib/vsprintf: Remove support for %pF and %pf in favour of %pS and %ps
        device property: Add a function to obtain a node's prefix
        device property: Add fwnode_get_name for returning the name of a node
        device property: Add functions for accessing node's parents
        device property: Move fwnode_get_parent() up
        ...
      361b0d28
    • Linus Torvalds's avatar
      Merge tag 'acpi-5.5-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm · 6e9f8796
      Linus Torvalds authored
      Pull ACPI updates from Rafael Wysocki:
       "These update the ACPICA code in the kernel to upstream revision
        20191018, add support for EFI specific purpose memory, update the ACPI
        EC driver to make it work on systems with hardware-reduced ACPI,
        improve ACPI-based device enumeration for some platforms, rework the
        lid blacklist handling in the button driver and add more lid quirks to
        it, unify ACPI _HID/_UID matching, fix assorted issues and clean up
        the code and documentation.
      
        Specifics:
      
         - Update the ACPICA code in the kernel to upstream revision 20191018
           including:
            * Fixes for Clang warnings (Bob Moore)
            * Fix for possible overflow in get_tick_count() (Bob Moore)
            * Introduction of acpi_unload_table() (Bob Moore)
            * Debugger and utilities updates (Erik Schmauss)
            * Fix for unloading tables loaded via configfs (Nikolaus Voss)
      
         - Add support for EFI specific purpose memory to optionally allow
           either application-exclusive or core-kernel-mm managed access to
           differentiated memory (Dan Williams)
      
         - Fix and clean up processing of the HMAT table (Brice Goglin, Qian
           Cai, Tao Xu)
      
         - Update the ACPI EC driver to make it work on systems with
           hardware-reduced ACPI (Daniel Drake)
      
         - Always build in support for the Generic Event Device (GED) to allow
           one kernel binary to work both on systems with full hardware ACPI
           and hardware-reduced ACPI (Arjan van de Ven)
      
         - Fix the table unload mechanism to unregister platform devices
           created when the given table was loaded (Andy Shevchenko)
      
         - Rework the lid blacklist handling in the button driver and add more
           lid quirks to it (Hans de Goede)
      
         - Improve ACPI-based device enumeration for some platforms based on
           Intel BayTrail SoCs (Hans de Goede)
      
         - Add an OpRegion driver for the Cherry Trail Crystal Cove PMIC and
           prevent handlers from being registered for unhandled PMIC OpRegions
           (Hans de Goede)
      
         - Unify ACPI _HID/_UID matching (Andy Shevchenko)
      
         - Clean up documentation and comments (Cao jin, James Pack, Kacper
           Piwiński)"
      
      * tag 'acpi-5.5-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: (52 commits)
        ACPI: OSI: Shoot duplicate word
        ACPI: HMAT: use %u instead of %d to print u32 values
        ACPI: NUMA: HMAT: fix a section mismatch
        ACPI: HMAT: don't mix pxm and nid when setting memory target processor_pxm
        ACPI: NUMA: HMAT: Register "soft reserved" memory as an "hmem" device
        ACPI: NUMA: HMAT: Register HMAT at device_initcall level
        device-dax: Add a driver for "hmem" devices
        dax: Fix alloc_dax_region() compile warning
        lib: Uplevel the pmem "region" ida to a global allocator
        x86/efi: Add efi_fake_mem support for EFI_MEMORY_SP
        arm/efi: EFI soft reservation to memblock
        x86/efi: EFI soft reservation to E820 enumeration
        efi: Common enable/disable infrastructure for EFI soft reservation
        x86/efi: Push EFI_MEMMAP check into leaf routines
        efi: Enumerate EFI_MEMORY_SP
        ACPI: NUMA: Establish a new drivers/acpi/numa/ directory
        ACPICA: Update version to 20191018
        ACPICA: debugger: remove leading whitespaces when converting a string to a buffer
        ACPICA: acpiexec: initialize all simple types and field units from user input
        ACPICA: debugger: add field unit support for acpi_db_get_next_token
        ...
      6e9f8796
    • Linus Torvalds's avatar
      Merge tag 'pm-5.5-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm · 9e7a0323
      Linus Torvalds authored
      Pull power management updates from Rafael Wysocki:
       "These include cpuidle changes to use nanoseconds (instead of
        microseconds) as the unit of time and to simplify checks for disabled
        idle states in the idle loop, some cpuidle fixes and governor updates,
        assorted cpufreq updates (driver updates mostly and a few core fixes
        and cleanups), devfreq updates (dominated by the tegra30 driver
        changes), new CPU IDs for the RAPL power capping driver, relatively
        minor updates of the generic power domains (genpd) and operation
        performance points (OPP) frameworks, and assorted fixes and cleanups.
      
        There are also two maintainer information updates: Chanwoo Choi will
        be maintaining the devfreq subsystem going forward and Todd Brandt is
        going to maintain the pm-graph utility (created by him).
      
        Specifics:
      
         - Use nanoseconds (instead of microseconds) as the unit of time in
           the cpuidle core and simplify checks for disabled idle states in
           the idle loop (Rafael Wysocki)
      
         - Fix and clean up the teo cpuidle governor (Rafael Wysocki)
      
         - Fix the cpuidle registration error code path (Zhenzhong Duan)
      
         - Avoid excessive vmexits in the ACPI cpuidle driver (Yin Fengwei)
      
         - Extend the idle injection infrastructure to be able to measure the
           requested duration in nanoseconds and to allow an exit latency
           limit for idle states to be specified (Daniel Lezcano)
      
         - Fix cpufreq driver registration and clarify a comment in the
           cpufreq core (Viresh Kumar)
      
         - Add NULL checks to the show() and store() methods of sysfs
           attributes exposed by cpufreq (Kai Shen)
      
         - Update cpufreq drivers:
            * Fix for a plain int as pointer warning from sparse in
              intel_pstate (Jamal Shareef)
            * Fix for a hardcoded number of CPUs and stack bloat in the
              powernv driver (John Hubbard)
            * Updates to the ti-cpufreq driver and DT files to support new
              platforms and migrate bindings from opp-v1 to opp-v2 (Adam Ford,
              H. Nikolaus Schaller)
            * Merging of the arm_big_little and vexpress-spc drivers and
              related cleanup (Sudeep Holla)
            * Fix for imx's default speed grade value (Anson Huang)
            * Minor cleanup of the s3c64xx driver (Nathan Chancellor)
            * CPU speed bin detection fix for sun50i (Ondrej Jirman)
      
         - Appoint Chanwoo Choi as the new devfreq maintainer.
      
         - Update the devfreq core:
            * Check NULL governor in available_governors_show sysfs to prevent
              showing wrong governor information and fix a race condition
              between devfreq_update_status() and trans_stat_show() (Leonard
              Crestez)
            * Add new 'interrupt-driven' flag for devfreq governors to allow
              interrupt-driven governors to prevent the devfreq core from
              polling devices for status (Dmitry Osipenko)
            * Improve an error message in devfreq_add_device() (Matthias
              Kaehlcke)
      
         - Update devfreq drivers:
            * tegra30 driver fixes and cleanups (Dmitry Osipenko)
            * Removal of unused property from dt-binding documentation for the
              exynos-bus driver (Kamil Konieczny)
            * exynos-ppmu cleanup and DT bindings update (Lukasz Luba, Marek
              Szyprowski)
      
         - Add new CPU IDs for CometLake Mobile and Desktop to the Intel RAPL
           power capping driver (Zhang Rui)
      
         - Allow device initialization in the generic power domains (genpd)
           framework to be more straightforward and clean it up (Ulf Hansson)
      
         - Add support for adjusting OPP voltages at run time to the OPP
           framework (Stephen Boyd)
      
         - Avoid freeing memory that has never been allocated in the
           hibernation core (Andy Whitcroft)
      
         - Clean up function headers in a header file and coding style in the
           wakeup IRQs handling code (Ulf Hansson, Xiaofei Tan)
      
         - Clean up the SmartReflex adaptive voltage scaling (AVS) driver for
           ARM (Ben Dooks, Geert Uytterhoeven)
      
         - Wrap power management documentation to fit in 80 columns (Bjorn
           Helgaas)
      
         - Add pm-graph utility entry to MAINTAINERS (Todd Brandt)
      
         - Update the cpupower utility:
            * Fix the handling of set and info subcommands (Abhishek Goel)
            * Fix build warnings (Nathan Chancellor)
            * Improve mperf_monitor handling (Janakarajan Natarajan)"
      
      * tag 'pm-5.5-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: (83 commits)
        PM: Wrap documentation to fit in 80 columns
        cpuidle: Pass exit latency limit to cpuidle_use_deepest_state()
        cpuidle: Allow idle injection to apply exit latency limit
        cpuidle: Introduce cpuidle_driver_state_disabled() for driver quirks
        cpuidle: teo: Avoid code duplication in conditionals
        cpufreq: Register drivers only after CPU devices have been registered
        cpuidle: teo: Avoid using "early hits" incorrectly
        cpuidle: teo: Exclude cpuidle overhead from computations
        PM / Domains: Convert to dev_to_genpd_safe() in genpd_syscore_switch()
        mmc: tmio: Avoid boilerplate code in ->runtime_suspend()
        PM / Domains: Implement the ->start() callback for genpd
        PM / Domains: Introduce dev_pm_domain_start()
        ARM: OMAP2+: SmartReflex: add omap_sr_pdata definition
        PM / wakeirq: remove unnecessary parentheses
        power: avs: smartreflex: Remove superfluous cast in debugfs_create_file() call
        cpuidle: Use nanoseconds as the unit of time
        PM / OPP: Support adjusting OPP voltages at runtime
        PM / core: Clean up some function headers in power.h
        cpufreq: Add NULL checks to show() and store() methods of cpufreq
        cpufreq: intel_pstate: Fix plain int as pointer warning from sparse
        ...
      9e7a0323
    • Linus Torvalds's avatar
      Merge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · c2da5bdc
      Linus Torvalds authored
      Pull x86 merge fix from Ingo Molnar:
       "I missed one other semantic conflict that can result in build failures
        on certain stripped down x86 32-bit configs, for example 32-bit
        'allnoconfig' where CONFIG_X86_IOPL_IOPERM gets turned off"
      
      * 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        x86/iopl: Make 'struct tss_struct' constant size again
      c2da5bdc
    • Linus Torvalds's avatar
      Merge branch 'locking-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 168829ad
      Linus Torvalds authored
      Pull locking updates from Ingo Molnar:
       "The main changes in this cycle were:
      
         - A comprehensive rewrite of the robust/PI futex code's exit handling
           to fix various exit races. (Thomas Gleixner et al)
      
         - Rework the generic REFCOUNT_FULL implementation using
           atomic_fetch_* operations so that the performance impact of the
           cmpxchg() loops is mitigated for common refcount operations.
      
           With these performance improvements the generic implementation of
           refcount_t should be good enough for everybody - and this got
           confirmed by performance testing, so remove ARCH_HAS_REFCOUNT and
           REFCOUNT_FULL entirely, leaving the generic implementation enabled
           unconditionally. (Will Deacon)
      
         - Other misc changes, fixes, cleanups"
      
      * 'locking-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (27 commits)
        lkdtm: Remove references to CONFIG_REFCOUNT_FULL
        locking/refcount: Remove unused 'refcount_error_report()' function
        locking/refcount: Consolidate implementations of refcount_t
        locking/refcount: Consolidate REFCOUNT_{MAX,SATURATED} definitions
        locking/refcount: Move saturation warnings out of line
        locking/refcount: Improve performance of generic REFCOUNT_FULL code
        locking/refcount: Move the bulk of the REFCOUNT_FULL implementation into the <linux/refcount.h> header
        locking/refcount: Remove unused refcount_*_checked() variants
        locking/refcount: Ensure integer operands are treated as signed
        locking/refcount: Define constants for saturation and max refcount values
        futex: Prevent exit livelock
        futex: Provide distinct return value when owner is exiting
        futex: Add mutex around futex exit
        futex: Provide state handling for exec() as well
        futex: Sanitize exit state handling
        futex: Mark the begin of futex exit explicitly
        futex: Set task::futex_state to DEAD right after handling futex exit
        futex: Split futex_mm_release() for exit/exec
        exit/exec: Seperate mm_release()
        futex: Replace PF_EXITPIDONE with a state
        ...
      168829ad
  5. 26 Nov, 2019 6 commits
    • Linus Torvalds's avatar
      Merge branch 'core-rcu-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 1ae78780
      Linus Torvalds authored
      Pull RCU updates from Ingo Molnar:
       "The main changes in this cycle were:
      
         - Dynamic tick (nohz) updates, perhaps most notably changes to force
           the tick on when needed due to lengthy in-kernel execution on CPUs
           on which RCU is waiting.
      
         - Linux-kernel memory consistency model updates.
      
         - Replace rcu_swap_protected() with rcu_prepace_pointer().
      
         - Torture-test updates.
      
         - Documentation updates.
      
         - Miscellaneous fixes"
      
      * 'core-rcu-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (51 commits)
        security/safesetid: Replace rcu_swap_protected() with rcu_replace_pointer()
        net/sched: Replace rcu_swap_protected() with rcu_replace_pointer()
        net/netfilter: Replace rcu_swap_protected() with rcu_replace_pointer()
        net/core: Replace rcu_swap_protected() with rcu_replace_pointer()
        bpf/cgroup: Replace rcu_swap_protected() with rcu_replace_pointer()
        fs/afs: Replace rcu_swap_protected() with rcu_replace_pointer()
        drivers/scsi: Replace rcu_swap_protected() with rcu_replace_pointer()
        drm/i915: Replace rcu_swap_protected() with rcu_replace_pointer()
        x86/kvm/pmu: Replace rcu_swap_protected() with rcu_replace_pointer()
        rcu: Upgrade rcu_swap_protected() to rcu_replace_pointer()
        rcu: Suppress levelspread uninitialized messages
        rcu: Fix uninitialized variable in nocb_gp_wait()
        rcu: Update descriptions for rcu_future_grace_period tracepoint
        rcu: Update descriptions for rcu_nocb_wake tracepoint
        rcu: Remove obsolete descriptions for rcu_barrier tracepoint
        rcu: Ensure that ->rcu_urgent_qs is set before resched IPI
        workqueue: Convert for_each_wq to use built-in list check
        rcu: Several rcu_segcblist functions can be static
        rcu: Remove unused function hlist_bl_del_init_rcu()
        Documentation: Rename rcu_node_context_switch() to rcu_note_context_switch()
        ...
      1ae78780
    • Linus Torvalds's avatar
      Merge branch 'sched-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 77a05940
      Linus Torvalds authored
      Pull scheduler updates from Ingo Molnar:
       "The biggest changes in this cycle were:
      
         - Make kcpustat vtime aware (Frederic Weisbecker)
      
         - Rework the CFS load_balance() logic (Vincent Guittot)
      
         - Misc cleanups, smaller enhancements, fixes.
      
        The load-balancing rework is the most intrusive change: it replaces
        the old heuristics that have become less meaningful after the
        introduction of the PELT metrics, with a grounds-up load-balancing
        algorithm.
      
        As such it's not really an iterative series, but replaces the old
        load-balancing logic with the new one. We hope there are no
        performance regressions left - but statistically it's highly probable
        that there *is* going to be some workload that is hurting from these
        chnages. If so then we'd prefer to have a look at that workload and
        fix its scheduling, instead of reverting the changes"
      
      * 'sched-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (46 commits)
        rackmeter: Use vtime aware kcpustat accessor
        leds: Use all-in-one vtime aware kcpustat accessor
        cpufreq: Use vtime aware kcpustat accessors for user time
        procfs: Use all-in-one vtime aware kcpustat accessor
        sched/vtime: Bring up complete kcpustat accessor
        sched/cputime: Support other fields on kcpustat_field()
        sched/cpufreq: Move the cfs_rq_util_change() call to cpufreq_update_util()
        sched/fair: Add comments for group_type and balancing at SD_NUMA level
        sched/fair: Fix rework of find_idlest_group()
        sched/uclamp: Fix overzealous type replacement
        sched/Kconfig: Fix spelling mistake in user-visible help text
        sched/core: Further clarify sched_class::set_next_task()
        sched/fair: Use mul_u32_u32()
        sched/core: Simplify sched_class::pick_next_task()
        sched/core: Optimize pick_next_task()
        sched/core: Make pick_next_task_idle() more consistent
        sched/fair: Better document newidle_balance()
        leds: Use vtime aware kcpustat accessor to fetch CPUTIME_SYSTEM
        cpufreq: Use vtime aware kcpustat accessor to fetch CPUTIME_SYSTEM
        procfs: Use vtime aware kcpustat accessor to fetch CPUTIME_SYSTEM
        ...
      77a05940
    • Linus Torvalds's avatar
      Merge branch 'perf-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 3f59dbca
      Linus Torvalds authored
      Pull perf updates from Ingo Molnar:
       "The main kernel side changes in this cycle were:
      
         - Various Intel-PT updates and optimizations (Alexander Shishkin)
      
         - Prohibit kprobes on Xen/KVM emulate prefixes (Masami Hiramatsu)
      
         - Add support for LSM and SELinux checks to control access to the
           perf syscall (Joel Fernandes)
      
         - Misc other changes, optimizations, fixes and cleanups - see the
           shortlog for details.
      
        There were numerous tooling changes as well - 254 non-merge commits.
        Here are the main changes - too many to list in detail:
      
         - Enhancements to core tooling infrastructure, perf.data, libperf,
           libtraceevent, event parsing, vendor events, Intel PT, callchains,
           BPF support and instruction decoding.
      
         - There were updates to the following tools:
      
              perf annotate
              perf diff
              perf inject
              perf kvm
              perf list
              perf maps
              perf parse
              perf probe
              perf record
              perf report
              perf script
              perf stat
              perf test
              perf trace
      
         - And a lot of other changes: please see the shortlog and Git log for
           more details"
      
      * 'perf-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (279 commits)
        perf parse: Fix potential memory leak when handling tracepoint errors
        perf probe: Fix spelling mistake "addrees" -> "address"
        libtraceevent: Fix memory leakage in copy_filter_type
        libtraceevent: Fix header installation
        perf intel-bts: Does not support AUX area sampling
        perf intel-pt: Add support for decoding AUX area samples
        perf intel-pt: Add support for recording AUX area samples
        perf pmu: When using default config, record which bits of config were changed by the user
        perf auxtrace: Add support for queuing AUX area samples
        perf session: Add facility to peek at all events
        perf auxtrace: Add support for dumping AUX area samples
        perf inject: Cut AUX area samples
        perf record: Add aux-sample-size config term
        perf record: Add support for AUX area sampling
        perf auxtrace: Add support for AUX area sample recording
        perf auxtrace: Move perf_evsel__find_pmu()
        perf record: Add a function to test for kernel support for AUX area sampling
        perf tools: Add kernel AUX area sampling definitions
        perf/core: Make the mlock accounting simple again
        perf report: Jump to symbol source view from total cycles view
        ...
      3f59dbca
    • Linus Torvalds's avatar
      Merge branch 'efi-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · df28204b
      Linus Torvalds authored
      Pull EFI updates from Ingo Molnar:
       "The main changes in this cycle were:
      
         - Wire up the EFI RNG code for x86. This enables an additional source
           of entropy during early boot.
      
         - Enable the TPM event log code on ARM platforms.
      
         - Update Ard's email address"
      
      * 'efi-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        efi: libstub/tpm: enable tpm eventlog function for ARM platforms
        x86: efi/random: Invoke EFI_RNG_PROTOCOL to seed the UEFI RNG table
        efi/random: use arch-independent efi_call_proto()
        MAINTAINERS: update Ard's email address to @kernel.org
      df28204b
    • Linus Torvalds's avatar
      Merge branch 'core-stacktrace-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 3f612813
      Linus Torvalds authored
      Pull stacktrace cleanup from Ingo Molnar:
       "A minor cleanup"
      
      * 'core-stacktrace-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        stacktrace: Get rid of unneeded '!!' pattern
      3f612813
    • Ingo Molnar's avatar
      x86/iopl: Make 'struct tss_struct' constant size again · 0bcd7762
      Ingo Molnar authored
      After the following commit:
      
        05b042a1: ("x86/pti/32: Calculate the various PTI cpu_entry_area sizes correctly, make the CPU_ENTRY_AREA_PAGES assert precise")
      
      'struct cpu_entry_area' has to be Kconfig invariant, so that we always
      have a matching CPU_ENTRY_AREA_PAGES size.
      
      This commit added a CONFIG_X86_IOPL_IOPERM dependency to tss_struct:
      
        111e7b15: ("x86/ioperm: Extend IOPL config to control ioperm() as well")
      
      Which, if CONFIG_X86_IOPL_IOPERM is turned off, reduces the size of
      cpu_entry_area by two pages, triggering the assert:
      
        ./include/linux/compiler.h:391:38: error: call to ‘__compiletime_assert_202’ declared with attribute error: BUILD_BUG_ON failed: (CPU_ENTRY_AREA_PAGES+1)*PAGE_SIZE != CPU_ENTRY_AREA_MAP_SIZE
      
      Simplify the Kconfig dependencies and make cpu_entry_area constant
      size on 32-bit kernels again.
      
      Fixes: 05b042a1: ("x86/pti/32: Calculate the various PTI cpu_entry_area sizes correctly, make the CPU_ENTRY_AREA_PAGES assert precise")
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Borislav Petkov <bp@alien8.de>
      Cc: Peter Zijlstra (Intel) <peterz@infradead.org>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Andy Lutomirski <luto@kernel.org>
      Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
      0bcd7762