Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp2416205ybl; Thu, 19 Dec 2019 13:16:53 -0800 (PST) X-Google-Smtp-Source: APXvYqz9luAYX//80rnvnP2kkQLm4tcxpeegM/TJc13R20IXPPvkS1Ze1Lt0L9AmI2PlAJkaf3WO X-Received: by 2002:a9d:7b4a:: with SMTP id f10mr11479069oto.4.1576790213901; Thu, 19 Dec 2019 13:16:53 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1576790213; cv=none; d=google.com; s=arc-20160816; b=GYGba+iKy741jHQYufgF8slDRk354b8/Lly1r7Q5wbor+WLKy5xQ8FqrmmOzM/vF42 V/mZm/Bw9/T7qhRhJxS0yGVYwnb0VE6Q4Utx6PjOh955fwcYJqeckeSYuizQH9JOfGjg t7n+tJsFvGu4C1gcPjxekWSN5AaPjsR+TRAgHkuIX4u+PqmJ6CwZ2ROSyxBPcJJRsxlw usnuUR+B6+gtaQlg9v1E7H7m4qykoFHwHLMBV7wYzlT7TVXXyOhdCvqfSd+AM8/+nRlP A7PS1FOxozHzheeJTolFkwBbTksqXsO9C/LJvzFAn7jOsoZwSaWFFN5ekB455gzzybil zC9g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:subject:cc:to:from:date:references :in-reply-to:message-id:mime-version:user-agent:dkim-signature :dkim-signature; bh=V2Hao+J1GkYhnxb5ys8W85uWd1oQYMDNDs9XruetUIo=; b=JeA68eZS1N84b5QRF24Lf02CLqhe2Rto9jm+uZeT3dFnB2S1v3pP+ii8MeWE8bp+/n az2UEVsGD9bllOrdn1OFqemf6YTTrIF3P7L1EXPQUbMZSeqhtJJbJeNL55S11Ox0WWB/ 5Gnq91VM32tC5Mo7y384pqiybuYEFO0WDchsKzkSbvy4EfSSSvqhwumaNekK6Kn5YGRt 1AAVC/7/qCz6YQzGkPPvLyDxj3tmVsy+8z+CpDHiHLMM6xJju7Tq0S4ifMB6f4f7urej zI3Jd/ac+ZATVqSAa4Un7wgt9/jMdTGuEeuBqgG5C5CHx3DDo2JIVNl0tvhZf1wgbJvr EkXg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@aj.id.au header.s=fm1 header.b=ji6ukp7g; dkim=pass header.i=@messagingengine.com header.s=fm1 header.b=U8piGZ34; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v14si3715276oto.127.2019.12.19.13.16.42; Thu, 19 Dec 2019 13:16:53 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@aj.id.au header.s=fm1 header.b=ji6ukp7g; dkim=pass header.i=@messagingengine.com header.s=fm1 header.b=U8piGZ34; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727217AbfLSVOi (ORCPT + 99 others); Thu, 19 Dec 2019 16:14:38 -0500 Received: from out2-smtp.messagingengine.com ([66.111.4.26]:43121 "EHLO out2-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726908AbfLSVOi (ORCPT ); Thu, 19 Dec 2019 16:14:38 -0500 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.nyi.internal (Postfix) with ESMTP id 42FF32263C; Thu, 19 Dec 2019 16:14:37 -0500 (EST) Received: from imap2 ([10.202.2.52]) by compute4.internal (MEProxy); Thu, 19 Dec 2019 16:14:37 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aj.id.au; h= mime-version:message-id:in-reply-to:references:date:from:to:cc :subject:content-type; s=fm1; bh=V2Hao+J1GkYhnxb5ys8W85uWd1oQYMD NDs9XruetUIo=; b=ji6ukp7gQRqpBg28UjFL7cM6qfmkQkdTmM85YWc7NeAvZfm xoUkiIvFjEw37nLotwu1J7IR8Z4DCUS6W7Xcan33XMhP3lyh00zRzP7z8gg0nx4N 2y+tuyxjJ3Mn5ujOuGVF/uFplRP97k18eg0dLIpv5DgGDB8OGsx1mXhfukR+wRel +dIWdlMF4+zoKUZEIrBo5YmfEyQvVBn14X+4jZ74U0PL/PM9H7QjJNFTMytrTcqe +7/uQg57T3S2+/mLLvPkh2DGB6OBY+WX/aV647gUkRWPlgC2ZM7JqAIiIQz76WOx nHWx9awvNa9+HJtQ1fETalNMQES9tVdsmCr5MCg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; bh=V2Hao+ J1GkYhnxb5ys8W85uWd1oQYMDNDs9XruetUIo=; b=U8piGZ34pLofpF3dhgwphE YMEE3v+6/8++EL56tNDbqsZBhWsnEQL7LULEJRufdn42g4sUs9ykPn23fR95orgI IuGcyeKVFxM7ffYrXFme18FDqVrEKqXPrJRtTeUUvzIE+swZ49yfubPMlhD4eDOb d+AdRo/30NBzsNVEpww94VnX1AhgKB9lC+3QKPUG9n0IxrBUwjMeMu6h8/WEti+r fRFpOXMGCz3nN13COw7kk+N91nurDyyqsLd1BH+kQj2N/uFsVrRfpNm/z4NPKPFn TqPTvzC7lkkL9TW20mmxwtEiTDpluFVK5WbqSsJx5gsa9JMPgTRnJmo0Z/2Kw1hA == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedufedrvdduuddgudeghecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpefofgggkfgjfhffhffvufgtsehttdertderredtnecuhfhrohhmpedftehn ughrvgifucflvghffhgvrhihfdcuoegrnhgurhgvfiesrghjrdhiugdrrghuqeenucfrrg hrrghmpehmrghilhhfrhhomheprghnughrvgifsegrjhdrihgurdgruhenucevlhhushht vghrufhiiigvpedt X-ME-Proxy: Received: by mailuser.nyi.internal (Postfix, from userid 501) id 089F4E00A3; Thu, 19 Dec 2019 16:14:36 -0500 (EST) X-Mailer: MessagingEngine.com Webmail Interface User-Agent: Cyrus-JMAP/3.1.7-694-gd5bab98-fmstable-20191218v1 Mime-Version: 1.0 Message-Id: <700f857c-0d99-4e7e-a969-191c5afd10f8@www.fastmail.com> In-Reply-To: <22d81b7d-4f1c-30b9-e895-1f38a862462e@linux.ibm.com> References: <1576681778-18737-1-git-send-email-eajames@linux.ibm.com> <1576681778-18737-8-git-send-email-eajames@linux.ibm.com> <22d81b7d-4f1c-30b9-e895-1f38a862462e@linux.ibm.com> Date: Fri, 20 Dec 2019 07:46:18 +1030 From: "Andrew Jeffery" To: "Eddie James" , linux-aspeed@lists.ozlabs.org Cc: linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, mark.rutland@arm.com, "Jason Cooper" , "Marc Zyngier" , "Rob Herring" , tglx@linutronix.de, "Joel Stanley" Subject: Re: [PATCH v3 07/12] soc: aspeed: xdma: Add user interface Content-Type: text/plain Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 20 Dec 2019, at 02:30, Eddie James wrote: > > On 12/18/19 7:19 PM, Andrew Jeffery wrote: > > > > On Thu, 19 Dec 2019, at 01:39, Eddie James wrote: > >> + mutex_unlock(&ctx->file_lock); > >> + return -EBUSY; > >> + } > >> + } else { > >> + mutex_lock(&ctx->file_lock); > >> + > >> + rc = wait_event_interruptible(ctx->wait, !ctx->current_client); > >> + if (rc) { > >> + mutex_unlock(&ctx->file_lock); > >> + return -EINTR; > >> + } > >> + } > >> + > >> + aspeed_xdma_start(ctx, &op, client->phys, client); > >> + > >> + mutex_unlock(&ctx->file_lock); > > Shouldn't we lift start_lock out of aspeed_xdma_start() use that here > > instead of file_lock? I think that would mean that we could remove > > file_lock. > > > That wouldn't work with the reset though. The reset should hold > start_lock as well, but if a client is waiting here with start_lock, > we'd never get to the reset if the transfer doesn't complete. I think > file_lock is necessary. Hmm, let me think about this some more. Andrew