From patchwork Fri Aug 16 11:43:21 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 19234 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-vb0-f69.google.com (mail-vb0-f69.google.com [209.85.212.69]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 05FDE246AB for ; Fri, 16 Aug 2013 11:45:51 +0000 (UTC) Received: by mail-vb0-f69.google.com with SMTP id e13sf1529972vbg.0 for ; Fri, 16 Aug 2013 04:45:51 -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=9ZGJVdMag65MU41djjBCrRQcbgvu0SJsVn8W6AioQoc=; b=iaWYD1lYXU+yH1zfkBdJ6t+NfwY/Om5MYrCQF2jqDI9Wo+G3hI51pzrlmP5Hl9am0G S5zOqYTPqGXRsLU0d8Bw8mArIApJGRdBZ4neRDOWvzMgiFFyahyDDUmHTOdHdU8DYAfy g6NPPjL/mIA6YCcQd2TgowTEHZLXqnbBXb2j1+4CUwiFjE97YUCipMB0gx8QaB0zXCpg +taInmKL6Z7l2Osqnb0ITqLD71CDs8E8CpHLYLkbKdTBYGB4m1WE5gPrisj29UQAxKFj TNnfqAr/70JUYLhUwIW3uDLYWHSLH0gyyQVqXIDd/pJ3XTBocURSyoQP+P2jrc7KWdij OR+Q== X-Received: by 10.236.80.42 with SMTP id j30mr377363yhe.29.1376653551700; Fri, 16 Aug 2013 04:45:51 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.12.231 with SMTP id b7ls809626qec.68.gmail; Fri, 16 Aug 2013 04:45:51 -0700 (PDT) X-Received: by 10.52.34.40 with SMTP id w8mr743448vdi.7.1376653551586; Fri, 16 Aug 2013 04:45:51 -0700 (PDT) Received: from mail-vb0-f53.google.com (mail-vb0-f53.google.com [209.85.212.53]) by mx.google.com with ESMTPS id fa1si216692veb.120.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 16 Aug 2013 04:45:51 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.212.53 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.53; Received: by mail-vb0-f53.google.com with SMTP id i3so1553153vbh.12 for ; Fri, 16 Aug 2013 04:45:51 -0700 (PDT) X-Gm-Message-State: ALoCoQmGNYiyZBilaGKuMr3E4Fr62iH5M90nkaE4QxAEsstzVR3uzC5m1BFH0OFURnFnDqxeSm3B X-Received: by 10.58.45.70 with SMTP id k6mr889412vem.9.1376653551517; Fri, 16 Aug 2013 04:45:51 -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 u4csp64177vcz; Fri, 16 Aug 2013 04:45:51 -0700 (PDT) X-Received: by 10.66.25.133 with SMTP id c5mr2698023pag.4.1376653550573; Fri, 16 Aug 2013 04:45:50 -0700 (PDT) Received: from mail-pb0-f46.google.com (mail-pb0-f46.google.com [209.85.160.46]) by mx.google.com with ESMTPS id hb3si1479796pac.268.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 16 Aug 2013 04:45:50 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.160.46 is neither permitted nor denied by best guess record for domain of viresh.kumar@linaro.org) client-ip=209.85.160.46; Received: by mail-pb0-f46.google.com with SMTP id rq2so1909152pbb.33 for ; Fri, 16 Aug 2013 04:45:50 -0700 (PDT) X-Received: by 10.68.170.4 with SMTP id ai4mr1184734pbc.86.1376653550152; Fri, 16 Aug 2013 04:45:50 -0700 (PDT) Received: from localhost ([122.172.193.46]) by mx.google.com with ESMTPSA id yk10sm2915865pac.16.1969.12.31.16.00.00 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Fri, 16 Aug 2013 04:45:47 -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 20/25] tty: serial: rp2: drop uart_port->lock before calling tty_flip_buffer_push() Date: Fri, 16 Aug 2013 17:13:21 +0530 Message-Id: <0bbd6cf46f9aae6a35559aac70f3b012802d7031.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.53 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/rp2.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/tty/serial/rp2.c b/drivers/tty/serial/rp2.c index a314a94..328d6de 100644 --- a/drivers/tty/serial/rp2.c +++ b/drivers/tty/serial/rp2.c @@ -427,7 +427,9 @@ static void rp2_rx_chars(struct rp2_uart_port *up) up->port.icount.rx++; } + spin_unlock(&up->port.lock); tty_flip_buffer_push(port); + spin_lock(&up->port.lock); } static void rp2_tx_chars(struct rp2_uart_port *up)