From patchwork Fri Aug 16 11:43:20 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 19233 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-qa0-f69.google.com (mail-qa0-f69.google.com [209.85.216.69]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 14231246AB for ; Fri, 16 Aug 2013 11:45:45 +0000 (UTC) Received: by mail-qa0-f69.google.com with SMTP id bv4sf917488qab.8 for ; Fri, 16 Aug 2013 04:45: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=rUL/XUVqAxOUQyihsXZ0FL818NOx0rMb/u/eTmAcZrs=; b=aDrwKXS6FbUfo0COPaXRTMCoeCmQYSls2lEs+lKfACe4F8oyndpbjhhgSfFlY/1wNt KV5LXJDh3vA84XhXWbSVnp74ouC9EMWJunTuekUtYVmtCOphVMtGsqs3GFlRRd8D+U/v U9woplZDhUXr96yWOE2Zw4w4iV3WHzGyQ5lo/bv28GQyl7tWpkGa6XS6wl7cJBVWCEtd ATS8B8BDjef/s5mS/Rk6TExUGmi4J2oE7ifJL3TvAyg/z/fINdivRFxiIjUZYLpvZFNW MlUJkx5rZLjW95nU2fO+hUxz+BDVZTTf7e/sLxGGR/BRq9VhwEWzxr6KBfmkEWiVqVa1 gRoQ== X-Received: by 10.236.189.37 with SMTP id b25mr360835yhn.48.1376653544854; Fri, 16 Aug 2013 04:45:44 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.12.166 with SMTP id z6ls691493qeb.18.gmail; Fri, 16 Aug 2013 04:45:44 -0700 (PDT) X-Received: by 10.220.74.69 with SMTP id t5mr882977vcj.18.1376653544758; Fri, 16 Aug 2013 04:45:44 -0700 (PDT) Received: from mail-vb0-f42.google.com (mail-vb0-f42.google.com [209.85.212.42]) by mx.google.com with ESMTPS id gw1si214229vcb.137.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 16 Aug 2013 04:45:44 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.212.42 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.42; Received: by mail-vb0-f42.google.com with SMTP id e12so1560782vbg.29 for ; Fri, 16 Aug 2013 04:45:44 -0700 (PDT) X-Gm-Message-State: ALoCoQm1P7CY/17LUf0175lSQR4u6XQj06SaZgwgjdE9y2OBZ6F4MgnSSoTkNMLFAlA8Y4UBzHd9 X-Received: by 10.52.0.52 with SMTP id 20mr728696vdb.22.1376653544690; Fri, 16 Aug 2013 04:45: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 u4csp64173vcz; Fri, 16 Aug 2013 04:45:44 -0700 (PDT) X-Received: by 10.66.246.133 with SMTP id xw5mr2580552pac.114.1376653543757; Fri, 16 Aug 2013 04:45:43 -0700 (PDT) Received: from mail-pa0-f42.google.com (mail-pa0-f42.google.com [209.85.220.42]) by mx.google.com with ESMTPS id ds3si848822pbb.229.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 16 Aug 2013 04:45:43 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.220.42 is neither permitted nor denied by best guess record for domain of viresh.kumar@linaro.org) client-ip=209.85.220.42; Received: by mail-pa0-f42.google.com with SMTP id lj1so1792747pab.29 for ; Fri, 16 Aug 2013 04:45:41 -0700 (PDT) X-Received: by 10.68.178.35 with SMTP id cv3mr1110307pbc.160.1376653541435; Fri, 16 Aug 2013 04:45:41 -0700 (PDT) Received: from localhost ([122.172.193.46]) by mx.google.com with ESMTPSA id qf7sm2921346pac.14.1969.12.31.16.00.00 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Fri, 16 Aug 2013 04:45:40 -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 19/25] tty: serial: pnx8xxx: drop uart_port->lock before calling tty_flip_buffer_push() Date: Fri, 16 Aug 2013 17:13:20 +0530 Message-Id: <4de8e95b2a8289b4f9556bb0a663fb6b967b98d2.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.42 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/pnx8xxx_uart.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/tty/serial/pnx8xxx_uart.c b/drivers/tty/serial/pnx8xxx_uart.c index 7e277a5..8db7482 100644 --- a/drivers/tty/serial/pnx8xxx_uart.c +++ b/drivers/tty/serial/pnx8xxx_uart.c @@ -237,7 +237,10 @@ static void pnx8xxx_rx_chars(struct pnx8xxx_port *sport) status = FIFO_TO_SM(serial_in(sport, PNX8XXX_FIFO)) | ISTAT_TO_SM(serial_in(sport, PNX8XXX_ISTAT)); } + + spin_unlock(&sport->port.lock); tty_flip_buffer_push(&sport->port.state->port); + spin_lock(&sport->port.lock); } static void pnx8xxx_tx_chars(struct pnx8xxx_port *sport)