Skip to content

platform/surface: re-lift contained SP11 platform profile - #38

Closed
ooaklee wants to merge 3 commits into
sp11/ubuntu-qcom-x1e-7.2.y-betafrom
sp11/beta-platform-profile
Closed

ooaklee wants to merge 3 commits into
sp11/ubuntu-qcom-x1e-7.2.y-betafrom
sp11/beta-platform-profile

Conversation

@ooaklee

@ooaklee ooaklee commented Sep 2, 2026 •

Copy link
Copy Markdown
Owner

Summary

Re-lift the contained Surface Pro 11 platform-profile provider, fan node, and opt-in low-power CPU-frequency ceiling from upstream-review PR jglathe#91.

Containment

  • profile and fan devices exist only in the SP11 registry group
  • CPU-frequency QoS is allocated only when the SP11 software-node property is present
  • existing Surface devices without that property retain the legacy transition path
  • ACPI notification and teardown paths remain state-guarded

Dependency

This branch is independently reviewable but overlaps the SP11 registry group with draft battery PR #37. It must be re-lifted after #37 qualifies and merges. Stable patch IDs match all three focused jglathe#91 commits.

Historical pre-sync focused software evidence

At 1587b018fb27:

  • beta integration validator: pass
  • strict checkpatch: 0 errors
  • git diff --check: pass
  • clean case-sensitive ARM64 ubuntu_x1e_defconfig W=1 builds of platform-profile, Surface registry, and Surface profile objects: pass
  • the same objects with CONFIG_CPU_FREQ=n: pass

Current re-lift verification

The three-commit series was re-lifted unchanged onto current beta bf631f9, producing head a89959a. Ordered stable patch IDs, author identities, and subjects match the pre-sync series, and git range-diff pairs all three commits exactly. GitHub CI and a local detached-head rerun of the exact-current-head integration check pass. Fresh case-sensitive ARM64 W=1 builds pass at exact head a89959a and tree 27d6fe159b4d for platform_profile.o, surface_aggregator_registry.o, and surface_platform_profile.o. Reproducible outputs are retained separately as out-profile-current-a89959-normal with CONFIG_CPU_FREQ=y and out-profile-current-a89959 with CONFIG_CPU_FREQ disabled.

Blocking qualification gates

The full SP11 and non-SP11 hardware matrix from jglathe#91 remains blocking, including policy hotplug/removal, error recovery, suspend/resume, fan/profile transitions, and pinned userspace integration.

This PR intentionally remains draft.

Post-battery composition preflight

A local-only re-lift of this three-commit series onto battery head 4eadf8da4b1c confirms the required conflict resolution. The resulting audit head 3276bf1126c1 keeps ssam_node_bat_ac and ssam_node_bat_main absent while retaining ssam_node_tmp_perf_profile_sp11 and ssam_node_fan_speed. Its registry blob fa20d00a29f8 exactly matches the previously audited aggregate. Exact-head integration checks pass, as do fresh normal and CONFIG_CPU_FREQ=n focused builds. This local branch is not published or hardware-qualified; the final PR re-lift still waits for battery qualification and merge.

@ooaklee

ooaklee commented Sep 2, 2026 •

Copy link
Copy Markdown
Owner Author

WITHDRAWN: aggregate qualification candidate

Do not install or hardware-test 7.2.2-sp11beta1 or candidate
80ecee88b749d7324e1274c0a1cf6dfd752fddfa.

A final-tree comparison against the hardware-qualified
sp11/integration-7.2.x source found active camera behavior missing from that
candidate: VFE680 MIPI RAW write-client mode, CSID680 crop/drop-engine
containment, and CAMSS partial stream-start unwind. Compile, schema, and package
success did not detect this runtime-semantic gap. A focused repair and a new,
uniquely named candidate are required before hardware testing.

This correction supersedes the build notice below; the old results are retained
only as reproducibility evidence.


Historical aggregate build record (withdrawn)

