Skip to content

Add stats compatible and config for Shikra#833

Open
smankad-oss wants to merge 3 commits into
qualcomm-linux:qcom-6.18.yfrom
smankad-oss:shikra_stats_qli2.0
Open

Add stats compatible and config for Shikra#833
smankad-oss wants to merge 3 commits into
qualcomm-linux:qcom-6.18.yfrom
smankad-oss:shikra_stats_qli2.0

Conversation

@smankad-oss

Copy link
Copy Markdown

SoC LPM stats are present in RPM MSGRAM and subsystem LPM stats are
present in SMEM for Shikra.

For earlier targets using RPM processor like msm8974, rpm_master_stat.c was
used for subsystem LPM stats since those stats were populated in RPM
MSGRAM.

qcom_stats.c supports both the configurations for shikra, reading subsystem
LPM stats from SMEM and reading SoC LPM stats from RPM MSGRAM.

A generic "qcom,rpm-stats" compatible only reads SoC LPM stats like vmin
and vlow. Add shikra rpm compatible and config to read subsystem LPM
stats too along with SoC LPM stats.

SoC LPM stats are present in RPM MSGRAM and subsystem LPM stats are present
in SMEM for Shikra.

A generic "qcom,rpm-stats" compatible only reads SoC LPM stats
like vmin and vlow.

Document shikra rpm compatible to read subsystem LPM stats too
along with SoC LPM stats.

Reviewed-by: Maulik Shah <maulik.shah@oss.qualcomm.com>
Signed-off-by: Sneh Mankad <sneh.mankad@oss.qualcomm.com>
SoC LPM stats are present in RPM MSGRAM and subsystem LPM stats are
present in SMEM for Shikra.

For earlier targets using RPM processor like msm8974, rpm_master_stat.c was
used for subsystem LPM stats since those stats were populated in RPM
MSGRAM.

Here is a brief summary of previous targets and their stats configuration,
along with the drivers used to display them.

+---------------|----------------------------|---------------------------+
| SoC           | subsystem LPM stats        | SoC LPM stats             |
|---------------|----------------------------|---------------------------|
| msm8974,      | RPM processor MSGRAM       | RPM processor MSGRAM      |
| msm8226       | (rpm_master_stat.c)        | (qcom_stats.c)            |
|---------------|----------------------------|---------------------------|
| sm6350,       | SMEM (DDR)                 | AOP processor MSGRAM      |
| sdm845, etc.  | (qcom_stats.c)             | (qcom_stats.c)            |
|---------------|----------------------------|---------------------------|
| Shikra        | SMEM (DDR)                 | RPM processor MSGRAM      |
|               | (qcom_stats.c)             | (qcom_stats.c)            |
+---------------|----------------------------|---------------------------+

qcom_stats.c supports both the configurations for shikra, reading subsystem
LPM stats from SMEM and reading SoC LPM stats from RPM MSGRAM.

A generic "qcom,rpm-stats" compatible only reads SoC LPM stats like vmin
and vlow. Add shikra rpm compatible and config to read subsystem LPM
stats too along with SoC LPM stats.

Below is an example showing LPM stats for "apss" subsystem with this
change:

cat /sys/kernel/debug/qcom_stats/apss
Count: 2192
Last Entered At: 5498618336
Last Exited At: 5498708046
Accumulated Duration: 2046572620.

Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
Reviewed-by: Maulik Shah <maulik.shah@oss.qualcomm.com>
Signed-off-by: Sneh Mankad <sneh.mankad@oss.qualcomm.com>
A generic "qcom,rpm-stats" compatible only reads stats for SoC level LPM
stats like vmin and vlow.

Shikra SoC specific compatible allows reading individual subsystem level
LPM stats along with SoC level LPM stats. Change it.

Keep "qcom,rpm-stats" as fallback compatible.

Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
Signed-off-by: Sneh Mankad <sneh.mankad@oss.qualcomm.com>
@qlijarvis

Copy link
Copy Markdown

PR #833 — validate-patch

PR: #833

Verdict Issues Detailed Report
3 Full report

Final Summary

  1. Lore link present: No — no lore.kernel.org Link tags found in any of the 3 commits
  2. Lore link matches PR commits: N/A — no lore link to compare against
  3. Upstream patch status: Unknown — cannot determine without lore link; however, presence of Reviewed-by tags from upstream maintainers (Konrad Dybcio) suggests these may have been posted to a mailing list
  4. PR present in qcom-next/topics: Fail - 2/3 commit(s) are missing from both qcom-next and topics
