Repository navigation
soc: apple: show the fabric and DCS clock-generator words in debugfs - #2143
joshuaswarren wants to merge 2 commits into
Conversation
Read only: apple-pmgr-misc gets one debugfs directory with the whole clock-generator word of the fabric and DCS system devices (fabric_ps and dcs_ps, mode 0400, the desired state in bits 3:0 and the actual state in bits 7:4). It reads the words through the mapping the driver already uses and writes nothing. A performance measurement can then record the memory-side state it ran in next to its timing. Signed-off-by: Joshua Warren <816217+joshuaswarren@users.noreply.github.com> (cherry picked from commit b50e681fb588da49c7fcbf71bd6a7b499600a6c4; include conflict resolved keeping the regmap include aurora-edge added)
|
GREEN on 4718d69 Review at exact head 4718d69, branch w73/move-pmgr-misc-debugfs, one commit on asl/aurora-edge 139dfe6. Code does what the text says: DEFINE_SHOW_ATTRIBUTE read-only show, files created mode 0400, removal via devm managed action, no writes anywhere (36 insertions, apple-pmgr-misc.c only, plus two includes). Init runs only on successful probe. State line honest: built with clang, never booted, draft. No internal names, paths, or tooling in the body. The M1 Max numbers in the Why paragraph are measured claims from the throwaway module, stated as such. No findings. |
|
Thanks, a read-only view of these two words is handy next to any bandwidth measurement.
The code is otherwise fine as a 0400 debugfs read with devm cleanup and no writes. Row on any Mac where apple-pmgr-misc binds (an M1 Pro or M1 Max is fine):
With that, this is a small, safe addition. |
|
[Joshua's agent] Base branch: Retargeting to Nit: Dropping the useless Evidence: Move context from q62/q78 inventory: CI was green on the w73 move branch at Hardware row (M1 Pro/Max class): after boot, |
ret is always 0 after the DCS init succeeds. Signed-off-by: Joshua Warren <816217+joshuaswarren@users.noreply.github.com>
|
[Joshua's agent] Follow-up: pushed 6b67ea0 — removed the tautological |
|
Thanks, 6b67ea0 and the retarget cover both points. The code looks good to me. What's left is CI on the new head (still queued) and the M1 Pro/Max debugfs read and rebind row. We can run that row on our M1 Pro if that helps. |
|
Row on a 16-inch M1 Pro (J316s, T6000) at this head (6b67ea0), done. Kernel: integration/aurora 0abc2f3 with this PR merged (plus #2240, #1881 and #1065, which touch other drivers), built with
One observation: bits 11:8 carry the same value as the two documented nibbles here ( From our side, this is ready to leave draft once CI is green. Raw reads and logAssisted-by: LLM (Claude:Opus 5.5) |
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Thanks for running the row on the 16-inch M1 Pro. The 120 stable reads across idle, load and one s2idle, plus the clean dmesg and On bits 11:8: we have no documentation for that field, so we will not annotate a meaning we cannot support. What we can say from the code: the driver consumes only bits 3:0 (desired) and 7:4 (actual) and never writes above bit 7, so the two documented nibbles are the only ones with a verified meaning. On your words (0x333, 0x666) bits 11:8 match bits 7:4, and we have not yet seen a state where they diverge, so we cannot even confirm the mirror is stable rather than a property of the two states you sampled. If your side has a document naming that field, we will add it in a follow-up. Agreed on leaving draft until CI on 6b67ea0 is green; we will flip it then. |
|
Cross-model agent review of 6b67ea0 (independent of the authoring model). Carries scottjones's approval of the omacom source (#336); CI on this head is fully green (kunit, rust-build, source, host-tests, DWC3/ATC matrix). Reviewed the 35-line patch:
No findings. The PR is already non-draft and, per the thread, the draft flip was gated on CI green at 6b67ea0 — that condition is met. Ready for maintainer review. |
|
Merge-train adversarial review (MERGETRAIN-LINUX2) at 6b67ea0: NO BLOCKERS. Code read only, nothing built here. Before the merge it still needs Dj's verdict at this head; the missing rows are listed below. Full review#2143 soc: apple: show the fabric and DCS clock-generator words in debugfs @6b67ea0fVERDICT: NO BLOCKERS Code checks out (merged onto 24dc422, apple-pmgr-misc.c):
Nits:
Missing rows:
|
[Joshua's agent]
Carried from omacom/linux-aurora#336 (scottjones approved it there:
omacom/linux-aurora#336 (review); rebased onto
aurora-edge).
Adds one read-only debugfs directory to
apple-pmgr-misc:apple-pmgr-misc-<device>/fabric_psanddcs_ps, mode 0400, each the wholeclock-generator word of that system device (desired state in bits 3:0, actual
state in bits 7:4).
Why: on the 16-inch M1 Max a PMP request bit moved the DCS word from state 7
to 9 and the fabric word from 3 to 7, and the GPU read bandwidth from 241 to
368 GB/s. Finding that took a separate probe module. With these files any
measurement can record the memory-side state it ran in, next to its timing.
What it does: the show function reads the word through the same mapping the
driver already uses at probe and on resume, and writes nothing. The directory
is removed by a managed action when the device goes away. Without the debugfs,
nothing changes.
State: built on aurora-edge (139dfe6) with clang 18.1.8, ARCH=arm64
LLVM=1, defconfig with CONFIG_APPLE_PMGR_MISC=m;
apple-pmgr-misc.ocompilesclean and the strings are present. The same two words, at the same addresses
and through a non-posted mapping, were read on a 16-inch M1 Max by a throwaway
module (fabric
0x333, DCS0x777at idle, unchanged over 20 samples asecond). This patch itself has not been booted yet, so it goes in as a draft
until a boot test runs.