Skip to content
  1. Jan 18, 2022
    • Nicholas Piggin's avatar
      powerpc/64s: Mask SRR0 before checking against the masked NIP · aee101d7
      Nicholas Piggin authored
      Commit 314f6c23 ("powerpc/64s: Mask NIP before checking against
      SRR0") masked off the low 2 bits of the NIP value in the interrupt
      stack frame in case they are non-zero and mis-compare against a SRR0
      register value of a CPU which always reads back 0 from the 2 low bits
      which are reserved.
      
      This now causes the opposite problem that an implementation which does
      implement those bits in SRR0 will mis-compare against the masked NIP
      value in which they have been cleared. QEMU is one such implementation,
      and this is allowed by the architecture.
      
      This can be triggered by sigfuz by setting low bits of PT_NIP in the
      signal context.
      
      Fix this for now by masking the SRR0 bits as well. Cleaner is probably
      to sanitise these values before putting them in registers or stack, but
      this is the quick and backportable fix.
      
      Fixes: 314f6c23
      
       ("powerpc/64s: Mask NIP before checking against SRR0")
      Signed-off-by: default avatarNicholas Piggin <npiggin@gmail.com>
      Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
      Link: https://lore.kernel.org/r/20220117134403.2995059-1-npiggin@gmail.com
      aee101d7
  2. Jan 17, 2022
  3. Jan 16, 2022
    • Christophe Leroy's avatar
      powerpc/32s: Fix kasan_init_region() for KASAN · d37823c3
      Christophe Leroy authored
      It has been reported some configuration where the kernel doesn't
      boot with KASAN enabled.
      
      This is due to wrong BAT allocation for the KASAN area:
      
      	---[ Data Block Address Translation ]---
      	0: 0xc0000000-0xcfffffff 0x00000000       256M Kernel rw      m
      	1: 0xd0000000-0xdfffffff 0x10000000       256M Kernel rw      m
      	2: 0xe0000000-0xefffffff 0x20000000       256M Kernel rw      m
      	3: 0xf8000000-0xf9ffffff 0x2a000000        32M Kernel rw      m
      	4: 0xfa000000-0xfdffffff 0x2c000000        64M Kernel rw      m
      
      A BAT must have both virtual and physical addresses alignment matching
      the size of the BAT. This is not the case for BAT 4 above.
      
      Fix kasan_init_region() by using block_size() function that is in
      book3s32/mmu.c. To be able to reuse it here, make it non static and
      change its name to bat_block_size() in order to avoid name conflict
      with block_size() defined in <linux/blkdev.h>
      
      Also reuse find_free_bat() to avoid an error message from setbat()
      when no BAT is available.
      
      And allocate memory outside of linear memory mapping to avoid
      wasting that precious space.
      
      With this change we get correct alignment for BATs and KASAN shadow
      memory is allocated outside the linear memory space.
      
      	---[ Data Block Address Translation ]---
      	0: 0xc0000000-0xcfffffff 0x00000000       256M Kernel rw
      	1: 0xd0000000-0xdfffffff 0x10000000       256M Kernel rw
      	2: 0xe0000000-0xefffffff 0x20000000       256M Kernel rw
      	3: 0xf8000000-0xfbffffff 0x7c000000        64M Kernel rw
      	4: 0xfc000000-0xfdffffff 0x7a000000        32M Kernel rw
      
      Fixes: 7974c473
      
       ("powerpc/32s: Implement dedicated kasan_init_region()")
      Cc: stable@vger.kernel.org
      Reported-by: default avatarMaxime Bizon <mbizon@freebox.fr>
      Signed-off-by: default avatarChristophe Leroy <christophe.leroy@csgroup.eu>
      Tested-by: default avatarMaxime Bizon <mbizon@freebox.fr>
      Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
      Link: https://lore.kernel.org/r/7a50ef902494d1325227d47d33dada01e52e5518.1641818726.git.christophe.leroy@csgroup.eu
      d37823c3
    • Christophe Leroy's avatar
      powerpc/time: Fix build failure due to do_hard_irq_enable() on PPC32 · 87b9d74f
      Christophe Leroy authored
      	  CC      arch/powerpc/kernel/time.o
      	In file included from <command-line>:
      	./arch/powerpc/include/asm/hw_irq.h: In function 'do_hard_irq_enable':
      	././include/linux/compiler_types.h:335:45: error: call to '__compiletime_assert_35' declared with attribute error: BUILD_BUG failed
      	  335 |         _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
      	      |                                             ^
      	././include/linux/compiler_types.h:316:25: note: in definition of macro '__compiletime_assert'
      	  316 |                         prefix ## suffix();                             \
      	      |                         ^~~~~~
      	././include/linux/compiler_types.h:335:9: note: in expansion of macro '_compiletime_assert'
      	  335 |         _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
      	      |         ^~~~~~~~~~~~~~~~~~~
      	./include/linux/build_bug.h:39:37: note: in expansion of macro 'compiletime_assert'
      	   39 | #define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
      	      |                                     ^~~~~~~~~~~~~~~~~~
      	./include/linux/build_bug.h:59:21: note: in expansion of macro 'BUILD_BUG_ON_MSG'
      	   59 | #define BUILD_BUG() BUILD_BUG_ON_MSG(1, "BUILD_BUG failed")
      	      |                     ^~~~~~~~~~~~~~~~
      	./arch/powerpc/include/asm/hw_irq.h:483:9: note: in expansion of macro 'BUILD_BUG'
      	  483 |         BUILD_BUG();
      	      |         ^~~~~~~~~
      
      should_hard_irq_enable() returns false on PPC32 so this BUILD_BUG() shouldn't trigger.
      
      Force inlining of should_hard_irq_enable()
      
      Fixes: 0faf20a1
      
       ("powerpc/64s/interrupt: Don't enable MSR[EE] in irq handlers unless perf is in use")
      Signed-off-by: default avatarChristophe Leroy <christophe.leroy@csgroup.eu>
      Acked-by: default avatarNicholas Piggin <npiggin@gmail.com>
      Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
      Link: https://lore.kernel.org/r/247e01e0e10f4dbc59b5ff89e81702eb1ee7641e.1641828571.git.christophe.leroy@csgroup.eu
      87b9d74f
  4. Jan 15, 2022
  5. Jan 14, 2022
    • Linus Torvalds's avatar
      Merge tag 'powerpc-5.17-1' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux · 29ec39fc
      Linus Torvalds authored
      Pull powerpc updates from Michael Ellerman:
      
       - Optimise radix KVM guest entry/exit by 2x on Power9/Power10.
      
       - Allow firmware to tell us whether to disable the entry and uaccess
         flushes on Power10 or later CPUs.
      
       - Add BPF_PROBE_MEM support for 32 and 64-bit BPF jits.
      
       - Several fixes and improvements to our hard lockup watchdog.
      
       - Activate HAVE_DYNAMIC_FTRACE_WITH_REGS on 32-bit.
      
       - Allow building the 64-bit Book3S kernel without hash MMU support, ie.
         Radix only.
      
       - Add KUAP (SMAP) support for 40x, 44x, 8xx, Book3E (64-bit).
      
       - Add new encodings for perf_mem_data_src.mem_hops field, and use them
         on Power10.
      
       - A series of small performance improvements to 64-bit interrupt entry.
      
       - Several commits fixing issues when building with the clang integrated
         assembler.
      
       - Many other small features and fixes.
      
      Thanks to Alan Modra, Alexey Kardashevskiy, Ammar Faizi, Anders Roxell,
      Arnd Bergmann, Athira Rajeev, Cédric Le Goater, Christophe JAILLET,
      Christophe Leroy, Christoph Hellwig, Daniel Axtens, David Yang, Erhard
      Furtner, Fabiano Rosas, Greg Kroah-Hartman, Guo Ren, Hari Bathini, Jason
      Wang, Joel Stanley, Julia Lawall, Kajol Jain, Kees Cook, Laurent Dufour,
      Madhavan Srinivasan, Mark Brown, Minghao Chi, Nageswara R Sastry, Naresh
      Kamboju, Nathan Chancellor, Nathan Lynch, Nicholas Piggin, Nick Child,
      Oliver O'Halloran, Peiwei Hu, Randy Dunlap, Ravi Bangoria, Rob Herring,
      Russell Currey, Sachin Sant, Sean Christopherson, Segher Boessenkool,
      Thadeu Lima de Souza Cascardo, Tyrel Datwyler, Xiang wangx, and Yang
      Guang.
      
      * tag 'powerpc-5.17-1' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux: (240 commits)
        powerpc/xmon: Dump XIVE information for online-only processors.
        powerpc/opal: use default_groups in kobj_type
        powerpc/cacheinfo: use default_groups in kobj_type
        powerpc/sched: Remove unused TASK_SIZE_OF
        powerpc/xive: Add missing null check after calling kmalloc
        powerpc/floppy: Remove usage of the deprecated "pci-dma-compat.h" API
        selftests/powerpc: Add a test of sigreturning to an unaligned address
        powerpc/64s: Use EMIT_WARN_ENTRY for SRR debug warnings
        powerpc/64s: Mask NIP before checking against SRR0
        powerpc/perf: Fix spelling of "its"
        powerpc/32: Fix boot failure with GCC latent entropy plugin
        powerpc/code-patching: Replace patch_instruction() by ppc_inst_write() in selftests
        powerpc/code-patching: Move code patching selftests in its own file
        powerpc/code-patching: Move instr_is_branch_{i/b}form() in code-patching.h
        powerpc/code-patching: Move patch_exception() outside code-patching.c
        powerpc/code-patching: Use test_trampoline for prefixed patch test
        powerpc/code-patching: Fix patch_branch() return on out-of-range failure
        powerpc/code-patching: Reorganise do_patch_instruction() to ease error handling
        powerpc/code-patching: Fix unmap_patch_area() error handling
        powerpc/code-patching: Fix error handling in do_patch_instruction()
        ...
      29ec39fc
    • Linus Torvalds's avatar
      Merge tag 'mips_5.17' of git://git.kernel.org/pub/scm/linux/kernel/git/mips/linux · 3fb561b1
      Linus Torvalds authored
      Pull MIPS updates from Thomas Bogendoerfer:
      
       - add support for more BCM47XX based devices
      
       - add MIPS support for brcmstb PCIe controller
      
       - add Loongson 2K1000 reset driver
      
       - remove board support for rbtx4938/rbtx4939
      
       - remove support for TX4939 SoCs
      
       - fixes and cleanups
      
      * tag 'mips_5.17' of git://git.kernel.org/pub/scm/linux/kernel/git/mips/linux: (59 commits)
        MIPS: ath79: drop _machine_restart again
        PCI: brcmstb: Augment driver for MIPs SOCs
        MIPS: bmips: Remove obsolete DMA mapping support
        MIPS: bmips: Add support PCIe controller device nodes
        dt-bindings: PCI: Add compatible string for Brcmstb 74[23]5 MIPs SOCs
        MIPS: compressed: Fix build with ZSTD compression
        MIPS: BCM47XX: Add support for Netgear WN2500RP v1 & v2
        MIPS: BCM47XX: Add support for Netgear R6300 v1
        MIPS: BCM47XX: Add LEDs and buttons for Asus RTN-10U
        MIPS: BCM47XX: Add board entry for Linksys WRT320N v1
        MIPS: BCM47XX: Define Linksys WRT310N V2 buttons
        MIPS: Remove duplicated include in local.h
        MIPS: retire "asm/llsc.h"
        MIPS: rework local_t operation on MIPS64
        MIPS: fix local_{add,sub}_return on MIPS64
        mips/pci: remove redundant ret variable
        MIPS: Loongson64: Add missing of_node_put() in ls2k_reset_init()
        MIPS: new Kconfig option ZBOOT_LOAD_ADDRESS
        MIPS: enable both vmlinux.gz.itb and vmlinuz for generic
        MIPS: signal: Return immediately if call fails
        ...
      3fb561b1
    • Linus Torvalds's avatar
      Merge tag 'sound-5.17-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound · 3ceff4ea
      Linus Torvalds authored
      Pull sound updates from Takashi Iwai:
       "It's a relatively calm development cycle, but still lots of updates in
        the driver side like Intel SOF. Below are some highlights:
      
        ALSA / ASoC core:
         - A new kselftest for ALSA control API
         - PCM NO_REWINDS support
         - Potential race fixes around control removals
         - Unify x86 SG-buffer memory allocation code
         - Cleanups and race fixes for ASoC DPCM locking
      
        ASoC:
         - Refinements and cleanups around the delay() APIs
         - Wider use of dev_err_probe().
         - Continuing cleanups and improvements to the SOF code
         - Support for pin switches in simple-card derived cards
         - Support for AMD Renoir ACP, Asahi Kasei Microdevices AKM4375, Intel
           systems using NAU8825 and MAX98390, Mediatek MT8915, nVidia Tegra20
           S/PDIF, Qualcomm systems using ALC5682I-VS and Texas Instruments
           TLV320ADC3xxx
      
        HD-audio / USB-audio:
         - Fix deadlock at HD-audio codec unbinding
         - Fixes for Tegra194 HD-audio, new HDA support for CS35L41 codec
         - Quirks for Lenovo and HP machines, Gigabyte mobo, Bose device
      
        Misc:
         - Fix virmidi drain behavior
      
        Note that the merge of CS35L41 codec support is still half-baked, and
        at least one ACPI change is missing. Although this won't hinder the
        kernel build itself, we're going to catch up before RC1"
      
      * tag 'sound-5.17-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: (415 commits)
        ALSA: hda: intel-dsp-config: reorder the config table
        ALSA: hda: intel-dsp-config: add JasperLake support
        ALSA: hda: cs35l41: fix double free on error in probe()
        ALSA: hda: Fix dependencies of CS35L41 on SPI/I2C buses
        ALSA: hda: Fix dependency on ASoC cs35l41 codec
        ASoC: cs35l41: Add support for hibernate memory retention mode
        ASoC: cs35l41: Update handling of test key registers
        ALSA: intel_hdmi: Check for error num after setting mask
        ASoC: wcd9335: Keep a RX port value for each SLIM RX mux
        ASoC: amd: acp: acp-mach: Change default RT1019 amp dev id
        ALSA: virmidi: Remove duplicated code
        ALSA: seq: virmidi: Add a drain operation
        ASoC: topology: Fix typo
        ASoC: fsl_asrc: refine the check of available clock divider
        ASoC: Intel: bytcr_rt5640: Add support for external GPIO jack-detect
        ASoC: Intel: bytcr_rt5640: Support retrieving the codec IRQ from the AMCR0F28 ACPI dev
        ASoC: rt5640: Add support for boards with an external jack-detect GPIO
        ASoC: rt5640: Allow snd_soc_component_set_jack() to override the codec IRQ
        ASoC: rt5640: Change jack_work to a delayed_work
        ASoC: rt5640: Fix possible NULL pointer deref on resume
        ...
      3ceff4ea
    • Linus Torvalds's avatar
      Merge tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi · e1a7aa25
      Linus Torvalds authored
      Pull SCSI updates from James Bottomley:
       "This series consists of the usual driver updates (ufs, pm80xx, lpfc,
        mpi3mr, mpt3sas, hisi_sas, libsas) and minor updates and bug fixes.
      
        The most impactful change is likely the switch from GFP_DMA to
        GFP_KERNEL in a bunch of drivers, but even that shouldn't affect too
        many people"
      
      * tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: (121 commits)
        scsi: mpi3mr: Bump driver version to 8.0.0.61.0
        scsi: mpi3mr: Fixes around reply request queues
        scsi: mpi3mr: Enhanced Task Management Support Reply handling
        scsi: mpi3mr: Use TM response codes from MPI3 headers
        scsi: mpi3mr: Add io_uring interface support in I/O-polled mode
        scsi: mpi3mr: Print cable mngnt and temp threshold events
        scsi: mpi3mr: Support Prepare for Reset event
        scsi: mpi3mr: Add Event acknowledgment logic
        scsi: mpi3mr: Gracefully handle online FW update operation
        scsi: mpi3mr: Detect async reset that occurred in firmware
        scsi: mpi3mr: Add IOC reinit function
        scsi: mpi3mr: Handle offline FW activation in graceful manner
        scsi: mpi3mr: Code refactor of IOC init - part2
        scsi: mpi3mr: Code refactor of IOC init - part1
        scsi: mpi3mr: Fault IOC when internal command gets timeout
        scsi: mpi3mr: Display IOC firmware package version
        scsi: mpi3mr: Handle unaligned PLL in unmap cmnds
        scsi: mpi3mr: Increase internal cmnds timeout to 60s
        scsi: mpi3mr: Do access status validation before adding devices
        scsi: mpi3mr: Add support for PCIe Managed Switch SES device
        ...
      e1a7aa25
    • Linus Torvalds's avatar
      Merge tag 'mailbox-v5.17' of git://git.linaro.org/landing-teams/working/fujitsu/integration · fb3b0673
      Linus Torvalds authored
      Pull mailbox updates from Jassi Brar:
      
       - qcom: misc updates to qcom-ipcc driver
      
       - mpfs: change compatible string
      
       - pcc:
           - fix handling of subtypes
           - avoid uninitialized variable
      
       - mtk:
           - add missing of_node_put
           - enable control_by_sw
           - silent probe-defer prints
           - fix gce_num for mt8192
      
       - zynq: add missing of_node_put
      
       - imx: check for NULL instead of IS_ERR
      
       - appple: switch to generic compatibles
      
       - hi3660: convert comments to kernel-doc notation
      
      * tag 'mailbox-v5.17' of git://git.linaro.org/landing-teams/working/fujitsu/integration:
        dt-bindings: mailbox: Add more protocol and client ID
        mailbox: qcom-ipcc: Support interrupt wake up from suspend
        mailbox: qcom-ipcc: Support more IPCC instance
        mailbox: qcom-ipcc: Dynamic alloc for channel arrangement
        mailbox: change mailbox-mpfs compatible string
        mailbox: pcc: Handle all PCC subtypes correctly in pcc_mbox_irq
        mailbox: pcc: Avoid using the uninitialized variable 'dev'
        mailbox: mtk: add missing of_node_put before return
        mailbox: zynq: add missing of_node_put before return
        mailbox: imx: Fix an IS_ERR() vs NULL bug
        mailbox: hi3660: convert struct comments to kernel-doc notation
        mailbox: add control_by_sw for mt8195
        mailbox: mtk-cmdq: Silent EPROBE_DEFER errors for clks
        mailbox: fix gce_num of mt8192 driver data
        mailbox: apple: Bind to generic compatibles
        dt-bindings: mailbox: apple,mailbox: Add generic and t6000 compatibles
      fb3b0673
    • Linus Torvalds's avatar
      Merge tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma · 747c19eb
      Linus Torvalds authored
      Pull rdma updates from Jason Gunthorpe:
       "Another small cycle. Mostly cleanups and bug fixes, quite a bit
        assisted from bots. There are a few new syzkaller splats that haven't
        been solved yet but they should get into the rcs in a few weeks, I
        think.
      
        Summary:
      
         - Update drivers to use common helpers for GUIDs, pkeys, bitmaps,
           memset_startat, and others
      
         - General code cleanups from bots
      
         - Simplify some of the rxe pool code in preparation for a larger
           rework
      
         - Clean out old stuff from hns, including all support for hip06
           devices
      
         - Fix a bug where GID table entries could be missed if the table had
           holes in it
      
         - Rename paths and sessions in rtrs for better understandability
      
         - Consolidate the roce source port selection code
      
         - NDR speed support in mlx5"
      
      * tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma: (83 commits)
        RDMA/irdma: Remove the redundant return
        RDMA/rxe: Use the standard method to produce udp source port
        RDMA/irdma: Make the source udp port vary
        RDMA/hns: Replace get_udp_sport with rdma_get_udp_sport
        RDMA/core: Calculate UDP source port based on flow label or lqpn/rqpn
        IB/qib: Fix typos
        RDMA/rtrs-clt: Rename rtrs_clt to rtrs_clt_sess
        RDMA/rtrs-srv: Rename rtrs_srv to rtrs_srv_sess
        RDMA/rtrs-clt: Rename rtrs_clt_sess to rtrs_clt_path
        RDMA/rtrs-srv: Rename rtrs_srv_sess to rtrs_srv_path
        RDMA/rtrs: Rename rtrs_sess to rtrs_path
        RDMA/hns: Modify the hop num of HIP09 EQ to 1
        IB/iser: Align coding style across driver
        IB/iser: Remove un-needed casting to/from void pointer
        IB/iser: Don't suppress send completions
        IB/iser: Rename ib_ret local variable
        IB/iser: Fix RNR errors
        IB/iser: Remove deprecated pi_guard module param
        IB/mlx5: Expose NDR speed through MAD
        RDMA/cxgb4: Set queue pair state when being queried
        ...
      747c19eb
    • Jason Gunthorpe's avatar
      Merge tag 'v5.16' into rdma.git for-next · c0fe82ba
      Jason Gunthorpe authored
      
      
      To resolve minor conflict in:
              drivers/infiniband/hw/mlx5/mlx5_ib.h
      
      By merging both hunks.
      
      Signed-off-by: default avatarJason Gunthorpe <jgg@nvidia.com>
      c0fe82ba
    • Linus Torvalds's avatar
      Merge tag 'irq-msi-2022-01-13' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · feb7a43d
      Linus Torvalds authored
      Pull MSI irq updates from Thomas Gleixner:
       "Rework of the MSI interrupt infrastructure.
      
        This is a treewide cleanup and consolidation of MSI interrupt handling
        in preparation for further changes in this area which are necessary
        to:
      
         - address existing shortcomings in the VFIO area
      
         - support the upcoming Interrupt Message Store functionality which
           decouples the message store from the PCI config/MMIO space"
      
      * tag 'irq-msi-2022-01-13' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (94 commits)
        genirq/msi: Populate sysfs entry only once
        PCI/MSI: Unbreak pci_irq_get_affinity()
        genirq/msi: Convert storage to xarray
        genirq/msi: Simplify sysfs handling
        genirq/msi: Add abuse prevention comment to msi header
        genirq/msi: Mop up old interfaces
        genirq/msi: Convert to new functions
        genirq/msi: Make interrupt allocation less convoluted
        platform-msi: Simplify platform device MSI code
        platform-msi: Let core code handle MSI descriptors
        bus: fsl-mc-msi: Simplify MSI descriptor handling
        soc: ti: ti_sci_inta_msi: Remove ti_sci_inta_msi_domain_free_irqs()
        soc: ti: ti_sci_inta_msi: Rework MSI descriptor allocation
        NTB/msi: Convert to msi_on_each_desc()
        PCI: hv: Rework MSI handling
        powerpc/mpic_u3msi: Use msi_for_each-desc()
        powerpc/fsl_msi: Use msi_for_each_desc()
        powerpc/pasemi/msi: Convert to msi_on_each_dec()
        powerpc/cell/axon_msi: Convert to msi_on_each_desc()
        powerpc/4xx/hsta: Rework MSI handling
        ...
      feb7a43d
    • Linus Torvalds's avatar
      Merge tag 'timers-core-2022-01-13' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · fd048992
      Linus Torvalds authored
      Pull timer updates from Thomas Gleixner:
       "Updates for the time(r) subsystem:
      
        Core:
      
         - Make the clocksource watchdog more robust by better validation
           checks of the measurement.
      
        Drivers:
      
         - New drivers for MStar and SSD20xd SOCs
      
         - The usual cleanups and improvements all over the place"
      
      * tag 'timers-core-2022-01-13' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        dt-bindings: timer: Add Mstar MSC313e timer devicetree bindings documentation
        clocksource/drivers/msc313e: Add support for ssd20xd-based platforms
        clocksource/drivers: Add MStar MSC313e timer support
        clocksource/drivers/pistachio: Fix -Wunused-but-set-variable warning
        clocksource/drivers/timer-imx-sysctr: Set cpumask to cpu_possible_mask
        clocksource/drivers/imx-sysctr: Mark two variable with __ro_after_init
        clocksource/drivers/renesas,ostm: Make RENESAS_OSTM symbol visible
        clocksource/drivers/renesas-ostm: Add RZ/G2L OSTM support
        dt-bindings: timer: renesas: ostm: Document Renesas RZ/G2L OSTM
        clocksource/drivers/exynos_mct: Fix silly typo resulting in checkpatch warning
        clocksource: Reduce the default clocksource_watchdog() retries to 2
        clocksource: Avoid accidental unstable marking of clocksources
        dt-bindings: timer: tpm-timer: Add imx8ulp compatible string
        reset: Add of_reset_control_get_optional_exclusive()
        clocksource/drivers/exynos_mct: Refactor resources allocation
        dt-bindings: timer: remove rockchip,rk3066-timer compatible string from rockchip,rk-timer.yaml
        dt-bindings: timer: cadence_ttc: Add power-domains
      fd048992
    • Linus Torvalds's avatar
      Merge tag 'irq-core-2022-01-13' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 147cc583
      Linus Torvalds authored
      Pull irq updates from Thomas Gleixner:
       "Updates for the interrupt subsystem:
      
        Core:
      
         - Provide a new interface for affinity hints to provide a separation
           between hint and actual affinity change which has become a hidden
           property of the current interface
      
         - Fix up the in tree usage of the affinity hint interfaces
      
        Drivers:
      
         - No new irqchip drivers!
      
         - Fix GICv3 redistributor table reservation with RT across kexec
      
         - Fix GICv4.1 redistributor view of the VPE table across kexec
      
         - Add support for extra interrupts on spear-shirq
      
         - Make obtaining some interrupts optional for the Renesas drivers
      
         - Various cleanups and bug fixes"
      
      * tag 'irq-core-2022-01-13' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (25 commits)
        irqchip/renesas-intc-irqpin: Use platform_get_irq_optional() to get the interrupt
        irqchip/renesas-irqc: Use platform_get_irq_optional() to get the interrupt
        irqchip/gic-v4: Disable redistributors' view of the VPE table at boot time
        irqchip/ingenic-tcu: Use correctly sized arguments for bit field
        irqchip/gic-v2m: Add const to of_device_id
        irqchip/imx-gpcv2: Mark imx_gpcv2_instance with __ro_after_init
        irqchip/spear-shirq: Add support for IRQ 0..6
        irqchip/gic-v3-its: Limit memreserve cpuhp state lifetime
        irqchip/gic-v3-its: Postpone LPI pending table freeing and memreserve
        irqchip/gic-v3-its: Give the percpu rdist struct its own flags field
        net/mlx4: Use irq_update_affinity_hint()
        net/mlx5: Use irq_set_affinity_and_hint()
        hinic: Use irq_set_affinity_and_hint()
        scsi: lpfc: Use irq_set_affinity()
        mailbox: Use irq_update_affinity_hint()
        ixgbe: Use irq_update_affinity_hint()
        be2net: Use irq_update_affinity_hint()
        enic: Use irq_update_affinity_hint()
        RDMA/irdma: Use irq_update_affinity_hint()
        scsi: mpt3sas: Use irq_set_affinity_and_hint()
        ...
      147cc583
  6. Jan 13, 2022
    • Brent Lu's avatar
      ALSA: hda: intel-dsp-config: reorder the config table · 081c7370
      Brent Lu authored
      
      
      Entries without dmi_table nor codec_hid field need to be placed after
      entries with these two fields or they will be always selected.
      
      Signed-off-by: default avatarBrent Lu <brent.lu@intel.com>
      Link: https://lore.kernel.org/r/20220113105220.1114694-3-brent.lu@intel.com
      
      
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      081c7370
    • Brent Lu's avatar
      ALSA: hda: intel-dsp-config: add JasperLake support · 19980aa1
      Brent Lu authored
      
      
      Add rules to select SOF driver for Jasper Lake systems if digital
      microphone is present or the system is a Chromebook.
      
      Signed-off-by: default avatarBrent Lu <brent.lu@intel.com>
      Link: https://lore.kernel.org/r/20220113105220.1114694-2-brent.lu@intel.com
      
      
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      19980aa1
    • Linus Torvalds's avatar
      Merge tag 'clk-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux · 455e73a0
      Linus Torvalds authored
      Pull clk updates from Stephen Boyd:
       "We have a couple patches in the framework core this time around but
        they're mostly minor cleanups and some debugfs stuff. The real work
        that's in here is the typical pile of clk driver updates and new SoC
        support.
      
        Per usual (or maybe just recent trends), Qualcomm gains a handful of
        SoC drivers additions and has the largest diffstat. After that there
        are quite a few updates to the Allwinner (sunxi) drivers to support
        modular drivers and Renesas is heavily updated to add more support for
        various clks.
      
        Overall it looks pretty normal.
      
        New Drivers:
         - Add MDMA and BDMA clks to Ingenic JZ4760 and JZ4770
         - MediaTek mt7986 SoC basic support
         - Clock and reset driver for Toshiba Visconti SoCs
         - Initial clock driver for the Exynos7885 SoC (Samsung Galaxy A8)
         - Allwinner D1 clks
         - Lan966x Generic Clock Controller driver and associated DT bindings
         - Qualcomm SDX65, SM8450, and MSM8976 GCC clks
         - Qualcomm SDX65 and SM8450 RPMh clks
      
        Updates:
         - Set suppress_bind_attrs to true for i.MX8ULP driver
         - Switch from do_div to div64_ul for throughout all i.MX drivers
         - Fix imx8mn_clko1_sels for i.MX8MN
         - Remove unused IPG_AUDIO_ROOT from i.MX8MP
         - Switch parent for audio_root_clk to audio ahb in i.MX8MP driver
         - Removal of all remaining uses of __clk_lookup() in
           drivers/clk/samsung
         - Refactoring of the CPU clocks registration to use common interface
         - An update of the Exynos850 driver (support for more clock domains)
           required by the E850-96 development board
         - Prep for runtime PM and generic power domains on Tegra
         - Support modular Allwinner clk drivers via platform bus
         - Lan966x clock driver extended to support clock gating
         - Add serial (SCI1), watchdog (WDT), timer (OSTM), SPI (RSPI), and
           thermal (TSU) clocks and resets on Renesas RZ/G2L
         - Rework SDHI clock handling in the Renesas R-Car Gen3 and RZ/G2
           clock drivers, and in the Renesas SDHI driver
         - Make the Cortex-A55 (I) clock on Renesas RZ/G2L programmable
         - Document support for the new Renesas R-Car S4-8 (R8A779F0) SoC
         - Add support for the new Renesas R-Car S4-8 (R8A779F0) SoC
         - Add GPU clock and resets on Renesas RZ/G2L
         - Add clk-provider.h to various Qualcomm clk drivers
         - devm version of clk_hw_register_gate()
         - kerneldoc fixes in a couple drivers"
      
      * tag 'clk-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux: (131 commits)
        clk: visconti: Remove pointless NULL check in visconti_pll_add_lookup()
        clk: mediatek: add mt7986 clock support
        clk: mediatek: add mt7986 clock IDs
        dt-bindings: clock: mediatek: document clk bindings for mediatek mt7986 SoC
        clk: mediatek: clk-gate: Use regmap_{set/clear}_bits helpers
        clk: mediatek: clk-gate: Shrink by adding clockgating bit check helper
        clk: x86: Fix clk_gate_flags for RV_CLK_GATE
        clk: x86: Use dynamic con_id string during clk registration
        ACPI: APD: Add a fmw property clk-name
        drivers: acpi: acpi_apd: Remove unused device property "is-rv"
        x86: clk: clk-fch: Add support for newer family of AMD's SOC
        clk: ingenic: Add MDMA and BDMA clocks
        dt-bindings: clk/ingenic: Add MDMA and BDMA clocks
        clk: bm1880: remove kfrees on static allocations
        clk: Drop unused COMMON_CLK_STM32MP157_SCMI config
        clk: st: clkgen-mux: search reg within node or parent
        clk: st: clkgen-fsyn: search reg within node or parent
        clk: Enable/Disable runtime PM for clk_summary
        MAINTAINERS: Add entries for Toshiba Visconti PLL and clock controller
        clk: visconti: Add support common clock driver and reset driver
        ...
      455e73a0
    • Linus Torvalds's avatar
      Merge tag 'leds-5.17-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/pavel/linux-leds · d9b5941b
      Linus Torvalds authored
      Pull LED updates from Pavel Machek:
       "Nothing major is happening here"
      
      * tag 'leds-5.17-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/pavel/linux-leds:
        leds: lp55xx: initialise output direction from dts
        ARM: dts: omap3-n900: Fix lp5523 for multi color
        leds: ktd2692: Drop calling dev_of_node() in ktd2692_parse_dt
        leds: lgm-sso: Get rid of duplicate of_node assignment
        leds: tca6507: Get rid of duplicate of_node assignment
        leds: leds-fsg: Drop FSG3 LED driver
        leds: lp50xx: remove unused variable
        dt-bindings: leds: Replace moonlight with indicator in mt6360 example
        leds: led-core: Update fwnode with device_set_node
        leds: tca6507: use swap() to make code cleaner
        leds: Add mt6360 driver
        dt-bindings: leds: Add bindings for MT6360 LED
      d9b5941b
    • Linus Torvalds's avatar
      Merge tag 'devicetree-for-5.17' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux · 4eb766f6
      Linus Torvalds authored
      Pull devicetree updates from Rob Herring:
       "Bindings:
      
         - DT schema conversions for Samsung clocks, RNG bindings, Qcom
           Command DB and rmtfs, gpio-restart, i2c-mux-gpio, i2c-mux-pinctl,
           Tegra I2C and BPMP, pwm-vibrator, Arm DSU, and Cadence macb
      
         - DT schema conversions for Broadcom platforms: interrupt
           controllers, STB GPIO, STB waketimer, STB reset, iProc MDIO mux,
           iProc PCIe, Cygnus PCIe PHY, PWM, USB BDC, BCM6328 LEDs, TMON,
           SYSTEMPORT, AMAC, Northstar 2 PCIe PHY, GENET, moca PHY, GISB
           arbiter, and SATA
      
         - Add binding schemas for Tegra210 EMC table, TI DC-DC converters,
      
         - Clean-ups of MDIO bus schemas to fix 'unevaluatedProperties' issues
      
         - More fixes due to 'unevaluatedProperties' enabling
      
         - Data type fixes and clean-ups of binding examples found in
           preparation to move to validating DTB files directly (instead of
           intermediate YAML representation.
      
         - Vendor prefixes for T-Head Semiconductor, OnePlus, and Sunplus
      
         - Add various new compatible strings
      
        DT core:
      
         - Silence a warning for overlapping reserved memory regions
      
         - Reimplement unittest overlay tracking
      
         - Fix stack frame size warning in unittest
      
         - Clean-ups of early FDT scanning functions
      
         - Fix handling of "linux,usable-memory-range" on EFI booted systems
      
         - Add support for 'fail' status on CPU nodes
      
         - Improve error message in of_phandle_iterator_next()
      
         - kbuild: Disable duplicate unit-address warnings for disabled nodes"
      
      * tag 'devicetree-for-5.17' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux: (114 commits)
        dt-bindings: net: mdio: Drop resets/reset-names child properties
        dt-bindings: clock: samsung: convert S5Pv210 to dtschema
        dt-bindings: clock: samsung: convert Exynos5410 to dtschema
        dt-bindings: clock: samsung: convert Exynos5260 to dtschema
        dt-bindings: clock: samsung: extend Exynos7 bindings with UFS
        dt-bindings: clock: samsung: convert Exynos7 to dtschema
        dt-bindings: clock: samsung: convert Exynos5433 to dtschema
        dt-bindings: i2c: maxim,max96712: Add bindings for Maxim Integrated MAX96712
        dt-bindings: iio: adi,ltc2983: Fix 64-bit property sizes
        dt-bindings: power: maxim,max17040: Fix incorrect type for 'maxim,rcomp'
        dt-bindings: interrupt-controller: arm,gic-v3: Fix 'interrupts' cell size in example
        dt-bindings: iio/magnetometer: yamaha,yas530: Fix invalid 'interrupts' in example
        dt-bindings: clock: imx5: Drop clock consumer node from example
        dt-bindings: Drop required 'interrupt-parent'
        dt-bindings: net: ti,dp83869: Drop value on boolean 'ti,max-output-impedance'
        dt-bindings: net: wireless: mt76: Fix 8-bit property sizes
        dt-bindings: PCI: snps,dw-pcie-ep: Drop conflicting 'max-functions' schema
        dt-bindings: i2c: st,stm32-i2c: Make each example a separate entry
        dt-bindings: net: stm32-dwmac: Make each example a separate entry
        dt-bindings: net: Cleanup MDIO node schemas
        ...
      4eb766f6
    • Linus Torvalds's avatar
      Merge tag 'for-linus-5.17-rc1-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip · ce990f1d
      Linus Torvalds authored
      Pull xen updates from Juergen Gross:
      
       - a fix for the Xen gntdev driver
      
       - a fix for running as Xen dom0 booted via EFI and the EFI framebuffer
         being located above 4GB
      
       - a series for support of mapping other guest's memory by using zone
         device when running as Xen guest on Arm
      
      * tag 'for-linus-5.17-rc1-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip:
        dt-bindings: xen: Clarify "reg" purpose
        arm/xen: Read extended regions from DT and init Xen resource
        xen/unpopulated-alloc: Add mechanism to use Xen resource
        xen/balloon: Bring alloc(free)_xenballooned_pages helpers back
        arm/xen: Switch to use gnttab_setup_auto_xlat_frames() for DT
        xen/unpopulated-alloc: Drop check for virt_addr_valid() in fill_list()
        xen/x86: obtain upper 32 bits of video frame buffer address for Dom0
        xen/gntdev: fix unmap notification order
      ce990f1d
    • Linus Torvalds's avatar
      Merge tag 'x86_core_for_v5.17_rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 64ad9461
      Linus Torvalds authored
      Pull x86 core updates from Borislav Petkov:
      
       - Get rid of all the .fixup sections because this generates
         misleading/wrong stacktraces and confuse RELIABLE_STACKTRACE and
         LIVEPATCH as the backtrace misses the function which is being fixed
         up.
      
       - Add Straight Line Speculation mitigation support which uses a new
         compiler switch -mharden-sls= which sticks an INT3 after a RET or an
         indirect branch in order to block speculation after them. Reportedly,
         CPUs do speculate behind such insns.
      
       - The usual set of cleanups and improvements
      
      * tag 'x86_core_for_v5.17_rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (32 commits)
        x86/entry_32: Fix segment exceptions
        objtool: Remove .fixup handling
        x86: Remove .fixup section
        x86/word-at-a-time: Remove .fixup usage
        x86/usercopy: Remove .fixup usage
        x86/usercopy_32: Simplify __copy_user_intel_nocache()
        x86/sgx: Remove .fixup usage
        x86/checksum_32: Remove .fixup usage
        x86/vmx: Remove .fixup usage
        x86/kvm: Remove .fixup usage
        x86/segment: Remove .fixup usage
        x86/fpu: Remove .fixup usage
        x86/xen: Remove .fixup usage
        x86/uaccess: Remove .fixup usage
        x86/futex: Remove .fixup usage
        x86/msr: Remove .fixup usage
        x86/extable: Extend extable functionality
        x86/entry_32: Remove .fixup usage
        x86/entry_64: Remove .fixup usage
        x86/copy_mc_64: Remove .fixup usage
        ...
      64ad9461
    • Linus Torvalds's avatar
      Merge tag 'perf_core_for_v5.17_rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 8e5b0ade
      Linus Torvalds authored
      Pull perf updates from Borislav Petkov:
       "Cleanup of the perf/kvm interaction."
      
      * tag 'perf_core_for_v5.17_rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        perf: Drop guest callback (un)register stubs
        KVM: arm64: Drop perf.c and fold its tiny bits of code into arm.c
        KVM: arm64: Hide kvm_arm_pmu_available behind CONFIG_HW_PERF_EVENTS=y
        KVM: arm64: Convert to the generic perf callbacks
        KVM: x86: Move Intel Processor Trace interrupt handler to vmx.c
        KVM: Move x86's perf guest info callbacks to generic KVM
        KVM: x86: More precisely identify NMI from guest when handling PMI
        KVM: x86: Drop current_vcpu for kvm_running_vcpu + kvm_arch_vcpu variable
        perf/core: Use static_call to optimize perf_guest_info_callbacks
        perf: Force architectures to opt-in to guest callbacks
        perf: Add wrappers for invoking guest callbacks
        perf/core: Rework guest callbacks to prepare for static_call support
        perf: Drop dead and useless guest "support" from arm, csky, nds32 and riscv
        perf: Stop pretending that perf can handle multiple guest callbacks
        KVM: x86: Register Processor Trace interrupt hook iff PT enabled in guest
        KVM: x86: Register perf callbacks after calling vendor's hardware_setup()
        perf: Protect perf_guest_cbs with RCU
      8e5b0ade
    • Linus Torvalds's avatar
      Merge tag 'iommu-updates-v5.17' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu · 13eaa5bd
      Linus Torvalds authored
      Pull iommu updates from Joerg Roedel:
      
       - Identity domain support for virtio-iommu
      
       - Move flush queue code into iommu-dma
      
       - Some fixes for AMD IOMMU suspend/resume support when x2apic is used
      
       - Arm SMMU Updates from Will Deacon:
            - Revert evtq and priq back to their former sizes
            - Return early on short-descriptor page-table allocation failure
            - Fix page fault reporting for Adreno GPU on SMMUv2
            - Make SMMUv3 MMU notifier ops 'const'
            - Numerous new compatible strings for Qualcomm SMMUv2 implementations
      
       - Various smaller fixes and cleanups
      
      * tag 'iommu-updates-v5.17' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu: (38 commits)
        iommu/iova: Temporarily include dma-mapping.h from iova.h
        iommu: Move flush queue data into iommu_dma_cookie
        iommu/iova: Move flush queue code to iommu-dma
        iommu/iova: Consolidate flush queue code
        iommu/vt-d: Use put_pages_list
        iommu/amd: Use put_pages_list
        iommu/amd: Simplify pagetable freeing
        iommu/iova: Squash flush_cb abstraction
        iommu/iova: Squash entry_dtor abstraction
        iommu/iova: Fix race between FQ timeout and teardown
        iommu/amd: Fix typo in *glues … together* in comment
        iommu/vt-d: Remove unused dma_to_mm_pfn function
        iommu/vt-d: Drop duplicate check in dma_pte_free_pagetable()
        iommu/vt-d: Use bitmap_zalloc() when applicable
        iommu/amd: Remove useless irq affinity notifier
        iommu/amd: X2apic mode: mask/unmask interrupts on suspend/resume
        iommu/amd: X2apic mode: setup the INTX registers on mask/unmask
        iommu/amd: X2apic mode: re-enable after resume
        iommu/amd: Restore GA log/tail pointer on host resume
        iommu/iova: Move fast alloc size roundup into alloc_iova_fast()
        ...
      13eaa5bd
    • Linus Torvalds's avatar
      Merge tag 'cxl-for-5.17' of git://git.kernel.org/pub/scm/linux/kernel/git/cxl/cxl · 362f533a
      Linus Torvalds authored
      Pull CXL (Compute Express Link) updates from Dan Williams:
       "The highlight is initial support for CXL memory hotplug. The static
        NUMA node (ACPI SRAT Physical Address to Proximity Domain) information
        known to platform firmware is extended to support the potential
        performance-class / memory-target nodes dynamically created from
        available CXL memory device capacity.
      
        New unit test infrastructure is added for validating health
        information payloads.
      
        Fixes to module reload stress and stack usage from exposure in -next
        are included. A symbol rename and some other miscellaneous fixups are
        included as well.
      
        Summary:
      
         - Rework ACPI sub-table infrastructure to optionally be used outside
           of __init scenarios and use it for CEDT.CFMWS sub-table parsing.
      
         - Add support for extending num_possible_nodes by the potential
           hotplug CXL memory ranges
      
         - Extend tools/testing/cxl with mock memory device health information
      
         - Fix a module-reload workqueue race
      
         - Fix excessive stack-frame usage
      
         - Rename the driver context data structure from "cxl_mem" since that
           name collides with a proposed driver name
      
         - Use EXPORT_SYMBOL_NS_GPL instead of -DDEFAULT_SYMBOL_NAMESPACE at
           build time"
      
      * tag 'cxl-for-5.17' of git://git.kernel.org/pub/scm/linux/kernel/git/cxl/cxl:
        cxl/core: Remove cxld_const_init in cxl_decoder_alloc()
        cxl/pmem: Fix module reload vs workqueue state
        ACPI: NUMA: Add a node and memblk for each CFMWS not in SRAT
        cxl/test: Mock acpi_table_parse_cedt()
        cxl/acpi: Convert CFMWS parsing to ACPI sub-table helpers
        ACPI: Add a context argument for table parsing handlers
        ACPI: Teach ACPI table parsing about the CEDT header format
        ACPI: Keep sub-table parsing infrastructure available for modules
        tools/testing/cxl: add mock output for the GET_HEALTH_INFO command
        cxl/memdev: Remove unused cxlmd field
        cxl/core: Convert to EXPORT_SYMBOL_NS_GPL
        cxl/memdev: Change cxl_mem to a more descriptive name
        cxl/mbox: Remove bad comment
        cxl/pmem: Fix reference counting for delayed work
      362f533a
    • Linus Torvalds's avatar
      Merge tag 'libnvdimm-for-5.17' of git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm · 3acbdbf4
      Linus Torvalds authored
      Pull dax and libnvdimm updates from Dan Williams:
       "The bulk of this is a rework of the dax_operations API after
        discovering the obstacles it posed to the work-in-progress DAX+reflink
        support for XFS and other copy-on-write filesystem mechanics.
      
        Primarily the need to plumb a block_device through the API to handle
        partition offsets was a sticking point and Christoph untangled that
        dependency in addition to other cleanups to make landing the
        DAX+reflink support easier.
      
        The DAX_PMEM_COMPAT option has been around for 4 years and not only
        are distributions shipping userspace that understand the current
        configuration API, but some are not even bothering to turn this option
        on anymore, so it seems a good time to remove it per the deprecation
        schedule. Recall that this was added after the device-dax subsystem
        moved from /sys/class/dax to /sys/bus/dax for its sysfs organization.
        All recent functionality depends on /sys/bus/dax.
      
        Some other miscellaneous cleanups and reflink prep patches are
        included as well.
      
        Summary:
      
         - Simplify the dax_operations API:
      
            - Eliminate bdev_dax_pgoff() in favor of the filesystem
              maintaining and applying a partition offset to all its DAX iomap
              operations.
      
            - Remove wrappers and device-mapper stacked callbacks for
              ->copy_from_iter() and ->copy_to_iter() in favor of moving
              block_device relative offset responsibility to the
              dax_direct_access() caller.
      
            - Remove the need for an @bdev in filesystem-DAX infrastructure
      
            - Remove unused uio helpers copy_from_iter_flushcache() and
              copy_mc_to_iter() as only the non-check_copy_size() versions are
              used for DAX.
      
         - Prepare XFS for the pending (next merge window) DAX+reflink support
      
         - Remove deprecated DEV_DAX_PMEM_COMPAT support
      
         - Cleanup a straggling misuse of the GUID api"
      
      * tag 'libnvdimm-for-5.17' of git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm: (38 commits)
        iomap: Fix error handling in iomap_zero_iter()
        ACPI: NFIT: Import GUID before use
        dax: remove the copy_from_iter and copy_to_iter methods
        dax: remove the DAXDEV_F_SYNC flag
        dax: simplify dax_synchronous and set_dax_synchronous
        uio: remove copy_from_iter_flushcache() and copy_mc_to_iter()
        iomap: turn the byte variable in iomap_zero_iter into a ssize_t
        memremap: remove support for external pgmap refcounts
        fsdax: don't require CONFIG_BLOCK
        iomap: build the block based code conditionally
        dax: fix up some of the block device related ifdefs
        fsdax: shift partition offset handling into the file systems
        dax: return the partition offset from fs_dax_get_by_bdev
        iomap: add a IOMAP_DAX flag
        xfs: pass the mapping flags to xfs_bmbt_to_iomap
        xfs: use xfs_direct_write_iomap_ops for DAX zeroing
        xfs: move dax device handling into xfs_{alloc,free}_buftarg
        ext4: cleanup the dax handling in ext4_fill_super
        ext2: cleanup the dax handling in ext2_fill_super
        fsdax: decouple zeroing from the iomap buffered I/O code
        ...
      3acbdbf4
    • Linus Torvalds's avatar
      Merge tag 'fscache-rewrite-20220111' of... · 8834147f
      Linus Torvalds authored
      Merge tag 'fscache-rewrite-20220111' of git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs
      
      Pull fscache rewrite from David Howells:
       "This is a set of patches that rewrites the fscache driver and the
        cachefiles driver, significantly simplifying the code compared to
        what's upstream, removing the complex operation scheduling and object
        state machine in favour of something much smaller and simpler.
      
        The series is structured such that the first few patches disable
        fscache use by the network filesystems using it, remove the cachefiles
        driver entirely and as much of the fscache driver as can be got away
        with without causing build failures in the network filesystems.
      
        The patches after that recreate fscache and then cachefiles,
        attempting to add the pieces in a logical order. Finally, the
        filesystems are reenabled and then the very last patch changes the
        documentation.
      
        [!] Note: I have dropped the cifs patch for the moment, leaving local
            caching in cifs disabled. I've been having trouble getting that
            working. I think I have it done, but it needs more testing (there
            seem to be some test failures occurring with v5.16 also from
            xfstests), so I propose deferring that patch to the end of the
            merge window.
      
        WHY REWRITE?
        ============
      
        Fscache's operation scheduling API was intended to handle sequencing
        of cache operations, which were all required (where possible) to run
        asynchronously in parallel with the operations being done by the
        network filesystem, whilst allowing the cache to be brought online and
        offline and to interrupt service for invalidation.
      
        With the advent of the tmpfile capacity in the VFS, however, an
        opportunity arises to do invalidation much more simply, without having
        to wait for I/O that's actually in progress: Cachefiles can simply
        create a tmpfile, cut over the file pointer for the backing object
        attached to a cookie and abandon the in-progress I/O, dismissing it
        upon completion.
      
        Future work here would involve using Omar Sandoval's vfs_link() with
        AT_LINK_REPLACE[1] to allow an extant file to be displaced by a new
        hard link from a tmpfile as currently I have to unlink the old file
        first.
      
        These patches can also simplify the object state handling as I/O
        operations to the cache don't all have to be brought to a stop in
        order to invalidate a file. To that end, and with an eye on to writing
        a new backing cache model in the future, I've taken the opportunity to
        simplify the indexing structure.
      
        I've separated the index cookie concept from the file cookie concept
        by C type now. The former is now called a "volume cookie" (struct
        fscache_volume) and there is a container of file cookies. There are
        then just the two levels. All the index cookie levels are collapsed
        into a single volume cookie, and this has a single printable string as
        a key. For instance, an AFS volume would have a key of something like
        "afs,example.com,1000555", combining the filesystem name, cell name
        and volume ID. This is freeform, but must not have '/' chars in it.
      
        I've also eliminated all pointers back from fscache into the network
        filesystem. This required the duplication of a little bit of data in
        the cookie (cookie key, coherency data and file size), but it's not
        actually that much. This gets rid of problems with making sure we keep
        netfs data structures around so that the cache can access them.
      
        These patches mean that most of the code that was in the drivers
        before is simply gone and those drivers are now almost entirely new
        code. That being the case, there doesn't seem any particular reason to
        try and maintain bisectability across it. Further, there has to be a
        point in the middle where things are cut over as there's a single
        point everything has to go through (ie. /dev/cachefiles) and it can't
        be in use by two drivers at once.
      
        ISSUES YET OUTSTANDING
        ======================
      
        There are some issues still outstanding, unaddressed by this patchset,
        that will need fixing in future patchsets, but that don't stop this
        series from being usable:
      
        (1) The cachefiles driver needs to stop using the backing filesystem's
            metadata to store information about what parts of the cache are
            populated. This is not reliable with modern extent-based
            filesystems.
      
            Fixing this is deferred to a separate patchset as it involves
            negotiation with the network filesystem and the VM as to how much
            data to download to fulfil a read - which brings me on to (2)...
      
        (2) NFS (and CIFS with the dropped patch) do not take account of how
            the cache would like I/O to be structured to meet its granularity
            requirements. Previously, the cache used page granularity, which
            was fine as the network filesystems also dealt in page
            granularity, and the backing filesystem (ext4, xfs or whatever)
            did whatever it did out of sight. However, we now have folios to
            deal with and the cache will now have to store its own metadata to
            track its contents.
      
            The change I'm looking at making for cachefiles is to store
            content bitmaps in one or more xattrs and making a bit in the map
            correspond to something like a 256KiB block. However, the size of
            an xattr and the fact that they have to be read/updated in one go
            means that I'm looking at covering 1GiB of data per 512-byte map
            and storing each map in an xattr. Cachefiles has the potential to
            grow into a fully fledged filesystem of its very own if I'm not
            careful.
      
            However, I'm also looking at changing things even more radically
            and going to a different model of how the cache is arranged and
            managed - one that's more akin to the way, say, openafs does
            things - which brings me on to (3)...
      
        (3) The way cachefilesd does culling is very inefficient for large
            caches and it would be better to move it into the kernel if I can
            as cachefilesd has to keep asking the kernel if it can cull a
            file. Changing the way the backend works would allow this to be
            addressed.
      
        BITS THAT MAY BE CONTROVERSIAL
        ==============================
      
        There are some bits I've added that may be controversial:
      
        (1) I've provided a flag, S_KERNEL_FILE, that cachefiles uses to check
            if a files is already being used by some other kernel service
            (e.g. a duplicate cachefiles cache in the same directory) and
            reject it if it is. This isn't entirely necessary, but it helps
            prevent accidental data corruption.
      
            I don't want to use S_SWAPFILE as that has other effects, but
            quite possibly swapon() should set S_KERNEL_FILE too.
      
            Note that it doesn't prevent userspace from interfering, though
            perhaps it should. (I have made it prevent a marked directory from
            being rmdir-able).
      
        (2) Cachefiles wants to keep the backing file for a cookie open whilst
            we might need to write to it from network filesystem writeback.
            The problem is that the network filesystem unuses its cookie when
            its file is closed, and so we have nothing pinning the cachefiles
            file open and it will get closed automatically after a short time
            to avoid EMFILE/ENFILE problems.
      
            Reopening the cache file, however, is a problem if this is being
            done due to writeback triggered by exit(). Some filesystems will
            oops if we try to open a file in that context because they want to
            access current->fs or suchlike.
      
            To get around this, I added the following:
      
            (A) An inode flag, I_PINNING_FSCACHE_WB, to be set on a network
                filesystem inode to indicate that we have a usage count on the
                cookie caching that inode.
      
            (B) A flag in struct writeback_control, unpinned_fscache_wb, that
                is set when __writeback_single_inode() clears the last dirty
                page from i_pages - at which point it clears
                I_PINNING_FSCACHE_WB and sets this flag.
      
                This has to be done here so that clearing I_PINNING_FSCACHE_WB
                can be done atomically with the check of PAGECACHE_TAG_DIRTY
                that clears I_DIRTY_PAGES.
      
            (C) A function, fscache_set_page_dirty(), which if it is not set,
                sets I_PINNING_FSCACHE_WB and calls fscache_use_cookie() to
                pin the cache resources.
      
            (D) A function, fscache_unpin_writeback(), to be called by
                ->write_inode() to unuse the cookie.
      
            (E) A function, fscache_clear_inode_writeback(), to be called when
                the inode is evicted, before clear_inode() is called. This
                cleans up any lingering I_PINNING_FSCACHE_WB.
      
            The network filesystem can then use these tools to make sure that
            fscache_write_to_cache() can write locally modified data to the
            cache as well as to the server.
      
            For the future, I'm working on write helpers for netfs lib that
            should allow this facility to be removed by keeping track of the
            dirty regions separately - but that's incomplete at the moment and
            is also going to be affected by folios, one way or another, since
            it deals with pages"
      
      Link: https://lore.kernel.org/all/510611.1641942444@warthog.procyon.org.uk/
      Tested-by: Dominique Martinet <asmadeus@codewreck.org> # 9p
      Tested-by: kafs-testing@auristor.com # afs
      Tested-by: Jeff Layton <jlayton@kernel.org> # ceph
      Tested-by: Dave Wysochanski <dwysocha@redhat.com> # nfs
      Tested-by: Daire Byrne <daire@dneg.com> # nfs
      
      * tag 'fscache-rewrite-20220111' of git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs: (67 commits)
        9p, afs, ceph, nfs: Use current_is_kswapd() rather than gfpflags_allow_blocking()
        fscache: Add a tracepoint for cookie use/unuse
        fscache: Rewrite documentation
        ceph: add fscache writeback support
        ceph: conversion to new fscache API
        nfs: Implement cache I/O by accessing the cache directly
        nfs: Convert to new fscache volume/cookie API
        9p: Copy local writes to the cache when writing to the server
        9p: Use fscache indexing rewrite and reenable caching
        afs: Skip truncation on the server of data we haven't written yet
        afs: Copy local writes to the cache when writing to the server
        afs: Convert afs to use the new fscache API
        fscache, cachefiles: Display stat of culling events
        fscache, cachefiles: Display stats of no-space events
        cachefiles: Allow cachefiles to actually function
        fscache, cachefiles: Store the volume coherency data
        cachefiles: Implement the I/O routines
        cachefiles: Implement cookie resize for truncate
        cachefiles: Implement begin and end I/O operation
        cachefiles: Implement backing file wrangling
        ...
      8834147f
    • Linus Torvalds's avatar
      Merge tag 'fuse-update-5.17' of git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/fuse · 8975f897
      Linus Torvalds authored
      Pull fuse updates from Miklos Szeredi:
      
       - Fix a regression introduced in 5.15
      
       - Extend the size of the FUSE_INIT request to accommodate for more
         flags. There's a slight possibility of a regression for obscure fuse
         servers; if this happens, then more complexity will need to be added
         to the protocol
      
       - Allow the DAX property to be controlled by the server on a per-inode
         basis in virtiofs
      
       - Allow sending security context to the server when creating a file or
         directory
      
      * tag 'fuse-update-5.17' of git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/fuse:
        Documentation/filesystem/dax: DAX on virtiofs
        fuse: mark inode DONT_CACHE when per inode DAX hint changes
        fuse: negotiate per inode DAX in FUSE_INIT
        fuse: enable per inode DAX
        fuse: support per inode DAX in fuse protocol
        fuse: make DAX mount option a tri-state
        fuse: add fuse_should_enable_dax() helper
        fuse: Pass correct lend value to filemap_write_and_wait_range()
        fuse: send security context of inode on file
        fuse: extend init flags
      8975f897
    • Linus Torvalds's avatar
      Merge tag 'fs_for_v5.17-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs · 1fb38c93
      Linus Torvalds authored
      Pull UDF / reiserfs updates from Jan Kara:
       "One UDF fix and one reiserfs cleanup"
      
      * tag 'fs_for_v5.17-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs:
        udf: Fix error handling in udf_new_inode()
        reiserfs: don't use congestion_wait()
      1fb38c93
    • Linus Torvalds's avatar
      Merge tag 'fsnotify_for_v5.17-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs · 3d3d6733
      Linus Torvalds authored
      Pull fanotify updates from Jan Kara:
       "Support for new FAN_RENAME fanotify event and support for reporting
        child info in directory fanotify events (FAN_REPORT_TARGET_FID)"
      
      * tag 'fsnotify_for_v5.17-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs:
        fanotify: wire up FAN_RENAME event
        fanotify: report old and/or new parent+name in FAN_RENAME event
        fanotify: record either old name new name or both for FAN_RENAME
        fanotify: record old and new parent and name in FAN_RENAME event
        fanotify: support secondary dir fh and name in fanotify_info
        fanotify: use helpers to parcel fanotify_info buffer
        fanotify: use macros to get the offset to fanotify_info buffer
        fsnotify: generate FS_RENAME event with rich information
        fanotify: introduce group flag FAN_REPORT_TARGET_FID
        fsnotify: separate mark iterator type from object type enum
        fsnotify: clarify object type argument
      3d3d6733
    • Linus Torvalds's avatar
      Merge tag 'iomap-5.17' of git://git.infradead.org/users/willy/linux · f079ab01
      Linus Torvalds authored
      Pull iomap updates from Matthew Wilcox:
       "Convert xfs/iomap to use folios.
      
        This should be all that is needed for XFS to use large folios. There
        is no code in this pull request to create large folios, but no
        additional changes should be needed to XFS or iomap once they are
        created.
      
        Usually this would have come from Darrick, and we had intended that it
        would come that route. Between the holidays and various things which
        Darrick needed to work on, he asked if I could send things directly.
      
        There weren't any other iomap patches pending for this release, which
        probably also played a role"
      
      * tag 'iomap-5.17' of git://git.infradead.org/users/willy/linux: (26 commits)
        iomap: Inline __iomap_zero_iter into its caller
        xfs: Support large folios
        iomap: Support large folios in invalidatepage
        iomap: Convert iomap_migrate_page() to use folios
        iomap: Convert iomap_add_to_ioend() to take a folio
        iomap: Simplify iomap_do_writepage()
        iomap: Simplify iomap_writepage_map()
        iomap,xfs: Convert ->discard_page to ->discard_folio
        iomap: Convert iomap_write_end_inline to take a folio
        iomap: Convert iomap_write_begin() and iomap_write_end() to folios
        iomap: Convert __iomap_zero_iter to use a folio
        iomap: Allow iomap_write_begin() to be called with the full length
        iomap: Convert iomap_page_mkwrite to use a folio
        iomap: Convert readahead and readpage to use a folio
        iomap: Convert iomap_read_inline_data to take a folio
        iomap: Use folio offsets instead of page offsets
        iomap: Convert bio completions to use folios
        iomap: Pass the iomap_page into iomap_set_range_uptodate
        iomap: Add iomap_invalidate_folio
        iomap: Convert iomap_releasepage to use a folio
        ...
      f079ab01
    • Linus Torvalds's avatar
      Merge tag 'folio-5.17' of git://git.infradead.org/users/willy/pagecache · 6020c204
      Linus Torvalds authored
      Pull folio conversion updates from Matthew Wilcox:
       "Convert much of the page cache to use folios
      
        This stops just short of actually enabling large folios. It converts
        everything that I noticed needs to be converted, but there may still
        be places I've overlooked which still have page size assumptions.
      
        The big change here is using large entries in the page cache XArray
        instead of many small entries. That only affects shmem for now, but
        it's a pretty big change for shmem since it changes where memory needs
        to be allocated (at split time instead of insertion)"
      
      * tag 'folio-5.17' of git://git.infradead.org/users/willy/pagecache: (49 commits)
        mm: Use multi-index entries in the page cache
        XArray: Add xas_advance()
        truncate,shmem: Handle truncates that split large folios
        truncate: Convert invalidate_inode_pages2_range to folios
        fs: Convert vfs_dedupe_file_range_compare to folios
        mm: Remove pagevec_remove_exceptionals()
        mm: Convert find_lock_entries() to use a folio_batch
        filemap: Return only folios from find_get_entries()
        filemap: Convert filemap_get_read_batch() to use a folio_batch
        filemap: Convert filemap_read() to use a folio
        truncate: Add invalidate_complete_folio2()
        truncate: Convert invalidate_inode_pages2_range() to use a folio
        truncate: Skip known-truncated indices
        truncate,shmem: Add truncate_inode_folio()
        shmem: Convert part of shmem_undo_range() to use a folio
        mm: Add unmap_mapping_folio()
        truncate: Add truncate_cleanup_folio()
        filemap: Add filemap_release_folio()
        filemap: Use a folio in filemap_page_mkwrite
        filemap: Use a folio in filemap_map_pages
        ...
      6020c204
    • Linus Torvalds's avatar
      Merge tag 'spdx-5.17-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/spdx · 81ff0be4
      Linus Torvalds authored
      Pull SPDX/License update from Greg KH:
       "Here is a single change that fixes up the description of the 'LGPL-2.1
        or later' identifiers so that the tools properly acknowledge that this
        is a valid license.
      
        This change has been in linux-next for weeks with no reported problems"
      
      * tag 'spdx-5.17-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/spdx:
        LICENSES/LGPL-2.1: Add LGPL-2.1-or-later as valid identifiers
      81ff0be4
    • Linus Torvalds's avatar
      Merge tag 'usb-5.17-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb · 57ea8197
      Linus Torvalds authored
      Pull USB and Thunderbolt updates from Greg KH:
       "Here is the big set of USB and Thunderbolt driver changes for
        5.17-rc1.
      
        Nothing major in here, just lots of little updates and cleanups. These
        include:
      
         - some USB header fixes picked from Ingo's header-splitup work
      
         - more USB4/Thunderbolt hardware support added
      
         - USB gadget driver updates and additions
      
         - USB typec additions (includes some acpi changes, which were acked
           by the ACPI maintainer)
      
         - core USB fixes as found by syzbot that were too late for 5.16-final
      
         - USB dwc3 driver updates
      
         - USB dwc2 driver updates
      
         - platform_get_irq() conversions of some USB drivers
      
         - other minor USB driver updates and additions
      
        All of these have been in linux-next for a while with no reported
        issues"
      
      * tag 'usb-5.17-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: (111 commits)
        docs: ABI: fixed formatting in configfs-usb-gadget-uac2
        usb: gadget: u_audio: Subdevice 0 for capture ctls
        usb: gadget: u_audio: fix calculations for small bInterval
        usb: dwc2: gadget: initialize max_speed from params
        usb: dwc2: do not gate off the hardware if it does not support clock gating
        usb: dwc3: qcom: Fix NULL vs IS_ERR checking in dwc3_qcom_probe
        headers/deps: USB: Optimize <linux/usb/ch9.h> dependencies, remove <linux/device.h>
        USB: common: debug: add needed kernel.h include
        headers/prep: Fix non-standard header section: drivers/usb/host/ohci-tmio.c
        headers/prep: Fix non-standard header section: drivers/usb/cdns3/core.h
        headers/prep: usb: gadget: Fix namespace collision
        USB: core: Fix bug in resuming hub's handling of wakeup requests
        USB: Fix "slab-out-of-bounds Write" bug in usb_hcd_poll_rh_status
        usb: dwc3: dwc3-qcom: Add missing platform_device_put() in dwc3_qcom_acpi_register_core
        usb: gadget: clear related members when goto fail
        usb: gadget: don't release an existing dev->buf
        usb: dwc2: Simplify a bitmap declaration
        usb: Remove usb_for_each_port()
        usb: typec: port-mapper: Convert to the component framework
        usb: Link the ports to the connectors they are attached to
        ...
      57ea8197
    • Linus Torvalds's avatar
      Merge tag 'tty-5.17-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty · 342465f5
      Linus Torvalds authored
      Pull tty/serial driver updates from Greg KH:
       "Here is the big set of tty/serial driver updates for 5.17-rc1.
      
        Nothing major in here, just lots of good updates and fixes, including:
      
         - more tty core cleanups from Jiri as well as mxser driver cleanups.
           This is the majority of the core diffstat
      
         - tty documentation updates from Jiri
      
         - platform_get_irq() updates
      
         - various serial driver updates for new features and hardware
      
         - fifo usage for 8250 console, reducing cpu load a lot
      
         - LED fix for keyboards, long-time bugfix that went through many
           revisions
      
         - minor cleanups
      
        All have been in linux-next for a while with no reported problems"
      
      * tag 'tty-5.17-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty: (119 commits)
        serial: core: Keep mctrl register state and cached copy in sync
        serial: stm32: correct loop for dma error handling
        serial: stm32: fix flow control transfer in DMA mode
        serial: stm32: rework TX DMA state condition
        serial: stm32: move tx dma terminate DMA to shutdown
        serial: pl011: Drop redundant DTR/RTS preservation on close/open
        serial: pl011: Drop CR register reset on set_termios
        serial: pl010: Drop CR register reset on set_termios
        serial: liteuart: fix MODULE_ALIAS
        serial: 8250_bcm7271: Fix return error code in case of dma_alloc_coherent() failure
        Revert "serdev: BREAK/FRAME/PARITY/OVERRUN notification prototype V2"
        tty: goldfish: Use platform_get_irq() to get the interrupt
        serdev: BREAK/FRAME/PARITY/OVERRUN notification prototype V2
        tty: serial: meson: Drop the legacy compatible strings and clock code
        serial: pmac_zilog: Use platform_get_irq() to get the interrupt
        serial: bcm63xx: Use platform_get_irq() to get the interrupt
        serial: ar933x: Use platform_get_irq() to get the interrupt
        serial: vt8500: Use platform_get_irq() to get the interrupt
        serial: altera_jtaguart: Use platform_get_irq_optional() to get the interrupt
        serial: pxa: Use platform_get_irq() to get the interrupt
        ...
      342465f5