1. 22 Jun, 2020 26 commits
    • Arnaldo Carvalho de Melo's avatar
      perf evlist: Fix the class prefix for 'struct evlist' sample_type methods · b3c2cc2b
      Arnaldo Carvalho de Melo authored
      To differentiate from libperf's 'struct perf_evlist' methods.
      
      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>
      b3c2cc2b
    • Arnaldo Carvalho de Melo's avatar
      perf evlist: Fix the class prefix for 'struct evlist' strerror methods · d1f249ec
      Arnaldo Carvalho de Melo authored
      To differentiate from libperf's 'struct perf_evlist' methods.
      
      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>
      d1f249ec
    • Arnaldo Carvalho de Melo's avatar
      perf evlist: Fix the class prefix for 'struct evlist' 'add' evsel methods · e251abee
      Arnaldo Carvalho de Melo authored
      To differentiate from libperf's 'struct perf_evlist' methods.
      
      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>
      e251abee
    • John Garry's avatar
      perf pmu: Improve CPU core PMU HW event list ordering · ce0dc7d2
      John Garry authored
      For perf list, the CPU core PMU HW event ordering is such that not all
      events may will be listed adjacent - consider this example:
      
        $ tools/perf/perf list
      
        List of pre-defined events (to be used in -e):
      
          duration_time                                      [Tool event]
      
          branch-instructions OR cpu/branch-instructions/    [Kernel PMU event]
          branch-misses OR cpu/branch-misses/                [Kernel PMU event]
          bus-cycles OR cpu/bus-cycles/                      [Kernel PMU event]
          cache-misses OR cpu/cache-misses/                  [Kernel PMU event]
          cache-references OR cpu/cache-references/          [Kernel PMU event]
          cpu-cycles OR cpu/cpu-cycles/                      [Kernel PMU event]
          cstate_core/c3-residency/                          [Kernel PMU event]
          cstate_core/c6-residency/                          [Kernel PMU event]
          cstate_core/c7-residency/                          [Kernel PMU event]
          cstate_pkg/c2-residency/                           [Kernel PMU event]
          cstate_pkg/c3-residency/                           [Kernel PMU event]
          cstate_pkg/c6-residency/                           [Kernel PMU event]
          cstate_pkg/c7-residency/                           [Kernel PMU event]
          cycles-ct OR cpu/cycles-ct/                        [Kernel PMU event]
          cycles-t OR cpu/cycles-t/                          [Kernel PMU event]
          el-abort OR cpu/el-abort/                          [Kernel PMU event]
          el-capacity OR cpu/el-capacity/                    [Kernel PMU event]
      
      Notice in the above example how the cstate_core PMU events are mixed in
      the middle of the CPU core events.
      
      For my arm64 platform, all the uncore events get mixed in, making the list
      very disorganised:
      
          page-faults OR faults                              [Software event]
          task-clock                                         [Software event]
          duration_time                                      [Tool event]
          L1-dcache-load-misses                              [Hardware cache event]
          L1-dcache-loads                                    [Hardware cache event]
          L1-icache-load-misses                              [Hardware cache event]
          L1-icache-loads                                    [Hardware cache event]
          branch-load-misses                                 [Hardware cache event]
          branch-loads                                       [Hardware cache event]
          dTLB-load-misses                                   [Hardware cache event]
          dTLB-loads                                         [Hardware cache event]
          iTLB-load-misses                                   [Hardware cache event]
          iTLB-loads                                         [Hardware cache event]
          br_mis_pred OR armv8_pmuv3_0/br_mis_pred/          [Kernel PMU event]
          br_mis_pred_retired OR armv8_pmuv3_0/br_mis_pred_retired/ [Kernel PMU event]
          br_pred OR armv8_pmuv3_0/br_pred/                  [Kernel PMU event]
          br_retired OR armv8_pmuv3_0/br_retired/            [Kernel PMU event]
          br_return_retired OR armv8_pmuv3_0/br_return_retired/ [Kernel PMU event]
          bus_access OR armv8_pmuv3_0/bus_access/            [Kernel PMU event]
          bus_cycles OR armv8_pmuv3_0/bus_cycles/            [Kernel PMU event]
          cid_write_retired OR armv8_pmuv3_0/cid_write_retired/ [Kernel PMU event]
          cpu_cycles OR armv8_pmuv3_0/cpu_cycles/            [Kernel PMU event]
          dtlb_walk OR armv8_pmuv3_0/dtlb_walk/              [Kernel PMU event]
          exc_return OR armv8_pmuv3_0/exc_return/            [Kernel PMU event]
          exc_taken OR armv8_pmuv3_0/exc_taken/              [Kernel PMU event]
          hisi_sccl1_ddrc0/act_cmd/                          [Kernel PMU event]
          hisi_sccl1_ddrc0/flux_rcmd/                        [Kernel PMU event]
          hisi_sccl1_ddrc0/flux_rd/                          [Kernel PMU event]
          hisi_sccl1_ddrc0/flux_wcmd/                        [Kernel PMU event]
          hisi_sccl1_ddrc0/flux_wr/                          [Kernel PMU event]
          hisi_sccl1_ddrc0/pre_cmd/                          [Kernel PMU event]
          hisi_sccl1_ddrc0/rnk_chg/                          [Kernel PMU event]
      
      ...
      
          hisi_sccl7_l3c21/wr_hit_cpipe/                     [Kernel PMU event]
          hisi_sccl7_l3c21/wr_hit_spipe/                     [Kernel PMU event]
          hisi_sccl7_l3c21/wr_spipe/                         [Kernel PMU event]
          inst_retired OR armv8_pmuv3_0/inst_retired/        [Kernel PMU event]
          inst_spec OR armv8_pmuv3_0/inst_spec/              [Kernel PMU event]
          itlb_walk OR armv8_pmuv3_0/itlb_walk/              [Kernel PMU event]
          l1d_cache OR armv8_pmuv3_0/l1d_cache/              [Kernel PMU event]
          l1d_cache_refill OR armv8_pmuv3_0/l1d_cache_refill/ [Kernel PMU event]
          l1d_cache_wb OR armv8_pmuv3_0/l1d_cache_wb/        [Kernel PMU event]
          l1d_tlb OR armv8_pmuv3_0/l1d_tlb/                  [Kernel PMU event]
          l1d_tlb_refill OR armv8_pmuv3_0/l1d_tlb_refill/    [Kernel PMU event]
      
      So the events are list alphabetically. However, CPU core event listing is
      special from commit dc098b35 ("perf list: List kernel supplied event
      aliases"), in that the alias and full event is shown (in that order).
      As such, the core events may become sparse.
      
      Improve this by grouping the CPU core events and ensure that they are
      listed first for kernel PMU events. For the first example, above, this
      now looks like:
      
          duration_time                                      [Tool event]
          branch-instructions OR cpu/branch-instructions/    [Kernel PMU event]
          branch-misses OR cpu/branch-misses/                [Kernel PMU event]
          bus-cycles OR cpu/bus-cycles/                      [Kernel PMU event]
          cache-misses OR cpu/cache-misses/                  [Kernel PMU event]
          cache-references OR cpu/cache-references/          [Kernel PMU event]
          cpu-cycles OR cpu/cpu-cycles/                      [Kernel PMU event]
          cycles-ct OR cpu/cycles-ct/                        [Kernel PMU event]
          cycles-t OR cpu/cycles-t/                          [Kernel PMU event]
          el-abort OR cpu/el-abort/                          [Kernel PMU event]
          el-capacity OR cpu/el-capacity/                    [Kernel PMU event]
          el-commit OR cpu/el-commit/                        [Kernel PMU event]
          el-conflict OR cpu/el-conflict/                    [Kernel PMU event]
          el-start OR cpu/el-start/                          [Kernel PMU event]
          instructions OR cpu/instructions/                  [Kernel PMU event]
          mem-loads OR cpu/mem-loads/                        [Kernel PMU event]
          mem-stores OR cpu/mem-stores/                      [Kernel PMU event]
          ref-cycles OR cpu/ref-cycles/                      [Kernel PMU event]
          topdown-fetch-bubbles OR cpu/topdown-fetch-bubbles/ [Kernel PMU event]
          topdown-recovery-bubbles OR cpu/topdown-recovery-bubbles/ [Kernel PMU event]
          topdown-slots-issued OR cpu/topdown-slots-issued/  [Kernel PMU event]
          topdown-slots-retired OR cpu/topdown-slots-retired/ [Kernel PMU event]
          topdown-total-slots OR cpu/topdown-total-slots/    [Kernel PMU event]
          tx-abort OR cpu/tx-abort/                          [Kernel PMU event]
          tx-capacity OR cpu/tx-capacity/                    [Kernel PMU event]
          tx-commit OR cpu/tx-commit/                        [Kernel PMU event]
          tx-conflict OR cpu/tx-conflict/                    [Kernel PMU event]
          tx-start OR cpu/tx-start/                          [Kernel PMU event]
          cstate_core/c3-residency/                          [Kernel PMU event]
          cstate_core/c6-residency/                          [Kernel PMU event]
          cstate_core/c7-residency/                          [Kernel PMU event]
          cstate_pkg/c2-residency/                           [Kernel PMU event]
          cstate_pkg/c3-residency/                           [Kernel PMU event]
          cstate_pkg/c6-residency/                           [Kernel PMU event]
          cstate_pkg/c7-residency/                           [Kernel PMU event]
      Signed-off-by: default avatarJohn Garry <john.garry@huawei.com>
      Acked-by: default avatarJiri Olsa <jolsa@redhat.com>
      Acked-by: default avatarNamhyung Kim <namhyung@kernel.org>
      Tested-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Andi Kleen <ak@linux.intel.com>
      Cc: Ian Rogers <irogers@google.com>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Will Deacon <will@kernel.org>
      Cc: linux-arm-kernel@lists.infradead.org
      Cc: linuxarm@huawei.com
      Link: http://lore.kernel.org/lkml/1592384514-119954-3-git-send-email-john.garry@huawei.comSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      ce0dc7d2
    • John Garry's avatar
      perf pmu: List kernel supplied event aliases for arm64 · c1b4745b
      John Garry authored
      In commit dc098b35 ("perf list: List kernel supplied event aliases"),
      the aliases for events are supplied in addition to CPU event in perf list.
      
      This relies on the name of the core PMU being "cpu", which is not the case
      for arm64, so arm64 has always missed this. Use generic is_pmu_core()
      helper which takes account of arm64 to make this feature work for arm64
      (and possibly other archs).
      
      Sample, before:
      
        armv8_pmuv3_0/br_mis_pred/          [Kernel PMU event]
      
      after:
      
        br_mis_pred OR armv8_pmuv3_0/br_mis_pred/          [Kernel PMU event]
      Signed-off-by: default avatarJohn Garry <john.garry@huawei.com>
      Acked-by: default avatarJiri Olsa <jolsa@redhat.com>
      Acked-by: default avatarNamhyung Kim <namhyung@kernel.org>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Andi Kleen <ak@linux.intel.com>
      Cc: Ian Rogers <irogers@google.com>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Will Deacon <will@kernel.org>
      Cc: linux-arm-kernel@lists.infradead.org
      Cc: linuxarm@huawei.com
      Link: http://lore.kernel.org/lkml/1592384514-119954-2-git-send-email-john.garry@huawei.comSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      c1b4745b
    • Mike Leach's avatar
      perf cs-etm: Allow no CoreSight sink to be specified on command line · 47446212
      Mike Leach authored
      Adjust the handling of the session sink selection to allow no sink to be
      selected on the command line. This then forwards the sink selection to
      the CoreSight infrastructure which will attempt to select a sink based
      on the default sink select priorities.
      Signed-off-by: default avatarMike Leach <mike.leach@linaro.org>
      Tested-by: default avatarLeo Yan <leo.yan@linaro.org>
      Cc: Mathieu Poirier <mathieu.poirier@linaro.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Suzuki Poulouse <suzuki.poulose@arm.com>
      Cc: coresight@lists.linaro.org
      Cc: linux-arm-kernel@lists.infradead.org
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      47446212
    • Ian Rogers's avatar
      perf expr: Add < and > operators · ff1a12f9
      Ian Rogers authored
      These are broadly useful but required to handle TMA metrics. For example
      encoding Ports_Utilization from:
      
        https://download.01.org/perfmon/TMA_Metrics.csv
      
      requires '<'.
      
        {
          "BriefDescription": "This metric estimates fraction of cycles the CPU performance was potentially limited due to Core computation issues (non divider-related).  Two distinct categories can be attributed into this metric: (1) heavy data-dependency among contiguous instructions would manifest in this metric - such cases are often referred to as low Instruction Level Parallelism (ILP). (2) Contention on some hardware execution unit other than Divider. For example; when there are too many multiply operations.",
          "MetricExpr": "( ( cpu@EXE_ACTIVITY.EXE_BOUND_0_PORTS@ + cpu@EXE_ACTIVITY.1_PORTS_UTIL@ + ( cpu@EXE_ACTIVITY.2_PORTS_UTIL@ * ( ( ( cpu@UOPS_RETIRED.RETIRE_SLOTS@ ) / ( cpu@CPU_CLK_UNHALTED.THREAD@ ) ) / ( ( 4.000000 ) + 1.000000 ) ) ) ) / ( cpu@CPU_CLK_UNHALTED.THREAD@ ) if ( cpu@ARITH.DIVIDER_ACTIVE\\,cmask\\=1@ < cpu@EXE_ACTIVITY.EXE_BOUND_0_PORTS@ ) else ( ( cpu@EXE_ACTIVITY.EXE_BOUND_0_PORTS@ + cpu@EXE_ACTIVITY.1_PORTS_UTIL@ + ( cpu@EXE_ACTIVITY.2_PORTS_UTIL@ * ( ( ( cpu@UOPS_RETIRED.RETIRE_SLOTS@ ) / ( cpu@CPU_CLK_UNHALTED.THREAD@ ) ) / ( ( 4.000000 ) + 1.000000 ) ) ) ) - cpu@EXE_ACTIVITY.EXE_BOUND_0_PORTS@ ) / ( cpu@CPU_CLK_UNHALTED.THREAD@ ) )",
          "MetricGroup": "Topdown_Group_Ports_Utilization",
          "MetricName": "Topdown_Metric_Ports_Utilization"
        },
      Signed-off-by: default avatarIan Rogers <irogers@google.com>
      Acked-by: default avatarJiri Olsa <jolsa@redhat.com>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Andi Kleen <ak@linux.intel.com>
      Cc: Jin Yao <yao.jin@linux.intel.com>
      Cc: John Garry <john.garry@huawei.com>
      Cc: Kajol Jain <kjain@linux.ibm.com>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Paul Clarke <pc@us.ibm.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Stephane Eranian <eranian@google.com>
      Link: http://lore.kernel.org/lkml/20200610235823.52557-2-irogers@google.comSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      ff1a12f9
    • Ian Rogers's avatar
      perf expr: Add d_ratio operation · 3e21a28a
      Ian Rogers authored
      d_ratio avoids division by 0 yielding infinity, such as when a counter
      doesn't get scheduled. An example usage is:
      
        {
            "BriefDescription": "DCache L1 misses",
            "MetricExpr": "d_ratio(MEM_LOAD_RETIRED.L1_MISS, MEM_LOAD_RETIRED.L1_HIT + MEM_LOAD_RETIRED.L1_MISS + MEM_LOAD_RETIRED.FB_HIT)",
            "MetricGroup": "DCache;DCache_L1",
            "MetricName": "DCache_L1_Miss",
            "ScaleUnit": "100%",
        }
      Signed-off-by: default avatarIan Rogers <irogers@google.com>
      Acked-by: default avatarJiri Olsa <jolsa@redhat.com>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Andi Kleen <ak@linux.intel.com>
      Cc: Jin Yao <yao.jin@linux.intel.com>
      Cc: John Garry <john.garry@huawei.com>
      Cc: Kajol Jain <kjain@linux.ibm.com>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Paul Clarke <pc@us.ibm.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Stephane Eranian <eranian@google.com>
      Link: http://lore.kernel.org/lkml/20200610235823.52557-1-irogers@google.comSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      3e21a28a
    • Arnaldo Carvalho de Melo's avatar
      perf script: Fixup some evsel/evlist method names · afdd63f5
      Arnaldo Carvalho de Melo authored
      Fixups related to the introduction of libperf, where the
      perf_{evsel,evlist}__ prefix is reserved for functions operating on
      struct perf_{evsel,evlist}.
      
      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>
      afdd63f5
    • Jiri Olsa's avatar
      perf tests: Add parse metric test for frontend metric · 218ca91d
      Jiri Olsa authored
      Adding new metric test for frontend metric. It's stolen from x86 pmu
      events.
      
      Committer testing:
      
        # perf test "Parse and process metrics"
        67: Parse and process metrics                             : Ok
        # perf test -v "Parse and process metrics"
        #
        67: Parse and process metrics                             :
        --- start ---
        test child forked, pid 104881
        metric expr inst_retired.any / cpu_clk_unhalted.thread for IPC
        found event inst_retired.any
        found event cpu_clk_unhalted.thread
        adding {inst_retired.any,cpu_clk_unhalted.thread}:W
        metric expr idq_uops_not_delivered.core / (4 * (( ( cpu_clk_unhalted.thread / 2 ) * ( 1 + cpu_clk_unhalted.one_thread_active / cpu_clk_unhalted.ref_xclk ) ))) for Frontend_Bound_SMT
        found event cpu_clk_unhalted.one_thread_active
        found event cpu_clk_unhalted.ref_xclk
        found event idq_uops_not_delivered.core
        found event cpu_clk_unhalted.thread
        adding {cpu_clk_unhalted.one_thread_active,cpu_clk_unhalted.ref_xclk,idq_uops_not_delivered.core,cpu_clk_unhalted.thread}:W
        test child finished with 0
        ---- end ----
        Parse and process metrics: Ok
        #
      
      Had to fix it to initialize that 'struct value' array sentinel with a
      named initializer to fix the build with some versions of clang:
      
        tests/parse-metric.c:154:7: error: missing field 'val' initializer [-Werror,-Wmissing-field-initializers]
                      { 0 },
      Signed-off-by: default avatarJiri Olsa <jolsa@kernel.org>
      Acked-by: default avatarIan Rogers <irogers@google.com>
      Tested-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Andi Kleen <ak@linux.intel.com>
      Cc: Michael Petlan <mpetlan@redhat.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/20200602214741.1218986-14-jolsa@kernel.orgSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      218ca91d
    • Jiri Olsa's avatar
      perf tests: Add parse metric test for ipc metric · 0a507af9
      Jiri Olsa authored
      Adding new test that process metrics code and checks the expected
      results. Starting with easy ipc metric.
      
      Committer testing:
      
        # perf test "Parse and process metrics"
        67: Parse and process metrics                             : Ok
        #
        # perf test -v "Parse and process metrics"
        67: Parse and process metrics                             :
        --- start ---
        test child forked, pid 103402
        metric expr inst_retired.any / cpu_clk_unhalted.thread for IPC
        found event inst_retired.any
        found event cpu_clk_unhalted.thread
        adding {inst_retired.any,cpu_clk_unhalted.thread}:W
        test child finished with 0
        ---- end ----
        Parse and process metrics: Ok
        #
      
      Had to fix it to initialize that 'struct value' array sentinel with a
      named initializer to fix the build with some versions of clang:
      
        tests/parse-metric.c:135:7: error: missing field 'val' initializer [-Werror,-Wmissing-field-initializers]
                      { 0 },
      Signed-off-by: default avatarJiri Olsa <jolsa@kernel.org>
      Acked-by: default avatarIan Rogers <irogers@google.com>
      Tested-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Andi Kleen <ak@linux.intel.com>
      Cc: Michael Petlan <mpetlan@redhat.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/20200602214741.1218986-13-jolsa@kernel.orgSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      0a507af9
    • Jiri Olsa's avatar
      perf tools: Add test_generic_metric function · 6d432c4c
      Jiri Olsa authored
      Adding test_generic_metric that prepares and runs given metric over the
      data from struct runtime_stat object.
      Signed-off-by: default avatarJiri Olsa <jolsa@kernel.org>
      Acked-by: default avatarIan Rogers <irogers@google.com>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Andi Kleen <ak@linux.intel.com>
      Cc: Michael Petlan <mpetlan@redhat.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/20200602214741.1218986-12-jolsa@kernel.orgSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      6d432c4c
    • Jiri Olsa's avatar
      perf tools: Release metric_events rblist · 9afe5658
      Jiri Olsa authored
      We don't release metric_events rblist, add the missing delete hook and
      call the release before leaving cmd_stat.
      Signed-off-by: default avatarJiri Olsa <jolsa@kernel.org>
      Acked-by: default avatarIan Rogers <irogers@google.com>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Andi Kleen <ak@linux.intel.com>
      Cc: Michael Petlan <mpetlan@redhat.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/20200602214741.1218986-11-jolsa@kernel.orgSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      9afe5658
    • Jiri Olsa's avatar
      perf tools: Factor out prepare_metric function · 2cfaa853
      Jiri Olsa authored
      Factoring out prepare_metric function so it can be used in test
      interface coming in following changes.
      Signed-off-by: default avatarJiri Olsa <jolsa@kernel.org>
      Acked-by: default avatarIan Rogers <irogers@google.com>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Andi Kleen <ak@linux.intel.com>
      Cc: Michael Petlan <mpetlan@redhat.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/20200602214741.1218986-10-jolsa@kernel.orgSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      2cfaa853
    • Jiri Olsa's avatar
      perf tools: Add metricgroup__parse_groups_test function · f78ac00a
      Jiri Olsa authored
      Add the metricgroup__parse_groups_test function. It will be used as
      test's interface to metric parsing in following changes.
      Signed-off-by: default avatarJiri Olsa <jolsa@kernel.org>
      Acked-by: default avatarIan Rogers <irogers@google.com>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Andi Kleen <ak@linux.intel.com>
      Cc: Michael Petlan <mpetlan@redhat.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/20200602214741.1218986-9-jolsa@kernel.orgSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      f78ac00a
    • Jiri Olsa's avatar
      perf tools: Add map to parse_groups() function · 1381396b
      Jiri Olsa authored
      For testing purposes we need to pass our own map of events from
      parse_groups() through metricgroup__add_metric.
      Acked-by: default avatarIan Rogers <irogers@google.com>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Andi Kleen <ak@linux.intel.com>
      Cc: Ingo Molnar <mingo@kernel.org>
      Cc: Michael Petlan <mpetlan@redhat.com>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Stephane Eranian <eranian@google.com>
      Link: http://lore.kernel.org/lkml/20200602214741.1218986-8-jolsa@kernel.orgSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      1381396b
    • Jiri Olsa's avatar
      perf tools: Add fake_pmu to parse_group() function · 68173bda
      Jiri Olsa authored
      Allow to pass fake_pmu in parse_groups function so it can be used in
      parse_events call.
      
      It's will be passed by the upcoming metricgroup__parse_groups_test
      function.
      
      Committer notes:
      
      Made it a 'struct perf_pmu' pointer, in line with the changes at the
      start of this patchkit to avoid statics deep down in library code.
      Acked-by: default avatarIan Rogers <irogers@google.com>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Andi Kleen <ak@linux.intel.com>
      Cc: Ingo Molnar <mingo@kernel.org>
      Cc: Michael Petlan <mpetlan@redhat.com>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Stephane Eranian <eranian@google.com>
      Link: http://lore.kernel.org/lkml/20200602214741.1218986-6-jolsa@kernel.orgSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      68173bda
    • Jiri Olsa's avatar
      perf parse: Factor out parse_groups() function · 8b4468a2
      Jiri Olsa authored
      Factor out the parse_groups function, it will be used for new test
      interface coming in following changes.
      Signed-off-by: default avatarJiri Olsa <jolsa@kernel.org>
      Acked-by: default avatarIan Rogers <irogers@google.com>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Andi Kleen <ak@linux.intel.com>
      Cc: Michael Petlan <mpetlan@redhat.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/20200602214741.1218986-6-jolsa@kernel.orgSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      8b4468a2
    • Jiri Olsa's avatar
      perf tests: Add another metric parsing test · e1c92a7f
      Jiri Olsa authored
      The test goes through all metrics compiled for arch within pmu events
      and try to parse them.
      
      This test is different from 'test_parsing' in that we go through all the
      events in the current arch, not just one defined for current CPU model.
      Using 'fake_pmu' to parse events which do not have PMUs defined in the
      system.
      
      Say there's bad change in ivybridge metrics file, like:
      
        - a/tools/perf/pmu-events/arch/x86/ivybridge/ivb-metrics.json
        + b/tools/perf/pmu-events/arch/x86/ivybridge/ivb-metrics.json
        @@ -8,7 +8,7 @@
        -        "MetricExpr": "IDQ_UOPS_NOT_DELIVERED.CORE / (4 * ((
        +        "MetricExpr": "IDQ_UOPS_NOT_DELIVERED.CORE / / (4 *
      
      the test fails with (on my kabylake laptop):
      
        $ perf test 'Parsing of PMU event table metrics with fake PMUs' -v
        parsing 'idq_uops_not_delivered.core / / (4 * (( ( cpu_clk_unh...
        syntax error, line 1
        expr__parse failed
        test child finished with -1
        ...
      
      The test also defines its own list of metrics and tries to parse them.
      It's handy for developing.
      
      Committer notes:
      
      Testing it:
      
        $ perf test fake
        10: PMU events                                            :
        10.4: Parsing of PMU event table metrics with fake PMUs   : FAILED!
        $ perf test -v fake |& tail
        parsing '(unc_p_freq_trans_cycles / unc_p_clockticks) * 100.'
        parsing '(unc_m_power_channel_ppd / unc_m_clockticks) * 100.'
        parsing '(unc_m_power_critical_throttle_cycles / unc_m_clockticks) * 100.'
        parsing '(unc_m_power_self_refresh / unc_m_clockticks) * 100.'
        parsing 'idq_uops_not_delivered.core / * (4 * cycles)'
        syntax error
        expr__parse failed
        test child finished with -1
        ---- end ----
        PMU events subtest 4: FAILED!
        $
      
      And fix this error:
      
        tests/pmu-events.c:437:40: error: missing field 'idx' initializer [-Werror,-Wmissing-field-initializers]
              struct parse_events_error error = { 0 };
      Signed-off-by: default avatarJiri Olsa <jolsa@kernel.org>
      Tested-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Andi Kleen <ak@linux.intel.com>
      Cc: Ian Rogers <irogers@google.com>
      Cc: Ingo Molnar <mingo@kernel.org>
      Cc: Michael Petlan <mpetlan@redhat.com>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Stephane Eranian <eranian@google.com>
      Link: http://lore.kernel.org/lkml/20200602214741.1218986-5-jolsa@kernel.orgSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      e1c92a7f
    • Arnaldo Carvalho de Melo's avatar
      perf pmu: Add a perf_pmu__fake object to use with __parse_events() · e46fc8d9
      Arnaldo Carvalho de Melo authored
      When wanting to use the support in __parse_events() for fake pmus, just
      pass it.
      
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Andi Kleen <ak@linux.intel.com>
      Cc: Ian Rogers <irogers@google.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Michael Petlan <mpetlan@redhat.com>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Stephane Eranian <eranian@google.com>
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      e46fc8d9
    • Arnaldo Carvalho de Melo's avatar
      perf parse: Provide a way to pass a fake_pmu to parse_events() · 3bf91aa5
      Arnaldo Carvalho de Melo authored
      This is an alternative patch to what Jiri sent that instead of changing
      all callers to parse_events() for allowing to pass a fake_pmu, provide
      another function specifically for that.
      
      From Jiri's patch:
      
      This way it's possible to parse events from PMUs which are not present
      in the system. It's available only for testing purposes coming in
      following changes, so all the current users set fake_pmu argument as
      false.
      Based-on-a-patch-by: default avatarJiri Olsa <jolsa@kernel.org>
      Link: http://lore.kernel.org/lkml/20200602214741.1218986-3-jolsa@kernel.orgAcked-by: default avatarJiri Olsa <jolsa@kernel.org>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Andi Kleen <ak@linux.intel.com>
      Cc: Ian Rogers <irogers@google.com>
      Cc: Ingo Molnar <mingo@kernel.org>
      Cc: Michael Petlan <mpetlan@redhat.com>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Stephane Eranian <eranian@google.com>
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      3bf91aa5
    • Jiri Olsa's avatar
      perf tests: Factor check_parse_id function · 34bacc95
      Jiri Olsa authored
      Separating the generic part of check_parse_id function,
      so it can be used in following changes for the new test.
      
      Committer notes:
      
      Fix this error:
      
        tests/pmu-events.c:413:40: error: missing field 'idx' initializer [-Werror,-Wmissing-field-initializers]
              struct parse_events_error error = { 0 };
      Signed-off-by: default avatarJiri Olsa <jolsa@kernel.org>
      Acked-by: default avatarIan Rogers <irogers@google.com>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Andi Kleen <ak@linux.intel.com>
      Cc: Michael Petlan <mpetlan@redhat.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/20200602214741.1218986-4-jolsa@kernel.orgSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      34bacc95
    • Jiri Olsa's avatar
      perf tools: Add fake pmu support · 387ad33f
      Jiri Olsa authored
      Add a way to create a pmu event without the actual PMU being in place.
      
      This way we can test metrics defined for any processor.
      
      The interface is to define fake_pmu in struct parse_events_state data.
      It will be used only in tests via special interface function added in
      following changes.
      Signed-off-by: default avatarJiri Olsa <jolsa@kernel.org>
      Acked-by: default avatarIan Rogers <irogers@google.com>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Andi Kleen <ak@linux.intel.com>
      Cc: Michael Petlan <mpetlan@redhat.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/20200602214741.1218986-2-jolsa@kernel.orgSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      387ad33f
    • Jason Yan's avatar
      perf annotate: Remove unneeded conversion to bool · a1f8bc95
      Jason Yan authored
      The '>' expression itself is bool, no need to convert it to bool again.
      This fixes the following coccicheck warning:
      
        tools/perf/ui/browsers/annotate.c:212:30-35: WARNING: conversion to bool
        not needed here
      Signed-off-by: default avatarJason Yan <yanaijie@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: Peter Zijlstra <peterz@infradead.org>
      Link: http://lore.kernel.org/lkml/20200420123528.11655-1-yanaijie@huawei.comSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      a1f8bc95
    • Andreas Gerstmayr's avatar
      perf flamegraph: Explicitly set utf-8 encoding · c42ad5d4
      Andreas Gerstmayr authored
      On some platforms the default encoding is not utf-8, which causes an
      UnicodeDecodeError when reading the flamegraph template and writing the
      flamegraph
      Signed-off-by: default avatarAndreas Gerstmayr <agerstmayr@redhat.com>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Cc: Michael Petlan <mpetlan@redhat.com>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Link: http://lore.kernel.org/lkml/20200619153232.203537-1-agerstmayr@redhat.comSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      c42ad5d4
    • Jason A. Donenfeld's avatar
      Revert "kernel/printk: add kmsg SEEK_CUR handling" · 625d3449
      Jason A. Donenfeld authored
      This reverts commit 8ece3b3e.
      
      This commit broke userspace. Bash uses ESPIPE to determine whether or
      not the file should be read using "unbuffered I/O", which means reading
      1 byte at a time instead of 128 bytes at a time. I used to use bash to
      read through kmsg in a really quite nasty way:
      
          while read -t 0.1 -r line 2>/dev/null || [[ $? -ne 142 ]]; do
             echo "SARU $line"
          done < /dev/kmsg
      
      This will show all lines that can fit into the 128 byte buffer, and skip
      lines that don't. That's pretty awful, but at least it worked.
      
      With this change, bash now tries to do 1-byte reads, which means it
      skips all the lines, which is worse than before.
      
      Now, I don't really care very much about this, and I'm already look for
      a workaround. But I did just spend an hour trying to figure out why my
      scripts were broken. Either way, it makes no difference to me personally
      whether this is reverted, but it might be something to consider. If you
      declare that "trying to read /dev/kmsg with bash is terminally stupid
      anyway," I might be inclined to agree with you. But do note that bash
      uses lseek(fd, 0, SEEK_CUR)==>ESPIPE to determine whether or not it's
      reading from a pipe.
      
      Cc: Bruno Meneguele <bmeneg@redhat.com>
      Cc: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>
      Cc: Steven Rostedt <rostedt@goodmis.org>
      Cc: David Laight <David.Laight@ACULAB.COM>
      Cc: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>
      Cc: Petr Mladek <pmladek@suse.com>
      Signed-off-by: default avatarJason A. Donenfeld <Jason@zx2c4.com>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      625d3449
  2. 21 Jun, 2020 10 commits
    • Linus Torvalds's avatar
      Linux 5.8-rc2 · 48778464
      Linus Torvalds authored
      48778464
    • Linus Torvalds's avatar
      Merge tag 'selinux-pr-20200621' of git://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/selinux · 817d914d
      Linus Torvalds authored
      Pull SELinux fixes from Paul Moore:
       "Three small patches to fix problems in the SELinux code, all found via
        clang.
      
        Two patches fix potential double-free conditions and one fixes an
        undefined return value"
      
      * tag 'selinux-pr-20200621' of git://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/selinux:
        selinux: fix undefined return of cond_evaluate_expr
        selinux: fix a double free in cond_read_node()/cond_read_list()
        selinux: fix double free
      817d914d
    • Linus Torvalds's avatar
      Merge tag 'pinctrl-v5.8-2' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl · 16f4aa9b
      Linus Torvalds authored
      Pull pin control fixes from Linus Walleij:
       "Some early fixes collected during the first week after the merge
        window, all pretty self-evident, with the details below. The revert is
        the crucial thing.
      
         - Fix a warning on the Qualcomm SPMI GPIO chip being instatiated
           twice without a unique irqchip struct
      
         - Use the noirq variants of the suspend and resume callbacks in the
           Tegra driver
      
         - Clean up the errorpath on the MCP23s08 driver
      
         - Revert the use of devm_of_iomap() in the Freescale driver as it was
           regressing the platform
      
         - Add some missing pins in the Qualcomm IPQ6018 driver
      
         - Fix a simple documentation bug in the pinctrl-single driver"
      
      * tag 'pinctrl-v5.8-2' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl:
        pinctrl: single: fix function name in documentation
        pinctrl: qcom: ipq6018 Add missing pins in qpic pin group
        Revert "pinctrl: freescale: imx: Use 'devm_of_iomap()' to avoid a resource leak in case of error in 'imx_pinctrl_probe()'"
        pinctrl: mcp23s08: Split to three parts: fix ptr_ret.cocci warnings
        pinctrl: tegra: Use noirq suspend/resume callbacks
        pinctrl: qcom: spmi-gpio: fix warning about irq chip reusage
      16f4aa9b
    • Linus Torvalds's avatar
      Merge tag 'kbuild-fixes-v5.8' of... · be9160a9
      Linus Torvalds authored
      Merge tag 'kbuild-fixes-v5.8' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild
      
      Pull Kbuild fixes from Masahiro Yamada:
      
       - fix -gz=zlib compiler option test for CONFIG_DEBUG_INFO_COMPRESSED
      
       - improve cc-option in scripts/Kbuild.include to clean up temp files
      
       - improve cc-option in scripts/Kconfig.include for more reliable
         compile option test
      
       - do not copy modules.builtin by 'make install' because it would break
         existing systems
      
       - use 'userprogs' syntax for watch_queue sample
      
      * tag 'kbuild-fixes-v5.8' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild:
        samples: watch_queue: build sample program for target architecture
        Revert "Makefile: install modules.builtin even if CONFIG_MODULES=n"
        scripts: Fix typo in headers_install.sh
        kconfig: unify cc-option and as-option
        kbuild: improve cc-option to clean up all temporary files
        Makefile: Improve compressed debug info support detection
      be9160a9
    • Linus Torvalds's avatar
      Merge tag 'powerpc-5.8-3' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux · 75613939
      Linus Torvalds authored
      Pull powerpc fixes from Michael Ellerman:
      
       - One fix for the interrupt rework we did last release which broke
         KVM-PR
      
       - Three commits fixing some fallout from the READ_ONCE() changes
         interacting badly with our 8xx 16K pages support, which uses a pte_t
         that is a structure of 4 actual PTEs
      
       - A cleanup of the 8xx pte_update() to use the newly added pmd_off()
      
       - A fix for a crash when handling an oops if CONFIG_DEBUG_VIRTUAL is
         enabled
      
       - A minor fix for the SPU syscall generation
      
      Thanks to Aneesh Kumar K.V, Christian Zigotzky, Christophe Leroy, Mike
      Rapoport, Nicholas Piggin.
      
      * tag 'powerpc-5.8-3' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux:
        powerpc/8xx: Provide ptep_get() with 16k pages
        mm: Allow arches to provide ptep_get()
        mm/gup: Use huge_ptep_get() in gup_hugepte()
        powerpc/syscalls: Use the number when building SPU syscall table
        powerpc/8xx: use pmd_off() to access a PMD entry in pte_update()
        powerpc/64s: Fix KVM interrupt using wrong save area
        powerpc: Fix kernel crash in show_instructions() w/DEBUG_VIRTUAL
      75613939
    • Linus Torvalds's avatar
      Merge branch 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6 · 93bbca27
      Linus Torvalds authored
      Pull crypto fixes from Herbert Xu:
      
       - NULL dereference in octeontx
      
       - PM reference imbalance in ks-sa
      
       - deadlock in crypto manager
      
       - memory leak in drbg
      
       - missing socket limit check on receive SG list size in algif_skcipher
      
       - typos in caam
      
       - warnings in ccp and hisilicon
      
      * 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6:
        crypto: drbg - always try to free Jitter RNG instance
        crypto: marvell/octeontx - Fix a potential NULL dereference
        crypto: algboss - don't wait during notifier callback
        crypto: caam - fix typos
        crypto: ccp - Fix sparse warnings in sev-dev
        crypto: hisilicon - Cap block size at 2^31
        crypto: algif_skcipher - Cap recv SG list at ctx->used
        hwrng: ks-sa - Fix runtime PM imbalance on error
      93bbca27
    • Masahiro Yamada's avatar
      samples: watch_queue: build sample program for target architecture · 214377e9
      Masahiro Yamada authored
      This userspace program includes UAPI headers exported to usr/include/.
      'make headers' always works for the target architecture (i.e. the same
      architecture as the kernel), so the sample program should be built for
      the target as well. Kbuild now supports 'userprogs' for that.
      
      I also guarded the CONFIG option by 'depends on CC_CAN_LINK' because
      $(CC) may not provide libc.
      Signed-off-by: default avatarMasahiro Yamada <masahiroy@kernel.org>
      214377e9
    • Masahiro Yamada's avatar
      Revert "Makefile: install modules.builtin even if CONFIG_MODULES=n" · 2c6d9636
      Masahiro Yamada authored
      This reverts commit e0b250b5,
      which broke build systems that need to install files to a certain
      path, but do not set INSTALL_MOD_PATH when invoking 'make install'.
      
        $ make INSTALL_PATH=/tmp/destdir install
        mkdir: cannot create directory ‘/lib/modules/5.8.0-rc1+/’: Permission denied
        Makefile:1342: recipe for target '_builtin_inst_' failed
        make: *** [_builtin_inst_] Error 1
      
      While modules.builtin is useful also for CONFIG_MODULES=n, this change
      in the behavior is quite unexpected. Maybe "make modules_install"
      can install modules.builtin irrespective of CONFIG_MODULES as Jonas
      originally suggested.
      
      Anyway, that commit should be reverted ASAP.
      Reported-by: default avatarDouglas Anderson <dianders@chromium.org>
      Reported-by: default avatarGuenter Roeck <linux@roeck-us.net>
      Cc: Jonas Karlman <jonas@kwiboo.se>
      Signed-off-by: default avatarMasahiro Yamada <masahiroy@kernel.org>
      Reviewed-by: default avatarGuenter Roeck <linux@roeck-us.net>
      Tested-by: default avatarGuenter Roeck <linux@roeck-us.net>
      2c6d9636
    • Linus Torvalds's avatar
      Merge tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi · 64677779
      Linus Torvalds authored
      Pull SCSI fixes from James Bottomley:
       "One minor fix and two patches reworking the ata dma drain for the
        !CONFIG_LIBATA case. The latter is a 5.7 regression fix"
      
      * tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi:
        scsi: Wire up ata_scsi_dma_need_drain for SAS HBA drivers
        scsi: libata: Provide an ata_scsi_dma_need_drain stub for !CONFIG_ATA
        scsi: ufs-bsg: Fix runtime PM imbalance on error
      64677779
    • Linus Torvalds's avatar
      Merge branch 'i2c/for-current' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux · a5c6a1f0
      Linus Torvalds authored
      Pull i2c fixes from Wolfram Sang:
      
       - a small collection of remaining API conversion patches (all acked)
         which allow to finally remove the deprecated API
      
       - some documentation fixes and a MAINTAINERS addition
      
      * 'i2c/for-current' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux:
        MAINTAINERS: Add robert and myself as qcom i2c cci maintainers
        i2c: smbus: Fix spelling mistake in the comments
        Documentation/i2c: SMBus start signal is S not A
        i2c: remove deprecated i2c_new_device API
        Documentation: media: convert to use i2c_new_client_device()
        video: backlight: tosa_lcd: convert to use i2c_new_client_device()
        x86/platform/intel-mid: convert to use i2c_new_client_device()
        drm: encoder_slave: use new I2C API
        drm: encoder_slave: fix refcouting error for modules
      a5c6a1f0
  3. 20 Jun, 2020 4 commits
    • Drew Fustini's avatar
      pinctrl: single: fix function name in documentation · 25fae752
      Drew Fustini authored
      Use the correct the function name in the documentation for
      "pcs_parse_one_pinctrl_entry()".
      
      "smux_parse_one_pinctrl_entry()" appears to be an artifact from the
      development of a prior patch series ("simple pinmux driver") which
      transformed into pinctrl-single.
      Signed-off-by: default avatarDrew Fustini <drew@beagleboard.org>
      Link: https://lore.kernel.org/r/20200612112758.GA3407886@x1Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
      25fae752
    • Linus Torvalds's avatar
      Merge tag 'trace-v5.8-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace · 8b6ddd10
      Linus Torvalds authored
      Pull tracing fixes from Steven Rostedt:
      
       - Have recordmcount work with > 64K sections (to support LTO)
      
       - kprobe RCU fixes
      
       - Correct a kprobe critical section with missing mutex
      
       - Remove redundant arch_disarm_kprobe() call
      
       - Fix lockup when kretprobe triggers within kprobe_flush_task()
      
       - Fix memory leak in fetch_op_data operations
      
       - Fix sleep in atomic in ftrace trace array sample code
      
       - Free up memory on failure in sample trace array code
      
       - Fix incorrect reporting of function_graph fields in format file
      
       - Fix quote within quote parsing in bootconfig
      
       - Fix return value of bootconfig tool
      
       - Add testcases for bootconfig tool
      
       - Fix maybe uninitialized warning in ftrace pid file code
      
       - Remove unused variable in tracing_iter_reset()
      
       - Fix some typos
      
      * tag 'trace-v5.8-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace:
        ftrace: Fix maybe-uninitialized compiler warning
        tools/bootconfig: Add testcase for show-command and quotes test
        tools/bootconfig: Fix to return 0 if succeeded to show the bootconfig
        tools/bootconfig: Fix to use correct quotes for value
        proc/bootconfig: Fix to use correct quotes for value
        tracing: Remove unused event variable in tracing_iter_reset
        tracing/probe: Fix memleak in fetch_op_data operations
        trace: Fix typo in allocate_ftrace_ops()'s comment
        tracing: Make ftrace packed events have align of 1
        sample-trace-array: Remove trace_array 'sample-instance'
        sample-trace-array: Fix sleeping function called from invalid context
        kretprobe: Prevent triggering kretprobe from within kprobe_flush_task
        kprobes: Remove redundant arch_disarm_kprobe() call
        kprobes: Fix to protect kick_kprobe_optimizer() by kprobe_mutex
        kprobes: Use non RCU traversal APIs on kprobe_tables if possible
        kprobes: Suppress the suspicious RCU warning on kprobes
        recordmcount: support >64k sections
      8b6ddd10
    • Linus Torvalds's avatar
      Merge tag 'libnvdimm-for-5.8-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm · eede2b9b
      Linus Torvalds authored
      Pull libnvdimm updates from Dan Williams:
       "A feature (papr_scm health retrieval) and a fix (sysfs attribute
        visibility) for v5.8.
      
        Vaibhav explains in the merge commit below why missing v5.8 would be
        painful and I agreed to try a -rc2 pull because only cosmetics kept
        this out of -rc1 and his initial versions were posted in more than
        enough time for v5.8 consideration:
      
         'These patches are tied to specific features that were committed to
          customers in upcoming distros releases (RHEL and SLES) whose
          time-lines are tied to 5.8 kernel release.
      
          Being able to track the health of an nvdimm is critical for our
          customers that are running workloads leveraging papr-scm nvdimms.
          Missing the 5.8 kernel would mean missing the distro timelines and
          shifting forward the availability of this feature in distro kernels
          by at least 6 months'
      
        Summary:
      
         - Fix the visibility of the region 'align' attribute.
      
           The new unit tests for region alignment handling caught a corner
           case where the alignment cannot be specified if the region is
           converted from static to dynamic provisioning at runtime.
      
         - Add support for device health retrieval for the persistent memory
           supported by the papr_scm driver.
      
           This includes both the standard sysfs "health flags" that the nfit
           persistent memory driver publishes and a mechanism for the ndctl
           tool to retrieve a health-command payload"
      
      * tag 'libnvdimm-for-5.8-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm:
        nvdimm/region: always show the 'align' attribute
        powerpc/papr_scm: Implement support for PAPR_PDSM_HEALTH
        ndctl/papr_scm,uapi: Add support for PAPR nvdimm specific methods
        powerpc/papr_scm: Improve error logging and handling papr_scm_ndctl()
        powerpc/papr_scm: Fetch nvdimm health information from PHYP
        seq_buf: Export seq_buf_printf
        powerpc: Document details on H_SCM_HEALTH hcall
      eede2b9b
    • Sivaprakash Murugesan's avatar
      pinctrl: qcom: ipq6018 Add missing pins in qpic pin group · 7f5f4de8
      Sivaprakash Murugesan authored
      The patch adds missing qpic data pins to qpic pingroup. These pins are
      necessary for the qpic nand to work.
      
      Fixes: ef1ea54e ("pinctrl: qcom: Add ipq6018 pinctrl driver")
      Signed-off-by: default avatarSivaprakash Murugesan <sivaprak@codeaurora.org>
      Link: https://lore.kernel.org/r/1592541089-17700-1-git-send-email-sivaprak@codeaurora.orgSigned-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
      7f5f4de8