Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp227724ybl; Fri, 9 Aug 2019 05:14:24 -0700 (PDT) X-Google-Smtp-Source: APXvYqxCD6xgwfV0EssPQE/AhBzFjKiJIDzW7JPyyCJJo6DMLe+yQHWcxTcm/+0fwlYAdSFCalY6 X-Received: by 2002:a65:6288:: with SMTP id f8mr16921307pgv.292.1565352863744; Fri, 09 Aug 2019 05:14:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1565352863; cv=none; d=google.com; s=arc-20160816; b=MaO79XJU9edk7DgTFbh5IbhBFCVGoxCJrw44Qw9dZUWZ451CnUNYro6DFJ4RYJlYE8 qE3jdJniKAQM2ds9UOBv7Vn5F1UDL7Dbs/0nWuCIPwyCxHVjxzcFC/seiZPgrFDh9Wnt sLwM2DDIsRW6OXyEt9E9BTNOWOEvzadRanf1SAFUrtQQA9llsjyi1bI0f+En3mh66yv4 WnmUvvQdYKd/44S3DRPEfgl6lEhlMRlFoC5UZGrFlmxfPUshEE5GNh8TWVDmCoPrT2wM eS8R4yPIv424TMroaEsMJmFiXOlE91rTHXA/oq6msYvi8XUrAeHAMhbsdhW1KkGrB9AF dCKg== 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=CqNUKfnlfDeDiauQ17+d7k67CXmKefnERQmK6e+Y1kZfPYyBUU2BxNPVxnEUMnd4i/ vBq1qkgA5nZTskBlINeBsADpKI5XpCXvThR2tfQJxKzUA914EUPpbT3c9JiLSwo58Bf1 Xr4Rao11QKiZ/SZtK4TD0O+ylLHO+VZryhxjg4WsaoQsjN//e9uY0sTW5QSKdkmsI96P o1BYUNi8bEAMT2025PI0h2rFsTrmlQUcyFPHLGz4mz99xzvyjX2rvCLs6x3AqI92kbZ1 Cn/SFOkBagCWJVKiI4CJeiEWzhAT34r9Xi/LUrlHTSKX3Ec1tpLb7ybaXwJPtCH4hxWZ 7jlw== 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-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=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a14si4217238pjo.102.2019.08.09.05.14.06; Fri, 09 Aug 2019 05:14:23 -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=@linaro.org header.s=google header.b=YUgvvikf; 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=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2406724AbfHIMNa (ORCPT + 99 others); Fri, 9 Aug 2019 08:13:30 -0400 Received: from mail-lj1-f195.google.com ([209.85.208.195]:40359 "EHLO mail-lj1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2406714AbfHIMNa (ORCPT ); Fri, 9 Aug 2019 08:13:30 -0400 Received: by mail-lj1-f195.google.com with SMTP id m8so58286171lji.7 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=jXJ5q5kB4fGCsBvjYEZmZd7aHyScruQF3lY7wYln4W5myS0kJvCWrBRN6WS3O5xlRL 6od9yqhCFghixnfBQ5o/ILe10yFf4dWXqkeKJVM6VgDmQt9+6XuTPq/7Of/qip9Vki/Q D0hx9RpUxauDB7riIZTK1ItGFGOl/S7Y5qTKGlz4fwKTRnWD3mIz2KlDYxtWsLAjKd9A W/eoQgjlI8EM4hL/b6+lmVDKb0qvKg/oc4OSObqat76i53ZjLCoUvFc+Yrh8gNeNx9F8 FvnAUiqJCluAEsKCuBK97veLtc1PFM0wVM+W2Vwu1vnN9nJNNqaVcQAmcsxBvhVYPMzD Sj3w== X-Gm-Message-State: APjAAAXRsQjFg2YVTvNSRS7ul1kbIphU6xFI4DGFNMayL2FeNYg/G25f 6rplf9EX6bbSNY4XYBiNZcqs8Q== 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 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@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(-)