linux/drivers
Danilo Krummrich b07fc8d60b I/O type generalization and projection
This series presents a major rework of I/O types, as a summary:
 
 - Make I/O regions typed. The existing untyped region still exists
   with a dynamically sized `Region` type.
 
 - Create I/O view types to represent subregion of a full I/O region mapped.
   A projection macro is added to allow safely create such subviews.
 
 - Split I/O traits, make I/O views play a central role, avoid
   duplicate monomorphization and less `unsafe` code.
 
 - Add a `SysMem` backend, and make `Coherent` implement `Io`.
 
 - Add copying methods (memcpy_{from,to}io and friends).
 
 This series generalize `Mmio` type from just an untyped region to typed
 representations (so `MmioRaw<T>` is `__iomem *T`). This allows us to remove
 the `IoKnownSize` trait; the information is sourced from just the pointer
 from the `KnownSize` trait instead.
 
 Building on top of that, `Mmio` and `ConfigSpace` have been converted to
 typed views of I/O regions rather than just a big chunk of untyped I/O
 memory. These changes made it possible to implement `Io` trait for
 `Coherent<T>`.
 
 Shared system memory, `SysMem` is also added to the series, given it
 similarity in implementation compared to `Coherent`. In fact, the series
 use `SysMem` to implement `Coherent`'s I/O methods.
 
 Built on these generalization, this series add `io_project!()`.
 `io_project!()` performs a safe way to project a bigger view to a small
 subviews, and some Nova code has been converted in this series to
 demonstrate cleanups possible with this addition.
 
 New `io_read!()`, `io_write!()` has been added that supersedes
 `dma_read!()`, `dma_write!()` macro. Although, they work for primitives
 only (to be exact, types that the backend is `IoCapable` of).
 One feature that was lost from the old `dma_read!()` and `dma_write!()`
 series was the ability to read/write a large structs. However, the
 semantics was unclear to begin with, as there was no guarantee about their
 atomicity even for structs that were small enough to fit in u32.
 
 Suggested-by: Danilo Krummrich <dakr@kernel.org>
 Link: https://rust-for-linux.zulipchat.com/#narrow/channel/288089-General/topic/Generic.20I.2FO.20backends/near/571198078
 
 This is a stable tag for other trees to merge.
 -----BEGIN PGP SIGNATURE-----
 
 iHUEABYKAB0WIQS2q/xV6QjXAdC7k+1FlHeO1qrKLgUCalVZTQAKCRBFlHeO1qrK
 LtfZAP90BcixGO6G0L0UkyJ/f2yJz9wa2xD2lCwTvEnAxDa0EwEAzRxi9a/4CVOx
 y5lnqkmV+ViRYDrSihy8r994+ADI8w0=
 =+R8A
 -----END PGP SIGNATURE-----

Merge patch series "rust: I/O type generalization and projection"

Gary Guo <gary@garyguo.net> says:

This series presents a major rework of I/O types, as a summary:

- Make I/O regions typed. The existing untyped region still exists
  with a dynamically sized `Region` type.

- Create I/O view types to represent subregion of a full I/O region mapped.
  A projection macro is added to allow safely create such subviews.

- Split I/O traits, make I/O views play a central role, avoid
  duplicate monomorphization and less `unsafe` code.

- Add a `SysMem` backend, and make `Coherent` implement `Io`.

- Add copying methods (memcpy_{from,to}io and friends).

This series generalize `Mmio` type from just an untyped region to typed
representations (so `MmioRaw<T>` is `__iomem *T`). This allows us to remove
the `IoKnownSize` trait; the information is sourced from just the pointer
from the `KnownSize` trait instead.

Building on top of that, `Mmio` and `ConfigSpace` have been converted to
typed views of I/O regions rather than just a big chunk of untyped I/O
memory. These changes made it possible to implement `Io` trait for
`Coherent<T>`.

Shared system memory, `SysMem` is also added to the series, given it
similarity in implementation compared to `Coherent`. In fact, the series
use `SysMem` to implement `Coherent`'s I/O methods.

Built on these generalization, this series add `io_project!()`.
`io_project!()` performs a safe way to project a bigger view to a small
subviews, and some Nova code has been converted in this series to
demonstrate cleanups possible with this addition.

New `io_read!()`, `io_write!()` has been added that supersedes
`dma_read!()`, `dma_write!()` macro. Although, they work for primitives
only (to be exact, types that the backend is `IoCapable` of).
One feature that was lost from the old `dma_read!()` and `dma_write!()`
series was the ability to read/write a large structs. However, the
semantics was unclear to begin with, as there was no guarantee about their
atomicity even for structs that were small enough to fit in u32.

