From patchwork Tue Jun 18 09:17:22 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Georgi Djakov X-Patchwork-Id: 167115 Delivered-To: patch@linaro.org Received: by 2002:a92:4782:0:0:0:0:0 with SMTP id e2csp3959268ilk; Tue, 18 Jun 2019 02:17:30 -0700 (PDT) X-Google-Smtp-Source: APXvYqwB7xcinduulfi+LyXI2oVcF2v6xAih7oK/zNdx7NPQj2iarQxzV9Y57iqnB+bwTpDfI421 X-Received: by 2002:a17:90a:17c4:: with SMTP id q62mr4083897pja.104.1560849450407; Tue, 18 Jun 2019 02:17:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560849450; cv=none; d=google.com; s=arc-20160816; b=fGL/EwBEJtP1Hnl2eVtoAMTq1e9hnapDDlbIMC3aOdl9wNmOows3jXKY887KoeTzas LLLyPoPyZo3OEg4CF0TT3mS2oNtoZH1j8xKeQrp0DGd5xzXKGQiogODrC2ZKS8fvHnVx vUDn8dpcDz8GIbyONkrwtfyjyiAEim3OaBGP/n3hNcqfWjldl3AT+OTu6mCQcJp3NtZh lTF/nKENfpFoe4/IPy2TaEoBzkcQtERj07ycdXNeez2hexa4dROnfz+SoBAXvYrCST2g OMfG4NRefLTHHhh2GUvpqq/0pCTRrHm0MBsFpNekqIpAfUzNiF5Vp4kE+jc7aduYaR0h Jk9A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=rJanYe36yi/CmGKqaCrG1otgHpkv5KX5H3hS1IRh33g=; b=eig0J25/L9SjEoDZzADLdGHY3mjcP0OOghNJinJ9cSlSVXe1TkoXvoWm4fa/nTLzzU 5Ja/Wh+Q7BSZ8BVgfjkEVqPPxfOR9FdLvFx/9pUfrNbRNSm4BfmexzlvZ8pfAPKkoDIc FmUe1dCEjx22ISSn8w+vUl7zdPwXEdVEJL6vIQEn9wxxs2sp8n/iUVNKiR1ydoui9ICR 4yYe0Ff3LrkWbAC55VSijLb3cfb6pD+rZPPxc4hZLdRl8YuJPkJaP2pXWe2NQLrTOlv2 5Re7Arswzu9fHXdyrGHcPc26FnmXl7skNOnRXCYGFmMieb9wLKG/zrelBxuUlSU7fBuB Kh4g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=RiJtJdWo; spf=pass (google.com: best guess record for domain of linux-arm-msm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-arm-msm-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w32si12809780pgl.25.2019.06.18.02.17.30; Tue, 18 Jun 2019 02:17:30 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-arm-msm-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=@linaro.org header.s=google header.b=RiJtJdWo; spf=pass (google.com: best guess record for domain of linux-arm-msm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-arm-msm-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729229AbfFRJR3 (ORCPT + 15 others); Tue, 18 Jun 2019 05:17:29 -0400 Received: from mail-lf1-f65.google.com ([209.85.167.65]:44478 "EHLO mail-lf1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728385AbfFRJR3 (ORCPT ); Tue, 18 Jun 2019 05:17:29 -0400 Received: by mail-lf1-f65.google.com with SMTP id r15so8672426lfm.11 for ; Tue, 18 Jun 2019 02:17:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=rJanYe36yi/CmGKqaCrG1otgHpkv5KX5H3hS1IRh33g=; b=RiJtJdWoPD8zAWLrRuFlXYtFDm2X0N6/21V3ItMvPDDbdX9jIMVD2NDDE50Evpd7c5 NP91pnFt1FTIfxm71pG+sw/GLrffxSGkjN5FKLqFCZzFnGDzFCMG19dHtlagjO53JVr/ 80CRzxaL1cN4BtODGKh0tEiNCVJAKGD2hlezCr0t0JeIi0cngbJDXFeAYYfVdH4xapR0 1nFQQDgIcTIQ1+QHAOYncbIigzuTHyGJIGn5wK5x+yFT1HBY5GkQFMYtVVGMYtPf8zk4 6jr/zmJsnunS/onnUn73MCCqmxxeoLyyYlMOV/H4O9N6tMze7daUZL+ggyMfqPaVWAIO OQZg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=rJanYe36yi/CmGKqaCrG1otgHpkv5KX5H3hS1IRh33g=; b=oBCENVABvGjmbSAJZ1xgzWY0soPkVsL//ehtB02sTOjICqkg7kzypY4TfAr7JVTNZL EOf+cZ1wLdTaUPOXHzpz3wyVRZcUJET+Ltlh9W6eYJcWg0RW5qnK6ap+pM3AOtvq7As0 SbC/PXu41U+shLRFyI1MZ4gUMtWfftlmMhJFeXewSgWOx1cPgbxW9W+15uDixhiaL0SC LzP2Ek5mkkxGcGiOwb3tA8U0CJiBrbxW3+t/4WuxEstuhIelwCKbm7PBq6stynctDpXj eZ46nEgLpgEG1O0UYhJqJuHxF8XObyYht/wVKx3dsk3IwZps7X0z/v37QyxPbLGw1p4/ BjQA== X-Gm-Message-State: APjAAAV1yYrjBdzf2Qpk9bFNADxKr+uEhKmMtT5eBG0DAPAgy8GbSYjB FxjF9nkCwrfp7zPHS/XLw+SRSA== X-Received: by 2002:ac2:482d:: with SMTP id 13mr14129676lft.132.1560849447214; Tue, 18 Jun 2019 02:17:27 -0700 (PDT) Received: from localhost.localdomain ([212.45.67.2]) by smtp.googlemail.com with ESMTPSA id b9sm2497444ljj.92.2019.06.18.02.17.25 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 18 Jun 2019 02:17:26 -0700 (PDT) From: Georgi Djakov To: linux-pm@vger.kernel.org Cc: daidavid1@codeaurora.org, vincent.guittot@linaro.org, bjorn.andersson@linaro.org, amit.kucheria@linaro.org, evgreen@chromium.org, dianders@chromium.org, seansw@qti.qualcomm.com, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-arm-msm@vger.kernel.org, georgi.djakov@linaro.org Subject: [PATCH v2 0/2] interconnect: Add path tagging support Date: Tue, 18 Jun 2019 12:17:22 +0300 Message-Id: <20190618091724.28232-1-georgi.djakov@linaro.org> X-Mailer: git-send-email 2.21.0 MIME-Version: 1.0 Sender: linux-arm-msm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org SoCs that have multiple coexisting CPUs and DSPs, may have shared interconnect buses between them. In such cases, each CPU/DSP may have different bandwidth needs, depending on whether it is active or sleeping. This means that we have to keep different bandwidth configurations for the CPU (active/sleep). In such systems, usually there is a way to communicate and synchronize this information with some firmware or pass it to another processor responsible for monitoring and switching the interconnect configurations based on the state of each CPU/DSP. The above problem can be solved by introducing the path tagging concept, that allows consumers to optionally attach a tag to each path they use. This tag is used to differentiate between the aggregated bandwidth values for each state. The tag is generic and how it's handled is up to the platform specific interconnect provider drivers. v2: - Store tag with the request. (Evan) - Reorganize the code to save bandwidth values into buckets and use the tag as a bitfield. (Evan) - Clear the aggregated values after icc_set(). v1: https://lore.kernel.org/lkml/20190208172152.1807-1-georgi.djakov@linaro.org/ David Dai (1): interconnect: qcom: Add tagging and wake/sleep support for sdm845 Georgi Djakov (1): interconnect: Add support for path tags drivers/interconnect/core.c | 24 ++++- drivers/interconnect/qcom/sdm845.c | 131 +++++++++++++++++++------- include/linux/interconnect-provider.h | 4 +- include/linux/interconnect.h | 5 + 4 files changed, 129 insertions(+), 35 deletions(-)