Skip to content

omarchy-ane-dt: a disabled kernel ANE node does not count - #23

Merged
joshuaswarren merged 2 commits into
mainfrom
agent/ane-dt-disabled-nodes
Oct 1, 2026
Merged

joshuaswarren merged 2 commits into
mainfrom
agent/ane-dt-disabled-nodes

Conversation

@joshuaswarren

Copy link
Copy Markdown
Owner

omarchy-ane-dt build() counted a disabled kernel node as the kernel's ANE node. aurora-silicon/linux #65 and joshuaswarren/linux t6021-ane-node ship the five T6021 ANE nodes disabled, so the T6021 overlay was skipped and the ANE stayed disabled. Found in receipts/2026-10-01-t6021-aurora-dt-node (#22).

Changes:

  • Tree.enabled(): no status, "okay" or "ok" (the of_device_is_available() rule). build() uses it for every overlay's skip compatibles. validate(), ane_nodes(), status (the live node's status file) and the omarchy-ane-m2-enable mailbox check ignore disabled nodes.
  • packaging/dt/t6021-ane.dts: the three DARTs set status = "okay". fdtoverlay merges each overlay node into the kernel node of the same name. A property that the overlay does not set keeps the kernel's value, so without this the merged DARTs stayed disabled.
  • validate() checks the references of new and changed nodes, and refuses a reference to a disabled provider. The renumbered-phandle guard is unchanged.

