R5c: illumos LinuxKPI layer (misc/linuxkpi) and the headless i915 (i915n) #15
Loading…
Reference in a new issue
No description provided.
Delete branch "r5c-linuxkpi"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Anima work item: R5c
01a0f883-4e37-7572-95e8-bef02227b7f9Adds the illumos Linux compatibility layer
misc/linuxkpiand the headless Linux v7.2 i915 built on it asi915n.i915ncompiles with the illumos kernel flags and links withld -ztype=kmod -z defswith no unresolved symbol.drm-helpers.This branch merges
r5e-helpers(#14):misc/drm_helpersnow builds on the layer. Review R5e's own content in #14.Inventory (Linux v7.2
8d3ae59288f1, R5c configuration)i915.modhas 310 objects. 163 translation units are headless (113,093 lines), and the display has 145.Imports of the headless set:
drm.kodrm_kms_helperThe include closure has 1,292 headers, 718 of them GPL-only. The build uses none of them.
Built: 154 Linux units, all MIT, plus 3 illumos units (module glue, generated display stubs, TTM/GSC/GMCH stubs).
Left out: the display, the TTM/local-memory/GSC units, the PMU, the gen2-5 GTT, and the two GPL tracepoint units.
Decision on
ttm_device_init: it is not carried. Integrated GPUs place nothing with TTM, and discrete GPUs are refused at probe.Licence check: every Linux file the compiler reads (483) is checked for MIT or HPND, and 0 are refused. Three GPL-2.0 headers i915 includes are replaced in the fetched tree by MIT files: the two tracepoint headers (generated no-ops) and
intel_ips.h. No Linux source is in this repository:drivers/i915/PIN,fetch-and-patch.shandpatches/.Layer (
linuxkpi/, MIT)misc/linuxkpi, versioned withLINUXKPI_ABI1. It links-N misc/drm_corewith-z defsagainst the DDI mapfile, the facade mapfile andprivate.d; the latter is 48 symbols beyond the DDI, each with its reason. Drivers link-N misc/linuxkpiagainst the generatedlinuxkpi.mapfile.packaging/linuxkpi.p5m. drmadmNEW_PKGSgains linuxkpi, drm-helpers and i915n. G7 mutual exclusion holds: excludingmisc/drm_corekeeps the layer and everything on it out.linuxkpi/include/{linux,asm,acpi,drm,lkpi,trace,uapi,xen}, plus a force-included prologue that renames the illumos tags that collide.src/:kmallocwith a header, slab overkmem_cache, may-fail requests that do not wait forever);ddi_umem_alloc),vmapWB/WC/UC overhat_devload;ddi_dma(one page per scatterlist entry, copy buffers refused),pin_user_pagesoverddi_umem_lock;ddi_taskq, completions and wait queues;firmload;%pextensions (plain%phashed);Facade 1.1 (core)
dma_resv_init/fini/trylock.drm_illumos_ww_stamp,drm_illumos_resv_lock_ctx/trylock_ctx/unlock_ctx/is_locked).drm_illumos_resv_fences: one snapshot per walk with each fence's usage. A driver's own fence comes back as its own structure, so i915 recognises its requests.drm_syncobj_create,drm_syncobj_fence_get,drm_is_current_master.illumos_close_every_handle: Linux'sclosefor every handle, which i915's lookup tables need.drm_dev_illumos_unplug/drm_dev_illumos_put: Linux's lifecycle.devm_drm_dev_alloc(), because i915 makes GEM objects before it registers.i915 patches (
drivers/i915/patches, all__illumos__)illumos_umem, close for every handle.Link gate
At
57022d7, built on oibuild (gcc 14.3.0-oi-4, JOBS=2):ld -ztype=kmod -N misc/drm_core -N misc/linuxkpi -N misc/drm_helpers -z defs -M ddi.mapfile -M drm_facade.mapfile -M linuxkpi.mapfile -M drm_helpers.mapfile -M drivers/i915/private.mapfilesucceeded with 0 unresolved.private.mapfileholds 3 symbols:_pageshift(from the facade's inlinedrm_vma_node_offset_addr),memcmpandstrrchr.misc/linuxkpi,misc/drm_helpersandlinuxkpi_selftestwere also linked with-z defs.Tests
handle_dropped.7e802e88a3,-device pci-testdev):tools/test/run-r5c-test.shpassed 22 checks.timer_delete,sscanf), now renamed.linuxkpi_selftestpassed 157 checks, including concurrency tests:SLAB_TYPESAFE_BY_RCUand the shrinker;i915nloaded and unloaded twice and refused a device outside its ID table.run-r5e-test.shwithmisc/drm_helperson the layer passed (130,876 checks at seed 20261004, as R5e).Review
Opus reviews, four areas per round.
cdf6f47and the commits after it. Among them: the interrupt master enable, per-handle close, native fences, reservation-walk leaks, detach lifetime, RCU grace periods, a workqueue lost wakeup, may-fail allocations, the licence checks and the CI gate.drm_dev_register(), when the core had no GEM state yet. That and its other findings are fixed in57022d7(the lifecycle above, plus a guest test of it) and have not been re-reviewed. After two rounds the item is the owner's decision.Open issues
-Werror: the layer, glue and carried builds use only selected-Werror=flags.65afae7