| Age | Commit message (Collapse) | Author |
|
git://git.kernel.org/pub/scm/linux/kernel/git/hid/hid
Pull HID updates from Jiri Kosina:
"Core:
- OOB fix in s32ton() (Alan Stern)
- switch to named initializers for acpi_device_id (Pawel Zalewski)
- UAF fix in hiddev (Yousef Alhouseen)
AMD SFH:
- support for newer AMD SoCs (Basavaraj Natikar)
- sysfs attributes of operating-mode telemetry (Basavaraj Natikar)
Apple:
- power management fix for Apple Touch Bar (Andre Eikmeyer)
- fix for trackpad hanling on T2 Macs (Aditya Garg)
ASUS:
- power management fix for ROG Ally (Deni Benato)
- asus_work() hardening (Denis Benato)
Intel-THC:
- conversion of intel-thc-hid to hid_safe_input_report() (Even Xu)
Nintendo:
- support for Switch 2 controller (Vicki Pfau)
- support for PDP Afterglow controller (Aiman Najjar)
Roccat:
- fixes for proper handling of short reports (Jiale Yao)
Wacom:
- UAF fixes (Lee Jones)
.. other assorted fixes, device ID additions and code cleanups"
* tag 'hid-for-linus-2026102101' of git://git.kernel.org/pub/scm/linux/kernel/git/hid/hid: (80 commits)
HID: nintendo: introduce dependency in USB_HID
HID: asus: add keyboard dock of the ASUS Transformer Book T302CHI device ID
HID: wacom: fix wacom_intuos_irq NULL pen_input deref
HID: hid-lenovo-go-s: Use devm_kzalloc for drvdata
HID: hid-lenovo-go-s: Move static led_classdev_mc to drvdata struct
HID: hid-lenovo-go-s: Reorganize and rename hid_gos_cfg
HID: hid-lenovo-go-s: Move attribute init to after device query
HID: hid-lenovo-go-s: Add suspend function and gate access under bool.
HID: hid-lenovo-go-s: Add kobject_uevent notify during reset-resume
HID: hid-lenovo-go-s: Use pm_ptr for reset_resume callback
HID: hid-lenovo-go-s: Prevent deadlock if device removed during setup
HID: hid-lenovo-go-s: Bound stale reply window before reusing send_cmd_complete
HID: hid-lenovo-go-s: Return ret instead of 0 in mcu_property_out()
HID: logitech-hidpp: cancel reset_hi_res_work on probe failure
HID: apple: ignore the trackpad on T2 Macs
HID: usbhid: skip interrupt IN polling for devices with no input reports
HID: mcp2221: always initialize and cancel init_work
HID: magicmouse: fix null pointer dereference in magicmouse_event()
HID: core: Fix out-of-bounds left shift by 32 in s32ton()
HID: asus: add support for xgm led
...
|
|
git://git.kernel.org/pub/scm/linux/kernel/git/andi.shyti/linux
Pull i2c updates from Andi Shyti:
"The main changes are the new Novatek NT72676 driver, the qcom-cci
clock and timing updates and a collection of smaller driver, core and
DT binding improvements.
Core and helpers:
- acpi: run ASUS and Dell touchpads at 100 kHz to avoid lag
- core: return bool from check_functionality() and update users
- smbus: limit block reads to the caller's buffer size
- acpi: mark I2C transfer buffers as DMA-safe
Drivers:
- qcom-geni: several firmware node and runtime PM improvements
- qcom-cci: several patches rework clock selection and timings
- qcom-cci: enable SCL clock stretching
- imx-lpi2c: fix DMA mapping device selection and cleanup
- designware: tune RX FIFO thresholds to reduce interrupts
- i801: respect SPD write protection when probing DDR5 modules
- bcm2835: fully initialize clock configuration data
Generic cleanups:
- mux: simplify channel lookup and firmware node handling
- core, busses: tidy up ACPI device ID tables
- docs: clarify adapter lookup and fix a client driver example
- xlnx: update maintainer for Xilinx IIC bindings
- ljca: remove redundant adapter deletion
New support and DT bindings:
- add DW compatibles for Synaptics SL2610 and UltraRISC DP1000
- allow six DMA channels for R-Car Gen5
- add Allwinner A733 compatible to mv64xxx bindings
- add support for Novatek NT72676 (new driver)"
* tag 'i2c-7.4-part1' of git://git.kernel.org/pub/scm/linux/kernel/git/andi.shyti/linux: (37 commits)
i2c: imx-lpi2c: remove dmaengine_desc_free()
i2c: busses: use named initializers for acpi_device_id
i2c: i2c-core-acpi: use named initializers for acpi_device_id
i2c: i801: Gate SPD instantiation on SPD Write Disable bit
i2c: acpi: Use I2C_M_DMA_SAFE in acpi_gsb_i2c_[read|write]_bytes()
dt-bindings: i2c: dw: Add Synaptics sl2610 i2c
i2c: designware: size the RX FIFO threshold to the queued transfer
i2c: imx-lpi2c: use dmaengine_get_dma_device() for DMA mapping
docs: i2c: writing-clients: Add missing end of command
i2c: qcom-cci: skip core clock rates the clock cannot provide
i2c: core: document preference for i2c_get_adapter_by_fwnode()
i2c: qcom-cci: always enable SCL clock stretching
MAINTAINERS: Add entry for Novatek NT72676 I2C controller driver
i2c: nt72676: Add Novatek NT72676 I2C controller driver
dt-bindings: i2c: Add Novatek NT72676 I2C controller
i2c: acpi: Force ASUE140D touchpads to 100 kHz
i2c: qcom-cci: Enforce the required CCI clock rate
i2c: qcom-cci: Share the timing table across CCI revisions
i2c: qcom-cci: Add 19.2 MHz timings for the v2 CCI
i2c: qcom-cci: Support per-mode CCI clock rates
...
|
|
git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging
Pull watchdog updates from Guenter Roeck:
"Core/generic:
- Replace __MODULE_STRING() with __stringify()
- Use assign_bit() where applicable
- Use DEFINE_SIMPLE_DEV_PM_OPS and pm_sleep_ptr for dev_pm_ops
- Fix repeated words and typos in comments
- Differentiate scenarios when watchdog is closed
Added device support in existing drivers:
- mtk_wdt: Support for MediaTek MT8167 and MT8127
- apple_wdt: Support for T8140
- s3c2410_wdt: Support for Exynos 5515
Various other minor bug fixes and improvements"
* tag 'watchdog-for-v7.4' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging: (22 commits)
watchdog: mediatek: Apply the driver's mode to a watchdog left running
dt-bindings: watchdog: apple,wdt: Add t8140 compatible
watchdog: Replace __MODULE_STRING() with __stringify()
watchdog: use assign_bit() where applicable
watchdog: mediatek: Add support for mt8167 toprgu/watchdog
dt-bindings: watchdog: Add compatible for MediaTek mt8167
watchdog: sp805_wdt: fix suspend/resume handling of HW_RUNNING watchdog
watchdog: PM: use DEFINE_SIMPLE_DEV_PM_OPS and pm_sleep_ptr for dev_pm_ops
watchdog: mediatek: Add wdt/toprgu resets for mt6589
watchdog: msc313e: Replace commas with semicolons in probe()
watchdog: sp805: Replace SIMPLE_DEV_PM_OPS with DEFINE_SIMPLE_DEV_PM_OPS
watchdog: fix repeated words in comments
watchdog: fix typos in comments
watchdog: i6300esb: do not stop an already running watchdog
dt-bindings: watchdog: mediatek: Add MT8127
watchdog: Differentiate scenarios when watchdog is closed
dt-bindings: watchdog: renesas,r9a09g057-wdt: Add CPG/MSSR syscon support
watchdog: mediatek: acknowledge pretimeout interrupt
watchdog: s3c2410_wdt: Add exynos5515-wdt compatible data
dt-bindings: watchdog: samsung-wdt: Add exynos5515-wdt compatible
...
|
|
git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/linux-pm
Pull pmdomain updates from Ulf Hansson:
"pmdomain core:
- Add a genpd config to support unknown initial status
- Add support system wide resume latency constraints
- Enable a non-CPU device in a CPU PM domain to do power on
- Fall back to use device node name for domain idle states
pmdomain providers:
- cpuidle-psci: Initialize the PM domains in powered off state for OSI
- cpuidle-psci: Move initialization a bit earlier in the boot sequence
- qcom: Add NMXC power domain for Nord
- qcom: Add support for SM7250, Kuno and MSM8952 power domains
- renesas: Add support for r8a774a3 SYSC power domains
- renesas: Fix lockdep false positive for r8a78000
- riscv: Add RPMI device power service
- st: Add the actual power domains on U8500
- st: Convert Ux500 PM domains to schema
pm qos:
- Add a flag for system wide latency constraints
- Add lockless read for flags"
* tag 'pmdomain-v7.4' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/linux-pm: (36 commits)
dt-bindings: arm: Add the actual power domains on U8500
dt-bindings: arm: ux500: Drop NR_DOMAINS
dt-bindings: power: Convert Ux500 PM domains to schema
dt-bindings: power: rpmpd: Add MSM8952 power domains
pmdomain: rockchip: drop duplicated errno from supply failure message
pmdomain: core: add support system-wide resume latency constraints
pmdomain: core: add genpd_for_each_child() helper
PM / QoS: add lockless read for flags
PM / QoS: add flag to indicate latency applies system-wide
pmdomain: renesas: rcar-sys: Add r8a774a3 support
dt-bindings: power: Add r8a774a3 SYSC power domain definitions
dt-bindings: power: renesas,rcar-sysc: Document vendor-prefixed header paths
pmdomain: imx93-blk-ctrl: Use pm_runtime_resume_and_get()
pmdomain: imx8m-blk-ctrl: Use pm_runtime_resume_and_get()
pmdomain: imx: gpcv2: Use pm_runtime_resume_and_get()
pmdomain: rockchip: Fix domain check in rockchip_pm_add_one_domain()
pmdomain: core: Fall back to node name for idle states
pmdomain: renesas: r8a78000: Fix lockdep false positive
pmdomain: fix typo "releated" in comment
pmdomain: imx: Propagate SCU provider registration failures
...
|
|
Pull MMC updates from Ulf Hansson:
"MMC core:
- Add a power-off-delay-us DT property to support HW specific delays
- Add mmc_send_tuning_timeout() to allow hosts to specify a timeout
- Enable hosts to control the re-programming of the crypto keys
MMC host:
- dw_mmc: Add a common watchdog and convert the various timeouts to use it
- dw_mmc: Expose the watchdog state in debugfs
- dw_mmc-rockchip: Use a tighter per command tuning timeout
- greybus-sdio: Convert to devm_mmc_alloc_host()
- meson-gx: Enable the bus pipeline clock on T7
- rtsx_usb_sdmmc: Start card power-up at 3.3V
- sdhci-cadence: Add Altera Agilex5 SD6HC support
- sdhci-cadence: Add Cadence SD6HC support
- sdhci-msm: Add support for the MSM8952 and Maili variants
- sdhci-msm: Use pm ops to better manage restoring of crypto keys
- sdhci-of-dwcmshc: Disable CQE error halt request for Rockchip
- sdhci-pxav3: Disable clock inversion for SD HS cards
- sunplus: Fixup initialization for DDR modes
- sunxi: Add support for Allwinner B288
- vub300: Remove the driver for the obsolete HW"
* tag 'mmc-v7.4' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc: (43 commits)
dt-bindings: mmc: sun4i-a10-mmc: add Allwinner B288
mmc: dw_mmc-rockchip: use a tighter per-command tuning timeout
mmc: core: add mmc_send_tuning_timeout()
mmc: sdhci-of-dwcmshc: Disable CQE error halt request for Rockchip
dt-bindings: mmc: sdhci-msm: Add MSM8952 compatible
mmc: use assign_bit() where applicable
mmc: sdhci-pci: Replace deprecated PCI functions
mmc: sunplus: initialise rd_crc_dly=1 for DDR modes
mmc: core: fix stale mmc_start_req() references in comments
docs: mmc: fix stale async request documentation
docs: mmc: document eMMC health status support in mmc-tools
mmc: cavium-thunderx: Drop redundant calls to get|put_device()
mmc: core: Turn mmc_alloc|free_host() into static functions
staging: greybus: sdio: Convert to devm_mmc_alloc_host()
mmc: vub300: Remove the driver for the obsolete HW
mmc: dw_mmc: remove unused slot member
mmc: sdhci-pxav3: avoid of_node
CREDITS: Add Pierre Ossman
mmc: fix typos in comments
mmc: meson-gx: enable the bus pipeline clock on T7
...
|
|
git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi
Pull spi updates from Mark Brown:
"Quite a lot of work in the SPI subsystem this time around, almost all
in drivers rather than the core.
As well as the general cleanup/fix work we're seeing over most of the
kernel there's been some substantial performance work to two existing
drivers and support for a number of new devices including a couple of
new drivers. There was also a big overhaul of the spidev_test utility
from the Pengutronix people.
- Improvements for spidev_test to cover additional use cases, plus be
a bit easier to use.
- Substantial performance work in both DesignWare and Tegra210 QSPI
drivers, making their interrupt handling more efficient to drive up
hardware utilisation.
- Documentation clarifications.
- Fixes for some runtime PM and error handling issues.
- Support for Nuvoton MA35D1, Qualcomm QPIC SNAND v2, Renesas R-Car
Gen5 and X5H and Realtek RTD1625"
* tag 'spi-v7.4' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi: (136 commits)
spi: ch341: handle transfers without a TX or RX buffer
spi: dt-bindings: spi-qpic-snand: Add IPQ9650 compatible
spi: spi-pci1xxxx: quiesce DMA engines on transfer timeout
spi: amd: fix len==0 underflow and FIFO overflow
spi: tegra114: initialize native chip selects inactive
spi: bcm-qspi: reject oversized dummy bytes in mspi exec_mem_op
spi: npcm-fiu: limit UMA data_size to the 16-byte staging buffer
spi: omap2-mcspi: handle DMA setup failures
spi: jcore: fix divide-by-zero when speed_hz is zero
spi: cadence-xspi: fix stack buffer overflow in the Marvell b0 path
spi: cadence-xspi: reject SDMA transfers larger than the requested length
spi: meson-spicc: fix invalid DMA unmap on mapping failure
spi: s3c64xx: Use snprintf() instead of sprintf()
spi: omap2-mcspi: Use snprintf() instead of sprintf()
spi: tle62x0: Use kstrtoul() instead of simple_strtoul()
spi: lm70llp: Use strscpy() instead of strcpy()
spi: butterfly: Use strscpy() instead of strcpy()
spi: jcore: Use devm_platform_ioremap_resource()
spi: sh-hspi: Use devm_platform_ioremap_resource()
spi: ljca: validate the response length before copying the data
...
|
|
git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator
Pull regulator updates from Mark Brown:
"This is quite a quiet release, especially given the general onslaught
of cleanup patches seen elsewhere. There is some of that, but not as
much as I'm seeing elsewhere relatively to the size of the subsystem.
We do have some new drivers as well, plus Linus Walleij has done a big
overhaul of the AB8500 driver including feature buildout.
- Substantial cleanups and feature additions for the ST Ericsson AB8500
- Overhaul of the configuration for the LP872x.
- A bunch of DT binding conversions
- Support for Maxim MAX20024, MPS MPQ4210, Nexperia NEX10000UB"
* tag 'regulator-v7.4' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator: (60 commits)
regulator: rpi-panel-attiny: Fix probe failure after a host cold boot
regulator: lp872x: Use macro to fill regulator descriptor
regulator: lp872x: Add support for input and regulator power supplies
regulator: lp872x: Remove platform_data based probing
regulator: lp872x: Remove redundant regmap wrappers
regulator: lp872x: Fold driver header into driver file
regulator: dt-bindings: ti,lp872x: Document input supplies
regulator: dt-bindings: ti,lp872x: Deprecate ti,dvs-gpio and ti,update-config
regulator: dt-bindings: sy8827n: support standard properties
regulator: dt-bindings: Reference Tegra regulator coupling schema
regulator: dt-bindings: nvidia,tegra-regulators-coupling: Convert to DT schema
regulator: dt-bindings: ti,lp872x: Convert to DT schema
regulator: dt-bindings: Drop obsolete MAX8925 .txt binding
regulator: 88pm886: Add Vbus regulator
regulator: core: Export helpers used by regulator couplers
regulator: core: Fix coupled regulators reference leak on removal
regulator: dt-bindings: ti,tps6586x: Convert to DT schema
regulator: dt-bindings: Add MAX20024 sd4
regulator: dt-bindings: Convert mediatek,mt6380-regulator to DT schema
regulator: mp886x: fix pontential division by zero
...
|
|
ACPICA drops the interpreter lock while AML waits, for example around EC
accesses, so two methods can run interleaved.
Some firmware relies on methods not interleaving, for instance by
switching an EC page selector without taking the AML mutex that the
other users of that page hold.
Add acpi_evaluate_object_exclusive(), acpi_evaluate_integer_exclusive()
and acpi_execute_simple_method_exclusive() which serialize the
evaluation under a global mutex, for callers that are known to be
affected.
Suggested-by: Rafael J. Wysocki <rafael@kernel.org>
Link: https://lore.kernel.org/all/CAJZ5v0gS4agVUkCO6M=VW4Wi2y1-s+k23bpzmX9aAZ0Rsv4z9Q@mail.gmail.com/
Signed-off-by: Ali Ahmet Memiş <aliamemis@disroot.org>
Reviewed-by: Rong Zhang <i@rong.moe>
Link: https://patch.msgid.link/20261018122220.678822-2-aliamemis@disroot.org
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
|
|
git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux
Pull gpio updates from Bartosz Golaszewski:
"Nothing stands out as particularly interesting, it's been a calm
cycle. We have three new drivers, support for more models and lots of
updates across many modules (details are in the signed tag as usual).
There are also some minor changes and additions to the in-kernel GPIO
API.
GPIO core:
- provide a new controller API: gpiochip_generic_get_config()
- return -EOPNOTSUPP instead of -ENODEV to user-space if it requests
hardware timestamping on systems where it's unavailable (no
user-space regressions reported)
New drivers:
- add a driver for ROHM BD73800 PMIC GPIO controller
- add a driver for Axiado AX3005 SGPIO controller
- add a driver for Analog Devices AD7768 GPIO controller
New hardware support:
- extend gpio-rcar with support for R-Car X5H (R8A78000)
- extend gpio-tegra186 with support for Tegra 268
Driver changes:
- refactor and improve gpio-rtd1625: switch to modern or better
fitting interfaces and improve coding style
- improve error handling of return values of
platform_get_irq_optional() in several drivers
- normalize the return value of the gpio_chip::get() callback in
gpio-siox in order to not propagate invalid values up to the GPIO
core
- implement gpio_chip::get_direction() for gpio-pcf857x
- use managed variants of notifier registration functions in several
drivers
- remove legacy gpio_set_value_cansleep() as it has no more users
- add pinctrl support to gpio-realtek-otto
- add runtime PM support to the gpio-regmap helper module
- add more ACPI GPIO quirks for various hardware
- stop needlessly reading gpio_chip::base in gpio-pxa
- add support for tracking of direction of generic GPIO chips with no
direction registers via pinctrl backend to gpio-mmio (use the new
core API: gpiochip_generic_get_config())
- use the "safe" variants of debugfs_create_file() in
gpio-sloppy-analyzer
- use device name as GPIO chip label in gpio-omap
- refactor bit ops in gpio-dln2
- prepare gpio-it87 for upcoming kmalloc_obj() conversion
Devicetree bindings:
- document new model in gpio-pca95xx
- allow the gpio-hogs property in gpio-zynq and fsl,qoriq-gpio
- allow the gpio-ranges property in gpio-realtek-otto
Misc fixes:
- add missing MODULE_ALIAS() to gpio-crystalcove
- fix a comment typo in example GPIO tools
- fix unbalanced brackets in documentation
- add names to regmaps in gpio-mvebu to avoid collisions in debugfs
output
- fix GPIO lookup using relative paths in GPIO ACPI"
* tag 'gpio-updates-for-v7.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux: (63 commits)
gpiolib: acpi: Fix GPIO lookup using relative path
gpio: legacy: Kill gpio_set_value_cansleep()
dt-bindings: gpio: pca95xx: add onnn,pca9655 with nxp,pca9555 fallback
gpiolib: acpi: Ignore GPIO 11 interrupt on Acer Nitro V 16S AI
gpio: pxa: stop reading gpio_chip::base in direction callbacks
gpio: axiado: add AX3005 SGPIO controller support
dt-bindings: gpio: add Axiado AX3005 SGPIO controller
gpiolib: acpi: Add quirk for Lenovo IdeaPad Slim 3 15ABR8
MAINTAINERS: Add ROHM BD73800 PMIC files
gpio: bd73800: Support ROHM BD73800 PMIC GPIOs
clk: bd718x7: Support ROHM BD73800
regulator: bd71828: Support ROHM BD73800
rtc: bd70528: Support RTC on ROHM BD73800
mfd: Support for ROHM BD73800 PMIC core
dt-bindings: mfd: ROHM BD73800 PMIC
dt-bindings: regulator: ROHM BD73800 regulators
dt-bindings: rohm,bd*: Ref common ROHM bindings
dt-bindings: mfd: Common ROHM PMIC properties
gpio: siox: normalize return value of gpio_get()
gpio: dln2: use assign_bit() where applicable
...
|
|
git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux
Pull power sequencing updates from Bartosz Golaszewski:
"The bulk of added lines are kunit tests that comprehensively verify
the core functionality of the power sequencing framework.
Other than that, we have another pwrseq driver: Renesas RZ/G3L Power
Ready and support for more models in pwrseq-pcie-m2. We also added a
new consumer-facing API in the form of pwrseq_is_controllable()
function which allows consumers to check if a given target resource is
actually host-controllable.
Summary:
Power sequencing core:
- add a suite of kunit test cases for the power sequencing core
functionalities
- provide a new consumer API: pwrseq_is_controllable()
New Drivers:
- add the Renesas RZ/G3L Power Ready driver which provides
information on power readiness for various IPs on RZ/G3L
Driver changes:
- use pwrseq_is_controllable() to report controllability to consumers
in pwrseq-qcom-wcn and pwrseq-pcie-m2
- add support for PCIe switch topologies to pwrseq-pcie-m2
- add the PCI ID for Foxconn WCN7850 to pwrseq-pcie-m2"
* tag 'pwrseq-updates-for-v7.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux:
power: sequencing: pcie-m2: Add Foxconn WCN7850 subsystem PCI ID
power: sequencing: qcom-wcn: Report power controllability
power: sequencing: pcie-m2: Report power controllability
power: sequencing: Add pwrseq_is_controllable() API
power: sequencing: add kunit test cases
power: sequencing: pwrseq-pcie-m2: Support PCIe switch topologies
power: sequencing: Add Renesas RZ/G3L Power Ready driver
|
|
Convert the rhltable to a plain hashtable under a spinlock. The walks
keep their place with a cursor entry in the chain. A claim is unhashed
the moment it's dropped and a walk that finds a superblock that isn't
born yet waits for it to be born or to die and looks again. Since
hashing can't fail anymore the entry for the superblock's own s_dev is
embedded in struct super_block and the preallocation in alloc_super()
goes away. This all simplifies things quite a lot.
It also fixes a btrfs bug where fs_bdev_freeze() ended up freezing a
btrfs filesystem through a stale member that open_ctree() had already
released while the freeze was waiting for SB_BORN. The resume doesn't
find a holder for that device anymore so the filesystem stays frozen
for good.
The walks return superblocks instead of table entries now and
user_get_super() hands out the passive reference the walk took.
Reproducer, a three device btrfs with a stale copy of a removed member.
dm-delay under the remaining members stretches the window between
btrfs_open_devices() and btrfs_free_extra_devids():
truncate -s 1G a1 a2 b
A1=$(losetup -f --show a1); A2=$(losetup -f --show a2); B=$(losetup -f --show b)
mkfs.btrfs -f -d single -m single $A1 $A2 $B
cp b b.old
mount $A1 /mnt && btrfs device remove 3 /mnt && umount /mnt
OLD=$(losetup -f --show b.old)
dmsetup create d1 --table "0 $(blockdev --getsz $A1) delay $A1 0 200"
dmsetup create d2 --table "0 $(blockdev --getsz $A2) delay $A2 0 200"
dmsetup create old --table "0 $(blockdev --getsz $OLD) linear $OLD 0"
mount -o device=/dev/mapper/d2,device=/dev/mapper/old /dev/mapper/d1 /mnt &
sleep 1; dmsetup suspend old; wait
dmsetup resume old
touch /mnt/foo # hangs until fsfreeze -u /mnt
That left btrfs frozen in 5 of 5 rounds with the same tables issued
through raw dm ioctls. The -o degraded variant needs the mount held
between the insertion and the bd_fsfreeze_count check in
fs_bdev_register() with a kprobe.
Fixes: cdb5146f8d5f ("fs: look up superblocks via the device table in fs_holder_ops")
Link: https://patch.msgid.link/20261012-work-super-dev_hash-v1-2-305cf71cd334@kernel.org
Signed-off-by: Christian Brauner (Amutable) <brauner@kernel.org>
|
|
git://git.kernel.org/pub/scm/linux/kernel/git/ukleinek/linux
Pull pwm updates from Uwe Kleine-König:
"The usual mix of fixes for older issues, devicetree changes and
cleanups.
Part of this is a shared branch that introduces device-managed
variants of atomic_notifier_chain_register() and
blocking_notifier_chain_register()"
* tag 'pwm/for-7.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/ukleinek/linux:
dt-bindings: pwm: Add IPQ5210 binding
pwm: tiehrpwm: Clear period on disable to allow reconfiguration
pwm: Allow 32-bit tasks to use the character device
pwm: lp3943: fix NULL pointer dereference for an unconfigured channel
pwm: mtk-disp: Fix period readback
pwm: ipq: Prevent potential 32-bit integer overflow in hi_div calculation
pwm: loongson: Reload PWM configuration through counter reset
pwm: Fix typos in comments
dt-bindings: pwm: Convert TI PWM Subsystem to DT schema
docs: pwm: Fix bracket and punctuation
pwm: iqs620a: Use devm_blocking_notifier_chain_register()
pwm: renesas-tpu: Fix runtime PM reference leak
notifier: add device-managed registration APIs
|
|
switches"
Julian Sun <sunjunchao@bytedance.com> says:
This series fixes two issues when moving inodes between writeback
structures:
1. Update dirtied_when rather than dirtied_time_when when inserting an
inode at the newest end of the target dirty list. This maintains the
list ordering without resetting the lazytime expiration timestamp.
2. Clear the source wb's dirty-I/O state and bandwidth contribution when
inode migration leaves its dirty-I/O lists empty.
* patches from https://patch.msgid.link/20261016115230.3640770-1-sunjunchao@bytedance.com:
writeback: clear old wb dirty state after inode switches
writeback: reset dirtied_when when switching wbs
Link: https://patch.msgid.link/20261016115230.3640770-1-sunjunchao@bytedance.com
Signed-off-by: Christian Brauner (Amutable) <brauner@kernel.org>
|
|
LoongArch architecture changes for 7.4 need the acpi changes to add new
features, so merge 'acpi-7.4-rc1' to create a base.
|
|
Merge in late fixes in preparation for the net-next PR.
Conflicts:
net/netfilter/nf_conntrack_netlink.c
cd37ab22a74e0 ("netfilter: nf_conntrack_netlink: fix inverted IPv6 tuple filter")
1ae2d094b0200 ("netfilter: ctnetlink: fix inverted IPv6 address match in dump filter")
Adjacent changes:
drivers/net/ethernet/marvell/octeontx2/af/rvu_nix.c
8830e65ed46de ("net: use assign_bit() where applicable")
07bd391eb957 ("octeontx2-af: Fix CQ enable state tracking after AQ writes")
net/core/sock.c
31c5ea8a3296 ("ipv6: Remove IPV6_ADDRFORM.")
31b564f70d88 ("net: use the full socket in sk_mc_loop()")
net/mptcp/protocol.h
0cb6910130a3 ("mptcp: remove thmac from subflow ctx")
7538fa33bb2f ("mptcp: fix subflow bitfield misuse")
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
|
|
The current memory deposit implementation has a few issues and bugs:
o It is very slow: one of the main contributions to slow VM creations
and boot is many hypercalls repeatedly coming back with insufficient
memory. On Hyper-V, a hypercall returns with such status whenever it
cannot complete due to lack of memory in the hypervisor and needs more.
o Contiguous range requirement is broken, and is critical bug
o An incorrect assumption is made that contiguous memory size would
always be power of 2.
o Two pages are allocated, only one is really needed. Extra alloc adds
to the overhead.
o For a 512 page deposit, the allocation is split into two: one for 511
and second for 1. Thus, an order 9 allocation never happens. A
contiguous 2M range, if possible, greatly improves performance
in the hypervisor as it can be mapped as large page whenever possible.
Also, removing extra allocation reduces overhead in linux.
o Since a page is already allocated to collect the frames, there is
not really a need to use per cpu input page, and hence avoid local
irq disable.
o In hv_call_deposit_pages(), in case of error, under err_free_allocations
label, all pages are freed without checking status to see if some pages
were deposited. This is a critical bug as it would free pages that hyp
may be using.
All of above is addressed by:
o Allocate 2M by default, this is the recommendation from the hypervisor
team, and greatly improves performance. Depositing one or few pages
at a time results in lot of insufficient memory returns from hypercalls.
o Always start with a full 2M range allocation, thus getting contiguous if
available. In cases where possible, the deposits are much faster.
o Allocate only one page in the deposit function and collect 511 pfns
there. Just use a local variable for last pfn.
o Use the page as input to hypercall. Since this page is locally allocated,
irq disable can be avoided helping speed up the deposit.
o Fix the physical contiguous memory enforcement..
o Lastly, remove pre-deposits hv_call_create_vp() and
hv_call_initialize_partition() as they were removed internally while
ago, most likely because they didn't help much.
Signed-off-by: Mukesh R <mrathor@linux.microsoft.com>
Reviewed-by: Souradeep Chakrabarti <schakrabarti@linux.microsoft.com>
Signed-off-by: Wei Liu <wei.liu@kernel.org>
|
|
git://git.kernel.org/pub/scm/linux/kernel/git/driver-core/driver-core
Pull driver core updates from Danilo Krummrich:
"Core:
- Add TAINT_FORCED_BIND to taint the kernel and driver module before
manual sysfs bind/unbind operations; make add_taint_module()
available to driver core and update taint decoding tools and
documentation
- Constify device_show/store_*() attribute parameters and adapt x86
MCE and perf users to prepare for const dev_ext_attribute instances
- Fix UAF in NUMA access node registration failure handling by
dropping the device reference with put_device() instead of directly
freeing the node
debugfs:
- Make debugfs_create_str() read-only to eliminate double-free races
between concurrent writers; reject writable modes; convert
interconnect and SoundWire users to local file operations with
mutex-protected strings
kobject:
- Fix out-of-bounds access in kobject_action_type() when parsing
action strings containing embedded NUL bytes
- Fix the kobject_set_name() reference in kset_register() kernel-doc
Rust:
- DMA:
- Tie Coherent, CoherentBox and CoherentHandle to the device's
bound lifetime to prevent retaining DMA allocations beyond
driver unbind; propagate the lifetime through nova-core and the
DMA sample driver
- I/O:
- Require explicit base types for registers and replace relative
registers with typed subregion projections; reimplement
register!() as a proc macro, support registers using existing
types without inline bitfields, and convert nova-core, Tyr and
the PCI sample; add AsRepr/AsReprMut and transmute helpers with
deferred size checks for representation conversions
- Wrap ResourceSize in a transparent newtype with explicit
conversions, including checked conversion to usize
- PCI:
- Add typed PCIe extended capability lookup and SR-IOV accessors
for the First VF Offset and decoded VF BAR addresses and widths,
keeping raw SR-IOV registers private to preserve PCI core
ownership of their state
- scatterlist:
- Honor the device's maximum segment size as well as the DMA
mapping limit when constructing SG tables
- Return u32 from SGEntry::dma_len() to match the C segment length
type
- misc:
- Validate auxiliary DeviceId name length explicitly to improve
compile-time diagnostics for oversized device ID table entries
- Drop unnecessary 'static bounds from debugfs ScopedDir file
creation methods to support data containing non-'static
references, including DMA buffers
Misc:
- Add Johan Hovold as driver core maintainer
- Simplify platform_device_alloc() by returning early on allocation
failure
- Fix typos in driver core and kernfs comments"
* tag 'driver-core-7.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/driver-core/driver-core: (41 commits)
rust: pci: add extended capability and SR-IOV support
kobject: Fix the kobj_set_name reference in kset_register() kernel-doc
rust: io: convert ResourceSize into a transparent newtype
rust: scatterlist: return u32 from SGEntry::dma_len()
MAINTAINERS: add myself as driver core maintainer
debugfs: make debugfs_create_str() read-only
soundwire: debugfs: replace writable string helper
interconnect: debugfs: replace writable string helper
docs: admin-guide: Handle TAINT_FORCED_BIND when parsing /proc/sys/kernel/tainted
driver core: platform: Simplify platform_device_alloc()
kobject: fix out-of-bounds access in kobject_action_type()
rust: scatterlist: honor the device's maximum segment size
driver core: add TAINT_FORCED_BIND for when userspace manually messes with devices and drivers
module: fix up documentation for add_taint() and add_taint_module()
module: pull out add_taint_module() to be public
driver core: Constify the signature of device_show/store_*()
drivers: perf: Use __DEVICE_ATTR() macro to initialize dev_ext_attribute
x86/mce: Use __DEVICE_ATTR() macro to initialize dev_ext_attribute
rust: auxiliary: validate DeviceId name length
driver core: fix typos in comments
...
|
|
git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm
Pull thermal control updates from Rafael Wysocki:
"These are mostly updates of thermal drivers including a new Exynos
ACPM thermal driver for Google GS101, new Renesas RZ/G3L thermal
sensor support, new Qualcomm MSM8952 TSENS support, new Qualcomm
PMAU0102 Master BandGap temperature monitor support in DT bindings,
and new rugged Panther Lake support in intel_tcc_cooling. Moreover,
the AN7583 driver is extended to register separate thermal zones for
bandgap, GbE and CPU (its DT bindings are updated accordingly).
There are also multiple fixes and assorted cleanups, as usual.
Specifics:
- Make the Intel powerclamp thermal driver reject invalid window_size
values, drop redundant clamp() from duration_set() in it, and
simplify 4 functions in it (Thorsten Blum)
- Add rugged Panther Lake support to the intel_tcc_cooling thermal
driver (Srinivas Pandruvada)
- Fix temperature selection around 0 C in the int340x thermal driver,
drop redundant else from proc_thermal_add() in it, and simplify
slider_def_*_set() in it (Thorsten Blum)
- Drop unbalanced paren from cpu-idle-cooling.rst (Manuel Ebner)
- Use %pe to print error pointers symbolically in the thermal control
code and fix assorted typos in comments in it (Sumeet Pawnikar and
Hemanth Selam)
- Add the Exynos ACPM thermal driver for Google GS101, along with DT
bindings and a MAINTAINERS entry (Tudor Ambarus)
- Add Renesas RZ/G3L thermal sensor support and DT bindings, and move
default calibration values to per-SoC match data (Biju Das)
- Add Qualcomm MSM8952 TSENS support and the corresponding DT binding
compatible (Muzaffer Kadir)
- Document the Qualcomm PMAU0102 Master BandGap temperature monitor
compatible in the DT bindings (Dhruvin Rajpura)
- Extend the QCom TSENS v2 trip temperature limits to the hardware
range of -204°C to +204°C to prevent interrupt storms when
operating beyond the previous software limits (Priyansh Jain)
- Fix temperature threshold map indexing in the QCom SPMI temperature
alarm driver to prevent out-of-bounds reads (Georgi Djakov)
- Describe the additional bus clock required by the Amlogic T7
thermal sensor and switch the driver to the clk_bulk API to manage
multiple clocks (Ronald Claveau)
- Request the Airoha EN7581 IRQ after thermal zone registration to
prevent the interrupt handler from accessing an unregistered or
already freed thermal zone (Vitaliy Sochnev)
- Fix the Airoha AN7583 ADC mux field mapping, serialize access to
the shared ADC, and verify mux selection to avoid invalid
temperature readings and spurious critical shutdowns (Vitaliy
Sochnev)
- Register separate thermal zones for the AN7583 bandgap, GbE and CPU
sensors, and update the DT bindings to use one thermal sensor cell
to select the sensor (Vitaliy Sochnev)
- Fix signed integer overflow in the Renesas RZ/G3E
temperature-to-code conversion, preserve compare interrupt state
across runtime PM, and prevent overlapping temperature conversions
(Ovidiu Panait)
- Remove redundant trip window validation and runtime PM
pm_runtime_mark_last_busy() calls from the Renesas RZ/G3E driver
(Ovidiu Panait)
- Propagate reset assertion failures from Renesas RZ/G3E suspend and
attempt to restore power if the sensor was active (Pengpeng Hou)
- Stop the TI bandgap alert IRQ before removing sensor interfaces and
cancel pending alert work to prevent use-after-free on driver
removal (Weigang He)
- Validate Spreadtrum sensor IDs read from the device tree before
using them for register offsets and array indexing (Weigang He)
- Convert the TI OMAP bandgap DT bindings to schema and document the
DRA752 compatible and thermal sensor cells (Bhargav Joshi)
- Use DT property helpers matching the signed temperature and
unsigned hysteresis types defined by the thermal zone bindings (Rob
Herring)
- Reuse common error handling code in the power allocator governor
bind callback (Markus Elfring)
- Constify the thermal zone device operations in the i.MX9 driver
(Christophe JAILLET)
- Fix kernel-doc parameter names and firmware node references in the
cooling device registration helpers (Aryan Sinha)
- Correct the documented return value of ti_bandgap_get_sensor_data()
to describe validation errors and potentially NULL stored data
(Karl Mehltretter)
- Ensure NUL-termination when copying the cooling device command-line
argument in tmon and fix the associated string truncation warning
(Florian Fainelli)
- Fix undefined behavior caused by a signed shift in the tmon thermal
zone binding display (Liu Jing)
- Fix wording in tmon comments (Hemanth Selam)
- Simplify cpufreq_set_cur_state() in the cpufreq_cooling thermal
control driver (Thorsten Blum)"
* tag 'thermal-7.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: (51 commits)
thermal/drivers/rzg3e: Propagate reset assertion failure from suspend
thermal: ti-soc-thermal: Fix the return value in ti_bandgap_get_sensor_data() kernel-doc
thermal/fw: Fix kernel-doc parameter names
thermal/qcom/tsens: Add support for MSM8952 tsens
dt-bindings: thermal: tsens: Add MSM8952
thermal/drivers/amlogic: Switch to clk_bulk API to support multiple clocks
dt-bindings: thermal: amlogic: describe bus clock for t7-thermal
tools/thermal/tmon: Fix string truncation warning in optarg copy
thermal/drivers/airoha: Register a thermal zone per AN7583 sensor
dt-bindings: arm: airoha: Use one thermal sensor cell for AN7583
thermal/drivers/airoha: Serialise access to the shared ADC
thermal/drivers/airoha: Fix AN7583 ADC mux field mapping
thermal/drivers/sprd: validate the sensor id from the device tree
thermal/drivers/ti-soc-thermal: Cancel pending alert work on remove
thermal/drivers/qcom-spmi-temp-alarm: Fix temp_map indexing
thermal: gov_power_allocator: Use common error handling code in power_allocator_bind()
tools/thermal/tmon: Fix signed shift UB in binding display
MAINTAINERS: Add entry for Samsung Exynos ACPM thermal driver
thermal/drivers/samsung: Add Exynos ACPM TMU driver GS101
dt-bindings: thermal: Add Google GS101 TMU
...
|
|
skb_shinfo(skb)->dataref is split in two 16-bit halves: the lower
one counts all references, the upper one the payload-only (nohdr)
references.
__skb_clone() increments dataref without bound, and skb_cloned()
only checks the low 16 bits. With 65,537 references the low half
reads 1, the head looks private, and pskb_expand_head() (or
skb_unclone(), skb_cow(), ...) frees it while clones still point
to it.
An unprivileged user can reach this from a user and network namespace:
about 32,770 AF_PACKET sockets on lo bring dataref to 0x10001, then
any pskb_expand_head() on the receive path (here a pull of a large
IPv6 Hop-by-Hop header) frees the shared head:
BUG: KASAN: slab-use-after-free in _copy_to_iter+0x187/0x1330
Read of size 1590 at addr ff110001104a9002 by task dataref_wrap/87
skb_copy_datagram_iter+0x60/0x190
packet_recvmsg+0x1f5/0x12b0
__sys_recvfrom+0x18d/0x290
Freed by task 87:
kfree+0xf3/0x3b0
pskb_expand_head+0x344/0xeb0
__pskb_pull_tail+0xf9/0x1bf0
ipv6_parse_hopopts+0x377/0x4f0
ip6_rcv_core+0xc67/0x1620
The upper half never holds more than 1. It is only set by
__skb_header_release(), with atomic_set() on an skb owning its head
(TCP/SCTP output, and GRO which never sees cloned skbs).
__skb_clone() clears nohdr, and __copy_skb_header() does not copy it.
Move SKB_DATAREF_SHIFT to 30, so that the reference count gets 30 bits,
and dataref stays positive. Wrapping it would need 2^30 live clones of
a single skb, which socket buffer limits and memory make unreachable.
This issue was found by Anthropic using Claude, and validated by
Ada Logics.
Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
Reported-by: Stephan Lipp <Stephan@adalogics.com>
Signed-off-by: Eric Dumazet <edumazet@kernel.org>
Link: https://patch.msgid.link/20261020151954.22953-1-edumazet@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
|
git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm
Pull power management updates from Rafael Wysocki:
"This time, the most visible part are the ACPI CPPC updates from
Christian Loehle, including CPPC cpufreq driver changes, even though
updates of cpufreq drivers proper are still the largest topic group.
However, the updates of cpufreq drivers depend on the ACPI CPPC
updates, so they should really be counted together and that is well
over 1/2 of the total commit count.
Interestingly enough, almost all of the updates included here are
fixes or cleanups, with some new feature support in the amd-pstate
cpufreq driver and IPQ9650 support in the qcom-nvmem cpufreq driver.
The runtime PM documentation improvements from Brian Norris can also
be mostly regarded as fixes, but a new kunit test goes along with
them.
Specifics:
- Fix multiple issues related to input validation, synchronization,
access safety, memory layout and register field validation, and
error handling in the ACPI CPPC library (Christian Loehle and Sumit
Gupta)
- Select the frequency-invariance callback per CPU in the CPPC
cpufreq driver and create the FIE worker before enabling PCC
callbacks in it to avoid queueing work through a missing worker and
dereferencing a NULL pointer (Christian Loehle)
- Update the CPPC cpufreq driver entry in MAINTAINERS and add a new
entry for the ACPI CPPC library (Christian Loehle)
- Minor fixes in various cpufreq drivers (Alexander Koskovich, Daniel
Schwierzeck, Frank Zhang, Haotian Zhang, Kathiravan Thirumoorthy,
Sumeet Pawnikar, and Xueqin Luo)
- Fix wrong behaviors on multi-node servers in the Loongson cpufreq
driver (Huacai Chen)
- Reject NULL from cpufreq_cpu_get() in the Rust code (Mehmet
Koseoglu)
- Add suspend OPP to mediatek cpufreq driver and DT (Ryan Brue)
- Fixups for a few bugs identified by Sashiko in the amd-pstate
cpufreq driver (Mario Limoncielloi, Wentao Guan)
- Initial support for maximum frequency capacity handling on Zen6
client in amd-pstate (Mario Limonciello)
- Fix for amd-pstate-ut with 'Requested CPU Min frequency' BIOS
option (K Prateek Nayak)
- New Zen6 tuning values for EPP in amd-pstate (Mario Limonciello,
Vishal Badole)
- amd-pstate documentation fix (Karl Mehltretter)
- Restrict deferred downscaling to low load for shared policies in
the conservative cpufreq governor to avoid undesirable CPU
frequency reduction in some cases (Shengming Hu)
- Serialize sugov_start() against rate limit updates in the schedutil
cpufreq governor to avoid using a stale rate limit value (Hui Su)
- Prevent cpuidle governors menu and teo from returning idle state 0
after it has been disabled (Xueqin Luo)
- Replace min_t() with the better alternatives in the intel_idle
driver and make it use 2-argument strscpy() (Andy Shevchenko)
- Fix two repeated phrase instances in cpuidle (Hemanth Selam,
Syazwina Fazrul)
- Add rugged Panther Lake support to the intel_rapl power capping
driver and make it use %pe for printing error pointers (Srinivas
Pandruvada and Sumeet Pawnikar)
- Update and improve runtime PM documentation and add a kunit test
for supplier idle/suspend (Brian Norris)
- Add a pm_runtime_dont_use_autosuspend() call to pm_runtime_reinit()
to ensure autosuspend disabling on driver teardown (Joshua Crofts)
- Ignore page-zero RAM in E820 checksum during hibernation on x86 to
avoid rejecting images created after kexec() (Matthias Goergens)
- Add resume event mapping for PMSG_POWEROFF to the PM core to allow
it to carry out device shutdown in the future (Mario Limonciello)
- Add DPM watchdog to prepare/late/early/noirq/complete phases of
device suspend and resume (Mayank Rungta)
- Update swsusp.txt references to swsusp.rst in hibernation
documentation (Li Jun)
- Fix use-after-free of perf domain in netlink doit handlers for
energy models (Fan Wu)
- Add synchronize_rcu() back to cpu_pm_unregister_notifier() after it
was removed inadvertently in previous development cycles to avoid
use-after-free (Bradley Morgan)
- Unregister CPU PM notifier outside the timer lock in the
timer-ti-dm clocksource driver (Bradley Morgan)
- Fix typo "sucessfully" in a comment in pm_clk_add_clk() kerneldoc
comment and typo "hierachy" in a comment in pm-graph (Hemanth
Selam)
- Fix the return value in dev_pm_opp_get_of_node() kernel-doc (Karl
Mehltretter)"
* tag 'pm-7.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: (89 commits)
cpufreq: loongson3: Replace IOCSR read/write with MMIO ones
cpufreq: loongson3: Use global physical CPU ID in get/target callbacks
cpufreq: loongson3: Replace per-package mutex with per-node
cpufreq: loongson3: Adjust the width of id and val in smc_message
cpufreq: loongson3: Make this driver depend on MACH_LOONGSON64
PM: runtime: Expand introduction with core concepts and structure
cpufreq: schedutil: Serialize sugov_start() against rate limit updates
MAINTAINERS: ACPI: Add a separate CPPC entry
MAINTAINERS: cpufreq: Replace CPPC reviewer
arm64: dts: mediatek: mt8173: Mark the lowest CPU OPPs for suspend
cpufreq: mediatek: Enter system sleep at the suspend OPP
cpufreq: qcom-cpufreq-hw: fix device node refcount leak in phandle parsing
cpufreq: qcom-nvmem: Add IPQ9650 support
cpufreq: Add Milos to cpufreq-dt-platdev blocklist
cpufreq: Use %pe to print error pointers symbolically
rust: rcpufreq_dt: add module alias
cpufreq: sti: avoid NULL dereference in dev_err()
cpufreq: tegra194: fix double-pointer error in get_cpu_ndiv
cpufreq: sparc-us2e: fix frequency table index copy-paste error
rust: cpufreq: reject NULL from cpufreq_cpu_get()
...
|
|
Follow the object_action() naming convention for netmem non-page_pool
reference helpers by renaming get_netmem() and put_netmem() to
netmem_inc_ref() and netmem_dec_ref().
Use netmem_inc_ref() and netmem_dec_ref() rather than netmem_ref() and
netmem_unref() because netmem_ref is already a typedef (typedef unsigned
long __bitwise netmem_ref).
Suggested-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Mina Almasry <almasrymina@google.com>
Link: https://patch.msgid.link/20261021015558.4124825-3-almasrymina@google.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
|
Follow the object_action() naming convention for net_iov non-page_pool
reference helpers by renaming get_net_iov() and put_net_iov() to
net_iov_inc_ref() and net_iov_dec_ref(), and renaming
net_devmem_get_net_iov() and net_devmem_put_net_iov() to
net_devmem_net_iov_inc_ref() and net_devmem_net_iov_dec_ref().
Use *_inc_ref() and *_dec_ref() rather than *_ref() and *_unref() to
pair symmetrically with netmem_inc_ref() and netmem_dec_ref() (since
netmem_ref is already the typedef for the generic network memory
handle).
Suggested-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Mina Almasry <almasrymina@google.com>
Link: https://patch.msgid.link/20261021015558.4124825-2-almasrymina@google.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
|
The RK3568 SoC integrates a Synopsys DesignWare XPCS that is accessed
via APB3 memory-mapped registers. This driver provides the glue logic
to make the XPCS accessible to the generic pcs-xpcs core.
The XPCS block contains four MII ports (0..3). On RK3568 the MII port
used by SGMII follows the MAC it is routed to: GMAC0 maps to port 0 and
GMAC1 maps to port 1. The glue driver receives the port index from the
MAC side and passes it to xpcs_create_mdiodev().
The hardware maps these ports to different MMDs:
- port 0: MMD 7 (ROCKCHIP_MMD_MII)
- port 1: MMD 2 (ROCKCHIP_MMD_MII1)
- port 2: MMD 3 (ROCKCHIP_MMD_MII2)
- port 3: MMD 4 (ROCKCHIP_MMD_MII3)
This driver creates a virtual MDIO bus that translates MDIO operations
to APB3 register accesses, with proper address remapping for each port.
The generic xpcs driver then creates a phylink_pcs instance on top of
this bus, allowing the MAC to use the PCS via the standard phylink API.
The generic XPCS platform glue (pcs-xpcs-plat.o) is split out of the
pcs_xpcs composite object into its own module, gated behind the new
PCS_XPCS_PLATFORM symbol. There is no in-tree user of the generic
snps,dw-xpcs glue that would need it selected by default, so the symbol
has no default and platforms that need it select it explicitly.
PCS_XPCS_ROCKCHIP selects GENERIC_PHY and PM_GENERIC_DOMAINS.
ARCH_ROCKCHIP already selects PM, so the dependency of PM_GENERIC_DOMAINS
on PM is satisfied on the target platform.
The EEE multiplier is derived at runtime from the EEE clock rate instead
of being hardcoded, because the clock is muxed between gpll200 (200 MHz)
and cpll125 (125 MHz) and can be changed by the board or firmware. A
64-bit intermediate avoids overflow on 32-bit builds, and the result is
clamped to the 4-bit DW_VR_MII_EEE_MULT_FACT_100NS field.
Power management
================
The XPCS, its SerDes PHY and the SATA/PCIe controllers share the PD_PIPE
power domain on RK3568. genpd powers the domain down during system
suspend once every consumer is suspended, which also kills the SerDes
and the XPCS.
Boards that rely on MAC WoL need the PCS and SerDes alive to receive
magic packets, so PD_PIPE must stay powered across system suspend. Keep
it on by marking the XPCS as part of the wakeup path via
device_set_wakeup_path(). genpd then leaves the domain powered, because
the Rockchip power domain driver sets GENPD_FLAG_ACTIVE_WAKEUP on
PD_PIPE, which makes genpd check the wakeup path of its consumers during
system suspend.
This is unconditional because the XPCS core currently has no platform
callback through which a consumer could convey the MAC WoL state, and
the state itself is dynamic: WoL is toggled at runtime via ethtool, so
a static DT property cannot express it either. The affected hardware
is limited to RK3568 boards using SGMII, which are always-on routers
where system suspend is not a realistic use case; the extra power draw
is therefore acceptable.
Runtime PM is unaffected: the runtime callbacks only gate the CSR clock,
and dev_pm_genpd_rpm_always_on() already keeps PD_PIPE on at runtime.
Link: https://dl.radxa.com/rock3/docs/hw/datasheet/Rockchip%20RK3568%20TRM%20Part1%20V1.1-20210301.pdf (Page 59, CRU_CLKSEL_CON29)
Link: https://dl.radxa.com/rock3/docs/hw/datasheet/Rockchip%20RK3568%20TRM%20Part2%20V1.1-20210301.pdf (Page 2078)
Signed-off-by: Coia Prant <coiaprant@gmail.com>
Link: https://patch.msgid.link/20261017054406.1828061-4-coiaprant@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
|
Expose the phy_port information to userspace, so that we can know how
many ports are available on a given interface, as well as their
capabilities. For MDI ports, we report the list of supported linkmodes
based on what the PHY that drives this port says.
For MII ports, i.e. empty SFP cages, we report the MII linkmodes that we
can output on this port.
Tested-by: Aleksei Sviridkin <f@lex.la>
Reviewed-by: Christophe Leroy (CS GROUP) <chleroy@kernel.org>
Tested-by: Christophe Leroy (CS GROUP) <chleroy@kernel.org>
Signed-off-by: Maxime Chevallier <maxime.chevallier@bootlin.com>
Link: https://patch.msgid.link/20261016133107.54054-10-maxime.chevallier@bootlin.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
|
Ethernet network interfaces may have more than one front-facing port.
The phy_port infrastructure was introduced to keep track of
these ports, and allow userspace to know about the presence and
capability of these ports. Add a ethnl netlink message to report this
information.
Reviewed-by: Christophe Leroy (CS GROUP) <chleroy@kernel.org>
Signed-off-by: Maxime Chevallier <maxime.chevallier@bootlin.com>
Link: https://patch.msgid.link/20261016133107.54054-9-maxime.chevallier@bootlin.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
|
In order to allow netlink access to phy_ports, let's add a helper to
retrieve them. When handling a port coming from phy_link_topology, the
caller must hold rtnl until it's done with it.
We don't really support PHY and phy_port operation on ops-locked devices
yet, warn when we try to do so on such an interface.
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Tested-by: Aleksei Sviridkin <f@lex.la>
Reviewed-by: Christophe Leroy (CS GROUP) <chleroy@kernel.org>
Tested-by: Christophe Leroy (CS GROUP) <chleroy@kernel.org>
Signed-off-by: Maxime Chevallier <maxime.chevallier@bootlin.com>
Link: https://patch.msgid.link/20261016133107.54054-8-maxime.chevallier@bootlin.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
|
MII phy_ports are not meant to be connected directly to a link partner.
They are meant to feed into some media converter devices that will
expose an MDI phy_port, so far we only support SFP modules for that.
In the case an MDI phy_port is backed by an MII port (e.g. a SFP
module's port, backed by the SFP cage port), let's keep track of the
port id of the MII port backing it.
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Tested-by: Aleksei Sviridkin <f@lex.la>
Reviewed-by: Christophe Leroy (CS GROUP) <chleroy@kernel.org>
Tested-by: Christophe Leroy (CS GROUP) <chleroy@kernel.org>
Signed-off-by: Maxime Chevallier <maxime.chevallier@bootlin.com>
Link: https://patch.msgid.link/20261016133107.54054-7-maxime.chevallier@bootlin.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
|
Now that the SFP bus infrastructure notifies when PHY-less modules are
connected, we can create a phy_port to represent it. Instead of letting
the SFP subsystem handle that, the Bus' upstream is in charge of
maintaining that phy_port and register it to the topology, as the
upstream (in this case a phy device) is directly interacting with the
underlying net_device.
Add a phy_caps helper to get the achievable modes on this module based
on what the phy_port representing the bus supports.
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Tested-by: Aleksei Sviridkin <f@lex.la>
Reviewed-by: Christophe Leroy (CS GROUP) <chleroy@kernel.org>
Tested-by: Christophe Leroy (CS GROUP) <chleroy@kernel.org>
Signed-off-by: Maxime Chevallier <maxime.chevallier@bootlin.com>
Link: https://patch.msgid.link/20261016133107.54054-6-maxime.chevallier@bootlin.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
|
phy_port is aimed at representing the various physical interfaces of a
net_device. They can be controlled by various components in the link,
such as the Ethernet PHY, the Ethernet MAC, and SFP module, etc.
Let's therefore make so we keep track of all the ports connected to a
netdev in phy_link_topology. The only ports added for now are phy-driven
ports.
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Tested-by: Aleksei Sviridkin <f@lex.la>
Reviewed-by: Christophe Leroy (CS GROUP) <chleroy@kernel.org>
Tested-by: Christophe Leroy (CS GROUP) <chleroy@kernel.org>
Signed-off-by: Maxime Chevallier <maxime.chevallier@bootlin.com>
Link: https://patch.msgid.link/20261016133107.54054-3-maxime.chevallier@bootlin.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
|
git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm
Pull ACPI support updates from Rafael Wysocki:
"The most significant change here is the rework of the core ACPI device
enumeration code to avoid initializing ACPI power management
prematurely for devices with unmet dependencies. This essentially is a
problem fix, but it requires taking PCI device enumeration ordering
into account among other things, so it is far from straightforward.
There was an attempt to do this in the 7.3 time frame that had to be
reverted, so this time it is done much more carefully.
There is also an ACPI thermal control update rearranging the code to
register thermal class cooling devices under specific parents, which
is visible in sysfs. This helps to figure out what is represented by
those devices much more easily, but it also allows the binding of
cooling devices to trip points in thermal zones to be adjusted so it
need not rely on specific cooling device data usage in thermal
drivers.
From the number of commits perspective, the most visible part is the
one replacing acpi_get_first_physical_node() with
acpi_bus_get_primary_device() everywhere and dropping the former that
was inherently racy and generally unsafe to use. Fortunately, the
maintainers involved responded timely and all of that could be done
within one development cycle.
Another quite visible part is Dave Jiang's series fixing multiple
issues reported by Sashiko in the ACPI APEI support code with a PCI
AER improvement on top. It took several iterations of this to make
Sashiko happy and the code in question should be much more robust
going forward.
One other thing worth mentioning separately is that the ACPI bus type
is now going to be registered as a "companion" one and it will not be
possible to register a driver binding directly to a struct
acpi_device. All of the existing users of those drivers in the tree
were converted to platform drivers in the previous cycles, so this is
just a final step in a longer journey.
Apart from the above, there are many fixes, mostly in drivers, with a
noticeable exception of a fix in the code binding devices to their
ACPI companions, new IOVT IOMMU support in ACPICA, new _Ixx object
support for suspend-to-idle on x86, multiple new quirks, mostly
related to unused ACPI power resources and backlight handling, and
assorted cleanups.
Specifics:
- Make the core ACPI device enumeration code stop attempting to
initialize ACPI power management for devices before they are known
to be present and functional (Rafael Wysocki)
- Simplify and clean up the core ACPI device enumeration code on top
of the previous adjustment and reduce debug noise coming from it
(Rafael Wysocki)
- Fix locking in the code binding devices to their ACPI companions,
prevent it from replacing a valid ACPI companion pointer with NULL
incidentally, improve its messaging (including debug noise
reduction), and reduce its overhead by making it skip the cases in
which no ACPI companion may exist early (Rafael Wysocki)
- Reduce runtime memory footprint of struct acpi_device by
rearranging fields in it (Andy Shevchenko)
- Update the driver core to allow bus types without drivers to be
registered as "companion bus types" without driver-related sysfs
attributes and register the ACPI bus type as a companion one
(Rafael Wysocki)
- Use strscpy() instead of strcpy() in the ACPI sysfs interface
(Ruslan Vagner)
- Remove __meminitdata from hmat_adist_nb declaration preserving it
even when CONFIG_MEMORY_HOTPLUG is not set to prevent notifier
chain corruption in some cases (Alejandro Lucero)
- Prevent a NULL pointer dereference when attempting to read the
table length after a mapping bookkeeping failure during an initrd
override invocation with permanent table mappings enabled (Slavin
Liu)
- Use for_each_populated_zone() in get_node_num() in the MRRM table
pareser (Sang-Heon Jeon)
- Use vsnprintf() in acpi_os_vprintf() to prevent memory corruption
resulting from overly long diagnostic messages that may not fit
into a static buffer used by ACPICA and may be produced by a
malformed ACPI table (Vlatko Kosturjak)
- Ignore leading root scope prefix in string _UID match to allow AMD
IOMMU matching to work as expected in some cases (Mario
Limonciello)
- Adjust message printing macros for ACPI objects to use dev_fmt()
for more consistency with the analogous dev_*() macros (Rafael
Wysocki)
- Add _Ixx GPE wake indicator support to the x86 suspend-to-idle
handling code (Saranya Gopal)
- Clear driver_data before free in the ACPI PCI Link driver to
prevent a dangling pointer from being used later (Jiale Yao)
- Accumulate the queued flag across error sections of a CPER record
in ghes_do_proc() to prevent it from being cleared by a later
section or entry that does not queue memory-failure work (Breno
Leitao)
- Map a raw PCI AER Capability image field by field to prevent
information loss from occurring while processing it (Dave Jiang)
- Update a stale driver source reference in the ACPI APEI EINJ driver
documentation (Prabhakar Pujeri)
- Reject CPER records with an out-of-range error_data_length or an
error status block length wrapping a u32 in the EFI CPER driver
(Dave Jiang)
- Address multiple assorted issues in the ACPI extlog driver (Dave
Jiang)
- Address two issues related to CXL in the ACPI APEI GHES driver
(Dave Jiang)
- Read only validated fields in cper_mem_err_pack() (Dave Jiang)
- Validate memory error section length before payload access, prevent
writes past array bounds from occurring and sanitize software
metadata in the ACPI APEI GHES driver (Dave Jiang)
- Make cxl_cper_handle_prot_err() static (Dave Jiang)
- Add IOVT IOMMU support to ACPICA (Bibo Mao)
- Fix PCC OperationRegion command offsets in ACPICA (Sudeep Holla)
- Fix memory leak in acpi_ds_create_field() related to the handling
of internal_pcc_buffer allocations (Breno Leitao)
- Fix memory leak due to leftover devm_kcalloc() argument in the ACPI
fan driver (Rafael Wysocki)
- Fix backlight unregistration ordering in the ACPI video bus device
driver (Rafael Wysocki)
- Update the thermal core to allow the registration of thermal class
cooling devices under specific parents and convert the ACPI fan,
ACPI processor, and ACPI video bus device drivers to do so (Rafael
Wysocki)
- Adjust the ACPI thermal zone driver to use thermal class cooling
device parent information for binding cooling devices to trip
points in thermal zones (Rafael Wysocki)
- Use cooling device data that is a better match for a given driver
instead of a struct acpi_device pointer that had to be used for
this purpose previously in the ACPI fan and processor drivers
(Rafael Wysocki)
- Fix acpi_thermal_guess_offset() in the ACPI thermal zone driver for
thermal zone devices with a 273.0°K offset (Hans de Goede)
- Define a free for ACPI objects allocated by ACPICA helpers and use
it to simplify AML error handling in the ACPI fan driver (Rafael
Wysocki)
- Switch over the users of acpi_get_first_physical_node(), that was
inherently racy and therefore not really safe to use, to use its
replacement acpi_bus_get_primary_device(), and eliminate the former
(Rafael Wysocki)
- Add !CONFIG_ACPI stubs for acpi_find_child_device() and
acpi_device_uid() (Mario Limonciello and Robin Murphy)
- Fix bogus cycle count values on systems without _BIX in the ACPI
battery driver (Armin Wolf)
- Fix NULL pointer dereference on allocation failure and report
relative state of charge as CAPACITY in the ACPI SBS driver (Itay
Shem-tov and Guangshuo Li)
- Add lid_init_state quirk for Razer Blade Stealth 13 (Early 2020)
RZ09-0310 to the ACPI button driver (Ian Gallagher)
- Add new quirks to force the native backlight on Dell OptiPlex AIO
7410 35W and Acer Nitro AN515-58 in the ACPI video bus device
driver (Chitransh Mandhaniya and Dirga Yuza)
- Fix the shared memory signature handling in the ACPI PCC address
space handler, free the PCC mailbox channel on operation region
deactivation, and avoid unnecessary repeated computations of the
PCC operation region command timeout (Sudeep Holla)
- Fix a log message typo in the ACPI NUMA support code (Hemanth
Selam)
- Zero-initialize capability query result in the ACPI Platform
Firmware Runtime Update and Telemetry driver to avoid disclosure of
kernel stack data to user space (Karl Mehltretter)
- Replace the remaining built-in/module check for CONFIG_ACPI_WMI in
a header file with IS_ENABLED() macro (Lalit Shankar Chowdhury)
- Retry probing battery docks after hotplug in the ACPI docking
station driver to avoid missing ACPI add notifications (Vibhor
Goel)
- Detach device after resource transition failure in
pnp_device_probe() to avoid blocking later manual PNP configuration
attempts (Myeonghun Pak)"
* tag 'acpi-7.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: (90 commits)
ACPI: PM: Add Acer Aspire A515-53G to dmi_leave_unused_power_resources_on[]
ACPI: video: force native backlight on Dell OptiPlex AIO 7410 35W
ACPI: PM: sleep: Drop unused sleep_no_lps0 define
ACPI: PM: Add unused power resource quirk for Casper Excalibur G900
ACPI: dock: Retry probing battery docks after hotplug
ACPI: PCI: pci_link: clear driver_data before free
ACPI: APEI: accumulate the queued flag across error sections
ACPICA: actbl2.h: Add bit constants of the Flags field in the IOVT IOMMU structure
ACPI: bus: Drop acpi_get_first_physical_node()
efi/dev-path-parser: Switch to use acpi_bus_get_primary_device()
ALSA: hda: tas2781: Switch to use acpi_bus_get_primary_device()
ALSA: hda: cs35l41: Switch to use acpi_bus_get_primary_device()
iommu/arm-smmu-v3: Switch to use acpi_bus_get_primary_device()
PCI/AER: Map a raw AER Capability image field by field
ACPI: NUMA: fix typo in log message
ACPI: Add stub for acpi_find_child_device()
driver core/ACPI: Introduce companion_bus_register()
ACPI: PCC: Cache OpRegion command timeout
ACPI: PCC: Free channel on OpRegion deactivation
ACPI: PCC: Preserve shared memory signature in OpRegion handler
...
|
|
git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull VDSO updates from Thomas Gleixner:
"Updates for the VDSO subsystem:
- Ensure that the CLOCK_AUX base calculations are properly scaled
against the base timekeeper. The update function failed to take the
fractional nanosecond part into account, which results in a
rounding error.
- Cleanup and consolidate the vsyscall headers to get rid of
pointless copies all over the architectures.
- Replace a runtime conditional in the time getter function for
namespaced clocks by simple pointer arithmetic which speeds up the
read function"
* tag 'timers-vdso-2026-10-20' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
vdso/vsyscall: Keep the CLOCK_AUX base scaled
vdso/math64: Add and use __iter_div64_u64_rem()
vdso/math64: Use OPTIMIZER_HIDE_VAR() in __iter_div_u64_rem()
vdso/gettimeofday: Avoid runtime conditional in do_hres_timens()
vdso: Remove __ASSEMBLER__ guards from vsyscall.h
vdso: Add asm-generic/vdso/vsyscall.h
vdso: Remove unnecessary vdso/vsyscall.h includes
riscv/hwprobe: Include vdso/datapage.h
arm64/vdso: Delete asm/vdso/vsyscall.h inclusions
x86/vdso: Delete asm/vdso/vsyscall.h inclusions
sparc/vdso: Delete asm/vdso/vsyscall.h inclusion
s390/vdso: Delete asm/vdso/vsyscall.h inclusions
sparc/vdso: Move __VDSO_PAGES to asm/vdso.h
x86/vdso: Move vDSO page definitions to asm/vdso.h
vdso: Delete asm-generic/vdso/vsyscall.h
vdso/vsyscall: Define fallback time synchronization functions in vsyscall.c
vdso/getrandom: Define fallback __arch_get_vdso_u_rng_data() in getrandom.c
vdso/gettimeofday: Define fallback __arch_get_vdso_u_time_data() in gettimeofday.c
vdso: Move the kernel-side time update helpers to a new header
|
|
git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull NOHZ updates from Thomas Gleixner:
"Updates for the tick/NOHZ machinery:
- Add the BLOCK_SOFTIRQ to the hotplug safe local softirq pending
mask to prevent false positive error messages. A BLOCK_SOFTIRQ can
be pending when a CPU goes offline as the subsequent cleanup will
take care of the outstanding completions.
- Remove a few redundant invocations of local_irq_save/restore() and
timekeeping_max_deferment() to speed up the NOHZ idle transitions"
* tag 'timers-nohz-2026-10-20' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
tick/nohz: Avoid unused timekeeping_max_deferment() calls
tick/nohz: Remove redundant local_irq_save()/restore()
tick/nohz: Add BLOCK_SOFTIRQ to the hotplug safe mask
|
|
git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull timer core updates from Thomas Gleixner:
"Updates for the core timekeeping and timers subsystem:
- Futher cleanups for the POSIX timer exit/exec related code to
simplify the code flow and to make it more robust against future
changes.
- Prevent tearing of timekeeper::ktime_sec which can be accessed
without the sequence count protection.
The timekeeper is updated by memcpy() with an uneven sequence count
to force readers into the retry path. On 64-bit machine the
ktime_sec member can be accessed atomically without the sequence
count protection. That is only correct when the update side
memcpy() guarantees atomicity at the 64-bit granularity. That's not
guaranteed due to debug options, compilers and instruction
availability. If the memcpy() does not provide the atomicity then
the unprotected readers can observe store tearing.
To prevent this write the ktime_sec member before the memcpy() so
that a non-atomic memcpy() will write the same data. A similar fix
has been done for the xtime_sec member, but the ktime_sec
equivalent was missed.
- Prevent time64_to_tm() day truncation on 32-bit kernels
The function receives a 64-bit seconds value but stores the
quotient of the computation in a long, which truncates the result
for large input values. Cure this by using div_s64_rem() which
stores the quotient in s64 and only leaves the seconds-within-day
reminder in a long, which is guaranteed to fit. This fix comes with
a corresponding kunit test to prevent further mishaps.
- Mark data-racy accesses to the hrtimer_sleeper::task member.
The recent updates to KCSAN flagged these benign races. Annotate
them with new helper functions, convert all existing usage sites
and mark the task member private after that so that future users
which fail to use the helpers can be detected automatically.
- Address similar benign KCSAN flagged issues in the hrtimer, timer
and timer migration code.
- Fixes for a few selftest issues"
* tag 'timers-core-2026-10-20' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (26 commits)
selftests/timers: clocksource-switch: Fix unchecked open()/read()
selftests: timers: Measure the CPU timers on the clock they count
selftests: timers: Count what tick is worth in the drift estimate
time/kunit: Add time64_to_tm() case beyond 32-bit day count
time: Prevent time64_to_tm() day truncation on 32-bit
timekeeping: Use READ_ONCE/WRITE_ONCE() for ktime_sec to prevent tearing
timers/migration: Mark racy updates to tmigr_event::ignore field
timers: Mark racy updates to hlist_node::pprev field
hrtimer: Apply READ_ONCE() to lockless base->running loads
hrtimer: Mark the hrtimer_sleeper structure's ->task field __private
hrtimer: Update hrtimer_resolution only if value changes
futex: Use accessor for hrtimer_sleeper ->task field in requeue
rtmutex: Use accessor for hrtimer_sleeper ->task field
net: pktgen: Use accessor for hrtimer_sleeper ->task field
timers: Use accessor for hrtimer_sleeper ->task field in sleep_timeout.c
futex: Use accessor for hrtimer_sleeper ->task field in waitwake.c
io-uring/rw: Use accessor for hrtimer_sleeper ->task field
wait: Use accessor for hrtimer_sleeper ->task field
aio: Use accessor for hrtimer_sleeper ->task field
hrtimer: Mark data-racy accesses to hrtimer_sleeper ->task field
...
|
|
git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull clocksource updates from Thomas Gleixner:
"Updates for clocksource and clockevent drivers:
- Support for the Renesas RZ/N1 timers
- Rework of the per CPU and per cluster MIPS GIC timers to improve
performance, sched clock precision and to add VDSO support.
- The usual assorted pile of small fixes and improvements all over
the place"
* tag 'timers-clocksource-2026-10-20' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
clocksource/drivers/timer-ti-dm: Handle runtime resume failure
clocksource/drivers/timer-mediatek: Request and enable the bus clock
clocksource/drivers/timer-mediatek: Convert to OF probing
clocksource/drivers/timer-mediatek: Fix random crash at boot
clocksource/drivers/timer-econet-en751221: Fix clock reference leak
clocksource/drivers/digicolor: Fix clk reference leak on request_irq failure
clocksource/drivers/fttmr010: Fix clk reference leak in error paths
clocksource/drivers/dbx500-prcmu: Check timer register mapping
clocksource/drivers/timer-ti-dm: Register clocksource/event only for am654
clocksource/drivers/mips-gic-timer: Use local counter on synced multi-cluster systems
clocksource/drivers/mips-gic-timer: Simplify gic_next_event() for per-cpu timer
MAINTAINERS: Add the Renesas RZ/N1 timers driver entry
clocksource/drivers: Add support for the Renesas RZ/N1 timers
dt-bindings: timer: Add the Renesas RZ/N1 timer
|
|
git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull irq chip driver updates from Thomas Gleixner:
"Updates for interrupt chip drivers:
- Remove the futile attempts to cleanup resources when the probing of
the main interrupt chip fails for SiFIVE/PLIC devices. If that
probe fails the system will stall immediately afterwards in the
boot process without reaching a state where the error could be
diagnosed. The lack of resource cleanup led to a frenzy of AI
detected/assisted "fixes" which just make the code pretend to be
correct for no value.
Remove the existing half baked cleanup and immediately panic the
machine when the probe fails. That's far more useful than letting
it proceed and stall out a millisecond later with no information
about the root cause.
- A series of fixes for the ARM GIC-V3 driver addressing a potential
double free, a bitmask overrun on 32-bit ARM and a OF node leak.
- Automatically set the IRQ_DOMAIN_FLAG_DESTROY_GC when a interrupt
domain is created that also allocates the generic interrupt chip
during domain creation. That removes the requirement for manually
setting the flag in the domain creation info structure when it
contains a valid entry for allocating the generic interrupt chip.
Remove the therefore redundant setters of
IRQ_DOMAIN_FLAG_DESTROY_GC in the existing drivers.
- Add support for Annapurna Labs FIC version 2 and 3 and implement
affinity control for the demultiplexed interrupts by utilizing the
recently merged interrupt redirection infrastructure.
- Convert the ACPI device ID structures to named initializers
- Consolidate the IPI related constants for RISC-V interrupt
controllers
- Add support for Qualcomm Purwa SoC interrupt chip and consolidate
the workaround for the previous version in Hamoa SoCs.
- The usual small fixes and improvements all over the place"
* tag 'irq-drivers-2026-10-20' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (61 commits)
irqchip/al-fic: Support per-child affinity via interrupt redirection
irqchip/al-fic: Add support for FIC v3
irqchip/al-fic: Support error and fatal outputs and FIC v2
dt-bindings: interrupt-controller: amazon,al-fic: Add mask selection
irqchip/al-fic: Switch to shared parent interrupt
irqchip/al-fic: Keep the device_node instead of a cached name string
irqchip/al-fic: Use %pOF and raise init log level
irqchip/al-fic: Use %pe to print init error
irqchip/al-fic: Fix coding style issues
irqchip: Use named initializers for acpi_device_id
irqchip/gic-v5: Fix standalone IRSes OF probe
dt-bindings: interrupt-controller: gicv5: Relax IRS properties constraints
irqchip/renesas-rzv2h: Preserve TIEN state in rzv2h_tint_set_type()
irqchip/loongson-eiointc: Use pa_to_nid() rather than hard-code
irqchip/riscv-imsic: Expose the fwnode via the global config
irqchip/meson-gpio: Allow the GPIO interrupts to wake the system
irqchip/gic-v3: Ensure change to DS is visible
irqchip/mips-gic: Transfer interrupt mask state across clusters
irqchip/mips-gic: Fix recursive acquisition of gic_lock in gic_set_affinity()
irqchip/mips-gic: Fix unbalanced cm_core_lock in for_each_online_cpu_gic()
...
|
|
git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull irq updates from Thomas Gleixner:
"Updates for the generic interrupt subsystem:
- Skip programming of MSI/MSI-X related data while a PCI channel is
offline (Link is down) in the error recovery code path. Accessing
an offline channel results in a BUS error which affects the
underlying Root Port.
Check for pci_channel_offline() and if true avoid the writes and
just cache the modifications which are subsequently applied when
the Link has recovered.
- Prevent a stack UAF when a faulting interrupt thread exits. On X86
the crash causes the stack to be discarded, which contains the
callback head for the exit task_work to run the destructor. If the
stack is clobbered before the destructor runs, then the indirect
call of the task work function ends up in a random place. Move the
callback head into the interrupt action to prevent that.
- Prevent an UAF in the interrupt thread exit code which can happen
when a faulting interrupt thread exits and races with a concurrent
free_irq() by synchronizing free_irq() against thread exit.
- Ensure that interrupt context accounting is accurate on interrupt
return when checking for soft interrupt invocation.
The code removed the hard interrupt context prematurely so that the
subsequent code appeared to be in task context according to the
preempt counter. That confuses ftrace, perf and K*SAN which get
their recording context wrong. On Preempt-RT this can result in
misbehaviour when BPF programs are attached to the affected region.
Cure it by preserving the hard interrupt count up to the point
where soft interrupts are actually invoked and switch directly to
soft interrupt processing right there. That avoids the intermediate
"in task context" state.
- The usual small fixes and improvements"
* tag 'irq-core-2026-10-20' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
genirq/proc: Fix missing CPU header in /proc/interrupts
PCI/MSI: Skip MSI/MSI-X programming while the channel is offline
genirq: Fix typos in comments
genirq: Move interrupt thread exit_work object to irqaction
genirq: Defer kfree(irqaction) until irq_thread_dtor() finishes
softirq: Preserve interrupt context on return from interrupt
softirq: Remove redundant h->action from preempt_count mismatch error
genirq: Discard cpumask of irqaffinity= boot parameter if parsing fails
|
|
git://git.kernel.org/pub/scm/linux/kernel/git/kbuild/linux
Pull Kbuild / Kconfig updates from Nathan Chancellor:
"Kbuild:
- Suppress compiler flags in debug info for external module builds
- Use '-fmacro-prefix-map' in more places in the build
- Merge initial set of changes from Lorenzo's speed up series, along
with some fixes found through testing:
- Avoid allocating .modinfo in vmlinux
- Speed up kallsyms by indexing symbols by token and outputting
binary data to disk directly then including in assembly via
.incbin
- Don't sort $(NM) output when unnecessary
- Only emit relocations on the final vmlinx link
- Reimplement mksysmap in C
- Move many cc-option and ld-option calls into the Kconfig stage to
cache their results
- Use pigz for gzip compression when available
- Move gen_init_cpio and gen_initramfs.sh from usr/ to scripts/
- Add a TOML configuration to scripts/container and update
documentation accordingly
- Add a generic, opt-in mechanism for checking that headers can
compile standalone
- Update machine function splitting argument for LLVM 24 rename in
AutoFDO build
- Miscellaneous minor clean ups, fixes, and hardening, mostly
found/fixed via LLMs
Kconfig:
- Turn recursive ranges into an error
- Fix savedefconfig for defaults that were adjusted for being out of
range and revert a previously applied workaround
- Improvements and hardening around integer and hexadecimal values
- Emit a warning when selecting or implying a choice symbol, which
has no effect
- Emit a warning when KCONFIG_PROBABILITY is malformed
- Introduce def_string / def_int / def_hex to mirror the existing
def_bool / def_tristate to succinctly set a value and type at the
same time.
- Add cc-option-str and ld-option-str macros to act like Kbuild's
cc-option and ld-option, returning the string when the option is
supported, allowing many checks to be moved into Kconfig
- Minor usability improvements to Kconfig tests"
* tag 'kbuild-7.4-1' of git://git.kernel.org/pub/scm/linux/kernel/git/kbuild/linux: (59 commits)
kbuild: AutoFDO: Update split machine function argument for upstream rename
kbuild: Mark the initcall ordering recipe as recursive
kbuild: Mark the gzip recipes as recursive
localmodconfig: Explicitly report boolean configs during integrity check
scripts/make_fit: Ignore schema checks when decomposing DTBs
clang-tools: Import os for broken pipe handling
kconfig: use the value argument in sym_get_near_range_bound()
kconfig: fix infinite loop in conf_choice() when no choice value is visible
kconfig: cleanup stale comment about 'keys' array
kconfig: Improve ergonomics around disabling warnings with cc-option
scripts/Kconfig.toolchain: Drop compiler symbols from dependencies
checkkconfigsymbols.py: Parse Git status output line by line
gen_init_cpio: stop parsing on lines with a missing argument list
.gitignore: drop Module.markers
.gitignore: ignore pacman package signatures
kbuild: add header check facility as a manually run static analyzer
Documentation: dev-tools: refer to user ID rather than id
Documentation: dev-tools: update container.rst with config file
scripts: add TOML config to container tool
kconfig: tests: {old,save}defconfig: Forward dynamic keyword arguments
...
|
|
git://git.kernel.org/pub/scm/linux/kernel/git/ojeda/linux
Pull Rust updates from Miguel Ojeda:
"Toolchain and infrastructure:
- Update vendored 'zerocopy' crate to v0.8.62 (released 2026-10-08).
This update advances 8 releases, with 3 of them carrying most of
the changes. It contains new features as well as fixes. However,
almost nothing has changed that requires updates on our side (a
move of our non-ASCII change and the addition of an SPDX license
identifier).
- Generate Rust KUnit test suites for doctests reusing the
'#[kunit_tests]' and '#[test]' attributes instead of C FFI
functions, which allows to remove the generated C glue file.
Relatedly, simplify 'kunit_assert!' by using 'file!()' and
'line!()' inside (which doctests override as needed), which allows
to remove the 'file' helper and 'CONFIG_RUSTC_HAS_SPAN_FILE'.
- Trim the function names in doctests generated by 'rustdoc' < 1.95.0
when building with 'O=', which were not reproducible.
- Fix the 'VM_MAYSHARE' value in the generated bindings and its
blocklist entry, due to typos.
- Build 'core' with '--cfg no_io_statics' to ensure 'core' does not
introduce any use of 'core::sync::atomic' into the kernel image
since upstream Rust is moving 'std::io::Error' into 'core', which
uses a global atomic pointer.
Upstream Rust merged a PR to add a test checking that builds of
'core' are warning-free with that 'cfg' enabled.
- Enable the unstable 'proc_macro_span' feature in 'proc-macro2',
which provides 'Span::join' and thus improves the quality of the
diagnostics of all our procedural macros, notably 'pin-init'. This
is only used for producing diagnostics, thus there is no hard
reliance on the feature.
- Globally allow 'clippy::comparison_chain', since its suggestions
are not always ideal and upstream downgraded it to 'pedantic' too.
'kernel' crate:
- New 'mem' module: add the 'Align<N>' zero-sized type so that
alignment can be specified via const generics ('repr(align(...))'
only works with integer literals), e.g.:
const N: usize = 128;
struct S {
_align: Align<N>,
}
assert_eq!(align_of::<S>(), N);
- New 'ratelimit' module: add the 'Ratelimit' abstraction for 'struct
ratelimit_state' and, based on it, the 'pr_*_ratelimited!' printing
macros, which can be used for printing that may be triggered by
userspace.
In addition, convert Rust Binder to use them.
- 'sync' module: to construct a global 'struct ratelimit_state', add
a 'const' constructor for 'raw_spinlock_t'.
In addition, move the lockdep types into a new 'sync::lockdep'
submodule, since there were starting to be too many of them.
- 'num' module: add the 'cv!' macro to create constant values ("cv")
from an integer constant expression, with validity checked at
compile time, inferring the target type from the context. It works
for any type that implements the new 'FromConst' trait, e.g.:
let a: Alignment = cv!(4096);
let b: Bounded<u32, 4> = cv!(15);
// Any integer constant expression works, not only literals.
let m: NonZero<usize> = cv!(usize::MAX);
// Checked narrowing, including in `const` items.
const SMALL: u8 = cv!(200u32);
// The target type can be given explicitly.
let e = cv!(200u32 => u8);
// With an explicit primitive target, the expression can use
// generic parameters.
const fn as_u64<const KEY: u16>() -> u64 {
cv!(KEY => u64)
}
This avoids the verbose turbofish syntax which disincentivized
using these types at interface boundaries (e.g.
'Alignment::new::<8>()').
- 'alloc' module:
- Allow different error types in 'KBox::pin_slice()', enabling use
of infallible initializers.
- Add 'NumaNode::id()' accessor to retrieve the underlying NUMA
node identifier.
- 'time' module:
- Add 'Delta::to_jiffies_timeout()' for use in timeout arguments.
- Add 'Delta::as_jiffies_unsigned()'.
- Make 'Delta::ZERO' generic over the time unit.
- Warn and assert when passing out-of-range inputs to 'fsleep' and
'udelay'.
- Rename 'ClockSource' to 'ClockId' to better align with naming
conventions in C kernel.
- Make 'CONFIG_HZ' value available as 'bindings::HZ'.
- Add implementation detail documentation for 'HrTimer'.
- 'bitmap' module:
- Add contiguous area operations ('next_zero_area{,_off}', 'set'
and 'clear'), with extra checks compared to the underlying C
code, plus additional ones under 'CONFIG_RUST_BITMAP_HARDENED'.
It includes tests demonstrating the edge cases.
- Restrict bitmap length to at most 'i32::MAX', matching
'BitmapVec::MAX_LEN' and simplifying a few things. This also
fixes 'u32' casts truncating in 'copy_and_extend', which could
otherwise lead to OOB writes.
- 'bug' module:
- Fix 'warn_on!' on UML which called 'warn_slowpath_fmt()' with
the wrong arguments; and fix its '// SAFETY:' comment too.
- Add a KUnit test for 'warn_on!'.
- 'id_pool' module: add contiguous ID reservation via the new
'reserve_ids' and 'release_ids' methods, built on top of the new
bitmap area operations.
- 'sizes' module: add the sub-1K size constants ('SZ_1' to 'SZ_512')
and implement 'SizeConstants' for 'Alignment', so that one can
write e.g. 'Alignment::SZ_8'.
'macros' crate:
- Add '#[optional]' attribute for optional methods in '#[vtable]' to
replace the 'build_error!(VTABLE_DEFAULT_ERROR)' boilerplate, e.g.:
#[vtable]
pub trait Operations: Sized {
#[optional]
fn f(&self) -> Result;
}
In addition, apply it to miscdevice and hide generated 'HAS_'
constants for required methods.
- Allow non-ASCII characters in the 'authors' field of the 'module!'
macro, which was unintentionally restricted when multiple authors
support was introduced.
'pin-init' crate:
[ Extra context from Gary's pull request:
"This is a cycle packed with feature updates. Two of the most
anticipated features, tuple struct support and safe self
reference creation, has been included in this pull request.
Safe self reference is a big one and is pushed a bit late in the
cycle. The initial plan was to include a minimum subset for this
cycle because I was worried about potential soundness issues;
however during Plumbers it was agreed that the features should be
upstreamed at once. This is because the initial users (Nova,
JobQueue) would all need the advanced features, so it is better
to ensure that the feature get put into use for real, and it can
iterate with users, rather than being fully designed on paper.
The existing safety checks are already very comprehensive, and
Benno and I are confident that if new ones are discovered, it
wouldn't affect the overall design.
That said, the the usage of the advanced features (invariance,
existential lifetime) shall be limited to the pre-agreed users
only, so even in case where the feature needs to be reworked, the
blast radius is limited.
Another theme in this cycle is to improve the developer
experience when things are used wrongly. A lot of work has been
done to use proper spans from user-provided tokens so error
message point to things that cause them. Many common misuse
scenarios also gain additional custom diagnostics." ]
- User visible changes:
- Support tuple structs.
- Allow safe creation of self references.
- Vastly improve diagnostics for common misuse scenarios.
- Other changes:
- Use 'mixed_site' hygiene consistently.
'MAINTAINERS':
- Add 'RUST [BUG]' entry for the Rust 'bug' module (i.e. 'warn_on!'),
which will be maintained by FUJITA Tomonori -- thank you!
- Add Alice Ryhl as co-maintainer for 'Rust [ALLOC]'.
And some other fixes, cleanups and improvements.
* tag 'rust-7.4' of git://git.kernel.org/pub/scm/linux/kernel/git/ojeda/linux: (91 commits)
rust: zerocopy: update to v0.8.62
rust: zerocopy: fix link to upstream `README.md`
rust: id_pool: add contiguous ID reservation
rust: bitmap: add contiguous area operations
rust: sizes: implement SizeConstants for Alignment
rust: sizes: add sub-1K size constants
rust: bitmap: restrict bitmap length to at most i32::MAX
rust: bitmap: use function-level cfg on kunit test
rust: num: add cv! macro to create values from constant expressions
rust: bug: update the SAFETY comment for warn_slowpath_fmt() on UML
rust: time: add Delta::as_jiffies_unsigned()
rust: time: make Delta::ZERO generic over the time unit
rust_binder: use pr_*_ratelimited! for printing
rust: add pr_*_ratelimited! macros for printing
rust: sync: add const constructor for raw_spinlock_t
rust: sync: move lockdep types to rust/kernel/sync/lockdep.rs
rust: pin-init: internal: suppress `explicit_outlives_requirements`
MAINTAINERS: add entry for the Rust `bug` module
rust: pin-init: internal: pin_data: support existential lifetimes
rust: pin-init: internal: pin_data: support shared projection
...
|
|
git://git.kernel.org/pub/scm/linux/kernel/git/rcu/linux
Pull RCU updates from Paul McKenney:
"Execution contexts and call_rcu() and call_srcu():
- Make call_rcu() and call_srcu invocable from NMI handlers and while
holding scheduler locks (using irq-work handlers)
- Add rcutorture and BPF tests calling these functions from these
contexts
- Disable rcutorture overload testing for RCU readers that are
"fragile", that is, that do not either disable preemption or have
some form of RCU priority boosting
SRCU updates:
- Add an atomic SRCU where readers run with preemption disabled and
grace periods can be invoked from atomic contexts. David Woodhouse
has a patch series exploiting this for GPC
- Add torture and lockdep tests for atomic SRCU
- Add numerous optimizations for atomic SRCU based on the fact that
it does not have callbacks, for example, eliminating any transition
to "big" srcu_struct structures even on systems that configure
these to happen at initialization time
Additional torture-test updates:
- Fix a divide-by-zero bug in forward-progress testing
- Synchronously wait for all IRQ-queued callbacks to complete
- Allow alternative "ssh" commands to be specified for use by
kvm-remote.sh
- Fix kvm-again.sh re-run failure on PowerPC
- Add additional lockdep testing for atomic SRCU
- Fix error double-counting in srcu_lockdep.sh
- Add atomic SRCU cross-CPU IRQ context mismatch testing, with the
- trick being that the atomic SRCU readers context must be at least
as strict as that of the atomic SRCU grace-period wait. So for
example, if the readers have IRQs disabled, so must the
grace-period wait
Miscellaneous updates:
- Update stallwarn.rst documentation for the re-implementation of RCU
Tasks Trace in terms of SRCU
- Fix the lazy-callback shrink scanner budget computation so that it
honors the reclaim budget
- Avoid panicking on RCU CPU stalls that end before the warning can
be printed
- Add "running" and "boosted" indications to the RCU task stall
warning output
- People have been (incorrectly) relying on rcu_barrier() to wait for
kfree_rcu() callbacks and processing. But it turns out to be easier
to fix rcu_barrier() to meet their expectations than to fix their
code to live within the earlier rcu_barrier() specification. So
rcu_barrier() now waits on kfree_rcu() callbacks and processing
- Disable RCU Tasks console output that track when this RCU flavor
switches between per-CPU and global callback queuing. New use cases
appeared that generated enough console traffic to cause trouble,
and no one seemed to care about these messages. For those needing
those messages, there is a new rcupdate.rcu_task_collapse_debug
kernel boot parameter
- Fix __rcu pointer attribute handling to eliminate false positives
- Fix typos and drop redundant #include directives"
* tag 'rcu.2026.10.12b' of git://git.kernel.org/pub/scm/linux/kernel/git/rcu/linux: (46 commits)
rcutorture: Add atomic SRCU cross-CPU IRQ context mismatch test
selftests/rcutorture: Fix double nerrs count in srcu_lockdep.sh
selftests/rcutorture: Wire atomic SRCU into srcu_lockdep.sh
rcutorture: Add atomic SRCU lockdep support
rcutorture: Fix kvm-again.sh re-run failure on ppc64
torture: Allow specifying alternative ssh command to kvm-remote.sh
rcutorture: Synchronously wait for all rcu_torture_irq() callbacks to complete
rcutorture: Fix divide-by-zero with fwd_progress_div=1
srcutree: Preserve IRQ state in synchronize_srcu_atomic() callchain
srcutiny: Add lockdep and early-boot checks to synchronize_srcu_atomic()
srcutree: Add lockdep and early-boot checks to synchronize_srcu_atomic()
srcutree: Skip torture to-big transition for atomic SRCU
srcutree: Don't transition atomic SRCU to big in srcu_gp_end()
srcutree: Make init_srcu_struct_atomic() prevent transition to big
srcu: Restrict atomic-SRCU non_block annotation to task context
srcutree: Remove srcu_barrier() sleep for atomic SRCU
srcutree: Skip callback scheduling for atomic SRCU grace periods
srcutree: Add reader-free fastpath to synchronize_srcu_atomic()
rcutorture: Add atomic-SRCU support to torture.sh
srcutree: Explicitly note DEFINE_SRCU() needs for srcu_barrier()
...
|
|
Pull bitmap updates from Yury Norov:
"This includes __MAKE_OP() macro removal from me with the follow-up
from Mark, cleanups for bitmaps parser from Shashank and a couple Rust
docs fixes from Georgios"
* tag 'bitmap-for-v7.4-rc1' of https://github.com/norov/linux:
rust: bitmap: document panics in `next_bit` and `next_zero_bit`
rust: id_pool: document panics in `find_unused_id` and `release_id`
bitmap: test bitmap_parselist() with a group size close to UINT_MAX
bitmap: bitmap_parselist(): don't wrap around on a huge group size
bitmap: test bitmap_parselist() with text after the group size
bitmap: bitmap_parselist(): reject trailing characters after group size
bitmap: test bitmap_parse() with an illegal character before 8 hex digits
bitmap: bitmap_parse(): reject non-hex character before 8 digits
bitfield: Restore be16_replace_bits()
bitfield: get rid of __MAKE_OP machinery
|
|
- OOB fix in s32ton() (Alan Stern)
- switch to named initializers for acpi_device_id (Pawel Zalewski)
- UAF fix in hiddev (Yousef Alhouseen)
|
|
- Pass the correct physical and virtual endpoint function numbers when
setting translation of inbound memory windows (Koichiro Den)
- Make embedded doorbell IRQ non-shared, since currently only the first EPF
can allocate doorbells (Koichiro Den)
- MSI doorbells currently target the first EPF attached to an EPC; let
other EPFs try the embedded doorbell instead of failing when they can't
use the MSI doorbell (Koichiro Den)
- Serialize scan of vNTB virtual PCI bus with other PCI topology changes
(Koichiro Den)
- Manage vNTB lifetimes to avoid leaking virtual devices and buses and
allow removal (Koichiro Den)
- Track vNTB link state from both sides so both see the same effective link
state (Koichiro Den)
- Add local epf pointer to shorten repeated ntp->epf accesses (Koichiro
Den)
- Configure vNTB MSI-X when supported to avoid IOMMU faults and failure to
deliver doorbell interrupts on RC (Koichiro Den)
* pci/endpoint:
PCI: endpoint: pci-epf-vntb: Honor MSI-X selection
PCI: endpoint: pci-epf-vntb: Use a local epf pointer in interrupt setup
PCI: endpoint: pci-epf-vntb: Track link state from both sides
PCI: endpoint: pci-epf-vntb: Manage virtual NTB and PCI bus lifetime
PCI: endpoint: pci-epf-vntb: Serialize virtual PCI bus scan
PCI: endpoint: pci-ep-msi: Let non-first EPFs use embedded doorbells
PCI: endpoint: pci-ep-msi: Make embedded doorbell IRQ exclusive
PCI: endpoint: pci-epf-vntb: Pass PF/VF number when BAR programming
|
|
- Use regmap APIs for tc9563 I2C accesses instead of open-coding I2C
transfers (Lorenzo Bianconi)
- Use devm-managed tc9563 I2C dummy device allocation (Lorenzo Bianconi)
- Allow tc9563 RESX reset assertion to sleep (Abel Vesa)
- Add GPIO driver for Toshiba TC9563 embedded GPIO controller (Alex Elder)
- Add DT documentation and pwrctrl driver support for TC9563 embedded GPIO
controller (Lorenzo Bianconi)
- Switch the tc9563 per-port reset to use the GPIO descriptor API instead
of direct regmap accesses (Lorenzo Bianconi)
- Fix leak of regulator consumers array (Alexey Charkov)
- Only destroy devices created by pwrctrl core, so that when removing a
PCIe controller driver that uses pwrctrl, we don't remove devices
populated by another mechanism (Shawn Lin)
- Power off child devices on power-on failure (Lorenzo Bianconi)
* pci/pwrctrl:
PCI/pwrctrl: Power off child devices on power-on failure
PCI/pwrctrl: Only destroy devices created by pwrctrl core
PCI/pwrctrl: generic: Fix leaking array from of_regulator_bulk_get_all()
PCI/pwrctrl: tc9563: Switch per-port reset to GPIO descriptor API
PCI/pwrctrl: tc9563: Add GPIO auxiliary device support
dt-bindings: PCI: toshiba,tc9563: Document embedded GPIO controller
gpio: tc9563: Add support for the embedded GPIO controller
PCI/pwrctrl: tc9563: Allow RESX reset assertion to sleep
PCI/pwrctrl: tc9563: Use devm-managed I2C dummy device allocation
PCI/pwrctrl: tc9563: Rely on regmap APIs
|
|
Remove the local TC9563_GPIO_MASK and TC9563_GPIO_DEASSERT_BITS
definitions, which are no longer used after switching to the GPIO
descriptor API. Move TC9563_GPIO_CONFIG and TC9563_RESET_GPIO
definitions in tc9563.h header file.
Replace the direct regmap-based per-port reset logic in
assert_deassert_reset() with gpiod_direction_output() calls, falling
back to the legacy regmap approach only when no reset-gpios DT
property is present for a given port.
Add the reset GPIO pointer to struct tc9563_pwrctrl_cfg and introduce
tc9563_pwrctrl_parse_reset_line() to look up reset-gpios from each PCI
downstream port child node. The lookup is done lazily at the beginning of
power_on(), returning -EPROBE_DEFER until the GPIO chip is registered.
Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi@oss.qualcomm.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Reviewed-by: Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>
Reviewed-by: Manivannan Sadhasivam <manivannan.sadhasivam@oss.qualcomm.com>
Reviewed-by: Alex Elder <elder@riscstar.com>
Link: https://patch.msgid.link/20260909-pci-tc9563-aux-v5-4-c9b33f56c8d3@oss.qualcomm.com
|
|
Add a driver for the GPIO controller embedded in the Toshiba TC9563 PCIe
switch (and the Qualcomm QPS615). The device implements 37 GPIOs using two
register banks: three registers control the first 32 GPIOs and three more
control GPIOs 32-36. GPIOs 20 and 21 are reserved while GPIOs 22-24,
27-28, 31, and 34 are input-only.
Register the driver as an auxiliary device driver. The TC9563 power
controller creates the auxiliary device and provides a regmap that gives
access to the GPIO registers, so use the gpio-regmap helpers to implement
the GPIO chip.
Signed-off-by: Alex Elder <elder@riscstar.com>
Co-developed-by: Daniel Thompson <daniel@riscstar.com>
Signed-off-by: Daniel Thompson <daniel@riscstar.com>
Co-developed-by: Lorenzo Bianconi <lorenzo.bianconi@oss.qualcomm.com>
Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi@oss.qualcomm.com>
[bhelgaas: commit log per https://lore.kernel.org/arQ2mDjqHv4gmoOK@lore-desk]
[bhelgaas: squash Geert Uytterhoeven <geert+renesas@glider.be> Kconfig fix:
https://lore.kernel.org/all/45484c37512a3102495d8b75b6e9f72a141ba42e.1792574560.git.geert+renesas@glider.be,
Reviewed-by: Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>
Acked-by: Lorenzo Bianconi <lorenzo.bianconi@oss.qualcomm.com>]
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Reviewed-by: Linus Walleij <linusw@kernel.org>
Reviewed-by: Manivannan Sadhasivam <manivannan.sadhasivam@oss.qualcomm.com>
Acked-by: Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>
Link: https://patch.msgid.link/20260909-pci-tc9563-aux-v5-2-c9b33f56c8d3@oss.qualcomm.com
|
|
For the verifier unwind_exit of an exception callback is exit. For JITs
the callback is a subprog, so they emit the lookup of the return address.
The idea was that the kernel calls the callback and the lookup finds
nothing.
But an exception callback has no frame of its own. It returns from
the frame of the main prog that threw, and the kernel isn't always
the caller of that one:
- An extension returns to the caller of the subprog that it replaced.
- After a tail call in a subprog the main prog returns to the caller of
that subprog.
When unwind_goto follows that call, the callback goes to the pad, and
the pad wasn't verified with it:
r6 = 1
call a // can unwind
unwind_goto pad
r6 = 2
call b // cannot unwind
unwind_goto pad // stays, since the pad is not dead code
exit
pad:
r0 = r6 // r6 is 1 for the verifier
An extension without unwind_exit can replace b(). When it throws and its
exception callback ends with unwind_exit, the pad runs with r6 = 2.
Both JITs ask bpf_prog_can_unwind(). Let it say no for an exception
callback.
An async callback has a frame of its own and the kernel is the caller.
Fixes: a2d274771321 ("bpf: Add unwind_goto and unwind_exit insns")
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Link: https://lore.kernel.org/bpf/5f24cbed1ec4a6a0ecd0b834d738c48dc9eb64362be4fa50dfb0eaddfad928b3@mail.kernel.org/
Link: https://patch.msgid.link/20261020231942.2568163-2-alexei.starovoitov@gmail.com
Closes: https://lore.kernel.org/bpf/sashiko-outbox-179498@kernel.org/
|
|
Representation
--------------
Represent ALU32 recurrences as:
w0 += step -> (zext32 (linear r0 step))
Extend simplify() rules to maintain the above form for latch
expressions. E.g. for a post-condition loop such as:
w0 = 0;
l: w0 += 1;
if w0 != 3 goto l;
exit;
SCEV at header: (zext32 (linear r0 1))
Initial SCEV at latch: (zext32 (+ (zext32 (linear r0 1)) 1))
Simplified SCEV at latch: (zext32 (+ (zext32 (linear r0 1)) 1))
-> (zext32 (+ (linear r0 1) 1))
-> (zext32 (linear (+ r0 1) 1))
Iterations count computation
----------------------------
- Extract the main iteration-count logic from compute_max_iters() into
compute_backedge_taken_count(). Reuse its 64-bit arithmetic after
sign/zero extending the latch operands.
- Reject the computed count if the predicted exit value falls outside
signed/unsigned 32-bit range, e.g.:
w0 = 0x7ffffffe;
l: w0 += 1;
if w0 s<= 0x7fffffff goto l;
The 64-bit computation predicts an exit at S32_MAX + 1, but the
32-bit value wraps to S32_MIN and the comparison remains true.
- Handle mixed 64-bit/32-bit comparisons/recurrences only when initial
bounds and step fit in 32-bit ranges, e.g.:
w0 = 0;
r1 = 0x100000003 ll;
l: w0 += 1;
if r0 != r1 goto l;
Truncating the bound to 32 bits would predict three header visits.
However, `w0 += 1` keeps r0 within [0, U32_MAX], so it can never
be equal to the 64-bit bound.
Widened bounds computation
--------------------------
- Update linear_bounds() to truncate the initially computed 64-bit
range to 32 bits, then zero-extend it to obtain the 64-bit range
of iteration values. Step computation needs to handle:
- unsigned 32-bit wraparound;
- entry and zero-extended iteration values disagreeing on base/step.
- Union both ranges with the corresponding register ranges at entry,
since the entry value need not be zero-extended.
- Extend `struct bounds` to keep both {32,64}-bit ranges and pass both
to bpf_set_reg_range(). A 64-bit range alone loses useful 32-bit
information, e.g.:
entry = 0, step = -1, two header visits
r64: [0, U32_MAX]
r32: [-1, 0]
Signed-off-by: Eduard Zingerman <eddyz87@gmail.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Link: https://patch.msgid.link/20261020-scev-32bit-v1-1-838f34f9f0cd@gmail.com
|
|
When switching a dirty inode to another wb, inode_do_switch_wbs() puts
it at the newest end of the target b_dirty list instead of searching
for its sorted position. This requires updating dirtied_when, which
move_expired_inodes() uses to decide where to stop scanning.
However, the switch updates dirtied_time_when instead. This leaves
b_dirty out of order and can make the scan stop before reaching older
inodes. It also resets the lazytime expiration timestamp, potentially
delaying timestamp writeback.
Update dirtied_when instead, preserving both the constant-time insertion
and the lazytime expiration timestamp. Correct the field name in the
comment and document the distinction between the two inode timestamps.
Fixes: 9a6ebbdbd412 ("writeback: Avoid excessively long inode switching times")
Cc: stable@vger.kernel.org
Signed-off-by: Julian Sun <sunjunchao@bytedance.com>
Link: https://patch.msgid.link/20261016115230.3640770-2-sunjunchao@bytedance.com
Acked-by: Tejun Heo <tj@kernel.org>
Reviewed-by: Jan Kara <jack@suse.cz>
Signed-off-by: Christian Brauner (Amutable) <brauner@kernel.org>
|
|
SO_INQ makes recvmsg() return the bytes left in the receive queue in an
SCM_INQ cmsg, saving a SIOCINQ call per receive. AF_UNIX stream sockets
support it, AF_VSOCK fails with ENOPROTOOPT.
Add it for SOCK_STREAM, reusing the hint already computed for io_uring.
As with TCP_INQ, 1 is reported once the stream is finished so the caller
reads again and sees EOF, and accepted sockets inherit the setting from
the listener. No cmsg is sent when the transport cannot report the queue
length.
SOCK_SEQPACKET is refused, as on AF_UNIX: its transport callback counts
messages, not bytes.
Signed-off-by: David Carlier <devnexen@gmail.com>
Reviewed-by: Stefano Garzarella <sgarzare@redhat.com>
Link: https://patch.msgid.link/20261016132716.272018-3-devnexen@gmail.com
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
|
|
The pre-existing TUF RGB state DEVID (0x00100057) is a write-only
command used with the DEVS method. Rename it to make clear it is a
command rather than a readable state, avoiding confusion with the
upcoming readback support.
Suggested-by: Denis Benato <denis.benato@linux.dev>
Signed-off-by: Bartu Alev <bartualev@gmail.com>
Link: https://patch.msgid.link/20261010101601.888709-2-bartualev@gmail.com
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
|