1. 17 Jun, 2020 1 commit
    • Milian Wolff's avatar
      perf script: Initialize zstd_data · b13b04d9
      Milian Wolff authored
      Fixes segmentation fault when trying to interpret zstd-compressed data
      with perf script:
      
      ```
        $ perf record -z ls
        ...
        [ perf record: Captured and wrote 0,010 MB perf.data, compressed (original 0,001 MB, ratio is 2,190) ]
        $ memcheck perf script
        ...
        ==67911== Invalid read of size 4
        ==67911==    at 0x5568188: ZSTD_decompressStream (in /usr/lib/libzstd.so.1.4.5)
        ==67911==    by 0x6E726B: zstd_decompress_stream (zstd.c:100)
        ==67911==    by 0x65729C: perf_session__process_compressed_event (session.c:72)
        ==67911==    by 0x6598E8: perf_session__process_user_event (session.c:1583)
        ==67911==    by 0x65BA59: reader__process_events (session.c:2177)
        ==67911==    by 0x65BA59: __perf_session__process_events (session.c:2234)
        ==67911==    by 0x65BA59: perf_session__process_events (session.c:2267)
        ==67911==    by 0x5A7397: __cmd_script (builtin-script.c:2447)
        ==67911==    by 0x5A7397: cmd_script (builtin-script.c:3840)
        ==67911==    by 0x5FE9D2: run_builtin (perf.c:312)
        ==67911==    by 0x711627: handle_internal_command (perf.c:364)
        ==67911==    by 0x711627: run_argv (perf.c:408)
        ==67911==    by 0x711627: main (perf.c:538)
        ==67911==  Address 0x71d8 is not stack'd, malloc'd or (recently) free'd
      ```
      Signed-off-by: default avatarMilian Wolff <milian.wolff@kdab.com>
      Acked-by: default avatarAlexey Budankov <alexey.budankov@linux.intel.com>
      Tested-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      LPU-Reference: 20200612230333.72140-1-milian.wolff@kdab.com
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      b13b04d9
  2. 10 Jun, 2020 1 commit
  3. 09 Jun, 2020 13 commits
    • Ian Rogers's avatar
      perf parse-events: Fix an old style declaration · ffaecd7d
      Ian Rogers authored
      Fixes: a26e4716 (perf tools: Move ALLOC_LIST into a function)
      Signed-off-by: default avatarIan Rogers <irogers@google.com>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Andi Kleen <ak@linux.intel.com>
      Cc: 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: Stephane Eranian <eranian@google.com>
      Link: http://lore.kernel.org/lkml/20200609053610.206588-2-irogers@google.comSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      ffaecd7d
    • Ian Rogers's avatar
      perf parse-events: Fix an incompatible pointer · c2412fae
      Ian Rogers authored
      Arrays are pointer types and don't need their address taking.
      
      Fixes: 8255718f (perf pmu: Expand PMU events by prefix match)
      Signed-off-by: default avatarIan Rogers <irogers@google.com>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Andi Kleen <ak@linux.intel.com>
      Cc: 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: Stephane Eranian <eranian@google.com>
      Link: http://lore.kernel.org/lkml/20200609053610.206588-1-irogers@google.comSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      c2412fae
    • Sumanth Korikkar's avatar
      perf bpf: Fix bpf prologue generation · d38c692f
      Sumanth Korikkar authored
      Issue:
      
      bpf_probe_read() is no longer available for architecture which has
      overlapping address space. Hence bpf prologue generation fails
      
      Fix:
      
      Use bpf_probe_read_kernel for kernel member access. For user attribute
      access in kprobes, use bpf_probe_read_user.
      
      Other:
      
      @user attribute was introduced in commit 1e032f7c ("perf-probe: Add
      user memory access attribute support")
      
      Test:
      
      1. ulimit -l 128 ; ./perf record -e tests/bpf_sched_setscheduler.c
      2. cat tests/bpf_sched_setscheduler.c
      
      static void (*bpf_trace_printk)(const char *fmt, int fmt_size, ...) =
              (void *) 6;
      static int (*bpf_probe_read_user)(void *dst, __u32 size,
                                        const void *unsafe_ptr) = (void *) 112;
      static int (*bpf_probe_read_kernel)(void *dst, __u32 size,
              const void *unsafe_ptr) = (void *) 113;
      
      SEC("func=do_sched_setscheduler  pid policy param->sched_priority@user")
      int bpf_func__setscheduler(void *ctx, int err, pid_t pid, int policy,
                                 int param)
      {
              char fmt[] = "prio: %ld";
              bpf_trace_printk(fmt, sizeof(fmt), param);
              return 1;
      }
      
      char _license[] SEC("license") = "GPL";
      int _version SEC("version") = LINUX_VERSION_CODE;
      
      3. ./perf script
         sched 305669 [000] 1614458.838675: perf_bpf_probe:func: (2904e508)
         pid=261614 policy=2 sched_priority=1
      
      4. cat /sys/kernel/debug/tracing/trace
         <...>-309956 [006] .... 1616098.093957: 0: prio: 1
      
      Committer testing:
      
      I had to add some missing headers in the bpf_sched_setscheduler.c test
      proggie, then instead of using record+script I used 'perf trace' to
      drive everything in one go:
      
        # cat bpf_sched_setscheduler.c
        #include <linux/types.h>
        #include <bpf.h>
      
        static void (*bpf_trace_printk)(const char *fmt, int fmt_size, ...) = (void *) 6;
        static int (*bpf_probe_read_user)(void *dst, __u32 size, const void *unsafe_ptr) = (void *) 112;
        static int (*bpf_probe_read_kernel)(void *dst, __u32 size, const void *unsafe_ptr) = (void *) 113;
      
        SEC("func=do_sched_setscheduler  pid policy param->sched_priority@user")
        int bpf_func__setscheduler(void *ctx, int err, pid_t pid, int policy, int param)
        {
                char fmt[] = "prio: %ld";
                bpf_trace_printk(fmt, sizeof(fmt), param);
                return 1;
        }
      
        char _license[] SEC("license") = "GPL";
        int _version SEC("version") = LINUX_VERSION_CODE;
        #
        #
        # perf trace -e bpf_sched_setscheduler.c chrt -f 42 sleep 1
           0.000 chrt/80125 perf_bpf_probe:func(__probe_ip: -1676607808, policy: 1, sched_priority: 42)
        #
      
      And even with backtraces :-)
      
        # perf trace -e bpf_sched_setscheduler.c/max-stack=8/ chrt -f 42 sleep 1
             0.000 chrt/79805 perf_bpf_probe:func(__probe_ip: -1676607808, policy: 1, sched_priority: 42)
                                               do_sched_setscheduler ([kernel.kallsyms])
                                               __x64_sys_sched_setscheduler ([kernel.kallsyms])
                                               do_syscall_64 ([kernel.kallsyms])
                                               entry_SYSCALL_64 ([kernel.kallsyms])
                                               __GI___sched_setscheduler (/usr/lib64/libc-2.30.so)
        #
      Signed-off-by: default avatarSumanth Korikkar <sumanthk@linux.ibm.com>
      Reviewed-by: default avatarThomas Richter <tmricht@linux.ibm.com>
      Tested-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
      Cc: Ilya Leoshkevich <iii@linux.ibm.com>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Cc: Masami Hiramatsu <mhiramat@kernel.org>
      Cc: bpf@vger.kernel.org
      LPU-Reference: 20200609081019.60234-3-sumanthk@linux.ibm.com
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      d38c692f
    • Sumanth Korikkar's avatar
      perf probe: Fix user attribute access in kprobes · 9256c303
      Sumanth Korikkar authored
      Issue:
      
        # perf probe -a 'do_sched_setscheduler pid policy param->sched_priority@user'
      
      did not work before.
      
      Fix:
      
      Make:
      
        # perf probe -a 'do_sched_setscheduler pid policy param->sched_priority@user'
      
      output equivalent to ftrace:
      
        # echo 'p:probe/do_sched_setscheduler _text+517384 pid=%r2:s32 policy=%r3:s32 sched_priority=+u0(%r4):s32' > /sys/kernel/debug/tracing/kprobe_events
      
      Other:
      
      1. Right now, __match_glob() does not handle [u]<offset>. For now, use
        *u]<offset>.
      
      2. @user attribute was introduced in commit 1e032f7c ("perf-probe:
         Add user memory access attribute support")
      
      Test:
      1. perf probe -a 'do_sched_setscheduler  pid policy
         param->sched_priority@user'
      
      2 ./perf script
         sched 305669 [000] 1614458.838675: perf_bpf_probe:func: (2904e508)
         pid=261614 policy=2 sched_priority=1
      
      3. cat /sys/kernel/debug/tracing/trace
         <...>-309956 [006] .... 1616098.093957: 0: prio: 1
      
      Committer testing:
      
      Before:
      
        # perf probe -a 'do_sched_setscheduler pid policy param->sched_priority@user'
        param(type:sched_param) has no member sched_priority@user.
          Error: Failed to add events.
        # pahole sched_param
        struct sched_param {
        	int                        sched_priority;       /*     0     4 */
      
        	/* size: 4, cachelines: 1, members: 1 */
        	/* last cacheline: 4 bytes */
        };
        #
      
      After:
      
        # perf probe -a 'do_sched_setscheduler pid policy param->sched_priority@user'
        Added new event:
          probe:do_sched_setscheduler (on do_sched_setscheduler with pid policy sched_priority=param->sched_priority)
      
        You can now use it in all perf tools, such as:
      
        	perf record -e probe:do_sched_setscheduler -aR sleep 1
      
        # cat /sys/kernel/debug/tracing/kprobe_events
        p:probe/do_sched_setscheduler _text+1113792 pid=%di:s32 policy=%si:s32 sched_priority=+u0(%dx):s32
        #
      
      Fixes: 1e032f7c ("perf-probe: Add user memory access attribute support")
      Signed-off-by: default avatarSumanth Korikkar <sumanthk@linux.ibm.com>
      Reviewed-by: default avatarThomas Richter <tmricht@linux.ibm.com>
      Acked-by: default avatarMasami Hiramatsu <mhiramat@kernel.org>
      Tested-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
      Cc: Ilya Leoshkevich <iii@linux.ibm.com>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Cc: Steven Rostedt (VMware) <rostedt@goodmis.org>
      Cc: bpf@vger.kernel.org
      LPU-Reference: 20200609081019.60234-2-sumanthk@linux.ibm.com
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      9256c303
    • Hongbo Yao's avatar
      perf stat: Fix NULL pointer dereference · c0c652fc
      Hongbo Yao authored
      If config->aggr_map is NULL and config->aggr_get_id is not NULL,
      the function print_aggr() will still calling arrg_update_shadow(),
      which can result in accessing the invalid pointer.
      
      Fixes: 088519f3 ("perf stat: Move the display functions to stat-display.c")
      Signed-off-by: default avatarHongbo Yao <yaohongbo@huawei.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: Wei Li <liwei391@huawei.com>
      Link: https://lore.kernel.org/lkml/20200608163625.GC3073@kernel.orgSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      c0c652fc
    • Gaurav Singh's avatar
      perf report: Fix NULL pointer dereference in hists__fprintf_nr_sample_events() · 11b6e548
      Gaurav Singh authored
      The 'evname' variable can be NULL, as it is checked a few lines back,
      check it before using.
      
      Fixes: 9e207ddf ("perf report: Show call graph from reference events")
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Kan Liang <kan.liang@intel.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/Signed-off-by: default avatarGaurav Singh <gaurav1086@gmail.com>
      11b6e548
    • Arnaldo Carvalho de Melo's avatar
      tools headers UAPI: Sync kvm.h headers with the kernel sources · dd76c302
      Arnaldo Carvalho de Melo authored
      To pick the changes in:
      
        f97f5a56 ("x86/kvm/hyper-v: Add support for synthetic debugger interface")
        850448f3 ("KVM: nVMX: Fix VMX preemption timer migration")
        2c4c4132 ("KVM: x86: Print symbolic names of VMX VM-Exit flags in traces")
        cc440cda ("KVM: nSVM: implement KVM_GET_NESTED_STATE and KVM_SET_NESTED_STATE")
        f7d31e65 ("x86/kvm/hyper-v: Explicitly align hcall param for kvm_hyperv_exit")
        72de5fa4 ("KVM: x86: announce KVM_FEATURE_ASYNC_PF_INT")
        acd05785 ("kvm: add capability for halt polling")
        3ecad8c2 ("docs: fix broken references for ReST files that moved around")
      
      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
        Warning: Kernel ABI header at 'tools/arch/x86/include/uapi/asm/kvm.h' differs from latest version at 'arch/x86/include/uapi/asm/kvm.h'
        diff -u tools/arch/x86/include/uapi/asm/kvm.h arch/x86/include/uapi/asm/kvm.h
        Warning: Kernel ABI header at 'tools/arch/x86/include/uapi/asm/vmx.h' differs from latest version at 'arch/x86/include/uapi/asm/vmx.h'
        diff -u tools/arch/x86/include/uapi/asm/vmx.h arch/x86/include/uapi/asm/vmx.h
      
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      Cc: David Matlack <dmatlack@google.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Jon Doron <arilou@gmail.com>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Paolo Bonzini <pbonzini@redhat.com>
      Cc: Peter Shier <pshier@google.com>
      Cc: Sean Christopherson <sean.j.christopherson@intel.com>
      Cc: Vitaly Kuznetsov <vkuznets@redhat.com>
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      dd76c302
    • Arnaldo Carvalho de Melo's avatar
      tools headers UAPI: Sync drm/i915_drm.h with the kernel sources · 377cb673
      Arnaldo Carvalho de Melo authored
      To pick the change in:
      
        4ef10fe0 ("drm/i915/perf: add new open param to configure polling of OA buffer")
        11ecbddd ("drm/i915/perf: introduce global sseu pinning")
      
      That don't result in any changes in tooling, just silences this perf
      build warning:
      
        Warning: Kernel ABI header at 'tools/include/uapi/drm/i915_drm.h' differs from latest version at 'include/uapi/drm/i915_drm.h'
        diff -u tools/include/uapi/drm/i915_drm.h include/uapi/drm/i915_drm.h
      
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      377cb673
    • Arnaldo Carvalho de Melo's avatar
      tools headers UAPI: Sync linux/fscrypt.h with the kernel sources · d8e1ef67
      Arnaldo Carvalho de Melo authored
      To pick the changes from:
      
        e3b1078b ("fscrypt: add support for IV_INO_LBLK_32 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>
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      d8e1ef67
    • Arnaldo Carvalho de Melo's avatar
      perf beauty: Add support to STATX_MNT_ID in the 'statx' syscall 'mask' argument · 5d33cbfe
      Arnaldo Carvalho de Melo authored
      Introduced in:
      
        fa2fcf4f ("statx: add mount ID")
      
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Miklos Szeredi <mszeredi@redhat.com>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      5d33cbfe
    • Arnaldo Carvalho de Melo's avatar
      tools headers uapi: Sync linux/stat.h with the kernel sources · 93dc627f
      Arnaldo Carvalho de Melo authored
      To pick the changes from:
      
        80340fe3 ("statx: add mount_root")
        fa2fcf4f ("statx: add mount ID")
        581701b7 ("uapi: deprecate STATX_ALL")
        712b2698 ("fs/stat: Define DAX statx attribute")
      
      These add some constants that will have to be manually added in a
      followup cset, at some point this should move to the shell based
      automated way.
      
      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
      
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      Cc: Darrick J. Wong <darrick.wong@oracle.com>
      Cc: Ira Weiny <ira.weiny@intel.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Miklos Szeredi <mszeredi@redhat.com>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      93dc627f
    • Arnaldo Carvalho de Melo's avatar
      tools arch x86 uapi: Synch asm/unistd.h with the kernel sources · 7e579f3a
      Arnaldo Carvalho de Melo authored
      To pick up the change in:
      
        700d3a5a ("x86/syscalls: Revert "x86/syscalls: Make __X32_SYSCALL_BIT be unsigned long"")
      
      That doesn't trigger any changes in tooling and silences this perf build
      warning:
      
        Warning: Kernel ABI header at 'tools/arch/x86/include/uapi/asm/unistd.h' differs from latest version at 'arch/x86/include/uapi/asm/unistd.h'
        diff -u tools/arch/x86/include/uapi/asm/unistd.h arch/x86/include/uapi/asm/unistd.h
      
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      Cc: Andy Lutomirski <luto@kernel.org>
      Cc: Borislav Petkov <bp@suse.de>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      7e579f3a
    • Arnaldo Carvalho de Melo's avatar
      tools headers API: Update faccessat2 affected files · 6c3c184f
      Arnaldo Carvalho de Melo authored
      Update the copies of files affected by:
      
        c8ffd8bc ("vfs: add faccessat2 syscall")
      
      To address this perf build warning:
      
        Warning: Kernel ABI header at 'tools/include/uapi/linux/fcntl.h' differs from latest version at 'include/uapi/linux/fcntl.h'
        diff -u tools/include/uapi/linux/fcntl.h include/uapi/linux/fcntl.h
        Warning: Kernel ABI header at 'tools/include/uapi/asm-generic/unistd.h' differs from latest version at 'include/uapi/asm-generic/unistd.h'
        diff -u tools/include/uapi/asm-generic/unistd.h include/uapi/asm-generic/unistd.h
        Warning: Kernel ABI header at 'tools/perf/arch/x86/entry/syscalls/syscall_64.tbl' differs from latest version at 'arch/x86/entry/syscalls/syscall_64.tbl'
        diff -u tools/perf/arch/x86/entry/syscalls/syscall_64.tbl arch/x86/entry/syscalls/syscall_64.tbl
      
      Which results in 'perf trace' gaining support for the 'faccessat2'
      syscall, now one can use:
      
        # perf trace -e faccessat2
      
      And have system wide tracing of this syscall. And this also will include
      it;
      
        # perf trace -e faccess*
      
      Together with the other variants.
      
      How it affects building/usage (on an x86_64 system):
      
        $ cp /tmp/build/perf/arch/x86/include/generated/asm/syscalls_64.c /tmp/syscalls_64.c.before
        $
        [root@five ~]# perf trace -e faccessat2
        event syntax error: 'faccessat2'
                             \___ parser error
        Run 'perf list' for a list of valid events
      
         Usage: perf trace [<options>] [<command>]
            or: perf trace [<options>] -- <command> [<options>]
            or: perf trace record [<options>] [<command>]
            or: perf trace record [<options>] -- <command> [<options>]
      
            -e, --event <event>   event/syscall selector. use 'perf list' to list available events
        [root@five ~]#
        $ cp arch/x86/entry/syscalls/syscall_64.tbl tools/perf/arch/x86/entry/syscalls/syscall_64.tbl
        $ git diff
        diff --git a/tools/perf/arch/x86/entry/syscalls/syscall_64.tbl b/tools/perf/arch/x86/entry/syscalls/syscall_64.tbl
        index 37b844f839bc..78847b32e137 100644
        --- a/tools/perf/arch/x86/entry/syscalls/syscall_64.tbl
        +++ b/tools/perf/arch/x86/entry/syscalls/syscall_64.tbl
        @@ -359,6 +359,7 @@
         435    common  clone3                  sys_clone3
         437    common  openat2                 sys_openat2
         438    common  pidfd_getfd             sys_pidfd_getfd
        +439    common  faccessat2              sys_faccessat2
      
         #
         # x32-specific system call numbers start at 512 to avoid cache impact
        $
      
        $ make -C tools/perf O=/tmp/build/perf/ install-bin
        <SNIP>
        CC       /tmp/build/perf/util/syscalltbl.o
        LD       /tmp/build/perf/util/perf-in.o
        LD       /tmp/build/perf/perf-in.o
        LINK     /tmp/build/perf/perf
        <SNIP>
        [root@five ~]# perf trace -e faccessat2
        ^C[root@five ~]#
      
      Cc: Miklos Szeredi <mszeredi@redhat.com>
      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>
      6c3c184f
  4. 08 Jun, 2020 25 commits
    • Linus Torvalds's avatar
      Merge tag 'rproc-v5.8' of git://git.kernel.org/pub/scm/linux/kernel/git/andersson/remoteproc · abfbb292
      Linus Torvalds authored
      Pull remoteproc updates from Bjorn Andersson:
       "This introduces device managed versions of functions used to register
        remoteproc devices, add support for remoteproc driver specific
        resource control, enables remoteproc drivers to specify ELF class and
        machine for coredumps. It integrates pm_runtime in the core for
        keeping resources active while the remote is booted and holds a wake
        source while recoverying a remote processor after a firmware crash.
      
        It refactors the remoteproc device's allocation path to simplify the
        logic, fix a few cleanup bugs and to not clone const strings onto the
        heap. Debugfs code is simplifies using the DEFINE_SHOW_ATTRIBUTE and a
        zero-length array is replaced with flexible-array.
      
        A new remoteproc driver for the JZ47xx VPU is introduced, the Qualcomm
        SM8250 gains support for audio, compute and sensor remoteprocs and the
        Qualcomm SC7180 modem support is cleaned up and improved.
      
        The Qualcomm glink subsystem-restart driver is merged into the main
        glink driver, the Qualcomm sysmon driver is extended to properly
        notify remote processors about all other remote processors' state
        transitions"
      
      * tag 'rproc-v5.8' of git://git.kernel.org/pub/scm/linux/kernel/git/andersson/remoteproc: (43 commits)
        remoteproc: Fix an error code in devm_rproc_alloc()
        MAINTAINERS: Add myself as reviewer for Ingenic rproc driver
        remoteproc: ingenic: Added remoteproc driver
        remoteproc: Add support for runtime PM
        dt-bindings: Document JZ47xx VPU auxiliary processor
        remoteproc: wcss: Fix arguments passed to qcom_add_glink_subdev()
        remoteproc: Fix and restore the parenting hierarchy for vdev
        remoteproc: Fall back to using parent memory pool if no dedicated available
        remoteproc: Replace zero-length array with flexible-array
        remoteproc: wcss: add support for rpmsg communication
        remoteproc: core: Prevent system suspend during remoteproc recovery
        remoteproc: qcom_q6v5_mss: Remove unused q6v5_da_to_va function
        remoteproc: qcom_q6v5_mss: map/unmap mpss segments before/after use
        remoteproc: qcom_q6v5_mss: Drop accesses to MPSS PERPH register space
        dt-bindings: remoteproc: qcom: Replace halt-nav with spare-regs
        remoteproc: qcom: pas: Add SM8250 PAS remoteprocs
        dt-bindings: remoteproc: qcom: pas: Add SM8250 remoteprocs
        remoteproc: qcom_q6v5_mss: Extract mba/mpss from memory-region
        dt-bindings: remoteproc: qcom: Use memory-region to reference memory
        remoteproc: qcom: pas: Add SC7180 Modem support
        ...
      abfbb292
    • Linus Torvalds's avatar
      Merge tag 'rpmsg-v5.8' of git://git.kernel.org/pub/scm/linux/kernel/git/andersson/remoteproc · d26a42a9
      Linus Torvalds authored
      Pull rpmsg updates from Bjorn Andersson:
       "This replaces a zero-length array with flexible-array and fixes a typo
        in a comment in the rpmsg core"
      
      * tag 'rpmsg-v5.8' of git://git.kernel.org/pub/scm/linux/kernel/git/andersson/remoteproc:
        rpmsg: Replace zero-length array with flexible-array
        rpmsg: fix a comment typo for rpmsg_device_match()
      d26a42a9
    • Linus Torvalds's avatar
      Merge tag 'ceph-for-5.8-rc1' of git://github.com/ceph/ceph-client · 95288a9b
      Linus Torvalds authored
      Pull ceph updates from Ilya Dryomov:
       "The highlights are:
      
         - OSD/MDS latency and caps cache metrics infrastructure for the
           filesytem (Xiubo Li). Currently available through debugfs and will
           be periodically sent to the MDS in the future.
      
         - support for replica reads (balanced and localized reads) for rbd
           and the filesystem (myself). The default remains to always read
           from primary, users can opt-in with the new crush_location and
           read_from_replica options. Note that reading from replica is safe
           for general use only since Octopus.
      
         - support for RADOS allocation hint flags (myself). Currently used by
           rbd to propagate the compressible/incompressible hint given with
           the new compression_hint map option and ready for passing on more
           advanced hints, e.g. based on fadvise() from the filesystem.
      
         - support for efficient cross-quota-realm renames (Luis Henriques)
      
         - assorted cap handling improvements and cleanups, particularly
           untangling some of the locking (Jeff Layton)"
      
      * tag 'ceph-for-5.8-rc1' of git://github.com/ceph/ceph-client: (29 commits)
        rbd: compression_hint option
        libceph: support for alloc hint flags
        libceph: read_from_replica option
        libceph: support for balanced and localized reads
        libceph: crush_location infrastructure
        libceph: decode CRUSH device/bucket types and names
        libceph: add non-asserting rbtree insertion helper
        ceph: skip checking caps when session reconnecting and releasing reqs
        ceph: make sure mdsc->mutex is nested in s->s_mutex to fix dead lock
        ceph: don't return -ESTALE if there's still an open file
        libceph, rbd: replace zero-length array with flexible-array
        ceph: allow rename operation under different quota realms
        ceph: normalize 'delta' parameter usage in check_quota_exceeded
        ceph: ceph_kick_flushing_caps needs the s_mutex
        ceph: request expedited service on session's last cap flush
        ceph: convert mdsc->cap_dirty to a per-session list
        ceph: reset i_requested_max_size if file write is not wanted
        ceph: throw a warning if we destroy session with mutex still locked
        ceph: fix potential race in ceph_check_caps
        ceph: document what protects i_dirty_item and i_flushing_item
        ...
      95288a9b
    • Linus Torvalds's avatar
      Merge tag 'gfs2-for-5.8' of git://git.kernel.org/pub/scm/linux/kernel/git/gfs2/linux-gfs2 · ca687877
      Linus Torvalds authored
      Pull gfs2 updates from Andreas Gruenbacher:
      
       - An iopen glock locking scheme rework that speeds up deletes of inodes
         accessed from multiple nodes
      
       - Various bug fixes and debugging improvements
      
       - Convert gfs2-glocks.txt to ReST
      
      * tag 'gfs2-for-5.8' of git://git.kernel.org/pub/scm/linux/kernel/git/gfs2/linux-gfs2:
        gfs2: fix use-after-free on transaction ail lists
        gfs2: new slab for transactions
        gfs2: initialize transaction tr_ailX_lists earlier
        gfs2: Smarter iopen glock waiting
        gfs2: Wake up when setting GLF_DEMOTE
        gfs2: Check inode generation number in delete_work_func
        gfs2: Move inode generation number check into gfs2_inode_lookup
        gfs2: Minor gfs2_lookup_by_inum cleanup
        gfs2: Try harder to delete inodes locally
        gfs2: Give up the iopen glock on contention
        gfs2: Turn gl_delete into a delayed work
        gfs2: Keep track of deleted inode generations in LVBs
        gfs2: Allow ASPACE glocks to also have an lvb
        gfs2: instrumentation wrt log_flush stuck
        gfs2: introduce new gfs2_glock_assert_withdraw
        gfs2: print mapping->nrpages in glock dump for address space glocks
        gfs2: Only do glock put in gfs2_create_inode for free inodes
        gfs2: Allow lock_nolock mount to specify jid=X
        gfs2: Don't ignore inode write errors during inode_go_sync
        docs: filesystems: convert gfs2-glocks.txt to ReST
      ca687877
    • Linus Torvalds's avatar
      Merge tag 's390-5.8-1' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux · 23fc02e3
      Linus Torvalds authored
      Pull s390 updates from Vasily Gorbik:
      
       - Add support for multi-function devices in pci code.
      
       - Enable PF-VF linking for architectures using the pdev->no_vf_scan
         flag (currently just s390).
      
       - Add reipl from NVMe support.
      
       - Get rid of critical section cleanup in entry.S.
      
       - Refactor PNSO CHSC (perform network subchannel operation) in cio and
         qeth.
      
       - QDIO interrupts and error handling fixes and improvements, more
         refactoring changes.
      
       - Align ioremap() with generic code.
      
       - Accept requests without the prefetch bit set in vfio-ccw.
      
       - Enable path handling via two new regions in vfio-ccw.
      
       - Other small fixes and improvements all over the code.
      
      * tag 's390-5.8-1' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux: (52 commits)
        vfio-ccw: make vfio_ccw_regops variables declarations static
        vfio-ccw: Add trace for CRW event
        vfio-ccw: Wire up the CRW irq and CRW region
        vfio-ccw: Introduce a new CRW region
        vfio-ccw: Refactor IRQ handlers
        vfio-ccw: Introduce a new schib region
        vfio-ccw: Refactor the unregister of the async regions
        vfio-ccw: Register a chp_event callback for vfio-ccw
        vfio-ccw: Introduce new helper functions to free/destroy regions
        vfio-ccw: document possible errors
        vfio-ccw: Enable transparent CCW IPL from DASD
        s390/pci: Log new handle in clp_disable_fh()
        s390/cio, s390/qeth: cleanup PNSO CHSC
        s390/qdio: remove q->first_to_kick
        s390/qdio: fix up qdio_start_irq() kerneldoc
        s390: remove critical section cleanup from entry.S
        s390: add machine check SIGP
        s390/pci: ioremap() align with generic code
        s390/ap: introduce new ap function ap_get_qdev()
        Documentation/s390: Update / remove developerWorks web links
        ...
      23fc02e3
    • Linus Torvalds's avatar
      Merge tag 'iommu-updates-v5.8' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu · 4e3a16ee
      Linus Torvalds authored
      Pull iommu updates from Joerg Roedel:
       "A big part of this is a change in how devices get connected to IOMMUs
        in the core code. It contains the change from the old add_device() /
        remove_device() to the new probe_device() / release_device()
        call-backs.
      
        As a result functionality that was previously in the IOMMU drivers has
        been moved to the IOMMU core code, including IOMMU group allocation
        for each device. The reason for this change was to get more robust
        allocation of default domains for the iommu groups.
      
        A couple of fixes were necessary after this was merged into the IOMMU
        tree, but there are no known bugs left. The last fix is applied on-top
        of the merge commit for the topic branches.
      
        Other than that change, we have:
      
         - Removal of the driver private domain handling in the Intel VT-d
           driver. This was fragile code and I am glad it is gone now.
      
         - More Intel VT-d updates from Lu Baolu:
            - Nested Shared Virtual Addressing (SVA) support to the Intel VT-d
              driver
            - Replacement of the Intel SVM interfaces to the common IOMMU SVA
              API
            - SVA Page Request draining support
      
         - ARM-SMMU Updates from Will:
            - Avoid mapping reserved MMIO space on SMMUv3, so that it can be
              claimed by the PMU driver
            - Use xarray to manage ASIDs on SMMUv3
            - Reword confusing shutdown message
            - DT compatible string updates
            - Allow implementations to override the default domain type
      
         - A new IOMMU driver for the Allwinner Sun50i platform
      
         - Support for ATS gets disabled for untrusted devices (like
           Thunderbolt devices). This includes a PCI patch, acked by Bjorn.
      
         - Some cleanups to the AMD IOMMU driver to make more use of IOMMU
           core features.
      
         - Unification of some printk formats in the Intel and AMD IOMMU
           drivers and in the IOVA code.
      
         - Updates for DT bindings
      
         - A number of smaller fixes and cleanups.
      
      * tag 'iommu-updates-v5.8' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu: (109 commits)
        iommu: Check for deferred attach in iommu_group_do_dma_attach()
        iommu/amd: Remove redundant devid checks
        iommu/amd: Store dev_data as device iommu private data
        iommu/amd: Merge private header files
        iommu/amd: Remove PD_DMA_OPS_MASK
        iommu/amd: Consolidate domain allocation/freeing
        iommu/amd: Free page-table in protection_domain_free()
        iommu/amd: Allocate page-table in protection_domain_init()
        iommu/amd: Let free_pagetable() not rely on domain->pt_root
        iommu/amd: Unexport get_dev_data()
        iommu/vt-d: Fix compile warning
        iommu/vt-d: Remove real DMA lookup in find_domain
        iommu/vt-d: Allocate domain info for real DMA sub-devices
        iommu/vt-d: Only clear real DMA device's context entries
        iommu: Remove iommu_sva_ops::mm_exit()
        uacce: Remove mm_exit() op
        iommu/sun50i: Constify sun50i_iommu_ops
        iommu/hyper-v: Constify hyperv_ir_domain_ops
        iommu/vt-d: Use pci_ats_supported()
        iommu/arm-smmu-v3: Use pci_ats_supported()
        ...
      4e3a16ee
    • Linus Torvalds's avatar
      Merge tag 'drm-next-msm-5.8-2020-06-08' of git://anongit.freedesktop.org/drm/drm · 9413b9a6
      Linus Torvalds authored
      Pull drm msm updates from Dave Airlie:
       "This tree has been in next for a couple of weeks, but Rob missed an
        arm32 build issue, so I was awaiting the tree with a patch reverted.
      
         - new gpu support: a405, a640, a650
      
         - dpu: color processing support
      
         - mdp5: support for msm8x36 (the thing with a405)
      
         - some prep work for per-context pagetables (ie the part that does
           not depend on in-flight iommu patches)
      
         - last but not least, UABI update for submit ioctl to support syncobj
           (from Bas)"
      
      * tag 'drm-next-msm-5.8-2020-06-08' of git://anongit.freedesktop.org/drm/drm: (30 commits)
        Revert "drm/msm/dpu: add support for clk and bw scaling for display"
        drm/msm/a6xx: skip HFI set freq if GMU is powered down
        drm/msm: Update the MMU helper function APIs
        drm/msm: Refactor address space initialization
        drm/msm: Attach the IOMMU device during initialization
        drm/msm/dpu: dpu_setup_dspp_pcc() can be static
        drm/msm/a6xx: a6xx_hfi_send_start() can be static
        drm/msm/a4xx: add a405_registers for a405 device
        drm/msm/a4xx: add adreno a405 support
        drm/msm/a6xx: update a6xx_hw_init for A640 and A650
        drm/msm/a6xx: enable GMU log
        drm/msm/a6xx: update pdc/rscc GMU registers for A640/A650
        drm/msm/a6xx: A640/A650 GMU firmware path
        drm/msm/a6xx: HFI v2 for A640 and A650
        drm/msm/a6xx: add A640/A650 to gpulist
        drm/msm/a6xx: use msm_gem for GMU memory objects
        drm/msm: add internal MSM_BO_MAP_PRIV flag
        drm/msm: add msm_gem_get_and_pin_iova_range
        drm/msm: Check for powered down HW in the devfreq callbacks
        drm/msm/dpu: update bandwidth threshold check
        ...
      9413b9a6
    • Linus Torvalds's avatar
      Merge tag 'drm-next-2020-06-08' of git://anongit.freedesktop.org/drm/drm · 10782166
      Linus Torvalds authored
      Pull drm fixes from Dave Airlie:
       "These are the fixes from last week for the stuff merged in the merge
        window. It got a bunch of nouveau fixes for HDA audio on some new
        GPUs, some i915 and some amdpgu fixes.
      
        i915:
         - gvt: Fix one clang warning on debug only function
         - Use ARRAY_SIZE for coccicheck warning
         - Use after free fix for display global state.
         - Whitelisting context-local timestamp on Gen9 and two scheduler
           fixes with deps (Cc: stable)
         - Removal of write flag from sysfs files where ineffective
      
        nouveau:
         - HDMI/DP audio HDA fixes
         - display hang fix for Volta/Turing
         - GK20A regression fix.
      
        amdgpu:
         - Prevent hwmon accesses while GPU is in reset
         - CTF interrupt fix
         - Backlight fix for renoir
         - Fix for display sync groups
         - Display bandwidth validation workaround"
      
      * tag 'drm-next-2020-06-08' of git://anongit.freedesktop.org/drm/drm: (28 commits)
        drm/nouveau/kms/nv50-: clear SW state of disabled windows harder
        drm/nouveau: gr/gk20a: Use firmware version 0
        drm/nouveau/disp/gm200-: detect and potentially disable HDA support on some SORs
        drm/nouveau/disp/gp100: split SOR implementation from gm200
        drm/nouveau/disp: modify OR allocation policy to account for HDA requirements
        drm/nouveau/disp: split part of OR allocation logic into a function
        drm/nouveau/disp: provide hint to OR allocation about HDA requirements
        drm/amd/display: Revalidate bandwidth before commiting DC updates
        drm/amdgpu/display: use blanked rather than plane state for sync groups
        drm/i915/params: fix i915.fake_lmem_start module param sysfs permissions
        drm/i915/params: don't expose inject_probe_failure in debugfs
        drm/i915: Whitelist context-local timestamp in the gen9 cmdparser
        drm/i915: Fix global state use-after-frees with a refcount
        drm/i915: Check for awaits on still currently executing requests
        drm/i915/gt: Do not schedule normal requests immediately along virtual
        drm/i915: Reorder await_execution before await_request
        drm/nouveau/kms/gt215-: fix race with audio driver runpm
        drm/nouveau/disp/gm200-: fix NV_PDISP_SOR_HDMI2_CTRL(n) selection
        Revert "drm/amd/display: disable dcn20 abm feature for bring up"
        drm/amd/powerplay: ack the SMUToHost interrupt on receive V2
        ...
      10782166
    • Linus Torvalds's avatar
      Merge branch 'akpm' (patches from Andrew) · 20b0d067
      Linus Torvalds authored
      Merge still more updates from Andrew Morton:
       "Various trees. Mainly those parts of MM whose linux-next dependents
        are now merged. I'm still sitting on ~160 patches which await merges
        from -next.
      
        Subsystems affected by this patch series: mm/proc, ipc, dynamic-debug,
        panic, lib, sysctl, mm/gup, mm/pagemap"
      
      * emailed patches from Andrew Morton <akpm@linux-foundation.org>: (52 commits)
        doc: cgroup: update note about conditions when oom killer is invoked
        module: move the set_fs hack for flush_icache_range to m68k
        nommu: use flush_icache_user_range in brk and mmap
        binfmt_flat: use flush_icache_user_range
        exec: use flush_icache_user_range in read_code
        exec: only build read_code when needed
        m68k: implement flush_icache_user_range
        arm: rename flush_cache_user_range to flush_icache_user_range
        xtensa: implement flush_icache_user_range
        sh: implement flush_icache_user_range
        asm-generic: add a flush_icache_user_range stub
        mm: rename flush_icache_user_range to flush_icache_user_page
        arm,sparc,unicore32: remove flush_icache_user_range
        riscv: use asm-generic/cacheflush.h
        powerpc: use asm-generic/cacheflush.h
        openrisc: use asm-generic/cacheflush.h
        m68knommu: use asm-generic/cacheflush.h
        microblaze: use asm-generic/cacheflush.h
        ia64: use asm-generic/cacheflush.h
        hexagon: use asm-generic/cacheflush.h
        ...
      20b0d067
    • Konstantin Khlebnikov's avatar
      doc: cgroup: update note about conditions when oom killer is invoked · db33ec37
      Konstantin Khlebnikov authored
      Starting from v4.19 commit 29ef680a ("memcg, oom: move out_of_memory
      back to the charge path") cgroup oom killer is no longer invoked only
      from page faults.  Now it implements the same semantics as global OOM
      killer: allocation context invokes OOM killer and keeps retrying until
      success.
      
      [akpm@linux-foundation.org: fixes per Randy]
      Signed-off-by: default avatarKonstantin Khlebnikov <khlebnikov@yandex-team.ru>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Acked-by: default avatarMichal Hocko <mhocko@suse.com>
      Cc: Roman Gushchin <guro@fb.com>
      Cc: Randy Dunlap <rdunlap@infradead.org>
      Link: http://lkml.kernel.org/r/158894738928.208854.5244393925922074518.stgit@buzzSigned-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      db33ec37
    • Christoph Hellwig's avatar
      module: move the set_fs hack for flush_icache_range to m68k · 490741ab
      Christoph Hellwig authored
      flush_icache_range generally operates on kernel addresses, but for some
      reason m68k needed a set_fs override.  Move that into the m68k code
      insted of keeping it in the module loader.
      Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Reviewed-by: default avatarGeert Uytterhoeven <geert@linux-m68k.org>
      Acked-by: default avatarGeert Uytterhoeven <geert@linux-m68k.org>
      Acked-by: default avatarJessica Yu <jeyu@kernel.org>
      Cc: Alexei Starovoitov <ast@kernel.org>
      Cc: Daniel Borkmann <daniel@iogearbox.net>
      Cc: Martin KaFai Lau <kafai@fb.com>
      Cc: Song Liu <songliubraving@fb.com>
      Cc: Yonghong Song <yhs@fb.com>
      Link: http://lkml.kernel.org/r/20200515143646.3857579-30-hch@lst.deSigned-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      490741ab
    • Christoph Hellwig's avatar
      nommu: use flush_icache_user_range in brk and mmap · a75a2df6
      Christoph Hellwig authored
      These obviously operate on user addresses.
      Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Cc: Greg Ungerer <gerg@linux-m68k.org>
      Cc: Geert Uytterhoeven <geert@linux-m68k.org>
      Link: http://lkml.kernel.org/r/20200515143646.3857579-29-hch@lst.deSigned-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      a75a2df6
    • Christoph Hellwig's avatar
      binfmt_flat: use flush_icache_user_range · 79ef1e1f
      Christoph Hellwig authored
      load_flat_file works on user addresses.
      Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Acked-by: default avatarGreg Ungerer <gerg@linux-m68k.org>
      Cc: Alexander Viro <viro@zeniv.linux.org.uk>
      Link: http://lkml.kernel.org/r/20200515143646.3857579-28-hch@lst.deSigned-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      79ef1e1f
    • Christoph Hellwig's avatar
      exec: use flush_icache_user_range in read_code · bce2b68b
      Christoph Hellwig authored
      read_code operates on user addresses.
      Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Cc: Alexander Viro <viro@zeniv.linux.org.uk>
      Link: http://lkml.kernel.org/r/20200515143646.3857579-27-hch@lst.deSigned-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      bce2b68b
    • Christoph Hellwig's avatar
      exec: only build read_code when needed · 48304f79
      Christoph Hellwig authored
      Only build read_code when binary formats that use it are built into the
      kernel.
      Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Cc: Alexander Viro <viro@zeniv.linux.org.uk>
      Link: http://lkml.kernel.org/r/20200515143646.3857579-26-hch@lst.deSigned-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      48304f79
    • Christoph Hellwig's avatar
      m68k: implement flush_icache_user_range · a1e81f96
      Christoph Hellwig authored
      Rename the current flush_icache_range to flush_icache_user_range as per
      commit ae92ef8a ("PATCH] flush icache in correct context") there
      seems to be an assumption that it operates on user addresses.  Add a
      flush_icache_range around it that for now is a no-op.
      Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Acked-by: default avatarGeert Uytterhoeven <geert@linux-m68k.org>
      Cc: Geert Uytterhoeven <geert@linux-m68k.org>
      Link: http://lkml.kernel.org/r/20200515143646.3857579-25-hch@lst.deSigned-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      a1e81f96
    • Christoph Hellwig's avatar
      arm: rename flush_cache_user_range to flush_icache_user_range · fca7f8e6
      Christoph Hellwig authored
      flush_icache_user_range will be the name for a generic primitive.  Move
      the arm name so that arm already has an implementation.
      Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Cc: Russell King <linux@armlinux.org.uk>
      Link: http://lkml.kernel.org/r/20200515143646.3857579-24-hch@lst.deSigned-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      fca7f8e6
    • Christoph Hellwig's avatar
      xtensa: implement flush_icache_user_range · 70cd3444
      Christoph Hellwig authored
      The Xtensa implementation of flush_icache_range seems to be able to cope
      with user addresses.  Just define flush_icache_user_range to
      flush_icache_range.
      
      [jcmvbkbc@gmail.com: fix flush_icache_user_range in noMMU configs]
        Link: http://lkml.kernel.org/r/20200525221556.4270-1-jcmvbkbc@gmail.comSigned-off-by: default avatarChristoph Hellwig <hch@lst.de>
      Signed-off-by: default avatarMax Filippov <jcmvbkbc@gmail.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Cc: Chris Zankel <chris@zankel.net>
      Cc: Max Filippov <jcmvbkbc@gmail.com>
      Link: http://lkml.kernel.org/r/20200515143646.3857579-23-hch@lst.deSigned-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      70cd3444
    • Christoph Hellwig's avatar
      sh: implement flush_icache_user_range · 952ec41c
      Christoph Hellwig authored
      The SuperH implementation of flush_icache_range seems to be able to cope
      with user addresses.  Just define flush_icache_user_range to
      flush_icache_range.
      Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Cc: Yoshinori Sato <ysato@users.sourceforge.jp>
      Cc: Rich Felker <dalias@libc.org>
      Link: http://lkml.kernel.org/r/20200515143646.3857579-22-hch@lst.deSigned-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      952ec41c
    • Christoph Hellwig's avatar
      asm-generic: add a flush_icache_user_range stub · 1268c333
      Christoph Hellwig authored
      Define flush_icache_user_range to flush_icache_range unless the
      architecture provides its own implementation.
      Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Cc: Arnd Bergmann <arnd@arndb.de>
      Link: http://lkml.kernel.org/r/20200515143646.3857579-21-hch@lst.deSigned-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      1268c333
    • Christoph Hellwig's avatar
      mm: rename flush_icache_user_range to flush_icache_user_page · 885f7f8e
      Christoph Hellwig authored
      The function currently known as flush_icache_user_range only operates on
      a single page.  Rename it to flush_icache_user_page as we'll need the
      name flush_icache_user_range for something else soon.
      Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Acked-by: default avatarGeert Uytterhoeven <geert@linux-m68k.org>
      Cc: Richard Henderson <rth@twiddle.net>
      Cc: Ivan Kokshaysky <ink@jurassic.park.msu.ru>
      Cc: Matt Turner <mattst88@gmail.com>
      Cc: Tony Luck <tony.luck@intel.com>
      Cc: Fenghua Yu <fenghua.yu@intel.com>
      Cc: Geert Uytterhoeven <geert@linux-m68k.org>
      Cc: Greentime Hu <green.hu@gmail.com>
      Cc: Vincent Chen <deanbo422@gmail.com>
      Cc: Jonas Bonn <jonas@southpole.se>
      Cc: Stefan Kristiansson <stefan.kristiansson@saunalahti.fi>
      Cc: Stafford Horne <shorne@gmail.com>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Michael Ellerman <mpe@ellerman.id.au>
      Cc: Paul Walmsley <paul.walmsley@sifive.com>
      Cc: Palmer Dabbelt <palmer@sifive.com>
      Cc: Albert Ou <aou@eecs.berkeley.edu>
      Cc: Arnd Bergmann <arnd@arndb.de>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: Arnaldo Carvalho de Melo <acme@kernel.org>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Link: http://lkml.kernel.org/r/20200515143646.3857579-20-hch@lst.deSigned-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      885f7f8e
    • Christoph Hellwig's avatar
      arm,sparc,unicore32: remove flush_icache_user_range · 97f52c15
      Christoph Hellwig authored
      flush_icache_user_range is only used by <asm-generic/cacheflush.h>, so
      remove it from the architectures that implement it, but don't use
      <asm-generic/cacheflush.h>.
      Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Cc: Russell King <linux@armlinux.org.uk>
      Cc: "David S. Miller" <davem@davemloft.net>
      Cc: Guan Xuetao <gxt@pku.edu.cn>
      Link: http://lkml.kernel.org/r/20200515143646.3857579-19-hch@lst.deSigned-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      97f52c15
    • Christoph Hellwig's avatar
      riscv: use asm-generic/cacheflush.h · 396eb69c
      Christoph Hellwig authored
      RISC-V needs almost no cache flushing routines of its own.  Rely on
      asm-generic/cacheflush.h for the defaults.
      
      Also remove the pointless __KERNEL__ ifdef while we're at it.
      Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Reviewed-by: default avatarPalmer Dabbelt <palmerdabbelt@google.com>
      Acked-by: default avatarPalmer Dabbelt <palmerdabbelt@google.com>
      Cc: Paul Walmsley <paul.walmsley@sifive.com>
      Cc: Palmer Dabbelt <palmer@sifive.com>
      Cc: Albert Ou <aou@eecs.berkeley.edu>
      Link: http://lkml.kernel.org/r/20200515143646.3857579-18-hch@lst.deSigned-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      396eb69c
    • Christoph Hellwig's avatar
      powerpc: use asm-generic/cacheflush.h · 5019f760
      Christoph Hellwig authored
      Power needs almost no cache flushing routines of its own.  Rely on
      asm-generic/cacheflush.h for the defaults.
      
      Also remove the pointless __KERNEL__ ifdef while we're at it.
      Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Michael Ellerman <mpe@ellerman.id.au>
      Link: http://lkml.kernel.org/r/20200515143646.3857579-17-hch@lst.deSigned-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      5019f760
    • Christoph Hellwig's avatar
      openrisc: use asm-generic/cacheflush.h · e0509451
      Christoph Hellwig authored
      OpenRISC needs almost no cache flushing routines of its own.  Rely on
      asm-generic/cacheflush.h for the defaults.
      Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Cc: Jonas Bonn <jonas@southpole.se>
      Cc: Stefan Kristiansson <stefan.kristiansson@saunalahti.fi>
      Cc: Stafford Horne <shorne@gmail.com>
      Link: http://lkml.kernel.org/r/20200515143646.3857579-16-hch@lst.deSigned-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      e0509451