From patchwork Fri Aug 16 11:43:19 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 19232 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-vc0-f200.google.com (mail-vc0-f200.google.com [209.85.220.200]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id D22C3246AB for ; Fri, 16 Aug 2013 11:45:36 +0000 (UTC) Received: by mail-vc0-f200.google.com with SMTP id hf12sf2221657vcb.11 for ; Fri, 16 Aug 2013 04:45:36 -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=2JBVzbFUD+1au0ApdWJjb+jbWe8JhkhO9kw0GGAz8Rg=; b=YI7z97pp+ovcqSfVZW+AufKN8Cp2nDMst7OTyy+eyI8xiBE5xbox+Olb+VFcxIhhd2 O5h+JWJNmu1dyCDCMPQkGpyTB5S6x6scIUYeJ7Nmh/fR9RmJfeGDSCbrvzKHDpgOg7Ss XIobPaROshopxhvt2wdD2Sm3M9Y6rITnNouI0Dru8mmGRk5tN/5KhnjNW8aHxkBEV+C1 Rm/93Psl1wmfe4GngZbf+VunYu0XwL4UR1GkUY348aq567DdZbSh00OxK/JXj/HvKf2i 78uX0i/T4E15HR+QSMG+j036RcOPd1IRwsKcdP2hEfVUapQSSaiVwdK9RDC0aodqHLiq 8rCA== X-Received: by 10.236.189.37 with SMTP id b25mr360648yhn.48.1376653536472; Fri, 16 Aug 2013 04:45:36 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.1.38 with SMTP id 6ls719194qej.92.gmail; Fri, 16 Aug 2013 04:45:36 -0700 (PDT) X-Received: by 10.58.198.13 with SMTP id iy13mr881861vec.11.1376653536335; Fri, 16 Aug 2013 04:45:36 -0700 (PDT) Received: from mail-vb0-f48.google.com (mail-vb0-f48.google.com [209.85.212.48]) by mx.google.com with ESMTPS id vr9si215350vcb.126.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 16 Aug 2013 04:45:36 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.212.48 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.48; Received: by mail-vb0-f48.google.com with SMTP id w16so1501772vbf.7 for ; Fri, 16 Aug 2013 04:45:36 -0700 (PDT) X-Gm-Message-State: ALoCoQlNuT4lXWPN45+h/EgDaXy3LIGgKzhJBFTm7gFCKQ3vCLniOCR376l8+uJ+vnoZheC7C8j6 X-Received: by 10.220.82.9 with SMTP id z9mr881172vck.0.1376653536256; Fri, 16 Aug 2013 04:45:36 -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 u4csp64170vcz; Fri, 16 Aug 2013 04:45:35 -0700 (PDT) X-Received: by 10.66.171.204 with SMTP id aw12mr2712520pac.7.1376653535443; Fri, 16 Aug 2013 04:45:35 -0700 (PDT) Received: from mail-pa0-f52.google.com (mail-pa0-f52.google.com [209.85.220.52]) by mx.google.com with ESMTPS id if6si897758pbc.13.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 16 Aug 2013 04:45:35 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.220.52 is neither permitted nor denied by best guess record for domain of viresh.kumar@linaro.org) client-ip=209.85.220.52; Received: by mail-pa0-f52.google.com with SMTP id kq13so1771669pab.25 for ; Fri, 16 Aug 2013 04:45:35 -0700 (PDT) X-Received: by 10.68.234.165 with SMTP id uf5mr1231102pbc.41.1376653534991; Fri, 16 Aug 2013 04:45:34 -0700 (PDT) Received: from localhost ([122.172.193.46]) by mx.google.com with ESMTPSA id tr10sm1680807pbc.22.1969.12.31.16.00.00 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Fri, 16 Aug 2013 04:45:34 -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 18/25] tty: serial: nwpserial: drop uart_port->lock before calling tty_flip_buffer_push() Date: Fri, 16 Aug 2013 17:13:19 +0530 Message-Id: <31dc81fa5810c8362038e71ec8f9c1b73cc84b1d.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.212.48 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/nwpserial.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/tty/serial/nwpserial.c b/drivers/tty/serial/nwpserial.c index 549c70a..693bc6c 100644 --- a/drivers/tty/serial/nwpserial.c +++ b/drivers/tty/serial/nwpserial.c @@ -149,7 +149,10 @@ static irqreturn_t nwpserial_interrupt(int irq, void *dev_id) tty_insert_flip_char(port, ch, TTY_NORMAL); } while (dcr_read(up->dcr_host, UART_LSR) & UART_LSR_DR); + spin_unlock(&up->port.lock); tty_flip_buffer_push(port); + spin_lock(&up->port.lock); + ret = IRQ_HANDLED; /* clear interrupt */