From mboxrd@z Thu Jan 1 00:00:00 1970 From: Saravana Kannan Subject: Re: [PATCH 2/2] clk: Move init fields from clk to clk_hw Date: Wed, 11 Apr 2012 12:57:44 -0700 Message-ID: <4F85E238.9050102@codeaurora.org> 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> <20120320141811.GF32469@S2101-09.ap.freescale.net> <20120320181050.GN3852@pengutronix.de> <4F68E34A.70207@codeaurora.org> <20120320231242.GP3852@pengutronix.de> <4F694484.1030706@codeaurora.org> <4F714397.6080608@codeaurora.org> <4F7E4752.4020007@codeaurora.org> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Return-path: Received: from wolverine01.qualcomm.com ([199.106.114.254]:28732 "EHLO wolverine01.qualcomm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755962Ab2DKT5z (ORCPT ); Wed, 11 Apr 2012 15:57:55 -0400 In-Reply-To: Sender: linux-arm-msm-owner@vger.kernel.org List-Id: linux-arm-msm@vger.kernel.org To: "Turquette, Mike" Cc: Sascha Hauer , Andrew Lunn , Grant Likely , Jamie Iles , Jeremy Kerr , 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 , Shawn Guo On 04/11/2012 10:59 AM, Turquette, Mike wrote: > On Thu, Apr 5, 2012 at 6:30 PM, Saravana Kannan wrote: >> (*nudge*) (*nudge*) again :-) >> >> Sorry to keep nudging you on this often. The longer we wait for this, the >> more churn it will cause later on. That's why I'm being persistent on this. >> Also, once this goes in, I can start working on upstreaming MSM clock >> support. > TL;DR: I think a combination of your change to expose the > not-so-private parts of struct clk into struct clk_hw are OK and have > real benefits for the clk-provider.h code. However we need to > implement it such that all the statically initialized data can be > __initdata. Sounds like a reasonable compromise. > My only concern with this series is that platform clock code will > access struct clk_hw members without the appropriate lock held (namely > prepare_lock). I'm a bit worried that there might be a case where > some clock code access clk_hw->name when clk_hw has somehow been > destroyed/altered (e.g. if clk_put every finally gets implemented...). > Besides clk_put are there any real instances where this might happen? This problem is true for any struct/field marked as __init_data. So, I don't think this is a real problem. If someone is stupid enough to mark their data as __init_data and access them later, then there is not much we can do. Also, I believe the compiler throws out some warning when you try to access __init_data from non-init code. > I'll be pushing my fixes branch out to the list soon. Do you want to > rebase this change on top of it taking into account the __initdata > bits? I thought it might be easier for you to base your changes on top of my patch. But I can try to rebase mine on top of your changes. Hopefully your fixes aren't crazy big/complex. This is a busy week for me at work. I will try to send a patch in a day or two. Thanks, Saravana -- Sent by an employee of the Qualcomm Innovation Center, Inc. The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum. From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1761097Ab2DKT54 (ORCPT ); Wed, 11 Apr 2012 15:57:56 -0400 Received: from wolverine01.qualcomm.com ([199.106.114.254]:28732 "EHLO wolverine01.qualcomm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755962Ab2DKT5z (ORCPT ); Wed, 11 Apr 2012 15:57:55 -0400 X-IronPort-AV: E=McAfee;i="5400,1158,6677"; a="180802627" Message-ID: <4F85E238.9050102@codeaurora.org> Date: Wed, 11 Apr 2012 12:57:44 -0700 From: Saravana Kannan User-Agent: Mozilla/5.0 (X11; Linux i686 on x86_64; rv:11.0) Gecko/20120327 Thunderbird/11.0.1 MIME-Version: 1.0 To: "Turquette, Mike" CC: Sascha Hauer , Andrew Lunn , Grant Likely , Jamie Iles , Jeremy Kerr , 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 , Shawn Guo Subject: Re: [PATCH 2/2] clk: Move init fields from clk to clk_hw 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> <20120320141811.GF32469@S2101-09.ap.freescale.net> <20120320181050.GN3852@pengutronix.de> <4F68E34A.70207@codeaurora.org> <20120320231242.GP3852@pengutronix.de> <4F694484.1030706@codeaurora.org> <4F714397.6080608@codeaurora.org> <4F7E4752.4020007@codeaurora.org> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 04/11/2012 10:59 AM, Turquette, Mike wrote: > On Thu, Apr 5, 2012 at 6:30 PM, Saravana Kannan wrote: >> (*nudge*) (*nudge*) again :-) >> >> Sorry to keep nudging you on this often. The longer we wait for this, the >> more churn it will cause later on. That's why I'm being persistent on this. >> Also, once this goes in, I can start working on upstreaming MSM clock >> support. > TL;DR: I think a combination of your change to expose the > not-so-private parts of struct clk into struct clk_hw are OK and have > real benefits for the clk-provider.h code. However we need to > implement it such that all the statically initialized data can be > __initdata. Sounds like a reasonable compromise. > My only concern with this series is that platform clock code will > access struct clk_hw members without the appropriate lock held (namely > prepare_lock). I'm a bit worried that there might be a case where > some clock code access clk_hw->name when clk_hw has somehow been > destroyed/altered (e.g. if clk_put every finally gets implemented...). > Besides clk_put are there any real instances where this might happen? This problem is true for any struct/field marked as __init_data. So, I don't think this is a real problem. If someone is stupid enough to mark their data as __init_data and access them later, then there is not much we can do. Also, I believe the compiler throws out some warning when you try to access __init_data from non-init code. > I'll be pushing my fixes branch out to the list soon. Do you want to > rebase this change on top of it taking into account the __initdata > bits? I thought it might be easier for you to base your changes on top of my patch. But I can try to rebase mine on top of your changes. Hopefully your fixes aren't crazy big/complex. This is a busy week for me at work. I will try to send a patch in a day or two. Thanks, Saravana -- Sent by an employee of the Qualcomm Innovation Center, Inc. The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum. From mboxrd@z Thu Jan 1 00:00:00 1970 From: skannan@codeaurora.org (Saravana Kannan) Date: Wed, 11 Apr 2012 12:57:44 -0700 Subject: [PATCH 2/2] clk: Move init fields from clk to clk_hw In-Reply-To: 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> <20120320141811.GF32469@S2101-09.ap.freescale.net> <20120320181050.GN3852@pengutronix.de> <4F68E34A.70207@codeaurora.org> <20120320231242.GP3852@pengutronix.de> <4F694484.1030706@codeaurora.org> <4F714397.6080608@codeaurora.org> <4F7E4752.4020007@codeaurora.org> Message-ID: <4F85E238.9050102@codeaurora.org> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org On 04/11/2012 10:59 AM, Turquette, Mike wrote: > On Thu, Apr 5, 2012 at 6:30 PM, Saravana Kannan wrote: >> (*nudge*) (*nudge*) again :-) >> >> Sorry to keep nudging you on this often. The longer we wait for this, the >> more churn it will cause later on. That's why I'm being persistent on this. >> Also, once this goes in, I can start working on upstreaming MSM clock >> support. > TL;DR: I think a combination of your change to expose the > not-so-private parts of struct clk into struct clk_hw are OK and have > real benefits for the clk-provider.h code. However we need to > implement it such that all the statically initialized data can be > __initdata. Sounds like a reasonable compromise. > My only concern with this series is that platform clock code will > access struct clk_hw members without the appropriate lock held (namely > prepare_lock). I'm a bit worried that there might be a case where > some clock code access clk_hw->name when clk_hw has somehow been > destroyed/altered (e.g. if clk_put every finally gets implemented...). > Besides clk_put are there any real instances where this might happen? This problem is true for any struct/field marked as __init_data. So, I don't think this is a real problem. If someone is stupid enough to mark their data as __init_data and access them later, then there is not much we can do. Also, I believe the compiler throws out some warning when you try to access __init_data from non-init code. > I'll be pushing my fixes branch out to the list soon. Do you want to > rebase this change on top of it taking into account the __initdata > bits? I thought it might be easier for you to base your changes on top of my patch. But I can try to rebase mine on top of your changes. Hopefully your fixes aren't crazy big/complex. This is a busy week for me at work. I will try to send a patch in a day or two. Thanks, Saravana -- Sent by an employee of the Qualcomm Innovation Center, Inc. The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum.