Received: by 10.223.185.116 with SMTP id b49csp3599461wrg; Tue, 13 Feb 2018 04:57:33 -0800 (PST) X-Google-Smtp-Source: AH8x225c5I6LmAzdcLLYF6X8SIWhd8W1JlN/r/pATrTPmpgPzQVi/QrtrdzaBKfGaSZgJnrpNv/K X-Received: by 10.98.98.194 with SMTP id w185mr1178420pfb.9.1518526653584; Tue, 13 Feb 2018 04:57:33 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1518526653; cv=none; d=google.com; s=arc-20160816; b=WskXtQae82wP6mR4uNVehCxLgmmgCbOQUU1kLhl6JIuJLXeEjRSszfLP080ns8Fufh DqV6YJ9ihQUVFu9HFsrlAO/HL4wdkcB/6UEWFeVZXST+X2dIxYzGWMNdlTrCA/gZ5uhy ZwS9Pkvo3/cXCJSTKSnnD8+WcHTtKgDmm8V+feQiylgxeN19AdZ/TnGAeDngEBsE/Sj5 VAxNcLYzHeD7nmkbdFjMMaEY/4uWLa1zOu1QoWewJseRbZG47TeZpQaallWegww7hbuG vS494S32tQQj0fwkpSYcT/zPllqej36sDs5ulHNXmDstnkyMo7olhqfNXqa9ZJ4tHHnO MmZg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :references:in-reply-to:mime-version:dkim-signature :arc-authentication-results; bh=nybD7bIzo40TK7fHArBCZP1tRwEiCf27gktxkvceKY0=; b=Sm7sLk8VtFndn9r3bPhhO5iD1L6OZCJQmoL34FLzcfRotoPDgEGg5cM4yubvPA/cwD 26VmnMZ8mqD6YSTlCWXd1iy1clQJDm2DFwASoVpJZVSPC89BSDewrZkLHjANfjO60W+s YIAnoVDMPbFJ9/xJJRncHbPmdxpEaP3ZygBum48yeWC4b4h0whBu31wfX1ZMjLO4xz1N Pi9AXhQL+tyAxpNEcQV8GqN8XTm+ali8IrrNiNhFqV0KvEkEGc3bgry447SBbhRnGJOI bodvSurj/J9tVntCOLJDSnRtoQIIPew4qHk7tflTxPJPT5vPekqUGJ4xOvAkWidtYPre f5cQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=F1f/hq2G; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f91-v6si2321739plb.377.2018.02.13.04.57.19; Tue, 13 Feb 2018 04:57:33 -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=@chromium.org header.s=google header.b=F1f/hq2G; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S964795AbeBMMyy (ORCPT + 99 others); Tue, 13 Feb 2018 07:54:54 -0500 Received: from mail-ua0-f169.google.com ([209.85.217.169]:35537 "EHLO mail-ua0-f169.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S964796AbeBMMyu (ORCPT ); Tue, 13 Feb 2018 07:54:50 -0500 Received: by mail-ua0-f169.google.com with SMTP id n1so11484571uaa.2 for ; Tue, 13 Feb 2018 04:54:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=nybD7bIzo40TK7fHArBCZP1tRwEiCf27gktxkvceKY0=; b=F1f/hq2G6ZIdh6q7mPCtW82CLA3KKNedMQ9fEs539M+GvWYvgU2vEBVrk6fvTCm6aJ 7LCWK1veV5LIzL4hE6dE2wf1kQuPbK5OH7xwSP08K+xXJaNcjdXnKo+aKD6AIJlUWuY6 qCMVuJarsg9vkl27d9kO1i1qA/mnN42AbhHxM= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=nybD7bIzo40TK7fHArBCZP1tRwEiCf27gktxkvceKY0=; b=DQtpEkW9LXdY+I/OCQHYHpmSphn6whUJILYopYaI6MpwnlS4ypPG+/QTF8+oiyHXxR PkbLJo5DpvuzwGLm7OfgVIOhkMVsmzUmHX1xcuKUB+pa/axrChvpekVvAQ0mz5mNs8eb 2igFbmaKU63PLcZ66p/Q04FgvXbHT3jzxNliBg8Y49ij8juEIkqTAzaj//DKBkntzJew CoQrkkvmtP6oP1Ys9HMq5aU6jr1z58NLDbkNv5CVa3/p2ulKouPOCXni/Tmz6QElzES6 eeQI9AHSvNHoP/icmRZ4bnLu1NQJ9dXESsH81dW6JJyPDlEm55K2aCgNbF8rQ4zJLTJI CFeg== X-Gm-Message-State: APf1xPCML6m23Tn0XBtG82BtA5j+ED1L4DJJUaKSLzDEUaPTjECvHwct k4nDjcmbMFfDUMDU+dLohVjpnDG/gD4= X-Received: by 10.159.57.199 with SMTP id p7mr995057uag.1.1518526489011; Tue, 13 Feb 2018 04:54:49 -0800 (PST) Received: from mail-vk0-f53.google.com (mail-vk0-f53.google.com. [209.85.213.53]) by smtp.gmail.com with ESMTPSA id k14sm1807603vke.46.2018.02.13.04.54.47 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 13 Feb 2018 04:54:47 -0800 (PST) Received: by mail-vk0-f53.google.com with SMTP id n132so10732040vke.2 for ; Tue, 13 Feb 2018 04:54:47 -0800 (PST) X-Received: by 10.31.138.72 with SMTP id m69mr959103vkd.13.1518526486935; Tue, 13 Feb 2018 04:54:46 -0800 (PST) MIME-Version: 1.0 Received: by 10.176.0.68 with HTTP; Tue, 13 Feb 2018 04:54:26 -0800 (PST) In-Reply-To: <65d707c0-76cc-d59e-ff18-1fdd89306900@arm.com> References: <1517999482-17317-1-git-send-email-vivek.gautam@codeaurora.org> <1517999482-17317-2-git-send-email-vivek.gautam@codeaurora.org> <65d707c0-76cc-d59e-ff18-1fdd89306900@arm.com> From: Tomasz Figa Date: Tue, 13 Feb 2018 21:54:26 +0900 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v7 1/6] base: power: runtime: Export pm_runtime_get/put_suppliers To: Robin Murphy Cc: Vivek Gautam , "list@263.net:IOMMU DRIVERS" , Joerg Roedel , Rob Herring , Mark Rutland , "Rafael J. Wysocki" , Will Deacon , Rob Clark , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org, dri-devel , freedreno@lists.freedesktop.org, David Airlie , Greg KH , sboyd@codeaurora.org, linux-arm-msm@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Feb 13, 2018 at 9:00 PM, Robin Murphy wrote: > On 13/02/18 07:44, Tomasz Figa wrote: >> >> Hi Vivek, >> >> On Wed, Feb 7, 2018 at 7:31 PM, Vivek Gautam >> wrote: >>> >>> The device link allows the pm framework to tie the supplier and >>> consumer. So, whenever the consumer is powered-on the supplier >>> is powered-on first. >>> >>> There are however cases in which the consumer wants to power-on >>> the supplier, but not itself. >>> E.g., A Graphics or multimedia driver wants to power-on the SMMU >>> to unmap a buffer and finish the TLB operations without powering >>> on itself. >> >> >> This sounds strange to me. If the SMMU is powered down, wouldn't the >> TLB lose its contents as well (and so no flushing needed)? > > > Depends on implementation details - if runtime PM is actually implemented > via external clock gating (in the absence of fine-grained power domains), > then "suspended" TLBs might both retain state and not receive invalidation > requests, which is really the worst case. Agreed. That's why in "[PATCH v7 3/6] iommu/arm-smmu: Invoke pm_runtime during probe, add/remove device" I actually suggested managing clocks separately from runtime PM. At least until runtime PM framework arrives at a state, where multiple power states can be managed, i.e. full power state, clock-gated state, domain-off state. (I think I might have seen some ongoing work on this on LWN though...) > >> Other than that, what kind of hardware operations would be needed >> besides just updating the page tables from the CPU? > > > Domain attach/detach also require updating SMMU hardware state (and possibly > TLB maintenance), but don't logically require the master device itself to be > active at the time. Wouldn't this hardware state need to be reinitialized anyway after respective power domain power cycles? (In other words, hardware would only need programming if it's powered on at the moment.) Best regards, Tomasz