summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBen Hutchings <benh@debian.org>2022-10-29 18:03:01 +0200
committerBen Hutchings <benh@debian.org>2022-10-29 18:03:01 +0200
commitbcb67941b00427bda8a953c97669c505b8100359 (patch)
treed2c46593df9cb1ba6cbbc7ed3a1ebd9b2af946fe
parentf92fc6e362a906478758b1d9f7412f47a85ff780 (diff)
parent93a654575b327456d507cb0c3abe9b6e50f32677 (diff)
downloadlinux-debian-bcb67941b00427bda8a953c97669c505b8100359.tar.gz
Merge tag 'debian/6.0.3-1' into bullseye-backports
Release linux (6.0.3-1). - Keep using gcc-10 for bullseye
-rwxr-xr-xdebian/bin/gencontrol_signed.py2
-rw-r--r--debian/changelog1029
-rw-r--r--debian/config/alpha/config1
-rw-r--r--debian/config/amd64/config8
-rw-r--r--debian/config/arm64/config12
-rw-r--r--debian/config/armel/config.marvell7
-rw-r--r--debian/config/armhf/config18
-rw-r--r--debian/config/config88
-rw-r--r--debian/config/config.cloud17
-rw-r--r--debian/config/hppa/config6
-rw-r--r--debian/config/hppa/config.parisc1
-rw-r--r--debian/config/ia64/config1
-rw-r--r--debian/config/kernelarch-mips/config.malta1
-rw-r--r--debian/config/kernelarch-mips/config.octeon6
-rw-r--r--debian/config/kernelarch-powerpc/config2
-rw-r--r--debian/config/kernelarch-sparc/config1
-rw-r--r--debian/config/kernelarch-x86/config8
-rw-r--r--debian/config/m68k/config4
-rw-r--r--debian/config/riscv64/config1
-rw-r--r--debian/installer/modules/arm64/i2c-modules1
-rw-r--r--debian/installer/modules/arm64/kernel-image4
-rw-r--r--debian/installer/modules/kernel-image2
-rw-r--r--debian/installer/modules/nic-modules2
-rw-r--r--debian/lib/python/debian_linux/debian.py2
-rw-r--r--debian/patches-rt/0001-arm-Disable-jump-label-on-PREEMPT_RT.patch4
-rw-r--r--debian/patches-rt/0001-fs-dcache-d_add_ci-needs-to-complete-parallel-lookup.patch36
-rw-r--r--debian/patches-rt/0001-lib-vsprintf-Remove-static_branch_likely-from-__ptr_.patch2
-rw-r--r--debian/patches-rt/0001-mm-slub-move-free_debug_processing-further.patch148
-rw-r--r--debian/patches-rt/0001-preempt-Provide-preempt_-dis-en-able_nested.patch85
-rw-r--r--debian/patches-rt/0001-spi-Remove-the-obsolte-u64_stats_fetch_-_irq-users.patch34
-rw-r--r--debian/patches-rt/0002-dentry-Use-preempt_-dis-en-able_nested.patch48
-rw-r--r--debian/patches-rt/0002-fs-dcache-Disable-preemption-on-i_dir_seq-write-side.patch61
-rw-r--r--debian/patches-rt/0002-lib-vsprintf-Initialize-vsprintf-s-pointer-hash-once.patch36
-rw-r--r--debian/patches-rt/0002-mm-slub-restrict-sysfs-validation-to-debug-caches-an.patch472
-rw-r--r--debian/patches-rt/0002-net-Remove-the-obsolte-u64_stats_fetch_-_irq-users.patch1996
-rw-r--r--debian/patches-rt/0003-drm-i915-Use-preempt_disable-enable_rt-where-recomme.patch2
-rw-r--r--debian/patches-rt/0003-fs-dcache-Move-the-wakeup-from-__d_lookup_done-to-th.patch187
-rw-r--r--debian/patches-rt/0003-mm-slub-remove-slab_lock-usage-for-debug-operations.patch98
-rw-r--r--debian/patches-rt/0003-mm-vmstat-Use-preempt_-dis-en-able_nested.patch141
-rw-r--r--debian/patches-rt/0003-net-Remove-the-obsolte-u64_stats_fetch_-_irq-users.patch356
-rw-r--r--debian/patches-rt/0003-slub-Make-PREEMPT_RT-support-less-convoluted.patch146
-rw-r--r--debian/patches-rt/0004-bpf-Remove-the-obsolte-u64_stats_fetch_-_irq-users.patch45
-rw-r--r--debian/patches-rt/0004-drm-i915-Don-t-disable-interrupts-on-PREEMPT_RT-duri.patch2
-rw-r--r--debian/patches-rt/0004-fs-dcache-Move-wakeup-out-of-i_seq_dir-write-held-re.patch83
-rw-r--r--debian/patches-rt/0004-mm-debug-Provide-VM_WARN_ON_IRQS_ENABLED.patch52
-rw-r--r--debian/patches-rt/0004-mm-slub-convert-object_map_lock-to-non-raw-spinlock.patch90
-rw-r--r--debian/patches-rt/0005-drm-i915-Don-t-check-for-atomic-context-on-PREEMPT_R.patch4
-rw-r--r--debian/patches-rt/0005-mm-memcontrol-Replace-the-PREEMPT_RT-conditionals.patch75
-rw-r--r--debian/patches-rt/0005-mm-slub-simplify-__cmpxchg_double_slab-and-slab_-un-.patch111
-rw-r--r--debian/patches-rt/0006-drm-i915-Disable-tracing-points-on-PREEMPT_RT.patch2
-rw-r--r--debian/patches-rt/0006-mm-compaction-Get-rid-of-RT-ifdeffery.patch50
-rw-r--r--debian/patches-rt/0007-drm-i915-skip-DRM_I915_LOW_LEVEL_TRACEPOINTS-with-NO.patch2
-rw-r--r--debian/patches-rt/0007-flex_proportions-Disable-preemption-entering-the-wri.patch37
-rw-r--r--debian/patches-rt/0008-drm-i915-gt-Queue-and-wait-for-the-irq_work-item.patch2
-rw-r--r--debian/patches-rt/0008-u64_stats-Streamline-the-implementation.patch263
-rw-r--r--debian/patches-rt/0009-drm-i915-gt-Use-spin_lock_irq-instead-of-local_irq_d.patch2
-rw-r--r--debian/patches-rt/0010-drm-i915-Drop-the-irqs_disabled-check.patch6
-rw-r--r--debian/patches-rt/0016-printk-add-infrastucture-for-atomic-consoles.patch18
-rw-r--r--debian/patches-rt/0017-serial-8250-implement-write_atomic.patch154
-rw-r--r--debian/patches-rt/0018-printk-avoid-preempt_disable-for-PREEMPT_RT.patch2
-rw-r--r--debian/patches-rt/ARM64__Allow_to_enable_RT.patch2
-rw-r--r--debian/patches-rt/ARM__Allow_to_enable_RT.patch4
-rw-r--r--debian/patches-rt/ARM__enable_irq_in_translation_section_permission_fault_handlers.patch6
-rw-r--r--debian/patches-rt/Add_localversion_for_-RT_release.patch4
-rw-r--r--debian/patches-rt/POWERPC__Allow_to_enable_RT.patch6
-rw-r--r--debian/patches-rt/Revert-drm-i915-Depend-on-PREEMPT_RT.patch2
-rw-r--r--debian/patches-rt/Revert-printk-Skip-console-drivers-on-PREEMPT_RT.patch32
-rw-r--r--debian/patches-rt/arch-Disable-softirq-stacks-on-PREEMPT_RT.patch151
-rw-r--r--debian/patches-rt/arch_arm64__Add_lazy_preempt_support.patch6
-rw-r--r--debian/patches-rt/arm__Add_support_for_lazy_preemption.patch2
-rw-r--r--debian/patches-rt/blk-mq-Don-t-disable-preemption-around-__blk_mq_run_.patch45
-rw-r--r--debian/patches-rt/drivers_block_zram__Replace_bit_spinlocks_with_rtmutex_for_-rt.patch8
-rw-r--r--debian/patches-rt/entry--Fix-the-preempt-lazy-fallout.patch2
-rw-r--r--debian/patches-rt/genirq-Provide-generic_handle_domain_irq_safe.patch4
-rw-r--r--debian/patches-rt/iio-adc-stm32-adc-Use-generic_handle_domain_irq.patch36
-rw-r--r--debian/patches-rt/locking-Detect-includes-rwlock.h-outside-of-spinlock.patch105
-rw-r--r--debian/patches-rt/locking-lockdep-Remove-lockdep_init_map_crosslock.patch4
-rw-r--r--debian/patches-rt/net-Avoid-the-IPI-to-free-the.patch115
-rw-r--r--debian/patches-rt/powerpc__Add_support_for_lazy_preemption.patch8
-rw-r--r--debian/patches-rt/powerpc__traps__Use_PREEMPT_RT.patch2
-rw-r--r--debian/patches-rt/powerpc_kvm__Disable_in-kernel_MPIC_emulation_for_PREEMPT_RT.patch4
-rw-r--r--debian/patches-rt/powerpc_pseries_iommu__Use_a_locallock_instead_local_irq_save.patch2
-rw-r--r--debian/patches-rt/powerpc_stackprotector__work_around_stack-guard_init_from_atomic.patch2
-rw-r--r--debian/patches-rt/printk-Bring-back-the-RT-bits.patch30
-rw-r--r--debian/patches-rt/printk-Skip-console-drivers-on-PREEMPT_RT.patch52
-rw-r--r--debian/patches-rt/rcutorture-Also-force-sched-priority-to-timersd-on-b.patch6
-rw-r--r--debian/patches-rt/sched-Consider-task_struct-saved_state-in-wait_task_.patch12
-rw-r--r--debian/patches-rt/sched__Add_support_for_lazy_preemption.patch42
-rw-r--r--debian/patches-rt/series42
-rw-r--r--debian/patches-rt/signal-Don-t-disable-preemption-in-ptrace_stop-on-PR.patch2
-rw-r--r--debian/patches-rt/softirq-Use-a-dedicated-thread-for-timer-wakeups.patch48
-rw-r--r--debian/patches-rt/sysfs__Add__sys_kernel_realtime_entry.patch2
-rw-r--r--debian/patches-rt/tick-Fix-timer-storm-since-introduction-of-timersd.patch6
-rw-r--r--debian/patches-rt/tpm_tis__fix_stall_after_iowrites.patch2
-rw-r--r--debian/patches-rt/tty_serial_omap__Make_the_locking_RT_aware.patch6
-rw-r--r--debian/patches-rt/tty_serial_pl011__Make_the_locking_work_on_RT.patch2
-rw-r--r--debian/patches-rt/u64_stat-Remove-the-obsolete-fetch_irq-variants.patch36
-rw-r--r--debian/patches-rt/vduse-Remove-include-of-rwlock.h.patch26
-rw-r--r--debian/patches-rt/x86__Allow_to_enable_RT.patch2
-rw-r--r--debian/patches-rt/x86__Enable_RT_also_on_32bit.patch4
-rw-r--r--debian/patches-rt/x86__Support_for_lazy_preemption.patch4
-rw-r--r--debian/patches-rt/x86_entry__Use_should_resched_in_idtentry_exit_cond_resched.patch2
-rw-r--r--debian/patches/bugfix/all/pm-sleep-add-pm_userspace_autosleep-kconfig.patch89
-rw-r--r--debian/patches/bugfix/all/remove-config_android.patch90
-rw-r--r--debian/patches/bugfix/all/tools-bpf_jit_disasm-fix-compilation-error-with-new-binutils.patch94
-rw-r--r--debian/patches/bugfix/all/tools-bpftool-fix-compilation-error-with-new-binutils.patch142
-rw-r--r--debian/patches/bugfix/all/tools-build-add-feature-test-for-init_disassemble_info-api-changes.patch96
-rw-r--r--debian/patches/bugfix/all/tools-include-add-dis-asm-compat.h-to-handle-version-differences.patch87
-rw-r--r--debian/patches/bugfix/all/tools-perf-fix-build-without-libbfd.patch26
-rw-r--r--debian/patches/bugfix/all/tools-perf-fix-compilation-error-with-new-binutils.patch101
-rw-r--r--debian/patches/bugfix/all/tools-perf-fix-missing-ldflags-for-some-programs.patch11
-rw-r--r--debian/patches/bugfix/all/tools-perf-pmu-events-fix-reproducibility.patch187
-rw-r--r--debian/patches/bugfix/all/tools-rtla-build-with-extra-c-ld-flags.patch24
-rw-r--r--debian/patches/debian/android-enable-building-ashmem-and-binder-as-modules.patch6
-rw-r--r--debian/patches/debian/export-symbols-needed-by-android-drivers.patch26
-rw-r--r--debian/patches/debian/fanotify-taint-on-use-of-fanotify_access_permissions.patch6
-rw-r--r--debian/patches/debian/tools-perf-install.patch52
-rw-r--r--debian/patches/debian/version.patch12
-rw-r--r--debian/patches/features/all/lockdown/efi-add-an-efi_secure_boot-flag-to-indicate-secure-b.patch18
-rw-r--r--debian/patches/features/x86/intel-iommu-add-kconfig-option-to-exclude-igpu-by-default.patch6
-rw-r--r--debian/patches/features/x86/intel-iommu-add-option-to-exclude-integrated-gpu-only.patch28
-rw-r--r--debian/patches/series10
-rw-r--r--debian/rules.real1
-rw-r--r--debian/salsa-ci.yml128
-rw-r--r--debian/signing_templates/control.source.in2
-rw-r--r--debian/signing_templates/rules.real13
-rwxr-xr-xdebian/signing_templates/sign-file-attach56
-rw-r--r--debian/templates/control.signed-template.in2
-rw-r--r--debian/templates/control.tools-unversioned.in1
129 files changed, 6075 insertions, 2193 deletions
diff --git a/debian/bin/gencontrol_signed.py b/debian/bin/gencontrol_signed.py
index 96a9e19a6..99abe1689 100755
--- a/debian/bin/gencontrol_signed.py
+++ b/debian/bin/gencontrol_signed.py
@@ -61,7 +61,7 @@ class Gencontrol(Base):
makeflags['VERSION'] = self.version.linux_version
makeflags['GENCONTROL_ARGS'] = (
'-v%(imagebinaryversion)s '
- '-DBuilt-Using="linux (= %(imagesourceversion)s)"' %
+ '-DBuilt-Using="%(source_basename)s%(source_suffix)s (= %(imagesourceversion)s)"' %
vars)
makeflags['PACKAGE_VERSION'] = vars['imagebinaryversion']
diff --git a/debian/changelog b/debian/changelog
index 26ef2b7c8..f96dea584 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,1031 @@
+linux (6.0.3-1~bpo11+1) bullseye-backports; urgency=medium
+
+ * Rebuild for bullseye-backports:
+ - Change ABI number to 0.deb11.2
+
+ -- Ben Hutchings <benh@debian.org> Sat, 29 Oct 2022 17:59:13 +0200
+
+linux (6.0.3-1) unstable; urgency=medium
+
+ * New upstream stable update:
+ https://www.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.0.3
+ - ALSA: oss: Fix potential deadlock at unregistration
+ - ALSA: rawmidi: Drop register_mutex in snd_rawmidi_free()
+ - ALSA: usb-audio: Fix potential memory leaks
+ - ALSA: usb-audio: Fix NULL dererence at error path
+ - ALSA: hda/realtek: remove ALC289_FIXUP_DUAL_SPK for Dell 5530
+ - ALSA: hda/realtek: Correct pin configs for ASUS G533Z
+ - ALSA: hda/realtek: Add quirk for ASUS GV601R laptop
+ - ALSA: hda/realtek: Add Intel Reference SSID to support headset keys
+ - io_uring: add custom opcode hooks on fail
+ - io_uring/rw: don't lose partial IO result on fail
+ - io_uring/net: don't lose partial send/recv on fail
+ - io_uring/rw: fix unexpected link breakage
+ - io_uring/rw: don't lose short results on io_setup_async_rw()
+ - io_uring/net: fix fast_iov assignment in io_setup_async_msg()
+ - io_uring/net: don't update msg_name if not provided
+ - io_uring: limit registration w/ SINGLE_ISSUER
+ - io_uring/net: handle -EINPROGRESS correct for IORING_OP_CONNECT
+ - io_uring/af_unix: defer registered files gc to io_uring release
+ (CVE-2022-2602)
+ - io_uring: correct pinned_vm accounting
+ - [x86] hv_netvsc: Fix race between VF offering and VF association message
+ from host
+ - cifs: destage dirty pages before re-reading them for cache=none
+ - cifs: Fix the error length of VALIDATE_NEGOTIATE_INFO message
+ - iio: dac: ad5593r: Fix i2c read protocol requirements
+ - iio: ltc2497: Fix reading conversion results
+ - iio: adc: ad7923: fix channel readings for some variants
+ - iio: pressure: dps310: Refactor startup procedure
+ - iio: pressure: dps310: Reset chip after timeout
+ - xhci: dbc: Fix memory leak in xhci_alloc_dbc()
+ - usb: gadget: uvc: Fix argument to sizeof() in uvc_register_video()
+ - usb: add quirks for Lenovo OneLink+ Dock
+ - mmc: core: Add SD card quirk for broken discard
+ - can: kvaser_usb: Fix use of uninitialized completion
+ - can: kvaser_usb_leaf: Fix overread with an invalid command
+ - can: kvaser_usb_leaf: Fix TX queue out of sync after restart
+ - can: kvaser_usb_leaf: Fix CAN state after restart
+ - mmc: renesas_sdhi: Fix rounding errors
+ - mmc: sdhci-tegra: Use actual clock rate for SW tuning correction
+ - mmc: sdhci-sprd: Fix minimum clock limit
+ - i2c: designware: Fix handling of real but unexpected device interrupts
+ - fs: dlm: fix race between test_bit() and queue_work()
+ - fs: dlm: handle -EBUSY first in lock arg validation
+ - fs: dlm: fix invalid derefence of sb_lvbptr
+ - btf: Export bpf_dynptr definition
+ - mbcache: Avoid nesting of cache->c_list_lock under bit locks
+ - HID: multitouch: Add memory barriers
+ - quota: Check next/prev free block number after reading from quota file
+ - platform/chrome: cros_ec_proto: Update version on GET_NEXT_EVENT failure
+ - [arm64] dts: qcom: sdm845-mtp: correct ADC settle time
+ - ASoC: wcd9335: fix order of Slimbus unprepare/disable
+ - ASoC: wcd934x: fix order of Slimbus unprepare/disable
+ - hwmon: (gsc-hwmon) Call of_node_get() before of_find_xxx API
+ - net: thunderbolt: Enable DMA paths only after rings are enabled
+ - regulator: qcom_rpm: Fix circular deferral regression
+ - [arm64] topology: move store_cpu_topology() to shared code
+ - [riscv64] topology: fix default topology reporting
+ - [riscv64] Re-enable counter access from userspace
+ - [riscv64] Make port I/O string accessors actually work
+ - [riscv64] vdso: fix NULL deference in vdso_join_timens() when vfork
+ - [riscv64] Allow PROT_WRITE-only mmap()
+ - [riscv64] Make VM_WRITE imply VM_READ
+ - [riscv64] always honor the CONFIG_CMDLINE_FORCE when parsing dtb
+ - [riscv64] Pass -mno-relax only on lld < 15.0.0
+ - nvmem: core: Fix memleak in nvmem_register()
+ - nvme-multipath: fix possible hang in live ns resize with ANA access
+ - Revert "drm/amdgpu: use dirty framebuffer helper"
+ - dm: verity-loadpin: Only trust verity targets with enforcement
+ - dmaengine: mxs: use platform_driver_register
+ - dmaengine: qcom-adm: fix wrong sizeof config in slave_config
+ - dmaengine: qcom-adm: fix wrong calling convention for prep_slave_sg
+ - drm/virtio: Check whether transferred 2D BO is shmem
+ - drm/virtio: Unlock reservations on virtio_gpu_object_shmem_init() error
+ - drm/virtio: Unlock reservations on dma_resv_reserve_fences() error
+ - drm/virtio: Use appropriate atomic state in virtio_gpu_plane_cleanup_fb()
+ - drm/udl: Restore display mode on resume
+ - [arm64] mte: move register initialization to C
+ - [arm64] mte: Avoid setting PG_mte_tagged if no tags cleared or restored
+ - [arm64] errata: Add Cortex-A55 to the repeat tlbi list
+ - clocksource/drivers/arm_arch_timer: Fix CNTPCT_LO and CNTVCT_LO value
+ - mm/hugetlb: fix races when looking up a CONT-PTE/PMD size hugetlb page
+ - mm/damon: validate if the pmd entry is present before accessing
+ - mm/uffd: fix warning without PTE_MARKER_UFFD_WP compiled in
+ - mm/mmap: undo ->mmap() when arch_validate_flags() fails
+ - xen/gntdev: Prevent leaking grants
+ - xen/gntdev: Accommodate VMA splitting
+ - PCI: Sanitise firmware BAR assignments behind a PCI-PCI bridge
+ - serial: cpm_uart: Don't request IRQ too early for console port
+ - serial: stm32: Deassert Transmit Enable on ->rs485_config()
+ - serial: Deassert Transmit Enable on probe in driver-specific way
+ - serial: ar933x: Deassert Transmit Enable on ->rs485_config()
+ - serial: 8250: Let drivers request full 16550A feature probing
+ - serial: 8250: Request full 16550A feature probing for OxSemi PCIe devices
+ - NFSD: Protect against send buffer overflow in NFSv3 READDIR
+ - NFSD: Protect against send buffer overflow in NFSv2 READ
+ - NFSD: Protect against send buffer overflow in NFSv3 READ
+ - cpufreq: qcom-cpufreq-hw: Fix uninitialized throttled_freq warning
+ - LoadPin: Fix Kconfig doc about format of file with verity digests
+ - powercap: intel_rapl: Use standard Energy Unit for SPR Dram RAPL domain
+ - slimbus: qcom-ngd: use correct error in message of pdr_add_lookup()
+ failure
+ - slimbus: qcom-ngd: cleanup in probe error path
+ - scsi: lpfc: Rework MIB Rx Monitor debug info logic
+ - scsi: qedf: Populate sysfs attributes for vport
+ - gpio: rockchip: request GPIO mux to pinctrl when setting direction
+ - pinctrl: rockchip: add pinmux_ops.gpio_set_direction callback
+ - fbdev: smscufx: Fix use-after-free in ufx_ops_open()
+ - hwrng: core - let sleep be interrupted when unregistering hwrng
+ - smb3: do not log confusing message when server returns no network
+ interfaces
+ - ksmbd: fix incorrect handling of iterate_dir
+ - ksmbd: fix endless loop when encryption for response fails
+ - ksmbd: Fix wrong return value and message length check in smb2_ioctl()
+ - ksmbd: Fix user namespace mapping
+ - fs: record I_DIRTY_TIME even if inode already has I_DIRTY_INODE
+ - btrfs: fix alignment of VMA for memory mapped files on THP
+ - btrfs: enhance unsupported compat RO flags handling
+ - btrfs: fix race between quota enable and quota rescan ioctl
+ - btrfs: fix missed extent on fsync after dropping extent maps
+ - btrfs: set generation before calling btrfs_clean_tree_block in
+ btrfs_init_new_buffer
+ - f2fs: fix wrong continue condition in GC
+ - f2fs: complete checkpoints during remount
+ - f2fs: flush pending checkpoints when freezing super
+ - f2fs: increase the limit for reserve_root
+ - f2fs: fix to do sanity check on destination blkaddr during recovery
+ - f2fs: fix to do sanity check on summary info
+ - f2fs: allow direct read for zoned device
+ - jbd2: wake up journal waiters in FIFO order, not LIFO
+ - jbd2: fix potential buffer head reference count leak
+ - jbd2: fix potential use-after-free in jbd2_fc_wait_bufs
+ - jbd2: add miss release buffer head in fc_do_one_pass()
+ - ext2: Add sanity checks for group and filesystem size
+ - ext4: avoid crash when inline data creation follows DIO write
+ - ext4: fix null-ptr-deref in ext4_write_info
+ - ext4: make ext4_lazyinit_thread freezable
+ - ext4: fix check for block being out of directory size (CVE-2022-1184)
+ - ext4: don't increase iversion counter for ea_inodes
+ - ext4: unconditionally enable the i_version counter
+ - ext4: ext4_read_bh_lock() should submit IO if the buffer isn't uptodate
+ - ext4: place buffer head allocation before handle start
+ - ext4: fix i_version handling in ext4
+ - ext4: fix dir corruption when ext4_dx_add_entry() fails
+ - ext4: fix miss release buffer head in ext4_fc_write_inode
+ - ext4: fix potential memory leak in ext4_fc_record_modified_inode()
+ - ext4: fix potential memory leak in ext4_fc_record_regions()
+ - ext4: update 'state->fc_regions_size' after successful memory allocation
+ - ftrace: Properly unset FTRACE_HASH_FL_MOD
+ - ftrace: Still disable enabled records marked as disabled
+ - ring-buffer: Allow splice to read previous partially read pages
+ - ring-buffer: Have the shortest_full queue be the shortest not longest
+ - ring-buffer: Check pending waiters when doing wake ups as well
+ - ring-buffer: Add ring_buffer_wake_waiters()
+ - ring-buffer: Fix race between reset page and reading page
+ - tracing/eprobe: Fix alloc event dir failed when event name no set
+ - tracing: Disable interrupt or preemption before acquiring arch_spinlock_t
+ - tracing: Wake up ring buffer waiters on closing of the file
+ - tracing: Wake up waiters when tracing is disabled
+ - tracing: Add ioctl() to force ring buffer waiters to wake up
+ - tracing: Do not free snapshot if tracer is on cmdline
+ - tracing: Move duplicate code of trace_kprobe/eprobe.c into header
+ - tracing: Add "(fault)" name injection to kernel probes
+ - tracing: Fix reading strings from synthetic events
+ - rpmsg: char: Avoid double destroy of default endpoint
+ - thunderbolt: Explicitly enable lane adapter hotplug events at startup
+ - efi: libstub: drop pointless get_memory_map() call
+ - media: cedrus: Fix watchdog race condition
+ - media: cedrus: Set the platform driver data earlier
+ - media: cedrus: Fix endless loop in cedrus_h265_skip_bits()
+ - blk-throttle: fix that io throttle can only work for single bio
+ - blk-wbt: call rq_qos_add() after wb_normal is initialized
+ - [x86] KVM: x86/emulator: Fix handing of POP SS to correctly set
+ interruptibility
+ - [x86] KVM: nVMX: Unconditionally purge queued/injected events on nested
+ "exit"
+ - [x86] KVM: nVMX: Don't propagate vmcs12's PERF_GLOBAL_CTRL settings to
+ vmcs02
+ - [x86] KVM: x86: Treat #DBs from the emulator as fault-like (code and
+ DR7.GD=1)
+ - [x86] KVM: VMX: Drop bits 31:16 when shoving exception error code into
+ VMCS
+ - staging: greybus: audio_helper: remove unused and wrong debugfs usage
+ - drm/nouveau/kms/nv140-: Disable interlacing
+ - drm/nouveau: fix a use-after-free in nouveau_gem_prime_import_sg_table()
+ - [x86] drm/i915/gt: Use i915_vm_put on ppgtt_create error paths
+ - [x86] drm/i915/guc: Fix revocation of non-persistent contexts
+ - [x86] drm/i915: Fix watermark calculations for gen12+ RC CCS modifier
+ - [x86] drm/i915: Fix watermark calculations for gen12+ MC CCS modifier
+ - [x86] drm/i915: Fix watermark calculations for gen12+ CCS+CC modifier
+ - [x86] drm/i915: Fix watermark calculations for DG2 CCS modifiers
+ - [x86] drm/i915: Fix watermark calculations for DG2 CCS+CC modifier
+ - [x86] drm/i915: Fix display problems after resume
+ - drm/amd/display: Fix watermark calculation
+ - drm/amd/display: Update PMFW z-state interface for DCN314
+ - drm/amd/display: zeromem mypipe heap struct before using it
+ - drm/amd/display: Validate DSC After Enable All New CRTCs
+ - drm/amd/display: Enable dpia support for dcn314
+ - drm/amd/display: Enable 2 to 1 ODM policy if supported
+ - drm/amd/display: Fix vblank refcount in vrr transition
+ - drm/amd/display: Add HUBP surface flip interrupt handler
+ - drm/amd/display: explicitly disable psr_feature_enable appropriately
+ - drm/amdgpu: Enable VCN PG on GC11_0_1
+ - drm/amdgpu: Enable F32_WPTR_POLL_ENABLE in mqd
+ - smb3: must initialize two ACL struct fields to zero
+ - selinux: use "grep -E" instead of "egrep"
+ - ima: fix blocking of security.ima xattrs of unsupported algorithms
+ - userfaultfd: open userfaultfds with O_RDONLY
+ - acl: return EOPNOTSUPP in posix_acl_fix_xattr_common()
+ - thermal: cpufreq_cooling: Check the policy first in
+ cpufreq_cooling_register()
+ - cpufreq: amd-pstate: Fix initial highest_perf value
+ - erofs: fix order >= MAX_ORDER warning due to crafted negative i_size
+ - erofs: use kill_anon_super() to kill super in fscache mode
+ - ACPI: PCC: Release resources on address space setup failure path
+ - ACPI: PCC: replace wait_for_completion()
+ - ACPI: PCC: Fix Tx acknowledge in the PCC address space handler
+ - objtool: Preserve special st_shndx indexes in elf_update_symbol
+ - nfsd: Fix a memory leak in an error handling path
+ - SUNRPC: Fix svcxdr_init_decode's end-of-buffer calculation
+ - SUNRPC: Fix svcxdr_init_encode's buflen calculation
+ - NFSD: Protect against send buffer overflow in NFSv2 READDIR
+ - NFSD: Fix handling of oversized NFSv4 COMPOUND requests
+ - [x86] paravirt: add extra clobbers with ZERO_CALL_USED_REGS enabled
+ - wifi: rtlwifi: 8192de: correct checking of IQK reload
+ - wifi: ath10k: Set tx credit to one for WCN3990 snoc based devices
+ - wifi: ath10k: add peer map clean up for peer delete in ath10k_sta_state()
+ - bpf: Cleanup check_refcount_ok
+ - bpf: Fix ref_obj_id for dynptr data slices in verifier
+ - leds: lm3601x: Don't use mutex after it was destroyed
+ - tsnep: Fix TSNEP_INFO_TX_TIME register define
+ - net: prestera: cache port state for non-phylink ports too
+ - bpf: Fix reference state management for synchronous callbacks
+ - wifi: mac80211: properly set old_links when removing a link
+ - wifi: cfg80211: get correct AP link chandef
+ - wifi: mac80211: fix use-after-free
+ - wifi: mac80211: mlme: don't add empty EML capabilities
+ - wifi: mac80211_hwsim: fix link change handling
+ - wifi: mac80211: allow bw change during channel switch in mesh
+ - bpftool: Fix a wrong type cast in btf_dumper_int
+ - ice: set tx_tstamps when creating new Tx rings via ethtool
+ - audit: explicitly check audit_context->context enum value
+ - audit: free audit_proctitle only on task exit
+ - esp: choose the correct inner protocol for GSO on inter address family
+ tunnels
+ - spi: mt7621: Fix an error message in mt7621_spi_probe()
+ - [x86] resctrl: Fix to restore to original value when re-enabling hardware
+ prefetch register
+ - xsk: Fix backpressure mechanism on Tx
+ - bpf: Disable preemption when increasing per-cpu map_locked
+ - bpf: Propagate error from htab_lock_bucket() to userspace
+ - wifi: ath11k: Fix incorrect QMI message ID mappings
+ - bpf: Use this_cpu_{inc|dec|inc_return} for bpf_task_storage_busy
+ - bpf: Use this_cpu_{inc_return|dec} for prog->active
+ - Bluetooth: btusb: mediatek: fix WMT failure during runtime suspend
+ - bpf: Only add BTF IDs for socket security hooks when
+ CONFIG_SECURITY_NETWORK is on
+ - wifi: rtw89: pci: fix interrupt stuck after leaving low power mode
+ - wifi: rtw89: pci: correct TX resource checking in low power mode
+ - wifi: rtl8xxxu: tighten bounds checking in rtl8xxxu_read_efuse()
+ - wifi: wfx: prevent underflow in wfx_send_pds()
+ - wifi: rtw88: add missing destroy_workqueue() on error path in
+ rtw_core_init()
+ - wifi: mac80211: mlme: assign link address correctly
+ - spi: qup: add missing clk_disable_unprepare on error in spi_qup_resume()
+ - spi: qup: add missing clk_disable_unprepare on error in
+ spi_qup_pm_resume_runtime()
+ - wifi: rtl8xxxu: Fix skb misuse in TX queue selection
+ - spi: meson-spicc: do not rely on busy flag in pow2 clk ops
+ - bpf: btf: fix truncated last_member_type_id in btf_struct_resolve
+ - wifi: rtl8xxxu: gen2: Fix mistake in path B IQ calibration
+ - wifi: rtl8xxxu: Remove copy-paste leftover in gen2_update_rate_mask
+ - Bluetooth: avoid hci_dev_test_and_set_flag() in mgmt_init_hdev()
+ - wifi: mt76: mt7921e: fix race issue between reset and suspend/resume
+ - wifi: mt76: mt7921s: fix race issue between reset and suspend/resume
+ - wifi: mt76: mt7921u: fix race issue between reset and suspend/resume
+ - wifi: mt76: sdio: fix the deadlock caused by sdio->stat_work
+ - wifi: mt76: sdio: poll sta stat when device transmits data
+ - wifi: mt76: mt7915: fix an uninitialized variable bug
+ - wifi: mt76: mt7921: fix use after free in mt7921_acpi_read()
+ - wifi: mt76: sdio: fix transmitting packet hangs
+ - wifi: mt76: mt7615: add mt7615_mutex_acquire/release in
+ mt7615_sta_set_decap_offload
+ - wifi: mt76: mt7915: fix possible unaligned access in
+ mt7915_mac_add_twt_setup
+ - wifi: mt76: connac: fix possible unaligned access in
+ mt76_connac_mcu_add_nested_tlv
+ - wifi: mt76: mt7921: add mt7921_mutex_acquire at mt7921_[start, stop]_ap
+ - wifi: mt76: mt7921: add mt7921_mutex_acquire at
+ mt7921_sta_set_decap_offload
+ - wifi: mt76: mt7921: fix the firmware version report
+ - wifi: mt76: mt7915: fix mcs value in ht mode
+ - wifi: mt76: fix uninitialized pointer in mt7921_mac_fill_rx
+ - wifi: mt76: mt7915: do not check state before configuring implicit
+ beamform
+ - wifi: mt76: mt7921e: fix rmmod crash in driver reload test
+ - Bluetooth: RFCOMM: Fix possible deadlock on socket shutdown/release
+ - net: fs_enet: Fix wrong check in do_pd_setup
+ - bpf: Ensure correct locking around vulnerable function find_vpid()
+ - libbpf: Fix crash if SEC("freplace") programs don't have attach_prog_fd
+ set
+ - wifi: ath11k: Include STA_KEEPALIVE_ARP_RESPONSE TLV header by default
+ - Bluetooth: hci_{ldisc,serdev}: check percpu_init_rwsem() failure
+ - netfilter: conntrack: fix the gc rescheduling delay
+ - netfilter: conntrack: revisit the gc initial rescheduling bias
+ - bpf, cgroup: Reject prog_attach_flags array when effective query
+ - bpftool: Fix wrong cgroup attach flags being assigned to effective progs
+ - flow_dissector: Do not count vlan tags inside tunnel payload
+ - mwifiex: fix sleep in atomic context bugs caused by dev_coredumpv
+ - wifi: ath11k: fix failed to find the peer with peer_id 0 when disconnected
+ - wifi: ath11k: fix number of VHT beamformee spatial streams
+ - mips: dts: ralink: mt7621: fix external phy on GB-PC2
+ - [x86] microcode/AMD: Track patch allocation size explicitly
+ - wifi: ath11k: fix peer addition/deletion error on sta band migration
+ - [x86] cpu: Include the header of init_ia32_feat_ctl()'s prototype
+ - spi: cadence-quadspi: Fix PM disable depth imbalance in cqspi_probe
+ - spi: dw: Fix PM disable depth imbalance in dw_spi_bt1_probe
+ - spi/omap100k:Fix PM disable depth imbalance in omap1_spi100k_probe
+ - skmsg: Schedule psock work if the cached skb exists on the psock
+ - cw1200: fix incorrect check to determine if no element is found in list
+ - i2c: mlxbf: support lock mechanism
+ - Bluetooth: hci_core: Fix not handling link timeouts propertly
+ - xfrm: Reinject transport-mode packets through workqueue
+ - netfilter: nft_fib: Fix for rpath check with VRF devices
+ - spi: s3c64xx: Fix large transfers with DMA
+ - Bluetooth: Prevent double register of suspend
+ - wifi: rtl8xxxu: gen2: Enable 40 MHz channel width
+ - wifi: rtl8xxxu: Fix AIFS written to REG_EDCA_*_PARAM
+ - vhost/vsock: Use kvmalloc/kvfree for larger packets.
+ - eth: alx: take rtnl_lock on resume
+ - mISDN: fix use-after-free bugs in l1oip timer handlers (CVE-2022-3565)
+ - sctp: handle the error returned from sctp_auth_asoc_init_active_key
+ - tcp: fix tcp_cwnd_validate() to not forget is_cwnd_limited
+ - spi: Ensure that sg_table won't be used after being freed
+ - Bluetooth: hci_sync: Fix not indicating power state
+ - hwmon: (pmbus/mp2888) Fix sensors readouts for MPS Multi-phase mp2888
+ controller
+ - net: rds: don't hold sock lock when cancelling work from
+ rds_tcp_reset_callbacks()
+ - af_unix: Fix memory leaks of the whole sk due to OOB skb. (CVE-2022-3543)
+ - net: prestera: acl: Add check for kmemdup
+ - eth: lan743x: reject extts for non-pci11x1x devices
+ - bnx2x: fix potential memory leak in bnx2x_tpa_stop() (CVE-2022-3542)
+ - eth: sp7021: fix use after free bug in spl2sw_nvmem_get_mac_address
+ (CVE-2022-3541)
+ - net: wwan: iosm: Call mutex_init before locking it
+ - net/ieee802154: reject zero-sized raw_sendmsg()
+ - once: add DO_ONCE_SLOW() for sleepable contexts
+ - net: mvpp2: fix mvpp2 debugfs leak (CVE-2022-3535)
+ - drm: bridge: adv7511: fix CEC power down control register offset
+ - drm: bridge: adv7511: unregister cec i2c device after cec adapter
+ - drm/bridge: Avoid uninitialized variable warning
+ - drm/mipi-dsi: Detach devices when removing the host
+ - drm/vc4: drv: Call component_unbind_all()
+ - drm/bridge: it6505: Power on downstream device in .atomic_enable
+ - video/aperture: Disable and unregister sysfb devices via aperture helpers
+ - drm/virtio: Correct drm_gem_shmem_get_sg_table() error handling
+ - drm/bridge: anx7625: Fix refcount bug in anx7625_parse_dt()
+ - drm/bridge: tc358767: Add of_node_put() when breaking out of loop
+ - drm/bridge: parade-ps8640: Fix regulator supply order
+ - drm/format-helper: Fix test on big endian architectures
+ - drm/dp_mst: fix drm_dp_dpcd_read return value checks
+ - drm:pl111: Add of_node_put() when breaking out of
+ for_each_available_child_of_node()
+ - ASoC: mt6359: fix tests for platform_get_irq() failure
+ - ASoC: amd: acp: add missing platform_device_unregister() in
+ acp_pci_probe()
+ - drm/msm: Make .remove and .shutdown HW shutdown consistent
+ - platform/chrome: fix double-free in chromeos_laptop_prepare()
+ - platform/chrome: fix memory corruption in ioctl
+ - [x86] drm/i915/dg2: Bump up CDCLK for DG2
+ - drm/virtio: Fix same-context optimization
+ - ASoC: soc-pcm.c: call __soc_pcm_close() in soc_pcm_close()
+ - ASoC: tas2764: Allow mono streams
+ - ASoC: tas2764: Drop conflicting set_bias_level power setting
+ - ASoC: tas2764: Fix mute/unmute
+ - platform/x86: msi-laptop: Fix old-ec check for backlight registering
+ - platform/x86: msi-laptop: Fix resource cleanup
+ - drm/panel: use 'select' for Ili9341 panel driver helpers
+ - drm: fix drm_mipi_dbi build errors
+ - platform/chrome: cros_ec_typec: Add bit offset for DP VDO
+ - platform/chrome: cros_ec_typec: Correct alt mode index
+ - drm/amdgpu: add missing pci_disable_device() in
+ amdgpu_pmops_runtime_resume()
+ - drm/bridge: megachips: Fix a null pointer dereference bug
+ - drm/bridge: it6505: Fix the order of DP_SET_POWER commands
+ - ASoC: rsnd: Add check for rsnd_mod_power_on
+ - ASoC: wm_adsp: Handle optional legacy support
+ - ALSA: hda: beep: Simplify keep-power-at-enable behavior
+ - drm/virtio: set fb_modifiers_not_supported
+ - drm/bochs: fix blanking
+ - ASoC: mediatek: mt8195-mt6359: Properly register sound card for SOF
+ - ASoC: SOF: mediatek: mt8195: Import namespace SND_SOC_SOF_MTK_COMMON
+ - drm/omap: dss: Fix refcount leak bugs
+ - drm/amdgpu: Fix memory leak in hpd_rx_irq_create_workqueue()
+ - ASoC: rockchip: i2s: use regmap_read_poll_timeout to poll I2S_CLR
+ - mmc: au1xmmc: Fix an error handling path in au1xmmc_probe()
+ - ASoC: eureka-tlv320: Hold reference returned from of_find_xxx API
+ - drm/msm: lookup the ICC paths in both mdp5/dpu and mdss devices
+ - drm/msm/dpu: index dpu_kms->hw_vbif using vbif_idx
+ - drm/msm/dp: correct 1.62G link rate at dp_catalog_ctrl_config_msa()
+ - ALSA: hda/hdmi: change type for the 'assigned' variable
+ - ALSA: hda/hdmi: Fix the converter allocation for the silent stream
+ - ALSA: usb-audio: Properly refcounting clock rate
+ - ASoC: SOF: ipc4-topology: Free the ida when IPC fails in
+ sof_ipc4_widget_setup()
+ - drm/vmwgfx: Fix memory leak in vmw_mksstat_add_ioctl()
+ - virtio-gpu: fix shift wrapping bug in virtio_gpu_fence_event_create()
+ - ASoC: codecs: tx-macro: fix kcontrol put
+ - ASoC: da7219: Fix an error handling path in da7219_register_dai_clks()
+ - ALSA: dmaengine: increment buffer pointer atomically
+ - mmc: wmt-sdmmc: Fix an error handling path in wmt_mci_probe()
+ - ASoC: stm32: dfsdm: Fix PM disable depth imbalance in stm32_adfsdm_probe
+ - ASoC: stm32: spdifrx: Fix PM disable depth imbalance in
+ stm32_spdifrx_probe
+ - ASoC: stm: Fix PM disable depth imbalance in stm32_i2s_probe
+ - ASoC: wcd-mbhc-v2: Revert "ASoC: wcd-mbhc-v2: use
+ pm_runtime_resume_and_get()"
+ - ASoC: wm8997: Fix PM disable depth imbalance in wm8997_probe
+ - ASoC: wm5110: Fix PM disable depth imbalance in wm5110_probe
+ - ASoC: wm5102: Fix PM disable depth imbalance in wm5102_probe
+ - ASoC: mt6660: Fix PM disable depth imbalance in mt6660_i2c_probe
+ - ASoC: rockchip: i2s: use regmap_read_poll_timeout_atomic to poll I2S_CLR
+ - ALSA: hda/hdmi: Don't skip notification handling during PM operation
+ - memory: pl353-smc: Fix refcount leak bug in pl353_smc_probe()
+ - memory: of: Fix refcount leak bug in of_get_ddr_timings()
+ - memory: of: Fix refcount leak bug in of_lpddr3_get_ddr_timings()
+ - locks: fix TOCTOU race when granting write lease
+ - soc: qcom: smsm: Fix refcount leak bugs in qcom_smsm_probe()
+ - soc: qcom: smem_state: Add refcounting for the 'state->of_node'
+ - ARM: dts: imx6qdl-kontron-samx6i: hook up DDC i2c bus
+ - [arm64] dts: renesas: r9a07g044: Fix SCI{Rx,Tx} interrupt types
+ - [arm64] dts: renesas: r9a07g054: Fix SCI{Rx,Tx} interrupt types
+ - [arm64] dts: renesas: r9a07g043: Fix SCI{Rx,Tx} interrupt types
+ - dt-bindings: clock: exynosautov9: correct clock numbering of peric0/c1
+ - [arm64] dts: qcom: sdm845-xiaomi-polaris: Fix sde_dsi_active pinctrl
+ - [arm64] dts: qcom: sc7280: Cleanup the lpasscc node
+ - [arm64] dts: qcom: sc7280: Update lpasscore node
+ - [arm64] dts: qcom: sc8280xp-crd: disallow regulator mode switches
+ - [arm64] dts: qcom: sc8280xp-lenovo-thinkpad-x13s: disallow regulator mode
+ switches
+ - [arm64] dts: qcom: sa8295p-adp: disallow regulator mode switches
+ - [arm64] dts: qcom: pm8350c: Drop PWM reg declaration
+ - [arm64] dts: qcom: sc7180-trogdor: Keep pm6150_adc enabled for TZ
+ - [arm64] dts: marvell: 98dx25xx: use correct property for i2c gpios
+ - [arm64] dts: qcom: sm8350-sagami: correct TS pin property
+ - soc/tegra: fuse: Add missing of_node_put() in tegra_init_fuse()
+ - soc/tegra: fuse: Drop Kconfig dependency on TEGRA20_APB_DMA
+ - [arm64] dts: qcom: ipq8074: fix PCIe PHY serdes size
+ - [arm64] dts: qcom: sm8450: fix UFS PHY serdes size
+ - [arm64] dts: ti: k3-j7200: fix main pinmux range
+ - ext4: continue to expand file system when the target size doesn't reach
+ - ext4: don't run ext4lazyinit for read-only filesystems
+ - [arm64] ftrace: fix module PLTs with mcount
+ - [arm64] dts: exynos: fix polarity of "enable" line of NFC chip in TM2
+ - ARM: dts: exynos: fix polarity of VBUS GPIO of Origen
+ - iomap: iomap: fix memory corruption when recording errors during writeback
+ - iio: adc: at91-sama5d2_adc: fix AT91_SAMA5D2_MR_TRACKTIM_MAX
+ - iio: adc: at91-sama5d2_adc: check return status for pressure and touch
+ - iio: adc: at91-sama5d2_adc: lock around oversampling and sample freq
+ - iio: adc: at91-sama5d2_adc: disable/prepare buffer on suspend/resume
+ - iio: inkern: only release the device node when done with it
+ - iio: inkern: fix return value in devm_of_iio_channel_get_by_name()
+ - iio: ABI: Fix wrong format of differential capacitance channel ABI.
+ - iio: magnetometer: yas530: Change data type of hard_offsets to signed
+ - RDMA/mlx5: Don't compare mkey tags in DEVX indirect mkey
+ - usb: common: usb-conn-gpio: Simplify some error message
+ - usb: common: debug: Check non-standard control requests
+ - clk: meson: Hold reference returned by of_get_parent()
+ - clk: st: Hold reference returned by of_get_parent()
+ - clk: oxnas: Hold reference returned by of_get_parent()
+ - clk: qoriq: Hold reference returned by of_get_parent()
+ - clk: berlin: Add of_node_put() for of_get_parent()
+ - clk: sprd: Hold reference returned by of_get_parent()
+ - coresight: docs: Fix a broken reference
+ - clk: tegra: Fix refcount leak in tegra210_clock_init
+ - clk: tegra: Fix refcount leak in tegra114_clock_init
+ - clk: tegra20: Fix refcount leak in tegra20_clock_init
+ - clk: samsung: exynosautov9: correct register offsets of peric0/c1
+ - HID: uclogic: Add missing suffix for digitalizers
+ - HID: uclogic: Fix warning in uclogic_rdesc_template_apply
+ - HSI: omap_ssi: Fix refcount leak in ssi_probe
+ - HSI: omap_ssi_port: Fix dma_map_sg error check
+ - clk: qcom: gcc-sdm660: Use floor ops for SDCC1 clock
+ - media: exynos4-is: fimc-is: Add of_node_put() when breaking out of loop
+ - media: airspy: fix memory leak in airspy probe
+ - tty: xilinx_uartps: Check clk_enable return value
+ - tty: xilinx_uartps: Fix the ignore_status
+ - media: mediatek: vcodec: Skip non CBR bitrate mode
+ - media: amphion: insert picture startcode after seek for vc1g format
+ - media: amphion: adjust the encoder's value range of gop size
+ - media: amphion: don't change the colorspace reported by decoder.
+ - media: amphion: fix a bug that vpu core may not resume after suspend
+ - media: meson: vdec: add missing clk_disable_unprepare on error in
+ vdec_hevc_start()
+ - media: uvcvideo: Fix memory leak in uvc_gpio_parse
+ - media: uvcvideo: Use entity get_cur in uvc_ctrl_set
+ - media: xilinx: vipp: Fix refcount leak in xvip_graph_dma_init
+ - RDMA/rxe: Fix "kernel NULL pointer dereference" error
+ - RDMA/rxe: Fix the error caused by qp->sk
+ - clk: mediatek: clk-mt8195-vdo0: Set rate on vdo0_dp_intf0_dp_intf's parent
+ - clk: mediatek: clk-mt8195-vdo1: Reparent and set rate on vdo1_dpintf's
+ parent
+ - clk: mediatek: mt8195-infra_ao: Set pwrmcu clocks as critical
+ - misc: ocxl: fix possible refcount leak in afu_ioctl()
+ - fpga: dfl-pci: Add IDs for Intel N6000, N6001 and C6100 cards
+ - fpga: prevent integer overflow in dfl_feature_ioctl_set_irq()
+ - phy: rockchip-inno-usb2: Return zero after otg sync
+ - dmaengine: idxd: avoid deadlock in process_misc_interrupts()
+ - dmaengine: hisilicon: Disable channels when unregister hisi_dma
+ - dmaengine: hisilicon: Fix CQ head update
+ - dmaengine: hisilicon: Add multi-thread support for a DMA channel
+ - iio: Use per-device lockdep class for mlock
+ - usb: gadget: f_fs: stricter integer overflow checks
+ - dyndbg: fix static_branch manipulation
+ - dyndbg: fix module.dyndbg handling
+ - dyndbg: let query-modname override actual module name
+ - dyndbg: drop EXPORTed dynamic_debug_exec_queries
+ - clk: qcom: sm6115: Select QCOM_GDSC
+ - scsi: lpfc: Fix various issues reported by tools
+ - mtd: devices: docg3: check the return value of devm_ioremap() in the probe
+ - remoteproc: Harden rproc_handle_vdev() against integer overflow
+ - phy: qcom-qmp-usb: disable runtime PM on unbind
+ - phy: amlogic: phy-meson-axg-mipi-pcie-analog: Hold reference returned by
+ of_get_parent()
+ - phy: phy-mtk-tphy: fix the phy type setting issue
+ - mtd: rawnand: intel: Read the chip-select line from the correct OF node
+ - mtd: rawnand: intel: Remove undocumented compatible string
+ - mtd: rawnand: fsl_elbc: Fix none ECC mode
+ - RDMA/irdma: Align AE id codes to correct flush code and event
+ - RDMA/irdma: Validate udata inlen and outlen
+ - RDMA/srp: Fix srp_abort()
+ - RDMA/siw: Always consume all skbuf data in sk_data_ready() upcall.
+ - RDMA/siw: Fix QP destroy to wait for all references dropped.
+ - ata: fix ata_id_sense_reporting_enabled() and ata_id_has_sense_reporting()
+ - ata: fix ata_id_has_devslp()
+ - ata: fix ata_id_has_ncq_autosense()
+ - ata: fix ata_id_has_dipm()
+ - mtd: rawnand: meson: fix bit map use in meson_nfc_ecc_correct()
+ - block: Fix the enum blk_eh_timer_return documentation
+ - eventfd: guard wake_up in eventfd fs calls as well
+ - io_uring/fdinfo: fix sqe dumping for IORING_SETUP_SQE128
+ - md: Replace snprintf with scnprintf
+ - md/raid5: Ensure stripe_fill happens on non-read IO with journal
+ - md/raid5: Remove unnecessary bio_put() in raid5_read_one_chunk()
+ - md: Remove extra mddev_get() in md_seq_start()
+ - RDMA/cm: Use SLID in the work completion as the DLID in responder side
+ - IB: Set IOVA/LENGTH on IB_MR in core/uverbs layers
+ - xhci: Don't show warning for reinit on known broken suspend
+ - usb: gadget: function: fix dangling pnp_string in f_printer.c
+ - usb: typec: anx7411: Use of_get_child_by_name() instead of
+ of_find_node_by_name()
+ - usb: dwc3: core: fix some leaks in probe
+ - drivers: serial: jsm: fix some leaks in probe
+ - serial: 8250: Toggle IER bits on only after irq has been set up
+ - tty: serial: fsl_lpuart: disable dma rx/tx use flags in
+ lpuart_dma_shutdown
+ - phy: qualcomm: call clk_disable_unprepare in the error handling
+ - staging: vt6655: fix some erroneous memory clean-up loops
+ - slimbus: qcom-ngd: Add error handling in of_qcom_slim_ngd_register
+ - firmware: google: Test spinlock on panic path to avoid lockups
+ - serial: 8250: Fix restoring termios speed after suspend
+ - scsi: libsas: Fix use-after-free bug in smp_execute_task_sg()
+ - scsi: pm8001: Fix running_req for internal abort commands
+ - scsi: iscsi: iscsi_tcp: Fix null-ptr-deref while calling getpeername()
+ - clk: qcom: apss-ipq6018: mark apcs_alias0_core_clk as critical
+ - clk: qcom: gcc-sm6115: Override default Alpha PLL regs
+ - nvmet-auth: don't try to cancel a non-initialized work_struct
+ - RDMA/rxe: Set pd early in mr alloc routines
+ - RDMA/rxe: Fix resize_finish() in rxe_queue.c
+ - fsi: core: Check error number after calling ida_simple_get
+ - mfd: intel_soc_pmic: Fix an error handling path in
+ intel_soc_pmic_i2c_probe()
+ - mfd: fsl-imx25: Fix an error handling path in mx25_tsadc_setup_irq()
+ - mfd: lp8788: Fix an error handling path in lp8788_probe()
+ - mfd: lp8788: Fix an error handling path in lp8788_irq_init() and
+ lp8788_irq_init()
+ - mfd: fsl-imx25: Fix check for platform_get_irq() errors
+ - mfd: sm501: Add check for platform_driver_register()
+ - mfd: da9061: Fix Failed to set Two-Wire Bus Mode.
+ - clk: mediatek: mt8183: mfgcfg: Propagate rate changes to parent
+ - clk: mediatek: clk-mt8195-mfg: Reparent mfg_bg3d and propagate rate
+ changes
+ - clk: mediatek: fix unregister function in mtk_clk_register_dividers
+ cleanup
+ - clk: mediatek: Migrate remaining clk_unregister_*() to
+ clk_hw_unregister_*()
+ - io_uring/rw: defer fsnotify calls to task context
+ - dmaengine: ioat: stop mod_timer from resurrecting deleted timer in
+ __cleanup()
+ - HID: amd_sfh: Handle condition of "no sensors" for SFH1.1
+ - usb: mtu3: fix failed runtime suspend in host only mode
+ - spmi: pmic-arb: correct duplicate APID to PPID mapping logic
+ - clk: vc5: Fix 5P49V6901 outputs disabling when enabling FOD
+ - clk: baikal-t1: Fix invalid xGMAC PTP clock divider
+ - clk: baikal-t1: Add shared xGMAC ref/ptp clocks internal parent
+ - clk: baikal-t1: Add SATA internal ref clock buffer
+ - clk: bcm2835: Make peripheral PLLC critical
+ - clk: bcm2835: fix bcm2835_clock_rate_from_divisor declaration
+ - clk: imx8mp: tune the order of enet_qos_root_clk
+ - clk: imx: scu: fix memleak on platform_device_add() fails
+ - clk: ti: Balance of_node_get() calls for of_find_node_by_name()
+ - clk: ti: dra7-atl: Fix reference leak in of_dra7_atl_clk_probe
+ - clk: ast2600: BCLK comes from EPLL
+ - ipc: mqueue: fix possible memory leak in init_mqueue_fs()
+ - powerpc/configs: Properly enable PAPR_SCM in pseries_defconfig
+ - powerpc/math_emu/efp: Include module.h
+ - powerpc/sysdev/fsl_msi: Add missing of_node_put()
+ - powerpc/pci_dn: Add missing of_node_put()
+ - powerpc/powernv: add missing of_node_put() in opal_export_attrs()
+ - cpuidle: riscv-sbi: Fix CPU_PM_CPU_IDLE_ENTER_xyz() macro usage
+ - powerpc: dts: turris1x.dts: Fix NOR partitions labels
+ - powerpc: dts: turris1x.dts: Fix labels in DSA cpu port nodes
+ - powerpc: Fix fallocate and fadvise64_64 compat parameter combination
+ - x86/hyperv: Fix 'struct hv_enlightened_vmcs' definition
+ - powerpc/64s: Fix GENERIC_CPU build flags for PPC970 / G5
+ - powerpc/64/interrupt: Fix false warning in context tracking due to idle
+ state
+ - powerpc/64: mark irqs hard disabled in boot paca
+ - powerpc/64/interrupt: Fix return to masked context after hard-mask irq
+ becomes pending
+ - powerpc: Fix SPE Power ISA properties for e500v1 platforms
+ - powerpc/kprobes: Fix null pointer reference in arch_prepare_kprobe()
+ - powerpc/pseries/vas: Pass hw_cpu_id to node associativity HCALL
+ - crypto: sahara - don't sleep when in softirq
+ - crypto: hisilicon/zip - fix mismatch in get/set sgl_sge_nr
+ - hwrng: arm-smccc-trng - fix NO_ENTROPY handling
+ - crypto: ccp - Fail the PSP initialization when writing psp data file
+ failed
+ - cgroup: Honor caller's cgroup NS when resolving path
+ - hwrng: imx-rngc - use devm_clk_get_enabled
+ - hwrng: imx-rngc - Moving IRQ handler registering after
+ imx_rngc_irq_mask_clear()
+ - crypto: qat - fix default value of WDT timer
+ - crypto: hisilicon/qm - fix missing put dfx access
+ - cgroup/cpuset: Enable update_tasks_cpumask() on top_cpuset
+ - iommu/omap: Fix buffer overflow in debugfs
+ - crypto: akcipher - default implementation for setting a private key
+ - crypto: ccp - Release dma channels before dmaengine unrgister
+ - crypto: inside-secure - Change swab to swab32
+ - crypto: qat - fix DMA transfer direction
+ - clocksource/drivers/arm_arch_timer: Fix handling of ARM erratum 858921
+ - clocksource/drivers/timer-gxp: Add missing error handling in
+ gxp_timer_probe
+ - cifs: return correct error in ->calc_signature()
+ - iommu/iova: Fix module config properly
+ - tracing: kprobe: Fix kprobe event gen test module on exit
+ - tracing: kprobe: Make gen test module work in arm and riscv
+ - tracing/osnoise: Fix possible recursive locking in stop_per_cpu_kthreads
+ - ftrace: Fix recursive locking direct_mutex in ftrace_modify_direct_caller
+ - kbuild: remove the target in signal traps when interrupted
+ - linux/export: use inline assembler to populate symbol CRCs
+ - kbuild: rpm-pkg: fix breakage when V=1 is used
+ - crypto: marvell/octeontx - prevent integer overflows
+ - crypto: cavium - prevent integer overflow loading firmware
+ - random: schedule jitter credit for next jiffy, not in two jiffies
+ - thermal/drivers/qcom/tsens-v0_1: Fix MSM8939 fourth sensor hw_id
+ - ACPI: APEI: do not add task_work to kernel thread to avoid memory leak
+ - f2fs: fix race condition on setting FI_NO_EXTENT flag
+ - f2fs: fix to account FS_CP_DATA_IO correctly
+ - tools/power turbostat: Use standard Energy Unit for SPR Dram RAPL domain
+ - selftest: tpm2: Add Client.__del__() to close /dev/tpm* handle
+ - ARM/dma-mapping: don't override ->dma_coherent when set from a bus
+ notifier
+ - module: tracking: Keep a record of tainted unloaded modules only
+ - fs: dlm: fix race in lowcomms
+ - rcu: Avoid triggering strict-GP irq-work when RCU is idle
+ - rcu: Back off upon fill_page_cache_func() allocation failure
+ - rcu-tasks: Convert RCU_LOCKDEP_WARN() to WARN_ONCE()
+ - rcu-tasks: Ensure RCU Tasks Trace loops have quiescent states
+ - cpufreq: amd_pstate: fix wrong lowest perf fetch
+ - ACPI: video: Add Toshiba Satellite/Portege Z830 quirk
+ - fortify: Fix __compiletime_strlen() under UBSAN_BOUNDS_LOCAL
+ - ACPI: tables: FPDT: Don't call acpi_os_map_memory() on invalid phys
+ address
+ - cpufreq: intel_pstate: Add Tigerlake support in no-HWP mode
+ - MIPS: BCM47XX: Cast memcmp() of function to (void *)
+ - powercap: intel_rapl: fix UBSAN shift-out-of-bounds issue
+ - thermal: intel_powerclamp: Use get_cpu() instead of smp_processor_id() to
+ avoid crash
+ - ARM: decompressor: Include .data.rel.ro.local
+ - ACPI: x86: Add a quirk for Dell Inspiron 14 2-in-1 for StorageD3Enable
+ - NFSD: Return nfserr_serverfault if splice_ok but buf->pages have data
+ - NFSD: fix use-after-free on source server when doing inter-server copy
+ - wifi: brcmfmac: fix invalid address access when enabling SCAN log level
+ - bpftool: Clear errno after libcap's checks
+ - net: ethernet: ti: davinci_mdio: Add workaround for errata i2329
+ - openvswitch: Fix double reporting of drops in dropwatch
+ - openvswitch: Fix overreporting of drops in dropwatch
+ - tcp: annotate data-race around tcp_md5sig_pool_populated
+ - micrel: ksz8851: fixes struct pointer issue
+ - wifi: mac80211: accept STA changes without link changes
+ - [x86] mce: Retrieve poison range from hardware
+ - wifi: ath9k: avoid uninit memory read in ath9k_htc_rx_msg()
+ - thunderbolt: Add back Intel Falcon Ridge end-to-end flow control
+ workaround
+ - [x86] apic: Don't disable x2APIC if locked
+ - net: axienet: Switch to 64-bit RX/TX statistics
+ - net-next: Fix IP_UNICAST_IF option behavior for connected sockets
+ - xfrm: Update ipcomp_scratches with NULL when freed
+ - wifi: ath11k: Register shutdown handler for WCN6750
+ - rtw89: ser: leave lps with mutex
+ - net: ftmac100: fix endianness-related issues from 'sparse'
+ - iavf: Fix race between iavf_close and iavf_reset_task
+ - wifi: brcmfmac: fix use-after-free bug in brcmf_netdev_start_xmit()
+ - Bluetooth: btintel: Mark Intel controller to support LE_STATES quirk
+ - regulator: core: Prevent integer underflow
+ - wifi: ath11k: mhi: fix potential memory leak in ath11k_mhi_register()
+ - wifi: mt76: mt7921: reset msta->airtime_ac while clearing up hw value
+ - wifi: rtw89: free unused skb to prevent memory leak
+ - wifi: rtw89: fix rx filter after scan
+ - Bluetooth: L2CAP: initialize delayed works at l2cap_chan_create()
+ - Bluetooth: hci_sysfs: Fix attempting to call device_add multiple times
+ - Bluetooth: hci_event: Make sure ISO events don't affect non-ISO
+ connections
+ - bnxt_en: replace reset with config timestamps
+ - selftests/bpf: Free the allocated resources after test case succeeds
+ - can: bcm: check the result of can_send() in bcm_can_tx()
+ - wifi: rt2x00: don't run Rt5592 IQ calibration on MT7620
+ - wifi: rt2x00: set correct TX_SW_CFG1 MAC register for MT7620
+ - wifi: rt2x00: set VGC gain for both chains of MT7620
+ - wifi: rt2x00: set SoC wmac clock register
+ - wifi: rt2x00: correctly set BBP register 86 for MT7620
+ - hwmon: (sht4x) do not overflow clamping operation on 32-bit platforms
+ - net: If sock is dead don't access sock's sk_wq in sk_stream_wait_memory
+ - bpf: Adjust kprobe_multi entry_ip for CONFIG_X86_KERNEL_IBT
+ - bpf: use bpf_prog_pack for bpf_dispatcher
+ - Bluetooth: L2CAP: Fix user-after-free
+ - net: sched: cls_u32: Avoid memcpy() false-positive warning
+ - libbpf: Fix overrun in netlink attribute iteration
+ - i2c: designware-pci: Group AMD NAVI quirk parts together
+ - r8152: Rate limit overflow messages (CVE-2022-3594)
+ - drm/nouveau/nouveau_bo: fix potential memory leak in nouveau_bo_alloc()
+ - drm: Use size_t type for len variable in drm_copy_field()
+ - drm: Prevent drm_copy_field() to attempt copying a NULL pointer
+ - drm/komeda: Fix handling of atomic commits in the atomic_commit_tail hook
+ - gpu: lontium-lt9611: Fix NULL pointer dereference in
+ lt9611_connector_init()
+ - drm/amd/display: fix overflow on MIN_I64 definition
+ - ALSA: hda: Fix page fault in snd_hda_codec_shutdown()
+ - ALSA: usb-audio: Add quirk to enable Avid Mbox 3 support
+ - udmabuf: Set ubuf->sg = NULL if the creation of sg table fails
+ - platform/x86: pmc_atom: Improve quirk message to be less cryptic
+ - drm/amd: fix potential memory leak
+ - drm: bridge: dw_hdmi: only trigger hotplug event on link change
+ - drm/amd/display: Fix variable dereferenced before check
+ - drm/amdgpu: Skip the program of MMMC_VM_AGP_* in SRIOV on MMHUB v3_0_0
+ - drm/admgpu: Skip CG/PG on SOC21 under SRIOV VF
+ - ALSA: usb-audio: Register card at the last interface
+ - drm/vc4: vec: Fix timings for VEC modes
+ - drm: panel-orientation-quirks: Add quirk for Anbernic Win600
+ - drm: panel-orientation-quirks: Add quirk for Aya Neo Air
+ - platform/chrome: cros_ec: Notify the PM of wake events during resume
+ - platform/x86: hp-wmi: Setting thermal profile fails with 0x06
+ - platform/x86: msi-laptop: Change DMI match / alias strings to fix module
+ autoloading
+ - ALSA: intel-dspconfig: add ES8336 support for AlderLake-PS
+ - ASoC: SOF: pci: Change DMI match info to support all Chrome platforms
+ - ASoC: sunxi: sun4i-codec: set debugfs_prefix for CPU DAI component
+ - ASoC: SOF: add quirk to override topology mclk_id
+ - drm/amdgpu: SDMA update use unlocked iterator
+ - drm/amd/display: Fix urgent latency override for DCN32/DCN321
+ - drm/amd/display: correct hostvm flag
+ - drm/amdgpu: fix initial connector audio value
+ - ASoC: amd: yc: Add ASUS UM5302TA into DMI table
+ - ASoC: amd: yc: Add Lenovo Yoga Slim 7 Pro X to quirks table
+ - drm/meson: reorder driver deinit sequence to fix use-after-free bug
+ - drm/meson: explicitly remove aggregate driver at module unload time
+ - drm/meson: remove drm bridges at aggregate driver unbind time
+ - mmc: sdhci-msm: add compatible string check for sdm670
+ - drm/dp: Don't rewrite link config when setting phy test pattern
+ - drm/amd/display: Remove interface for periodic interrupt 1
+ - drm/amd/display: polling vid stream status in hpo dp blank
+ - drm/amdkfd: Fix UBSAN shift-out-of-bounds warning
+ - ARM: dts: imx6: delete interrupts property if interrupts-extended is set
+ - ARM: dts: imx7d-sdb: config the max pressure for tsc2046
+ - [arm64] dts: qcom: sc7280-idp: correct ADC channel node name and unit
+ address
+ - ARM: dts: imx6q: add missing properties for sram
+ - ARM: dts: imx6dl: add missing properties for sram
+ - ARM: dts: imx6qp: add missing properties for sram
+ - ARM: dts: imx6sl: add missing properties for sram
+ - ARM: dts: imx6sll: add missing properties for sram
+ - ARM: dts: imx6sx: add missing properties for sram
+ - ARM: dts: imx6sl: use tabs for code indent
+ - ARM: dts: imx6sx-udoo-neo: don't use multiple blank lines
+ - [arm64] dts: imx8mm-kontron: Use the VSELECT signal to switch SD card IO
+ voltage
+ - [arm64] dts: imx8mq-librem5: Add bq25895 as max17055's power supply
+ - ARM: orion: fix include path
+ - btrfs: dump extra info if one free space cache has more bitmaps than it
+ should
+ - btrfs: scrub: properly report super block errors in system log
+ - btrfs: scrub: try to fix super block errors
+ - btrfs: don't print information about space cache or tree every remount
+ - btrfs: call __btrfs_remove_free_space_cache_locked on cache load failure
+ - ARM: 9233/1: stacktrace: Skip frame pointer boundary check for
+ call_with_stack()
+ - ARM: 9234/1: stacktrace: Avoid duplicate saving of exception PC value
+ - ARM: 9242/1: kasan: Only map modules if CONFIG_KASAN_VMALLOC=n
+ - clk: zynqmp: Fix stack-out-of-bounds in strncpy`
+ - media: cx88: Fix a null-ptr-deref bug in buffer_prepare()
+ - media: platform: fix some double free in meson-ge2d and mtk-jpeg and
+ s5p-mfc
+ - clk: zynqmp: pll: rectify rate rounding in zynqmp_pll_round_rate
+ - RDMA/rxe: Delete error messages triggered by incoming Read requests
+ - usb: host: xhci-plat: suspend and resume clocks
+ - usb: host: xhci-plat: suspend/resume clks for brcm
+ - scsi: lpfc: Fix null ndlp ptr dereference in abnormal exit path for GFT_ID
+ - dmaengine: ti: k3-udma: Reset UDMA_CHAN_RT byte counters to prevent
+ overflow
+ - scsi: 3w-9xxx: Avoid disabling device if failing to enable it
+ - nbd: Fix hung when signal interrupts nbd_start_device_ioctl()
+ - iommu/arm-smmu-v3: Make default domain type of HiSilicon PTT device to
+ identity
+ - usb: gadget: uvc: increase worker prio to WQ_HIGHPRI
+ - power: supply: adp5061: fix out-of-bounds read in adp5061_get_chg_type()
+ - staging: vt6655: fix potential memory leak
+ - blk-throttle: prevent overflow while calculating wait time
+ - ata: libahci_platform: Sanity check the DT child nodes number
+ - bcache: fix set_at_max_writeback_rate() for multiple attached devices
+ - soundwire: cadence: Don't overwrite msg->buf during write commands
+ - soundwire: intel: fix error handling on dai registration issues
+ - hid: topre: Add driver fixing report descriptor
+ - HID: roccat: Fix use-after-free in roccat_read()
+ - HSI: ssi_protocol: fix potential resource leak in ssip_pn_open()
+ - HID: nintendo: check analog user calibration for plausibility
+ - md/raid5: Wait for MD_SB_CHANGE_PENDING in raid5d
+ - usb: host: xhci: Fix potential memory leak in xhci_alloc_stream_info()
+ - usb: musb: Fix musb_gadget.c rxstate overflow bug
+ - usb: dwc3: core: add gfladj_refclk_lpm_sel quirk
+ - [arm64] dts: imx8mp: Add snps,gfladj-refclk-lpm-sel quirk to USB nodes
+ - usb: dwc3: core: Enable GUCTL1 bit 10 for fixing termination error after
+ resume bug
+ - Revert "usb: storage: Add quirk for Samsung Fit flash"
+ - io_uring: fix CQE reordering
+ - staging: rtl8723bs: fix potential memory leak in rtw_init_drv_sw()
+ - staging: rtl8723bs: fix a potential memory leak in rtw_init_cmd_priv()
+ - scsi: tracing: Fix compile error in trace_array calls when TRACING is
+ disabled
+ - ext2: Use kvmalloc() for group descriptor array
+ - nvme: handle effects after freeing the request
+ - nvme: copy firmware_rev on each init
+ - nvmet-tcp: add bounds check on Transfer Tag
+ - usb: idmouse: fix an uninit-value in idmouse_open
+ - blk-mq: use quiesced elevator switch when reinitializing queues
+ - hwmon (occ): Retry for checksum failure
+ - fsi: occ: Prevent use after free
+ - fsi: master-ast-cf: Fix missing of_node_put in fsi_master_acf_probe
+ - dmaengine: dw-edma: Remove runtime PM support
+ - usb: typec: ucsi: Don't warn on probe deferral
+ - clk: bcm2835: Round UART input clock up
+ - perf: Skip and warn on unknown format 'configN' attrs
+ - perf intel-pt: Fix segfault in intel_pt_print_info() with uClibc
+ - perf intel-pt: Fix system_wide dummy event for hybrid
+ - io_uring/net: refactor io_sr_msg types
+ - io_uring/net: use io_sr_msg for sendzc
+ - io_uring/net: don't lose partial send_zc on fail
+ - io_uring/net: rename io_sendzc()
+ - io_uring/net: don't skip notifs for failed requests
+ - io_uring/net: fix notif cqe reordering
+ - mm: hugetlb: fix UAF in hugetlb_handle_userfault
+ - net: ieee802154: return -EINVAL for unknown addr type
+ - ALSA: usb-audio: Fix last interface check for registration
+ - blk-wbt: fix that 'rwb->wc' is always set to 1 in wbt_init()
+ - net: ethernet: ti: davinci_mdio: fix build for mdio bitbang uses
+ - Revert "drm/amd/display: correct hostvm flag"
+ - Revert "net/ieee802154: reject zero-sized raw_sendmsg()"
+ - net/ieee802154: don't warn zero-sized raw_sendmsg()
+ - powerpc/64s/interrupt: Fix lost interrupts when returning to soft-masked
+ context
+ - drm/amd/display: Fix build breakage with CONFIG_DEBUG_FS=n
+ - io_uring: fix fdinfo sqe offsets calculation
+ - io_uring/rw: ensure kiocb_end_write() is always called
+ - [arm64] dts: qcom: sc8280xp-pmics: Remove reg entry & use correct node
+ name for pmc8280c_lpg node
+
+ [ Zhang Ning ]
+ * [arm64] disable CONFIG_ARM_CPUIDLE, it's arm only
+
+ [ Salvatore Bonaccorso ]
+ * Bump ABI to 2
+ * [rt] Refresh "serial: 8250: implement write_atomic"
+
+ -- Salvatore Bonaccorso <carnil@debian.org> Fri, 21 Oct 2022 21:05:40 +0200
+
+linux (6.0.2-1) unstable; urgency=high
+
+ * New upstream stable update:
+ https://www.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.0.1
+ - xsk: Inherit need_wakeup flag for shared sockets
+ - fs: fix UAF/GPF bug in nilfs_mdt_destroy
+ - fix coredump breakage
+ - sparc: Unbreak the build
+ - Makefile.extrawarn: Move -Wcast-function-type-strict to W=1
+ - hardening: Remove Clang's enable flag for -ftrivial-auto-var-init=zero
+ - docs: update mediator information in CoC docs
+ - hwmon: (aquacomputer_d5next) Fix Quadro fan speed offsets
+ - usb: mon: make mmapped memory read only
+ - USB: serial: ftdi_sio: fix 300 bps rate for SIO
+ - gpiolib: acpi: Add support to ignore programming an interrupt
+ - gpiolib: acpi: Add a quirk for Asus UM325UAZ
+ - RISC-V: Print SSTC in canonical order
+ - bpf: Gate dynptr API behind CAP_BPF
+ - net: ethernet: mtk_eth_soc: fix state in __mtk_foe_entry_clear
+ - bpf: Fix resetting logic for unreferenced kptrs
+ - Bluetooth: use hdev->workqueue when queuing hdev->{cmd,ncmd}_timer works
+ https://www.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.0.2
+ - nilfs2: fix NULL pointer dereference at nilfs_bmap_lookup_at_level()
+ - nilfs2: fix use-after-free bug of struct nilfs_root
+ - nilfs2: fix leak of nilfs_root in case of writer thread creation failure
+ - nilfs2: replace WARN_ONs by nilfs_error for checkpoint acquisition failure
+ - nvme-pci: set min_align_mask before calculating max_hw_sectors
+ - random: restore O_NONBLOCK support
+ - random: clamp credited irq bits to maximum mixed
+ - ALSA: hda: Fix position reporting on Poulsbo
+ - ALSA: hda/realtek: Add quirk for HP Zbook Firefly 14 G9 model
+ - efi: Correct Macmini DMI match in uefi cert quirk
+ - scsi: qla2xxx: Revert "scsi: qla2xxx: Fix response queue handler reading stale packets"
+ - scsi: qla2xxx: Fix response queue handler reading stale packets
+ - scsi: stex: Properly zero out the passthrough command structure
+ - USB: serial: qcserial: add new usb-id for Dell branded EM7455
+ - Revert "USB: fixup for merge issue with "usb: dwc3: Don't switch OTG -> peripheral if extcon is present""
+ - Revert "usb: dwc3: Don't switch OTG -> peripheral if extcon is present"
+ - Revert "powerpc/rtas: Implement reentrant rtas call"
+ - Revert "crypto: qat - reduce size of mapped region"
+ - random: avoid reading two cache lines on irq randomness
+ - random: use expired timer rather than wq for mixing fast pool
+ - wifi: cfg80211: fix u8 overflow in cfg80211_update_notlisted_nontrans()
+ CVE-2022-41674
+ - wifi: cfg80211/mac80211: reject bad MBSSID elements
+ - wifi: mac80211: fix MBSSID parsing use-after-free
+ CVE-2022-42719
+ - wifi: cfg80211: ensure length byte is present before access
+ - wifi: cfg80211: fix BSS refcounting bugs
+ CVE-2022-42720
+ - wifi: cfg80211: avoid nontransmitted BSS list corruption
+ CVE-2022-42721
+ - wifi: mac80211_hwsim: avoid mac80211 warning on bad rate
+ - wifi: mac80211: fix crash in beacon protection for P2P-device
+ CVE-2022-42722
+ - wifi: cfg80211: update hidden BSSes to avoid WARN_ON
+ - mctp: prevent double key removal and unref
+ - Input: xpad - add supported devices as contributed on github
+ - Input: xpad - fix wireless 360 controller breaking after suspend
+ - misc: pci_endpoint_test: Aggregate params checking for xfer
+ - misc: pci_endpoint_test: Fix pci_endpoint_test_{copy,write,read}() panic
+
+ [ Bastian Blank]
+ * [cloud] Enable INTEGRITY.
+
+ -- Bastian Blank <waldi@debian.org> Sun, 16 Oct 2022 18:25:05 +0200
+
+linux (6.0-1~exp1) experimental; urgency=medium
+
+ * New upstream release: https://kernelnewbies.org/Linux_6.0
+
+ [ Salvatore Bonaccorso ]
+ * drivers/hwmon: Enable SENSORS_SHT3x and SENSORS_SHT4x as module
+ (Closes: #1016092)
+ * [rt] Update to 6.0-rt11
+
+ [ Diederik de Haas ]
+ * [amd64] drivers/dma: Enable INTEL_IDXD as module and INTEL_IDXD_SVM as
+ builtin (Closes: #1021337)
+
+ [ Ben Hutchings ]
+ * d/salsa-ci.yml: Use !reference to include scripts from common pipeline
+ * d/salsa-ci.yml: Remove obsolete lintian error suppressions
+
+ [ Christopher Obbard ]
+ * [arm64] drivers/regulator: Enable MP8859 as module
+
+ [ Mateusz Łukasik ]
+ * Compile with gcc-12 on all architectures
+ * d/salsa-ci.yml: Add linux-compiler-* packages to build-signed job artifacts
+
+ -- Salvatore Bonaccorso <carnil@debian.org> Sun, 09 Oct 2022 17:11:55 +0200
+
+linux (6.0~rc7-1~exp1) experimental; urgency=medium
+
+ * New upstream release candidate
+
+ [ Ben Hutchings ]
+ * Rewrite "tools/perf: pmu-events: Fix reproducibility" for new Python
+ generator
+ * Build-depend on python3-setuptools for linux-perf
+ * udeb: Move ledtrig-audio from sound-modules to kernel-image
+ * d/bin/gencontrol_signed.py: Fix source package name in Built-Using field
+ * [rt] Update to 6.0-rc5-rt7
+
+ [ Didier Raboud ]
+ * d/lib/python/debian_linux: Add two more known fields to
+ {Source,Binary}Package
+
+ [ Diederik de Haas ]
+ * [arm64] drivers/gpu/drm/v3d: Enable DRM_V3D as module (Closes: #977441)
+ * drivers/nfc/nxp-nci: Enable NFC_NXP_NCI and NFC_NXP_NCI_I2C and reenable
+ NFC_NCI as module (Closes: #1020276)
+
+ [ Frieder Schrempf ]
+ * [arm64] Add nvmem-imx-ocotp driver to kernel-image udeb
+ * [arm64] Add imx2_wdt driver to kernel-image udeb
+ * udeb: Also add drivers in subdirectories of drivers/net/phy
+ * [arm64] Add i2c-imx to i2c-modules udeb
+
+ [ Bastian Blank ]
+ * Make cross build of signed packages self contained.
+
+ [ Zhang Ning ]
+ * [armhf] enable multiple configs for rk3288
+ * [config] enable CONFIG_RTL8723BS for all arch
+
+ [ Zhang Boyang ]
+ * [riscv64] Enable AMDGPU
+
+ -- Salvatore Bonaccorso <carnil@debian.org> Tue, 27 Sep 2022 17:39:09 +0200
+
linux (5.19.11-1~bpo11+1) bullseye-backports; urgency=medium
* Rebuild for bullseye-backports:
@@ -25148,4 +26176,3 @@ linux (4.19.37-6) unstable; urgency=high
* [arm64] Backport DTB support for Rasperry Pi Compute Module 3.
-- Salvatore Bonaccorso <carnil@debian.org> Fri, 19 Jul 2019 00:23:17 +0200
-
diff --git a/debian/config/alpha/config b/debian/config/alpha/config
index e7f006e85..4f506667e 100644
--- a/debian/config/alpha/config
+++ b/debian/config/alpha/config
@@ -113,7 +113,6 @@ CONFIG_ATM_HE_USE_SUNI=y
## file: drivers/block/Kconfig
##
CONFIG_BLK_DEV_FD=m
-CONFIG_BLK_DEV_SX8=m
CONFIG_CDROM_PKTCDVD=m
CONFIG_CDROM_PKTCDVD_BUFFERS=8
CONFIG_CDROM_PKTCDVD_WCACHE=y
diff --git a/debian/config/amd64/config b/debian/config/amd64/config
index ece09dbe8..8f8898b9c 100644
--- a/debian/config/amd64/config
+++ b/debian/config/amd64/config
@@ -100,6 +100,12 @@ CONFIG_AGP=y
CONFIG_AGP_AMD64=y
##
+## file: drivers/dma/Kconfig
+##
+CONFIG_INTEL_IDXD=m
+CONFIG_INTEL_IDXD_SVM=y
+
+##
## file: drivers/edac/Kconfig
##
CONFIG_EDAC_SBRIDGE=m
@@ -183,7 +189,7 @@ CONFIG_PCI_HYPERV=y
CONFIG_PINCTRL_AMD=y
##
-## file: drivers/platform/x86/Kconfig
+## file: drivers/platform/x86/amd/Kconfig
##
CONFIG_AMD_PMC=m
diff --git a/debian/config/arm64/config b/debian/config/arm64/config
index 8416e2e17..851073d69 100644
--- a/debian/config/arm64/config
+++ b/debian/config/arm64/config
@@ -244,7 +244,6 @@ CONFIG_ARM_RASPBERRYPI_CPUFREQ=m
##
## file: drivers/cpuidle/Kconfig.arm
##
-CONFIG_ARM_CPUIDLE=y
CONFIG_ARM_PSCI_CPUIDLE=y
##
@@ -504,6 +503,11 @@ CONFIG_DRM_TEGRA=m
CONFIG_DRM_TEGRA_STAGING=y
##
+## file: drivers/gpu/drm/v3d/Kconfig
+##
+CONFIG_DRM_V3D=m
+
+##
## file: drivers/gpu/drm/vc4/Kconfig
##
CONFIG_DRM_VC4=m
@@ -1320,6 +1324,7 @@ CONFIG_REGULATOR_FAN53555=m
CONFIG_REGULATOR_GPIO=m
CONFIG_REGULATOR_HI655X=m
CONFIG_REGULATOR_MAX77620=m
+CONFIG_REGULATOR_MP8859=m
CONFIG_REGULATOR_PCA9450=m
CONFIG_REGULATOR_PFUZE100=m
CONFIG_REGULATOR_PWM=m
@@ -1486,11 +1491,6 @@ CONFIG_VIDEO_SUNXI=y
CONFIG_VIDEO_SUNXI_CEDRUS=m
##
-## file: drivers/staging/rtl8723bs/Kconfig
-##
-CONFIG_RTL8723BS=m
-
-##
## file: drivers/staging/vc04_services/bcm2835-audio/Kconfig
##
CONFIG_SND_BCM2835=m
diff --git a/debian/config/armel/config.marvell b/debian/config/armel/config.marvell
index eb6ad6050..6bfee0ceb 100644
--- a/debian/config/armel/config.marvell
+++ b/debian/config/armel/config.marvell
@@ -544,7 +544,6 @@ CONFIG_RTC_DRV_MV=m
# CONFIG_BLK_DEV_3W_XXXX_RAID is not set
# CONFIG_SCSI_3W_9XXX is not set
# CONFIG_SCSI_AACRAID is not set
-# CONFIG_SCSI_DPT_I2O is not set
# CONFIG_SCSI_ARCMSR is not set
# CONFIG_SCSI_HPTIOP is not set
# CONFIG_SCSI_DMX3191D is not set
@@ -719,7 +718,6 @@ CONFIG_NLS=m
CONFIG_CC_OPTIMIZE_FOR_SIZE=y
## end choice
# CONFIG_PROFILING is not set
-# CONFIG_MODULE_SIG is not set
##
## file: kernel/bpf/Kconfig
@@ -728,6 +726,11 @@ CONFIG_CC_OPTIMIZE_FOR_SIZE=y
# CONFIG_BPF_JIT is not set
##
+## file: kernel/module/Kconfig
+##
+# CONFIG_MODULE_SIG is not set
+
+##
## file: kernel/power/Kconfig
##
# CONFIG_SUSPEND is not set
diff --git a/debian/config/armhf/config b/debian/config/armhf/config
index 4cf3313af..8eb87a98e 100644
--- a/debian/config/armhf/config
+++ b/debian/config/armhf/config
@@ -277,6 +277,7 @@ CONFIG_ARM_EXYNOS_CPUIDLE=y
CONFIG_CRYPTO_DEV_OMAP=m
CONFIG_CRYPTO_DEV_OMAP_SHAM=m
CONFIG_CRYPTO_DEV_OMAP_AES=m
+CONFIG_CRYPTO_DEV_ROCKCHIP=m
##
## file: drivers/crypto/allwinner/Kconfig
@@ -470,6 +471,7 @@ CONFIG_DRM_ROCKCHIP=m
CONFIG_ROCKCHIP_ANALOGIX_DP=y
CONFIG_ROCKCHIP_DW_HDMI=y
CONFIG_ROCKCHIP_DW_MIPI_DSI=y
+CONFIG_ROCKCHIP_LVDS=y
##
## file: drivers/gpu/drm/stm/Kconfig
@@ -712,6 +714,11 @@ CONFIG_VIDEO_MMP_CAMERA=m
CONFIG_VIDEO_IMX_PXP=m
##
+## file: drivers/media/platform/rockchip/rga/Kconfig
+##
+CONFIG_VIDEO_ROCKCHIP_RGA=m
+
+##
## file: drivers/media/platform/ti/Kconfig
##
CONFIG_VIDEO_TI_VPE=m
@@ -749,11 +756,6 @@ CONFIG_IR_GPIO_CIR=m
CONFIG_IR_SUNXI=m
##
-## file: drivers/media/v4l2-core/Kconfig
-##
-CONFIG_VIDEO_V4L2_SUBDEV_API=y
-
-##
## file: drivers/memory/Kconfig
##
CONFIG_TI_EMIF=m
@@ -1176,6 +1178,7 @@ CONFIG_POWER_RESET_GPIO_RESTART=y
CONFIG_POWER_RESET_RESTART=y
CONFIG_POWER_RESET_SYSCON=y
CONFIG_POWER_RESET_SYSCON_POWEROFF=y
+CONFIG_SYSCON_REBOOT_MODE=m
##
## file: drivers/power/supply/Kconfig
@@ -1345,6 +1348,11 @@ CONFIG_SPI_SLAVE=y
CONFIG_STAGING_MEDIA=y
##
+## file: drivers/staging/media/hantro/Kconfig
+##
+CONFIG_VIDEO_HANTRO=m
+
+##
## file: drivers/staging/media/imx/Kconfig
##
CONFIG_VIDEO_IMX_MEDIA=m
diff --git a/debian/config/config b/debian/config/config
index 19f5e8814..cf17f586e 100644
--- a/debian/config/config
+++ b/debian/config/config
@@ -1059,6 +1059,8 @@ CONFIG_SENSORS_NCT7904=m
CONFIG_SENSORS_NPCM7XX=m
# CONFIG_SENSORS_SHT15 is not set
CONFIG_SENSORS_SHT21=m
+CONFIG_SENSORS_SHT3x=m
+CONFIG_SENSORS_SHT4x=m
CONFIG_SENSORS_DME1737=m
CONFIG_SENSORS_EMC1403=m
CONFIG_SENSORS_EMC2103=m
@@ -2693,11 +2695,6 @@ CONFIG_SMS_USB_DRV=m
CONFIG_VIDEO_STK1160_COMMON=m
##
-## file: drivers/media/usb/stkwebcam/Kconfig
-##
-CONFIG_USB_STKWEBCAM=m
-
-##
## file: drivers/media/usb/ttusb-budget/Kconfig
##
CONFIG_DVB_TTUSB_BUDGET=m
@@ -2726,7 +2723,6 @@ CONFIG_USB_ZR364XX=m
##
## file: drivers/media/v4l2-core/Kconfig
##
-# CONFIG_VIDEO_V4L2_SUBDEV_API is not set
# CONFIG_VIDEO_ADV_DEBUG is not set
# CONFIG_VIDEO_FIXED_MINOR_RANGES is not set
@@ -3128,12 +3124,12 @@ CONFIG_IPDDP_ENCAP=y
##
## file: drivers/net/can/Kconfig
##
+CONFIG_CAN_DEV=m
CONFIG_CAN_VCAN=m
CONFIG_CAN_VXCAN=m
-CONFIG_CAN_SLCAN=m
-CONFIG_CAN_DEV=m
CONFIG_CAN_CALC_BITTIMING=y
# CONFIG_CAN_GRCAN is not set
+CONFIG_CAN_SLCAN=m
# CONFIG_CAN_DEBUG_DEVICES is not set
##
@@ -3193,7 +3189,7 @@ CONFIG_CAN_MCP251X=m
##
CONFIG_CAN_8DEV_USB=m
CONFIG_CAN_EMS_USB=m
-CONFIG_CAN_ESD_USB2=m
+CONFIG_CAN_ESD_USB=m
CONFIG_CAN_GS_USB=m
CONFIG_CAN_KVASER_USB=m
CONFIG_CAN_MCBA_USB=m
@@ -3529,8 +3525,6 @@ CONFIG_NS83820=m
##
CONFIG_NET_VENDOR_NETERION=y
CONFIG_S2IO=m
-CONFIG_VXGE=m
-# CONFIG_VXGE_DEBUG_TRACE_ALL is not set
##
## file: drivers/net/ethernet/netronome/Kconfig
@@ -4325,6 +4319,12 @@ CONFIG_NFC_PORT100=m
# CONFIG_NFC_MICROREAD_MEI is not set
##
+## file: drivers/nfc/nxp-nci/Kconfig
+##
+CONFIG_NFC_NXP_NCI=m
+CONFIG_NFC_NXP_NCI_I2C=m
+
+##
## file: drivers/nfc/pn533/Kconfig
##
CONFIG_NFC_PN533_USB=m
@@ -5042,6 +5042,11 @@ CONFIG_DVB_BUDGET_PATCH=m
CONFIG_DVB_SP8870=m
##
+## file: drivers/staging/media/stkwebcam/Kconfig
+##
+CONFIG_VIDEO_STKWEBCAM=m
+
+##
## file: drivers/staging/qlge/Kconfig
##
CONFIG_QLGE=m
@@ -5072,6 +5077,11 @@ CONFIG_R8188EU=m
CONFIG_R8712U=m
##
+## file: drivers/staging/rtl8723bs/Kconfig
+##
+CONFIG_RTL8723BS=m
+
+##
## file: drivers/staging/rts5208/Kconfig
##
# CONFIG_RTS5208 is not set
@@ -5082,6 +5092,11 @@ CONFIG_R8712U=m
# CONFIG_FB_SM750 is not set
##
+## file: drivers/staging/vme_user/Kconfig
+##
+# CONFIG_VME_BUS is not set
+
+##
## file: drivers/staging/vt6655/Kconfig
##
# CONFIG_VT6655 is not set
@@ -5663,11 +5678,6 @@ CONFIG_VIRTIO_MMIO=m
# CONFIG_VIRTIO_MMIO_CMDLINE_DEVICES is not set
##
-## file: drivers/vme/Kconfig
-##
-# CONFIG_VME_BUS is not set
-
-##
## file: drivers/w1/Kconfig
##
CONFIG_W1=m
@@ -6422,26 +6432,6 @@ CONFIG_RSEQ=y
CONFIG_PERF_EVENTS=y
# CONFIG_DEBUG_PERF_USE_VMALLOC is not set
CONFIG_PROFILING=y
-CONFIG_MODULES=y
-CONFIG_MODULE_FORCE_LOAD=y
-CONFIG_MODULE_UNLOAD=y
-CONFIG_MODULE_FORCE_UNLOAD=y
-CONFIG_MODVERSIONS=y
-# CONFIG_MODULE_SRCVERSION_ALL is not set
-#. This is overridden if the [build]signed-code setting is enabled
-# CONFIG_MODULE_SIG is not set
-#. Signature validation is a run-time option
-# CONFIG_MODULE_SIG_FORCE is not set
-#. Signatures are added in linux-signed
-# CONFIG_MODULE_SIG_ALL is not set
-## choice: Which hash algorithm should modules be signed with?
-# CONFIG_MODULE_SIG_SHA1 is not set
-# CONFIG_MODULE_SIG_SHA224 is not set
-CONFIG_MODULE_SIG_SHA256=y
-# CONFIG_MODULE_SIG_SHA384 is not set
-# CONFIG_MODULE_SIG_SHA512 is not set
-## end choice
-# CONFIG_TRIM_UNUSED_KSYMS is not set
##
## file: kernel/Kconfig.hz
@@ -6490,6 +6480,30 @@ CONFIG_BPF_LSM=y
# CONFIG_GENERIC_IRQ_DEBUGFS is not set
##
+## file: kernel/module/Kconfig
+##
+CONFIG_MODULES=y
+CONFIG_MODULE_FORCE_LOAD=y
+CONFIG_MODULE_UNLOAD=y
+CONFIG_MODULE_FORCE_UNLOAD=y
+CONFIG_MODVERSIONS=y
+# CONFIG_MODULE_SRCVERSION_ALL is not set
+#. This is overridden if the [build]signed-code setting is enabled
+# CONFIG_MODULE_SIG is not set
+#. Signature validation is a run-time option
+# CONFIG_MODULE_SIG_FORCE is not set
+#. Signatures are added in linux-signed
+# CONFIG_MODULE_SIG_ALL is not set
+## choice: Which hash algorithm should modules be signed with?
+# CONFIG_MODULE_SIG_SHA1 is not set
+# CONFIG_MODULE_SIG_SHA224 is not set
+CONFIG_MODULE_SIG_SHA256=y
+# CONFIG_MODULE_SIG_SHA384 is not set
+# CONFIG_MODULE_SIG_SHA512 is not set
+## end choice
+# CONFIG_TRIM_UNUSED_KSYMS is not set
+
+##
## file: kernel/power/Kconfig
##
CONFIG_SUSPEND=y
@@ -7452,7 +7466,7 @@ CONFIG_NFC_DIGITAL=m
##
## file: net/nfc/nci/Kconfig
##
-# CONFIG_NFC_NCI is not set
+CONFIG_NFC_NCI=m
##
## file: net/nsh/Kconfig
diff --git a/debian/config/config.cloud b/debian/config/config.cloud
index 24dea2689..fb9605ba8 100644
--- a/debian/config/config.cloud
+++ b/debian/config/config.cloud
@@ -109,7 +109,6 @@ CONFIG_ATA_PIIX=m
## file: drivers/block/Kconfig
##
# CONFIG_BLK_DEV_FD is not set
-# CONFIG_BLK_DEV_SX8 is not set
# CONFIG_CDROM_PKTCDVD is not set
CONFIG_XEN_BLKDEV_FRONTEND=m
@@ -1088,7 +1087,6 @@ CONFIG_SCSI_FC_ATTRS=m
# CONFIG_SCSI_ACARD is not set
# CONFIG_SCSI_AACRAID is not set
# CONFIG_SCSI_MVUMI is not set
-# CONFIG_SCSI_DPT_I2O is not set
# CONFIG_SCSI_ADVANSYS is not set
# CONFIG_SCSI_ARCMSR is not set
# CONFIG_SCSI_HPTIOP is not set
@@ -1224,6 +1222,11 @@ CONFIG_HYPERV_STORAGE=m
# CONFIG_STAGING is not set
##
+## file: drivers/staging/vme_user/Kconfig
+##
+# CONFIG_VME_BUS is not set
+
+##
## file: drivers/target/iscsi/cxgbit/Kconfig
##
# CONFIG_ISCSI_TARGET_CXGB4 is not set
@@ -1335,11 +1338,6 @@ CONFIG_FB_HYPERV=m
# CONFIG_VIRT_DRIVERS is not set
##
-## file: drivers/vme/Kconfig
-##
-# CONFIG_VME_BUS is not set
-
-##
## file: drivers/w1/Kconfig
##
# CONFIG_W1 is not set
@@ -1687,11 +1685,6 @@ CONFIG_NET_MPLS_GSO=m
CONFIG_SECURITY_INFINIBAND=y
##
-## file: security/integrity/Kconfig
-##
-# CONFIG_INTEGRITY is not set
-
-##
## file: sound/Kconfig
##
# CONFIG_SOUND is not set
diff --git a/debian/config/hppa/config b/debian/config/hppa/config
index bbcb29b2f..55acf73a7 100644
--- a/debian/config/hppa/config
+++ b/debian/config/hppa/config
@@ -32,7 +32,6 @@ CONFIG_PATA_NS87415=m
## file: drivers/block/Kconfig
##
# CONFIG_BLK_DEV_FD is not set
-# CONFIG_BLK_DEV_SX8 is not set
CONFIG_CDROM_PKTCDVD=m
CONFIG_CDROM_PKTCDVD_BUFFERS=8
# CONFIG_CDROM_PKTCDVD_WCACHE is not set
@@ -248,11 +247,6 @@ CONFIG_E100=m
CONFIG_NATSEMI=m
##
-## file: drivers/net/ethernet/neterion/Kconfig
-##
-# CONFIG_VXGE is not set
-
-##
## file: drivers/net/ethernet/nvidia/Kconfig
##
CONFIG_FORCEDETH=m
diff --git a/debian/config/hppa/config.parisc b/debian/config/hppa/config.parisc
index 5ca2deb2c..ded3d23a5 100644
--- a/debian/config/hppa/config.parisc
+++ b/debian/config/hppa/config.parisc
@@ -16,7 +16,6 @@ CONFIG_TLAN=m
##
## file: drivers/scsi/Kconfig
##
-# CONFIG_SCSI_DPT_I2O is not set
# CONFIG_SCSI_NSP32 is not set
##
diff --git a/debian/config/ia64/config b/debian/config/ia64/config
index 92683aabd..d764868a5 100644
--- a/debian/config/ia64/config
+++ b/debian/config/ia64/config
@@ -87,7 +87,6 @@ CONFIG_PATA_LEGACY=m
##
## file: drivers/block/Kconfig
##
-CONFIG_BLK_DEV_SX8=m
CONFIG_CDROM_PKTCDVD=m
CONFIG_CDROM_PKTCDVD_BUFFERS=8
# CONFIG_CDROM_PKTCDVD_WCACHE is not set
diff --git a/debian/config/kernelarch-mips/config.malta b/debian/config/kernelarch-mips/config.malta
index f9c7d2a69..4493e226b 100644
--- a/debian/config/kernelarch-mips/config.malta
+++ b/debian/config/kernelarch-mips/config.malta
@@ -24,7 +24,6 @@ CONFIG_PATA_NS87410=m
## file: drivers/block/Kconfig
##
CONFIG_BLK_DEV_FD=m
-CONFIG_BLK_DEV_SX8=m
CONFIG_CDROM_PKTCDVD=m
##
diff --git a/debian/config/kernelarch-mips/config.octeon b/debian/config/kernelarch-mips/config.octeon
index c14704f76..4a11f9b2b 100644
--- a/debian/config/kernelarch-mips/config.octeon
+++ b/debian/config/kernelarch-mips/config.octeon
@@ -115,11 +115,6 @@ CONFIG_SPI_OCTEON=y
CONFIG_OCTEON_ETHERNET=y
##
-## file: drivers/staging/octeon-usb/Kconfig
-##
-CONFIG_OCTEON_USB=y
-
-##
## file: drivers/tty/serial/8250/Kconfig
##
CONFIG_SERIAL_8250_NR_UARTS=2
@@ -129,6 +124,7 @@ CONFIG_SERIAL_8250_DW=y
##
## file: drivers/usb/host/Kconfig
##
+CONFIG_USB_OCTEON_HCD=y
CONFIG_USB_OCTEON_EHCI=y
CONFIG_USB_OCTEON_OHCI=y
diff --git a/debian/config/kernelarch-powerpc/config b/debian/config/kernelarch-powerpc/config
index 34bc25a2d..cd8d67606 100644
--- a/debian/config/kernelarch-powerpc/config
+++ b/debian/config/kernelarch-powerpc/config
@@ -125,7 +125,6 @@ CONFIG_ATM_HE=m
## file: drivers/block/Kconfig
##
CONFIG_BLK_DEV_FD=m
-CONFIG_BLK_DEV_SX8=m
CONFIG_CDROM_PKTCDVD=m
CONFIG_CDROM_PKTCDVD_BUFFERS=8
# CONFIG_CDROM_PKTCDVD_WCACHE is not set
@@ -637,7 +636,6 @@ CONFIG_RTC_DRV_GENERIC=y
##
## file: drivers/scsi/Kconfig
##
-CONFIG_SCSI_DPT_I2O=m
CONFIG_SCSI_ARCMSR=m
CONFIG_SCSI_BUSLOGIC=m
CONFIG_SCSI_MYRB=m
diff --git a/debian/config/kernelarch-sparc/config b/debian/config/kernelarch-sparc/config
index 949439ae1..49eb1991c 100644
--- a/debian/config/kernelarch-sparc/config
+++ b/debian/config/kernelarch-sparc/config
@@ -47,7 +47,6 @@ CONFIG_PATA_LEGACY=m
## file: drivers/block/Kconfig
##
CONFIG_BLK_DEV_FD=y
-CONFIG_BLK_DEV_SX8=m
CONFIG_CDROM_PKTCDVD=m
CONFIG_CDROM_PKTCDVD_BUFFERS=8
# CONFIG_CDROM_PKTCDVD_WCACHE is not set
diff --git a/debian/config/kernelarch-x86/config b/debian/config/kernelarch-x86/config
index bd735ef78..32ec91132 100644
--- a/debian/config/kernelarch-x86/config
+++ b/debian/config/kernelarch-x86/config
@@ -50,7 +50,6 @@ CONFIG_MTRR_SANITIZER=y
CONFIG_MTRR_SANITIZER_ENABLE_DEFAULT=0
CONFIG_MTRR_SANITIZER_SPARE_REG_NR_DEFAULT=1
CONFIG_X86_PAT=y
-CONFIG_ARCH_RANDOM=y
CONFIG_X86_UMIP=y
CONFIG_EFI=y
CONFIG_EFI_STUB=y
@@ -262,7 +261,6 @@ CONFIG_KS0108_DELAY=2
## file: drivers/block/Kconfig
##
CONFIG_BLK_DEV_FD=m
-CONFIG_BLK_DEV_SX8=m
CONFIG_CDROM_PKTCDVD=m
CONFIG_CDROM_PKTCDVD_BUFFERS=8
# CONFIG_CDROM_PKTCDVD_WCACHE is not set
@@ -1586,7 +1584,6 @@ CONFIG_RTC_DRV_CMOS=y
##
## file: drivers/scsi/Kconfig
##
-CONFIG_SCSI_DPT_I2O=m
CONFIG_SCSI_ARCMSR=m
CONFIG_SCSI_BUSLOGIC=m
# CONFIG_SCSI_FLASHPOINT is not set
@@ -1659,11 +1656,6 @@ CONFIG_RTL8192E=m
CONFIG_RTL8192U=m
##
-## file: drivers/staging/rtl8723bs/Kconfig
-##
-CONFIG_RTL8723BS=m
-
-##
## file: drivers/staging/rts5208/Kconfig
##
CONFIG_RTS5208=m
diff --git a/debian/config/m68k/config b/debian/config/m68k/config
index cb164dc1e..d1c23c2f6 100644
--- a/debian/config/m68k/config
+++ b/debian/config/m68k/config
@@ -699,6 +699,10 @@ CONFIG_CC_OPTIMIZE_FOR_SIZE=y
## end choice
CONFIG_SGETMASK_SYSCALL=y
CONFIG_SYSFS_SYSCALL=y
+
+##
+## file: kernel/module/Kconfig
+##
# CONFIG_MODULE_SIG is not set
##
diff --git a/debian/config/riscv64/config b/debian/config/riscv64/config
index 1a04e34a5..be792a75e 100644
--- a/debian/config/riscv64/config
+++ b/debian/config/riscv64/config
@@ -41,6 +41,7 @@ CONFIG_GPIO_SIFIVE=y
##
CONFIG_DRM=m
CONFIG_DRM_RADEON=m
+CONFIG_DRM_AMDGPU=m
##
## file: drivers/hwmon/Kconfig
diff --git a/debian/installer/modules/arm64/i2c-modules b/debian/installer/modules/arm64/i2c-modules
index da7c94938..6f839a7fc 100644
--- a/debian/installer/modules/arm64/i2c-modules
+++ b/debian/installer/modules/arm64/i2c-modules
@@ -2,3 +2,4 @@
i2c-tegra
i2c-rk3x
i2c-mv64xxx
+i2c-imx
diff --git a/debian/installer/modules/arm64/kernel-image b/debian/installer/modules/arm64/kernel-image
index 22ea2ebd3..8a70e1912 100644
--- a/debian/installer/modules/arm64/kernel-image
+++ b/debian/installer/modules/arm64/kernel-image
@@ -14,6 +14,7 @@ drivers/soc/**
# Watchdog needed for reboot
sunxi_wdt ?
+imx2_wdt ?
# For Turris MOX (u-boot enables the watchdog)
armada_37xx_wdt ?
@@ -35,3 +36,6 @@ rockchip-io-domain ?
# Pin controllers
drivers/pinctrl/**
+
+# EFUSE/OTP drivers
+nvmem-imx-ocotp ?
diff --git a/debian/installer/modules/kernel-image b/debian/installer/modules/kernel-image
index eeda50e82..69ed61d61 100644
--- a/debian/installer/modules/kernel-image
+++ b/debian/installer/modules/kernel-image
@@ -3,6 +3,8 @@ bitrev ?
eeprom_93cx6 ?
firmware_class
led-class ?
+# Both input-modules and sound-modules can depend on this
+ledtrig-audio ?
mbcache
mfd-core ?
nls_base
diff --git a/debian/installer/modules/nic-modules b/debian/installer/modules/nic-modules
index 673db0665..5d9889734 100644
--- a/debian/installer/modules/nic-modules
+++ b/debian/installer/modules/nic-modules
@@ -1,7 +1,7 @@
# Include Ethernet switch, controller and PHY drivers by default
drivers/net/dsa/** ?
drivers/net/ethernet/**
-drivers/net/phy/*
+drivers/net/phy/**
# Include paravirtual network drivers
hv_netvsc ?
diff --git a/debian/lib/python/debian_linux/debian.py b/debian/lib/python/debian_linux/debian.py
index 763d08756..212d02848 100644
--- a/debian/lib/python/debian_linux/debian.py
+++ b/debian/lib/python/debian_linux/debian.py
@@ -770,6 +770,7 @@ class SourcePackage(_ControlFileDict):
('Homepage', str),
('Vcs-Browser', str),
('Vcs-Git', str),
+ ('XS-Autobuild', str),
))
@@ -798,6 +799,7 @@ class BinaryPackage(_ControlFileDict):
('Multi-Arch', str),
('Kernel-Version', str), # for udeb only
('Description', PackageDescription),
+ ('Homepage', str),
))
diff --git a/debian/patches-rt/0001-arm-Disable-jump-label-on-PREEMPT_RT.patch b/debian/patches-rt/0001-arm-Disable-jump-label-on-PREEMPT_RT.patch
index 02e389e86..b71d65114 100644
--- a/debian/patches-rt/0001-arm-Disable-jump-label-on-PREEMPT_RT.patch
+++ b/debian/patches-rt/0001-arm-Disable-jump-label-on-PREEMPT_RT.patch
@@ -1,7 +1,7 @@
From: Thomas Gleixner <tglx@linutronix.de>
Date: Wed, 8 Jul 2015 17:14:48 +0200
Subject: [PATCH 1/2] arm: Disable jump-label on PREEMPT_RT.
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.19/older/patches-5.19-rc8-rt9.tar.xz
+Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/6.0/older/patches-6.0-rt11.tar.xz
jump-labels are used to efficiently switch between two possible code
paths. To achieve this, stop_machine() is used to keep the CPU in a
@@ -25,7 +25,7 @@ Link: https://lkml.kernel.org/r/20220613182447.112191-2-bigeasy@linutronix.de
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
-@@ -71,7 +71,7 @@ config ARM
+@@ -70,7 +70,7 @@ config ARM
select HARDIRQS_SW_RESEND
select HAVE_ARCH_AUDITSYSCALL if AEABI && !OABI_COMPAT
select HAVE_ARCH_BITREVERSE if (CPU_32v7M || CPU_32v7) && !CPU_32v6
diff --git a/debian/patches-rt/0001-fs-dcache-d_add_ci-needs-to-complete-parallel-lookup.patch b/debian/patches-rt/0001-fs-dcache-d_add_ci-needs-to-complete-parallel-lookup.patch
deleted file mode 100644
index 31adf84aa..000000000
--- a/debian/patches-rt/0001-fs-dcache-d_add_ci-needs-to-complete-parallel-lookup.patch
+++ /dev/null
@@ -1,36 +0,0 @@
-From: Al Viro <viro@zeniv.linux.org.uk>
-Date: Wed, 27 Jul 2022 08:24:15 +0200
-Subject: [PATCH 1/4] fs/dcache: d_add_ci() needs to complete parallel lookup.
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.19/older/patches-5.19-rc8-rt9.tar.xz
-
-Result of d_alloc_parallel() in d_add_ci() is fed to d_splice_alias(), which
-*NORMALLY* feeds it to __d_add() or __d_move() in a way that will have
-__d_lookup_done() applied to it.
-
-However, there is a nasty possibility - d_splice_alias() might legitimately
-fail without having marked the sucker not in-lookup. dentry will get dropped
-by d_add_ci(), so ->d_wait won't end up pointing to freed object, but it's
-still a bug - retain_dentry() will scream bloody murder upon seeing that, and
-for a good reason; we'll get hash chain corrupted. It's impossible to hit
-without corrupted fs image (ntfs or case-insensitive xfs), but it's a bug.
-
-Invoke d_lookup_done() after d_splice_alias() to ensure that the
-in-lookip flag is always cleared.
-
-Fixes: d9171b9345261 ("parallel lookups machinery, part 4 (and last)")
-Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
-Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
----
- fs/dcache.c | 1 +
- 1 file changed, 1 insertion(+)
-
---- a/fs/dcache.c
-+++ b/fs/dcache.c
-@@ -2239,6 +2239,7 @@ struct dentry *d_add_ci(struct dentry *d
- }
- }
- res = d_splice_alias(inode, found);
-+ d_lookup_done(found);
- if (res) {
- dput(found);
- return res;
diff --git a/debian/patches-rt/0001-lib-vsprintf-Remove-static_branch_likely-from-__ptr_.patch b/debian/patches-rt/0001-lib-vsprintf-Remove-static_branch_likely-from-__ptr_.patch
index 0a6c57467..b4b2b8650 100644
--- a/debian/patches-rt/0001-lib-vsprintf-Remove-static_branch_likely-from-__ptr_.patch
+++ b/debian/patches-rt/0001-lib-vsprintf-Remove-static_branch_likely-from-__ptr_.patch
@@ -2,7 +2,7 @@ From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Date: Fri, 29 Jul 2022 15:52:45 +0200
Subject: [PATCH 1/2] lib/vsprintf: Remove static_branch_likely() from
__ptr_to_hashval().
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.19/older/patches-5.19-rc8-rt9.tar.xz
+Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/6.0/older/patches-6.0-rt11.tar.xz
Using static_branch_likely() to signal that ptr_key has been filled is a
bit much given that it is not a fast path.
diff --git a/debian/patches-rt/0001-mm-slub-move-free_debug_processing-further.patch b/debian/patches-rt/0001-mm-slub-move-free_debug_processing-further.patch
new file mode 100644
index 000000000..50edc4dae
--- /dev/null
+++ b/debian/patches-rt/0001-mm-slub-move-free_debug_processing-further.patch
@@ -0,0 +1,148 @@
+From: Vlastimil Babka <vbabka@suse.cz>
+Date: Tue, 23 Aug 2022 19:03:56 +0200
+Subject: [PATCH 1/5] mm/slub: move free_debug_processing() further
+Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/6.0/older/patches-6.0-rt11.tar.xz
+
+In the following patch, the function free_debug_processing() will be
+calling add_partial(), remove_partial() and discard_slab(), se move it
+below their definitions to avoid forward declarations. To make review
+easier, separate the move from functional changes.
+
+Signed-off-by: Vlastimil Babka <vbabka@suse.cz>
+Reviewed-by: Hyeonggon Yoo <42.hyeyoo@gmail.com>
+Acked-by: David Rientjes <rientjes@google.com>
+Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
+---
+ mm/slub.c | 114 +++++++++++++++++++++++++++++++-------------------------------
+ 1 file changed, 57 insertions(+), 57 deletions(-)
+
+--- a/mm/slub.c
++++ b/mm/slub.c
+@@ -1385,63 +1385,6 @@ static inline int free_consistency_check
+ return 1;
+ }
+
+-/* Supports checking bulk free of a constructed freelist */
+-static noinline int free_debug_processing(
+- struct kmem_cache *s, struct slab *slab,
+- void *head, void *tail, int bulk_cnt,
+- unsigned long addr)
+-{
+- struct kmem_cache_node *n = get_node(s, slab_nid(slab));
+- void *object = head;
+- int cnt = 0;
+- unsigned long flags, flags2;
+- int ret = 0;
+- depot_stack_handle_t handle = 0;
+-
+- if (s->flags & SLAB_STORE_USER)
+- handle = set_track_prepare();
+-
+- spin_lock_irqsave(&n->list_lock, flags);
+- slab_lock(slab, &flags2);
+-
+- if (s->flags & SLAB_CONSISTENCY_CHECKS) {
+- if (!check_slab(s, slab))
+- goto out;
+- }
+-
+-next_object:
+- cnt++;
+-
+- if (s->flags & SLAB_CONSISTENCY_CHECKS) {
+- if (!free_consistency_checks(s, slab, object, addr))
+- goto out;
+- }
+-
+- if (s->flags & SLAB_STORE_USER)
+- set_track_update(s, object, TRACK_FREE, addr, handle);
+- trace(s, slab, object, 0);
+- /* Freepointer not overwritten by init_object(), SLAB_POISON moved it */
+- init_object(s, object, SLUB_RED_INACTIVE);
+-
+- /* Reached end of constructed freelist yet? */
+- if (object != tail) {
+- object = get_freepointer(s, object);
+- goto next_object;
+- }
+- ret = 1;
+-
+-out:
+- if (cnt != bulk_cnt)
+- slab_err(s, slab, "Bulk freelist count(%d) invalid(%d)\n",
+- bulk_cnt, cnt);
+-
+- slab_unlock(slab, &flags2);
+- spin_unlock_irqrestore(&n->list_lock, flags);
+- if (!ret)
+- slab_fix(s, "Object at 0x%p not freed", object);
+- return ret;
+-}
+-
+ /*
+ * Parse a block of slub_debug options. Blocks are delimited by ';'
+ *
+@@ -2788,6 +2731,63 @@ static inline unsigned long node_nr_objs
+ {
+ return atomic_long_read(&n->total_objects);
+ }
++
++/* Supports checking bulk free of a constructed freelist */
++static noinline int free_debug_processing(
++ struct kmem_cache *s, struct slab *slab,
++ void *head, void *tail, int bulk_cnt,
++ unsigned long addr)
++{
++ struct kmem_cache_node *n = get_node(s, slab_nid(slab));
++ void *object = head;
++ int cnt = 0;
++ unsigned long flags, flags2;
++ int ret = 0;
++ depot_stack_handle_t handle = 0;
++
++ if (s->flags & SLAB_STORE_USER)
++ handle = set_track_prepare();
++
++ spin_lock_irqsave(&n->list_lock, flags);
++ slab_lock(slab, &flags2);
++
++ if (s->flags & SLAB_CONSISTENCY_CHECKS) {
++ if (!check_slab(s, slab))
++ goto out;
++ }
++
++next_object:
++ cnt++;
++
++ if (s->flags & SLAB_CONSISTENCY_CHECKS) {
++ if (!free_consistency_checks(s, slab, object, addr))
++ goto out;
++ }
++
++ if (s->flags & SLAB_STORE_USER)
++ set_track_update(s, object, TRACK_FREE, addr, handle);
++ trace(s, slab, object, 0);
++ /* Freepointer not overwritten by init_object(), SLAB_POISON moved it */
++ init_object(s, object, SLUB_RED_INACTIVE);
++
++ /* Reached end of constructed freelist yet? */
++ if (object != tail) {
++ object = get_freepointer(s, object);
++ goto next_object;
++ }
++ ret = 1;
++
++out:
++ if (cnt != bulk_cnt)
++ slab_err(s, slab, "Bulk freelist count(%d) invalid(%d)\n",
++ bulk_cnt, cnt);
++
++ slab_unlock(slab, &flags2);
++ spin_unlock_irqrestore(&n->list_lock, flags);
++ if (!ret)
++ slab_fix(s, "Object at 0x%p not freed", object);
++ return ret;
++}
+ #endif /* CONFIG_SLUB_DEBUG */
+
+ #if defined(CONFIG_SLUB_DEBUG) || defined(CONFIG_SYSFS)
diff --git a/debian/patches-rt/0001-preempt-Provide-preempt_-dis-en-able_nested.patch b/debian/patches-rt/0001-preempt-Provide-preempt_-dis-en-able_nested.patch
new file mode 100644
index 000000000..26762101b
--- /dev/null
+++ b/debian/patches-rt/0001-preempt-Provide-preempt_-dis-en-able_nested.patch
@@ -0,0 +1,85 @@
+From: Thomas Gleixner <tglx@linutronix.de>
+Date: Thu, 25 Aug 2022 18:41:24 +0200
+Subject: [PATCH 1/8] preempt: Provide preempt_[dis|en]able_nested()
+Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/6.0/older/patches-6.0-rt11.tar.xz
+
+On PREEMPT_RT enabled kernels, spinlocks and rwlocks are neither disabling
+preemption nor interrupts. Though there are a few places which depend on
+the implicit preemption/interrupt disable of those locks, e.g. seqcount
+write sections, per CPU statistics updates etc.
+
+To avoid sprinkling CONFIG_PREEMPT_RT conditionals all over the place, add
+preempt_disable_nested() and preempt_enable_nested() which should be
+descriptive enough.
+
+Add a lockdep assertion for the !PREEMPT_RT case to catch callers which
+do not have preemption disabled.
+
+Cc: Ben Segall <bsegall@google.com>
+Cc: Daniel Bristot de Oliveira <bristot@redhat.com>
+Cc: Dietmar Eggemann <dietmar.eggemann@arm.com>
+Cc: Ingo Molnar <mingo@redhat.com>
+Cc: Juri Lelli <juri.lelli@redhat.com>
+Cc: Mel Gorman <mgorman@suse.de>
+Cc: Peter Zijlstra <peterz@infradead.org>
+Cc: Steven Rostedt <rostedt@goodmis.org>
+Cc: Valentin Schneider <vschneid@redhat.com>
+Cc: Vincent Guittot <vincent.guittot@linaro.org>
+Suggested-by: Linus Torvalds <torvalds@linux-foundation.org>
+Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
+Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
+Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org>
+Link: https://lore.kernel.org/r/20220825164131.402717-2-bigeasy@linutronix.de
+---
+ include/linux/preempt.h | 42 ++++++++++++++++++++++++++++++++++++++++++
+ 1 file changed, 42 insertions(+)
+
+--- a/include/linux/preempt.h
++++ b/include/linux/preempt.h
+@@ -421,4 +421,46 @@ static inline void migrate_enable(void)
+
+ #endif /* CONFIG_SMP */
+
++/**
++ * preempt_disable_nested - Disable preemption inside a normally preempt disabled section
++ *
++ * Use for code which requires preemption protection inside a critical
++ * section which has preemption disabled implicitly on non-PREEMPT_RT
++ * enabled kernels, by e.g.:
++ * - holding a spinlock/rwlock
++ * - soft interrupt context
++ * - regular interrupt handlers
++ *
++ * On PREEMPT_RT enabled kernels spinlock/rwlock held sections, soft
++ * interrupt context and regular interrupt handlers are preemptible and
++ * only prevent migration. preempt_disable_nested() ensures that preemption
++ * is disabled for cases which require CPU local serialization even on
++ * PREEMPT_RT. For non-PREEMPT_RT kernels this is a NOP.
++ *
++ * The use cases are code sequences which are not serialized by a
++ * particular lock instance, e.g.:
++ * - seqcount write side critical sections where the seqcount is not
++ * associated to a particular lock and therefore the automatic
++ * protection mechanism does not work. This prevents a live lock
++ * against a preempting high priority reader.
++ * - RMW per CPU variable updates like vmstat.
++ */
++/* Macro to avoid header recursion hell vs. lockdep */
++#define preempt_disable_nested() \
++do { \
++ if (IS_ENABLED(CONFIG_PREEMPT_RT)) \
++ preempt_disable(); \
++ else \
++ lockdep_assert_preemption_disabled(); \
++} while (0)
++
++/**
++ * preempt_enable_nested - Undo the effect of preempt_disable_nested()
++ */
++static __always_inline void preempt_enable_nested(void)
++{
++ if (IS_ENABLED(CONFIG_PREEMPT_RT))
++ preempt_enable();
++}
++
+ #endif /* __LINUX_PREEMPT_H */
diff --git a/debian/patches-rt/0001-spi-Remove-the-obsolte-u64_stats_fetch_-_irq-users.patch b/debian/patches-rt/0001-spi-Remove-the-obsolte-u64_stats_fetch_-_irq-users.patch
new file mode 100644
index 000000000..31ced4745
--- /dev/null
+++ b/debian/patches-rt/0001-spi-Remove-the-obsolte-u64_stats_fetch_-_irq-users.patch
@@ -0,0 +1,34 @@
+From: Thomas Gleixner <tglx@linutronix.de>
+Date: Thu, 25 Aug 2022 16:15:32 +0200
+Subject: [PATCH 1/4] spi: Remove the obsolte u64_stats_fetch_*_irq() users.
+Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/6.0/older/patches-6.0-rt11.tar.xz
+
+Now that the 32bit UP oddity is gone and 32bit uses always a sequence
+count, there is no need for the fetch_irq() variants anymore.
+
+Convert to the regular interface.
+
+Cc: Mark Brown <broonie@kernel.org>
+Cc: linux-spi@vger.kernel.org
+Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
+Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
+Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org>
+---
+ drivers/spi/spi.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+--- a/drivers/spi/spi.c
++++ b/drivers/spi/spi.c
+@@ -127,10 +127,10 @@ do { \
+ unsigned int start; \
+ pcpu_stats = per_cpu_ptr(in, i); \
+ do { \
+- start = u64_stats_fetch_begin_irq( \
++ start = u64_stats_fetch_begin( \
+ &pcpu_stats->syncp); \
+ inc = u64_stats_read(&pcpu_stats->field); \
+- } while (u64_stats_fetch_retry_irq( \
++ } while (u64_stats_fetch_retry( \
+ &pcpu_stats->syncp, start)); \
+ ret += inc; \
+ } \
diff --git a/debian/patches-rt/0002-dentry-Use-preempt_-dis-en-able_nested.patch b/debian/patches-rt/0002-dentry-Use-preempt_-dis-en-able_nested.patch
new file mode 100644
index 000000000..5ea3d370f
--- /dev/null
+++ b/debian/patches-rt/0002-dentry-Use-preempt_-dis-en-able_nested.patch
@@ -0,0 +1,48 @@
+From: Thomas Gleixner <tglx@linutronix.de>
+Date: Thu, 25 Aug 2022 18:41:25 +0200
+Subject: [PATCH 2/8] dentry: Use preempt_[dis|en]able_nested()
+Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/6.0/older/patches-6.0-rt11.tar.xz
+
+Replace the open coded CONFIG_PREEMPT_RT conditional
+preempt_disable/enable() with the new helper.
+
+Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
+Cc: Alexander Viro <viro@zeniv.linux.org.uk>
+Cc: linux-fsdevel@vger.kernel.org
+Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
+Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org>
+Acked-by: Christian Brauner (Microsoft) <brauner@kernel.org>
+Link: https://lore.kernel.org/r/20220825164131.402717-3-bigeasy@linutronix.de
+---
+ fs/dcache.c | 13 ++-----------
+ 1 file changed, 2 insertions(+), 11 deletions(-)
+
+--- a/fs/dcache.c
++++ b/fs/dcache.c
+@@ -2597,15 +2597,7 @@ EXPORT_SYMBOL(d_rehash);
+
+ static inline unsigned start_dir_add(struct inode *dir)
+ {
+- /*
+- * The caller holds a spinlock (dentry::d_lock). On !PREEMPT_RT
+- * kernels spin_lock() implicitly disables preemption, but not on
+- * PREEMPT_RT. So for RT it has to be done explicitly to protect
+- * the sequence count write side critical section against a reader
+- * or another writer preempting, which would result in a live lock.
+- */
+- if (IS_ENABLED(CONFIG_PREEMPT_RT))
+- preempt_disable();
++ preempt_disable_nested();
+ for (;;) {
+ unsigned n = dir->i_dir_seq;
+ if (!(n & 1) && cmpxchg(&dir->i_dir_seq, n, n + 1) == n)
+@@ -2618,8 +2610,7 @@ static inline void end_dir_add(struct in
+ wait_queue_head_t *d_wait)
+ {
+ smp_store_release(&dir->i_dir_seq, n + 2);
+- if (IS_ENABLED(CONFIG_PREEMPT_RT))
+- preempt_enable();
++ preempt_enable_nested();
+ wake_up_all(d_wait);
+ }
+
diff --git a/debian/patches-rt/0002-fs-dcache-Disable-preemption-on-i_dir_seq-write-side.patch b/debian/patches-rt/0002-fs-dcache-Disable-preemption-on-i_dir_seq-write-side.patch
deleted file mode 100644
index 30a147af3..000000000
--- a/debian/patches-rt/0002-fs-dcache-Disable-preemption-on-i_dir_seq-write-side.patch
+++ /dev/null
@@ -1,61 +0,0 @@
-From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
-Date: Sun, 12 Jun 2022 16:27:28 +0200
-Subject: [PATCH 2/4] fs/dcache: Disable preemption on i_dir_seq write side on
- PREEMPT_RT
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.19/older/patches-5.19-rc8-rt9.tar.xz
-
-i_dir_seq is a sequence counter with a lock which is represented by the
-lowest bit. The writer atomically updates the counter which ensures that it
-can be modified by only one writer at a time. This requires preemption to
-be disabled across the write side critical section.
-
-On !PREEMPT_RT kernels this is implicit by the caller acquiring
-dentry::lock. On PREEMPT_RT kernels spin_lock() does not disable preemption
-which means that a preempting writer or reader would live lock. It's
-therefore required to disable preemption explicitly.
-
-An alternative solution would be to replace i_dir_seq with a seqlock_t for
-PREEMPT_RT, but that comes with its own set of problems due to arbitrary
-lock nesting. A pure sequence count with an associated spinlock is not
-possible because the locks held by the caller are not necessarily related.
-
-As the critical section is small, disabling preemption is a sensible
-solution.
-
-Reported-by: Oleg.Karfich@wago.com
-Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
-Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
-Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
-Link: https://lkml.kernel.org/r/20220613140712.77932-2-bigeasy@linutronix.de
----
- fs/dcache.c | 12 +++++++++++-
- 1 file changed, 11 insertions(+), 1 deletion(-)
-
---- a/fs/dcache.c
-+++ b/fs/dcache.c
-@@ -2564,7 +2564,15 @@ EXPORT_SYMBOL(d_rehash);
-
- static inline unsigned start_dir_add(struct inode *dir)
- {
--
-+ /*
-+ * The caller holds a spinlock (dentry::d_lock). On !PREEMPT_RT
-+ * kernels spin_lock() implicitly disables preemption, but not on
-+ * PREEMPT_RT. So for RT it has to be done explicitly to protect
-+ * the sequence count write side critical section against a reader
-+ * or another writer preempting, which would result in a live lock.
-+ */
-+ if (IS_ENABLED(CONFIG_PREEMPT_RT))
-+ preempt_disable();
- for (;;) {
- unsigned n = dir->i_dir_seq;
- if (!(n & 1) && cmpxchg(&dir->i_dir_seq, n, n + 1) == n)
-@@ -2576,6 +2584,8 @@ static inline unsigned start_dir_add(str
- static inline void end_dir_add(struct inode *dir, unsigned n)
- {
- smp_store_release(&dir->i_dir_seq, n + 2);
-+ if (IS_ENABLED(CONFIG_PREEMPT_RT))
-+ preempt_enable();
- }
-
- static void d_wait_lookup(struct dentry *dentry)
diff --git a/debian/patches-rt/0002-lib-vsprintf-Initialize-vsprintf-s-pointer-hash-once.patch b/debian/patches-rt/0002-lib-vsprintf-Initialize-vsprintf-s-pointer-hash-once.patch
index 5dafdd3e7..6c5927228 100644
--- a/debian/patches-rt/0002-lib-vsprintf-Initialize-vsprintf-s-pointer-hash-once.patch
+++ b/debian/patches-rt/0002-lib-vsprintf-Initialize-vsprintf-s-pointer-hash-once.patch
@@ -1,8 +1,8 @@
From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
-Date: Fri, 29 Jul 2022 10:53:00 +0200
+Date: Mon, 1 Aug 2022 11:34:33 +0200
Subject: [PATCH 2/2] lib/vsprintf: Initialize vsprintf's pointer hash once the
random core is ready.
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.19/older/patches-5.19-rc8-rt9.tar.xz
+Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/6.0/older/patches-6.0-rt11.tar.xz
The printk code invokes vnsprintf in order to compute the complete
string before adding it into its buffer. This happens in an IRQ-off
@@ -19,43 +19,45 @@ during the vsprintf() invocation which would fix the just mentioned
problem. However printk itself can be invoked in a context with
disabled interrupts which would lead to the very same problem.
-Move the initializaion of ptr_key into a worker and schedule it from
+Move the initialization of ptr_key into a worker and schedule it from
subsys_initcall(). This happens early but after the workqueue subsystem
-is ready. Use get_random_bytes_wait() to retrieve the random value which
-will block until random data is available.
+is ready. Use get_random_bytes() to retrieve the random value if the RNG
+core is ready, otherwise schedule a worker in two seconds and try again.
Reported-by: Mike Galbraith <efault@gmx.de>
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
-Link: https://lkml.kernel.org/r/20220729154716.429964-3-bigeasy@linutronix.de
+Link: https://lkml.kernel.org/r/YueeIgPGUJgsnsAh@linutronix.de
---
- lib/vsprintf.c | 44 +++++++++++++++++++++++++-------------------
- 1 file changed, 25 insertions(+), 19 deletions(-)
+ lib/vsprintf.c | 46 +++++++++++++++++++++++++++-------------------
+ 1 file changed, 27 insertions(+), 19 deletions(-)
--- a/lib/vsprintf.c
+++ b/lib/vsprintf.c
-@@ -751,31 +751,37 @@ static int __init debug_boot_weak_hash_e
+@@ -751,31 +751,39 @@ static int __init debug_boot_weak_hash_e
early_param("debug_boot_weak_hash", debug_boot_weak_hash_enable);
static bool filled_random_ptr_key;
+static siphash_key_t ptr_key __read_mostly;
++static void fill_ptr_key_workfn(struct work_struct *work);
++static DECLARE_DELAYED_WORK(fill_ptr_key_work, fill_ptr_key_workfn);
+
+static void fill_ptr_key_workfn(struct work_struct *work)
+{
-+ int ret;
-+
-+ ret = get_random_bytes_wait(&ptr_key, sizeof(ptr_key));
-+ if (WARN_ON(ret < 0))
++ if (!rng_is_initialized()) {
++ queue_delayed_work(system_unbound_wq, &fill_ptr_key_work, HZ * 2);
+ return;
++ }
++
++ get_random_bytes(&ptr_key, sizeof(ptr_key));
++
+ /* Pairs with smp_rmb() before reading ptr_key. */
+ smp_wmb();
+ WRITE_ONCE(filled_random_ptr_key, true);
+}
+
-+static int vsprintf_init_hashval(void)
++static int __init vsprintf_init_hashval(void)
+{
-+ static DECLARE_WORK(fill_ptr_key_work, fill_ptr_key_workfn);
-+
-+ queue_work(system_unbound_wq, &fill_ptr_key_work);
++ fill_ptr_key_workfn(NULL);
+ return 0;
+}
+subsys_initcall(vsprintf_init_hashval)
diff --git a/debian/patches-rt/0002-mm-slub-restrict-sysfs-validation-to-debug-caches-an.patch b/debian/patches-rt/0002-mm-slub-restrict-sysfs-validation-to-debug-caches-an.patch
new file mode 100644
index 000000000..f9eff072a
--- /dev/null
+++ b/debian/patches-rt/0002-mm-slub-restrict-sysfs-validation-to-debug-caches-an.patch
@@ -0,0 +1,472 @@
+From: Vlastimil Babka <vbabka@suse.cz>
+Date: Tue, 23 Aug 2022 19:03:57 +0200
+Subject: [PATCH 2/5] mm/slub: restrict sysfs validation to debug caches and
+ make it safe
+Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/6.0/older/patches-6.0-rt11.tar.xz
+
+Rongwei Wang reports [1] that cache validation triggered by writing to
+/sys/kernel/slab/<cache>/validate is racy against normal cache
+operations (e.g. freeing) in a way that can cause false positive
+inconsistency reports for caches with debugging enabled. The problem is
+that debugging actions that mark object free or active and actual
+freelist operations are not atomic, and the validation can see an
+inconsistent state.
+
+For caches that do or don't have debugging enabled, additional races
+involving n->nr_slabs are possible that result in false reports of wrong
+slab counts.
+
+This patch attempts to solve these issues while not adding overhead to
+normal (especially fastpath) operations for caches that do not have
+debugging enabled. Such overhead would not be justified to make possible
+userspace-triggered validation safe. Instead, disable the validation for
+caches that don't have debugging enabled and make their sysfs validate
+handler return -EINVAL.
+
+For caches that do have debugging enabled, we can instead extend the
+existing approach of not using percpu freelists to force all alloc/free
+operations to the slow paths where debugging flags is checked and acted
+upon. There can adjust the debug-specific paths to increase n->list_lock
+coverage against concurrent validation as necessary.
+
+The processing on free in free_debug_processing() already happens under
+n->list_lock so we can extend it to actually do the freeing as well and
+thus make it atomic against concurrent validation. As observed by
+Hyeonggon Yoo, we do not really need to take slab_lock() anymore here
+because all paths we could race with are protected by n->list_lock under
+the new scheme, so drop its usage here.
+
+The processing on alloc in alloc_debug_processing() currently doesn't
+take any locks, but we have to first allocate the object from a slab on
+the partial list (as debugging caches have no percpu slabs) and thus
+take the n->list_lock anyway. Add a function alloc_single_from_partial()
+that grabs just the allocated object instead of the whole freelist, and
+does the debug processing. The n->list_lock coverage again makes it
+atomic against validation and it is also ultimately more efficient than
+the current grabbing of freelist immediately followed by slab
+deactivation.
+
+To prevent races on n->nr_slabs updates, make sure that for caches with
+debugging enabled, inc_slabs_node() or dec_slabs_node() is called under
+n->list_lock. When allocating a new slab for a debug cache, handle the
+allocation by a new function alloc_single_from_new_slab() instead of the
+current forced deactivation path.
+
+Neither of these changes affect the fast paths at all. The changes in
+slow paths are negligible for non-debug caches.
+
+[1] https://lore.kernel.org/all/20220529081535.69275-1-rongwei.wang@linux.alibaba.com/
+
+Reported-by: Rongwei Wang <rongwei.wang@linux.alibaba.com>
+Signed-off-by: Vlastimil Babka <vbabka@suse.cz>
+Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
+---
+ mm/slub.c | 231 ++++++++++++++++++++++++++++++++++++++++++++++++--------------
+ 1 file changed, 179 insertions(+), 52 deletions(-)
+
+--- a/mm/slub.c
++++ b/mm/slub.c
+@@ -1324,17 +1324,14 @@ static inline int alloc_consistency_chec
+ }
+
+ static noinline int alloc_debug_processing(struct kmem_cache *s,
+- struct slab *slab,
+- void *object, unsigned long addr)
++ struct slab *slab, void *object)
+ {
+ if (s->flags & SLAB_CONSISTENCY_CHECKS) {
+ if (!alloc_consistency_checks(s, slab, object))
+ goto bad;
+ }
+
+- /* Success perform special debug activities for allocs */
+- if (s->flags & SLAB_STORE_USER)
+- set_track(s, object, TRACK_ALLOC, addr);
++ /* Success. Perform special debug activities for allocs */
+ trace(s, slab, object, 1);
+ init_object(s, object, SLUB_RED_ACTIVE);
+ return 1;
+@@ -1604,16 +1601,18 @@ static inline
+ void setup_slab_debug(struct kmem_cache *s, struct slab *slab, void *addr) {}
+
+ static inline int alloc_debug_processing(struct kmem_cache *s,
+- struct slab *slab, void *object, unsigned long addr) { return 0; }
++ struct slab *slab, void *object) { return 0; }
+
+-static inline int free_debug_processing(
++static inline void free_debug_processing(
+ struct kmem_cache *s, struct slab *slab,
+ void *head, void *tail, int bulk_cnt,
+- unsigned long addr) { return 0; }
++ unsigned long addr) {}
+
+ static inline void slab_pad_check(struct kmem_cache *s, struct slab *slab) {}
+ static inline int check_object(struct kmem_cache *s, struct slab *slab,
+ void *object, u8 val) { return 1; }
++static inline void set_track(struct kmem_cache *s, void *object,
++ enum track_item alloc, unsigned long addr) {}
+ static inline void add_full(struct kmem_cache *s, struct kmem_cache_node *n,
+ struct slab *slab) {}
+ static inline void remove_full(struct kmem_cache *s, struct kmem_cache_node *n,
+@@ -1919,11 +1918,13 @@ static struct slab *allocate_slab(struct
+ */
+ slab = alloc_slab_page(alloc_gfp, node, oo);
+ if (unlikely(!slab))
+- goto out;
++ return NULL;
+ stat(s, ORDER_FALLBACK);
+ }
+
+ slab->objects = oo_objects(oo);
++ slab->inuse = 0;
++ slab->frozen = 0;
+
+ account_slab(slab, oo_order(oo), s, flags);
+
+@@ -1950,15 +1951,6 @@ static struct slab *allocate_slab(struct
+ set_freepointer(s, p, NULL);
+ }
+
+- slab->inuse = slab->objects;
+- slab->frozen = 1;
+-
+-out:
+- if (!slab)
+- return NULL;
+-
+- inc_slabs_node(s, slab_nid(slab), slab->objects);
+-
+ return slab;
+ }
+
+@@ -2046,6 +2038,75 @@ static inline void remove_partial(struct
+ }
+
+ /*
++ * Called only for kmem_cache_debug() caches instead of acquire_slab(), with a
++ * slab from the n->partial list. Remove only a single object from the slab, do
++ * the alloc_debug_processing() checks and leave the slab on the list, or move
++ * it to full list if it was the last free object.
++ */
++static void *alloc_single_from_partial(struct kmem_cache *s,
++ struct kmem_cache_node *n, struct slab *slab)
++{
++ void *object;
++
++ lockdep_assert_held(&n->list_lock);
++
++ object = slab->freelist;
++ slab->freelist = get_freepointer(s, object);
++ slab->inuse++;
++
++ if (!alloc_debug_processing(s, slab, object)) {
++ remove_partial(n, slab);
++ return NULL;
++ }
++
++ if (slab->inuse == slab->objects) {
++ remove_partial(n, slab);
++ add_full(s, n, slab);
++ }
++
++ return object;
++}
++
++/*
++ * Called only for kmem_cache_debug() caches to allocate from a freshly
++ * allocated slab. Allocate a single object instead of whole freelist
++ * and put the slab to the partial (or full) list.
++ */
++static void *alloc_single_from_new_slab(struct kmem_cache *s,
++ struct slab *slab)
++{
++ int nid = slab_nid(slab);
++ struct kmem_cache_node *n = get_node(s, nid);
++ unsigned long flags;
++ void *object;
++
++
++ object = slab->freelist;
++ slab->freelist = get_freepointer(s, object);
++ slab->inuse = 1;
++
++ if (!alloc_debug_processing(s, slab, object))
++ /*
++ * It's not really expected that this would fail on a
++ * freshly allocated slab, but a concurrent memory
++ * corruption in theory could cause that.
++ */
++ return NULL;
++
++ spin_lock_irqsave(&n->list_lock, flags);
++
++ if (slab->inuse == slab->objects)
++ add_full(s, n, slab);
++ else
++ add_partial(n, slab, DEACTIVATE_TO_HEAD);
++
++ inc_slabs_node(s, nid, slab->objects);
++ spin_unlock_irqrestore(&n->list_lock, flags);
++
++ return object;
++}
++
++/*
+ * Remove slab from the partial list, freeze it and
+ * return the pointer to the freelist.
+ *
+@@ -2125,6 +2186,13 @@ static void *get_partial_node(struct kme
+ if (!pfmemalloc_match(slab, gfpflags))
+ continue;
+
++ if (kmem_cache_debug(s)) {
++ object = alloc_single_from_partial(s, n, slab);
++ if (object)
++ break;
++ continue;
++ }
++
+ t = acquire_slab(s, n, slab, object == NULL);
+ if (!t)
+ break;
+@@ -2733,31 +2801,39 @@ static inline unsigned long node_nr_objs
+ }
+
+ /* Supports checking bulk free of a constructed freelist */
+-static noinline int free_debug_processing(
++static noinline void free_debug_processing(
+ struct kmem_cache *s, struct slab *slab,
+ void *head, void *tail, int bulk_cnt,
+ unsigned long addr)
+ {
+ struct kmem_cache_node *n = get_node(s, slab_nid(slab));
++ struct slab *slab_free = NULL;
+ void *object = head;
+ int cnt = 0;
+- unsigned long flags, flags2;
+- int ret = 0;
++ unsigned long flags;
++ bool checks_ok = false;
+ depot_stack_handle_t handle = 0;
+
+ if (s->flags & SLAB_STORE_USER)
+ handle = set_track_prepare();
+
+ spin_lock_irqsave(&n->list_lock, flags);
+- slab_lock(slab, &flags2);
+
+ if (s->flags & SLAB_CONSISTENCY_CHECKS) {
+ if (!check_slab(s, slab))
+ goto out;
+ }
+
++ if (slab->inuse < bulk_cnt) {
++ slab_err(s, slab, "Slab has %d allocated objects but %d are to be freed\n",
++ slab->inuse, bulk_cnt);
++ goto out;
++ }
++
+ next_object:
+- cnt++;
++
++ if (++cnt > bulk_cnt)
++ goto out_cnt;
+
+ if (s->flags & SLAB_CONSISTENCY_CHECKS) {
+ if (!free_consistency_checks(s, slab, object, addr))
+@@ -2775,18 +2851,56 @@ static noinline int free_debug_processin
+ object = get_freepointer(s, object);
+ goto next_object;
+ }
+- ret = 1;
++ checks_ok = true;
+
+-out:
++out_cnt:
+ if (cnt != bulk_cnt)
+- slab_err(s, slab, "Bulk freelist count(%d) invalid(%d)\n",
++ slab_err(s, slab, "Bulk free expected %d objects but found %d\n",
+ bulk_cnt, cnt);
+
+- slab_unlock(slab, &flags2);
++out:
++ if (checks_ok) {
++ void *prior = slab->freelist;
++
++ /* Perform the actual freeing while we still hold the locks */
++ slab->inuse -= cnt;
++ set_freepointer(s, tail, prior);
++ slab->freelist = head;
++
++ /* Do we need to remove the slab from full or partial list? */
++ if (!prior) {
++ remove_full(s, n, slab);
++ } else if (slab->inuse == 0) {
++ remove_partial(n, slab);
++ stat(s, FREE_REMOVE_PARTIAL);
++ }
++
++ /* Do we need to discard the slab or add to partial list? */
++ if (slab->inuse == 0) {
++ slab_free = slab;
++ } else if (!prior) {
++ add_partial(n, slab, DEACTIVATE_TO_TAIL);
++ stat(s, FREE_ADD_PARTIAL);
++ }
++ }
++
++ if (slab_free) {
++ /*
++ * Update the counters while still holding n->list_lock to
++ * prevent spurious validation warnings
++ */
++ dec_slabs_node(s, slab_nid(slab_free), slab_free->objects);
++ }
++
+ spin_unlock_irqrestore(&n->list_lock, flags);
+- if (!ret)
++
++ if (!checks_ok)
+ slab_fix(s, "Object at 0x%p not freed", object);
+- return ret;
++
++ if (slab_free) {
++ stat(s, FREE_SLAB);
++ free_slab(s, slab_free);
++ }
+ }
+ #endif /* CONFIG_SLUB_DEBUG */
+
+@@ -3036,36 +3150,52 @@ static void *___slab_alloc(struct kmem_c
+ return NULL;
+ }
+
++ stat(s, ALLOC_SLAB);
++
++ if (kmem_cache_debug(s)) {
++ freelist = alloc_single_from_new_slab(s, slab);
++
++ if (unlikely(!freelist))
++ goto new_objects;
++
++ if (s->flags & SLAB_STORE_USER)
++ set_track(s, freelist, TRACK_ALLOC, addr);
++
++ return freelist;
++ }
++
+ /*
+ * No other reference to the slab yet so we can
+ * muck around with it freely without cmpxchg
+ */
+ freelist = slab->freelist;
+ slab->freelist = NULL;
++ slab->inuse = slab->objects;
++ slab->frozen = 1;
+
+- stat(s, ALLOC_SLAB);
++ inc_slabs_node(s, slab_nid(slab), slab->objects);
+
+ check_new_slab:
+
+ if (kmem_cache_debug(s)) {
+- if (!alloc_debug_processing(s, slab, freelist, addr)) {
+- /* Slab failed checks. Next slab needed */
+- goto new_slab;
+- } else {
+- /*
+- * For debug case, we don't load freelist so that all
+- * allocations go through alloc_debug_processing()
+- */
+- goto return_single;
+- }
++ /*
++ * For debug caches here we had to go through
++ * alloc_single_from_partial() so just store the tracking info
++ * and return the object
++ */
++ if (s->flags & SLAB_STORE_USER)
++ set_track(s, freelist, TRACK_ALLOC, addr);
++ return freelist;
+ }
+
+- if (unlikely(!pfmemalloc_match(slab, gfpflags)))
++ if (unlikely(!pfmemalloc_match(slab, gfpflags))) {
+ /*
+ * For !pfmemalloc_match() case we don't load freelist so that
+ * we don't make further mismatched allocations easier.
+ */
+- goto return_single;
++ deactivate_slab(s, slab, get_freepointer(s, freelist));
++ return freelist;
++ }
+
+ retry_load_slab:
+
+@@ -3089,11 +3219,6 @@ static void *___slab_alloc(struct kmem_c
+ c->slab = slab;
+
+ goto load_freelist;
+-
+-return_single:
+-
+- deactivate_slab(s, slab, get_freepointer(s, freelist));
+- return freelist;
+ }
+
+ /*
+@@ -3341,9 +3466,10 @@ static void __slab_free(struct kmem_cach
+ if (kfence_free(head))
+ return;
+
+- if (kmem_cache_debug(s) &&
+- !free_debug_processing(s, slab, head, tail, cnt, addr))
++ if (kmem_cache_debug(s)) {
++ free_debug_processing(s, slab, head, tail, cnt, addr);
+ return;
++ }
+
+ do {
+ if (unlikely(n)) {
+@@ -3936,6 +4062,7 @@ static void early_kmem_cache_node_alloc(
+ slab = new_slab(kmem_cache_node, GFP_NOWAIT, node);
+
+ BUG_ON(!slab);
++ inc_slabs_node(kmem_cache_node, slab_nid(slab), slab->objects);
+ if (slab_nid(slab) != node) {
+ pr_err("SLUB: Unable to allocate memory from node %d\n", node);
+ pr_err("SLUB: Allocating a useless per node structure in order to be able to continue\n");
+@@ -3950,7 +4077,6 @@ static void early_kmem_cache_node_alloc(
+ n = kasan_slab_alloc(kmem_cache_node, n, GFP_KERNEL, false);
+ slab->freelist = get_freepointer(kmem_cache_node, n);
+ slab->inuse = 1;
+- slab->frozen = 0;
+ kmem_cache_node->node[node] = n;
+ init_kmem_cache_node(n);
+ inc_slabs_node(kmem_cache_node, node, slab->objects);
+@@ -4611,6 +4737,7 @@ static int __kmem_cache_do_shrink(struct
+ if (free == slab->objects) {
+ list_move(&slab->slab_list, &discard);
+ n->nr_partial--;
++ dec_slabs_node(s, node, slab->objects);
+ } else if (free <= SHRINK_PROMOTE_MAX)
+ list_move(&slab->slab_list, promote + free - 1);
+ }
+@@ -4626,7 +4753,7 @@ static int __kmem_cache_do_shrink(struct
+
+ /* Release empty slabs */
+ list_for_each_entry_safe(slab, t, &discard, slab_list)
+- discard_slab(s, slab);
++ free_slab(s, slab);
+
+ if (slabs_node(s, node))
+ ret = 1;
+@@ -5601,7 +5728,7 @@ static ssize_t validate_store(struct kme
+ {
+ int ret = -EINVAL;
+
+- if (buf[0] == '1') {
++ if (buf[0] == '1' && kmem_cache_debug(s)) {
+ ret = validate_slab_cache(s);
+ if (ret >= 0)
+ ret = length;
diff --git a/debian/patches-rt/0002-net-Remove-the-obsolte-u64_stats_fetch_-_irq-users.patch b/debian/patches-rt/0002-net-Remove-the-obsolte-u64_stats_fetch_-_irq-users.patch
new file mode 100644
index 000000000..5528c548e
--- /dev/null
+++ b/debian/patches-rt/0002-net-Remove-the-obsolte-u64_stats_fetch_-_irq-users.patch
@@ -0,0 +1,1996 @@
+From: Thomas Gleixner <tglx@linutronix.de>
+Date: Thu, 25 Aug 2022 16:15:44 +0200
+Subject: [PATCH 2/4] net: Remove the obsolte u64_stats_fetch_*_irq() users (part one).
+Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/6.0/older/patches-6.0-rt11.tar.xz
+
+Now that the 32bit UP oddity is gone and 32bit uses always a sequence
+count, there is no need for the fetch_irq() variants anymore.
+
+Convert to the regular interface.
+
+Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
+Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
+Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org>
+---
+ drivers/net/ethernet/alacritech/slic.h | 12 +++----
+ drivers/net/ethernet/amazon/ena/ena_ethtool.c | 4 +-
+ drivers/net/ethernet/amazon/ena/ena_netdev.c | 12 +++----
+ drivers/net/ethernet/aquantia/atlantic/aq_ring.c | 8 ++--
+ drivers/net/ethernet/asix/ax88796c_main.c | 4 +-
+ drivers/net/ethernet/broadcom/b44.c | 8 ++--
+ drivers/net/ethernet/broadcom/bcmsysport.c | 12 +++----
+ drivers/net/ethernet/cortina/gemini.c | 24 +++++++-------
+ drivers/net/ethernet/emulex/benet/be_ethtool.c | 12 +++----
+ drivers/net/ethernet/emulex/benet/be_main.c | 16 ++++-----
+ drivers/net/ethernet/fungible/funeth/funeth_txrx.h | 4 +-
+ drivers/net/ethernet/google/gve/gve_ethtool.c | 16 ++++-----
+ drivers/net/ethernet/google/gve/gve_main.c | 12 +++----
+ drivers/net/ethernet/hisilicon/hns3/hns3_enet.c | 4 +-
+ drivers/net/ethernet/huawei/hinic/hinic_rx.c | 4 +-
+ drivers/net/ethernet/huawei/hinic/hinic_tx.c | 4 +-
+ drivers/net/ethernet/intel/fm10k/fm10k_netdev.c | 8 ++--
+ drivers/net/ethernet/intel/i40e/i40e_ethtool.c | 8 ++--
+ drivers/net/ethernet/intel/i40e/i40e_main.c | 20 +++++------
+ drivers/net/ethernet/intel/iavf/iavf_ethtool.c | 8 ++--
+ drivers/net/ethernet/intel/ice/ice_main.c | 4 +-
+ drivers/net/ethernet/intel/igb/igb_ethtool.c | 12 +++----
+ drivers/net/ethernet/intel/igb/igb_main.c | 8 ++--
+ drivers/net/ethernet/intel/igc/igc_ethtool.c | 12 +++----
+ drivers/net/ethernet/intel/igc/igc_main.c | 8 ++--
+ drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c | 8 ++--
+ drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 8 ++--
+ drivers/net/ethernet/intel/ixgbevf/ethtool.c | 12 +++----
+ drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c | 8 ++--
+ drivers/net/ethernet/marvell/mvneta.c | 8 ++--
+ drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c | 8 ++--
+ drivers/net/ethernet/marvell/sky2.c | 8 ++--
+ drivers/net/ethernet/mediatek/mtk_eth_soc.c | 8 ++--
+ drivers/net/ethernet/mellanox/mlxsw/spectrum.c | 4 +-
+ drivers/net/ethernet/microsoft/mana/mana_en.c | 8 ++--
+ drivers/net/ethernet/microsoft/mana/mana_ethtool.c | 8 ++--
+ drivers/net/ethernet/netronome/nfp/nfp_net_common.c | 8 ++--
+ drivers/net/ethernet/netronome/nfp/nfp_net_ethtool.c | 8 ++--
+ drivers/net/ethernet/netronome/nfp/nfp_net_repr.c | 4 +-
+ drivers/net/ethernet/nvidia/forcedeth.c | 8 ++--
+ drivers/net/ethernet/qualcomm/rmnet/rmnet_vnd.c | 4 +-
+ drivers/net/ethernet/realtek/8139too.c | 8 ++--
+ drivers/net/ethernet/socionext/sni_ave.c | 8 ++--
+ drivers/net/ethernet/ti/am65-cpsw-nuss.c | 4 +-
+ drivers/net/ethernet/ti/netcp_core.c | 8 ++--
+ drivers/net/ethernet/via/via-rhine.c | 8 ++--
+ drivers/net/hyperv/netvsc_drv.c | 32 +++++++++----------
+ drivers/net/ifb.c | 12 +++----
+ drivers/net/ipvlan/ipvlan_main.c | 4 +-
+ drivers/net/loopback.c | 4 +-
+ drivers/net/macsec.c | 12 +++----
+ drivers/net/macvlan.c | 4 +-
+ drivers/net/mhi_net.c | 8 ++--
+ drivers/net/netdevsim/netdev.c | 4 +-
+ drivers/net/team/team.c | 4 +-
+ drivers/net/team/team_mode_loadbalance.c | 4 +-
+ drivers/net/veth.c | 12 +++----
+ drivers/net/virtio_net.c | 16 ++++-----
+ drivers/net/vrf.c | 4 +-
+ drivers/net/vxlan/vxlan_vnifilter.c | 4 +-
+ drivers/net/wwan/mhi_wwan_mbim.c | 8 ++--
+ drivers/net/xen-netfront.c | 8 ++--
+ 62 files changed, 270 insertions(+), 270 deletions(-)
+
+--- a/drivers/net/ethernet/alacritech/slic.h
++++ b/drivers/net/ethernet/alacritech/slic.h
+@@ -288,13 +288,13 @@ do { \
+ u64_stats_update_end(&(st)->syncp); \
+ } while (0)
+
+-#define SLIC_GET_STATS_COUNTER(newst, st, counter) \
+-{ \
+- unsigned int start; \
++#define SLIC_GET_STATS_COUNTER(newst, st, counter) \
++{ \
++ unsigned int start; \
+ do { \
+- start = u64_stats_fetch_begin_irq(&(st)->syncp); \
+- newst = (st)->counter; \
+- } while (u64_stats_fetch_retry_irq(&(st)->syncp, start)); \
++ start = u64_stats_fetch_begin(&(st)->syncp); \
++ newst = (st)->counter; \
++ } while (u64_stats_fetch_retry(&(st)->syncp, start)); \
+ }
+
+ struct slic_upr {
+--- a/drivers/net/ethernet/amazon/ena/ena_ethtool.c
++++ b/drivers/net/ethernet/amazon/ena/ena_ethtool.c
+@@ -118,9 +118,9 @@ static void ena_safe_update_stat(u64 *sr
+ unsigned int start;
+
+ do {
+- start = u64_stats_fetch_begin_irq(syncp);
++ start = u64_stats_fetch_begin(syncp);
+ *(dst) = *src;
+- } while (u64_stats_fetch_retry_irq(syncp, start));
++ } while (u64_stats_fetch_retry(syncp, start));
+ }
+
+ static void ena_queue_stats(struct ena_adapter *adapter, u64 **data)
+--- a/drivers/net/ethernet/amazon/ena/ena_netdev.c
++++ b/drivers/net/ethernet/amazon/ena/ena_netdev.c
+@@ -3270,10 +3270,10 @@ static void ena_get_stats64(struct net_d
+ tx_ring = &adapter->tx_ring[i];
+
+ do {
+- start = u64_stats_fetch_begin_irq(&tx_ring->syncp);
++ start = u64_stats_fetch_begin(&tx_ring->syncp);
+ packets = tx_ring->tx_stats.cnt;
+ bytes = tx_ring->tx_stats.bytes;
+- } while (u64_stats_fetch_retry_irq(&tx_ring->syncp, start));
++ } while (u64_stats_fetch_retry(&tx_ring->syncp, start));
+
+ stats->tx_packets += packets;
+ stats->tx_bytes += bytes;
+@@ -3281,20 +3281,20 @@ static void ena_get_stats64(struct net_d
+ rx_ring = &adapter->rx_ring[i];
+
+ do {
+- start = u64_stats_fetch_begin_irq(&rx_ring->syncp);
++ start = u64_stats_fetch_begin(&rx_ring->syncp);
+ packets = rx_ring->rx_stats.cnt;
+ bytes = rx_ring->rx_stats.bytes;
+- } while (u64_stats_fetch_retry_irq(&rx_ring->syncp, start));
++ } while (u64_stats_fetch_retry(&rx_ring->syncp, start));
+
+ stats->rx_packets += packets;
+ stats->rx_bytes += bytes;
+ }
+
+ do {
+- start = u64_stats_fetch_begin_irq(&adapter->syncp);
++ start = u64_stats_fetch_begin(&adapter->syncp);
+ rx_drops = adapter->dev_stats.rx_drops;
+ tx_drops = adapter->dev_stats.tx_drops;
+- } while (u64_stats_fetch_retry_irq(&adapter->syncp, start));
++ } while (u64_stats_fetch_retry(&adapter->syncp, start));
+
+ stats->rx_dropped = rx_drops;
+ stats->tx_dropped = tx_drops;
+--- a/drivers/net/ethernet/aquantia/atlantic/aq_ring.c
++++ b/drivers/net/ethernet/aquantia/atlantic/aq_ring.c
+@@ -934,7 +934,7 @@ unsigned int aq_ring_fill_stats_data(str
+ /* This data should mimic aq_ethtool_queue_rx_stat_names structure */
+ do {
+ count = 0;
+- start = u64_stats_fetch_begin_irq(&self->stats.rx.syncp);
++ start = u64_stats_fetch_begin(&self->stats.rx.syncp);
+ data[count] = self->stats.rx.packets;
+ data[++count] = self->stats.rx.jumbo_packets;
+ data[++count] = self->stats.rx.lro_packets;
+@@ -951,15 +951,15 @@ unsigned int aq_ring_fill_stats_data(str
+ data[++count] = self->stats.rx.xdp_tx;
+ data[++count] = self->stats.rx.xdp_invalid;
+ data[++count] = self->stats.rx.xdp_redirect;
+- } while (u64_stats_fetch_retry_irq(&self->stats.rx.syncp, start));
++ } while (u64_stats_fetch_retry(&self->stats.rx.syncp, start));
+ } else {
+ /* This data should mimic aq_ethtool_queue_tx_stat_names structure */
+ do {
+ count = 0;
+- start = u64_stats_fetch_begin_irq(&self->stats.tx.syncp);
++ start = u64_stats_fetch_begin(&self->stats.tx.syncp);
+ data[count] = self->stats.tx.packets;
+ data[++count] = self->stats.tx.queue_restarts;
+- } while (u64_stats_fetch_retry_irq(&self->stats.tx.syncp, start));
++ } while (u64_stats_fetch_retry(&self->stats.tx.syncp, start));
+ }
+
+ return ++count;
+--- a/drivers/net/ethernet/asix/ax88796c_main.c
++++ b/drivers/net/ethernet/asix/ax88796c_main.c
+@@ -662,12 +662,12 @@ static void ax88796c_get_stats64(struct
+ s = per_cpu_ptr(ax_local->stats, cpu);
+
+ do {
+- start = u64_stats_fetch_begin_irq(&s->syncp);
++ start = u64_stats_fetch_begin(&s->syncp);
+ rx_packets = u64_stats_read(&s->rx_packets);
+ rx_bytes = u64_stats_read(&s->rx_bytes);
+ tx_packets = u64_stats_read(&s->tx_packets);
+ tx_bytes = u64_stats_read(&s->tx_bytes);
+- } while (u64_stats_fetch_retry_irq(&s->syncp, start));
++ } while (u64_stats_fetch_retry(&s->syncp, start));
+
+ stats->rx_packets += rx_packets;
+ stats->rx_bytes += rx_bytes;
+--- a/drivers/net/ethernet/broadcom/b44.c
++++ b/drivers/net/ethernet/broadcom/b44.c
+@@ -1680,7 +1680,7 @@ static void b44_get_stats64(struct net_d
+ unsigned int start;
+
+ do {
+- start = u64_stats_fetch_begin_irq(&hwstat->syncp);
++ start = u64_stats_fetch_begin(&hwstat->syncp);
+
+ /* Convert HW stats into rtnl_link_stats64 stats. */
+ nstat->rx_packets = hwstat->rx_pkts;
+@@ -1714,7 +1714,7 @@ static void b44_get_stats64(struct net_d
+ /* Carrier lost counter seems to be broken for some devices */
+ nstat->tx_carrier_errors = hwstat->tx_carrier_lost;
+ #endif
+- } while (u64_stats_fetch_retry_irq(&hwstat->syncp, start));
++ } while (u64_stats_fetch_retry(&hwstat->syncp, start));
+
+ }
+
+@@ -2082,12 +2082,12 @@ static void b44_get_ethtool_stats(struct
+ do {
+ data_src = &hwstat->tx_good_octets;
+ data_dst = data;
+- start = u64_stats_fetch_begin_irq(&hwstat->syncp);
++ start = u64_stats_fetch_begin(&hwstat->syncp);
+
+ for (i = 0; i < ARRAY_SIZE(b44_gstrings); i++)
+ *data_dst++ = *data_src++;
+
+- } while (u64_stats_fetch_retry_irq(&hwstat->syncp, start));
++ } while (u64_stats_fetch_retry(&hwstat->syncp, start));
+ }
+
+ static void b44_get_wol(struct net_device *dev, struct ethtool_wolinfo *wol)
+--- a/drivers/net/ethernet/broadcom/bcmsysport.c
++++ b/drivers/net/ethernet/broadcom/bcmsysport.c
+@@ -457,10 +457,10 @@ static void bcm_sysport_update_tx_stats(
+ for (q = 0; q < priv->netdev->num_tx_queues; q++) {
+ ring = &priv->tx_rings[q];
+ do {
+- start = u64_stats_fetch_begin_irq(&priv->syncp);
++ start = u64_stats_fetch_begin(&priv->syncp);
+ bytes = ring->bytes;
+ packets = ring->packets;
+- } while (u64_stats_fetch_retry_irq(&priv->syncp, start));
++ } while (u64_stats_fetch_retry(&priv->syncp, start));
+
+ *tx_bytes += bytes;
+ *tx_packets += packets;
+@@ -504,9 +504,9 @@ static void bcm_sysport_get_stats(struct
+ if (s->stat_sizeof == sizeof(u64) &&
+ s->type == BCM_SYSPORT_STAT_NETDEV64) {
+ do {
+- start = u64_stats_fetch_begin_irq(syncp);
++ start = u64_stats_fetch_begin(syncp);
+ data[i] = *(u64 *)p;
+- } while (u64_stats_fetch_retry_irq(syncp, start));
++ } while (u64_stats_fetch_retry(syncp, start));
+ } else
+ data[i] = *(u32 *)p;
+ j++;
+@@ -1878,10 +1878,10 @@ static void bcm_sysport_get_stats64(stru
+ &stats->tx_packets);
+
+ do {
+- start = u64_stats_fetch_begin_irq(&priv->syncp);
++ start = u64_stats_fetch_begin(&priv->syncp);
+ stats->rx_packets = stats64->rx_packets;
+ stats->rx_bytes = stats64->rx_bytes;
+- } while (u64_stats_fetch_retry_irq(&priv->syncp, start));
++ } while (u64_stats_fetch_retry(&priv->syncp, start));
+ }
+
+ static void bcm_sysport_netif_start(struct net_device *dev)
+--- a/drivers/net/ethernet/cortina/gemini.c
++++ b/drivers/net/ethernet/cortina/gemini.c
+@@ -1919,7 +1919,7 @@ static void gmac_get_stats64(struct net_
+
+ /* Racing with RX NAPI */
+ do {
+- start = u64_stats_fetch_begin_irq(&port->rx_stats_syncp);
++ start = u64_stats_fetch_begin(&port->rx_stats_syncp);
+
+ stats->rx_packets = port->stats.rx_packets;
+ stats->rx_bytes = port->stats.rx_bytes;
+@@ -1931,11 +1931,11 @@ static void gmac_get_stats64(struct net_
+ stats->rx_crc_errors = port->stats.rx_crc_errors;
+ stats->rx_frame_errors = port->stats.rx_frame_errors;
+
+- } while (u64_stats_fetch_retry_irq(&port->rx_stats_syncp, start));
++ } while (u64_stats_fetch_retry(&port->rx_stats_syncp, start));
+
+ /* Racing with MIB and TX completion interrupts */
+ do {
+- start = u64_stats_fetch_begin_irq(&port->ir_stats_syncp);
++ start = u64_stats_fetch_begin(&port->ir_stats_syncp);
+
+ stats->tx_errors = port->stats.tx_errors;
+ stats->tx_packets = port->stats.tx_packets;
+@@ -1945,15 +1945,15 @@ static void gmac_get_stats64(struct net_
+ stats->rx_missed_errors = port->stats.rx_missed_errors;
+ stats->rx_fifo_errors = port->stats.rx_fifo_errors;
+
+- } while (u64_stats_fetch_retry_irq(&port->ir_stats_syncp, start));
++ } while (u64_stats_fetch_retry(&port->ir_stats_syncp, start));
+
+ /* Racing with hard_start_xmit */
+ do {
+- start = u64_stats_fetch_begin_irq(&port->tx_stats_syncp);
++ start = u64_stats_fetch_begin(&port->tx_stats_syncp);
+
+ stats->tx_dropped = port->stats.tx_dropped;
+
+- } while (u64_stats_fetch_retry_irq(&port->tx_stats_syncp, start));
++ } while (u64_stats_fetch_retry(&port->tx_stats_syncp, start));
+
+ stats->rx_dropped += stats->rx_missed_errors;
+ }
+@@ -2031,18 +2031,18 @@ static void gmac_get_ethtool_stats(struc
+ /* Racing with MIB interrupt */
+ do {
+ p = values;
+- start = u64_stats_fetch_begin_irq(&port->ir_stats_syncp);
++ start = u64_stats_fetch_begin(&port->ir_stats_syncp);
+
+ for (i = 0; i < RX_STATS_NUM; i++)
+ *p++ = port->hw_stats[i];
+
+- } while (u64_stats_fetch_retry_irq(&port->ir_stats_syncp, start));
++ } while (u64_stats_fetch_retry(&port->ir_stats_syncp, start));
+ values = p;
+
+ /* Racing with RX NAPI */
+ do {
+ p = values;
+- start = u64_stats_fetch_begin_irq(&port->rx_stats_syncp);
++ start = u64_stats_fetch_begin(&port->rx_stats_syncp);
+
+ for (i = 0; i < RX_STATUS_NUM; i++)
+ *p++ = port->rx_stats[i];
+@@ -2050,13 +2050,13 @@ static void gmac_get_ethtool_stats(struc
+ *p++ = port->rx_csum_stats[i];
+ *p++ = port->rx_napi_exits;
+
+- } while (u64_stats_fetch_retry_irq(&port->rx_stats_syncp, start));
++ } while (u64_stats_fetch_retry(&port->rx_stats_syncp, start));
+ values = p;
+
+ /* Racing with TX start_xmit */
+ do {
+ p = values;
+- start = u64_stats_fetch_begin_irq(&port->tx_stats_syncp);
++ start = u64_stats_fetch_begin(&port->tx_stats_syncp);
+
+ for (i = 0; i < TX_MAX_FRAGS; i++) {
+ *values++ = port->tx_frag_stats[i];
+@@ -2065,7 +2065,7 @@ static void gmac_get_ethtool_stats(struc
+ *values++ = port->tx_frags_linearized;
+ *values++ = port->tx_hw_csummed;
+
+- } while (u64_stats_fetch_retry_irq(&port->tx_stats_syncp, start));
++ } while (u64_stats_fetch_retry(&port->tx_stats_syncp, start));
+ }
+
+ static int gmac_get_ksettings(struct net_device *netdev,
+--- a/drivers/net/ethernet/emulex/benet/be_ethtool.c
++++ b/drivers/net/ethernet/emulex/benet/be_ethtool.c
+@@ -389,10 +389,10 @@ static void be_get_ethtool_stats(struct
+ struct be_rx_stats *stats = rx_stats(rxo);
+
+ do {
+- start = u64_stats_fetch_begin_irq(&stats->sync);
++ start = u64_stats_fetch_begin(&stats->sync);
+ data[base] = stats->rx_bytes;
+ data[base + 1] = stats->rx_pkts;
+- } while (u64_stats_fetch_retry_irq(&stats->sync, start));
++ } while (u64_stats_fetch_retry(&stats->sync, start));
+
+ for (i = 2; i < ETHTOOL_RXSTATS_NUM; i++) {
+ p = (u8 *)stats + et_rx_stats[i].offset;
+@@ -405,19 +405,19 @@ static void be_get_ethtool_stats(struct
+ struct be_tx_stats *stats = tx_stats(txo);
+
+ do {
+- start = u64_stats_fetch_begin_irq(&stats->sync_compl);
++ start = u64_stats_fetch_begin(&stats->sync_compl);
+ data[base] = stats->tx_compl;
+- } while (u64_stats_fetch_retry_irq(&stats->sync_compl, start));
++ } while (u64_stats_fetch_retry(&stats->sync_compl, start));
+
+ do {
+- start = u64_stats_fetch_begin_irq(&stats->sync);
++ start = u64_stats_fetch_begin(&stats->sync);
+ for (i = 1; i < ETHTOOL_TXSTATS_NUM; i++) {
+ p = (u8 *)stats + et_tx_stats[i].offset;
+ data[base + i] =
+ (et_tx_stats[i].size == sizeof(u64)) ?
+ *(u64 *)p : *(u32 *)p;
+ }
+- } while (u64_stats_fetch_retry_irq(&stats->sync, start));
++ } while (u64_stats_fetch_retry(&stats->sync, start));
+ base += ETHTOOL_TXSTATS_NUM;
+ }
+ }
+--- a/drivers/net/ethernet/emulex/benet/be_main.c
++++ b/drivers/net/ethernet/emulex/benet/be_main.c
+@@ -665,10 +665,10 @@ static void be_get_stats64(struct net_de
+ const struct be_rx_stats *rx_stats = rx_stats(rxo);
+
+ do {
+- start = u64_stats_fetch_begin_irq(&rx_stats->sync);
++ start = u64_stats_fetch_begin(&rx_stats->sync);
+ pkts = rx_stats(rxo)->rx_pkts;
+ bytes = rx_stats(rxo)->rx_bytes;
+- } while (u64_stats_fetch_retry_irq(&rx_stats->sync, start));
++ } while (u64_stats_fetch_retry(&rx_stats->sync, start));
+ stats->rx_packets += pkts;
+ stats->rx_bytes += bytes;
+ stats->multicast += rx_stats(rxo)->rx_mcast_pkts;
+@@ -680,10 +680,10 @@ static void be_get_stats64(struct net_de
+ const struct be_tx_stats *tx_stats = tx_stats(txo);
+
+ do {
+- start = u64_stats_fetch_begin_irq(&tx_stats->sync);
++ start = u64_stats_fetch_begin(&tx_stats->sync);
+ pkts = tx_stats(txo)->tx_pkts;
+ bytes = tx_stats(txo)->tx_bytes;
+- } while (u64_stats_fetch_retry_irq(&tx_stats->sync, start));
++ } while (u64_stats_fetch_retry(&tx_stats->sync, start));
+ stats->tx_packets += pkts;
+ stats->tx_bytes += bytes;
+ }
+@@ -2155,16 +2155,16 @@ static int be_get_new_eqd(struct be_eq_o
+
+ for_all_rx_queues_on_eq(adapter, eqo, rxo, i) {
+ do {
+- start = u64_stats_fetch_begin_irq(&rxo->stats.sync);
++ start = u64_stats_fetch_begin(&rxo->stats.sync);
+ rx_pkts += rxo->stats.rx_pkts;
+- } while (u64_stats_fetch_retry_irq(&rxo->stats.sync, start));
++ } while (u64_stats_fetch_retry(&rxo->stats.sync, start));
+ }
+
+ for_all_tx_queues_on_eq(adapter, eqo, txo, i) {
+ do {
+- start = u64_stats_fetch_begin_irq(&txo->stats.sync);
++ start = u64_stats_fetch_begin(&txo->stats.sync);
+ tx_pkts += txo->stats.tx_reqs;
+- } while (u64_stats_fetch_retry_irq(&txo->stats.sync, start));
++ } while (u64_stats_fetch_retry(&txo->stats.sync, start));
+ }
+
+ /* Skip, if wrapped around or first calculation */
+--- a/drivers/net/ethernet/fungible/funeth/funeth_txrx.h
++++ b/drivers/net/ethernet/fungible/funeth/funeth_txrx.h
+@@ -206,9 +206,9 @@ struct funeth_rxq {
+
+ #define FUN_QSTAT_READ(q, seq, stats_copy) \
+ do { \
+- seq = u64_stats_fetch_begin_irq(&(q)->syncp); \
++ seq = u64_stats_fetch_begin(&(q)->syncp); \
+ stats_copy = (q)->stats; \
+- } while (u64_stats_fetch_retry_irq(&(q)->syncp, (seq)))
++ } while (u64_stats_fetch_retry(&(q)->syncp, (seq)))
+
+ #define FUN_INT_NAME_LEN (IFNAMSIZ + 16)
+
+--- a/drivers/net/ethernet/google/gve/gve_ethtool.c
++++ b/drivers/net/ethernet/google/gve/gve_ethtool.c
+@@ -177,14 +177,14 @@ gve_get_ethtool_stats(struct net_device
+ struct gve_rx_ring *rx = &priv->rx[ring];
+
+ start =
+- u64_stats_fetch_begin_irq(&priv->rx[ring].statss);
++ u64_stats_fetch_begin(&priv->rx[ring].statss);
+ tmp_rx_pkts = rx->rpackets;
+ tmp_rx_bytes = rx->rbytes;
+ tmp_rx_skb_alloc_fail = rx->rx_skb_alloc_fail;
+ tmp_rx_buf_alloc_fail = rx->rx_buf_alloc_fail;
+ tmp_rx_desc_err_dropped_pkt =
+ rx->rx_desc_err_dropped_pkt;
+- } while (u64_stats_fetch_retry_irq(&priv->rx[ring].statss,
++ } while (u64_stats_fetch_retry(&priv->rx[ring].statss,
+ start));
+ rx_pkts += tmp_rx_pkts;
+ rx_bytes += tmp_rx_bytes;
+@@ -198,10 +198,10 @@ gve_get_ethtool_stats(struct net_device
+ if (priv->tx) {
+ do {
+ start =
+- u64_stats_fetch_begin_irq(&priv->tx[ring].statss);
++ u64_stats_fetch_begin(&priv->tx[ring].statss);
+ tmp_tx_pkts = priv->tx[ring].pkt_done;
+ tmp_tx_bytes = priv->tx[ring].bytes_done;
+- } while (u64_stats_fetch_retry_irq(&priv->tx[ring].statss,
++ } while (u64_stats_fetch_retry(&priv->tx[ring].statss,
+ start));
+ tx_pkts += tmp_tx_pkts;
+ tx_bytes += tmp_tx_bytes;
+@@ -259,13 +259,13 @@ gve_get_ethtool_stats(struct net_device
+ data[i++] = rx->fill_cnt - rx->cnt;
+ do {
+ start =
+- u64_stats_fetch_begin_irq(&priv->rx[ring].statss);
++ u64_stats_fetch_begin(&priv->rx[ring].statss);
+ tmp_rx_bytes = rx->rbytes;
+ tmp_rx_skb_alloc_fail = rx->rx_skb_alloc_fail;
+ tmp_rx_buf_alloc_fail = rx->rx_buf_alloc_fail;
+ tmp_rx_desc_err_dropped_pkt =
+ rx->rx_desc_err_dropped_pkt;
+- } while (u64_stats_fetch_retry_irq(&priv->rx[ring].statss,
++ } while (u64_stats_fetch_retry(&priv->rx[ring].statss,
+ start));
+ data[i++] = tmp_rx_bytes;
+ data[i++] = rx->rx_cont_packet_cnt;
+@@ -331,9 +331,9 @@ gve_get_ethtool_stats(struct net_device
+ }
+ do {
+ start =
+- u64_stats_fetch_begin_irq(&priv->tx[ring].statss);
++ u64_stats_fetch_begin(&priv->tx[ring].statss);
+ tmp_tx_bytes = tx->bytes_done;
+- } while (u64_stats_fetch_retry_irq(&priv->tx[ring].statss,
++ } while (u64_stats_fetch_retry(&priv->tx[ring].statss,
+ start));
+ data[i++] = tmp_tx_bytes;
+ data[i++] = tx->wake_queue;
+--- a/drivers/net/ethernet/google/gve/gve_main.c
++++ b/drivers/net/ethernet/google/gve/gve_main.c
+@@ -51,10 +51,10 @@ static void gve_get_stats(struct net_dev
+ for (ring = 0; ring < priv->rx_cfg.num_queues; ring++) {
+ do {
+ start =
+- u64_stats_fetch_begin_irq(&priv->rx[ring].statss);
++ u64_stats_fetch_begin(&priv->rx[ring].statss);
+ packets = priv->rx[ring].rpackets;
+ bytes = priv->rx[ring].rbytes;
+- } while (u64_stats_fetch_retry_irq(&priv->rx[ring].statss,
++ } while (u64_stats_fetch_retry(&priv->rx[ring].statss,
+ start));
+ s->rx_packets += packets;
+ s->rx_bytes += bytes;
+@@ -64,10 +64,10 @@ static void gve_get_stats(struct net_dev
+ for (ring = 0; ring < priv->tx_cfg.num_queues; ring++) {
+ do {
+ start =
+- u64_stats_fetch_begin_irq(&priv->tx[ring].statss);
++ u64_stats_fetch_begin(&priv->tx[ring].statss);
+ packets = priv->tx[ring].pkt_done;
+ bytes = priv->tx[ring].bytes_done;
+- } while (u64_stats_fetch_retry_irq(&priv->tx[ring].statss,
++ } while (u64_stats_fetch_retry(&priv->tx[ring].statss,
+ start));
+ s->tx_packets += packets;
+ s->tx_bytes += bytes;
+@@ -1274,9 +1274,9 @@ void gve_handle_report_stats(struct gve_
+ }
+
+ do {
+- start = u64_stats_fetch_begin_irq(&priv->tx[idx].statss);
++ start = u64_stats_fetch_begin(&priv->tx[idx].statss);
+ tx_bytes = priv->tx[idx].bytes_done;
+- } while (u64_stats_fetch_retry_irq(&priv->tx[idx].statss, start));
++ } while (u64_stats_fetch_retry(&priv->tx[idx].statss, start));
+ stats[stats_idx++] = (struct stats) {
+ .stat_name = cpu_to_be32(TX_WAKE_CNT),
+ .value = cpu_to_be64(priv->tx[idx].wake_queue),
+--- a/drivers/net/ethernet/hisilicon/hns3/hns3_enet.c
++++ b/drivers/net/ethernet/hisilicon/hns3/hns3_enet.c
+@@ -2486,7 +2486,7 @@ static void hns3_fetch_stats(struct rtnl
+ unsigned int start;
+
+ do {
+- start = u64_stats_fetch_begin_irq(&ring->syncp);
++ start = u64_stats_fetch_begin(&ring->syncp);
+ if (is_tx) {
+ stats->tx_bytes += ring->stats.tx_bytes;
+ stats->tx_packets += ring->stats.tx_pkts;
+@@ -2520,7 +2520,7 @@ static void hns3_fetch_stats(struct rtnl
+ stats->multicast += ring->stats.rx_multicast;
+ stats->rx_length_errors += ring->stats.err_pkt_len;
+ }
+- } while (u64_stats_fetch_retry_irq(&ring->syncp, start));
++ } while (u64_stats_fetch_retry(&ring->syncp, start));
+ }
+
+ static void hns3_nic_get_stats64(struct net_device *netdev,
+--- a/drivers/net/ethernet/huawei/hinic/hinic_rx.c
++++ b/drivers/net/ethernet/huawei/hinic/hinic_rx.c
+@@ -74,14 +74,14 @@ void hinic_rxq_get_stats(struct hinic_rx
+ unsigned int start;
+
+ do {
+- start = u64_stats_fetch_begin_irq(&rxq_stats->syncp);
++ start = u64_stats_fetch_begin(&rxq_stats->syncp);
+ stats->pkts = rxq_stats->pkts;
+ stats->bytes = rxq_stats->bytes;
+ stats->errors = rxq_stats->csum_errors +
+ rxq_stats->other_errors;
+ stats->csum_errors = rxq_stats->csum_errors;
+ stats->other_errors = rxq_stats->other_errors;
+- } while (u64_stats_fetch_retry_irq(&rxq_stats->syncp, start));
++ } while (u64_stats_fetch_retry(&rxq_stats->syncp, start));
+ }
+
+ /**
+--- a/drivers/net/ethernet/huawei/hinic/hinic_tx.c
++++ b/drivers/net/ethernet/huawei/hinic/hinic_tx.c
+@@ -99,14 +99,14 @@ void hinic_txq_get_stats(struct hinic_tx
+ unsigned int start;
+
+ do {
+- start = u64_stats_fetch_begin_irq(&txq_stats->syncp);
++ start = u64_stats_fetch_begin(&txq_stats->syncp);
+ stats->pkts = txq_stats->pkts;
+ stats->bytes = txq_stats->bytes;
+ stats->tx_busy = txq_stats->tx_busy;
+ stats->tx_wake = txq_stats->tx_wake;
+ stats->tx_dropped = txq_stats->tx_dropped;
+ stats->big_frags_pkts = txq_stats->big_frags_pkts;
+- } while (u64_stats_fetch_retry_irq(&txq_stats->syncp, start));
++ } while (u64_stats_fetch_retry(&txq_stats->syncp, start));
+ }
+
+ /**
+--- a/drivers/net/ethernet/intel/fm10k/fm10k_netdev.c
++++ b/drivers/net/ethernet/intel/fm10k/fm10k_netdev.c
+@@ -1229,10 +1229,10 @@ static void fm10k_get_stats64(struct net
+ continue;
+
+ do {
+- start = u64_stats_fetch_begin_irq(&ring->syncp);
++ start = u64_stats_fetch_begin(&ring->syncp);
+ packets = ring->stats.packets;
+ bytes = ring->stats.bytes;
+- } while (u64_stats_fetch_retry_irq(&ring->syncp, start));
++ } while (u64_stats_fetch_retry(&ring->syncp, start));
+
+ stats->rx_packets += packets;
+ stats->rx_bytes += bytes;
+@@ -1245,10 +1245,10 @@ static void fm10k_get_stats64(struct net
+ continue;
+
+ do {
+- start = u64_stats_fetch_begin_irq(&ring->syncp);
++ start = u64_stats_fetch_begin(&ring->syncp);
+ packets = ring->stats.packets;
+ bytes = ring->stats.bytes;
+- } while (u64_stats_fetch_retry_irq(&ring->syncp, start));
++ } while (u64_stats_fetch_retry(&ring->syncp, start));
+
+ stats->tx_packets += packets;
+ stats->tx_bytes += bytes;
+--- a/drivers/net/ethernet/intel/i40e/i40e_ethtool.c
++++ b/drivers/net/ethernet/intel/i40e/i40e_ethtool.c
+@@ -154,7 +154,7 @@ static void
+ * @ring: the ring to copy
+ *
+ * Queue statistics must be copied while protected by
+- * u64_stats_fetch_begin_irq, so we can't directly use i40e_add_ethtool_stats.
++ * u64_stats_fetch_begin, so we can't directly use i40e_add_ethtool_stats.
+ * Assumes that queue stats are defined in i40e_gstrings_queue_stats. If the
+ * ring pointer is null, zero out the queue stat values and update the data
+ * pointer. Otherwise safely copy the stats from the ring into the supplied
+@@ -172,16 +172,16 @@ i40e_add_queue_stats(u64 **data, struct
+
+ /* To avoid invalid statistics values, ensure that we keep retrying
+ * the copy until we get a consistent value according to
+- * u64_stats_fetch_retry_irq. But first, make sure our ring is
++ * u64_stats_fetch_retry. But first, make sure our ring is
+ * non-null before attempting to access its syncp.
+ */
+ do {
+- start = !ring ? 0 : u64_stats_fetch_begin_irq(&ring->syncp);
++ start = !ring ? 0 : u64_stats_fetch_begin(&ring->syncp);
+ for (i = 0; i < size; i++) {
+ i40e_add_one_ethtool_stat(&(*data)[i], ring,
+ &stats[i]);
+ }
+- } while (ring && u64_stats_fetch_retry_irq(&ring->syncp, start));
++ } while (ring && u64_stats_fetch_retry(&ring->syncp, start));
+
+ /* Once we successfully copy the stats in, update the data pointer */
+ *data += size;
+--- a/drivers/net/ethernet/intel/i40e/i40e_main.c
++++ b/drivers/net/ethernet/intel/i40e/i40e_main.c
+@@ -418,10 +418,10 @@ static void i40e_get_netdev_stats_struct
+ unsigned int start;
+
+ do {
+- start = u64_stats_fetch_begin_irq(&ring->syncp);
++ start = u64_stats_fetch_begin(&ring->syncp);
+ packets = ring->stats.packets;
+ bytes = ring->stats.bytes;
+- } while (u64_stats_fetch_retry_irq(&ring->syncp, start));
++ } while (u64_stats_fetch_retry(&ring->syncp, start));
+
+ stats->tx_packets += packets;
+ stats->tx_bytes += bytes;
+@@ -471,10 +471,10 @@ static void i40e_get_netdev_stats_struct
+ if (!ring)
+ continue;
+ do {
+- start = u64_stats_fetch_begin_irq(&ring->syncp);
++ start = u64_stats_fetch_begin(&ring->syncp);
+ packets = ring->stats.packets;
+ bytes = ring->stats.bytes;
+- } while (u64_stats_fetch_retry_irq(&ring->syncp, start));
++ } while (u64_stats_fetch_retry(&ring->syncp, start));
+
+ stats->rx_packets += packets;
+ stats->rx_bytes += bytes;
+@@ -896,10 +896,10 @@ static void i40e_update_vsi_stats(struct
+ continue;
+
+ do {
+- start = u64_stats_fetch_begin_irq(&p->syncp);
++ start = u64_stats_fetch_begin(&p->syncp);
+ packets = p->stats.packets;
+ bytes = p->stats.bytes;
+- } while (u64_stats_fetch_retry_irq(&p->syncp, start));
++ } while (u64_stats_fetch_retry(&p->syncp, start));
+ tx_b += bytes;
+ tx_p += packets;
+ tx_restart += p->tx_stats.restart_queue;
+@@ -914,10 +914,10 @@ static void i40e_update_vsi_stats(struct
+ continue;
+
+ do {
+- start = u64_stats_fetch_begin_irq(&p->syncp);
++ start = u64_stats_fetch_begin(&p->syncp);
+ packets = p->stats.packets;
+ bytes = p->stats.bytes;
+- } while (u64_stats_fetch_retry_irq(&p->syncp, start));
++ } while (u64_stats_fetch_retry(&p->syncp, start));
+ rx_b += bytes;
+ rx_p += packets;
+ rx_buf += p->rx_stats.alloc_buff_failed;
+@@ -934,10 +934,10 @@ static void i40e_update_vsi_stats(struct
+ continue;
+
+ do {
+- start = u64_stats_fetch_begin_irq(&p->syncp);
++ start = u64_stats_fetch_begin(&p->syncp);
+ packets = p->stats.packets;
+ bytes = p->stats.bytes;
+- } while (u64_stats_fetch_retry_irq(&p->syncp, start));
++ } while (u64_stats_fetch_retry(&p->syncp, start));
+ tx_b += bytes;
+ tx_p += packets;
+ tx_restart += p->tx_stats.restart_queue;
+--- a/drivers/net/ethernet/intel/iavf/iavf_ethtool.c
++++ b/drivers/net/ethernet/intel/iavf/iavf_ethtool.c
+@@ -147,7 +147,7 @@ static void
+ * @ring: the ring to copy
+ *
+ * Queue statistics must be copied while protected by
+- * u64_stats_fetch_begin_irq, so we can't directly use iavf_add_ethtool_stats.
++ * u64_stats_fetch_begin, so we can't directly use iavf_add_ethtool_stats.
+ * Assumes that queue stats are defined in iavf_gstrings_queue_stats. If the
+ * ring pointer is null, zero out the queue stat values and update the data
+ * pointer. Otherwise safely copy the stats from the ring into the supplied
+@@ -165,14 +165,14 @@ iavf_add_queue_stats(u64 **data, struct
+
+ /* To avoid invalid statistics values, ensure that we keep retrying
+ * the copy until we get a consistent value according to
+- * u64_stats_fetch_retry_irq. But first, make sure our ring is
++ * u64_stats_fetch_retry. But first, make sure our ring is
+ * non-null before attempting to access its syncp.
+ */
+ do {
+- start = !ring ? 0 : u64_stats_fetch_begin_irq(&ring->syncp);
++ start = !ring ? 0 : u64_stats_fetch_begin(&ring->syncp);
+ for (i = 0; i < size; i++)
+ iavf_add_one_ethtool_stat(&(*data)[i], ring, &stats[i]);
+- } while (ring && u64_stats_fetch_retry_irq(&ring->syncp, start));
++ } while (ring && u64_stats_fetch_retry(&ring->syncp, start));
+
+ /* Once we successfully copy the stats in, update the data pointer */
+ *data += size;
+--- a/drivers/net/ethernet/intel/ice/ice_main.c
++++ b/drivers/net/ethernet/intel/ice/ice_main.c
+@@ -6297,10 +6297,10 @@ ice_fetch_u64_stats_per_ring(struct u64_
+ unsigned int start;
+
+ do {
+- start = u64_stats_fetch_begin_irq(syncp);
++ start = u64_stats_fetch_begin(syncp);
+ *pkts = stats.pkts;
+ *bytes = stats.bytes;
+- } while (u64_stats_fetch_retry_irq(syncp, start));
++ } while (u64_stats_fetch_retry(syncp, start));
+ }
+
+ /**
+--- a/drivers/net/ethernet/intel/igb/igb_ethtool.c
++++ b/drivers/net/ethernet/intel/igb/igb_ethtool.c
+@@ -2311,15 +2311,15 @@ static void igb_get_ethtool_stats(struct
+
+ ring = adapter->tx_ring[j];
+ do {
+- start = u64_stats_fetch_begin_irq(&ring->tx_syncp);
++ start = u64_stats_fetch_begin(&ring->tx_syncp);
+ data[i] = ring->tx_stats.packets;
+ data[i+1] = ring->tx_stats.bytes;
+ data[i+2] = ring->tx_stats.restart_queue;
+- } while (u64_stats_fetch_retry_irq(&ring->tx_syncp, start));
++ } while (u64_stats_fetch_retry(&ring->tx_syncp, start));
+ do {
+- start = u64_stats_fetch_begin_irq(&ring->tx_syncp2);
++ start = u64_stats_fetch_begin(&ring->tx_syncp2);
+ restart2 = ring->tx_stats.restart_queue2;
+- } while (u64_stats_fetch_retry_irq(&ring->tx_syncp2, start));
++ } while (u64_stats_fetch_retry(&ring->tx_syncp2, start));
+ data[i+2] += restart2;
+
+ i += IGB_TX_QUEUE_STATS_LEN;
+@@ -2327,13 +2327,13 @@ static void igb_get_ethtool_stats(struct
+ for (j = 0; j < adapter->num_rx_queues; j++) {
+ ring = adapter->rx_ring[j];
+ do {
+- start = u64_stats_fetch_begin_irq(&ring->rx_syncp);
++ start = u64_stats_fetch_begin(&ring->rx_syncp);
+ data[i] = ring->rx_stats.packets;
+ data[i+1] = ring->rx_stats.bytes;
+ data[i+2] = ring->rx_stats.drops;
+ data[i+3] = ring->rx_stats.csum_err;
+ data[i+4] = ring->rx_stats.alloc_failed;
+- } while (u64_stats_fetch_retry_irq(&ring->rx_syncp, start));
++ } while (u64_stats_fetch_retry(&ring->rx_syncp, start));
+ i += IGB_RX_QUEUE_STATS_LEN;
+ }
+ spin_unlock(&adapter->stats64_lock);
+--- a/drivers/net/ethernet/intel/igb/igb_main.c
++++ b/drivers/net/ethernet/intel/igb/igb_main.c
+@@ -6633,10 +6633,10 @@ void igb_update_stats(struct igb_adapter
+ }
+
+ do {
+- start = u64_stats_fetch_begin_irq(&ring->rx_syncp);
++ start = u64_stats_fetch_begin(&ring->rx_syncp);
+ _bytes = ring->rx_stats.bytes;
+ _packets = ring->rx_stats.packets;
+- } while (u64_stats_fetch_retry_irq(&ring->rx_syncp, start));
++ } while (u64_stats_fetch_retry(&ring->rx_syncp, start));
+ bytes += _bytes;
+ packets += _packets;
+ }
+@@ -6649,10 +6649,10 @@ void igb_update_stats(struct igb_adapter
+ for (i = 0; i < adapter->num_tx_queues; i++) {
+ struct igb_ring *ring = adapter->tx_ring[i];
+ do {
+- start = u64_stats_fetch_begin_irq(&ring->tx_syncp);
++ start = u64_stats_fetch_begin(&ring->tx_syncp);
+ _bytes = ring->tx_stats.bytes;
+ _packets = ring->tx_stats.packets;
+- } while (u64_stats_fetch_retry_irq(&ring->tx_syncp, start));
++ } while (u64_stats_fetch_retry(&ring->tx_syncp, start));
+ bytes += _bytes;
+ packets += _packets;
+ }
+--- a/drivers/net/ethernet/intel/igc/igc_ethtool.c
++++ b/drivers/net/ethernet/intel/igc/igc_ethtool.c
+@@ -839,15 +839,15 @@ static void igc_ethtool_get_stats(struct
+
+ ring = adapter->tx_ring[j];
+ do {
+- start = u64_stats_fetch_begin_irq(&ring->tx_syncp);
++ start = u64_stats_fetch_begin(&ring->tx_syncp);
+ data[i] = ring->tx_stats.packets;
+ data[i + 1] = ring->tx_stats.bytes;
+ data[i + 2] = ring->tx_stats.restart_queue;
+- } while (u64_stats_fetch_retry_irq(&ring->tx_syncp, start));
++ } while (u64_stats_fetch_retry(&ring->tx_syncp, start));
+ do {
+- start = u64_stats_fetch_begin_irq(&ring->tx_syncp2);
++ start = u64_stats_fetch_begin(&ring->tx_syncp2);
+ restart2 = ring->tx_stats.restart_queue2;
+- } while (u64_stats_fetch_retry_irq(&ring->tx_syncp2, start));
++ } while (u64_stats_fetch_retry(&ring->tx_syncp2, start));
+ data[i + 2] += restart2;
+
+ i += IGC_TX_QUEUE_STATS_LEN;
+@@ -855,13 +855,13 @@ static void igc_ethtool_get_stats(struct
+ for (j = 0; j < adapter->num_rx_queues; j++) {
+ ring = adapter->rx_ring[j];
+ do {
+- start = u64_stats_fetch_begin_irq(&ring->rx_syncp);
++ start = u64_stats_fetch_begin(&ring->rx_syncp);
+ data[i] = ring->rx_stats.packets;
+ data[i + 1] = ring->rx_stats.bytes;
+ data[i + 2] = ring->rx_stats.drops;
+ data[i + 3] = ring->rx_stats.csum_err;
+ data[i + 4] = ring->rx_stats.alloc_failed;
+- } while (u64_stats_fetch_retry_irq(&ring->rx_syncp, start));
++ } while (u64_stats_fetch_retry(&ring->rx_syncp, start));
+ i += IGC_RX_QUEUE_STATS_LEN;
+ }
+ spin_unlock(&adapter->stats64_lock);
+--- a/drivers/net/ethernet/intel/igc/igc_main.c
++++ b/drivers/net/ethernet/intel/igc/igc_main.c
+@@ -4645,10 +4645,10 @@ void igc_update_stats(struct igc_adapter
+ }
+
+ do {
+- start = u64_stats_fetch_begin_irq(&ring->rx_syncp);
++ start = u64_stats_fetch_begin(&ring->rx_syncp);
+ _bytes = ring->rx_stats.bytes;
+ _packets = ring->rx_stats.packets;
+- } while (u64_stats_fetch_retry_irq(&ring->rx_syncp, start));
++ } while (u64_stats_fetch_retry(&ring->rx_syncp, start));
+ bytes += _bytes;
+ packets += _packets;
+ }
+@@ -4662,10 +4662,10 @@ void igc_update_stats(struct igc_adapter
+ struct igc_ring *ring = adapter->tx_ring[i];
+
+ do {
+- start = u64_stats_fetch_begin_irq(&ring->tx_syncp);
++ start = u64_stats_fetch_begin(&ring->tx_syncp);
+ _bytes = ring->tx_stats.bytes;
+ _packets = ring->tx_stats.packets;
+- } while (u64_stats_fetch_retry_irq(&ring->tx_syncp, start));
++ } while (u64_stats_fetch_retry(&ring->tx_syncp, start));
+ bytes += _bytes;
+ packets += _packets;
+ }
+--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c
++++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c
+@@ -1335,10 +1335,10 @@ static void ixgbe_get_ethtool_stats(stru
+ }
+
+ do {
+- start = u64_stats_fetch_begin_irq(&ring->syncp);
++ start = u64_stats_fetch_begin(&ring->syncp);
+ data[i] = ring->stats.packets;
+ data[i+1] = ring->stats.bytes;
+- } while (u64_stats_fetch_retry_irq(&ring->syncp, start));
++ } while (u64_stats_fetch_retry(&ring->syncp, start));
+ i += 2;
+ }
+ for (j = 0; j < IXGBE_NUM_RX_QUEUES; j++) {
+@@ -1351,10 +1351,10 @@ static void ixgbe_get_ethtool_stats(stru
+ }
+
+ do {
+- start = u64_stats_fetch_begin_irq(&ring->syncp);
++ start = u64_stats_fetch_begin(&ring->syncp);
+ data[i] = ring->stats.packets;
+ data[i+1] = ring->stats.bytes;
+- } while (u64_stats_fetch_retry_irq(&ring->syncp, start));
++ } while (u64_stats_fetch_retry(&ring->syncp, start));
+ i += 2;
+ }
+
+--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
++++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
+@@ -9041,10 +9041,10 @@ static void ixgbe_get_ring_stats64(struc
+
+ if (ring) {
+ do {
+- start = u64_stats_fetch_begin_irq(&ring->syncp);
++ start = u64_stats_fetch_begin(&ring->syncp);
+ packets = ring->stats.packets;
+ bytes = ring->stats.bytes;
+- } while (u64_stats_fetch_retry_irq(&ring->syncp, start));
++ } while (u64_stats_fetch_retry(&ring->syncp, start));
+ stats->tx_packets += packets;
+ stats->tx_bytes += bytes;
+ }
+@@ -9064,10 +9064,10 @@ static void ixgbe_get_stats64(struct net
+
+ if (ring) {
+ do {
+- start = u64_stats_fetch_begin_irq(&ring->syncp);
++ start = u64_stats_fetch_begin(&ring->syncp);
+ packets = ring->stats.packets;
+ bytes = ring->stats.bytes;
+- } while (u64_stats_fetch_retry_irq(&ring->syncp, start));
++ } while (u64_stats_fetch_retry(&ring->syncp, start));
+ stats->rx_packets += packets;
+ stats->rx_bytes += bytes;
+ }
+--- a/drivers/net/ethernet/intel/ixgbevf/ethtool.c
++++ b/drivers/net/ethernet/intel/ixgbevf/ethtool.c
+@@ -458,10 +458,10 @@ static void ixgbevf_get_ethtool_stats(st
+ }
+
+ do {
+- start = u64_stats_fetch_begin_irq(&ring->syncp);
++ start = u64_stats_fetch_begin(&ring->syncp);
+ data[i] = ring->stats.packets;
+ data[i + 1] = ring->stats.bytes;
+- } while (u64_stats_fetch_retry_irq(&ring->syncp, start));
++ } while (u64_stats_fetch_retry(&ring->syncp, start));
+ i += 2;
+ }
+
+@@ -475,10 +475,10 @@ static void ixgbevf_get_ethtool_stats(st
+ }
+
+ do {
+- start = u64_stats_fetch_begin_irq(&ring->syncp);
++ start = u64_stats_fetch_begin(&ring->syncp);
+ data[i] = ring->stats.packets;
+ data[i + 1] = ring->stats.bytes;
+- } while (u64_stats_fetch_retry_irq(&ring->syncp, start));
++ } while (u64_stats_fetch_retry(&ring->syncp, start));
+ i += 2;
+ }
+
+@@ -492,10 +492,10 @@ static void ixgbevf_get_ethtool_stats(st
+ }
+
+ do {
+- start = u64_stats_fetch_begin_irq(&ring->syncp);
++ start = u64_stats_fetch_begin(&ring->syncp);
+ data[i] = ring->stats.packets;
+ data[i + 1] = ring->stats.bytes;
+- } while (u64_stats_fetch_retry_irq(&ring->syncp, start));
++ } while (u64_stats_fetch_retry(&ring->syncp, start));
+ i += 2;
+ }
+ }
+--- a/drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c
++++ b/drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c
+@@ -4350,10 +4350,10 @@ static void ixgbevf_get_tx_ring_stats(st
+
+ if (ring) {
+ do {
+- start = u64_stats_fetch_begin_irq(&ring->syncp);
++ start = u64_stats_fetch_begin(&ring->syncp);
+ bytes = ring->stats.bytes;
+ packets = ring->stats.packets;
+- } while (u64_stats_fetch_retry_irq(&ring->syncp, start));
++ } while (u64_stats_fetch_retry(&ring->syncp, start));
+ stats->tx_bytes += bytes;
+ stats->tx_packets += packets;
+ }
+@@ -4376,10 +4376,10 @@ static void ixgbevf_get_stats(struct net
+ for (i = 0; i < adapter->num_rx_queues; i++) {
+ ring = adapter->rx_ring[i];
+ do {
+- start = u64_stats_fetch_begin_irq(&ring->syncp);
++ start = u64_stats_fetch_begin(&ring->syncp);
+ bytes = ring->stats.bytes;
+ packets = ring->stats.packets;
+- } while (u64_stats_fetch_retry_irq(&ring->syncp, start));
++ } while (u64_stats_fetch_retry(&ring->syncp, start));
+ stats->rx_bytes += bytes;
+ stats->rx_packets += packets;
+ }
+--- a/drivers/net/ethernet/marvell/mvneta.c
++++ b/drivers/net/ethernet/marvell/mvneta.c
+@@ -813,14 +813,14 @@ mvneta_get_stats64(struct net_device *de
+
+ cpu_stats = per_cpu_ptr(pp->stats, cpu);
+ do {
+- start = u64_stats_fetch_begin_irq(&cpu_stats->syncp);
++ start = u64_stats_fetch_begin(&cpu_stats->syncp);
+ rx_packets = cpu_stats->es.ps.rx_packets;
+ rx_bytes = cpu_stats->es.ps.rx_bytes;
+ rx_dropped = cpu_stats->rx_dropped;
+ rx_errors = cpu_stats->rx_errors;
+ tx_packets = cpu_stats->es.ps.tx_packets;
+ tx_bytes = cpu_stats->es.ps.tx_bytes;
+- } while (u64_stats_fetch_retry_irq(&cpu_stats->syncp, start));
++ } while (u64_stats_fetch_retry(&cpu_stats->syncp, start));
+
+ stats->rx_packets += rx_packets;
+ stats->rx_bytes += rx_bytes;
+@@ -4762,7 +4762,7 @@ mvneta_ethtool_update_pcpu_stats(struct
+
+ stats = per_cpu_ptr(pp->stats, cpu);
+ do {
+- start = u64_stats_fetch_begin_irq(&stats->syncp);
++ start = u64_stats_fetch_begin(&stats->syncp);
+ skb_alloc_error = stats->es.skb_alloc_error;
+ refill_error = stats->es.refill_error;
+ xdp_redirect = stats->es.ps.xdp_redirect;
+@@ -4772,7 +4772,7 @@ mvneta_ethtool_update_pcpu_stats(struct
+ xdp_xmit_err = stats->es.ps.xdp_xmit_err;
+ xdp_tx = stats->es.ps.xdp_tx;
+ xdp_tx_err = stats->es.ps.xdp_tx_err;
+- } while (u64_stats_fetch_retry_irq(&stats->syncp, start));
++ } while (u64_stats_fetch_retry(&stats->syncp, start));
+
+ es->skb_alloc_error += skb_alloc_error;
+ es->refill_error += refill_error;
+--- a/drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c
++++ b/drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c
+@@ -2008,7 +2008,7 @@ mvpp2_get_xdp_stats(struct mvpp2_port *p
+
+ cpu_stats = per_cpu_ptr(port->stats, cpu);
+ do {
+- start = u64_stats_fetch_begin_irq(&cpu_stats->syncp);
++ start = u64_stats_fetch_begin(&cpu_stats->syncp);
+ xdp_redirect = cpu_stats->xdp_redirect;
+ xdp_pass = cpu_stats->xdp_pass;
+ xdp_drop = cpu_stats->xdp_drop;
+@@ -2016,7 +2016,7 @@ mvpp2_get_xdp_stats(struct mvpp2_port *p
+ xdp_xmit_err = cpu_stats->xdp_xmit_err;
+ xdp_tx = cpu_stats->xdp_tx;
+ xdp_tx_err = cpu_stats->xdp_tx_err;
+- } while (u64_stats_fetch_retry_irq(&cpu_stats->syncp, start));
++ } while (u64_stats_fetch_retry(&cpu_stats->syncp, start));
+
+ xdp_stats->xdp_redirect += xdp_redirect;
+ xdp_stats->xdp_pass += xdp_pass;
+@@ -5115,12 +5115,12 @@ mvpp2_get_stats64(struct net_device *dev
+
+ cpu_stats = per_cpu_ptr(port->stats, cpu);
+ do {
+- start = u64_stats_fetch_begin_irq(&cpu_stats->syncp);
++ start = u64_stats_fetch_begin(&cpu_stats->syncp);
+ rx_packets = cpu_stats->rx_packets;
+ rx_bytes = cpu_stats->rx_bytes;
+ tx_packets = cpu_stats->tx_packets;
+ tx_bytes = cpu_stats->tx_bytes;
+- } while (u64_stats_fetch_retry_irq(&cpu_stats->syncp, start));
++ } while (u64_stats_fetch_retry(&cpu_stats->syncp, start));
+
+ stats->rx_packets += rx_packets;
+ stats->rx_bytes += rx_bytes;
+--- a/drivers/net/ethernet/marvell/sky2.c
++++ b/drivers/net/ethernet/marvell/sky2.c
+@@ -3894,19 +3894,19 @@ static void sky2_get_stats(struct net_de
+ u64 _bytes, _packets;
+
+ do {
+- start = u64_stats_fetch_begin_irq(&sky2->rx_stats.syncp);
++ start = u64_stats_fetch_begin(&sky2->rx_stats.syncp);
+ _bytes = sky2->rx_stats.bytes;
+ _packets = sky2->rx_stats.packets;
+- } while (u64_stats_fetch_retry_irq(&sky2->rx_stats.syncp, start));
++ } while (u64_stats_fetch_retry(&sky2->rx_stats.syncp, start));
+
+ stats->rx_packets = _packets;
+ stats->rx_bytes = _bytes;
+
+ do {
+- start = u64_stats_fetch_begin_irq(&sky2->tx_stats.syncp);
++ start = u64_stats_fetch_begin(&sky2->tx_stats.syncp);
+ _bytes = sky2->tx_stats.bytes;
+ _packets = sky2->tx_stats.packets;
+- } while (u64_stats_fetch_retry_irq(&sky2->tx_stats.syncp, start));
++ } while (u64_stats_fetch_retry(&sky2->tx_stats.syncp, start));
+
+ stats->tx_packets = _packets;
+ stats->tx_bytes = _bytes;
+--- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
++++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
+@@ -853,7 +853,7 @@ static void mtk_get_stats64(struct net_d
+ }
+
+ do {
+- start = u64_stats_fetch_begin_irq(&hw_stats->syncp);
++ start = u64_stats_fetch_begin(&hw_stats->syncp);
+ storage->rx_packets = hw_stats->rx_packets;
+ storage->tx_packets = hw_stats->tx_packets;
+ storage->rx_bytes = hw_stats->rx_bytes;
+@@ -865,7 +865,7 @@ static void mtk_get_stats64(struct net_d
+ storage->rx_crc_errors = hw_stats->rx_fcs_errors;
+ storage->rx_errors = hw_stats->rx_checksum_errors;
+ storage->tx_aborted_errors = hw_stats->tx_skip;
+- } while (u64_stats_fetch_retry_irq(&hw_stats->syncp, start));
++ } while (u64_stats_fetch_retry(&hw_stats->syncp, start));
+
+ storage->tx_errors = dev->stats.tx_errors;
+ storage->rx_dropped = dev->stats.rx_dropped;
+@@ -3664,13 +3664,13 @@ static void mtk_get_ethtool_stats(struct
+
+ do {
+ data_dst = data;
+- start = u64_stats_fetch_begin_irq(&hwstats->syncp);
++ start = u64_stats_fetch_begin(&hwstats->syncp);
+
+ for (i = 0; i < ARRAY_SIZE(mtk_ethtool_stats); i++)
+ *data_dst++ = *(data_src + mtk_ethtool_stats[i].offset);
+ if (mtk_page_pool_enabled(mac->hw))
+ mtk_ethtool_pp_stats(mac->hw, data_dst);
+- } while (u64_stats_fetch_retry_irq(&hwstats->syncp, start));
++ } while (u64_stats_fetch_retry(&hwstats->syncp, start));
+ }
+
+ static int mtk_get_rxnfc(struct net_device *dev, struct ethtool_rxnfc *cmd,
+--- a/drivers/net/ethernet/mellanox/mlxsw/spectrum.c
++++ b/drivers/net/ethernet/mellanox/mlxsw/spectrum.c
+@@ -827,12 +827,12 @@ mlxsw_sp_port_get_sw_stats64(const struc
+ for_each_possible_cpu(i) {
+ p = per_cpu_ptr(mlxsw_sp_port->pcpu_stats, i);
+ do {
+- start = u64_stats_fetch_begin_irq(&p->syncp);
++ start = u64_stats_fetch_begin(&p->syncp);
+ rx_packets = p->rx_packets;
+ rx_bytes = p->rx_bytes;
+ tx_packets = p->tx_packets;
+ tx_bytes = p->tx_bytes;
+- } while (u64_stats_fetch_retry_irq(&p->syncp, start));
++ } while (u64_stats_fetch_retry(&p->syncp, start));
+
+ stats->rx_packets += rx_packets;
+ stats->rx_bytes += rx_bytes;
+--- a/drivers/net/ethernet/microsoft/mana/mana_en.c
++++ b/drivers/net/ethernet/microsoft/mana/mana_en.c
+@@ -315,10 +315,10 @@ static void mana_get_stats64(struct net_
+ rx_stats = &apc->rxqs[q]->stats;
+
+ do {
+- start = u64_stats_fetch_begin_irq(&rx_stats->syncp);
++ start = u64_stats_fetch_begin(&rx_stats->syncp);
+ packets = rx_stats->packets;
+ bytes = rx_stats->bytes;
+- } while (u64_stats_fetch_retry_irq(&rx_stats->syncp, start));
++ } while (u64_stats_fetch_retry(&rx_stats->syncp, start));
+
+ st->rx_packets += packets;
+ st->rx_bytes += bytes;
+@@ -328,10 +328,10 @@ static void mana_get_stats64(struct net_
+ tx_stats = &apc->tx_qp[q].txq.stats;
+
+ do {
+- start = u64_stats_fetch_begin_irq(&tx_stats->syncp);
++ start = u64_stats_fetch_begin(&tx_stats->syncp);
+ packets = tx_stats->packets;
+ bytes = tx_stats->bytes;
+- } while (u64_stats_fetch_retry_irq(&tx_stats->syncp, start));
++ } while (u64_stats_fetch_retry(&tx_stats->syncp, start));
+
+ st->tx_packets += packets;
+ st->tx_bytes += bytes;
+--- a/drivers/net/ethernet/microsoft/mana/mana_ethtool.c
++++ b/drivers/net/ethernet/microsoft/mana/mana_ethtool.c
+@@ -90,13 +90,13 @@ static void mana_get_ethtool_stats(struc
+ rx_stats = &apc->rxqs[q]->stats;
+
+ do {
+- start = u64_stats_fetch_begin_irq(&rx_stats->syncp);
++ start = u64_stats_fetch_begin(&rx_stats->syncp);
+ packets = rx_stats->packets;
+ bytes = rx_stats->bytes;
+ xdp_drop = rx_stats->xdp_drop;
+ xdp_tx = rx_stats->xdp_tx;
+ xdp_redirect = rx_stats->xdp_redirect;
+- } while (u64_stats_fetch_retry_irq(&rx_stats->syncp, start));
++ } while (u64_stats_fetch_retry(&rx_stats->syncp, start));
+
+ data[i++] = packets;
+ data[i++] = bytes;
+@@ -109,11 +109,11 @@ static void mana_get_ethtool_stats(struc
+ tx_stats = &apc->tx_qp[q].txq.stats;
+
+ do {
+- start = u64_stats_fetch_begin_irq(&tx_stats->syncp);
++ start = u64_stats_fetch_begin(&tx_stats->syncp);
+ packets = tx_stats->packets;
+ bytes = tx_stats->bytes;
+ xdp_xmit = tx_stats->xdp_xmit;
+- } while (u64_stats_fetch_retry_irq(&tx_stats->syncp, start));
++ } while (u64_stats_fetch_retry(&tx_stats->syncp, start));
+
+ data[i++] = packets;
+ data[i++] = bytes;
+--- a/drivers/net/ethernet/netronome/nfp/nfp_net_common.c
++++ b/drivers/net/ethernet/netronome/nfp/nfp_net_common.c
+@@ -1630,21 +1630,21 @@ static void nfp_net_stat64(struct net_de
+ unsigned int start;
+
+ do {
+- start = u64_stats_fetch_begin_irq(&r_vec->rx_sync);
++ start = u64_stats_fetch_begin(&r_vec->rx_sync);
+ data[0] = r_vec->rx_pkts;
+ data[1] = r_vec->rx_bytes;
+ data[2] = r_vec->rx_drops;
+- } while (u64_stats_fetch_retry_irq(&r_vec->rx_sync, start));
++ } while (u64_stats_fetch_retry(&r_vec->rx_sync, start));
+ stats->rx_packets += data[0];
+ stats->rx_bytes += data[1];
+ stats->rx_dropped += data[2];
+
+ do {
+- start = u64_stats_fetch_begin_irq(&r_vec->tx_sync);
++ start = u64_stats_fetch_begin(&r_vec->tx_sync);
+ data[0] = r_vec->tx_pkts;
+ data[1] = r_vec->tx_bytes;
+ data[2] = r_vec->tx_errors;
+- } while (u64_stats_fetch_retry_irq(&r_vec->tx_sync, start));
++ } while (u64_stats_fetch_retry(&r_vec->tx_sync, start));
+ stats->tx_packets += data[0];
+ stats->tx_bytes += data[1];
+ stats->tx_errors += data[2];
+--- a/drivers/net/ethernet/netronome/nfp/nfp_net_ethtool.c
++++ b/drivers/net/ethernet/netronome/nfp/nfp_net_ethtool.c
+@@ -649,7 +649,7 @@ static u64 *nfp_vnic_get_sw_stats(struct
+ unsigned int start;
+
+ do {
+- start = u64_stats_fetch_begin_irq(&nn->r_vecs[i].rx_sync);
++ start = u64_stats_fetch_begin(&nn->r_vecs[i].rx_sync);
+ data[0] = nn->r_vecs[i].rx_pkts;
+ tmp[0] = nn->r_vecs[i].hw_csum_rx_ok;
+ tmp[1] = nn->r_vecs[i].hw_csum_rx_inner_ok;
+@@ -657,10 +657,10 @@ static u64 *nfp_vnic_get_sw_stats(struct
+ tmp[3] = nn->r_vecs[i].hw_csum_rx_error;
+ tmp[4] = nn->r_vecs[i].rx_replace_buf_alloc_fail;
+ tmp[5] = nn->r_vecs[i].hw_tls_rx;
+- } while (u64_stats_fetch_retry_irq(&nn->r_vecs[i].rx_sync, start));
++ } while (u64_stats_fetch_retry(&nn->r_vecs[i].rx_sync, start));
+
+ do {
+- start = u64_stats_fetch_begin_irq(&nn->r_vecs[i].tx_sync);
++ start = u64_stats_fetch_begin(&nn->r_vecs[i].tx_sync);
+ data[1] = nn->r_vecs[i].tx_pkts;
+ data[2] = nn->r_vecs[i].tx_busy;
+ tmp[6] = nn->r_vecs[i].hw_csum_tx;
+@@ -670,7 +670,7 @@ static u64 *nfp_vnic_get_sw_stats(struct
+ tmp[10] = nn->r_vecs[i].hw_tls_tx;
+ tmp[11] = nn->r_vecs[i].tls_tx_fallback;
+ tmp[12] = nn->r_vecs[i].tls_tx_no_fallback;
+- } while (u64_stats_fetch_retry_irq(&nn->r_vecs[i].tx_sync, start));
++ } while (u64_stats_fetch_retry(&nn->r_vecs[i].tx_sync, start));
+
+ data += NN_RVEC_PER_Q_STATS;
+
+--- a/drivers/net/ethernet/netronome/nfp/nfp_net_repr.c
++++ b/drivers/net/ethernet/netronome/nfp/nfp_net_repr.c
+@@ -134,13 +134,13 @@ nfp_repr_get_host_stats64(const struct n
+
+ repr_stats = per_cpu_ptr(repr->stats, i);
+ do {
+- start = u64_stats_fetch_begin_irq(&repr_stats->syncp);
++ start = u64_stats_fetch_begin(&repr_stats->syncp);
+ tbytes = repr_stats->tx_bytes;
+ tpkts = repr_stats->tx_packets;
+ tdrops = repr_stats->tx_drops;
+ rbytes = repr_stats->rx_bytes;
+ rpkts = repr_stats->rx_packets;
+- } while (u64_stats_fetch_retry_irq(&repr_stats->syncp, start));
++ } while (u64_stats_fetch_retry(&repr_stats->syncp, start));
+
+ stats->tx_bytes += tbytes;
+ stats->tx_packets += tpkts;
+--- a/drivers/net/ethernet/nvidia/forcedeth.c
++++ b/drivers/net/ethernet/nvidia/forcedeth.c
+@@ -1734,12 +1734,12 @@ static void nv_get_stats(int cpu, struct
+ u64 tx_packets, tx_bytes, tx_dropped;
+
+ do {
+- syncp_start = u64_stats_fetch_begin_irq(&np->swstats_rx_syncp);
++ syncp_start = u64_stats_fetch_begin(&np->swstats_rx_syncp);
+ rx_packets = src->stat_rx_packets;
+ rx_bytes = src->stat_rx_bytes;
+ rx_dropped = src->stat_rx_dropped;
+ rx_missed_errors = src->stat_rx_missed_errors;
+- } while (u64_stats_fetch_retry_irq(&np->swstats_rx_syncp, syncp_start));
++ } while (u64_stats_fetch_retry(&np->swstats_rx_syncp, syncp_start));
+
+ storage->rx_packets += rx_packets;
+ storage->rx_bytes += rx_bytes;
+@@ -1747,11 +1747,11 @@ static void nv_get_stats(int cpu, struct
+ storage->rx_missed_errors += rx_missed_errors;
+
+ do {
+- syncp_start = u64_stats_fetch_begin_irq(&np->swstats_tx_syncp);
++ syncp_start = u64_stats_fetch_begin(&np->swstats_tx_syncp);
+ tx_packets = src->stat_tx_packets;
+ tx_bytes = src->stat_tx_bytes;
+ tx_dropped = src->stat_tx_dropped;
+- } while (u64_stats_fetch_retry_irq(&np->swstats_tx_syncp, syncp_start));
++ } while (u64_stats_fetch_retry(&np->swstats_tx_syncp, syncp_start));
+
+ storage->tx_packets += tx_packets;
+ storage->tx_bytes += tx_bytes;
+--- a/drivers/net/ethernet/qualcomm/rmnet/rmnet_vnd.c
++++ b/drivers/net/ethernet/qualcomm/rmnet/rmnet_vnd.c
+@@ -135,9 +135,9 @@ static void rmnet_get_stats64(struct net
+ pcpu_ptr = per_cpu_ptr(priv->pcpu_stats, cpu);
+
+ do {
+- start = u64_stats_fetch_begin_irq(&pcpu_ptr->syncp);
++ start = u64_stats_fetch_begin(&pcpu_ptr->syncp);
+ snapshot = pcpu_ptr->stats; /* struct assignment */
+- } while (u64_stats_fetch_retry_irq(&pcpu_ptr->syncp, start));
++ } while (u64_stats_fetch_retry(&pcpu_ptr->syncp, start));
+
+ total_stats.rx_pkts += snapshot.rx_pkts;
+ total_stats.rx_bytes += snapshot.rx_bytes;
+--- a/drivers/net/ethernet/realtek/8139too.c
++++ b/drivers/net/ethernet/realtek/8139too.c
+@@ -2532,16 +2532,16 @@ rtl8139_get_stats64(struct net_device *d
+ netdev_stats_to_stats64(stats, &dev->stats);
+
+ do {
+- start = u64_stats_fetch_begin_irq(&tp->rx_stats.syncp);
++ start = u64_stats_fetch_begin(&tp->rx_stats.syncp);
+ stats->rx_packets = tp->rx_stats.packets;
+ stats->rx_bytes = tp->rx_stats.bytes;
+- } while (u64_stats_fetch_retry_irq(&tp->rx_stats.syncp, start));
++ } while (u64_stats_fetch_retry(&tp->rx_stats.syncp, start));
+
+ do {
+- start = u64_stats_fetch_begin_irq(&tp->tx_stats.syncp);
++ start = u64_stats_fetch_begin(&tp->tx_stats.syncp);
+ stats->tx_packets = tp->tx_stats.packets;
+ stats->tx_bytes = tp->tx_stats.bytes;
+- } while (u64_stats_fetch_retry_irq(&tp->tx_stats.syncp, start));
++ } while (u64_stats_fetch_retry(&tp->tx_stats.syncp, start));
+ }
+
+ /* Set or clear the multicast filter for this adaptor.
+--- a/drivers/net/ethernet/socionext/sni_ave.c
++++ b/drivers/net/ethernet/socionext/sni_ave.c
+@@ -1506,16 +1506,16 @@ static void ave_get_stats64(struct net_d
+ unsigned int start;
+
+ do {
+- start = u64_stats_fetch_begin_irq(&priv->stats_rx.syncp);
++ start = u64_stats_fetch_begin(&priv->stats_rx.syncp);
+ stats->rx_packets = priv->stats_rx.packets;
+ stats->rx_bytes = priv->stats_rx.bytes;
+- } while (u64_stats_fetch_retry_irq(&priv->stats_rx.syncp, start));
++ } while (u64_stats_fetch_retry(&priv->stats_rx.syncp, start));
+
+ do {
+- start = u64_stats_fetch_begin_irq(&priv->stats_tx.syncp);
++ start = u64_stats_fetch_begin(&priv->stats_tx.syncp);
+ stats->tx_packets = priv->stats_tx.packets;
+ stats->tx_bytes = priv->stats_tx.bytes;
+- } while (u64_stats_fetch_retry_irq(&priv->stats_tx.syncp, start));
++ } while (u64_stats_fetch_retry(&priv->stats_tx.syncp, start));
+
+ stats->rx_errors = priv->stats_rx.errors;
+ stats->tx_errors = priv->stats_tx.errors;
+--- a/drivers/net/ethernet/ti/am65-cpsw-nuss.c
++++ b/drivers/net/ethernet/ti/am65-cpsw-nuss.c
+@@ -1365,12 +1365,12 @@ static void am65_cpsw_nuss_ndo_get_stats
+
+ cpu_stats = per_cpu_ptr(ndev_priv->stats, cpu);
+ do {
+- start = u64_stats_fetch_begin_irq(&cpu_stats->syncp);
++ start = u64_stats_fetch_begin(&cpu_stats->syncp);
+ rx_packets = cpu_stats->rx_packets;
+ rx_bytes = cpu_stats->rx_bytes;
+ tx_packets = cpu_stats->tx_packets;
+ tx_bytes = cpu_stats->tx_bytes;
+- } while (u64_stats_fetch_retry_irq(&cpu_stats->syncp, start));
++ } while (u64_stats_fetch_retry(&cpu_stats->syncp, start));
+
+ stats->rx_packets += rx_packets;
+ stats->rx_bytes += rx_bytes;
+--- a/drivers/net/ethernet/ti/netcp_core.c
++++ b/drivers/net/ethernet/ti/netcp_core.c
+@@ -1916,16 +1916,16 @@ netcp_get_stats(struct net_device *ndev,
+ unsigned int start;
+
+ do {
+- start = u64_stats_fetch_begin_irq(&p->syncp_rx);
++ start = u64_stats_fetch_begin(&p->syncp_rx);
+ rxpackets = p->rx_packets;
+ rxbytes = p->rx_bytes;
+- } while (u64_stats_fetch_retry_irq(&p->syncp_rx, start));
++ } while (u64_stats_fetch_retry(&p->syncp_rx, start));
+
+ do {
+- start = u64_stats_fetch_begin_irq(&p->syncp_tx);
++ start = u64_stats_fetch_begin(&p->syncp_tx);
+ txpackets = p->tx_packets;
+ txbytes = p->tx_bytes;
+- } while (u64_stats_fetch_retry_irq(&p->syncp_tx, start));
++ } while (u64_stats_fetch_retry(&p->syncp_tx, start));
+
+ stats->rx_packets = rxpackets;
+ stats->rx_bytes = rxbytes;
+--- a/drivers/net/ethernet/via/via-rhine.c
++++ b/drivers/net/ethernet/via/via-rhine.c
+@@ -2217,16 +2217,16 @@ rhine_get_stats64(struct net_device *dev
+ netdev_stats_to_stats64(stats, &dev->stats);
+
+ do {
+- start = u64_stats_fetch_begin_irq(&rp->rx_stats.syncp);
++ start = u64_stats_fetch_begin(&rp->rx_stats.syncp);
+ stats->rx_packets = rp->rx_stats.packets;
+ stats->rx_bytes = rp->rx_stats.bytes;
+- } while (u64_stats_fetch_retry_irq(&rp->rx_stats.syncp, start));
++ } while (u64_stats_fetch_retry(&rp->rx_stats.syncp, start));
+
+ do {
+- start = u64_stats_fetch_begin_irq(&rp->tx_stats.syncp);
++ start = u64_stats_fetch_begin(&rp->tx_stats.syncp);
+ stats->tx_packets = rp->tx_stats.packets;
+ stats->tx_bytes = rp->tx_stats.bytes;
+- } while (u64_stats_fetch_retry_irq(&rp->tx_stats.syncp, start));
++ } while (u64_stats_fetch_retry(&rp->tx_stats.syncp, start));
+ }
+
+ static void rhine_set_rx_mode(struct net_device *dev)
+--- a/drivers/net/hyperv/netvsc_drv.c
++++ b/drivers/net/hyperv/netvsc_drv.c
+@@ -1264,12 +1264,12 @@ static void netvsc_get_vf_stats(struct n
+ unsigned int start;
+
+ do {
+- start = u64_stats_fetch_begin_irq(&stats->syncp);
++ start = u64_stats_fetch_begin(&stats->syncp);
+ rx_packets = stats->rx_packets;
+ tx_packets = stats->tx_packets;
+ rx_bytes = stats->rx_bytes;
+ tx_bytes = stats->tx_bytes;
+- } while (u64_stats_fetch_retry_irq(&stats->syncp, start));
++ } while (u64_stats_fetch_retry(&stats->syncp, start));
+
+ tot->rx_packets += rx_packets;
+ tot->tx_packets += tx_packets;
+@@ -1294,12 +1294,12 @@ static void netvsc_get_pcpu_stats(struct
+ unsigned int start;
+
+ do {
+- start = u64_stats_fetch_begin_irq(&stats->syncp);
++ start = u64_stats_fetch_begin(&stats->syncp);
+ this_tot->vf_rx_packets = stats->rx_packets;
+ this_tot->vf_tx_packets = stats->tx_packets;
+ this_tot->vf_rx_bytes = stats->rx_bytes;
+ this_tot->vf_tx_bytes = stats->tx_bytes;
+- } while (u64_stats_fetch_retry_irq(&stats->syncp, start));
++ } while (u64_stats_fetch_retry(&stats->syncp, start));
+ this_tot->rx_packets = this_tot->vf_rx_packets;
+ this_tot->tx_packets = this_tot->vf_tx_packets;
+ this_tot->rx_bytes = this_tot->vf_rx_bytes;
+@@ -1318,20 +1318,20 @@ static void netvsc_get_pcpu_stats(struct
+
+ tx_stats = &nvchan->tx_stats;
+ do {
+- start = u64_stats_fetch_begin_irq(&tx_stats->syncp);
++ start = u64_stats_fetch_begin(&tx_stats->syncp);
+ packets = tx_stats->packets;
+ bytes = tx_stats->bytes;
+- } while (u64_stats_fetch_retry_irq(&tx_stats->syncp, start));
++ } while (u64_stats_fetch_retry(&tx_stats->syncp, start));
+
+ this_tot->tx_bytes += bytes;
+ this_tot->tx_packets += packets;
+
+ rx_stats = &nvchan->rx_stats;
+ do {
+- start = u64_stats_fetch_begin_irq(&rx_stats->syncp);
++ start = u64_stats_fetch_begin(&rx_stats->syncp);
+ packets = rx_stats->packets;
+ bytes = rx_stats->bytes;
+- } while (u64_stats_fetch_retry_irq(&rx_stats->syncp, start));
++ } while (u64_stats_fetch_retry(&rx_stats->syncp, start));
+
+ this_tot->rx_bytes += bytes;
+ this_tot->rx_packets += packets;
+@@ -1370,21 +1370,21 @@ static void netvsc_get_stats64(struct ne
+
+ tx_stats = &nvchan->tx_stats;
+ do {
+- start = u64_stats_fetch_begin_irq(&tx_stats->syncp);
++ start = u64_stats_fetch_begin(&tx_stats->syncp);
+ packets = tx_stats->packets;
+ bytes = tx_stats->bytes;
+- } while (u64_stats_fetch_retry_irq(&tx_stats->syncp, start));
++ } while (u64_stats_fetch_retry(&tx_stats->syncp, start));
+
+ t->tx_bytes += bytes;
+ t->tx_packets += packets;
+
+ rx_stats = &nvchan->rx_stats;
+ do {
+- start = u64_stats_fetch_begin_irq(&rx_stats->syncp);
++ start = u64_stats_fetch_begin(&rx_stats->syncp);
+ packets = rx_stats->packets;
+ bytes = rx_stats->bytes;
+ multicast = rx_stats->multicast + rx_stats->broadcast;
+- } while (u64_stats_fetch_retry_irq(&rx_stats->syncp, start));
++ } while (u64_stats_fetch_retry(&rx_stats->syncp, start));
+
+ t->rx_bytes += bytes;
+ t->rx_packets += packets;
+@@ -1527,24 +1527,24 @@ static void netvsc_get_ethtool_stats(str
+ tx_stats = &nvdev->chan_table[j].tx_stats;
+
+ do {
+- start = u64_stats_fetch_begin_irq(&tx_stats->syncp);
++ start = u64_stats_fetch_begin(&tx_stats->syncp);
+ packets = tx_stats->packets;
+ bytes = tx_stats->bytes;
+ xdp_xmit = tx_stats->xdp_xmit;
+- } while (u64_stats_fetch_retry_irq(&tx_stats->syncp, start));
++ } while (u64_stats_fetch_retry(&tx_stats->syncp, start));
+ data[i++] = packets;
+ data[i++] = bytes;
+ data[i++] = xdp_xmit;
+
+ rx_stats = &nvdev->chan_table[j].rx_stats;
+ do {
+- start = u64_stats_fetch_begin_irq(&rx_stats->syncp);
++ start = u64_stats_fetch_begin(&rx_stats->syncp);
+ packets = rx_stats->packets;
+ bytes = rx_stats->bytes;
+ xdp_drop = rx_stats->xdp_drop;
+ xdp_redirect = rx_stats->xdp_redirect;
+ xdp_tx = rx_stats->xdp_tx;
+- } while (u64_stats_fetch_retry_irq(&rx_stats->syncp, start));
++ } while (u64_stats_fetch_retry(&rx_stats->syncp, start));
+ data[i++] = packets;
+ data[i++] = bytes;
+ data[i++] = xdp_drop;
+--- a/drivers/net/ifb.c
++++ b/drivers/net/ifb.c
+@@ -162,18 +162,18 @@ static void ifb_stats64(struct net_devic
+
+ for (i = 0; i < dev->num_tx_queues; i++,txp++) {
+ do {
+- start = u64_stats_fetch_begin_irq(&txp->rx_stats.sync);
++ start = u64_stats_fetch_begin(&txp->rx_stats.sync);
+ packets = txp->rx_stats.packets;
+ bytes = txp->rx_stats.bytes;
+- } while (u64_stats_fetch_retry_irq(&txp->rx_stats.sync, start));
++ } while (u64_stats_fetch_retry(&txp->rx_stats.sync, start));
+ stats->rx_packets += packets;
+ stats->rx_bytes += bytes;
+
+ do {
+- start = u64_stats_fetch_begin_irq(&txp->tx_stats.sync);
++ start = u64_stats_fetch_begin(&txp->tx_stats.sync);
+ packets = txp->tx_stats.packets;
+ bytes = txp->tx_stats.bytes;
+- } while (u64_stats_fetch_retry_irq(&txp->tx_stats.sync, start));
++ } while (u64_stats_fetch_retry(&txp->tx_stats.sync, start));
+ stats->tx_packets += packets;
+ stats->tx_bytes += bytes;
+ }
+@@ -245,12 +245,12 @@ static void ifb_fill_stats_data(u64 **da
+ int j;
+
+ do {
+- start = u64_stats_fetch_begin_irq(&q_stats->sync);
++ start = u64_stats_fetch_begin(&q_stats->sync);
+ for (j = 0; j < IFB_Q_STATS_LEN; j++) {
+ offset = ifb_q_stats_desc[j].offset;
+ (*data)[j] = *(u64 *)(stats_base + offset);
+ }
+- } while (u64_stats_fetch_retry_irq(&q_stats->sync, start));
++ } while (u64_stats_fetch_retry(&q_stats->sync, start));
+
+ *data += IFB_Q_STATS_LEN;
+ }
+--- a/drivers/net/ipvlan/ipvlan_main.c
++++ b/drivers/net/ipvlan/ipvlan_main.c
+@@ -299,13 +299,13 @@ static void ipvlan_get_stats64(struct ne
+ for_each_possible_cpu(idx) {
+ pcptr = per_cpu_ptr(ipvlan->pcpu_stats, idx);
+ do {
+- strt= u64_stats_fetch_begin_irq(&pcptr->syncp);
++ strt = u64_stats_fetch_begin(&pcptr->syncp);
+ rx_pkts = u64_stats_read(&pcptr->rx_pkts);
+ rx_bytes = u64_stats_read(&pcptr->rx_bytes);
+ rx_mcast = u64_stats_read(&pcptr->rx_mcast);
+ tx_pkts = u64_stats_read(&pcptr->tx_pkts);
+ tx_bytes = u64_stats_read(&pcptr->tx_bytes);
+- } while (u64_stats_fetch_retry_irq(&pcptr->syncp,
++ } while (u64_stats_fetch_retry(&pcptr->syncp,
+ strt));
+
+ s->rx_packets += rx_pkts;
+--- a/drivers/net/loopback.c
++++ b/drivers/net/loopback.c
+@@ -106,10 +106,10 @@ void dev_lstats_read(struct net_device *
+
+ lb_stats = per_cpu_ptr(dev->lstats, i);
+ do {
+- start = u64_stats_fetch_begin_irq(&lb_stats->syncp);
++ start = u64_stats_fetch_begin(&lb_stats->syncp);
+ tpackets = u64_stats_read(&lb_stats->packets);
+ tbytes = u64_stats_read(&lb_stats->bytes);
+- } while (u64_stats_fetch_retry_irq(&lb_stats->syncp, start));
++ } while (u64_stats_fetch_retry(&lb_stats->syncp, start));
+ *bytes += tbytes;
+ *packets += tpackets;
+ }
+--- a/drivers/net/macsec.c
++++ b/drivers/net/macsec.c
+@@ -2823,9 +2823,9 @@ static void get_rx_sc_stats(struct net_d
+
+ stats = per_cpu_ptr(rx_sc->stats, cpu);
+ do {
+- start = u64_stats_fetch_begin_irq(&stats->syncp);
++ start = u64_stats_fetch_begin(&stats->syncp);
+ memcpy(&tmp, &stats->stats, sizeof(tmp));
+- } while (u64_stats_fetch_retry_irq(&stats->syncp, start));
++ } while (u64_stats_fetch_retry(&stats->syncp, start));
+
+ sum->InOctetsValidated += tmp.InOctetsValidated;
+ sum->InOctetsDecrypted += tmp.InOctetsDecrypted;
+@@ -2904,9 +2904,9 @@ static void get_tx_sc_stats(struct net_d
+
+ stats = per_cpu_ptr(macsec_priv(dev)->secy.tx_sc.stats, cpu);
+ do {
+- start = u64_stats_fetch_begin_irq(&stats->syncp);
++ start = u64_stats_fetch_begin(&stats->syncp);
+ memcpy(&tmp, &stats->stats, sizeof(tmp));
+- } while (u64_stats_fetch_retry_irq(&stats->syncp, start));
++ } while (u64_stats_fetch_retry(&stats->syncp, start));
+
+ sum->OutPktsProtected += tmp.OutPktsProtected;
+ sum->OutPktsEncrypted += tmp.OutPktsEncrypted;
+@@ -2960,9 +2960,9 @@ static void get_secy_stats(struct net_de
+
+ stats = per_cpu_ptr(macsec_priv(dev)->stats, cpu);
+ do {
+- start = u64_stats_fetch_begin_irq(&stats->syncp);
++ start = u64_stats_fetch_begin(&stats->syncp);
+ memcpy(&tmp, &stats->stats, sizeof(tmp));
+- } while (u64_stats_fetch_retry_irq(&stats->syncp, start));
++ } while (u64_stats_fetch_retry(&stats->syncp, start));
+
+ sum->OutPktsUntagged += tmp.OutPktsUntagged;
+ sum->InPktsUntagged += tmp.InPktsUntagged;
+--- a/drivers/net/macvlan.c
++++ b/drivers/net/macvlan.c
+@@ -948,13 +948,13 @@ static void macvlan_dev_get_stats64(stru
+ for_each_possible_cpu(i) {
+ p = per_cpu_ptr(vlan->pcpu_stats, i);
+ do {
+- start = u64_stats_fetch_begin_irq(&p->syncp);
++ start = u64_stats_fetch_begin(&p->syncp);
+ rx_packets = u64_stats_read(&p->rx_packets);
+ rx_bytes = u64_stats_read(&p->rx_bytes);
+ rx_multicast = u64_stats_read(&p->rx_multicast);
+ tx_packets = u64_stats_read(&p->tx_packets);
+ tx_bytes = u64_stats_read(&p->tx_bytes);
+- } while (u64_stats_fetch_retry_irq(&p->syncp, start));
++ } while (u64_stats_fetch_retry(&p->syncp, start));
+
+ stats->rx_packets += rx_packets;
+ stats->rx_bytes += rx_bytes;
+--- a/drivers/net/mhi_net.c
++++ b/drivers/net/mhi_net.c
+@@ -104,19 +104,19 @@ static void mhi_ndo_get_stats64(struct n
+ unsigned int start;
+
+ do {
+- start = u64_stats_fetch_begin_irq(&mhi_netdev->stats.rx_syncp);
++ start = u64_stats_fetch_begin(&mhi_netdev->stats.rx_syncp);
+ stats->rx_packets = u64_stats_read(&mhi_netdev->stats.rx_packets);
+ stats->rx_bytes = u64_stats_read(&mhi_netdev->stats.rx_bytes);
+ stats->rx_errors = u64_stats_read(&mhi_netdev->stats.rx_errors);
+- } while (u64_stats_fetch_retry_irq(&mhi_netdev->stats.rx_syncp, start));
++ } while (u64_stats_fetch_retry(&mhi_netdev->stats.rx_syncp, start));
+
+ do {
+- start = u64_stats_fetch_begin_irq(&mhi_netdev->stats.tx_syncp);
++ start = u64_stats_fetch_begin(&mhi_netdev->stats.tx_syncp);
+ stats->tx_packets = u64_stats_read(&mhi_netdev->stats.tx_packets);
+ stats->tx_bytes = u64_stats_read(&mhi_netdev->stats.tx_bytes);
+ stats->tx_errors = u64_stats_read(&mhi_netdev->stats.tx_errors);
+ stats->tx_dropped = u64_stats_read(&mhi_netdev->stats.tx_dropped);
+- } while (u64_stats_fetch_retry_irq(&mhi_netdev->stats.tx_syncp, start));
++ } while (u64_stats_fetch_retry(&mhi_netdev->stats.tx_syncp, start));
+ }
+
+ static const struct net_device_ops mhi_netdev_ops = {
+--- a/drivers/net/netdevsim/netdev.c
++++ b/drivers/net/netdevsim/netdev.c
+@@ -67,10 +67,10 @@ nsim_get_stats64(struct net_device *dev,
+ unsigned int start;
+
+ do {
+- start = u64_stats_fetch_begin_irq(&ns->syncp);
++ start = u64_stats_fetch_begin(&ns->syncp);
+ stats->tx_bytes = ns->tx_bytes;
+ stats->tx_packets = ns->tx_packets;
+- } while (u64_stats_fetch_retry_irq(&ns->syncp, start));
++ } while (u64_stats_fetch_retry(&ns->syncp, start));
+ }
+
+ static int
+--- a/drivers/net/team/team.c
++++ b/drivers/net/team/team.c
+@@ -1853,13 +1853,13 @@ team_get_stats64(struct net_device *dev,
+ for_each_possible_cpu(i) {
+ p = per_cpu_ptr(team->pcpu_stats, i);
+ do {
+- start = u64_stats_fetch_begin_irq(&p->syncp);
++ start = u64_stats_fetch_begin(&p->syncp);
+ rx_packets = u64_stats_read(&p->rx_packets);
+ rx_bytes = u64_stats_read(&p->rx_bytes);
+ rx_multicast = u64_stats_read(&p->rx_multicast);
+ tx_packets = u64_stats_read(&p->tx_packets);
+ tx_bytes = u64_stats_read(&p->tx_bytes);
+- } while (u64_stats_fetch_retry_irq(&p->syncp, start));
++ } while (u64_stats_fetch_retry(&p->syncp, start));
+
+ stats->rx_packets += rx_packets;
+ stats->rx_bytes += rx_bytes;
+--- a/drivers/net/team/team_mode_loadbalance.c
++++ b/drivers/net/team/team_mode_loadbalance.c
+@@ -466,9 +466,9 @@ static void __lb_one_cpu_stats_add(struc
+ struct lb_stats tmp;
+
+ do {
+- start = u64_stats_fetch_begin_irq(syncp);
++ start = u64_stats_fetch_begin(syncp);
+ tmp.tx_bytes = cpu_stats->tx_bytes;
+- } while (u64_stats_fetch_retry_irq(syncp, start));
++ } while (u64_stats_fetch_retry(syncp, start));
+ acc_stats->tx_bytes += tmp.tx_bytes;
+ }
+
+--- a/drivers/net/veth.c
++++ b/drivers/net/veth.c
+@@ -182,12 +182,12 @@ static void veth_get_ethtool_stats(struc
+ size_t offset;
+
+ do {
+- start = u64_stats_fetch_begin_irq(&rq_stats->syncp);
++ start = u64_stats_fetch_begin(&rq_stats->syncp);
+ for (j = 0; j < VETH_RQ_STATS_LEN; j++) {
+ offset = veth_rq_stats_desc[j].offset;
+ data[idx + j] = *(u64 *)(stats_base + offset);
+ }
+- } while (u64_stats_fetch_retry_irq(&rq_stats->syncp, start));
++ } while (u64_stats_fetch_retry(&rq_stats->syncp, start));
+ idx += VETH_RQ_STATS_LEN;
+ }
+
+@@ -203,12 +203,12 @@ static void veth_get_ethtool_stats(struc
+
+ tx_idx += (i % dev->real_num_tx_queues) * VETH_TQ_STATS_LEN;
+ do {
+- start = u64_stats_fetch_begin_irq(&rq_stats->syncp);
++ start = u64_stats_fetch_begin(&rq_stats->syncp);
+ for (j = 0; j < VETH_TQ_STATS_LEN; j++) {
+ offset = veth_tq_stats_desc[j].offset;
+ data[tx_idx + j] += *(u64 *)(base + offset);
+ }
+- } while (u64_stats_fetch_retry_irq(&rq_stats->syncp, start));
++ } while (u64_stats_fetch_retry(&rq_stats->syncp, start));
+ }
+ }
+
+@@ -379,13 +379,13 @@ static void veth_stats_rx(struct veth_st
+ unsigned int start;
+
+ do {
+- start = u64_stats_fetch_begin_irq(&stats->syncp);
++ start = u64_stats_fetch_begin(&stats->syncp);
+ peer_tq_xdp_xmit_err = stats->vs.peer_tq_xdp_xmit_err;
+ xdp_tx_err = stats->vs.xdp_tx_err;
+ packets = stats->vs.xdp_packets;
+ bytes = stats->vs.xdp_bytes;
+ drops = stats->vs.rx_drops;
+- } while (u64_stats_fetch_retry_irq(&stats->syncp, start));
++ } while (u64_stats_fetch_retry(&stats->syncp, start));
+ result->peer_tq_xdp_xmit_err += peer_tq_xdp_xmit_err;
+ result->xdp_tx_err += xdp_tx_err;
+ result->xdp_packets += packets;
+--- a/drivers/net/virtio_net.c
++++ b/drivers/net/virtio_net.c
+@@ -2066,18 +2066,18 @@ static void virtnet_stats(struct net_dev
+ struct send_queue *sq = &vi->sq[i];
+
+ do {
+- start = u64_stats_fetch_begin_irq(&sq->stats.syncp);
++ start = u64_stats_fetch_begin(&sq->stats.syncp);
+ tpackets = sq->stats.packets;
+ tbytes = sq->stats.bytes;
+ terrors = sq->stats.tx_timeouts;
+- } while (u64_stats_fetch_retry_irq(&sq->stats.syncp, start));
++ } while (u64_stats_fetch_retry(&sq->stats.syncp, start));
+
+ do {
+- start = u64_stats_fetch_begin_irq(&rq->stats.syncp);
++ start = u64_stats_fetch_begin(&rq->stats.syncp);
+ rpackets = rq->stats.packets;
+ rbytes = rq->stats.bytes;
+ rdrops = rq->stats.drops;
+- } while (u64_stats_fetch_retry_irq(&rq->stats.syncp, start));
++ } while (u64_stats_fetch_retry(&rq->stats.syncp, start));
+
+ tot->rx_packets += rpackets;
+ tot->tx_packets += tpackets;
+@@ -2688,12 +2688,12 @@ static void virtnet_get_ethtool_stats(st
+
+ stats_base = (u8 *)&rq->stats;
+ do {
+- start = u64_stats_fetch_begin_irq(&rq->stats.syncp);
++ start = u64_stats_fetch_begin(&rq->stats.syncp);
+ for (j = 0; j < VIRTNET_RQ_STATS_LEN; j++) {
+ offset = virtnet_rq_stats_desc[j].offset;
+ data[idx + j] = *(u64 *)(stats_base + offset);
+ }
+- } while (u64_stats_fetch_retry_irq(&rq->stats.syncp, start));
++ } while (u64_stats_fetch_retry(&rq->stats.syncp, start));
+ idx += VIRTNET_RQ_STATS_LEN;
+ }
+
+@@ -2702,12 +2702,12 @@ static void virtnet_get_ethtool_stats(st
+
+ stats_base = (u8 *)&sq->stats;
+ do {
+- start = u64_stats_fetch_begin_irq(&sq->stats.syncp);
++ start = u64_stats_fetch_begin(&sq->stats.syncp);
+ for (j = 0; j < VIRTNET_SQ_STATS_LEN; j++) {
+ offset = virtnet_sq_stats_desc[j].offset;
+ data[idx + j] = *(u64 *)(stats_base + offset);
+ }
+- } while (u64_stats_fetch_retry_irq(&sq->stats.syncp, start));
++ } while (u64_stats_fetch_retry(&sq->stats.syncp, start));
+ idx += VIRTNET_SQ_STATS_LEN;
+ }
+ }
+--- a/drivers/net/vrf.c
++++ b/drivers/net/vrf.c
+@@ -159,13 +159,13 @@ static void vrf_get_stats64(struct net_d
+
+ dstats = per_cpu_ptr(dev->dstats, i);
+ do {
+- start = u64_stats_fetch_begin_irq(&dstats->syncp);
++ start = u64_stats_fetch_begin(&dstats->syncp);
+ tbytes = dstats->tx_bytes;
+ tpkts = dstats->tx_pkts;
+ tdrops = dstats->tx_drps;
+ rbytes = dstats->rx_bytes;
+ rpkts = dstats->rx_pkts;
+- } while (u64_stats_fetch_retry_irq(&dstats->syncp, start));
++ } while (u64_stats_fetch_retry(&dstats->syncp, start));
+ stats->tx_bytes += tbytes;
+ stats->tx_packets += tpkts;
+ stats->tx_dropped += tdrops;
+--- a/drivers/net/vxlan/vxlan_vnifilter.c
++++ b/drivers/net/vxlan/vxlan_vnifilter.c
+@@ -129,9 +129,9 @@ static void vxlan_vnifilter_stats_get(co
+
+ pstats = per_cpu_ptr(vninode->stats, i);
+ do {
+- start = u64_stats_fetch_begin_irq(&pstats->syncp);
++ start = u64_stats_fetch_begin(&pstats->syncp);
+ memcpy(&temp, &pstats->stats, sizeof(temp));
+- } while (u64_stats_fetch_retry_irq(&pstats->syncp, start));
++ } while (u64_stats_fetch_retry(&pstats->syncp, start));
+
+ dest->rx_packets += temp.rx_packets;
+ dest->rx_bytes += temp.rx_bytes;
+--- a/drivers/net/wwan/mhi_wwan_mbim.c
++++ b/drivers/net/wwan/mhi_wwan_mbim.c
+@@ -456,19 +456,19 @@ static void mhi_mbim_ndo_get_stats64(str
+ unsigned int start;
+
+ do {
+- start = u64_stats_fetch_begin_irq(&link->rx_syncp);
++ start = u64_stats_fetch_begin(&link->rx_syncp);
+ stats->rx_packets = u64_stats_read(&link->rx_packets);
+ stats->rx_bytes = u64_stats_read(&link->rx_bytes);
+ stats->rx_errors = u64_stats_read(&link->rx_errors);
+- } while (u64_stats_fetch_retry_irq(&link->rx_syncp, start));
++ } while (u64_stats_fetch_retry(&link->rx_syncp, start));
+
+ do {
+- start = u64_stats_fetch_begin_irq(&link->tx_syncp);
++ start = u64_stats_fetch_begin(&link->tx_syncp);
+ stats->tx_packets = u64_stats_read(&link->tx_packets);
+ stats->tx_bytes = u64_stats_read(&link->tx_bytes);
+ stats->tx_errors = u64_stats_read(&link->tx_errors);
+ stats->tx_dropped = u64_stats_read(&link->tx_dropped);
+- } while (u64_stats_fetch_retry_irq(&link->tx_syncp, start));
++ } while (u64_stats_fetch_retry(&link->tx_syncp, start));
+ }
+
+ static void mhi_mbim_ul_callback(struct mhi_device *mhi_dev,
+--- a/drivers/net/xen-netfront.c
++++ b/drivers/net/xen-netfront.c
+@@ -1392,16 +1392,16 @@ static void xennet_get_stats64(struct ne
+ unsigned int start;
+
+ do {
+- start = u64_stats_fetch_begin_irq(&tx_stats->syncp);
++ start = u64_stats_fetch_begin(&tx_stats->syncp);
+ tx_packets = tx_stats->packets;
+ tx_bytes = tx_stats->bytes;
+- } while (u64_stats_fetch_retry_irq(&tx_stats->syncp, start));
++ } while (u64_stats_fetch_retry(&tx_stats->syncp, start));
+
+ do {
+- start = u64_stats_fetch_begin_irq(&rx_stats->syncp);
++ start = u64_stats_fetch_begin(&rx_stats->syncp);
+ rx_packets = rx_stats->packets;
+ rx_bytes = rx_stats->bytes;
+- } while (u64_stats_fetch_retry_irq(&rx_stats->syncp, start));
++ } while (u64_stats_fetch_retry(&rx_stats->syncp, start));
+
+ tot->rx_packets += rx_packets;
+ tot->tx_packets += tx_packets;
diff --git a/debian/patches-rt/0003-drm-i915-Use-preempt_disable-enable_rt-where-recomme.patch b/debian/patches-rt/0003-drm-i915-Use-preempt_disable-enable_rt-where-recomme.patch
index 8d73f17f1..e0d9f4a56 100644
--- a/debian/patches-rt/0003-drm-i915-Use-preempt_disable-enable_rt-where-recomme.patch
+++ b/debian/patches-rt/0003-drm-i915-Use-preempt_disable-enable_rt-where-recomme.patch
@@ -2,7 +2,7 @@ From: Mike Galbraith <umgwanakikbuti@gmail.com>
Date: Sat, 27 Feb 2016 08:09:11 +0100
Subject: [PATCH 03/10] drm/i915: Use preempt_disable/enable_rt() where
recommended
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.19/older/patches-5.19-rc8-rt9.tar.xz
+Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/6.0/older/patches-6.0-rt11.tar.xz
Mario Kleiner suggest in commit
ad3543ede630f ("drm/intel: Push get_scanout_position() timestamping into kms driver.")
diff --git a/debian/patches-rt/0003-fs-dcache-Move-the-wakeup-from-__d_lookup_done-to-th.patch b/debian/patches-rt/0003-fs-dcache-Move-the-wakeup-from-__d_lookup_done-to-th.patch
deleted file mode 100644
index ba431ac92..000000000
--- a/debian/patches-rt/0003-fs-dcache-Move-the-wakeup-from-__d_lookup_done-to-th.patch
+++ /dev/null
@@ -1,187 +0,0 @@
-From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
-Date: Sun, 12 Jun 2022 16:27:29 +0200
-Subject: [PATCH 3/4] fs/dcache: Move the wakeup from __d_lookup_done() to the
- caller.
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.19/older/patches-5.19-rc8-rt9.tar.xz
-
-__d_lookup_done() wakes waiters on dentry->d_wait. On PREEMPT_RT we are
-not allowed to do that with preemption disabled, since the wakeup
-acquired wait_queue_head::lock, which is a "sleeping" spinlock on RT.
-
-Calling it under dentry->d_lock is not a problem, since that is also a
-"sleeping" spinlock on the same configs. Unfortunately, two of its
-callers (__d_add() and __d_move()) are holding more than just ->d_lock
-and that needs to be dealt with.
-
-The key observation is that wakeup can be moved to any point before
-dropping ->d_lock.
-
-As a first step to solve this, move the wake up outside of the
-hlist_bl_lock() held section.
-
-This is safe because:
-
-Waiters get inserted into ->d_wait only after they'd taken ->d_lock
-and observed DCACHE_PAR_LOOKUP in flags. As long as they are
-woken up (and evicted from the queue) between the moment __d_lookup_done()
-has removed DCACHE_PAR_LOOKUP and dropping ->d_lock, we are safe,
-since the waitqueue ->d_wait points to won't get destroyed without
-having __d_lookup_done(dentry) called (under ->d_lock).
-
-->d_wait is set only by d_alloc_parallel() and only in case when
-it returns a freshly allocated in-lookup dentry. Whenever that happens,
-we are guaranteed that __d_lookup_done() will be called for resulting
-dentry (under ->d_lock) before the wq in question gets destroyed.
-
-With two exceptions wq lives in call frame of the caller of
-d_alloc_parallel() and we have an explicit d_lookup_done() on the
-resulting in-lookup dentry before we leave that frame.
-
-One of those exceptions is nfs_call_unlink(), where wq is embedded into
-(dynamically allocated) struct nfs_unlinkdata. It is destroyed in
-nfs_async_unlink_release() after an explicit d_lookup_done() on the
-dentry wq went into.
-
-Remaining exception is d_add_ci(). There wq is what we'd found in
-->d_wait of d_add_ci() argument. Callers of d_add_ci() are two
-instances of ->d_lookup() and they must have been given an in-lookup
-dentry. Which means that they'd been called by __lookup_slow() or
-lookup_open(), with wq in the call frame of one of those.
-
-Result of d_alloc_parallel() in d_add_ci() is fed to
-d_splice_alias(), which either returns non-NULL (and d_add_ci() does
-d_lookup_done()) or feeds dentry to __d_add() that will do
-__d_lookup_done() under ->d_lock. That concludes the analysis.
-
-Let __d_lookup_unhash():
-
- 1) Lock the lookup hash and clear DCACHE_PAR_LOOKUP
- 2) Unhash the dentry
- 3) Retrieve and clear dentry::d_wait
- 4) Unlock the hash and return the retrieved waitqueue head pointer
- 5) Let the caller handle the wake up.
- 6) Rename __d_lookup_done() to __d_lookup_unhash_wake() to enforce
- build failures for OOT code that used __d_lookup_done() and is not
- aware of the new return value.
-
-This does not yet solve the PREEMPT_RT problem completely because
-preemption is still disabled due to i_dir_seq being held for write. This
-will be addressed in subsequent steps.
-
-An alternative solution would be to switch the waitqueue to a simple
-waitqueue, but aside of Linus not being a fan of them, moving the wake up
-closer to the place where dentry::lock is unlocked reduces lock contention
-time for the woken up waiter.
-
-Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
-Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
-Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
-Link: https://lkml.kernel.org/r/20220613140712.77932-3-bigeasy@linutronix.de
----
- fs/dcache.c | 35 ++++++++++++++++++++++++++++-------
- include/linux/dcache.h | 9 +++------
- 2 files changed, 31 insertions(+), 13 deletions(-)
-
---- a/fs/dcache.c
-+++ b/fs/dcache.c
-@@ -2712,32 +2712,51 @@ struct dentry *d_alloc_parallel(struct d
- }
- EXPORT_SYMBOL(d_alloc_parallel);
-
--void __d_lookup_done(struct dentry *dentry)
-+/*
-+ * - Unhash the dentry
-+ * - Retrieve and clear the waitqueue head in dentry
-+ * - Return the waitqueue head
-+ */
-+static wait_queue_head_t *__d_lookup_unhash(struct dentry *dentry)
- {
-- struct hlist_bl_head *b = in_lookup_hash(dentry->d_parent,
-- dentry->d_name.hash);
-+ wait_queue_head_t *d_wait;
-+ struct hlist_bl_head *b;
-+
-+ lockdep_assert_held(&dentry->d_lock);
-+
-+ b = in_lookup_hash(dentry->d_parent, dentry->d_name.hash);
- hlist_bl_lock(b);
- dentry->d_flags &= ~DCACHE_PAR_LOOKUP;
- __hlist_bl_del(&dentry->d_u.d_in_lookup_hash);
-- wake_up_all(dentry->d_wait);
-+ d_wait = dentry->d_wait;
- dentry->d_wait = NULL;
- hlist_bl_unlock(b);
- INIT_HLIST_NODE(&dentry->d_u.d_alias);
- INIT_LIST_HEAD(&dentry->d_lru);
-+ return d_wait;
-+}
-+
-+void __d_lookup_unhash_wake(struct dentry *dentry)
-+{
-+ spin_lock(&dentry->d_lock);
-+ wake_up_all(__d_lookup_unhash(dentry));
-+ spin_unlock(&dentry->d_lock);
- }
--EXPORT_SYMBOL(__d_lookup_done);
-+EXPORT_SYMBOL(__d_lookup_unhash_wake);
-
- /* inode->i_lock held if inode is non-NULL */
-
- static inline void __d_add(struct dentry *dentry, struct inode *inode)
- {
-+ wait_queue_head_t *d_wait;
- struct inode *dir = NULL;
- unsigned n;
- spin_lock(&dentry->d_lock);
- if (unlikely(d_in_lookup(dentry))) {
- dir = dentry->d_parent->d_inode;
- n = start_dir_add(dir);
-- __d_lookup_done(dentry);
-+ d_wait = __d_lookup_unhash(dentry);
-+ wake_up_all(d_wait);
- }
- if (inode) {
- unsigned add_flags = d_flags_for_inode(inode);
-@@ -2896,6 +2915,7 @@ static void __d_move(struct dentry *dent
- bool exchange)
- {
- struct dentry *old_parent, *p;
-+ wait_queue_head_t *d_wait;
- struct inode *dir = NULL;
- unsigned n;
-
-@@ -2926,7 +2946,8 @@ static void __d_move(struct dentry *dent
- if (unlikely(d_in_lookup(target))) {
- dir = target->d_parent->d_inode;
- n = start_dir_add(dir);
-- __d_lookup_done(target);
-+ d_wait = __d_lookup_unhash(target);
-+ wake_up_all(d_wait);
- }
-
- write_seqcount_begin(&dentry->d_seq);
---- a/include/linux/dcache.h
-+++ b/include/linux/dcache.h
-@@ -349,7 +349,7 @@ static inline void dont_mount(struct den
- spin_unlock(&dentry->d_lock);
- }
-
--extern void __d_lookup_done(struct dentry *);
-+extern void __d_lookup_unhash_wake(struct dentry *dentry);
-
- static inline int d_in_lookup(const struct dentry *dentry)
- {
-@@ -358,11 +358,8 @@ static inline int d_in_lookup(const stru
-
- static inline void d_lookup_done(struct dentry *dentry)
- {
-- if (unlikely(d_in_lookup(dentry))) {
-- spin_lock(&dentry->d_lock);
-- __d_lookup_done(dentry);
-- spin_unlock(&dentry->d_lock);
-- }
-+ if (unlikely(d_in_lookup(dentry)))
-+ __d_lookup_unhash_wake(dentry);
- }
-
- extern void dput(struct dentry *);
diff --git a/debian/patches-rt/0003-mm-slub-remove-slab_lock-usage-for-debug-operations.patch b/debian/patches-rt/0003-mm-slub-remove-slab_lock-usage-for-debug-operations.patch
new file mode 100644
index 000000000..905d7d2c5
--- /dev/null
+++ b/debian/patches-rt/0003-mm-slub-remove-slab_lock-usage-for-debug-operations.patch
@@ -0,0 +1,98 @@
+From: Vlastimil Babka <vbabka@suse.cz>
+Date: Tue, 23 Aug 2022 19:03:58 +0200
+Subject: [PATCH 3/5] mm/slub: remove slab_lock() usage for debug operations
+Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/6.0/older/patches-6.0-rt11.tar.xz
+
+All alloc and free operations on debug caches are now serialized by
+n->list_lock, so we can remove slab_lock() usage in validate_slab()
+and list_slab_objects() as those also happen under n->list_lock.
+
+Note the usage in list_slab_objects() could happen even on non-debug
+caches, but only during cache shutdown time, so there should not be any
+parallel freeing activity anymore. Except for buggy slab users, but in
+that case the slab_lock() would not help against the common cmpxchg
+based fast paths (in non-debug caches) anyway.
+
+Also adjust documentation comments accordingly.
+
+Suggested-by: Hyeonggon Yoo <42.hyeyoo@gmail.com>
+Signed-off-by: Vlastimil Babka <vbabka@suse.cz>
+Reviewed-by: Hyeonggon Yoo <42.hyeyoo@gmail.com>
+Acked-by: David Rientjes <rientjes@google.com>
+Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
+---
+ mm/slub.c | 19 ++++++++-----------
+ 1 file changed, 8 insertions(+), 11 deletions(-)
+
+--- a/mm/slub.c
++++ b/mm/slub.c
+@@ -50,7 +50,7 @@
+ * 1. slab_mutex (Global Mutex)
+ * 2. node->list_lock (Spinlock)
+ * 3. kmem_cache->cpu_slab->lock (Local lock)
+- * 4. slab_lock(slab) (Only on some arches or for debugging)
++ * 4. slab_lock(slab) (Only on some arches)
+ * 5. object_map_lock (Only for debugging)
+ *
+ * slab_mutex
+@@ -64,8 +64,9 @@
+ * The slab_lock is a wrapper around the page lock, thus it is a bit
+ * spinlock.
+ *
+- * The slab_lock is only used for debugging and on arches that do not
+- * have the ability to do a cmpxchg_double. It only protects:
++ * The slab_lock is only used on arches that do not have the ability
++ * to do a cmpxchg_double. It only protects:
++ *
+ * A. slab->freelist -> List of free objects in a slab
+ * B. slab->inuse -> Number of objects in use
+ * C. slab->objects -> Number of objects in slab
+@@ -94,6 +95,9 @@
+ * allocating a long series of objects that fill up slabs does not require
+ * the list lock.
+ *
++ * For debug caches, all allocations are forced to go through a list_lock
++ * protected region to serialize against concurrent validation.
++ *
+ * cpu_slab->lock local lock
+ *
+ * This locks protect slowpath manipulation of all kmem_cache_cpu fields
+@@ -4368,7 +4372,6 @@ static void list_slab_objects(struct kme
+ void *p;
+
+ slab_err(s, slab, text, s->name);
+- slab_lock(slab, &flags);
+
+ map = get_map(s, slab);
+ for_each_object(p, s, addr, slab->objects) {
+@@ -4379,7 +4382,6 @@ static void list_slab_objects(struct kme
+ }
+ }
+ put_map(map);
+- slab_unlock(slab, &flags);
+ #endif
+ }
+
+@@ -5107,12 +5109,9 @@ static void validate_slab(struct kmem_ca
+ {
+ void *p;
+ void *addr = slab_address(slab);
+- unsigned long flags;
+-
+- slab_lock(slab, &flags);
+
+ if (!check_slab(s, slab) || !on_freelist(s, slab, NULL))
+- goto unlock;
++ return;
+
+ /* Now we know that a valid freelist exists */
+ __fill_map(obj_map, s, slab);
+@@ -5123,8 +5122,6 @@ static void validate_slab(struct kmem_ca
+ if (!check_object(s, slab, p, val))
+ break;
+ }
+-unlock:
+- slab_unlock(slab, &flags);
+ }
+
+ static int validate_slab_node(struct kmem_cache *s,
diff --git a/debian/patches-rt/0003-mm-vmstat-Use-preempt_-dis-en-able_nested.patch b/debian/patches-rt/0003-mm-vmstat-Use-preempt_-dis-en-able_nested.patch
new file mode 100644
index 000000000..145a58e10
--- /dev/null
+++ b/debian/patches-rt/0003-mm-vmstat-Use-preempt_-dis-en-able_nested.patch
@@ -0,0 +1,141 @@
+From: Thomas Gleixner <tglx@linutronix.de>
+Date: Thu, 25 Aug 2022 18:41:26 +0200
+Subject: [PATCH 3/8] mm/vmstat: Use preempt_[dis|en]able_nested()
+Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/6.0/older/patches-6.0-rt11.tar.xz
+
+Replace the open coded CONFIG_PREEMPT_RT conditional
+preempt_enable/disable() pairs with the new helper functions which hide
+the underlying implementation details.
+
+Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
+Cc: Andrew Morton <akpm@linux-foundation.org>
+Cc: linux-mm@kvack.org
+Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
+Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org>
+Link: https://lore.kernel.org/r/20220825164131.402717-4-bigeasy@linutronix.de
+---
+ mm/vmstat.c | 36 ++++++++++++------------------------
+ 1 file changed, 12 insertions(+), 24 deletions(-)
+
+--- a/mm/vmstat.c
++++ b/mm/vmstat.c
+@@ -355,8 +355,7 @@ void __mod_zone_page_state(struct zone *
+ * CPU migrations and preemption potentially corrupts a counter so
+ * disable preemption.
+ */
+- if (IS_ENABLED(CONFIG_PREEMPT_RT))
+- preempt_disable();
++ preempt_disable_nested();
+
+ x = delta + __this_cpu_read(*p);
+
+@@ -368,8 +367,7 @@ void __mod_zone_page_state(struct zone *
+ }
+ __this_cpu_write(*p, x);
+
+- if (IS_ENABLED(CONFIG_PREEMPT_RT))
+- preempt_enable();
++ preempt_enable_nested();
+ }
+ EXPORT_SYMBOL(__mod_zone_page_state);
+
+@@ -393,8 +391,7 @@ void __mod_node_page_state(struct pglist
+ }
+
+ /* See __mod_node_page_state */
+- if (IS_ENABLED(CONFIG_PREEMPT_RT))
+- preempt_disable();
++ preempt_disable_nested();
+
+ x = delta + __this_cpu_read(*p);
+
+@@ -406,8 +403,7 @@ void __mod_node_page_state(struct pglist
+ }
+ __this_cpu_write(*p, x);
+
+- if (IS_ENABLED(CONFIG_PREEMPT_RT))
+- preempt_enable();
++ preempt_enable_nested();
+ }
+ EXPORT_SYMBOL(__mod_node_page_state);
+
+@@ -441,8 +437,7 @@ void __inc_zone_state(struct zone *zone,
+ s8 v, t;
+
+ /* See __mod_node_page_state */
+- if (IS_ENABLED(CONFIG_PREEMPT_RT))
+- preempt_disable();
++ preempt_disable_nested();
+
+ v = __this_cpu_inc_return(*p);
+ t = __this_cpu_read(pcp->stat_threshold);
+@@ -453,8 +448,7 @@ void __inc_zone_state(struct zone *zone,
+ __this_cpu_write(*p, -overstep);
+ }
+
+- if (IS_ENABLED(CONFIG_PREEMPT_RT))
+- preempt_enable();
++ preempt_enable_nested();
+ }
+
+ void __inc_node_state(struct pglist_data *pgdat, enum node_stat_item item)
+@@ -466,8 +460,7 @@ void __inc_node_state(struct pglist_data
+ VM_WARN_ON_ONCE(vmstat_item_in_bytes(item));
+
+ /* See __mod_node_page_state */
+- if (IS_ENABLED(CONFIG_PREEMPT_RT))
+- preempt_disable();
++ preempt_disable_nested();
+
+ v = __this_cpu_inc_return(*p);
+ t = __this_cpu_read(pcp->stat_threshold);
+@@ -478,8 +471,7 @@ void __inc_node_state(struct pglist_data
+ __this_cpu_write(*p, -overstep);
+ }
+
+- if (IS_ENABLED(CONFIG_PREEMPT_RT))
+- preempt_enable();
++ preempt_enable_nested();
+ }
+
+ void __inc_zone_page_state(struct page *page, enum zone_stat_item item)
+@@ -501,8 +493,7 @@ void __dec_zone_state(struct zone *zone,
+ s8 v, t;
+
+ /* See __mod_node_page_state */
+- if (IS_ENABLED(CONFIG_PREEMPT_RT))
+- preempt_disable();
++ preempt_disable_nested();
+
+ v = __this_cpu_dec_return(*p);
+ t = __this_cpu_read(pcp->stat_threshold);
+@@ -513,8 +504,7 @@ void __dec_zone_state(struct zone *zone,
+ __this_cpu_write(*p, overstep);
+ }
+
+- if (IS_ENABLED(CONFIG_PREEMPT_RT))
+- preempt_enable();
++ preempt_enable_nested();
+ }
+
+ void __dec_node_state(struct pglist_data *pgdat, enum node_stat_item item)
+@@ -526,8 +516,7 @@ void __dec_node_state(struct pglist_data
+ VM_WARN_ON_ONCE(vmstat_item_in_bytes(item));
+
+ /* See __mod_node_page_state */
+- if (IS_ENABLED(CONFIG_PREEMPT_RT))
+- preempt_disable();
++ preempt_disable_nested();
+
+ v = __this_cpu_dec_return(*p);
+ t = __this_cpu_read(pcp->stat_threshold);
+@@ -538,8 +527,7 @@ void __dec_node_state(struct pglist_data
+ __this_cpu_write(*p, overstep);
+ }
+
+- if (IS_ENABLED(CONFIG_PREEMPT_RT))
+- preempt_enable();
++ preempt_enable_nested();
+ }
+
+ void __dec_zone_page_state(struct page *page, enum zone_stat_item item)
diff --git a/debian/patches-rt/0003-net-Remove-the-obsolte-u64_stats_fetch_-_irq-users.patch b/debian/patches-rt/0003-net-Remove-the-obsolte-u64_stats_fetch_-_irq-users.patch
new file mode 100644
index 000000000..c2879e939
--- /dev/null
+++ b/debian/patches-rt/0003-net-Remove-the-obsolte-u64_stats_fetch_-_irq-users.patch
@@ -0,0 +1,356 @@
+From: Thomas Gleixner <tglx@linutronix.de>
+Date: Thu, 25 Aug 2022 16:17:37 +0200
+Subject: [PATCH 3/4] net: Remove the obsolte u64_stats_fetch_*_irq() users (part two).
+Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/6.0/older/patches-6.0-rt11.tar.xz
+
+Now that the 32bit UP oddity is gone and 32bit uses always a sequence
+count, there is no need for the fetch_irq() variants anymore.
+
+Convert to the regular interface.
+
+Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
+Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
+Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org>
+---
+ net/8021q/vlan_dev.c | 4 ++--
+ net/bridge/br_multicast.c | 4 ++--
+ net/bridge/br_vlan.c | 4 ++--
+ net/core/dev.c | 4 ++--
+ net/core/devlink.c | 4 ++--
+ net/core/drop_monitor.c | 8 ++++----
+ net/core/gen_stats.c | 16 ++++++++--------
+ net/dsa/slave.c | 4 ++--
+ net/ipv4/af_inet.c | 4 ++--
+ net/ipv6/seg6_local.c | 4 ++--
+ net/mac80211/sta_info.c | 8 ++++----
+ net/mpls/af_mpls.c | 4 ++--
+ net/netfilter/ipvs/ip_vs_ctl.c | 4 ++--
+ net/netfilter/nf_tables_api.c | 4 ++--
+ net/openvswitch/datapath.c | 4 ++--
+ net/openvswitch/flow_table.c | 9 ++++-----
+ 16 files changed, 44 insertions(+), 45 deletions(-)
+
+--- a/net/8021q/vlan_dev.c
++++ b/net/8021q/vlan_dev.c
+@@ -712,13 +712,13 @@ static void vlan_dev_get_stats64(struct
+
+ p = per_cpu_ptr(vlan_dev_priv(dev)->vlan_pcpu_stats, i);
+ do {
+- start = u64_stats_fetch_begin_irq(&p->syncp);
++ start = u64_stats_fetch_begin(&p->syncp);
+ rxpackets = u64_stats_read(&p->rx_packets);
+ rxbytes = u64_stats_read(&p->rx_bytes);
+ rxmulticast = u64_stats_read(&p->rx_multicast);
+ txpackets = u64_stats_read(&p->tx_packets);
+ txbytes = u64_stats_read(&p->tx_bytes);
+- } while (u64_stats_fetch_retry_irq(&p->syncp, start));
++ } while (u64_stats_fetch_retry(&p->syncp, start));
+
+ stats->rx_packets += rxpackets;
+ stats->rx_bytes += rxbytes;
+--- a/net/bridge/br_multicast.c
++++ b/net/bridge/br_multicast.c
+@@ -4899,9 +4899,9 @@ void br_multicast_get_stats(const struct
+ unsigned int start;
+
+ do {
+- start = u64_stats_fetch_begin_irq(&cpu_stats->syncp);
++ start = u64_stats_fetch_begin(&cpu_stats->syncp);
+ memcpy(&temp, &cpu_stats->mstats, sizeof(temp));
+- } while (u64_stats_fetch_retry_irq(&cpu_stats->syncp, start));
++ } while (u64_stats_fetch_retry(&cpu_stats->syncp, start));
+
+ mcast_stats_add_dir(tdst.igmp_v1queries, temp.igmp_v1queries);
+ mcast_stats_add_dir(tdst.igmp_v2queries, temp.igmp_v2queries);
+--- a/net/bridge/br_vlan.c
++++ b/net/bridge/br_vlan.c
+@@ -1378,12 +1378,12 @@ void br_vlan_get_stats(const struct net_
+
+ cpu_stats = per_cpu_ptr(v->stats, i);
+ do {
+- start = u64_stats_fetch_begin_irq(&cpu_stats->syncp);
++ start = u64_stats_fetch_begin(&cpu_stats->syncp);
+ rxpackets = u64_stats_read(&cpu_stats->rx_packets);
+ rxbytes = u64_stats_read(&cpu_stats->rx_bytes);
+ txbytes = u64_stats_read(&cpu_stats->tx_bytes);
+ txpackets = u64_stats_read(&cpu_stats->tx_packets);
+- } while (u64_stats_fetch_retry_irq(&cpu_stats->syncp, start));
++ } while (u64_stats_fetch_retry(&cpu_stats->syncp, start));
+
+ u64_stats_add(&stats->rx_packets, rxpackets);
+ u64_stats_add(&stats->rx_bytes, rxbytes);
+--- a/net/core/dev.c
++++ b/net/core/dev.c
+@@ -10492,12 +10492,12 @@ void dev_fetch_sw_netstats(struct rtnl_l
+
+ stats = per_cpu_ptr(netstats, cpu);
+ do {
+- start = u64_stats_fetch_begin_irq(&stats->syncp);
++ start = u64_stats_fetch_begin(&stats->syncp);
+ rx_packets = u64_stats_read(&stats->rx_packets);
+ rx_bytes = u64_stats_read(&stats->rx_bytes);
+ tx_packets = u64_stats_read(&stats->tx_packets);
+ tx_bytes = u64_stats_read(&stats->tx_bytes);
+- } while (u64_stats_fetch_retry_irq(&stats->syncp, start));
++ } while (u64_stats_fetch_retry(&stats->syncp, start));
+
+ s->rx_packets += rx_packets;
+ s->rx_bytes += rx_bytes;
+--- a/net/core/devlink.c
++++ b/net/core/devlink.c
+@@ -8268,10 +8268,10 @@ static void devlink_trap_stats_read(stru
+
+ cpu_stats = per_cpu_ptr(trap_stats, i);
+ do {
+- start = u64_stats_fetch_begin_irq(&cpu_stats->syncp);
++ start = u64_stats_fetch_begin(&cpu_stats->syncp);
+ rx_packets = u64_stats_read(&cpu_stats->rx_packets);
+ rx_bytes = u64_stats_read(&cpu_stats->rx_bytes);
+- } while (u64_stats_fetch_retry_irq(&cpu_stats->syncp, start));
++ } while (u64_stats_fetch_retry(&cpu_stats->syncp, start));
+
+ u64_stats_add(&stats->rx_packets, rx_packets);
+ u64_stats_add(&stats->rx_bytes, rx_bytes);
+--- a/net/core/drop_monitor.c
++++ b/net/core/drop_monitor.c
+@@ -1432,9 +1432,9 @@ static void net_dm_stats_read(struct net
+ u64 dropped;
+
+ do {
+- start = u64_stats_fetch_begin_irq(&cpu_stats->syncp);
++ start = u64_stats_fetch_begin(&cpu_stats->syncp);
+ dropped = u64_stats_read(&cpu_stats->dropped);
+- } while (u64_stats_fetch_retry_irq(&cpu_stats->syncp, start));
++ } while (u64_stats_fetch_retry(&cpu_stats->syncp, start));
+
+ u64_stats_add(&stats->dropped, dropped);
+ }
+@@ -1476,9 +1476,9 @@ static void net_dm_hw_stats_read(struct
+ u64 dropped;
+
+ do {
+- start = u64_stats_fetch_begin_irq(&cpu_stats->syncp);
++ start = u64_stats_fetch_begin(&cpu_stats->syncp);
+ dropped = u64_stats_read(&cpu_stats->dropped);
+- } while (u64_stats_fetch_retry_irq(&cpu_stats->syncp, start));
++ } while (u64_stats_fetch_retry(&cpu_stats->syncp, start));
+
+ u64_stats_add(&stats->dropped, dropped);
+ }
+--- a/net/core/gen_stats.c
++++ b/net/core/gen_stats.c
+@@ -135,10 +135,10 @@ static void gnet_stats_add_basic_cpu(str
+ u64 bytes, packets;
+
+ do {
+- start = u64_stats_fetch_begin_irq(&bcpu->syncp);
++ start = u64_stats_fetch_begin(&bcpu->syncp);
+ bytes = u64_stats_read(&bcpu->bytes);
+ packets = u64_stats_read(&bcpu->packets);
+- } while (u64_stats_fetch_retry_irq(&bcpu->syncp, start));
++ } while (u64_stats_fetch_retry(&bcpu->syncp, start));
+
+ t_bytes += bytes;
+ t_packets += packets;
+@@ -162,10 +162,10 @@ void gnet_stats_add_basic(struct gnet_st
+ }
+ do {
+ if (running)
+- start = u64_stats_fetch_begin_irq(&b->syncp);
++ start = u64_stats_fetch_begin(&b->syncp);
+ bytes = u64_stats_read(&b->bytes);
+ packets = u64_stats_read(&b->packets);
+- } while (running && u64_stats_fetch_retry_irq(&b->syncp, start));
++ } while (running && u64_stats_fetch_retry(&b->syncp, start));
+
+ _bstats_update(bstats, bytes, packets);
+ }
+@@ -187,10 +187,10 @@ static void gnet_stats_read_basic(u64 *r
+ u64 bytes, packets;
+
+ do {
+- start = u64_stats_fetch_begin_irq(&bcpu->syncp);
++ start = u64_stats_fetch_begin(&bcpu->syncp);
+ bytes = u64_stats_read(&bcpu->bytes);
+ packets = u64_stats_read(&bcpu->packets);
+- } while (u64_stats_fetch_retry_irq(&bcpu->syncp, start));
++ } while (u64_stats_fetch_retry(&bcpu->syncp, start));
+
+ t_bytes += bytes;
+ t_packets += packets;
+@@ -201,10 +201,10 @@ static void gnet_stats_read_basic(u64 *r
+ }
+ do {
+ if (running)
+- start = u64_stats_fetch_begin_irq(&b->syncp);
++ start = u64_stats_fetch_begin(&b->syncp);
+ *ret_bytes = u64_stats_read(&b->bytes);
+ *ret_packets = u64_stats_read(&b->packets);
+- } while (running && u64_stats_fetch_retry_irq(&b->syncp, start));
++ } while (running && u64_stats_fetch_retry(&b->syncp, start));
+ }
+
+ static int
+--- a/net/dsa/slave.c
++++ b/net/dsa/slave.c
+@@ -934,12 +934,12 @@ static void dsa_slave_get_ethtool_stats(
+
+ s = per_cpu_ptr(dev->tstats, i);
+ do {
+- start = u64_stats_fetch_begin_irq(&s->syncp);
++ start = u64_stats_fetch_begin(&s->syncp);
+ tx_packets = u64_stats_read(&s->tx_packets);
+ tx_bytes = u64_stats_read(&s->tx_bytes);
+ rx_packets = u64_stats_read(&s->rx_packets);
+ rx_bytes = u64_stats_read(&s->rx_bytes);
+- } while (u64_stats_fetch_retry_irq(&s->syncp, start));
++ } while (u64_stats_fetch_retry(&s->syncp, start));
+ data[0] += tx_packets;
+ data[1] += tx_bytes;
+ data[2] += rx_packets;
+--- a/net/ipv4/af_inet.c
++++ b/net/ipv4/af_inet.c
+@@ -1684,9 +1684,9 @@ u64 snmp_get_cpu_field64(void __percpu *
+ bhptr = per_cpu_ptr(mib, cpu);
+ syncp = (struct u64_stats_sync *)(bhptr + syncp_offset);
+ do {
+- start = u64_stats_fetch_begin_irq(syncp);
++ start = u64_stats_fetch_begin(syncp);
+ v = *(((u64 *)bhptr) + offt);
+- } while (u64_stats_fetch_retry_irq(syncp, start));
++ } while (u64_stats_fetch_retry(syncp, start));
+
+ return v;
+ }
+--- a/net/ipv6/seg6_local.c
++++ b/net/ipv6/seg6_local.c
+@@ -1508,13 +1508,13 @@ static int put_nla_counters(struct sk_bu
+
+ pcounters = per_cpu_ptr(slwt->pcpu_counters, i);
+ do {
+- start = u64_stats_fetch_begin_irq(&pcounters->syncp);
++ start = u64_stats_fetch_begin(&pcounters->syncp);
+
+ packets = u64_stats_read(&pcounters->packets);
+ bytes = u64_stats_read(&pcounters->bytes);
+ errors = u64_stats_read(&pcounters->errors);
+
+- } while (u64_stats_fetch_retry_irq(&pcounters->syncp, start));
++ } while (u64_stats_fetch_retry(&pcounters->syncp, start));
+
+ counters.packets += packets;
+ counters.bytes += bytes;
+--- a/net/mac80211/sta_info.c
++++ b/net/mac80211/sta_info.c
+@@ -2316,9 +2316,9 @@ static inline u64 sta_get_tidstats_msdu(
+ u64 value;
+
+ do {
+- start = u64_stats_fetch_begin_irq(&rxstats->syncp);
++ start = u64_stats_fetch_begin(&rxstats->syncp);
+ value = rxstats->msdu[tid];
+- } while (u64_stats_fetch_retry_irq(&rxstats->syncp, start));
++ } while (u64_stats_fetch_retry(&rxstats->syncp, start));
+
+ return value;
+ }
+@@ -2384,9 +2384,9 @@ static inline u64 sta_get_stats_bytes(st
+ u64 value;
+
+ do {
+- start = u64_stats_fetch_begin_irq(&rxstats->syncp);
++ start = u64_stats_fetch_begin(&rxstats->syncp);
+ value = rxstats->bytes;
+- } while (u64_stats_fetch_retry_irq(&rxstats->syncp, start));
++ } while (u64_stats_fetch_retry(&rxstats->syncp, start));
+
+ return value;
+ }
+--- a/net/mpls/af_mpls.c
++++ b/net/mpls/af_mpls.c
+@@ -1079,9 +1079,9 @@ static void mpls_get_stats(struct mpls_d
+
+ p = per_cpu_ptr(mdev->stats, i);
+ do {
+- start = u64_stats_fetch_begin_irq(&p->syncp);
++ start = u64_stats_fetch_begin(&p->syncp);
+ local = p->stats;
+- } while (u64_stats_fetch_retry_irq(&p->syncp, start));
++ } while (u64_stats_fetch_retry(&p->syncp, start));
+
+ stats->rx_packets += local.rx_packets;
+ stats->rx_bytes += local.rx_bytes;
+--- a/net/netfilter/ipvs/ip_vs_ctl.c
++++ b/net/netfilter/ipvs/ip_vs_ctl.c
+@@ -2296,13 +2296,13 @@ static int ip_vs_stats_percpu_show(struc
+ u64 conns, inpkts, outpkts, inbytes, outbytes;
+
+ do {
+- start = u64_stats_fetch_begin_irq(&u->syncp);
++ start = u64_stats_fetch_begin(&u->syncp);
+ conns = u->cnt.conns;
+ inpkts = u->cnt.inpkts;
+ outpkts = u->cnt.outpkts;
+ inbytes = u->cnt.inbytes;
+ outbytes = u->cnt.outbytes;
+- } while (u64_stats_fetch_retry_irq(&u->syncp, start));
++ } while (u64_stats_fetch_retry(&u->syncp, start));
+
+ seq_printf(seq, "%3X %8LX %8LX %8LX %16LX %16LX\n",
+ i, (u64)conns, (u64)inpkts,
+--- a/net/netfilter/nf_tables_api.c
++++ b/net/netfilter/nf_tables_api.c
+@@ -1534,10 +1534,10 @@ static int nft_dump_stats(struct sk_buff
+ for_each_possible_cpu(cpu) {
+ cpu_stats = per_cpu_ptr(stats, cpu);
+ do {
+- seq = u64_stats_fetch_begin_irq(&cpu_stats->syncp);
++ seq = u64_stats_fetch_begin(&cpu_stats->syncp);
+ pkts = cpu_stats->pkts;
+ bytes = cpu_stats->bytes;
+- } while (u64_stats_fetch_retry_irq(&cpu_stats->syncp, seq));
++ } while (u64_stats_fetch_retry(&cpu_stats->syncp, seq));
+ total.pkts += pkts;
+ total.bytes += bytes;
+ }
+--- a/net/openvswitch/datapath.c
++++ b/net/openvswitch/datapath.c
+@@ -707,9 +707,9 @@ static void get_dp_stats(const struct da
+ percpu_stats = per_cpu_ptr(dp->stats_percpu, i);
+
+ do {
+- start = u64_stats_fetch_begin_irq(&percpu_stats->syncp);
++ start = u64_stats_fetch_begin(&percpu_stats->syncp);
+ local_stats = *percpu_stats;
+- } while (u64_stats_fetch_retry_irq(&percpu_stats->syncp, start));
++ } while (u64_stats_fetch_retry(&percpu_stats->syncp, start));
+
+ stats->n_hit += local_stats.n_hit;
+ stats->n_missed += local_stats.n_missed;
+--- a/net/openvswitch/flow_table.c
++++ b/net/openvswitch/flow_table.c
+@@ -205,9 +205,9 @@ static void tbl_mask_array_reset_counter
+
+ stats = per_cpu_ptr(ma->masks_usage_stats, cpu);
+ do {
+- start = u64_stats_fetch_begin_irq(&stats->syncp);
++ start = u64_stats_fetch_begin(&stats->syncp);
+ counter = stats->usage_cntrs[i];
+- } while (u64_stats_fetch_retry_irq(&stats->syncp, start));
++ } while (u64_stats_fetch_retry(&stats->syncp, start));
+
+ ma->masks_usage_zero_cntr[i] += counter;
+ }
+@@ -1136,10 +1136,9 @@ void ovs_flow_masks_rebalance(struct flo
+
+ stats = per_cpu_ptr(ma->masks_usage_stats, cpu);
+ do {
+- start = u64_stats_fetch_begin_irq(&stats->syncp);
++ start = u64_stats_fetch_begin(&stats->syncp);
+ counter = stats->usage_cntrs[i];
+- } while (u64_stats_fetch_retry_irq(&stats->syncp,
+- start));
++ } while (u64_stats_fetch_retry(&stats->syncp, start));
+
+ masks_and_count[i].counter += counter;
+ }
diff --git a/debian/patches-rt/0003-slub-Make-PREEMPT_RT-support-less-convoluted.patch b/debian/patches-rt/0003-slub-Make-PREEMPT_RT-support-less-convoluted.patch
new file mode 100644
index 000000000..0ad2b9804
--- /dev/null
+++ b/debian/patches-rt/0003-slub-Make-PREEMPT_RT-support-less-convoluted.patch
@@ -0,0 +1,146 @@
+From: Thomas Gleixner <tglx@linutronix.de>
+Date: Wed, 17 Aug 2022 18:26:55 +0200
+Subject: [PATCH 03/12] slub: Make PREEMPT_RT support less convoluted
+Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/6.0/older/patches-6.0-rt11.tar.xz
+
+The slub code already has a few helpers depending on PREEMPT_RT. Add a few
+more and get rid of the CONFIG_PREEMPT_RT conditionals all over the place.
+
+No functional change.
+
+Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
+Cc: Andrew Morton <akpm@linux-foundation.org>
+Cc: Christoph Lameter <cl@linux.com>
+Cc: David Rientjes <rientjes@google.com>
+Cc: Joonsoo Kim <iamjoonsoo.kim@lge.com>
+Cc: Pekka Enberg <penberg@kernel.org>
+Cc: Vlastimil Babka <vbabka@suse.cz>
+Cc: linux-mm@kvack.org
+Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
+Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org>
+Link: https://lore.kernel.org/r/YwcqCCJM1oLREWZc@linutronix.de
+---
+ mm/slub.c | 56 ++++++++++++++++++++++++--------------------------------
+ 1 file changed, 24 insertions(+), 32 deletions(-)
+
+--- a/mm/slub.c
++++ b/mm/slub.c
+@@ -104,9 +104,11 @@
+ * except the stat counters. This is a percpu structure manipulated only by
+ * the local cpu, so the lock protects against being preempted or interrupted
+ * by an irq. Fast path operations rely on lockless operations instead.
+- * On PREEMPT_RT, the local lock does not actually disable irqs (and thus
+- * prevent the lockless operations), so fastpath operations also need to take
+- * the lock and are no longer lockless.
++ *
++ * On PREEMPT_RT, the local lock neither disables interrupts nor preemption
++ * which means the lockless fastpath cannot be used as it might interfere with
++ * an in-progress slow path operations. In this case the local lock is always
++ * taken but it still utilizes the freelist for the common operations.
+ *
+ * lockless fastpaths
+ *
+@@ -167,8 +169,9 @@
+ * function call even on !PREEMPT_RT, use inline preempt_disable() there.
+ */
+ #ifndef CONFIG_PREEMPT_RT
+-#define slub_get_cpu_ptr(var) get_cpu_ptr(var)
+-#define slub_put_cpu_ptr(var) put_cpu_ptr(var)
++#define slub_get_cpu_ptr(var) get_cpu_ptr(var)
++#define slub_put_cpu_ptr(var) put_cpu_ptr(var)
++#define USE_LOCKLESS_FAST_PATH() (true)
+ #else
+ #define slub_get_cpu_ptr(var) \
+ ({ \
+@@ -180,6 +183,7 @@ do { \
+ (void)(var); \
+ migrate_enable(); \
+ } while (0)
++#define USE_LOCKLESS_FAST_PATH() (false)
+ #endif
+
+ #ifdef CONFIG_SLUB_DEBUG
+@@ -474,7 +478,7 @@ static inline bool __cmpxchg_double_slab
+ void *freelist_new, unsigned long counters_new,
+ const char *n)
+ {
+- if (!IS_ENABLED(CONFIG_PREEMPT_RT))
++ if (USE_LOCKLESS_FAST_PATH())
+ lockdep_assert_irqs_disabled();
+ #if defined(CONFIG_HAVE_CMPXCHG_DOUBLE) && \
+ defined(CONFIG_HAVE_ALIGNED_STRUCT_PAGE)
+@@ -3287,14 +3291,8 @@ static __always_inline void *slab_alloc_
+
+ object = c->freelist;
+ slab = c->slab;
+- /*
+- * We cannot use the lockless fastpath on PREEMPT_RT because if a
+- * slowpath has taken the local_lock_irqsave(), it is not protected
+- * against a fast path operation in an irq handler. So we need to take
+- * the slow path which uses local_lock. It is still relatively fast if
+- * there is a suitable cpu freelist.
+- */
+- if (IS_ENABLED(CONFIG_PREEMPT_RT) ||
++
++ if (!USE_LOCKLESS_FAST_PATH() ||
+ unlikely(!object || !slab || !node_match(slab, node))) {
+ object = __slab_alloc(s, gfpflags, node, addr, c);
+ } else {
+@@ -3554,6 +3552,7 @@ static __always_inline void do_slab_free
+ void *tail_obj = tail ? : head;
+ struct kmem_cache_cpu *c;
+ unsigned long tid;
++ void **freelist;
+
+ redo:
+ /*
+@@ -3568,9 +3567,13 @@ static __always_inline void do_slab_free
+ /* Same with comment on barrier() in slab_alloc_node() */
+ barrier();
+
+- if (likely(slab == c->slab)) {
+-#ifndef CONFIG_PREEMPT_RT
+- void **freelist = READ_ONCE(c->freelist);
++ if (unlikely(slab != c->slab)) {
++ __slab_free(s, slab, head, tail_obj, cnt, addr);
++ return;
++ }
++
++ if (USE_LOCKLESS_FAST_PATH()) {
++ freelist = READ_ONCE(c->freelist);
+
+ set_freepointer(s, tail_obj, freelist);
+
+@@ -3582,16 +3585,8 @@ static __always_inline void do_slab_free
+ note_cmpxchg_failure("slab_free", s, tid);
+ goto redo;
+ }
+-#else /* CONFIG_PREEMPT_RT */
+- /*
+- * We cannot use the lockless fastpath on PREEMPT_RT because if
+- * a slowpath has taken the local_lock_irqsave(), it is not
+- * protected against a fast path operation in an irq handler. So
+- * we need to take the local_lock. We shouldn't simply defer to
+- * __slab_free() as that wouldn't use the cpu freelist at all.
+- */
+- void **freelist;
+-
++ } else {
++ /* Update the free list under the local lock */
+ local_lock(&s->cpu_slab->lock);
+ c = this_cpu_ptr(s->cpu_slab);
+ if (unlikely(slab != c->slab)) {
+@@ -3606,11 +3601,8 @@ static __always_inline void do_slab_free
+ c->tid = next_tid(tid);
+
+ local_unlock(&s->cpu_slab->lock);
+-#endif
+- stat(s, FREE_FASTPATH);
+- } else
+- __slab_free(s, slab, head, tail_obj, cnt, addr);
+-
++ }
++ stat(s, FREE_FASTPATH);
+ }
+
+ static __always_inline void slab_free(struct kmem_cache *s, struct slab *slab,
diff --git a/debian/patches-rt/0004-bpf-Remove-the-obsolte-u64_stats_fetch_-_irq-users.patch b/debian/patches-rt/0004-bpf-Remove-the-obsolte-u64_stats_fetch_-_irq-users.patch
new file mode 100644
index 000000000..d488b126e
--- /dev/null
+++ b/debian/patches-rt/0004-bpf-Remove-the-obsolte-u64_stats_fetch_-_irq-users.patch
@@ -0,0 +1,45 @@
+From: Thomas Gleixner <tglx@linutronix.de>
+Date: Thu, 25 Aug 2022 16:17:57 +0200
+Subject: [PATCH 4/4] bpf: Remove the obsolte u64_stats_fetch_*_irq() users.
+Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/6.0/older/patches-6.0-rt11.tar.xz
+
+Now that the 32bit UP oddity is gone and 32bit uses always a sequence
+count, there is no need for the fetch_irq() variants anymore.
+
+Convert to the regular interface.
+
+Cc: Alexei Starovoitov <ast@kernel.org>
+Cc: Andrii Nakryiko <andrii@kernel.org>
+Cc: Daniel Borkmann <daniel@iogearbox.net>
+Cc: Hao Luo <haoluo@google.com>
+Cc: Jiri Olsa <jolsa@kernel.org>
+Cc: John Fastabend <john.fastabend@gmail.com>
+Cc: KP Singh <kpsingh@kernel.org>
+Cc: Martin KaFai Lau <martin.lau@linux.dev>
+Cc: Song Liu <song@kernel.org>
+Cc: Stanislav Fomichev <sdf@google.com>
+Cc: Yonghong Song <yhs@fb.com>
+Cc: bpf@vger.kernel.org
+Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
+Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
+Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org>
+---
+ kernel/bpf/syscall.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+--- a/kernel/bpf/syscall.c
++++ b/kernel/bpf/syscall.c
+@@ -2107,11 +2107,11 @@ static void bpf_prog_get_stats(const str
+
+ st = per_cpu_ptr(prog->stats, cpu);
+ do {
+- start = u64_stats_fetch_begin_irq(&st->syncp);
++ start = u64_stats_fetch_begin(&st->syncp);
+ tnsecs = u64_stats_read(&st->nsecs);
+ tcnt = u64_stats_read(&st->cnt);
+ tmisses = u64_stats_read(&st->misses);
+- } while (u64_stats_fetch_retry_irq(&st->syncp, start));
++ } while (u64_stats_fetch_retry(&st->syncp, start));
+ nsecs += tnsecs;
+ cnt += tcnt;
+ misses += tmisses;
diff --git a/debian/patches-rt/0004-drm-i915-Don-t-disable-interrupts-on-PREEMPT_RT-duri.patch b/debian/patches-rt/0004-drm-i915-Don-t-disable-interrupts-on-PREEMPT_RT-duri.patch
index 770d69577..aa5fcc923 100644
--- a/debian/patches-rt/0004-drm-i915-Don-t-disable-interrupts-on-PREEMPT_RT-duri.patch
+++ b/debian/patches-rt/0004-drm-i915-Don-t-disable-interrupts-on-PREEMPT_RT-duri.patch
@@ -2,7 +2,7 @@ From: Mike Galbraith <umgwanakikbuti@gmail.com>
Date: Sat, 27 Feb 2016 09:01:42 +0100
Subject: [PATCH 04/10] drm/i915: Don't disable interrupts on PREEMPT_RT during
atomic updates
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.19/older/patches-5.19-rc8-rt9.tar.xz
+Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/6.0/older/patches-6.0-rt11.tar.xz
Commit
8d7849db3eab7 ("drm/i915: Make sprite updates atomic")
diff --git a/debian/patches-rt/0004-fs-dcache-Move-wakeup-out-of-i_seq_dir-write-held-re.patch b/debian/patches-rt/0004-fs-dcache-Move-wakeup-out-of-i_seq_dir-write-held-re.patch
deleted file mode 100644
index 7f220c4d4..000000000
--- a/debian/patches-rt/0004-fs-dcache-Move-wakeup-out-of-i_seq_dir-write-held-re.patch
+++ /dev/null
@@ -1,83 +0,0 @@
-From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
-Date: Wed, 27 Jul 2022 11:20:40 +0200
-Subject: [PATCH 4/4] fs/dcache: Move wakeup out of i_seq_dir write held
- region.
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.19/older/patches-5.19-rc8-rt9.tar.xz
-
-__d_add() and __d_move() wake up waiters on dentry::d_wait from within
-the i_seq_dir write held region. This violates the PREEMPT_RT
-constraints as the wake up acquires wait_queue_head::lock which is a
-"sleeping" spinlock on RT.
-
-There is no requirement to do so. __d_lookup_unhash() has cleared
-DCACHE_PAR_LOOKUP and dentry::d_wait and returned the now unreachable wait
-queue head pointer to the caller, so the actual wake up can be postponed
-until the i_dir_seq write side critical section is left. The only
-requirement is that dentry::lock is held across the whole sequence
-including the wake up. The previous commit includes an analysis why this
-is considered safe.
-
-Move the wake up past end_dir_add() which leaves the i_dir_seq write side
-critical section and enables preemption.
-
-For non RT kernels there is no difference because preemption is still
-disabled due to dentry::lock being held, but it shortens the time between
-wake up and unlocking dentry::lock, which reduces the contention for the
-woken up waiter.
-
-Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
----
- fs/dcache.c | 10 +++++-----
- 1 file changed, 5 insertions(+), 5 deletions(-)
-
---- a/fs/dcache.c
-+++ b/fs/dcache.c
-@@ -2581,11 +2581,13 @@ static inline unsigned start_dir_add(str
- }
- }
-
--static inline void end_dir_add(struct inode *dir, unsigned n)
-+static inline void end_dir_add(struct inode *dir, unsigned int n,
-+ wait_queue_head_t *d_wait)
- {
- smp_store_release(&dir->i_dir_seq, n + 2);
- if (IS_ENABLED(CONFIG_PREEMPT_RT))
- preempt_enable();
-+ wake_up_all(d_wait);
- }
-
- static void d_wait_lookup(struct dentry *dentry)
-@@ -2756,7 +2758,6 @@ static inline void __d_add(struct dentry
- dir = dentry->d_parent->d_inode;
- n = start_dir_add(dir);
- d_wait = __d_lookup_unhash(dentry);
-- wake_up_all(d_wait);
- }
- if (inode) {
- unsigned add_flags = d_flags_for_inode(inode);
-@@ -2768,7 +2769,7 @@ static inline void __d_add(struct dentry
- }
- __d_rehash(dentry);
- if (dir)
-- end_dir_add(dir, n);
-+ end_dir_add(dir, n, d_wait);
- spin_unlock(&dentry->d_lock);
- if (inode)
- spin_unlock(&inode->i_lock);
-@@ -2947,7 +2948,6 @@ static void __d_move(struct dentry *dent
- dir = target->d_parent->d_inode;
- n = start_dir_add(dir);
- d_wait = __d_lookup_unhash(target);
-- wake_up_all(d_wait);
- }
-
- write_seqcount_begin(&dentry->d_seq);
-@@ -2983,7 +2983,7 @@ static void __d_move(struct dentry *dent
- write_seqcount_end(&dentry->d_seq);
-
- if (dir)
-- end_dir_add(dir, n);
-+ end_dir_add(dir, n, d_wait);
-
- if (dentry->d_parent != old_parent)
- spin_unlock(&dentry->d_parent->d_lock);
diff --git a/debian/patches-rt/0004-mm-debug-Provide-VM_WARN_ON_IRQS_ENABLED.patch b/debian/patches-rt/0004-mm-debug-Provide-VM_WARN_ON_IRQS_ENABLED.patch
new file mode 100644
index 000000000..82a614570
--- /dev/null
+++ b/debian/patches-rt/0004-mm-debug-Provide-VM_WARN_ON_IRQS_ENABLED.patch
@@ -0,0 +1,52 @@
+From: Thomas Gleixner <tglx@linutronix.de>
+Date: Thu, 25 Aug 2022 18:41:27 +0200
+Subject: [PATCH 4/8] mm/debug: Provide VM_WARN_ON_IRQS_ENABLED()
+Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/6.0/older/patches-6.0-rt11.tar.xz
+
+Some places in the VM code expect interrupts disabled, which is a valid
+expectation on non-PREEMPT_RT kernels, but does not hold on RT kernels in
+some places because the RT spinlock substitution does not disable
+interrupts.
+
+To avoid sprinkling CONFIG_PREEMPT_RT conditionals into those places,
+provide VM_WARN_ON_IRQS_ENABLED() which is only enabled when VM_DEBUG=y and
+PREEMPT_RT=n.
+
+Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
+Cc: Andrew Morton <akpm@linux-foundation.org>
+Cc: linux-mm@kvack.org
+Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
+Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org>
+Link: https://lore.kernel.org/r/20220825164131.402717-5-bigeasy@linutronix.de
+---
+ include/linux/mmdebug.h | 6 ++++++
+ lib/Kconfig.debug | 3 +++
+ 2 files changed, 9 insertions(+)
+
+--- a/include/linux/mmdebug.h
++++ b/include/linux/mmdebug.h
+@@ -94,6 +94,12 @@ void dump_mm(const struct mm_struct *mm)
+ #define VM_WARN(cond, format...) BUILD_BUG_ON_INVALID(cond)
+ #endif
+
++#ifdef CONFIG_DEBUG_VM_IRQSOFF
++#define VM_WARN_ON_IRQS_ENABLED() WARN_ON_ONCE(!irqs_disabled())
++#else
++#define VM_WARN_ON_IRQS_ENABLED() do { } while (0)
++#endif
++
+ #ifdef CONFIG_DEBUG_VIRTUAL
+ #define VIRTUAL_BUG_ON(cond) BUG_ON(cond)
+ #else
+--- a/lib/Kconfig.debug
++++ b/lib/Kconfig.debug
+@@ -803,6 +803,9 @@ config ARCH_HAS_DEBUG_VM_PGTABLE
+ An architecture should select this when it can successfully
+ build and run DEBUG_VM_PGTABLE.
+
++config DEBUG_VM_IRQSOFF
++ def_bool DEBUG_VM && !PREEMPT_RT
++
+ config DEBUG_VM
+ bool "Debug VM"
+ depends on DEBUG_KERNEL
diff --git a/debian/patches-rt/0004-mm-slub-convert-object_map_lock-to-non-raw-spinlock.patch b/debian/patches-rt/0004-mm-slub-convert-object_map_lock-to-non-raw-spinlock.patch
new file mode 100644
index 000000000..0d00a8071
--- /dev/null
+++ b/debian/patches-rt/0004-mm-slub-convert-object_map_lock-to-non-raw-spinlock.patch
@@ -0,0 +1,90 @@
+From: Vlastimil Babka <vbabka@suse.cz>
+Date: Tue, 23 Aug 2022 19:03:59 +0200
+Subject: [PATCH 4/5] mm/slub: convert object_map_lock to non-raw spinlock
+Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/6.0/older/patches-6.0-rt11.tar.xz
+
+The only remaining user of object_map_lock is list_slab_objects().
+Obtaining the lock there used to happen under slab_lock() which implied
+disabling irqs on PREEMPT_RT, thus it's a raw_spinlock. With the
+slab_lock() removed, we can convert it to a normal spinlock.
+
+Also remove the get_map()/put_map() wrappers as list_slab_objects()
+became their only remaining user.
+
+Signed-off-by: Vlastimil Babka <vbabka@suse.cz>
+Acked-by: David Rientjes <rientjes@google.com>
+Reviewed-by: Hyeonggon Yoo <42.hyeyoo@gmail.com>
+Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
+---
+ mm/slub.c | 36 ++++++------------------------------
+ 1 file changed, 6 insertions(+), 30 deletions(-)
+
+--- a/mm/slub.c
++++ b/mm/slub.c
+@@ -565,7 +565,7 @@ static inline bool cmpxchg_double_slab(s
+
+ #ifdef CONFIG_SLUB_DEBUG
+ static unsigned long object_map[BITS_TO_LONGS(MAX_OBJS_PER_PAGE)];
+-static DEFINE_RAW_SPINLOCK(object_map_lock);
++static DEFINE_SPINLOCK(object_map_lock);
+
+ static void __fill_map(unsigned long *obj_map, struct kmem_cache *s,
+ struct slab *slab)
+@@ -599,30 +599,6 @@ static bool slab_add_kunit_errors(void)
+ static inline bool slab_add_kunit_errors(void) { return false; }
+ #endif
+
+-/*
+- * Determine a map of objects in use in a slab.
+- *
+- * Node listlock must be held to guarantee that the slab does
+- * not vanish from under us.
+- */
+-static unsigned long *get_map(struct kmem_cache *s, struct slab *slab)
+- __acquires(&object_map_lock)
+-{
+- VM_BUG_ON(!irqs_disabled());
+-
+- raw_spin_lock(&object_map_lock);
+-
+- __fill_map(object_map, s, slab);
+-
+- return object_map;
+-}
+-
+-static void put_map(unsigned long *map) __releases(&object_map_lock)
+-{
+- VM_BUG_ON(map != object_map);
+- raw_spin_unlock(&object_map_lock);
+-}
+-
+ static inline unsigned int size_from_object(struct kmem_cache *s)
+ {
+ if (s->flags & SLAB_RED_ZONE)
+@@ -4367,21 +4343,21 @@ static void list_slab_objects(struct kme
+ {
+ #ifdef CONFIG_SLUB_DEBUG
+ void *addr = slab_address(slab);
+- unsigned long flags;
+- unsigned long *map;
+ void *p;
+
+ slab_err(s, slab, text, s->name);
+
+- map = get_map(s, slab);
++ spin_lock(&object_map_lock);
++ __fill_map(object_map, s, slab);
++
+ for_each_object(p, s, addr, slab->objects) {
+
+- if (!test_bit(__obj_to_index(s, addr, p), map)) {
++ if (!test_bit(__obj_to_index(s, addr, p), object_map)) {
+ pr_err("Object 0x%p @offset=%tu\n", p, p - addr);
+ print_tracking(s, p);
+ }
+ }
+- put_map(map);
++ spin_unlock(&object_map_lock);
+ #endif
+ }
+
diff --git a/debian/patches-rt/0005-drm-i915-Don-t-check-for-atomic-context-on-PREEMPT_R.patch b/debian/patches-rt/0005-drm-i915-Don-t-check-for-atomic-context-on-PREEMPT_R.patch
index 78d900910..a8028f095 100644
--- a/debian/patches-rt/0005-drm-i915-Don-t-check-for-atomic-context-on-PREEMPT_R.patch
+++ b/debian/patches-rt/0005-drm-i915-Don-t-check-for-atomic-context-on-PREEMPT_R.patch
@@ -1,7 +1,7 @@
From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Date: Mon, 25 Oct 2021 15:05:18 +0200
Subject: [PATCH 05/10] drm/i915: Don't check for atomic context on PREEMPT_RT
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.19/older/patches-5.19-rc8-rt9.tar.xz
+Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/6.0/older/patches-6.0-rt11.tar.xz
The !in_atomic() check in _wait_for_atomic() triggers on PREEMPT_RT
because the uncore::lock is a spinlock_t and does not disable
@@ -19,7 +19,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
--- a/drivers/gpu/drm/i915/i915_utils.h
+++ b/drivers/gpu/drm/i915/i915_utils.h
-@@ -334,7 +334,7 @@ wait_remaining_ms_from_jiffies(unsigned
+@@ -294,7 +294,7 @@ wait_remaining_ms_from_jiffies(unsigned
#define wait_for(COND, MS) _wait_for((COND), (MS) * 1000, 10, 1000)
/* If CONFIG_PREEMPT_COUNT is disabled, in_atomic() always reports false. */
diff --git a/debian/patches-rt/0005-mm-memcontrol-Replace-the-PREEMPT_RT-conditionals.patch b/debian/patches-rt/0005-mm-memcontrol-Replace-the-PREEMPT_RT-conditionals.patch
new file mode 100644
index 000000000..0f9baa3e6
--- /dev/null
+++ b/debian/patches-rt/0005-mm-memcontrol-Replace-the-PREEMPT_RT-conditionals.patch
@@ -0,0 +1,75 @@
+From: Thomas Gleixner <tglx@linutronix.de>
+Date: Thu, 25 Aug 2022 18:41:28 +0200
+Subject: [PATCH 5/8] mm/memcontrol: Replace the PREEMPT_RT conditionals
+Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/6.0/older/patches-6.0-rt11.tar.xz
+
+Use VM_WARN_ON_IRQS_ENABLED() and preempt_disable/enable_nested() to
+replace the CONFIG_PREEMPT_RT #ifdeffery.
+
+Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
+Cc: Johannes Weiner <hannes@cmpxchg.org>
+Cc: Michal Hocko <mhocko@kernel.org>
+Cc: Roman Gushchin <roman.gushchin@linux.dev>
+Cc: Shakeel Butt <shakeelb@google.com>
+Cc: Muchun Song <songmuchun@bytedance.com>
+Cc: cgroups@vger.kernel.org
+Cc: linux-mm@kvack.org
+Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
+Acked-by: Johannes Weiner <hannes@cmpxchg.org>
+Reviewed-by: Muchun Song <songmuchun@bytedance.com>
+Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org>
+Link: https://lore.kernel.org/r/20220825164131.402717-6-bigeasy@linutronix.de
+---
+ mm/memcontrol.c | 19 ++++++-------------
+ 1 file changed, 6 insertions(+), 13 deletions(-)
+
+--- a/mm/memcontrol.c
++++ b/mm/memcontrol.c
+@@ -597,25 +597,18 @@ static u64 flush_next_time;
+ */
+ static void memcg_stats_lock(void)
+ {
+-#ifdef CONFIG_PREEMPT_RT
+- preempt_disable();
+-#else
+- VM_BUG_ON(!irqs_disabled());
+-#endif
++ preempt_disable_nested();
++ VM_WARN_ON_IRQS_ENABLED();
+ }
+
+ static void __memcg_stats_lock(void)
+ {
+-#ifdef CONFIG_PREEMPT_RT
+- preempt_disable();
+-#endif
++ preempt_disable_nested();
+ }
+
+ static void memcg_stats_unlock(void)
+ {
+-#ifdef CONFIG_PREEMPT_RT
+- preempt_enable();
+-#endif
++ preempt_enable_nested();
+ }
+
+ static inline void memcg_rstat_updated(struct mem_cgroup *memcg, int val)
+@@ -715,7 +708,7 @@ void __mod_memcg_lruvec_state(struct lru
+ * interrupt context while other caller need to have disabled interrupt.
+ */
+ __memcg_stats_lock();
+- if (IS_ENABLED(CONFIG_DEBUG_VM) && !IS_ENABLED(CONFIG_PREEMPT_RT)) {
++ if (IS_ENABLED(CONFIG_DEBUG_VM)) {
+ switch (idx) {
+ case NR_ANON_MAPPED:
+ case NR_FILE_MAPPED:
+@@ -725,7 +718,7 @@ void __mod_memcg_lruvec_state(struct lru
+ WARN_ON_ONCE(!in_task());
+ break;
+ default:
+- WARN_ON_ONCE(!irqs_disabled());
++ VM_WARN_ON_IRQS_ENABLED();
+ }
+ }
+
diff --git a/debian/patches-rt/0005-mm-slub-simplify-__cmpxchg_double_slab-and-slab_-un-.patch b/debian/patches-rt/0005-mm-slub-simplify-__cmpxchg_double_slab-and-slab_-un-.patch
new file mode 100644
index 000000000..af00eb95a
--- /dev/null
+++ b/debian/patches-rt/0005-mm-slub-simplify-__cmpxchg_double_slab-and-slab_-un-.patch
@@ -0,0 +1,111 @@
+From: Vlastimil Babka <vbabka@suse.cz>
+Date: Tue, 23 Aug 2022 19:04:00 +0200
+Subject: [PATCH 5/5] mm/slub: simplify __cmpxchg_double_slab() and
+ slab_[un]lock()
+Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/6.0/older/patches-6.0-rt11.tar.xz
+
+The PREEMPT_RT specific disabling of irqs in __cmpxchg_double_slab()
+(through slab_[un]lock()) is unnecessary as bit_spin_lock() disables
+preemption and that's sufficient on RT where interrupts are threaded.
+
+That means we no longer need the slab_[un]lock() wrappers, so delete
+them and rename the current __slab_[un]lock() to slab_[un]lock().
+
+Signed-off-by: Vlastimil Babka <vbabka@suse.cz>
+Acked-by: David Rientjes <rientjes@google.com>
+Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
+---
+ mm/slub.c | 39 ++++++++++++---------------------------
+ 1 file changed, 12 insertions(+), 27 deletions(-)
+
+--- a/mm/slub.c
++++ b/mm/slub.c
+@@ -446,7 +446,7 @@ slub_set_cpu_partial(struct kmem_cache *
+ /*
+ * Per slab locking using the pagelock
+ */
+-static __always_inline void __slab_lock(struct slab *slab)
++static __always_inline void slab_lock(struct slab *slab)
+ {
+ struct page *page = slab_page(slab);
+
+@@ -454,7 +454,7 @@ static __always_inline void __slab_lock(
+ bit_spin_lock(PG_locked, &page->flags);
+ }
+
+-static __always_inline void __slab_unlock(struct slab *slab)
++static __always_inline void slab_unlock(struct slab *slab)
+ {
+ struct page *page = slab_page(slab);
+
+@@ -462,24 +462,12 @@ static __always_inline void __slab_unloc
+ __bit_spin_unlock(PG_locked, &page->flags);
+ }
+
+-static __always_inline void slab_lock(struct slab *slab, unsigned long *flags)
+-{
+- if (IS_ENABLED(CONFIG_PREEMPT_RT))
+- local_irq_save(*flags);
+- __slab_lock(slab);
+-}
+-
+-static __always_inline void slab_unlock(struct slab *slab, unsigned long *flags)
+-{
+- __slab_unlock(slab);
+- if (IS_ENABLED(CONFIG_PREEMPT_RT))
+- local_irq_restore(*flags);
+-}
+-
+ /*
+ * Interrupts must be disabled (for the fallback code to work right), typically
+- * by an _irqsave() lock variant. Except on PREEMPT_RT where locks are different
+- * so we disable interrupts as part of slab_[un]lock().
++ * by an _irqsave() lock variant. Except on PREEMPT_RT where these variants do
++ * not actually disable interrupts. On the other hand the migrate_disable()
++ * done by bit_spin_lock() is sufficient on PREEMPT_RT thanks to its threaded
++ * interrupts.
+ */
+ static inline bool __cmpxchg_double_slab(struct kmem_cache *s, struct slab *slab,
+ void *freelist_old, unsigned long counters_old,
+@@ -498,18 +486,15 @@ static inline bool __cmpxchg_double_slab
+ } else
+ #endif
+ {
+- /* init to 0 to prevent spurious warnings */
+- unsigned long flags = 0;
+-
+- slab_lock(slab, &flags);
++ slab_lock(slab);
+ if (slab->freelist == freelist_old &&
+ slab->counters == counters_old) {
+ slab->freelist = freelist_new;
+ slab->counters = counters_new;
+- slab_unlock(slab, &flags);
++ slab_unlock(slab);
+ return true;
+ }
+- slab_unlock(slab, &flags);
++ slab_unlock(slab);
+ }
+
+ cpu_relax();
+@@ -540,16 +525,16 @@ static inline bool cmpxchg_double_slab(s
+ unsigned long flags;
+
+ local_irq_save(flags);
+- __slab_lock(slab);
++ slab_lock(slab);
+ if (slab->freelist == freelist_old &&
+ slab->counters == counters_old) {
+ slab->freelist = freelist_new;
+ slab->counters = counters_new;
+- __slab_unlock(slab);
++ slab_unlock(slab);
+ local_irq_restore(flags);
+ return true;
+ }
+- __slab_unlock(slab);
++ slab_unlock(slab);
+ local_irq_restore(flags);
+ }
+
diff --git a/debian/patches-rt/0006-drm-i915-Disable-tracing-points-on-PREEMPT_RT.patch b/debian/patches-rt/0006-drm-i915-Disable-tracing-points-on-PREEMPT_RT.patch
index 1f2f2e17d..f96d86ce9 100644
--- a/debian/patches-rt/0006-drm-i915-Disable-tracing-points-on-PREEMPT_RT.patch
+++ b/debian/patches-rt/0006-drm-i915-Disable-tracing-points-on-PREEMPT_RT.patch
@@ -1,7 +1,7 @@
From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Date: Thu, 6 Dec 2018 09:52:20 +0100
Subject: [PATCH 06/10] drm/i915: Disable tracing points on PREEMPT_RT
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.19/older/patches-5.19-rc8-rt9.tar.xz
+Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/6.0/older/patches-6.0-rt11.tar.xz
Luca Abeni reported this:
| BUG: scheduling while atomic: kworker/u8:2/15203/0x00000003
diff --git a/debian/patches-rt/0006-mm-compaction-Get-rid-of-RT-ifdeffery.patch b/debian/patches-rt/0006-mm-compaction-Get-rid-of-RT-ifdeffery.patch
new file mode 100644
index 000000000..d0a9ec67c
--- /dev/null
+++ b/debian/patches-rt/0006-mm-compaction-Get-rid-of-RT-ifdeffery.patch
@@ -0,0 +1,50 @@
+From: Thomas Gleixner <tglx@linutronix.de>
+Date: Thu, 25 Aug 2022 18:41:29 +0200
+Subject: [PATCH 6/8] mm/compaction: Get rid of RT ifdeffery
+Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/6.0/older/patches-6.0-rt11.tar.xz
+
+Move the RT dependency for the initial value of
+sysctl_compact_unevictable_allowed into Kconfig.
+
+Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
+Cc: Andrew Morton <akpm@linux-foundation.org>
+Cc: Nick Terrell <terrelln@fb.com>
+Cc: linux-mm@kvack.org
+Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
+Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org>
+Link: https://lore.kernel.org/r/20220825164131.402717-7-bigeasy@linutronix.de
+---
+ mm/Kconfig | 6 ++++++
+ mm/compaction.c | 6 +-----
+ 2 files changed, 7 insertions(+), 5 deletions(-)
+
+--- a/mm/Kconfig
++++ b/mm/Kconfig
+@@ -579,6 +579,12 @@ config COMPACTION
+ it and then we would be really interested to hear about that at
+ linux-mm@kvack.org.
+
++config COMPACT_UNEVICTABLE_DEFAULT
++ int
++ depends on COMPACTION
++ default 0 if PREEMPT_RT
++ default 1
++
+ #
+ # support for free page reporting
+ config PAGE_REPORTING
+--- a/mm/compaction.c
++++ b/mm/compaction.c
+@@ -1727,11 +1727,7 @@ typedef enum {
+ * Allow userspace to control policy on scanning the unevictable LRU for
+ * compactable pages.
+ */
+-#ifdef CONFIG_PREEMPT_RT
+-int sysctl_compact_unevictable_allowed __read_mostly = 0;
+-#else
+-int sysctl_compact_unevictable_allowed __read_mostly = 1;
+-#endif
++int sysctl_compact_unevictable_allowed __read_mostly = CONFIG_COMPACT_UNEVICTABLE_DEFAULT;
+
+ static inline void
+ update_fast_start_pfn(struct compact_control *cc, unsigned long pfn)
diff --git a/debian/patches-rt/0007-drm-i915-skip-DRM_I915_LOW_LEVEL_TRACEPOINTS-with-NO.patch b/debian/patches-rt/0007-drm-i915-skip-DRM_I915_LOW_LEVEL_TRACEPOINTS-with-NO.patch
index 34ebc39a9..a270ebef3 100644
--- a/debian/patches-rt/0007-drm-i915-skip-DRM_I915_LOW_LEVEL_TRACEPOINTS-with-NO.patch
+++ b/debian/patches-rt/0007-drm-i915-skip-DRM_I915_LOW_LEVEL_TRACEPOINTS-with-NO.patch
@@ -2,7 +2,7 @@ From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Date: Wed, 19 Dec 2018 10:47:02 +0100
Subject: [PATCH 07/10] drm/i915: skip DRM_I915_LOW_LEVEL_TRACEPOINTS with
NOTRACE
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.19/older/patches-5.19-rc8-rt9.tar.xz
+Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/6.0/older/patches-6.0-rt11.tar.xz
The order of the header files is important. If this header file is
included after tracepoint.h was included then the NOTRACE here becomes a
diff --git a/debian/patches-rt/0007-flex_proportions-Disable-preemption-entering-the-wri.patch b/debian/patches-rt/0007-flex_proportions-Disable-preemption-entering-the-wri.patch
new file mode 100644
index 000000000..675f58506
--- /dev/null
+++ b/debian/patches-rt/0007-flex_proportions-Disable-preemption-entering-the-wri.patch
@@ -0,0 +1,37 @@
+From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
+Date: Thu, 25 Aug 2022 18:41:30 +0200
+Subject: [PATCH 7/8] flex_proportions: Disable preemption entering the write
+ section.
+Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/6.0/older/patches-6.0-rt11.tar.xz
+
+The seqcount fprop_global::sequence is not associated with a lock. The
+write section (fprop_new_period()) is invoked from a timer and since the
+softirq is preemptible on PREEMPT_RT it is possible to preempt the write
+section which is not desited.
+
+Disable preemption around the write section on PREEMPT_RT.
+
+Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
+Link: https://lore.kernel.org/r/20220825164131.402717-8-bigeasy@linutronix.de
+---
+ lib/flex_proportions.c | 2 ++
+ 1 file changed, 2 insertions(+)
+
+--- a/lib/flex_proportions.c
++++ b/lib/flex_proportions.c
+@@ -70,6 +70,7 @@ bool fprop_new_period(struct fprop_globa
+ */
+ if (events <= 1)
+ return false;
++ preempt_disable_nested();
+ write_seqcount_begin(&p->sequence);
+ if (periods < 64)
+ events -= events >> periods;
+@@ -77,6 +78,7 @@ bool fprop_new_period(struct fprop_globa
+ percpu_counter_add(&p->events, -events);
+ p->period += periods;
+ write_seqcount_end(&p->sequence);
++ preempt_enable_nested();
+
+ return true;
+ }
diff --git a/debian/patches-rt/0008-drm-i915-gt-Queue-and-wait-for-the-irq_work-item.patch b/debian/patches-rt/0008-drm-i915-gt-Queue-and-wait-for-the-irq_work-item.patch
index 3e8701444..72a16729d 100644
--- a/debian/patches-rt/0008-drm-i915-gt-Queue-and-wait-for-the-irq_work-item.patch
+++ b/debian/patches-rt/0008-drm-i915-gt-Queue-and-wait-for-the-irq_work-item.patch
@@ -1,7 +1,7 @@
From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Date: Wed, 8 Sep 2021 17:18:00 +0200
Subject: [PATCH 08/10] drm/i915/gt: Queue and wait for the irq_work item.
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.19/older/patches-5.19-rc8-rt9.tar.xz
+Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/6.0/older/patches-6.0-rt11.tar.xz
Disabling interrupts and invoking the irq_work function directly breaks
on PREEMPT_RT.
diff --git a/debian/patches-rt/0008-u64_stats-Streamline-the-implementation.patch b/debian/patches-rt/0008-u64_stats-Streamline-the-implementation.patch
new file mode 100644
index 000000000..69a75d20c
--- /dev/null
+++ b/debian/patches-rt/0008-u64_stats-Streamline-the-implementation.patch
@@ -0,0 +1,263 @@
+From: Thomas Gleixner <tglx@linutronix.de>
+Date: Thu, 25 Aug 2022 18:41:31 +0200
+Subject: [PATCH 8/8] u64_stats: Streamline the implementation
+Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/6.0/older/patches-6.0-rt11.tar.xz
+
+The u64 stats code handles 3 different cases:
+
+ - 32bit UP
+ - 32bit SMP
+ - 64bit
+
+with an unreadable #ifdef maze, which was recently expanded with PREEMPT_RT
+conditionals.
+
+Reduce it to two cases (32bit and 64bit) and drop the optimization for
+32bit UP as suggested by Linus.
+
+Use the new preempt_disable/enable_nested() helpers to get rid of the
+CONFIG_PREEMPT_RT conditionals.
+
+Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
+Cc: netdev@vger.kernel.org
+Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
+Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org>
+Link: https://lore.kernel.org/r/20220825164131.402717-9-bigeasy@linutronix.de
+---
+ include/linux/u64_stats_sync.h | 145 ++++++++++++++++++-----------------------
+ 1 file changed, 64 insertions(+), 81 deletions(-)
+
+--- a/include/linux/u64_stats_sync.h
++++ b/include/linux/u64_stats_sync.h
+@@ -8,7 +8,7 @@
+ *
+ * Key points :
+ *
+- * - Use a seqcount on 32-bit SMP, only disable preemption for 32-bit UP.
++ * - Use a seqcount on 32-bit
+ * - The whole thing is a no-op on 64-bit architectures.
+ *
+ * Usage constraints:
+@@ -20,7 +20,8 @@
+ * writer and also spin forever.
+ *
+ * 3) Write side must use the _irqsave() variant if other writers, or a reader,
+- * can be invoked from an IRQ context.
++ * can be invoked from an IRQ context. On 64bit systems this variant does not
++ * disable interrupts.
+ *
+ * 4) If reader fetches several counters, there is no guarantee the whole values
+ * are consistent w.r.t. each other (remember point #2: seqcounts are not
+@@ -29,11 +30,6 @@
+ * 5) Readers are allowed to sleep or be preempted/interrupted: they perform
+ * pure reads.
+ *
+- * 6) Readers must use both u64_stats_fetch_{begin,retry}_irq() if the stats
+- * might be updated from a hardirq or softirq context (remember point #1:
+- * seqcounts are not used for UP kernels). 32-bit UP stat readers could read
+- * corrupted 64-bit values otherwise.
+- *
+ * Usage :
+ *
+ * Stats producer (writer) should use following template granted it already got
+@@ -66,7 +62,7 @@
+ #include <linux/seqlock.h>
+
+ struct u64_stats_sync {
+-#if BITS_PER_LONG == 32 && (defined(CONFIG_SMP) || defined(CONFIG_PREEMPT_RT))
++#if BITS_PER_LONG == 32
+ seqcount_t seq;
+ #endif
+ };
+@@ -98,7 +94,22 @@ static inline void u64_stats_inc(u64_sta
+ local64_inc(&p->v);
+ }
+
+-#else
++static inline void u64_stats_init(struct u64_stats_sync *syncp) { }
++static inline void __u64_stats_update_begin(struct u64_stats_sync *syncp) { }
++static inline void __u64_stats_update_end(struct u64_stats_sync *syncp) { }
++static inline unsigned long __u64_stats_irqsave(void) { return 0; }
++static inline void __u64_stats_irqrestore(unsigned long flags) { }
++static inline unsigned int __u64_stats_fetch_begin(const struct u64_stats_sync *syncp)
++{
++ return 0;
++}
++static inline bool __u64_stats_fetch_retry(const struct u64_stats_sync *syncp,
++ unsigned int start)
++{
++ return false;
++}
++
++#else /* 64 bit */
+
+ typedef struct {
+ u64 v;
+@@ -123,123 +134,95 @@ static inline void u64_stats_inc(u64_sta
+ {
+ p->v++;
+ }
+-#endif
+
+-#if BITS_PER_LONG == 32 && (defined(CONFIG_SMP) || defined(CONFIG_PREEMPT_RT))
+-#define u64_stats_init(syncp) seqcount_init(&(syncp)->seq)
+-#else
+ static inline void u64_stats_init(struct u64_stats_sync *syncp)
+ {
++ seqcount_init(&syncp->seq);
+ }
+-#endif
+
+-static inline void u64_stats_update_begin(struct u64_stats_sync *syncp)
++static inline void __u64_stats_update_begin(struct u64_stats_sync *syncp)
+ {
+-#if BITS_PER_LONG == 32 && (defined(CONFIG_SMP) || defined(CONFIG_PREEMPT_RT))
+- if (IS_ENABLED(CONFIG_PREEMPT_RT))
+- preempt_disable();
++ preempt_disable_nested();
+ write_seqcount_begin(&syncp->seq);
+-#endif
+ }
+
+-static inline void u64_stats_update_end(struct u64_stats_sync *syncp)
++static inline void __u64_stats_update_end(struct u64_stats_sync *syncp)
+ {
+-#if BITS_PER_LONG == 32 && (defined(CONFIG_SMP) || defined(CONFIG_PREEMPT_RT))
+ write_seqcount_end(&syncp->seq);
+- if (IS_ENABLED(CONFIG_PREEMPT_RT))
+- preempt_enable();
+-#endif
++ preempt_enable_nested();
+ }
+
+-static inline unsigned long
+-u64_stats_update_begin_irqsave(struct u64_stats_sync *syncp)
++static inline unsigned long __u64_stats_irqsave(void)
+ {
+- unsigned long flags = 0;
++ unsigned long flags;
+
+-#if BITS_PER_LONG == 32 && (defined(CONFIG_SMP) || defined(CONFIG_PREEMPT_RT))
+- if (IS_ENABLED(CONFIG_PREEMPT_RT))
+- preempt_disable();
+- else
+- local_irq_save(flags);
+- write_seqcount_begin(&syncp->seq);
+-#endif
++ local_irq_save(flags);
+ return flags;
+ }
+
+-static inline void
+-u64_stats_update_end_irqrestore(struct u64_stats_sync *syncp,
+- unsigned long flags)
++static inline void __u64_stats_irqrestore(unsigned long flags)
+ {
+-#if BITS_PER_LONG == 32 && (defined(CONFIG_SMP) || defined(CONFIG_PREEMPT_RT))
+- write_seqcount_end(&syncp->seq);
+- if (IS_ENABLED(CONFIG_PREEMPT_RT))
+- preempt_enable();
+- else
+- local_irq_restore(flags);
+-#endif
++ local_irq_restore(flags);
+ }
+
+ static inline unsigned int __u64_stats_fetch_begin(const struct u64_stats_sync *syncp)
+ {
+-#if BITS_PER_LONG == 32 && (defined(CONFIG_SMP) || defined(CONFIG_PREEMPT_RT))
+ return read_seqcount_begin(&syncp->seq);
+-#else
+- return 0;
+-#endif
+ }
+
+-static inline unsigned int u64_stats_fetch_begin(const struct u64_stats_sync *syncp)
++static inline bool __u64_stats_fetch_retry(const struct u64_stats_sync *syncp,
++ unsigned int start)
+ {
+-#if BITS_PER_LONG == 32 && (!defined(CONFIG_SMP) && !defined(CONFIG_PREEMPT_RT))
+- preempt_disable();
+-#endif
+- return __u64_stats_fetch_begin(syncp);
++ return read_seqcount_retry(&syncp->seq, start);
+ }
++#endif /* !64 bit */
+
+-static inline bool __u64_stats_fetch_retry(const struct u64_stats_sync *syncp,
+- unsigned int start)
++static inline void u64_stats_update_begin(struct u64_stats_sync *syncp)
+ {
+-#if BITS_PER_LONG == 32 && (defined(CONFIG_SMP) || defined(CONFIG_PREEMPT_RT))
+- return read_seqcount_retry(&syncp->seq, start);
+-#else
+- return false;
+-#endif
++ __u64_stats_update_begin(syncp);
++}
++
++static inline void u64_stats_update_end(struct u64_stats_sync *syncp)
++{
++ __u64_stats_update_end(syncp);
++}
++
++static inline unsigned long u64_stats_update_begin_irqsave(struct u64_stats_sync *syncp)
++{
++ unsigned long flags = __u64_stats_irqsave();
++
++ __u64_stats_update_begin(syncp);
++ return flags;
++}
++
++static inline void u64_stats_update_end_irqrestore(struct u64_stats_sync *syncp,
++ unsigned long flags)
++{
++ __u64_stats_update_end(syncp);
++ __u64_stats_irqrestore(flags);
++}
++
++static inline unsigned int u64_stats_fetch_begin(const struct u64_stats_sync *syncp)
++{
++ return __u64_stats_fetch_begin(syncp);
+ }
+
+ static inline bool u64_stats_fetch_retry(const struct u64_stats_sync *syncp,
+ unsigned int start)
+ {
+-#if BITS_PER_LONG == 32 && (!defined(CONFIG_SMP) && !defined(CONFIG_PREEMPT_RT))
+- preempt_enable();
+-#endif
+ return __u64_stats_fetch_retry(syncp, start);
+ }
+
+-/*
+- * In case irq handlers can update u64 counters, readers can use following helpers
+- * - SMP 32bit arches use seqcount protection, irq safe.
+- * - UP 32bit must disable irqs.
+- * - 64bit have no problem atomically reading u64 values, irq safe.
+- */
++/* Obsolete interfaces */
+ static inline unsigned int u64_stats_fetch_begin_irq(const struct u64_stats_sync *syncp)
+ {
+-#if BITS_PER_LONG == 32 && defined(CONFIG_PREEMPT_RT)
+- preempt_disable();
+-#elif BITS_PER_LONG == 32 && !defined(CONFIG_SMP)
+- local_irq_disable();
+-#endif
+- return __u64_stats_fetch_begin(syncp);
++ return u64_stats_fetch_begin(syncp);
+ }
+
+ static inline bool u64_stats_fetch_retry_irq(const struct u64_stats_sync *syncp,
+ unsigned int start)
+ {
+-#if BITS_PER_LONG == 32 && defined(CONFIG_PREEMPT_RT)
+- preempt_enable();
+-#elif BITS_PER_LONG == 32 && !defined(CONFIG_SMP)
+- local_irq_enable();
+-#endif
+- return __u64_stats_fetch_retry(syncp, start);
++ return u64_stats_fetch_retry(syncp, start);
+ }
+
+ #endif /* _LINUX_U64_STATS_SYNC_H */
diff --git a/debian/patches-rt/0009-drm-i915-gt-Use-spin_lock_irq-instead-of-local_irq_d.patch b/debian/patches-rt/0009-drm-i915-gt-Use-spin_lock_irq-instead-of-local_irq_d.patch
index 2ae54c5ce..d8823ea9d 100644
--- a/debian/patches-rt/0009-drm-i915-gt-Use-spin_lock_irq-instead-of-local_irq_d.patch
+++ b/debian/patches-rt/0009-drm-i915-gt-Use-spin_lock_irq-instead-of-local_irq_d.patch
@@ -2,7 +2,7 @@ From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Date: Wed, 8 Sep 2021 19:03:41 +0200
Subject: [PATCH 09/10] drm/i915/gt: Use spin_lock_irq() instead of
local_irq_disable() + spin_lock()
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.19/older/patches-5.19-rc8-rt9.tar.xz
+Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/6.0/older/patches-6.0-rt11.tar.xz
execlists_dequeue() is invoked from a function which uses
local_irq_disable() to disable interrupts so the spin_lock() behaves
diff --git a/debian/patches-rt/0010-drm-i915-Drop-the-irqs_disabled-check.patch b/debian/patches-rt/0010-drm-i915-Drop-the-irqs_disabled-check.patch
index 180a3db5f..a82cfbd34 100644
--- a/debian/patches-rt/0010-drm-i915-Drop-the-irqs_disabled-check.patch
+++ b/debian/patches-rt/0010-drm-i915-Drop-the-irqs_disabled-check.patch
@@ -1,7 +1,7 @@
From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Date: Fri, 1 Oct 2021 20:01:03 +0200
Subject: [PATCH 10/10] drm/i915: Drop the irqs_disabled() check
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.19/older/patches-5.19-rc8-rt9.tar.xz
+Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/6.0/older/patches-6.0-rt11.tar.xz
The !irqs_disabled() check triggers on PREEMPT_RT even with
i915_sched_engine::lock acquired. The reason is the lock is transformed
@@ -21,7 +21,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
--- a/drivers/gpu/drm/i915/i915_request.c
+++ b/drivers/gpu/drm/i915/i915_request.c
-@@ -587,7 +587,6 @@ bool __i915_request_submit(struct i915_r
+@@ -612,7 +612,6 @@ bool __i915_request_submit(struct i915_r
RQ_TRACE(request, "\n");
@@ -29,7 +29,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
lockdep_assert_held(&engine->sched_engine->lock);
/*
-@@ -696,7 +695,6 @@ void __i915_request_unsubmit(struct i915
+@@ -721,7 +720,6 @@ void __i915_request_unsubmit(struct i915
*/
RQ_TRACE(request, "\n");
diff --git a/debian/patches-rt/0016-printk-add-infrastucture-for-atomic-consoles.patch b/debian/patches-rt/0016-printk-add-infrastucture-for-atomic-consoles.patch
index ad697d101..081d1c69d 100644
--- a/debian/patches-rt/0016-printk-add-infrastucture-for-atomic-consoles.patch
+++ b/debian/patches-rt/0016-printk-add-infrastucture-for-atomic-consoles.patch
@@ -1,7 +1,7 @@
From: John Ogness <john.ogness@linutronix.de>
Date: Fri, 4 Feb 2022 16:01:17 +0106
Subject: [PATCH 16/18] printk: add infrastucture for atomic consoles
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.19/older/patches-5.19-rc8-rt9.tar.xz
+Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/6.0/older/patches-6.0-rt11.tar.xz
Many times it is not possible to see the console output on
panic because printing threads cannot be scheduled and/or the
@@ -493,7 +493,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
/**
* console_unlock - unlock the console system
*
-@@ -3158,6 +3379,11 @@ void console_unblank(void)
+@@ -3148,6 +3369,11 @@ void console_unblank(void)
*/
void console_flush_on_panic(enum con_flush_mode mode)
{
@@ -505,7 +505,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
/*
* If someone else is holding the console lock, trylock will fail
* and may_schedule may be set. Ignore and proceed to unlock so
-@@ -3174,7 +3400,7 @@ void console_flush_on_panic(enum con_flu
+@@ -3164,7 +3390,7 @@ void console_flush_on_panic(enum con_flu
seq = prb_first_valid_seq(prb);
for_each_console(c)
@@ -514,7 +514,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
}
console_unlock();
}
-@@ -3417,19 +3643,22 @@ void register_console(struct console *ne
+@@ -3407,19 +3633,22 @@ void register_console(struct console *ne
if (newcon->flags & CON_EXTENDED)
nr_ext_console_drivers++;
@@ -540,7 +540,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
}
if (printk_kthreads_available)
-@@ -3518,6 +3747,10 @@ int unregister_console(struct console *c
+@@ -3508,6 +3737,10 @@ int unregister_console(struct console *c
console_sysfs_notify();
@@ -551,7 +551,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
if (console->exit)
res = console->exit(console);
-@@ -3648,7 +3881,7 @@ static bool __pr_flush(struct console *c
+@@ -3638,7 +3871,7 @@ static bool __pr_flush(struct console *c
for_each_console(c) {
if (con && con != c)
continue;
@@ -560,7 +560,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
continue;
printk_seq = c->seq;
if (printk_seq < seq)
-@@ -3738,9 +3971,10 @@ static void printk_fallback_preferred_di
+@@ -3728,9 +3961,10 @@ static void printk_fallback_preferred_di
* See __console_emit_next_record() for argument and return details.
*/
static bool console_emit_next_record(struct console *con, char *text, char *ext_text,
@@ -573,7 +573,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
}
static bool printer_should_wake(struct console *con, u64 seq)
-@@ -3781,6 +4015,11 @@ static int printk_kthread_func(void *dat
+@@ -3771,6 +4005,11 @@ static int printk_kthread_func(void *dat
char *text;
int error;
@@ -585,7 +585,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
text = kmalloc(CONSOLE_LOG_MAX, GFP_KERNEL);
if (!text) {
con_printk(KERN_ERR, con, "failed to allocate text buffer\n");
-@@ -3859,7 +4098,7 @@ static int printk_kthread_func(void *dat
+@@ -3849,7 +4088,7 @@ static int printk_kthread_func(void *dat
* which can conditionally invoke cond_resched().
*/
console_may_schedule = 0;
diff --git a/debian/patches-rt/0017-serial-8250-implement-write_atomic.patch b/debian/patches-rt/0017-serial-8250-implement-write_atomic.patch
index e42d3b1a2..d19888f9e 100644
--- a/debian/patches-rt/0017-serial-8250-implement-write_atomic.patch
+++ b/debian/patches-rt/0017-serial-8250-implement-write_atomic.patch
@@ -1,7 +1,7 @@
From: John Ogness <john.ogness@linutronix.de>
Date: Fri, 4 Feb 2022 16:01:17 +0106
Subject: [PATCH 17/18] serial: 8250: implement write_atomic
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.19/older/patches-5.19-rc8-rt9.tar.xz
+Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/6.0/older/patches-6.0-rt11.tar.xz
Implement a non-sleeping NMI-safe write_atomic() console function in
order to support atomic console printing during a panic.
@@ -36,7 +36,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
--- a/drivers/tty/serial/8250/8250.h
+++ b/drivers/tty/serial/8250/8250.h
-@@ -157,12 +157,74 @@ static inline void serial_dl_write(struc
+@@ -177,12 +177,74 @@
up->dl_write(up, value);
}
@@ -112,7 +112,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
return true;
}
-@@ -171,7 +233,7 @@ static inline bool serial8250_clear_THRI
+@@ -191,7 +253,7 @@
if (!(up->ier & UART_IER_THRI))
return false;
up->ier &= ~UART_IER_THRI;
@@ -123,7 +123,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
--- a/drivers/tty/serial/8250/8250_aspeed_vuart.c
+++ b/drivers/tty/serial/8250/8250_aspeed_vuart.c
-@@ -278,7 +278,7 @@ static void __aspeed_vuart_set_throttle(
+@@ -278,7 +278,7 @@
up->ier &= ~irqs;
if (!throttle)
up->ier |= irqs;
@@ -134,7 +134,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
{
--- a/drivers/tty/serial/8250/8250_bcm7271.c
+++ b/drivers/tty/serial/8250/8250_bcm7271.c
-@@ -609,7 +609,7 @@ static int brcmuart_startup(struct uart_
+@@ -609,7 +609,7 @@
* will handle this.
*/
up->ier &= ~UART_IER_RDI;
@@ -143,7 +143,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
priv->tx_running = false;
priv->dma.rx_dma = NULL;
-@@ -775,10 +775,12 @@ static int brcmuart_handle_irq(struct ua
+@@ -775,10 +775,12 @@
unsigned int iir = serial_port_in(p, UART_IIR);
struct brcmuart_priv *priv = p->private_data;
struct uart_8250_port *up = up_to_u8250p(p);
@@ -156,7 +156,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
int handled = 0;
/*
-@@ -789,6 +791,10 @@ static int brcmuart_handle_irq(struct ua
+@@ -789,6 +791,10 @@
spin_lock_irqsave(&p->lock, flags);
status = serial_port_in(p, UART_LSR);
if ((status & UART_LSR_DR) == 0) {
@@ -167,7 +167,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
ier = serial_port_in(p, UART_IER);
/*
-@@ -809,6 +815,9 @@ static int brcmuart_handle_irq(struct ua
+@@ -809,6 +815,9 @@
serial_port_in(p, UART_RX);
}
@@ -177,7 +177,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
handled = 1;
}
spin_unlock_irqrestore(&p->lock, flags);
-@@ -823,8 +832,10 @@ static enum hrtimer_restart brcmuart_hrt
+@@ -823,8 +832,10 @@
struct brcmuart_priv *priv = container_of(t, struct brcmuart_priv, hrt);
struct uart_port *p = priv->up;
struct uart_8250_port *up = up_to_u8250p(p);
@@ -188,7 +188,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
if (priv->shutdown)
return HRTIMER_NORESTART;
-@@ -846,12 +857,20 @@ static enum hrtimer_restart brcmuart_hrt
+@@ -846,12 +857,20 @@
/* re-enable receive unless upper layer has disabled it */
if ((up->ier & (UART_IER_RLSI | UART_IER_RDI)) ==
(UART_IER_RLSI | UART_IER_RDI)) {
@@ -211,7 +211,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
return HRTIMER_NORESTART;
--- a/drivers/tty/serial/8250/8250_core.c
+++ b/drivers/tty/serial/8250/8250_core.c
-@@ -255,8 +255,11 @@ static void serial8250_timeout(struct ti
+@@ -255,8 +255,11 @@
static void serial8250_backup_timeout(struct timer_list *t)
{
struct uart_8250_port *up = from_timer(up, t, timer);
@@ -223,7 +223,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
spin_lock_irqsave(&up->port.lock, flags);
-@@ -265,8 +268,16 @@ static void serial8250_backup_timeout(st
+@@ -265,8 +268,16 @@
* based handler.
*/
if (up->port.irq) {
@@ -240,7 +240,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
}
iir = serial_in(up, UART_IIR);
-@@ -290,7 +301,7 @@ static void serial8250_backup_timeout(st
+@@ -289,7 +300,7 @@
serial8250_tx_chars(up);
if (up->port.irq)
@@ -249,7 +249,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
spin_unlock_irqrestore(&up->port.lock, flags);
-@@ -570,6 +581,14 @@ serial8250_register_ports(struct uart_dr
+@@ -575,6 +586,14 @@
#ifdef CONFIG_SERIAL_8250_CONSOLE
@@ -264,7 +264,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
static void univ8250_console_write(struct console *co, const char *s,
unsigned int count)
{
-@@ -663,6 +682,7 @@ static int univ8250_console_match(struct
+@@ -668,6 +687,7 @@
static struct console univ8250_console = {
.name = "ttyS",
@@ -272,7 +272,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
.write = univ8250_console_write,
.device = uart_console_device,
.setup = univ8250_console_setup,
-@@ -956,7 +976,7 @@ static void serial_8250_overrun_backoff_
+@@ -961,7 +981,7 @@
spin_lock_irqsave(&port->lock, flags);
up->ier |= UART_IER_RLSI | UART_IER_RDI;
up->port.read_status_mask |= UART_LSR_DR;
@@ -283,7 +283,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
--- a/drivers/tty/serial/8250/8250_exar.c
+++ b/drivers/tty/serial/8250/8250_exar.c
-@@ -177,6 +177,8 @@ static void xr17v35x_set_divisor(struct
+@@ -179,6 +179,8 @@
static int xr17v35x_startup(struct uart_port *port)
{
@@ -292,7 +292,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
/*
* First enable access to IER [7:5], ISR [5:4], FCR [5:4],
* MCR [7:5] and MSR [7:0]
-@@ -187,7 +189,7 @@ static int xr17v35x_startup(struct uart_
+@@ -189,7 +191,7 @@
* Make sure all interrups are masked until initialization is
* complete and the FIFOs are cleared
*/
@@ -303,7 +303,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
}
--- a/drivers/tty/serial/8250/8250_fsl.c
+++ b/drivers/tty/serial/8250/8250_fsl.c
-@@ -58,7 +58,8 @@ int fsl8250_handle_irq(struct uart_port
+@@ -58,7 +58,8 @@
if ((orig_lsr & UART_LSR_OE) && (up->overrun_backoff_time_ms > 0)) {
unsigned long delay;
@@ -315,7 +315,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
} else {
--- a/drivers/tty/serial/8250/8250_ingenic.c
+++ b/drivers/tty/serial/8250/8250_ingenic.c
-@@ -146,6 +146,7 @@ OF_EARLYCON_DECLARE(x1000_uart, "ingenic
+@@ -146,6 +146,7 @@
static void ingenic_uart_serial_out(struct uart_port *p, int offset, int value)
{
@@ -323,7 +323,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
int ier;
switch (offset) {
-@@ -167,7 +168,7 @@ static void ingenic_uart_serial_out(stru
+@@ -167,7 +168,7 @@
* If we have enabled modem status IRQs we should enable
* modem mode.
*/
@@ -334,7 +334,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
value |= UART_MCR_MDCE | UART_MCR_FCM;
--- a/drivers/tty/serial/8250/8250_mtk.c
+++ b/drivers/tty/serial/8250/8250_mtk.c
-@@ -222,12 +222,40 @@ static void mtk8250_shutdown(struct uart
+@@ -222,12 +222,40 @@
static void mtk8250_disable_intrs(struct uart_8250_port *up, int mask)
{
@@ -379,7 +379,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
static void mtk8250_set_flow_ctrl(struct uart_8250_port *up, int mode)
--- a/drivers/tty/serial/8250/8250_omap.c
+++ b/drivers/tty/serial/8250/8250_omap.c
-@@ -325,7 +325,7 @@ static void omap8250_restore_regs(struct
+@@ -325,7 +325,7 @@
/* drop TCR + TLR access, we setup XON/XOFF later */
serial8250_out_MCR(up, up->mcr);
@@ -388,7 +388,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
serial_out(up, UART_LCR, UART_LCR_CONF_MODE_B);
serial_dl_write(up, priv->quot);
-@@ -512,7 +512,7 @@ static void omap_8250_pm(struct uart_por
+@@ -515,7 +515,7 @@
serial_out(up, UART_EFR, efr | UART_EFR_ECB);
serial_out(up, UART_LCR, 0);
@@ -397,7 +397,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
serial_out(up, UART_LCR, UART_LCR_CONF_MODE_B);
serial_out(up, UART_EFR, efr);
serial_out(up, UART_LCR, 0);
-@@ -633,7 +633,7 @@ static irqreturn_t omap8250_irq(int irq,
+@@ -636,7 +636,7 @@
if ((lsr & UART_LSR_OE) && up->overrun_backoff_time_ms > 0) {
unsigned long delay;
@@ -406,7 +406,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
if (up->ier & (UART_IER_RLSI | UART_IER_RDI)) {
port->ops->stop_rx(port);
} else {
-@@ -693,7 +693,7 @@ static int omap_8250_startup(struct uart
+@@ -696,7 +696,7 @@
goto err;
up->ier = UART_IER_RLSI | UART_IER_RDI;
@@ -415,7 +415,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
#ifdef CONFIG_PM
up->capabilities |= UART_CAP_RPM;
-@@ -734,7 +734,7 @@ static void omap_8250_shutdown(struct ua
+@@ -737,7 +737,7 @@
serial_out(up, UART_OMAP_EFR2, 0x0);
up->ier = 0;
@@ -424,7 +424,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
if (up->dma)
serial8250_release_dma(up);
-@@ -782,7 +782,7 @@ static void omap_8250_unthrottle(struct
+@@ -785,7 +785,7 @@
up->dma->rx_dma(up);
up->ier |= UART_IER_RLSI | UART_IER_RDI;
port->read_status_mask |= UART_LSR_DR;
@@ -433,7 +433,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
spin_unlock_irqrestore(&port->lock, flags);
pm_runtime_mark_last_busy(port->dev);
-@@ -873,7 +873,7 @@ static void __dma_rx_complete(void *para
+@@ -876,7 +876,7 @@
__dma_rx_do_complete(p);
if (!priv->throttled) {
p->ier |= UART_IER_RLSI | UART_IER_RDI;
@@ -442,7 +442,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
if (!(priv->habit & UART_HAS_EFR2))
omap_8250_rx_dma(p);
}
-@@ -930,7 +930,7 @@ static int omap_8250_rx_dma(struct uart_
+@@ -933,7 +933,7 @@
* callback to run.
*/
p->ier &= ~(UART_IER_RLSI | UART_IER_RDI);
@@ -451,7 +451,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
}
goto out;
}
-@@ -1146,12 +1146,12 @@ static void am654_8250_handle_rx_dma(str
+@@ -1148,12 +1148,12 @@
* periodic timeouts, re-enable interrupts.
*/
up->ier &= ~(UART_IER_RLSI | UART_IER_RDI);
@@ -468,7 +468,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
--- a/drivers/tty/serial/8250/8250_port.c
+++ b/drivers/tty/serial/8250/8250_port.c
-@@ -749,7 +749,7 @@ static void serial8250_set_sleep(struct
+@@ -743,7 +743,7 @@
serial_out(p, UART_EFR, UART_EFR_ECB);
serial_out(p, UART_LCR, 0);
}
@@ -477,7 +477,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
if (p->capabilities & UART_CAP_EFR) {
serial_out(p, UART_LCR, UART_LCR_CONF_MODE_B);
serial_out(p, UART_EFR, efr);
-@@ -1023,8 +1023,11 @@ static int broken_efr(struct uart_8250_p
+@@ -1017,8 +1017,11 @@
*/
static void autoconfig_16550a(struct uart_8250_port *up)
{
@@ -489,7 +489,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
up->port.type = PORT_16550A;
up->capabilities |= UART_CAP_FIFO;
-@@ -1135,6 +1138,11 @@ static void autoconfig_16550a(struct uar
+@@ -1130,6 +1133,11 @@
return;
}
@@ -501,7 +501,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
/*
* Try writing and reading the UART_IER_UUE bit (b6).
* If it works, this is probably one of the Xscale platform's
-@@ -1170,6 +1178,9 @@ static void autoconfig_16550a(struct uar
+@@ -1165,6 +1173,9 @@
}
serial_out(up, UART_IER, iersave);
@@ -511,7 +511,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
/*
* We distinguish between 16550A and U6 16550A by counting
* how many bytes are in the FIFO.
-@@ -1192,8 +1203,10 @@ static void autoconfig(struct uart_8250_
+@@ -1187,8 +1198,10 @@
unsigned char status1, scratch, scratch2, scratch3;
unsigned char save_lcr, save_mcr;
struct uart_port *port = &up->port;
@@ -522,7 +522,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
if (!port->iobase && !port->mapbase && !port->membase)
return;
-@@ -1211,6 +1224,11 @@ static void autoconfig(struct uart_8250_
+@@ -1206,6 +1219,11 @@
up->bugs = 0;
if (!(port->flags & UPF_BUGGY_UART)) {
@@ -534,7 +534,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
/*
* Do a simple existence test first; if we fail this,
* there's no point trying anything else.
-@@ -1240,6 +1258,10 @@ static void autoconfig(struct uart_8250_
+@@ -1235,6 +1253,10 @@
#endif
scratch3 = serial_in(up, UART_IER) & 0x0f;
serial_out(up, UART_IER, scratch);
@@ -545,7 +545,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
if (scratch2 != 0 || scratch3 != 0x0F) {
/*
* We failed; there's nothing here
-@@ -1337,10 +1359,7 @@ static void autoconfig(struct uart_8250_
+@@ -1332,10 +1354,7 @@
serial8250_out_MCR(up, save_mcr);
serial8250_clear_fifos(up);
serial_in(up, UART_RX);
@@ -557,7 +557,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
out_unlock:
spin_unlock_irqrestore(&port->lock, flags);
-@@ -1366,7 +1385,9 @@ static void autoconfig_irq(struct uart_8
+@@ -1361,7 +1380,9 @@
unsigned char save_mcr, save_ier;
unsigned char save_ICP = 0;
unsigned int ICP = 0;
@@ -567,7 +567,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
int irq;
if (port->flags & UPF_FOURPORT) {
-@@ -1376,8 +1397,12 @@ static void autoconfig_irq(struct uart_8
+@@ -1371,8 +1392,12 @@
inb_p(ICP);
}
@@ -581,7 +581,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
/* forget possible initially masked and pending IRQ */
probe_irq_off(probe_irq_on());
-@@ -1409,8 +1434,10 @@ static void autoconfig_irq(struct uart_8
+@@ -1404,8 +1429,10 @@
if (port->flags & UPF_FOURPORT)
outb_p(save_ICP, ICP);
@@ -593,7 +593,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
port->irq = (irq > 0) ? irq : 0;
}
-@@ -1423,7 +1450,7 @@ static void serial8250_stop_rx(struct ua
+@@ -1418,7 +1445,7 @@
up->ier &= ~(UART_IER_RLSI | UART_IER_RDI);
up->port.read_status_mask &= ~UART_LSR_DR;
@@ -602,7 +602,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
serial8250_rpm_put(up);
}
-@@ -1453,7 +1480,7 @@ void serial8250_em485_stop_tx(struct uar
+@@ -1448,7 +1475,7 @@
serial8250_clear_and_reinit_fifos(p);
p->ier |= UART_IER_RLSI | UART_IER_RDI;
@@ -611,7 +611,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
}
}
EXPORT_SYMBOL_GPL(serial8250_em485_stop_tx);
-@@ -1709,7 +1736,7 @@ static void serial8250_disable_ms(struct
+@@ -1697,7 +1724,7 @@
mctrl_gpio_disable_ms(up->gpios);
up->ier &= ~UART_IER_MSI;
@@ -620,7 +620,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
}
static void serial8250_enable_ms(struct uart_port *port)
-@@ -1725,7 +1752,7 @@ static void serial8250_enable_ms(struct
+@@ -1713,7 +1740,7 @@
up->ier |= UART_IER_MSI;
serial8250_rpm_get(up);
@@ -629,7 +629,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
serial8250_rpm_put(up);
}
-@@ -2154,14 +2181,7 @@ static void serial8250_put_poll_char(str
+@@ -2144,14 +2171,7 @@
struct uart_8250_port *up = up_to_u8250p(port);
serial8250_rpm_get(up);
@@ -643,29 +643,29 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
- serial_port_out(port, UART_IER, 0);
+ ier = serial8250_clear_IER(up);
- wait_for_xmitr(up, BOTH_EMPTY);
+ wait_for_xmitr(up, UART_LSR_BOTH_EMPTY);
/*
-@@ -2174,7 +2194,7 @@ static void serial8250_put_poll_char(str
+@@ -2164,7 +2184,7 @@
* and restore the IER
*/
- wait_for_xmitr(up, BOTH_EMPTY);
+ wait_for_xmitr(up, UART_LSR_BOTH_EMPTY);
- serial_port_out(port, UART_IER, ier);
+ serial8250_set_IER(up, ier);
serial8250_rpm_put(up);
}
-@@ -2183,8 +2203,10 @@ static void serial8250_put_poll_char(str
+@@ -2173,8 +2193,10 @@
int serial8250_do_startup(struct uart_port *port)
{
struct uart_8250_port *up = up_to_u8250p(port);
+ unsigned long cs_flags;
unsigned long flags;
- unsigned char lsr, iir;
+ unsigned char iir;
+ bool is_console;
int retval;
+ u16 lsr;
- if (!port->fifosize)
-@@ -2204,7 +2226,7 @@ int serial8250_do_startup(struct uart_po
+@@ -2195,7 +2217,7 @@
up->acr = 0;
serial_port_out(port, UART_LCR, UART_LCR_CONF_MODE_B);
serial_port_out(port, UART_EFR, UART_EFR_ECB);
@@ -674,7 +674,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
serial_port_out(port, UART_LCR, 0);
serial_icr_write(up, UART_CSR, 0); /* Reset the UART */
serial_port_out(port, UART_LCR, UART_LCR_CONF_MODE_B);
-@@ -2214,7 +2236,7 @@ int serial8250_do_startup(struct uart_po
+@@ -2205,7 +2227,7 @@
if (port->type == PORT_DA830) {
/* Reset the port */
@@ -683,16 +683,16 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
serial_port_out(port, UART_DA830_PWREMU_MGMT, 0);
mdelay(10);
-@@ -2309,6 +2331,8 @@ int serial8250_do_startup(struct uart_po
- if (port->irq && (up->port.flags & UPF_SHARE_IRQ))
- up->port.irqflags |= IRQF_SHARED;
+@@ -2304,6 +2326,8 @@
+ if (retval)
+ goto out;
+ is_console = uart_console(port);
+
if (port->irq && !(up->port.flags & UPF_NO_THRE_TEST)) {
unsigned char iir1;
-@@ -2325,6 +2349,9 @@ int serial8250_do_startup(struct uart_po
+@@ -2320,6 +2344,9 @@
*/
spin_lock_irqsave(&port->lock, flags);
@@ -702,7 +702,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
wait_for_xmitr(up, UART_LSR_THRE);
serial_port_out_sync(port, UART_IER, UART_IER_THRI);
udelay(1); /* allow THRE to set */
-@@ -2335,6 +2362,9 @@ int serial8250_do_startup(struct uart_po
+@@ -2330,6 +2357,9 @@
iir = serial_port_in(port, UART_IIR);
serial_port_out(port, UART_IER, 0);
@@ -712,7 +712,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
spin_unlock_irqrestore(&port->lock, flags);
if (port->irqflags & IRQF_SHARED)
-@@ -2391,10 +2421,14 @@ int serial8250_do_startup(struct uart_po
+@@ -2384,10 +2414,14 @@
* Do a quick test to see if we receive an interrupt when we enable
* the TX irq.
*/
@@ -727,7 +727,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
if (lsr & UART_LSR_TEMT && iir & UART_IIR_NO_INT) {
if (!(up->bugs & UART_BUG_TXEN)) {
-@@ -2426,7 +2460,7 @@ int serial8250_do_startup(struct uart_po
+@@ -2419,7 +2453,7 @@
if (up->dma) {
const char *msg = NULL;
@@ -736,7 +736,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
msg = "forbid DMA for kernel console";
else if (serial8250_request_dma(up))
msg = "failed to request DMA";
-@@ -2477,7 +2511,7 @@ void serial8250_do_shutdown(struct uart_
+@@ -2470,7 +2504,7 @@
*/
spin_lock_irqsave(&port->lock, flags);
up->ier = 0;
@@ -745,7 +745,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
spin_unlock_irqrestore(&port->lock, flags);
synchronize_irq(port->irq);
-@@ -2843,7 +2877,7 @@ serial8250_do_set_termios(struct uart_po
+@@ -2836,7 +2870,7 @@
if (up->capabilities & UART_CAP_RTOIE)
up->ier |= UART_IER_RTOIE;
@@ -754,7 +754,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
if (up->capabilities & UART_CAP_EFR) {
unsigned char efr = 0;
-@@ -3311,7 +3345,7 @@ EXPORT_SYMBOL_GPL(serial8250_set_default
+@@ -3301,7 +3335,7 @@
#ifdef CONFIG_SERIAL_8250_CONSOLE
@@ -763,7 +763,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
{
struct uart_8250_port *up = up_to_u8250p(port);
-@@ -3319,6 +3353,18 @@ static void serial8250_console_putchar(s
+@@ -3309,6 +3343,18 @@
serial_port_out(port, UART_TX, ch);
}
@@ -782,7 +782,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
/*
* Restore serial console when h/w power-off detected
*/
-@@ -3340,6 +3386,32 @@ static void serial8250_console_restore(s
+@@ -3335,6 +3381,32 @@
serial8250_out_MCR(up, up->mcr | UART_MCR_DTR | UART_MCR_RTS);
}
@@ -806,7 +806,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
+ uart_console_write(port, s, count, serial8250_console_putchar_locked);
+ atomic_dec(&up->console_printing);
+
-+ wait_for_xmitr(up, BOTH_EMPTY);
++ wait_for_xmitr(up, UART_LSR_BOTH_EMPTY);
+ serial8250_set_IER(up, ier);
+
+ printk_cpu_sync_put_irqrestore(flags);
@@ -815,7 +815,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
/*
* Print a string to the serial port using the device FIFO
*
-@@ -3385,24 +3457,12 @@ void serial8250_console_write(struct uar
+@@ -3380,24 +3452,12 @@
struct uart_port *port = &up->port;
unsigned long flags;
unsigned int ier, use_fifo;
@@ -842,7 +842,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
/* check scratch reg to see if port powered off during system sleep */
if (up->canary && (up->canary != serial_port_in(port, UART_SCR))) {
-@@ -3436,10 +3496,12 @@ void serial8250_console_write(struct uar
+@@ -3431,10 +3491,12 @@
*/
!(up->port.flags & UPF_CONS_FLOW);
@@ -855,7 +855,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
/*
* Finally, wait for transmitter to become empty
-@@ -3452,8 +3514,7 @@ void serial8250_console_write(struct uar
+@@ -3447,8 +3509,7 @@
if (em485->tx_stopped)
up->rs485_stop_tx(up);
}
@@ -865,7 +865,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
/*
* The receive handling will happen properly because the
-@@ -3465,8 +3526,7 @@ void serial8250_console_write(struct uar
+@@ -3460,8 +3521,7 @@
if (up->msr_saved_flags)
serial8250_modem_status(up);
@@ -875,7 +875,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
}
static unsigned int probe_baud(struct uart_port *port)
-@@ -3486,6 +3546,7 @@ static unsigned int probe_baud(struct ua
+@@ -3481,6 +3541,7 @@
int serial8250_console_setup(struct uart_port *port, char *options, bool probe)
{
@@ -883,7 +883,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
int baud = 9600;
int bits = 8;
int parity = 'n';
-@@ -3495,6 +3556,8 @@ int serial8250_console_setup(struct uart
+@@ -3490,6 +3551,8 @@
if (!port->iobase && !port->membase)
return -ENODEV;
@@ -894,7 +894,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
else if (probe)
--- a/drivers/tty/serial/8250/Kconfig
+++ b/drivers/tty/serial/8250/Kconfig
-@@ -9,6 +9,7 @@ config SERIAL_8250
+@@ -9,6 +9,7 @@
depends on !S390
select SERIAL_CORE
select SERIAL_MCTRL_GPIO if GPIOLIB
@@ -912,7 +912,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
#include <linux/serial_core.h>
#include <linux/serial_reg.h>
#include <linux/platform_device.h>
-@@ -123,6 +124,8 @@ struct uart_8250_port {
+@@ -125,6 +126,8 @@
#define MSR_SAVE_FLAGS UART_MSR_ANY_DELTA
unsigned char msr_saved_flags;
@@ -921,7 +921,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
struct uart_8250_dma *dma;
const struct uart_8250_ops *ops;
-@@ -178,6 +181,8 @@ void serial8250_init_port(struct uart_82
+@@ -180,6 +183,8 @@
void serial8250_set_defaults(struct uart_8250_port *up);
void serial8250_console_write(struct uart_8250_port *up, const char *s,
unsigned int count);
diff --git a/debian/patches-rt/0018-printk-avoid-preempt_disable-for-PREEMPT_RT.patch b/debian/patches-rt/0018-printk-avoid-preempt_disable-for-PREEMPT_RT.patch
index 9ac400a7f..31d7372f3 100644
--- a/debian/patches-rt/0018-printk-avoid-preempt_disable-for-PREEMPT_RT.patch
+++ b/debian/patches-rt/0018-printk-avoid-preempt_disable-for-PREEMPT_RT.patch
@@ -1,7 +1,7 @@
From: John Ogness <john.ogness@linutronix.de>
Date: Fri, 4 Feb 2022 16:01:17 +0106
Subject: [PATCH 18/18] printk: avoid preempt_disable() for PREEMPT_RT
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.19/older/patches-5.19-rc8-rt9.tar.xz
+Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/6.0/older/patches-6.0-rt11.tar.xz
During non-normal operation, printk() calls will attempt to
write the messages directly to the consoles. This involves
diff --git a/debian/patches-rt/ARM64__Allow_to_enable_RT.patch b/debian/patches-rt/ARM64__Allow_to_enable_RT.patch
index 9766c8952..24b045800 100644
--- a/debian/patches-rt/ARM64__Allow_to_enable_RT.patch
+++ b/debian/patches-rt/ARM64__Allow_to_enable_RT.patch
@@ -1,7 +1,7 @@
Subject: ARM64: Allow to enable RT
From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Date: Fri Oct 11 13:14:35 2019 +0200
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.19/older/patches-5.19-rc8-rt9.tar.xz
+Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/6.0/older/patches-6.0-rt11.tar.xz
From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
diff --git a/debian/patches-rt/ARM__Allow_to_enable_RT.patch b/debian/patches-rt/ARM__Allow_to_enable_RT.patch
index d92ed7a8a..4634ceb71 100644
--- a/debian/patches-rt/ARM__Allow_to_enable_RT.patch
+++ b/debian/patches-rt/ARM__Allow_to_enable_RT.patch
@@ -1,7 +1,7 @@
Subject: ARM: Allow to enable RT
From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Date: Fri Oct 11 13:14:29 2019 +0200
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.19/older/patches-5.19-rc8-rt9.tar.xz
+Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/6.0/older/patches-6.0-rt11.tar.xz
From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
@@ -17,7 +17,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
---
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
-@@ -34,6 +34,7 @@ config ARM
+@@ -33,6 +33,7 @@ config ARM
select ARCH_OPTIONAL_KERNEL_RWX_DEFAULT if CPU_V7
select ARCH_SUPPORTS_ATOMIC_RMW
select ARCH_SUPPORTS_HUGETLBFS if ARM_LPAE
diff --git a/debian/patches-rt/ARM__enable_irq_in_translation_section_permission_fault_handlers.patch b/debian/patches-rt/ARM__enable_irq_in_translation_section_permission_fault_handlers.patch
index 1232ff1de..70a9762c9 100644
--- a/debian/patches-rt/ARM__enable_irq_in_translation_section_permission_fault_handlers.patch
+++ b/debian/patches-rt/ARM__enable_irq_in_translation_section_permission_fault_handlers.patch
@@ -1,7 +1,7 @@
Subject: ARM: enable irq in translation/section permission fault handlers
From: Yadi.hu <yadi.hu@windriver.com>
Date: Wed Dec 10 10:32:09 2014 +0800
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.19/older/patches-5.19-rc8-rt9.tar.xz
+Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/6.0/older/patches-6.0-rt11.tar.xz
From: Yadi.hu <yadi.hu@windriver.com>
@@ -69,7 +69,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
---
--- a/arch/arm/mm/fault.c
+++ b/arch/arm/mm/fault.c
-@@ -417,6 +417,9 @@ do_translation_fault(unsigned long addr,
+@@ -421,6 +421,9 @@ do_translation_fault(unsigned long addr,
if (addr < TASK_SIZE)
return do_page_fault(addr, fsr, regs);
@@ -79,7 +79,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
if (user_mode(regs))
goto bad_area;
-@@ -487,6 +490,9 @@ do_translation_fault(unsigned long addr,
+@@ -491,6 +494,9 @@ do_translation_fault(unsigned long addr,
static int
do_sect_fault(unsigned long addr, unsigned int fsr, struct pt_regs *regs)
{
diff --git a/debian/patches-rt/Add_localversion_for_-RT_release.patch b/debian/patches-rt/Add_localversion_for_-RT_release.patch
index 79ab22c4d..b8f405324 100644
--- a/debian/patches-rt/Add_localversion_for_-RT_release.patch
+++ b/debian/patches-rt/Add_localversion_for_-RT_release.patch
@@ -1,7 +1,7 @@
Subject: Add localversion for -RT release
From: Thomas Gleixner <tglx@linutronix.de>
Date: Fri Jul 8 20:25:16 2011 +0200
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.19/older/patches-5.19-rc8-rt9.tar.xz
+Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/6.0/older/patches-6.0-rt11.tar.xz
From: Thomas Gleixner <tglx@linutronix.de>
@@ -16,4 +16,4 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
--- /dev/null
+++ b/localversion-rt
@@ -0,0 +1 @@
-+-rt9
++-rt11
diff --git a/debian/patches-rt/POWERPC__Allow_to_enable_RT.patch b/debian/patches-rt/POWERPC__Allow_to_enable_RT.patch
index 5224820a4..d8756e613 100644
--- a/debian/patches-rt/POWERPC__Allow_to_enable_RT.patch
+++ b/debian/patches-rt/POWERPC__Allow_to_enable_RT.patch
@@ -1,7 +1,7 @@
Subject: POWERPC: Allow to enable RT
From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Date: Fri Oct 11 13:14:41 2019 +0200
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.19/older/patches-5.19-rc8-rt9.tar.xz
+Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/6.0/older/patches-6.0-rt11.tar.xz
From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
@@ -17,7 +17,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
---
--- a/arch/powerpc/Kconfig
+++ b/arch/powerpc/Kconfig
-@@ -150,6 +150,7 @@ config PPC
+@@ -149,6 +149,7 @@ config PPC
select ARCH_STACKWALK
select ARCH_SUPPORTS_ATOMIC_RMW
select ARCH_SUPPORTS_DEBUG_PAGEALLOC if PPC_BOOK3S || PPC_8xx || 40x
@@ -25,7 +25,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
select ARCH_USE_BUILTIN_BSWAP
select ARCH_USE_CMPXCHG_LOCKREF if PPC64
select ARCH_USE_MEMTEST
-@@ -243,6 +244,7 @@ config PPC
+@@ -244,6 +245,7 @@ config PPC
select HAVE_PREEMPT_LAZY
select HAVE_REGS_AND_STACK_ACCESS_API
select HAVE_RELIABLE_STACKTRACE
diff --git a/debian/patches-rt/Revert-drm-i915-Depend-on-PREEMPT_RT.patch b/debian/patches-rt/Revert-drm-i915-Depend-on-PREEMPT_RT.patch
index 4151aeaf2..5ca8cde41 100644
--- a/debian/patches-rt/Revert-drm-i915-Depend-on-PREEMPT_RT.patch
+++ b/debian/patches-rt/Revert-drm-i915-Depend-on-PREEMPT_RT.patch
@@ -1,7 +1,7 @@
From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Date: Mon, 21 Feb 2022 17:59:14 +0100
Subject: [PATCH] Revert "drm/i915: Depend on !PREEMPT_RT."
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.19/older/patches-5.19-rc8-rt9.tar.xz
+Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/6.0/older/patches-6.0-rt11.tar.xz
Once the known issues are addressed, it should be safe to enable the
driver.
diff --git a/debian/patches-rt/Revert-printk-Skip-console-drivers-on-PREEMPT_RT.patch b/debian/patches-rt/Revert-printk-Skip-console-drivers-on-PREEMPT_RT.patch
deleted file mode 100644
index cec553b99..000000000
--- a/debian/patches-rt/Revert-printk-Skip-console-drivers-on-PREEMPT_RT.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
-Date: Wed, 20 Jul 2022 11:31:02 +0200
-Subject: [PATCH] Revert "printk: Skip console drivers on PREEMPT_RT."
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.19/older/patches-5.19-rc8-rt9.tar.xz
-
-Revert the previous change and allow printing on consoles now that the atomic
-consoles and the printing thread is available.
-
-Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
----
- kernel/printk/printk.c | 10 ----------
- 1 file changed, 10 deletions(-)
-
---- a/kernel/printk/printk.c
-+++ b/kernel/printk/printk.c
-@@ -3298,16 +3298,6 @@ void console_unlock(void)
- }
-
- /*
-- * On PREEMPT_RT it is not possible to invoke console drivers with
-- * disabled interrupts and or preemption. Therefore all drivers are
-- * skipped and the output can be retrieved from the buffer.
-- */
-- if (IS_ENABLED(CONFIG_PREEMPT_RT)) {
-- __console_unlock();
-- return;
-- }
--
-- /*
- * Console drivers are called with interrupts disabled, so
- * @console_may_schedule should be cleared before; however, we may
- * end up dumping a lot of lines, for example, if called from
diff --git a/debian/patches-rt/arch-Disable-softirq-stacks-on-PREEMPT_RT.patch b/debian/patches-rt/arch-Disable-softirq-stacks-on-PREEMPT_RT.patch
deleted file mode 100644
index 7a19662c0..000000000
--- a/debian/patches-rt/arch-Disable-softirq-stacks-on-PREEMPT_RT.patch
+++ /dev/null
@@ -1,151 +0,0 @@
-From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
-Date: Tue, 14 Jun 2022 20:18:14 +0200
-Subject: [PATCH] arch/*: Disable softirq stacks on PREEMPT_RT.
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.19/older/patches-5.19-rc8-rt9.tar.xz
-
-PREEMPT_RT preempts softirqs and the current implementation avoids
-do_softirq_own_stack() and only uses __do_softirq().
-
-Disable the unused softirqs stacks on PREEMPT_RT to save some memory and
-ensure that do_softirq_own_stack() is not used bwcause it is not expected.
-
-Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
-Signed-off-by: Arnd Bergmann <arnd@arndb.de>
-Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
-Link: https://lkml.kernel.org/r/CAK8P3a1QmeAscV-Ory-Dae4RoLvDSPEjEgFGQHR9U8jUervGuA@mail.gmail.com
----
- arch/arm/kernel/irq.c | 3 ++-
- arch/parisc/kernel/irq.c | 2 ++
- arch/powerpc/kernel/irq.c | 4 ++++
- arch/s390/include/asm/softirq_stack.h | 3 ++-
- arch/sh/kernel/irq.c | 2 ++
- arch/sparc/kernel/irq_64.c | 2 ++
- include/asm-generic/softirq_stack.h | 2 +-
- 7 files changed, 15 insertions(+), 3 deletions(-)
-
---- a/arch/arm/kernel/irq.c
-+++ b/arch/arm/kernel/irq.c
-@@ -70,6 +70,7 @@ static void __init init_irq_stacks(void)
- }
- }
-
-+#ifndef CONFIG_PREEMPT_RT
- static void ____do_softirq(void *arg)
- {
- __do_softirq();
-@@ -80,7 +81,7 @@ void do_softirq_own_stack(void)
- call_with_stack(____do_softirq, NULL,
- __this_cpu_read(irq_stack_ptr));
- }
--
-+#endif
- #endif
-
- int arch_show_interrupts(struct seq_file *p, int prec)
---- a/arch/parisc/kernel/irq.c
-+++ b/arch/parisc/kernel/irq.c
-@@ -480,10 +480,12 @@ static void execute_on_irq_stack(void *f
- *irq_stack_in_use = 1;
- }
-
-+#ifndef CONFIG_PREEMPT_RT
- void do_softirq_own_stack(void)
- {
- execute_on_irq_stack(__do_softirq, 0);
- }
-+#endif
- #endif /* CONFIG_IRQSTACKS */
-
- /* ONLY called from entry.S:intr_extint() */
---- a/arch/powerpc/kernel/irq.c
-+++ b/arch/powerpc/kernel/irq.c
-@@ -611,6 +611,7 @@ static inline void check_stack_overflow(
- }
- }
-
-+#ifndef CONFIG_PREEMPT_RT
- static __always_inline void call_do_softirq(const void *sp)
- {
- /* Temporarily switch r1 to sp, call __do_softirq() then restore r1. */
-@@ -629,6 +630,7 @@ static __always_inline void call_do_soft
- "r11", "r12"
- );
- }
-+#endif
-
- static __always_inline void call_do_irq(struct pt_regs *regs, void *sp)
- {
-@@ -747,10 +749,12 @@ void *mcheckirq_ctx[NR_CPUS] __read_most
- void *softirq_ctx[NR_CPUS] __read_mostly;
- void *hardirq_ctx[NR_CPUS] __read_mostly;
-
-+#ifndef CONFIG_PREEMPT_RT
- void do_softirq_own_stack(void)
- {
- call_do_softirq(softirq_ctx[smp_processor_id()]);
- }
-+#endif
-
- irq_hw_number_t virq_to_hw(unsigned int virq)
- {
---- a/arch/s390/include/asm/softirq_stack.h
-+++ b/arch/s390/include/asm/softirq_stack.h
-@@ -5,9 +5,10 @@
- #include <asm/lowcore.h>
- #include <asm/stacktrace.h>
-
-+#ifndef CONFIG_PREEMPT_RT
- static inline void do_softirq_own_stack(void)
- {
- call_on_stack(0, S390_lowcore.async_stack, void, __do_softirq);
- }
--
-+#endif
- #endif /* __ASM_S390_SOFTIRQ_STACK_H */
---- a/arch/sh/kernel/irq.c
-+++ b/arch/sh/kernel/irq.c
-@@ -149,6 +149,7 @@ void irq_ctx_exit(int cpu)
- hardirq_ctx[cpu] = NULL;
- }
-
-+#ifndef CONFIG_PREEMPT_RT
- void do_softirq_own_stack(void)
- {
- struct thread_info *curctx;
-@@ -176,6 +177,7 @@ void do_softirq_own_stack(void)
- "r5", "r6", "r7", "r8", "r9", "r15", "t", "pr"
- );
- }
-+#endif
- #else
- static inline void handle_one_irq(unsigned int irq)
- {
---- a/arch/sparc/kernel/irq_64.c
-+++ b/arch/sparc/kernel/irq_64.c
-@@ -855,6 +855,7 @@ void __irq_entry handler_irq(int pil, st
- set_irq_regs(old_regs);
- }
-
-+#ifndef CONFIG_PREEMPT_RT
- void do_softirq_own_stack(void)
- {
- void *orig_sp, *sp = softirq_stack[smp_processor_id()];
-@@ -869,6 +870,7 @@ void do_softirq_own_stack(void)
- __asm__ __volatile__("mov %0, %%sp"
- : : "r" (orig_sp));
- }
-+#endif
-
- #ifdef CONFIG_HOTPLUG_CPU
- void fixup_irqs(void)
---- a/include/asm-generic/softirq_stack.h
-+++ b/include/asm-generic/softirq_stack.h
-@@ -2,7 +2,7 @@
- #ifndef __ASM_GENERIC_SOFTIRQ_STACK_H
- #define __ASM_GENERIC_SOFTIRQ_STACK_H
-
--#ifdef CONFIG_HAVE_SOFTIRQ_ON_OWN_STACK
-+#if defined(CONFIG_HAVE_SOFTIRQ_ON_OWN_STACK) && !defined(CONFIG_PREEMPT_RT)
- void do_softirq_own_stack(void);
- #else
- static inline void do_softirq_own_stack(void)
diff --git a/debian/patches-rt/arch_arm64__Add_lazy_preempt_support.patch b/debian/patches-rt/arch_arm64__Add_lazy_preempt_support.patch
index 299e06922..c2a8c5cee 100644
--- a/debian/patches-rt/arch_arm64__Add_lazy_preempt_support.patch
+++ b/debian/patches-rt/arch_arm64__Add_lazy_preempt_support.patch
@@ -1,7 +1,7 @@
Subject: arch/arm64: Add lazy preempt support
From: Anders Roxell <anders.roxell@linaro.org>
Date: Thu May 14 17:52:17 2015 +0200
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.19/older/patches-5.19-rc8-rt9.tar.xz
+Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/6.0/older/patches-6.0-rt11.tar.xz
From: Anders Roxell <anders.roxell@linaro.org>
@@ -26,7 +26,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
---
--- a/arch/arm64/Kconfig
+++ b/arch/arm64/Kconfig
-@@ -197,6 +197,7 @@ config ARM64
+@@ -200,6 +200,7 @@ config ARM64
select HAVE_PERF_USER_STACK_DUMP
select HAVE_PREEMPT_DYNAMIC_KEY
select HAVE_REGS_AND_STACK_ACCESS_API
@@ -125,7 +125,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
#endif
--- a/arch/arm64/kernel/signal.c
+++ b/arch/arm64/kernel/signal.c
-@@ -1089,7 +1089,7 @@ static void do_signal(struct pt_regs *re
+@@ -1103,7 +1103,7 @@ static void do_signal(struct pt_regs *re
void do_notify_resume(struct pt_regs *regs, unsigned long thread_flags)
{
do {
diff --git a/debian/patches-rt/arm__Add_support_for_lazy_preemption.patch b/debian/patches-rt/arm__Add_support_for_lazy_preemption.patch
index 32de22710..b3d9e8a11 100644
--- a/debian/patches-rt/arm__Add_support_for_lazy_preemption.patch
+++ b/debian/patches-rt/arm__Add_support_for_lazy_preemption.patch
@@ -1,7 +1,7 @@
Subject: arm: Add support for lazy preemption
From: Thomas Gleixner <tglx@linutronix.de>
Date: Wed Oct 31 12:04:11 2012 +0100
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.19/older/patches-5.19-rc8-rt9.tar.xz
+Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/6.0/older/patches-6.0-rt11.tar.xz
From: Thomas Gleixner <tglx@linutronix.de>
diff --git a/debian/patches-rt/blk-mq-Don-t-disable-preemption-around-__blk_mq_run_.patch b/debian/patches-rt/blk-mq-Don-t-disable-preemption-around-__blk_mq_run_.patch
deleted file mode 100644
index 542e5dae7..000000000
--- a/debian/patches-rt/blk-mq-Don-t-disable-preemption-around-__blk_mq_run_.patch
+++ /dev/null
@@ -1,45 +0,0 @@
-From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
-Date: Wed, 22 Jun 2022 09:42:37 +0200
-Subject: [PATCH] blk-mq: Don't disable preemption around
- __blk_mq_run_hw_queue().
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.19/older/patches-5.19-rc8-rt9.tar.xz
-
-__blk_mq_delay_run_hw_queue() disables preemption to get a stable
-current CPU number and then invokes __blk_mq_run_hw_queue() if the CPU
-number is part the mask.
-
-__blk_mq_run_hw_queue() acquires a spin_lock_t which is a sleeping lock
-on PREEMPT_RT and can't be acquired with disabled preemption.
-
-It is not required for correctness to invoke __blk_mq_run_hw_queue() on
-a CPU matching hctx->cpumask. Both (async and direct requests) can run
-on a CPU not matching hctx->cpumask.
-
-The CPU mask without disabling preemption and invoking
-__blk_mq_run_hw_queue().
-
-Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
-Link: https://lkml.kernel.org/r/YrLSEiNvagKJaDs5@linutronix.de
-Reviewed-by: Ming Lei <ming.lei@redhat.com>
----
- block/blk-mq.c | 6 +-----
- 1 file changed, 1 insertion(+), 5 deletions(-)
-
---- a/block/blk-mq.c
-+++ b/block/blk-mq.c
-@@ -2085,14 +2085,10 @@ static void __blk_mq_delay_run_hw_queue(
- return;
-
- if (!async && !(hctx->flags & BLK_MQ_F_BLOCKING)) {
-- int cpu = get_cpu();
-- if (cpumask_test_cpu(cpu, hctx->cpumask)) {
-+ if (cpumask_test_cpu(raw_smp_processor_id(), hctx->cpumask)) {
- __blk_mq_run_hw_queue(hctx);
-- put_cpu();
- return;
- }
--
-- put_cpu();
- }
-
- kblockd_mod_delayed_work_on(blk_mq_hctx_next_cpu(hctx), &hctx->run_work,
diff --git a/debian/patches-rt/drivers_block_zram__Replace_bit_spinlocks_with_rtmutex_for_-rt.patch b/debian/patches-rt/drivers_block_zram__Replace_bit_spinlocks_with_rtmutex_for_-rt.patch
index 2c8431b03..ae43dede7 100644
--- a/debian/patches-rt/drivers_block_zram__Replace_bit_spinlocks_with_rtmutex_for_-rt.patch
+++ b/debian/patches-rt/drivers_block_zram__Replace_bit_spinlocks_with_rtmutex_for_-rt.patch
@@ -1,7 +1,7 @@
Subject: zram: Replace bit spinlocks with spinlock_t for PREEMPT_RT.
From: Mike Galbraith <umgwanakikbuti@gmail.com>
Date: Thu Mar 31 04:08:28 2016 +0200
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.19/older/patches-5.19-rc8-rt9.tar.xz
+Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/6.0/older/patches-6.0-rt11.tar.xz
From: Mike Galbraith <umgwanakikbuti@gmail.com>
@@ -22,7 +22,7 @@ Link: https://lkml.kernel.org/r/YqIbMuHCPiQk+Ac2@linutronix.de
---
--- a/drivers/block/zram/zram_drv.c
+++ b/drivers/block/zram/zram_drv.c
-@@ -58,6 +58,40 @@ static void zram_free_page(struct zram *
+@@ -60,6 +60,40 @@ static void zram_free_page(struct zram *
static int zram_bvec_read(struct zram *zram, struct bio_vec *bvec,
u32 index, int offset, struct bio *bio);
@@ -63,7 +63,7 @@ Link: https://lkml.kernel.org/r/YqIbMuHCPiQk+Ac2@linutronix.de
static int zram_slot_trylock(struct zram *zram, u32 index)
{
-@@ -73,6 +107,7 @@ static void zram_slot_unlock(struct zram
+@@ -75,6 +109,7 @@ static void zram_slot_unlock(struct zram
{
bit_spin_unlock(ZRAM_LOCK, &zram->table[index].flags);
}
@@ -71,7 +71,7 @@ Link: https://lkml.kernel.org/r/YqIbMuHCPiQk+Ac2@linutronix.de
static inline bool init_done(struct zram *zram)
{
-@@ -1195,6 +1230,7 @@ static bool zram_meta_alloc(struct zram
+@@ -1198,6 +1233,7 @@ static bool zram_meta_alloc(struct zram
if (!huge_class_size)
huge_class_size = zs_huge_class_size(zram->mem_pool);
diff --git a/debian/patches-rt/entry--Fix-the-preempt-lazy-fallout.patch b/debian/patches-rt/entry--Fix-the-preempt-lazy-fallout.patch
index e9513a890..2d1f75c4f 100644
--- a/debian/patches-rt/entry--Fix-the-preempt-lazy-fallout.patch
+++ b/debian/patches-rt/entry--Fix-the-preempt-lazy-fallout.patch
@@ -1,7 +1,7 @@
Subject: entry: Fix the preempt lazy fallout
From: Thomas Gleixner <tglx@linutronix.de>
Date: Tue, 13 Jul 2021 07:52:52 +0200
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.19/older/patches-5.19-rc8-rt9.tar.xz
+Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/6.0/older/patches-6.0-rt11.tar.xz
Common code needs common defines....
diff --git a/debian/patches-rt/genirq-Provide-generic_handle_domain_irq_safe.patch b/debian/patches-rt/genirq-Provide-generic_handle_domain_irq_safe.patch
index f805f0cb2..04a93526a 100644
--- a/debian/patches-rt/genirq-Provide-generic_handle_domain_irq_safe.patch
+++ b/debian/patches-rt/genirq-Provide-generic_handle_domain_irq_safe.patch
@@ -1,7 +1,7 @@
From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Date: Mon, 9 May 2022 16:04:08 +0200
Subject: [PATCH] genirq: Provide generic_handle_domain_irq_safe().
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.19/older/patches-5.19-rc8-rt9.tar.xz
+Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/6.0/older/patches-6.0-rt11.tar.xz
Provide generic_handle_domain_irq_safe() which can used from any context.
This similar to commit
@@ -65,7 +65,7 @@ Link: https://lore.kernel.org/r/YnkfWFzvusFFktSt@linutronix.de
}
--- a/drivers/pinctrl/pinctrl-amd.c
+++ b/drivers/pinctrl/pinctrl-amd.c
-@@ -643,7 +643,7 @@ static bool do_amd_gpio_irq_handler(int
+@@ -639,7 +639,7 @@ static bool do_amd_gpio_irq_handler(int
if (!(regval & PIN_IRQ_PENDING) ||
!(regval & BIT(INTERRUPT_MASK_OFF)))
continue;
diff --git a/debian/patches-rt/iio-adc-stm32-adc-Use-generic_handle_domain_irq.patch b/debian/patches-rt/iio-adc-stm32-adc-Use-generic_handle_domain_irq.patch
deleted file mode 100644
index 2f2cf47e1..000000000
--- a/debian/patches-rt/iio-adc-stm32-adc-Use-generic_handle_domain_irq.patch
+++ /dev/null
@@ -1,36 +0,0 @@
-From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
-Date: Wed, 11 May 2022 13:06:09 +0200
-Subject: [PATCH] iio: adc: stm32-adc: Use generic_handle_domain_irq()
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.19/older/patches-5.19-rc8-rt9.tar.xz
-
-The call chain
- generic_handle_irq(irq_find_mapping(domain, x));
-
-could be replaced with
- generic_handle_domain_irq(domain, x);
-
-which looks up the struct irq_desc for the interrupt and handles it with
-handle_irq_desc().
-This is a slight optimisation given that the driver invokes only one
-function and the struct irq_desc is used directly instead being looked
-up via irq_to_desc().
-
-Use generic_handle_domain_irq().
-
-Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
-Link: https://lore.kernel.org/r/YnuYoQIzJoFIyEJY@linutronix.de
----
- drivers/iio/adc/stm32-adc-core.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
---- a/drivers/iio/adc/stm32-adc-core.c
-+++ b/drivers/iio/adc/stm32-adc-core.c
-@@ -358,7 +358,7 @@ static void stm32_adc_irq_handler(struct
- if ((status & priv->cfg->regs->eoc_msk[i] &&
- stm32_adc_eoc_enabled(priv, i)) ||
- (status & priv->cfg->regs->ovr_msk[i]))
-- generic_handle_irq(irq_find_mapping(priv->domain, i));
-+ generic_handle_domain_irq(priv->domain, i);
- }
-
- chained_irq_exit(chip, desc);
diff --git a/debian/patches-rt/locking-Detect-includes-rwlock.h-outside-of-spinlock.patch b/debian/patches-rt/locking-Detect-includes-rwlock.h-outside-of-spinlock.patch
new file mode 100644
index 000000000..294550c8d
--- /dev/null
+++ b/debian/patches-rt/locking-Detect-includes-rwlock.h-outside-of-spinlock.patch
@@ -0,0 +1,105 @@
+From: Michael S. Tsirkin <mst@redhat.com>
+Date: Thu, 25 Aug 2022 17:30:49 +0200
+Subject: [PATCH] locking: Detect includes rwlock.h outside of spinlock.h
+Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/6.0/older/patches-6.0-rt11.tar.xz
+
+The check for __LINUX_SPINLOCK_H within rwlock.h (and other files)
+detects the direct include of the header file if it is at the very
+beginning of the include section.
+If it is listed later then chances are high that spinlock.h was already
+included (including rwlock.h) and the additional listing of rwlock.h
+will not cause any failure.
+
+On PREEMPT_RT this additional rwlock.h will lead to compile failures
+since it uses a different rwlock implementation.
+
+Add __LINUX_INSIDE_SPINLOCK_H to spinlock.h and check for this instead
+of __LINUX_SPINLOCK_H to detect wrong includes. This will help detect
+direct includes of rwlock.h with without PREEMPT_RT enabled.
+
+[ bigeasy: add remaining __LINUX_SPINLOCK_H user and rewrite
+ commit description. ]
+
+Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
+Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
+Link: https://lkml.kernel.org/r/YweemHxJx7O8rjBx@linutronix.de
+---
+ include/linux/rwlock.h | 2 +-
+ include/linux/spinlock.h | 2 ++
+ include/linux/spinlock_api_smp.h | 2 +-
+ include/linux/spinlock_api_up.h | 2 +-
+ include/linux/spinlock_rt.h | 2 +-
+ include/linux/spinlock_up.h | 2 +-
+ 6 files changed, 7 insertions(+), 5 deletions(-)
+
+--- a/include/linux/rwlock.h
++++ b/include/linux/rwlock.h
+@@ -1,7 +1,7 @@
+ #ifndef __LINUX_RWLOCK_H
+ #define __LINUX_RWLOCK_H
+
+-#ifndef __LINUX_SPINLOCK_H
++#ifndef __LINUX_INSIDE_SPINLOCK_H
+ # error "please don't include this file directly"
+ #endif
+
+--- a/include/linux/spinlock.h
++++ b/include/linux/spinlock.h
+@@ -1,6 +1,7 @@
+ /* SPDX-License-Identifier: GPL-2.0 */
+ #ifndef __LINUX_SPINLOCK_H
+ #define __LINUX_SPINLOCK_H
++#define __LINUX_INSIDE_SPINLOCK_H
+
+ /*
+ * include/linux/spinlock.h - generic spinlock/rwlock declarations
+@@ -492,4 +493,5 @@ int __alloc_bucket_spinlocks(spinlock_t
+
+ void free_bucket_spinlocks(spinlock_t *locks);
+
++#undef __LINUX_INSIDE_SPINLOCK_H
+ #endif /* __LINUX_SPINLOCK_H */
+--- a/include/linux/spinlock_api_smp.h
++++ b/include/linux/spinlock_api_smp.h
+@@ -1,7 +1,7 @@
+ #ifndef __LINUX_SPINLOCK_API_SMP_H
+ #define __LINUX_SPINLOCK_API_SMP_H
+
+-#ifndef __LINUX_SPINLOCK_H
++#ifndef __LINUX_INSIDE_SPINLOCK_H
+ # error "please don't include this file directly"
+ #endif
+
+--- a/include/linux/spinlock_api_up.h
++++ b/include/linux/spinlock_api_up.h
+@@ -1,7 +1,7 @@
+ #ifndef __LINUX_SPINLOCK_API_UP_H
+ #define __LINUX_SPINLOCK_API_UP_H
+
+-#ifndef __LINUX_SPINLOCK_H
++#ifndef __LINUX_INSIDE_SPINLOCK_H
+ # error "please don't include this file directly"
+ #endif
+
+--- a/include/linux/spinlock_rt.h
++++ b/include/linux/spinlock_rt.h
+@@ -2,7 +2,7 @@
+ #ifndef __LINUX_SPINLOCK_RT_H
+ #define __LINUX_SPINLOCK_RT_H
+
+-#ifndef __LINUX_SPINLOCK_H
++#ifndef __LINUX_INSIDE_SPINLOCK_H
+ #error Do not include directly. Use spinlock.h
+ #endif
+
+--- a/include/linux/spinlock_up.h
++++ b/include/linux/spinlock_up.h
+@@ -1,7 +1,7 @@
+ #ifndef __LINUX_SPINLOCK_UP_H
+ #define __LINUX_SPINLOCK_UP_H
+
+-#ifndef __LINUX_SPINLOCK_H
++#ifndef __LINUX_INSIDE_SPINLOCK_H
+ # error "please don't include this file directly"
+ #endif
+
diff --git a/debian/patches-rt/locking-lockdep-Remove-lockdep_init_map_crosslock.patch b/debian/patches-rt/locking-lockdep-Remove-lockdep_init_map_crosslock.patch
index a4bbebec4..d6dfa9dc5 100644
--- a/debian/patches-rt/locking-lockdep-Remove-lockdep_init_map_crosslock.patch
+++ b/debian/patches-rt/locking-lockdep-Remove-lockdep_init_map_crosslock.patch
@@ -1,7 +1,7 @@
From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Date: Fri, 11 Mar 2022 17:44:57 +0100
Subject: [PATCH] locking/lockdep: Remove lockdep_init_map_crosslock.
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.19/older/patches-5.19-rc8-rt9.tar.xz
+Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/6.0/older/patches-6.0-rt11.tar.xz
The cross-release bits have been removed, lockdep_init_map_crosslock() is
a leftover.
@@ -18,7 +18,7 @@ Link: https://lore.kernel.org/r/YqITgY+2aPITu96z@linutronix.de
--- a/include/linux/lockdep.h
+++ b/include/linux/lockdep.h
-@@ -431,7 +431,6 @@ enum xhlock_context_t {
+@@ -435,7 +435,6 @@ enum xhlock_context_t {
XHLOCK_CTX_NR,
};
diff --git a/debian/patches-rt/net-Avoid-the-IPI-to-free-the.patch b/debian/patches-rt/net-Avoid-the-IPI-to-free-the.patch
new file mode 100644
index 000000000..2da2c7c1c
--- /dev/null
+++ b/debian/patches-rt/net-Avoid-the-IPI-to-free-the.patch
@@ -0,0 +1,115 @@
+From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
+Date: Mon, 15 Aug 2022 17:29:50 +0200
+Subject: [PATCH] net: Avoid the IPI to free the
+Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/6.0/older/patches-6.0-rt11.tar.xz
+
+skb_attempt_defer_free() collects a skbs, which was allocated on a
+remote CPU, on a per-CPU list. These skbs are either freed on that
+remote CPU once the CPU enters NET_RX or an remote IPI function is
+invoked in to raise the NET_RX softirq if a threshold of pending skb has
+been exceeded.
+This remote IPI can cause the wakeup of ksoftirqd on PREEMPT_RT if the
+remote CPU idle was idle. This is undesired because once the ksoftirqd
+is running it will acquire all pending softirqs and they will not be
+executed as part of the threaded interrupt until ksoftird goes idle
+again.
+
+To void all this, schedule the deferred clean up from a worker.
+
+Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
+---
+ include/linux/netdevice.h | 4 ++++
+ net/core/dev.c | 37 ++++++++++++++++++++++++++++---------
+ net/core/skbuff.c | 7 ++++++-
+ 3 files changed, 38 insertions(+), 10 deletions(-)
+
+--- a/include/linux/netdevice.h
++++ b/include/linux/netdevice.h
+@@ -3156,7 +3156,11 @@ struct softnet_data {
+ int defer_count;
+ int defer_ipi_scheduled;
+ struct sk_buff *defer_list;
++#ifndef CONFIG_PREEMPT_RT
+ call_single_data_t defer_csd;
++#else
++ struct work_struct defer_work;
++#endif
+ };
+
+ static inline void input_queue_head_incr(struct softnet_data *sd)
+--- a/net/core/dev.c
++++ b/net/core/dev.c
+@@ -4582,15 +4582,6 @@ static void rps_trigger_softirq(void *da
+
+ #endif /* CONFIG_RPS */
+
+-/* Called from hardirq (IPI) context */
+-static void trigger_rx_softirq(void *data)
+-{
+- struct softnet_data *sd = data;
+-
+- __raise_softirq_irqoff(NET_RX_SOFTIRQ);
+- smp_store_release(&sd->defer_ipi_scheduled, 0);
+-}
+-
+ /*
+ * Check if this softnet_data structure is another cpu one
+ * If yes, queue it to our IPI list and return 1
+@@ -6661,6 +6652,30 @@ static void skb_defer_free_flush(struct
+ }
+ }
+
++#ifndef CONFIG_PREEMPT_RT
++/* Called from hardirq (IPI) context */
++static void trigger_rx_softirq(void *data)
++{
++ struct softnet_data *sd = data;
++
++ __raise_softirq_irqoff(NET_RX_SOFTIRQ);
++ smp_store_release(&sd->defer_ipi_scheduled, 0);
++}
++
++#else
++
++static void trigger_rx_softirq(struct work_struct *defer_work)
++{
++ struct softnet_data *sd;
++
++ sd = container_of(defer_work, struct softnet_data, defer_work);
++ smp_store_release(&sd->defer_ipi_scheduled, 0);
++ local_bh_disable();
++ skb_defer_free_flush(sd);
++ local_bh_enable();
++}
++#endif
++
+ static __latent_entropy void net_rx_action(struct softirq_action *h)
+ {
+ struct softnet_data *sd = this_cpu_ptr(&softnet_data);
+@@ -11412,7 +11427,11 @@ static int __init net_dev_init(void)
+ INIT_CSD(&sd->csd, rps_trigger_softirq, sd);
+ sd->cpu = i;
+ #endif
++#ifndef CONFIG_PREEMPT_RT
+ INIT_CSD(&sd->defer_csd, trigger_rx_softirq, sd);
++#else
++ INIT_WORK(&sd->defer_work, trigger_rx_softirq);
++#endif
+ spin_lock_init(&sd->defer_lock);
+
+ init_gro_hash(&sd->backlog);
+--- a/net/core/skbuff.c
++++ b/net/core/skbuff.c
+@@ -6555,6 +6555,11 @@ nodefer: __kfree_skb(skb);
+ /* Make sure to trigger NET_RX_SOFTIRQ on the remote CPU
+ * if we are unlucky enough (this seems very unlikely).
+ */
+- if (unlikely(kick) && !cmpxchg(&sd->defer_ipi_scheduled, 0, 1))
++ if (unlikely(kick) && !cmpxchg(&sd->defer_ipi_scheduled, 0, 1)) {
++#ifndef CONFIG_PREEMPT_RT
+ smp_call_function_single_async(cpu, &sd->defer_csd);
++#else
++ schedule_work_on(cpu, &sd->defer_work);
++#endif
++ }
+ }
diff --git a/debian/patches-rt/powerpc__Add_support_for_lazy_preemption.patch b/debian/patches-rt/powerpc__Add_support_for_lazy_preemption.patch
index 1c91096c5..29f1bd72a 100644
--- a/debian/patches-rt/powerpc__Add_support_for_lazy_preemption.patch
+++ b/debian/patches-rt/powerpc__Add_support_for_lazy_preemption.patch
@@ -1,7 +1,7 @@
Subject: powerpc: Add support for lazy preemption
From: Thomas Gleixner <tglx@linutronix.de>
Date: Thu Nov 1 10:14:11 2012 +0100
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.19/older/patches-5.19-rc8-rt9.tar.xz
+Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/6.0/older/patches-6.0-rt11.tar.xz
From: Thomas Gleixner <tglx@linutronix.de>
@@ -18,7 +18,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
---
--- a/arch/powerpc/Kconfig
+++ b/arch/powerpc/Kconfig
-@@ -240,6 +240,7 @@ config PPC
+@@ -241,6 +241,7 @@ config PPC
select HAVE_PERF_EVENTS_NMI if PPC64
select HAVE_PERF_REGS
select HAVE_PERF_USER_STACK_DUMP
@@ -84,7 +84,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
/* Don't move TLF_NAPPING without adjusting the code in entry_32.S */
--- a/arch/powerpc/kernel/interrupt.c
+++ b/arch/powerpc/kernel/interrupt.c
-@@ -345,7 +345,7 @@ interrupt_exit_user_prepare_main(unsigne
+@@ -184,7 +184,7 @@ interrupt_exit_user_prepare_main(unsigne
ti_flags = read_thread_flags();
while (unlikely(ti_flags & (_TIF_USER_WORK_MASK & ~_TIF_RESTORE_TM))) {
local_irq_enable();
@@ -93,7 +93,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
schedule();
} else {
/*
-@@ -549,11 +549,15 @@ notrace unsigned long interrupt_exit_ker
+@@ -388,11 +388,15 @@ notrace unsigned long interrupt_exit_ker
/* Returning to a kernel context with local irqs enabled. */
WARN_ON_ONCE(!(regs->msr & MSR_EE));
again:
diff --git a/debian/patches-rt/powerpc__traps__Use_PREEMPT_RT.patch b/debian/patches-rt/powerpc__traps__Use_PREEMPT_RT.patch
index 982417593..0ba631c80 100644
--- a/debian/patches-rt/powerpc__traps__Use_PREEMPT_RT.patch
+++ b/debian/patches-rt/powerpc__traps__Use_PREEMPT_RT.patch
@@ -1,7 +1,7 @@
Subject: powerpc: traps: Use PREEMPT_RT
From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Date: Fri Jul 26 11:30:49 2019 +0200
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.19/older/patches-5.19-rc8-rt9.tar.xz
+Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/6.0/older/patches-6.0-rt11.tar.xz
From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
diff --git a/debian/patches-rt/powerpc_kvm__Disable_in-kernel_MPIC_emulation_for_PREEMPT_RT.patch b/debian/patches-rt/powerpc_kvm__Disable_in-kernel_MPIC_emulation_for_PREEMPT_RT.patch
index f55fdedf0..227c41d50 100644
--- a/debian/patches-rt/powerpc_kvm__Disable_in-kernel_MPIC_emulation_for_PREEMPT_RT.patch
+++ b/debian/patches-rt/powerpc_kvm__Disable_in-kernel_MPIC_emulation_for_PREEMPT_RT.patch
@@ -1,7 +1,7 @@
Subject: powerpc/kvm: Disable in-kernel MPIC emulation for PREEMPT_RT
From: Bogdan Purcareata <bogdan.purcareata@freescale.com>
Date: Fri Apr 24 15:53:13 2015 +0000
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.19/older/patches-5.19-rc8-rt9.tar.xz
+Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/6.0/older/patches-6.0-rt11.tar.xz
From: Bogdan Purcareata <bogdan.purcareata@freescale.com>
@@ -33,7 +33,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
---
--- a/arch/powerpc/kvm/Kconfig
+++ b/arch/powerpc/kvm/Kconfig
-@@ -204,6 +204,7 @@ config KVM_E500MC
+@@ -221,6 +221,7 @@ config KVM_E500MC
config KVM_MPIC
bool "KVM in-kernel MPIC emulation"
depends on KVM && E500
diff --git a/debian/patches-rt/powerpc_pseries_iommu__Use_a_locallock_instead_local_irq_save.patch b/debian/patches-rt/powerpc_pseries_iommu__Use_a_locallock_instead_local_irq_save.patch
index 26d49c421..6c3ea2e7b 100644
--- a/debian/patches-rt/powerpc_pseries_iommu__Use_a_locallock_instead_local_irq_save.patch
+++ b/debian/patches-rt/powerpc_pseries_iommu__Use_a_locallock_instead_local_irq_save.patch
@@ -1,7 +1,7 @@
Subject: powerpc/pseries/iommu: Use a locallock instead local_irq_save()
From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Date: Tue Mar 26 18:31:54 2019 +0100
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.19/older/patches-5.19-rc8-rt9.tar.xz
+Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/6.0/older/patches-6.0-rt11.tar.xz
From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
diff --git a/debian/patches-rt/powerpc_stackprotector__work_around_stack-guard_init_from_atomic.patch b/debian/patches-rt/powerpc_stackprotector__work_around_stack-guard_init_from_atomic.patch
index 1f7d377ba..1d73a1a4d 100644
--- a/debian/patches-rt/powerpc_stackprotector__work_around_stack-guard_init_from_atomic.patch
+++ b/debian/patches-rt/powerpc_stackprotector__work_around_stack-guard_init_from_atomic.patch
@@ -1,7 +1,7 @@
Subject: powerpc/stackprotector: work around stack-guard init from atomic
From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Date: Tue Mar 26 18:31:29 2019 +0100
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.19/older/patches-5.19-rc8-rt9.tar.xz
+Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/6.0/older/patches-6.0-rt11.tar.xz
From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
diff --git a/debian/patches-rt/printk-Bring-back-the-RT-bits.patch b/debian/patches-rt/printk-Bring-back-the-RT-bits.patch
index 14216a30f..c3239b04f 100644
--- a/debian/patches-rt/printk-Bring-back-the-RT-bits.patch
+++ b/debian/patches-rt/printk-Bring-back-the-RT-bits.patch
@@ -1,7 +1,7 @@
From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Date: Tue, 19 Jul 2022 20:08:01 +0200
Subject: [PATCH] printk: Bring back the RT bits.
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.19/older/patches-5.19-rc8-rt9.tar.xz
+Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/6.0/older/patches-6.0-rt11.tar.xz
This is a revert of the commits:
| 07a22b61946f0 Revert "printk: add functions to prefer direct printing"
@@ -175,7 +175,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
crash_smp_send_stop();
}
-@@ -603,6 +605,8 @@ void __warn(const char *file, int line,
+@@ -604,6 +606,8 @@ void __warn(const char *file, int line,
{
disable_trace_on_warning();
@@ -184,7 +184,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
if (file)
pr_warn("WARNING: CPU: %d PID: %d at %s:%d %pS\n",
raw_smp_processor_id(), current->pid, file, line,
-@@ -632,6 +636,8 @@ void __warn(const char *file, int line,
+@@ -633,6 +637,8 @@ void __warn(const char *file, int line,
/* Just a warning, don't kill lockdep. */
add_taint(taint, LOCKDEP_STILL_OK);
@@ -695,7 +695,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
}
if (*handover)
return false;
-@@ -2918,10 +3133,13 @@ void console_unblank(void)
+@@ -2908,10 +3123,13 @@ void console_unblank(void)
if (oops_in_progress) {
if (down_trylock_console_sem() != 0)
return;
@@ -710,7 +710,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
console_may_schedule = 0;
for_each_console(c)
if ((c->flags & CON_ENABLED) && c->unblank)
-@@ -3200,6 +3418,10 @@ void register_console(struct console *ne
+@@ -3190,6 +3408,10 @@ void register_console(struct console *ne
nr_ext_console_drivers++;
newcon->dropped = 0;
@@ -721,7 +721,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
if (newcon->flags & CON_PRINTBUFFER) {
/* Get a consistent copy of @syslog_seq. */
mutex_lock(&syslog_lock);
-@@ -3209,6 +3431,10 @@ void register_console(struct console *ne
+@@ -3199,6 +3421,10 @@ void register_console(struct console *ne
/* Begin with next message. */
newcon->seq = prb_next_seq(prb);
}
@@ -732,7 +732,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
console_unlock();
console_sysfs_notify();
-@@ -3235,6 +3461,7 @@ EXPORT_SYMBOL(register_console);
+@@ -3225,6 +3451,7 @@ EXPORT_SYMBOL(register_console);
int unregister_console(struct console *console)
{
@@ -740,7 +740,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
struct console *con;
int res;
-@@ -3275,7 +3502,20 @@ int unregister_console(struct console *c
+@@ -3265,7 +3492,20 @@ int unregister_console(struct console *c
console_drivers->flags |= CON_CONSDEV;
console->flags &= ~CON_ENABLED;
@@ -761,7 +761,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
console_sysfs_notify();
if (console->exit)
-@@ -3371,6 +3611,20 @@ static int __init printk_late_init(void)
+@@ -3361,6 +3601,20 @@ static int __init printk_late_init(void)
}
late_initcall(printk_late_init);
@@ -782,7 +782,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
#if defined CONFIG_PRINTK
/* If @con is specified, only wait for that console. Otherwise wait for all. */
static bool __pr_flush(struct console *con, int timeout_ms, bool reset_on_progress)
-@@ -3454,11 +3708,209 @@ bool pr_flush(int timeout_ms, bool reset
+@@ -3444,11 +3698,209 @@ bool pr_flush(int timeout_ms, bool reset
}
EXPORT_SYMBOL(pr_flush);
@@ -994,7 +994,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
static DEFINE_PER_CPU(int, printk_pending);
-@@ -3466,10 +3918,14 @@ static void wake_up_klogd_work_func(stru
+@@ -3456,10 +3908,14 @@ static void wake_up_klogd_work_func(stru
{
int pending = this_cpu_xchg(printk_pending, 0);
@@ -1010,7 +1010,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
}
if (pending & PRINTK_PENDING_WAKEUP)
-@@ -3494,10 +3950,11 @@ static void __wake_up_klogd(int val)
+@@ -3484,10 +3940,11 @@ static void __wake_up_klogd(int val)
* prepare_to_wait_event(), which is called after ___wait_event() adds
* the waiter but before it has checked the wait condition.
*
@@ -1024,7 +1024,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
this_cpu_or(printk_pending, val);
irq_work_queue(this_cpu_ptr(&wake_up_klogd_work));
}
-@@ -3515,7 +3972,17 @@ void defer_console_output(void)
+@@ -3505,7 +3962,17 @@ void defer_console_output(void)
* New messages may have been added directly to the ringbuffer
* using vprintk_store(), so wake any waiters as well.
*/
@@ -1091,7 +1091,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
+}
--- a/kernel/rcu/tree_stall.h
+++ b/kernel/rcu/tree_stall.h
-@@ -647,6 +647,7 @@ static void print_cpu_stall(unsigned lon
+@@ -643,6 +643,7 @@ static void print_cpu_stall(unsigned lon
* See Documentation/RCU/stallwarn.rst for info on how to debug
* RCU CPU stall warnings.
*/
@@ -1099,7 +1099,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
trace_rcu_stall_warning(rcu_state.name, TPS("SelfDetected"));
pr_err("INFO: %s self-detected stall on CPU\n", rcu_state.name);
raw_spin_lock_irqsave_rcu_node(rdp->mynode, flags);
-@@ -684,6 +685,7 @@ static void print_cpu_stall(unsigned lon
+@@ -677,6 +678,7 @@ static void print_cpu_stall(unsigned lon
*/
set_tsk_need_resched(current);
set_preempt_need_resched();
diff --git a/debian/patches-rt/printk-Skip-console-drivers-on-PREEMPT_RT.patch b/debian/patches-rt/printk-Skip-console-drivers-on-PREEMPT_RT.patch
deleted file mode 100644
index 1eee6962a..000000000
--- a/debian/patches-rt/printk-Skip-console-drivers-on-PREEMPT_RT.patch
+++ /dev/null
@@ -1,52 +0,0 @@
-From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
-Date: Wed, 20 Jul 2022 10:04:29 +0200
-Subject: [PATCH] printk: Skip console drivers on PREEMPT_RT.
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.19/older/patches-5.19-rc8-rt9.tar.xz
-
-printk might be invoked in a context with disabled interrupts and or
-preemption and additionally disables interrupts before it invokes the
-console drivers. This behaviour is not desired on PREEMPT_RT:
-- The console driver are using spinlock_t based locking which become sleeping
- locks on PREEMPT_RT and must not be acquired with disabled interrupts (or
- preemption).
-
-- The locks within the console drivers must remain sleeping locks and they must
- not disable interrupts. Printing (and polling for its completion) at 115200
- baud on an UART takes too long for PREEMPT_RT in general and so raises the
- latency of the IRQ-off time of the system beyond acceptable levels.
-
-Skip printing to the console as temporary workaround until the printing threads
-and atomic consoles have been introduced or another solution which is
-compatible with the PREEMPT_RT approach.
-With this change, the user will not see any kernel message printed to the
-console but can retrieve the printk buffer from userland (via the dmesg
-command). This allows enable PREEMPT_RT as a whole without disabling printk and
-loosing all kernel output.
-
-Disable console printing on PREEMPT_RT.
-
-Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
-Link: https://lkml.kernel.org/r/Yt6zwP9xSdUhsoQ9@linutronix.de
----
- kernel/printk/printk.c | 10 ++++++++++
- 1 file changed, 10 insertions(+)
-
---- a/kernel/printk/printk.c
-+++ b/kernel/printk/printk.c
-@@ -2843,6 +2843,16 @@ void console_unlock(void)
- }
-
- /*
-+ * On PREEMPT_RT it is not possible to invoke console drivers with
-+ * disabled interrupts and or preemption. Therefore all drivers are
-+ * skipped and the output can be retrieved from the buffer.
-+ */
-+ if (IS_ENABLED(CONFIG_PREEMPT_RT)) {
-+ __console_unlock();
-+ return;
-+ }
-+
-+ /*
- * Console drivers are called with interrupts disabled, so
- * @console_may_schedule should be cleared before; however, we may
- * end up dumping a lot of lines, for example, if called from
diff --git a/debian/patches-rt/rcutorture-Also-force-sched-priority-to-timersd-on-b.patch b/debian/patches-rt/rcutorture-Also-force-sched-priority-to-timersd-on-b.patch
index 4565fb5e2..d7a5efd0b 100644
--- a/debian/patches-rt/rcutorture-Also-force-sched-priority-to-timersd-on-b.patch
+++ b/debian/patches-rt/rcutorture-Also-force-sched-priority-to-timersd-on-b.patch
@@ -2,7 +2,7 @@ From: Frederic Weisbecker <frederic@kernel.org>
Date: Tue, 5 Apr 2022 03:07:51 +0200
Subject: [PATCH] rcutorture: Also force sched priority to timersd on
boosting test.
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.19/older/patches-5.19-rc8-rt9.tar.xz
+Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/6.0/older/patches-6.0-rt11.tar.xz
ksoftirqd is statically boosted to the priority level right above the
one of rcu_torture_boost() so that timers, which torture readers rely on,
@@ -60,10 +60,10 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
/* Don't allow time recalculation while creating a new task. */
--- a/kernel/softirq.c
+++ b/kernel/softirq.c
-@@ -637,7 +637,7 @@ static inline void tick_irq_exit(void)
- #endif
+@@ -638,7 +638,7 @@ static inline void tick_irq_exit(void)
}
+ #ifdef CONFIG_PREEMPT_RT
-static DEFINE_PER_CPU(struct task_struct *, timersd);
+DEFINE_PER_CPU(struct task_struct *, timersd);
static DEFINE_PER_CPU(unsigned long, pending_timer_softirq);
diff --git a/debian/patches-rt/sched-Consider-task_struct-saved_state-in-wait_task_.patch b/debian/patches-rt/sched-Consider-task_struct-saved_state-in-wait_task_.patch
index 7e6fe2aca..f7a40d6a5 100644
--- a/debian/patches-rt/sched-Consider-task_struct-saved_state-in-wait_task_.patch
+++ b/debian/patches-rt/sched-Consider-task_struct-saved_state-in-wait_task_.patch
@@ -2,7 +2,7 @@ From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Date: Wed, 22 Jun 2022 12:27:05 +0200
Subject: [PATCH] sched: Consider task_struct::saved_state in
wait_task_inactive().
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.19/older/patches-5.19-rc8-rt9.tar.xz
+Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/6.0/older/patches-6.0-rt11.tar.xz
Ptrace is using wait_task_inactive() to wait for the tracee to reach a
certain task state. On PREEMPT_RT that state may be stored in
@@ -27,7 +27,7 @@ Link: https://lkml.kernel.org/r/Yt%2FpQAFQ1xKNK0RY@linutronix.de
--- a/kernel/sched/core.c
+++ b/kernel/sched/core.c
-@@ -3257,6 +3257,70 @@ int migrate_swap(struct task_struct *cur
+@@ -3251,6 +3251,70 @@ int migrate_swap(struct task_struct *cur
}
#endif /* CONFIG_NUMA_BALANCING */
@@ -98,7 +98,7 @@ Link: https://lkml.kernel.org/r/Yt%2FpQAFQ1xKNK0RY@linutronix.de
/*
* wait_task_inactive - wait for a thread to unschedule.
*
-@@ -3275,7 +3339,7 @@ int migrate_swap(struct task_struct *cur
+@@ -3269,7 +3333,7 @@ int migrate_swap(struct task_struct *cur
*/
unsigned long wait_task_inactive(struct task_struct *p, unsigned int match_state)
{
@@ -107,7 +107,7 @@ Link: https://lkml.kernel.org/r/Yt%2FpQAFQ1xKNK0RY@linutronix.de
struct rq_flags rf;
unsigned long ncsw;
struct rq *rq;
-@@ -3301,7 +3365,7 @@ unsigned long wait_task_inactive(struct
+@@ -3295,7 +3359,7 @@ unsigned long wait_task_inactive(struct
* is actually now running somewhere else!
*/
while (task_running(rq, p)) {
@@ -116,7 +116,7 @@ Link: https://lkml.kernel.org/r/Yt%2FpQAFQ1xKNK0RY@linutronix.de
return 0;
cpu_relax();
}
-@@ -3314,10 +3378,12 @@ unsigned long wait_task_inactive(struct
+@@ -3308,10 +3372,12 @@ unsigned long wait_task_inactive(struct
rq = task_rq_lock(p, &rf);
trace_sched_wait_task(p);
running = task_running(rq, p);
@@ -131,7 +131,7 @@ Link: https://lkml.kernel.org/r/Yt%2FpQAFQ1xKNK0RY@linutronix.de
task_rq_unlock(rq, p, &rf);
/*
-@@ -3346,7 +3412,7 @@ unsigned long wait_task_inactive(struct
+@@ -3340,7 +3406,7 @@ unsigned long wait_task_inactive(struct
* running right now), it's preempted, and we should
* yield - it could be a while.
*/
diff --git a/debian/patches-rt/sched__Add_support_for_lazy_preemption.patch b/debian/patches-rt/sched__Add_support_for_lazy_preemption.patch
index 40f9d3e83..a5f1e7141 100644
--- a/debian/patches-rt/sched__Add_support_for_lazy_preemption.patch
+++ b/debian/patches-rt/sched__Add_support_for_lazy_preemption.patch
@@ -1,7 +1,7 @@
Subject: sched: Add support for lazy preemption
From: Thomas Gleixner <tglx@linutronix.de>
Date: Fri Oct 26 18:50:54 2012 +0100
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.19/older/patches-5.19-rc8-rt9.tar.xz
+Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/6.0/older/patches-6.0-rt11.tar.xz
From: Thomas Gleixner <tglx@linutronix.de>
@@ -178,7 +178,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
--- a/include/linux/sched.h
+++ b/include/linux/sched.h
-@@ -2026,6 +2026,43 @@ static inline int test_tsk_need_resched(
+@@ -2038,6 +2038,43 @@ static inline int test_tsk_need_resched(
return unlikely(test_tsk_thread_flag(tsk,TIF_NEED_RESCHED));
}
@@ -295,7 +295,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
--- a/kernel/sched/core.c
+++ b/kernel/sched/core.c
-@@ -1052,6 +1052,46 @@ void resched_curr(struct rq *rq)
+@@ -1046,6 +1046,46 @@ void resched_curr(struct rq *rq)
trace_sched_wake_idle_without_ipi(cpu);
}
@@ -342,7 +342,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
void resched_cpu(int cpu)
{
struct rq *rq = cpu_rq(cpu);
-@@ -2233,6 +2273,7 @@ void migrate_disable(void)
+@@ -2227,6 +2267,7 @@ void migrate_disable(void)
preempt_disable();
this_rq()->nr_pinned++;
p->migration_disabled = 1;
@@ -350,7 +350,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
preempt_enable();
}
EXPORT_SYMBOL_GPL(migrate_disable);
-@@ -2264,6 +2305,7 @@ void migrate_enable(void)
+@@ -2258,6 +2299,7 @@ void migrate_enable(void)
barrier();
p->migration_disabled = 0;
this_rq()->nr_pinned--;
@@ -358,7 +358,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
preempt_enable();
}
EXPORT_SYMBOL_GPL(migrate_enable);
-@@ -4620,6 +4662,9 @@ int sched_fork(unsigned long clone_flags
+@@ -4655,6 +4697,9 @@ int sched_fork(unsigned long clone_flags
p->on_cpu = 0;
#endif
init_task_preempt_count(p);
@@ -368,7 +368,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
#ifdef CONFIG_SMP
plist_node_init(&p->pushable_tasks, MAX_PRIO);
RB_CLEAR_NODE(&p->pushable_dl_tasks);
-@@ -6487,6 +6532,7 @@ static void __sched notrace __schedule(u
+@@ -6523,6 +6568,7 @@ static void __sched notrace __schedule(u
next = pick_next_task(rq, prev, &rf);
clear_tsk_need_resched(prev);
@@ -376,7 +376,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
clear_preempt_need_resched();
#ifdef CONFIG_SCHED_DEBUG
rq->last_seen_need_resched_ns = 0;
-@@ -6697,6 +6743,30 @@ static void __sched notrace preempt_sche
+@@ -6737,6 +6783,30 @@ static void __sched notrace preempt_sche
} while (need_resched());
}
@@ -407,7 +407,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
#ifdef CONFIG_PREEMPTION
/*
* This is the entry point to schedule() from in-kernel preemption
-@@ -6710,6 +6780,8 @@ asmlinkage __visible void __sched notrac
+@@ -6750,6 +6820,8 @@ asmlinkage __visible void __sched notrac
*/
if (likely(!preemptible()))
return;
@@ -416,7 +416,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
preempt_schedule_common();
}
NOKPROBE_SYMBOL(preempt_schedule);
-@@ -6757,6 +6829,9 @@ asmlinkage __visible void __sched notrac
+@@ -6797,6 +6869,9 @@ asmlinkage __visible void __sched notrac
if (likely(!preemptible()))
return;
@@ -426,7 +426,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
do {
/*
* Because the function tracer can trace preempt_count_sub()
-@@ -8985,7 +9060,9 @@ void __init init_idle(struct task_struct
+@@ -9054,7 +9129,9 @@ void __init init_idle(struct task_struct
/* Set the preempt count _outside_ the spinlocks! */
init_idle_preempt_count(idle, cpu);
@@ -439,7 +439,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
*/
--- a/kernel/sched/fair.c
+++ b/kernel/sched/fair.c
-@@ -4492,7 +4492,7 @@ check_preempt_tick(struct cfs_rq *cfs_rq
+@@ -4576,7 +4576,7 @@ check_preempt_tick(struct cfs_rq *cfs_rq
ideal_runtime = sched_slice(cfs_rq, curr);
delta_exec = curr->sum_exec_runtime - curr->prev_sum_exec_runtime;
if (delta_exec > ideal_runtime) {
@@ -448,7 +448,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
/*
* The current task ran long enough, ensure it doesn't get
* re-elected due to buddy favours.
-@@ -4516,7 +4516,7 @@ check_preempt_tick(struct cfs_rq *cfs_rq
+@@ -4600,7 +4600,7 @@ check_preempt_tick(struct cfs_rq *cfs_rq
return;
if (delta > ideal_runtime)
@@ -457,7 +457,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
}
static void
-@@ -4662,7 +4662,7 @@ entity_tick(struct cfs_rq *cfs_rq, struc
+@@ -4746,7 +4746,7 @@ entity_tick(struct cfs_rq *cfs_rq, struc
* validating it and just reschedule.
*/
if (queued) {
@@ -466,7 +466,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
return;
}
/*
-@@ -4811,7 +4811,7 @@ static void __account_cfs_rq_runtime(str
+@@ -4895,7 +4895,7 @@ static void __account_cfs_rq_runtime(str
* hierarchy can be throttled
*/
if (!assign_cfs_rq_runtime(cfs_rq) && likely(cfs_rq->curr))
@@ -475,7 +475,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
}
static __always_inline
-@@ -5574,7 +5574,7 @@ static void hrtick_start_fair(struct rq
+@@ -5646,7 +5646,7 @@ static void hrtick_start_fair(struct rq
if (delta < 0) {
if (task_current(rq, p))
@@ -484,7 +484,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
return;
}
hrtick_start(rq, delta);
-@@ -7181,7 +7181,7 @@ static void check_preempt_wakeup(struct
+@@ -7307,7 +7307,7 @@ static void check_preempt_wakeup(struct
return;
preempt:
@@ -493,7 +493,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
/*
* Only set the backward buddy when the current task is still
* on the rq. This can happen when a wakeup gets interleaved
-@@ -11220,7 +11220,7 @@ static void task_fork_fair(struct task_s
+@@ -11454,7 +11454,7 @@ static void task_fork_fair(struct task_s
* 'current' within the tree based on its new key value.
*/
swap(curr->vruntime, se->vruntime);
@@ -502,7 +502,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
}
se->vruntime -= cfs_rq->min_vruntime;
-@@ -11247,7 +11247,7 @@ prio_changed_fair(struct rq *rq, struct
+@@ -11481,7 +11481,7 @@ prio_changed_fair(struct rq *rq, struct
*/
if (task_current(rq, p)) {
if (p->prio > oldprio)
@@ -525,7 +525,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
/*
--- a/kernel/sched/sched.h
+++ b/kernel/sched/sched.h
-@@ -2315,6 +2315,15 @@ extern void reweight_task(struct task_st
+@@ -2356,6 +2356,15 @@ extern void reweight_task(struct task_st
extern void resched_curr(struct rq *rq);
extern void resched_cpu(int cpu);
@@ -619,7 +619,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
void
--- a/kernel/trace/trace_events.c
+++ b/kernel/trace/trace_events.c
-@@ -192,6 +192,7 @@ static int trace_define_common_fields(vo
+@@ -193,6 +193,7 @@ static int trace_define_common_fields(vo
/* Holds both preempt_count and migrate_disable */
__common_field(unsigned char, preempt_count);
__common_field(int, pid);
diff --git a/debian/patches-rt/series b/debian/patches-rt/series
index 10a227c12..f607d9f56 100644
--- a/debian/patches-rt/series
+++ b/debian/patches-rt/series
@@ -3,8 +3,6 @@
###########################################################################
# Posted and applied
###########################################################################
-arch-Disable-softirq-stacks-on-PREEMPT_RT.patch
-blk-mq-Don-t-disable-preemption-around-__blk_mq_run_.patch
# signal_x86__Delay_calling_signals_in_atomic.patch
@@ -12,25 +10,47 @@ blk-mq-Don-t-disable-preemption-around-__blk_mq_run_.patch
# Posted
###########################################################################
genirq-Provide-generic_handle_domain_irq_safe.patch
-printk-Skip-console-drivers-on-PREEMPT_RT.patch
0001-lib-vsprintf-Remove-static_branch_likely-from-__ptr_.patch
0002-lib-vsprintf-Initialize-vsprintf-s-pointer-hash-once.patch
+locking-Detect-includes-rwlock.h-outside-of-spinlock.patch
+vduse-Remove-include-of-rwlock.h.patch
# Hacks to get ptrace to work.
signal-Don-t-disable-preemption-in-ptrace_stop-on-PR.patch
sched-Consider-task_struct-saved_state-in-wait_task_.patch
-###########################################################################
-# fs:
-###########################################################################
-0001-fs-dcache-d_add_ci-needs-to-complete-parallel-lookup.patch
-0002-fs-dcache-Disable-preemption-on-i_dir_seq-write-side.patch
-0003-fs-dcache-Move-the-wakeup-from-__d_lookup_done-to-th.patch
-0004-fs-dcache-Move-wakeup-out-of-i_seq_dir-write-held-re.patch
+# Vlastimil Babka [PATCH v2 0/5] mm/slub: fix validation races and cleanup locking
+# 20220823170400.26546-1-vbabka@suse.cz
+0001-mm-slub-move-free_debug_processing-further.patch
+0002-mm-slub-restrict-sysfs-validation-to-debug-caches-an.patch
+0003-mm-slub-remove-slab_lock-usage-for-debug-operations.patch
+0004-mm-slub-convert-object_map_lock-to-non-raw-spinlock.patch
+0005-mm-slub-simplify-__cmpxchg_double_slab-and-slab_-un-.patch
+
+# ifdef RT cleanups.
+# staged to slub
+0003-slub-Make-PREEMPT_RT-support-less-convoluted.patch
+# pending
+0001-preempt-Provide-preempt_-dis-en-able_nested.patch
+0002-dentry-Use-preempt_-dis-en-able_nested.patch
+0003-mm-vmstat-Use-preempt_-dis-en-able_nested.patch
+0004-mm-debug-Provide-VM_WARN_ON_IRQS_ENABLED.patch
+0005-mm-memcontrol-Replace-the-PREEMPT_RT-conditionals.patch
+0006-mm-compaction-Get-rid-of-RT-ifdeffery.patch
+0007-flex_proportions-Disable-preemption-entering-the-wri.patch
+0008-u64_stats-Streamline-the-implementation.patch
+# Wait until after the previous patch is upstream.
+0001-spi-Remove-the-obsolte-u64_stats_fetch_-_irq-users.patch
+0002-net-Remove-the-obsolte-u64_stats_fetch_-_irq-users.patch
+0003-net-Remove-the-obsolte-u64_stats_fetch_-_irq-users.patch
+0004-bpf-Remove-the-obsolte-u64_stats_fetch_-_irq-users.patch
+# Wait until previous four are upstream.
+u64_stat-Remove-the-obsolete-fetch_irq-variants.patch
###########################################################################
# Post
###########################################################################
+net-Avoid-the-IPI-to-free-the.patch
###########################################################################
# X86:
@@ -46,7 +66,6 @@ rcutorture-Also-force-sched-priority-to-timersd-on-b.patch
tick-Fix-timer-storm-since-introduction-of-timersd.patch
tpm_tis__fix_stall_after_iowrites.patch
drivers_block_zram__Replace_bit_spinlocks_with_rtmutex_for_-rt.patch
-iio-adc-stm32-adc-Use-generic_handle_domain_irq.patch
locking-lockdep-Remove-lockdep_init_map_crosslock.patch
###########################################################################
@@ -56,7 +75,6 @@ printk-Bring-back-the-RT-bits.patch
0016-printk-add-infrastucture-for-atomic-consoles.patch
0017-serial-8250-implement-write_atomic.patch
0018-printk-avoid-preempt_disable-for-PREEMPT_RT.patch
-Revert-printk-Skip-console-drivers-on-PREEMPT_RT.patch
###########################################################################
# DRM:
diff --git a/debian/patches-rt/signal-Don-t-disable-preemption-in-ptrace_stop-on-PR.patch b/debian/patches-rt/signal-Don-t-disable-preemption-in-ptrace_stop-on-PR.patch
index 22f1b6e44..936522bc1 100644
--- a/debian/patches-rt/signal-Don-t-disable-preemption-in-ptrace_stop-on-PR.patch
+++ b/debian/patches-rt/signal-Don-t-disable-preemption-in-ptrace_stop-on-PR.patch
@@ -2,7 +2,7 @@ From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Date: Wed, 22 Jun 2022 11:36:17 +0200
Subject: [PATCH] signal: Don't disable preemption in ptrace_stop() on
PREEMPT_RT.
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.19/older/patches-5.19-rc8-rt9.tar.xz
+Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/6.0/older/patches-6.0-rt11.tar.xz
Commit
53da1d9456fe7 ("fix ptrace slowness")
diff --git a/debian/patches-rt/softirq-Use-a-dedicated-thread-for-timer-wakeups.patch b/debian/patches-rt/softirq-Use-a-dedicated-thread-for-timer-wakeups.patch
index b572c2583..18329abee 100644
--- a/debian/patches-rt/softirq-Use-a-dedicated-thread-for-timer-wakeups.patch
+++ b/debian/patches-rt/softirq-Use-a-dedicated-thread-for-timer-wakeups.patch
@@ -1,7 +1,7 @@
From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Date: Wed, 1 Dec 2021 17:41:09 +0100
Subject: [PATCH] softirq: Use a dedicated thread for timer wakeups.
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.19/older/patches-5.19-rc8-rt9.tar.xz
+Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/6.0/older/patches-6.0-rt11.tar.xz
A timer/hrtimer softirq is raised in-IRQ context. With threaded
interrupts enabled or on PREEMPT_RT this leads to waking the ksoftirqd
@@ -38,11 +38,11 @@ but this can already happen by a PI-boost by a force-threaded interrupt.
Reported-by: kernel test robot <lkp@intel.com> [ static timer_threads ]
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
---
- include/linux/interrupt.h | 16 +++++++++
- kernel/softirq.c | 76 ++++++++++++++++++++++++++++++++++++++++++++++
+ include/linux/interrupt.h | 16 ++++++++
+ kernel/softirq.c | 92 ++++++++++++++++++++++++++++++++++++++++++++--
kernel/time/hrtimer.c | 4 +-
kernel/time/timer.c | 2 -
- 4 files changed, 95 insertions(+), 3 deletions(-)
+ 4 files changed, 108 insertions(+), 6 deletions(-)
--- a/include/linux/interrupt.h
+++ b/include/linux/interrupt.h
@@ -71,10 +71,11 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
static inline struct task_struct *this_cpu_ksoftirqd(void)
--- a/kernel/softirq.c
+++ b/kernel/softirq.c
-@@ -637,6 +637,22 @@ static inline void tick_irq_exit(void)
+@@ -637,6 +637,29 @@ static inline void tick_irq_exit(void)
#endif
}
++#ifdef CONFIG_PREEMPT_RT
+static DEFINE_PER_CPU(struct task_struct *, timersd);
+static DEFINE_PER_CPU(unsigned long, pending_timer_softirq);
+
@@ -91,22 +92,36 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
+ wake_up_process(tsk);
+}
+
++#else
++
++static inline void wake_timersd(void) { }
++
++#endif
++
static inline void __irq_exit_rcu(void)
{
#ifndef __ARCH_IRQ_EXIT_IRQS_DISABLED
-@@ -648,6 +664,8 @@ static inline void __irq_exit_rcu(void)
+@@ -646,8 +669,13 @@ static inline void __irq_exit_rcu(void)
+ #endif
+ account_hardirq_exit(current);
preempt_count_sub(HARDIRQ_OFFSET);
- if (!in_interrupt() && local_softirq_pending())
- invoke_softirq();
-+ if (IS_ENABLED(CONFIG_PREEMPT_RT) && !in_interrupt() && local_pending_timers())
-+ wake_timersd();
+- if (!in_interrupt() && local_softirq_pending())
+- invoke_softirq();
++ if (!in_interrupt()) {
++ if (local_softirq_pending())
++ invoke_softirq();
++
++ if (IS_ENABLED(CONFIG_PREEMPT_RT) && local_pending_timers())
++ wake_timersd();
++ }
tick_irq_exit();
}
-@@ -976,11 +994,69 @@ static struct smp_hotplug_thread softirq
+@@ -976,12 +1004,70 @@ static struct smp_hotplug_thread softirq
.thread_comm = "ksoftirqd/%u",
};
++#ifdef CONFIG_PREEMPT_RT
+static void timersd_setup(unsigned int cpu)
+{
+ sched_set_fifo_low(current);
@@ -132,7 +147,6 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
+ ksoftirqd_run_end();
+}
+
-+#ifdef CONFIG_PREEMPT_RT
+static void raise_ktimers_thread(unsigned int nr)
+{
+ trace_softirq_raise(nr);
@@ -153,7 +167,6 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
+ wake_timersd();
+ local_irq_restore(flags);
+}
-+#endif
+
+static struct smp_hotplug_thread timer_threads = {
+ .store = &timersd,
@@ -162,17 +175,20 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
+ .thread_fn = run_timersd,
+ .thread_comm = "ktimers/%u",
+};
++#endif
+
static __init int spawn_ksoftirqd(void)
{
cpuhp_setup_state_nocalls(CPUHP_SOFTIRQ_DEAD, "softirq:dead", NULL,
takeover_tasklets);
BUG_ON(smpboot_register_percpu_thread(&softirq_threads));
-+ if (IS_ENABLED(CONFIG_PREEMPT_RT))
-+ BUG_ON(smpboot_register_percpu_thread(&timer_threads));
-
+-
++#ifdef CONFIG_PREEMPT_RT
++ BUG_ON(smpboot_register_percpu_thread(&timer_threads));
++#endif
return 0;
}
+ early_initcall(spawn_ksoftirqd);
--- a/kernel/time/hrtimer.c
+++ b/kernel/time/hrtimer.c
@@ -1805,7 +1805,7 @@ void hrtimer_interrupt(struct clock_even
diff --git a/debian/patches-rt/sysfs__Add__sys_kernel_realtime_entry.patch b/debian/patches-rt/sysfs__Add__sys_kernel_realtime_entry.patch
index 52fcb7830..40169c193 100644
--- a/debian/patches-rt/sysfs__Add__sys_kernel_realtime_entry.patch
+++ b/debian/patches-rt/sysfs__Add__sys_kernel_realtime_entry.patch
@@ -1,7 +1,7 @@
Subject: sysfs: Add /sys/kernel/realtime entry
From: Clark Williams <williams@redhat.com>
Date: Sat Jul 30 21:55:53 2011 -0500
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.19/older/patches-5.19-rc8-rt9.tar.xz
+Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/6.0/older/patches-6.0-rt11.tar.xz
From: Clark Williams <williams@redhat.com>
diff --git a/debian/patches-rt/tick-Fix-timer-storm-since-introduction-of-timersd.patch b/debian/patches-rt/tick-Fix-timer-storm-since-introduction-of-timersd.patch
index 73e26785b..e00a1559a 100644
--- a/debian/patches-rt/tick-Fix-timer-storm-since-introduction-of-timersd.patch
+++ b/debian/patches-rt/tick-Fix-timer-storm-since-introduction-of-timersd.patch
@@ -1,7 +1,7 @@
From: Frederic Weisbecker <frederic@kernel.org>
Date: Tue, 5 Apr 2022 03:07:52 +0200
Subject: [PATCH] tick: Fix timer storm since introduction of timersd
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.19/older/patches-5.19-rc8-rt9.tar.xz
+Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/6.0/older/patches-6.0-rt11.tar.xz
If timers are pending while the tick is reprogrammed on nohz_mode, the
next expiry is not armed to fire now, it is delayed one jiffy forward
@@ -79,9 +79,9 @@ Link: https://lkml.kernel.org/r/20220405010752.1347437-2-frederic@kernel.org
DECLARE_PER_CPU(struct task_struct *, ksoftirqd);
--- a/kernel/softirq.c
+++ b/kernel/softirq.c
-@@ -638,12 +638,7 @@ static inline void tick_irq_exit(void)
- }
+@@ -639,12 +639,7 @@ static inline void tick_irq_exit(void)
+ #ifdef CONFIG_PREEMPT_RT
DEFINE_PER_CPU(struct task_struct *, timersd);
-static DEFINE_PER_CPU(unsigned long, pending_timer_softirq);
-
diff --git a/debian/patches-rt/tpm_tis__fix_stall_after_iowrites.patch b/debian/patches-rt/tpm_tis__fix_stall_after_iowrites.patch
index 64e4fc843..181741817 100644
--- a/debian/patches-rt/tpm_tis__fix_stall_after_iowrites.patch
+++ b/debian/patches-rt/tpm_tis__fix_stall_after_iowrites.patch
@@ -1,7 +1,7 @@
Subject: tpm_tis: fix stall after iowrite*()s
From: Haris Okanovic <haris.okanovic@ni.com>
Date: Tue Aug 15 15:13:08 2017 -0500
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.19/older/patches-5.19-rc8-rt9.tar.xz
+Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/6.0/older/patches-6.0-rt11.tar.xz
From: Haris Okanovic <haris.okanovic@ni.com>
diff --git a/debian/patches-rt/tty_serial_omap__Make_the_locking_RT_aware.patch b/debian/patches-rt/tty_serial_omap__Make_the_locking_RT_aware.patch
index 04637892a..0edebadc0 100644
--- a/debian/patches-rt/tty_serial_omap__Make_the_locking_RT_aware.patch
+++ b/debian/patches-rt/tty_serial_omap__Make_the_locking_RT_aware.patch
@@ -1,7 +1,7 @@
Subject: tty/serial/omap: Make the locking RT aware
From: Thomas Gleixner <tglx@linutronix.de>
Date: Thu Jul 28 13:32:57 2011 +0200
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.19/older/patches-5.19-rc8-rt9.tar.xz
+Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/6.0/older/patches-6.0-rt11.tar.xz
From: Thomas Gleixner <tglx@linutronix.de>
@@ -18,7 +18,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
---
--- a/drivers/tty/serial/omap-serial.c
+++ b/drivers/tty/serial/omap-serial.c
-@@ -1241,13 +1241,10 @@ serial_omap_console_write(struct console
+@@ -1240,13 +1240,10 @@ serial_omap_console_write(struct console
unsigned int ier;
int locked = 1;
@@ -35,7 +35,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
/*
* First save the IER then disable the interrupts
-@@ -1274,8 +1271,7 @@ serial_omap_console_write(struct console
+@@ -1273,8 +1270,7 @@ serial_omap_console_write(struct console
check_modem_status(up);
if (locked)
diff --git a/debian/patches-rt/tty_serial_pl011__Make_the_locking_work_on_RT.patch b/debian/patches-rt/tty_serial_pl011__Make_the_locking_work_on_RT.patch
index 612e1fa88..9b2220bca 100644
--- a/debian/patches-rt/tty_serial_pl011__Make_the_locking_work_on_RT.patch
+++ b/debian/patches-rt/tty_serial_pl011__Make_the_locking_work_on_RT.patch
@@ -1,7 +1,7 @@
Subject: tty/serial/pl011: Make the locking work on RT
From: Thomas Gleixner <tglx@linutronix.de>
Date: Tue Jan 8 21:36:51 2013 +0100
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.19/older/patches-5.19-rc8-rt9.tar.xz
+Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/6.0/older/patches-6.0-rt11.tar.xz
From: Thomas Gleixner <tglx@linutronix.de>
diff --git a/debian/patches-rt/u64_stat-Remove-the-obsolete-fetch_irq-variants.patch b/debian/patches-rt/u64_stat-Remove-the-obsolete-fetch_irq-variants.patch
new file mode 100644
index 000000000..d7fcd0d82
--- /dev/null
+++ b/debian/patches-rt/u64_stat-Remove-the-obsolete-fetch_irq-variants.patch
@@ -0,0 +1,36 @@
+From: Thomas Gleixner <tglx@linutronix.de>
+Date: Thu, 25 Aug 2022 16:43:46 +0200
+Subject: [PATCH] u64_stat: Remove the obsolete fetch_irq() variants.
+Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/6.0/older/patches-6.0-rt11.tar.xz
+
+Now that the 32bit UP oddity is gone and 32bit uses always a sequence
+count, there is no need for the fetch_irq() variants anymore.
+
+Delete the obsolete interfaces.
+
+Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
+Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
+Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org>
+---
+ include/linux/u64_stats_sync.h | 12 ------------
+ 1 file changed, 12 deletions(-)
+
+--- a/include/linux/u64_stats_sync.h
++++ b/include/linux/u64_stats_sync.h
+@@ -213,16 +213,4 @@ static inline bool u64_stats_fetch_retry
+ return __u64_stats_fetch_retry(syncp, start);
+ }
+
+-/* Obsolete interfaces */
+-static inline unsigned int u64_stats_fetch_begin_irq(const struct u64_stats_sync *syncp)
+-{
+- return u64_stats_fetch_begin(syncp);
+-}
+-
+-static inline bool u64_stats_fetch_retry_irq(const struct u64_stats_sync *syncp,
+- unsigned int start)
+-{
+- return u64_stats_fetch_retry(syncp, start);
+-}
+-
+ #endif /* _LINUX_U64_STATS_SYNC_H */
diff --git a/debian/patches-rt/vduse-Remove-include-of-rwlock.h.patch b/debian/patches-rt/vduse-Remove-include-of-rwlock.h.patch
new file mode 100644
index 000000000..9016b7f75
--- /dev/null
+++ b/debian/patches-rt/vduse-Remove-include-of-rwlock.h.patch
@@ -0,0 +1,26 @@
+From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
+Date: Tue, 16 Aug 2022 09:45:22 +0200
+Subject: [PATCH] vduse: Remove include of rwlock.h
+Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/6.0/older/patches-6.0-rt11.tar.xz
+
+rwlock.h should not be included directly. Instead linux/splinlock.h
+should be included. Including it directly will break the RT build.
+
+Remove the rwlock.h include.
+
+Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
+Link: https://lkml.kernel.org/r/20220816074816.173227-1-bigeasy@linutronix.de
+---
+ drivers/vdpa/vdpa_user/iova_domain.h | 1 -
+ 1 file changed, 1 deletion(-)
+
+--- a/drivers/vdpa/vdpa_user/iova_domain.h
++++ b/drivers/vdpa/vdpa_user/iova_domain.h
+@@ -14,7 +14,6 @@
+ #include <linux/iova.h>
+ #include <linux/dma-mapping.h>
+ #include <linux/vhost_iotlb.h>
+-#include <linux/rwlock.h>
+
+ #define IOVA_START_PFN 1
+
diff --git a/debian/patches-rt/x86__Allow_to_enable_RT.patch b/debian/patches-rt/x86__Allow_to_enable_RT.patch
index 6e62e86a2..a9ce45cce 100644
--- a/debian/patches-rt/x86__Allow_to_enable_RT.patch
+++ b/debian/patches-rt/x86__Allow_to_enable_RT.patch
@@ -1,7 +1,7 @@
Subject: x86: Allow to enable RT
From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Date: Wed Aug 7 18:15:38 2019 +0200
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.19/older/patches-5.19-rc8-rt9.tar.xz
+Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/6.0/older/patches-6.0-rt11.tar.xz
From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
diff --git a/debian/patches-rt/x86__Enable_RT_also_on_32bit.patch b/debian/patches-rt/x86__Enable_RT_also_on_32bit.patch
index 876625f8e..fd8973909 100644
--- a/debian/patches-rt/x86__Enable_RT_also_on_32bit.patch
+++ b/debian/patches-rt/x86__Enable_RT_also_on_32bit.patch
@@ -1,7 +1,7 @@
Subject: x86: Enable RT also on 32bit
From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Date: Thu Nov 7 17:49:20 2019 +0100
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.19/older/patches-5.19-rc8-rt9.tar.xz
+Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/6.0/older/patches-6.0-rt11.tar.xz
From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
@@ -23,7 +23,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
select ARCH_USE_CMPXCHG_LOCKREF
select HAVE_ARCH_SOFT_DIRTY
select MODULES_USE_ELF_RELA
-@@ -111,6 +110,7 @@ config X86
+@@ -110,6 +109,7 @@ config X86
select ARCH_SUPPORTS_KMAP_LOCAL_FORCE_MAP if NR_CPUS <= 4096
select ARCH_SUPPORTS_LTO_CLANG
select ARCH_SUPPORTS_LTO_CLANG_THIN
diff --git a/debian/patches-rt/x86__Support_for_lazy_preemption.patch b/debian/patches-rt/x86__Support_for_lazy_preemption.patch
index 403f93890..535b45c8a 100644
--- a/debian/patches-rt/x86__Support_for_lazy_preemption.patch
+++ b/debian/patches-rt/x86__Support_for_lazy_preemption.patch
@@ -1,7 +1,7 @@
Subject: x86: Support for lazy preemption
From: Thomas Gleixner <tglx@linutronix.de>
Date: Thu Nov 1 11:03:47 2012 +0100
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.19/older/patches-5.19-rc8-rt9.tar.xz
+Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/6.0/older/patches-6.0-rt11.tar.xz
From: Thomas Gleixner <tglx@linutronix.de>
@@ -20,7 +20,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
---
--- a/arch/x86/Kconfig
+++ b/arch/x86/Kconfig
-@@ -245,6 +245,7 @@ config X86
+@@ -244,6 +244,7 @@ config X86
select HAVE_PCI
select HAVE_PERF_REGS
select HAVE_PERF_USER_STACK_DUMP
diff --git a/debian/patches-rt/x86_entry__Use_should_resched_in_idtentry_exit_cond_resched.patch b/debian/patches-rt/x86_entry__Use_should_resched_in_idtentry_exit_cond_resched.patch
index 77c1ed64d..4b3d1d002 100644
--- a/debian/patches-rt/x86_entry__Use_should_resched_in_idtentry_exit_cond_resched.patch
+++ b/debian/patches-rt/x86_entry__Use_should_resched_in_idtentry_exit_cond_resched.patch
@@ -1,7 +1,7 @@
Subject: x86/entry: Use should_resched() in idtentry_exit_cond_resched()
From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Date: Tue Jun 30 11:45:14 2020 +0200
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.19/older/patches-5.19-rc8-rt9.tar.xz
+Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/6.0/older/patches-6.0-rt11.tar.xz
From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
diff --git a/debian/patches/bugfix/all/pm-sleep-add-pm_userspace_autosleep-kconfig.patch b/debian/patches/bugfix/all/pm-sleep-add-pm_userspace_autosleep-kconfig.patch
deleted file mode 100644
index 9f10b6161..000000000
--- a/debian/patches/bugfix/all/pm-sleep-add-pm_userspace_autosleep-kconfig.patch
+++ /dev/null
@@ -1,89 +0,0 @@
-From: Kalesh Singh <kaleshsingh@google.com>
-Date: Thu, 30 Jun 2022 19:12:29 +0000
-Subject: [1/2] pm/sleep: Add PM_USERSPACE_AUTOSLEEP Kconfig
-Origin: https://git.kernel.org/linus/261e224d6a5c43e2bb8a07b7662f9b4ec425cfec
-
-Systems that initiate frequent suspend/resume from userspace
-can make the kernel aware by enabling PM_USERSPACE_AUTOSLEEP
-config.
-
-This allows for certain sleep-sensitive code (wireguard/rng) to
-decide on what preparatory work should be performed (or not) in
-their pm_notification callbacks.
-
-This patch was prompted by the discussion at [1] which attempts
-to remove CONFIG_ANDROID that currently guards these code paths.
-
-[1] https://lore.kernel.org/r/20220629150102.1582425-1-hch@lst.de/
-
-Suggested-by: Jason A. Donenfeld <Jason@zx2c4.com>
-Acked-by: Jason A. Donenfeld <Jason@zx2c4.com>
-Signed-off-by: Kalesh Singh <kaleshsingh@google.com>
-Link: https://lore.kernel.org/r/20220630191230.235306-1-kaleshsingh@google.com
-Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
----
- drivers/char/random.c | 4 ++--
- drivers/net/wireguard/device.c | 3 ++-
- kernel/power/Kconfig | 20 ++++++++++++++++++++
- 3 files changed, 24 insertions(+), 3 deletions(-)
-
-diff --git a/drivers/char/random.c b/drivers/char/random.c
-index e3dd1dd3dd22..8c90f535d149 100644
---- a/drivers/char/random.c
-+++ b/drivers/char/random.c
-@@ -755,8 +755,8 @@ static int random_pm_notification(struct notifier_block *nb, unsigned long actio
- spin_unlock_irqrestore(&input_pool.lock, flags);
-
- if (crng_ready() && (action == PM_RESTORE_PREPARE ||
-- (action == PM_POST_SUSPEND &&
-- !IS_ENABLED(CONFIG_PM_AUTOSLEEP) && !IS_ENABLED(CONFIG_ANDROID)))) {
-+ (action == PM_POST_SUSPEND && !IS_ENABLED(CONFIG_PM_AUTOSLEEP) &&
-+ !IS_ENABLED(CONFIG_PM_USERSPACE_AUTOSLEEP)))) {
- crng_reseed();
- pr_notice("crng reseeded on system resumption\n");
- }
-diff --git a/drivers/net/wireguard/device.c b/drivers/net/wireguard/device.c
-index aa9a7a5970fd..d58e9f818d3b 100644
---- a/drivers/net/wireguard/device.c
-+++ b/drivers/net/wireguard/device.c
-@@ -69,7 +69,8 @@ static int wg_pm_notification(struct notifier_block *nb, unsigned long action, v
- * its normal operation rather than as a somewhat rare event, then we
- * don't actually want to clear keys.
- */
-- if (IS_ENABLED(CONFIG_PM_AUTOSLEEP) || IS_ENABLED(CONFIG_ANDROID))
-+ if (IS_ENABLED(CONFIG_PM_AUTOSLEEP) ||
-+ IS_ENABLED(CONFIG_PM_USERSPACE_AUTOSLEEP))
- return 0;
-
- if (action != PM_HIBERNATION_PREPARE && action != PM_SUSPEND_PREPARE)
-diff --git a/kernel/power/Kconfig b/kernel/power/Kconfig
-index a12779650f15..60a1d3051cc7 100644
---- a/kernel/power/Kconfig
-+++ b/kernel/power/Kconfig
-@@ -143,6 +143,26 @@ config PM_AUTOSLEEP
- Allow the kernel to trigger a system transition into a global sleep
- state automatically whenever there are no active wakeup sources.
-
-+config PM_USERSPACE_AUTOSLEEP
-+ bool "Userspace opportunistic sleep"
-+ depends on PM_SLEEP
-+ help
-+ Notify kernel of aggressive userspace autosleep power management policy.
-+
-+ This option changes the behavior of various sleep-sensitive code to deal
-+ with frequent userspace-initiated transitions into a global sleep state.
-+
-+ Saying Y here, disables code paths that most users really should keep
-+ enabled. In particular, only enable this if it is very common to be
-+ asleep/awake for very short periods of time (<= 2 seconds).
-+
-+ Only platforms, such as Android, that implement opportunistic sleep from
-+ a userspace power manager service should enable this option; and not
-+ other machines. Therefore, you should say N here, unless you are
-+ extremely certain that this is what you want. The option otherwise has
-+ bad, undesirable effects, and should not be enabled just for fun.
-+
-+
- config PM_WAKELOCKS
- bool "User space wakeup sources interface"
- depends on PM_SLEEP
diff --git a/debian/patches/bugfix/all/remove-config_android.patch b/debian/patches/bugfix/all/remove-config_android.patch
deleted file mode 100644
index 3da1197eb..000000000
--- a/debian/patches/bugfix/all/remove-config_android.patch
+++ /dev/null
@@ -1,90 +0,0 @@
-From: Christoph Hellwig <hch@lst.de>
-Date: Wed, 29 Jun 2022 17:01:02 +0200
-Subject: [2/2] remove CONFIG_ANDROID
-Origin: https://git.kernel.org/linus/1045a06724f322ed61f1ffb994427c7bdbe64647
-
-The ANDROID config symbol is only used to guard the binder config
-symbol and to inject completely random config changes. Remove it
-as it is obviously a bad idea.
-
-Acked-by: Paul E. McKenney <paulmck@kernel.org>
-Signed-off-by: Christoph Hellwig <hch@lst.de>
-Link: https://lore.kernel.org/r/20220629150102.1582425-2-hch@lst.de
-Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
----
- drivers/Makefile | 2 +-
- drivers/android/Kconfig | 9 ---------
- kernel/configs/android-base.config | 1 -
- kernel/rcu/Kconfig.debug | 3 +--
- tools/testing/selftests/filesystems/binderfs/config | 1 -
- tools/testing/selftests/sync/config | 1 -
- 6 files changed, 2 insertions(+), 15 deletions(-)
-
---- a/drivers/Makefile
-+++ b/drivers/Makefile
-@@ -176,7 +176,7 @@ obj-$(CONFIG_USB4) += thunderbolt/
- obj-$(CONFIG_CORESIGHT) += hwtracing/coresight/
- obj-y += hwtracing/intel_th/
- obj-$(CONFIG_STM) += hwtracing/stm/
--obj-$(CONFIG_ANDROID) += android/
-+obj-y += android/
- obj-$(CONFIG_NVMEM) += nvmem/
- obj-$(CONFIG_FPGA) += fpga/
- obj-$(CONFIG_FSI) += fsi/
---- a/drivers/android/Kconfig
-+++ b/drivers/android/Kconfig
-@@ -1,13 +1,6 @@
- # SPDX-License-Identifier: GPL-2.0
- menu "Android"
-
--config ANDROID
-- bool "Android Drivers"
-- help
-- Enable support for various drivers needed on the Android platform
--
--if ANDROID
--
- config ANDROID_BINDER_IPC
- tristate "Android Binder IPC Driver"
- depends on MMU
-@@ -54,6 +47,4 @@ config ANDROID_BINDER_IPC_SELFTEST
- exhaustively with combinations of various buffer sizes and
- alignments.
-
--endif # if ANDROID
--
- endmenu
---- a/kernel/configs/android-base.config
-+++ b/kernel/configs/android-base.config
-@@ -7,7 +7,6 @@
- # CONFIG_OABI_COMPAT is not set
- # CONFIG_SYSVIPC is not set
- # CONFIG_USELIB is not set
--CONFIG_ANDROID=y
- CONFIG_ANDROID_BINDER_IPC=y
- CONFIG_ANDROID_BINDER_DEVICES=binder,hwbinder,vndbinder
- CONFIG_ANDROID_LOW_MEMORY_KILLER=y
---- a/kernel/rcu/Kconfig.debug
-+++ b/kernel/rcu/Kconfig.debug
-@@ -86,8 +86,7 @@ config RCU_EXP_CPU_STALL_TIMEOUT
- int "Expedited RCU CPU stall timeout in milliseconds"
- depends on RCU_STALL_COMMON
- range 0 21000
-- default 20 if ANDROID
-- default 0 if !ANDROID
-+ default 0
- help
- If a given expedited RCU grace period extends more than the
- specified number of milliseconds, a CPU stall warning is printed.
---- a/tools/testing/selftests/filesystems/binderfs/config
-+++ b/tools/testing/selftests/filesystems/binderfs/config
-@@ -1,3 +1,2 @@
--CONFIG_ANDROID=y
- CONFIG_ANDROID_BINDERFS=y
- CONFIG_ANDROID_BINDER_IPC=y
---- a/tools/testing/selftests/sync/config
-+++ b/tools/testing/selftests/sync/config
-@@ -1,3 +1,2 @@
- CONFIG_STAGING=y
--CONFIG_ANDROID=y
- CONFIG_SW_SYNC=y
diff --git a/debian/patches/bugfix/all/tools-bpf_jit_disasm-fix-compilation-error-with-new-binutils.patch b/debian/patches/bugfix/all/tools-bpf_jit_disasm-fix-compilation-error-with-new-binutils.patch
deleted file mode 100644
index 439b31bf0..000000000
--- a/debian/patches/bugfix/all/tools-bpf_jit_disasm-fix-compilation-error-with-new-binutils.patch
+++ /dev/null
@@ -1,94 +0,0 @@
-From: Andres Freund <andres@anarazel.de>
-Subject: [4/5] tools bpf_jit_disasm: Fix compilation error with new binutils
-Date: Sun, 3 Jul 2022 14:25:50 -0700
-Origin: https://lore.kernel.org/lkml/20220703212551.1114923-5-andres@anarazel.de/
-
-binutils changed the signature of init_disassemble_info(), which now causes
-compilation to fail for tools/bpf/bpf_jit_disasm.c, e.g. on debian
-unstable. Relevant binutils commit:
-https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=60a3da00bd5407f07
-
-Wire up the feature test and switch to init_disassemble_info_compat(),
-which were introduced in prior commits, fixing the compilation failure.
-
-I verified that bpf_jit_disasm can still disassemble bpf programs, both
-with the old and new dis-asm.h API. With old binutils there's no change in
-output before/after this patch. When comparing the output from old
-binutils (2.35) to new bintuils with the patch (upstream snapshot) there
-are a few output differences, but they are unrelated to this patch. An
-example hunk is:
- f4: mov %r14,%rsi
- f7: mov %r15,%rdx
- fa: mov $0x2a,%ecx
-- ff: callq 0xffffffffea8c4988
-+ ff: call 0xffffffffea8c4988
- 104: test %rax,%rax
- 107: jge 0x0000000000000110
- 109: xor %eax,%eax
-- 10b: jmpq 0x0000000000000073
-+ 10b: jmp 0x0000000000000073
- 110: cmp $0x16,%rax
-
-However, I had to use an older kernel to generate the bpf_jit_enabled = 2
-output, as that has been broken since 5.18 / 1022a5498f6f:
-https://lore.kernel.org/20220703030210.pmjft7qc2eajzi6c@alap3.anarazel.de
-
-Cc: Alexei Starovoitov <ast@kernel.org>
-Cc: Daniel Borkmann <daniel@iogearbox.net>
-Cc: Sedat Dilek <sedat.dilek@gmail.com>
-Cc: Quentin Monnet <quentin@isovalent.com>
-Link: http://lore.kernel.org/lkml/20220622181918.ykrs5rsnmx3og4sv@alap3.anarazel.de
-Signed-off-by: Andres Freund <andres@anarazel.de>
----
- tools/bpf/Makefile | 7 +++++--
- tools/bpf/bpf_jit_disasm.c | 5 ++++-
- 2 files changed, 9 insertions(+), 3 deletions(-)
-
-diff --git a/tools/bpf/Makefile b/tools/bpf/Makefile
-index b11cfc86a3d0..9c4e61c3a92b 100644
---- a/tools/bpf/Makefile
-+++ b/tools/bpf/Makefile
-@@ -34,8 +34,8 @@ else
- endif
-
- FEATURE_USER = .bpf
--FEATURE_TESTS = libbfd disassembler-four-args
--FEATURE_DISPLAY = libbfd disassembler-four-args
-+FEATURE_TESTS = libbfd disassembler-four-args disassembler-init-styled
-+FEATURE_DISPLAY = libbfd disassembler-four-args disassembler-init-styled
-
- check_feat := 1
- NON_CHECK_FEAT_TARGETS := clean bpftool_clean runqslower_clean resolve_btfids_clean
-@@ -56,6 +56,9 @@ endif
- ifeq ($(feature-disassembler-four-args), 1)
- CFLAGS += -DDISASM_FOUR_ARGS_SIGNATURE
- endif
-+ifeq ($(feature-disassembler-init-styled), 1)
-+CFLAGS += -DDISASM_INIT_STYLED
-+endif
-
- $(OUTPUT)%.yacc.c: $(srctree)/tools/bpf/%.y
- $(QUIET_BISON)$(YACC) -o $@ -d $<
-diff --git a/tools/bpf/bpf_jit_disasm.c b/tools/bpf/bpf_jit_disasm.c
-index c8ae95804728..a90a5d110f92 100644
---- a/tools/bpf/bpf_jit_disasm.c
-+++ b/tools/bpf/bpf_jit_disasm.c
-@@ -28,6 +28,7 @@
- #include <sys/types.h>
- #include <sys/stat.h>
- #include <limits.h>
-+#include <tools/dis-asm-compat.h>
-
- #define CMD_ACTION_SIZE_BUFFER 10
- #define CMD_ACTION_READ_ALL 3
-@@ -64,7 +65,9 @@ static void get_asm_insns(uint8_t *image, size_t len, int opcodes)
- assert(bfdf);
- assert(bfd_check_format(bfdf, bfd_object));
-
-- init_disassemble_info(&info, stdout, (fprintf_ftype) fprintf);
-+ init_disassemble_info_compat(&info, stdout,
-+ (fprintf_ftype) fprintf,
-+ fprintf_styled);
- info.arch = bfd_get_arch(bfdf);
- info.mach = bfd_get_mach(bfdf);
- info.buffer = image;
diff --git a/debian/patches/bugfix/all/tools-bpftool-fix-compilation-error-with-new-binutils.patch b/debian/patches/bugfix/all/tools-bpftool-fix-compilation-error-with-new-binutils.patch
deleted file mode 100644
index 2a9c043c6..000000000
--- a/debian/patches/bugfix/all/tools-bpftool-fix-compilation-error-with-new-binutils.patch
+++ /dev/null
@@ -1,142 +0,0 @@
-From: Andres Freund <andres@anarazel.de>
-Subject: [PATCH v2 5/5] tools bpftool: Fix compilation error with new binutils
-Date: Sun, 3 Jul 2022 14:25:51 -0700
-Origin: https://lore.kernel.org/lkml/20220703212551.1114923-6-andres@anarazel.de/
-
-binutils changed the signature of init_disassemble_info(), which now causes
-compilation to fail for tools/bpf/bpftool/jit_disasm.c, e.g. on debian
-unstable. Relevant binutils commit:
-https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=60a3da00bd5407f07
-
-Wire up the feature test and switch to init_disassemble_info_compat(),
-which were introduced in prior commits, fixing the compilation failure.
-
-I verified that bpftool can still disassemble bpf programs, both with an
-old and new dis-asm.h API. There are no output changes for plain and json
-formats. When comparing the output from old binutils (2.35)
-to new bintuils with the patch (upstream snapshot) there are a few output
-differences, but they are unrelated to this patch. An example hunk is:
- 2f: pop %r14
- 31: pop %r13
- 33: pop %rbx
-- 34: leaveq
-- 35: retq
-+ 34: leave
-+ 35: ret
-
-Cc: Alexei Starovoitov <ast@kernel.org>
-Cc: Sedat Dilek <sedat.dilek@gmail.com>
-Cc: Quentin Monnet <quentin@isovalent.com>
-Link: http://lore.kernel.org/lkml/20220622181918.ykrs5rsnmx3og4sv@alap3.anarazel.de
-Signed-off-by: Andres Freund <andres@anarazel.de>
----
- tools/bpf/bpftool/Makefile | 7 ++++--
- tools/bpf/bpftool/jit_disasm.c | 42 +++++++++++++++++++++++++++-------
- 2 files changed, 39 insertions(+), 10 deletions(-)
-
-diff --git a/tools/bpf/bpftool/Makefile b/tools/bpf/bpftool/Makefile
-index c6d2c77d0252..62195118d377 100644
---- a/tools/bpf/bpftool/Makefile
-+++ b/tools/bpf/bpftool/Makefile
-@@ -93,9 +93,9 @@ INSTALL ?= install
- RM ?= rm -f
-
- FEATURE_USER = .bpftool
--FEATURE_TESTS = libbfd disassembler-four-args zlib libcap \
-+FEATURE_TESTS = libbfd disassembler-four-args disassembler-init-styled zlib libcap \
- clang-bpf-co-re
--FEATURE_DISPLAY = libbfd disassembler-four-args zlib libcap \
-+FEATURE_DISPLAY = libbfd disassembler-four-args disassembler-init-styled zlib libcap \
- clang-bpf-co-re
-
- check_feat := 1
-@@ -117,6 +117,9 @@ endif
- ifeq ($(feature-disassembler-four-args), 1)
- CFLAGS += -DDISASM_FOUR_ARGS_SIGNATURE
- endif
-+ifeq ($(feature-disassembler-init-styled), 1)
-+ CFLAGS += -DDISASM_INIT_STYLED
-+endif
-
- LIBS = $(LIBBPF) -lelf -lz
- LIBS_BOOTSTRAP = $(LIBBPF_BOOTSTRAP) -lelf -lz
-diff --git a/tools/bpf/bpftool/jit_disasm.c b/tools/bpf/bpftool/jit_disasm.c
-index 24734f2249d6..aaf99a0168c9 100644
---- a/tools/bpf/bpftool/jit_disasm.c
-+++ b/tools/bpf/bpftool/jit_disasm.c
-@@ -24,6 +24,7 @@
- #include <sys/stat.h>
- #include <limits.h>
- #include <bpf/libbpf.h>
-+#include <tools/dis-asm-compat.h>
-
- #include "json_writer.h"
- #include "main.h"
-@@ -39,15 +40,12 @@ static void get_exec_path(char *tpath, size_t size)
- }
-
- static int oper_count;
--static int fprintf_json(void *out, const char *fmt, ...)
-+static int printf_json(void *out, const char *fmt, va_list ap)
- {
-- va_list ap;
- char *s;
- int err;
-
-- va_start(ap, fmt);
- err = vasprintf(&s, fmt, ap);
-- va_end(ap);
- if (err < 0)
- return -1;
-
-@@ -73,6 +71,32 @@ static int fprintf_json(void *out, const char *fmt, ...)
- return 0;
- }
-
-+static int fprintf_json(void *out, const char *fmt, ...)
-+{
-+ va_list ap;
-+ int r;
-+
-+ va_start(ap, fmt);
-+ r = printf_json(out, fmt, ap);
-+ va_end(ap);
-+
-+ return r;
-+}
-+
-+static int fprintf_json_styled(void *out,
-+ enum disassembler_style style __maybe_unused,
-+ const char *fmt, ...)
-+{
-+ va_list ap;
-+ int r;
-+
-+ va_start(ap, fmt);
-+ r = printf_json(out, fmt, ap);
-+ va_end(ap);
-+
-+ return r;
-+}
-+
- void disasm_print_insn(unsigned char *image, ssize_t len, int opcodes,
- const char *arch, const char *disassembler_options,
- const struct btf *btf,
-@@ -99,11 +123,13 @@ void disasm_print_insn(unsigned char *image, ssize_t len, int opcodes,
- assert(bfd_check_format(bfdf, bfd_object));
-
- if (json_output)
-- init_disassemble_info(&info, stdout,
-- (fprintf_ftype) fprintf_json);
-+ init_disassemble_info_compat(&info, stdout,
-+ (fprintf_ftype) fprintf_json,
-+ fprintf_json_styled);
- else
-- init_disassemble_info(&info, stdout,
-- (fprintf_ftype) fprintf);
-+ init_disassemble_info_compat(&info, stdout,
-+ (fprintf_ftype) fprintf,
-+ fprintf_styled);
-
- /* Update architecture info for offload. */
- if (arch) {
diff --git a/debian/patches/bugfix/all/tools-build-add-feature-test-for-init_disassemble_info-api-changes.patch b/debian/patches/bugfix/all/tools-build-add-feature-test-for-init_disassemble_info-api-changes.patch
deleted file mode 100644
index 1a0ea2aa4..000000000
--- a/debian/patches/bugfix/all/tools-build-add-feature-test-for-init_disassemble_info-api-changes.patch
+++ /dev/null
@@ -1,96 +0,0 @@
-From: Andres Freund <andres@anarazel.de>
-Subject: [1/5] tools build: add feature test for init_disassemble_info API changes
-Date: Sun, 3 Jul 2022 14:25:47 -0700
-Origin: https://lore.kernel.org/lkml/20220703212551.1114923-2-andres@anarazel.de/
-
-binutils changed the signature of init_disassemble_info(), which now causes
-compilation failures for tools/{perf,bpf}, e.g. on debian unstable.
-Relevant binutils commit:
-https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=60a3da00bd5407f07
-
-This commit adds a feature test to detect the new signature. Subsequent
-commits will use it to fix the build failures.
-
-Cc: Alexei Starovoitov <ast@kernel.org>
-Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
-Cc: Sedat Dilek <sedat.dilek@gmail.com>
-Cc: Quentin Monnet <quentin@isovalent.com>
-Link: http://lore.kernel.org/lkml/20220622181918.ykrs5rsnmx3og4sv@alap3.anarazel.de
-Signed-off-by: Andres Freund <andres@anarazel.de>
----
- tools/build/Makefile.feature | 4 +++-
- tools/build/feature/Makefile | 4 ++++
- tools/build/feature/test-all.c | 4 ++++
- tools/build/feature/test-disassembler-init-styled.c | 13 +++++++++++++
- 4 files changed, 24 insertions(+), 1 deletion(-)
- create mode 100644 tools/build/feature/test-disassembler-init-styled.c
-
---- a/tools/build/Makefile.feature
-+++ b/tools/build/Makefile.feature
-@@ -70,6 +70,7 @@ FEATURE_TESTS_BASIC :=
- libaio \
- libzstd \
- disassembler-four-args \
-+ disassembler-init-styled \
- file-handle
-
- # FEATURE_TESTS_BASIC + FEATURE_TESTS_EXTRA is the complete list
-@@ -131,7 +132,8 @@ FEATURE_DISPLAY ?= \
- bpf \
- libaio \
- libzstd \
-- disassembler-four-args
-+ disassembler-four-args \
-+ disassembler-init-styled
-
- # Set FEATURE_CHECK_(C|LD)FLAGS-all for all FEATURE_TESTS features.
- # If in the future we need per-feature checks/flags for features not
---- a/tools/build/feature/Makefile
-+++ b/tools/build/feature/Makefile
-@@ -18,6 +18,7 @@ FILES=
- test-libbfd.bin \
- test-libbfd-buildid.bin \
- test-disassembler-four-args.bin \
-+ test-disassembler-init-styled.bin \
- test-reallocarray.bin \
- test-libbfd-liberty.bin \
- test-libbfd-liberty-z.bin \
-@@ -243,6 +244,9 @@ $(OUTPUT)test-libbfd-buildid.bin:
- $(OUTPUT)test-disassembler-four-args.bin:
- $(BUILD) -DPACKAGE='"perf"' -lbfd -lopcodes
-
-+$(OUTPUT)test-disassembler-init-styled.bin:
-+ $(BUILD) -DPACKAGE='"perf"' -lbfd -lopcodes
-+
- $(OUTPUT)test-reallocarray.bin:
- $(BUILD)
-
---- a/tools/build/feature/test-all.c
-+++ b/tools/build/feature/test-all.c
-@@ -166,6 +166,10 @@
- # include "test-disassembler-four-args.c"
- #undef main
-
-+#define main main_test_disassembler_init_styled
-+# include "test-disassembler-init-styled.c"
-+#undef main
-+
- #define main main_test_libzstd
- # include "test-libzstd.c"
- #undef main
---- /dev/null
-+++ b/tools/build/feature/test-disassembler-init-styled.c
-@@ -0,0 +1,13 @@
-+// SPDX-License-Identifier: GPL-2.0
-+#include <stdio.h>
-+#include <dis-asm.h>
-+
-+int main(void)
-+{
-+ struct disassemble_info info;
-+
-+ init_disassemble_info(&info, stdout,
-+ NULL, NULL);
-+
-+ return 0;
-+}
diff --git a/debian/patches/bugfix/all/tools-include-add-dis-asm-compat.h-to-handle-version-differences.patch b/debian/patches/bugfix/all/tools-include-add-dis-asm-compat.h-to-handle-version-differences.patch
deleted file mode 100644
index 026e69dc4..000000000
--- a/debian/patches/bugfix/all/tools-include-add-dis-asm-compat.h-to-handle-version-differences.patch
+++ /dev/null
@@ -1,87 +0,0 @@
-From: Andres Freund <andres@anarazel.de>
-Subject: [2/5] tools include: add dis-asm-compat.h to handle version differences
-Date: Sun, 3 Jul 2022 14:25:48 -0700
-Origin: https://lore.kernel.org/lkml/20220703212551.1114923-3-andres@anarazel.de/
-
-binutils changed the signature of init_disassemble_info(), which now causes
-compilation failures for tools/{perf,bpf}, e.g. on debian unstable.
-Relevant binutils commit:
-https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=60a3da00bd5407f07
-
-This commit introduces a wrapper for init_disassemble_info(), to avoid
-spreading #ifdef DISASM_INIT_STYLED to a bunch of places. Subsequent
-commits will use it to fix the build failures.
-
-It likely is worth adding a wrapper for disassember(), to avoid the already
-existing DISASM_FOUR_ARGS_SIGNATURE ifdefery.
-
-Cc: Alexei Starovoitov <ast@kernel.org>
-Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
-Cc: Sedat Dilek <sedat.dilek@gmail.com>
-Cc: Quentin Monnet <quentin@isovalent.com>
-Link: http://lore.kernel.org/lkml/20220622181918.ykrs5rsnmx3og4sv@alap3.anarazel.de
-Signed-off-by: Andres Freund <andres@anarazel.de>
----
- tools/include/tools/dis-asm-compat.h | 53 ++++++++++++++++++++++++++++
- 1 file changed, 53 insertions(+)
- create mode 100644 tools/include/tools/dis-asm-compat.h
-
-diff --git a/tools/include/tools/dis-asm-compat.h b/tools/include/tools/dis-asm-compat.h
-new file mode 100644
-index 000000000000..d1d003ee3e2f
---- /dev/null
-+++ b/tools/include/tools/dis-asm-compat.h
-@@ -0,0 +1,53 @@
-+/* SPDX-License-Identifier: GPL-2.0 */
-+#ifndef _TOOLS_DIS_ASM_COMPAT_H
-+#define _TOOLS_DIS_ASM_COMPAT_H
-+
-+#include <stdio.h>
-+#include <linux/compiler.h>
-+#include <dis-asm.h>
-+
-+/* define types for older binutils version, to centralize ifdef'ery a bit */
-+#ifndef DISASM_INIT_STYLED
-+enum disassembler_style {DISASSEMBLER_STYLE_NOT_EMPTY};
-+typedef int (*fprintf_styled_ftype) (void *, enum disassembler_style, const char*, ...);
-+#endif
-+
-+/*
-+ * Trivial fprintf wrapper to be used as the fprintf_styled_func argument to
-+ * init_disassemble_info_compat() when normal fprintf suffices.
-+ */
-+static inline int fprintf_styled(void *out,
-+ enum disassembler_style style __maybe_unused,
-+ const char *fmt, ...)
-+{
-+ va_list args;
-+ int r;
-+
-+ va_start(args, fmt);
-+ r = vfprintf(out, fmt, args);
-+ va_end(args);
-+
-+ return r;
-+}
-+
-+/*
-+ * Wrapper for init_disassemble_info() that hides version
-+ * differences. Depending on binutils version and architecture either
-+ * fprintf_func or fprintf_styled_func will be called.
-+ */
-+static inline void init_disassemble_info_compat(struct disassemble_info *info,
-+ void *stream,
-+ fprintf_ftype unstyled_func,
-+ fprintf_styled_ftype styled_func __maybe_unused)
-+{
-+#ifdef DISASM_INIT_STYLED
-+ init_disassemble_info(info, stream,
-+ unstyled_func,
-+ styled_func);
-+#else
-+ init_disassemble_info(info, stream,
-+ unstyled_func);
-+#endif
-+}
-+
-+#endif /* _TOOLS_DIS_ASM_COMPAT_H */
diff --git a/debian/patches/bugfix/all/tools-perf-fix-build-without-libbfd.patch b/debian/patches/bugfix/all/tools-perf-fix-build-without-libbfd.patch
deleted file mode 100644
index 726bdfc47..000000000
--- a/debian/patches/bugfix/all/tools-perf-fix-build-without-libbfd.patch
+++ /dev/null
@@ -1,26 +0,0 @@
-From: Ben Hutchings <benh@debian.org>
-Date: Tue, 05 Jul 2022 18:02:28 +0200
-Subject: tools/perf: Fix build without libbfd
-
-Only include <tools/dis-asm-compat.h> if we are using libbfd.
-
-Signed-off-by: Ben Hutchings <benh@debian.org>
----
---- a/tools/perf/util/annotate.c
-+++ b/tools/perf/util/annotate.c
-@@ -41,7 +41,6 @@
- #include <linux/string.h>
- #include <subcmd/parse-options.h>
- #include <subcmd/run-command.h>
--#include <tools/dis-asm-compat.h>
-
- /* FIXME: For the HE_COLORSET */
- #include "ui/browser.h"
-@@ -1721,6 +1720,7 @@ fallback:
- #include <bpf/btf.h>
- #include <bpf/libbpf.h>
- #include <linux/btf.h>
-+#include <tools/dis-asm-compat.h>
-
- static int symbol__disassemble_bpf(struct symbol *sym,
- struct annotate_args *args)
diff --git a/debian/patches/bugfix/all/tools-perf-fix-compilation-error-with-new-binutils.patch b/debian/patches/bugfix/all/tools-perf-fix-compilation-error-with-new-binutils.patch
deleted file mode 100644
index e24915fe0..000000000
--- a/debian/patches/bugfix/all/tools-perf-fix-compilation-error-with-new-binutils.patch
+++ /dev/null
@@ -1,101 +0,0 @@
-From: Andres Freund <andres@anarazel.de>
-Subject: [3/5] tools perf: Fix compilation error with new binutils
-Date: Sun, 3 Jul 2022 14:25:49 -0700
-Origin: https://lore.kernel.org/lkml/20220703212551.1114923-4-andres@anarazel.de/
-
-binutils changed the signature of init_disassemble_info(), which now causes
-compilation failures for tools/perf/util/annotate.c, e.g. on debian
-unstable. Relevant binutils commit:
-https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=60a3da00bd5407f07
-
-Wire up the feature test and switch to init_disassemble_info_compat(),
-which were introduced in prior commits, fixing the compilation failure.
-
-I verified that perf can still disassemble bpf programs by using bpftrace
-under load, recording a perf trace, and then annotating the bpf "function"
-with and without the changes. With old binutils there's no change in output
-before/after this patch. When comparing the output from old binutils (2.35)
-to new bintuils with the patch (upstream snapshot) there are a few output
-differences, but they are unrelated to this patch. An example hunk is:
-
- 1.15 : 55:mov %rbp,%rdx
- 0.00 : 58:add $0xfffffffffffffff8,%rdx
- 0.00 : 5c:xor %ecx,%ecx
-- 1.03 : 5e:callq 0xffffffffe12aca3c
-+ 1.03 : 5e:call 0xffffffffe12aca3c
- 0.00 : 63:xor %eax,%eax
-- 2.18 : 65:leaveq
-- 2.82 : 66:retq
-+ 2.18 : 65:leave
-+ 2.82 : 66:ret
-
-Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
-Cc: Sedat Dilek <sedat.dilek@gmail.com>
-Link: http://lore.kernel.org/lkml/20220622181918.ykrs5rsnmx3og4sv@alap3.anarazel.de
-Signed-off-by: Andres Freund <andres@anarazel.de>
----
- tools/perf/Makefile.config | 8 ++++++++
- tools/perf/util/annotate.c | 7 ++++---
- 2 files changed, 12 insertions(+), 3 deletions(-)
-
---- a/tools/perf/Makefile.config
-+++ b/tools/perf/Makefile.config
-@@ -298,6 +298,7 @@ FEATURE_CHECK_LDFLAGS-libpython := $(PYT
- FEATURE_CHECK_LDFLAGS-libaio = -lrt
-
- FEATURE_CHECK_LDFLAGS-disassembler-four-args = -lbfd -lopcodes -ldl
-+FEATURE_CHECK_LDFLAGS-disassembler-init-styled = -lbfd -lopcodes -ldl
-
- CORE_CFLAGS += -fno-omit-frame-pointer
- CORE_CFLAGS += -ggdb3
-@@ -877,13 +878,16 @@ ifndef NO_LIBBFD
- ifeq ($(feature-libbfd-liberty), 1)
- EXTLIBS += -lbfd -lopcodes -liberty
- FEATURE_CHECK_LDFLAGS-disassembler-four-args += -liberty -ldl
-+ FEATURE_CHECK_LDFLAGS-disassembler-init-styled += -liberty -ldl
- else
- ifeq ($(feature-libbfd-liberty-z), 1)
- EXTLIBS += -lbfd -lopcodes -liberty -lz
- FEATURE_CHECK_LDFLAGS-disassembler-four-args += -liberty -lz -ldl
-+ FEATURE_CHECK_LDFLAGS-disassembler-init-styled += -liberty -lz -ldl
- endif
- endif
- $(call feature_check,disassembler-four-args)
-+ $(call feature_check,disassembler-init-styled)
- endif
-
- ifeq ($(feature-libbfd-buildid), 1)
-@@ -997,6 +1001,10 @@ ifeq ($(feature-disassembler-four-args),
- CFLAGS += -DDISASM_FOUR_ARGS_SIGNATURE
- endif
-
-+ifeq ($(feature-disassembler-init-styled), 1)
-+ CFLAGS += -DDISASM_INIT_STYLED
-+endif
-+
- ifeq (${IS_64_BIT}, 1)
- ifndef NO_PERF_READ_VDSO32
- $(call feature_check,compile-32)
---- a/tools/perf/util/annotate.c
-+++ b/tools/perf/util/annotate.c
-@@ -41,6 +41,7 @@
- #include <linux/string.h>
- #include <subcmd/parse-options.h>
- #include <subcmd/run-command.h>
-+#include <tools/dis-asm-compat.h>
-
- /* FIXME: For the HE_COLORSET */
- #include "ui/browser.h"
-@@ -1762,9 +1763,9 @@ static int symbol__disassemble_bpf(struc
- ret = errno;
- goto out;
- }
-- init_disassemble_info(&info, s,
-- (fprintf_ftype) fprintf);
--
-+ init_disassemble_info_compat(&info, s,
-+ (fprintf_ftype) fprintf,
-+ fprintf_styled);
- info.arch = bfd_get_arch(bfdf);
- info.mach = bfd_get_mach(bfdf);
-
diff --git a/debian/patches/bugfix/all/tools-perf-fix-missing-ldflags-for-some-programs.patch b/debian/patches/bugfix/all/tools-perf-fix-missing-ldflags-for-some-programs.patch
index a30982036..2d8f29d25 100644
--- a/debian/patches/bugfix/all/tools-perf-fix-missing-ldflags-for-some-programs.patch
+++ b/debian/patches/bugfix/all/tools-perf-fix-missing-ldflags-for-some-programs.patch
@@ -6,16 +6,7 @@ Signed-off-by: Ben Hutchings <benh@debian.org>
---
--- a/tools/perf/Makefile.perf
+++ b/tools/perf/Makefile.perf
-@@ -668,7 +668,7 @@ $(JEVENTS_IN): FORCE
- $(Q)$(MAKE) -f $(srctree)/tools/build/Makefile.build dir=pmu-events obj=jevents
-
- $(JEVENTS): $(JEVENTS_IN)
-- $(QUIET_LINK)$(HOSTCC) $(JEVENTS_IN) -o $@
-+ $(QUIET_LINK)$(HOSTCC) $(LDFLAGS) $(JEVENTS_IN) -o $@
-
- $(PMU_EVENTS_IN): $(JEVENTS) FORCE
- $(Q)$(MAKE) -f $(srctree)/tools/build/Makefile.build dir=pmu-events obj=pmu-events
-@@ -797,7 +797,7 @@ $(OUTPUT)dlfilters/%.o: dlfilters/%.c in
+@@ -785,7 +785,7 @@ $(OUTPUT)dlfilters/%.o: dlfilters/%.c in
.SECONDARY: $(DLFILTERS:.so=.o)
$(OUTPUT)dlfilters/%.so: $(OUTPUT)dlfilters/%.o
diff --git a/debian/patches/bugfix/all/tools-perf-pmu-events-fix-reproducibility.patch b/debian/patches/bugfix/all/tools-perf-pmu-events-fix-reproducibility.patch
index bd1bcd490..cd4f5c5a3 100644
--- a/debian/patches/bugfix/all/tools-perf-pmu-events-fix-reproducibility.patch
+++ b/debian/patches/bugfix/all/tools-perf-pmu-events-fix-reproducibility.patch
@@ -3,179 +3,24 @@ Date: Sun, 25 Aug 2019 13:49:41 +0100
Subject: tools/perf: pmu-events: Fix reproducibility
Forwarded: https://lore.kernel.org/lkml/20190825131329.naqzd5kwg7mw5d3f@decadent.org.uk/T/#u
-jevents.c uses nftw() to enumerate files and outputs the corresponding
-C structs in the order they are found. This makes it sensitive to
-directory ordering, so that the perf executable is not reproducible.
+jevents.py enumerates files and outputs the corresponding C structs in
+the order they are found. This makes it sensitive to directory
+ordering, so that the perf executable is not reproducible.
-To avoid this, store all the files and directories found and then sort
-them by their (relative) path. (This maintains the parent-first
-ordering that nftw() promises.) Then apply the existing callbacks to
-them in the sorted order.
-
-Don't both storing the stat buffers as we don't need them.
+To avoid this, sort the entries returned by os.scandir() before
+processing them.
References: https://tests.reproducible-builds.org/debian/dbdtxt/bullseye/i386/linux_4.19.37-6.diffoscope.txt.gz
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
---
---- a/tools/perf/pmu-events/jevents.c
-+++ b/tools/perf/pmu-events/jevents.c
-@@ -51,6 +51,18 @@
- #include "json.h"
- #include "pmu-events.h"
-
-+struct ordered_ftw_entry {
-+ const char *fpath;
-+ int typeflag;
-+ struct FTW ftwbuf;
-+};
-+
-+struct ordered_ftw_state {
-+ struct ordered_ftw_entry *entries;
-+ size_t n;
-+ size_t max;
-+};
-+
- int verbose;
- char *prog;
-
-@@ -981,6 +993,79 @@ static int get_maxfds(void)
- */
- static FILE *eventsfp;
- static char *mapfile;
-+static struct ordered_ftw_state *ordered_ftw_state;
-+
-+static int ordered_ftw_add(const char *fpath,
-+ const struct stat *sb __maybe_unused,
-+ int typeflag, struct FTW *ftwbuf)
-+{
-+ struct ordered_ftw_state *state = ordered_ftw_state;
-+ struct ordered_ftw_entry *entry;
-+
-+ if (ftwbuf->level == 0 || ftwbuf->level > 3)
-+ return 0;
-+
-+ /* Grow array if necessary */
-+ if (state->n >= state->max) {
-+ if (state->max == 0)
-+ state->max = 16;
-+ else
-+ state->max *= 2;
-+ state->entries = realloc(state->entries,
-+ state->max * sizeof(*state->entries));
-+ }
-+
-+ entry = &state->entries[state->n++];
-+ entry->fpath = strdup(fpath);
-+ entry->typeflag = typeflag;
-+ entry->ftwbuf = *ftwbuf;
-+
-+ return 0;
-+}
-+
-+static int ordered_ftw_compare(const void *left, const void *right)
-+{
-+ const struct ordered_ftw_entry *left_entry = left;
-+ const struct ordered_ftw_entry *right_entry = right;
-+
-+ return strcmp(left_entry->fpath, right_entry->fpath);
-+}
-+
-+/*
-+ * Wrapper for nftw() that iterates files in ASCII-order to ensure
-+ * reproducible output
-+ */
-+static int ordered_ftw(const char *dirpath,
-+ int (*fn)(const char *, int, struct FTW *),
-+ int nopenfd, int flags)
-+{
-+ struct ordered_ftw_state state = { NULL, 0, 0 };
-+ size_t i;
-+ int rc;
-+
-+ ordered_ftw_state = &state;
-+ rc = nftw(dirpath, ordered_ftw_add, nopenfd, flags);
-+ if (rc)
-+ goto out;
-+
-+ qsort(state.entries, state.n, sizeof(*state.entries),
-+ ordered_ftw_compare);
-+
-+ for (i = 0; i < state.n; i++) {
-+ rc = fn(state.entries[i].fpath,
-+ state.entries[i].typeflag,
-+ &state.entries[i].ftwbuf);
-+ if (rc)
-+ goto out;
-+ }
-+
-+out:
-+ for (i = 0; i < state.n; i++)
-+ free((char *)state.entries[i].fpath);
-+ free(state.entries);;
-+
-+ return rc;
-+}
-
- static int is_leaf_dir(const char *fpath)
- {
-@@ -1033,19 +1118,19 @@ static int is_json_file(const char *name
- return 0;
- }
-
--static int preprocess_arch_std_files(const char *fpath, const struct stat *sb,
-+static int preprocess_arch_std_files(const char *fpath,
- int typeflag, struct FTW *ftwbuf)
- {
- int level = ftwbuf->level;
- int is_file = typeflag == FTW_F;
-
- if (level == 1 && is_file && is_json_file(fpath))
-- return json_events(fpath, save_arch_std_events, (void *)sb);
-+ return json_events(fpath, save_arch_std_events, NULL);
-
- return 0;
- }
-
--static int process_one_file(const char *fpath, const struct stat *sb,
-+static int process_one_file(const char *fpath,
- int typeflag, struct FTW *ftwbuf)
- {
- char *tblname, *bname;
-@@ -1075,9 +1160,9 @@ static int process_one_file(const char *
- } else
- bname = (char *) fpath + ftwbuf->base;
-
-- pr_debug("%s %d %7jd %-20s %s\n",
-+ pr_debug("%s %d %-20s %s\n",
- is_file ? "f" : is_dir ? "d" : "x",
-- level, sb->st_size, bname, fpath);
-+ level, bname, fpath);
-
- /* base dir or too deep */
- if (level == 0 || level > 4)
-@@ -1251,21 +1336,21 @@ int main(int argc, char *argv[])
- */
-
- maxfds = get_maxfds();
-- rc = nftw(ldirname, preprocess_arch_std_files, maxfds, 0);
-+ rc = ordered_ftw(ldirname, preprocess_arch_std_files, maxfds, 0);
- if (rc)
- goto err_processing_std_arch_event_dir;
-
-- rc = nftw(ldirname, process_one_file, maxfds, 0);
-+ rc = ordered_ftw(ldirname, process_one_file, maxfds, 0);
- if (rc)
- goto err_processing_dir;
-
- sprintf(ldirname, "%s/test", start_dirname);
-
-- rc = nftw(ldirname, preprocess_arch_std_files, maxfds, 0);
-+ rc = ordered_ftw(ldirname, preprocess_arch_std_files, maxfds, 0);
- if (rc)
- goto err_processing_std_arch_event_dir;
-
-- rc = nftw(ldirname, process_one_file, maxfds, 0);
-+ rc = ordered_ftw(ldirname, process_one_file, maxfds, 0);
- if (rc)
- goto err_processing_dir;
-
+--- a/tools/perf/pmu-events/jevents.py
++++ b/tools/perf/pmu-events/jevents.py
+@@ -663,7 +663,7 @@ def main() -> None:
+ def ftw(path: str, parents: Sequence[str],
+ action: Callable[[Sequence[str], os.DirEntry], None]) -> None:
+ """Replicate the directory/file walking behavior of C's file tree walk."""
+- for item in os.scandir(path):
++ for item in sorted(os.scandir(path), key=(lambda item: item.name)):
+ action(parents, item)
+ if item.is_dir():
+ ftw(item.path, parents + [item.name], action)
diff --git a/debian/patches/bugfix/all/tools-rtla-build-with-extra-c-ld-flags.patch b/debian/patches/bugfix/all/tools-rtla-build-with-extra-c-ld-flags.patch
deleted file mode 100644
index f64205079..000000000
--- a/debian/patches/bugfix/all/tools-rtla-build-with-extra-c-ld-flags.patch
+++ /dev/null
@@ -1,24 +0,0 @@
-From: Ben Hutchings <benh@debian.org>
-Date: Sat, 16 Jul 2022 15:00:01 +0200
-Subject: tools/rtla: Build with EXTRA_{C,LD}FLAGS
-Forwarded: https://lore.kernel.org/linux-trace-devel/YtLBshz0nMQ7530H@decadent.org.uk/T/
-
-To allow for distributions and other builders to apply hardening
-policy and other customisation, append EXTRA_CFLAGS and EXTRA_LDFLAGS
-to the corresponding variables.
-
-Signed-off-by: Ben Hutchings <benh@debian.org>
----
---- a/tools/tracing/rtla/Makefile
-+++ b/tools/tracing/rtla/Makefile
-@@ -30,8 +30,8 @@ WOPTS := -Wall -Werror=format-security
-
- TRACEFS_HEADERS := $$($(PKG_CONFIG) --cflags libtracefs)
-
--CFLAGS := -O -g -DVERSION=\"$(VERSION)\" $(FOPTS) $(MOPTS) $(WOPTS) $(TRACEFS_HEADERS)
--LDFLAGS := -ggdb
-+CFLAGS := -O -g -DVERSION=\"$(VERSION)\" $(FOPTS) $(MOPTS) $(WOPTS) $(TRACEFS_HEADERS) $(EXTRA_CFLAGS)
-+LDFLAGS := -ggdb $(EXTRA_LDFLAGS)
- LIBS := $$($(PKG_CONFIG) --libs libtracefs)
-
- SRC := $(wildcard src/*.c)
diff --git a/debian/patches/debian/android-enable-building-ashmem-and-binder-as-modules.patch b/debian/patches/debian/android-enable-building-ashmem-and-binder-as-modules.patch
index 891a3443e..8a565c6c0 100644
--- a/debian/patches/debian/android-enable-building-ashmem-and-binder-as-modules.patch
+++ b/debian/patches/debian/android-enable-building-ashmem-and-binder-as-modules.patch
@@ -27,8 +27,8 @@ Consequently, the ashmem part of this patch has been removed.
--- a/drivers/android/Kconfig
+++ b/drivers/android/Kconfig
-@@ -9,7 +9,7 @@
- if ANDROID
+@@ -2,7 +2,7 @@
+ menu "Android"
config ANDROID_BINDER_IPC
- bool "Android Binder IPC Driver"
@@ -51,7 +51,7 @@ Consequently, the ashmem part of this patch has been removed.
+binder_linux-$(CONFIG_ANDROID_BINDER_IPC_SELFTEST) += binder_alloc_selftest.o
--- a/drivers/android/binder_alloc.c
+++ b/drivers/android/binder_alloc.c
-@@ -38,7 +38,7 @@
+@@ -38,7 +38,7 @@ enum {
};
static uint32_t binder_alloc_debug_mask = BINDER_DEBUG_USER_ERROR;
diff --git a/debian/patches/debian/export-symbols-needed-by-android-drivers.patch b/debian/patches/debian/export-symbols-needed-by-android-drivers.patch
index b71f267b3..860812230 100644
--- a/debian/patches/debian/export-symbols-needed-by-android-drivers.patch
+++ b/debian/patches/debian/export-symbols-needed-by-android-drivers.patch
@@ -20,9 +20,19 @@ Export the currently un-exported symbols they depend on.
security/security.c | 4 ++++
7 files changed, 10 insertions(+)
+--- a/fs/file.c
++++ b/fs/file.c
+@@ -813,6 +813,7 @@ struct file *close_fd_get_file(unsigned
+
+ return file;
+ }
++EXPORT_SYMBOL_GPL(close_fd_get_file);
+
+ void do_close_on_exec(struct files_struct *files)
+ {
--- a/kernel/sched/core.c
+++ b/kernel/sched/core.c
-@@ -7026,6 +7026,7 @@ static bool is_nice_reduction(const stru
+@@ -7052,6 +7052,7 @@ static bool is_nice_reduction(const stru
return (nice_rlim <= task_rlimit(p, RLIMIT_NICE));
}
@@ -52,7 +62,7 @@ Export the currently un-exported symbols they depend on.
* task_work_cancel_match - cancel a pending work added by task_work_add()
--- a/mm/memory.c
+++ b/mm/memory.c
-@@ -1749,6 +1749,7 @@ void zap_page_range(struct vm_area_struc
+@@ -1757,6 +1757,7 @@ void zap_page_range(struct vm_area_struc
mmu_notifier_invalidate_range_end(&range);
tlb_finish_mmu(&tlb);
}
@@ -62,7 +72,7 @@ Export the currently un-exported symbols they depend on.
* zap_page_range_single - remove user pages in a given range
--- a/mm/shmem.c
+++ b/mm/shmem.c
-@@ -4173,6 +4173,7 @@ int shmem_zero_setup(struct vm_area_stru
+@@ -4245,6 +4245,7 @@ int shmem_zero_setup(struct vm_area_stru
return 0;
}
@@ -101,13 +111,3 @@ Export the currently un-exported symbols they depend on.
int security_ptrace_access_check(struct task_struct *child, unsigned int mode)
{
---- a/fs/file.c
-+++ b/fs/file.c
-@@ -813,6 +813,7 @@ struct file *close_fd_get_file(unsigned
-
- return file;
- }
-+EXPORT_SYMBOL_GPL(close_fd_get_file);
-
- void do_close_on_exec(struct files_struct *files)
- {
diff --git a/debian/patches/debian/fanotify-taint-on-use-of-fanotify_access_permissions.patch b/debian/patches/debian/fanotify-taint-on-use-of-fanotify_access_permissions.patch
index 82cdda18e..88a2b15b3 100644
--- a/debian/patches/debian/fanotify-taint-on-use-of-fanotify_access_permissions.patch
+++ b/debian/patches/debian/fanotify-taint-on-use-of-fanotify_access_permissions.patch
@@ -12,9 +12,9 @@ actually used.
---
--- a/fs/notify/fanotify/fanotify_user.c
+++ b/fs/notify/fanotify/fanotify_user.c
-@@ -1170,6 +1170,14 @@ static int do_fanotify_mark(int fanotify
- if (ignored)
- mask &= ~FANOTIFY_EVENT_FLAGS;
+@@ -1661,6 +1661,14 @@ static int do_fanotify_mark(int fanotify
+ umask = FANOTIFY_EVENT_FLAGS;
+ }
+#ifdef CONFIG_FANOTIFY_ACCESS_PERMISSIONS
+ if (mask & FANOTIFY_PERM_EVENTS) {
diff --git a/debian/patches/debian/tools-perf-install.patch b/debian/patches/debian/tools-perf-install.patch
deleted file mode 100644
index 1137b0d47..000000000
--- a/debian/patches/debian/tools-perf-install.patch
+++ /dev/null
@@ -1,52 +0,0 @@
-From: Bastian Blank <waldi@debian.org>
-Date: Fri, 07 Oct 2011 21:37:52 +0100
-Subject: Install perf scripts non-executable
-Forwarded: no
-
-[bwh: Forward-ported to 4.13]
----
- tools/perf/Makefile.perf | 20 ++++++++++----------
- 1 file changed, 10 insertions(+), 10 deletions(-)
-
---- a/tools/perf/Makefile.perf
-+++ b/tools/perf/Makefile.perf
-@@ -986,8 +986,8 @@ endif
- ifndef NO_LIBPERL
- $(call QUIET_INSTALL, perl-scripts) \
- $(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/scripts/perl/Perf-Trace-Util/lib/Perf/Trace'; \
-- $(INSTALL) scripts/perl/Perf-Trace-Util/lib/Perf/Trace/* -t '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/scripts/perl/Perf-Trace-Util/lib/Perf/Trace'; \
-- $(INSTALL) scripts/perl/*.pl -t '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/scripts/perl'; \
-+ $(INSTALL) -m 644 scripts/perl/Perf-Trace-Util/lib/Perf/Trace/* -t '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/scripts/perl/Perf-Trace-Util/lib/Perf/Trace'; \
-+ $(INSTALL) -m 644 scripts/perl/*.pl -t '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/scripts/perl'; \
- $(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/scripts/perl/bin'; \
- $(INSTALL) scripts/perl/bin/* -t '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/scripts/perl/bin'
- endif
-@@ -1004,22 +1004,22 @@ endif
- $(INSTALL) $(DLFILTERS) '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/dlfilters';
- $(call QUIET_INSTALL, perf_completion-script) \
- $(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(sysconfdir_SQ)/bash_completion.d'; \
-- $(INSTALL) perf-completion.sh '$(DESTDIR_SQ)$(sysconfdir_SQ)/bash_completion.d/perf'
-+ $(INSTALL) -m 644 perf-completion.sh '$(DESTDIR_SQ)$(sysconfdir_SQ)/bash_completion.d/perf'
- $(call QUIET_INSTALL, perf-tip) \
- $(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(tip_instdir_SQ)'; \
-- $(INSTALL) Documentation/tips.txt -t '$(DESTDIR_SQ)$(tip_instdir_SQ)'
-+ $(INSTALL) -m 644 Documentation/tips.txt -t '$(DESTDIR_SQ)$(tip_instdir_SQ)'
-
- install-tests: all install-gtk
- $(call QUIET_INSTALL, tests) \
- $(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/tests'; \
-- $(INSTALL) tests/attr.py '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/tests'; \
-+ $(INSTALL) -m 644 tests/attr.py '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/tests'; \
- $(INSTALL) tests/pe-file.exe* '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/tests'; \
- $(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/tests/attr'; \
-- $(INSTALL) tests/attr/* '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/tests/attr'; \
-+ $(INSTALL) -m 644 tests/attr/* '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/tests/attr'; \
- $(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/tests/shell'; \
-- $(INSTALL) tests/shell/*.sh '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/tests/shell'; \
-+ $(INSTALL) -m 644 tests/shell/*.sh '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/tests/shell'; \
- $(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/tests/shell/lib'; \
-- $(INSTALL) tests/shell/lib/*.sh '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/tests/shell/lib'
-+ $(INSTALL) -m 644 tests/shell/lib/*.sh '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/tests/shell/lib'
-
- install-bin: install-tools install-tests install-traceevent-plugins
-
diff --git a/debian/patches/debian/version.patch b/debian/patches/debian/version.patch
index 3e845533f..195cac302 100644
--- a/debian/patches/debian/version.patch
+++ b/debian/patches/debian/version.patch
@@ -17,7 +17,7 @@ are set.
--- a/Makefile
+++ b/Makefile
-@@ -1193,7 +1193,7 @@ PHONY += prepare archprepare
+@@ -1198,7 +1198,7 @@ PHONY += prepare archprepare
archprepare: outputmakefile archheaders archscripts scripts include/config/kernel.release \
asm-generic $(version_h) $(autoksyms_h) include/generated/utsrelease.h \
@@ -26,7 +26,7 @@ are set.
prepare0: archprepare
$(Q)$(MAKE) $(build)=scripts/mod
-@@ -1247,6 +1247,16 @@ define filechk_version.h
+@@ -1252,6 +1252,16 @@ define filechk_version.h
echo \#define LINUX_VERSION_SUBLEVEL $(SUBLEVEL)
endef
@@ -43,7 +43,7 @@ are set.
$(version_h): PATCHLEVEL := $(or $(PATCHLEVEL), 0)
$(version_h): SUBLEVEL := $(or $(SUBLEVEL), 0)
$(version_h): FORCE
-@@ -1255,6 +1265,9 @@ $(version_h): FORCE
+@@ -1260,6 +1270,9 @@ $(version_h): FORCE
include/generated/utsrelease.h: include/config/kernel.release FORCE
$(call filechk,utsrelease.h)
@@ -116,8 +116,8 @@ are set.
+ printk(KERN_INFO "Pid: %d, comm: %.20s %s %s%s\n", task_pid_nr(current),
+ current->comm, print_tainted(), init_utsname()->release,
+ LINUX_PACKAGE_ID);
- printk(KERN_INFO "RIP: %04lx:[<%016lx>]\n", PT_REGS_CS(regs) & 0xffff,
- PT_REGS_IP(regs));
+ printk(KERN_INFO "RIP: %04lx:%pS\n", PT_REGS_CS(regs) & 0xffff,
+ (void *)PT_REGS_IP(regs));
printk(KERN_INFO "RSP: %016lx EFLAGS: %08lx\n", PT_REGS_SP(regs),
--- a/kernel/hung_task.c
+++ b/kernel/hung_task.c
@@ -129,7 +129,7 @@ are set.
/*
* The number of tasks checked:
-@@ -133,10 +134,11 @@ static void check_hung_task(struct task_
+@@ -131,10 +132,11 @@ static void check_hung_task(struct task_
sysctl_hung_task_warnings--;
pr_err("INFO: task %s:%d blocked for more than %ld seconds.\n",
t->comm, t->pid, (jiffies - t->last_switch_time) / HZ);
diff --git a/debian/patches/features/all/lockdown/efi-add-an-efi_secure_boot-flag-to-indicate-secure-b.patch b/debian/patches/features/all/lockdown/efi-add-an-efi_secure_boot-flag-to-indicate-secure-b.patch
index 99d81b553..b46698757 100644
--- a/debian/patches/features/all/lockdown/efi-add-an-efi_secure_boot-flag-to-indicate-secure-b.patch
+++ b/debian/patches/features/all/lockdown/efi-add-an-efi_secure_boot-flag-to-indicate-secure-b.patch
@@ -31,7 +31,7 @@ cc: linux-efi@vger.kernel.org
--- a/arch/x86/kernel/setup.c
+++ b/arch/x86/kernel/setup.c
-@@ -1126,19 +1126,7 @@
+@@ -1205,19 +1205,7 @@ void __init setup_arch(char **cmdline_p)
/* Allocate bigger log buffer */
setup_log_buf(1);
@@ -54,7 +54,7 @@ cc: linux-efi@vger.kernel.org
--- a/drivers/firmware/efi/Makefile
+++ b/drivers/firmware/efi/Makefile
-@@ -28,6 +28,7 @@
+@@ -27,6 +27,7 @@ obj-$(CONFIG_EFI_FAKE_MEMMAP) += fake_m
obj-$(CONFIG_EFI_BOOTLOADER_CONTROL) += efibc.o
obj-$(CONFIG_EFI_TEST) += test/
obj-$(CONFIG_EFI_DEV_PATH_PARSER) += dev-path-parser.o
@@ -106,7 +106,7 @@ cc: linux-efi@vger.kernel.org
+}
--- a/include/linux/efi.h
+++ b/include/linux/efi.h
-@@ -782,6 +782,14 @@
+@@ -849,6 +849,14 @@ extern int __init efi_setup_pcdp_console
#define EFI_MEM_ATTR 10 /* Did firmware publish an EFI_MEMORY_ATTRIBUTES table? */
#define EFI_MEM_NO_SOFT_RESERVE 11 /* Is the kernel configured to ignore soft reservations? */
#define EFI_PRESERVE_BS_REGIONS 12 /* Are EFI boot-services memory segments available? */
@@ -121,23 +121,23 @@ cc: linux-efi@vger.kernel.org
#ifdef CONFIG_EFI
/*
-@@ -805,6 +813,7 @@
- {
+@@ -873,6 +881,7 @@ static inline bool efi_rt_services_suppo
return (efi.runtime_supported_mask & mask) == mask;
}
+ extern void efi_find_mirror(void);
+extern void __init efi_set_secure_boot(enum efi_secureboot_mode mode);
#else
static inline bool efi_enabled(int feature)
{
-@@ -822,6 +831,7 @@
- {
- return false;
+@@ -892,6 +901,7 @@ static inline bool efi_rt_services_suppo
}
+
+ static inline void efi_find_mirror(void) {}
+static inline void efi_set_secure_boot(enum efi_secureboot_mode mode) {}
#endif
extern int efi_status_to_err(efi_status_t status);
-@@ -1077,13 +1087,6 @@
+@@ -1107,13 +1117,6 @@ static inline bool efi_runtime_disabled(
extern void efi_call_virt_check_flags(unsigned long flags, const char *call);
extern unsigned long efi_call_virt_save_flags(void);
diff --git a/debian/patches/features/x86/intel-iommu-add-kconfig-option-to-exclude-igpu-by-default.patch b/debian/patches/features/x86/intel-iommu-add-kconfig-option-to-exclude-igpu-by-default.patch
index ece2c44d1..00d48571e 100644
--- a/debian/patches/features/x86/intel-iommu-add-kconfig-option-to-exclude-igpu-by-default.patch
+++ b/debian/patches/features/x86/intel-iommu-add-kconfig-option-to-exclude-igpu-by-default.patch
@@ -49,9 +49,9 @@ Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
depends on BROKEN && X86
--- a/drivers/iommu/intel/iommu.c
+++ b/drivers/iommu/intel/iommu.c
-@@ -303,14 +303,14 @@ static void domain_remove_dev_info(struc
+@@ -289,14 +289,14 @@ static LIST_HEAD(dmar_satc_units);
+
static void dmar_remove_one_dev_info(struct device *dev);
- static void __dmar_remove_one_dev_info(struct device_domain_info *info);
-int dmar_disabled = !IS_ENABLED(CONFIG_INTEL_IOMMU_DEFAULT_ON);
+int dmar_disabled = IS_ENABLED(CONFIG_INTEL_IOMMU_DEFAULT_OFF);
@@ -66,7 +66,7 @@ Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
static int intel_iommu_superpage = 1;
static int iommu_identity_mapping;
static int iommu_skip_te_disable;
-@@ -378,6 +378,7 @@ static int __init intel_iommu_setup(char
+@@ -334,6 +334,7 @@ static int __init intel_iommu_setup(char
while (*str) {
if (!strncmp(str, "on", 2)) {
dmar_disabled = 0;
diff --git a/debian/patches/features/x86/intel-iommu-add-option-to-exclude-integrated-gpu-only.patch b/debian/patches/features/x86/intel-iommu-add-option-to-exclude-integrated-gpu-only.patch
index e4b99d140..a3543d90e 100644
--- a/debian/patches/features/x86/intel-iommu-add-option-to-exclude-integrated-gpu-only.patch
+++ b/debian/patches/features/x86/intel-iommu-add-option-to-exclude-integrated-gpu-only.patch
@@ -20,11 +20,9 @@ Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
drivers/iommu/intel/iommu.c | 14 ++++++++++++++
2 files changed, 16 insertions(+)
-Index: linux/Documentation/admin-guide/kernel-parameters.txt
-===================================================================
---- linux.orig/Documentation/admin-guide/kernel-parameters.txt
-+++ linux/Documentation/admin-guide/kernel-parameters.txt
-@@ -1959,6 +1959,8 @@
+--- a/Documentation/admin-guide/kernel-parameters.txt
++++ b/Documentation/admin-guide/kernel-parameters.txt
+@@ -2053,6 +2053,8 @@
bypassed by not enabling DMAR with this option. In
this case, gfx device will use physical address for
DMA.
@@ -33,11 +31,9 @@ Index: linux/Documentation/admin-guide/kernel-parameters.txt
strict [Default Off]
Deprecated, equivalent to iommu.strict=1.
sp_off [Default Off]
-Index: linux/drivers/iommu/intel/iommu.c
-===================================================================
---- linux.orig/drivers/iommu/intel/iommu.c
-+++ linux/drivers/iommu/intel/iommu.c
-@@ -55,6 +55,9 @@
+--- a/drivers/iommu/intel/iommu.c
++++ b/drivers/iommu/intel/iommu.c
+@@ -35,6 +35,9 @@
#define CONTEXT_SIZE VTD_PAGE_SIZE
#define IS_GFX_DEVICE(pdev) ((pdev->class >> 16) == PCI_BASE_CLASS_DISPLAY)
@@ -47,7 +43,7 @@ Index: linux/drivers/iommu/intel/iommu.c
#define IS_USB_DEVICE(pdev) ((pdev->class >> 8) == PCI_CLASS_SERIAL_USB)
#define IS_ISA_DEVICE(pdev) ((pdev->class >> 8) == PCI_CLASS_BRIDGE_ISA)
#define IS_AZALIA(pdev) ((pdev)->vendor == 0x8086 && (pdev)->device == 0x3a3e)
-@@ -335,12 +338,14 @@ int intel_iommu_enabled = 0;
+@@ -293,12 +296,14 @@ int intel_iommu_enabled = 0;
EXPORT_SYMBOL_GPL(intel_iommu_enabled);
static int dmar_map_gfx = 1;
@@ -60,9 +56,9 @@ Index: linux/drivers/iommu/intel/iommu.c
#define IDENTMAP_AZALIA 4
+#define IDENTMAP_INTGPU 8
- int intel_iommu_gfx_mapped;
- EXPORT_SYMBOL_GPL(intel_iommu_gfx_mapped);
-@@ -423,6 +428,9 @@ static int __init intel_iommu_setup(char
+ const struct iommu_ops intel_iommu_ops;
+
+@@ -337,6 +342,9 @@ static int __init intel_iommu_setup(char
} else if (!strncmp(str, "igfx_off", 8)) {
dmar_map_gfx = 0;
pr_info("Disable GFX device mapping\n");
@@ -72,7 +68,7 @@ Index: linux/drivers/iommu/intel/iommu.c
} else if (!strncmp(str, "forcedac", 8)) {
pr_warn("intel_iommu=forcedac deprecated; use iommu.forcedac instead\n");
iommu_dma_forcedac = true;
-@@ -2877,6 +2885,9 @@ static int device_def_domain_type(struct
+@@ -2582,6 +2590,9 @@ static int device_def_domain_type(struct
if ((iommu_identity_mapping & IDENTMAP_GFX) && IS_GFX_DEVICE(pdev))
return IOMMU_DOMAIN_IDENTITY;
@@ -82,7 +78,7 @@ Index: linux/drivers/iommu/intel/iommu.c
}
return 0;
-@@ -3313,6 +3324,9 @@ static int __init init_dmars(void)
+@@ -2985,6 +2996,9 @@ static int __init init_dmars(void)
if (!dmar_map_gfx)
iommu_identity_mapping |= IDENTMAP_GFX;
diff --git a/debian/patches/series b/debian/patches/series
index c12650495..0429a634a 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -18,7 +18,6 @@ debian/mips-boston-disable-its.patch
debian/mips-ieee754-relaxed.patch
debian/arch-sh4-fix-uimage-build.patch
debian/tools-perf-perf-read-vdso-in-libexec.patch
-debian/tools-perf-install.patch
debian/tools-perf-install-python-bindings.patch
debian/wireless-add-debian-wireless-regdb-certificates.patch
debian/export-symbols-needed-by-android-drivers.patch
@@ -81,8 +80,6 @@ features/arm64/arm64-compat-Implement-misalignment-fixups-for-multi.patch
# Miscellaneous bug fixes
bugfix/all/disable-some-marvell-phys.patch
bugfix/all/fs-add-module_softdep-declarations-for-hard-coded-cr.patch
-bugfix/all/pm-sleep-add-pm_userspace_autosleep-kconfig.patch
-bugfix/all/remove-config_android.patch
# Miscellaneous features
@@ -118,12 +115,5 @@ bugfix/all/cpupower-fix-checks-for-cpu-existence.patch
bugfix/all/tools-perf-pmu-events-fix-reproducibility.patch
bugfix/all/libapi-define-_fortify_source-as-2-not-empty.patch
bugfix/all/tools-perf-fix-missing-ldflags-for-some-programs.patch
-bugfix/all/tools-build-add-feature-test-for-init_disassemble_info-api-changes.patch
-bugfix/all/tools-include-add-dis-asm-compat.h-to-handle-version-differences.patch
-bugfix/all/tools-perf-fix-compilation-error-with-new-binutils.patch
-bugfix/all/tools-bpf_jit_disasm-fix-compilation-error-with-new-binutils.patch
-bugfix/all/tools-bpftool-fix-compilation-error-with-new-binutils.patch
-bugfix/all/tools-perf-fix-build-without-libbfd.patch
-bugfix/all/tools-rtla-build-with-extra-c-ld-flags.patch
# ABI maintenance
diff --git a/debian/rules.real b/debian/rules.real
index d6acc19ad..d4e0749b1 100644
--- a/debian/rules.real
+++ b/debian/rules.real
@@ -557,6 +557,7 @@ ifneq (,$(filter linux-image$(SOURCE_SUFFIX)-$(ARCH)-signed-template,$(packages_
debian/signing_templates/README.source \
debian/signing_templates/rules \
debian/signing_templates/rules.real \
+ debian/signing_templates/sign-file-attach \
debian/signing_templates/source \
$(CODE_SIGNING_DIR)/source-template/debian/
+$(MAKE_SELF) install-base
diff --git a/debian/salsa-ci.yml b/debian/salsa-ci.yml
index e046401c9..54866a5f7 100644
--- a/debian/salsa-ci.yml
+++ b/debian/salsa-ci.yml
@@ -7,8 +7,6 @@ variables:
SALSA_CI_DPKG_BUILDPACKAGE_ARGS: '-Ppkg.linux.quick'
# We have to bump the version in source preparation, not later
SALSA_CI_DISABLE_VERSION_BUMP: 'true'
- # Currently triggering falsely (bug #973313)
- SALSA_CI_LINTIAN_SUPPRESS_TAGS: 'groff-message'
# Currently broken in quick build
DEBIAN_KERNEL_DISABLE_INSTALLER: 'true'
# Output is limited to 4 MiB total, so use 'terse'.
@@ -31,123 +29,6 @@ stages:
# current limits on Salsa (salsa-ci-team/pipeline#195). So we
# redefine the source extraction and build steps to use packed source.
-# Build scripts copied from the common salsa-ci.yml, as we cannot make
-# cross-document references to them. These should be kept in sync
-# with that and otherwise not modified.
-
-.build-before-script: &build-before-script
- # Reported in https://salsa.debian.org/salsa-ci-team/pipeline/issues/104,
- # GitLab can only expand variables once. So at the beginning CCACHE_WORK_DIR
- # was assigned to `${WORKING_DIR}/.ccache`, and it will be expanded as
- # `$CI_PROJECT_DIR/debian/output/.ccache`, so it creates a folder named
- # "\$CI_PROJECT_DIR", which is then saved as build cache. To allow smooth
- # transition, that wrongly named folder has to be removed:
- - rm -rf '$CI_PROJECT_DIR'
-
- # salsa-ci-team/pipeline#107
- - rm -rf ${CI_PROJECT_DIR}/debian/output/.ccache
-
- - mkdir -p ${WORKING_DIR} ${CCACHE_WORK_DIR}
-
- # https://salsa.debian.org/salsa-ci-team/pipeline/-/merge_requests/230
- - rm -rf ${CCACHE_TMP_DIR}
-
- - mv ${CCACHE_WORK_DIR} ${CCACHE_TMP_DIR}
- - add_extra_repository.sh -v -e "${SALSA_CI_EXTRA_REPOSITORY}" -k "${SALSA_CI_EXTRA_REPOSITORY_KEY}"
-
- # are we cross-compiling? if not, unset HOST_ARCH
- - test "${BUILD_ARCH}" != "${HOST_ARCH}" || HOST_ARCH=""
-
-.build-script: &build-script
- - export CCACHE_DIR=${CCACHE_TMP_DIR}
-
- # add target architecture if cross-compiliing
- - test -z "${HOST_ARCH}" || dpkg --add-architecture ${HOST_ARCH}
-
- # Add deb-src entries
- - |
- if [ -f /etc/apt/sources.list ]; then
- sed -n '/^deb\s/s//deb-src /p' /etc/apt/sources.list > /etc/apt/sources.list.d/deb-src.list
- fi
- - |
- if [ -f /etc/apt/sources.list.d/debian.sources ]; then
- sed -i 's/^Types: deb$/Types: deb deb-src/' /etc/apt/sources.list.d/debian.sources
- fi
-
- - |
- apt-get update && eatmydata apt-get install --no-install-recommends -y \
- ccache \
- fakeroot \
- build-essential
-
- # in case we are cross-building, install some more dependencies
- # see #815172 why we need libc-dev and libstdc++-dev
- - |
- test -z "${HOST_ARCH}" || eatmydata apt-get satisfy --no-install-recommends -y \
- libc-dev:${HOST_ARCH} \
- libstdc++-dev:${HOST_ARCH} \
- crossbuild-essential-${HOST_ARCH}
- # when cross-compiling, add 'nocheck' to the DEB_BUILD_OPTIONS
- - test -z "${HOST_ARCH}" || export DEB_BUILD_OPTIONS=nocheck${DEB_BUILD_OPTIONS:+ }${DEB_BUILD_OPTIONS}
-
- # Enter source package dir
- - cd ${WORKING_DIR}/${SOURCE_DIR}
-
- # Install package build dependencies
- # use plain "apt-get build-dep" so that we can install only packages for
- # architecture indep or arch:any builds
- - aptopts=""
- - test "$DB_BUILD_TYPE" != "any" || aptopts="--arch-only"
- - test "$DB_BUILD_TYPE" != "all" || aptopts="--indep-only"
- # use aspcud solver for experimental and backports
- - |
- if [ "$RELEASE" = "experimental" ] || [[ "$RELEASE" =~ .*-backports$ ]]; then
- eatmydata apt-get install --no-install-recommends -y aspcud apt-cudf
- aptopts="$aptopts --solver aspcud -oAPT::Solver::Strict-Pinning=false -oAPT::Solver::aspcud::Preferences="
- # minimize number of packages from experimental and backports
- if [ "$RELEASE" = "experimental" ]; then
- aptopts="$aptopts-count(solution,APT-Release:=/a=experimental/),"
- elif [[ "$RELEASE" =~ .*-backports$ ]]; then
- aptopts="$aptopts-count(solution,APT-Release:~/a=.*-backports/),"
- fi
- aptopts="$aptopts-removed,-changed,-new"
- fi
- - eatmydata apt-get build-dep ${HOST_ARCH:+--host-architecture ${HOST_ARCH} -Pcross,nocheck} --no-install-recommends -y $aptopts .
-
- # If not disabled, bump package version
- - |
- if ! echo "$SALSA_CI_DISABLE_VERSION_BUMP" | grep -qE '^(1|yes|true)$'; then
- sed -i -e '1 s/)/+salsaci)/' debian/changelog
- fi
-
- # Generate ccache links
- - dpkg-reconfigure ccache
- - PATH="/usr/lib/ccache/:${PATH}"
-
- # Reset ccache stats
- - ccache -z
-
- # Create salsaci user and fix permissions
- - useradd salsaci
- - chown -R salsaci. ${WORKING_DIR} ${CCACHE_DIR}
-
- # Define buildlog filename
- - BUILD_LOGFILE_SOURCE=$(dpkg-parsechangelog -S Source)
- - BUILD_LOGFILE_VERSION=$(dpkg-parsechangelog -S Version)
- - BUILD_LOGFILE_VERSION=${BUILD_LOGFILE_VERSION#*:}
- - BUILD_LOGFILE_ARCH=${HOST_ARCH:-${BUILD_ARCH}}
- - BUILD_LOGFILE="${WORKING_DIR}/${BUILD_LOGFILE_SOURCE}_${BUILD_LOGFILE_VERSION}_${BUILD_LOGFILE_ARCH}.build"
-
- # Build package as user salsaci
- - su salsaci -c "timeout ${SALSA_CI_BUILD_TIMEOUT_ARGS} eatmydata dpkg-buildpackage ${HOST_ARCH:+--host-arch ${HOST_ARCH} -Pcross,nocheck} --build=${DB_BUILD_TYPE} ${DB_BUILD_PARAM}" |& OUTPUT_FILENAME=${BUILD_LOGFILE} filter-output
-
- # Restore PWD to ${WORKING_DIR}
- - cd ${WORKING_DIR}
- - rm -rf ${WORKING_DIR}/${SOURCE_DIR}
-
- # Print ccache stats on job log
- - ccache -s
-
# Our modified extract-source and build jobs
extract-source:
@@ -252,8 +133,8 @@ build:
- dpkg-source -x ${WORKING_DIR}/*.dsc ${WORKING_DIR}/${SOURCE_DIR}
# Do the same as the common .build-definition script
- - *build-before-script
- - *build-script
+ - !reference [.build-before-script]
+ - !reference [.build-script]
- mv ${CCACHE_TMP_DIR} ${CCACHE_WORK_DIR}
dependencies:
- extract-source
@@ -417,8 +298,8 @@ build-signed:
${WORKING_DIR}/linux-support-*_all.deb
# Do the same as the common .build-definition script
- - *build-before-script
- - *build-script
+ - !reference [.build-before-script]
+ - !reference [.build-script]
- mv ${CCACHE_TMP_DIR} ${CCACHE_WORK_DIR}
artifacts:
# This should include the linux-signed source package, its binary
@@ -430,6 +311,7 @@ build-signed:
- ${WORKING_DIR}/linux-headers-*-common_*_all.deb
- ${WORKING_DIR}/linux-image-*_${BUILD_ARCH}.deb
- ${WORKING_DIR}/linux-kbuild-*[0-9]_*_${BUILD_ARCH}.deb
+ - ${WORKING_DIR}/linux-compiler-*_${BUILD_ARCH}.deb
exclude:
- ${WORKING_DIR}/linux-image-*-unsigned_*_${BUILD_ARCH}.deb
needs:
diff --git a/debian/signing_templates/control.source.in b/debian/signing_templates/control.source.in
index a666db8f4..2468a8c14 100644
--- a/debian/signing_templates/control.source.in
+++ b/debian/signing_templates/control.source.in
@@ -6,10 +6,10 @@ Uploaders: Bastian Blank <waldi@debian.org>, maximilian attems <maks@debian.org>
Standards-Version: 4.2.0
Build-Depends:
debhelper-compat (= 12), dh-exec,
+ python3:any,
rsync,
sbsigntool [amd64 arm64 i386],
kernel-wedge (>= 2.102~),
- linux-kbuild-@version@
Rules-Requires-Root: no
Vcs-Git: https://salsa.debian.org/kernel-team/linux.git
Vcs-Browser: https://salsa.debian.org/kernel-team/linux
diff --git a/debian/signing_templates/rules.real b/debian/signing_templates/rules.real
index 2f08815a7..88d04d1fa 100644
--- a/debian/signing_templates/rules.real
+++ b/debian/signing_templates/rules.real
@@ -21,14 +21,13 @@ install-signed:
echo >> debian/$(PACKAGE_NAME).substvars 'signed:Description=The modules are signed.'; \
fi
mkdir -p $(PACKAGE_DIR)/lib/modules/$(KERNEL_VERSION)
- rsync -a $(addprefix /lib/modules/$(KERNEL_VERSION)/,kernel modules.builtin modules.builtin.modinfo modules.order) \
+ rsync -a $(addprefix /lib/modules/$(KERNEL_VERSION)/,modules.builtin modules.builtin.modinfo modules.order) \
$(PACKAGE_DIR)/lib/modules/$(KERNEL_VERSION)/
- while read path; do \
- /usr/lib/linux-kbuild-$(VERSION)/scripts/sign-file -s \
- $(SIGNATURE_DIR)/lib/modules/$(KERNEL_VERSION)/$$path \
- sha256 dummy \
- $(PACKAGE_DIR)/lib/modules/$(KERNEL_VERSION)/$${path%.sig}; \
- done < <(find $(SIGNATURE_DIR)/lib/modules/$(KERNEL_VERSION) -name '*.sig' -printf '%P\n')
+ find $(SIGNATURE_DIR)/lib/modules/$(KERNEL_VERSION) -name '*.sig' -printf '%P\n' | \
+ debian/sign-file-attach \
+ $(SIGNATURE_DIR)/lib/modules/$(KERNEL_VERSION) \
+ /lib/modules/$(KERNEL_VERSION) \
+ $(PACKAGE_DIR)/lib/modules/$(KERNEL_VERSION)
# Copy any device tree files
if [ -d /usr/lib/linux-image-$(KERNEL_VERSION) ]; then \
mkdir -p $(PACKAGE_DIR)/usr/lib/linux-image-$(KERNEL_VERSION); \
diff --git a/debian/signing_templates/sign-file-attach b/debian/signing_templates/sign-file-attach
new file mode 100755
index 000000000..6a8a18cac
--- /dev/null
+++ b/debian/signing_templates/sign-file-attach
@@ -0,0 +1,56 @@
+#!/usr/bin/python3
+
+import argparse
+import pathlib
+import shutil
+import struct
+import sys
+
+
+module_magic = b'~Module signature appended~\n'
+# Only relevant fields are id_type and sig_len
+module_signature = struct.Struct('!2xB2x3xL')
+module_signature_PKEY_ID_PKCS7 = 2
+
+
+def sign_file_attach(sig_base: pathlib.Path, module_base: pathlib.Path, output_base: pathlib.Path) -> None:
+ for line in sys.stdin:
+ path, _, file = line.strip().rpartition('/')
+ name, _, _ = file.partition('.')
+
+ sig = sig_base / path / f'{name}.ko.sig'
+ module = module_base / path / f'{name}.ko'
+ output = output_base / path / f'{name}.ko'
+ output.parent.mkdir(parents=True, exist_ok=True)
+
+ with sig.open('rb') as f_sig, module.open('rb') as f_module, output.open('wb') as f_output:
+ shutil.copyfileobj(f_module, f_output)
+ shutil.copyfileobj(f_sig, f_output)
+ len_sig = f_sig.tell()
+ f_output.write(module_signature.pack(
+ module_signature_PKEY_ID_PKCS7,
+ len_sig,
+ ))
+ f_output.write(module_magic)
+
+
+if __name__ == '__main__':
+ parser = argparse.ArgumentParser()
+ parser.add_argument(
+ 'sig_base',
+ metavar='SIGNATURE',
+ type=pathlib.Path,
+ )
+ parser.add_argument(
+ 'module_base',
+ metavar='MODULE',
+ type=pathlib.Path,
+ )
+ parser.add_argument(
+ 'output_base',
+ metavar='OUTPUT',
+ type=pathlib.Path,
+ )
+ args = parser.parse_args()
+
+ sign_file_attach(**vars(args))
diff --git a/debian/templates/control.signed-template.in b/debian/templates/control.signed-template.in
index 175084191..3d52fa242 100644
--- a/debian/templates/control.signed-template.in
+++ b/debian/templates/control.signed-template.in
@@ -1,6 +1,6 @@
Package: linux-image@source_suffix@-@arch@-signed-template
Build-Profiles: <!stage1 !pkg.linux.nokernel>
-Depends: dpkg-dev, ${misc:Depends}
+Depends: dpkg-dev, python3:any, ${misc:Depends}
Description: Template for signed linux-image packages for @arch@
This package is used to control code signing by the Debian signing
service.
diff --git a/debian/templates/control.tools-unversioned.in b/debian/templates/control.tools-unversioned.in
index 02afa1e60..e28953007 100644
--- a/debian/templates/control.tools-unversioned.in
+++ b/debian/templates/control.tools-unversioned.in
@@ -72,6 +72,7 @@ Build-Depends:
# version in bullseye is too old
# libopencsd-dev (>= 1.1.1),
python3-dev:any,
+ python3-setuptools,
Depends: ${shlibs:Depends}, ${misc:Depends}, ${perl:Depends}, ${python3:Depends}
Provides: linux-tools-@version@
Conflicts: linux-tools-@version@