Skip to content

soc: apple: clpc: hold the M4 (T8132) memory, fabric and P-cluster floors for ANE work - #2856

Open
RyanTheTide wants to merge 10 commits into
mainfrom
clpc/t8132-ane-floor-r2-20261123
Open

RyanTheTide wants to merge 10 commits into
mainfrom
clpc/t8132-ane-floor-r2-20261123

Conversation

@RyanTheTide

@RyanTheTide RyanTheTide commented Nov 22, 2026 •

Copy link
Copy Markdown
Contributor

What: Let the T8132 CLPC hold memory and fabric floors for active Neural Engine work. The optional apple,ane-cpu-opp phandle identifies the CPU cluster and OPP. The policy notifier is registered only after the teardown action is installed.

Tested: Forward head f55414feee1f0: arm64 clpc.o built with W=1 from the fleet89 configuration, with the corrected Rust bindings generator. All nine CLPC host jobs passed, including absent/invalid OPP coverage, the five parser mutations, and platform-profile teardown checks. Prior J713 M4 Air at a3ff20338afe used the default cmdline on 27.2 firmware and held the expected floors with no reported faults.

Risk: one-way door · optional T8132 devicetree binding. The driver also shares platform-profile and teardown paths with other Macs.

Not yet: Guarded J713 at this head, including a DTB without apple,ane-cpu-opp. Repeat normal ANE and release checks and a shared peer with the current default.

Details

Supersedes #2671. This forward merge onto ba29027e1580 keeps the main branch's PMC and platform-profile probe paths. The driver resolves the OPP after allocating the ANE provider. Both ANE and the low-power profile use one idempotent notifier registration after cleanup is registered. The legacy fallback stays available on hardware where it was already configured. T8132 has no fallback CPU floor when the property is absent.

Evidence
  • Earlier J713 stock-cmdline MobileNetV1 A/B ran 2,000 iterations per arm. Before this series, median EXECUTE was 0.918 ms and firmware time 0.697 ms. With memory/fabric and the DT-selected P-cluster floor, those were 0.457 ms and 0.315 ms. Top-1 was 16/16 in both arms.
  • Existing J713 hardware and 11/11 KUnit evidence at the previous head is in the review. The forward merge changes integrated probe code, so the new hardware rows are listed above.
  • The new build uses CONFIG_APPLE_CLPC=y, CONFIG_MFD_MACSMC=y and CONFIG_ACPI_PLATFORM_PROFILE=y. The OPP parser bounds output to 1 kHz through S32_MAX kHz and puts every devicetree node it obtains.

The M4 (T8132) CLPC takes no ANE input, so Neural Engine work runs with
the memory controller and fabric at whatever the CPUs ask for. On an
idle J713 MobileNetV1 takes 0.92 ms an EXECUTE (firmware 0.70 ms). With
every CPU busy, which makes the CLPC hold its M5/F3 busy floor, the same
program takes 0.35 ms (firmware 0.34 ms). The M4 Pro, whose CLPC holds
an ANE floor, takes 0.27 ms.

Make the T8132 CLPC an ANE provider and hold that one qualified busy
floor, M5/F3 (the state the GPU gets while it has work in flight),
while ANE work is in flight.

Also add the SMC dependency the CLPC KUnit config was missing (the test
kernel did not link without it).

Signed-off-by: Ryan Murray <[email protected]>
As on the M4 Pro, the M4's Neural Engine runs at a speed set by the
frequency of one CPU cluster, whatever runs on it: here the P cluster
(cpu-map cluster1). With the M5/F3 floor held, MobileNetV1 on a J713
spends 0.44 ms in the firmware with the P cluster at or below 1.512 GHz,
0.32 ms at 2.616 GHz and 0.29-0.31 ms from there up to 4.104 GHz.

Hold the P cluster at 2.616 GHz, the start of that plateau, while ANE
work is in flight, through the existing cluster floor.

Signed-off-by: Ryan Murray <[email protected]>
The Neural Engine on M4-generation SoCs runs at a speed set by the
frequency of one CPU cluster, whatever runs on it. Let the CLPC node
name an OPP of that cluster's table: while ANE work is in flight the
cluster is held at or above that OPP's frequency.