Suggested-by: Danilo Krummrich <dakr@kernel.org>
Link: https://rust-for-linux.zulipchat.com/#narrow/channel/288089-General/topic/Generic.20I.2FO.20backends/near/571198078
Link: https://patch.msgid.link/20260706-io_projection-v6-0-72cd5d055d54@garyguo.net
Signed-off-by: Danilo Krummrich <dakr@kernel.org>
2026-07-13 23:50:39 +02:00
..
accel drm fixes for 7.2-rc1 2026-06-26 17:03:48 -07:00
accessibility
acpi ACPI support fixes and cleanups for 7.2-rc1 2026-06-26 13:00:10 -07:00
amba
android
ata ata changes for 7.2-rc1 2026-06-18 08:12:50 -07:00
atm atm: remove unused ATM PHY operations 2026-06-16 08:53:53 -07:00
auxdisplay
base firmware_loader: builtin: fail build on empty firmware 2026-07-12 02:25:08 +02:00
bcma
block This adds support for manual client session reset in CephFS, allowing 2026-06-26 16:15:53 -07:00
bluetooth Bluetooth: btintel_pcie: Separate coredump work from RX work 2026-06-11 14:24:42 -04:00
bus Char/Misc/IIO/FPGA/GPIB/etc driver updates for 7.2-rc1 2026-06-22 12:20:21 -07:00
cache
cdrom
cdx Devicetree updates for v7.2: 2026-06-17 11:54:57 -07:00
char ipmi: lots of little tweaks 2026-06-25 09:00:53 -07:00
clk This is all clk driver updates. Mostly new SoC support for 2026-06-25 12:48:57 -07:00
clocksource A series of updates for the VDSO: 2026-06-15 13:57:13 +05:30
comedi
connector
counter Counter updates for 7.2 2026-06-08 21:26:09 +02:00
cpufreq tracing: Updates for v7.2: 2026-06-18 20:53:00 -07:00
cpuidle cpuidle: Allow exit latency to exceed target residency 2026-06-23 14:00:29 +02:00
crypto pci-v7.2-changes 2026-06-24 12:48:43 -07:00
cxl Merge branch 'for-7.2/cxl-type2-attach-region' into cxl-for-next 2026-06-12 13:47:53 -07:00
dax mm.git review status for mm-hotfixes-stable..mm-stable 2026-06-19 10:14:34 -07:00
dca
devfreq
dibs
dio
dma pci-v7.2-changes 2026-06-24 12:48:43 -07:00
dma-buf drm-next for 7.2-rc1 2026-06-17 10:21:00 +01:00
dpll dpll: allow fwnode pins to attempt state change without capability bit 2026-06-13 13:24:34 -07:00
edac
eisa
extcon
firewire firewire: core: Open-code topology list walk 2026-06-13 11:10:23 +09:00
firmware Char/Misc/IIO/FPGA/GPIB/etc driver updates for 7.2-rc1 2026-06-22 12:20:21 -07:00
fpga
fsi
fwctl
gnss
gpib
gpio gpio: davinci: fix IRQ domain leak on devm_kzalloc failure 2026-06-23 10:44:29 +02:00
gpu I/O type generalization and projection 2026-07-13 23:50:39 +02:00
greybus
hid tracing: Updates for v7.2: 2026-06-18 20:53:00 -07:00
hsi
hte
hv hyperv-next for v7.2-rc1 2026-06-22 08:06:13 -07:00
hwmon platform-drivers-x86 for v7.2-1 2026-06-23 08:31:33 -07:00
hwspinlock hwspinlock: qcom: avoid uninitialized struct members 2026-06-08 21:51:12 -05:00
hwtracing Char/Misc/IIO/FPGA/GPIB/etc driver updates for 7.2-rc1 2026-06-22 12:20:21 -07:00
i2c i2c: pxa-pci: use platform_device_set_of_node() 2026-07-10 16:07:09 +02:00
i3c i3c: mipi-i3c-hci: Use named initializers for platform_device_id's .driver_data 2026-06-16 23:19:45 +02:00
idle x86/msr updates for v7.2: 2026-06-15 15:08:14 +05:30
iio Char/Misc/IIO/FPGA/GPIB/etc driver updates for 7.2-rc1 2026-06-22 12:20:21 -07:00
infiniband RDMA v7.2 merge window 2026-06-18 08:16:21 -07:00
input Input: gscps2 - advance receive buffer write index 2026-06-26 22:42:56 -07:00
interconnect This is all clk driver updates. Mostly new SoC support for 2026-06-25 12:48:57 -07:00
iommu iommu/fsl: use platform_device_set_of_node() 2026-07-10 16:07:09 +02:00
ipack
irqchip Miscellaneous irqchip driver fixes: 2026-06-23 16:02:03 -07:00
leds LEDs for v7.2 2026-06-18 14:45:08 -07:00
macintosh
mailbox mailbox: imx: Don't force-thread the primary handler 2026-06-20 21:18:39 -05:00
mcb
md block-7.2-20260625 2026-06-25 09:56:47 -07:00
media [GIT PULL for v7.2] media updates 2026-06-18 17:21:54 -07:00
memory soc: drivers for 7.2 2026-06-17 11:21:40 -07:00
memstick
message
mfd mfd: tps6586: use platform_device_set_of_node() 2026-07-10 16:07:09 +02:00
misc pci-v7.2-changes 2026-06-24 12:48:43 -07:00
mmc for-7.2/block-20260615 2026-06-16 13:02:47 +05:30
most
mtd NAND changes: 2026-06-21 12:25:17 -07:00
mux
net net: mv643xx: use platform_device_set_of_node() 2026-07-10 16:07:09 +02:00
nfc nfc: Use named initializers for struct i2c_device_id 2026-06-11 20:24:47 +02:00
ntb NTB updates include an EPF bug fix to prevent an invalid unmap during 2026-06-28 07:46:12 -07:00
nubus
nvdimm Updates for the 7.2 release 2026-06-18 16:27:58 -07:00
nvme block-7.2-20260625 2026-06-25 09:56:47 -07:00
nvmem nvmem: core: fix use-after-free bugs in error paths 2026-06-05 17:18:58 +02:00
of of: platform: use platform_device_set_of_node() 2026-07-10 16:07:09 +02:00
opp
parisc
parport
pci pci-v7.2-changes 2026-06-24 12:48:43 -07:00
pcmcia
peci
perf perf/arm-cmn: Fix DVM node events 2026-06-03 20:50:24 +01:00
phy phy-for-7.2 2026-06-23 15:41:48 -07:00
pinctrl Pin control changes for the v7.2 kernel cycle: 2026-06-18 15:03:21 -07:00
platform platform/surface: gpe: use platform_device_set_fwnode() 2026-07-10 16:07:09 +02:00
pmdomain pmdomain: imx: use platform_device_set_of_node() 2026-07-10 16:07:09 +02:00
pnp
power power sequencing fixes for v7.2-rc1 2026-06-25 09:20:26 -07:00
powercap
pps
ps3
ptp bitmap updates for v7.2 2026-06-17 11:38:38 +01:00
pwm I/O type generalization and projection 2026-07-13 23:50:39 +02:00
rapidio mm.git review status for mm-hotfixes-stable..mm-nonmm-stable 2026-06-21 13:20:19 -07:00
ras - Fix a malformed Kconfig default for the AMD Address Translation Library 2026-06-16 05:31:01 +05:30
regulator regulator: Fixes for v7.2 2026-06-26 11:07:26 -07:00
remoteproc remoteproc: qcom: pas: Drop start/stop completion from struct qcom_pas 2026-06-08 21:53:51 -05:00
resctrl arm64 updates for 7.2 2026-06-16 05:18:04 +05:30
reset reset: rzg2l: use platform_device_set_of_node_from_dev() 2026-07-10 16:07:09 +02:00
rpmsg rpmsg update for v7.2 2026-06-20 23:31:15 -07:00
rtc RTC for 7.2 2026-06-27 11:00:18 -07:00
s390 more s390 updates for 7.2 merge window 2026-06-22 07:43:48 -07:00
sbus
scsi mm.git review status for mm-hotfixes-stable..mm-nonmm-stable 2026-06-21 13:20:19 -07:00
sh
siox
slimbus slimbus: qcom-ngd-ctrl: use platform_device_set_of_node() 2026-07-10 16:07:09 +02:00
soc soc: drivers for 7.2 2026-06-17 11:21:40 -07:00
soundwire sound fixes for 7.2-rc1 2026-06-27 12:15:23 -07:00
spi spi: Fixes for v7.2 2026-06-26 11:18:49 -07:00
spmi
ssb
staging Staging driver updates for 7.2-rc1 2026-06-22 12:43:16 -07:00
target Merge branch 7.1/scsi-fixes into 7.2/scsi-staging 2026-06-15 21:01:30 -04:00
tc
tee soc: drivers for 7.2 2026-06-17 11:21:40 -07:00
thermal Thermal control fixes for 7.2-rc1 2026-06-26 13:24:59 -07:00
thunderbolt USB/Thunderbolt driver changes for 7.2-rc1 2026-06-22 12:09:47 -07:00
tty TTY / Serial driver update for 7.2-rc1 2026-06-22 11:51:49 -07:00
ufs SCSI misc on 20260621 2026-06-21 10:29:45 -07:00
uio
usb usb: musb: use platform_device_set_of_node_from_dev() 2026-07-10 16:07:09 +02:00
vdpa vdpa/octeon_ep: fix IRQ-to-ring mapping in interrupt handler 2026-06-10 02:17:00 -04:00
vfio vfio/qat: fix f_pos race in qat_vf_resume_write() 2026-06-10 14:33:05 -06:00
vhost mm.git review status for mm-hotfixes-stable..mm-nonmm-stable 2026-06-21 13:20:19 -07:00
video fbdev: Fix fb_new_modelist to prevent null-ptr-deref in fb_videomode_to_var 2026-06-26 15:12:45 +02:00
virt Char/Misc/IIO/FPGA/GPIB/etc driver updates for 7.2-rc1 2026-06-22 12:20:21 -07:00
virtio virtio,vhost,vdpa: features, fixes 2026-06-17 11:49:00 -07:00
w1 w1: ds2482: Use named initializers for arrays of i2c_device_data 2026-06-08 21:37:56 +02:00
watchdog watchdog updates and fixes for v7.2 2026-06-16 08:04:24 +05:30
xen Devicetree updates for v7.2: 2026-06-17 11:54:57 -07:00
zorro
Kconfig
Makefile