From: David Heidelberg <david@ixit.cz>
To: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>,
Bjorn Andersson <andersson@kernel.org>,
Mathieu Poirier <mathieu.poirier@linaro.org>,
Rob Herring <robh@kernel.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Conor Dooley <conor+dt@kernel.org>,
Sibi Sankar <sibi.sankar@oss.qualcomm.com>,
Konrad Dybcio <konradybcio@kernel.org>,
Abel Vesa <abelvesa@kernel.org>, Miro Mraz <mraz.miro@seznam.cz>
Cc: Richard Acayan <mailingradian@gmail.com>,
linux-arm-msm@vger.kernel.org, linux-remoteproc@vger.kernel.org,
devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
phone-devel@vger.kernel.org
Subject: Re: [PATCH v3 2/3] remoteproc: qcom_q6v5_mss: Publish socinfo for Pixel modems
Date: Thu, 3 Dec 2026 20:46:35 +0100 [thread overview]
Message-ID: <575c5d2a-66ed-4b00-97c8-a1dca4310be8@ixit.cz> (raw)
In-Reply-To: <a25c4165-30a7-4d47-b366-de34515eacef@oss.qualcomm.com>
On 03/12/2026 14:16, Konrad Dybcio wrote:
> On 11/16/26 4:50 PM, David Heidelberg via B4 Relay wrote:
>> From: David Heidelberg <david@ixit.cz>
>>
>> The modem firmware on Google Pixel boards (Pixel 3 through Pixel 5a)
>> reads the SoC platform type, subtype and revision from the first
>> vendor-reserved SMEM item (item 134) when it boots, and refuses to
>> come up unless the application processor has filled it in.
>
> [...]
>
>
>> +static int q6v5_socinfo_publish(struct q6v5 *qproc)
>> +{
>> + struct modem_smem_info *info;
>> + struct socinfo *socinfo;
>> + u32 plat_ver;
>> + int ret;
>> +
>> + socinfo = qcom_smem_get(QCOM_SMEM_HOST_ANY, SMEM_HW_SW_BUILD_ID, NULL);
>> + if (IS_ERR(socinfo))
>> + return dev_err_probe(qproc->dev, PTR_ERR(socinfo),
>> + "could not get socinfo\n");
>
> Sashiko explains why dev_err_probe is a bad choice here
sure, fair, I considered it kinda irrelevant here, but technically it's not
probe and -517 is not a thing here.
>
>> +
>> + /* hw_plat_subtype was added in socinfo format 0.6 */
>> + if (le32_to_cpu(socinfo->fmt) < SOCINFO_VERSION(0, 6))
>> + return dev_err_probe(qproc->dev, -EOPNOTSUPP,
>> + "socinfo format too old\n");
>> +
>> + /* -EEXIST: the item survived an earlier boot */
>> + ret = qcom_smem_alloc(QCOM_SMEM_HOST_ANY, SMEM_ID_VENDOR0, sizeof(*info));
>> + if (ret && ret != -EEXIST)
>> + return dev_err_probe(qproc->dev, ret,
>> + "could not allocate modem smem\n");
>> +
>> + info = qcom_smem_get(QCOM_SMEM_HOST_ANY, SMEM_ID_VENDOR0, NULL);
>> + if (IS_ERR(info))
>> + return dev_err_probe(qproc->dev, PTR_ERR(info),
>> + "could not get modem smem\n");
>
> We really need a size-check here.
ok, I'll add in next rev
>
>> +
>> + plat_ver = le32_to_cpu(socinfo->plat_ver);
>> +
>> + /* modem_flag, efs_magic and ftm_magic are left zero */
>> + *info = (struct modem_smem_info) {
>> + .version = cpu_to_le32(MODEM_SMEM_VERSION),
>> + .major_id = cpu_to_le32(PLAT_VER_TO_MAJOR_ID(plat_ver)),
>> + .minor_id = cpu_to_le32(PLAT_VER_TO_MINOR_ID(plat_ver)),
>> + .subtype = socinfo->hw_plat_subtype,
>> + .platform = socinfo->hw_plat,
>> + };
>
> Aligning the assignment operators is 'eeh'
I'll change it, but... it's so pointless IMHO when we trying to ship something
which works. There is 100 000 critical/high severity issues around the code, but
few extra whitespaces?
/me screams in extra spaces
David
>
> Konrad
next prev parent reply other threads:[~2026-12-03 19:46 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-16 15:50 [PATCH v3 0/3] Add modemsmem for Google phones David Heidelberg via B4 Relay
2026-11-16 15:50 ` [PATCH v3 1/3] dt-bindings: remoteproc: qcom,msm8996-mss-pil: Document google,require-socinfo David Heidelberg via B4 Relay
2026-11-18 21:31 ` Rob Herring (Arm)
2026-11-16 15:50 ` [PATCH v3 2/3] remoteproc: qcom_q6v5_mss: Publish socinfo for Pixel modems David Heidelberg via B4 Relay
2026-12-03 13:16 ` Konrad Dybcio
2026-12-03 19:46 ` David Heidelberg [this message]
2026-11-16 15:50 ` [PATCH v3 3/3] arm64: dts: qcom: sdm845-google: Require modem socinfo David Heidelberg via B4 Relay
2026-12-03 13:16 ` Konrad Dybcio
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=575c5d2a-66ed-4b00-97c8-a1dca4310be8@ixit.cz \
--to=david@ixit.cz \
--cc=abelvesa@kernel.org \
--cc=andersson@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=konrad.dybcio@oss.qualcomm.com \
--cc=konradybcio@kernel.org \
--cc=krzk+dt@kernel.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-remoteproc@vger.kernel.org \
--cc=mailingradian@gmail.com \
--cc=mathieu.poirier@linaro.org \
--cc=mraz.miro@seznam.cz \
--cc=phone-devel@vger.kernel.org \
--cc=robh@kernel.org \
--cc=sibi.sankar@oss.qualcomm.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
all inboxes | Powered by JetHome®