Signed-off-by: Ryan Murray <[email protected]>
On a J713, MobileNetV1 spends 0.44 ms in the ANE firmware with the P
cluster at or below 1.512 GHz, 0.32 ms at 2.616 GHz and 0.29-0.31 ms
from there up to 4.104 GHz. Point the CLPC's apple,ane-cpu-opp at the
P cluster's 2.616 GHz OPP, the start of that plateau.

The property goes in t8132.dtsi, not in t8132-memory.dtsi with the rest
of the CLPC node: the T8132 platform-data adapter shares that file
without the CPU OPP tables, so a boot that takes its nodes from the
adapter gets no ANE cluster floor.

Signed-off-by: Ryan Murray <[email protected]>
The T8132 ANE cluster floor came from the CLPC's hardware table (cluster
1, 2616000 kHz) and was applied only on machines compatible with
"apple,t8132". Both are already in the device tree: the cluster is the
one whose CPUs use the OPP table, and the floor is an OPP in it.

Read the CLPC node's apple,ane-cpu-opp at probe: the cluster is a CPU
whose operating-points-v2 is the OPP's table, the floor is its opp-hz.
Without the property there is no cluster floor on T8132. T6040 keeps
its table entry until its tree carries the property.

tools/asahi/clpc-ane-cpu-opp-tests.py runs the production parser over a
fake tree: the CPU comes from the OPP's table and the floor from its
opp-hz, an OPP no CPU uses or without a usable frequency is refused, a
CPU without a node is skipped, and every node it gets is put. Taking
any CPU, reporting hertz or leaking the OPP node each fail it.

Signed-off-by: Ryan Murray <[email protected]>
Probe registered the cpufreq policy notifier for the ANE cluster floor
before apple_clpc_stop() was installed as a devres action. Any probe error
in between (a bad apple,gpu-power-state, no PMC parent, no reg, a bad rail
count, an allocation failure) freed the CLPC data with its notifier still
on the global policy chain, and the notifier would also have taken
sample_lock before mutex_init(). Register it from one helper, used by the
ANE floor and by the platform profile, only once apple_clpc_stop() is in
place to unregister it. The ANE floor and its ane_cluster_khz debugfs
file now exist only when the notifier is registered.

apple,ane-cpu-opp accepted any opp-hz up to UINT_MAX kHz, but the floor
is a frequency QoS request, which is an s32: a value above S32_MAX kHz
turned into a negative request that failed on every sample. Refuse it,
compare the CPU's OPP table before putting it, and cover both bounds
(1 kHz, S32_MAX kHz), an OPP outside a table and a CPU without a table
in clpc-ane-cpu-opp-tests.py, with mutants for the bound and the
missing parent check.

Also put the T8132 ANE KUnit expectations under their own comment.

Signed-off-by: Ryan Murray <[email protected]>
@RyanTheTide

Copy link
Copy Markdown
Contributor Author

Review at a3ff203.

