public inbox for drm-ai-reviews@public-inbox.freedesktop.org
 help / color / mirror / Atom feed
From: Claude Code Review Bot <claude-review@example.com>
To: dri-devel-reviews@example.com
Subject: Claude review: firmware: qcom: Add a PAS TEE service
Date: Tue, 05 May 2026 08:22:44 +1000	[thread overview]
Message-ID: <review-patch4-20260504130603.1474043-5-sumit.garg@kernel.org> (raw)
In-Reply-To: <20260504130603.1474043-5-sumit.garg@kernel.org>

Patch Review

Adds the OP-TEE backed PAS service driver (`qcom_pas_tee.c`) as a TEE bus client driver.

**Observation on `qcom_pas_tee_get_rsc_table()`:**

The first `tee_client_invoke_func` call at line 239 is made with `param[1].u.memref.shm = NULL` (zero-initialized) and `param[1].u.memref.size = input_rt_size`. This appears to be a probe-then-allocate pattern -- the first call returns the required buffer size via `param[1].u.memref.size`, then a second call provides the actual buffer. This is a valid TEE convention but deserves a brief inline comment since the NULL shm with MEMREF_INOUT is unusual.

**Observation on `DEFINE_FREE(shm_free, ...)`:**

```c
DEFINE_FREE(shm_free, struct tee_shm *, tee_shm_free(_T))
```

This is file-scoped and creates an automatic cleanup helper. The `__free(shm_free)` usage in `qcom_pas_tee_get_rsc_table` is correct and the scope-based cleanup works well with the early returns.

**Minor:** `qcom_pas_tee_init_image` stores a `tee_shm` pointer in `ctx->ptr` (which is typed as `void *`), while the SCM backend stores a DMA buffer pointer there. The differentiation is handled cleanly via separate `metadata_release` callbacks, so this is fine.

**Kconfig note:**

```
config QCOM_PAS_TEE
	...
	depends on !CPU_BIG_ENDIAN
	default m if ARCH_QCOM
```

The `!CPU_BIG_ENDIAN` dependency should have a comment explaining why (presumably TEE shared memory ABI assumes little-endian layout). The `default m` is reasonable.

---

---
Generated by Claude Code Patch Reviewer

  reply	other threads:[~2026-05-04 22:22 UTC|newest]

Thread overview: 37+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-04 13:05 [PATCH v5 00/16] firmware: qcom: Add OP-TEE PAS service support Sumit Garg
2026-05-04 13:05 ` [PATCH v5 01/16] arm64: dts: qcom: kodiak: Add EL2 overlay Sumit Garg
2026-05-04 22:22   ` Claude review: " Claude Code Review Bot
2026-05-04 13:05 ` [PATCH v5 02/16] firmware: qcom: Add a generic PAS service Sumit Garg
2026-05-04 22:22   ` Claude review: " Claude Code Review Bot
2026-05-04 13:05 ` [PATCH v5 03/16] firmware: qcom_scm: Migrate to " Sumit Garg
2026-05-04 22:22   ` Claude review: " Claude Code Review Bot
2026-05-04 13:05 ` [PATCH v5 04/16] firmware: qcom: Add a PAS TEE service Sumit Garg
2026-05-04 22:22   ` Claude Code Review Bot [this message]
2026-05-04 13:05 ` [PATCH v5 05/16] remoteproc: qcom_q6v5_pas: Switch over to generic PAS TZ APIs Sumit Garg
2026-05-04 22:22   ` Claude review: " Claude Code Review Bot
2026-05-04 13:05 ` [PATCH v5 06/16] remoteproc: qcom_q6v5_mss: Switch " Sumit Garg
2026-05-04 22:22   ` Claude review: " Claude Code Review Bot
2026-05-04 13:05 ` [PATCH v5 07/16] soc: qcom: mdtloader: " Sumit Garg
2026-05-04 22:22   ` Claude review: " Claude Code Review Bot
2026-05-04 13:05 ` [PATCH v5 08/16] remoteproc: qcom_wcnss: " Sumit Garg
2026-05-04 22:22   ` Claude review: " Claude Code Review Bot
2026-05-04 13:05 ` [PATCH v5 09/16] remoteproc: qcom: Select QCOM_PAS generic service Sumit Garg
2026-05-04 22:22   ` Claude review: " Claude Code Review Bot
2026-05-04 13:05 ` [PATCH v5 10/16] drm/msm: Switch to generic PAS TZ APIs Sumit Garg
2026-05-04 22:22   ` Claude review: " Claude Code Review Bot
2026-05-04 13:05 ` [PATCH v5 11/16] media: qcom: " Sumit Garg
2026-05-04 22:22   ` Claude review: " Claude Code Review Bot
2026-05-04 13:05 ` [PATCH v5 12/16] media: qcom: Pass proper PAS ID to set_remote_state API Sumit Garg
2026-05-04 22:22   ` Claude review: " Claude Code Review Bot
2026-05-04 13:06 ` [PATCH v5 13/16] net: ipa: Switch to generic PAS TZ APIs Sumit Garg
2026-05-04 22:22   ` Claude review: " Claude Code Review Bot
2026-05-04 13:06 ` [PATCH v5 14/16] wifi: ath12k: " Sumit Garg
2026-05-04 22:22   ` Claude review: " Claude Code Review Bot
2026-05-04 13:06 ` [PATCH v5 15/16] firmware: qcom_scm: Remove SCM PAS wrappers Sumit Garg
2026-05-04 22:22   ` Claude review: " Claude Code Review Bot
2026-05-04 13:06 ` [PATCH v5 16/16] MAINTAINERS: Add maintainer entry for Qualcomm PAS TZ service Sumit Garg
2026-05-04 22:22   ` Claude review: " Claude Code Review Bot
2026-05-04 22:22 ` Claude review: firmware: qcom: Add OP-TEE PAS service support Claude Code Review Bot
  -- strict thread matches above, loose matches on Subject: below --
2026-04-27  9:55 [PATCH v4 00/15] " Sumit Garg
2026-04-27  9:55 ` [PATCH v4 04/15] firmware: qcom: Add a PAS TEE service Sumit Garg
2026-04-28  4:49   ` Claude review: " Claude Code Review Bot
2026-03-12  6:27 [PATCH v2 00/15] firmware: qcom: Add OP-TEE PAS service support Sumit Garg
2026-03-12  6:27 ` [PATCH v2 04/15] firmware: qcom: Add a PAS TEE service Sumit Garg
2026-03-13  4:26   ` Claude review: " Claude Code Review Bot
2026-03-06 10:50 [PATCH 00/14] firmware: qcom: Add OP-TEE PAS service support Sumit Garg
2026-03-06 10:50 ` [PATCH 04/14] firmware: qcom: Add a PAS TEE service Sumit Garg
2026-03-08 22:59   ` Claude review: " Claude Code Review Bot

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=review-patch4-20260504130603.1474043-5-sumit.garg@kernel.org \
    --to=claude-review@example.com \
    --cc=dri-devel-reviews@example.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox