From patchwork Fri Aug 16 11:43:14 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 19227 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-qe0-f72.google.com (mail-qe0-f72.google.com [209.85.128.72]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id EEAF4246AB for ; Fri, 16 Aug 2013 11:45:03 +0000 (UTC) Received: by mail-qe0-f72.google.com with SMTP id b10sf1879401qen.3 for ; Fri, 16 Aug 2013 04:45:03 -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=YOWWwBZVRlq+bv/jYYlk7S7ZtjdZALancZa20dmodMw=; b=pIhiVJz+vD3c/g6/HkIdajr+QhQGBq/o+/jVFmpgn/WGauxOKSTdI7kjJKf/lxq3l1 ixmYajE6QZA507+EvNxV1PKuyxGYISrkQwmv+Z5dHNovEWUfxYC2S7X+9X/07idIlW5C HXVLelpTRYIAj8eEmFjO9AmiHQ+2XK9cvAdQzYSp0baRA7PLxqoO+LAC2uV5FKzKi11z mAIave5JWz7IZc8BFBpkXZ9Cj9QtckrA3Y3/js4nELIiWdyDGqG0U5FHrrJOVZNnGpJz TSyLtPRjbcDUDeQzEk6pe3n7xIvZZ4eNoNw6JLqUwtTpBF/EpgMVPP7EeJbTz038NJDP f6fA== X-Received: by 10.236.207.103 with SMTP id m67mr415765yho.1.1376653503676; Fri, 16 Aug 2013 04:45:03 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.12.166 with SMTP id z6ls690924qeb.18.gmail; Fri, 16 Aug 2013 04:45:03 -0700 (PDT) X-Received: by 10.52.232.165 with SMTP id tp5mr730714vdc.11.1376653503554; Fri, 16 Aug 2013 04:45:03 -0700 (PDT) Received: from mail-vc0-f177.google.com (mail-vc0-f177.google.com [209.85.220.177]) by mx.google.com with ESMTPS id jf10si229339vdb.11.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 16 Aug 2013 04:45:03 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.220.177 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.177; Received: by mail-vc0-f177.google.com with SMTP id gf12so1337091vcb.36 for ; Fri, 16 Aug 2013 04:45:03 -0700 (PDT) X-Gm-Message-State: ALoCoQkpOgm/p5gfnfA9eHG7vW20rCelygQo8JEMC5be36PcyrNZ0+FHyL6OYLGDMH5GCUrTcML+ X-Received: by 10.52.233.33 with SMTP id tt1mr742088vdc.2.1376653503478; Fri, 16 Aug 2013 04:45:03 -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 u4csp64148vcz; Fri, 16 Aug 2013 04:45:02 -0700 (PDT) X-Received: by 10.68.197.104 with SMTP id it8mr1235964pbc.17.1376653502620; Fri, 16 Aug 2013 04:45:02 -0700 (PDT) Received: from mail-pa0-f47.google.com (mail-pa0-f47.google.com [209.85.220.47]) by mx.google.com with ESMTPS id xq4si1467145pab.318.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 16 Aug 2013 04:45:02 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.220.47 is neither permitted nor denied by best guess record for domain of viresh.kumar@linaro.org) client-ip=209.85.220.47; Received: by mail-pa0-f47.google.com with SMTP id kl13so1771999pab.6 for ; Fri, 16 Aug 2013 04:45:02 -0700 (PDT) X-Received: by 10.66.142.5 with SMTP id rs5mr1518244pab.168.1376653502223; Fri, 16 Aug 2013 04:45:02 -0700 (PDT) Received: from localhost ([122.172.193.46]) by mx.google.com with ESMTPSA id zv11sm2944264pab.3.1969.12.31.16.00.00 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Fri, 16 Aug 2013 04:45:01 -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 13/25] tty: serial: mcf: drop uart_port->lock before calling tty_flip_buffer_push() Date: Fri, 16 Aug 2013 17:13:14 +0530 Message-Id: <5128c7c0bba9d7626e42255ec44b8f500b65235e.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.220.177 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/mcf.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/tty/serial/mcf.c b/drivers/tty/serial/mcf.c index 65be0c0..62c8fdf 100644 --- a/drivers/tty/serial/mcf.c +++ b/drivers/tty/serial/mcf.c @@ -324,7 +324,9 @@ static void mcf_rx_chars(struct mcf_uart *pp) uart_insert_char(port, status, MCFUART_USR_RXOVERRUN, ch, flag); } + spin_unlock(&port->lock); tty_flip_buffer_push(&port->state->port); + spin_lock(&port->lock); } /****************************************************************************/