From patchwork Fri Aug 16 11:43:05 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 19218 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ye0-f200.google.com (mail-ye0-f200.google.com [209.85.213.200]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id A344C246AB for ; Fri, 16 Aug 2013 11:44:04 +0000 (UTC) Received: by mail-ye0-f200.google.com with SMTP id r14sf1065684yen.7 for ; Fri, 16 Aug 2013 04:44: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=xMYuvgoonRQVap+DG2ENhkLSEB9XXy+t25nXkCjfADQ=; b=N/aTG1Rr9FlAU6eHZw72Jh2aGOCLw8ZceTpNrZ2d5y8+JJZACR2rt4sbBoCOU0uo/P 4aZFhv0VxXmCOhv5mlhwMjbLq9GefwLkXEaZna8bgSq1ziZjRHjqpSl5dBA7qqFIQAeN ZRafaErxCBWDwydLQk7WWM0OJF8j6aq5lgDSQDXfZNeKQeKpNyALi282hVux7yzb3zH1 7fYltlw5rU21c+9UJlJjZbCZ5H4btIRRkfAMMY2kZdrsSMfTax9fFu/nSMSAeK4kUL6S 8gSU6KZfk3CLaFybY7TdDY4tHMQBsbDC+iTvbSWCyfZj/Vq3hl9bjefkJrMQaPP29Gvs JNnw== X-Received: by 10.236.6.134 with SMTP id 6mr428914yhn.7.1376653444416; Fri, 16 Aug 2013 04:44:04 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.1.38 with SMTP id 6ls718998qej.92.gmail; Fri, 16 Aug 2013 04:44:04 -0700 (PDT) X-Received: by 10.58.67.9 with SMTP id j9mr879914vet.22.1376653444308; Fri, 16 Aug 2013 04:44:04 -0700 (PDT) Received: from mail-vb0-f53.google.com (mail-vb0-f53.google.com [209.85.212.53]) by mx.google.com with ESMTPS id dh7si225114vcb.38.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 16 Aug 2013 04:44:04 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.212.53 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.53; Received: by mail-vb0-f53.google.com with SMTP id i3so1492367vbh.26 for ; Fri, 16 Aug 2013 04:44:04 -0700 (PDT) X-Gm-Message-State: ALoCoQm3oZHvta+qBCAEGV2ST5+jqHZW9dzbUilObNFdDEgJZHODpJ6cJ3fK7/rR79ar6uLMm7+3 X-Received: by 10.52.233.33 with SMTP id tt1mr739090vdc.2.1376653444226; Fri, 16 Aug 2013 04:44: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 u4csp64103vcz; Fri, 16 Aug 2013 04:44:03 -0700 (PDT) X-Received: by 10.67.5.69 with SMTP id ck5mr2678666pad.76.1376653443334; Fri, 16 Aug 2013 04:44:03 -0700 (PDT) Received: from mail-pd0-f178.google.com (mail-pd0-f178.google.com [209.85.192.178]) by mx.google.com with ESMTPS id bv1si871170pbb.114.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 16 Aug 2013 04:44:03 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.192.178 is neither permitted nor denied by best guess record for domain of viresh.kumar@linaro.org) client-ip=209.85.192.178; Received: by mail-pd0-f178.google.com with SMTP id w10so2163060pde.9 for ; Fri, 16 Aug 2013 04:44:02 -0700 (PDT) X-Received: by 10.68.20.200 with SMTP id p8mr1141674pbe.122.1376653442890; Fri, 16 Aug 2013 04:44:02 -0700 (PDT) Received: from localhost ([122.172.193.46]) by mx.google.com with ESMTPSA id bg3sm1635465pbb.44.1969.12.31.16.00.00 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Fri, 16 Aug 2013 04:44: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 04/25] tty: serial: ar933x: drop uart_port->lock before calling tty_flip_buffer_push() Date: Fri, 16 Aug 2013 17:13:05 +0530 Message-Id: <01a12270dacf3d7f36a1db31dc5883593b11d5a7.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.53 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/ar933x_uart.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/tty/serial/ar933x_uart.c b/drivers/tty/serial/ar933x_uart.c index 27f20c5..964ca90 100644 --- a/drivers/tty/serial/ar933x_uart.c +++ b/drivers/tty/serial/ar933x_uart.c @@ -322,7 +322,9 @@ static void ar933x_uart_rx_chars(struct ar933x_uart_port *up) tty_insert_flip_char(port, ch, TTY_NORMAL); } while (max_count-- > 0); + spin_unlock(&up->port.lock); tty_flip_buffer_push(port); + spin_lock(&up->port.lock); } static void ar933x_uart_tx_chars(struct ar933x_uart_port *up)