From patchwork Fri Aug 16 11:43:13 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 19226 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-qa0-f72.google.com (mail-qa0-f72.google.com [209.85.216.72]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 31658246AB for ; Fri, 16 Aug 2013 11:44:57 +0000 (UTC) Received: by mail-qa0-f72.google.com with SMTP id o19sf917852qap.7 for ; Fri, 16 Aug 2013 04:44:57 -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=bVD0s225Za4CPWunm0cUhnzr2Ot/SX3yYzPvFvI3o5w=; b=KwkwYhw1t7CypeBJt8reaX8UVrCa8q0IGuz6MAiEOckeAkeq/I0F0tqb6u0GhU4/PH kqQ40HPsyRmQ8rehSPAEkBwEJccKbDK8AU44IoVGFtj7MI/uAETWJO234lkkRvmzA6tC +0id7BD6hNle2bcKTTKIM8HGAtEsbbhNAfX/XkOXerQK1Se2BCwNbYi623AcvEI3tvrx sTgDOc6bHsAcrFjMKQGpTZuW3pydeWzf6cVElmWIA5mdtDidSaQpucAUEMq8zxW9zLom UVIbpXoH7r4MOy0cTztkbgzfGf2iIuDxVzu26NAUGQc/w+EYi9161eEdoVD5JmPibqUr Edag== X-Received: by 10.236.223.130 with SMTP id v2mr378389yhp.34.1376653496940; Fri, 16 Aug 2013 04:44:56 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.4.70 with SMTP id i6ls744175qei.70.gmail; Fri, 16 Aug 2013 04:44:56 -0700 (PDT) X-Received: by 10.220.88.13 with SMTP id y13mr886439vcl.20.1376653496824; Fri, 16 Aug 2013 04:44:56 -0700 (PDT) Received: from mail-vc0-f170.google.com (mail-vc0-f170.google.com [209.85.220.170]) by mx.google.com with ESMTPS id rx10si212149vdc.151.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 16 Aug 2013 04:44:56 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.220.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.220.170; Received: by mail-vc0-f170.google.com with SMTP id kw10so1395841vcb.29 for ; Fri, 16 Aug 2013 04:44:56 -0700 (PDT) X-Gm-Message-State: ALoCoQnWjBd3o49GyF699OlVr9l3KUqrv8G4rCbpwQ+8fI0QkMPBRR9LXZIdQ0/0agISv18ETzsT X-Received: by 10.58.164.101 with SMTP id yp5mr871252veb.0.1376653496749; Fri, 16 Aug 2013 04:44:56 -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 u4csp64143vcz; Fri, 16 Aug 2013 04:44:56 -0700 (PDT) X-Received: by 10.68.176.132 with SMTP id ci4mr1254951pbc.7.1376653495929; Fri, 16 Aug 2013 04:44:55 -0700 (PDT) Received: from mail-pa0-f49.google.com (mail-pa0-f49.google.com [209.85.220.49]) by mx.google.com with ESMTPS id xq4si1515834pab.86.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 16 Aug 2013 04:44:55 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.220.49 is neither permitted nor denied by best guess record for domain of viresh.kumar@linaro.org) client-ip=209.85.220.49; Received: by mail-pa0-f49.google.com with SMTP id ld10so1764049pab.8 for ; Fri, 16 Aug 2013 04:44:55 -0700 (PDT) X-Received: by 10.68.162.97 with SMTP id xz1mr1110451pbb.166.1376653495543; Fri, 16 Aug 2013 04:44:55 -0700 (PDT) Received: from localhost ([122.172.193.46]) by mx.google.com with ESMTPSA id xs1sm2935483pac.7.1969.12.31.16.00.00 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Fri, 16 Aug 2013 04:44: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 12/25] tty: serial: m32r_sio: drop uart_port->lock before calling tty_flip_buffer_push() Date: Fri, 16 Aug 2013 17:13:13 +0530 Message-Id: <6559c8ca2cb34030276b7af62b37d5b321d276f1.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.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/m32r_sio.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/tty/serial/m32r_sio.c b/drivers/tty/serial/m32r_sio.c index bb1afa0..9cd9b4e 100644 --- a/drivers/tty/serial/m32r_sio.c +++ b/drivers/tty/serial/m32r_sio.c @@ -368,7 +368,10 @@ static void receive_chars(struct uart_sio_port *up, int *status) ignore_char: *status = serial_in(up, UART_LSR); } while ((*status & UART_LSR_DR) && (max_count-- > 0)); + + spin_unlock(&up->port.lock); tty_flip_buffer_push(port); + spin_lock(&up->port.lock); } static void transmit_chars(struct uart_sio_port *up)