Messages in this thread | ![/](/images/icornerl.gif) | | Date | Tue, 1 Aug 2023 13:29:16 +0200 | Subject | Re: [PATCH v2 03/10] interconnect: qcom: icc-rpm: Let nodes drive their own bus clock | From | Konrad Dybcio <> |
| |
On 1.08.2023 12:58, Stephan Gerhold wrote: > 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. Right, u32 is not the same size as *u32, brain fart :D
Konrad
| ![\](/images/icornerr.gif) |