Verdict: ❌ — click to expand

🔍 Patch Validation

PR: #833 - Add Shikra rpm-stats support (3 commits)
Upstream commit: N/A
Verdict: ❌ FAIL

Commit Message

Check Status Note
Subject matches upstream N/A No lore link to compare against
Body preserves rationale N/A No lore link to compare against
Fixes tag present/correct No Fixes tag needed (new feature)
Authorship preserved N/A No lore link to compare against
Backport note (if applicable) N/A Not a backport

Diff

File Status Notes
Documentation/devicetree/bindings/soc/qcom/qcom-stats.yaml ⚠️ Cannot verify against upstream - no lore link
drivers/soc/qcom/qcom_stats.c ⚠️ Cannot verify against upstream - no lore link
arch/arm64/boot/dts/qcom/shikra.dtsi ⚠️ Cannot verify against upstream - no lore link

Issues

Critical:

  1. No lore.kernel.org link found in any of the 3 commit messages. This skill only validates patches against a lore.kernel.org source.
  2. No commit prefix (UPSTREAM:, FROMLIST:, BACKPORT:, QCLINUX:, etc.) to indicate the source or status of these changes.
  3. Integration presence check failed: 2/3 commits are completely missing from both qcom-next and topics branches; 1/3 commit shows only partial evidence.

Observations:

  • All three commits have proper sign-offs and review tags (Reviewed-by: Konrad Dybcio, Maulik Shah)
  • Commit messages are well-structured with clear rationale
  • Changes appear to be new Shikra-specific functionality for rpm-stats

Verdict

Do not merge without correction. These commits lack the required upstream attribution. Each commit must include either:

  • A Link: https://lore.kernel.org/r/<message-id> tag if posted to a mailing list (use FROMLIST: prefix), or
  • A Link: https://git.kernel.org/... tag if merged upstream (use UPSTREAM: or BACKPORT: prefix), or
  • A QCLINUX: prefix if this is vendor-only code not intended for upstream

Additionally, the integration presence check shows these changes are not yet in qcom-next or topics, which is inconsistent with the presence of upstream review tags.

Final Summary

  1. Lore link present: No — no lore.kernel.org Link tags found in any of the 3 commits
  2. Lore link matches PR commits: N/A — no lore link to compare against
  3. Upstream patch status: Unknown — cannot determine without lore link; however, presence of Reviewed-by tags from upstream maintainers (Konrad Dybcio) suggests these may have been posted to a mailing list
  4. PR present in qcom-next/topics: Fail — 2/3 commits are missing from both qcom-next and topics; 1/3 shows only partial evidence (per integration_presence_report.md)

Recommendation

Add appropriate Link: tags and commit prefixes to all three commits:

  • If posted to linux-kernel mailing list: add FROMLIST: prefix and Link: https://lore.kernel.org/r/<message-id>
  • If merged to mainline: add UPSTREAM: prefix and Link: https://git.kernel.org/.../commit/?id=<sha>
  • If vendor-only: add QCLINUX: prefix (no link required)

Then re-run validation.

Deterministic Integration Presence

Integration Presence Report

This report is generated by Jarvis before validate-patch runs.
It is the authoritative source for whether PR changes are already present
in qcom-next or in the kernel topic branches.

Kernel repo: /local/mnt/workspace/sgaud/Qgenie/image_pipeline/kernel
qcom-next ref: a5cf3debd8c3c660711ad586ad4bb84e9ca42635
topics remote: topics -> https://github.com/qualcomm-linux/kernel-topics
topics fetch: fetched

Commit Subject qcom-next topics Final
1/3 [PATCH 1/3] dt-bindings: soc: qcom: stats: Add compatible for Shikra missing - no subject, patch-id, or full tree-content match found missing - no subject, patch-id, or full tree-content match found missing
2/3 [PATCH 2/3] soc: qcom: stats: Add stats compatible and config for partial - subject or partial tree evidence found, but full change was not verified missing - no subject, patch-id, or full tree-content match found partial
3/3 [PATCH 3/3] arm64: dts: qcom: shikra: Update rpm-stats compatible to missing - no subject, patch-id, or full tree-content match found missing - no subject, patch-id, or full tree-content match found missing

