1. 04 Jun, 2022 4 commits
    • Linus Torvalds's avatar
      Merge tag 'for-linus-5.19-rc1b-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip · 4ccbe91d
      Linus Torvalds authored
      Pull more xen updates from Juergen Gross:
       "Two cleanup patches for Xen related code and (more important) an
        update of MAINTAINERS for Xen, as Boris Ostrovsky decided to step
        down"
      
      * tag 'for-linus-5.19-rc1b-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip:
        xen: replace xen_remap() with memremap()
        MAINTAINERS: Update Xen maintainership
        xen: switch gnttab_end_foreign_access() to take a struct page pointer
      4ccbe91d
    • Linus Torvalds's avatar
      Merge tag 'perf-tools-for-v5.19-2022-06-04' of... · 45b2e5ad
      Linus Torvalds authored
      Merge tag 'perf-tools-for-v5.19-2022-06-04' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux
      
      Pull more perf tools updates from Arnaldo Carvalho de Melo:
      
       - Synthesize task events for pre-existing threads when using 'perf lock
         --threads', as we need to show task names.
      
       - Fix unwinding with ld.lld (>= version 10.0) linked objects, where
        .eh_frame_hdr and .text are in different PT_LOAD program headers,
         which makes perf record --call-graph dwarf fail with such obkects.
      
       - Check if 'perf record' hangs in the ARM SPE (Statistical Profiling
         Extensions) 'perf test' entry when recording a workload with forks.
      
       - Trace physical address for Arm SPE events, needed for 'perf c2c' to
         locate the memory node for samples.
      
       - Fix sorting in percent_rmt_hitm_cmp() in 'perf c2c'.
      
       - Further support for Intel hybrid systems in the evlist and 'perf
         record' code.
      
       - Update IBM s/390 vendor event JSON tables.
      
       - Add metrics (JSON) for Intel Sapphirerapids.
      
       - Update metrics for Intel Alderlake.
      
       - Correct typo of sysf 'event_source' directory in the documentation.
      
      * tag 'perf-tools-for-v5.19-2022-06-04' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux:
        perf vendor events intel: Update metrics for Alderlake
        perf vendor events intel: Add metrics for Sapphirerapids
        perf c2c: Fix sorting in percent_rmt_hitm_cmp()
        perf mem: Trace physical address for Arm SPE events
        perf list: Update event description for IBM zEC12/zBC12 to latest level
        perf list: Update event description for IBM z196/z114 to latest level
        perf list: Update event description for IBM z15 to latest level
        perf list: Update event description for IBM z14 to latest level
        perf list: Update event description for IBM z13 to latest level
        perf list: Update event description for IBM z10 to latest level
        perf list: Add IBM z16 event description for s390
        perf record: Support sample-read topdown metric group for hybrid platforms
        perf lock: Change to synthesize task events
        perf unwind: Fix segbase for ld.lld linked objects
        perf test arm-spe: Check if perf-record hangs when recording workload with forks
        perf docs: Correct typo of event_sources
        perf evlist: Extend arch_evsel__must_be_in_group to support hybrid systems
      45b2e5ad
    • Linus Torvalds's avatar
      Merge tag 'gpio-fixes-for-v5.19-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux · 032dcf09
      Linus Torvalds authored
      Pull gpio fixes from Bartosz Golaszewski:
      
       - use the correct register for regcache sync in gpio-pca953x
      
       - remove unused and potentially harmful code from gpio-adp5588
      
       - MAINTAINERS update
      
      * tag 'gpio-fixes-for-v5.19-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux:
        gpio: adp5588: Remove support for platform setup and teardown callbacks
        gpio: pca953x: use the correct register address to do regcache sync
        MAINTAINERS: Update Intel GPIO (PMIC and PCH) to Supported
        MAINTAINERS: Update GPIO ACPI library to Supported
      032dcf09
    • Linus Torvalds's avatar
      Merge tag 'regulator-fix-v5.19-rc0' of... · 77d4d360
      Linus Torvalds authored
      Merge tag 'regulator-fix-v5.19-rc0' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator
      
      Pull regulator fix from Mark Brown:
       "One fix that came in during the merge window, fixing an error in the
        examples in the DT binding documentation for mt6315"
      
      * tag 'regulator-fix-v5.19-rc0' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator:
        regulator: mt6315-regulator: fix invalid allowed mode
      77d4d360
  2. 03 Jun, 2022 36 commits
    • Linus Torvalds's avatar
      Merge tag 'ntfs3_for_5.19' of https://github.com/Paragon-Software-Group/linux-ntfs3 · 1f952675
      Linus Torvalds authored
      Pull ntfs3 updates from Konstantin Komarov:
      
       - fix some memory leaks and panic
      
       - fixed xfstests (tested on x86_64): generic/092 generic/099
         generic/228 generic/240 generic/307 generic/444
      
       - fix some typos, dead code, etc
      
      * tag 'ntfs3_for_5.19' of https://github.com/Paragon-Software-Group/linux-ntfs3:
        fs/ntfs3: provide block_invalidate_folio to fix memory leak
        fs/ntfs3: Fix invalid free in log_replay
        fs/ntfs3: Update valid size if -EIOCBQUEUED
        fs/ntfs3: Check new size for limits
        fs/ntfs3: Fix fiemap + fix shrink file size (to remove preallocated space)
        fs/ntfs3: In function ntfs_set_acl_ex do not change inode->i_mode if called from function ntfs_init_acl
        fs/ntfs3: Optimize locking in ntfs_save_wsl_perm
        fs/ntfs3: Update i_ctime when xattr is added
        fs/ntfs3: Restore ntfs_xattr_get_acl and ntfs_xattr_set_acl functions
        fs/ntfs3: Keep preallocated only if option prealloc enabled
        fs/ntfs3: Fix some memory leaks in an error handling path of 'log_replay()'
      1f952675
    • Linus Torvalds's avatar
      Merge tag 'ptrace_stop-cleanup-for-v5.19' of... · 67850b7b
      Linus Torvalds authored
      Merge tag 'ptrace_stop-cleanup-for-v5.19' of git://git.kernel.org/pub/scm/linux/kernel/git/ebiederm/user-namespace
      
      Pull ptrace_stop cleanups from Eric Biederman:
       "While looking at the ptrace problems with PREEMPT_RT and the problems
        Peter Zijlstra was encountering with ptrace in his freezer rewrite I
        identified some cleanups to ptrace_stop that make sense on their own
        and move make resolving the other problems much simpler.
      
        The biggest issue is the habit of the ptrace code to change
        task->__state from the tracer to suppress TASK_WAKEKILL from waking up
        the tracee. No other code in the kernel does that and it is straight
        forward to update signal_wake_up and friends to make that unnecessary.
      
        Peter's task freezer sets frozen tasks to a new state TASK_FROZEN and
        then it stores them by calling "wake_up_state(t, TASK_FROZEN)" relying
        on the fact that all stopped states except the special stop states can
        tolerate spurious wake up and recover their state.
      
        The state of stopped and traced tasked is changed to be stored in
        task->jobctl as well as in task->__state. This makes it possible for
        the freezer to recover tasks in these special states, as well as
        serving as a general cleanup. With a little more work in that
        direction I believe TASK_STOPPED can learn to tolerate spurious wake
        ups and become an ordinary stop state.
      
        The TASK_TRACED state has to remain a special state as the registers
        for a process are only reliably available when the process is stopped
        in the scheduler. Fundamentally ptrace needs acess to the saved
        register values of a task.
      
        There are bunch of semi-random ptrace related cleanups that were found
        while looking at these issues.
      
        One cleanup that deserves to be called out is from commit 57b6de08
        ("ptrace: Admit ptrace_stop can generate spuriuos SIGTRAPs"). This
        makes a change that is technically user space visible, in the handling
        of what happens to a tracee when a tracer dies unexpectedly. According
        to our testing and our understanding of userspace nothing cares that
        spurious SIGTRAPs can be generated in that case"
      
      * tag 'ptrace_stop-cleanup-for-v5.19' of git://git.kernel.org/pub/scm/linux/kernel/git/ebiederm/user-namespace:
        sched,signal,ptrace: Rework TASK_TRACED, TASK_STOPPED state
        ptrace: Always take siglock in ptrace_resume
        ptrace: Don't change __state
        ptrace: Admit ptrace_stop can generate spuriuos SIGTRAPs
        ptrace: Document that wait_task_inactive can't fail
        ptrace: Reimplement PTRACE_KILL by always sending SIGKILL
        signal: Use lockdep_assert_held instead of assert_spin_locked
        ptrace: Remove arch_ptrace_attach
        ptrace/xtensa: Replace PT_SINGLESTEP with TIF_SINGLESTEP
        ptrace/um: Replace PT_DTRACE with TIF_SINGLESTEP
        signal: Replace __group_send_sig_info with send_signal_locked
        signal: Rename send_signal send_signal_locked
      67850b7b
    • Linus Torvalds's avatar
      Merge tag 'kthread-cleanups-for-v5.19' of... · 1ec6574a
      Linus Torvalds authored
      Merge tag 'kthread-cleanups-for-v5.19' of git://git.kernel.org/pub/scm/linux/kernel/git/ebiederm/user-namespace
      
      Pull kthread updates from Eric Biederman:
       "This updates init and user mode helper tasks to be ordinary user mode
        tasks.
      
        Commit 40966e31 ("kthread: Ensure struct kthread is present for
        all kthreads") caused init and the user mode helper threads that call
        kernel_execve to have struct kthread allocated for them. This struct
        kthread going away during execve in turned made a use after free of
        struct kthread possible.
      
        Here, commit 343f4c49 ("kthread: Don't allocate kthread_struct for
        init and umh") is enough to fix the use after free and is simple
        enough to be backportable.
      
        The rest of the changes pass struct kernel_clone_args to clean things
        up and cause the code to make sense.
      
        In making init and the user mode helpers tasks purely user mode tasks
        I ran into two complications. The function task_tick_numa was
        detecting tasks without an mm by testing for the presence of
        PF_KTHREAD. The initramfs code in populate_initrd_image was using
        flush_delayed_fput to ensuere the closing of all it's file descriptors
        was complete, and flush_delayed_fput does not work in a userspace
        thread.
      
        I have looked and looked and more complications and in my code review
        I have not found any, and neither has anyone else with the code
        sitting in linux-next"
      
      * tag 'kthread-cleanups-for-v5.19' of git://git.kernel.org/pub/scm/linux/kernel/git/ebiederm/user-namespace:
        sched: Update task_tick_numa to ignore tasks without an mm
        fork: Stop allowing kthreads to call execve
        fork: Explicitly set PF_KTHREAD
        init: Deal with the init process being a user mode process
        fork: Generalize PF_IO_WORKER handling
        fork: Explicity test for idle tasks in copy_thread
        fork: Pass struct kernel_clone_args into copy_thread
        kthread: Don't allocate kthread_struct for init and umh
      1ec6574a
    • Linus Torvalds's avatar
      Merge tag 'per-namespace-ipc-sysctls-for-v5.19' of... · 1888e9b4
      Linus Torvalds authored
      Merge tag 'per-namespace-ipc-sysctls-for-v5.19' of git://git.kernel.org/pub/scm/linux/kernel/git/ebiederm/user-namespace
      
      Pull ipc sysctl namespace updates from Eric Biederman:
       "This updates the ipc sysctls so that they are fundamentally per ipc
        namespace. Previously these sysctls depended upon a hack to simulate
        being per ipc namespace by looking up the ipc namespace in read or
        write. With this set of changes the ipc sysctls are registered per ipc
        namespace and open looks up the ipc namespace.
      
        Not only does this series of changes ensure the traditional binding at
        open time happens, but it sets a foundation for being able to relax
        the permission checks to allow a user namspace root to change the ipc
        sysctls for an ipc namespace that the user namespace root requires. To
        do this requires the ipc namespace to be known at open time"
      
      * tag 'per-namespace-ipc-sysctls-for-v5.19' of git://git.kernel.org/pub/scm/linux/kernel/git/ebiederm/user-namespace:
        ipc: Remove extra braces
        ipc: Check permissions for checkpoint_restart sysctls at open time
        ipc: Remove extra1 field abuse to pass ipc namespace
        ipc: Use the same namespace to modify and validate
        ipc: Store ipc sysctls in the ipc namespace
        ipc: Store mqueue sysctls in the ipc namespace
      1888e9b4
    • Linus Torvalds's avatar
      firmware_loader: enable XZ by default if compressed support is enabled · 07953c54
      Linus Torvalds authored
      Commit 23cfbc6e ("firmware: Add the support for ZSTD-compressed
      firmware files") added support for ZSTD compression, but in the process
      also made the previously default XZ compression a config option.
      
      That means that anybody who upgrades their kernel and does a
      
          make oldconfig
      
      to update their configuration, will end up without the XZ compression
      that the configuration used to have.
      
      Add the 'default y' to make sure this doesn't happen.
      
      The whole compression question should probably be improved upon, since
      it is now possible to "enable" compression in the kernel config but not
      enable any actual compression algorithm, which makes it all very
      useless.  It makes no sense to ask Kconfig questions that enable
      situations that are nonsensical like that.
      
      This at least fixes the immediate problem of a kernel update resulting
      in a nonbootable machine because of a missed option.
      
      Fixes: 23cfbc6e ("firmware: Add the support for ZSTD-compressed  firmware files")
      Cc: Takashi Iwai <tiwai@suse.de>
      Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      07953c54
    • Linus Torvalds's avatar
      Merge tag 'for-linus-5.19-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rw/ubifs · 744983d8
      Linus Torvalds authored
      Pull JFFS2, UBI and UBIFS updates from Richard Weinberger:
       "JFFS2:
         - Fixes for a memory leak
      
        UBI:
         - Fixes for fastmap (UAF, high CPU usage)
      
        UBIFS:
         - Minor cleanups"
      
      * tag 'for-linus-5.19-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rw/ubifs:
        ubi: ubi_create_volume: Fix use-after-free when volume creation failed
        ubi: fastmap: Check wl_pool for free peb before wear leveling
        ubi: fastmap: Fix high cpu usage of ubi_bgt by making sure wl_pool not empty
        ubifs: Use NULL instead of using plain integer as pointer
        ubifs: Simplify the return expression of run_gc()
        jffs2: fix memory leak in jffs2_do_fill_super
        jffs2: Use kzalloc instead of kmalloc/memset
      744983d8
    • Linus Torvalds's avatar
      Merge tag 'for-linus-5.19-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rw/uml · 4e583ff9
      Linus Torvalds authored
      Pull UML updates from Richard Weinberger:
      
       - Various cleanups and fixes: xterm, serial line, time travel
      
       - Set ARCH_HAS_GCOV_PROFILE_ALL
      
      * tag 'for-linus-5.19-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rw/uml:
        um: Fix out-of-bounds read in LDT setup
        um: chan_user: Fix winch_tramp() return value
        um: virtio_uml: Fix broken device handling in time-travel
        um: line: Use separate IRQs per line
        um: Enable ARCH_HAS_GCOV_PROFILE_ALL
        um: Use asm-generic/dma-mapping.h
        um: daemon: Make default socket configurable
        um: xterm: Make default terminal emulator configurable
      4e583ff9
    • Linus Torvalds's avatar
      Merge tag 'devicetree-fixes-for-5.19-1' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux · a01fe7ec
      Linus Torvalds authored
      Pull devicetree fixes from Rob Herring:
      
       - Fixes for unevaluatedProperties warnings.
      
         These were missed to due to a bug in dtschema which is now fixed. The
         changes involve either adding missing properties or removing spurious
         properties from examples.
      
       - Update several Qualcomm binding maintainer email addresses
      
       - Fix typo in imx8mp-media-blk-ctrl example
      
       - Fix fixed string pattern in qcom,smd
      
       - Correct the order of 'reg' entries in Xilinx PCI binding
      
      * tag 'devicetree-fixes-for-5.19-1' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux:
        dt-bindings: mtd: spi-nand: Add spi-peripheral-props.yaml reference
        dt-bindings: memory-controllers: ingenic: Split out child node properties
        dt-bindings: net/dsa: Add spi-peripheral-props.yaml references
        dt-bindings: PCI: apple: Add missing 'power-domains' property
        dt-bindings: Update Sibi Sankar's email address
        dt-bindings: clock: Update my email address
        dt-bindings: PCI: xilinx-cpm: Fix reg property order
        dt-bindings: net: Fix unevaluatedProperties warnings in examples
        dt-bindings: PCI: socionext,uniphier-pcie: Add missing child interrupt controller
        dt-bindings: usb: snps,dwc3: Add missing 'dma-coherent' property
        dt-bindings: soc: imx8mp-media-blk-ctrl: Fix DT example
        dt-bindings: soc: qcom,smd: do not use pattern for simple rpm-requests string
      a01fe7ec
    • Linus Torvalds's avatar
      Merge tag 'arm-multiplatform-5.19-3' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc · 9af13088
      Linus Torvalds authored
      Pull yet more ARM multiplatform updates from Arnd Bergmann:
       "This is the third and final bit of the multiplatform conversion for
        ARMv5, finishing off OMAP1. One patch enables the common-clk
        interface, and the other ones does the Kconfig change.
      
        These were waiting on a few dependencies to trickle in for common-clk,
        and the last one of those was in the USB tree"
      
      * tag 'arm-multiplatform-5.19-3' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc:
        ARM: omap1: enable multiplatform
        ARM: OMAP1: clock: Convert to CCF
      9af13088
    • Linus Torvalds's avatar
      Merge tag 'loongarch-5.19' of git://git.kernel.org/pub/scm/linux/kernel/git/arnd/asm-generic · c6f2f3e2
      Linus Torvalds authored
      Pull initial Loongarch architecture code from Arnd Bergmann:
       "This is the majority of the loongarch architecture code, including the
        final system call interface and all core functionality.
      
        It still misses three sets of peripheral but vital patches to add
        support for other subsystems, which have yet to pass review:
      
         - The drivers/firmware/efi stub for booting from a standard UEFI
           firmware implementation. Both the original custom boot interface
           and a draft implementation of the EFI stub did not make it, so it
           is currently impossible to boot the kernel, until the loongarch
           specific portions get accepted into the UEFI subsystem
      
         - The drivers/irqchip/irq-loongson-*.c drivers are shared with the
           the MIPS port, but currently lack support for ACPI based booting,
           which will get merged through the irqchip subsystem.
      
         - Similarly, the drivers/pci/controller/pci-loongson.c needs to be
           modified for ACPI support, which will be merged through the PCI
           subsystem.
      
        While the port cannot actually be used before all the above are
        merged, having it in 5.19 helps to establish the user space ABI for
        the libc ports to build on, and to help any treewide changes in the
        mainline kernel get applied here as well.
      
        A gcc-12 based tool chains for build testing is now included in
      
          https://mirrors.edge.kernel.org/pub/tools/crosstool/"
      
      Original description from Huacai Chen:
       "LoongArch is a new RISC ISA, which is a bit like MIPS or RISC-V.
        LoongArch includes a reduced 32-bit version (LA32R), a standard 32-bit
        version (LA32S) and a 64-bit version (LA64). LoongArch use ACPI as its
        boot protocol LoongArch-specific interrupt controllers (similar to APIC)
        are already added in the next revision of ACPI Specification (current
        revision is 6.4).
      
        This patchset is adding basic LoongArch support in mainline kernel, we
        can see a complete snapshot here:
      
          https://github.com/loongson/linux/tree/loongarch-next
          https://git.kernel.org/pub/scm/linux/kernel/git/chenhuacai/linux-loongson.git/log/?h=loongarch-next
      
        Cross-compile tool chain to build kernel:
      
          https://github.com/loongson/build-tools/releases/download/2021.12.21/loongarch64-clfs-2022-03-03-cross-tools-gcc-glibc.tar.xz
      
        A CLFS-based Linux distro:
      
          https://github.com/loongson/build-tools/releases/download/2021.12.21/loongarch64-clfs-system-2022-03-03.tar.bz2
      
        Open-source tool chain which is under review (Binutils and Gcc are already upstream):
      
          https://github.com/loongson/binutils-gdb/tree/upstream_v3.1
          https://github.com/loongson/gcc/tree/loongarch_upstream_v6.3
          https://github.com/loongson/glibc/tree/loongarch_2_35_dev_v2.2
      
        Loongson and LoongArch documentations:
      
          https://github.com/loongson/LoongArch-Documentation
      
        LoongArch-specific interrupt controllers:
      
          https://mantis.uefi.org/mantis/view.php?id=2203
          https://mantis.uefi.org/mantis/view.php?id=2313"
      
      Link: https://lore.kernel.org/lkml/20220603072053.35005-1-chenhuacai@loongson.cn/
      
      * tag 'loongarch-5.19' of git://git.kernel.org/pub/scm/linux/kernel/git/arnd/asm-generic: (24 commits)
        MAINTAINERS: Add maintainer information for LoongArch
        LoongArch: Add Loongson-3 default config file
        LoongArch: Add Non-Uniform Memory Access (NUMA) support
        LoongArch: Add multi-processor (SMP) support
        LoongArch: Add VDSO and VSYSCALL support
        LoongArch: Add some library functions
        LoongArch: Add misc common routines
        LoongArch: Add ELF and module support
        LoongArch: Add signal handling support
        LoongArch: Add system call support
        LoongArch: Add memory management
        LoongArch: Add process management
        LoongArch: Add exception/interrupt handling
        LoongArch: Add boot and setup routines
        LoongArch: Add other common headers
        LoongArch: Add atomic/locking headers
        LoongArch: Add CPU definition headers
        LoongArch: Add build infrastructure
        LoongArch: Add writecombine support for drm
        LoongArch: Add ELF-related definitions
        ...
      c6f2f3e2
    • Linus Torvalds's avatar
      Merge tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux · 21873bd6
      Linus Torvalds authored
      Pull arm64 fixes from Catalin Marinas:
       "Most of issues addressed were introduced during this merging window.
      
         - Initialise jump labels before setup_machine_fdt(), needed by commit
           f5bda35f ("random: use static branch for crng_ready()").
      
         - Sparse warnings: missing prototype, incorrect __user annotation.
      
         - Skip SVE kselftest if not sufficient vector lengths supported"
      
      * tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux:
        kselftest/arm64: signal: Skip SVE signal test if not enough VLs supported
        arm64: Initialize jump labels before setup_machine_fdt()
        arm64: hibernate: Fix syntax errors in comments
        arm64: Remove the __user annotation for the restore_za_context() argument
        ftrace/fgraph: fix increased missing-prototypes warnings
      21873bd6
    • Linus Torvalds's avatar
      Merge tag 'riscv-for-linus-5.19-mw2' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux · f66e797b
      Linus Torvalds authored
      Pull more RISC-V updates from Palmer Dabbelt:
       "This is mostly some DT updates, but also a handful of cleanups and
        some fixes. The most user-visible of those are:
      
         - A device tree for the Sundance Polarberry, along with a handful of
           fixes and clenups to the PolarFire SOC device trees and bindings.
      
         - The memfd_secret syscall number is now visible to userspace,
      
         - Some improvements to the vm layout dump, which really should have
           followed shortly after the sv48 patches but I missed"
      
      * tag 'riscv-for-linus-5.19-mw2' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux:
        riscv: Move alternative length validation into subsection
        riscv: mm: init: make pt_ops_set_[early|late|fixmap] static
        riscv: move errata/ and kvm/ builds to arch/riscv/Kbuild
        RISC-V: Mark IORESOURCE_EXCLUSIVE for reserved mem instead of IORESOURCE_BUSY
        riscv: Wire up memfd_secret in UAPI header
        riscv: Fix irq_work when SMP is disabled
        riscv: Improve virtual kernel memory layout dump
        riscv: Initialize thread pointer before calling C functions
        Documentation: riscv: Add sv48 description to VM layout
        RISC-V: Only default to spinwait on SBI-0.1 and M-mode
        riscv: dts: icicle: sort nodes alphabetically
        riscv: microchip: icicle: readability fixes
        riscv: dts: microchip: add the sundance polarberry
        dt-bindings: riscv: microchip: add polarberry compatible string
        dt-bindings: vendor-prefixes: add Sundance DSP
        riscv: dts: microchip: make the fabric dtsi board specific
        dt-bindings: riscv: microchip: document icicle reference design
        riscv: dts: microchip: remove soc vendor from filenames
        riscv: dts: microchip: move sysctrlr out of soc bus
        riscv: dts: microchip: remove icicle memory clocks
      f66e797b
    • Linus Torvalds's avatar
      Merge tag 's390-5.19-2' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux · 4ab6cfc4
      Linus Torvalds authored
      Pull more s390 updates from Heiko Carstens:
       "Just a couple of small improvements, bug fixes and cleanups:
      
         - Add Eric Farman as maintainer for s390 virtio drivers.
      
         - Improve machine check handling, and avoid incorrectly injecting a
           machine check into a kvm guest.
      
         - Add cond_resched() call to gmap page table walker in order to avoid
           possible huge latencies. Also use non-quiesing sske instruction to
           speed up storage key handling.
      
         - Add __GFP_NORETRY to KEXEC_CONTROL_MEMORY_GFP so s390 behaves
           similar like common code.
      
         - Get sie control block address from correct stack slot in perf event
           code. This fixes potential random memory accesses.
      
         - Change uaccess code so that the exception handler sets the result
           of get_user() and __get_kernel_nofault() to zero in case of a
           fault. Until now this was done via input parameters for inline
           assemblies. Doing it via fault handling is what most or even all
           other architectures are doing.
      
         - Couple of other small cleanups and fixes"
      
      * tag 's390-5.19-2' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux:
        s390/stack: add union to reflect kvm stack slot usages
        s390/stack: merge empty stack frame slots
        s390/uaccess: whitespace cleanup
        s390/uaccess: use __noreturn instead of __attribute__((noreturn))
        s390/uaccess: use exception handler to zero result on get_user() failure
        s390/uaccess: use symbolic names for inline assembler operands
        s390/mcck: isolate SIE instruction when setting CIF_MCCK_GUEST flag
        s390/mm: use non-quiescing sske for KVM switch to keyed guest
        s390/gmap: voluntarily schedule during key setting
        MAINTAINERS: Update s390 virtio-ccw
        s390/kexec: add __GFP_NORETRY to KEXEC_CONTROL_MEMORY_GFP
        s390/Kconfig.debug: fix indentation
        s390/Kconfig: fix indentation
        s390/perf: obtain sie_block from the right address
        s390: generate register offsets into pt_regs automatically
        s390: simplify early program check handler
        s390/crypto: fix scatterwalk_unmap() callers in AES-GCM
      4ab6cfc4
    • Linus Torvalds's avatar
      Merge tag 'efi-next-for-v5.19-2' of git://git.kernel.org/pub/scm/linux/kernel/git/efi/efi · 93ce7948
      Linus Torvalds authored
      Pull more EFI updates from Ard Biesheuvel:
       "Follow-up tweaks for EFI changes - they mostly address issues
        introduced this merge window, except for Heinrich's patch:
      
         - fix new DXE service invocations for mixed mode
      
         - use correct Kconfig symbol when setting PE header flag
      
         - clean up the drivers/firmware/efi Kconfig dependencies so that
           features that depend on CONFIG_EFI are hidden from the UI when the
           symbol is not enabled.
      
        Also included is a RISC-V bugfix from Heinrich to avoid read-write
        mappings of read-only firmware regions in the EFI page tables"
      
      * tag 'efi-next-for-v5.19-2' of git://git.kernel.org/pub/scm/linux/kernel/git/efi/efi:
        efi: clean up Kconfig dependencies on CONFIG_EFI
        efi/x86: libstub: Make DXE calls mixed mode safe
        efi: x86: Fix config name for setting the NX-compatibility flag in the PE header
        riscv: read-only pages should not be writable
      93ce7948
    • Zhengjun Xing's avatar
      perf vendor events intel: Update metrics for Alderlake · 1bcca2b1
      Zhengjun Xing authored
      Update JSON metrics for Alderlake to perf.
      
      It included both P-core and E-core metrics.
      
      P-core metrics based on TMA 4.4 (TMA_Metrics-full.csv)
      E-core metrics based on E-core TMA 2.0 (E-core_TMA_Metrics.csv)
      
      https://download.01.org/perfmon/Signed-off-by: default avatarZhengjun Xing <zhengjun.xing@linux.intel.com>
      Tested-by: default avatarIan Rogers <irogers@google.com>
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      Cc: Alexander Shishkin <alexander.shishkin@intel.com>
      Cc: Andi Kleen <ak@linux.intel.com>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Cc: Kan Liang <kan.liang@linux.intel.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Link: https://lore.kernel.org/r/20220528095933.1784141-2-zhengjun.xing@linux.intel.comSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      1bcca2b1
    • Zhengjun Xing's avatar
      perf vendor events intel: Add metrics for Sapphirerapids · 12265782
      Zhengjun Xing authored
      Add JSON metrics for Sapphirerapids to perf.
      
      Based on TMA4.4 metrics.
      
      https://download.01.org/perfmon/TMA_Metrics-full.csvSigned-off-by: default avatarZhengjun Xing <zhengjun.xing@linux.intel.com>
      Tested-by: default avatarIan Rogers <irogers@google.com>
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      Cc: Alexander Shishkin <alexander.shishkin@intel.com>
      Cc: Andi Kleen <ak@linux.intel.com>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Cc: Kan Liang <kan.liang@linux.intel.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Link: https://lore.kernel.org/r/20220528095933.1784141-1-zhengjun.xing@linux.intel.comSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      12265782
    • Leo Yan's avatar
      perf c2c: Fix sorting in percent_rmt_hitm_cmp() · b24192a1
      Leo Yan authored
      The function percent_rmt_hitm_cmp() wrongly uses local HITMs for
      sorting remote HITMs.
      
      Since this function is to sort cache lines for remote HITMs, this patch
      changes to use 'rmt_hitm' field for correct sorting.
      
      Fixes: 9cb3500a ("perf c2c report: Add hitm/store percent related sort keys")
      Signed-off-by: default avatarLeo Yan <leo.yan@linaro.org>
      Acked-by: default avatarNamhyung Kim <namhyung@kernel.org>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Joe Mario <jmario@redhat.com>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Link: https://lore.kernel.org/r/20220530084253.750190-1-leo.yan@linaro.orgSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      b24192a1
    • Leo Yan's avatar
      perf mem: Trace physical address for Arm SPE events · 62e6eb8d
      Leo Yan authored
      Currently, Arm SPE events don't trace physical address, therefore, the
      field 'phys_addr' is always zero in synthesized memory samples.  This
      leads to perf c2c tool cannot locate the memory node for samples.
      
      This patch enables configuration 'pa_enable' for Arm SPE events, so the
      physical address packet can be traced, finally this can allow perf c2c
      tool to locate properly for memory node.
      Signed-off-by: default avatarLeo Yan <leo.yan@linaro.org>
      Acked-by: default avatarNamhyung Kim <namhyung@kernel.org>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: German Gomez <german.gomez@arm.com>
      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: Mark Rutland <mark.rutland@arm.com>
      Cc: Mike Leach <mike.leach@linaro.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Will Deacon <will@kernel.org>
      Cc: linux-arm-kernel@lists.infradead.org
      Link: https://lore.kernel.org/r/20220530083645.253432-1-leo.yan@linaro.orgSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      62e6eb8d
    • Thomas Richter's avatar
      perf list: Update event description for IBM zEC12/zBC12 to latest level · 882f5424
      Thomas Richter authored
      Update IBM zEC12/zBC12 event counter description to the latest level
      as described in the documents
      1. SA23-2260-07:
         "The Load-Program-Parameter and the CPU-Measurement Facilities."
         released on May, 2022
      for the following counter sets:
         * Basic counter set
         * Problem counter set
         * Crypto counter set
      
      2. SA23-2261-07:
         "The CPU-Measurement Facility Extended Counters Definition
         for z10, z196/z114, zEC12/zBC12, z13/z13s, z14, z15 and z16"
         released on April 29, 2022
      for the following counter sets:
         * Extended counter set
         * MT-Diagnostic counter set
      Signed-off-by: default avatarThomas Richter <tmricht@linux.ibm.com>
      Acked-by: default avatarSumanth Korikkar <sumanthk@linux.ibm.com>
      Acked-by: default avatarIan Rogers <irogers@google.com>
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      Link: https://lore.kernel.org/r/20220531092706.1931503-7-tmricht@linux.ibm.com
      Cc: acme@kernel.org
      Cc: gor@linux.ibm.com
      Cc: hca@linux.ibm.com
      Cc: svens@linux.ibm.com
      Cc: linux-kernel@vger.kernel.org
      Cc: linux-perf-users@vger.kernel.org
      882f5424
    • Thomas Richter's avatar
      perf list: Update event description for IBM z196/z114 to latest level · dfeab63a
      Thomas Richter authored
      Update IBM z196/z114 event counter description to the latest level
      as described in the documents
      1. SA23-2260-07:
         "The Load-Program-Parameter and the CPU-Measurement Facilities."
         released on May, 2022
      for the following counter sets:
         * Basic counter set
         * Problem counter set
         * Crypto counter set
      
      2. SA23-2261-07:
         "The CPU-Measurement Facility Extended Counters Definition
          for z10, z196/z114, zEC12/zBC12, z13/z13s, z14, z15 and z16"
      released on April 29, 2022
      for the following counter sets:
         * Extended counter set
         * MT-Diagnostic counter set
      Signed-off-by: default avatarThomas Richter <tmricht@linux.ibm.com>
      Acked-by: default avatarSumanth Korikkar <sumanthk@linux.ibm.com>
      Acked-by: default avatarIan Rogers <irogers@google.com>
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      Link: https://lore.kernel.org/r/20220531092706.1931503-6-tmricht@linux.ibm.com
      Cc: acme@kernel.org
      Cc: gor@linux.ibm.com
      Cc: hca@linux.ibm.com
      Cc: svens@linux.ibm.com
      Cc: linux-kernel@vger.kernel.org
      Cc: linux-perf-users@vger.kernel.org
      dfeab63a
    • Thomas Richter's avatar
      perf list: Update event description for IBM z15 to latest level · d1833463
      Thomas Richter authored
      Update IBM z15 event counter description to the latest level
      as described in the documents
      1. SA23-2260-07:
         "The Load-Program-Parameter and the CPU-Measurement Facilities."
         released on May, 2022
      for the following counter sets:
         * Basic counter set
         * Problem counter set
         * Crypto counter set
      
      2. SA23-2261-07:
         "The CPU-Measurement Facility Extended Counters Definition
         for z10, z196/z114, zEC12/zBC12, z13/z13s, z14, z15 and z16"
         released on April 29, 2022
      for the following counter sets:
         * Extended counter set
         * MT-Diagnostic counter set
      Signed-off-by: default avatarThomas Richter <tmricht@linux.ibm.com>
      Acked-by: default avatarSumanth Korikkar <sumanthk@linux.ibm.com>
      Acked-by: default avatarIan Rogers <irogers@google.com>
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      Link: https://lore.kernel.org/r/20220531092706.1931503-5-tmricht@linux.ibm.com
      Cc: acme@kernel.org
      Cc: gor@linux.ibm.com
      Cc: hca@linux.ibm.com
      Cc: svens@linux.ibm.com
      Cc: linux-kernel@vger.kernel.org
      Cc: linux-perf-users@vger.kernel.org
      d1833463
    • Thomas Richter's avatar
      perf list: Update event description for IBM z14 to latest level · d786bdf2
      Thomas Richter authored
      Update IBM z14 event counter description to the latest level
      as described in the documents
      1. SA23-2260-07:
         "The Load-Program-Parameter and the CPU-Measurement Facilities."
         released on May, 2022
      for the following counter sets:
        * Basic counter set
        * Problem counter set
        * Crypto counter set
      
      2. SA23-2261-07:
         "The CPU-Measurement Facility Extended Counters Definition
          for z10, z196/z114, zEC12/zBC12, z13/z13s, z14, z15 and z16"
          released on April 29, 2022
      for the following counter sets:
        * Extended counter set
        * MT-Diagnostic counter set
      Signed-off-by: default avatarThomas Richter <tmricht@linux.ibm.com>
      Acked-by: default avatarSumanth Korikkar <sumanthk@linux.ibm.com>
      Acked-by: default avatarIan Rogers <irogers@google.com>
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      Link: https://lore.kernel.org/r/20220531092706.1931503-4-tmricht@linux.ibm.com
      Cc: acme@kernel.org
      Cc: gor@linux.ibm.com
      Cc: hca@linux.ibm.com
      Cc: svens@linux.ibm.com
      Cc: linux-kernel@vger.kernel.org
      Cc: linux-perf-users@vger.kernel.org
      d786bdf2
    • Thomas Richter's avatar
      perf list: Update event description for IBM z13 to latest level · e9c26fd6
      Thomas Richter authored
      Update IBM z13 event counter description to the latest level
      as described in the documents
      1. SA23-2260-07:
         "The Load-Program-Parameter and the CPU-Measurement Facilities."
         released on May, 2022
      for the following counter sets:
        * Basic counter set
        * Problem counter set
        * Crypto counter set
      
      2. SA23-2261-07:
         "The CPU-Measurement Facility Extended Counters Definition
          for z10, z196/z114, zEC12/zBC12, z13/z13s, z14, z15 and z16"
          released on April 29, 2022
      for the following counter sets:
        * Extended counter set
        * MT-Diagnostic counter set
      Signed-off-by: default avatarThomas Richter <tmricht@linux.ibm.com>
      Acked-by: default avatarSumanth Korikkar <sumanthk@linux.ibm.com>
      Acked-by: default avatarIan Rogers <irogers@google.com>
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      Link: https://lore.kernel.org/r/20220531092706.1931503-3-tmricht@linux.ibm.com
      Cc: acme@kernel.org
      Cc: gor@linux.ibm.com
      Cc: hca@linux.ibm.com
      Cc: svens@linux.ibm.com
      Cc: linux-kernel@vger.kernel.org
      Cc: linux-perf-users@vger.kernel.org
      e9c26fd6
    • Thomas Richter's avatar
      perf list: Update event description for IBM z10 to latest level · f71a261a
      Thomas Richter authored
      Update IBM z10 event counter description to the latest level
      as described in the documents
      1. SA23-2260-07:
         "The Load-Program-Parameter and the CPU-Measurement Facilities."
         released on May, 2022
      for the following counter sets:
        * Basic counter set
        * Problem counter set
        * Crypto counter set
      
      2. SA23-2261-07:
         "The CPU-Measurement Facility Extended Counters Definition
          for z10, z196/z114, zEC12/zBC12, z13/z13s, z14, z15 and z16"
          released on April 29, 2022
      for the following counter sets:
        * Extended counter set
        * MT-Diagnostic counter set
      Signed-off-by: default avatarThomas Richter <tmricht@linux.ibm.com>
      Acked-by: default avatarSumanth Korikkar <sumanthk@linux.ibm.com>
      Acked-by: default avatarIan Rogers <irogers@google.com>
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      Link: https://lore.kernel.org/r/20220531092706.1931503-2-tmricht@linux.ibm.com
      Cc: acme@kernel.org
      Cc: gor@linux.ibm.com
      Cc: hca@linux.ibm.com
      Cc: svens@linux.ibm.com
      Cc: linux-kernel@vger.kernel.org
      Cc: linux-perf-users@vger.kernel.org
      f71a261a
    • Thomas Richter's avatar
      perf list: Add IBM z16 event description for s390 · 7f76b311
      Thomas Richter authored
      Update IBM z16 counter description using document SA23-2260-07:
      "The Load-Program-Parameter and the CPU-Measurement Facilities"
      released in May, 2022, to include counter definitions for IBM z16
      counter sets:
        * Basic counter set
        * Problem/user counter set
        * Crypto counter set
      
      Use document SA23-2261-07:
      "The CPU-Measurement Facility Extended Counters Definition
       for z10, z196/z114, zEC12/zBC12, z13/z13s, z14, z15 and z16"
      released on April 29, 2022 to include counter definitions for IBM z16
        * Extended counter set
        * MT-Diagnostic counter set
      Signed-off-by: default avatarThomas Richter <tmricht@linux.ibm.com>
      Acked-by: default avatarSumanth Korikkar <sumanthk@linux.ibm.com>
      Acked-by: default avatarIan Rogers <irogers@google.com>
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      Link: https://lore.kernel.org/r/20220531092706.1931503-1-tmricht@linux.ibm.com
      Cc: acme@kernel.org
      Cc: gor@linux.ibm.com
      Cc: hca@linux.ibm.com
      Cc: svens@linux.ibm.com
      Cc: linux-kernel@vger.kernel.org
      Cc: linux-perf-users@vger.kernel.org
      7f76b311
    • Zhengjun Xing's avatar
      perf record: Support sample-read topdown metric group for hybrid platforms · 151e7d75
      Zhengjun Xing authored
      With the hardware TopDown metrics feature, the sample-read feature should
      be supported for a TopDown group, e.g., sample a non-topdown event and read
      a Topdown metric group. But the current perf record code errors are out.
      
      For a TopDown metric group,the slots event must be the leader of the group,
      but the leader slots event doesn't support sampling. To support sample-read
      the TopDown metric group, uses the 2nd event of the group as the "leader"
      for the purposes of sampling.
      
      Only the platform with the TopDown metric feature supports sample-read the
      topdown group. In commit acb65150 ("perf record: Support sample-read
      topdown metric group"), it adds arch_topdown_sample_read() to indicate
      whether the TopDown group supports sample-read, it should only work on the
      non-hybrid systems, this patch extends the support for hybrid platforms.
      
      Before:
      
        # ./perf record -e "{cpu_core/slots/,cpu_core/cycles/,cpu_core/topdown-retiring/}:S" -a sleep 1
        Error:
        The sys_perf_event_open() syscall returned with 22 (Invalid argument) for event (cpu_core/topdown-retiring/).
        /bin/dmesg | grep -i perf may provide additional information.
      
      After:
      
        # ./perf record -e "{cpu_core/slots/,cpu_core/cycles/,cpu_core/topdown-retiring/}:S" -a sleep 1
        [ perf record: Woken up 1 times to write data ]
        [ perf record: Captured and wrote 0.238 MB perf.data (369 samples) ]
      
      Fixes: acb65150 ("perf record: Support sample-read topdown metric group")
      Reviewed-by: default avatarKan Liang <kan.liang@linux.intel.com>
      Signed-off-by: default avatarZhengjun Xing <zhengjun.xing@linux.intel.com>
      Acked-by: default avatarIan Rogers <irogers@google.com>
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      Cc: Alexander Shishkin <alexander.shishkin@intel.com>
      Cc: Andi Kleen <ak@linux.intel.com>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Link: https://lore.kernel.org/r/20220602153603.1884710-1-zhengjun.xing@linux.intel.comSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      151e7d75
    • Namhyung Kim's avatar
      perf lock: Change to synthesize task events · 2762c488
      Namhyung Kim authored
      With -t/--threads option, it needs to display task names so synthesize
      task related events at the beginning.
      Signed-off-by: default avatarNamhyung Kim <namhyung@kernel.org>
      Acked-by: default avatarIan Rogers <irogers@google.com>
      Cc: Boqun Feng <boqun.feng@gmail.com>
      Cc: Davidlohr Bueso <dave@stgolabs.net>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Waiman Long <longman@redhat.com>
      Cc: Will Deacon <will@kernel.org>
      Fixes: 7c3bcbdf ("perf lock: Add -t/--thread option for report")
      Link: http://lore.kernel.org/lkml/20220601065846.456965-2-namhyung@kernel.orgSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      2762c488
    • Fangrui Song's avatar
      perf unwind: Fix segbase for ld.lld linked objects · dc2cf4ca
      Fangrui Song authored
      segbase is the address of .eh_frame_hdr and table_data is segbase plus
      the header size. find_proc_info computes segbase as `map->start +
      segbase - map->pgoff` which is wrong when
      
      * .eh_frame_hdr and .text are in different PT_LOAD program headers
      * and their p_vaddr difference does not equal their p_offset difference
      
      Since 10.0, ld.lld's default --rosegment -z noseparate-code layout has
      such R and RX PT_LOAD program headers.
      
          ld.lld (default) => perf report fails to unwind `perf record
          --call-graph dwarf` recorded data
          ld.lld --no-rosegment => ok (trivial, no R PT_LOAD)
          ld.lld -z separate-code => ok but by luck: there are two PT_LOAD but
          their p_vaddr difference equals p_offset difference
      
          ld.bfd -z noseparate-code => ok (trivial, no R PT_LOAD)
          ld.bfd -z separate-code (default for Linux/x86) => ok but by luck:
          there are two PT_LOAD but their p_vaddr difference equals p_offset
          difference
      
      To fix the issue, compute segbase as dso's base address plus
      PT_GNU_EH_FRAME's p_vaddr. The base address is computed by iterating
      over all dso-associated maps and then subtract the first PT_LOAD p_vaddr
      (the minimum guaranteed by generic ABI) from the minimum address.
      
      In libunwind, find_proc_info transitively called by unw_step is cached,
      so the iteration overhead is acceptable.
      Reported-by: default avatarSebastian Ullrich <sebasti@nullri.ch>
      Reviewed-by: default avatarIan Rogers <irogers@google.com>
      Signed-off-by: default avatarFangrui Song <maskray@google.com>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: llvm@lists.linux.dev
      Link: https://github.com/ClangBuiltLinux/linux/issues/1646
      Link: https://lore.kernel.org/r/20220527182039.673248-1-maskray@google.comSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      dc2cf4ca
    • German Gomez's avatar
      perf test arm-spe: Check if perf-record hangs when recording workload with forks · 4f52ca13
      German Gomez authored
      Add shell test to check if perf-record hangs when recording an arm_spe
      event with forks.
      
      The test FAILS if the Kernel is not patched with Commit 961c3912 ("perf:
      Always wake the parent event").
      
      Unpatched Kernel:
      
        $ perf test -v 90
        90: Check Arm SPE doesn't hang when there are forks
        --- start ---
        test child forked, pid 14232
        Recording workload with fork
        Log lines = 90 /tmp/__perf_test.stderr.0Nu0U
        Log lines after 1 second = 90 /tmp/__perf_test.stderr.0Nu0U
        SPE hang test: FAIL
        test child finished with -1
        ---- end ----
        Check Arm SPE trace data in workload with forks: FAILED!
      
      Patched Kernel:
      
        $ perf test -v 90
        90: Check Arm SPE doesn't hang when there are forks
        --- start ---
        test child forked, pid 2930
        Compiling test program...
        Recording workload...
        Log lines = 478 /tmp/__perf_test.log.026AI
        Log lines after 1 second = 557 /tmp/__perf_test.log.026AI
        SPE hang test: PASS
        Cleaning up files...
        test child finished with 0
        ---- end ----
        Check Arm SPE trace data in workload with forks: Ok
      Reviewed-by: default avatarJames Clark <james.clark@arm.com>
      Reviewed-by: default avatarLeo Yan <leo.yan@linaro.org>
      Signed-off-by: default avatarGerman Gomez <german.gomez@arm.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>
      Link: https://lore.kernel.org/r/20220228165655.3920-1-german.gomez@arm.comSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      4f52ca13
    • Ian Rogers's avatar
      perf docs: Correct typo of event_sources · 8db43088
      Ian Rogers authored
      The sysfs directory is called event_source.
      
      Before:
      
        $ ls -la /sys/bus/event_sources/devices/cpu/format/
        ls: cannot access '/sys/bus/event_sources/devices/cpu/format/': No such file or directory
        $
      
      After:
      
        $ ls -la /sys/bus/event_source/devices/cpu/format/
        total 0
        drwxr-xr-x. 2 root root    0 Jun  2 15:36 .
        drwxr-xr-x. 6 root root    0 Jun  2 15:35 ..
        -r--r--r--. 1 root root 4096 Jun  2 15:36 any
        -r--r--r--. 1 root root 4096 Jun  2 15:36 cmask
        -r--r--r--. 1 root root 4096 Jun  2 15:36 edge
        -r--r--r--. 1 root root 4096 Jun  2 15:36 event
        -r--r--r--. 1 root root 4096 Jun  2 15:36 frontend
        -r--r--r--. 1 root root 4096 Jun  2 15:36 inv
        -r--r--r--. 1 root root 4096 Jun  2 15:36 ldlat
        -r--r--r--. 1 root root 4096 Jun  2 15:36 offcore_rsp
        -r--r--r--. 1 root root 4096 Jun  2 15:36 pc
        -r--r--r--. 1 root root 4096 Jun  2 15:36 umask
        $
      Reviewed-by: default avatarSandipan Das <sandipan.das@amd.com>
      Signed-off-by: default avatarIan Rogers <irogers@google.com>
      Tested-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Alexey Bayduraev <alexey.v.bayduraev@linux.intel.com>
      Cc: Alyssa Ross <hi@alyssa.is>
      Cc: German Gomez <german.gomez@arm.com>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: Jin Yao <yao.jin@linux.intel.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Joshua Martinez <joshuamart@google.com>
      Cc: Kan Liang <kan.liang@linux.intel.com>
      Cc: Like Xu <likexu@tencent.com>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Zhengjun Xing <zhengjun.xing@linux.intel.com>
      Link: https://lore.kernel.org/r/20220603045744.2815559-1-irogers@google.comReported-by: default avatarKevin Nomura <nomurak@google.com>
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      8db43088
    • Zhengjun Xing's avatar
      perf evlist: Extend arch_evsel__must_be_in_group to support hybrid systems · e69a5c01
      Zhengjun Xing authored
      For the hybrid system, the "slots" event changes to "cpu_core/slots/", need
      extend API arch_evsel__must_be_in_group() to support hybrid systems.
      
      In the origin code, for hybrid system event "cpu_core/slots/", the output
      of the API arch_evsel__must_be_in_group() is "false" (in fact,it should be
      "true"). Currently only one API evsel__remove_from_group() calls it. In
      evsel__remove_from_group(), it adds the second condition to check, so the
      output of evsel__remove_from_group() still is correct. That's the reason
      why there isn't an instant error. I'd like to fix the issue found in API
      arch_evsel__must_be_in_group() in case someone else using the function in
      the other place.
      
      Fixes: d98079c0 ("perf evlist: Keep topdown counters in weak group")
      Signed-off-by: default avatarZhengjun Xing <zhengjun.xing@linux.intel.com>
      Reviewed-by: default avatarKan Liang <kan.liang@linux.intel.com>
      Acked-by: default avatarIan Rogers <irogers@google.com>
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      Link: https://lore.kernel.org/r/20220601152544.1842447-1-zhengjun.xing@linux.intel.com
      Cc: peterz@infradead.org
      Cc: adrian.hunter@intel.com
      Cc: alexander.shishkin@intel.com
      Cc: acme@kernel.org
      Cc: ak@linux.intel.com
      Cc: jolsa@redhat.com
      Cc: mingo@redhat.com
      Cc: linux-kernel@vger.kernel.org
      Cc: linux-perf-users@vger.kernel.org
      e69a5c01
    • Saravana Kannan's avatar
      driver core: Set default deferred_probe_timeout back to 0. · 9be4cbd0
      Saravana Kannan authored
      Since we had to effectively reverted
      commit 35a67236 ("driver core: Ensure wait_for_device_probe() waits
      until the deferred_probe_timeout fires") in an earlier patch, a non-zero
      deferred_probe_timeout will break NFS rootfs mounting [1] again. So, set
      the default back to zero until we can fix that.
      
      [1] - https://lore.kernel.org/lkml/TYAPR01MB45443DF63B9EF29054F7C41FD8C60@TYAPR01MB4544.jpnprd01.prod.outlook.com/
      
      Fixes: 2b28a1a8 ("driver core: Extend deferred probe timeout on driver registration")
      Cc: Mark Brown <broonie@kernel.org>
      Cc: Rob Herring <robh@kernel.org>
      Reported-by: default avatarNathan Chancellor <nathan@kernel.org>
      Reported-by: default avatarSebastian Andrzej Siewior <bigeasy@linutronix.de>
      Tested-by: default avatarGeert Uytterhoeven <geert+renesas@glider.be>
      Signed-off-by: default avatarSaravana Kannan <saravanak@google.com>
      Link: https://lore.kernel.org/r/20220526034609.480766-3-saravanak@google.comSigned-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      9be4cbd0
    • Saravana Kannan's avatar
      driver core: Fix wait_for_device_probe() & deferred_probe_timeout interaction · 5ee76c25
      Saravana Kannan authored
      Mounting NFS rootfs was timing out when deferred_probe_timeout was
      non-zero [1].  This was because ip_auto_config() initcall times out
      waiting for the network interfaces to show up when
      deferred_probe_timeout was non-zero. While ip_auto_config() calls
      wait_for_device_probe() to make sure any currently running deferred
      probe work or asynchronous probe finishes, that wasn't sufficient to
      account for devices being deferred until deferred_probe_timeout.
      
      Commit 35a67236 ("driver core: Ensure wait_for_device_probe() waits
      until the deferred_probe_timeout fires") tried to fix that by making
      sure wait_for_device_probe() waits for deferred_probe_timeout to expire
      before returning.
      
      However, if wait_for_device_probe() is called from the kernel_init()
      context:
      
      - Before deferred_probe_initcall() [2], it causes the boot process to
        hang due to a deadlock.
      
      - After deferred_probe_initcall() [3], it blocks kernel_init() from
        continuing till deferred_probe_timeout expires and beats the point of
        deferred_probe_timeout that's trying to wait for userspace to load
        modules.
      
      Neither of this is good. So revert the changes to
      wait_for_device_probe().
      
      [1] - https://lore.kernel.org/lkml/TYAPR01MB45443DF63B9EF29054F7C41FD8C60@TYAPR01MB4544.jpnprd01.prod.outlook.com/
      [2] - https://lore.kernel.org/lkml/YowHNo4sBjr9ijZr@dev-arch.thelio-3990X/
      [3] - https://lore.kernel.org/lkml/Yo3WvGnNk3LvLb7R@linutronix.de/
      
      Fixes: 35a67236 ("driver core: Ensure wait_for_device_probe() waits until the deferred_probe_timeout fires")
      Cc: John Stultz <jstultz@google.com>
      Cc: "David S. Miller" <davem@davemloft.net>
      Cc: Alexey Kuznetsov <kuznet@ms2.inr.ac.ru>
      Cc: Hideaki YOSHIFUJI <yoshfuji@linux-ipv6.org>
      Cc: Jakub Kicinski <kuba@kernel.org>
      Cc: Rob Herring <robh@kernel.org>
      Cc: Geert Uytterhoeven <geert@linux-m68k.org>
      Cc: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
      Cc: Robin Murphy <robin.murphy@arm.com>
      Cc: Andy Shevchenko <andy.shevchenko@gmail.com>
      Cc: Sudeep Holla <sudeep.holla@arm.com>
      Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
      Cc: Naresh Kamboju <naresh.kamboju@linaro.org>
      Cc: Basil Eljuse <Basil.Eljuse@arm.com>
      Cc: Ferry Toth <fntoth@gmail.com>
      Cc: Arnd Bergmann <arnd@arndb.de>
      Cc: Anders Roxell <anders.roxell@linaro.org>
      Cc: linux-pm@vger.kernel.org
      Reported-by: default avatarNathan Chancellor <nathan@kernel.org>
      Reported-by: default avatarSebastian Andrzej Siewior <bigeasy@linutronix.de>
      Tested-by: default avatarGeert Uytterhoeven <geert+renesas@glider.be>
      Acked-by: default avatarJohn Stultz <jstultz@google.com>
      Signed-off-by: default avatarSaravana Kannan <saravanak@google.com>
      Link: https://lore.kernel.org/r/20220526034609.480766-2-saravanak@google.comSigned-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      Reviewed-by: default avatarRafael J. Wysocki <rafael@kernel.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      5ee76c25
    • Arnd Bergmann's avatar
      ARM: omap1: enable multiplatform · 7036440e
      Arnd Bergmann authored
      With all the header files out of the way, and the clock driver
      converted to the common framework, nothing stops us from building
      OMAP together with the other platforms.
      
      As usual, the decompressor support is a victim here, and is
      only available when CONFIG_DEBUG_LL is configured for the
      particular board.
      Acked-by: default avatarTony Lindgren <tony@atomide.com>
      Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
      7036440e
    • Janusz Krzysztofik's avatar
      ARM: OMAP1: clock: Convert to CCF · c73b9099
      Janusz Krzysztofik authored
      OMAP1 still uses its own implementation of standard clock API defined in
      include/linux/clk.h.  Internals of that implementation are not visible
      outside OMAP1 directory.  As a consequence, device drivers are not able to
      register clocks potentially provided by peripheral devices.
      
      Drop OMAP1 implementation of the clock API and enable common clock
      framework.  Modify the remaining low level code to be compatible with
      clock provider API and register the clocks with CCF.
      
      Move initialisation of clocks to omap1_timer_init() to avoid memory
      allocation issues at early setup phase from where omap1_init_early() is
      called.  Register the clocks after initialization of clock I/O registers,
      local clock pointers used by OMAP1 clock ops, and local .rate fields of
      clocks with no local implementation of .recalc ops, so CCF structures are
      populated with correct data during clock registration.  Instead of
      enabling some of the registered clocks, flag them for CCF as critical.
      Introduce .is_enabled op using code that verifies hardware status of clock
      enablement, split out from implementation of .disable_unused op, so the
      latter is actually called by CCF for not requested but hardware enabled
      clocks.  Add .round_rate ops where missing so .set_rate ops are called by
      CCF as expected.  Since CCF allows parallel execution of .enable/.disable
      and .set_rate ops, protect registers shared among those groups of ops from
      concurrent access with spinlocks.  Drop local debugfs support in favor of
      that provided by CCF.
      
      v2: flag tc2_ck as CLK_IS_CRITICAL (Aaro)
      v3: rebase on top of soc/omap1-multiplatform-5.18,
        - drop no longer needed includes from arch/arm/mach-omap1/io.c
      Signed-off-by: default avatarJanusz Krzysztofik <jmkrzyszt@gmail.com>
      Acked-by: default avatarTony Lindgren <tony@atomide.com>
      Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
      c73b9099
    • Linus Torvalds's avatar
      Merge tag 'driver-core-5.19-rc1' of... · 500a434f
      Linus Torvalds authored
      Merge tag 'driver-core-5.19-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core
      
      Pull driver core updates from Greg KH:
       "Here is the set of driver core changes for 5.19-rc1.
      
        Lots of tiny driver core changes and cleanups happened this cycle, but
        the two major things are:
      
         - firmware_loader reorganization and additions including the ability
           to have XZ compressed firmware images and the ability for userspace
           to initiate the firmware load when it needs to, instead of being
           always initiated by the kernel. FPGA devices specifically want this
           ability to have their firmware changed over the lifetime of the
           system boot, and this allows them to work without having to come up
           with yet-another-custom-uapi interface for loading firmware for
           them.
      
         - physical location support added to sysfs so that devices that know
           this information, can tell userspace where they are located in a
           common way. Some ACPI devices already support this today, and more
           bus types should support this in the future.
      
        Smaller changes include:
      
         - driver_override api cleanups and fixes
      
         - error path cleanups and fixes
      
         - get_abi script fixes
      
         - deferred probe timeout changes.
      
        It's that last change that I'm the most worried about. It has been
        reported to cause boot problems for a number of systems, and I have a
        tested patch series that resolves this issue. But I didn't get it
        merged into my tree before 5.18-final came out, so it has not gotten
        any linux-next testing.
      
        I'll send the fixup patches (there are 2) as a follow-on series to this
        pull request.
      
        All have been tested in linux-next for weeks, with no reported issues
        other than the above-mentioned boot time-outs"
      
      * tag 'driver-core-5.19-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core: (55 commits)
        driver core: fix deadlock in __device_attach
        kernfs: Separate kernfs_pr_cont_buf and rename_lock.
        topology: Remove unused cpu_cluster_mask()
        driver core: Extend deferred probe timeout on driver registration
        MAINTAINERS: add Russ Weight as a firmware loader maintainer
        driver: base: fix UAF when driver_attach failed
        test_firmware: fix end of loop test in upload_read_show()
        driver core: location: Add "back" as a possible output for panel
        driver core: location: Free struct acpi_pld_info *pld
        driver core: Add "*" wildcard support to driver_async_probe cmdline param
        driver core: location: Check for allocations failure
        arch_topology: Trace the update thermal pressure
        kernfs: Rename kernfs_put_open_node to kernfs_unlink_open_file.
        export: fix string handling of namespace in EXPORT_SYMBOL_NS
        rpmsg: use local 'dev' variable
        rpmsg: Fix calling device_lock() on non-initialized device
        firmware_loader: describe 'module' parameter of firmware_upload_register()
        firmware_loader: Move definitions from sysfs_upload.h to sysfs.h
        firmware_loader: Fix configs for sysfs split
        selftests: firmware: Add firmware upload selftests
        ...
      500a434f