Skip to content

iommu: apple-dart: leave a powered-down DCP DART alone in its IRQ handler - #1927

Merged
RyanTheTide merged 1 commit into
aurora-silicon:integration/aurorafrom
IronsideXXVI:j604-dart-irq-host-off
Nov 15, 2026
Merged

RyanTheTide merged 1 commit into
aurora-silicon:integration/aurorafrom
IronsideXXVI:j604-dart-irq-host-off

Conversation

@IronsideXXVI

Copy link
Copy Markdown
Contributor

A DCP can power its DARTs down: the internal one for a display power-down, and on T8132 the external one (dcpext) a few seconds after boot when nothing is attached. apple_dart_host_power_off() then sets host_off, and nothing should touch the DART's registers until apple_dart_host_power_on() clears it.

apple_dart_irq() did not check host_off. Its line is requested shared and is neither disabled nor synchronized at power-down. So an interrupt for another sharer, or one still pending while the block goes down, reads the exception registers of an unpowered DART from hard IRQ context.

This patch:

  • returns IRQ_NONE without touching the registers while the DART is host_off, both before and after the runtime-PM get (the same pattern as the existing commands_gated check);
  • calls synchronize_irq() in apple_dart_host_power_off() after host_off is set, so a handler that already passed the check finishes before the power goes.

The handler works again once host_off is cleared. Machines whose DCP never powers a DART down are unaffected.

What this is and is not: it is a correctness fix (a hard IRQ handler should not read a block its host has powered off). It is not offered as the fix for a hang. We carried it on the J604 (MacBook Pro 14" M4, T8132), where the external DCP powers its DART down at boot, while chasing an intermittent early-boot stall. The stall still happened once in 7 boots with this patch in, so we do not claim it cures that.

Checked on top of integration/aurora a5ebec5:

  • checkpatch --strict: 0 errors, 0 warnings, 0 checks
  • drivers/iommu/ builds with W=1 and adds no warnings (the two unused-function warnings from apple-dart-dcp.h are already there on a5ebec5)
  • tools/asahi/run-host-tests.py --only dart: 12 of 12 pass

Tested on the J604 only: our kernels 1.909, 1.910, 1.913 and 1.914 carry it, with no DART faults and 0 deferred devices at boot.

…dler

A DCP can power its DARTs down: the internal one for a display
power-down, a T8132 external one (dcpext) whenever nothing is attached
for a few seconds after boot. apple_dart_host_power_off() then marks the
DART host_off, and nothing may use its registers until it is powered up
again. The exception handler did not check that. Its line is requested
shared and is neither disabled nor synchronized at power-down, so an
interrupt for a sharer, or one still pending as the block goes down,
reads the exception registers of a DART with no power. On this fabric
such a read does not fault: it stalls the CPU, in hard IRQ context, and
the other CPUs stop behind it.

Return IRQ_NONE without touching the registers while the DART is
host_off, and wait in apple_dart_host_power_off() for any handler that
already passed the check before the DART loses its power. The handler
works again once apple_dart_host_power_on() clears host_off.

Signed-off-by: Dylan Ironside <[email protected]>
Assisted-by: LLM
IronsideXXVI added a commit to IronsideXXVI/omarchy-j604 that referenced this pull request Nov 14, 2026
kernel/: the 2 patches 1.915 adds (597 in all), same Aurora base: deep-sleep
wake marks from the resume stub to init_kernel_el plus the kernel pointer
authentication keys installed again on the way back, and a runtime switch
(off by default) for the memory bandwidth vote macOS sends under load. The
recipe is the linux-aurora package.

STATUS.md: 1.915 is the default as linux-aurora with 1.914 beside it as
linux-aurora-next. The early-boot stall is stated as the journal shows it:
6 of 22 boots since 1.903, on kernels we called good too, each ending at
about 6 s between the speaker start at login and the external display
coprocessor's idle power-down; the change in 1.909 did not fix it. The fix
candidate rides 1.916 and is not proven yet.

UPSTREAM.md: aurora-silicon/linux#1927 (DART interrupt handler and a
powered-down DART) and #1928 (the J604 SMC power channels) opened;
#1894 speakers audible on this J604 with the same properties.
m0d16l14n1 added a commit to m0d16l14n1/linux that referenced this pull request Nov 15, 2026
IronsideXXVI: iommu: apple-dart: leave a powered-down DCP DART alone in its IRQ handler
@RyanTheTide
RyanTheTide merged commit 9af711e into aurora-silicon:integration/aurora Nov 15, 2026
1 check passed
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.

2 participants