Skip to content

kbuild: drop Kconfig and Makefile entries that point at nothing (-16) - #2366

Closed
RyanTheTide wants to merge 6 commits into
mainfrom
deadweight/kbuild-leftovers
Closed

RyanTheTide wants to merge 6 commits into
mainfrom
deadweight/kbuild-leftovers

Conversation

@RyanTheTide

@RyanTheTide RyanTheTide commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor

Problem

Our delta carries Kconfig and Makefile entries that point at nothing: Makefile rules for drivers that no longer exist, a select of a removed symbol, a second definition of an upstream symbol, and a transitional symbol no config sets.

Change

Six commits (the last one corrects the fourth), net -16 lines, no functional change:

  • drivers/bluetooth/Makefile: drop BT_HCIMT79XX_PCIE, BT_HCIDTL1, BT_HCIBT3C, BT_HCIBLUECARD. They came back through a conflict resolution in a03e01f; upstream removed the PCMCIA drivers in 794b5e7.
  • rust/kernel/lib.rs: drop the cfg_attr on CONFIG_RUSTC_HAS_COERCE_POINTEE, removed from init/Kconfig in v7.1.
  • drivers/gpu/drm/apple/Kconfig: drop select DRM_KMS_DMA_HELPER (the symbol no longer exists).
  • drivers/gpu/drm/asahi/Kconfig: use upstream's RUST_DRM_GPUVM instead of a second definition. RUST_DRM_SCHED stays, now with a comment: it is a bool so that DRM_SCHED is built in for the built-in Rust kernel crate. Selecting DRM_SCHED straight from the tristate DRM_ASAHI turned it into m on the fleet config, which the config check caught.
  • drivers/soc/apple/Kconfig: drop the transitional APPLE_T8140_SLEEP.

Testing

  • Combined fleet build of all eleven deadweight code branches stacked on 0abc2f3 (DEBUG_INFO off): make Image modules dtbs RC=0, 5,909 modules, modpost reports no undefined symbols, and the only warnings are ones the baseline already had in untouched files.
  • Each removal was checked with git grep on 0abc2f3 (evidence below).
  • Fleet config (Fedora asahi fc44 base + asahi.config, olddefconfig, ARCH=arm64 LLVM=1) before and after this branch: the .config is byte-identical (sha256 8a8639a8...) and Kconfig prints the same warnings.

Still to run

Nothing build-side.

Evidence per removal
item evidence
BT Makefile git grep '^config BT_HCIMT79XX_PCIE|^config BT_HCIDTL1|^config BT_HCIBT3C|^config BT_HCIBLUECARD' returns nothing; git cat-file -e fails for btmtk_pcie.c, dtl1_cs.c, bt3c_cs.c and bluecard_cs.c (absent in v7.3 too). Added by a03e01f ("Bluetooth: add J813 N1 native transport...")
COERCE_POINTEE config RUSTC_HAS_COERCE_POINTEE is in v7.0 init/Kconfig, gone from v7.1 and from this tree. Added with 67d9c99
DRM_KMS_DMA_HELPER not defined in any Kconfig at the tip. Added with ed25d27 ("drm/apple: Add DCP display driver")
RUST_DRM_GPUVM upstream definition at drivers/gpu/drm/Kconfig:221 (depends on DRM, selects DRM_GPUVM); DRM_ASAHI depends on DRM=y
RUST_DRM_SCHED kept: without it the fleet config gets DRM_SCHED=m (diffconfig DRM_SCHED y -> m)
APPLE_T8140_SLEEP 0 code references; set in none of fleet release.config, the fleet base configs, or the Fedora/Arch/NixOS kernel configs; asahi.config sets CONFIG_APPLE_SOC_SLEEP=y. From d9b438c (Diljit Singh)

Not included: our CONFIG_EDAC_APPLE_SOC=m line in upstream defconfig. It's redundant with asahi.config, but it keeps a defconfig build compiling the driver.