The held qualification branch sp11/ubuntu-qcom-x1e-7.2.y-beta-qualification
at 80ecee88b749 combined the provisional beta with draft PRs #36–#39 in
dependency order.

  • clean full ARM64 ubuntu_x1e_defconfig build: passed through modules,
    MODPOST, vmlinux, Image, vmlinuz, and vmlinuz.efi
  • aggregate touched-object W=1 build: passed
  • X1E/OLED, X1P/LCD, and representative non-SP11 DTBs: passed
  • all six changed binding families: passed; only two unrelated pre-existing
    schema warnings remained
  • complete bindeb-pkg: passed with unique kernel release
    7.2.2-sp11beta1
  • image package SHA-256:
    acc6368a15b5fcb4e0eb2059e5c401b14e87a5c2b3178fea73acdeed11f75ee4

The #37/#38 registry overlap was combined without simplifying either feature:
SP11 SAM battery/AC nodes remained omitted, and only the SP11 profile/fan nodes
were added.

These are historical composition and packaging results, not hardware
acceptance. They do not change any PR's draft status or waive any listed device,
non-SP11, userspace, provenance, or contributor-attestation gate.

@ooaklee

ooaklee commented Sep 2, 2026

Copy link
Copy Markdown
Owner Author

Aggregate hardware qualification is tracked in #41 at exact candidate
08249986a3f4efd7e0826c29e830601bfde928ed (tree
da7479fbffe997cdc980a147b4cb929d71253185).

This topic remains draft. A green aggregate build or CI result does not satisfy
its topic-specific hardware, dependency, provenance, or non-SP11 gates. Record
full-system evidence in #41 and link the relevant result back here before this
topic leaves draft state.

PR #41 is a test-only aggregate and must close without merge.

Device-tree systems can use platform-profile providers even when ACPI is
disabled, but the framework currently declines to register its class in
that case. Register the class unconditionally and create the legacy ACPI
attribute group only after ACPI has initialized successfully.

Record that group registration and use it to guard legacy notifications
and teardown. This keeps the class path independent of ACPI while also
avoiding a stale acpi_kobj after an ACPI initialization failure.

This exposes the native /sys/class/platform-profile/ interface without
creating a synthetic /sys/firmware/acpi hierarchy. Existing ACPI systems
retain the legacy aggregate attributes unchanged.

This is a contained rework of the original SP11 non-ACPI enablement.

Link: 106ad0d
Signed-off-by: Leon Silcott <leon@boasi.io>
The Surface Pro 11 has active cooling and supports SAM performance
profiles, but its registry group does not instantiate the existing
platform-profile and fan-speed devices.

Add the existing fan-capable profile node and fan-speed node only to the
Denali software-node group. Other Surface device groups are unchanged.

Link: 5c513ff
Signed-off-by: Leon Silcott <leon@boasi.io>
The Surface Pro 11 needs a lower CPU-frequency ceiling in its
low-power profile to match the validated cool-running baseline.
Describe the 2.515 GHz ceiling and default low-power selection on an
SP11-only software node.

Set up frequency-QoS only when that per-device property is present.
Devices without it retain the legacy TMP-then-fan write order,
including writes that repeat the current profile.

Track cpufreq policies through CREATE and REMOVE notifications plus a
per-device CPU-hotplug state, so a policy that is fully offline at
probe is capped when a CPU returns. Hold policy references while
attaching requests, clear stored raw pointers synchronously on REMOVE,
and stop hotplug callbacks before tearing down requests and the
notifier.

When entering low power, apply the cap before fan and TMP changes; when
leaving, restore fan and TMP before dropping the cap. If a SAM write
fails, read TMP back and reconcile fan and cap conservatively. An
unavailable cpufreq subsystem degrades to profile-only operation.

Omit the staging implementation’s no-op power-supply notifier. This is
a contained rework of the original SP11 low-power implementation.

Link: 30972bd

Signed-off-by: Leon Silcott <leon@boasi.io>
@ooaklee

ooaklee commented Sep 29, 2026

Copy link
Copy Markdown
Owner Author

September 29: isolated 7.2.5 review port published

The platform profile port is available on x/sp11-profile-7.2.5-20260928 at af4d11ea94712abad563b8381ba7b05ae1937d1e, based on the refreshed battery topic at 53905a94e735. This PR's existing head and diff are unchanged; the published ref is an experimental review candidate, not a replacement accepted by implication.

See the pinned-base mapping and current qualification checkpoint for replay/build evidence, dependencies and the actual v1 hardware result. No branch was force-updated, merged or deleted, and no duplicate PR was opened. Hardware and non-SP11 qualification remain outstanding.

