From patchwork Fri Aug 16 11:43:08 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 19221 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ve0-f200.google.com (mail-ve0-f200.google.com [209.85.128.200]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id DFDAB246AB for ; Fri, 16 Aug 2013 11:44:23 +0000 (UTC) Received: by mail-ve0-f200.google.com with SMTP id oz10sf2330864veb.11 for ; Fri, 16 Aug 2013 04:44:23 -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=Vd692V40bdyOBzp0WHtR9Nf944Dse3r/vSzuXA35TR8=; b=KJAC3WmaU89Vp7Mmu0k6rAUGHaEWu5Ot5dk5oCiP3yVxlpY3GJ8uab66rOYuYKcUFX OMuaxoroVx2Ii4DoknT9x/INp0UzBMFFNwvectgde12a021TiYSjviMWj0rWN+e2QQqB z1UCFFzYXbfrpVqCpZwlv147K4qYUP9DGxZahX7T3RGG1c6uZZbDXm6fd0zoksBwgZuq /uMYj3IYf9m7ym2MrQIQE3RopMjI4MMjxgn8xQTQLUZrMIG/g3VbcQtgUbEGM2P0YFrQ qKCPNdpIelldwd28unjwn26jjMChCAqhHUTLEmw3sBtOdgZAj9wbncHk4nrJcJvq9w3d u5ZA== X-Received: by 10.236.46.72 with SMTP id q48mr381082yhb.30.1376653463646; Fri, 16 Aug 2013 04:44:23 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.0.137 with SMTP id 9ls761827qee.37.gmail; Fri, 16 Aug 2013 04:44:23 -0700 (PDT) X-Received: by 10.52.24.4 with SMTP id q4mr706220vdf.6.1376653463558; Fri, 16 Aug 2013 04:44:23 -0700 (PDT) Received: from mail-vb0-f50.google.com (mail-vb0-f50.google.com [209.85.212.50]) by mx.google.com with ESMTPS id b5si223129vcf.54.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 16 Aug 2013 04:44:23 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.212.50 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.50; Received: by mail-vb0-f50.google.com with SMTP id x14so1508533vbb.37 for ; Fri, 16 Aug 2013 04:44:23 -0700 (PDT) X-Gm-Message-State: ALoCoQkVm6dNZYf9kwZrYHKtKFbSSh5Gizfcpu0W1drrza28fxLyMqhITkAQ9h9V7ejdWS3zgiKJ X-Received: by 10.52.0.52 with SMTP id 20mr724597vdb.22.1376653463485; Fri, 16 Aug 2013 04:44:23 -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 u4csp64116vcz; Fri, 16 Aug 2013 04:44:23 -0700 (PDT) X-Received: by 10.66.232.8 with SMTP id tk8mr2641278pac.121.1376653462634; Fri, 16 Aug 2013 04:44:22 -0700 (PDT) Received: from mail-pd0-f182.google.com (mail-pd0-f182.google.com [209.85.192.182]) by mx.google.com with ESMTPS id mp5si830021pbc.303.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 16 Aug 2013 04:44:22 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.192.182 is neither permitted nor denied by best guess record for domain of viresh.kumar@linaro.org) client-ip=209.85.192.182; Received: by mail-pd0-f182.google.com with SMTP id r10so2147028pdi.41 for ; Fri, 16 Aug 2013 04:44:22 -0700 (PDT) X-Received: by 10.68.212.106 with SMTP id nj10mr1180008pbc.74.1376653462246; Fri, 16 Aug 2013 04:44:22 -0700 (PDT) Received: from localhost ([122.172.193.46]) by mx.google.com with ESMTPSA id ht5sm1661717pbb.29.1969.12.31.16.00.00 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Fri, 16 Aug 2013 04:44:21 -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 07/25] tty: serial: bfin_sport: drop uart_port->lock before calling tty_flip_buffer_push() Date: Fri, 16 Aug 2013 17:13:08 +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.212.50 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/bfin_sport_uart.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/tty/serial/bfin_sport_uart.c b/drivers/tty/serial/bfin_sport_uart.c index 487c173..32d3926 100644 --- a/drivers/tty/serial/bfin_sport_uart.c +++ b/drivers/tty/serial/bfin_sport_uart.c @@ -161,11 +161,12 @@ static irqreturn_t sport_uart_rx_irq(int irq, void *dev_id) if (!uart_handle_sysrq_char(&up->port, ch)) tty_insert_flip_char(port, ch, TTY_NORMAL); } - /* XXX this won't deadlock with lowlat? */ - tty_flip_buffer_push(port); spin_unlock(&up->port.lock); + /* XXX this won't deadlock with lowlat? */ + tty_flip_buffer_push(port); + return IRQ_HANDLED; }