From: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
To: Mukesh Ojha <mukesh.ojha@oss.qualcomm.com>,
Konrad Dybcio <konradybcio@kernel.org>
Cc: Bjorn Andersson <andersson@kernel.org>,
Kees Cook <kees@kernel.org>,
"Gustavo A. R. Silva" <gustavoars@kernel.org>,
Rob Clark <robin.clark@oss.qualcomm.com>,
Sean Paul <sean@poorly.run>,
Akhil P Oommen <akhilpo@oss.qualcomm.com>,
Dmitry Baryshkov <lumag@kernel.org>,
Abhinav Kumar <abhinav.kumar@linux.dev>,
Jessica Zhang <jesszhan0024@gmail.com>,
Marijn Suijten <marijn.suijten@somainline.org>,
David Airlie <airlied@gmail.com>, Simona Vetter <simona@ffwll.ch>,
linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org,
linux-hardening@vger.kernel.org, dri-devel@lists.freedesktop.org,
freedreno@lists.freedesktop.org
Subject: Re: [PATCH v3 1/3] soc: qcom: smem: Expose DDR data from SMEM
Date: Tue, 27 Jan 2026 15:22:09 +0100 [thread overview]
Message-ID: <c243a067-c33e-4ada-831e-ec611208b191@oss.qualcomm.com> (raw)
In-Reply-To: <20260109133612.ommcoivkbhbisp6o@hu-mojha-hyd.qualcomm.com>
On 1/9/26 2:36 PM, Mukesh Ojha wrote:
> On Thu, Jan 08, 2026 at 03:21:50PM +0100, Konrad Dybcio wrote:
>> From: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
>>
>> Most modern Qualcomm platforms (>= SM8150) expose information about the
>> DDR memory present on the system via SMEM.
[...]
>> @@ -1236,17 +1241,24 @@ static int qcom_smem_probe(struct platform_device *pdev)
>>
>> __smem = smem;
>>
>> + smem->debugfs_dir = smem_dram_parse(smem->dev);
>
> Is it possible, even after calling qcom_smem_is_available() before calling
> qcom_smem_dram_get_hbb() we are getting __dram as NULL.
>
> is it good to move __smem assignment to the end with barrier so all the
> changes before the assignment are seen when somebody checking qcom_smem_is_available()
> with a pair smp store/release pair.
I think just moving the __smem assignment down will be enough, no?
What scenario do you have in mind that would require SMP barriers?
[...]
>> +struct smem_dram {
>> + unsigned long frequencies[MAX_DDR_FREQ_NUM_V5];
>> + u32 num_frequencies;
>
> freq and num_freq_entries ? since you have used freq at various places..
The names in structs come from internal shmem definitions that I didn't
want to stray away from
Making the kernel-side struct fields named the same feels like added
confusion to me
[...]
>> + if (size == sizeof(struct ddr_details_v5)
>> + + 4 * sizeof(struct ddr_region_v5)
>> + + sizeof(struct ddr_xbl2quantum_smem_data)
>> + + sizeof(struct shub_freq_plan_entry))
>> + return INFO_V5;
>
> Why this does not have separate name ?
Because it's the same DDR info structure as "normal v5", with trailing
extras that we don't really care about
[...]
>> +struct dentry *smem_dram_parse(struct device *dev)
>> +{
>> + struct dentry *debugfs_dir;
>> + enum ddr_info_version ver;
>> + struct smem_dram *dram;
>> + size_t actual_size;
>> + void *data = NULL;
>> +
>> + /* No need to check qcom_smem_is_available(), this func is called by the SMEM driver */
>
> This comment seems redundant..
With this one specifically, I don't agree it's obvious..
Konrad
next prev parent reply other threads:[~2026-01-27 14:22 UTC|newest]
Thread overview: 33+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-08 14:21 [PATCH v3 0/3] Retrieve information about DDR from SMEM Konrad Dybcio
2026-01-08 14:21 ` [PATCH v3 1/3] soc: qcom: smem: Expose DDR data " Konrad Dybcio
2026-01-09 13:36 ` Mukesh Ojha
2026-01-27 14:22 ` Konrad Dybcio [this message]
2026-01-09 18:08 ` Bjorn Andersson
2026-01-14 16:36 ` kernel test robot
2026-01-08 14:21 ` [PATCH v3 2/3] soc: qcom: ubwc: Get HBB " Konrad Dybcio
2026-01-08 14:45 ` Dmitry Baryshkov
2026-01-08 17:49 ` Bjorn Andersson
2026-01-09 3:21 ` Dmitry Baryshkov
2026-01-09 17:50 ` Bjorn Andersson
2026-01-10 10:45 ` Dmitry Baryshkov
2026-01-13 15:31 ` Konrad Dybcio
2026-01-13 16:29 ` Dmitry Baryshkov
2026-02-17 12:59 ` Konrad Dybcio
2026-02-17 22:53 ` Dmitry Baryshkov
2026-02-17 23:08 ` Rob Clark
2026-01-13 15:36 ` Konrad Dybcio
2026-01-08 14:21 ` [PATCH v3 3/3] drm/msm/adreno: Trust the SSoT UBWC config Konrad Dybcio
2026-01-08 14:46 ` Dmitry Baryshkov
2026-01-16 18:32 ` Rob Clark
2026-02-28 22:16 ` Val Packett
2026-01-09 8:20 ` [PATCH v3 0/3] Retrieve information about DDR from SMEM Neil Armstrong
2026-01-09 10:15 ` Konrad Dybcio
2026-01-09 8:31 ` Neil Armstrong
2026-01-09 19:11 ` Connor Abbott
2026-01-09 20:41 ` Rob Clark
2026-01-09 21:03 ` Connor Abbott
2026-01-10 4:17 ` Rob Clark
2026-02-17 11:23 ` Konrad Dybcio
2026-02-18 15:58 ` Connor Abbott
2026-01-10 10:49 ` Dmitry Baryshkov
2026-01-13 15:31 ` 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=c243a067-c33e-4ada-831e-ec611208b191@oss.qualcomm.com \
--to=konrad.dybcio@oss.qualcomm.com \
--cc=abhinav.kumar@linux.dev \
--cc=airlied@gmail.com \
--cc=akhilpo@oss.qualcomm.com \
--cc=andersson@kernel.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=freedreno@lists.freedesktop.org \
--cc=gustavoars@kernel.org \
--cc=jesszhan0024@gmail.com \
--cc=kees@kernel.org \
--cc=konradybcio@kernel.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-hardening@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lumag@kernel.org \
--cc=marijn.suijten@somainline.org \
--cc=mukesh.ojha@oss.qualcomm.com \
--cc=robin.clark@oss.qualcomm.com \
--cc=sean@poorly.run \
--cc=simona@ffwll.ch \
/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