From: Randy Dunlap <rdunlap@infradead.org>
To: Bjorn Andersson <quic_bjorande@quicinc.com>,
Andy Gross <agross@kernel.org>,
Bjorn Andersson <andersson@kernel.org>,
Konrad Dybcio <konrad.dybcio@linaro.org>
Cc: linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] soc: qcom: stats: Fix division issue on 32-bit platforms
Date: Tue, 5 Dec 2023 17:52:24 -0800 [thread overview]
Message-ID: <22785d9a-0d4f-4ebd-bc98-3e77dcb4db13@infradead.org> (raw)
In-Reply-To: <20231205-qcom_stats-aeabi_uldivmod-fix-v1-1-f94ecec5e894@quicinc.com>
On 12/5/23 16:44, Bjorn Andersson wrote:
> commit 'e84e61bdb97c ("soc: qcom: stats: Add DDR sleep stats")' made it
> in with a mult_frac() which causes link errors on Arm and PowerPC
> builds:
>
> ERROR: modpost: "__aeabi_uldivmod" [drivers/soc/qcom/qcom_stats.ko] undefined!
>
> Expand the mult_frac() to avoid this problem.
>
> Fixes: e84e61bdb97c ("soc: qcom: stats: Add DDR sleep stats")
> Reported-by: Randy Dunlap <rdunlap@infradead.org>
> Signed-off-by: Bjorn Andersson <quic_bjorande@quicinc.com>
That works. Thanks.
Acked-by: Randy Dunlap <rdunlap@infradead.org>
Tested-by: Randy Dunlap <rdunlap@infradead.org> # build-tested
> ---
> drivers/soc/qcom/qcom_stats.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/soc/qcom/qcom_stats.c b/drivers/soc/qcom/qcom_stats.c
> index 4763d62a8cb0..5ba61232313e 100644
> --- a/drivers/soc/qcom/qcom_stats.c
> +++ b/drivers/soc/qcom/qcom_stats.c
> @@ -221,7 +221,8 @@ static int qcom_ddr_stats_show(struct seq_file *s, void *unused)
>
> for (i = 0; i < ddr.entry_count; i++) {
> /* Convert the period to ms */
> - entry[i].dur = mult_frac(MSEC_PER_SEC, entry[i].dur, ARCH_TIMER_FREQ);
> + entry[i].dur *= MSEC_PER_SEC;
> + entry[i].dur = div_u64(entry[i].dur, ARCH_TIMER_FREQ);
> }
>
> for (i = 0; i < ddr.entry_count; i++)
>
> ---
> base-commit: adcad44bd1c73a5264bff525e334e2f6fc01bb9b
> change-id: 20231205-qcom_stats-aeabi_uldivmod-fix-4a63c7ec013f
>
> Best regards,
--
~Randy
next prev parent reply other threads:[~2023-12-06 1:52 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-12-06 0:44 Bjorn Andersson
2023-12-06 1:52 ` Randy Dunlap [this message]
2023-12-06 12:21 ` Konrad Dybcio
2023-12-06 14:07 ` David Laight
2023-12-09 3:23 ` 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=22785d9a-0d4f-4ebd-bc98-3e77dcb4db13@infradead.org \
--to=rdunlap@infradead.org \
--cc=agross@kernel.org \
--cc=andersson@kernel.org \
--cc=konrad.dybcio@linaro.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=quic_bjorande@quicinc.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®