From mboxrd@z Thu Jan 1 00:00:00 1970 From: Saravana Kannan Date: Fri, 28 Jan 2011 03:29:39 +0000 Subject: Re: Locking in the clk API Message-Id: <4D423823.4070009@codeaurora.org> List-Id: References: <201101111744.59712.jeremy.kerr@canonical.com> <20110111103929.GN24920@pengutronix.de> <4D386ABF.9060908@fluff.org> <20110120190822.GK6335@n2100.arm.linux.org.uk> <4D3932B4.8010904@codeaurora.org> <20110121094042.GD13235@n2100.arm.linux.org.uk> <4D40F5CC.6080809@codeaurora.org> <20110127085438.GA25239@n2100.arm.linux.org.uk> <4D41D5EC.6030405@codeaurora.org> <20110127204354.GB1597@n2100.arm.linux.org.uk> <20110127210729.79eef2c1@lxorguk.ukuu.org.uk> In-Reply-To: <20110127210729.79eef2c1@lxorguk.ukuu.org.uk> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: linux-arm-kernel@lists.infradead.org On 01/27/2011 01:07 PM, Alan Cox wrote: >>> For internal tree purposes, does .set_termios need to be atomic? Can it >>> grab mutexes instead of spinlock? >> >> I think I already answered that question above where I said "protect >> against the interrupt handler accessing the port->* stuff". > > I'm not sure you answered it correctly however as the locking nowdays is > a bit different. > > Architecturally the termios handling doesn't need a spin lock nor is it > called under one. In fact it's vital this is the case because of USB. Thanks for the clarification Alan. This is what I was looking for. -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: Thu, 27 Jan 2011 19:29:39 -0800 Subject: Locking in the clk API In-Reply-To: <20110127210729.79eef2c1@lxorguk.ukuu.org.uk> References: <201101111744.59712.jeremy.kerr@canonical.com> <20110111103929.GN24920@pengutronix.de> <4D386ABF.9060908@fluff.org> <20110120190822.GK6335@n2100.arm.linux.org.uk> <4D3932B4.8010904@codeaurora.org> <20110121094042.GD13235@n2100.arm.linux.org.uk> <4D40F5CC.6080809@codeaurora.org> <20110127085438.GA25239@n2100.arm.linux.org.uk> <4D41D5EC.6030405@codeaurora.org> <20110127204354.GB1597@n2100.arm.linux.org.uk> <20110127210729.79eef2c1@lxorguk.ukuu.org.uk> Message-ID: <4D423823.4070009@codeaurora.org> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org On 01/27/2011 01:07 PM, Alan Cox wrote: >>> For internal tree purposes, does .set_termios need to be atomic? Can it >>> grab mutexes instead of spinlock? >> >> I think I already answered that question above where I said "protect >> against the interrupt handler accessing the port->* stuff". > > I'm not sure you answered it correctly however as the locking nowdays is > a bit different. > > Architecturally the termios handling doesn't need a spin lock nor is it > called under one. In fact it's vital this is the case because of USB. Thanks for the clarification Alan. This is what I was looking for. -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 S1754694Ab1A1D3l (ORCPT ); Thu, 27 Jan 2011 22:29:41 -0500 Received: from wolverine02.qualcomm.com ([199.106.114.251]:64517 "EHLO wolverine02.qualcomm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754610Ab1A1D3k (ORCPT ); Thu, 27 Jan 2011 22:29:40 -0500 X-IronPort-AV: E=McAfee;i="5400,1158,6239"; a="72069678" Message-ID: <4D423823.4070009@codeaurora.org> Date: Thu, 27 Jan 2011 19:29:39 -0800 From: Saravana Kannan User-Agent: Mozilla/5.0 (X11; U; Linux i686 (x86_64); en-US; rv:1.9.2.13) Gecko/20101207 Thunderbird/3.1.7 MIME-Version: 1.0 To: Alan Cox CC: Russell King - ARM Linux , Lorenzo Pieralisi , Vincent Guittot , linux-sh , Ben Herrenschmidt , Sascha Hauer , linux-kernel , Colin Cross , Ben Dooks , =?ISO-8859-1?Q?Uwe_Kleine-K=F6nig?= , Jeremy Kerr , linux-arm-kernel , Richard Zhao Subject: Re: Locking in the clk API References: <201101111744.59712.jeremy.kerr@canonical.com> <20110111103929.GN24920@pengutronix.de> <4D386ABF.9060908@fluff.org> <20110120190822.GK6335@n2100.arm.linux.org.uk> <4D3932B4.8010904@codeaurora.org> <20110121094042.GD13235@n2100.arm.linux.org.uk> <4D40F5CC.6080809@codeaurora.org> <20110127085438.GA25239@n2100.arm.linux.org.uk> <4D41D5EC.6030405@codeaurora.org> <20110127204354.GB1597@n2100.arm.linux.org.uk> <20110127210729.79eef2c1@lxorguk.ukuu.org.uk> In-Reply-To: <20110127210729.79eef2c1@lxorguk.ukuu.org.uk> 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 01/27/2011 01:07 PM, Alan Cox wrote: >>> For internal tree purposes, does .set_termios need to be atomic? Can it >>> grab mutexes instead of spinlock? >> >> I think I already answered that question above where I said "protect >> against the interrupt handler accessing the port->* stuff". > > I'm not sure you answered it correctly however as the locking nowdays is > a bit different. > > Architecturally the termios handling doesn't need a spin lock nor is it > called under one. In fact it's vital this is the case because of USB. Thanks for the clarification Alan. This is what I was looking for. -Saravana -- Sent by an employee of the Qualcomm Innovation Center, Inc. The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum.