From patchwork Fri Aug 16 11:43:07 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 19220 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-gh0-f198.google.com (mail-gh0-f198.google.com [209.85.160.198]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 63A70246AB for ; Fri, 16 Aug 2013 11:44:17 +0000 (UTC) Received: by mail-gh0-f198.google.com with SMTP id r13sf1265501ghr.5 for ; Fri, 16 Aug 2013 04:44: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=Nc/jShWUR3HvxHBYdlWbPr6kCr58cMShhRbC76psTeA=; b=a2V69ruOb7ZG/YiDhk8csLg8Kb09TmGhJmNb8jVVBPlR9QMYRYZ8DVuU0k+Bo77Z6P tBV3EBVX37RBaJ+DkTEANfcPYh+JuHuJzlbibrjgu8/mZsU93cI6WZDz0OmJDPM7w0qL dFhd22xOMHHhwKa4gaqkdHNaFzvJ5M4Jz1GdVtonMjERQchOnr/M8G11WnlCGPcjZPb7 LpsgLVf87JsKWuJfn5Bh9O5hvucRECfs19eyGxXsV8x4YfEIghE7MrbpJ7YY9OIGIhYa ul0+AzhqjOlCEUYdbKQxUcZQELfWu3Rh0MstXsQ95YdkhzSlv1aiCq1jTDbBtvAHfzv2 eLFQ== X-Received: by 10.236.4.234 with SMTP id 70mr58196yhj.57.1376653457033; Fri, 16 Aug 2013 04:44:17 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.12.231 with SMTP id b7ls809436qec.68.gmail; Fri, 16 Aug 2013 04:44:16 -0700 (PDT) X-Received: by 10.221.40.10 with SMTP id to10mr861012vcb.22.1376653456898; Fri, 16 Aug 2013 04:44:16 -0700 (PDT) Received: from mail-vc0-f169.google.com (mail-vc0-f169.google.com [209.85.220.169]) by mx.google.com with ESMTPS id sy7si228492vdc.14.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 16 Aug 2013 04:44:16 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.220.169 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.169; Received: by mail-vc0-f169.google.com with SMTP id ib11so1402973vcb.0 for ; Fri, 16 Aug 2013 04:44:16 -0700 (PDT) X-Gm-Message-State: ALoCoQnxbcwpoCaA1UwBYOHPAO2ftz8V/7ctwknb2v3zEYFvOBwoXXXZfUXGcY+lX9X5Jifd6msl X-Received: by 10.220.198.133 with SMTP id eo5mr176019vcb.24.1376653456825; Fri, 16 Aug 2013 04:44:16 -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 u4csp64112vcz; Fri, 16 Aug 2013 04:44:16 -0700 (PDT) X-Received: by 10.68.59.98 with SMTP id y2mr1113444pbq.135.1376653456036; Fri, 16 Aug 2013 04:44:16 -0700 (PDT) Received: from mail-pa0-f41.google.com (mail-pa0-f41.google.com [209.85.220.41]) by mx.google.com with ESMTPS id fa5si1486460pab.216.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 16 Aug 2013 04:44:16 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.220.41 is neither permitted nor denied by best guess record for domain of viresh.kumar@linaro.org) client-ip=209.85.220.41; Received: by mail-pa0-f41.google.com with SMTP id bj1so1792283pad.14 for ; Fri, 16 Aug 2013 04:44:15 -0700 (PDT) X-Received: by 10.66.121.234 with SMTP id ln10mr2662433pab.20.1376653455612; Fri, 16 Aug 2013 04:44:15 -0700 (PDT) Received: from localhost ([122.172.193.46]) by mx.google.com with ESMTPSA id bb1sm1694575pbc.10.1969.12.31.16.00.00 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Fri, 16 Aug 2013 04:44: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 06/25] tty: serial: bcm63xx: drop uart_port->lock before calling tty_flip_buffer_push() Date: Fri, 16 Aug 2013 17:13:07 +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.169 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/bcm63xx_uart.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/tty/serial/bcm63xx_uart.c b/drivers/tty/serial/bcm63xx_uart.c index 6fa2ae77..9f0bf4c 100644 --- a/drivers/tty/serial/bcm63xx_uart.c +++ b/drivers/tty/serial/bcm63xx_uart.c @@ -302,7 +302,9 @@ static void bcm_uart_do_rx(struct uart_port *port) } while (--max_count); + spin_unlock(&port->lock); tty_flip_buffer_push(tty_port); + spin_lock(&port->lock); } /*