Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp3665673imm; Mon, 20 Aug 2018 02:38:37 -0700 (PDT) X-Google-Smtp-Source: AA+uWPxsI18GUOZ8e5ncWwg2hp4he5h5KJudFbjvgwPbVagtTGQHg/jFXWvEhsjRNcHYKGyzsNeK X-Received: by 2002:a17:902:9a47:: with SMTP id x7-v6mr32069047plv.37.1534757917199; Mon, 20 Aug 2018 02:38:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1534757917; cv=none; d=google.com; s=arc-20160816; b=pXHhtYdC2LlHRezSsbozn6RINFeZ4KxPvWv+qgk7GdKPBui6OeE86jTbbDsRAtnnkd cwZgJMOh3T8QxvmfvYsYPlUtlYLEejUSzYOjTSobAqVMtIucos4v+fR7PENW+5Dg14Wa 0F/0AgIACcLGGdNXi++2oH2sS7+100Fi4BlevnOAXQ736OJZeEI6QhwRPYd/HrQDjlSh BnCpIXZwLPw1YfdppmO2w/sJ7Tmd2UnJzQzeqkiWEdRzILLGq3/6dIUNTJLOJFcH9bDf MgHGG7bQdxiO2CC5+nTfAce93R+awuOBib6CDtDhzsfDd+6a+ZHZgF11mnFosjkF2A0/ Dfyg== 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 :in-reply-to:references:mime-version:dkim-signature :arc-authentication-results; bh=IpR7X0cMcSd9QTtBZD/OgxGKK+yYoZT/jF4ELA5luSg=; b=gBZTnMzGvnSO6DfhI/W2xToPmfhSVDVJPvnbYB18Z8isbhgQszfhUVShLpc3QPTluX a/dyswpcOCHc6wnkdLw9uWtqhPcx7YSptluD2zaHsJAZx6S2A6xmHWiWrDNdq3HPFaQo gZMS8tvrARAA4ipDuE6iaIeMgxy+ZEpW0s54rpPesaDWWNhlN8T9pY88dccKqdJ/x8gq eM1wRZY3HaeL1R4lEBY9r2wDRWRIrD+MAgwOTJxOOpLc/N8i2QVG3i+Qw+8RFL77bj7P u+6KTRhU4GAku7J8VD+fq9MARQ30RlPG6xBi9VdRdxJIDcWjlZkUyh9ychwsJ4W3huQK AFqQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=gsHF9ZWI; 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 v3-v6si9315872plp.85.2018.08.20.02.38.22; Mon, 20 Aug 2018 02:38:37 -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; dkim=pass header.i=@chromium.org header.s=google header.b=gsHF9ZWI; 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 S1726333AbeHTMwD (ORCPT + 99 others); Mon, 20 Aug 2018 08:52:03 -0400 Received: from mail-yb0-f195.google.com ([209.85.213.195]:38683 "EHLO mail-yb0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726024AbeHTMwD (ORCPT ); Mon, 20 Aug 2018 08:52:03 -0400 Received: by mail-yb0-f195.google.com with SMTP id c1-v6so2677591ybq.5 for ; Mon, 20 Aug 2018 02:37:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=IpR7X0cMcSd9QTtBZD/OgxGKK+yYoZT/jF4ELA5luSg=; b=gsHF9ZWIx2uS69taxUsPm0F0he2hvAUUNdDzcrpUAckls86G2EEluNWJ3eEBbDuFVd kJNNDqdgshYYgYWGR24ufwIyLwaZ5LAvaQW+a55kRGB7PIenozkH5jetxPWt8rprbABn pVUnVJqTXb2B/pTEx4wpmRdQqo+XWNZd/5mGQ= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=IpR7X0cMcSd9QTtBZD/OgxGKK+yYoZT/jF4ELA5luSg=; b=PvwCeeQVcKBR2qXRi65cGnbqwJrGOq/iyWVTRriyKvmmYqBBwV+AkBUY7+lE0PC2Dz Y7jQePfRs9EyR//p8vawwVwompfzrZ5E2Qyg7/YXWFKcmgV6991GlkoLVdQ5zbiSobKg eM8JIWXCwJ3TuWJ3/bxVZfRxS4rft4BxPFmZYlvpI4SKUIDXsqNQY65/eKSLPPel4Ve2 QDlEIH9Oks7gGCMR5poJfDJNty+iE56D2Gccxg4jjtLxCJs17sQDywg4BG45XmjGBpyc Syo8+vxrdPGw3xqIcbxv/w7qHBKvfIplnmh+Ax6olGwY8zH0fgBMAxEEAYy02uHyqAxd zPNg== X-Gm-Message-State: AOUpUlGKJddQdsVpGCeHetuIFUFHZGH1YQ7SEbdppcvK+uuAvzKThznr LHEPsPr2ZCfZ9Jx6Mqgub9NPtBIFNnDeoA== X-Received: by 2002:a25:4d89:: with SMTP id a131-v6mr24465361ybb.452.1534757828771; Mon, 20 Aug 2018 02:37:08 -0700 (PDT) Received: from mail-yb0-f179.google.com (mail-yb0-f179.google.com. [209.85.213.179]) by smtp.gmail.com with ESMTPSA id o204-v6sm5318920ywd.16.2018.08.20.02.37.08 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 20 Aug 2018 02:37:08 -0700 (PDT) Received: by mail-yb0-f179.google.com with SMTP id v13-v6so2880270ybq.12 for ; Mon, 20 Aug 2018 02:37:08 -0700 (PDT) X-Received: by 2002:a25:3486:: with SMTP id b128-v6mr14267850yba.373.1534757474847; Mon, 20 Aug 2018 02:31:14 -0700 (PDT) MIME-Version: 1.0 References: <20180727070224.23966-1-vivek.gautam@codeaurora.org> In-Reply-To: <20180727070224.23966-1-vivek.gautam@codeaurora.org> From: Tomasz Figa Date: Mon, 20 Aug 2018 18:31:03 +0900 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v14 0/4] iommu/arm-smmu: Add runtime pm/sleep support To: Robin Murphy Cc: "list@263.net:IOMMU DRIVERS , Joerg Roedel ," , Rob Herring , Vivek Gautam , "Rafael J. Wysocki" , Will Deacon , "list@263.net:IOMMU DRIVERS , Joerg Roedel ," , devicetree@vger.kernel.org, Linux Kernel Mailing List , freedreno , Alex Williamson , Mark Rutland , Rob Clark , Linux PM , sboyd@kernel.org, jcrouse@codeaurora.org, Sricharan R , Marek Szyprowski , Archit Taneja , linux-arm-msm 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 Hi Robin, On Fri, Jul 27, 2018 at 4:02 PM Vivek Gautam wrote: > > This series provides the support for turning on the arm-smmu's > clocks/power domains using runtime pm. This is done using > device links between smmu and client devices. The device link > framework keeps the two devices in correct order for power-cycling > across runtime PM or across system-wide PM. > > With addition of a new device link flag DL_FLAG_AUTOREMOVE_SUPPLIER [8] > (available in linux-next of Rafael's linux-pm tree [9]), the device links > created between arm-smmu and its clients will be automatically purged > when arm-smmu driver unbinds from its device. > > As not all implementations support clock/power gating, we are checking > for a valid 'smmu->dev's pm_domain' to conditionally enable the runtime > power management for such smmu implementations that can support it. > Otherwise, the clocks are turned to be always on in .probe until .remove. > With conditional runtime pm now, we avoid touching dev->power.lock > in fastpaths for smmu implementations that don't need to do anything > useful with pm_runtime. > This lets us to use the much-argued pm_runtime_get_sync/put_sync() > calls in map/unmap callbacks so that the clients do not have to > worry about handling any of the arm-smmu's power. > > This series also adds support for Qcom's arm-smmu-v2 variant that > has different clocks and power requirements. > > Previous version of this patch series is @ [2]. > > Tested this series on msm8996, and sdm845 after pulling in Rafael's linux-pm > linux-next[9] and Joerg's iommu next[10] branches, and related changes for > device tree, etc. > > Hi Robin, Will, > I have addressed the comments for v13. If there's still a chance > can you please consider pulling this for v4.19. > Thanks. > > [v14] > * Moved arm_smmu_device_reset() from arm_smmu_pm_resume() to > arm_smmu_runtime_resume() so that the pm_resume callback calls > only runtime_resume to resume the device. > This should take care of restoring the state of smmu in systems > in which smmu lose register state on power-domain collapse. It's been a while since this series was posted and no more comments seem to be left anymore. Would you have some time to take a look again? Thanks. Best regards, Tomasz