Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753332AbdLSPVK (ORCPT ); Tue, 19 Dec 2017 10:21:10 -0500 Received: from mail-io0-f196.google.com ([209.85.223.196]:43888 "EHLO mail-io0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753130AbdLSPVC (ORCPT ); Tue, 19 Dec 2017 10:21:02 -0500 X-Google-Smtp-Source: ACJfBosYL2ET+5CUDkCbdefgA/KFOr0I91n2DNt97+RBEeMWAmr+XzT5otyvSSqTW9KLLdXbaI/dQfzdrSTXbVGW8MQ= MIME-Version: 1.0 In-Reply-To: <20170908171830.13813-2-georgi.djakov@linaro.org> References: <20170908171830.13813-1-georgi.djakov@linaro.org> <20170908171830.13813-2-georgi.djakov@linaro.org> From: Rob Clark Date: Tue, 19 Dec 2017 10:21:01 -0500 Message-ID: Subject: Re: [PATCH v3 1/3] interconnect: Add generic on-chip interconnect API To: Georgi Djakov Cc: linux-pm@vger.kernel.org, Greg KH , Rafael Wysocki , Rob Herring , Kevin Hilman , Michael Turquette , Vincent Guittot , Saravana Kannan , Stephen Boyd , Andy Gross , seansw@qti.qualcomm.com, davidai@quicinc.com, Linux Kernel Mailing List , linux-arm-kernel@lists.infradead.org, linux-arm-msm , Mark Rutland , lorenzo.pieralisi@arm.com Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2514 Lines: 54 On Fri, Sep 8, 2017 at 1:18 PM, Georgi Djakov wrote: > This patch introduce a new API to get requirements and configure the > interconnect buses across the entire chipset to fit with the current demand. > > The API is using a consumer/provider-based model, where the providers are > the interconnect buses and the consumers could be various drivers. > The consumers request interconnect resources (path) between endpoints and > set the desired constraints on this data flow path. The providers receive > requests from consumers and aggregate these requests for all master-slave > pairs on that path. Then the providers configure each participating in the > topology node according to the requested data flow path, physical links and > constraints. The topology could be complicated and multi-tiered and is SoC > specific. > > Signed-off-by: Georgi Djakov > --- > Documentation/interconnect/interconnect.rst | 93 +++++++ > drivers/Kconfig | 2 + > drivers/Makefile | 1 + > drivers/interconnect/Kconfig | 10 + > drivers/interconnect/Makefile | 1 + > drivers/interconnect/interconnect.c | 382 ++++++++++++++++++++++++++++ > include/linux/interconnect-consumer.h | 73 ++++++ > include/linux/interconnect-provider.h | 119 +++++++++ > 8 files changed, 681 insertions(+) > create mode 100644 Documentation/interconnect/interconnect.rst > create mode 100644 drivers/interconnect/Kconfig > create mode 100644 drivers/interconnect/Makefile > create mode 100644 drivers/interconnect/interconnect.c > create mode 100644 include/linux/interconnect-consumer.h > create mode 100644 include/linux/interconnect-provider.h > > [snip] > +/** > + * interconnect_set() - set constraints on a path between two endpoints > + * @path: reference to the path returned by interconnect_get() > + * @creq: request from the consumer, containing its requirements > + * > + * This function is used by an interconnect consumer to express its own needs > + * in term of bandwidth and QoS for a previously requested path between two > + * endpoints. The requests are aggregated and each node is updated accordingly. > + * > + * Returns 0 on success, or an approproate error code otherwise. > + */ > +int interconnect_set(struct interconnect_path *path, > + struct interconnect_creq *creq) drive-by comment... afaict creq could be 'const' BR, -R