[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ZMjlZyFcB9IFEG60@gerhold.net>
Date: Tue, 1 Aug 2023 12:58:47 +0200
From: Stephan Gerhold <stephan@...hold.net>
To: Konrad Dybcio <konrad.dybcio@...aro.org>
Cc: Andy Gross <agross@...nel.org>,
Bjorn Andersson <andersson@...nel.org>,
Georgi Djakov <djakov@...nel.org>,
Michael Turquette <mturquette@...libre.com>,
Stephen Boyd <sboyd@...nel.org>,
Marijn Suijten <marijn.suijten@...ainline.org>,
linux-arm-msm@...r.kernel.org, linux-pm@...r.kernel.org,
linux-kernel@...r.kernel.org, linux-clk@...r.kernel.org
Subject: Re: [PATCH v2 03/10] interconnect: qcom: icc-rpm: Let nodes drive
their own bus clock
On Mon, Jul 31, 2023 at 12:52:19PM +0200, Konrad Dybcio wrote:
> If this hardware couldn't get messier, some nodes are supposed to drive
> their own bus clock.. Presumably to connect to some intermediate
> interface between the node itself and the bus it's (supposed to be)
> connected to.
>
> Expand the node struct with the necessary data and hook up the
> allocations & calculations.
>
> To save on memory (not very many nodes have their own clocks), allocate
> a pointer to an array instead of allocating an array within
> qcom_icc_node.
>
Only on ARM32 though. On ARM64 you waste extra memory:
u32 bus_clk_rate[QCOM_SMD_RPM_STATE_NUM];
sizeof(bus_clk_rate) = QCOM_SMD_RPM_STATE_NUM * sizeof(bus_clk_rate[0])
= 2 * 4
= 8
u32 *bus_clk_rate;
sizeof(bus_clk_rate) = sizeof(ptr)
= 8 (for ARM64)
+ 2 * 4 + malloc overhead
for each node with bus_clk_desc
which is > 8 from above.
I'm not quite convinced this optimization is worth it.
Thanks,
Stephan
Powered by blists - more mailing lists