From patchwork Fri Aug 16 11:43:02 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 19215 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-qc0-f199.google.com (mail-qc0-f199.google.com [209.85.216.199]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 761D6246AB for ; Fri, 16 Aug 2013 11:43:44 +0000 (UTC) Received: by mail-qc0-f199.google.com with SMTP id j10sf902854qcx.10 for ; Fri, 16 Aug 2013 04:43:44 -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=qa8zE41NTussCidMxc6DbAHCIi6NRlwPTq5ErZzkVsc=; b=ka0bYkyEthtjTZIE57X8tzFXOEykX8TmB/ot5NcHRD2+ebOr4ySa+LTa6nxYlfQfC/ aabNRUYiQcSEyjVH7zOoTBu0DONaCOOM/uBI4lJ4QNFjDEkLaJyUE172+xsx5yvWLem8 UpThgndd2nxDynW6S7bpCHxAjAqCWAhI0Gvfwf4FqedpCSzEqughhqtvXgQfSx34limG xZ5zb6XJ+wc/mnraEXu54a8krrHzmSb7kb2pZ0B0u85a2+Uf4MHz5fTMeqdIs0AFIo/w UAY27nBdI1LL15Pp7eyKZjlpxzvZLKbjHdLbFQPqHz2tFzEamxHvb1Jx++qwSLDyq9SR n4QQ== X-Received: by 10.236.45.102 with SMTP id o66mr363065yhb.47.1376653424283; Fri, 16 Aug 2013 04:43:44 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.17.197 with SMTP id q5ls804539qed.93.gmail; Fri, 16 Aug 2013 04:43:44 -0700 (PDT) X-Received: by 10.58.67.9 with SMTP id j9mr878743vet.22.1376653424166; Fri, 16 Aug 2013 04:43:44 -0700 (PDT) Received: from mail-vb0-f52.google.com (mail-vb0-f52.google.com [209.85.212.52]) by mx.google.com with ESMTPS id o5si94063vcj.140.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 16 Aug 2013 04:43:44 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.212.52 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.52; Received: by mail-vb0-f52.google.com with SMTP id f12so1488783vbg.39 for ; Fri, 16 Aug 2013 04:43:44 -0700 (PDT) X-Gm-Message-State: ALoCoQnuMO5ppZ65nRwS5wa+JaMe/d/JKfahChWTrM7ejpME+gL4i7ju2YTQT/PJLVRXLzs+jjqu X-Received: by 10.52.120.7 with SMTP id ky7mr730495vdb.12.1376653424084; Fri, 16 Aug 2013 04:43:44 -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 u4csp64087vcz; Fri, 16 Aug 2013 04:43:43 -0700 (PDT) X-Received: by 10.68.189.228 with SMTP id gl4mr1202095pbc.57.1376653423270; Fri, 16 Aug 2013 04:43:43 -0700 (PDT) Received: from mail-pb0-f43.google.com (mail-pb0-f43.google.com [209.85.160.43]) by mx.google.com with ESMTPS id qf5si1516317pac.66.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 16 Aug 2013 04:43:43 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.160.43 is neither permitted nor denied by best guess record for domain of viresh.kumar@linaro.org) client-ip=209.85.160.43; Received: by mail-pb0-f43.google.com with SMTP id md4so1898738pbc.2 for ; Fri, 16 Aug 2013 04:43:42 -0700 (PDT) X-Received: by 10.68.189.72 with SMTP id gg8mr608586pbc.201.1376653422858; Fri, 16 Aug 2013 04:43:42 -0700 (PDT) Received: from localhost ([122.172.193.46]) by mx.google.com with ESMTPSA id gg9sm1666008pbc.25.1969.12.31.16.00.00 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Fri, 16 Aug 2013 04:43:42 -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 , Tobias Klauser Subject: [PATCH 01/25] tty: serial: altera_jtag: drop uart_port->lock before calling tty_flip_buffer_push() Date: Fri, 16 Aug 2013 17:13:02 +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.212.52 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 Cc: Tobias Klauser Signed-off-by: Viresh Kumar --- drivers/tty/serial/altera_jtaguart.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/tty/serial/altera_jtaguart.c b/drivers/tty/serial/altera_jtaguart.c index c6bdb94..46c25ff 100644 --- a/drivers/tty/serial/altera_jtaguart.c +++ b/drivers/tty/serial/altera_jtaguart.c @@ -139,7 +139,9 @@ static void altera_jtaguart_rx_chars(struct altera_jtaguart *pp) uart_insert_char(port, 0, 0, ch, flag); } + spin_unlock(&port->lock); tty_flip_buffer_push(&port->state->port); + spin_lock(&port->lock); } static void altera_jtaguart_tx_chars(struct altera_jtaguart *pp)