Skip to content
  1. Jan 13, 2022
    • Ian Rogers's avatar
      perf cpumap: Rename empty functions · 51b826fa
      Ian Rogers authored
      
      
      Remove cpu_map from name as a cpu_map isn't used. Pass a const pointer
      rather than by value to avoid unnecessary copying.
      
      Reviewed-by: default avatarJames Clark <james.clark@arm.com>
      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: Ingo Molnar <mingo@redhat.com>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Cc: John Garry <john.garry@huawei.com>
      Cc: Kajol Jain <kjain@linux.ibm.com>
      Cc: Kan Liang <kan.liang@linux.intel.com>
      Cc: Leo Yan <leo.yan@linaro.org>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Cc: Mathieu Poirier <mathieu.poirier@linaro.org>
      Cc: Mike Leach <mike.leach@linaro.org>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Paul Clarke <pc@us.ibm.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Riccardo Mancini <rickyman7@gmail.com>
      Cc: Stephane Eranian <eranian@google.com>
      Cc: Suzuki Poulouse <suzuki.poulose@arm.com>
      Cc: Vineet Singh <vineet.singh@intel.com>
      Cc: coresight@lists.linaro.org
      Cc: linux-arm-kernel@lists.infradead.org
      Cc: zhengjun.xing@intel.com
      Link: https://lore.kernel.org/r/20220105061351.120843-15-irogers@google.com
      
      
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      51b826fa
    • Ian Rogers's avatar
      perf cpumap: Simplify equal function name · 3ac23d19
      Ian Rogers authored
      
      
      Rename cpu_map__compare_aggr_cpu_id() to aggr_cpu_id__equal(), the
      cpu_map part of the name is misleading. Equal better describes the
      function than compare.
      
      Switch to const pointer rather than value as struct given the number of
      variables in aggr_cpu_id().
      
      Reviewed-by: default avatarJames Clark <james.clark@arm.com>
      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: Ingo Molnar <mingo@redhat.com>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Cc: John Garry <john.garry@huawei.com>
      Cc: Kajol Jain <kjain@linux.ibm.com>
      Cc: Kan Liang <kan.liang@linux.intel.com>
      Cc: Leo Yan <leo.yan@linaro.org>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Cc: Mathieu Poirier <mathieu.poirier@linaro.org>
      Cc: Mike Leach <mike.leach@linaro.org>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Paul Clarke <pc@us.ibm.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Riccardo Mancini <rickyman7@gmail.com>
      Cc: Stephane Eranian <eranian@google.com>
      Cc: Suzuki Poulouse <suzuki.poulose@arm.com>
      Cc: Vineet Singh <vineet.singh@intel.com>
      Cc: coresight@lists.linaro.org
      Cc: linux-arm-kernel@lists.infradead.org
      Cc: zhengjun.xing@intel.com
      Link: https://lore.kernel.org/r/20220105061351.120843-14-irogers@google.com
      
      
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      3ac23d19
    • Ian Rogers's avatar
      perf cpumap: Remove unused cpu_map__socket() · 63e0fa87
      Ian Rogers authored
      
      
      Unused function so remove.
      
      Reviewed-by: default avatarJames Clark <james.clark@arm.com>
      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: Ingo Molnar <mingo@redhat.com>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Cc: John Garry <john.garry@huawei.com>
      Cc: Kajol Jain <kjain@linux.ibm.com>
      Cc: Kan Liang <kan.liang@linux.intel.com>
      Cc: Leo Yan <leo.yan@linaro.org>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Cc: Mathieu Poirier <mathieu.poirier@linaro.org>
      Cc: Mike Leach <mike.leach@linaro.org>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Paul Clarke <pc@us.ibm.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Riccardo Mancini <rickyman7@gmail.com>
      Cc: Stephane Eranian <eranian@google.com>
      Cc: Suzuki Poulouse <suzuki.poulose@arm.com>
      Cc: Vineet Singh <vineet.singh@intel.com>
      Cc: coresight@lists.linaro.org
      Cc: linux-arm-kernel@lists.infradead.org
      Cc: zhengjun.xing@intel.com
      Link: https://lore.kernel.org/r/20220105061351.120843-13-irogers@google.com
      
      
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      63e0fa87
    • Ian Rogers's avatar
      perf cpumap: Add comments to aggr_cpu_id() · 49679da3
      Ian Rogers authored
      
      
      This code is already tested in topology.c.
      
      Reviewed-by: default avatarJames Clark <james.clark@arm.com>
      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: Ingo Molnar <mingo@redhat.com>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Cc: John Garry <john.garry@huawei.com>
      Cc: Kajol Jain <kjain@linux.ibm.com>
      Cc: Kan Liang <kan.liang@linux.intel.com>
      Cc: Leo Yan <leo.yan@linaro.org>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Cc: Mathieu Poirier <mathieu.poirier@linaro.org>
      Cc: Mike Leach <mike.leach@linaro.org>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Paul Clarke <pc@us.ibm.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Riccardo Mancini <rickyman7@gmail.com>
      Cc: Stephane Eranian <eranian@google.com>
      Cc: Suzuki Poulouse <suzuki.poulose@arm.com>
      Cc: Vineet Singh <vineet.singh@intel.com>
      Cc: coresight@lists.linaro.org
      Cc: linux-arm-kernel@lists.infradead.org
      Cc: zhengjun.xing@intel.com
      Link: https://lore.kernel.org/r/20220105061351.120843-12-irogers@google.com
      
      
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      49679da3
    • Ian Rogers's avatar
      perf cpumap: Remove map+index get_node() · 86d94048
      Ian Rogers authored
      
      
      Migrate final users to appropriate cpu variant.
      
      Reviewed-by: default avatarJames Clark <james.clark@arm.com>
      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: Ingo Molnar <mingo@redhat.com>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Cc: John Garry <john.garry@huawei.com>
      Cc: Kajol Jain <kjain@linux.ibm.com>
      Cc: Kan Liang <kan.liang@linux.intel.com>
      Cc: Leo Yan <leo.yan@linaro.org>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Cc: Mathieu Poirier <mathieu.poirier@linaro.org>
      Cc: Mike Leach <mike.leach@linaro.org>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Paul Clarke <pc@us.ibm.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Riccardo Mancini <rickyman7@gmail.com>
      Cc: Stephane Eranian <eranian@google.com>
      Cc: Suzuki Poulouse <suzuki.poulose@arm.com>
      Cc: Vineet Singh <vineet.singh@intel.com>
      Cc: coresight@lists.linaro.org
      Cc: linux-arm-kernel@lists.infradead.org
      Cc: zhengjun.xing@intel.com
      Link: https://lore.kernel.org/r/20220105061351.120843-11-irogers@google.com
      
      
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      86d94048
    • Ian Rogers's avatar
      perf cpumap: Remove map+index get_core() · 3f6233dc
      Ian Rogers authored
      
      
      Migrate final users to appropriate cpu variant.
      
      Reviewed-by: default avatarJames Clark <james.clark@arm.com>
      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: Ingo Molnar <mingo@redhat.com>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Cc: John Garry <john.garry@huawei.com>
      Cc: Kajol Jain <kjain@linux.ibm.com>
      Cc: Kan Liang <kan.liang@linux.intel.com>
      Cc: Leo Yan <leo.yan@linaro.org>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Cc: Mathieu Poirier <mathieu.poirier@linaro.org>
      Cc: Mike Leach <mike.leach@linaro.org>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Paul Clarke <pc@us.ibm.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Riccardo Mancini <rickyman7@gmail.com>
      Cc: Stephane Eranian <eranian@google.com>
      Cc: Suzuki Poulouse <suzuki.poulose@arm.com>
      Cc: Vineet Singh <vineet.singh@intel.com>
      Cc: coresight@lists.linaro.org
      Cc: linux-arm-kernel@lists.infradead.org
      Cc: zhengjun.xing@intel.com
      Link: https://lore.kernel.org/r/20220105061351.120843-10-irogers@google.com
      
      
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      3f6233dc
    • Ian Rogers's avatar
      perf cpumap: Remove map+index get_die() · 1cdae3d6
      Ian Rogers authored
      
      
      Migrate final users to appropriate cpu variant.
      
      Reviewed-by: default avatarJames Clark <james.clark@arm.com>
      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: Ingo Molnar <mingo@redhat.com>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Cc: John Garry <john.garry@huawei.com>
      Cc: Kajol Jain <kjain@linux.ibm.com>
      Cc: Kan Liang <kan.liang@linux.intel.com>
      Cc: Leo Yan <leo.yan@linaro.org>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Cc: Mathieu Poirier <mathieu.poirier@linaro.org>
      Cc: Mike Leach <mike.leach@linaro.org>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Paul Clarke <pc@us.ibm.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Riccardo Mancini <rickyman7@gmail.com>
      Cc: Stephane Eranian <eranian@google.com>
      Cc: Suzuki Poulouse <suzuki.poulose@arm.com>
      Cc: Vineet Singh <vineet.singh@intel.com>
      Cc: coresight@lists.linaro.org
      Cc: linux-arm-kernel@lists.infradead.org
      Cc: zhengjun.xing@intel.com
      Link: https://lore.kernel.org/r/20220105061351.120843-9-irogers@google.com
      
      
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      1cdae3d6
    • Ian Rogers's avatar
      perf cpumap: Remove map+index get_socket() · 448a69d9
      Ian Rogers authored
      
      
      Migrate final users to appropriate cpu variant.
      
      Reviewed-by: default avatarJames Clark <james.clark@arm.com>
      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: Ingo Molnar <mingo@redhat.com>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Cc: John Garry <john.garry@huawei.com>
      Cc: Kajol Jain <kjain@linux.ibm.com>
      Cc: Kan Liang <kan.liang@linux.intel.com>
      Cc: Leo Yan <leo.yan@linaro.org>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Cc: Mathieu Poirier <mathieu.poirier@linaro.org>
      Cc: Mike Leach <mike.leach@linaro.org>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Paul Clarke <pc@us.ibm.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Riccardo Mancini <rickyman7@gmail.com>
      Cc: Stephane Eranian <eranian@google.com>
      Cc: Suzuki Poulouse <suzuki.poulose@arm.com>
      Cc: Vineet Singh <vineet.singh@intel.com>
      Cc: coresight@lists.linaro.org
      Cc: linux-arm-kernel@lists.infradead.org
      Cc: zhengjun.xing@intel.com
      Link: https://lore.kernel.org/r/20220105061351.120843-8-irogers@google.com
      
      
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      448a69d9
    • Ian Rogers's avatar
      perf cpumap: Switch cpu_map__build_map() to cpu function · eff54c24
      Ian Rogers authored
      
      
      Avoid error prone cpu_map + idx variant. Remove now unused functions.
      
      Committer notes:
      
      Remove by now unused perf_env__get_cpu().
      
      Reviewed-by: default avatarJames Clark <james.clark@arm.com>
      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: Ingo Molnar <mingo@redhat.com>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Cc: John Garry <john.garry@huawei.com>
      Cc: Kajol Jain <kjain@linux.ibm.com>
      Cc: Kan Liang <kan.liang@linux.intel.com>
      Cc: Leo Yan <leo.yan@linaro.org>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Cc: Mathieu Poirier <mathieu.poirier@linaro.org>
      Cc: Mike Leach <mike.leach@linaro.org>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Paul Clarke <pc@us.ibm.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Riccardo Mancini <rickyman7@gmail.com>
      Cc: Stephane Eranian <eranian@google.com>
      Cc: Suzuki Poulouse <suzuki.poulose@arm.com>
      Cc: Vineet Singh <vineet.singh@intel.com>
      Cc: coresight@lists.linaro.org
      Cc: linux-arm-kernel@lists.infradead.org
      Cc: zhengjun.xing@intel.com
      Link: https://lore.kernel.org/r/20220105061351.120843-7-irogers@google.com
      
      
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      eff54c24
    • Ian Rogers's avatar
      perf stat: Switch to cpu version of cpu_map__get() · 88031a0d
      Ian Rogers authored
      
      
      Avoid possible bugs where the wrong index is passed with the cpu_map.
      
      Reviewed-by: default avatarJames Clark <james.clark@arm.com>
      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: Ingo Molnar <mingo@redhat.com>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Cc: John Garry <john.garry@huawei.com>
      Cc: Kajol Jain <kjain@linux.ibm.com>
      Cc: Kan Liang <kan.liang@linux.intel.com>
      Cc: Leo Yan <leo.yan@linaro.org>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Cc: Mathieu Poirier <mathieu.poirier@linaro.org>
      Cc: Mike Leach <mike.leach@linaro.org>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Paul Clarke <pc@us.ibm.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Riccardo Mancini <rickyman7@gmail.com>
      Cc: Stephane Eranian <eranian@google.com>
      Cc: Suzuki Poulouse <suzuki.poulose@arm.com>
      Cc: Vineet Singh <vineet.singh@intel.com>
      Cc: coresight@lists.linaro.org
      Cc: linux-arm-kernel@lists.infradead.org
      Cc: zhengjun.xing@intel.com
      Link: https://lore.kernel.org/r/20220105061351.120843-6-irogers@google.com
      
      
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      88031a0d
    • Ian Rogers's avatar
      perf stat: Switch aggregation to use for_each loop · a023283f
      Ian Rogers authored
      
      
      Tidy up the use of cpu and index to hopefully make the code less error
      prone. Avoid unused warnings with (void) which will be removed in a
      later patch.
      
      Reviewed-by: default avatarJames Clark <james.clark@arm.com>
      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: Ingo Molnar <mingo@redhat.com>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Cc: John Garry <john.garry@huawei.com>
      Cc: Kajol Jain <kjain@linux.ibm.com>
      Cc: Kan Liang <kan.liang@linux.intel.com>
      Cc: Leo Yan <leo.yan@linaro.org>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Cc: Mathieu Poirier <mathieu.poirier@linaro.org>
      Cc: Mike Leach <mike.leach@linaro.org>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Paul Clarke <pc@us.ibm.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Riccardo Mancini <rickyman7@gmail.com>
      Cc: Stephane Eranian <eranian@google.com>
      Cc: Suzuki Poulouse <suzuki.poulose@arm.com>
      Cc: Vineet Singh <vineet.singh@intel.com>
      Cc: coresight@lists.linaro.org
      Cc: linux-arm-kernel@lists.infradead.org
      Cc: zhengjun.xing@intel.com
      Link: https://lore.kernel.org/r/20220105061351.120843-5-irogers@google.com
      
      
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      a023283f
    • Ian Rogers's avatar
      perf stat: Correct aggregation CPU map · 01843ca0
      Ian Rogers authored
      
      
      Switch the perf_cpu_map in aggr_update_shadow from
      the evlist to the counter's cpu map, so the index is appropriate. This
      addresses a problem where uncore counts, with a cpumap like:
      $ cat /sys/devices/uncore_imc_0/cpumask
      0,18
      Don't aggregate counts in CPUs based on the index of those values in the
      cpumap (0 and 1) but on the actual CPU (0 and 18). Thereby correcting
      metric calculations in per-socket mode for counters without a full
      cpumask.
      
      On a SkylakeX with a tweaked DRAM_BW_Use metric, to remove unnecessary
      scaling, this gives:
      
      Before:
      $ /perf stat --per-socket -M DRAM_BW_Use -I 1000
           1.001102293 S0        1              27.01 MiB  uncore_imc/cas_count_write/ #   103.00 DRAM_BW_Use
           1.001102293 S0        1              30.22 MiB  uncore_imc/cas_count_read/
           1.001102293 S0        1      1,001,102,293 ns   duration_time
           1.001102293 S1        1              20.10 MiB  uncore_imc/cas_count_write/ #     0.00 DRAM_BW_Use
           1.001102293 S1        1              32.74 MiB  uncore_imc/cas_count_read/
           1.001102293 S1        0      <not counted> ns   duration_time
           2.003517973 S0        1              83.04 MiB  uncore_imc/cas_count_write/ #   920.00 DRAM_BW_Use
           2.003517973 S0        1             145.95 MiB  uncore_imc/cas_count_read/
           2.003517973 S0        1      1,002,415,680 ns   duration_time
           2.003517973 S1        1             302.45 MiB  uncore_imc/cas_count_write/ #     0.00 DRAM_BW_Use
           2.003517973 S1        1             290.99 MiB  uncore_imc/cas_count_read/
           2.003517973 S1        0      <not counted> ns   duration_time
      
      After:
      $ perf stat --per-socket -M DRAM_BW_Use -I 1000
           1.001080840 S0        1              24.96 MiB  uncore_imc/cas_count_write/ #    54.00 DRAM_BW_Use
           1.001080840 S0        1              33.64 MiB  uncore_imc/cas_count_read/
           1.001080840 S0        1      1,001,080,840 ns   duration_time
           1.001080840 S1        1              42.43 MiB  uncore_imc/cas_count_write/ #    84.00 DRAM_BW_Use
           1.001080840 S1        1              47.05 MiB  uncore_imc/cas_count_read/
           1.001080840 S1        0      <not counted> ns   duration_time
      
      Signed-off-by: default avatarIan Rogers <irogers@google.com>
      Tested-by: default avatarJohn Garry <john.garry@huawei.com>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Andi Kleen <ak@linux.intel.com>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: James Clark <james.clark@arm.com>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Cc: Kajol Jain <kjain@linux.ibm.com>
      Cc: Kan Liang <kan.liang@linux.intel.com>
      Cc: Leo Yan <leo.yan@linaro.org>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Cc: Mathieu Poirier <mathieu.poirier@linaro.org>
      Cc: Mike Leach <mike.leach@linaro.org>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Paul Clarke <pc@us.ibm.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Riccardo Mancini <rickyman7@gmail.com>
      Cc: Stephane Eranian <eranian@google.com>
      Cc: Suzuki Poulouse <suzuki.poulose@arm.com>
      Cc: Vineet Singh <vineet.singh@intel.com>
      Cc: coresight@lists.linaro.org
      Cc: linux-arm-kernel@lists.infradead.org
      Cc: zhengjun.xing@intel.com
      Link: https://lore.kernel.org/r/20220105061351.120843-4-irogers@google.com
      
      
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      01843ca0
    • Ian Rogers's avatar
      perf stat: Add aggr creators that are passed a cpu · ca2c9b76
      Ian Rogers authored
      
      
      The cpu_map and index can get confused. Add variants of the cpu_map__get
      routines that are passed a cpu. Make the existing cpu_map__get routines
      use the new functions with a view to remove them when no longer used.
      
      Reviewed-by: default avatarJames Clark <james.clark@arm.com>
      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: Ingo Molnar <mingo@redhat.com>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Cc: John Garry <john.garry@huawei.com>
      Cc: Kajol Jain <kjain@linux.ibm.com>
      Cc: Kan Liang <kan.liang@linux.intel.com>
      Cc: Leo Yan <leo.yan@linaro.org>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Cc: Mathieu Poirier <mathieu.poirier@linaro.org>
      Cc: Mike Leach <mike.leach@linaro.org>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Paul Clarke <pc@us.ibm.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Riccardo Mancini <rickyman7@gmail.com>
      Cc: Stephane Eranian <eranian@google.com>
      Cc: Suzuki Poulouse <suzuki.poulose@arm.com>
      Cc: Vineet Singh <vineet.singh@intel.com>
      Cc: coresight@lists.linaro.org
      Cc: linux-arm-kernel@lists.infradead.org
      Cc: zhengjun.xing@intel.com
      Link: https://lore.kernel.org/r/20220105061351.120843-3-irogers@google.com
      
      
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      ca2c9b76
    • Ian Rogers's avatar
      libperf: Add comments to 'struct perf_cpu_map' · 818ab78c
      Ian Rogers authored
      
      
      A particular observed problem is confusing the index with the CPU value,
      documentation should hopefully reduce this type of problem.
      
      Reviewed-by: default avatarJames Clark <james.clark@arm.com>
      Reviewed-by: default avatarJohn Garry <john.garry@huawei.com>
      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: Ingo Molnar <mingo@redhat.com>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Cc: Kajol Jain <kjain@linux.ibm.com>
      Cc: Kan Liang <kan.liang@linux.intel.com>
      Cc: Leo Yan <leo.yan@linaro.org>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Cc: Mathieu Poirier <mathieu.poirier@linaro.org>
      Cc: Mike Leach <mike.leach@linaro.org>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Paul Clarke <pc@us.ibm.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Riccardo Mancini <rickyman7@gmail.com>
      Cc: Stephane Eranian <eranian@google.com>
      Cc: Suzuki Poulouse <suzuki.poulose@arm.com>
      Cc: Vineet Singh <vineet.singh@intel.com>
      Cc: coresight@lists.linaro.org
      Cc: linux-arm-kernel@lists.infradead.org
      Cc: zhengjun.xing@intel.com
      Link: https://lore.kernel.org/r/20220105061351.120843-2-irogers@google.com
      
      
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      818ab78c
    • Ian Rogers's avatar
      perf evsel: Improve error message for uncore events · dcffc5eb
      Ian Rogers authored
      
      
      When a group has multiple events and the leader fails it can yield
      errors like:
      
        $ perf stat -e '{uncore_imc/cas_count_read/},instructions' /bin/true
        Error:
        The sys_perf_event_open() syscall returned with 22 (Invalid argument) for event (uncore_imc/cas_count_read/).
        /bin/dmesg | grep -i perf may provide additional information.
      
      However, when not the group leader <not supported> is given:
      
        $ perf stat -e '{instructions,uncore_imc/cas_count_read/}' /bin/true
        ...
                 1,619,057      instructions
           <not supported> MiB  uncore_imc/cas_count_read/
      
      This is necessary because get_group_fd will fail if the leader fails and
      is the direct result of the check on line 750 of builtin-stat.c in
      stat_handle_error that returns COUNTER_SKIP for the latter case.
      
      This patch improves the error message to:
      
        $ perf stat -e '{uncore_imc/cas_count_read/},instructions' /bin/true
        Error:
        Invalid event (uncore_imc/cas_count_read/) in per-thread mode, enable system wide with '-a'.
      
      v2. Changed the test to use !target__has_cpu as suggested by Namhyung Kim.
      
      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: Ingo Molnar <mingo@redhat.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: https://lore.kernel.org/r/20211223183948.3423989-2-irogers@google.com
      
      
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      dcffc5eb
    • Arnaldo Carvalho de Melo's avatar
      Revert "perf powerpc: Add data source encodings for power10 platform" · b4bb6f05
      Arnaldo Carvalho de Melo authored
      This was in a patchkit mixing up kernel with tools/ parts and I
      mistakenly got it merged in the perf tools tree, revert it, it'll go via
      the PowerPC kernel tree.
      
      This reverts commit af2b24f2.
      
      Cc: kajoljain <kjain@linux.ibm.com>
      Cc: Michael Ellerman <mpe@ellerman.id.au>
      Cc: Stephen Rothwell <sfr@canb.auug.org.au>
      Link: http://lore.kernel.org/lkml/20220112171659.531d22ce@canb.auug.org.au
      
      
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      b4bb6f05
    • Arnaldo Carvalho de Melo's avatar
      Revert "perf powerpc: Add encodings to represent data based on newer composite... · 8de78328
      Arnaldo Carvalho de Melo authored
      Revert "perf powerpc: Add encodings to represent data based on newer composite PERF_MEM_LVLNUM* fields"
      
      This was in a patchkit mixing up kernel with tools/ parts and I
      mistakenly got it merged in the perf tools tree, revert it, it'll go via
      the PowerPC kernel tree.
      
      This reverts commit 0ebce3d6.
      
      Cc: kajoljain <kjain@linux.ibm.com>
      Cc: Michael Ellerman <mpe@ellerman.id.au>
      Cc: Stephen Rothwell <sfr@canb.auug.org.au>
      Link: http://lore.kernel.org/lkml/20220112171659.531d22ce@canb.auug.org.au
      
      
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      8de78328
    • Adrian Hunter's avatar
      perf script: Fix hex dump character output · 62942e9f
      Adrian Hunter authored
      Using grep -C with perf script -D can give erroneous results as grep loses
      lines due to non-printable characters, for example, below the 0020, 0060
      and 0070 lines are missing:
      
       $ perf script -D | grep -C10 AUX | head
       .  0010:  08 00 00 00 00 00 00 00 1f 00 00 00 00 00 00 00  ................
       .  0030:  01 00 00 00 00 00 00 00 00 04 00 00 00 00 00 00  ................
       .  0040:  00 08 00 00 00 00 00 00 02 00 00 00 00 00 00 00  ................
       .  0050:  00 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00  ................
       .  0080:  02 00 00 00 00 00 00 00 1b 00 00 00 00 00 00 00  ................
       .  0090:  00 00 00 00 00 00 00 00                          ........
      
       0 0 0x450 [0x98]: PERF_RECORD_AUXTRACE_INFO type: 1
         PMU Type            8
         Time Shift          31
      
      perf's isprint() is a custom implementation from the kernel, but the
      kernel's _ctype appears to include characters from Latin-1 Supplement which
      is not compatible with, for example, UTF-8. Fix by checking also isascii().
      
      After:
      
       $ tools/perf/perf script -D | grep -C10 AUX | head
       .  0010:  08 00 00 00 00 00 00 00 1f 00 00 00 00 00 00 00  ................
       .  0020:  03 84 32 2f 00 00 00 00 63 7c 4f d2 fa ff ff ff  ..2/....c|O.....
       .  0030:  01 00 00 00 00 00 00 00 00 04 00 00 00 00 00 00  ................
       .  0040:  00 08 00 00 00 00 00 00 02 00 00 00 00 00 00 00  ................
       .  0050:  00 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00  ................
       .  0060:  00 02 00 00 00 00 00 00 00 c0 03 00 00 00 00 00  ................
       .  0070:  e2 00 00 00 00 00 00 00 02 00 00 00 00 00 00 00  ................
       .  0080:  02 00 00 00 00 00 00 00 1b 00 00 00 00 00 00 00  ................
       .  0090:  00 00 00 00 00 00 00 00                          ........
      
      Fixes: 3052ba56
      
       ("tools perf: Move from sane_ctype.h obtained from git to the Linux's original")
      Signed-off-by: default avatarAdrian Hunter <adrian.hunter@intel.com>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Link: http://lore.kernel.org/lkml/20220112085057.277205-1-adrian.hunter@intel.com
      
      
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      62942e9f
  2. Jan 12, 2022
  3. Jan 11, 2022
    • Dario Petrillo's avatar
      perf annotate: Avoid TUI crash when navigating in the annotation of recursive functions · d5962fb7
      Dario Petrillo authored
      
      
      In 'perf report', entering a recursive function from inside of itself
      (either directly of indirectly through some other function) results in
      calling symbol__annotate2 multiple() times, and freeing the whole
      disassembly when exiting from the innermost instance.
      
      The first issue causes the function's disassembly to be duplicated, and
      the latter a heap use-after-free (and crash) when trying to access the
      disassembly again.
      
      I reproduced the bug on perf 5.11.22 (Ubuntu 20.04.3 LTS) and 5.16.rc8
      with the following testcase (compile with gcc recursive.c -o recursive).
      To reproduce:
      
      - perf record ./recursive
      - perf report
      - enter fibonacci and annotate it
      - move the cursor on one of the "callq fibonacci" instructions and press enter
        - at this point there will be two copies of the function in the disassembly
      - go back by pressing q, and perf will crash
      
        #include <stdio.h>
      
        int fibonacci(int n)
        {
            if(n <= 2) return 1;
            return fibonacci(n-1) + fibonacci(n-2);
        }
      
        int main()
        {
            printf("%d\n", fibonacci(40));
        }
      
      This patch addresses the issue by annotating a function and freeing the
      associated memory on exit only if no annotation is already present, so
      that a recursive function is only annotated on entry.
      
      Signed-off-by: default avatarDario Petrillo <dario.pk1@gmail.com>
      Tested-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: stable@kernel.org
      Link: http://lore.kernel.org/lkml/20220109234441.325106-1-dario.pk1@gmail.com
      
      
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      d5962fb7
    • Athira Rajeev's avatar
      perf powerpc: Update global/local variants for p_stage_cyc · befee377
      Athira Rajeev authored
      
      
      Update the arch_support_sort_key() function in powerpc to enable
      presenting local and global variants of sort key 'p_stage_cyc'.
      
      Update the "se_header" strings for these in arch_perf_header_entry()
      along with instruction latency.
      
      Reported-by: default avatarNamhyung Kim <namhyung@kernel.org>
      Signed-off-by: default avatarAthira Jajeev <atrajeev@linux.vnet.ibm.com>
      Tested-by: default avatarNageswara R Sastry <rnsastry@linux.ibm.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Kajol Jain <kjain@linux.ibm.com>
      Cc: Madhavan Srinivasan <maddy@linux.vnet.ibm.com>
      Cc: Michael Ellerman <mpe@ellerman.id.au>
      Cc: linuxppc-dev@lists.ozlabs.org
      Link: https://lore.kernel.org/r/20211203022038.48240-2-atrajeev@linux.vnet.ibm.com
      
      
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      befee377
    • Athira Rajeev's avatar
      perf sort: Include global and local variants for p_stage_cyc sort key · e3304c21
      Athira Rajeev authored
      
      
      Sort key 'p_stage_cyc' is used to present the latency cycles spent in
      pipeline stages.
      
      perf has local 'p_stage_cyc' sort key to display this info. There is no
      global variant available for this sort key. The local variant shows
      latency in a single sample, whereas the global value will be useful to
      present the total latency (sum of latencies) in the hist entry. It
      represents the latency number multiplied by the number of samples.
      
      Add global ('p_stage_cyc') and local variant ('local_p_stage_cyc') for
      this sort key. Use 'local_p_stage_cyc' as default option for "mem" sort
      mode.
      
      Also add this to the list of dynamic sort keys and made the
      "dynamic_headers" and "arch_specific_sort_keys" as static.
      
      Reported-by: default avatarNamhyung Kim <namhyung@kernel.org>
      Signed-off-by: default avatarAthira Jajeev <atrajeev@linux.vnet.ibm.com>
      Tested-by: default avatarNageswara R Sastry <rnsastry@linux.ibm.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Kajol Jain <kjain@linux.ibm.com>
      Cc: Madhavan Srinivasan <maddy@linux.vnet.ibm.com>
      Cc: Michael Ellerman <mpe@ellerman.id.au>
      Cc: linuxppc-dev@lists.ozlabs.org
      Link: https://lore.kernel.org/r/20211203022038.48240-1-atrajeev@linux.vnet.ibm.com
      
      
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      e3304c21
    • Arnaldo Carvalho de Melo's avatar
    • Linus Torvalds's avatar
      Merge tag 'x86_vdso_for_v5.17_rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 133d9c53
      Linus Torvalds authored
      Pull x86 vdso updates from Borislav Petkov:
       "Remove -nostdlib compiler flag now that the vDSO uses the linker
        instead of the compiler driver to link files"
      
      * tag 'x86_vdso_for_v5.17_rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        x86/purgatory: Remove -nostdlib compiler flag
        x86/vdso: Remove -nostdlib compiler flag
      133d9c53
    • Linus Torvalds's avatar
      Merge tag 'x86_build_for_v5.17_rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 3c6d4056
      Linus Torvalds authored
      Pull x86 build fix from Borislav Petkov:
       "A fix for cross-compiling the compressed stub on arm64 with clang"
      
      * tag 'x86_build_for_v5.17_rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        x86/boot/compressed: Move CLANG_FLAGS to beginning of KBUILD_CFLAGS
      3c6d4056
    • Linus Torvalds's avatar
      Merge tag 'x86_cpu_for_v5.17_rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 25f8c778
      Linus Torvalds authored
      Pull x86 cpuid updates from Borislav Petkov:
      
       - Enable the short string copies for CPUs which support them, in
         copy_user_enhanced_fast_string()
      
       - Avoid writing MSR_CSTAR on Intel due to TDX guests raising a #VE trap
      
      * tag 'x86_cpu_for_v5.17_rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        x86/lib: Add fast-short-rep-movs check to copy_user_enhanced_fast_string()
        x86/cpu: Don't write CSTAR MSR on Intel CPUs
      25f8c778
    • Linus Torvalds's avatar
      Merge tag 'x86_cleanups_for_v5.17_rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 308319e9
      Linus Torvalds authored
      Pull x86 cleanups from Borislav Petkov:
       "The mandatory set of random minor cleanups all over tip"
      
      * tag 'x86_cleanups_for_v5.17_rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        x86/events/amd/iommu: Remove redundant assignment to variable shift
        x86/boot/string: Add missing function prototypes
        x86/fpu: Remove duplicate copy_fpstate_to_sigframe() prototype
        x86/uaccess: Move variable into switch case statement
      308319e9
    • Linus Torvalds's avatar
      Merge tag 'x86_misc_for_v5.17_rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 2e97a0c0
      Linus Torvalds authored
      Pull misc x86 updates from Borislav Petkov:
       "The pile which we cannot find the proper topic for so we stick it in
        x86/misc:
      
         - Add support for decoding instructions which do MMIO accesses in
           order to use it in SEV and TDX guests
      
         - An include fix and reorg to allow for removing set_fs in UML later"
      
      * tag 'x86_misc_for_v5.17_rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        x86/mtrr: Remove the mtrr_bp_init() stub
        x86/sev-es: Use insn_decode_mmio() for MMIO implementation
        x86/insn-eval: Introduce insn_decode_mmio()
        x86/insn-eval: Introduce insn_get_modrm_reg_ptr()
        x86/insn-eval: Handle insn_get_opcode() failure
      2e97a0c0
    • Linus Torvalds's avatar
      Merge tag 'x86_mm_for_v5.17_rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 4a692ae3
      Linus Torvalds authored
      Pull x86 mm updates from Borislav Petkov:
      
       - Flush *all* mappings from the TLB after switching to the trampoline
         pagetable to prevent any stale entries' presence
      
       - Flush global mappings from the TLB, in addition to the CR3-write,
         after switching off of the trampoline_pgd during boot to clear the
         identity mappings
      
       - Prevent instrumentation issues resulting from the above changes
      
      * tag 'x86_mm_for_v5.17_rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        x86/mm: Prevent early boot triple-faults with instrumentation
        x86/mm: Include spinlock_t definition in pgtable.
        x86/mm: Flush global TLB when switching to trampoline page-table
        x86/mm/64: Flush global TLB on boot and AP bringup
        x86/realmode: Add comment for Global bit usage in trampoline_pgd
        x86/mm: Add missing <asm/cpufeatures.h> dependency to <asm/page_64.h>
      4a692ae3
    • Linus Torvalds's avatar
      Merge tag 'x86_sgx_for_v5.17_rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · bfed6efb
      Linus Torvalds authored
      Pull x86 SGX updates from Borislav Petkov:
      
       - Add support for handling hw errors in SGX pages: poisoning,
         recovering from poison memory and error injection into SGX pages
      
       - A bunch of changes to the SGX selftests to simplify and allow of SGX
         features testing without the need of a whole SGX software stack
      
       - Add a sysfs attribute which is supposed to show the amount of SGX
         memory in a NUMA node, similar to what /proc/meminfo is to normal
         memory
      
       - The usual bunch of fixes and cleanups too
      
      * tag 'x86_sgx_for_v5.17_rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (24 commits)
        x86/sgx: Fix NULL pointer dereference on non-SGX systems
        selftests/sgx: Fix corrupted cpuid macro invocation
        x86/sgx: Add an attribute for the amount of SGX memory in a NUMA node
        x86/sgx: Fix minor documentation issues
        selftests/sgx: Add test for multiple TCS entry
        selftests/sgx: Enable multiple thread support
        selftests/sgx: Add page permission and exception test
        selftests/sgx: Rename test properties in preparation for more enclave tests
        selftests/sgx: Provide per-op parameter structs for the test enclave
        selftests/sgx: Add a new kselftest: Unclobbered_vdso_oversubscribed
        selftests/sgx: Move setup_test_encl() to each TEST_F()
        selftests/sgx: Encpsulate the test enclave creation
        selftests/sgx: Dump segments and /proc/self/maps only on failure
        selftests/sgx: Create a heap for the test enclave
        selftests/sgx: Make data measurement for an enclave segment optional
        selftests/sgx: Assign source for each segment
        selftests/sgx: Fix a benign linker warning
        x86/sgx: Add check for SGX pages to ghes_do_memory_failure()
        x86/sgx: Add hook to error injection address validation
        x86/sgx: Hook arch_memory_failure() into mainline code
        ...
      bfed6efb
    • Linus Torvalds's avatar
      Merge tag 'x86_cache_for_v5.17_rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · d3c20bfb
      Linus Torvalds authored
      Pull x86 resource control fixlet from Borislav Petkov:
       "A minor code cleanup removing a redundant assignment"
      
      * tag 'x86_cache_for_v5.17_rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        x86/resctrl: Remove redundant assignment to variable chunks
      d3c20bfb
    • Linus Torvalds's avatar
      Merge tag 'x86_sev_for_v5.17_rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 01d5e787
      Linus Torvalds authored
      Pull x86 SEV updates from Borislav Petkov:
       "The accumulated pile of x86/sev generalizations and cleanups:
      
         - Share the SEV string unrolling logic with TDX as TDX guests need it
           too
      
         - Cleanups and generalzation of code shared by SEV and TDX"
      
      * tag 'x86_sev_for_v5.17_rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        x86/sev: Move common memory encryption code to mem_encrypt.c
        x86/sev: Rename mem_encrypt.c to mem_encrypt_amd.c
        x86/sev: Use CC_ATTR attribute to generalize string I/O unroll
        x86/sev: Remove do_early_exception() forward declarations
        x86/head64: Carve out the guest encryption postprocessing into a helper
        x86/sev: Get rid of excessive use of defines
        x86/sev: Shorten GHCB terminate macro names
      01d5e787
    • Linus Torvalds's avatar
      Merge tag 'x86_platform_for_v5.17_rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · cd36722d
      Linus Torvalds authored
      Pull x86 platform fix from Borislav Petkov:
       "A single DT compatibility fix for the Intel media processor CE4100
        driver"
      
      * tag 'x86_platform_for_v5.17_rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        x86/ce4100: Replace "ti,pcf8575" by "nxp,pcf8575"
      cd36722d
    • Linus Torvalds's avatar
      Merge tag 'x86_paravirt_for_v5.17_rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · e59451fd
      Linus Torvalds authored
      Pull x86 paravirtualization fix from Borislav Petkov:
       "Define the INTERRUPT_RETURN macro only when CONFIG_XEN_PV is enabled
        as it is its only user"
      
      * tag 'x86_paravirt_for_v5.17_rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        x86/paravirt: Fix build PARAVIRT_XXL=y without XEN_PV
      e59451fd
    • Linus Torvalds's avatar
      Merge tag 'x86_fpu_for_v5.17_rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 191cf7fa
      Linus Torvalds authored
      Pull x86 fpu update from Borislav Petkov:
       "A single x86/fpu update for 5.17:
      
         - Exclude AVX opmask registers use from AVX512 state tracking as they
           don't contribute to frequency throttling"
      
      * tag 'x86_fpu_for_v5.17_rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        x86/fpu: Correct AVX512 state tracking
      191cf7fa
    • Linus Torvalds's avatar
      Merge tag 'm68k-for-v5.17-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/linux-m68k · 8cc1e207
      Linus Torvalds authored
      Pull m68k updates from Geert Uytterhoeven:
      
       - enable memtest functionality
      
       - defconfig updates
      
      * tag 'm68k-for-v5.17-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/linux-m68k:
        m68k: defconfig: Update defconfigs for v5.16-rc1
        m68k: Enable memtest functionality
      8cc1e207
    • Linus Torvalds's avatar
      Merge tag 's390-5.17-1' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux · f0d43b3a
      Linus Torvalds authored
      Pull s390 updates from Heiko Carstens:
       "Besides all the small improvements and cleanups the most notable part
        is the fast vector/SIMD implementation of the ChaCha20 stream cipher,
        which is an adaptation of Andy Polyakov's code for the kernel.
      
        Summary:
      
         - add fast vector/SIMD implementation of the ChaCha20 stream cipher,
           which mainly adapts Andy Polyakov's code for the kernel
      
         - add status attribute to AP queue device so users can easily figure
           out its status
      
         - fix race in page table release code, and and lots of documentation
      
         - remove uevent suppress from cio device driver, since it turned out
           that it generated more problems than it solved problems
      
         - quite a lot of virtual vs physical address confusion fixes
      
         - various other small improvements and cleanups all over the place"
      
      * tag 's390-5.17-1' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux: (39 commits)
        s390/dasd: use default_groups in kobj_type
        s390/sclp_sd: use default_groups in kobj_type
        s390/pci: simplify __pciwb_mio() inline asm
        s390: remove unused TASK_SIZE_OF
        s390/crash_dump: fix virtual vs physical address handling
        s390/crypto: fix compile error for ChaCha20 module
        s390/mm: check 2KB-fragment page on release
        s390/mm: better annotate 2KB pagetable fragments handling
        s390/mm: fix 2KB pgtable release race
        s390/sclp: release SCLP early buffer after kernel initialization
        s390/nmi: disable interrupts on extended save area update
        s390/zcrypt: CCA control CPRB sending
        s390/disassembler: update opcode table
        s390/uv: fix memblock virtual vs physical address confusion
        s390/smp: fix memblock_phys_free() vs memblock_free() confusion
        s390/sclp: fix memblock_phys_free() vs memblock_free() confusion
        s390/exit: remove dead reference to do_exit from copy_thread
        s390/ap: add missing virt_to_phys address conversion
        s390/pgalloc: use pointers instead of unsigned long values
        s390/pgalloc: add virt/phys address handling to base asce functions
        ...
      f0d43b3a
    • Linus Torvalds's avatar
      Merge tag 'arm64-upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux · 9b9e2113
      Linus Torvalds authored
      Pull arm64 updates from Catalin Marinas:
      
       - KCSAN enabled for arm64.
      
       - Additional kselftests to exercise the syscall ABI w.r.t. SVE/FPSIMD.
      
       - Some more SVE clean-ups and refactoring in preparation for SME
         support (scalable matrix extensions).
      
       - BTI clean-ups (SYM_FUNC macros etc.)
      
       - arm64 atomics clean-up and codegen improvements.
      
       - HWCAPs for FEAT_AFP (alternate floating point behaviour) and
         FEAT_RPRESS (increased precision of reciprocal estimate and
         reciprocal square root estimate).
      
       - Use SHA3 instructions to speed-up XOR.
      
       - arm64 unwind code refactoring/unification.
      
       - Avoid DC (data cache maintenance) instructions when DCZID_EL0.DZP ==
         1 (potentially set by a hypervisor; user-space already does this).
      
       - Perf updates for arm64: support for CI-700, HiSilicon PCIe PMU,
         Marvell CN10K LLC-TAD PMU, miscellaneous clean-ups.
      
       - Other fixes and clean-ups; highlights: fix the handling of erratum
         1418040, correct the calculation of the nomap region boundaries,
         introduce io_stop_wc() mapped to the new DGH instruction (data
         gathering hint).
      
      * tag 'arm64-upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux: (81 commits)
        arm64: Use correct method to calculate nomap region boundaries
        arm64: Drop outdated links in comments
        arm64: perf: Don't register user access sysctl handler multiple times
        drivers: perf: marvell_cn10k: fix an IS_ERR() vs NULL check
        perf/smmuv3: Fix unused variable warning when CONFIG_OF=n
        arm64: errata: Fix exec handling in erratum 1418040 workaround
        arm64: Unhash early pointer print plus improve comment
        asm-generic: introduce io_stop_wc() and add implementation for ARM64
        arm64: Ensure that the 'bti' macro is defined where linkage.h is included
        arm64: remove __dma_*_area() aliases
        docs/arm64: delete a space from tagged-address-abi
        arm64: Enable KCSAN
        kselftest/arm64: Add pidbench for floating point syscall cases
        arm64/fp: Add comments documenting the usage of state restore functions
        kselftest/arm64: Add a test program to exercise the syscall ABI
        kselftest/arm64: Allow signal tests to trigger from a function
        kselftest/arm64: Parameterise ptrace vector length information
        arm64/sve: Minor clarification of ABI documentation
        arm64/sve: Generalise vector length configuration prctl() for SME
        arm64/sve: Make sysctl interface for SVE reusable by SME
        ...
      9b9e2113
    • Linus Torvalds's avatar
      Merge tag 'asm-generic-5.17' of git://git.kernel.org/pub/scm/linux/kernel/git/arnd/asm-generic · a7ac3140
      Linus Torvalds authored
      Pull asm-generic cleanups from Arnd Bergmann:
       "A few minor cleanups for cross-architecture code: Alexandre Ghiti
        deals with removing some leftovers from drivers and features that have
        been removed, and Wasin Thonkaew has a cosmetic change"
      
      * tag 'asm-generic-5.17' of git://git.kernel.org/pub/scm/linux/kernel/git/arnd/asm-generic:
        asm-generic/error-injection.h: fix a spelling mistake, and a coding style issue
        arch: Remove leftovers from prism54 wireless driver
        arch: Remove leftovers from mandatory file locking
        Documentation, arch: Remove leftovers from CIFS_WEAK_PW_HASH
        Documentation, arch: Remove leftovers from raw device
      a7ac3140
    • Linus Torvalds's avatar
      Merge tag 'newsoc-5.17' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc · bb4ed26e
      Linus Torvalds authored
      Pull RISC-V SoC updates from Arnd Bergmann:
       "Add support for StarFive JH7100 RISC-V SoC
      
        This adds support for the StarFive JH7100, including the necessary
        device drivers and DT files for the BeagleV Starlight prototype board,
        with additional boards to be added later. This SoC promises to be the
        first usable low-cost platform for RISC-V.
      
        I've taken this through the SoC tree in the anticipation of adding a
        few other Arm based SoCs as well, but those did not pass the review in
        time, so it's only this one"
      
      * tag 'newsoc-5.17' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc:
        reset: starfive-jh7100: Fix 32bit compilation
        RISC-V: Add BeagleV Starlight Beta device tree
        RISC-V: Add initial StarFive JH7100 device tree
        serial: 8250_dw: Add StarFive JH7100 quirk
        dt-bindings: serial: snps-dw-apb-uart: Add JH7100 uarts
        pinctrl: starfive: Add pinctrl driver for StarFive SoCs
        dt-bindings: pinctrl: Add StarFive JH7100 bindings
        dt-bindings: pinctrl: Add StarFive pinctrl definitions
        reset: starfive-jh7100: Add StarFive JH7100 reset driver
        dt-bindings: reset: Add Starfive JH7100 reset bindings
        dt-bindings: reset: Add StarFive JH7100 reset definitions
        clk: starfive: Add JH7100 clock generator driver
        dt-bindings: clock: starfive: Add JH7100 bindings
        dt-bindings: clock: starfive: Add JH7100 clock definitions
        dt-bindings: interrupt-controller: Add StarFive JH7100 plic
        dt-bindings: timer: Add StarFive JH7100 clint
        RISC-V: Add StarFive SoC Kconfig option
      bb4ed26e