From patchwork Fri Aug 16 11:43:03 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 19216 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 B3159246AB for ; Fri, 16 Aug 2013 11:43:51 +0000 (UTC) Received: by mail-qc0-f199.google.com with SMTP id j10sf2150600qcx.6 for ; Fri, 16 Aug 2013 04:43: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=hvE3aFkEB57AUqoc2f1Yepu71bng2SinM43SLWl8mHI=; b=PZjnPGIPHd+kxTxpr42bDWLBRhRKh5RuuDFAUql/Ms2Y0iYs8bzkBhkPrYEoX+VyZE IMQ+ANRwDCBUNV/SiaTJaeFLl72eDXBSFfA/T454g5kDUPWHHxouD/j0q1lPVxDYbAXR 9SJoYSIVeYNDqdMSZ1bx9sSFydFCMhyBz4JUhYS2VmZostglAcBL3pyGcOigf7n8HaD5 1cYSn5ZfclFj5OsOce0yxmFcxp98JToNiBfInmm6B1NyAVfm9lzhrd4F9qXWu/i5WFyW wHKxNY4tPi4soWICaLmiI1TpkWnpLVJ/oN6jWz4ggoIvdwVzI+DiHZKe8ZztHmXsSBGJ VLXA== X-Received: by 10.236.128.113 with SMTP id e77mr404751yhi.6.1376653431413; Fri, 16 Aug 2013 04:43:51 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.94.72 with SMTP id da8ls666275qeb.49.gmail; Fri, 16 Aug 2013 04:43:51 -0700 (PDT) X-Received: by 10.58.217.167 with SMTP id oz7mr865334vec.15.1376653431196; Fri, 16 Aug 2013 04:43:51 -0700 (PDT) Received: from mail-ve0-f175.google.com (mail-ve0-f175.google.com [209.85.128.175]) by mx.google.com with ESMTPS id n6si224769ven.41.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 16 Aug 2013 04:43:51 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.128.175 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.175; Received: by mail-ve0-f175.google.com with SMTP id oy10so1328705veb.34 for ; Fri, 16 Aug 2013 04:43:50 -0700 (PDT) X-Gm-Message-State: ALoCoQk8QQKtUoKdqQZ3BTKQqBAE+NLB31rKcpBQNhGYnCOphkg2PEnPdbKnoJwIbkNGvEVzASmV X-Received: by 10.52.0.238 with SMTP id 14mr704753vdh.3.1376653430947; Fri, 16 Aug 2013 04:43:50 -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 u4csp64093vcz; Fri, 16 Aug 2013 04:43:50 -0700 (PDT) X-Received: by 10.68.59.98 with SMTP id y2mr1111578pbq.135.1376653429920; Fri, 16 Aug 2013 04:43:49 -0700 (PDT) Received: from mail-pb0-f52.google.com (mail-pb0-f52.google.com [209.85.160.52]) by mx.google.com with ESMTPS id vs7si870430pbc.115.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 16 Aug 2013 04:43:49 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.160.52 is neither permitted nor denied by best guess record for domain of viresh.kumar@linaro.org) client-ip=209.85.160.52; Received: by mail-pb0-f52.google.com with SMTP id wz12so1902951pbc.11 for ; Fri, 16 Aug 2013 04:43:49 -0700 (PDT) X-Received: by 10.66.118.129 with SMTP id km1mr2575769pab.127.1376653429439; Fri, 16 Aug 2013 04:43:49 -0700 (PDT) Received: from localhost ([122.172.193.46]) by mx.google.com with ESMTPSA id ot4sm2906382pac.17.1969.12.31.16.00.00 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Fri, 16 Aug 2013 04:43:48 -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 02/25] tty: serial: altera: drop uart_port->lock before calling tty_flip_buffer_push() Date: Fri, 16 Aug 2013 17:13:03 +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.128.175 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_uart.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/tty/serial/altera_uart.c b/drivers/tty/serial/altera_uart.c index 1d46966..77641e7 100644 --- a/drivers/tty/serial/altera_uart.c +++ b/drivers/tty/serial/altera_uart.c @@ -231,7 +231,9 @@ static void altera_uart_rx_chars(struct altera_uart *pp) flag); } + spin_unlock(&port->lock); tty_flip_buffer_push(&port->state->port); + spin_lock(&port->lock); } static void altera_uart_tx_chars(struct altera_uart *pp)