The DT shape for the cluster floor is the right direction, but the series still carries a SoC gate, the floor value comes from a benchmark, and the head mechanism has not run on hardware.

  1. arch/arm64/boot/dts/apple/t8132.dtsi:1446: apple,ane-cpu-opp = <&donan_p_opp_2616> is a tuning choice taken from one model's plateau (MobileNetV1 on one J713). It is not a hardware fact. The OPP exists in the table, but nothing in the machine says the ANE needs 2.616 GHz. Is there an ADT/firmware source for the ANE-to-cluster dependency or a minimum perf state (ANE or CLPC node, perf-state list)? If so, take it from there. If not, the property should be documented as a policy choice, and a second workload (a conv-heavy model, not only MobileNetV1) should show the same plateau before it goes into the shared dtsi.
  2. drivers/soc/apple/clpc.c:1474-1477 plus the T6040 table (.ane_cluster = 2, .ane_cluster_khz = 3756000, .ane_cluster_machine = "apple,t6040", ~1774): the of_machine_is_compatible() fallback stays. Now that the property exists, add it to the T6040 dtsi in this series and drop ane_cluster, ane_cluster_khz, ane_cluster_machine, apple_clpc_cluster_cpu() and the fallback. Otherwise a second path for the same feature stays behind a machine gate.
  3. clpc.c:1568: ane_cluster_khz is still a writable u32 in debugfs. The S32_MAX bound that commit 6 adds to the DT parser can be bypassed there, and a write above S32_MAX kHz brings back the negative QoS request that fails on every sample. Make it read-only, or clamp it in a custom setter.
  4. Commit 2 adds a T8132 table entry with a machine-compatible gate, and commit 5 removes it. Squash 2 into 5 so that no commit adds a gate.
  5. clpc.c:403-407: apple_clpc_ane_providers repeats what hw->ane already says, and apple_clpc_ane_get() already checks clpc->ane. Each new SoC now needs two edits. Consider matching against the driver's of_match table instead and relying on clpc->ane (follow-up is fine).
  6. Hardware rows owed at this head (the J713 numbers are from the table version):
    • J713, Stage 2 DTB from this tree: ANE EXECUTE p50 A/B (no floor, M5/F3 only, M5/F3 + DT cluster floor), with ane_cluster_khz reading 2616000 while busy and the QoS request back at its default about 32 ms after the last EXECUTE.
    • J713 idle package power after the ANE device is closed, against a kernel without the series (floors must not stick).
    • J713 sustained ANE load for 10+ minutes on the fanless chassis: package power, die temperatures and whether thermal/scaling_max_freq caps win over the 2.616 GHz floor and the DCS/fabric floor.
    • J713 low-power profile: the profile ceiling still wins over the ANE floor.
    • No regression from commit 6's probe reordering on one other CLPC Mac: M4 Pro (T6040) ANE floor still held through the fallback, platform profiles still working. Also one T6041 or T8140 probe/unbind cycle with no notifier left on the chain.
    • Other T8132 boards inherit the floor from t8132.dtsi (J773g, etc.). Either one boot row there or a note that only J713 was tested.

@DjDeveloperr DjDeveloperr left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Adversarial pre-PR checklist review (§1–§6) at a3ff20338afe6fd8190de3151a6569a468c20b96 (REQUEST_CHANGES).

Checklist Summary

  • §1 (No model gating): Pass — at head a3ff2033, T8132's ANE cluster floor is driven purely from the DT property apple,ane-cpu-opp = <&donan_p_opp_2616> in arch/arm64/boot/dts/apple/t8132.dtsi (documented in Documentation/devicetree/bindings/power/apple,pmc.yaml), with apple_clpc_hw_t8132.ane_cluster_khz = 0 and .ane_cluster_machine = NULL. T6040 retains its existing table entry only as a fallback when apple,ane-cpu-opp is absent (-ENOENT), per §1 chicken-and-egg rules.
  • §2 (Production-ready / default cmdline): Pass — works on default command line with no module parameters or hacks.
  • §3 (Safety & concurrency): Pass (with one pre-existing non-blocking concurrency note below) — apple_clpc_ane_cpu_opp() validates opp-hz in [1 kHz, S32_MAX kHz] (preventing negative s32 PM QoS requests), compares cpu_table == table before of_node_put(), and balances all OF node references (verified by clpc-ane-cpu-opp-tests.py + 5 mutations). Moving apple_clpc_policy_nb_register() after devm_add_action_or_reset(dev, apple_clpc_stop, clpc) and mutex_init(&clpc->sample_lock) closes the probe-error UAF / uninitialized-mutex race and prevents double registration when both ane_cpu >= 0 and low_power_khz are set. clpc->ane kref + apple_clpc_ane_detach() remain safe across removal.
  • §4 (Clean-room & attribution): Pass — all 6 commits carry human author/committer and human Signed-off-by: only; PR body includes Assisted-by:.
  • §5 (Evidence): Blocked — see Blocker below.
  • §6 (Naming): Pass — clean Aurora/Linux naming throughout.

