From patchwork Fri Aug 16 11:43:22 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 19235 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-qe0-f69.google.com (mail-qe0-f69.google.com [209.85.128.69]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 52BBD246AB for ; Fri, 16 Aug 2013 11:45:58 +0000 (UTC) Received: by mail-qe0-f69.google.com with SMTP id 1sf2162595qec.8 for ; Fri, 16 Aug 2013 04:45: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=/BHWSSGsTLF/Fxs/L09ONUjoHZgfhQ+FgIdZ0+jhGRM=; b=nZ6jKZ+3Bpq7oEhANUL/a516WwIzTFSnrclqMhO5LDoMbl583Q0bfIp1zUW27pEOYz OiwdJg2KUfnM1CfBJET19LTUqWxIftambBGifKXy5gOD2QUCs+eHHCwTTzIL2/1Y80jt QlkFj9IMfvwBMZHmXz8u86AxSpXm9vhBaDdRFp9LkRfSojcE1CLmguU5GBP+kRXyv7GQ pzPf64IHTvol+eVP8FX6+79YxGBY5UEkzZa/FeLAY8toK625I/HH8r8cimGxsvmVfXGp N3FMACV1ihMgwKFfpYXVEjbCSQAfKW7tcKxFNT92ihS9ibVLKtToTgfYx0b5BbP1Ji2J 34Tg== X-Received: by 10.236.176.134 with SMTP id b6mr368075yhm.46.1376653558115; Fri, 16 Aug 2013 04:45:58 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.49.42 with SMTP id r10ls689662qen.86.gmail; Fri, 16 Aug 2013 04:45:57 -0700 (PDT) X-Received: by 10.58.165.70 with SMTP id yw6mr880785veb.19.1376653557932; Fri, 16 Aug 2013 04:45:57 -0700 (PDT) Received: from mail-vc0-f173.google.com (mail-vc0-f173.google.com [209.85.220.173]) by mx.google.com with ESMTPS id u5si217451vet.114.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 16 Aug 2013 04:45:57 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.220.173 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.173; Received: by mail-vc0-f173.google.com with SMTP id id13so1339046vcb.4 for ; Fri, 16 Aug 2013 04:45:57 -0700 (PDT) X-Gm-Message-State: ALoCoQkqq4LKuFi+6q52B6TAqRS8lHqOx7aqRjWNHYCcCkoHLpZLi7f5m3ZwMLre/Bz/56iNBtcv X-Received: by 10.220.249.67 with SMTP id mj3mr870549vcb.23.1376653557831; Fri, 16 Aug 2013 04:45: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 u4csp64180vcz; Fri, 16 Aug 2013 04:45:57 -0700 (PDT) X-Received: by 10.68.253.138 with SMTP id aa10mr1233605pbd.24.1376653557029; Fri, 16 Aug 2013 04:45:57 -0700 (PDT) Received: from mail-pb0-f50.google.com (mail-pb0-f50.google.com [209.85.160.50]) by mx.google.com with ESMTPS id zr1si888739pbc.60.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 16 Aug 2013 04:45:57 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.160.50 is neither permitted nor denied by best guess record for domain of viresh.kumar@linaro.org) client-ip=209.85.160.50; Received: by mail-pb0-f50.google.com with SMTP id uo5so1905669pbc.37 for ; Fri, 16 Aug 2013 04:45:56 -0700 (PDT) X-Received: by 10.66.161.229 with SMTP id xv5mr2682961pab.87.1376653556656; Fri, 16 Aug 2013 04:45:56 -0700 (PDT) Received: from localhost ([122.172.193.46]) by mx.google.com with ESMTPSA id sz3sm1708372pbc.5.1969.12.31.16.00.00 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Fri, 16 Aug 2013 04:45:56 -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 21/25] tty: serial: sa1100: drop uart_port->lock before calling tty_flip_buffer_push() Date: Fri, 16 Aug 2013 17:13:22 +0530 Message-Id: <671359265468f44ee9fe9fc263ba737a918508d4.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.173 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/sa1100.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/tty/serial/sa1100.c b/drivers/tty/serial/sa1100.c index af6b3e3..28d60ef 100644 --- a/drivers/tty/serial/sa1100.c +++ b/drivers/tty/serial/sa1100.c @@ -232,7 +232,10 @@ sa1100_rx_chars(struct sa1100_port *sport) status = UTSR1_TO_SM(UART_GET_UTSR1(sport)) | UTSR0_TO_SM(UART_GET_UTSR0(sport)); } + + spin_unlock(&sport->port.lock); tty_flip_buffer_push(&sport->port.state->port); + spin_lock(&sport->port.lock); } static void sa1100_tx_chars(struct sa1100_port *sport)