mirror-linux/include
Jason Gunthorpe 13f43d7cf3 iommu/pages: Formalize the freelist API
We want to get rid of struct page references outside the internal
allocator implementation. The free list has the driver open code something
like:

   list_add_tail(&virt_to_page(ptr)->lru, freelist);

Move the above into a small inline and make the freelist into a wrapper
type 'struct iommu_pages_list' so that the compiler can help check all the
conversion.

This struct has also proven helpful in some future ideas to convert to a
singly linked list to get an extra pointer in the struct page, and to
signal that the pages should be freed with RCU.

Use a temporary _Generic so we don't need to rename the free function as
the patches progress.

Tested-by: Nicolin Chen <nicolinc@nvidia.com>
Tested-by: Alejandro Jimenez <alejandro.j.jimenez@oracle.com>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
Link: https://lore.kernel.org/r/8-v4-c8663abbb606+3f7-iommu_pages_jgg@nvidia.com
Signed-off-by: Joerg Roedel <jroedel@suse.de>
2025-04-17 16:22:40 +02:00
..
acpi misc: Constify amba_id table 2025-03-29 18:25:34 -07:00
asm-generic RISC-V Patches for the 6.15 Merge Window, Part 1 2025-04-04 09:49:17 -07:00
clocksource
crypto This update includes the following changes: 2025-03-29 10:01:55 -07:00
cxl cxl for v6.15 2025-04-02 20:04:43 -07:00
drm Driver Changes: 2025-04-11 09:11:08 +10:00
dt-bindings Char/Misc/IIO driver updates for 6.15-rc1 2025-04-01 11:26:08 -07:00
hyperv
keys
kunit kunit: Spelling s/slowm/slow/ 2025-04-08 14:57:24 -06:00
kvm
linux iommu/pages: Formalize the freelist API 2025-04-17 16:22:40 +02:00
math-emu
media
memory
misc
net Including fixes from netfilter. 2025-04-10 08:52:18 -07:00
pcmcia
ras
rdma
rv
scsi
soc
sound soundwire updates for 6.15 2025-04-01 12:43:13 -07:00
target
trace tracing/timers: Rename the hrtimer_init event to hrtimer_setup 2025-04-05 10:30:17 +02:00
uapi io_uring-6.15-20250403 2025-04-03 15:48:58 -07:00
ufs
vdso vdso: Address variable shadowing in macros 2025-04-10 11:07:10 +02:00
video
xen
Kbuild