1. 14 Aug, 2020 11 commits
  2. 13 Aug, 2020 10 commits
    • Alexander Gordeev's avatar
      perf bench numa: Use numa_node_to_cpus() to bind tasks to nodes · 2db13a9b
      Alexander Gordeev authored
      It is currently assumed that each node contains at most nr_cpus/nr_nodes
      CPUs and nodes' CPU ranges do not overlap.
      
      That assumption is generally incorrect as there are archs where a CPU
      number does not depend on to its node number.
      
      This update removes the described assumption by simply calling
      numa_node_to_cpus() interface and using the returned mask for binding
      CPUs to nodes.
      
      Also, variable types and names made consistent in functions using
      cpumask.
      Signed-off-by: default avatarAlexander Gordeev <agordeev@linux.ibm.com>
      Reviewed-by: default avatarSrikar Dronamraju <srikar@linux.vnet.ibm.com>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Balamuruhan S <bala24@linux.vnet.ibm.com>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Naveen N. Rao <naveen.n.rao@linux.vnet.ibm.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Satheesh Rajendran <sathnaga@linux.vnet.ibm.com>
      Link: http://lore.kernel.org/lkml/20200813113247.GA2014@oc3871087118.ibm.comSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      2db13a9b
    • Alexander Gordeev's avatar
      perf bench numa: Fix cpumask memory leak in node_has_cpus() · 509f68e3
      Alexander Gordeev authored
      Couple numa_allocate_cpumask() and numa_free_cpumask() functions
      Signed-off-by: default avatarAlexander Gordeev <agordeev@linux.ibm.com>
      Reviewed-by: default avatarSrikar Dronamraju <srikar@linux.vnet.ibm.com>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Balamuruhan S <bala24@linux.vnet.ibm.com>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Naveen N. Rao <naveen.n.rao@linux.vnet.ibm.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Satheesh Rajendran <sathnaga@linux.vnet.ibm.com>
      Link: http://lore.kernel.org/lkml/20200813113041.GA1685@oc3871087118.ibm.comSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      509f68e3
    • Daniel Díaz's avatar
      tools build feature: Quote CC and CXX for their arguments · fa5c8931
      Daniel Díaz authored
      When using a cross-compilation environment, such as OpenEmbedded,
      the CC an CXX variables are set to something more than just a
      command: there are arguments (such as --sysroot) that need to be
      passed on to the compiler so that the right set of headers and
      libraries are used.
      
      For the particular case that our systems detected, CC is set to
      the following:
      
        export CC="aarch64-linaro-linux-gcc  --sysroot=/oe/build/tmp/work/machine/perf/1.0-r9/recipe-sysroot"
      
      Without quotes, detection is as follows:
      
        Auto-detecting system features:
        ...                         dwarf: [ OFF ]
        ...            dwarf_getlocations: [ OFF ]
        ...                         glibc: [ OFF ]
        ...                          gtk2: [ OFF ]
        ...                        libbfd: [ OFF ]
        ...                        libcap: [ OFF ]
        ...                        libelf: [ OFF ]
        ...                       libnuma: [ OFF ]
        ...        numa_num_possible_cpus: [ OFF ]
        ...                       libperl: [ OFF ]
        ...                     libpython: [ OFF ]
        ...                     libcrypto: [ OFF ]
        ...                     libunwind: [ OFF ]
        ...            libdw-dwarf-unwind: [ OFF ]
        ...                          zlib: [ OFF ]
        ...                          lzma: [ OFF ]
        ...                     get_cpuid: [ OFF ]
        ...                           bpf: [ OFF ]
        ...                        libaio: [ OFF ]
        ...                       libzstd: [ OFF ]
        ...        disassembler-four-args: [ OFF ]
      
        Makefile.config:414: *** No gnu/libc-version.h found, please install glibc-dev[el].  Stop.
        Makefile.perf:230: recipe for target 'sub-make' failed
        make[1]: *** [sub-make] Error 2
        Makefile:69: recipe for target 'all' failed
        make: *** [all] Error 2
      
      With CC and CXX quoted, some of those features are now detected.
      
      Fixes: e3232c2f ("tools build feature: Use CC and CXX from parent")
      Signed-off-by: default avatarDaniel Díaz <daniel.diaz@linaro.org>
      Reviewed-by: default avatarThomas Hebb <tommyhebb@gmail.com>
      Cc: Alexei Starovoitov <ast@kernel.org>
      Cc: Andrii Nakryiko <andriin@fb.com>
      Cc: Daniel Borkmann <daniel@iogearbox.net>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: John Fastabend <john.fastabend@gmail.com>
      Cc: KP Singh <kpsingh@chromium.org>
      Cc: Martin KaFai Lau <kafai@fb.com>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Song Liu <songliubraving@fb.com>
      Cc: Stephane Eranian <eranian@google.com>
      Cc: Yonghong Song <yhs@fb.com>
      Link: http://lore.kernel.org/lkml/20200812221518.2869003-1-daniel.diaz@linaro.orgSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      fa5c8931
    • Jiri Olsa's avatar
      perf tools: Fix module symbol processing · b2fe96a3
      Jiri Olsa authored
      The 'dso->kernel' condition is true also for kernel modules now,
      and there are several places that were omited by the initial change:
      
        - we need to identify modules separately in dso__process_kernel_symbol
        - we need to set 'dso->kernel' for module from buildid table
        - there's no need to use 'dso->kernel || kmodule' in one condition
      
      Committer testing:
      
      Before:
      
        # perf test -v object
        <SNIP>
        Objdump command is: objdump -z -d --start-address=0xffffffff813e682f --stop-address=0xffffffff813e68af /usr/lib/debug/lib/modules/5.7.14-200.fc32.x86_64/vmlinux
        Bytes read match those read by objdump
        Reading object code for memory address: 0xffffffffc02dc257
        File is: /lib/modules/5.7.14-200.fc32.x86_64/kernel/arch/x86/crypto/crc32c-intel.ko.xz
        On file address is: 0xffffffffc02dc2e7
        dso__data_read_offset failed
        test child finished with -1
        ---- end ----
        Object code reading: FAILED!
        #
      
      After:
      
        # perf test object
        26: Object code reading                                   : Ok
        # perf test object
        26: Object code reading                                   : Ok
        # perf test object
        26: Object code reading                                   : Ok
        # perf test object
        26: Object code reading                                   : Ok
        # perf test object
        26: Object code reading                                   : Ok
        #
      
      Fixes: 02213cec ("perf maps: Mark module DSOs with kernel type")
      Reported-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      Tested-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Signed-off-by: default avatarJiri Olsa <jolsa@kernel.org>
      b2fe96a3
    • Jiri Olsa's avatar
      perf tools: Rename 'enum dso_kernel_type' to 'enum dso_space_type' · 1c695c88
      Jiri Olsa authored
      Rename enum dso_kernel_type to enum dso_space_type, which seems like
      better fit.
      
      Committer notes:
      
      This is used with 'struct dso'->kernel, which once was a boolean, so
      DSO_SPACE__USER is zero, !zero means some sort of kernel space, be it
      the host kernel space or a guest kernel space.
      Signed-off-by: default avatarJiri Olsa <jolsa@kernel.org>
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      1c695c88
    • Rob Herring's avatar
      MAINTAINERS: Add missing tools/lib/perf/ path to perf maintainers · ceafdd66
      Rob Herring authored
      Commit 3ce311af ("libperf: Move to tools/lib/perf") moved libperf
      out of tools/perf/, but failed to update MAINTAINERS.
      Signed-off-by: default avatarRob Herring <robh@kernel.org>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Link: http://lore.kernel.org/lkml/20200807193225.3904108-1-robh@kernel.orgSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      ceafdd66
    • Rob Herring's avatar
      libperf: Fix man page typos · ce746d43
      Rob Herring authored
      Fix various typos and inconsistent capitalization of CPU in the libperf
      man pages.
      Signed-off-by: default avatarRob Herring <robh@kernel.org>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Link: http://lore.kernel.org/lkml/20200807193241.3904545-1-robh@kernel.orgSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      ce746d43
    • Michael Petlan's avatar
      perf test: Allow multiple probes in record+script_probe_vfs_getname.sh · 194cb6b5
      Michael Petlan authored
      Sometimes when adding a kprobe by perf, it results in multiple probe
      points, such as the following:
      
        # ./perf probe -l
          probe:vfs_getname    (on getname_flags:73@fs/namei.c with pathname)
          probe:vfs_getname_1  (on getname_flags:73@fs/namei.c with pathname)
          probe:vfs_getname_2  (on getname_flags:73@fs/namei.c with pathname)
        # cat /sys/kernel/debug/tracing/kprobe_events
        p:probe/vfs_getname _text+5501804 pathname=+0(+0(%gpr31)):string
        p:probe/vfs_getname_1 _text+5505388 pathname=+0(+0(%gpr31)):string
        p:probe/vfs_getname_2 _text+5508396 pathname=+0(+0(%gpr31)):string
      
      In this test, we need to record all of them and expect any of them in
      the perf-script output, since it's not clear which one will be used for
      the desired syscall:
      
        # perf stat -e probe:vfs_getname\* -- touch /tmp/nic
      
         Performance counter stats for 'touch /tmp/nic':
      
                      31      probe:vfs_getname_2
                       0      probe:vfs_getname_1
                       1      probe:vfs_getname
             0.001421826 seconds time elapsed
      
             0.001506000 seconds user
             0.000000000 seconds sys
      
      If the test relies only on probe:vfs_getname, it might easily miss the
      relevant data.
      Signed-off-by: default avatarMichael Petlan <mpetlan@redhat.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      LPU-Reference: 20200722135845.29958-1-mpetlan@redhat.com
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      194cb6b5
    • Vincent Whitchurch's avatar
      perf bench mem: Always memset source before memcpy · 1beaef29
      Vincent Whitchurch authored
      For memcpy, the source pages are memset to zero only when --cycles is
      used.  This leads to wildly different results with or without --cycles,
      since all sources pages are likely to be mapped to the same zero page
      without explicit writes.
      
      Before this fix:
      
      $ export cmd="./perf stat -e LLC-loads -- ./perf bench \
        mem memcpy -s 1024MB -l 100 -f default"
      $ $cmd
      
               2,935,826      LLC-loads
             3.821677452 seconds time elapsed
      
      $ $cmd --cycles
      
             217,533,436      LLC-loads
             8.616725985 seconds time elapsed
      
      After this fix:
      
      $ $cmd
      
             214,459,686      LLC-loads
             8.674301124 seconds time elapsed
      
      $ $cmd --cycles
      
             214,758,651      LLC-loads
             8.644480006 seconds time elapsed
      
      Fixes: 47b5757b ("perf bench mem: Move boilerplate memory allocation to the infrastructure")
      Signed-off-by: default avatarVincent Whitchurch <vincent.whitchurch@axis.com>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: kernel@axis.com
      Link: http://lore.kernel.org/lkml/20200810133404.30829-1-vincent.whitchurch@axis.comSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      1beaef29
    • David Ahern's avatar
      perf sched: Prefer sched_waking event when it exists · d566a9c2
      David Ahern authored
      Commit fbd705a0 ("sched: Introduce the 'trace_sched_waking'
      tracepoint") added sched_waking tracepoint which should be preferred
      over sched_wakeup when analyzing scheduling delays.
      
      Update 'perf sched record' to collect sched_waking events if it exists
      and fallback to sched_wakeup if it does not. Similarly, update timehist
      command to skip sched_wakeup events if the session includes sched_waking
      (ie., sched_waking is preferred over sched_wakeup).
      Signed-off-by: default avatarDavid Ahern <dsahern@kernel.org>
      Acked-by: default avatarNamhyung Kim <namhyung@kernel.org>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Link: http://lore.kernel.org/lkml/20200807164844.44870-1-dsahern@kernel.orgSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      d566a9c2
  3. 12 Aug, 2020 11 commits
    • Colin Ian King's avatar
      perf bench: Fix a couple of spelling mistakes in options text · f9f95068
      Colin Ian King authored
      There are a couple of spelling mistakes in the text. Fix these.
      Signed-off-by: default avatarColin King <colin.king@canonical.com>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: kernel-janitors@vger.kernel.org
      Link: http://lore.kernel.org/lkml/20200812064647.200132-1-colin.king@canonical.comSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      f9f95068
    • Alexander Gordeev's avatar
      perf bench numa: Fix benchmark names · 85372c69
      Alexander Gordeev authored
      Standard benchmark names let users know the tests specifics.  For
      example "2x1-bw-process" name tells that two processes one thread each
      are run and the RAM bandwidth is measured.
      
      Several benchmarks names do not correspond to their actual running
      configuration. Fix that and also some whitespace and comment
      inconsistencies.
      Signed-off-by: default avatarAlexander Gordeev <agordeev@linux.ibm.com>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Link: http://lore.kernel.org/lkml/6b6f2084f132ee8e9203dc7c32f9deb209b87a68.1597004831.git.agordeev@linux.ibm.comSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      85372c69
    • Alexander Gordeev's avatar
      perf bench numa: Fix number of processes in "2x3-convergence" test · 72d69c2a
      Alexander Gordeev authored
      Signed-off-by: default avatarAlexander Gordeev <agordeev@linux.ibm.com>
      Acked-by: default avatarNamhyung Kim <namhyung@kernel.org>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Link: http://lore.kernel.org/lkml/d949f5f48e17fc816f3beecf8479f1b2480345e4.1597004831.git.agordeev@linux.ibm.comSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      72d69c2a
    • Arnaldo Carvalho de Melo's avatar
      tools headers UAPI: Sync kvm.h headers with the kernel sources · 6016e034
      Arnaldo Carvalho de Melo authored
      To pick the changes in:
      
        3edd6839 ("KVM: x86: Add a capability for GUEST_MAXPHYADDR < HOST_MAXPHYADDR support")
        1aa561b1 ("kvm: x86: Add "last CPU" to some KVM_EXIT information")
        23a60f83 ("s390/kvm: diagnose 0x318 sync and reset")
      
      That do not result in any change in tooling, as the additions are not
      being used in any table generator.
      
      This silences these 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: Christian Borntraeger <borntraeger@de.ibm.com>
      Cc: Collin Walling <walling@linux.ibm.com>
      Cc: Jim Mattson <jmattson@google.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Mohammed Gamal <mgamal@redhat.com>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Paolo Bonzini <pbonzini@redhat.com>
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      6016e034
    • Arnaldo Carvalho de Melo's avatar
      tools include UAPI: Sync linux/vhost.h with the kernel sources · fe452fb8
      Arnaldo Carvalho de Melo authored
      To get the changes in:
      
        25abc060 ("vhost-vdpa: support IOTLB batching hints")
      
      This doesn't result in any changes in tooling, no new ioctls to be
      picked up by the id->string table generators, etc.
      
      Silencing this perf build warning:
      
        Warning: Kernel ABI header at 'tools/include/uapi/linux/vhost.h' differs from latest version at 'include/uapi/linux/vhost.h'
        diff -u tools/include/uapi/linux/vhost.h include/uapi/linux/vhost.h
      
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      Cc: Jason Wang <jasowang@redhat.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Michael S. Tsirkin <mst@redhat.com>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      fe452fb8
    • Arnaldo Carvalho de Melo's avatar
      tools headers kvm s390: Sync headers with the kernel sources · 23db762b
      Arnaldo Carvalho de Melo authored
      To pick the changes in:
      
        23a60f83 ("s390/kvm: diagnose 0x318 sync and reset")
      
      None of them trigger any changes in tooling, this time this is just to silence
      these perf build warnings:
      
        Warning: Kernel ABI header at 'tools/arch/s390/include/uapi/asm/kvm.h' differs from latest version at 'arch/s390/include/uapi/asm/kvm.h'
        diff -u tools/arch/s390/include/uapi/asm/kvm.h arch/s390/include/uapi/asm/kvm.h
      
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      Cc: Christian Borntraeger <borntraeger@de.ibm.com>
      Cc: Collin Walling <walling@linux.ibm.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      23db762b
    • Arnaldo Carvalho de Melo's avatar
      perf trace beauty: Use the autogenerated protocol family table · f3cf7fa9
      Arnaldo Carvalho de Melo authored
      That helps us not to lose new protocol families when they are
      introduced, replacing that hardcoded, dated family->string table.
      
      To recap what this allows us to do:
      
        # perf trace -e syscalls:sys_enter_socket/max-stack=10/ --filter=family==INET --max-events=1
           0.000 fetchmail/41097 syscalls:sys_enter_socket(family: INET, type: DGRAM|CLOEXEC|NONBLOCK, protocol: IP)
                                             __GI___socket (inlined)
                                             reopen (/usr/lib64/libresolv-2.31.so)
                                             send_dg (/usr/lib64/libresolv-2.31.so)
                                             __res_context_send (/usr/lib64/libresolv-2.31.so)
                                             __GI___res_context_query (inlined)
                                             __GI___res_context_search (inlined)
                                             _nss_dns_gethostbyname4_r (/usr/lib64/libnss_dns-2.31.so)
                                             gaih_inet.constprop.0 (/usr/lib64/libc-2.31.so)
                                             __GI_getaddrinfo (inlined)
                                             [0x15cb2] (/usr/bin/fetchmail)
        #
      
      More work is still needed to allow for the more natura strace-like
      syscall name usage instead of the trace event name:
      
        # perf trace -e socket/max-stack=10,family==INET/ --max-events=1
      
      I.e. to allow for modifiers to follow the syscall name and for logical
      expressions to be accepted as filters to use with that syscall, be it as
      trace event filters or BPF based ones.
      
      Using -v we can see how the trace event filter is built:
      
        # perf trace -v -e syscalls:sys_enter_socket/call-graph=dwarf/ --filter=family==INET --max-events=2
        <SNIP>
        New filter for syscalls:sys_enter_socket: (family==0x2) && (common_pid != 41384 && common_pid != 2836)
        <SNIP>
      
        $ tools/perf/trace/beauty/socket.sh | grep -w 2
      	[2] = "INET",
        $
      
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Steven Rostedt <rostedt@goodmis.org>
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      f3cf7fa9
    • Arnaldo Carvalho de Melo's avatar
      perf trace beauty: Add script to autogenerate socket families table · 58277f50
      Arnaldo Carvalho de Melo authored
      To use with 'perf trace', to convert the protocol families to strings,
      e.g:
      
        $ tools/perf/trace/beauty/socket.sh
        static const char *socket_families[] = {
        	[0] = "UNSPEC",
        	[1] = "LOCAL",
        	[2] = "INET",
        	[3] = "AX25",
        	[4] = "IPX",
        	[5] = "APPLETALK",
        	[6] = "NETROM",
        	[7] = "BRIDGE",
        	[8] = "ATMPVC",
        	[9] = "X25",
        	[10] = "INET6",
        	[11] = "ROSE",
        	[12] = "DECnet",
        	[13] = "NETBEUI",
        	[14] = "SECURITY",
        	[15] = "KEY",
        	[16] = "NETLINK",
        	[17] = "PACKET",
        	[18] = "ASH",
        	[19] = "ECONET",
        	[20] = "ATMSVC",
        	[21] = "RDS",
        	[22] = "SNA",
        	[23] = "IRDA",
        	[24] = "PPPOX",
        	[25] = "WANPIPE",
        	[26] = "LLC",
        	[27] = "IB",
        	[28] = "MPLS",
        	[29] = "CAN",
        	[30] = "TIPC",
        	[31] = "BLUETOOTH",
        	[32] = "IUCV",
        	[33] = "RXRPC",
        	[34] = "ISDN",
        	[35] = "PHONET",
        	[36] = "IEEE802154",
        	[37] = "CAIF",
        	[38] = "ALG",
        	[39] = "NFC",
        	[40] = "VSOCK",
        	[41] = "KCM",
        	[42] = "QIPCRTR",
        	[43] = "SMC",
        	[44] = "XDP",
        };
        $
      
      This uses a copy of include/linux/socket.h that is kept in a directory
      to be used just for these table generation scripts and for checking if
      the kernel has a new file that maybe gets something new for these
      tables.
      
      This allows us to:
      
      - Avoid accessing files outside tools/, in the kernel sources, that may
        be changed in unexpected ways and thus break these scripts.
      
      - Notice when those files change and thus check if the changes don't
        break those scripts, update them to automatically get the new
        definitions, a new socket family, for instance.
      
      - Not add then to the tools/include/ where it may end up used while
        building the tools and end up requiring dragging yet more stuff from
        the kernel or plain break the build in some of the myriad environments
        where perf may be built.
      
      This will replace the previous static array in tools/perf/ that was
      dated and was already missing the AF_KCM, AF_QIPCRTR, AF_SMC and AF_XDP
      families.
      
      The next cset will wire this up to the perf build process.
      
      At some point this must be made into a library to be used in places such
      as libtraceevent, bpftrace, etc.
      
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Steven Rostedt <rostedt@goodmis.org>
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      58277f50
    • Linus Torvalds's avatar
      Merge tag 'tag-chrome-platform-for-v5.9' of... · fb893de3
      Linus Torvalds authored
      Merge tag 'tag-chrome-platform-for-v5.9' of git://git.kernel.org/pub/scm/linux/kernel/git/chrome-platform/linux
      
      Pull chrome platform updates from Benson Leung:
       "cros_ec_typec:
      
         - Add support for switch control and alternate modes to the Chrome EC
           Type C port driver
      
         - Add basic suspend/resume support
      
        sensorhub:
      
         - Fix timestamp overflow issue
      
         - Fix legacy timestamp spreading on Nami systems
      
        cros_ec_proto:
      
         - After removing all users of, stop exporting cros_ec_cmd_xfer
      
         - Check for missing EC_CMD_HOST_EVENT_GET_WAKE_MASK and ignore
           wakeups on old ECs
      
        misc:
      
         - Documentation warning cleanup
      
         - Fix double unlock issue in ishtp"
      
      * tag 'tag-chrome-platform-for-v5.9' of git://git.kernel.org/pub/scm/linux/kernel/git/chrome-platform/linux: (21 commits)
        platform/chrome: cros_ec_proto: check for missing EC_CMD_HOST_EVENT_GET_WAKE_MASK
        platform/chrome: cros_ec_proto: ignore unnecessary wakeups on old ECs
        platform/chrome: cros_ec_sensorhub: Simplify legacy timestamp spreading
        platform/chrome: cros_ec_proto: Do not export cros_ec_cmd_xfer()
        platform/chrome: cros_ec_typec: Unregister partner on error
        platform/chrome: cros_ec_sensorhub: Fix EC timestamp overflow
        platform/chrome: cros_ec_typec: Add PM support
        platform/chrome: cros_ec_typec: Use workqueue for port update
        platform/chrome: cros_ec_typec: Add a dependency on USB_ROLE_SWITCH
        platform/chrome: cros_ec_ishtp: Fix a double-unlock issue
        platform/chrome: cros_ec_rpmsg: Document missing struct parameters
        platform/chrome: cros_ec_spi: Document missing function parameters
        platform/chrome: cros_ec_typec: Add TBT compat support
        platform/chrome: cros_ec: Add TBT pd_ctrl fields
        platform/chrome: cros_ec_typec: Make configure_mux static
        platform/chrome: cros_ec_typec: Support DP alt mode
        platform/chrome: cros_ec_typec: Add USB mux control
        platform/chrome: cros_ec_typec: Register PD CTRL cmd v2
        platform/chrome: cros_ec: Update mux state bits
        platform/chrome: cros_ec_typec: Register Type C switches
        ...
      fb893de3
    • Linus Torvalds's avatar
      Merge tag 'for-linus-5.9-ofs1' of git://git.kernel.org/pub/scm/linux/kernel/git/hubcap/linux · d668e848
      Linus Torvalds authored
      Pull orangefs updates from Mike Marshall:
       "A fix and a cleanup...
      
        The fix: Al Viro pointed out that I had broken some acl functionality
        with one of my previous patches.
      
        And the cleanup: Jing Xiangfeng found and removed a needless variable
        assignment"
      
      * tag 'for-linus-5.9-ofs1' of git://git.kernel.org/pub/scm/linux/kernel/git/hubcap/linux:
        orangefs: remove unnecessary assignment to variable ret
        orangefs: posix acl fix...
      d668e848
    • Linus Torvalds's avatar
      Merge tag 'zonefs-5.9-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/dlemoal/zonefs · 57d528bf
      Linus Torvalds authored
      Pull zonefs update from Damien Le Moal:
       "A single change for this cycle adding support for zone capacities
        smaller than the zone size, from Johannes"
      
      * tag 'zonefs-5.9-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/dlemoal/zonefs:
        zonefs: update documentation to reflect zone size vs capacity
        zonefs: add zone-capacity support
      57d528bf
  4. 11 Aug, 2020 8 commits
    • Linus Torvalds's avatar
      Merge tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux · bb5baaa9
      Linus Torvalds authored
      Pull arm64 fix from Catalin Marinas:
       "Fix recordmcount build failure on non-arm64 (caused by an arm64
        patch)"
      
      * tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux:
        recordmcount: Fix build failure on non arm64
      bb5baaa9
    • Linus Torvalds's avatar
      Merge tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost · 57b07793
      Linus Torvalds authored
      Pull virtio updates from Michael Tsirkin:
      
       - IRQ bypass support for vdpa and IFC
      
       - MLX5 vdpa driver
      
       - Endianness fixes for virtio drivers
      
       - Misc other fixes
      
      * tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost: (71 commits)
        vdpa/mlx5: fix up endian-ness for mtu
        vdpa: Fix pointer math bug in vdpasim_get_config()
        vdpa/mlx5: Fix pointer math in mlx5_vdpa_get_config()
        vdpa/mlx5: fix memory allocation failure checks
        vdpa/mlx5: Fix uninitialised variable in core/mr.c
        vdpa_sim: init iommu lock
        virtio_config: fix up warnings on parisc
        vdpa/mlx5: Add VDPA driver for supported mlx5 devices
        vdpa/mlx5: Add shared memory registration code
        vdpa/mlx5: Add support library for mlx5 VDPA implementation
        vdpa/mlx5: Add hardware descriptive header file
        vdpa: Modify get_vq_state() to return error code
        net/vdpa: Use struct for set/get vq state
        vdpa: remove hard coded virtq num
        vdpasim: support batch updating
        vhost-vdpa: support IOTLB batching hints
        vhost-vdpa: support get/set backend features
        vhost: generialize backend features setting/getting
        vhost-vdpa: refine ioctl pre-processing
        vDPA: dont change vq irq after DRIVER_OK
        ...
      57b07793
    • Linus Torvalds's avatar
      Merge tag 'for-v5.9' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security · ce13266d
      Linus Torvalds authored
      Pull security subsystem updates from James Morris:
       "A couple of minor documentation updates only for this release"
      
      * tag 'for-v5.9' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security:
        LSM: drop duplicated words in header file comments
        Replace HTTP links with HTTPS ones: security
      ce13266d
    • Linus Torvalds's avatar
      Merge tag 'iommu-updates-v5.9' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu · 952ace79
      Linus Torvalds authored
      Pull iommu updates from Joerg Roedel:
      
       - Remove of the dev->archdata.iommu (or similar) pointers from most
         architectures. Only Sparc is left, but this is private to Sparc as
         their drivers don't use the IOMMU-API.
      
       - ARM-SMMU updates from Will Deacon:
      
           - Support for SMMU-500 implementation in Marvell Armada-AP806 SoC
      
           - Support for SMMU-500 implementation in NVIDIA Tegra194 SoC
      
           - DT compatible string updates
      
           - Remove unused IOMMU_SYS_CACHE_ONLY flag
      
           - Move ARM-SMMU drivers into their own subdirectory
      
       - Intel VT-d updates from Lu Baolu:
      
           - Misc tweaks and fixes for vSVA
      
           - Report/response page request events
      
           - Cleanups
      
       - Move the Kconfig and Makefile bits for the AMD and Intel drivers into
         their respective subdirectory.
      
       - MT6779 IOMMU Support
      
       - Support for new chipsets in the Renesas IOMMU driver
      
       - Other misc cleanups and fixes (e.g. to improve compile test coverage)
      
      * tag 'iommu-updates-v5.9' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu: (77 commits)
        iommu/amd: Move Kconfig and Makefile bits down into amd directory
        iommu/vt-d: Move Kconfig and Makefile bits down into intel directory
        iommu/arm-smmu: Move Arm SMMU drivers into their own subdirectory
        iommu/vt-d: Skip TE disabling on quirky gfx dedicated iommu
        iommu: Add gfp parameter to io_pgtable_ops->map()
        iommu: Mark __iommu_map_sg() as static
        iommu/vt-d: Rename intel-pasid.h to pasid.h
        iommu/vt-d: Add page response ops support
        iommu/vt-d: Report page request faults for guest SVA
        iommu/vt-d: Add a helper to get svm and sdev for pasid
        iommu/vt-d: Refactor device_to_iommu() helper
        iommu/vt-d: Disable multiple GPASID-dev bind
        iommu/vt-d: Warn on out-of-range invalidation address
        iommu/vt-d: Fix devTLB flush for vSVA
        iommu/vt-d: Handle non-page aligned address
        iommu/vt-d: Fix PASID devTLB invalidation
        iommu/vt-d: Remove global page support in devTLB flush
        iommu/vt-d: Enforce PASID devTLB field mask
        iommu: Make some functions static
        iommu/amd: Remove double zero check
        ...
      952ace79
    • Linus Torvalds's avatar
      Merge tag 'backlight-next-5.9' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/backlight · 96f970fe
      Linus Torvalds authored
      Pull backlight updates from Lee Jones:
       "Core Framework:
         - Trivial: Code refactoring
         - New API backlight_is_blank()
         - New API backlight_get_brightness()
         - Additional/reworked documentation
         - Remove 'extern' labels from prototypes
         - Drop backlight_put()
         - Staticify of_find_backlight()
      
        Driver Removal:
         - Removal of unused OT200 driver
         - Removal of unused Generic Backlight driver
      
        Fix-ups
         - Bunch of W=1 warning fixes
         - Convert to GPIO descriptors; sky81452
         - Move platform data handling into driver; sky81452
         - Remove superfluous code; lms501kf03
         - Many instances of using new APIs"
      
      * tag 'backlight-next-5.9' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/backlight: (34 commits)
        video: backlight: cr_bllcd: Remove unused variable 'intensity'
        backlight: backlight: Make of_find_backlight static
        backlight: backlight: Drop backlight_put()
        backlight: Use backlight_get_brightness() throughout
        backlight: jornada720_bl: Introduce backlight_is_blank()
        backlight: gpio_backlight: Simplify update_status()
        backlight: cr_bllcd: Introduce gpio-backlight semantics
        backlight: as3711_bl: Simplify update_status
        backlight: backlight: Introduce backlight_get_brightness()
        doc-rst: Wire-up Backlight kernel-doc documentation
        backlight: backlight: Add overview and update existing doc
        backlight: backlight: Drop extern from prototypes
        backlight: generic_bl: Remove this driver as it is unused
        backlight: backlight: Document enums in backlight.h
        backlight: backlight: Document inline functions in backlight.h
        backlight: backlight: Improve backlight_device documentation
        backlight: backlight: Improve backlight_properties documentation
        backlight: backlight: Improve backlight_ops documentation
        backlight: backlight: Add backlight_is_blank()
        backlight: backlight: Refactor fb_notifier_callback()
        ...
      96f970fe
    • Linus Torvalds's avatar
      Merge tag 'hwlock-v5.9' of git://git.kernel.org/pub/scm/linux/kernel/git/andersson/remoteproc · c636eef2
      Linus Torvalds authored
      Pull hwspinlock updates from Bjorn Andersson:
       "This introduces a new DT binding format to describe the Qualcomm
        hardware mutex block and deprecates the old, invalid, one.
      
        It also cleans up the Kconfig slightly"
      
      * tag 'hwlock-v5.9' of git://git.kernel.org/pub/scm/linux/kernel/git/andersson/remoteproc:
        dt-bindings: hwlock: qcom: Remove invalid binding
        hwspinlock: qcom: Allow mmio usage in addition to syscon
        dt-bindings: hwlock: qcom: Allow device on mmio bus
        dt-bindings: hwlock: qcom: Migrate binding to YAML
        hwspinlock: Simplify Kconfig
      c636eef2
    • Linus Torvalds's avatar
      Merge tag 'rproc-v5.9' of git://git.kernel.org/pub/scm/linux/kernel/git/andersson/remoteproc · 617e7481
      Linus Torvalds authored
      Pull remoteproc updates from Bjorn Andersson:
       "This introduces a new "detached" state for remote processors that are
        deemed to be running at the time Linux boots and the infrastructure
        for "attaching" to these. It then introduces the support for
        performing this operation for the STM32 platform.
      
        The coredump functionality is moved out from the core file and gains
        support for an optional mode where the recovery phase awaits the
        notification from devcoredump that the dump should be released. This
        allows userspace to grab the coredump in scenarios where vmalloc space
        is too low for creating a complete copy of the coredump before handing
        this to devcoredump.
      
        A new character device based interface is introduced to allow tying
        the stoppage of a remote processor to the termination of a user space
        process. This is useful in situations when such process provides
        crucial resources/operations for the firmware running on the remote
        processor.
      
        The Texas Instrument K3 driver gains support for the C66x and C71x
        DSPs.
      
        Qualcomm remoteprocs gains support for stashing relocation information
        in IMEM, to aid post mortem debugging and the crash notification
        mechanism is generalized to be reusable in cases where loosely coupled
        drivers needs to know about the status of a remote processor. One such
        example is the IPA hardware block, which is jointly owned with the
        modem and migrated to this improved interface.
      
        It also introduces a number of bug fixes and debug improvements for
        the Qualcomm modem remoteproc driver.
      
        And it cleans up the inconsistent interface for remoteproc drivers to
        implement power management"
      
      * tag 'rproc-v5.9' of git://git.kernel.org/pub/scm/linux/kernel/git/andersson/remoteproc: (56 commits)
        remoteproc: core: Register the character device interface
        remoteproc: Add remoteproc character device interface
        remoteproc: kill IPA notify code
        net: ipa: new notification infrastructure
        remoteproc: k3-dsp: Add support for C71x DSPs
        dt-bindings: remoteproc: k3-dsp: Update bindings for C71x DSPs
        remoteproc: k3-dsp: Add support for L2RAM loading on C66x DSPs
        remoteproc: k3-dsp: Add a remoteproc driver of K3 C66x DSPs
        dt-bindings: remoteproc: Add bindings for C66x DSPs on TI K3 SoCs
        remoteproc: k3: Add TI-SCI processor control helper functions
        remoteproc: Introduce rproc_of_parse_firmware() helper
        dt-bindings: arm: keystone: Add common TI SCI bindings
        remoteproc: qcom_q6v5_mss: Remove redundant running state
        remoteproc: qcom: q6v5: Update running state before requesting stop
        remoteproc: qcom_q6v5_mss: Add modem debug policy support
        remoteproc: qcom_q6v5_mss: Validate modem blob firmware size before load
        remoteproc: qcom_q6v5_mss: Validate MBA firmware size before load
        rpmsg: update documentation
        remoteproc: qcom_q6v5_mss: Add MBA log extraction support
        remoteproc: Add coredump debugfs entry
        ...
      617e7481
    • Linus Torvalds's avatar
      Merge tag 'rpmsg-v5.9' of git://git.kernel.org/pub/scm/linux/kernel/git/andersson/remoteproc · dded87af
      Linus Torvalds authored
      Pull rpmsg update from Bjorn Andersson:
       "This ensures that rpmsg uses little-endian, per the VirtIO 1.0
        specification"
      
      * tag 'rpmsg-v5.9' of git://git.kernel.org/pub/scm/linux/kernel/git/andersson/remoteproc:
        rpmsg: virtio: add endianness conversions
      dded87af