From patchwork Fri Aug 16 11:43:06 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 19219 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-vc0-f199.google.com (mail-vc0-f199.google.com [209.85.220.199]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 19F5B246AB for ; Fri, 16 Aug 2013 11:44:11 +0000 (UTC) Received: by mail-vc0-f199.google.com with SMTP id gf11sf2223521vcb.6 for ; Fri, 16 Aug 2013 04:44:10 -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=shyqYT0F56tDIQq3DisbJb66R8A1eGrlqoJek4Lgf6M=; b=kBvvpGExk1doDW9bwvP+1s8e7EvQwWlYcYm1Cxxq0r4HRylk7NFlH3El88/F57FOvR vZ7vWD0gwJQro1nwgaKu7N2ETaReKJT+4mDbh2aR9yZ/kUEg73VEMMLzite0CAy7OtYj 1kZpd/Fvg83PJWN01YbbuF+N6W9H7QJs5bIa3UkYbPbwGeHwsr+iNuqO3h/riDDUb8Uz 5WNdAM3cM8zKbWMiRHXWm8yh5E1QL1KURTwj4b0gKHqokqBfxixNyoyopveqfONz0EfN a/1pbQUqVeiK9J5KSteCnrZoBRo3qqkCEKK0+/AnoeiPi/pLLXCMBMd+QwNENcE/Hm6Y yhmg== X-Received: by 10.236.200.135 with SMTP id z7mr371262yhn.41.1376653450787; Fri, 16 Aug 2013 04:44:10 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.27.195 with SMTP id v3ls706536qeg.6.gmail; Fri, 16 Aug 2013 04:44:10 -0700 (PDT) X-Received: by 10.220.169.203 with SMTP id a11mr125672vcz.26.1376653450689; Fri, 16 Aug 2013 04:44:10 -0700 (PDT) Received: from mail-ve0-f172.google.com (mail-ve0-f172.google.com [209.85.128.172]) by mx.google.com with ESMTPS id z6si211957vcu.145.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 16 Aug 2013 04:44:10 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.128.172 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.128.172; Received: by mail-ve0-f172.google.com with SMTP id oz10so1329714veb.17 for ; Fri, 16 Aug 2013 04:44:10 -0700 (PDT) X-Gm-Message-State: ALoCoQnegEO0SyWnyRoSQiw5QM+j3VXeBxOpI4s7Wl7s3ESqieEB+oNmBfmnKX0PCotm4CWbBRu6 X-Received: by 10.58.45.70 with SMTP id k6mr883136vem.9.1376653450618; Fri, 16 Aug 2013 04:44:10 -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 u4csp64108vcz; Fri, 16 Aug 2013 04:44:10 -0700 (PDT) X-Received: by 10.66.228.3 with SMTP id se3mr2724508pac.37.1376653449734; Fri, 16 Aug 2013 04:44:09 -0700 (PDT) Received: from mail-pa0-f54.google.com (mail-pa0-f54.google.com [209.85.220.54]) by mx.google.com with ESMTPS id zr1si836462pbc.270.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 16 Aug 2013 04:44:09 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.220.54 is neither permitted nor denied by best guess record for domain of viresh.kumar@linaro.org) client-ip=209.85.220.54; Received: by mail-pa0-f54.google.com with SMTP id kx10so1787513pab.13 for ; Fri, 16 Aug 2013 04:44:09 -0700 (PDT) X-Received: by 10.68.170.133 with SMTP id am5mr1147934pbc.104.1376653449315; Fri, 16 Aug 2013 04:44:09 -0700 (PDT) Received: from localhost ([122.172.193.46]) by mx.google.com with ESMTPSA id wr9sm1699566pbc.7.1969.12.31.16.00.00 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Fri, 16 Aug 2013 04:44:08 -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 05/25] tty: serial: arc: drop uart_port->lock before calling tty_flip_buffer_push() Date: Fri, 16 Aug 2013 17:13:06 +0530 Message-Id: <7af55e73a82958b94e65c8bd275aaa7eb7b88068.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.128.172 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/arc_uart.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/tty/serial/arc_uart.c b/drivers/tty/serial/arc_uart.c index 22f280a..8cf6b30 100644 --- a/drivers/tty/serial/arc_uart.c +++ b/drivers/tty/serial/arc_uart.c @@ -248,7 +248,9 @@ static void arc_serial_rx_chars(struct arc_uart_port *uart) uart_insert_char(&uart->port, status, RXOERR, ch, flg); done: + spin_unlock(&uart->port.lock); tty_flip_buffer_push(&uart->port.state->port); + spin_lock(&uart->port.lock); } }