From patchwork Fri Aug 9 12:13: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: 170907 Delivered-To: patch@linaro.org Received: by 2002:a92:512:0:0:0:0:0 with SMTP id q18csp9918633ile; Fri, 9 Aug 2019 05:13:31 -0700 (PDT) X-Google-Smtp-Source: APXvYqw9crgdlpbhTIITw6rPerI6AbpkpABtbf6NrMZqV+hP2VmrzHPPfBzqfT1IeqVb5M8Av37e X-Received: by 2002:a17:90a:2069:: with SMTP id n96mr2638703pjc.4.1565352811555; Fri, 09 Aug 2019 05:13:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1565352811; cv=none; d=google.com; s=arc-20160816; b=efWjw+8m+b7jFBmBkpKmK8wy4gAWkBUi6R4wcMP2dFqhnSw9mVrp2+PiL2Q5x3U00X H7NaK8KxutDMIrsTV0840ImFXBpEHtX0rvF1ZR7kCaYYLtn8c23WXKLM3MujADptEgHx ce2T/jx3Xd00xKy2h52/F/4r3sEqXkDQVuCmfzQK90dhPjmTclssyE8fYngm3IGVqCWa 0bMRizsH4Es2wGI/cyQ/BH9L6oHqcGfg7vSyowmHtwdIcnHWd5YVcO6KmBp7caFveDi/ by5zTWPOht7Ct+3nYKNYNCmotqlyDxWtSci1qoS+0YyYsMU2SkcEimQDZOcbLejeqKxJ rDAA== 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=khC2xFZGDuzHm7LauVefQf76DxyJ5wKd6wD3GFIWUBg=; b=xdCnC5yoSrKBqw/IKCK/gthMxB+brMDmL6w/gMiVvykQXJTdgHnbgrhivmbsU04SjG RIAdQJjswfaHr/F4hUADYwnL53anvPOaM/pevus/1ElPdqadmURV97j3IuuqS7BJXBqH YodwgH0UTQV7XaMYDJDwmb5GKM2KTxq/ZEmdm04SjxhFkQ+NJkTbmj59WGNW/C+Zwi9u qB6IFQgOpBheOHqfHjL9WTHMP9B4E6fkwFnsBQj+u6IBvdlWoryZCEHlbSGvHzR7IQDc fbxmTdzskFIROrVY6VVG/09El/k3BOG51wmXfDBk8Dk3V8zO4nQol6fY0oV7ht8ve4pn qIbw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=YUgvvikf; 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 i21si44300812pgj.37.2019.08.09.05.13.30; Fri, 09 Aug 2019 05:13:31 -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=YUgvvikf; 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 S2406718AbfHIMNa (ORCPT + 16 others); Fri, 9 Aug 2019 08:13:30 -0400 Received: from mail-lj1-f196.google.com ([209.85.208.196]:39388 "EHLO mail-lj1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2406623AbfHIMNa (ORCPT ); Fri, 9 Aug 2019 08:13:30 -0400 Received: by mail-lj1-f196.google.com with SMTP id v18so91818285ljh.6 for ; Fri, 09 Aug 2019 05:13: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=khC2xFZGDuzHm7LauVefQf76DxyJ5wKd6wD3GFIWUBg=; b=YUgvvikfXP7Algmo5FVFozvaeWU2EgvjF+cD5mnYuI9U/j45lqwxwPig/8wh+wBIYJ vuM2ziYQxZ3XRGtGKH8leZv/0X/H5XGfN1teN4G6dK5r5mNF99DaoQBvutQOFSVgwerk 9hK95niDmQhtp26IAkvdHZCV9wiiW3TXt449kOLrWnGCjOlO//g5MXgC16LV+89FUL9f 3zsyayZsATMVEY1Wc5XXhy87ejlE2aYZ++BhvhVtk2AaWLM9L0u0zz8JAEu8ZmpFvpWu 69JrTgiRNMAMoGfpFEMoxM7A/bOsdIg1DJByonCqXf1r4c4b7onV3S+OXPKN6QADsvbR 0rZw== 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=khC2xFZGDuzHm7LauVefQf76DxyJ5wKd6wD3GFIWUBg=; b=SRsaS9BznCMaBhEzMWqgaOw2XEZSCAx0pyQfti1vFsPJdxlN+hFaIUdXnCDadMwUDx FsFrR+kp15+VFSZqPthUSxI8GSRP9MW5a3RI6VzAborojtb353FuERIFYFSorNeQLKXJ bO8oqtHisfV5x+125nfzu+t58PWbWKkRmXrFPG8eFYGz5C05Gg0AolQT5VnX8M2ossic +x0Bw4otytg5UtwUYyDBYERLP/Kp9ydcIdKTvOpQX3h4l+WFrBREu6XcH2ZUwmBeXkY/ nbHlCspdx8JQfVShsM0lBtP+0ZoAlFwn58LdkNzGC1V8h6Z6k8wZA+IDO6JXJ+V9mfIH B2jA== X-Gm-Message-State: APjAAAV5pZ+GIKJz1cM/WrZtFsfnNjunGuO6iu8aRmu26VROkAeQNtT3 nF93FfZUFrBRFJ1poBxj8lLEeg== X-Received: by 2002:a2e:8455:: with SMTP id u21mr10848999ljh.20.1565352808013; Fri, 09 Aug 2019 05:13:28 -0700 (PDT) Received: from localhost.localdomain ([37.157.136.206]) by smtp.googlemail.com with ESMTPSA id f23sm1083425lfc.25.2019.08.09.05.13.26 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 09 Aug 2019 05:13:27 -0700 (PDT) From: Georgi Djakov To: linux-pm@vger.kernel.org, evgreen@chromium.org Cc: daidavid1@codeaurora.org, vincent.guittot@linaro.org, bjorn.andersson@linaro.org, amit.kucheria@linaro.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 v3 0/3] interconnect: Add path tagging support Date: Fri, 9 Aug 2019 15:13:22 +0300 Message-Id: <20190809121325.8138-1-georgi.djakov@linaro.org> X-Mailer: git-send-email 2.22.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. v3: - New patch to add a pre_aggregate() callback. v2: https://lore.kernel.org/lkml/20190618091724.28232-1-georgi.djakov@linaro.org/ - 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 (2): interconnect: Add support for path tags interconnect: Add pre_aggregate() callback drivers/interconnect/core.c | 27 ++++- drivers/interconnect/qcom/sdm845.c | 136 ++++++++++++++++++++------ include/linux/interconnect-provider.h | 7 +- include/linux/interconnect.h | 5 + 4 files changed, 140 insertions(+), 35 deletions(-) Reviewed-by: Evan Green