From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Google-Smtp-Source: ACJfBosxW4ab6GwyChHWYBm1hGPf9mXSxEglAT6IJoHuQnWCFRmYGXnCdpXS6frCMGDppdRT7AA0 ARC-Seal: i=1; a=rsa-sha256; t=1516362243; cv=none; d=google.com; s=arc-20160816; b=PMsWhqO2yZpFGQYB2bugwxmzhjLsMLirWl9Apo5mcR2betbq0AaiojrqUGeIlRbbu9 wYG11oFSfEwbnXNsFnYl3lB1x+DiW3xlfXXfu+qxRruCr8X+R01JZSQZJX8/txiOSy93 NdTJQTkJYo7XvMCyVXSFRi8Uyn/YO/kqiNN1qn2OO29A5wzhQKHIJQksKF5KH683beZf QAH13BczXbKk4jMfkIvUHSUro3Wxvbq4JT43njmTAbmA3QgNDJCK2zlXSgvAfzSViJTE 4xObFUpywLcIoma7eQIZWRhGMB2VImS2zUuKKrjVZ2etFCDgOgJqGSSJyxrc4bUg90TB QW7Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=references:in-reply-to:message-id:date:subject:cc:to:from :dmarc-filter:dkim-signature:dkim-signature :arc-authentication-results; bh=orMwRbKSBUy0wLT/RKMrUhDj7DQEVCP5ozhrM7PMs9M=; b=kAsLgmpK23QSqXU3B8movxjofiC0Z49EhHfL2UrWqxLLt9/xtAYmKkvJrxTHi7Dldl An74QBlIs8ittMtAfNtHimSIKu9lsFQPz3Ykaufag7SVPtKg4MbN+6vSqWKicT28cCy5 C9iduSaVYAVNNzpKxFt2s0Mz0aqxRrgqoiuOQhZaVNW+9aGnSSSkLZlUqMI0PNOuvEwT 9ysUtXF20sgp7wbkDQiPZJ4nSv1paiBmxMt76IyUn7xIcUGKbWePPVLlAlwkSdwDf36E 34/Gl8vSzccb5N161oLJVekuEmKfOM5rZFQPMCw3GbpVLNm1kQUzkd00bhj5RXn8IdLl aaFg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@codeaurora.org header.s=default header.b=gNWYVjbD; dkim=pass header.i=@codeaurora.org header.s=default header.b=gNWYVjbD; spf=pass (google.com: domain of vivek.gautam@codeaurora.org designates 198.145.29.96 as permitted sender) smtp.mailfrom=vivek.gautam@codeaurora.org Authentication-Results: mx.google.com; dkim=pass header.i=@codeaurora.org header.s=default header.b=gNWYVjbD; dkim=pass header.i=@codeaurora.org header.s=default header.b=gNWYVjbD; spf=pass (google.com: domain of vivek.gautam@codeaurora.org designates 198.145.29.96 as permitted sender) smtp.mailfrom=vivek.gautam@codeaurora.org DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 3AC9B609D1 Authentication-Results: pdx-caf-mail.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: pdx-caf-mail.web.codeaurora.org; spf=none smtp.mailfrom=vivek.gautam@codeaurora.org From: Vivek Gautam To: alex.williamson@redhat.com, robh+dt@kernel.org, mark.rutland@arm.com, rjw@rjwysocki.net, robin.murphy@arm.com, will.deacon@arm.com, iommu@lists.linux-foundation.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org, dri-devel@lists.freedesktop.org, freedreno@lists.freedesktop.org, sboyd@codeaurora.org Cc: gregkh@linuxfoundation.org, sricharan@codeaurora.org, m.szyprowski@samsung.com, architt@codeaurora.org, linux-arm-msm@vger.kernel.org, vivek.gautam@codeaurora.org Subject: [PATCH v6 1/6] base: power: runtime: Export pm_runtime_get/put_suppliers Date: Fri, 19 Jan 2018 17:13:38 +0530 Message-Id: <1516362223-22946-2-git-send-email-vivek.gautam@codeaurora.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1516362223-22946-1-git-send-email-vivek.gautam@codeaurora.org> References: <1516362223-22946-1-git-send-email-vivek.gautam@codeaurora.org> X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: =?utf-8?q?1590021056059728640?= X-GMAIL-MSGID: =?utf-8?q?1590021056059728640?= X-Mailing-List: linux-kernel@vger.kernel.org List-ID: 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. Some of these unmap requests are coming from the user space when the controller itself is not powered-up, and it can be huge penalty in terms of power and latency to power-up the graphics/mm controllers. There can be an argument that the supplier should handle this case on its own and there should not be a need for the consumer to power-on the supplier. But as discussed on the thread [1] about ARM-SMMU runtime pm, we don't want to introduce runtime pm calls in atomic path in arm_smmu_unmap. [1] https://patchwork.kernel.org/patch/9827825/ Signed-off-by: Vivek Gautam Acked-by: Rafael J. Wysocki --- drivers/base/power/runtime.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/base/power/runtime.c b/drivers/base/power/runtime.c index 6e89b51ea3d9..06a2a88fe866 100644 --- a/drivers/base/power/runtime.c +++ b/drivers/base/power/runtime.c @@ -1579,6 +1579,7 @@ void pm_runtime_get_suppliers(struct device *dev) device_links_read_unlock(idx); } +EXPORT_SYMBOL_GPL(pm_runtime_get_suppliers); /** * pm_runtime_put_suppliers - Drop references to supplier devices. @@ -1597,6 +1598,7 @@ void pm_runtime_put_suppliers(struct device *dev) device_links_read_unlock(idx); } +EXPORT_SYMBOL_GPL(pm_runtime_put_suppliers); void pm_runtime_new_link(struct device *dev) { -- QUALCOMM INDIA, on behalf of Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted by The Linux Foundation