From patchwork Fri Aug 16 11:43:23 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 19236 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-vb0-f69.google.com (mail-vb0-f69.google.com [209.85.212.69]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 75054246AB for ; Fri, 16 Aug 2013 11:46:04 +0000 (UTC) Received: by mail-vb0-f69.google.com with SMTP id e13sf1530176vbg.0 for ; Fri, 16 Aug 2013 04:46:04 -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=UbClBZjacAy0tXp7pv6a8xfJL1WFGMeWRlh6Eb/TiI4=; b=jhOD2/JtdelauO1FYW3ORURcbmo1oQeAfQhlz2XAGcPjbIKi5RWocxzxruiFlQDEfK ZKlZSDxP/MEZeWz16naUyQ9SCrMwBvvyvLBvYCjT31E3Qodn0RYt7ba7yvYeibs0XTuI 7sVwfOwt0/Zx8kP3KHxawphq941fo5+1guhBK/Fb4pg5krRAykQ9eQlax50PNkSkWNOp Tfn7S61w+xF9Fwb3YuEF5r6zZo3DelV8rXo/m0IOD1PowiixbDTfCXlsMOsxYCuYKbv2 Jbu18YDtUmMAPUrgcOBbdBTg5M5QzIQQIsH8qBNvfBIbNKJEWWf4TyyG1KkFizWK30zs 7jPA== X-Received: by 10.236.4.69 with SMTP id 45mr390006yhi.20.1376653564215; Fri, 16 Aug 2013 04:46:04 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.35.10 with SMTP id d10ls778409qej.19.gmail; Fri, 16 Aug 2013 04:46:04 -0700 (PDT) X-Received: by 10.58.235.69 with SMTP id uk5mr877412vec.17.1376653564110; Fri, 16 Aug 2013 04:46:04 -0700 (PDT) Received: from mail-ve0-f181.google.com (mail-ve0-f181.google.com [209.85.128.181]) by mx.google.com with ESMTPS id aj7si224066vec.59.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 16 Aug 2013 04:46:04 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.128.181 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.128.181; Received: by mail-ve0-f181.google.com with SMTP id jz10so1312536veb.40 for ; Fri, 16 Aug 2013 04:46:04 -0700 (PDT) X-Gm-Message-State: ALoCoQlqPKCdqvYwCkzSAkP0KaBMAuGagwE32lsi+WpQAJurfpe0CY4xHwhvAwHUBK0XWZzFF4/C X-Received: by 10.220.145.132 with SMTP id d4mr878458vcv.9.1376653564016; Fri, 16 Aug 2013 04:46:04 -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 u4csp64185vcz; Fri, 16 Aug 2013 04:46:03 -0700 (PDT) X-Received: by 10.66.219.200 with SMTP id pq8mr2603101pac.123.1376653563153; Fri, 16 Aug 2013 04:46:03 -0700 (PDT) Received: from mail-pb0-f51.google.com (mail-pb0-f51.google.com [209.85.160.51]) by mx.google.com with ESMTPS id bo2si885751pbb.74.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 16 Aug 2013 04:46:03 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.160.51 is neither permitted nor denied by best guess record for domain of viresh.kumar@linaro.org) client-ip=209.85.160.51; Received: by mail-pb0-f51.google.com with SMTP id jt11so1891777pbb.38 for ; Fri, 16 Aug 2013 04:46:02 -0700 (PDT) X-Received: by 10.66.156.199 with SMTP id wg7mr2621775pab.81.1376653562778; Fri, 16 Aug 2013 04:46:02 -0700 (PDT) Received: from localhost ([122.172.193.46]) by mx.google.com with ESMTPSA id jf4sm1690408pbb.19.1969.12.31.16.00.00 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Fri, 16 Aug 2013 04:46:02 -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 22/25] tty: serial: samsung: drop uart_port->lock before calling tty_flip_buffer_push() Date: Fri, 16 Aug 2013 17:13:23 +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.128.181 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/samsung.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/tty/serial/samsung.c b/drivers/tty/serial/samsung.c index 376079b..275e3e0 100644 --- a/drivers/tty/serial/samsung.c +++ b/drivers/tty/serial/samsung.c @@ -249,6 +249,8 @@ s3c24xx_serial_rx_chars(int irq, void *dev_id) ufcon |= S3C2410_UFCON_RESETRX; wr_regl(port, S3C2410_UFCON, ufcon); rx_enabled(port) = 1; + spin_unlock_irqrestore(&port->lock, + flags); goto out; } continue; @@ -297,10 +299,11 @@ s3c24xx_serial_rx_chars(int irq, void *dev_id) ignore_char: continue; } + + spin_unlock_irqrestore(&port->lock, flags); tty_flip_buffer_push(&port->state->port); out: - spin_unlock_irqrestore(&port->lock, flags); return IRQ_HANDLED; }