From patchwork Fri Aug 16 11:43:10 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 19223 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-qe0-f71.google.com (mail-qe0-f71.google.com [209.85.128.71]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 12BBD246AB for ; Fri, 16 Aug 2013 11:44:38 +0000 (UTC) Received: by mail-qe0-f71.google.com with SMTP id 9sf2162365qea.6 for ; Fri, 16 Aug 2013 04:44:37 -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=CDa8szOYgNiSllayPq8ed+qI5EJ4+F6cYQZfJFzFSE8=; b=BgXuFdFtd+mXN6X9yZvWMECYAMYL9Srl8jOyyQSK7sT5HbB0NvkK/30f/b1PPV1E+7 UVo3Mv4zmNWHSQ9BLunnvmvTdCMXw+/QGAW2Np2rjPYkog72RJLdPbcF/GYPe3/umWcF 9l4if43Zp9IPcP4naZcTL/1XMvcm/VA82ReHMtNbp1Ir0HP9MGV4z0LBNdtm8TmAU0Gq DKQCUOoA/G/XOiPVdD5qqX/sR1d2VUkZXG+fg6qqpHulhtgBTMa0XbPOCF/EzGgqbM7Q XFdSxQMc0W3gMqTo2Vi0k+MYcdTKCNiVjAuD4Lzfo66LavNf/bDMl3INExT2Tki4r7/B ekOQ== X-Received: by 10.236.68.193 with SMTP id l41mr394211yhd.19.1376653476914; Fri, 16 Aug 2013 04:44:36 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.2.3 with SMTP id 3ls598951qeq.83.gmail; Fri, 16 Aug 2013 04:44:36 -0700 (PDT) X-Received: by 10.220.164.202 with SMTP id f10mr142919vcy.25.1376653476806; Fri, 16 Aug 2013 04:44:36 -0700 (PDT) Received: from mail-vc0-f176.google.com (mail-vc0-f176.google.com [209.85.220.176]) by mx.google.com with ESMTPS id o7si213503vcl.135.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 16 Aug 2013 04:44:36 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.220.176 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.220.176; Received: by mail-vc0-f176.google.com with SMTP id ha11so1346018vcb.35 for ; Fri, 16 Aug 2013 04:44:36 -0700 (PDT) X-Gm-Message-State: ALoCoQmpPULARjZ+smdUVr+0PJENnDpV/e/BfMbi9uXyFyW++xrbaTM7ek3VVy7flNwnXD2rX3cd X-Received: by 10.58.76.130 with SMTP id k2mr179776vew.24.1376653476497; Fri, 16 Aug 2013 04:44:36 -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 u4csp64128vcz; Fri, 16 Aug 2013 04:44:36 -0700 (PDT) X-Received: by 10.66.171.204 with SMTP id aw12mr2708107pac.7.1376653475713; Fri, 16 Aug 2013 04:44:35 -0700 (PDT) Received: from mail-pd0-f173.google.com (mail-pd0-f173.google.com [209.85.192.173]) by mx.google.com with ESMTPS id xx4si1479180pab.255.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 16 Aug 2013 04:44:35 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.192.173 is neither permitted nor denied by best guess record for domain of viresh.kumar@linaro.org) client-ip=209.85.192.173; Received: by mail-pd0-f173.google.com with SMTP id p10so2153426pdj.18 for ; Fri, 16 Aug 2013 04:44:35 -0700 (PDT) X-Received: by 10.66.171.204 with SMTP id aw12mr2708074pac.7.1376653475305; Fri, 16 Aug 2013 04:44:35 -0700 (PDT) Received: from localhost ([122.172.193.46]) by mx.google.com with ESMTPSA id w8sm2939279paj.4.1969.12.31.16.00.00 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Fri, 16 Aug 2013 04:44:34 -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 09/25] tty: serial: icom: drop uart_port->lock before calling tty_flip_buffer_push() Date: Fri, 16 Aug 2013 17:13:10 +0530 Message-Id: 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.220.176 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/icom.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/tty/serial/icom.c b/drivers/tty/serial/icom.c index 18ed5ae..46cb597 100644 --- a/drivers/tty/serial/icom.c +++ b/drivers/tty/serial/icom.c @@ -834,7 +834,10 @@ ignore_char: status = cpu_to_le16(icom_port->statStg->rcv[rcv_buff].flags); } icom_port->next_rcv = rcv_buff; + + spin_unlock(&icom_port->uart_port.lock); tty_flip_buffer_push(port); + spin_lock(&icom_port->uart_port.lock); } static void process_interrupt(u16 port_int_reg,