1. 17 May, 2022 6 commits
    • Ian Rogers's avatar
      perf test: Add basic stat and topdown group test · 6a973e29
      Ian Rogers authored
      Add a basic stat test.
      
      Add two tests of grouping behavior for topdown events. Topdown events
      are special as they must be grouped with the slots event first.
      Reviewed-by: default avatarKan Liang <kan.liang@linux.intel.com>
      Signed-off-by: default avatarIan Rogers <irogers@google.com>
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Andi Kleen <ak@linux.intel.com>
      Cc: Florian Fischer <florian.fischer@muhq.space>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: James Clark <james.clark@arm.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: John Garry <john.garry@huawei.com>
      Cc: Kim Phillips <kim.phillips@amd.com>
      Cc: Madhavan Srinivasan <maddy@linux.ibm.com>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Riccardo Mancini <rickyman7@gmail.com>
      Cc: Shunsuke Nakamura <nakamura.shun@fujitsu.com>
      Cc: Stephane Eranian <eranian@google.com>
      Cc: Xing Zhengjun <zhengjun.xing@linux.intel.com>
      Link: https://lore.kernel.org/r/20220517052724.283874-3-irogers@google.comSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      6a973e29
    • Ian Rogers's avatar
      perf evlist: Keep topdown counters in weak group · d98079c0
      Ian Rogers authored
      On Intel Icelake, topdown events must always be grouped with a slots
      event as leader. When a metric is parsed a weak group is formed and
      retried if perf_event_open fails. The retried events aren't grouped
      breaking the slots leader requirement. This change modifies the weak
      group "reset" behavior so that topdown events aren't broken from the
      group for the retry.
      
        $ perf stat -e '{slots,topdown-bad-spec,topdown-be-bound,topdown-fe-bound,topdown-retiring,branch-instructions,branch-misses,bus-cycles,cache-misses,cache-references,cpu-cycles,instructions,mem-loads,mem-stores,ref-cycles,baclears.any,ARITH.DIVIDER_ACTIVE}:W' -a sleep 1
      
         Performance counter stats for 'system wide':
      
          47,867,188,483      slots                                                         (92.27%)
         <not supported>      topdown-bad-spec
         <not supported>      topdown-be-bound
         <not supported>      topdown-fe-bound
         <not supported>      topdown-retiring
           2,173,346,937      branch-instructions                                           (92.27%)
              10,540,253      branch-misses             #    0.48% of all branches          (92.29%)
              96,291,140      bus-cycles                                                    (92.29%)
               6,214,202      cache-misses              #   20.120 % of all cache refs      (92.29%)
              30,886,082      cache-references                                              (76.91%)
          11,773,726,641      cpu-cycles                                                    (84.62%)
          11,807,585,307      instructions              #    1.00  insn per cycle           (92.31%)
                       0      mem-loads                                                     (92.32%)
           2,212,928,573      mem-stores                                                    (84.69%)
          10,024,403,118      ref-cycles                                                    (92.35%)
              16,232,978      baclears.any                                                  (92.35%)
              23,832,633      ARITH.DIVIDER_ACTIVE                                          (84.59%)
      
             0.981070734 seconds time elapsed
      
      After:
      
        $ perf stat -e '{slots,topdown-bad-spec,topdown-be-bound,topdown-fe-bound,topdown-retiring,branch-instructions,branch-misses,bus-cycles,cache-misses,cache-references,cpu-cycles,instructions,mem-loads,mem-stores,ref-cycles,baclears.any,ARITH.DIVIDER_ACTIVE}:W' -a sleep 1
      
         Performance counter stats for 'system wide':
      
             31040189283      slots                                                         (92.27%)
              8997514811      topdown-bad-spec          #     28.2% bad speculation         (92.27%)
             10997536028      topdown-be-bound          #     34.5% backend bound           (92.27%)
              4778060526      topdown-fe-bound          #     15.0% frontend bound          (92.27%)
              7086628768      topdown-retiring          #     22.2% retiring                (92.27%)
              1417611942      branch-instructions                                           (92.26%)
                 5285529      branch-misses             #    0.37% of all branches          (92.28%)
                62922469      bus-cycles                                                    (92.29%)
                 1440708      cache-misses              #    8.292 % of all cache refs      (92.30%)
                17374098      cache-references                                              (76.94%)
              8040889520      cpu-cycles                                                    (84.63%)
              7709992319      instructions              #    0.96  insn per cycle           (92.32%)
                       0      mem-loads                                                     (92.32%)
              1515669558      mem-stores                                                    (84.68%)
              6542411177      ref-cycles                                                    (92.35%)
                 4154149      baclears.any                                                  (92.35%)
                20556152      ARITH.DIVIDER_ACTIVE                                          (84.59%)
      
             1.010799593 seconds time elapsed
      Reviewed-by: default avatarKan Liang <kan.liang@linux.intel.com>
      Signed-off-by: default avatarIan Rogers <irogers@google.com>
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Andi Kleen <ak@linux.intel.com>
      Cc: Florian Fischer <florian.fischer@muhq.space>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: James Clark <james.clark@arm.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: John Garry <john.garry@huawei.com>
      Cc: Kim Phillips <kim.phillips@amd.com>
      Cc: Madhavan Srinivasan <maddy@linux.ibm.com>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Riccardo Mancini <rickyman7@gmail.com>
      Cc: Shunsuke Nakamura <nakamura.shun@fujitsu.com>
      Cc: Stephane Eranian <eranian@google.com>
      Cc: Xing Zhengjun <zhengjun.xing@linux.intel.com>
      Link: https://lore.kernel.org/r/20220517052724.283874-2-irogers@google.comSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      d98079c0
    • Adrian Hunter's avatar
      perf scripts python: intel-pt-events.py: Print ptwrite value as a string if it is ASCII · 75659c6f
      Adrian Hunter authored
      It can be convenient to put a string value into a ptwrite payload as
      a quick and easy way to identify what is being printed.
      
      To make that useful, if the Intel ptwrite payload value contains only
      printable ASCII characters padded with NULLs, then print it also as a
      string.
      
      Using the example program from the "Emulated PTWRITE" section of
      tools/perf/Documentation/perf-intel-pt.txt:
      
       $ echo -n "Hello" | od -t x8
       0000000 0000006f6c6c6548
       0000005
       $ perf record -e intel_pt//u ./eg_ptw 0x0000006f6c6c6548
       [ perf record: Woken up 1 times to write data ]
       [ perf record: Captured and wrote 0.016 MB perf.data ]
       $ perf script --itrace=ew intel-pt-events.py
       Intel PT Branch Trace, Power Events, Event Trace and PTWRITE
            Switch In   38524/38524 [001]     24166.044995916     0/0
                 eg_ptw 38524/38524 [001]     24166.045380004   ptwrite  jmp                   IP: 0 payload: 0x6f6c6c6548 Hello     56532c7ce196 perf_emulate_ptwrite+0x16 (/home/ahunter/git/work/eg_ptw)
       End
      Signed-off-by: default avatarAdrian Hunter <adrian.hunter@intel.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Link: https://lore.kernel.org/r/20220509152400.376613-4-adrian.hunter@intel.comSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      75659c6f
    • Adrian Hunter's avatar
      perf script: Print Intel ptwrite value as a string if it is ASCII · a5014310
      Adrian Hunter authored
      It can be convenient to put a string value into a ptwrite payload as
      a quick and easy way to identify what is being printed.
      
      To make that useful, if the Intel ptwrite payload value contains only
      printable ASCII characters padded with NULLs, then print it also as a
      string.
      
      Using the example program from the "Emulated PTWRITE" section of
      tools/perf/Documentation/perf-intel-pt.txt:
      
       $ echo -n "Hello" | od -t x8
       0000000 0000006f6c6c6548
       0000005
       $ perf record -e intel_pt//u ./eg_ptw 0x0000006f6c6c6548
       [ perf record: Woken up 1 times to write data ]
       [ perf record: Captured and wrote 0.016 MB perf.data ]
       $ perf script --itrace=ew
                 eg_ptw 35563 [005] 18256.087338:     ptwrite:  IP: 0 payload: 0x6f6c6c6548 Hello      55e764db5196 perf_emulate_ptwrite+0x16 (/home/user/eg_ptw)
       $
      Signed-off-by: default avatarAdrian Hunter <adrian.hunter@intel.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Link: https://lore.kernel.org/r/20220509152400.376613-3-adrian.hunter@intel.comSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      a5014310
    • Adrian Hunter's avatar
      perf intel-pt: Add support for emulated ptwrite · d7015e50
      Adrian Hunter authored
      ptwrite is an Intel x86 instruction that writes arbitrary values into an
      Intel PT trace. It is not supported on all hardware, so provide an
      alternative that makes use of TNT packets to convey the payload data.
      TNT packets encode Taken/Not-taken conditional branch information, so
      taking branches based on the payload value will encode the value into
      the TNT packet. Refer to the changes to the documentation file
      perf-intel-pt.txt in this patch for an example.
      Signed-off-by: default avatarAdrian Hunter <adrian.hunter@intel.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Link: https://lore.kernel.org/r/20220509152400.376613-2-adrian.hunter@intel.comSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      d7015e50
    • Arnaldo Carvalho de Melo's avatar
      perf bench breakpoint: Fix build on 32-bit arches · df36d257
      Arnaldo Carvalho de Melo authored
      Cast pointers to unsigned long instead of to uint64_t to avoid this
      problem on 32-bit arches:
      
        31     6.89 debian:experimental-x-mips    : FAIL gcc version 11.2.0 (Debian 11.2.0-18)
          bench/breakpoint.c: In function 'breakpoint_setup':
          bench/breakpoint.c:56:24: error: cast from pointer to integer of different size [-Werror=pointer-to-int-cast]
             56 |         attr.bp_addr = (uint64_t)addr;
                |                        ^
          cc1: all warnings being treated as errors
          make[3]: *** [/git/perf-5.18.0-rc7/tools/build/Makefile.build:139: bench] Error 2
      
      Fixes: 68a6772f ("perf bench: Add breakpoint benchmarks")
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Dmitriy Vyukov <dvyukov@google.com>
      Cc: Ian Rogers <irogers@google.com>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Marco Elver <elver@google.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/YoLq1nHx1doi+VWl@kernel.orgSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      df36d257
  2. 16 May, 2022 2 commits
  3. 15 May, 2022 8 commits
    • Linus Torvalds's avatar
      Merge tag 'driver-core-5.18-rc7' of... · 0cdd776e
      Linus Torvalds authored
      Merge tag 'driver-core-5.18-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core
      
      Pull driver core fixes from Greg KH:
       "Here is one fix, and three documentation updates for 5.18-rc7.
      
        The fix is for the firmware loader which resolves a long-reported
        problem where the credentials of the firmware loader could be set to a
        userspace process without enough permissions to actually load the
        firmware image. Many Android vendors have been reporting this for
        quite some time.
      
        The documentation updates are for the embargoed-hardware-issues.rst
        file to add a new entry, change an existing one, and sort the list to
        make changes easier in the future.
      
        All of these have been in linux-next for a while with no reported
        issues"
      
      * tag 'driver-core-5.18-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core:
        Documentation/process: Update ARM contact for embargoed hardware issues
        Documentation/process: Add embargoed HW contact for Ampere Computing
        Documentation/process: Make groups alphabetical and use tabs consistently
        firmware_loader: use kernel credentials when reading firmware
      0cdd776e
    • Linus Torvalds's avatar
      Merge tag 'char-misc-5.18-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc · 5becde60
      Linus Torvalds authored
      Pull char/misc driver fixes from Greg KH:
       "Here are two small driver fixes for 5.18-rc7 that resolve reported
        problems:
      
         - slimbus driver irq bugfix
      
         - interconnect sync state bugfix
      
        Both of these have been in linux-next with no reported problems"
      
      * tag 'char-misc-5.18-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc:
        slimbus: qcom: Fix IRQ check in qcom_slim_probe
        interconnect: Restore sync state by ignoring ipa-virt in provider count
      5becde60
    • Linus Torvalds's avatar
      Merge tag 'tty-5.18-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty · 6811a466
      Linus Torvalds authored
      Pull tty/serial driver fixes from Greg KH:
       "Here are some small tty n_gsm and serial driver fixes for 5.18-rc7
        that resolve reported problems. They include:
      
         - n_gsm fixes for reported issues
      
         - 8250_mtk driver fixes for some platforms
      
         - fsl_lpuart driver fix for reported problem.
      
         - digicolor driver fix for reported problem.
      
        All have been in linux-next for a while with no reported problems"
      
      * tag 'tty-5.18-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty:
        fsl_lpuart: Don't enable interrupts too early
        tty: n_gsm: fix invalid gsmtty_write_room() result
        tty: n_gsm: fix mux activation issues in gsm_config()
        tty: n_gsm: fix buffer over-read in gsm_dlci_data()
        serial: 8250_mtk: Fix register address for XON/XOFF character
        serial: 8250_mtk: Make sure to select the right FEATURE_SEL
        serial: 8250_mtk: Fix UART_EFR register address
        tty/serial: digicolor: fix possible null-ptr-deref in digicolor_uart_probe()
      6811a466
    • Linus Torvalds's avatar
      Merge tag 'usb-5.18-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb · fc49583c
      Linus Torvalds authored
      Pull USB fixes from Greg KH:
       "Here are some small fixes for reported issues with some USB drivers.
        They include:
      
         - xhci fixes for xhci-mtk platform driver
      
         - typec driver fixes for reported problems.
      
         - cdc-wdm read-stuck fix
      
         - gadget driver fix for reported race condition
      
         - new usb-serial driver ids
      
        All of these have been in linux-next with no reported problems"
      
      * tag 'usb-5.18-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb:
        usb: xhci-mtk: remove bandwidth budget table
        usb: xhci-mtk: fix fs isoc's transfer error
        usb: gadget: fix race when gadget driver register via ioctl
        usb: typec: tcpci_mt6360: Update for BMC PHY setting
        usb: gadget: uvc: allow for application to cleanly shutdown
        usb: typec: tcpci: Don't skip cleanup in .remove() on error
        usb: cdc-wdm: fix reading stuck on device close
        USB: serial: qcserial: add support for Sierra Wireless EM7590
        USB: serial: option: add Fibocom MA510 modem
        USB: serial: option: add Fibocom L610 modem
        USB: serial: pl2303: add device id for HP LM930 Display
      fc49583c
    • Linus Torvalds's avatar
      Merge tag 'powerpc-5.18-5' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux · bc403203
      Linus Torvalds authored
      Pull powerpc fix from Michael Ellerman:
      
       - Fix KVM PR on 32-bit, which was broken by some MMU code refactoring.
      
      Thanks to: Alexander Graf, and Matt Evans.
      
      * tag 'powerpc-5.18-5' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux:
        KVM: PPC: Book3S PR: Enable MSR_DR for switch_mmu_context()
      bc403203
    • Linus Torvalds's avatar
      Merge tag 'x86-urgent-2022-05-15' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 79dc4fc2
      Linus Torvalds authored
      Pull x86 fix from Thomas Gleixner:
       "A single fix for the handling of unpopulated sub-pmd spaces.
      
        The copy & pasta from the corresponding s390 code screwed up the
        address calculation for marking the sub-pmd ranges via memset by
        omitting the ALIGN_DOWN() to calculate the proper start address.
      
        It's a mystery why this code is not generic and shared because there
        is nothing architecture specific in there, but that's too intrusive
        for a backportable fix"
      
      * tag 'x86-urgent-2022-05-15' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        x86/mm: Fix marking of unused sub-pmd ranges
      79dc4fc2
    • Linus Torvalds's avatar
      Merge tag 'sched-urgent-2022-05-15' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 990e798d
      Linus Torvalds authored
      Pull scheduler fix from Thomas Gleixner:
       "The recent expansion of the sched switch tracepoint inserted a new
        argument in the middle of the arguments. This reordering broke BPF
        programs which relied on the old argument list.
      
        While tracepoints are not considered stable ABI, it's not trivial to
        make BPF cope with such a change, but it's being worked on. For now
        restore the original argument order and move the new argument to the
        end of the argument list"
      
      * tag 'sched-urgent-2022-05-15' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        sched/tracing: Append prev_state to tp args instead
      990e798d
    • Linus Torvalds's avatar
      Merge tag 'irq-urgent-2022-05-15' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · fb756280
      Linus Torvalds authored
      Pull irq fix from Thomas Gleixner:
       "A single fix for a recent (introduced in 5.16) regression in the core
        interrupt code.
      
        The consolidation of the interrupt handler invocation code added an
        unconditional warning when generic_handle_domain_irq() is invoked from
        outside hard interrupt context. That's overbroad as the requirement
        for invoking these handlers in hard interrupt context is only required
        for certain interrupt types. The subsequently called code already
        contains a warning which triggers conditionally for interrupt chips
        which indicate this requirement in their properties.
      
        Remove the overbroad one"
      
      * tag 'irq-urgent-2022-05-15' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        genirq: Remove WARN_ON_ONCE() in generic_handle_domain_irq()
      fb756280
  4. 14 May, 2022 1 commit
  5. 13 May, 2022 23 commits