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) |
[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.