@ooaklee

ooaklee commented Oct 4, 2026

Copy link
Copy Markdown
Owner Author

Closing this superseded review/qualification vehicle without merging. Current review work is tracked in ooaklee/linux_ms_dev_kit-sp11#60; ooaklee/linux_ms_dev_kit-sp11#68 is the single combined 7.2.5 qualification candidate. This does not discard the original feature intent or close any outstanding acceptance gate.

The current combined source is 8ba2b75713feb5c72bbc11dd8cce4048e23cdeea, ABI 7.2.5-jg-0sp11v8-qcom-x1e; see the experimental v8 release. Ordinary-use results on one X1E/OLED unit are recorded, but the release remains experimental and the detailed hardware, lifecycle, deviation, CI and provenance gates in ooaklee/linux_ms_dev_kit-sp11#68 remain open.

This PR's branch and exact head a89959ac61df, authored history, discussion and test evidence are retained unchanged. Closing is administrative supersession, not a merge, an acceptance decision, or a claim that the old and current trees are identical. Beta and the repository default are unchanged.

@ooaklee ooaklee closed this Oct 4, 2026
kyjus25 pushed a commit to kyjus25/linux_ms_dev_kit-sp11 that referenced this pull request Oct 14, 2026
commit 47cdab0 upstream.

rt6_nh_dump_exceptions() uses hlist_for_each_entry() to iterate over
RCU-protected exception lists. The caller holds rcu_read_lock(), but does
not hold rt6_exception_lock, so rt6_insert_exception() can concurrently
add an entry with hlist_add_head_rcu().

KCSAN reports this race (irrelevant details omitted):

  ==================================================================
  BUG: KCSAN: data-race in rt6_insert_exception / rt6_nh_dump_exceptions

  write (marked) to 0xffff8a7c44c59620 of 8 bytes by interrupt on cpu 5:
    rt6_insert_exception+0x3bb/0x760
    __ip6_rt_update_pmtu+0x4fe/0x750
    ip6_sk_update_pmtu+0x19a/0x3b0
    udpv6_err+0x3ff/0x800
    icmpv6_notify+0x1e1/0x440
    icmpv6_rcv+0x8c0/0xab0
    ip6_protocol_deliver_rcu+0x616/0x840
    ip6_input_finish+0xb9/0x160
    ...
    entry_SYSCALL_64_after_hwframe+0x77/0x7f

  read to 0xffff8a7c44c59620 of 8 bytes by task 549 on cpu 14:
    rt6_nh_dump_exceptions+0xb3/0x260
    rt6_dump_route+0x53e/0x5f0
    fib6_dump_node+0x6d/0xf0
    fib6_walk_continue+0x290/0x2d0
    fib6_dump_table+0x28d/0x360
    inet6_dump_fib+0x37d/0x620
    rtnl_dumpit+0x7b/0xd0
    netlink_dump+0x3ae/0x7e0
    ...
    entry_SYSCALL_64_after_hwframe+0x77/0x7f

  4 locks held by dumper/549:
    ...
    ooaklee#1: (rcu_read_lock){....}-{1:3}, at: inet6_dump_fib+0x88/0x620
    ooaklee#2: (&tb->tb6_lock){+.-.}-{3:3}, at: fib6_dump_table+0x1e9/0x360
    ooaklee#3: (rcu_read_lock){....}-{1:3}, at: rt6_dump_route+0x483/0x5f0

  value changed: 0xffff8a7c44e05700 -> 0xffff8a7c45d60100

  Reported by Kernel Concurrency Sanitizer on:
  CPU: 14 UID: 0 PID: 549 Comm: dumper Not tainted
  7.2.0-rc7-virtme ooaklee#38 PREEMPT(lazy)
  ...

Use hlist_for_each_entry_rcu() to safely iterate over the exception list.

Fixes: 1e47b48 ("ipv6: Dump route exceptions if requested")
Cc: stable@vger.kernel.org
Signed-off-by: Yuyang Huang <sigefriedhyy@gmail.com>
Reviewed-by: Stefano Brivio <sbrivio@redhat.com>
Reviewed-by: Ido Schimmel <idosch@nvidia.com>
Link: https://patch.msgid.link/20260815084651.69477-1-sigefriedhyy@gmail.com
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
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