Commit a03e01f ("Bluetooth: add J813 N1 native transport and
encrypted connection bring-up") brought back four obj- rules while
resolving a conflict: BT_HCIMT79XX_PCIE (btmtk_pcie.o) and the PCMCIA
drivers BT_HCIDTL1, BT_HCIBT3C and BT_HCIBLUECARD. Upstream removed the
PCMCIA drivers in 794b5e7 ("bluetooth: remove all PCMCIA
drivers"). None of the four symbols is defined in any Kconfig and none
of the source files exists, so the rules expand to nothing.

Dropping them brings drivers/bluetooth/Makefile back in line with
upstream apart from our own drivers.

Signed-off-by: Ryan Murray <[email protected]>
The downstream feature block in rust/kernel/lib.rs enables
pin_coerce_unsized_trait when CONFIG_RUSTC_HAS_COERCE_POINTEE is set.
That symbol was removed from init/Kconfig in v7.1, so the attribute
never applies on this tree.

Signed-off-by: Ryan Murray <[email protected]>
DRM_KMS_DMA_HELPER no longer exists in drivers/gpu/drm/Kconfig, so the
select has done nothing since the symbol was removed upstream. The
driver already selects DRM_GEM_DMA_HELPER, which is what it uses.

Signed-off-by: Ryan Murray <[email protected]>
drivers/gpu/drm/asahi/Kconfig defines RUST_DRM_GPUVM a second time.
Upstream already defines it in drivers/gpu/drm/Kconfig (depends on DRM,
selects DRM_GPUVM), and DRM_ASAHI depends on DRM=y, so the duplicate
only drops the dependency.

RUST_DRM_SCHED has no user: nothing tests CONFIG_RUST_DRM_SCHED and the
Rust scheduler bindings are built unconditionally. It only proxies a
select of DRM_SCHED, so select DRM_SCHED from DRM_ASAHI and remove it.

Signed-off-by: Ryan Murray <[email protected]>
APPLE_T8140_SLEEP was kept as a transitional symbol when the option was
renamed to APPLE_SOC_SLEEP in d9b438c. No code tests it and no
kernel config we ship sets it (fleet, Fedora, Arch and NixOS configs);
asahi.config sets CONFIG_APPLE_SOC_SLEEP=y directly.

Signed-off-by: Ryan Murray <[email protected]>
The previous commit replaced RUST_DRM_SCHED with a direct select of
DRM_SCHED from DRM_ASAHI. That is not equivalent: DRM_ASAHI is
tristate, so with DRM_ASAHI=m the select makes DRM_SCHED=m, while the
Rust scheduler bindings live in the built-in kernel crate and need
DRM_SCHED=y. The fleet config shows it (diffconfig: DRM_SCHED y -> m).

Restore the bool proxy and say why it exists. The duplicate
RUST_DRM_GPUVM definition stays removed; the upstream one is a bool
with the same select.

Signed-off-by: Ryan Murray <[email protected]>
@RyanTheTide RyanTheTide changed the title kbuild: drop Kconfig and Makefile entries that point at nothing (-22) kbuild: drop Kconfig and Makefile entries that point at nothing (-19) Nov 19, 2026
@RyanTheTide RyanTheTide changed the title kbuild: drop Kconfig and Makefile entries that point at nothing (-19) kbuild: drop Kconfig and Makefile entries that point at nothing (-16) Nov 19, 2026
@RyanTheTide

Copy link
Copy Markdown
Contributor Author

Blockers: 1.

  1. Commit 9276cf8 ("drm/asahi: use the upstream RUST_DRM_GPUVM and select DRM_SCHED directly") selects DRM_SCHED from the tristate DRM_ASAHI. Your own fix-up 8688453 says that makes DRM_SCHED=m on the fleet config, while the Rust scheduler bindings live in the built-in kernel crate. So the series has a commit with the wrong config, which breaks bisect, and 9276cf8's message describes a change the PR's final tree doesn't make. Fold 8688453 into 9276cf8 (dropping only the duplicate RUST_DRM_GPUVM) on a fresh branch, so every commit builds the fleet config with DRM_SCHED=y.

The rest checks out at the head:

  • RUST_DRM_GPUVM upstream (drivers/gpu/drm/Kconfig:221) is the same bool with the same select, and DRM_ASAHI already depends on DRM=y.
  • DRM_KMS_DMA_HELPER, RUSTC_HAS_COERCE_POINTEE and the four Bluetooth symbols are defined nowhere.
  • APPLE_T8140_SLEEP has no user.
  • The branch merges cleanly into the current integration/aurora, which still carries all five leftovers.

Nit: dropping the transitional symbol means an old .config with only CONFIG_APPLE_T8140_SLEEP=y loses system sleep on olddefconfig. That's fine, since none of our shipped configs set it, but say so in 450d41c's message.

Assisted-by: LLM (Claude:Opus 5.5)

@RyanTheTide

Copy link
Copy Markdown
Contributor Author

Folded into #2464, which now carries this PR's commits unchanged (merge commit); review continues there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant