From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752967AbbC3QCt (ORCPT ); Mon, 30 Mar 2015 12:02:49 -0400 Received: from mail-ob0-f176.google.com ([209.85.214.176]:34499 "EHLO mail-ob0-f176.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752601AbbC3QCp (ORCPT ); Mon, 30 Mar 2015 12:02:45 -0400 MIME-Version: 1.0 In-Reply-To: <1427730803-28635-2-git-send-email-javier.martinez@collabora.co.uk> References: <1427730803-28635-1-git-send-email-javier.martinez@collabora.co.uk> <1427730803-28635-2-git-send-email-javier.martinez@collabora.co.uk> Date: Tue, 31 Mar 2015 01:02:29 +0900 Message-ID: Subject: Re: [RFC PATCH v3 1/2] clk: samsung: Add a clock lookup function From: Tomasz Figa To: Javier Martinez Canillas Cc: Stephen Boyd , Mike Turquette , Sylwester Nawrocki , Kukjin Kim , Olof Johansson , Doug Anderson , Krzysztof Kozlowski , Kevin Hilman , Tyler Baker , Abhilash Kesavan , Chanwoo Choi , linux-arm-kernel , "linux-samsung-soc@vger.kernel.org" , linux-kernel Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Javier, 2015-03-31 0:53 GMT+09:00 Javier Martinez Canillas : > The Samsung helpers functions to register clocks, add the clock instance > returned by the common clock framework to a lookup table that is used by > OF to lookup the clocks. > > But this table could also be useful to clock drivers if they need to get > a clock instance since the helper functions don't return them. > > The common clock framework __clk_lookup() function from the clk provider > API could be used by drivers as well. But it's more efficient to use the > Samsung specific lookup table that returns the clock instance in constant > time, than using the __clk_lookup() function that uses the clock name as > an index so it has a linear search time. Is this really something we should be concerned about? If so, maybe the generic look-up function should be rewritten to use something faster, such as tree or hash table? Best regards, Tomasz From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tomasz Figa Subject: Re: [RFC PATCH v3 1/2] clk: samsung: Add a clock lookup function Date: Tue, 31 Mar 2015 01:02:29 +0900 Message-ID: References: <1427730803-28635-1-git-send-email-javier.martinez@collabora.co.uk> <1427730803-28635-2-git-send-email-javier.martinez@collabora.co.uk> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Return-path: Received: from mail-ob0-f176.google.com ([209.85.214.176]:34499 "EHLO mail-ob0-f176.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752601AbbC3QCp (ORCPT ); Mon, 30 Mar 2015 12:02:45 -0400 In-Reply-To: <1427730803-28635-2-git-send-email-javier.martinez@collabora.co.uk> Sender: linux-samsung-soc-owner@vger.kernel.org List-Id: linux-samsung-soc@vger.kernel.org To: Javier Martinez Canillas Cc: Stephen Boyd , Mike Turquette , Sylwester Nawrocki , Kukjin Kim , Olof Johansson , Doug Anderson , Krzysztof Kozlowski , Kevin Hilman , Tyler Baker , Abhilash Kesavan , Chanwoo Choi , linux-arm-kernel , "linux-samsung-soc@vger.kernel.org" , linux-kernel Hi Javier, 2015-03-31 0:53 GMT+09:00 Javier Martinez Canillas : > The Samsung helpers functions to register clocks, add the clock instance > returned by the common clock framework to a lookup table that is used by > OF to lookup the clocks. > > But this table could also be useful to clock drivers if they need to get > a clock instance since the helper functions don't return them. > > The common clock framework __clk_lookup() function from the clk provider > API could be used by drivers as well. But it's more efficient to use the > Samsung specific lookup table that returns the clock instance in constant > time, than using the __clk_lookup() function that uses the clock name as > an index so it has a linear search time. Is this really something we should be concerned about? If so, maybe the generic look-up function should be rewritten to use something faster, such as tree or hash table? Best regards, Tomasz From mboxrd@z Thu Jan 1 00:00:00 1970 From: tomasz.figa@gmail.com (Tomasz Figa) Date: Tue, 31 Mar 2015 01:02:29 +0900 Subject: [RFC PATCH v3 1/2] clk: samsung: Add a clock lookup function In-Reply-To: <1427730803-28635-2-git-send-email-javier.martinez@collabora.co.uk> References: <1427730803-28635-1-git-send-email-javier.martinez@collabora.co.uk> <1427730803-28635-2-git-send-email-javier.martinez@collabora.co.uk> Message-ID: To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org Hi Javier, 2015-03-31 0:53 GMT+09:00 Javier Martinez Canillas : > The Samsung helpers functions to register clocks, add the clock instance > returned by the common clock framework to a lookup table that is used by > OF to lookup the clocks. > > But this table could also be useful to clock drivers if they need to get > a clock instance since the helper functions don't return them. > > The common clock framework __clk_lookup() function from the clk provider > API could be used by drivers as well. But it's more efficient to use the > Samsung specific lookup table that returns the clock instance in constant > time, than using the __clk_lookup() function that uses the clock name as > an index so it has a linear search time. Is this really something we should be concerned about? If so, maybe the generic look-up function should be rewritten to use something faster, such as tree or hash table? Best regards, Tomasz