Merge experiment (the real overlay over verbatim excerpts of the #65 head and t6021-ane-node nodes, fdtoverlay 1.7.2 and 1.6.1): fdtoverlay 1.7.2 merges with no duplicates and no phandle changes. Before this change, build() returned None. With only the tool fixed, build() refused (iommus names /soc/iommu@285800000, which is disabled). With both changes, all five nodes are okay and build() applies. On the #65 head nodes, the overlay's mailbox IRQs (884, 1833) and dart0 ps_pmp replace the kernel's. fdtoverlay 1.6.1 renumbers phandles and is refused, as before. Details are in receipts/2026-10-01-ane-dt-disabled-nodes/README.md.

Tests: the new cases in tools/test_ane_dt.py and tools/test_ane_m2.py fail on main 53dca89 (logs in the receipt). After the change: python3 tools/test_ane_dt.py ok, python3 tools/test_ane_m2.py ok, pytest -q tests tools 26 passed.

Not changed: omarchy-mac-boot dtb-overlays.sh (986486a7, draft omacom/omarchy-mac#677) has the same skip rule. No boot was run.

build() made its skip set from every kernel node, disabled ones included.
aurora-silicon/linux #65 ships the five T6021 ANE nodes disabled, so the
T6021 overlay was skipped and the ANE stayed disabled.

Only a node with no status, "okay" or "ok" counts now (Tree.enabled), in
build(), validate(), ane_nodes(), status and the m2-enable mailbox check.
fdtoverlay merges the overlay into the disabled nodes of the same name, but
a property the overlay does not set keeps the kernel's value, so the T6021
DARTs now set status "okay". validate() checks the references of new and
changed nodes and refuses a disabled provider. The renumbered-phandle
guard is unchanged.

Receipt: receipts/2026-10-01-ane-dt-disabled-nodes (merge experiment with
the #65 head and t6021-ane-node excerpts, dtc 1.7.2 and 1.6.1).
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 1, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-01T13:51:04.002417Z 8c0ae1b New commits
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: ba5e5b4396

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread CHANGELOG.md
@@ -1,5 +1,19 @@
# Changelog

## Unreleased

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Recreate the commit with the mandated identity

The reviewed commit records both its author and committer as Codex <codex@openai.com>, so it cannot land under this repository's standing identity policy. Recreate it with Joshua Warren and 816217+joshuaswarren@users.noreply.github.com as both identities.

AGENTS.md reference: AGENTS.md:L252-L257

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Checked against the commits API: ba5e5b4 has author and committer Joshua Warren <816217+joshuaswarren@users.noreply.github.com> (GET /repos/joshuaswarren/omarchy-ane/commits/ba5e5b4396e77ada0281aafce08a60e0c4c92fef). The follow-up 8c0ae1b has the same identity. No change.

Comment thread packaging/omarchy-ane-dt
Comment on lines +165 to 168
for path in [p for p in result.nodes if result.nodes[p] != stock.nodes.get(p)]:
props = result.nodes[path]
plain = cells(props.get("interrupt-parent", b"")) + cells(props.get("memory-region", b""))
if "iommu-addresses" in props:

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Reject disabled plain-phandle providers

When an applied overlay's new or changed node has an interrupt-parent, memory-region, or iommu-addresses phandle targeting a node whose status is disabled, this validation path checks only that the phandle exists; the new availability check applies only to properties in REFS. In the newly supported case where an overlay enables a previously disabled ANE node, this can accept and install an enabled consumer backed by a disabled interrupt controller or reserved-memory provider, contrary to the validator's stated contract. Check result.enabled(result.phandles[phandle]) for these plain references as well.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in 8c0ae1b: the interrupt-parent, memory-region and iommu-addresses targets of a new or changed node must be enabled too (... names /soc/interrupt-controller@..., which is disabled). tools/test_ane_dt.py has a case for a disabled AIC and for a disabled power domain; the AIC case fails on ba5e5b4 with validate accepted. test_ane_dt ok, test_ane_m2 ok, pytest -q tests tools 26 passed. The merge-experiment logs in the receipt are unchanged with the new check.

The interrupt-parent, memory-region and iommu-addresses targets of a new or
changed node must be enabled too, as the power-domains, iommus, mboxes and
resets targets already must. Review of PR #23.
@joshuaswarren
joshuaswarren merged commit 84136d5 into main Oct 1, 2026
1 check passed
joshuaswarren added a commit that referenced this pull request Oct 1, 2026
The Unreleased entry of #23 moves into the 0.4.0 Fixed section. CHANGELOG.md only.
Comment thread packaging/omarchy-ane-dt
live = []
for compat in base.glob("**/compatible") if base.is_dir() else []:
st = compat.parent / "status"
if st.exists() and st.read_bytes().rstrip(b"\0") not in (b"okay", b"ok"):

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

SUGGESTION: Third, slightly different copy of the availability rule

Tree.enabled() (line 97) implements of_device_is_available() as status in ([], ["okay"], ["ok"]). This inline version diverges for a zero-length status property: b"" is not in (b"okay", b"ok"), so the node is skipped here, while strings() filters empty strings and would report the same node as enabled. The two answers then disagree inside one run of status — the live loop here versus kernel_has/copy_has from Tree(...).ane_nodes() a few lines below.

Worth routing both through one helper so the rule cannot drift.


Reply with @kilocode-bot fix it to have Kilo Code address this issue.

Comment thread packaging/omarchy-ane-dt
stock_bytes = stock_file.read_bytes()
stock = Tree(stock_bytes)
present = {c for p in stock.nodes for c in stock.strings(p, "compatible")}
present = {c for p in stock.nodes if stock.enabled(p) for c in stock.strings(p, "compatible")}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

SUGGESTION: Broadened reference check now also reaches stock nodes the overlay only tweaks

Changing the loop from new nodes to new or changed nodes widens what validate() inspects: packaging/dt/t6001-ane.dts fragment@3 sets reg on the existing /soc/power-management@28e080000, so that stock node becomes "changed" and its own interrupt-parent/power-domains targets are reference-checked for the first time. tools/test_ane_dt.py only ever calls build() with the t8103 and t6021 overlays, so that path has no coverage at all — a refusal on a real M1 Max tree would be the first sign of it.

A fixture that builds the t6001 overlay over a stock-like tree would pin the widened rule where it can actually regress.


Reply with @kilocode-bot fix it to have Kilo Code address this issue.

@kilo-code-bot

kilo-code-bot Bot commented Oct 1, 2026 •

Copy link
Copy Markdown

Code Review Summary

Status: 2 Issues Found | Recommendation: Address before merge

Overview

Severity Count
CRITICAL 0
WARNING 0
SUGGESTION 2
Issue Details (click to expand)

SUGGESTION

File Line Issue
packaging/omarchy-ane-dt 342 status() re-implements the availability rule inline and diverges from Tree.enabled() for a zero-length status property, so the live-node loop and ane_nodes() can disagree within one run
packaging/omarchy-ane-dt 191 Widening the reference check to changed nodes also reaches stock nodes an overlay merely tweaks (t6001 fragment@3 rewrites the pmgr node's reg); that path has no test coverage
Files Reviewed (22 files)
  • CHANGELOG.md - 0 issues
  • README.md - 0 issues
  • packaging/dt/t6021-ane.dts - 0 issues
  • packaging/omarchy-ane-dt - 2 issues
  • packaging/omarchy-ane-m2-enable - 0 issues
  • receipts/2026-10-01-ane-dt-disabled-nodes/README.md - 0 issues
  • receipts/2026-10-01-ane-dt-disabled-nodes/ex-common.dtsi - 0 issues
  • receipts/2026-10-01-ane-dt-disabled-nodes/ex-die0-pr65.dtsi - 0 issues
  • receipts/2026-10-01-ane-dt-disabled-nodes/ex-die0.dtsi - 0 issues
  • receipts/2026-10-01-ane-dt-disabled-nodes/ex-pmgr.dtsi - 0 issues
  • receipts/2026-10-01-ane-dt-disabled-nodes/kernel-t6021-excerpt.dts - 0 issues
  • receipts/2026-10-01-ane-dt-disabled-nodes/merge-experiment.sh - 0 issues
  • receipts/2026-10-01-ane-dt-disabled-nodes/logs/* - 0 issues
  • tools/test_ane_dt.py - 0 issues
  • tools/test_ane_m2.py - 0 issues

Fix these issues in Kilo Cloud


Reviewed by free · Input: 0 · Output: 0 · Cached: 0

joshuaswarren added a commit that referenced this pull request Oct 1, 2026
joshuaswarren added a commit that referenced this pull request Oct 1, 2026
joshuaswarren added a commit that referenced this pull request Oct 1, 2026
…boot

receipts: T6021 0.4.0 release module and #23 overlay pass a disk boot
@joshuaswarren
joshuaswarren deleted the agent/ane-dt-disabled-nodes branch October 3, 2026 12:41
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