From patchwork Fri Aug 16 11:43:04 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 19217 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ye0-f198.google.com (mail-ye0-f198.google.com [209.85.213.198]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 47BF9246AB for ; Fri, 16 Aug 2013 11:43:58 +0000 (UTC) Received: by mail-ye0-f198.google.com with SMTP id m12sf1973183yen.9 for ; Fri, 16 Aug 2013 04:43:58 -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=wZH+buirAYlBF8dPunsrM27q+8muxjW5qBTDxUn93lw=; b=On3LJc6ki5zGqlAQrA1nehCUL0+SE4IeMhO4ZDOJA5DzE59QQNrK65OQb0qHfMDY0P FNK+jgO+iW3Uq+Porh1x0kIRF9nHMiJxeFkVnvS3YXyFP/68yiFam2EwbD798XM48n6Y W+L9q+3lYePSGNb3v1QVlUELr2OGFoiF/IYGPRiM9yGbAk3cVGz2QRSH9ccgEQbG/VA4 oqa6EyZrCMhxEchuyuTMybih1cd5iKpBnDlttzwWoPtRVgfHyP0B2eBB0LKgaNNT6P8R ex3aO2AUWLTak0IGK1/rb7GlRVQ4565mPU6+zco1GwR2Y1SkGsJ2m1mCftbwo96WXMJt 1qNg== X-Received: by 10.236.7.130 with SMTP id 2mr410107yhp.4.1376653437850; Fri, 16 Aug 2013 04:43:57 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.24.194 with SMTP id w2ls250073qef.96.gmail; Fri, 16 Aug 2013 04:43:57 -0700 (PDT) X-Received: by 10.58.198.13 with SMTP id iy13mr875594vec.11.1376653437706; Fri, 16 Aug 2013 04:43:57 -0700 (PDT) Received: from mail-ve0-f170.google.com (mail-ve0-f170.google.com [209.85.128.170]) by mx.google.com with ESMTPS id xb6si216911vdb.107.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 16 Aug 2013 04:43:57 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.128.170 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.170; Received: by mail-ve0-f170.google.com with SMTP id 15so1375524vea.1 for ; Fri, 16 Aug 2013 04:43:57 -0700 (PDT) X-Gm-Message-State: ALoCoQlU5riGKX3c4lHi9Ei9iE80czsfQJvhR3Bu6f4VpBcNBaZ4CUvwTRs5GPMHf81LJz4Vs0Bx X-Received: by 10.58.201.227 with SMTP id kd3mr884547vec.14.1376653437585; Fri, 16 Aug 2013 04:43:57 -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 u4csp64098vcz; Fri, 16 Aug 2013 04:43:57 -0700 (PDT) X-Received: by 10.66.154.1 with SMTP id vk1mr2655177pab.85.1376653436803; Fri, 16 Aug 2013 04:43:56 -0700 (PDT) Received: from mail-pd0-f175.google.com (mail-pd0-f175.google.com [209.85.192.175]) by mx.google.com with ESMTPS id bk3si815988pbd.358.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 16 Aug 2013 04:43:56 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.192.175 is neither permitted nor denied by best guess record for domain of viresh.kumar@linaro.org) client-ip=209.85.192.175; Received: by mail-pd0-f175.google.com with SMTP id q10so2155873pdj.34 for ; Fri, 16 Aug 2013 04:43:56 -0700 (PDT) X-Received: by 10.66.147.9 with SMTP id tg9mr2739379pab.5.1376653436400; Fri, 16 Aug 2013 04:43:56 -0700 (PDT) Received: from localhost ([122.172.193.46]) by mx.google.com with ESMTPSA id t9sm1628806pba.46.1969.12.31.16.00.00 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Fri, 16 Aug 2013 04:43:55 -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 03/25] tty: serial: apbuart: drop uart_port->lock before calling tty_flip_buffer_push() Date: Fri, 16 Aug 2013 17:13:04 +0530 Message-Id: <5eb096b77ce72ef4bc0c2ddc07b4518bca4b88c9.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.128.170 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/apbuart.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/tty/serial/apbuart.c b/drivers/tty/serial/apbuart.c index 6331464d..de11ab8 100644 --- a/drivers/tty/serial/apbuart.c +++ b/drivers/tty/serial/apbuart.c @@ -125,7 +125,9 @@ static void apbuart_rx_chars(struct uart_port *port) status = UART_GET_STATUS(port); } + spin_unlock(&port->lock); tty_flip_buffer_push(&port->state->port); + spin_lock(&port->lock); } static void apbuart_tx_chars(struct uart_port *port)