From: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
To: Gopikrishna Garmidi <gopikrishna.garmidi@oss.qualcomm.com>,
Bjorn Andersson <andersson@kernel.org>,
Konrad Dybcio <konradybcio@kernel.org>,
Pankaj Patil <pankaj.patil@oss.qualcomm.com>
Cc: Sibi Sankar <sibi.sankar@oss.qualcomm.com>,
Rajendra Nayak <rajendra.nayak@oss.qualcomm.com>,
linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] soc: qcom: smem: fix 32-bit overflow in DDR frequency calculation
Date: Fri, 28 Aug 2026 13:38:05 +0200 [thread overview]
Message-ID: <647baf49-e361-40ac-9359-1ad32f5e2959@oss.qualcomm.com> (raw)
In-Reply-To: <20260827-glymur_dramc-v1-1-eba358d504b8@oss.qualcomm.com>
On 8/27/26 10:13 AM, Gopikrishna Garmidi wrote:
> The DDR frequency in SMEM is reported in kHz and converted to Hz by
> multiplying it by 1000. Since the SMEM frequency value is a u32, using
> an unsuffixed integer constant causes the multiplication to be performed
> with 32-bit arithmetic.
>
> This overflows for DDR frequencies above 4294967 kHz, resulting in an
> incorrect frequency being reported through the SMEM DRAM interface.
>
> Use an unsigned long constant for the multiplication so the calculation
> is performed with 64-bit arithmetic on the supported Qualcomm platforms.
> Apply the fix consistently to the v3, v3.1, v4, v5, and v7 SMEM parsers.
>
> Fixes: 1d234eeafc56 ("soc: qcom: smem: Expose DDR data from SMEM")
> Signed-off-by: Gopikrishna Garmidi <gopikrishna.garmidi@oss.qualcomm.com>
> ---
Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
Konrad
next prev parent reply other threads:[~2026-08-28 11:38 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-27 8:13 Gopikrishna Garmidi
2026-08-28 11:38 ` Konrad Dybcio [this message]
2026-08-31 17:53 ` Bjorn Andersson
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=647baf49-e361-40ac-9359-1ad32f5e2959@oss.qualcomm.com \
--to=konrad.dybcio@oss.qualcomm.com \
--cc=andersson@kernel.org \
--cc=gopikrishna.garmidi@oss.qualcomm.com \
--cc=konradybcio@kernel.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=pankaj.patil@oss.qualcomm.com \
--cc=rajendra.nayak@oss.qualcomm.com \
--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®