Final Status

overall_status: FAIL
present_commits: 0/3
partial_commits: 1/3
missing_commits: 2/3
topics_checked_for_commits: 3/3
final_summary: PR present in qcom-next/topics: Fail - 2/3 commit(s) are missing from both qcom-next and topics

@qlijarvis

Copy link
Copy Markdown

PR #833 — checker-log-analyzer

PR: #833
Checker run: https://github.com/qualcomm-linux/kernel-config/actions/runs/29482364177

Checker Result Summary
Checker Result Summary
checkpatch All commits pass style checks
dt-binding-check Binding schema validation passed
dtb-check Compatible array too long (schema mismatch)
sparse-check No sparse warnings
check-uapi-headers No UAPI changes
check-patch-compliance Missing required subject prefix on all 3 commits
tag-check Missing required subject prefix on all 3 commits

Detailed report: Full report

Checker analysis — click to expand

🤖 CI Checker Analysis (checker-log-analyzer)

PR: #833 - Add Shikra rpm-stats support
Source: https://github.com/qualcomm-linux/kernel-config/actions/runs/29482364177
Target branch: qcom-6.18.y

Checker Result Summary
checkpatch All commits pass style checks
dt-binding-check Binding schema validation passed
dtb-check Compatible array too long (schema mismatch)
sparse-check No sparse warnings
check-uapi-headers No UAPI changes
check-patch-compliance Missing required subject prefix on all 3 commits
tag-check Missing required subject prefix on all 3 commits

❌ dtb-check

Root cause: The binding schema only allows a single compatible string, but the DTS uses a 2-element array with a fallback compatible.

Failure details:

shikra-cqm-evk.dtb: sram@4690000 (qcom,shikra-rpm-stats): compatible: 
  ['qcom,shikra-rpm-stats', 'qcom,rpm-stats'] is too long
  from schema $id: http://devicetree.org/schemas/soc/qcom/qcom-stats.yaml#

This error appears for all 6 Shikra DTB files (cqm-evk, cqs-evk, iqs-evk, and their camera variants).

Analysis:

The DTS patch (3/3) changes the compatible from:

compatible = "qcom,rpm-stats";

to:

compatible = "qcom,shikra-rpm-stats", "qcom,rpm-stats";

This is a valid pattern (SoC-specific compatible with generic fallback), but the binding schema in patch 1/3 doesn't declare support for this. The schema currently has:

properties:
  compatible:
    items:
      - enum:
          - qcom,msm8226-rpm-stats
          - qcom,msm8916-rpm-stats
          - qcom,msm8974-rpm-stats
          - qcom,shikra-rpm-stats

This schema structure implicitly allows only maxItems: 1. To support the fallback pattern, the binding needs:

properties:
  compatible:
    oneOf:
      - items:
          - enum:
              - qcom,msm8226-rpm-stats
              - qcom,msm8916-rpm-stats
              - qcom,msm8974-rpm-stats
              - qcom,shikra-rpm-stats
      - items:
          - const: qcom,shikra-rpm-stats
          - const: qcom,rpm-stats

Or more simply, if all SoC-specific compatibles can use qcom,rpm-stats as fallback:

properties:
  compatible:
    oneOf:
      - items:
          - enum:
              - qcom,msm8226-rpm-stats
              - qcom,msm8916-rpm-stats
              - qcom,msm8974-rpm-stats
              - qcom,shikra-rpm-stats
      - items:
          - enum:
              - qcom,msm8226-rpm-stats
              - qcom,msm8916-rpm-stats
              - qcom,msm8974-rpm-stats
              - qcom,shikra-rpm-stats
          - const: qcom,rpm-stats

Fix:

Update patch 1/3 to allow the fallback compatible pattern. Modify Documentation/devicetree/bindings/soc/qcom/qcom-stats.yaml:

properties:
  compatible:
    oneOf:
      - items:
          - enum:
              - qcom,msm8226-rpm-stats
              - qcom,msm8916-rpm-stats
              - qcom,msm8974-rpm-stats
              - qcom,shikra-rpm-stats
      - items:
          - const: qcom,shikra-rpm-stats
          - const: qcom,rpm-stats

Reproduce locally:

