From mboxrd@z Thu Jan 1 00:00:00 1970 From: Shawn Guo Subject: Re: [PATCH 2/2] clk: Move init fields from clk to clk_hw Date: Thu, 22 Mar 2012 11:23:26 +0800 Message-ID: <20120322032323.GA2213@S2101-09.ap.freescale.net> References: <1332214706-675-1-git-send-email-skannan@codeaurora.org> <1332214706-675-2-git-send-email-skannan@codeaurora.org> <20120320072018.GC32469@S2101-09.ap.freescale.net> <20120320094031.GI3852@pengutronix.de> <20120320181441.GO3852@pengutronix.de> <4F68E53B.7040800@codeaurora.org> <20120320224021.GF29317@pengutronix.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from mail-iy0-f174.google.com ([209.85.210.174]:39532 "EHLO mail-iy0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752184Ab2CVDXr (ORCPT ); Wed, 21 Mar 2012 23:23:47 -0400 Received: by iagz16 with SMTP id z16so2493697iag.19 for ; Wed, 21 Mar 2012 20:23:46 -0700 (PDT) In-Reply-To: <20120320224021.GF29317@pengutronix.de> Content-Disposition: inline Sender: linux-arm-msm-owner@vger.kernel.org List-Id: linux-arm-msm@vger.kernel.org To: Sascha Hauer Cc: Saravana Kannan , Andrew Lunn , Grant Likely , Jamie Iles , Jeremy Kerr , Mike Turquette , Magnus Damm , Deepak Saxena , linux-arm-kernel@lists.infradead.org, Arnd Bergman , linux-arm-msm@vger.kernel.org, Rob Herring , Russell King , Thomas Gleixner , Richard Zhao , Shawn Guo , Paul Walmsley , Linus Walleij , Mark Brown , Stephen Boyd , linux-kernel@vger.kernel.org, Amit Kucheria On Tue, Mar 20, 2012 at 11:40:21PM +0100, Sascha Hauer wrote: > On Tue, Mar 20, 2012 at 01:14:51PM -0700, Saravana Kannan wrote: ... > > Ah, I see. That's a lot of functions calls. I think it would be much > > more efficient if you just have an array and loop over it. With my > > patch, you can just call a single register function for all these > > clocks. > > I was curious and gave it a try. I registered a fixed clock and 100 > gates as child clocks. I tried both DEFINE_CLK_GATE and > clk_register_gate. It turned out there was no difference in speed. > While there is no difference in speed efficiency, I think we will gain space efficiency if we can have Saravana's patch to copy the clk_hw fields and make the static array __initdata as you mentioned. -- Regards, Shawn From mboxrd@z Thu Jan 1 00:00:00 1970 From: shawn.guo@linaro.org (Shawn Guo) Date: Thu, 22 Mar 2012 11:23:26 +0800 Subject: [PATCH 2/2] clk: Move init fields from clk to clk_hw In-Reply-To: <20120320224021.GF29317@pengutronix.de> References: <1332214706-675-1-git-send-email-skannan@codeaurora.org> <1332214706-675-2-git-send-email-skannan@codeaurora.org> <20120320072018.GC32469@S2101-09.ap.freescale.net> <20120320094031.GI3852@pengutronix.de> <20120320181441.GO3852@pengutronix.de> <4F68E53B.7040800@codeaurora.org> <20120320224021.GF29317@pengutronix.de> Message-ID: <20120322032323.GA2213@S2101-09.ap.freescale.net> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org On Tue, Mar 20, 2012 at 11:40:21PM +0100, Sascha Hauer wrote: > On Tue, Mar 20, 2012 at 01:14:51PM -0700, Saravana Kannan wrote: ... > > Ah, I see. That's a lot of functions calls. I think it would be much > > more efficient if you just have an array and loop over it. With my > > patch, you can just call a single register function for all these > > clocks. > > I was curious and gave it a try. I registered a fixed clock and 100 > gates as child clocks. I tried both DEFINE_CLK_GATE and > clk_register_gate. It turned out there was no difference in speed. > While there is no difference in speed efficiency, I think we will gain space efficiency if we can have Saravana's patch to copy the clk_hw fields and make the static array __initdata as you mentioned. -- Regards, Shawn