Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp10070imm; Mon, 1 Oct 2018 05:59:03 -0700 (PDT) X-Google-Smtp-Source: ACcGV61wWs3FqOXPNCiZSx5pEiKFxFXLeormOYTOE974rp3waLcoUqia9NlIhCWBsHjCVmFGSe4a X-Received: by 2002:a62:4586:: with SMTP id n6-v6mr4564844pfi.3.1538398743641; Mon, 01 Oct 2018 05:59:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1538398743; cv=none; d=google.com; s=arc-20160816; b=eU7eOYRfVAAaMGILpkO8nJwgZfyHb2SezwUchGD2K1WmRWv7xJDU+Ma5HcVUx4lSlR iM9fuOB8F+PaAN+CVm8vv0Yz+qRnWZIOy4a+mb1yKOiGpZfU4r2jZVZr1hdxS7tgjw77 c96oDRorrDXr4Z65sK/O8n3Nwzt0J+kwBOt/m+4iWtE6SQoM8lc2ICJSEm1ObvLcZD8u Rs68oNr84R002Iq+WotnHdK12V43RtBMjNvL9cQ18Ca3kekYUr3+R+VbCR9hg/FSthCn CuwbAzyGKLCTFBFlWbyAkCWBrfKBviA4Z13LmAbY+lQCvb4A5i7xLrYV7nJ1GubTOkP6 HRyA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=YvDjRkC1nT2z2Zh9FOkdfqljfIi7uRy0AUkGUUhVsBI=; b=EHBFI0E19ewFeUHhj6qjfir9kwmus9DDKMhjrNZaxY7GlOst3IKM87Fo0o1+BQzaRo ui3xW8BeDF/eBZAyrRozHAzMAuxZtf3bN5BAgiLhHS/F32IJvWyBDaMFxgfOntD0OUQO XYuRbTs+7oxgMWbxlpyqKgeZ3zYLL/TNrtGBd8RqjN1WKJKkAwOUS2uqRi4mbJlWFyfN npjpBzXNIG0pcgLTsio+G+oexe6lEaGNJRFN0MjYcqjvBD2H+TMjjN7OUVB7ilZV7Ilu 4sTZ7w+kozDfOivOGcveIgXL7kZ9cBPCSuQYCkzhPgjPB8ADcKUbxB3Oy2UpCsihEPOr Qv/w== ARC-Authentication-Results: i=1; mx.google.com; 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 j6-v6si11612231pgb.62.2018.10.01.05.58.49; Mon, 01 Oct 2018 05:59:03 -0700 (PDT) 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; 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 S1729319AbeJATgP (ORCPT + 99 others); Mon, 1 Oct 2018 15:36:15 -0400 Received: from usa-sjc-mx-foss1.foss.arm.com ([217.140.101.70]:48444 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729124AbeJATgP (ORCPT ); Mon, 1 Oct 2018 15:36:15 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 661AF7A9; Mon, 1 Oct 2018 05:58:32 -0700 (PDT) Received: from edgewater-inn.cambridge.arm.com (usa-sjc-imap-foss1.foss.arm.com [10.72.51.249]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 3555B3F5A0; Mon, 1 Oct 2018 05:58:32 -0700 (PDT) Received: by edgewater-inn.cambridge.arm.com (Postfix, from userid 1000) id CFBA01AE3C57; Mon, 1 Oct 2018 13:58:55 +0100 (BST) Date: Mon, 1 Oct 2018 13:58:55 +0100 From: Will Deacon To: Vivek Gautam Cc: joro@8bytes.org, robh+dt@kernel.org, robin.murphy@arm.com, iommu@lists.linux-foundation.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, alex.williamson@redhat.com, mark.rutland@arm.com, rjw@rjwysocki.net, robdclark@gmail.com, linux-pm@vger.kernel.org, freedreno@lists.freedesktop.org, sboyd@kernel.org, tfiga@chromium.org, jcrouse@codeaurora.org, sricharan@codeaurora.org, m.szyprowski@samsung.com, architt@codeaurora.org, linux-arm-msm@vger.kernel.org Subject: Re: [PATCH v16 2/5] iommu/arm-smmu: Invoke pm_runtime during probe, add/remove device Message-ID: <20181001125854.GB31488@arm.com> References: <20180830144541.17740-1-vivek.gautam@codeaurora.org> <20180830144541.17740-3-vivek.gautam@codeaurora.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180830144541.17740-3-vivek.gautam@codeaurora.org> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Vivek, On Thu, Aug 30, 2018 at 08:15:38PM +0530, Vivek Gautam wrote: > From: Sricharan R > > The smmu device probe/remove and add/remove master device callbacks > gets called when the smmu is not linked to its master, that is without > the context of the master device. So calling runtime apis in those places > separately. > Global locks are also initialized before enabling runtime pm as the > runtime_resume() calls device_reset() which does tlb_sync_global() > that ultimately requires locks to be initialized. > > Signed-off-by: Sricharan R > [vivek: Cleanup pm runtime calls] > Signed-off-by: Vivek Gautam > Reviewed-by: Tomasz Figa > Tested-by: Srinivas Kandagatla > --- > drivers/iommu/arm-smmu.c | 89 +++++++++++++++++++++++++++++++++++++++++++----- > 1 file changed, 81 insertions(+), 8 deletions(-) This doesn't apply on my tree[1], possibly because I've got Robin's non-strict invalidation queued there. However, that got me thinking -- how does this work in conjunction with the timer-based TLB invalidation? Do we need to rpm_{get,put} around flush_iotlb_all()? If so, do we still need the calls in map/unmap when non-strict mode is in use? Will [1] https://git.kernel.org/pub/scm/linux/kernel/git/will/linux.git/log/?h=for-joerg/arm-smmu/updates