make -j$(nproc) O=out defconfig
make -j$(nproc) O=out CHECK_DTBS=y arch/arm64/boot/dts/qcom/shikra-cqm-evk.dtb

❌ check-patch-compliance

Root cause: All three commits lack the required subject-line prefix (FROMLIST:, FROMGIT:, UPSTREAM:, BACKPORT:).

Failure details:

Checking commit: dt-bindings: soc: qcom: stats: Add compatible for Shikra
Commit summary does not start with a required prefix

Checking commit: soc: qcom: stats: Add stats compatible and config for Shikra
Commit summary does not start with a required prefix

Checking commit: arm64: dts: qcom: shikra: Update rpm-stats compatible to SoC specific
Commit summary does not start with a required prefix

Fix:

The check-patch-compliance checker enforces that commits must start with one of:

  • FROMLIST: — patch posted to mailing list (lore.kernel.org)
  • FROMGIT: — patch taken from a maintainer git tree
  • UPSTREAM: — patch merged into Linus's mainline tree
  • BACKPORT: — upstream patch backported with modifications

For each commit, amend the subject to add the appropriate prefix:

git rebase -i <base_sha>   # mark each commit as 'edit'

# For commit 1/3:
git commit --amend -m "FROMLIST: dt-bindings: soc: qcom: stats: Add compatible for Shikra"

# For commit 2/3:
git commit --amend -m "FROMLIST: soc: qcom: stats: Add stats compatible and config for Shikra"

# For commit 3/3:
git commit --amend -m "FROMLIST: arm64: dts: qcom: shikra: Update rpm-stats compatible to SoC specific"

git rebase --continue

If these patches have been posted to a mailing list, also add a Link: trailer pointing to the lore.kernel.org URL in each commit message body.

Note: The checker only accepts upstream-linkable prefixes. If these are vendor-only changes with no upstream equivalent, use QCLINUX: instead, but be aware that check-patch-compliance will still fail (this is a known limitation for vendor-only commits).


❌ tag-check

Root cause: All three commits lack the required subject-line prefix tag.

Applies because: The target branch is qcom-6.18.y, which is not qcom-next or qcom-next-staging. All branches except those two require every commit to start with a valid prefix tag.

Required prefix tags:

  • FROMLIST: — Patch posted to mailing list (lore.kernel.org)
  • FROMGIT: — Patch taken from a maintainer git tree
  • UPSTREAM: — Patch merged into Linus's mainline tree
  • BACKPORT: — Upstream patch backported with modifications
  • QCLINUX: — Vendor-only change with no upstream equivalent
  • PENDING: — Work-in-progress, not yet posted upstream
  • WORKAROUND: — Temporary fix not suitable for upstream

Failure details:

All three commits are missing a prefix:

  1. 30343a2420fd — "dt-bindings: soc: qcom: stats: Add compatible for Shikra"
  2. a974768fde64 — "soc: qcom: stats: Add stats compatible and config for Shikra"
  3. 2599a9ae2751 — "arm64: dts: qcom: shikra: Update rpm-stats compatible to SoC specific"

Fix:

Same as check-patch-compliance fix above — add the appropriate prefix to each commit subject. Choose the correct prefix based on the patch origin:

  • If posted to lore but not yet merged → FROMLIST:
  • If in a maintainer tree → FROMGIT:
  • If merged into Linus's tree → UPSTREAM:
  • If backported with modifications → BACKPORT:
  • If vendor-only, no upstream → QCLINUX:

Verdict

3 blockers must be fixed before merge:

  1. dtb-check failure — Update the binding schema (patch 1/3) to allow the fallback compatible pattern used in the DTS (patch 3/3).

  2. check-patch-compliance failure — Add required subject prefix (FROMLIST:, UPSTREAM:, etc.) to all three commits.

  3. tag-check failure — Same as Adding Email Checker  #2 (both checks enforce the same requirement for the qcom-6.18.y branch).

Recommended action:

  1. Amend patch 1/3 to update the binding schema to support compatible = "qcom,shikra-rpm-stats", "qcom,rpm-stats";
  2. Rebase all three commits to add the appropriate subject prefix (likely FROMLIST: if these are being upstreamed)
  3. If posted upstream, add Link: trailers pointing to the lore.kernel.org URLs
  4. Re-run CI to verify all checkers pass

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