From patchwork Fri Aug 16 11:43:25 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 19238 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ve0-f199.google.com (mail-ve0-f199.google.com [209.85.128.199]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 17792246AB for ; Fri, 16 Aug 2013 11:46:18 +0000 (UTC) Received: by mail-ve0-f199.google.com with SMTP id m1sf2336308ves.2 for ; Fri, 16 Aug 2013 04:46:17 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:x-gm-message-state:delivered-to:from:to:cc:subject :date:message-id:in-reply-to:references:in-reply-to:references :x-original-sender:x-original-authentication-results:precedence :mailing-list:list-id:list-post:list-help:list-archive :list-unsubscribe; bh=erjPS63zyBtpzPDOgQT8688BUy4WyeRv4X4Sq4GFubA=; b=SHaZQskwg8uv03LU5wTdD4oVAcL0mMY4DAjOIGj+0iLRP4Hekyh0dW9EstCXxl0BWF s32gBSjOfipyj1LM110oQBw8CUATQpZ6m1DNfqcDR9uYRem0lD+cl1EEb4ulYx61RImn keVEeRM7oDKoHsOMfVsSUUPJGcs4xtLBa/KNjp3SBMLBU6UpkoPuuNNNAymY5M/4BzWP vaOiZpyU1kF3GSJvm3/On/qeiZLkVz6W3cugJQQm71lUW6aQgwfghnS5cejLQOlsVsH/ 45CETqKGN1IpmKflStXzeEU70F3fMJTk2Mhh/TixHJ6cvH4OgJyuwmCpiIgN08CwQRYo NucA== X-Received: by 10.236.0.229 with SMTP id 65mr395196yhb.15.1376653577769; Fri, 16 Aug 2013 04:46:17 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.61.135 with SMTP id p7ls827056qer.54.gmail; Fri, 16 Aug 2013 04:46:17 -0700 (PDT) X-Received: by 10.52.178.198 with SMTP id da6mr192509vdc.26.1376653577634; Fri, 16 Aug 2013 04:46:17 -0700 (PDT) Received: from mail-vb0-f50.google.com (mail-vb0-f50.google.com [209.85.212.50]) by mx.google.com with ESMTPS id ae9si221942vdc.80.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 16 Aug 2013 04:46:17 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.212.50 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.212.50; Received: by mail-vb0-f50.google.com with SMTP id x14so1499064vbb.23 for ; Fri, 16 Aug 2013 04:46:17 -0700 (PDT) X-Gm-Message-State: ALoCoQkDRw99lBzbql3LXkpWGhEXmcqUOMFbwVs104eUtJWg/aWpdU0nUf0zoP85XNAEnkLz4rLk X-Received: by 10.52.120.7 with SMTP id ky7mr738209vdb.12.1376653577567; Fri, 16 Aug 2013 04:46:17 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patches@linaro.org Received: by 10.220.174.196 with SMTP id u4csp64195vcz; Fri, 16 Aug 2013 04:46:17 -0700 (PDT) X-Received: by 10.68.135.138 with SMTP id ps10mr1235560pbb.42.1376653576764; Fri, 16 Aug 2013 04:46:16 -0700 (PDT) Received: from mail-pd0-f180.google.com (mail-pd0-f180.google.com [209.85.192.180]) by mx.google.com with ESMTPS id aq4si869886pbd.146.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 16 Aug 2013 04:46:16 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.192.180 is neither permitted nor denied by best guess record for domain of viresh.kumar@linaro.org) client-ip=209.85.192.180; Received: by mail-pd0-f180.google.com with SMTP id y10so2140833pdj.39 for ; Fri, 16 Aug 2013 04:46:16 -0700 (PDT) X-Received: by 10.66.228.234 with SMTP id sl10mr2617051pac.149.1376653576376; Fri, 16 Aug 2013 04:46:16 -0700 (PDT) Received: from localhost ([122.172.193.46]) by mx.google.com with ESMTPSA id ys4sm1705088pbb.9.1969.12.31.16.00.00 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Fri, 16 Aug 2013 04:46:15 -0700 (PDT) From: Viresh Kumar To: gregkh@linuxfoundation.org, jslaby@suse.cz Cc: linaro-kernel@lists.linaro.org, patches@linaro.org, linux-serial@vger.kernel.org, Viresh Kumar Subject: [PATCH 24/25] tty: serial: sirfsoc: drop uart_port->lock before calling tty_flip_buffer_push() Date: Fri, 16 Aug 2013 17:13:25 +0530 Message-Id: <5f50d09386c4bfcb6b983b680b69ecb77a2f835a.1376651114.git.viresh.kumar@linaro.org> X-Mailer: git-send-email 1.7.12.rc2.18.g61b472e In-Reply-To: References: In-Reply-To: References: X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: viresh.kumar@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.212.50 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Precedence: list Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org List-ID: X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , The -rt patch triggers a lockdep warning for serial drivers if tty_flip_buffer_push() is called with uart_port->lock locked. This never shows up on UP kernels. Release the port lock before calling tty_flip_buffer_push() and reacquire it after the call. Similar stuff was already done for few other drivers in the past, like: commit 2389b272168ceec056ca1d8a870a97fa9c26e11a Author: Thomas Gleixner Date: Tue May 29 21:53:50 2007 +0100 [ARM] 4417/1: Serial: Fix AMBA drivers locking Signed-off-by: Viresh Kumar --- drivers/tty/serial/sirfsoc_uart.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/tty/serial/sirfsoc_uart.c b/drivers/tty/serial/sirfsoc_uart.c index 1fd564b..bc289fe 100644 --- a/drivers/tty/serial/sirfsoc_uart.c +++ b/drivers/tty/serial/sirfsoc_uart.c @@ -219,7 +219,10 @@ sirfsoc_uart_pio_rx_chars(struct uart_port *port, unsigned int max_rx_count) } port->icount.rx += rx_count; + + spin_unlock(&port->lock); tty_flip_buffer_push(&port->state->port); + spin_lock(&port->lock); return rx_count; }