1. Oct 26, 2022
    • James Clark's avatar
      coresight: cti: Fix hang in cti_disable_hw() · 6746eae4
      James Clark authored
      cti_enable_hw() and cti_disable_hw() are called from an atomic context
      so shouldn't use runtime PM because it can result in a sleep when
      communicating with firmware.
      
      Since commit 3c665633 ("Revert "firmware: arm_scmi: Add clock
      management to the SCMI power domain""), this causes a hang on Juno when
      running the Perf Coresight tests or running this command:
      
        perf record -e cs_etm//u -- ls
      
      This was also missed until the revert commit because pm_runtime_put()
      was called with the wrong device until commit 692c9a49 ("coresight:
      cti: Correct the parameter for pm_runtime_put")
      
      With lock and scheduler debugging enabled the following is output:
      
         coresight cti_sys0: cti_enable_hw -- dev:cti_sys0  parent: 20020000.cti
         BUG: sleeping function called from invalid context at drivers/base/power/runtime.c:1151
         in_atomic(): 1, irqs_disabled(): 128, non_block: 0, pid: 330, name: perf-exec
         preempt_count: 2, expected: 0
         RCU nest depth: 0, expected: 0
         INFO: lockdep is turned off.
         irq event stamp: 0
         hardirqs last  enabled at (0): [<0000000000000000>] 0x0
         hardirqs last disabled at (0): [<ffff80000822b394>] copy_process+0xa0c/0x1948
         softirqs last  enabled at (0): [<ffff80000822b394>] copy_process+0xa0c/0x1948
         softirqs last disabled at (0): [<0000000000000000>] 0x0
         CPU: 3 PID: 330 Comm: perf-exec Not tainted 6.0.0-00053-g042116d99298 #7
         Hardware name: ARM LTD ARM Juno Development Platform/ARM Juno Development Platform, BIOS EDK II Sep 13 2022
         Call trace:
          dump_backtrace+0x134/0x140
          show_stack+0x20/0x58
          dump_stack_lvl+0x8c/0xb8
          dump_stack+0x18/0x34
          __might_resched+0x180/0x228
          __might_sleep+0x50/0x88
          __pm_runtime_resume+0xac/0xb0
          cti_enable+0x44/0x120
          coresight_control_assoc_ectdev+0xc0/0x150
          coresight_enable_path+0xb4/0x288
          etm_event_start+0x138/0x170
          etm_event_add+0x48/0x70
          event_sched_in.isra.122+0xb4/0x280
          merge_sched_in+0x1fc/0x3d0
          visit_groups_merge.constprop.137+0x16c/0x4b0
          ctx_sched_in+0x114/0x1f0
          perf_event_sched_in+0x60/0x90
          ctx_resched+0x68/0xb0
          perf_event_exec+0x138/0x508
          begin_new_exec+0x52c/0xd40
          load_elf_binary+0x6b8/0x17d0
          bprm_execve+0x360/0x7f8
          do_execveat_common.isra.47+0x218/0x238
          __arm64_sys_execve+0x48/0x60
          invoke_syscall+0x4c/0x110
          el0_svc_common.constprop.4+0xfc/0x120
          do_el0_svc+0x34/0xc0
          el0_svc+0x40/0x98
          el0t_64_sync_handler+0x98/0xc0
          el0t_64_sync+0x170/0x174
      
      Fix the issue by removing the runtime PM calls completely. They are not
      needed here because it must have already been done when building the
      path for a trace.
      
      Fixes: 835d722b
      
       ("coresight: cti: Initial CoreSight CTI Driver")
      Cc: stable <stable@kernel.org>
      Reported-by: default avatarAishwarya TCV <Aishwarya.TCV@arm.com>
      Reported-by: default avatarCristian Marussi <Cristian.Marussi@arm.com>
      Suggested-by: default avatarSuzuki K Poulose <suzuki.poulose@arm.com>
      Signed-off-by: default avatarJames Clark <james.clark@arm.com>
      Reviewed-by: default avatarMike Leach <mike.leach@linaro.org>
      Tested-by: default avatarMike Leach <mike.leach@linaro.org>
      [ Fix build warnings ]
      Signed-off-by: default avatarSuzuki K Poulose <suzuki.poulose@arm.com>
      Link: https://lore.kernel.org/r/20221025131032.1149459-1-suzuki.poulose@arm.com
      
      
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      6746eae4
  2. Oct 24, 2022
    • Greg Kroah-Hartman's avatar
      Revert "coresight: cti: Fix hang in cti_disable_hw()" · d76308f0
      Greg Kroah-Hartman authored
      This reverts commit 665c157e
      
      .
      
      It causes reported build warnings:
      
      drivers/hwtracing/coresight/coresight-cti-core.c: In functio
      n 'cti_enable_hw':
      drivers/hwtracing/coresight/coresight-cti-core.c:93:24: warning: unused variable 'dev' [-Wunused-variable]
         93 |         struct device *dev = &drvdata->csdev->dev;
            |                        ^~~
      drivers/hwtracing/coresight/coresight-cti-core.c: In function 'cti_disable_hw':
      drivers/hwtracing/coresight/coresight-cti-core.c:154:24: warning: unused variable 'dev' [-Wunused-variable]
        154 |         struct device *dev = &drvdata->csdev->dev;
            |                        ^~~
      
      Reported-by: default avatarStephen Rothwell <sfr@canb.auug.org.au>
      Cc: Aishwarya TCV <Aishwarya.TCV@arm.com>
      Cc: Cristian Marussi <Cristian.Marussi@arm.com>
      Cc: Suzuki Poulose <Suzuki.Poulose@arm.com>
      Cc: James Clark <james.clark@arm.com>
      Cc: Mike Leach <mike.leach@linaro.org>
      Cc: Mike Leach <mike.leach@linaro.org>
      Cc: Suzuki K Poulose <suzuki.poulose@arm.com>
      Fixes: 665c157e ("coresight: cti: Fix hang in cti_disable_hw()")
      Link: https://lore.kernel.org/r/20221024135752.2b83af97@canb.auug.org.au
      
      
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      d76308f0
    • Greg Kroah-Hartman's avatar
      Merge tag 'iio-fixes-for-6.1a' of... · 39114b88
      Greg Kroah-Hartman authored
      Merge tag 'iio-fixes-for-6.1a' of https://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio into char-misc-linus
      
      Jonathan writes:
        "1st set of IIO fixes for the 6.1 cycle.
      
         Usual bunch of driver fixes + one set of fixes for driver bugs
         introduced by a core change to how buffer attributes are handled.
      
         - buffer attributes
           * Remove usage of IIO_CONST_ATTR() for buffer attributes in all drivers
             where this occurred as that broke wrapping code need to duplicate these
             for multiple buffer support. The minimal fix is moving to
             IIO_DEVICE_ATTR_RO() with separate _show() routines.  A cleanup of
             this code, preventing similar issues in future will follow next merge
             window.
         - tools/iio
           * Wrong handling of number of digits in the number 0.
         - adi,ltc2983
           * Avoid reallocating channels on each wake up from sleep by moving
             that step out of the ltc2983_setup() function.
         - microchip,mcp3911
           * Wrong ID bits + masking in debug prints.
           * Fix ARRAY_SIZE() vs sizeof() mix up.
           * Handle NULL return on trigger allocation failure correctly.
         - st,stm32-adc:
           * Ensure we initialize sampling time even when optional property not
             provided in DT. Internal channels require a minimum value that will
             not otherwise be set.
         - taos,tsl2583
           * Fix a double call of iio_device_unregister() via device managed and
             un-managed paths."
      
      * tag 'iio-fixes-for-6.1a' of https://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio:
        iio: bmc150-accel-core: Fix unsafe buffer attributes
        iio: adxl367: Fix unsafe buffer attributes
        iio: adxl372: Fix unsafe buffer attributes
        iio: at91-sama5d2_adc: Fix unsafe buffer attributes
        iio: temperature: ltc2983: allocate iio channels once
        tools: iio: iio_utils: fix digit calculation
        iio: adc: stm32-adc: fix channel sampling time init
        iio: adc: mcp3911: mask out device ID in debug prints
        iio: adc: mcp3911: use correct id bits
        iio: adc: mcp3911: return proper error code on failure to allocate trigger
        iio: adc: mcp3911: fix sizeof() vs ARRAY_SIZE() bug
        iio: light: tsl2583: Fix module unloading
      39114b88
  3. Oct 22, 2022
  4. Oct 21, 2022
    • James Clark's avatar
      coresight: cti: Fix hang in cti_disable_hw() · 665c157e
      James Clark authored
      cti_enable_hw() and cti_disable_hw() are called from an atomic context
      so shouldn't use runtime PM because it can result in a sleep when
      communicating with firmware.
      
      Since commit 3c665633 ("Revert "firmware: arm_scmi: Add clock
      management to the SCMI power domain""), this causes a hang on Juno when
      running the Perf Coresight tests or running this command:
      
        perf record -e cs_etm//u -- ls
      
      This was also missed until the revert commit because pm_runtime_put()
      was called with the wrong device until commit 692c9a49 ("coresight:
      cti: Correct the parameter for pm_runtime_put")
      
      With lock and scheduler debugging enabled the following is output:
      
         coresight cti_sys0: cti_enable_hw -- dev:cti_sys0  parent: 20020000.cti
         BUG: sleeping function called from invalid context at drivers/base/power/runtime.c:1151
         in_atomic(): 1, irqs_disabled(): 128, non_block: 0, pid: 330, name: perf-exec
         preempt_count: 2, expected: 0
         RCU nest depth: 0, expected: 0
         INFO: lockdep is turned off.
         irq event stamp: 0
         hardirqs last  enabled at (0): [<0000000000000000>] 0x0
         hardirqs last disabled at (0): [<ffff80000822b394>] copy_process+0xa0c/0x1948
         softirqs last  enabled at (0): [<ffff80000822b394>] copy_process+0xa0c/0x1948
         softirqs last disabled at (0): [<0000000000000000>] 0x0
         CPU: 3 PID: 330 Comm: perf-exec Not tainted 6.0.0-00053-g042116d99298 #7
         Hardware name: ARM LTD ARM Juno Development Platform/ARM Juno Development Platform, BIOS EDK II Sep 13 2022
         Call trace:
          dump_backtrace+0x134/0x140
          show_stack+0x20/0x58
          dump_stack_lvl+0x8c/0xb8
          dump_stack+0x18/0x34
          __might_resched+0x180/0x228
          __might_sleep+0x50/0x88
          __pm_runtime_resume+0xac/0xb0
          cti_enable+0x44/0x120
          coresight_control_assoc_ectdev+0xc0/0x150
          coresight_enable_path+0xb4/0x288
          etm_event_start+0x138/0x170
          etm_event_add+0x48/0x70
          event_sched_in.isra.122+0xb4/0x280
          merge_sched_in+0x1fc/0x3d0
          visit_groups_merge.constprop.137+0x16c/0x4b0
          ctx_sched_in+0x114/0x1f0
          perf_event_sched_in+0x60/0x90
          ctx_resched+0x68/0xb0
          perf_event_exec+0x138/0x508
          begin_new_exec+0x52c/0xd40
          load_elf_binary+0x6b8/0x17d0
          bprm_execve+0x360/0x7f8
          do_execveat_common.isra.47+0x218/0x238
          __arm64_sys_execve+0x48/0x60
          invoke_syscall+0x4c/0x110
          el0_svc_common.constprop.4+0xfc/0x120
          do_el0_svc+0x34/0xc0
          el0_svc+0x40/0x98
          el0t_64_sync_handler+0x98/0xc0
          el0t_64_sync+0x170/0x174
      
      Fix the issue by removing the runtime PM calls completely. They are not
      needed here because it must have already been done when building the
      path for a trace.
      
      Fixes: 835d722b
      
       ("coresight: cti: Initial CoreSight CTI Driver")
      Reported-by: default avatarAishwarya TCV <Aishwarya.TCV@arm.com>
      Reported-by: default avatarCristian Marussi <Cristian.Marussi@arm.com>
      Suggested-by: default avatarSuzuki Poulose <Suzuki.Poulose@arm.com>
      Signed-off-by: default avatarJames Clark <james.clark@arm.com>
      Reviewed-by: default avatarMike Leach <mike.leach@linaro.org>
      Tested-by: default avatarMike Leach <mike.leach@linaro.org>
      Signed-off-by: default avatarSuzuki K Poulose <suzuki.poulose@arm.com>
      Link: https://lore.kernel.org/r/20221005131452.1506328-1-james.clark@arm.com
      665c157e
    • Sudeep Holla's avatar
      coresight: Fix possible deadlock with lock dependency · 23722fb4
      Sudeep Holla authored
      With lockdeps enabled, we get the following warning:
      
      ======================================================
      WARNING: possible circular locking dependency detected
      ------------------------------------------------------
      kworker/u12:1/53 is trying to acquire lock:
      ffff80000adce220 (coresight_mutex){+.+.}-{4:4}, at: coresight_set_assoc_ectdev_mutex+0x3c/0x5c
      but task is already holding lock:
      ffff80000add1f60 (ect_mutex){+.+.}-{4:4}, at: cti_probe+0x318/0x394
      
      which lock already depends on the new lock.
      the existing dependency chain (in reverse order) is:
      
      -> #1 (ect_mutex){+.+.}-{4:4}:
             __mutex_lock_common+0xd8/0xe60
             mutex_lock_nested+0x44/0x50
             cti_add_assoc_to_csdev+0x4c/0x184
             coresight_register+0x2f0/0x314
             tmc_probe+0x33c/0x414
      
      -> #0 (coresight_mutex){+.+.}-{4:4}:
             __lock_acquire+0x1a20/0x32d0
             lock_acquire+0x160/0x308
             __mutex_lock_common+0xd8/0xe60
             mutex_lock_nested+0x44/0x50
             coresight_set_assoc_ectdev_mutex+0x3c/0x5c
             cti_update_conn_xrefs+0x6c/0xf8
             cti_probe+0x33c/0x394
      
      other info that might help us debug this:
       Possible unsafe locking scenario:
             CPU0                    CPU1
             ----                    ----
        lock(ect_mutex);
                                     lock(coresight_mutex);
                                     lock(ect_mutex);
        lock(coresight_mutex);
       *** DEADLOCK ***
      
      4 locks held by kworker/u12:1/53:
       #0: ((wq_completion)events_unbound){+.+.}-{0:0}, at: process_one_work+0x1fc/0x63c
       #1: (deferred_probe_work){+.+.}-{0:0}, at: process_one_work+0x228/0x63c
       #2: (&dev->mutex){....}-{4:4}, at: __device_attach+0x48/0x1a8
       #3: (ect_mutex){+.+.}-{4:4}, at: cti_probe+0x318/0x394
      
      To fix the same, call cti_add_assoc_to_csdev without the holding
      coresight_mutex and confine the locking while setting the associated
      ect / cti device using coresight_set_assoc_ectdev_mutex().
      
      Fixes: 177af828
      
       ("coresight: cti: Enable CTI associated with devices")
      Cc: Mathieu Poirier <mathieu.poirier@linaro.org>
      Cc: Suzuki K Poulose <suzuki.poulose@arm.com>
      Cc: Mike Leach <mike.leach@linaro.org>
      Cc: Leo Yan <leo.yan@linaro.org>
      Signed-off-by: default avatarSudeep Holla <sudeep.holla@arm.com>
      Reviewed-by: default avatarMike Leach <mike.leach@linaro.org>
      Signed-off-by: default avatarSuzuki K Poulose <suzuki.poulose@arm.com>
      Link: https://lore.kernel.org/r/20220721130329.3787211-1-sudeep.holla@arm.com
      23722fb4
  5. Oct 17, 2022
  6. Oct 16, 2022
  7. Oct 15, 2022
    • Steve French's avatar
      smb3: improve SMB3 change notification support · e3e94634
      Steve French authored
      
      
      Change notification is a commonly supported feature by most servers,
      but the current ioctl to request notification when a directory is
      changed does not return the information about what changed
      (even though it is returned by the server in the SMB3 change
      notify response), it simply returns when there is a change.
      
      This ioctl improves upon CIFS_IOC_NOTIFY by returning the notify
      information structure which includes the name of the file(s) that
      changed and why. See MS-SMB2 2.2.35 for details on the individual
      filter flags and the file_notify_information structure returned.
      
      To use this simply pass in the following (with enough space
      to fit at least one file_notify_information structure)
      
      struct __attribute__((__packed__)) smb3_notify {
             uint32_t completion_filter;
             bool     watch_tree;
             uint32_t data_len;
             uint8_t  data[];
      } __packed;
      
      using CIFS_IOC_NOTIFY_INFO 0xc009cf0b
       or equivalently _IOWR(CIFS_IOCTL_MAGIC, 11, struct smb3_notify_info)
      
      The ioctl will block until the server detects a change to that
      directory or its subdirectories (if watch_tree is set).
      
      Acked-by: default avatarPaulo Alcantara (SUSE) <pc@cjr.nz>
      Acked-by: default avatarRonnie Sahlberg <lsahlber@redhat.com>
      Signed-off-by: default avatarSteve French <stfrench@microsoft.com>
      e3e94634
    • Steve French's avatar
      cifs: lease key is uninitialized in two additional functions when smb1 · 2bff0659
      Steve French authored
      
      
      cifs_open and _cifsFileInfo_put also end up with lease_key uninitialized
      in smb1 mounts.  It is cleaner to set lease key to zero in these
      places where leases are not supported (smb1 can not return lease keys
      so the field was uninitialized).
      
      Addresses-Coverity: 1514207 ("Uninitialized scalar variable")
      Addresses-Coverity: 1514331 ("Uninitialized scalar variable")
      Reviewed-by: default avatarPaulo Alcantara (SUSE) <pc@cjr.nz>
      Signed-off-by: default avatarSteve French <stfrench@microsoft.com>
      2bff0659
    • Steve French's avatar
      cifs: lease key is uninitialized in smb1 paths · 625b60d4
      Steve French authored
      
      
      It is cleaner to set lease key to zero in the places where leases are not
      supported (smb1 can not return lease keys so the field was uninitialized).
      
      Addresses-Coverity: 1513994 ("Uninitialized scalar variable")
      Reviewed-by: default avatarPaulo Alcantara (SUSE) <pc@cjr.nz>
      Signed-off-by: default avatarSteve French <stfrench@microsoft.com>
      625b60d4
    • Steve French's avatar
      smb3: must initialize two ACL struct fields to zero · f09bd695
      Steve French authored
      
      
      Coverity spotted that we were not initalizing Stbz1 and Stbz2 to
      zero in create_sd_buf.
      
      Addresses-Coverity: 1513848 ("Uninitialized scalar variable")
      Cc: <stable@vger.kernel.org>
      Reviewed-by: default avatarPaulo Alcantara (SUSE) <pc@cjr.nz>
      Signed-off-by: default avatarSteve French <stfrench@microsoft.com>
      f09bd695
    • Paulo Alcantara's avatar
      cifs: fix double-fault crash during ntlmssp · b854b4ee
      Paulo Alcantara authored
      The crash occurred because we were calling memzero_explicit() on an
      already freed sess_data::iov[1] (ntlmsspblob) in sess_free_buffer().
      
      Fix this by not calling memzero_explicit() on sess_data::iov[1] as
      it's already by handled by callers.
      
      Fixes: a4e430c8
      
       ("cifs: replace kfree() with kfree_sensitive() for sensitive data")
      Reviewed-by: default avatarEnzo Matsumiya <ematsumiya@suse.de>
      Signed-off-by: default avatarPaulo Alcantara (SUSE) <pc@cjr.nz>
      Signed-off-by: default avatarSteve French <stfrench@microsoft.com>
      b854b4ee
    • Arnaldo Carvalho de Melo's avatar
      tools arch x86: Sync the msr-index.h copy with the kernel sources · a3a36565
      Arnaldo Carvalho de Melo authored
      To pick up the changes in:
      
        b8d1d163 ("x86/apic: Don't disable x2APIC if locked")
        ca5b7c0d ("perf/x86/amd/lbr: Add LbrExtV2 branch record support")
      
      Addressing these tools/perf build warnings:
      
          diff -u tools/arch/x86/include/asm/msr-index.h arch/x86/include/asm/msr-index.h
          Warning: Kernel ABI header at 'tools/arch/x86/include/asm/msr-index.h' differs from latest version at 'arch/x86/include/asm/msr-index.h'
      
      That makes the beautification scripts to pick some new entries:
      
        $ tools/perf/trace/beauty/tracepoints/x86_msr.sh > before
        $ cp arch/x86/include/asm/msr-index.h tools/arch/x86/include/asm/msr-index.h
        $ tools/perf/trace/beauty/tracepoints/x86_msr.sh > after
        $ diff -u before after
        --- before	2022-10-14 18:06:34.294561729 -0300
        +++ after	2022-10-14 18:06:41.285744044 -0300
        @@ -264,6 +264,7 @@
         	[0xc0000102 - x86_64_specific_MSRs_offset] = "KERNEL_GS_BASE",
         	[0xc0000103 - x86_64_specific_MSRs_offset] = "TSC_AUX",
         	[0xc0000104 - x86_64_specific_MSRs_offset] = "AMD64_TSC_RATIO",
        +	[0xc000010e - x86_64_specific_MSRs_offset] = "AMD64_LBR_SELECT",
         	[0xc000010f - x86_64_specific_MSRs_offset] = "AMD_DBG_EXTN_CFG",
         	[0xc0000300 - x86_64_specific_MSRs_offset] = "AMD64_PERF_CNTR_GLOBAL_STATUS",
         	[0xc0000301 - x86_64_specific_MSRs_offset] = "AMD64_PERF_CNTR_GLOBAL_CTL",
        $
      
      Now one can trace systemwide asking to see backtraces to where that MSR
      is being read/written, see this example with a previous update:
      
        # perf trace -e msr:*_msr/max-stack=32/ --filter="msr>=IA32_U_CET && msr<=IA32_INT_SSP_TAB"
        ^C#
      
      If we use -v (verbose mode) we can see what it does behind the scenes:
      
        # perf trace -v -e msr:*_msr/max-stack=32/ --filter="msr>=IA32_U_CET && msr<=IA32_INT_SSP_TAB"
        Using CPUID AuthenticAMD-25-21-0
        0x6a0
        0x6a8
        New filter for msr:read_msr: (msr>=0x6a0 && msr<=0x6a8) && (common_pid != 597499 && common_pid != 3313)
        0x6a0
        0x6a8
        New filter for msr:write_msr: (msr>=0x6a0 && msr<=0x6a8) && (common_pid != 597499 && common_pid != 3313)
        mmap size 528384B
        ^C#
      
      Example with a frequent msr:
      
        # perf trace -v -e msr:*_msr/max-stack=32/ --filter="msr==IA32_SPEC_CTRL" --max-events 2
        Using CPUID AuthenticAMD-25-21-0
        0x48
        New filter for msr:read_msr: (msr==0x48) && (common_pid != 2612129 && common_pid != 3841)
        0x48
        New filter for msr:write_msr: (msr==0x48) && (common_pid != 2612129 && common_pid != 3841)
        mmap size 528384B
        Looking at the vmlinux_path (8 entries long)
        symsrc__init: build id mismatch for vmlinux.
        Using /proc/kcore for kernel data
        Using /proc/kallsyms for symbols
           0.000 Timer/2525383 msr:write_msr(msr: IA32_SPEC_CTRL, val: 6)
                                             do_trace_write_msr ([kernel.kallsyms])
                                             do_trace_write_msr ([kernel.kallsyms])
                                             __switch_to_xtra ([kernel.kallsyms])
                                             __switch_to ([kernel.kallsyms])
                                             __schedule ([kernel.kallsyms])
                                             schedule ([kernel.kallsyms])
                                             futex_wait_queue_me ([kernel.kallsyms])
                                             futex_wait ([kernel.kallsyms])
                                             do_futex ([kernel.kallsyms])
                                             __x64_sys_futex ([kernel.kallsyms])
                                             do_syscall_64 ([kernel.kallsyms])
                                             entry_SYSCALL_64_after_hwframe ([kernel.kallsyms])
                                             __futex_abstimed_wait_common64 (/usr/lib64/libpthread-2.33.so)
           0.030 :0/0 msr:write_msr(msr: IA32_SPEC_CTRL, val: 2)
                                             do_trace_write_msr ([kernel.kallsyms])
                                             do_trace_write_msr ([kernel.kallsyms])
                                             __switch_to_xtra ([kernel.kallsyms])
                                             __switch_to ([kernel.kallsyms])
                                             __schedule ([kernel.kallsyms])
                                             schedule_idle ([kernel.kallsyms])
                                             do_idle ([kernel.kallsyms])
                                             cpu_startup_entry ([kernel.kallsyms])
                                             secondary_startup_64_no_verify ([kernel.kallsyms])
        #
      
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      Cc: Daniel Sneddon <daniel.sneddon@linux.intel.com>
      Cc: Dave Hansen <dave.hansen@linux.intel.com>
      Cc: Ian Rogers <irogers@google.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Sandipan Das <sandipan.das@amd.com>
      Link: https://lore.kernel.org/lkml/Y0nQkz2TUJxwfXJd@kernel.org
      
      
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      a3a36565
    • Qi Liu's avatar
      perf auxtrace arm64: Add support for parsing HiSilicon PCIe Trace packet · 5e91e57e
      Qi Liu authored
      
      
      Add support for using 'perf report --dump-raw-trace' to parse PTT packet.
      
      Example usage:
      
      Output will contain raw PTT data and its textual representation, such
      as (8DW format):
      
      0 0 0x5810 [0x30]: PERF_RECORD_AUXTRACE size: 0x400000  offset: 0
      ref: 0xa5d50c725  idx: 0  tid: -1  cpu: 0
      .
      . ... HISI PTT data: size 4194304 bytes
      .  00000000: 00 00 00 00                                 Prefix
      .  00000004: 08 20 00 60                                 Header DW0
      .  00000008: ff 02 00 01                                 Header DW1
      .  0000000c: 20 08 00 00                                 Header DW2
      .  00000010: 10 e7 44 ab                                 Header DW3
      .  00000014: 2a a8 1e 01                                 Time
      .  00000020: 00 00 00 00                                 Prefix
      .  00000024: 01 00 00 60                                 Header DW0
      .  00000028: 0f 1e 00 01                                 Header DW1
      .  0000002c: 04 00 00 00                                 Header DW2
      .  00000030: 40 00 81 02                                 Header DW3
      .  00000034: ee 02 00 00                                 Time
      ....
      
      This patch only add basic parsing support according to the definition of
      the PTT packet described in Documentation/trace/hisi-ptt.rst. And the
      fields of each packet can be further decoded following the PCIe Spec's
      definition of TLP packet.
      
      Signed-off-by: default avatarQi Liu <liuqi115@huawei.com>
      Signed-off-by: default avatarYicong Yang <yangyicong@hisilicon.com>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Bjorn Helgaas <helgaas@kernel.org>
      Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: James Clark <james.clark@arm.com>
      Cc: John Garry <john.garry@huawei.com>
      Cc: Jonathan Cameron <jonathan.cameron@huawei.com>
      Cc: Leo Yan <leo.yan@linaro.org>
      Cc: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Cc: Mathieu Poirier <mathieu.poirier@linaro.org>
      Cc: Mike Leach <mike.leach@linaro.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Qi Liu <liuqi6124@gmail.com>
      Cc: Shameerali Kolothum Thodi <shameerali.kolothum.thodi@huawei.com>
      Cc: Shaokun Zhang <zhangshaokun@hisilicon.com>
      Cc: Suzuki Poulouse <suzuki.poulose@arm.com>
      Cc: Will Deacon <will@kernel.org>
      Cc: Zeng Prime <prime.zeng@huawei.com>
      Cc: linux-arm-kernel@lists.infradead.org
      Cc: linux-pci@vger.kernel.org
      Cc: linuxarm@huawei.com
      Link: https://lore.kernel.org/r/20220927081400.14364-4-yangyicong@huawei.com
      
      
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      5e91e57e
    • Qi Liu's avatar
      perf auxtrace arm64: Add support for HiSilicon PCIe Tune and Trace device driver · 057381a7
      Qi Liu authored
      
      
      HiSilicon PCIe tune and trace device (PTT) could dynamically tune the
      PCIe link's events, and trace the TLP headers).
      
      This patch add support for PTT device in perf tool, so users could use
      'perf record' to get TLP headers trace data.
      
      Reviewed-by: default avatarLeo Yan <leo.yan@linaro.org>
      Signed-off-by: default avatarQi Liu <liuqi115@huawei.com>
      Signed-off-by: default avatarYicong Yang <yangyicong@hisilicon.com>
      Acked-by: default avatarJohn Garry <john.garry@huawei.com>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Bjorn Helgaas <helgaas@kernel.org>
      Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: James Clark <james.clark@arm.com>
      Cc: Jonathan Cameron <jonathan.cameron@huawei.com>
      Cc: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Cc: Mathieu Poirier <mathieu.poirier@linaro.org>
      Cc: Mike Leach <mike.leach@linaro.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Qi Liu <liuqi6124@gmail.com>
      Cc: Shameerali Kolothum Thodi <shameerali.kolothum.thodi@huawei.com>
      Cc: Shaokun Zhang <zhangshaokun@hisilicon.com>
      Cc: Suzuki Poulouse <suzuki.poulose@arm.com>
      Cc: Will Deacon <will@kernel.org>
      Cc: Zeng Prime <prime.zeng@huawei.com>
      Cc: linux-arm-kernel@lists.infradead.org
      Cc: linux-pci@vger.kernel.org
      Cc: linuxarm@huawei.com
      Link: https://lore.kernel.org/r/20220927081400.14364-3-yangyicong@huawei.com
      
      
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      057381a7