Blocker

  1. §5 (Evidence) — No J713 hardware run or arm64 KUnit run at head a3ff2033 (and CI still running):
    • The J713 MobileNetV1 table in the PR body was collected on the earlier table-based commits (prior to apple,ane-cpu-opp DT parsing, the apple_clpc_policy_nb_register() / apple_clpc_stop() reordering, and the rebase onto #2816).
    • As listed under **Still to run.**, please post the head a3ff2033 evidence:
      1. arm64 QEMU KUnit (drivers/soc/apple/clpc.kunitconfig) on a3ff2033.
      2. J713 run on a3ff2033 with a Stage 2 DTB built from this tree: 2.616 GHz P-cluster floor held during MobileNetV1 and released after, matching EXECUTE latency, plus a boot without apple,ane-cpu-opp showing no cluster floor and no regressions.
      3. On the same J713 boot: #2816 low-power/performance platform profiles still behave as before, thermal/scaling_max_freq cap below 2.616 GHz still wins over the ANE floor, idle/sustained package power, and regression counts (0 SELinux denials, 0 failed units, 0 new kernel errors).
    • Also wait for CI dt-checks and kunit to finish green (currently IN_PROGRESS; host-tests, source, rust-build, and DWC3/ATC builds are green).

Non-blocking Technical Notes

  • Pre-existing lock race between apple_clpc_halt() and apple_clpc_policy_notify() (drivers/soc/apple/clpc.c:1196-1199, 1221-1230, 1252-1262): apple_clpc_halt() reads clpc->ane_qos_khz and calls freq_qos_update_request(&clpc->ane_qos, FREQ_QOS_MIN_DEFAULT_VALUE) without holding clpc->sample_lock, and in apple_clpc_stop() it runs before cpufreq_unregister_notifier(). A concurrent CPUFREQ_REMOVE_POLICY callback (which takes sample_lock and calls freq_qos_remove_request(&clpc->ane_qos)) can race with apple_clpc_halt() on suspend or unbind. Wrapping the ane_qos update in apple_clpc_halt() with sample_lock (and checking freq_qos_request_active(&clpc->ane_qos)) would close this cleanly.
  • apple_clpc_ane_cpu_opp() missing-vs-invalid phandle (clpc.c:1288-1290): If apple,ane-cpu-opp is present in DT with a broken phandle, of_parse_phandle() returns NULL and the helper returns -ENOENT, which on a fallback-capable SoC (like T6040) would silently fall back to the table instead of returning -EINVAL. Checking of_property_present() first would distinguish absent from malformed.
  • Intermediate commit gating: Commit 2 (2b4248d1523b) temporarily adds .ane_cluster_machine = "apple,t8132" before commit 5 (60dd04604a66) replaces it with apple,ane-cpu-opp. Net state at a3ff2033 is clean.

@RyanTheTide

Copy link
Copy Markdown
Contributor Author

Review at a3ff203: BLOCKERS:

  1. Hardware: no boot with a DTB that lacks apple,ane-cpu-opp (requested in the soc: apple: clpc: hold the M4 (T8132) memory, fabric and P-cluster floors for ANE work #2671 review, item 3). Without that row, nothing shows that a T8132 boot whose CLPC node comes from the legacy-loader adapter, or from an older ESP DTB, probes cleanly with no cluster floor. Fix: boot J713 with the property removed from the Stage 2 DTB (fdtput -d, DTB-only trial). Check that ane_cluster_khz is absent, that the P policy minimum stays at 912000 under MobileNetV1, and that the M5/F3 ANE floor still shows in status.
  2. Hardware: the idle power reading 60 s after release, with the panel dark, against a kernel without this series (item 4 of that review) is still missing. The 11-22 run says its own idle number is unusable because the panel lit up. Fix: interleaved A/B with the panel held off through Mutter PowerSaveMode.
  3. Hardware: the series has not run at this head. The J713 rows are from 9736f57, before the probe reordering and the rebase onto soc: apple: clpc: Take the Low Power mode ceiling from the DT (rebased on #2784) #2816. Fix: one J713 boot at a3ff203 that shows the floor is held and then released, the soc: apple: clpc: Take the Low Power mode ceiling from the DT (rebased on #2784) #2816 low-power and performance profiles still working, and a scaling_max_freq/thermal cap below 2616000 still beating the floor. A second T8132 board (J773g, item 5) inherits the property from t8132.dtsi, so it needs one boot row too, or the PR body should say that only J713 was tested.

The two code findings from the #2671 review are fixed at this head, and I found no new code defect. The blockers above are the hardware rows that review asked for, which are still owed.

Full review

Code findings from the #2671 review (9736f57), checked at a3ff203:

  • Policy notifier UAF on a probe error: fixed. apple_clpc_policy_nb_register() (clpc.c:1266) is the only way the notifier gets registered. Both callers come after devm_add_action_or_reset(dev, apple_clpc_stop, clpc) (clpc.c:1560): the ANE floor at 1565 and the low-power profile at 1616. Probe now resolves only the OPP and kHz before that point, so an early error return frees clpc with nothing on the chain. The mutex_init(&clpc->sample_lock) at 1534 also comes before registration, so the notifier's guard(mutex) can no longer take an uninitialised lock. Teardown runs in reverse devm order: the platform profile (registered later) goes first, then apple_clpc_stop() (halt, then unregister the notifier, then remove ane_qos and max_qos), then the ane and gpu owner puts. No path leaves a request or notifier behind.
  • opp-hz above S32_MAX kHz: fixed. apple_clpc_ane_cpu_opp() refuses hz < 1000 and div_u64(hz, 1000) > S32_MAX, so a DT value can no longer reach freq_qos_update_request() as a negative s32.
  • Nits: cpu_table == table is now compared before of_node_put(). ane_cluster_khz and its debugfs file exist only when the notifier is registered. The T8132 KUnit expectations sit under their own comment.
  • accel/ane: run the T8132 (M4) Neural Engine on macOS 27.2 firmware #2630 (item 6) has landed. Merge base = integration/aurora 95a13cf.

Replay onto #2816: the only conflict, if (clpc->low_power_khz && !clpc->policy_nb_added) {inline register}, became if (clpc->low_power_khz) apple_clpc_policy_nb_register(clpc). The helper returns early when the notifier is already added, so the two are the same. The low-power DT ceiling, apple,high-power-mode and the "apple-smc" profile are untouched.

Other Macs: when the property is absent, -ENOENT falls back to the existing T6040 table entry. T8140/T6041 have ane_cluster_khz == 0, so ane_cpu stays negative and nothing is registered. SoCs without hw->ane never parse the property. The final tree adds no chip or machine gate: the only of_machine_is_compatible() left is the pre-existing T6040 fallback. Commit 2 adds a T8132 machine-gated table entry that commit 5 removes. That is not a blocker for the merged result, but squashing them would keep the gate out of history. No new module or cmdline parameter, no new delay. apple_clpc_ane_get() gains apple,t8132-clpc as a provider. It creates no device link and never defers, so a T8132 boot without the CLPC driver loses nothing.

Lifetime/refcount: the cpufreq_cpu_get() in apple_clpc_ane_cluster() always has its cpufreq_cpu_put(). ane_qos is added once (guarded by freq_qos_request_active) and removed in the REMOVE_POLICY notifier or in stop. Every of_node_put in the new parser is balanced: the host test checks 84 gets/puts, and its leak mutant is killed. ane_cluster_khz is written before platform_set_drvdata() and before the first apple_clpc_queue(), so no sample can read it half set up. Minor, non-blocking: the 0600 debugfs ane_cluster_khz still accepts a value above S32_MAX kHz from root. That only counts update_errors on each sample, and T6040 has the same behaviour today.

DT/binding: apple,ane-cpu-opp is documented as a phandle in the performance-controller node (additionalProperties: false). In all six T8132 DTBs (j604, j623, j624, j713, j715, j773g) it resolves to the phandle of opp-2616000000 in the P table (donan_p_opp, used by the four donan-p CPUs). The property sits in t8132.dtsi, so t8132-platform-data.dts (memory dtsi only) does not reference the CPU OPP tables.

Mechanics: every commit in integration/aurora..a3ff203 carries only Signed-off-by: Ryan Murray, with no Co-Authored-By/Assisted-by/session trailers. The body ends with Assisted-by:. git merge-tree onto integration/aurora is clean. CI: source, host-tests, rust-build and 3x DWC3/ATC pass; kunit and dt-checks are still pending on Actions.

Run here at a3ff203:

  • clpc-ane-cpu-opp-tests.py: PASS.
  • run-host-tests.py --only clpc: 9/9, with the any-cpu/hz/leak/u32/no-parent mutants killed.
  • KUnit apple-clpc* (arm64 qemu, drivers/soc/apple/clpc.kunitconfig, KASAN+UBSAN): 11/11 passed, no KASAN/UBSAN reports.
  • make W=1 dtbs for the six T8132 boards: they build. The dtc warnings are the existing dcp/pmgr/aliases ones, none in clpc.
  • dt_binding_check: not run (no dtschema here).

Assisted-by: LLM (Claude:Opus 5.5)

@RyanTheTide

Copy link
Copy Markdown
Contributor Author

arm64 KUnit at a3ff203 (§5 item 1): kunit.py run --arch=arm64 --make_options LLVM=1 --kunitconfig=drivers/soc/apple/clpc.kunitconfig 'apple-clpc*' on qemu, with the PR's kunitconfig (KASAN generic + UBSAN bounds): 11/11 passed, no KASAN/UBSAN/BUG/WARNING lines. Cases include apple_clpc_ane_cluster_test, apple_clpc_ane_no_provider_test, apple_clpc_ane_wake_removal_test and apple_clpc_t8132_gpu_input_test. The J713 rows at this head are still to come.

@RyanTheTide

Copy link
Copy Markdown
Contributor Author

J713 rows at a3ff203 (13-inch M4 Air, 27.2), for item 3 of the review.

The kernel is integration/aurora 95a13cf plus open heads, including this PR at a3ff203, booted as a one-shot on the default command line. The ANE load is MobileNetV1 looped on the H16G. policy0 is the P cluster (CPUs 0, 7, 8, 9). Values were sampled every 50 ms.

Step P scaling_min_freq P scaling_max_freq
idle 912000 4464000
ANE load 2616000 in 181/181 samples 4464000
5 s after the load stops 912000 in 91/91 4464000
ANE load, P cpufreq cooling device at state 13 1800000 (clamped to max) 1800000
ANE load, cooling device back to 0 2616000 back to 4464000
platform profile low-power, idle 912000 2088000
low-power with ANE load 2088000 (clamped to the ceiling) 2088000
performance / balanced 912000 4464000
  • The floor is held during ANE work and released when the work stops.
  • A cooling limit below 2616000 wins over the floor, and so does soc: apple: clpc: Take the Low Power mode ceiling from the DT (rebased on #2784) #2816's low-power ceiling.
  • The apple-clpc platform profile still switches between all three profiles.
  • Boot counts: SELinux Enforcing, 0 AVC denials, 0 failed units. The 2 kernel error lines are the existing dwc3 genpd_prepare returns -11 refusals during s2idle; s2idle 1/1.

Still to run: the boot with a DTB that lacks apple,ane-cpu-opp, and the dark-panel idle power ABAB against a kernel without this series.

Assisted-by: LLM (Claude:Opus 5.5)

niteria added a commit to niteria/linux that referenced this pull request Nov 23, 2026
Once the T8142 engine AXI2AF bridge tunables are applied, pure ANE
execution time on T8142 also depends on the P-cluster frequency (cpu-map
cluster1), independent of which CPU cluster submits the request.

Measured on J813 (MacBook Air 13" M5, T8142; J815 and J704 share the
compatible) pinned to an E-core with the DCS 7 / SOC 3 floor active,
unet-320 firmware report_done drops from 660.5 us with no P-cluster floor
to 350.7 us at 4176 MHz (host p50 954.4 us -> 616.5 us, 4.49 W average),
with no further reduction at 4464 MHz (363.0 us, 5.31 W).

Enable the existing CLPC ANE cluster frequency floor on apple_clpc_hw_t8142
for cluster 1 at 4176000 kHz, matching all T8142 machines via
"apple,t8142" as required by the current apple_clpc_probe() check (no
single-board gating; can move to apple,ane-cpu-opp once aurora-silicon#2856 lands).
Extend apple_clpc_ane_cluster_test accordingly.

Signed-off-by: Bartosz Nitka <[email protected]>
@github-actions github-actions Bot added area:bringup Area from CODEOWNERS (bot) area:gpu Area from CODEOWNERS (bot) area:platform Area from CODEOWNERS (bot) changes-requested A reviewer requested changes (bot) merge-conflict Conflicts with the base branch (bot) needs-review No approving review from Core or Omarchy Mac yet (bot) needs-template PR body lacks Tested or Risk (bot) labels Nov 24, 2026
@github-actions

github-actions Bot commented Nov 24, 2026 •

Copy link
Copy Markdown

Merge readiness at ec83c545: not ready yet

Check Detail
CI at head no failing: apple-build, dt-checks, host-tests, source, KUnit ane-boot, rust-build
Review no needs one approving review from Core or Omarchy Mac (not the author)
Requested changes ok none
Hardware row at head no no line with the head SHA ec83c545, a Mac and a result in the PR body or a comment
Conflicts ok none
PR text ok Risk: one-way · optional T8132 devicetree binding. The driver also shares platform-profile and teardown paths with other Macs.

Areas: area:bringup, area:gpu, area:platform

Updated by pr-readiness on pushes, edits, reviews and comments, and on a schedule. Rules: merge policy · labels.

@github-actions github-actions Bot added merge-conflict Conflicts with the base branch (bot) and removed merge-conflict Conflicts with the base branch (bot) labels Nov 24, 2026
DjDeveloperr
DjDeveloperr previously approved these changes Nov 25, 2026

@DjDeveloperr DjDeveloperr left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Verdict: FINISH, then merge at a3ff20338afe: the code is ready; it needs only a row at this head.

Blockers: none in the code. Missing row: your J713 rows at this head show the floors held under the ANE load, and KUnit passes 11/11. What your 11-22 note still asks for is one J713 boot with apple,ane-cpu-opp removed from the DTB, probing cleanly with no cluster floor. The branch also conflicts with main; update it first.

Checked: no Apple material. The CPU OPP comes from the DT (apple,ane-cpu-opp), not a table.

Keep the platform-profile and PMC probe paths from main. Resolve the ANE OPP after its provider is allocated and register the shared policy notifier after the teardown action is registered.

Signed-off-by: Ryan Murray <[email protected]>
@RyanTheTide
RyanTheTide requested review from a team as code owners November 25, 2026 11:46
@github-actions github-actions Bot added blast:m4 Macs affected, from Merge risk (bot) ci-failing A check failed at the PR head (bot) door:one-way Revertible or not, from Merge risk (bot) needs-review No approving review from Core or Omarchy Mac yet (bot) and removed needs-template PR body lacks Tested or Risk (bot) labels Nov 25, 2026

@aurora-silicon-review aurora-silicon-review 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.

Verdict: FINISH, then merge at f55414fe

Blockers:

  1. 27 CI checks (apple-build, dt-checks, host-tests, source, pr-text, readiness, KUnit suites) were cancelled at f55414fe and need a green rerun.
  2. Missing the negative J713 boot row at f55414fe (booting with apple,ane-cpu-opp absent from the DTB to confirm clean probe with no cluster floor) alongside exact-head confirmation.

Checked:

  • Code & DT binding (apple,ane-cpu-opp in apple,pmc.yaml and t8132.dtsi, policy notifier registered after teardown action in a3ff2033, cleanly forward-merged at f55414fe): no SoC/board gates, MERGEABLE on main.
  • Checked for Apple material, tool attribution, and private serials: clean.
Evidence
  • Head: f55414feee1f (base: main, mergeable: MERGEABLE, +293/-27 across 6 files).

@RyanTheTide

Copy link
Copy Markdown
Contributor Author

Forward-merged main into this branch, new head 34249ab. The merge was clean, with no force push. The PR's diff against main is still the same 6 files: clpc.c, t8132.dtsi, apple,pmc.yaml, clpc.kunitconfig, the clpc-ane-cpu-opp host test and its run-host-tests entry. clpc.c now sits on top of #3293 (deferrable idle timers) and the apple,cpu-busy-floor change.
Tests: `tools/asahi/run-host-tests.py --only clpc` on the merge, 9/9 passed, including clpc-ane-cpu-opp-tests. clpc KUnit and the arm64 build were not run locally because the buildbox is saturated; CI covers both at this head.
Still needed, all at 34249ab: (a) J713 with the shipped DTB: an ANE load holds the memory, fabric and P floors, release drops them, one s2idle; (b) J713 with `apple,ane-cpu-opp` removed: probes clean, no cluster floor; (c) one J473 or J413 no-change row: platform_profile switch and a clean teardown. Then App review and merge.

@aurora-silicon-review aurora-silicon-review 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.

Verdict: HOLD — forward merge clean, awaiting queued CI and exact-head hardware rows at 34249abde14b

Blockers:

  1. 27 CI checks at 34249abde14b (apple-build, dt-checks, host-tests, kunit, rust-build, source, pr-text, readiness, KUnit suites) are still queued and must finish green.
  2. Exact-head hardware rows at 34249abde14b remain open: (a) J713 with the shipped DTB (ANE load holds memory, fabric, and P-cluster floors, release drops them, plus one s2idle cycle), (b) J713 negative boot with apple,ane-cpu-opp removed from the DTB confirming clean probe with no cluster floor, and (c) J473 or J413 no-change row (platform_profile switch and clean teardown).

Checked:

  • Forward merge 34249abde14b of main (#3293 deferrable idle timers + apple,cpu-busy-floor): clean (MERGEABLE), confined to the same 6 files (apple,pmc.yaml, t8132.dtsi, clpc.c, clpc.kunitconfig, clpc-ane-cpu-opp host test, and run-host-tests.py).
  • apple_clpc_ane_cpu_opp() reference counting (of_node_put on cpu_np, cpu_table, table, opp), frequency bounds (hz >= 1000, div_u64(hz, 1000) <= S32_MAX), apple_clpc_policy_nb_register() ordering after apple_clpc_stop(), and tools/asahi/run-host-tests.py --only clpc (9/9 passed).
Evidence
  • Verified t8132.dtsi places apple,ane-cpu-opp = <&donan_p_opp_2616> outside t8132-memory.dtsi so legacy-loader adapters without CPU OPP tables stay unaffected.
  • No code blockers found at 34249abde14b.

@github-actions github-actions Bot added ci-failing A check failed at the PR head (bot) and removed ci-failing A check failed at the PR head (bot) labels Nov 29, 2026
@RyanTheTide

Copy link
Copy Markdown
Contributor Author

34249ab J473 (M2 Mac mini, T8112) no-change regression PASS: combined guarded one-shot 7.3.0-aurora-peer1+ on main 498d53fd (clpc.c byte-identical to 34249abde14b, default cmdline, saved Stage 2 unchanged; host test clpc-ane-cpu-opp-tests.py PASS); 0 CLPC errors, s2idle 1/1 (rtc1), external displays + VK api.smoke 8/8 ok, Enforcing, 0 AVC, 0 failed units; restored saved 7.3.0-aurora-m2combo30.

@RyanTheTide

Copy link
Copy Markdown
Contributor Author

I merged current main into this branch (ec83c545, normal push, no rebase, your commits unchanged). The last CI failures came from main itself on 11-29: the apple-scaler-recovery and g17-compute-owed-stamp fixtures, plus the apple-dcp harness break fixed in #3672. Re-running a job would reuse the old merge commit, so a fresh merge was the only way to clear them. Both merges were conflict-free. Host tests pass on the merged tree. The PR's own code is unchanged from 34249abd, so the existing hardware rows still cover it. Next: CI at this head and the review app's verdict.

@github-actions github-actions Bot added needs-hw-row No hardware row at the PR head (bot) and removed ci-failing A check failed at the PR head (bot) labels Nov 30, 2026

@aurora-silicon-review aurora-silicon-review 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.

Verdict: HOLD at ec83c545.

Checked: Compared the PR patch before and after the forward merge. The file set and added and removed lines match the reviewed revision. Keep hosted DT and driver checks, the J713 ANE floor/release row and the negative boot without the optional OPP.

@github-actions github-actions Bot added the ci-failing A check failed at the PR head (bot) label Dec 1, 2026

@aurora-silicon-review aurora-silicon-review 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.

Verdict: MERGE at ec83c545c748

Converts this App's earlier review at the same head to an approval under the 12-01 merge bar (better than before and doesn't break; block only on a shown failure). No code blocker was found in it. The merge gate (a row on one Mac at this head + fast CI) is tracked by pr-readiness, not held here.

Checked: Compared the PR patch before and after the forward merge. The file set and added and removed lines match the reviewed revision. Keep hosted DT and driver checks, the J713 ANE floor/release row and the negative boot without the optional OPP.

Follow-ups (not blocking): hosted DT/driver checks, J713 ANE floor/release row, negative boot without optional OPP

This branch has not been deployed

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

Labels

area:bringup Area from CODEOWNERS (bot) area:gpu Area from CODEOWNERS (bot) area:platform Area from CODEOWNERS (bot) blast:m4 Macs affected, from Merge risk (bot) ci-failing A check failed at the PR head (bot) door:one-way Revertible or not, from Merge risk (bot) needs-hw-row No hardware row at the PR head (bot) needs-review No approving review from Core or Omarchy Mac yet (bot)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants