[{"id":1765561,"web_url":"http://patchwork.ozlabs.org/comment/1765561/","msgid":"<20170908141321.02f51e92@gandalf.local.home>","list_archive_url":null,"date":"2017-09-08T18:13:21","subject":"Re: [RFC v3 2/3] interconnect: Add basic event tracing","submitter":{"id":112,"url":"http://patchwork.ozlabs.org/api/people/112/","name":"Steven Rostedt","email":"rostedt@goodmis.org"},"content":"On Fri,  8 Sep 2017 20:18:29 +0300\nGeorgi Djakov <georgi.djakov@linaro.org> wrote:\n\n> diff --git a/include/trace/events/interconnect.h b/include/trace/events/interconnect.h\n> new file mode 100644\n> index 000000000000..c4a72163873c\n> --- /dev/null\n> +++ b/include/trace/events/interconnect.h\n> @@ -0,0 +1,45 @@\n> +#undef TRACE_SYSTEM\n> +#define TRACE_SYSTEM interconnect\n> +\n> +#if !defined(_TRACE_INTERCONNECT_H) || defined(TRACE_HEADER_MULTI_READ)\n> +#define _TRACE_INTERCONNECT_H\n> +\n> +#include <linux/tracepoint.h>\n> +\n> +struct interconnect_path;\n> +\n> +DECLARE_EVENT_CLASS(interconnect_path,\n> +\n> +\tTP_PROTO(struct interconnect_path *path),\n> +\n> +\tTP_ARGS(path),\n> +\n> +\tTP_STRUCT__entry(\n> +\t\t__field(struct interconnect_path *, path)\n> +\t),\n> +\n> +\tTP_fast_assign(\n> +\t\t__entry->path = path;\n> +\t),\n> +\n> +\tTP_printk(\"INTERCONNECT: %p\", __entry->path)\n\nYou're passing in an interconnect_path and only recording the pointer\nto it? Wouldn't it be useful to record other aspects? Like the number\nof nodes, the avg and peak bw of each node?\n\n-- Steve\n\n> +);\n> +\n> +DEFINE_EVENT(interconnect_path, interconnect_set,\n> +\n> +\tTP_PROTO(struct interconnect_path *path),\n> +\n> +\tTP_ARGS(path)\n> +);\n> +\n> +DEFINE_EVENT(interconnect_path, interconnect_set_complete,\n> +\n> +\tTP_PROTO(struct interconnect_path *path),\n> +\n> +\tTP_ARGS(path)\n> +);\n> +\n> +#endif /* _TRACE_INTERCONNECT_H */\n> +\n> +/* This part must be outside protection */\n> +#include <trace/define_trace.h>","headers":{"Return-Path":"<linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org>","X-Original-To":"incoming-imx@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming-imx@bilbo.ozlabs.org","Authentication-Results":["ozlabs.org;\n\tspf=none (mailfrom) smtp.mailfrom=lists.infradead.org\n\t(client-ip=65.50.211.133; helo=bombadil.infradead.org;\n\tenvelope-from=linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org;\n\treceiver=<UNKNOWN>)","ozlabs.org; dkim=pass (2048-bit key;\n\tunprotected) header.d=lists.infradead.org\n\theader.i=@lists.infradead.org\n\theader.b=\"J7wOBmGg\"; dkim-atps=neutral","mail.kernel.org;\n\tdmarc=none (p=none dis=none) header.from=goodmis.org","mail.kernel.org;\n\tspf=none smtp.mailfrom=rostedt@goodmis.org"],"Received":["from bombadil.infradead.org (bombadil.infradead.org\n\t[65.50.211.133])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256\n\tbits)) (No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3xplnY4HsCz9sPk\n\tfor <incoming-imx@patchwork.ozlabs.org>;\n\tSat,  9 Sep 2017 04:13:53 +1000 (AEST)","from localhost ([127.0.0.1] helo=bombadil.infradead.org)\n\tby bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux))\n\tid 1dqNmo-0007Ai-6g; Fri, 08 Sep 2017 18:13:50 +0000","from mail.kernel.org ([198.145.29.99])\n\tby bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux))\n\tid 1dqNmk-00077x-IX for linux-arm-kernel@lists.infradead.org;\n\tFri, 08 Sep 2017 18:13:48 +0000","from gandalf.local.home (cpe-67-246-153-56.stny.res.rr.com\n\t[67.246.153.56])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256\n\tbits)) (No client certificate requested)\n\tby mail.kernel.org (Postfix) with ESMTPSA id A76B221D28;\n\tFri,  8 Sep 2017 18:13:22 +0000 (UTC)"],"DKIM-Signature":"v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;\n\td=lists.infradead.org; s=bombadil.20170209; h=Sender:\n\tContent-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post:\n\tList-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:\n\tMessage-ID:Subject:To:From:Date:Reply-To:Content-ID:Content-Description:\n\tResent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:\n\tList-Owner; bh=PyZ8M6He03XUetO03KyMqpuUabprRNfE6mJTIXqCay8=;\n\tb=J7wOBmGgPL0UEI\n\tA3V9xZxy80otawHjGTQIhPDyg9z8t9xgursJYy1q/hW8CdeG+y7SoitGpm5+vcdUEhAAOKBwdbUes\n\tFtopGBg8ifhyeb1ubKJmgNU2tLT231n5EF2tmEnNG5T70DOoAjePvXDCqSB+dfTidI8tjE09ssFte\n\tGHmG+Z3Vau/PyGxnuTFkpIXQb2Se+MqGakiALQl+uw7sHysfDZ44PmGJwL1w4UOWBLUnwXcimP7Yn\n\tTRCPM9zJdY4Ho85RHhaERS32vbilxVVVMa47kFF/r3zHcw5RubKLh/MIc9qyLmHMEgldgfVChsViW\n\t15he0KLiezXjwXB/eYhQ==;","DMARC-Filter":"OpenDMARC Filter v1.3.2 mail.kernel.org A76B221D28","Date":"Fri, 8 Sep 2017 14:13:21 -0400","From":"Steven Rostedt <rostedt@goodmis.org>","To":"Georgi Djakov <georgi.djakov@linaro.org>","Subject":"Re: [RFC v3 2/3] interconnect: Add basic event tracing","Message-ID":"<20170908141321.02f51e92@gandalf.local.home>","In-Reply-To":"<20170908171830.13813-3-georgi.djakov@linaro.org>","References":"<20170908171830.13813-1-georgi.djakov@linaro.org>\n\t<20170908171830.13813-3-georgi.djakov@linaro.org>","X-Mailer":"Claws Mail 3.14.0 (GTK+ 2.24.31; x86_64-pc-linux-gnu)","MIME-Version":"1.0","X-CRM114-Version":"20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 ","X-CRM114-CacheID":"sfid-20170908_111346_647762_85E89B06 ","X-CRM114-Status":"GOOD (  10.01  )","X-Spam-Score":"-6.9 (------)","X-Spam-Report":"SpamAssassin version 3.4.1 on bombadil.infradead.org summary:\n\tContent analysis details:   (-6.9 points)\n\tpts rule name              description\n\t---- ----------------------\n\t--------------------------------------------------\n\t-0.0 RP_MATCHES_RCVD Envelope sender domain matches handover relay\n\tdomain\n\t0.0 HEADER_FROM_DIFFERENT_DOMAINS From and EnvelopeFrom 2nd level\n\tmail domains are different\n\t-1.9 BAYES_00               BODY: Bayes spam probability is 0 to 1%\n\t[score: 0.0000]\n\t-5.0 RCVD_IN_DNSWL_HI RBL: Sender listed at http://www.dnswl.org/,\n\thigh trust [198.145.29.99 listed in list.dnswl.org]","X-BeenThere":"linux-arm-kernel@lists.infradead.org","X-Mailman-Version":"2.1.21","Precedence":"list","List-Unsubscribe":"<http://lists.infradead.org/mailman/options/linux-arm-kernel>,\n\t<mailto:linux-arm-kernel-request@lists.infradead.org?subject=unsubscribe>","List-Archive":"<http://lists.infradead.org/pipermail/linux-arm-kernel/>","List-Post":"<mailto:linux-arm-kernel@lists.infradead.org>","List-Help":"<mailto:linux-arm-kernel-request@lists.infradead.org?subject=help>","List-Subscribe":"<http://lists.infradead.org/mailman/listinfo/linux-arm-kernel>,\n\t<mailto:linux-arm-kernel-request@lists.infradead.org?subject=subscribe>","Cc":"linux-arm-msm@vger.kernel.org, mark.rutland@arm.com,\n\tlorenzo.pieralisi@arm.com, vincent.guittot@linaro.org,\n\tlinux-pm@vger.kernel.org, seansw@qti.qualcomm.com,\n\tgregkh@linuxfoundation.org, mturquette@baylibre.com, rjw@rjwysocki.net,\n\tlinux-kernel@vger.kernel.org, \n\tdavidai@quicinc.com, robh+dt@kernel.org, skannan@codeaurora.org,\n\tkhilman@baylibre.com, andy.gross@linaro.org,\n\tIngo Molnar <mingo@redhat.com>, \n\tsboyd@codeaurora.org, linux-arm-kernel@lists.infradead.org","Content-Type":"text/plain; charset=\"us-ascii\"","Content-Transfer-Encoding":"7bit","Sender":"\"linux-arm-kernel\" <linux-arm-kernel-bounces@lists.infradead.org>","Errors-To":"linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org","List-Id":"linux-imx-kernel.lists.patchwork.ozlabs.org"}},{"id":1765616,"web_url":"http://patchwork.ozlabs.org/comment/1765616/","msgid":"<e45d096f-1e7a-89cd-f334-266d4b3466bc@linaro.org>","list_archive_url":null,"date":"2017-09-08T20:16:44","subject":"Re: [RFC v3 2/3] interconnect: Add basic event tracing","submitter":{"id":70295,"url":"http://patchwork.ozlabs.org/api/people/70295/","name":"Georgi Djakov","email":"georgi.djakov@linaro.org"},"content":"On 8.09.17 г. 21:13, Steven Rostedt wrote:\n> On Fri,  8 Sep 2017 20:18:29 +0300\n> Georgi Djakov <georgi.djakov@linaro.org> wrote:\n> \n>> diff --git a/include/trace/events/interconnect.h b/include/trace/events/interconnect.h\n>> new file mode 100644\n>> index 000000000000..c4a72163873c\n>> --- /dev/null\n>> +++ b/include/trace/events/interconnect.h\n>> @@ -0,0 +1,45 @@\n>> +#undef TRACE_SYSTEM\n>> +#define TRACE_SYSTEM interconnect\n>> +\n>> +#if !defined(_TRACE_INTERCONNECT_H) || defined(TRACE_HEADER_MULTI_READ)\n>> +#define _TRACE_INTERCONNECT_H\n>> +\n>> +#include <linux/tracepoint.h>\n>> +\n>> +struct interconnect_path;\n>> +\n>> +DECLARE_EVENT_CLASS(interconnect_path,\n>> +\n>> +\tTP_PROTO(struct interconnect_path *path),\n>> +\n>> +\tTP_ARGS(path),\n>> +\n>> +\tTP_STRUCT__entry(\n>> +\t\t__field(struct interconnect_path *, path)\n>> +\t),\n>> +\n>> +\tTP_fast_assign(\n>> +\t\t__entry->path = path;\n>> +\t),\n>> +\n>> +\tTP_printk(\"INTERCONNECT: %p\", __entry->path)\n> \n> You're passing in an interconnect_path and only recording the pointer\n> to it? Wouldn't it be useful to record other aspects? Like the number\n> of nodes, the avg and peak bw of each node?\n> \n\nMy goal was to get just the path with some timestamps, but your suggestion\nsounds good. Will do it. Thanks!","headers":{"Return-Path":"<linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org>","X-Original-To":"incoming-imx@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming-imx@bilbo.ozlabs.org","Authentication-Results":["ozlabs.org;\n\tspf=none (mailfrom) smtp.mailfrom=lists.infradead.org\n\t(client-ip=65.50.211.133; helo=bombadil.infradead.org;\n\tenvelope-from=linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org;\n\treceiver=<UNKNOWN>)","ozlabs.org; dkim=pass (2048-bit key;\n\tunprotected) header.d=lists.infradead.org\n\theader.i=@lists.infradead.org header.b=\"OJGFSfbI\"; \n\tdkim=fail reason=\"signature verification failed\" (1024-bit key;\n\tunprotected) header.d=linaro.org header.i=@linaro.org\n\theader.b=\"ViKLJS+w\"; dkim-atps=neutral"],"Received":["from bombadil.infradead.org (bombadil.infradead.org\n\t[65.50.211.133])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256\n\tbits)) (No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3xppWx0fz3z9s76\n\tfor <incoming-imx@patchwork.ozlabs.org>;\n\tSat,  9 Sep 2017 06:17:17 +1000 (AEST)","from localhost ([127.0.0.1] helo=bombadil.infradead.org)\n\tby bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux))\n\tid 1dqPiE-0002cR-0k; Fri, 08 Sep 2017 20:17:14 +0000","from mail-wm0-x231.google.com ([2a00:1450:400c:c09::231])\n\tby bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux))\n\tid 1dqPiB-0002a7-4x for linux-arm-kernel@lists.infradead.org;\n\tFri, 08 Sep 2017 20:17:12 +0000","by mail-wm0-x231.google.com with SMTP id i189so10603189wmf.1\n\tfor <linux-arm-kernel@lists.infradead.org>;\n\tFri, 08 Sep 2017 13:16:50 -0700 (PDT)","from macbook.djakov.com ([212.45.67.2])\n\tby smtp.googlemail.com with ESMTPSA id\n\te8sm4653178wmf.12.2017.09.08.13.16.46\n\t(version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);\n\tFri, 08 Sep 2017 13:16:48 -0700 (PDT)"],"DKIM-Signature":["v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;\n\td=lists.infradead.org; s=bombadil.20170209; h=Sender:\n\tContent-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post:\n\tList-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:Date:\n\tMessage-ID:From:References:To:Subject:Reply-To:Content-ID:Content-Description\n\t:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:\n\tList-Owner; bh=RgygNBYeFr5NpWGJeMg0ZeCDKfWdd7iJBlcIT2A4PF0=;\n\tb=OJGFSfbIOxrPWk\n\tkljLvvoihnCsc6NOoJhqJfYa81oa22eXo0eBKPTxfca9XpzMg5XjqKwbZCU99bGLfiPWs1SFNC97D\n\tJPdDhdnKQI673DmAo3C2Umkx0UKgNpCo1jzh2Z0VE19n3+suD/DXl6/IE9exKbJUEi/mJe5O5JVI3\n\thmoHhhtv7zeb6AVl6HxYYwN5ughOG6675JMiEDZyzTNULArZOLdu0mJEZccfU9LTcngJ7U3g7d6MC\n\t9mpdypyd3pKuPt4F2Xu05xw2soLswA54572r36/scA3UOwsKQ846wi2Sym0I1l4lqP3PFI5dcfXel\n\tSAvqxYSIqltpZo2+ZHcQ==;","v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google;\n\th=subject:to:cc:references:from:message-id:date:mime-version\n\t:in-reply-to:content-language:content-transfer-encoding;\n\tbh=dDJa9hfveZy4fiMLKjRG6h5NO+6q474XP9w0Iz7ULOo=;\n\tb=ViKLJS+wF3Fthp188atxRy/Sch46gy+owjSgkpkwqeq4xkp+OS/Fak5zV9uJwIrpfF\n\ta/YXAhp+Tn2Bg59n0vj9klzZ9HwabynzU4G7iNQzKXt9+rIOqDLZsw1+Mv2R6BOIBcvp\n\tYgK7PQI/LpmNL9m7SVW0IBrSlFvFFrsWWOOoA="],"X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:subject:to:cc:references:from:message-id:date\n\t:mime-version:in-reply-to:content-language:content-transfer-encoding; \n\tbh=dDJa9hfveZy4fiMLKjRG6h5NO+6q474XP9w0Iz7ULOo=;\n\tb=OGL/CtT0JpIFzonJR/QwphqcNbUNMd3XgrLnIXQyPk/WzIvBXFxAJkzpCxua/IJD8j\n\tOfwqLk1oGSQlRJKULpXljV7Ea3ahyomMkgi8oVQt7lhAnBgeLRcNeMp4aWcH5lbWmI8p\n\tVda8PY0Mu5a9Eb3m3eXtrWSdJ0p/mXqHkqqhb3flZtfcsJ5FfyodXfFrA79qq/itAjSx\n\tkcMAYGOK7+KvHNUdjXx9EZshWZKraGXPCzVzTu7Mn7YSGdLbIxI7lr9ohjbDMap6iQNh\n\t0Tp05/6+DxdHvCHe9WYUiMAxoNwg+BPsarys0oGVZg4Zlec2OQUHlOQh6gJovT4Nlbpu\n\t7Fug==","X-Gm-Message-State":"AHPjjUgnnu+tPPkcabl3e+VJq0C1S4qqEpnqjfJpIswSpTKx7nE1yHZd\n\tCyiHl9bX1gI4FBTlaFmgKPJ7yQ==","X-Google-Smtp-Source":"AOwi7QAFAH1MjB3STkekdn3en3/AXxHkNEM9ZmkvHPggvWAWHLUJr3qmEIgvytOok0hEP12P9ws5ZQ==","X-Received":"by 10.28.29.77 with SMTP id d74mr2338818wmd.106.1504901809101;\n\tFri, 08 Sep 2017 13:16:49 -0700 (PDT)","Subject":"Re: [RFC v3 2/3] interconnect: Add basic event tracing","To":"Steven Rostedt <rostedt@goodmis.org>","References":"<20170908171830.13813-1-georgi.djakov@linaro.org>\n\t<20170908171830.13813-3-georgi.djakov@linaro.org>\n\t<20170908141321.02f51e92@gandalf.local.home>","From":"Georgi Djakov <georgi.djakov@linaro.org>","Message-ID":"<e45d096f-1e7a-89cd-f334-266d4b3466bc@linaro.org>","Date":"Fri, 8 Sep 2017 23:16:44 +0300","MIME-Version":"1.0","In-Reply-To":"<20170908141321.02f51e92@gandalf.local.home>","Content-Language":"en-US","X-CRM114-Version":"20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 ","X-CRM114-CacheID":"sfid-20170908_131711_347427_882D0F22 ","X-CRM114-Status":"UNSURE (   8.92  )","X-CRM114-Notice":"Please train this message.","X-Spam-Score":"-2.7 (--)","X-Spam-Report":"SpamAssassin version 3.4.1 on bombadil.infradead.org summary:\n\tContent analysis details:   (-2.7 points)\n\tpts rule name              description\n\t---- ----------------------\n\t--------------------------------------------------\n\t-0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/,\n\tlow\n\ttrust [2a00:1450:400c:c09:0:0:0:231 listed in] [list.dnswl.org]\n\t-0.0 SPF_PASS               SPF: sender matches SPF record\n\t-1.9 BAYES_00               BODY: Bayes spam probability is 0 to 1%\n\t[score: 0.0000]\n\t-0.1 DKIM_VALID Message has at least one valid DKIM or DK signature\n\t0.1 DKIM_SIGNED            Message has a DKIM or DK signature,\n\tnot necessarily valid\n\t-0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from\n\tauthor's domain","X-BeenThere":"linux-arm-kernel@lists.infradead.org","X-Mailman-Version":"2.1.21","Precedence":"list","List-Unsubscribe":"<http://lists.infradead.org/mailman/options/linux-arm-kernel>,\n\t<mailto:linux-arm-kernel-request@lists.infradead.org?subject=unsubscribe>","List-Archive":"<http://lists.infradead.org/pipermail/linux-arm-kernel/>","List-Post":"<mailto:linux-arm-kernel@lists.infradead.org>","List-Help":"<mailto:linux-arm-kernel-request@lists.infradead.org?subject=help>","List-Subscribe":"<http://lists.infradead.org/mailman/listinfo/linux-arm-kernel>,\n\t<mailto:linux-arm-kernel-request@lists.infradead.org?subject=subscribe>","Cc":"linux-arm-msm@vger.kernel.org, mark.rutland@arm.com,\n\tlorenzo.pieralisi@arm.com, vincent.guittot@linaro.org,\n\tlinux-pm@vger.kernel.org, seansw@qti.qualcomm.com,\n\tgregkh@linuxfoundation.org, mturquette@baylibre.com, rjw@rjwysocki.net,\n\tlinux-kernel@vger.kernel.org, \n\tdavidai@quicinc.com, robh+dt@kernel.org, skannan@codeaurora.org,\n\tkhilman@baylibre.com, andy.gross@linaro.org,\n\tIngo Molnar <mingo@redhat.com>, \n\tsboyd@codeaurora.org, linux-arm-kernel@lists.infradead.org","Content-Type":"text/plain; charset=\"utf-8\"","Content-Transfer-Encoding":"base64","Sender":"\"linux-arm-kernel\" <linux-arm-kernel-bounces@lists.infradead.org>","Errors-To":"linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org","List-Id":"linux-imx-kernel.lists.patchwork.ozlabs.org"}},{"id":1791522,"web_url":"http://patchwork.ozlabs.org/comment/1791522/","msgid":"<a7cf55ba-0475-d74c-f759-a24e58ccde47@linaro.org>","list_archive_url":null,"date":"2017-10-20T14:43:02","subject":"Re: [PATCH v3 1/3] interconnect: Add generic on-chip interconnect\n\tAPI","submitter":{"id":70295,"url":"http://patchwork.ozlabs.org/api/people/70295/","name":"Georgi Djakov","email":"georgi.djakov@linaro.org"},"content":"Hi,\n\nOn 09/08/2017 08:18 PM, Georgi Djakov wrote:\n> This patch introduce a new API to get requirements and configure the\n> interconnect buses across the entire chipset to fit with the current demand.\n> \n> The API is using a consumer/provider-based model, where the providers are\n> the interconnect buses and the consumers could be various drivers.\n> The consumers request interconnect resources (path) between endpoints and\n> set the desired constraints on this data flow path. The providers receive\n> requests from consumers and aggregate these requests for all master-slave\n> pairs on that path. Then the providers configure each participating in the\n> topology node according to the requested data flow path, physical links and\n> constraints. The topology could be complicated and multi-tiered and is SoC\n> specific.\n> \n> Signed-off-by: Georgi Djakov <georgi.djakov@linaro.org>\n> ---\n>  Documentation/interconnect/interconnect.rst |  93 +++++++\n>  drivers/Kconfig                             |   2 +\n>  drivers/Makefile                            |   1 +\n>  drivers/interconnect/Kconfig                |  10 +\n>  drivers/interconnect/Makefile               |   1 +\n>  drivers/interconnect/interconnect.c         | 382 ++++++++++++++++++++++++++++\n>  include/linux/interconnect-consumer.h       |  73 ++++++\n>  include/linux/interconnect-provider.h       | 119 +++++++++\n>  8 files changed, 681 insertions(+)\n>  create mode 100644 Documentation/interconnect/interconnect.rst\n>  create mode 100644 drivers/interconnect/Kconfig\n>  create mode 100644 drivers/interconnect/Makefile\n>  create mode 100644 drivers/interconnect/interconnect.c\n>  create mode 100644 include/linux/interconnect-consumer.h\n>  create mode 100644 include/linux/interconnect-provider.h\n\nAny comments on this patch?\n\nI am planning to change the prefix that is used for naming for example\nthe functions from \"interconnect_\" to something shorter like icbus_.\n\nThanks,\nGeorgi","headers":{"Return-Path":"<linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org>","X-Original-To":"incoming-imx@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming-imx@bilbo.ozlabs.org","Authentication-Results":["ozlabs.org;\n\tspf=none (mailfrom) smtp.mailfrom=lists.infradead.org\n\t(client-ip=65.50.211.133; helo=bombadil.infradead.org;\n\tenvelope-from=linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org;\n\treceiver=<UNKNOWN>)","ozlabs.org; dkim=pass (2048-bit key;\n\tunprotected) header.d=lists.infradead.org\n\theader.i=@lists.infradead.org header.b=\"oBY4I3Kx\"; \n\tdkim=fail reason=\"signature verification failed\" (1024-bit key;\n\tunprotected) header.d=linaro.org header.i=@linaro.org\n\theader.b=\"G5qXf/fz\"; dkim-atps=neutral"],"Received":["from bombadil.infradead.org (bombadil.infradead.org\n\t[65.50.211.133])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256\n\tbits)) (No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3yJT7X5pl6z9t42\n\tfor <incoming-imx@patchwork.ozlabs.org>;\n\tSat, 21 Oct 2017 01:43:36 +1100 (AEDT)","from localhost ([127.0.0.1] helo=bombadil.infradead.org)\n\tby bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux))\n\tid 1e5YWH-00051d-Ri; Fri, 20 Oct 2017 14:43:29 +0000","from mail-wm0-x242.google.com ([2a00:1450:400c:c09::242])\n\tby bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux))\n\tid 1e5YWD-0004zJ-QV for linux-arm-kernel@lists.infradead.org;\n\tFri, 20 Oct 2017 14:43:27 +0000","by mail-wm0-x242.google.com with SMTP id u138so22424052wmu.5\n\tfor <linux-arm-kernel@lists.infradead.org>;\n\tFri, 20 Oct 2017 07:43:04 -0700 (PDT)","from [10.44.66.8] ([212.45.67.2])\n\tby smtp.googlemail.com with ESMTPSA id\n\tb9sm1450850edc.81.2017.10.20.07.43.01\n\t(version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);\n\tFri, 20 Oct 2017 07:43:02 -0700 (PDT)"],"DKIM-Signature":["v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;\n\td=lists.infradead.org; s=bombadil.20170209; h=Sender:\n\tContent-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post:\n\tList-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:Date:\n\tMessage-ID:From:References:To:Subject:Reply-To:Content-ID:Content-Description\n\t:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:\n\tList-Owner; bh=0CnPZ5hD1dYaPtw3uZjwUsFozgKlaIQXm7plg8n2QDY=;\n\tb=oBY4I3KxUzrPIl\n\t0Wk/pH199/krSwv0vCwzBEK1coGxZJqV1IGiwrSsh5MNbF8G42XPEoGadIObWa7ddScYYDrFfRwvC\n\t277Kkv57ByhdiEPutZUqTYl+6mD8fquakuxlpiBTbLW40DK9BOr3NRLCZPW+wk7U4GHzaq+4DnNeG\n\tH3u7jwL4A7U6MSml0I56sa/J1WIct/FGugXJXz8xYJakbMoA8exjc6HVP1jDTzVCiOWFHD7xKTl2q\n\ty64knTiYd+v8rxYEhYzjZ83SRz7exbw3uWtjTRyParP+gody8zI1fOwrp8WJzk1kyrntCXseEhNmD\n\tFcQJhqH/k5rx2/p2vgNQ==;","v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google;\n\th=subject:to:cc:references:from:message-id:date:user-agent\n\t:mime-version:in-reply-to:content-language:content-transfer-encoding; \n\tbh=F8y2J28gao+0HWRjk+Mt+iWiFe1cH2tgrlSm2355ZZM=;\n\tb=G5qXf/fzZ0IsjhWgORvEawbRYWkqSd8JkESBTNlH57c4yc6MLfGcESPhHCrSZ9Mw3S\n\tZOLrQbD4SCUPctM1ns+a5S+xRiW2lGtmItsDEr/k0XcDJG/YJqA9+9RDyLoiEx7aL1Vq\n\t6Pz/kTFc2nw5JZxvnVFSkR4p3ywEC+aioffWw="],"X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:subject:to:cc:references:from:message-id:date\n\t:user-agent:mime-version:in-reply-to:content-language\n\t:content-transfer-encoding;\n\tbh=F8y2J28gao+0HWRjk+Mt+iWiFe1cH2tgrlSm2355ZZM=;\n\tb=kX/pXvY6EfdAzEtMH3JmKnBJ3Aq0ME/MKkPvWSki35LZMdXdbE9CQ9RuhIdxW0TIVN\n\tWFXfhW1CykcyzoOKP/LK5r4fh+zY/9+tHkxph1vw5jRX4fbPL1HkvKjC7gsT63SEtmOx\n\tgVN9LZtW6DMeT/Mb2iLp43hz2PNxL5k9P5uMMWnLTdLqA3ZSisaqVVhNS37x3qx0JcyM\n\tzGLrpsBErcnDEagOL+IM+HgaNfpQC9s3Mppq2AMBlHIe4i8megdlt05vMHKGSzqFwVPE\n\tDFYyLwTsuXjPQdZcQ42OR0mBexlmbWAGeszVn8ha8j+QVsX9OJV4E26bs3mDbYtwfd4M\n\tlrvQ==","X-Gm-Message-State":"AMCzsaXVY2Oh6tI4U94eM8MvAFoOQegy3Kvr8APesTSRFUJt9qdJGG6i\n\t7vyZykHra6Un5XMZBnHPDVjCSQ==","X-Google-Smtp-Source":"ABhQp+THl5NrihL0/9TZO2SDJ9vkLOiwwIuGSLfut9sSB4yN39IW/fGu+OuvECqDWMwGb49N/6cqZQ==","X-Received":"by 10.80.168.129 with SMTP id k1mr6795322edc.109.1508510583558; \n\tFri, 20 Oct 2017 07:43:03 -0700 (PDT)","Subject":"Re: [PATCH v3 1/3] interconnect: Add generic on-chip interconnect\n\tAPI","To":"linux-pm@vger.kernel.org, gregkh@linuxfoundation.org","References":"<20170908171830.13813-1-georgi.djakov@linaro.org>\n\t<20170908171830.13813-2-georgi.djakov@linaro.org>","From":"Georgi Djakov <georgi.djakov@linaro.org>","Message-ID":"<a7cf55ba-0475-d74c-f759-a24e58ccde47@linaro.org>","Date":"Fri, 20 Oct 2017 17:43:02 +0300","User-Agent":"Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101\n\tThunderbird/52.4.0","MIME-Version":"1.0","In-Reply-To":"<20170908171830.13813-2-georgi.djakov@linaro.org>","Content-Language":"en-US","X-CRM114-Version":"20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 ","X-CRM114-CacheID":"sfid-20171020_074326_091365_3A57201A ","X-CRM114-Status":"GOOD (  14.72  )","X-Spam-Score":"-2.0 (--)","X-Spam-Report":"SpamAssassin version 3.4.1 on bombadil.infradead.org summary:\n\tContent analysis details:   (-2.0 points)\n\tpts rule name              description\n\t---- ----------------------\n\t--------------------------------------------------\n\t-0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/,\n\tno\n\ttrust [2a00:1450:400c:c09:0:0:0:242 listed in] [list.dnswl.org]\n\t-0.0 SPF_PASS               SPF: sender matches SPF record\n\t-1.9 BAYES_00               BODY: Bayes spam probability is 0 to 1%\n\t[score: 0.0000]\n\t-0.1 DKIM_VALID Message has at least one valid DKIM or DK signature\n\t0.1 DKIM_SIGNED            Message has a DKIM or DK signature,\n\tnot necessarily valid\n\t-0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from\n\tauthor's domain","X-BeenThere":"linux-arm-kernel@lists.infradead.org","X-Mailman-Version":"2.1.21","Precedence":"list","List-Unsubscribe":"<http://lists.infradead.org/mailman/options/linux-arm-kernel>,\n\t<mailto:linux-arm-kernel-request@lists.infradead.org?subject=unsubscribe>","List-Archive":"<http://lists.infradead.org/pipermail/linux-arm-kernel/>","List-Post":"<mailto:linux-arm-kernel@lists.infradead.org>","List-Help":"<mailto:linux-arm-kernel-request@lists.infradead.org?subject=help>","List-Subscribe":"<http://lists.infradead.org/mailman/listinfo/linux-arm-kernel>,\n\t<mailto:linux-arm-kernel-request@lists.infradead.org?subject=subscribe>","Cc":"mark.rutland@arm.com, lorenzo.pieralisi@arm.com, skannan@codeaurora.org, \n\tseansw@qti.qualcomm.com, khilman@baylibre.com, mturquette@baylibre.com, \n\trjw@rjwysocki.net, linux-kernel@vger.kernel.org, davidai@quicinc.com,\n\trobh+dt@kernel.org, linux-arm-msm@vger.kernel.org,\n\tandy.gross@linaro.org, vincent.guittot@linaro.org, sboyd@codeaurora.org,\n\tlinux-arm-kernel@lists.infradead.org","Content-Type":"text/plain; charset=\"us-ascii\"","Content-Transfer-Encoding":"7bit","Sender":"\"linux-arm-kernel\" <linux-arm-kernel-bounces@lists.infradead.org>","Errors-To":"linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org","List-Id":"linux-imx-kernel.lists.patchwork.ozlabs.org"}},{"id":1791788,"web_url":"http://patchwork.ozlabs.org/comment/1791788/","msgid":"<20171020223452.GD1165@minitux>","list_archive_url":null,"date":"2017-10-20T22:34:53","subject":"Re: [PATCH v3 1/3] interconnect: Add generic on-chip interconnect\n\tAPI","submitter":{"id":68398,"url":"http://patchwork.ozlabs.org/api/people/68398/","name":"Bjorn Andersson","email":"bjorn.andersson@linaro.org"},"content":"On Fri 20 Oct 07:43 PDT 2017, Georgi Djakov wrote:\n\n> Hi,\n> \n> On 09/08/2017 08:18 PM, Georgi Djakov wrote:\n> > This patch introduce a new API to get requirements and configure the\n> > interconnect buses across the entire chipset to fit with the current demand.\n> > \n> > The API is using a consumer/provider-based model, where the providers are\n> > the interconnect buses and the consumers could be various drivers.\n> > The consumers request interconnect resources (path) between endpoints and\n> > set the desired constraints on this data flow path. The providers receive\n> > requests from consumers and aggregate these requests for all master-slave\n> > pairs on that path. Then the providers configure each participating in the\n> > topology node according to the requested data flow path, physical links and\n> > constraints. The topology could be complicated and multi-tiered and is SoC\n> > specific.\n> > \n> > Signed-off-by: Georgi Djakov <georgi.djakov@linaro.org>\n> > ---\n> >  Documentation/interconnect/interconnect.rst |  93 +++++++\n> >  drivers/Kconfig                             |   2 +\n> >  drivers/Makefile                            |   1 +\n> >  drivers/interconnect/Kconfig                |  10 +\n> >  drivers/interconnect/Makefile               |   1 +\n> >  drivers/interconnect/interconnect.c         | 382 ++++++++++++++++++++++++++++\n> >  include/linux/interconnect-consumer.h       |  73 ++++++\n> >  include/linux/interconnect-provider.h       | 119 +++++++++\n> >  8 files changed, 681 insertions(+)\n> >  create mode 100644 Documentation/interconnect/interconnect.rst\n> >  create mode 100644 drivers/interconnect/Kconfig\n> >  create mode 100644 drivers/interconnect/Makefile\n> >  create mode 100644 drivers/interconnect/interconnect.c\n> >  create mode 100644 include/linux/interconnect-consumer.h\n> >  create mode 100644 include/linux/interconnect-provider.h\n> \n> Any comments on this patch?\n> \n\nSorry, I still haven't found the time to do a proper review of this yet.\n\n> I am planning to change the prefix that is used for naming for example\n> the functions from \"interconnect_\" to something shorter like icbus_.\n> \n\nThis isn't implementing a bus; if you feel that just ic_ is too short I\nwould suggest naming things inter_. (But keep the full name in the file\nnames)\n\nRegards,\nBjorn","headers":{"Return-Path":"<linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org>","X-Original-To":"incoming-imx@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming-imx@bilbo.ozlabs.org","Authentication-Results":["ozlabs.org;\n\tspf=none (mailfrom) smtp.mailfrom=lists.infradead.org\n\t(client-ip=65.50.211.133; helo=bombadil.infradead.org;\n\tenvelope-from=linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org;\n\treceiver=<UNKNOWN>)","ozlabs.org; dkim=pass (2048-bit key;\n\tunprotected) header.d=lists.infradead.org\n\theader.i=@lists.infradead.org header.b=\"Zlu2ueaC\"; \n\tdkim=fail reason=\"signature verification failed\" (1024-bit key;\n\tunprotected) header.d=linaro.org header.i=@linaro.org\n\theader.b=\"dwHa11cs\"; dkim-atps=neutral"],"Received":["from bombadil.infradead.org (bombadil.infradead.org\n\t[65.50.211.133])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256\n\tbits)) (No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3yJgbx0sjRz9t2t\n\tfor <incoming-imx@patchwork.ozlabs.org>;\n\tSat, 21 Oct 2017 09:35:25 +1100 (AEDT)","from localhost ([127.0.0.1] helo=bombadil.infradead.org)\n\tby bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux))\n\tid 1e5fsv-00026S-B9; Fri, 20 Oct 2017 22:35:21 +0000","from mail-pf0-x241.google.com ([2607:f8b0:400e:c00::241])\n\tby bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux))\n\tid 1e5fsr-0000rR-P6 for linux-arm-kernel@lists.infradead.org;\n\tFri, 20 Oct 2017 22:35:19 +0000","by mail-pf0-x241.google.com with SMTP id b6so12947110pfh.7\n\tfor <linux-arm-kernel@lists.infradead.org>;\n\tFri, 20 Oct 2017 15:34:57 -0700 (PDT)","from minitux (ip68-111-217-79.sd.sd.cox.net. [68.111.217.79])\n\tby smtp.gmail.com with ESMTPSA id\n\tj6sm2848582pgn.68.2017.10.20.15.34.54\n\t(version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256);\n\tFri, 20 Oct 2017 15:34:56 -0700 (PDT)"],"DKIM-Signature":["v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;\n\td=lists.infradead.org; s=bombadil.20170209; h=Sender:\n\tContent-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post:\n\tList-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References:\n\tMessage-ID:Subject:To:From:Date:Reply-To:Content-ID:Content-Description:\n\tResent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:\n\tList-Owner; bh=sbO1dL46q6wnkVRcsRI+TTiZ0VX4BrEeVnmg2t5DwBU=;\n\tb=Zlu2ueaCuicrzk\n\tbVKFB5GUQHS5pYXNllbxhp7GKo2kTrYUYLh2ilWapzug825ckn1bA1tHYVaOb4fnOJnLxTAHR3L+r\n\tiOZ4WeHb5cTTSe6NkR9uqbOnTwZr56sNLdKS7Y+HLfWD2D9dReIw7ECmNv+rAGiABMIaampQfVDLx\n\tXlaHTxil+IpUR190pO21P0UbUYAdpXzct69qTHfqMGbe28Pec0kUtLRaUw/8SRbcq6YTFJ3oAtYIl\n\taeFVUdIB9ONlt9Grdv5mFfd8fV43sHmvTSt/840mwprQrkX3Uw9ZDCW0QLLLc4a6kX5dUvr2HAY8T\n\t7ONVm6QBYgoLVRnXYLWQ==;","v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google;\n\th=date:from:to:cc:subject:message-id:references:mime-version\n\t:content-disposition:in-reply-to:user-agent;\n\tbh=MHrZLBIqtW0FrW6bAg7qgBF9xMVB4kvOjPN6GiGdmac=;\n\tb=dwHa11csDa4kpVDaUlPsqLLDwSFM++D3PItm2dF9FI+lf7L56ViPkzpmHl5egqdXit\n\t2I37GqIA+BGLh50cGZNY5WvC6xQESvU/jaRSnBqLrCIOnLquqXpSIw6DXj1G+CkUkKRI\n\tNmNpIyulzqpI49n0Zz4uoQk9BzfoI9H6lVKAk="],"X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:date:from:to:cc:subject:message-id:references\n\t:mime-version:content-disposition:in-reply-to:user-agent;\n\tbh=MHrZLBIqtW0FrW6bAg7qgBF9xMVB4kvOjPN6GiGdmac=;\n\tb=nfJWMmlVai2uD8rs9O6IkIcpeoaLFgvLq9itzi49IUjBGHiQYFhLMBw2CKqFtxmtyl\n\t2DCghkTVJvRMaWkAocUYP1oaLy27lDIb/O7RRlfnZf9z1MSTF7WsXK0Ngar2TBstmoFy\n\tNZ1t8tmBVWeRwid6wz1/QpTWf6B8Y+jJb91i/kmauId74JPsJmJRqV9ylXpSTUib6A2f\n\t+G1R3EpYeEAz96g3OoAjUKng9GlK8Z2vpeyKXtLBvV7EZnsn3Cq0EgYH3ujGhzEr+B2q\n\tnuiliUbg0Zn0m16PSJVdixXn9wvzTpYmrjFETRaiB18BYkn9B8jZ5k/OD7eedkc3U5Kq\n\t50bQ==","X-Gm-Message-State":"AMCzsaX4y2O8FHaRehbb45IjMACkGStO549y1PId64EPAmlZJM6SzChu\n\t886e7hGQ1seDHfX1XFasu7J30Q==","X-Google-Smtp-Source":"ABhQp+Ro7r/OVerrWEPe15MImq3RQisdVz26Vj4Kk7XJirdDW9aiVEmFba2qZqzAE7EFTmysMN2rhA==","X-Received":"by 10.84.218.200 with SMTP id g8mr5163693plm.23.1508538896836;\n\tFri, 20 Oct 2017 15:34:56 -0700 (PDT)","Date":"Fri, 20 Oct 2017 15:34:53 -0700","From":"Bjorn Andersson <bjorn.andersson@linaro.org>","To":"Georgi Djakov <georgi.djakov@linaro.org>","Subject":"Re: [PATCH v3 1/3] interconnect: Add generic on-chip interconnect\n\tAPI","Message-ID":"<20171020223452.GD1165@minitux>","References":"<20170908171830.13813-1-georgi.djakov@linaro.org>\n\t<20170908171830.13813-2-georgi.djakov@linaro.org>\n\t<a7cf55ba-0475-d74c-f759-a24e58ccde47@linaro.org>","MIME-Version":"1.0","Content-Disposition":"inline","In-Reply-To":"<a7cf55ba-0475-d74c-f759-a24e58ccde47@linaro.org>","User-Agent":"Mutt/1.8.3 (2017-05-23)","X-CRM114-Version":"20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 ","X-CRM114-CacheID":"sfid-20171020_153517_851318_A677FC57 ","X-CRM114-Status":"GOOD (  18.58  )","X-Spam-Score":"-2.0 (--)","X-Spam-Report":"SpamAssassin version 3.4.1 on bombadil.infradead.org summary:\n\tContent analysis details:   (-2.0 points)\n\tpts rule name              description\n\t---- ----------------------\n\t--------------------------------------------------\n\t-0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/,\n\tno\n\ttrust [2607:f8b0:400e:c00:0:0:0:241 listed in] [list.dnswl.org]\n\t-0.0 SPF_PASS               SPF: sender matches SPF record\n\t-1.9 BAYES_00               BODY: Bayes spam probability is 0 to 1%\n\t[score: 0.0000]\n\t-0.1 DKIM_VALID Message has at least one valid DKIM or DK signature\n\t0.1 DKIM_SIGNED            Message has a DKIM or DK signature,\n\tnot necessarily valid\n\t-0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from\n\tauthor's domain","X-BeenThere":"linux-arm-kernel@lists.infradead.org","X-Mailman-Version":"2.1.21","Precedence":"list","List-Unsubscribe":"<http://lists.infradead.org/mailman/options/linux-arm-kernel>,\n\t<mailto:linux-arm-kernel-request@lists.infradead.org?subject=unsubscribe>","List-Archive":"<http://lists.infradead.org/pipermail/linux-arm-kernel/>","List-Post":"<mailto:linux-arm-kernel@lists.infradead.org>","List-Help":"<mailto:linux-arm-kernel-request@lists.infradead.org?subject=help>","List-Subscribe":"<http://lists.infradead.org/mailman/listinfo/linux-arm-kernel>,\n\t<mailto:linux-arm-kernel-request@lists.infradead.org?subject=subscribe>","Cc":"linux-arm-msm@vger.kernel.org, mark.rutland@arm.com,\n\tlorenzo.pieralisi@arm.com, vincent.guittot@linaro.org,\n\tlinux-pm@vger.kernel.org, seansw@qti.qualcomm.com,\n\tgregkh@linuxfoundation.org, mturquette@baylibre.com, rjw@rjwysocki.net,\n\tlinux-kernel@vger.kernel.org, \n\tdavidai@quicinc.com, robh+dt@kernel.org, skannan@codeaurora.org,\n\tkhilman@baylibre.com, andy.gross@linaro.org, sboyd@codeaurora.org,\n\tlinux-arm-kernel@lists.infradead.org","Content-Type":"text/plain; charset=\"us-ascii\"","Content-Transfer-Encoding":"7bit","Sender":"\"linux-arm-kernel\" <linux-arm-kernel-bounces@lists.infradead.org>","Errors-To":"linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org","List-Id":"linux-imx-kernel.lists.patchwork.ozlabs.org"}},{"id":1792327,"web_url":"http://patchwork.ozlabs.org/comment/1792327/","msgid":"<CAEG3pNAbf3hLchrYK+s9RwZ3zF3srkqdbvqPSBMOoGV65TguLQ@mail.gmail.com>","list_archive_url":null,"date":"2017-10-23T02:58:30","subject":"Re: [PATCH v3 1/3] interconnect: Add generic on-chip interconnect\n\tAPI","submitter":{"id":66738,"url":"http://patchwork.ozlabs.org/api/people/66738/","name":"Michael Turquette","email":"mturquette@baylibre.com"},"content":"Hi all,\n\nOn Fri, Oct 20, 2017 at 3:34 PM, Bjorn Andersson\n<bjorn.andersson@linaro.org> wrote:\n> On Fri 20 Oct 07:43 PDT 2017, Georgi Djakov wrote:\n>\n>> Hi,\n>>\n>> On 09/08/2017 08:18 PM, Georgi Djakov wrote:\n>> > This patch introduce a new API to get requirements and configure the\n>> > interconnect buses across the entire chipset to fit with the current demand.\n>> >\n>> > The API is using a consumer/provider-based model, where the providers are\n>> > the interconnect buses and the consumers could be various drivers.\n>> > The consumers request interconnect resources (path) between endpoints and\n>> > set the desired constraints on this data flow path. The providers receive\n>> > requests from consumers and aggregate these requests for all master-slave\n>> > pairs on that path. Then the providers configure each participating in the\n>> > topology node according to the requested data flow path, physical links and\n>> > constraints. The topology could be complicated and multi-tiered and is SoC\n>> > specific.\n>> >\n>> > Signed-off-by: Georgi Djakov <georgi.djakov@linaro.org>\n>> > ---\n>> >  Documentation/interconnect/interconnect.rst |  93 +++++++\n>> >  drivers/Kconfig                             |   2 +\n>> >  drivers/Makefile                            |   1 +\n>> >  drivers/interconnect/Kconfig                |  10 +\n>> >  drivers/interconnect/Makefile               |   1 +\n>> >  drivers/interconnect/interconnect.c         | 382 ++++++++++++++++++++++++++++\n>> >  include/linux/interconnect-consumer.h       |  73 ++++++\n>> >  include/linux/interconnect-provider.h       | 119 +++++++++\n>> >  8 files changed, 681 insertions(+)\n>> >  create mode 100644 Documentation/interconnect/interconnect.rst\n>> >  create mode 100644 drivers/interconnect/Kconfig\n>> >  create mode 100644 drivers/interconnect/Makefile\n>> >  create mode 100644 drivers/interconnect/interconnect.c\n>> >  create mode 100644 include/linux/interconnect-consumer.h\n>> >  create mode 100644 include/linux/interconnect-provider.h\n>>\n>> Any comments on this patch?\n>>\n>\n> Sorry, I still haven't found the time to do a proper review of this yet.\n\nSame.\n\n>\n>> I am planning to change the prefix that is used for naming for example\n>> the functions from \"interconnect_\" to something shorter like icbus_.\n>>\n>\n> This isn't implementing a bus; if you feel that just ic_ is too short I\n> would suggest naming things inter_. (But keep the full name in the file\n> names)\n\nNot trying to bikeshed too much, but how about icc_ for \"interconnect\ncontroller\"? No idea if that is a hash collision with other in-kernel\napis.\n\nJust \"ic_\" looks to me like \"integrated circuit\".\n\nRegards,\nMike\n\n>\n> Regards,\n> Bjorn","headers":{"Return-Path":"<linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org>","X-Original-To":"incoming-imx@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming-imx@bilbo.ozlabs.org","Authentication-Results":["ozlabs.org;\n\tspf=none (mailfrom) smtp.mailfrom=lists.infradead.org\n\t(client-ip=65.50.211.133; helo=bombadil.infradead.org;\n\tenvelope-from=linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org;\n\treceiver=<UNKNOWN>)","ozlabs.org; dkim=pass (2048-bit key;\n\tunprotected) header.d=lists.infradead.org\n\theader.i=@lists.infradead.org header.b=\"frXSQskT\"; \n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n\tunprotected) header.d=baylibre-com.20150623.gappssmtp.com\n\theader.i=@baylibre-com.20150623.gappssmtp.com header.b=\"CPvsb8sf\"; \n\tdkim-atps=neutral"],"Received":["from bombadil.infradead.org (bombadil.infradead.org\n\t[65.50.211.133])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256\n\tbits)) (No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3yL1Mk3w0Tz9t48\n\tfor <incoming-imx@patchwork.ozlabs.org>;\n\tMon, 23 Oct 2017 13:59:30 +1100 (AEDT)","from localhost ([127.0.0.1] helo=bombadil.infradead.org)\n\tby bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux))\n\tid 1e6Sxa-0001pn-O0; Mon, 23 Oct 2017 02:59:26 +0000","from mail-oi0-x242.google.com ([2607:f8b0:4003:c06::242])\n\tby bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux))\n\tid 1e6SxW-0001nF-S9 for linux-arm-kernel@lists.infradead.org;\n\tMon, 23 Oct 2017 02:59:25 +0000","by mail-oi0-x242.google.com with SMTP id h6so28535371oia.10\n\tfor <linux-arm-kernel@lists.infradead.org>;\n\tSun, 22 Oct 2017 19:59:01 -0700 (PDT)","by 10.157.74.100 with HTTP; Sun, 22 Oct 2017 19:58:30 -0700 (PDT)"],"DKIM-Signature":["v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;\n\td=lists.infradead.org; s=bombadil.20170209; h=Sender:\n\tContent-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post:\n\tList-Archive:List-Unsubscribe:List-Id:To:Subject:Message-ID:Date:From:\n\tReferences:In-Reply-To:MIME-Version:Reply-To:Content-ID:Content-Description:\n\tResent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:\n\tList-Owner; bh=u+uMCcz5EYp6oa79SVOX2frcp/EvcNJSbSVyLbOSfa8=;\n\tb=frXSQskTpfwzGq\n\tHNQgZhkW9s519nrGG5yScu3cFbF+mCiSUf764DB4PvY3580+GA27jydL+KdyaQ9rQmnPu/UTm1TTN\n\thMERH7HSnc3RMv408e49vwYo6Np4J+IT/68Bh+0qSjA9+kfIthUXJmXGZw+GugxMnM6CBIpj8Z2UN\n\tjBFoq7gcVcQ4JYglXv0x+xa0uJ8ZSNjz6PG7pXWl9yIz0Hp7wQTJOa3bmTwDJZYbBePHHJPyw0cf6\n\t1IIQEA3qcT0MbcBRzVjVDtpy1/5k/NvJ5C4i3p49aF6MrkddHKLiUJNBYmGpy7dMSNAUAzofv5PSt\n\tuCoNjLh907s3LSZ/JZ8Q==;","v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=baylibre-com.20150623.gappssmtp.com; s=20150623;\n\th=mime-version:in-reply-to:references:from:date:message-id:subject:to\n\t:cc; bh=ccLxztHW1cxESx4DRB8GcUqss5py9n44R5snnOvAW+E=;\n\tb=CPvsb8sfdrCTco2Bqp8dS5NqhRXwRQf+NIGvPL3Vd0XWulxIxORzEHsfSJntdX9sXJ\n\tL1Ii1rHPlYM86seuKqRiqdHC4ZfYJH9wkZgaJK8OqhxFZ3i6AzrKlqPJ8bezYcXGFZ3n\n\tJCRnIbnKozbLvVAFIDbBlcoFXEinJB0Psu5xd7unAfyeJMKy9JLvuaMlB4cLc+E2nXjC\n\tWft5FFl/psIH9BC/LujLP41l6woDuaYiGPAiyMKQwed5tdBbeticEldjv/+mqWdVdBIm\n\tnvg9JCL/3NWFUC6qjcQiVqDGYs9Mu9a66yVa85Rgd12ewFr/y3KVQTPKjrx5gSWiuCnN\n\tnB9Q=="],"X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:mime-version:in-reply-to:references:from:date\n\t:message-id:subject:to:cc;\n\tbh=ccLxztHW1cxESx4DRB8GcUqss5py9n44R5snnOvAW+E=;\n\tb=ZuGgDsajgl1AE3Xb/nZNQUJ+cCZ97KYnBV1Jw2WHNZDdiu+eWzht1zndOChqYgc4xu\n\td7+yTFweRo5BgoM2EHPYI2gphIRvgkMr9LWUgmW6wyQWPPvzYhhgCTEuDSOmloREGim7\n\tAcPo44gqSj3G8ICKjhUpBkyQUjx3ii7tjLoLxhj3/M0tZqdttXNfhQL4lor8Njixp/Nq\n\t2EOTkyAMnOsKzMb1hNHVIcDmQO4TEHgPrs8wE9TLbgiymTWH1XGELSEJQwc5RnU67rSa\n\tHFL+kObhOUKYkCeV90zWfxtdpAIWA5oTgaBJ9S18z4MXi4gcSl+9xRBLZUnpQm0ksJI5\n\tFfIA==","X-Gm-Message-State":"AMCzsaVXrOPwGMlrtKaHp4DfHvXNEhFvMt/qznWPjYhoYb/SlT4t9HDd\n\tRRciW6F7DNTmDe64xdBVkSLqvytS6Q83btSVLejaLw==","X-Google-Smtp-Source":"ABhQp+TJjg3+U1USvSvvt+baJbpTQHwlh8ZineSK5hzKZwgi9ZAqMrucnknBLCdvdBxVEtj1p+SXC0fVPdlOPh9Z2PA=","X-Received":"by 10.157.54.203 with SMTP id s11mr6839765otd.13.1508727540669; \n\tSun, 22 Oct 2017 19:59:00 -0700 (PDT)","MIME-Version":"1.0","In-Reply-To":"<20171020223452.GD1165@minitux>","References":"<20170908171830.13813-1-georgi.djakov@linaro.org>\n\t<20170908171830.13813-2-georgi.djakov@linaro.org>\n\t<a7cf55ba-0475-d74c-f759-a24e58ccde47@linaro.org>\n\t<20171020223452.GD1165@minitux>","From":"Michael Turquette <mturquette@baylibre.com>","Date":"Sun, 22 Oct 2017 19:58:30 -0700","Message-ID":"<CAEG3pNAbf3hLchrYK+s9RwZ3zF3srkqdbvqPSBMOoGV65TguLQ@mail.gmail.com>","Subject":"Re: [PATCH v3 1/3] interconnect: Add generic on-chip interconnect\n\tAPI","To":"Bjorn Andersson <bjorn.andersson@linaro.org>","X-CRM114-Version":"20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 ","X-CRM114-CacheID":"sfid-20171022_195922_962908_FF5FD4DA ","X-CRM114-Status":"GOOD (  19.31  )","X-Spam-Score":"-1.9 (-)","X-Spam-Report":"SpamAssassin version 3.4.1 on bombadil.infradead.org summary:\n\tContent analysis details:   (-1.9 points)\n\tpts rule name              description\n\t---- ----------------------\n\t--------------------------------------------------\n\t-0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/,\n\tlow\n\ttrust [2607:f8b0:4003:c06:0:0:0:242 listed in] [list.dnswl.org]\n\t0.7 SPF_SOFTFAIL SPF: sender does not match SPF record (softfail)\n\t-1.9 BAYES_00               BODY: Bayes spam probability is 0 to 1%\n\t[score: 0.0000]\n\t-0.1 DKIM_VALID Message has at least one valid DKIM or DK signature\n\t0.1 DKIM_SIGNED            Message has a DKIM or DK signature,\n\tnot necessarily valid","X-BeenThere":"linux-arm-kernel@lists.infradead.org","X-Mailman-Version":"2.1.21","Precedence":"list","List-Unsubscribe":"<http://lists.infradead.org/mailman/options/linux-arm-kernel>,\n\t<mailto:linux-arm-kernel-request@lists.infradead.org?subject=unsubscribe>","List-Archive":"<http://lists.infradead.org/pipermail/linux-arm-kernel/>","List-Post":"<mailto:linux-arm-kernel@lists.infradead.org>","List-Help":"<mailto:linux-arm-kernel-request@lists.infradead.org?subject=help>","List-Subscribe":"<http://lists.infradead.org/mailman/listinfo/linux-arm-kernel>,\n\t<mailto:linux-arm-kernel-request@lists.infradead.org?subject=subscribe>","Cc":"Mark Rutland <mark.rutland@arm.com>, Stephen Boyd <sboyd@codeaurora.org>,\n\tlorenzo.pieralisi@arm.com, Vincent Guittot <vincent.guittot@linaro.org>, \n\tLinux PM list <linux-pm@vger.kernel.org>, \"Sweeney,\n\tSean\" <seansw@qti.qualcomm.com>,\n\tGreg Kroah-Hartman <gregkh@linuxfoundation.org>,\n\tlinux-arm-msm@vger.kernel.org, \"Rafael J. Wysocki\" <rjw@rjwysocki.net>,\n\tLinux Kernel Mailing List <linux-kernel@vger.kernel.org>, \"Dai,\n\tDavid\" <davidai@quicinc.com>, Rob Herring <robh+dt@kernel.org>,\n\tSaravana Kannan <skannan@codeaurora.org>,\n\tKevin Hilman <khilman@baylibre.com>, Andy Gross <andy.gross@linaro.org>,\n\tGeorgi Djakov <georgi.djakov@linaro.org>, \n\t\"Stephen Boyd <sboyd@codeaurora.org>,\n\tEmilio Lopez <emilio@elopez.com.ar>, \n\tHans de Goede <hdegoede@redhat.com>,\n\tlinux-clk <linux-clk@vger.kernel.org>, \n\tlinux-arm-kernel\" <linux-arm-kernel@lists.infradead.org>","Content-Type":"text/plain; charset=\"us-ascii\"","Content-Transfer-Encoding":"7bit","Sender":"\"linux-arm-kernel\" <linux-arm-kernel-bounces@lists.infradead.org>","Errors-To":"linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org","List-Id":"linux-imx-kernel.lists.patchwork.ozlabs.org"}},{"id":1797683,"web_url":"http://patchwork.ozlabs.org/comment/1797683/","msgid":"<CAHLCerOKEY_My9OKDMV_ns3dTAgBMPkRS2hdS7iYwFoX5rxOPA@mail.gmail.com>","list_archive_url":null,"date":"2017-11-02T07:28:26","subject":"Re: [PATCH v3 1/3] interconnect: Add generic on-chip interconnect\n\tAPI","submitter":{"id":3193,"url":"http://patchwork.ozlabs.org/api/people/3193/","name":"Amit Kucheria","email":"amit.kucheria@verdurent.com"},"content":"On Fri, Sep 8, 2017 at 10:48 PM, Georgi Djakov <georgi.djakov@linaro.org> wrote:\n> This patch introduce a new API to get requirements and configure the\n> interconnect buses across the entire chipset to fit with the current demand.\n>\n> The API is using a consumer/provider-based model, where the providers are\n> the interconnect buses and the consumers could be various drivers.\n> The consumers request interconnect resources (path) between endpoints and\n> set the desired constraints on this data flow path. The providers receive\n> requests from consumers and aggregate these requests for all master-slave\n> pairs on that path. Then the providers configure each participating in the\n> topology node according to the requested data flow path, physical links and\n> constraints. The topology could be complicated and multi-tiered and is SoC\n> specific.\n>\n> Signed-off-by: Georgi Djakov <georgi.djakov@linaro.org>\n> ---\n>  Documentation/interconnect/interconnect.rst |  93 +++++++\n>  drivers/Kconfig                             |   2 +\n>  drivers/Makefile                            |   1 +\n>  drivers/interconnect/Kconfig                |  10 +\n>  drivers/interconnect/Makefile               |   1 +\n>  drivers/interconnect/interconnect.c         | 382 ++++++++++++++++++++++++++++\n>  include/linux/interconnect-consumer.h       |  73 ++++++\n>  include/linux/interconnect-provider.h       | 119 +++++++++\n>  8 files changed, 681 insertions(+)\n>  create mode 100644 Documentation/interconnect/interconnect.rst\n>  create mode 100644 drivers/interconnect/Kconfig\n>  create mode 100644 drivers/interconnect/Makefile\n>  create mode 100644 drivers/interconnect/interconnect.c\n>  create mode 100644 include/linux/interconnect-consumer.h\n>  create mode 100644 include/linux/interconnect-provider.h\n>\n> diff --git a/Documentation/interconnect/interconnect.rst b/Documentation/interconnect/interconnect.rst\n> new file mode 100644\n> index 000000000000..b057e9c12d70\n> --- /dev/null\n> +++ b/Documentation/interconnect/interconnect.rst\n> @@ -0,0 +1,93 @@\n> +=====================================\n> +GENERIC SYSTEM INTERCONNECT SUBSYSTEM\n> +=====================================\n> +\n> +Introduction\n> +------------\n> +\n> +This framework is designed to provide a standard kernel interface to control\n> +the settings of the interconnects on a SoC. These settings can be throughput,\n> +latency and priority between multiple interconnected devices. This can be\n> +controlled dynamically in order to save power or provide maximum performance.\n> +\n> +The interconnect bus is a hardware with configurable parameters, which can be\n> +set on a data path according to the requests received from various drivers.\n> +An example of interconnect buses are the interconnects between various\n> +components on chipsets. There can be multiple interconnects on a SoC that can\n> +be multi-tiered.\n> +\n> +Below is a simplified diagram of a real-world SoC interconnect bus topology.\n> +\n> +::\n> +\n> + +----------------+    +----------------+\n> + | HW Accelerator |--->|      M NoC     |<---------------+\n> + +----------------+    +----------------+                |\n> +                         |      |                    +------------+\n> +  +-----+  +-------------+      V       +------+     |            |\n> +  | DDR |  |                +--------+  | PCIe |     |            |\n> +  +-----+  |                | Slaves |  +------+     |            |\n> +    ^ ^    |                +--------+     |         |   C NoC    |\n> +    | |    V                               V         |            |\n> + +------------------+   +------------------------+   |            |   +-----+\n> + |                  |-->|                        |-->|            |-->| CPU |\n> + |                  |-->|                        |<--|            |   +-----+\n> + |     Mem NoC      |   |         S NoC          |   +------------+\n> + |                  |<--|                        |---------+    |\n> + |                  |<--|                        |<------+ |    |   +--------+\n> + +------------------+   +------------------------+       | |    +-->| Slaves |\n> +   ^  ^    ^    ^          ^                             | |        +--------+\n> +   |  |    |    |          |                             | V\n> + +------+  |  +-----+   +-----+  +---------+   +----------------+   +--------+\n> + | CPUs |  |  | GPU |   | DSP |  | Masters |-->|       P NoC    |-->| Slaves |\n> + +------+  |  +-----+   +-----+  +---------+   +----------------+   +--------+\n> +           |\n> +       +-------+\n> +       | Modem |\n> +       +-------+\n> +\n> +Terminology\n> +-----------\n> +\n> +Interconnect provider is the software definition of the interconnect hardware.\n> +The interconnect providers on the above diagram are M NoC, S NoC, C NoC and Mem\n> +NoC.\n> +\n> +Interconnect node is the software definition of the interconnect hardware\n> +port. Each interconnect provider consists of multiple interconnect nodes,\n> +which are connected to other SoC components including other interconnect\n> +providers. The point on the diagram where the CPUs connects to the memory is\n> +called an interconnect node, which belongs to the Mem NoC interconnect provider.\n> +\n> +Interconnect endpoits are the first or the last element of the path. Every\n\ns/endpoits/endpoints\n\n> +endpoint is a node, but not every node is an endpoint.\n> +\n> +Interconnect path is everything between two endpoints including all the nodes\n> +that have to be traversed to reach from a source to destination node. It may\n> +include multiple master-slave pairs across several interconnect providers.\n> +\n> +Interconnect consumers are the entities which make use of the data paths exposed\n> +by the providers. The consumers send requests to providers requesting various\n> +throughput, latency and priority. Usually the consumers are device drivers, that\n> +send request based on their needs. An example for a consumer is a a video\n\ntypo: is a video\n\n> +decoder that supports various formats and image sizes.\n> +\n> +Interconnect providers\n> +----------------------\n> +\n> +Interconnect provider is an entity that implements methods to initialize and\n> +configure a interconnect bus hardware. The interconnect provider driver should\n> +be registered with the interconnect provider core.\n> +\n> +The interconnect framework provider API functions are documented in\n> +.. kernel-doc:: include/linux/interconnect-provider.h\n> +\n> +Interconnect consumers\n> +----------------------\n> +\n> +Interconnect consumers are the clients which use the interconnect APIs to\n> +get paths between endpoints and set their bandwidth/latency/QoS requirements\n> +for these interconnect paths.\n> +\n> +The interconnect framework consumer API functions are documented in\n> +.. kernel-doc:: include/linux/interconnect-consumer.h\n> diff --git a/drivers/Kconfig b/drivers/Kconfig\n> index 505c676fa9c7..930ecde654d5 100644\n> --- a/drivers/Kconfig\n> +++ b/drivers/Kconfig\n> @@ -208,4 +208,6 @@ source \"drivers/tee/Kconfig\"\n>\n>  source \"drivers/mux/Kconfig\"\n>\n> +source \"drivers/interconnect/Kconfig\"\n> +\n>  endmenu\n> diff --git a/drivers/Makefile b/drivers/Makefile\n> index dfdcda00bfe3..a114b679bb5b 100644\n> --- a/drivers/Makefile\n> +++ b/drivers/Makefile\n> @@ -182,3 +182,4 @@ obj-$(CONFIG_FPGA)          += fpga/\n>  obj-$(CONFIG_FSI)              += fsi/\n>  obj-$(CONFIG_TEE)              += tee/\n>  obj-$(CONFIG_MULTIPLEXER)      += mux/\n> +obj-$(CONFIG_INTERCONNECT)     += interconnect/\n> diff --git a/drivers/interconnect/Kconfig b/drivers/interconnect/Kconfig\n> new file mode 100644\n> index 000000000000..1e50e951cdc1\n> --- /dev/null\n> +++ b/drivers/interconnect/Kconfig\n> @@ -0,0 +1,10 @@\n> +menuconfig INTERCONNECT\n> +       tristate \"On-Chip Interconnect management support\"\n> +       help\n> +         Support for management of the on-chip interconnects.\n> +\n> +         This framework is designed to provide a generic interface for\n> +          managing the interconnects in a SoC.\n> +\n> +         If unsure, say no.\n> +\n> diff --git a/drivers/interconnect/Makefile b/drivers/interconnect/Makefile\n> new file mode 100644\n> index 000000000000..d9da6a6c3560\n> --- /dev/null\n> +++ b/drivers/interconnect/Makefile\n> @@ -0,0 +1 @@\n> +obj-$(CONFIG_INTERCONNECT)  += interconnect.o\n> diff --git a/drivers/interconnect/interconnect.c b/drivers/interconnect/interconnect.c\n> new file mode 100644\n> index 000000000000..94e2a9f01545\n> --- /dev/null\n> +++ b/drivers/interconnect/interconnect.c\n> @@ -0,0 +1,382 @@\n> +/*\n> + * Copyright (c) 2017, Linaro Ltd.\n> + *\n> + * This software is licensed under the terms of the GNU General Public\n> + * License version 2, as published by the Free Software Foundation, and\n> + * may be copied, distributed, and modified under those terms.\n> + *\n> + * This program is distributed in the hope that it will be useful,\n> + * but WITHOUT ANY WARRANTY; without even the implied warranty of\n> + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n> + * GNU General Public License for more details.\n> + */\n> +\n> +#include <linux/device.h>\n> +#include <linux/init.h>\n> +#include <linux/interconnect-consumer.h>\n> +#include <linux/interconnect-provider.h>\n> +#include <linux/list.h>\n> +#include <linux/module.h>\n> +#include <linux/mutex.h>\n> +#include <linux/slab.h>\n> +\n> +static DEFINE_MUTEX(interconnect_provider_list_mutex);\n> +static LIST_HEAD(interconnect_provider_list);\n> +\n> +/**\n> + * struct interconnect_path - interconnect path structure\n> + * @num_nodes: number of hops (nodes)\n> + * @reqs: array of the requests applicable to this path of nodes\n> + */\n> +struct interconnect_path {\n> +       size_t num_nodes;\n> +       struct interconnect_req reqs[0];\n> +};\n\n<snip>\n\n> +/**\n> + * interconnect_set() - set constraints on a path between two endpoints\n> + * @path: reference to the path returned by interconnect_get()\n> + * @creq: request from the consumer, containing its requirements\n> + *\n> + * This function is used by an interconnect consumer to express its own needs\n> + * in term of bandwidth and QoS for a previously requested path between two\n> + * endpoints. The requests are aggregated and each node is updated accordingly.\n> + *\n> + * Returns 0 on success, or an approproate error code otherwise.\n> + */\n> +int interconnect_set(struct interconnect_path *path,\n> +                    struct interconnect_creq *creq)\n> +{\n> +       struct interconnect_node *next, *prev = NULL;\n> +       size_t i;\n> +       int ret = 0;\n> +\n> +       for (i = 0; i < path->num_nodes; i++, prev = next) {\n> +               next = path->reqs[i].node;\n> +\n> +               /*\n> +                * Both endpoints should be valid and master-slave pairs of\n\nLosing the 'and' improves readability.\n\n> +                * the same interconnect provider that will be configured.\n> +                */\n> +               if (!next || !prev)\n> +                       continue;\n> +               if (next->icp != prev->icp)\n> +                       continue;\n> +\n> +               mutex_lock(&next->icp->lock);\n> +\n> +               /* update the consumer request for this path */\n> +               path->reqs[i].avg_bw = creq->avg_bw;\n> +               path->reqs[i].peak_bw = creq->peak_bw;\n> +\n> +               /* aggregate all requests */\n> +               interconnect_aggregate_icn(next);\n> +               interconnect_aggregate_icp(next->icp);\n> +\n> +               if (next->icp->ops->set) {\n> +                       /* commit the aggregated constraints */\n> +                       ret = next->icp->ops->set(prev, next, &next->icp->creq);\n> +               }\n\nA comment here on how the contraints are propagated along the path\nwould be good. At the moment, this seems to go to each provider along\nthe path, take the provider lock and set the new constraints, then\nmove on to the next provider. Is there any need to make the changes\nalong the entire path \"atomic\"?\n\nI'm trying to understand what happens in the case where a new request\ncomes along while the previous path is still be traversed.\n\n> +               mutex_unlock(&next->icp->lock);\n> +               if (ret)\n> +                       goto out;\n> +       }\n> +\n> +out:\n> +       return ret;\n> +}\n> +\n> +/**\n> + * interconnect_get() - return a handle for path between two endpoints\n\nThis is not used currently by the msm8916 platform driver? Is this\nexpected to be called by leaf device drivers or by higher layer bus\ndrivers? I suspect a mix of the two, but an example would be nice.\n\n> + * @sdev: source device identifier\n> + * @sid: source device port id\n> + * @ddev: destination device identifier\n> + * @did: destination device port id\n> + *\n> + * This function will search for a path between two endpoints and return an\n> + * interconnect_path handle on success. Use interconnect_put() to release\n> + * constraints when the they are not needed anymore.\n> + *\n> + * Return: interconnect_path pointer on success, or ERR_PTR() on error\n> + */\n> +struct interconnect_path *interconnect_get(const char *sdev, const int sid,\n> +                                          const char *ddev, const int did)\n> +{\n> +       struct interconnect_node *src, *dst;\n> +       struct interconnect_path *path;\n> +       int ret;\n> +\n> +       src = node_find(sdev, sid);\n> +       if (IS_ERR(src))\n> +               return ERR_CAST(src);\n> +\n> +       dst = node_find(ddev, did);\n> +       if (IS_ERR(dst))\n> +               return ERR_CAST(dst);\n> +\n> +       /* TODO: cache the path */\n> +       path = path_find(src, dst);\n> +       if (IS_ERR(path)) {\n> +               pr_err(\"error finding path between %p and %p (%ld)\\n\",\n> +                      src, dst, PTR_ERR(path));\n> +               return path;\n> +       }\n> +\n> +       ret = path_init(path);\n> +       if (ret)\n> +               return ERR_PTR(ret);\n> +\n> +       return path;\n> +}\n> +EXPORT_SYMBOL_GPL(interconnect_get);\n> +\n> +/**\n> + * interconnect_put() - release the reference to the interconnect_path\n> + *\n> + * @path: interconnect path\n> + *\n> + * Use this function to release the path and free the memory when setting\n> + * constraints on the path is no longer needed.\n> + */\n> +void interconnect_put(struct interconnect_path *path)\n> +{\n> +       struct interconnect_creq creq = { 0, 0 };\n> +       struct interconnect_node *node;\n> +       size_t i;\n> +       int ret;\n> +\n> +       if (!path || WARN_ON_ONCE(IS_ERR(path)))\n> +               return;\n> +\n> +       for (i = 0; i < path->num_nodes; i++) {\n> +               node = path->reqs[i].node;\n> +\n> +               /*\n> +                * Remove the constraints from the path,\n> +                * update the nodes and free the memory\n> +                */\n> +               ret = interconnect_set(path, &creq);\n> +               if (ret)\n> +                       pr_err(\"%s error %d\\n\", __func__, ret);\n> +\n> +               mutex_lock(&node->icp->lock);\n> +               node->icp->users--;\n> +               mutex_unlock(&node->icp->lock);\n> +       }\n> +\n> +       kfree(path);\n> +}\n> +EXPORT_SYMBOL_GPL(interconnect_put);\n> +\n> +/**\n> + * interconnect_add_provider() - add a new interconnect provider\n> + * @icp: the interconnect provider that will be added into topology\n> + *\n> + * Return: 0 on success, or an error code otherwise\n> + */\n> +int interconnect_add_provider(struct icp *icp)\n> +{\n> +       if (!icp)\n> +               return -EINVAL;\n> +\n> +       if (!icp->ops->set) {\n> +               dev_err(icp->dev, \"%s: .set is not implemented\\n\", __func__);\n> +               return -EINVAL;\n> +       }\n> +\n> +       mutex_lock(&interconnect_provider_list_mutex);\n> +       mutex_init(&icp->lock);\n> +       list_add(&icp->icp_list, &interconnect_provider_list);\n> +       mutex_unlock(&interconnect_provider_list_mutex);\n> +\n> +       dev_info(icp->dev, \"interconnect provider is added to topology\\n\");\n> +\n> +       return 0;\n> +}\n> +EXPORT_SYMBOL_GPL(interconnect_add_provider);\n> +\n> +/**\n> + * interconnect_del_provider() - delete previously added interconnect provider\n> + * @icp: the interconnect provider that will be removed from topology\n> + *\n> + * Return: 0 on success, or an error code otherwise\n> + */\n> +int interconnect_del_provider(struct icp *icp)\n> +{\n> +       mutex_lock(&icp->lock);\n> +       if (icp->users) {\n> +               mutex_unlock(&icp->lock);\n> +               return -EBUSY;\n> +       }\n> +       mutex_unlock(&icp->lock);\n> +\n> +       mutex_lock(&interconnect_provider_list_mutex);\n> +       list_del(&icp->icp_list);\n> +       mutex_unlock(&interconnect_provider_list_mutex);\n> +\n> +       return 0;\n> +}\n> +EXPORT_SYMBOL_GPL(interconnect_del_provider);\n> +\n> +MODULE_AUTHOR(\"Georgi Djakov <georgi.djakov@linaro.org\");\n> +MODULE_DESCRIPTION(\"Interconnect Driver Core\");\n> +MODULE_LICENSE(\"GPL v2\");\n> diff --git a/include/linux/interconnect-consumer.h b/include/linux/interconnect-consumer.h\n> new file mode 100644\n> index 000000000000..6e71bf7a63c0\n> --- /dev/null\n> +++ b/include/linux/interconnect-consumer.h\n> @@ -0,0 +1,73 @@\n> +/*\n> + * Copyright (c) 2017, Linaro Ltd.\n> + *\n> + * This software is licensed under the terms of the GNU General Public\n> + * License version 2, as published by the Free Software Foundation, and\n> + * may be copied, distributed, and modified under those terms.\n> + *\n> + * This program is distributed in the hope that it will be useful,\n> + * but WITHOUT ANY WARRANTY; without even the implied warranty of\n> + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n> + * GNU General Public License for more details.\n> + */\n> +\n> +#ifndef _LINUX_INTERCONNECT_CONSUMER_H\n> +#define _LINUX_INTERCONNECT_CONSUMER_H\n> +\n> +struct interconnect_node;\n> +struct interconnect_path;\n> +\n> +#if IS_ENABLED(CONFIG_INTERCONNECT)\n> +\n> +struct interconnect_path *interconnect_get(const char *sdev, const int sid,\n> +                                          const char *ddev, const int did);\n> +\n> +void interconnect_put(struct interconnect_path *path);\n> +\n> +/**\n> + * struct creq - interconnect consumer request\n> + * @avg_bw: the average requested bandwidth (over longer period of time) in kbps\n> + * @peak_bw: the peak (maximum) bandwidth in kpbs\n> + */\n> +struct interconnect_creq {\n> +       u32 avg_bw;\n> +       u32 peak_bw;\n> +};\n> +\n> +/**\n> + * interconnect_set() - set constraints on a path between two endpoints\n> + * @path: reference to the path returned by interconnect_get()\n> + * @creq: request from the consumer, containing its requirements\n> + *\n> + * This function is used by an interconnect consumer to express its own needs\n> + * in term of bandwidth and QoS for a previously requested path between two\n> + * endpoints. The requests are aggregated and each node is updated accordingly.\n> + *\n> + * Returns 0 on success, or an approproate error code otherwise.\n> + */\n> +int interconnect_set(struct interconnect_path *path,\n> +                    struct interconnect_creq *creq);\n> +\n> +#else\n> +\n> +inline struct interconnect_path *interconnect_get(const char *sdev,\n> +                                                        const int sid,\n> +                                                        const char *ddev,\n> +                                                        const int did)\n> +{\n> +       return ERR_PTR(-ENOTSUPP);\n> +}\n> +\n> +inline void interconnect_put(struct interconnect_path *path)\n> +{\n> +}\n> +\n> +inline int interconnect_set(struct interconnect_path *path,\n> +                           struct interconnect_creq *creq);\n> +{\n> +       return -ENOTSUPP\n> +}\n> +\n> +#endif /* CONFIG_INTERCONNECT */\n> +\n> +#endif /* _LINUX_INTERCONNECT_CONSUMER_H */\n> diff --git a/include/linux/interconnect-provider.h b/include/linux/interconnect-provider.h\n> new file mode 100644\n> index 000000000000..6cf6f6a79846\n> --- /dev/null\n> +++ b/include/linux/interconnect-provider.h\n> @@ -0,0 +1,119 @@\n> +/*\n> + * Copyright (c) 2017, Linaro Ltd.\n> + *\n> + * This software is licensed under the terms of the GNU General Public\n> + * License version 2, as published by the Free Software Foundation, and\n> + * may be copied, distributed, and modified under those terms.\n> + *\n> + * This program is distributed in the hope that it will be useful,\n> + * but WITHOUT ANY WARRANTY; without even the implied warranty of\n> + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n> + * GNU General Public License for more details.\n> + */\n> +\n> +#ifndef _LINUX_INTERCONNECT_PROVIDER_H\n> +#define _LINUX_INTERCONNECT_PROVIDER_H\n> +\n> +#include <linux/interconnect-consumer.h>\n> +\n> +/**\n> + * struct icp_ops - platform specific callback operations for interconnect\n> + * providers that will be called from drivers\n> + *\n> + * @set: set constraints on interconnect\n> + */\n> +struct icp_ops {\n> +       int (*set)(struct interconnect_node *src, struct interconnect_node *dst,\n> +                  struct interconnect_creq *creq);\n> +};\n> +\n> +/**\n> + * struct icp - interconnect provider (controller) entity that might\n> + * provide multiple interconnect controls\n> + *\n> + * @icp_list: list of the registered interconnect providers\n> + * @nodes: internal list of the interconnect provider nodes\n> + * @ops: pointer to device specific struct icp_ops\n> + * @dev: the device this interconnect provider belongs to\n> + * @lock: a lock to protect creq and users\n> + * @creq: the actual state of constraints for this interconnect provider\n> + * @users: count of active users\n> + * @data: pointer to private data\n> + */\n> +struct icp {\n> +       struct list_head        icp_list;\n> +       struct list_head        nodes;\n> +       const struct icp_ops    *ops;\n> +       struct device           *dev;\n> +       struct mutex            lock;\n> +       struct interconnect_creq creq;\n> +       int                     users;\n> +       void                    *data;\n> +};\n\nUse interconnect_provider here instead of icp for the sake of\nconsistency. Same for icp_ops. Or replace everything with any of the\nother suggested alternatives. My suggestion to the name pool is 'xcon'\nwhere x == inter.\n\n> +/**\n> + * struct interconnect_node - entity that is part of the interconnect topology\n> + *\n> + * @links: links to other interconnect nodes\n> + * @num_links: number of links to other interconnect nodes\n> + * @icp: points to the interconnect provider of this node\n> + * @icn_list: list of interconnect nodes\n> + * @search_list: list used when walking the nodes graph\n> + * @reverse: pointer to previous node when walking the nodes graph\n> + * @is_traversed: flag that is used when walking the nodes graph\n> + * @req_list: a list of QoS constraint requests\n> + * @creq: aggregated values of all constraint requests\n> + * @dev_id: device id\n> + * @con_id: connection id\n> + */\n> +struct interconnect_node {\n> +       struct interconnect_node **links;\n> +       size_t                  num_links;\n> +\n> +       struct icp              *icp;\n> +       struct list_head        icn_list;\n> +       struct list_head        search_list;\n> +       struct interconnect_node *reverse;\n> +       bool                    is_traversed;\n> +       struct hlist_head       req_list;\n> +       struct interconnect_creq creq;\n> +\n> +       const char              *dev_id;\n> +       int                     con_id;\n> +};","headers":{"Return-Path":"<linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org>","X-Original-To":"incoming-imx@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming-imx@bilbo.ozlabs.org","Authentication-Results":["ozlabs.org;\n\tspf=none (mailfrom) smtp.mailfrom=lists.infradead.org\n\t(client-ip=65.50.211.133; helo=bombadil.infradead.org;\n\tenvelope-from=linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org;\n\treceiver=<UNKNOWN>)","ozlabs.org; dkim=pass (2048-bit key;\n\tunprotected) header.d=lists.infradead.org\n\theader.i=@lists.infradead.org header.b=\"iTpXBhGB\"; \n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n\tunprotected) header.d=verdurent-com.20150623.gappssmtp.com\n\theader.i=@verdurent-com.20150623.gappssmtp.com header.b=\"adSp5+Uy\"; \n\tdkim-atps=neutral"],"Received":["from bombadil.infradead.org (bombadil.infradead.org\n\t[65.50.211.133])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256\n\tbits)) (No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3ySGtD01hZz9t2l\n\tfor <incoming-imx@patchwork.ozlabs.org>;\n\tThu,  2 Nov 2017 18:29:08 +1100 (AEDT)","from localhost ([127.0.0.1] helo=bombadil.infradead.org)\n\tby bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux))\n\tid 1eA9w2-0005F4-9f; Thu, 02 Nov 2017 07:29:06 +0000","from mail-ot0-x243.google.com ([2607:f8b0:4003:c0f::243])\n\tby bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux))\n\tid 1eA9vl-0004fL-AP for linux-arm-kernel@lists.infradead.org;\n\tThu, 02 Nov 2017 07:29:03 +0000","by mail-ot0-x243.google.com with SMTP id v105so788522ota.9\n\tfor <linux-arm-kernel@lists.infradead.org>;\n\tThu, 02 Nov 2017 00:28:28 -0700 (PDT)","by 10.74.173.141 with HTTP; Thu, 2 Nov 2017 00:28:26 -0700 (PDT)"],"DKIM-Signature":["v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;\n\td=lists.infradead.org; s=bombadil.20170209; h=Sender:\n\tContent-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post:\n\tList-Archive:List-Unsubscribe:List-Id:To:Subject:Message-ID:Date:From:\n\tReferences:In-Reply-To:MIME-Version:Reply-To:Content-ID:Content-Description:\n\tResent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:\n\tList-Owner; bh=OFABXitK9EZgl1rTcwhr0HpH96O1Uf9aV13+HaqfRGg=;\n\tb=iTpXBhGBw0hA8L\n\tPFFy6v9wUGnbHHFd4gA7bhD5aXlTZHZXxxZd78LPJurG7YBV57nLDfT0M46Hf4VQBUx8wgo7pwSzB\n\tOmBvY47IvrTewR71l5DvobRLP26z5w3R4akqi70cVSJnpOKmj8W3jCd6RZWayJJmbWDJisgoFcm+2\n\tUEmEznl9AJICPxggN3xqfIMBGZ9uUYeM3fU3oAL0L7BBD6A9bspY+kDTo9VBRr6SSdHeBDDJ/TVvm\n\tpk32LYrDhAtRo2mUU+BN4s3EDlr+37+SBF96ycjxvoAijoiQ/HLzhRIraKdaDHG7dVHNiHY6QrHiE\n\tl4gVohVzN+JPI9LLqldg==;","v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=verdurent-com.20150623.gappssmtp.com; s=20150623;\n\th=mime-version:in-reply-to:references:from:date:message-id:subject:to\n\t:cc; bh=szXFUwwpTuXOxXPZUSZHz+8ViI0rTKsTTaiTh/k/XW8=;\n\tb=adSp5+UyjnVvaEyc55rNpO4w/ttfn3570b/IevvQ/w1aKmjY05U36+3vnWUPWCP2mQ\n\tBcQsXTXj5fIqCQr1WNtS2j2HxFpD8g+JvOb7W9c/Q9qfSTPemwRId3Q4FebT+N4DLVcL\n\t3jHXUQ0Jnyd4Sco5Qdxc+f7AEIMrDsOAzzL/xl3SpHiFgu1VcWO2kIzAcmZBJnB9CNf5\n\tsC7KO/mtiEWSa+GBevJR0sncQeEFYl7e6rLEIbm7wfXehSs93uQeJpudeTSVO6jIUpVx\n\tU22eRlfxD1yIpeCl1kq/375sfOZ3FoQu4nHW4jQlR5VBjEQe6nhIsKllHZgKVXpseRFv\n\t7pRw=="],"X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:mime-version:in-reply-to:references:from:date\n\t:message-id:subject:to:cc;\n\tbh=szXFUwwpTuXOxXPZUSZHz+8ViI0rTKsTTaiTh/k/XW8=;\n\tb=bM7rz9JREMA66Qhn7hk+IVviZHQA2oGIUPbzjl0kOFyLsRrB9tZIbSjnVOIxPcxnkg\n\tVbFKuMB4ix7CTos/fqh63lc5id86+4foKREncJdpfI0wVbyZgeGkstOGe9PS6tp73yQJ\n\tO6AO16q5h9jUD2V3s5UHA8p3v0OcVJMPSxDF7fci6uLkthx/VFmfw3Oa3BJSFcbJp12Y\n\t6RlaBnTXnk6AxXMh8BvSVSsfJ0+EaYmjFwQ/g/0t6mUoqHnDVK284G6VR6hn4s+/mhz5\n\t73DmWZW+ILcoYpHBbKD2fVfnZNyS2YtRsXFYc3qbr8sjUF54kWn9tmGNlPM3nVfjUeLD\n\t3ElA==","X-Gm-Message-State":"AJaThX6j0V10itG1WEo7Q/B66M4UqXR/tmkyEyvoWemzSwOUXn5c5f4m\n\t8MLeGrcJH91kbsH+p+NuGWnMN6IcaxrdlHWsHTspMg==","X-Google-Smtp-Source":"ABhQp+QlZvLfgXQkcPMI2U2f+JjknXs8xQCR7HsWoeOb5DjG7b0U2WDv5mjyN7sttchHB5ITojfkUNDS8kVrm9YZ4Kk=","X-Received":"by 10.157.4.80 with SMTP id 74mr1459784otc.470.1509607707387;\n\tThu, 02 Nov 2017 00:28:27 -0700 (PDT)","MIME-Version":"1.0","In-Reply-To":"<20170908171830.13813-2-georgi.djakov@linaro.org>","References":"<20170908171830.13813-1-georgi.djakov@linaro.org>\n\t<20170908171830.13813-2-georgi.djakov@linaro.org>","From":"Amit Kucheria <amit.kucheria@verdurent.com>","Date":"Thu, 2 Nov 2017 12:58:26 +0530","Message-ID":"<CAHLCerOKEY_My9OKDMV_ns3dTAgBMPkRS2hdS7iYwFoX5rxOPA@mail.gmail.com>","Subject":"Re: [PATCH v3 1/3] interconnect: Add generic on-chip interconnect\n\tAPI","To":"Georgi Djakov <georgi.djakov@linaro.org>","X-CRM114-Version":"20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 ","X-CRM114-CacheID":"sfid-20171102_002849_819966_25CA956B ","X-CRM114-Status":"GOOD (  38.43  )","X-Spam-Score":"-1.9 (-)","X-Spam-Report":"SpamAssassin version 3.4.1 on bombadil.infradead.org summary:\n\tContent analysis details:   (-1.9 points)\n\tpts rule name              description\n\t---- ----------------------\n\t--------------------------------------------------\n\t-0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/,\n\tno\n\ttrust [2607:f8b0:4003:c0f:0:0:0:243 listed in] [list.dnswl.org]\n\t0.0 T_SPF_PERMERROR        SPF: test of record failed (permerror)\n\t-1.9 BAYES_00               BODY: Bayes spam probability is 0 to 1%\n\t[score: 0.0000]\n\t-0.1 DKIM_VALID Message has at least one valid DKIM or DK signature\n\t0.1 DKIM_SIGNED            Message has a DKIM or DK signature,\n\tnot necessarily valid","X-BeenThere":"linux-arm-kernel@lists.infradead.org","X-Mailman-Version":"2.1.21","Precedence":"list","List-Unsubscribe":"<http://lists.infradead.org/mailman/options/linux-arm-kernel>,\n\t<mailto:linux-arm-kernel-request@lists.infradead.org?subject=unsubscribe>","List-Archive":"<http://lists.infradead.org/pipermail/linux-arm-kernel/>","List-Post":"<mailto:linux-arm-kernel@lists.infradead.org>","List-Help":"<mailto:linux-arm-kernel-request@lists.infradead.org?subject=help>","List-Subscribe":"<http://lists.infradead.org/mailman/listinfo/linux-arm-kernel>,\n\t<mailto:linux-arm-kernel-request@lists.infradead.org?subject=subscribe>","Cc":"linux-arm-msm@vger.kernel.org, mark.rutland@arm.com,\n\tLorenzo Pieralisi <lorenzo.pieralisi@arm.com>,\n\tVincent Guittot <vincent.guittot@linaro.org>,\n\tLinux PM list <linux-pm@vger.kernel.org>, seansw@qti.qualcomm.com,\n\tgregkh@linuxfoundation.org, Michael Turquette <mturquette@baylibre.com>, \n\t\"Rafael J. Wysocki\" <rjw@rjwysocki.net>,\n\tLKML <linux-kernel@vger.kernel.org>, \n\tdavidai@quicinc.com, robh+dt@kernel.org,\n\tSaravana Kannan <skannan@codeaurora.org>, khilman@baylibre.com,\n\tAndy Gross <andy.gross@linaro.org>, Stephen Boyd <sboyd@codeaurora.org>, \n\tlakml <linux-arm-kernel@lists.infradead.org>","Content-Type":"text/plain; charset=\"us-ascii\"","Content-Transfer-Encoding":"7bit","Sender":"\"linux-arm-kernel\" <linux-arm-kernel-bounces@lists.infradead.org>","Errors-To":"linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org","List-Id":"linux-imx-kernel.lists.patchwork.ozlabs.org"}},{"id":1797686,"web_url":"http://patchwork.ozlabs.org/comment/1797686/","msgid":"<CAHLCerNO=yznzCdyNt13EYeuSW_b-Rb1dRFnq=MZtXoMLWkkUA@mail.gmail.com>","list_archive_url":null,"date":"2017-11-02T07:28:50","subject":"Re: [PATCH v3 3/3] interconnect: Add Qualcomm msm8916 interconnect\n\tprovider driver","submitter":{"id":3193,"url":"http://patchwork.ozlabs.org/api/people/3193/","name":"Amit Kucheria","email":"amit.kucheria@verdurent.com"},"content":"On Fri, Sep 8, 2017 at 10:48 PM, Georgi Djakov <georgi.djakov@linaro.org> wrote:\n> Add driver for the Qualcomm interconnect buses found in msm8916 based\n> platforms. This patch contains only a partial topology to make reviewing\n> easier.\n>\n> Signed-off-by: Georgi Djakov <georgi.djakov@linaro.org>\n> ---\n>  drivers/interconnect/Kconfig                     |   5 +\n>  drivers/interconnect/Makefile                    |   1 +\n>  drivers/interconnect/qcom/Kconfig                |  11 +\n>  drivers/interconnect/qcom/Makefile               |   1 +\n>  drivers/interconnect/qcom/interconnect_msm8916.c | 375 +++++++++++++++++++++++\n>  include/linux/interconnect/qcom-msm8916.h        |  92 ++++++\n>  6 files changed, 485 insertions(+)\n>  create mode 100644 drivers/interconnect/qcom/Kconfig\n>  create mode 100644 drivers/interconnect/qcom/Makefile\n>  create mode 100644 drivers/interconnect/qcom/interconnect_msm8916.c\n>  create mode 100644 include/linux/interconnect/qcom-msm8916.h\n>\n> diff --git a/drivers/interconnect/Kconfig b/drivers/interconnect/Kconfig\n> index 1e50e951cdc1..b123a76e2f9d 100644\n> --- a/drivers/interconnect/Kconfig\n> +++ b/drivers/interconnect/Kconfig\n> @@ -8,3 +8,8 @@ menuconfig INTERCONNECT\n>\n>           If unsure, say no.\n>\n> +if INTERCONNECT\n> +\n> +source \"drivers/interconnect/qcom/Kconfig\"\n> +\n> +endif\n> diff --git a/drivers/interconnect/Makefile b/drivers/interconnect/Makefile\n> index d9da6a6c3560..62a01de24aeb 100644\n> --- a/drivers/interconnect/Makefile\n> +++ b/drivers/interconnect/Makefile\n> @@ -1 +1,2 @@\n>  obj-$(CONFIG_INTERCONNECT)  += interconnect.o\n> +obj-$(CONFIG_INTERCONNECT_QCOM)                += qcom/\n> diff --git a/drivers/interconnect/qcom/Kconfig b/drivers/interconnect/qcom/Kconfig\n> new file mode 100644\n> index 000000000000..86465dc37bd4\n> --- /dev/null\n> +++ b/drivers/interconnect/qcom/Kconfig\n> @@ -0,0 +1,11 @@\n> +config INTERCONNECT_QCOM\n> +       bool \"Qualcomm Network-on-Chip interconnect drivers\"\n> +       depends on INTERCONNECT\n> +       depends on ARCH_QCOM || COMPILE_TEST\n> +       default y\n> +\n> +config INTERCONNECT_QCOM_MSM8916\n> +       tristate \"Qualcomm MSM8916 interconnect driver\"\n> +       depends on INTERCONNECT_QCOM\n> +       help\n> +         This is a driver for the Qualcomm Network-on-Chip on msm8916-based platforms.\n> diff --git a/drivers/interconnect/qcom/Makefile b/drivers/interconnect/qcom/Makefile\n> new file mode 100644\n> index 000000000000..0831080e1100\n> --- /dev/null\n> +++ b/drivers/interconnect/qcom/Makefile\n> @@ -0,0 +1 @@\n> +obj-$(CONFIG_INTERCONNECT_QCOM_MSM8916) += interconnect_msm8916.o\n> diff --git a/drivers/interconnect/qcom/interconnect_msm8916.c b/drivers/interconnect/qcom/interconnect_msm8916.c\n> new file mode 100644\n> index 000000000000..9b001e100974\n> --- /dev/null\n> +++ b/drivers/interconnect/qcom/interconnect_msm8916.c\n> @@ -0,0 +1,375 @@\n> +/*\n> + * Copyright (C) 2017 Linaro Ltd\n> + *\n> + * This program is free software; you can redistribute it and/or modify\n> + * it under the terms of the GNU General Public License version 2 and\n> + * only version 2 as published by the Free Software Foundation.\n> + *\n> + * This program is distributed in the hope that it will be useful,\n> + * but WITHOUT ANY WARRANTY; without even the implied warranty of\n> + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n> + * GNU General Public License for more details.\n> + */\n> +\n> +#include <linux/clk.h>\n> +#include <linux/device.h>\n> +#include <linux/io.h>\n> +#include <linux/interconnect-provider.h>\n> +#include <linux/interconnect/qcom-msm8916.h>\n> +#include <linux/module.h>\n> +#include <linux/of_device.h>\n> +#include <linux/of_platform.h>\n> +#include <linux/platform_device.h>\n> +#include <linux/slab.h>\n> +\n> +#define to_qcom_icp(_icp) \\\n> +       container_of(_icp, struct qcom_interconnect_provider, icp)\n> +#define to_qcom_node(_node) \\\n> +       container_of(_node, struct qcom_interconnect_node, node)\n> +\n> +enum qcom_bus_type {\n> +       QCOM_BUS_TYPE_NOC = 0,\n> +       QCOM_BUS_TYPE_MEM,\n> +};\n> +\n> +struct qcom_interconnect_provider {\n> +       struct icp              icp;\n> +       void __iomem            *base;\n> +       struct clk              *bus_clk;\n> +       struct clk              *bus_a_clk;\n> +       u32                     base_offset;\n> +       u32                     qos_offset;\n> +       enum qcom_bus_type      type;\n> +};\n> +\n> +struct qcom_interconnect_node {\n> +       struct interconnect_node node;\n> +       unsigned char *name;\n> +       struct interconnect_node *links[8];\n\nMagic number 8. Replace with 8916_MAX_LINKS or something.\n\n> +       u16 id;\n> +       u16 num_links;\n> +       u16 port;\n> +       u16 buswidth;\n\nComment on what a buswidth is just to be clear\n\n> +       u64 rate;\n\nComment on units\n\n> +};\n> +\n> +static struct qcom_interconnect_node snoc_int_0;\n> +static struct qcom_interconnect_node snoc_int_1;\n> +static struct qcom_interconnect_node snoc_int_bimc;\n> +static struct qcom_interconnect_node snoc_bimc_0_mas;\n> +static struct qcom_interconnect_node pnoc_snoc_slv;\n> +\n> +static struct qcom_interconnect_node snoc_bimc_0_slv;\n\nIMO, saving an 'a' and 'e' is not worth it for the sake of\nreadability. Just use 'slave' and 'master' in the names.\n\n> +static struct qcom_interconnect_node slv_ebi_ch0;\n> +\n> +static struct qcom_interconnect_node pnoc_int_1;\n> +static struct qcom_interconnect_node mas_pnoc_sdcc_1;\n> +static struct qcom_interconnect_node mas_pnoc_sdcc_2;\n> +static struct qcom_interconnect_node pnoc_snoc_mas;\n> +\n> +struct qcom_interconnect_desc {\n> +       struct qcom_interconnect_node **nodes;\n> +       size_t num_nodes;\n> +};\n> +\n> +static struct qcom_interconnect_node snoc_int_0 = {\n> +       .id = 10004,\n> +       .name = \"snoc-int-0\",\n> +#if 0\n\nPlease get rid if these.\n\n> +       .links = { &snoc_pnoc_mas.node },\n> +       .num_links = 1,\n> +#endif\n> +       .buswidth = 8,\n> +};\n> +\n> +static struct qcom_interconnect_node snoc_int_1 = {\n> +       .id = 10005,\n> +       .name = \"snoc-int-1\",\n> +#if 0\n> +       .links = { &slv_apss.node, &slv_cats_0.node, &slv_cats_1.node },\n> +       .num_links = 3,\n> +#endif\n> +       .buswidth = 8,\n> +};\n> +\n> +static struct qcom_interconnect_node snoc_int_bimc = {\n> +       .id = 10006,\n> +       .name = \"snoc-bimc\",\n> +       .links = { &snoc_bimc_0_mas.node },\n> +       .num_links = 1,\n> +       .buswidth = 8,\n> +};\n> +\n> +static struct qcom_interconnect_node snoc_bimc_0_mas = {\n> +       .id = 10007,\n> +       .name = \"snoc-bimc-0-mas\",\n> +       .links = { &snoc_bimc_0_slv.node },\n> +       .num_links = 1,\n> +       .buswidth = 8,\n> +};\n> +\n> +static struct qcom_interconnect_node pnoc_snoc_slv = {\n> +       .id = 10011,\n> +       .name = \"snoc-pnoc\",\n> +       .links = { &snoc_int_0.node, &snoc_int_bimc.node, &snoc_int_1.node },\n> +       .num_links = 3,\n> +       .buswidth = 8,\n> +};\n\n\nSuggest replacing this list of definitions with a macro such as:\n\n#define DEFINE_XCON_NODE(_name, _id, numlinks, buswidth, ...) \\\n             static struct qcom_interconnect_node _name;                       \\\n             static struct qcom_interconnect_node _name = {                  \\\n                   .id = _id,\n                                 \\\n                   .name = _name,\n                        \\\n                   .buswidth = buswidth,\n                      \\\n                   .num_links = numlinks,\n                    \\\n                   .links = { __VA_ARGS__ },\n                \\\n            };\n\n\nThis will reduce these definitions to a series of definitions as\nfollows that improves readability.\n\nDEFINE_XCON_NODE(snoc_int_0, 10004, 1, 8, &snoc_pnoc_mas.node)\nDEFINE_XCON_NODE(snoc_int_1, 10005, 3, 8, &snoc_apss.node,\n&slv_cats_0.node, &slv_cats_1.node)\nDEFINE_XCON_NODE(snoc_int_bimc, 10006, 1, 8, &snoc_bimc_0_mas.node)\n\nIf fact you could take it one step further and move the definitions\nunder the provider definition below directly.\n\n> +static struct qcom_interconnect_node *msm8916_snoc_nodes[] = {\n> +       [SNOC_INT_0] = &snoc_int_0,\n> +       [SNOC_INT_1] = &snoc_int_1,\n> +       [SNOC_INT_BIMC] = &snoc_int_bimc,\n> +       [SNOC_BIMC_0_MAS] = &snoc_bimc_0_mas,\n> +       [PNOC_SNOC_SLV] = &pnoc_snoc_slv,\n> +};\n> +\n> +static struct qcom_interconnect_desc msm8916_snoc = {\n> +       .nodes = msm8916_snoc_nodes,\n> +       .num_nodes = ARRAY_SIZE(msm8916_snoc_nodes),\n> +};\n> +\n> +static struct qcom_interconnect_node snoc_bimc_0_slv = {\n> +       .id = 10025,\n> +       .name = \"snoc_bimc_0_slv\",\n> +       .links = { &slv_ebi_ch0.node },\n> +       .num_links = 1,\n> +       .buswidth = 8,\n> +};\n> +\n> +static struct qcom_interconnect_node slv_ebi_ch0 = {\n> +       .id = 512,\n> +       .name = \"slv-ebi-ch0\",\n> +       .buswidth = 8,\n> +};\n> +\n> +static struct qcom_interconnect_node *msm8916_bimc_nodes[] = {\n> +       [SNOC_BIMC_0_SLV] = &snoc_bimc_0_slv,\n> +       [SLV_EBI_CH0] = &slv_ebi_ch0,\n> +};\n> +\n> +static struct qcom_interconnect_desc msm8916_bimc = {\n> +       .nodes = msm8916_bimc_nodes,\n> +       .num_nodes = ARRAY_SIZE(msm8916_bimc_nodes),\n> +};\n> +\n> +static struct qcom_interconnect_node pnoc_int_1 = {\n> +       .id = 10013,\n> +       .name = \"pnoc-int-1\",\n> +       .links = { &pnoc_snoc_mas.node },\n> +       .num_links = 1,\n> +       .buswidth = 8,\n> +};\n> +\n> +static struct qcom_interconnect_node mas_pnoc_sdcc_1 = {\n> +       .id = 78,\n> +       .name = \"mas-pnoc-sdcc-1\",\n> +       .links = { &pnoc_int_1.node },\n> +       .num_links = 1,\n> +       .port = 7,\n> +       .buswidth = 8,\n> +};\n> +\n> +static struct qcom_interconnect_node mas_pnoc_sdcc_2 = {\n> +       .id = 81,\n> +       .name = \"mas-pnoc-sdcc-2\",\n> +       .links = { &pnoc_int_1.node },\n> +       .num_links = 1,\n> +       .port = 8,\n> +       .buswidth = 8,\n> +};\n> +\n> +static struct qcom_interconnect_node pnoc_snoc_mas = {\n> +       .id = 10010,\n> +       .name = \"pnoc-snoc-mas\",\n> +       .links = { &pnoc_snoc_slv.node },\n> +       .num_links = 1,\n> +       .buswidth = 8,\n> +};\n> +\n> +static struct qcom_interconnect_node *msm8916_pnoc_nodes[] = {\n> +       [PNOC_INT_1] = &pnoc_int_1,\n> +       [MAS_PNOC_SDCC_1] = &mas_pnoc_sdcc_1,\n> +       [MAS_PNOC_SDCC_2] = &mas_pnoc_sdcc_2,\n> +       [PNOC_SNOC_MAS] = &pnoc_snoc_mas,\n> +};\n\nThere are big holes in this node array definition because the index\nvalues are not contiguous. Are you planning fill these in later for\neach of the providers?\n\n> +static struct qcom_interconnect_desc msm8916_pnoc = {\n> +       .nodes = msm8916_pnoc_nodes,\n> +       .num_nodes = ARRAY_SIZE(msm8916_pnoc_nodes),\n> +};\n> +\n> +static int qcom_interconnect_init(struct interconnect_node *node)\n> +{\n> +       struct qcom_interconnect_node *qn = to_qcom_node(node);\n> +\n> +       /* populate default values */\n> +       if (!qn->buswidth)\n> +               qn->buswidth = 8;\n> +\n> +       /* TODO: init qos and priority */\n> +\n> +       return 0;","headers":{"Return-Path":"<linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org>","X-Original-To":"incoming-imx@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming-imx@bilbo.ozlabs.org","Authentication-Results":["ozlabs.org;\n\tspf=none (mailfrom) smtp.mailfrom=lists.infradead.org\n\t(client-ip=65.50.211.133; helo=bombadil.infradead.org;\n\tenvelope-from=linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org;\n\treceiver=<UNKNOWN>)","ozlabs.org; dkim=pass (2048-bit key;\n\tunprotected) header.d=lists.infradead.org\n\theader.i=@lists.infradead.org header.b=\"agYCsrCr\"; \n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n\tunprotected) header.d=infradead.org header.i=@infradead.org\n\theader.b=\"MD6XSRAo\"; \n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n\tunprotected) header.d=verdurent-com.20150623.gappssmtp.com\n\theader.i=@verdurent-com.20150623.gappssmtp.com header.b=\"agHB4a97\"; \n\tdkim-atps=neutral"],"Received":["from bombadil.infradead.org (bombadil.infradead.org\n\t[65.50.211.133])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256\n\tbits)) (No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3ySHKZ092Gz9t34\n\tfor <incoming-imx@patchwork.ozlabs.org>;\n\tThu,  2 Nov 2017 18:49:22 +1100 (AEDT)","from localhost ([127.0.0.1] helo=bombadil.infradead.org)\n\tby bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux))\n\tid 1eAAFX-0002EO-Ax; Thu, 02 Nov 2017 07:49:15 +0000","from merlin.infradead.org ([2001:8b0:10b:1231::1])\n\tby bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux))\n\tid 1eAAFV-0002E9-4w for linux-arm-kernel@bombadil.infradead.org;\n\tThu, 02 Nov 2017 07:49:13 +0000","from mail-ot0-x241.google.com ([2607:f8b0:4003:c0f::241])\n\tby merlin.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux))\n\tid 1eA9wF-0007Xz-6v for linux-arm-kernel@lists.infradead.org;\n\tThu, 02 Nov 2017 07:29:20 +0000","by mail-ot0-x241.google.com with SMTP id f56so790977otj.5\n\tfor <linux-arm-kernel@lists.infradead.org>;\n\tThu, 02 Nov 2017 00:28:53 -0700 (PDT)","by 10.74.173.141 with HTTP; Thu, 2 Nov 2017 00:28:50 -0700 (PDT)"],"DKIM-Signature":["v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;\n\td=lists.infradead.org; s=bombadil.20170209; h=Sender:\n\tContent-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post:\n\tList-Archive:List-Unsubscribe:List-Id:To:Subject:Message-ID:Date:From:\n\tReferences:In-Reply-To:MIME-Version:Reply-To:Content-ID:Content-Description:\n\tResent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:\n\tList-Owner; bh=GZDEfoNVRYy1tnX9TOz0CFemsbWq9EqFiL0SFzGnAjw=;\n\tb=agYCsrCr4byEVM\n\tV5iKG3wx0ITiMuXXN6vbxPnPh2l09XcAGpxtbmpBd3dRoIQ/VIZ7fo8cV57HRWV0WiqPlh+y87bUj\n\tsa4IO1JM33xP52LT77H2onx52sEw9EvrdJrkuY88G9Q0g9+y0q9BaFJRwyrBYoyMIJ7GFZJj/P9Yi\n\tJ6fC0iL0a7iHqfKpBvtZs7zi3OT+I5lRsN/odqGKcFuddBeXUDGTbY+wv1fEwGuiEIKPgpE0yYY+i\n\tzBnjMzncUHwt6X4W8UdtsyKIlLfLCTMarj93CXHr34uCtxg2YjE7uBX1OihQ1RfEtFsbx+coO+wBM\n\tzIGxsDJ6ztH8fhKoTx7A==;","v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;\n\td=infradead.org; s=merlin.20170209;\n\th=Content-Type:Cc:To:Subject:Message-ID:\n\tDate:From:References:In-Reply-To:MIME-Version:Sender:Reply-To:\n\tContent-Transfer-Encoding:Content-ID:Content-Description:Resent-Date:\n\tResent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id:\n\tList-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive;\n\tbh=45eenBygFNeU5uWhePLnTouW5ePNb/jUhUIcMWdwVtQ=;\n\tb=MD6XSRAo1KzICSm3hS22b1MqD\n\t+MUSR5TImukevKy3TT1aybUmuQtXwkKWbbyILcMBELgSlYBIVN+6p2mPYCUq0csroKllwTZeYHxUA\n\tUJXXKcA/XpcJXaOq3EYkaIrJ0QV16vzgC1E08iQSOSqCAsf4Zn+ZJACbu9vXXue/g7gRX+BfVuMxS\n\tk9ap68SUJykVMnbAIYCjhmU2Yfi/9WUjKl0z3d7NmdghCVJhPDqkocZwFcHI+P3m+OIaQAjeBDp0z\n\tv0BnlOUf7ryk5JGQbu08E0yTwR2+poHAAn/xrVTVIG/uNnzMdWfPcUYhY2+o27sG1IdQc3iLaEm/A\n\txl5MbuL7A==;","v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=verdurent-com.20150623.gappssmtp.com; s=20150623;\n\th=mime-version:in-reply-to:references:from:date:message-id:subject:to\n\t:cc; bh=45eenBygFNeU5uWhePLnTouW5ePNb/jUhUIcMWdwVtQ=;\n\tb=agHB4a97/tsdtbv8Ol2K78aoJUXhsPCghs0wI2IDm6R3Wzfjs5KRMy4D4hV0MzVXrR\n\t3UHSgcSpkSiLIetRYECsQoJ23mleRE/8MPv75q2r8chjoououJD1vhCrtUDh1RKHeub9\n\tNotGIp+VrnIMZmoimtWLBy2FCGvg5EC4tF5eHwZv/SP997Yz5LWfDCbonIZ7k4QfJLEM\n\tZFHRyj/V6j6nTO2ZT5XBnZ1arooA2P0NRQlpZrwn8mygUtclaUXQ8MSlPdC+hnoeZOlv\n\ttouL15gXJgU+BFoPpHSmWFNhLXXpriuY+lCAraRp5RYxlELT7hUG9c/ArZn95ZATnghM\n\tk1rQ=="],"X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:mime-version:in-reply-to:references:from:date\n\t:message-id:subject:to:cc;\n\tbh=45eenBygFNeU5uWhePLnTouW5ePNb/jUhUIcMWdwVtQ=;\n\tb=kfJLxzKxl1NieMW5WehRrFrk0KmcE/WpzVn++guxRX2tAFWEz+XGCQPlLCQkX5owbG\n\to9VjiZF2jmyuF2q2zAk5NnCzprJNlsYe4xYnGPCJD/s7GjUpFaQCkTwZqBsE+M7iUae5\n\t+SXaDAVRtOqK++S8OrS/Tf7tkPiADN8CjlL+kSi4SzQkzu2Y47NUn7Up8WagqT0cehCt\n\t58iuqdcpqmp8YwfeNl5VUF/P/8yfvyawuWO18ovtdHzA2dnqcrglJNENqnQ7h4qG0Sxh\n\t+otFE9wLdYNkgJJHLlsz2bl8UsDm3c9GVXyibVLd7ZQQ49rDGoQDR66gXiWGc9HthIcF\n\thUlA==","X-Gm-Message-State":"AMCzsaViJLU13g0Z7OnRm5OOKX6DojoY3BPMgd0b7zmeryb2hOQCyOHT\n\tQLB8X7xb6W0gpsoWAYv/hfVkKSMhYdYgZNzXqTxsOA==","X-Google-Smtp-Source":"ABhQp+T1e9JKyaXuP/km3I/bycKDZhda6too7qKZUBP985YBjqvIBacXtbg/a88gLe16E9Ti0YRSI/5wWArmahSgyr4=","X-Received":"by 10.157.65.161 with SMTP id p30mr1546582ote.2.1509607731561;\n\tThu, 02 Nov 2017 00:28:51 -0700 (PDT)","MIME-Version":"1.0","In-Reply-To":"<20170908171830.13813-4-georgi.djakov@linaro.org>","References":"<20170908171830.13813-1-georgi.djakov@linaro.org>\n\t<20170908171830.13813-4-georgi.djakov@linaro.org>","From":"Amit Kucheria <amit.kucheria@verdurent.com>","Date":"Thu, 2 Nov 2017 12:58:50 +0530","Message-ID":"<CAHLCerNO=yznzCdyNt13EYeuSW_b-Rb1dRFnq=MZtXoMLWkkUA@mail.gmail.com>","Subject":"Re: [PATCH v3 3/3] interconnect: Add Qualcomm msm8916 interconnect\n\tprovider driver","To":"Georgi Djakov <georgi.djakov@linaro.org>","X-Spam-Note":"CRM114 invocation failed","X-Spam-Score":"-1.9 (-)","X-Spam-Report":"SpamAssassin version 3.4.1 on merlin.infradead.org summary:\n\tContent analysis details:   (-1.9 points)\n\tpts rule name              description\n\t---- ----------------------\n\t--------------------------------------------------\n\t-0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/,\n\tno\n\ttrust [2607:f8b0:4003:c0f:0:0:0:241 listed in] [list.dnswl.org]\n\t0.0 T_SPF_PERMERROR        SPF: test of record failed (permerror)\n\t-1.9 BAYES_00               BODY: Bayes spam probability is 0 to 1%\n\t[score: 0.0000]\n\t0.1 DKIM_SIGNED            Message has a DKIM or DK signature,\n\tnot necessarily valid\n\t-0.1 DKIM_VALID Message has at least one valid DKIM or DK signature","X-BeenThere":"linux-arm-kernel@lists.infradead.org","X-Mailman-Version":"2.1.21","Precedence":"list","List-Unsubscribe":"<http://lists.infradead.org/mailman/options/linux-arm-kernel>,\n\t<mailto:linux-arm-kernel-request@lists.infradead.org?subject=unsubscribe>","List-Archive":"<http://lists.infradead.org/pipermail/linux-arm-kernel/>","List-Post":"<mailto:linux-arm-kernel@lists.infradead.org>","List-Help":"<mailto:linux-arm-kernel-request@lists.infradead.org?subject=help>","List-Subscribe":"<http://lists.infradead.org/mailman/listinfo/linux-arm-kernel>,\n\t<mailto:linux-arm-kernel-request@lists.infradead.org?subject=subscribe>","Cc":"linux-arm-msm@vger.kernel.org, mark.rutland@arm.com,\n\tLorenzo Pieralisi <lorenzo.pieralisi@arm.com>,\n\tVincent Guittot <vincent.guittot@linaro.org>,\n\tLinux PM list <linux-pm@vger.kernel.org>, seansw@qti.qualcomm.com,\n\tgregkh@linuxfoundation.org, Michael Turquette <mturquette@baylibre.com>, \n\t\"Rafael J. Wysocki\" <rjw@rjwysocki.net>,\n\tLKML <linux-kernel@vger.kernel.org>, \n\tdavidai@quicinc.com, robh+dt@kernel.org,\n\tSaravana Kannan <skannan@codeaurora.org>, khilman@baylibre.com,\n\tAndy Gross <andy.gross@linaro.org>, Stephen Boyd <sboyd@codeaurora.org>, \n\tlakml <linux-arm-kernel@lists.infradead.org>","Content-Type":"text/plain; charset=\"us-ascii\"","Content-Transfer-Encoding":"7bit","Sender":"\"linux-arm-kernel\" <linux-arm-kernel-bounces@lists.infradead.org>","Errors-To":"linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org","List-Id":"linux-imx-kernel.lists.patchwork.ozlabs.org"}},{"id":1798038,"web_url":"http://patchwork.ozlabs.org/comment/1798038/","msgid":"<26225878-8fed-b990-d02f-5253190de77a@linaro.org>","list_archive_url":null,"date":"2017-11-02T16:00:42","subject":"Re: [PATCH v3 1/3] interconnect: Add generic on-chip interconnect\n\tAPI","submitter":{"id":70295,"url":"http://patchwork.ozlabs.org/api/people/70295/","name":"Georgi Djakov","email":"georgi.djakov@linaro.org"},"content":"Hi Amit,\n\nOn 11/02/2017 09:28 AM, Amit Kucheria wrote:\n[..>> +Interconnect node is the software definition of the interconnect\nhardware\n>> +port. Each interconnect provider consists of multiple interconnect nodes,\n>> +which are connected to other SoC components including other interconnect\n>> +providers. The point on the diagram where the CPUs connects to the memory is\n>> +called an interconnect node, which belongs to the Mem NoC interconnect provider.\n>> +\n>> +Interconnect endpoits are the first or the last element of the path. Every\n> \n> s/endpoits/endpoints\n> \n\nOk!\n\n>> +endpoint is a node, but not every node is an endpoint.\n>> +\n>> +Interconnect path is everything between two endpoints including all the nodes\n>> +that have to be traversed to reach from a source to destination node. It may\n>> +include multiple master-slave pairs across several interconnect providers.\n>> +\n>> +Interconnect consumers are the entities which make use of the data paths exposed\n>> +by the providers. The consumers send requests to providers requesting various\n>> +throughput, latency and priority. Usually the consumers are device drivers, that\n>> +send request based on their needs. An example for a consumer is a a video\n> \n> typo: is a video>\n\nOk!\n\n[..]\n>> +/**\n>> + * interconnect_set() - set constraints on a path between two endpoints\n>> + * @path: reference to the path returned by interconnect_get()\n>> + * @creq: request from the consumer, containing its requirements\n>> + *\n>> + * This function is used by an interconnect consumer to express its own needs\n>> + * in term of bandwidth and QoS for a previously requested path between two\n>> + * endpoints. The requests are aggregated and each node is updated accordingly.\n>> + *\n>> + * Returns 0 on success, or an approproate error code otherwise.\n>> + */\n>> +int interconnect_set(struct interconnect_path *path,\n>> +                    struct interconnect_creq *creq)\n>> +{\n>> +       struct interconnect_node *next, *prev = NULL;\n>> +       size_t i;\n>> +       int ret = 0;\n>> +\n>> +       for (i = 0; i < path->num_nodes; i++, prev = next) {\n>> +               next = path->reqs[i].node;\n>> +\n>> +               /*\n>> +                * Both endpoints should be valid and master-slave pairs of\n> \n> Losing the 'and' improves readability.\n> \n\nOk!\n\n>> +                * the same interconnect provider that will be configured.\n>> +                */\n>> +               if (!next || !prev)\n>> +                       continue;\n>> +               if (next->icp != prev->icp)\n>> +                       continue;\n>> +\n>> +               mutex_lock(&next->icp->lock);\n>> +\n>> +               /* update the consumer request for this path */\n>> +               path->reqs[i].avg_bw = creq->avg_bw;\n>> +               path->reqs[i].peak_bw = creq->peak_bw;\n>> +\n>> +               /* aggregate all requests */\n>> +               interconnect_aggregate_icn(next);\n>> +               interconnect_aggregate_icp(next->icp);\n>> +\n>> +               if (next->icp->ops->set) {\n>> +                       /* commit the aggregated constraints */\n>> +                       ret = next->icp->ops->set(prev, next, &next->icp->creq);\n>> +               }\n> \n> A comment here on how the contraints are propagated along the path\n> would be good. At the moment, this seems to go to each provider along\n> the path, take the provider lock and set the new constraints, then\n> move on to the next provider. Is there any need to make the changes\n> along the entire path \"atomic\"?\n\nYes, the above is correct. There is no such need at least for the\nhardware i am currently playing with. We can add support for that later\nif needed.\n\n> \n> I'm trying to understand what happens in the case where a new request\n> comes along while the previous path is still be traversed.\n\nIt just gets aggregated and set and this seems to not be an issue as the\npaths are valid. Now I am trying to keep it simple and if anything needs\nserialization we can add some locking later.\n\n> \n>> +               mutex_unlock(&next->icp->lock);\n>> +               if (ret)\n>> +                       goto out;\n>> +       }\n>> +\n>> +out:\n>> +       return ret;\n>> +}\n>> +\n>> +/**\n>> + * interconnect_get() - return a handle for path between two endpoints\n> \n> This is not used currently by the msm8916 platform driver? Is this\n> expected to be called by leaf device drivers or by higher layer bus\n> drivers? I suspect a mix of the two, but an example would be nice.\n\nThis is called by a consumer driver to express its for example bandwidth\nneeds between various endpoints. Will add some examples.\n\n[..]\n>> +/**\n>> + * struct icp - interconnect provider (controller) entity that might\n>> + * provide multiple interconnect controls\n>> + *\n>> + * @icp_list: list of the registered interconnect providers\n>> + * @nodes: internal list of the interconnect provider nodes\n>> + * @ops: pointer to device specific struct icp_ops\n>> + * @dev: the device this interconnect provider belongs to\n>> + * @lock: a lock to protect creq and users\n>> + * @creq: the actual state of constraints for this interconnect provider\n>> + * @users: count of active users\n>> + * @data: pointer to private data\n>> + */\n>> +struct icp {\n>> +       struct list_head        icp_list;\n>> +       struct list_head        nodes;\n>> +       const struct icp_ops    *ops;\n>> +       struct device           *dev;\n>> +       struct mutex            lock;\n>> +       struct interconnect_creq creq;\n>> +       int                     users;\n>> +       void                    *data;\n>> +};\n> \n> Use interconnect_provider here instead of icp for the sake of\n> consistency. Same for icp_ops. Or replace everything with any of the\n> other suggested alternatives. My suggestion to the name pool is 'xcon'\n> where x == inter.\n\nYes i am working on better naming, thanks!\n\nBR,\nGeorgi","headers":{"Return-Path":"<linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org>","X-Original-To":"incoming-imx@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming-imx@bilbo.ozlabs.org","Authentication-Results":["ozlabs.org;\n\tspf=none (mailfrom) smtp.mailfrom=lists.infradead.org\n\t(client-ip=65.50.211.133; helo=bombadil.infradead.org;\n\tenvelope-from=linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org;\n\treceiver=<UNKNOWN>)","ozlabs.org; dkim=pass (2048-bit key;\n\tunprotected) header.d=lists.infradead.org\n\theader.i=@lists.infradead.org header.b=\"RkQcD4O2\"; \n\tdkim=fail reason=\"signature verification failed\" (1024-bit key;\n\tunprotected) header.d=linaro.org header.i=@linaro.org\n\theader.b=\"FkU07Mog\"; dkim-atps=neutral"],"Received":["from bombadil.infradead.org (bombadil.infradead.org\n\t[65.50.211.133])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256\n\tbits)) (No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3ySVFB5jXTz9t2r\n\tfor <incoming-imx@patchwork.ozlabs.org>;\n\tFri,  3 Nov 2017 03:01:18 +1100 (AEDT)","from localhost ([127.0.0.1] helo=bombadil.infradead.org)\n\tby bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux))\n\tid 1eAHvg-00033p-C0; Thu, 02 Nov 2017 16:01:16 +0000","from mail-lf0-x244.google.com ([2a00:1450:4010:c07::244])\n\tby bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux))\n\tid 1eAHvb-0002sB-5v for linux-arm-kernel@lists.infradead.org;\n\tThu, 02 Nov 2017 16:01:14 +0000","by mail-lf0-x244.google.com with SMTP id 90so7098517lfs.13\n\tfor <linux-arm-kernel@lists.infradead.org>;\n\tThu, 02 Nov 2017 09:00:50 -0700 (PDT)","from [10.44.66.8] ([212.45.67.2])\n\tby smtp.googlemail.com with ESMTPSA id\n\tl18sm746213ljb.41.2017.11.02.09.00.45\n\t(version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);\n\tThu, 02 Nov 2017 09:00:47 -0700 (PDT)"],"DKIM-Signature":["v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;\n\td=lists.infradead.org; s=bombadil.20170209; h=Sender:\n\tContent-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post:\n\tList-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:Date:\n\tMessage-ID:From:References:To:Subject:Reply-To:Content-ID:Content-Description\n\t:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:\n\tList-Owner; bh=VbTUjAf+WT4Ac9RneqMzmKCxT+m+uuI8zpEeCwKa5as=;\n\tb=RkQcD4O2qHRtYY\n\tCTMjaGGQfubRw4oGkZycjzZ3tqcvgAN2P+7E2oUr/kzNGCF8vKAp03qty27UpecaJflL7oC56mSQ/\n\tOP4JcwaTCnaGkBY0w/LNxm7GWbcE38tUqry2k5qpGOwFs0fNHvbxHQyLnk4Vp15eYEEO7WIKuNAqj\n\tv5ZJv14DOLvkAngPhJuFKNiipnj/p+nnYX6r4/HyY8l0VxFh6k0aRjdGZWa3PKO25hTg4uIc2VTuT\n\t7mmI+4FQ9UGRwt8xLE1XU6yuBnbugaZoVHBQtXuniqz0Vbh2Xgy2e0PF59Q6As1C+59q9e7bV+v7K\n\tffZZonXfngbgebuqHrAQ==;","v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google;\n\th=subject:to:cc:references:from:message-id:date:user-agent\n\t:mime-version:in-reply-to:content-language:content-transfer-encoding; \n\tbh=R+mRt6lbrZrM9k0/iqDkD2au/pdEH6Nbb0RZkLKxHJ0=;\n\tb=FkU07MogQpwJgGLhKZcYFOqGuxM6z42pkRZxENnc83Ngd9a3phW0JLd+5HqlClXhKG\n\txostcH/lKQtIik6Ms90gUEb1/oPKjThTVQ3FesAfBbquIayfzB1cReKyOp/iOMCLJEM2\n\tOrkydGDcnLvIsMoebHnqaN0WTrn5IPPZVTy5U="],"X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:subject:to:cc:references:from:message-id:date\n\t:user-agent:mime-version:in-reply-to:content-language\n\t:content-transfer-encoding;\n\tbh=R+mRt6lbrZrM9k0/iqDkD2au/pdEH6Nbb0RZkLKxHJ0=;\n\tb=dGZ8v/n7x+3gydVO+w8r2E8Fzce55mHwbHk0rQu8PYPAnuEJxLcQE/20KmKIlRvgFe\n\tj0Du9QXTjdwQkuJ/mCKpPWCuAEfhJkV6/NkF2zjeDzbRsmQEErsNrcKDIyngVUoUMWHV\n\t4b11/P007/rlRuTLYXeXiPc9aERHhqtlKCnf94zaRlB/5FSQAp0EqPrqYjMgHTRYxzWT\n\tzhZoGKPuq14iT8dqHvLmGi3uGd3CH5/1NPEgmwkpwZigVVBZEt3/JJeeJQKzLIF5F5Ri\n\td7/DTMfNM/eQhKvSduVUyfpDiSa3A0YX3h/sZPyYNw5M0X8RP7IcHb1B5as7Lub8F0rr\n\tZCFQ==","X-Gm-Message-State":"AMCzsaWaJ70o1t+ZxCZmrbrtbrchzIYmpKvyCnghtTeJyD/7ZPBBLM6I\n\tePFa2X0Ihd4MoSYpxKDXjgomVg==","X-Google-Smtp-Source":"ABhQp+QG5og+OF8NUGdFuZi2DoIyUX5Q29G0xXctVALEAqEqzHEEx4l4WtcFJPlNSB4AE0ndvm1/YQ==","X-Received":"by 10.25.142.13 with SMTP id q13mr1429625lfd.217.1509638448454; \n\tThu, 02 Nov 2017 09:00:48 -0700 (PDT)","Subject":"Re: [PATCH v3 1/3] interconnect: Add generic on-chip interconnect\n\tAPI","To":"Amit Kucheria <amit.kucheria@verdurent.com>","References":"<20170908171830.13813-1-georgi.djakov@linaro.org>\n\t<20170908171830.13813-2-georgi.djakov@linaro.org>\n\t<CAHLCerOKEY_My9OKDMV_ns3dTAgBMPkRS2hdS7iYwFoX5rxOPA@mail.gmail.com>","From":"Georgi Djakov <georgi.djakov@linaro.org>","Message-ID":"<26225878-8fed-b990-d02f-5253190de77a@linaro.org>","Date":"Thu, 2 Nov 2017 18:00:42 +0200","User-Agent":"Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101\n\tThunderbird/52.4.0","MIME-Version":"1.0","In-Reply-To":"<CAHLCerOKEY_My9OKDMV_ns3dTAgBMPkRS2hdS7iYwFoX5rxOPA@mail.gmail.com>","Content-Language":"en-US","X-CRM114-Version":"20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 ","X-CRM114-CacheID":"sfid-20171102_090111_510844_9E00D04C ","X-CRM114-Status":"GOOD (  29.17  )","X-Spam-Score":"-2.0 (--)","X-Spam-Report":"SpamAssassin version 3.4.1 on bombadil.infradead.org summary:\n\tContent analysis details:   (-2.0 points)\n\tpts rule name              description\n\t---- ----------------------\n\t--------------------------------------------------\n\t-0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/,\n\tno\n\ttrust [2a00:1450:4010:c07:0:0:0:244 listed in] [list.dnswl.org]\n\t-0.0 SPF_PASS               SPF: sender matches SPF record\n\t-1.9 BAYES_00               BODY: Bayes spam probability is 0 to 1%\n\t[score: 0.0000]\n\t-0.1 DKIM_VALID Message has at least one valid DKIM or DK signature\n\t0.1 DKIM_SIGNED            Message has a DKIM or DK signature,\n\tnot necessarily valid\n\t-0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from\n\tauthor's domain","X-BeenThere":"linux-arm-kernel@lists.infradead.org","X-Mailman-Version":"2.1.21","Precedence":"list","List-Unsubscribe":"<http://lists.infradead.org/mailman/options/linux-arm-kernel>,\n\t<mailto:linux-arm-kernel-request@lists.infradead.org?subject=unsubscribe>","List-Archive":"<http://lists.infradead.org/pipermail/linux-arm-kernel/>","List-Post":"<mailto:linux-arm-kernel@lists.infradead.org>","List-Help":"<mailto:linux-arm-kernel-request@lists.infradead.org?subject=help>","List-Subscribe":"<http://lists.infradead.org/mailman/listinfo/linux-arm-kernel>,\n\t<mailto:linux-arm-kernel-request@lists.infradead.org?subject=subscribe>","Cc":"linux-arm-msm@vger.kernel.org, mark.rutland@arm.com,\n\tLorenzo Pieralisi <lorenzo.pieralisi@arm.com>,\n\tVincent Guittot <vincent.guittot@linaro.org>,\n\tLinux PM list <linux-pm@vger.kernel.org>, seansw@qti.qualcomm.com,\n\tgregkh@linuxfoundation.org, Michael Turquette <mturquette@baylibre.com>, \n\t\"Rafael J. Wysocki\" <rjw@rjwysocki.net>,\n\tLKML <linux-kernel@vger.kernel.org>, \n\tdavidai@quicinc.com, robh+dt@kernel.org,\n\tSaravana Kannan <skannan@codeaurora.org>, khilman@baylibre.com,\n\tAndy Gross <andy.gross@linaro.org>, Stephen Boyd <sboyd@codeaurora.org>, \n\tlakml <linux-arm-kernel@lists.infradead.org>","Content-Type":"text/plain; charset=\"us-ascii\"","Content-Transfer-Encoding":"7bit","Sender":"\"linux-arm-kernel\" <linux-arm-kernel-bounces@lists.infradead.org>","Errors-To":"linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org","List-Id":"linux-imx-kernel.lists.patchwork.ozlabs.org"}},{"id":1798039,"web_url":"http://patchwork.ozlabs.org/comment/1798039/","msgid":"<cc1c87cd-a42e-a37c-8962-721e6f04bbd1@linaro.org>","list_archive_url":null,"date":"2017-11-02T16:00:57","subject":"Re: [PATCH v3 3/3] interconnect: Add Qualcomm msm8916 interconnect\n\tprovider driver","submitter":{"id":70295,"url":"http://patchwork.ozlabs.org/api/people/70295/","name":"Georgi Djakov","email":"georgi.djakov@linaro.org"},"content":"Hi Amit,\n\nOn 11/02/2017 09:28 AM, Amit Kucheria wrote:\n> On Fri, Sep 8, 2017 at 10:48 PM, Georgi Djakov <georgi.djakov@linaro.org> wrote:\n>> Add driver for the Qualcomm interconnect buses found in msm8916 based\n>> platforms. This patch contains only a partial topology to make reviewing\n>> easier.\n>>\n>> Signed-off-by: Georgi Djakov <georgi.djakov@linaro.org>\n>> ---\n>>  drivers/interconnect/Kconfig                     |   5 +\n>>  drivers/interconnect/Makefile                    |   1 +\n>>  drivers/interconnect/qcom/Kconfig                |  11 +\n>>  drivers/interconnect/qcom/Makefile               |   1 +\n>>  drivers/interconnect/qcom/interconnect_msm8916.c | 375 +++++++++++++++++++++++\n>>  include/linux/interconnect/qcom-msm8916.h        |  92 ++++++\n>>  6 files changed, 485 insertions(+)\n>>  create mode 100644 drivers/interconnect/qcom/Kconfig\n>>  create mode 100644 drivers/interconnect/qcom/Makefile\n>>  create mode 100644 drivers/interconnect/qcom/interconnect_msm8916.c\n>>  create mode 100644 include/linux/interconnect/qcom-msm8916.h\n>>\n>> diff --git a/drivers/interconnect/Kconfig b/drivers/interconnect/Kconfig\n>> index 1e50e951cdc1..b123a76e2f9d 100644\n>> --- a/drivers/interconnect/Kconfig\n>> +++ b/drivers/interconnect/Kconfig\n>> @@ -8,3 +8,8 @@ menuconfig INTERCONNECT\n>>\n>>           If unsure, say no.\n>>\n>> +if INTERCONNECT\n>> +\n>> +source \"drivers/interconnect/qcom/Kconfig\"\n>> +\n>> +endif\n>> diff --git a/drivers/interconnect/Makefile b/drivers/interconnect/Makefile\n>> index d9da6a6c3560..62a01de24aeb 100644\n>> --- a/drivers/interconnect/Makefile\n>> +++ b/drivers/interconnect/Makefile\n>> @@ -1 +1,2 @@\n>>  obj-$(CONFIG_INTERCONNECT)  += interconnect.o\n>> +obj-$(CONFIG_INTERCONNECT_QCOM)                += qcom/\n>> diff --git a/drivers/interconnect/qcom/Kconfig b/drivers/interconnect/qcom/Kconfig\n>> new file mode 100644\n>> index 000000000000..86465dc37bd4\n>> --- /dev/null\n>> +++ b/drivers/interconnect/qcom/Kconfig\n>> @@ -0,0 +1,11 @@\n>> +config INTERCONNECT_QCOM\n>> +       bool \"Qualcomm Network-on-Chip interconnect drivers\"\n>> +       depends on INTERCONNECT\n>> +       depends on ARCH_QCOM || COMPILE_TEST\n>> +       default y\n>> +\n>> +config INTERCONNECT_QCOM_MSM8916\n>> +       tristate \"Qualcomm MSM8916 interconnect driver\"\n>> +       depends on INTERCONNECT_QCOM\n>> +       help\n>> +         This is a driver for the Qualcomm Network-on-Chip on msm8916-based platforms.\n>> diff --git a/drivers/interconnect/qcom/Makefile b/drivers/interconnect/qcom/Makefile\n>> new file mode 100644\n>> index 000000000000..0831080e1100\n>> --- /dev/null\n>> +++ b/drivers/interconnect/qcom/Makefile\n>> @@ -0,0 +1 @@\n>> +obj-$(CONFIG_INTERCONNECT_QCOM_MSM8916) += interconnect_msm8916.o\n>> diff --git a/drivers/interconnect/qcom/interconnect_msm8916.c b/drivers/interconnect/qcom/interconnect_msm8916.c\n>> new file mode 100644\n>> index 000000000000..9b001e100974\n>> --- /dev/null\n>> +++ b/drivers/interconnect/qcom/interconnect_msm8916.c\n>> @@ -0,0 +1,375 @@\n>> +/*\n>> + * Copyright (C) 2017 Linaro Ltd\n>> + *\n>> + * This program is free software; you can redistribute it and/or modify\n>> + * it under the terms of the GNU General Public License version 2 and\n>> + * only version 2 as published by the Free Software Foundation.\n>> + *\n>> + * This program is distributed in the hope that it will be useful,\n>> + * but WITHOUT ANY WARRANTY; without even the implied warranty of\n>> + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n>> + * GNU General Public License for more details.\n>> + */\n>> +\n>> +#include <linux/clk.h>\n>> +#include <linux/device.h>\n>> +#include <linux/io.h>\n>> +#include <linux/interconnect-provider.h>\n>> +#include <linux/interconnect/qcom-msm8916.h>\n>> +#include <linux/module.h>\n>> +#include <linux/of_device.h>\n>> +#include <linux/of_platform.h>\n>> +#include <linux/platform_device.h>\n>> +#include <linux/slab.h>\n>> +\n>> +#define to_qcom_icp(_icp) \\\n>> +       container_of(_icp, struct qcom_interconnect_provider, icp)\n>> +#define to_qcom_node(_node) \\\n>> +       container_of(_node, struct qcom_interconnect_node, node)\n>> +\n>> +enum qcom_bus_type {\n>> +       QCOM_BUS_TYPE_NOC = 0,\n>> +       QCOM_BUS_TYPE_MEM,\n>> +};\n>> +\n>> +struct qcom_interconnect_provider {\n>> +       struct icp              icp;\n>> +       void __iomem            *base;\n>> +       struct clk              *bus_clk;\n>> +       struct clk              *bus_a_clk;\n>> +       u32                     base_offset;\n>> +       u32                     qos_offset;\n>> +       enum qcom_bus_type      type;\n>> +};\n>> +\n>> +struct qcom_interconnect_node {\n>> +       struct interconnect_node node;\n>> +       unsigned char *name;\n>> +       struct interconnect_node *links[8];\n> \n> Magic number 8. Replace with 8916_MAX_LINKS or something.\n> \n\nOk, sure!\n\n>> +       u16 id;\n>> +       u16 num_links;\n>> +       u16 port;\n>> +       u16 buswidth;\n> \n> Comment on what a buswidth is just to be clear\n> \n\nOk!\n\n>> +       u64 rate;\n> \n> Comment on units\n\nOk!\n\n> \n>> +};\n>> +\n>> +static struct qcom_interconnect_node snoc_int_0;\n>> +static struct qcom_interconnect_node snoc_int_1;\n>> +static struct qcom_interconnect_node snoc_int_bimc;\n>> +static struct qcom_interconnect_node snoc_bimc_0_mas;\n>> +static struct qcom_interconnect_node pnoc_snoc_slv;\n>> +\n>> +static struct qcom_interconnect_node snoc_bimc_0_slv;\n> \n> IMO, saving an 'a' and 'e' is not worth it for the sake of\n> readability. Just use 'slave' and 'master' in the names.\n> \n\nCurrently i prefer to keep it this way. Maybe i can put a comment\nsomewhere.\n\n>> +static struct qcom_interconnect_node slv_ebi_ch0;\n>> +\n>> +static struct qcom_interconnect_node pnoc_int_1;\n>> +static struct qcom_interconnect_node mas_pnoc_sdcc_1;\n>> +static struct qcom_interconnect_node mas_pnoc_sdcc_2;\n>> +static struct qcom_interconnect_node pnoc_snoc_mas;\n>> +\n>> +struct qcom_interconnect_desc {\n>> +       struct qcom_interconnect_node **nodes;\n>> +       size_t num_nodes;\n>> +};\n>> +\n>> +static struct qcom_interconnect_node snoc_int_0 = {\n>> +       .id = 10004,\n>> +       .name = \"snoc-int-0\",\n>> +#if 0\n> \n> Please get rid if these.\n> \n\nI have included only a small part of the topology for this SoC for\nsimplicity. Will remove them.\n\n>> +       .links = { &snoc_pnoc_mas.node },\n>> +       .num_links = 1,\n>> +#endif\n>> +       .buswidth = 8,\n>> +};\n>> +\n>> +static struct qcom_interconnect_node snoc_int_1 = {\n>> +       .id = 10005,\n>> +       .name = \"snoc-int-1\",\n>> +#if 0\n>> +       .links = { &slv_apss.node, &slv_cats_0.node, &slv_cats_1.node },\n>> +       .num_links = 3,\n>> +#endif\n>> +       .buswidth = 8,\n>> +};\n>> +\n>> +static struct qcom_interconnect_node snoc_int_bimc = {\n>> +       .id = 10006,\n>> +       .name = \"snoc-bimc\",\n>> +       .links = { &snoc_bimc_0_mas.node },\n>> +       .num_links = 1,\n>> +       .buswidth = 8,\n>> +};\n>> +\n>> +static struct qcom_interconnect_node snoc_bimc_0_mas = {\n>> +       .id = 10007,\n>> +       .name = \"snoc-bimc-0-mas\",\n>> +       .links = { &snoc_bimc_0_slv.node },\n>> +       .num_links = 1,\n>> +       .buswidth = 8,\n>> +};\n>> +\n>> +static struct qcom_interconnect_node pnoc_snoc_slv = {\n>> +       .id = 10011,\n>> +       .name = \"snoc-pnoc\",\n>> +       .links = { &snoc_int_0.node, &snoc_int_bimc.node, &snoc_int_1.node },\n>> +       .num_links = 3,\n>> +       .buswidth = 8,\n>> +};\n> \n> \n> Suggest replacing this list of definitions with a macro such as:\n> \n> #define DEFINE_XCON_NODE(_name, _id, numlinks, buswidth, ...) \\\n>              static struct qcom_interconnect_node _name;                       \\\n>              static struct qcom_interconnect_node _name = {                  \\\n>                    .id = _id,\n>                                  \\\n>                    .name = _name,\n>                         \\\n>                    .buswidth = buswidth,\n>                       \\\n>                    .num_links = numlinks,\n>                     \\\n>                    .links = { __VA_ARGS__ },\n>                 \\\n>             };\n> \n> \n> This will reduce these definitions to a series of definitions as\n> follows that improves readability.\n> \n> DEFINE_XCON_NODE(snoc_int_0, 10004, 1, 8, &snoc_pnoc_mas.node)\n> DEFINE_XCON_NODE(snoc_int_1, 10005, 3, 8, &snoc_apss.node,\n> &slv_cats_0.node, &slv_cats_1.node)\n> DEFINE_XCON_NODE(snoc_int_bimc, 10006, 1, 8, &snoc_bimc_0_mas.node)\n> \n> If fact you could take it one step further and move the definitions\n> under the provider definition below directly.\n> \n\nWill do it. Thanks!\n\n[..]\n\n>> +static struct qcom_interconnect_node *msm8916_pnoc_nodes[] = {\n>> +       [PNOC_INT_1] = &pnoc_int_1,\n>> +       [MAS_PNOC_SDCC_1] = &mas_pnoc_sdcc_1,\n>> +       [MAS_PNOC_SDCC_2] = &mas_pnoc_sdcc_2,\n>> +       [PNOC_SNOC_MAS] = &pnoc_snoc_mas,\n>> +};\n> \n> There are big holes in this node array definition because the index\n> values are not contiguous. Are you planning fill these in later for\n> each of the providers?\n> \n\nYes, exactly. I trying to keep this patch as small as possible to be\nmore review friendly. At some time will add the full topology.\n\nThanks for the comments!\n\nBR,\nGeorgi","headers":{"Return-Path":"<linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org>","X-Original-To":"incoming-imx@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming-imx@bilbo.ozlabs.org","Authentication-Results":["ozlabs.org;\n\tspf=none (mailfrom) smtp.mailfrom=lists.infradead.org\n\t(client-ip=65.50.211.133; helo=bombadil.infradead.org;\n\tenvelope-from=linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org;\n\treceiver=<UNKNOWN>)","ozlabs.org; dkim=pass (2048-bit key;\n\tunprotected) header.d=lists.infradead.org\n\theader.i=@lists.infradead.org header.b=\"PYJPsTF6\"; \n\tdkim=fail reason=\"signature verification failed\" (1024-bit key;\n\tunprotected) header.d=linaro.org header.i=@linaro.org\n\theader.b=\"kNmJAoRl\"; dkim-atps=neutral"],"Received":["from bombadil.infradead.org (bombadil.infradead.org\n\t[65.50.211.133])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256\n\tbits)) (No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3ySVFd5NZhz9ryr\n\tfor <incoming-imx@patchwork.ozlabs.org>;\n\tFri,  3 Nov 2017 03:01:41 +1100 (AEDT)","from localhost ([127.0.0.1] helo=bombadil.infradead.org)\n\tby bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux))\n\tid 1eAHw3-0003Lj-U6; Thu, 02 Nov 2017 16:01:39 +0000","from mail-lf0-x241.google.com ([2a00:1450:4010:c07::241])\n\tby bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux))\n\tid 1eAHvn-0002zA-Ev for linux-arm-kernel@lists.infradead.org;\n\tThu, 02 Nov 2017 16:01:35 +0000","by mail-lf0-x241.google.com with SMTP id g70so25121lfl.3\n\tfor <linux-arm-kernel@lists.infradead.org>;\n\tThu, 02 Nov 2017 09:01:02 -0700 (PDT)","from [10.44.66.8] ([212.45.67.2])\n\tby smtp.googlemail.com with ESMTPSA id\n\tg12sm601467lfd.61.2017.11.02.09.00.58\n\t(version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);\n\tThu, 02 Nov 2017 09:01:00 -0700 (PDT)"],"DKIM-Signature":["v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;\n\td=lists.infradead.org; s=bombadil.20170209; h=Sender:\n\tContent-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post:\n\tList-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:Date:\n\tMessage-ID:From:References:To:Subject:Reply-To:Content-ID:Content-Description\n\t:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:\n\tList-Owner; bh=ursEJLSI70ZkTspS40SgrtDX+NotgQuM7DHVsiaiTYY=;\n\tb=PYJPsTF64f3Nwg\n\tEOVr57pDRDG9HTorRMOpK0eGDt30ys7NfgyOZL9t29fPW8r3vAGsoxRNMfYrCiTBjVCK6J8tD4ZhR\n\tO2xRfkhkjRZJ6KwSgoqVWSmTlHoyrtxpkPdEHxnAfkkfde3N/tDfjpTH4sYMLNQ5sTMLPo9mHumXq\n\tmHxAc8Mz2d0wXR0ugvqJprGaRskR/daGSk9WbRhDspFpmoyd6vbA6egXI8KiTyRO25F1zNyZmNla0\n\tJCcmlUhe1I8lGPH88LNiTSQAu1HEGki9++GB6ut9oMxLacHLV4cqrnu4xFo7e4nO8XtWYkmdpSWwM\n\tqQxLGTZyRG4kVRPdOU9g==;","v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google;\n\th=subject:to:cc:references:from:message-id:date:user-agent\n\t:mime-version:in-reply-to:content-language:content-transfer-encoding; \n\tbh=eJeZ2DFOD1wHLF9eC8lqdSbkFw+M76XmLsV/T33ty48=;\n\tb=kNmJAoRlNxCAAm/x6AE8FNmZGby/+uHuoy8v9X4bz/vyJHM0rfI0/JWvH2cTWhGoaR\n\tb5ArLDtpGiYUdQntIt71SHRLGAZEugLVi/5HlwA1RtcxWG9Q3lStbUoFvi44KPgMUee5\n\tHmXuQDcIGN+1wif/kUs0F5vFV8mqufr9e3Odg="],"X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:subject:to:cc:references:from:message-id:date\n\t:user-agent:mime-version:in-reply-to:content-language\n\t:content-transfer-encoding;\n\tbh=eJeZ2DFOD1wHLF9eC8lqdSbkFw+M76XmLsV/T33ty48=;\n\tb=Bgua6p1DMy9MY1LW89GcCmKjS+XTnBZffqyehKLxlWNWz+sY/hDE56uFQ2hBgV4fQw\n\tOmceT+CuIGSn2JMq1hrQ63dezwwqIXTrA3XxUur0M3bSWEipB1O07/4QzVhFizE0z0dJ\n\tRA3vmZdkAhIRfed41fq5enkQJtMu193YCF7n6G2+o9QdDd+92IkQ78cUZ+Oeugh/Cg3j\n\t/Ogj26M7P1VYEH726kWcCL1fZZ9zuQtI19ruXLKsMS+dP+JdYgFsoJzJXqEs8+YSK6ws\n\tUzPQSI2NdvhKVfMnUG1t1CduFPjKcUy1SU+sA2GPQHFhcAulJp96yBAxbB3s/JWMYhGS\n\toKUA==","X-Gm-Message-State":"AMCzsaXt6nQA5yHBxS1FQZjfgA9Iw4SI8oqc3VUMcrucwmkqlpPgwsy+\n\tC4SoOJ04+CvmhrtrsrXEok1vLTSWCjQ=","X-Google-Smtp-Source":"ABhQp+RqAlSGA9C2eRlhGxe53bnT9MGRNoUchGtbHlJ1VUB7E1ojp96mWTZNkjZuHeoldSdXzXHRQw==","X-Received":"by 10.46.56.14 with SMTP id f14mr1886550lja.46.1509638461332;\n\tThu, 02 Nov 2017 09:01:01 -0700 (PDT)","Subject":"Re: [PATCH v3 3/3] interconnect: Add Qualcomm msm8916 interconnect\n\tprovider driver","To":"Amit Kucheria <amit.kucheria@verdurent.com>","References":"<20170908171830.13813-1-georgi.djakov@linaro.org>\n\t<20170908171830.13813-4-georgi.djakov@linaro.org>\n\t<CAHLCerNO=yznzCdyNt13EYeuSW_b-Rb1dRFnq=MZtXoMLWkkUA@mail.gmail.com>","From":"Georgi Djakov <georgi.djakov@linaro.org>","Message-ID":"<cc1c87cd-a42e-a37c-8962-721e6f04bbd1@linaro.org>","Date":"Thu, 2 Nov 2017 18:00:57 +0200","User-Agent":"Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101\n\tThunderbird/52.4.0","MIME-Version":"1.0","In-Reply-To":"<CAHLCerNO=yznzCdyNt13EYeuSW_b-Rb1dRFnq=MZtXoMLWkkUA@mail.gmail.com>","Content-Language":"en-US","X-CRM114-Version":"20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 ","X-CRM114-CacheID":"sfid-20171102_090124_367155_6F49088D ","X-CRM114-Status":"GOOD (  25.79  )","X-Spam-Score":"-2.0 (--)","X-Spam-Report":"SpamAssassin version 3.4.1 on bombadil.infradead.org summary:\n\tContent analysis details:   (-2.0 points)\n\tpts rule name              description\n\t---- ----------------------\n\t--------------------------------------------------\n\t-0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/,\n\tno\n\ttrust [2a00:1450:4010:c07:0:0:0:241 listed in] [list.dnswl.org]\n\t-0.0 SPF_PASS               SPF: sender matches SPF record\n\t-1.9 BAYES_00               BODY: Bayes spam probability is 0 to 1%\n\t[score: 0.0000]\n\t-0.1 DKIM_VALID Message has at least one valid DKIM or DK signature\n\t0.1 DKIM_SIGNED            Message has a DKIM or DK signature,\n\tnot necessarily valid\n\t-0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from\n\tauthor's domain","X-BeenThere":"linux-arm-kernel@lists.infradead.org","X-Mailman-Version":"2.1.21","Precedence":"list","List-Unsubscribe":"<http://lists.infradead.org/mailman/options/linux-arm-kernel>,\n\t<mailto:linux-arm-kernel-request@lists.infradead.org?subject=unsubscribe>","List-Archive":"<http://lists.infradead.org/pipermail/linux-arm-kernel/>","List-Post":"<mailto:linux-arm-kernel@lists.infradead.org>","List-Help":"<mailto:linux-arm-kernel-request@lists.infradead.org?subject=help>","List-Subscribe":"<http://lists.infradead.org/mailman/listinfo/linux-arm-kernel>,\n\t<mailto:linux-arm-kernel-request@lists.infradead.org?subject=subscribe>","Cc":"linux-arm-msm@vger.kernel.org, mark.rutland@arm.com,\n\tLorenzo Pieralisi <lorenzo.pieralisi@arm.com>,\n\tVincent Guittot <vincent.guittot@linaro.org>,\n\tLinux PM list <linux-pm@vger.kernel.org>, seansw@qti.qualcomm.com,\n\tgregkh@linuxfoundation.org, Michael Turquette <mturquette@baylibre.com>, \n\t\"Rafael J. Wysocki\" <rjw@rjwysocki.net>,\n\tLKML <linux-kernel@vger.kernel.org>, \n\tdavidai@quicinc.com, robh+dt@kernel.org,\n\tSaravana Kannan <skannan@codeaurora.org>, khilman@baylibre.com,\n\tAndy Gross <andy.gross@linaro.org>, Stephen Boyd <sboyd@codeaurora.org>, \n\tlakml <linux-arm-kernel@lists.infradead.org>","Content-Type":"text/plain; charset=\"us-ascii\"","Content-Transfer-Encoding":"7bit","Sender":"\"linux-arm-kernel\" <linux-arm-kernel-bounces@lists.infradead.org>","Errors-To":"linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org","List-Id":"linux-imx-kernel.lists.patchwork.ozlabs.org"}},{"id":1819039,"web_url":"http://patchwork.ozlabs.org/comment/1819039/","msgid":"<CAHLCerOgm+T6S1pxjo5hFajyU+vqUgBFcwfuBCsphgECRMf3Yw@mail.gmail.com>","list_archive_url":null,"date":"2017-12-08T18:38:22","subject":"Re: [PATCH v3 1/3] interconnect: Add generic on-chip interconnect\n\tAPI","submitter":{"id":3193,"url":"http://patchwork.ozlabs.org/api/people/3193/","name":"Amit Kucheria","email":"amit.kucheria@verdurent.com"},"content":"On Fri, Sep 8, 2017 at 10:48 PM, Georgi Djakov <georgi.djakov@linaro.org> wrote:\n> This patch introduce a new API to get requirements and configure the\n> interconnect buses across the entire chipset to fit with the current demand.\n>\n> The API is using a consumer/provider-based model, where the providers are\n> the interconnect buses and the consumers could be various drivers.\n> The consumers request interconnect resources (path) between endpoints and\n> set the desired constraints on this data flow path. The providers receive\n> requests from consumers and aggregate these requests for all master-slave\n> pairs on that path. Then the providers configure each participating in the\n> topology node according to the requested data flow path, physical links and\n> constraints. The topology could be complicated and multi-tiered and is SoC\n> specific.\n>\n> Signed-off-by: Georgi Djakov <georgi.djakov@linaro.org>\n> ---\n>  Documentation/interconnect/interconnect.rst |  93 +++++++\n>  drivers/Kconfig                             |   2 +\n>  drivers/Makefile                            |   1 +\n>  drivers/interconnect/Kconfig                |  10 +\n>  drivers/interconnect/Makefile               |   1 +\n>  drivers/interconnect/interconnect.c         | 382 ++++++++++++++++++++++++++++\n>  include/linux/interconnect-consumer.h       |  73 ++++++\n>  include/linux/interconnect-provider.h       | 119 +++++++++\n>  8 files changed, 681 insertions(+)\n>  create mode 100644 Documentation/interconnect/interconnect.rst\n>  create mode 100644 drivers/interconnect/Kconfig\n>  create mode 100644 drivers/interconnect/Makefile\n>  create mode 100644 drivers/interconnect/interconnect.c\n>  create mode 100644 include/linux/interconnect-consumer.h\n>  create mode 100644 include/linux/interconnect-provider.h\n>\n\n<snip>\n\n> diff --git a/include/linux/interconnect-consumer.h b/include/linux/interconnect-consumer.h\n> new file mode 100644\n> index 000000000000..6e71bf7a63c0\n> --- /dev/null\n> +++ b/include/linux/interconnect-consumer.h\n> @@ -0,0 +1,73 @@\n> +/*\n> + * Copyright (c) 2017, Linaro Ltd.\n> + *\n> + * This software is licensed under the terms of the GNU General Public\n> + * License version 2, as published by the Free Software Foundation, and\n> + * may be copied, distributed, and modified under those terms.\n> + *\n> + * This program is distributed in the hope that it will be useful,\n> + * but WITHOUT ANY WARRANTY; without even the implied warranty of\n> + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n> + * GNU General Public License for more details.\n> + */\n> +\n> +#ifndef _LINUX_INTERCONNECT_CONSUMER_H\n> +#define _LINUX_INTERCONNECT_CONSUMER_H\n> +\n> +struct interconnect_node;\n> +struct interconnect_path;\n> +\n> +#if IS_ENABLED(CONFIG_INTERCONNECT)\n> +\n> +struct interconnect_path *interconnect_get(const char *sdev, const int sid,\n> +                                          const char *ddev, const int did);\n> +\n> +void interconnect_put(struct interconnect_path *path);\n> +\n> +/**\n> + * struct creq - interconnect consumer request\n> + * @avg_bw: the average requested bandwidth (over longer period of time) in kbps\n> + * @peak_bw: the peak (maximum) bandwidth in kpbs\n> + */\n> +struct interconnect_creq {\n> +       u32 avg_bw;\n> +       u32 peak_bw;\n> +};\n> +\n> +/**\n> + * interconnect_set() - set constraints on a path between two endpoints\n> + * @path: reference to the path returned by interconnect_get()\n> + * @creq: request from the consumer, containing its requirements\n> + *\n> + * This function is used by an interconnect consumer to express its own needs\n> + * in term of bandwidth and QoS for a previously requested path between two\n> + * endpoints. The requests are aggregated and each node is updated accordingly.\n> + *\n> + * Returns 0 on success, or an approproate error code otherwise.\n> + */\n> +int interconnect_set(struct interconnect_path *path,\n> +                    struct interconnect_creq *creq);\n> +\n> +#else\n> +\n> +inline struct interconnect_path *interconnect_get(const char *sdev,\n> +                                                        const int sid,\n> +                                                        const char *ddev,\n> +                                                        const int did)\n> +{\n> +       return ERR_PTR(-ENOTSUPP);\n> +}\n> +\n> +inline void interconnect_put(struct interconnect_path *path)\n> +{\n> +}\n> +\n> +inline int interconnect_set(struct interconnect_path *path,\n> +                           struct interconnect_creq *creq);\n\nRemove the semi colon\n\n> +{\n> +       return -ENOTSUPP\n\nreturn ERR_PTR(-ENOTSUPP);\n\n> +}\n> +\n\nThis breaks the build with INTERCONNECT disabled in Kconfig.","headers":{"Return-Path":"<linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org>","X-Original-To":"incoming-imx@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming-imx@bilbo.ozlabs.org","Authentication-Results":["ozlabs.org;\n\tspf=none (mailfrom) smtp.mailfrom=lists.infradead.org\n\t(client-ip=65.50.211.133; helo=bombadil.infradead.org;\n\tenvelope-from=linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org;\n\treceiver=<UNKNOWN>)","ozlabs.org; dkim=pass (2048-bit key;\n\tunprotected) header.d=lists.infradead.org\n\theader.i=@lists.infradead.org header.b=\"HAJvkaut\"; \n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n\tunprotected) header.d=verdurent-com.20150623.gappssmtp.com\n\theader.i=@verdurent-com.20150623.gappssmtp.com header.b=\"UJlgXevt\"; \n\tdkim-atps=neutral"],"Received":["from bombadil.infradead.org (bombadil.infradead.org\n\t[65.50.211.133])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256\n\tbits)) (No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3yth2T2T2Tz9s83\n\tfor <incoming-imx@patchwork.ozlabs.org>;\n\tSat,  9 Dec 2017 05:38:57 +1100 (AEDT)","from localhost ([127.0.0.1] helo=bombadil.infradead.org)\n\tby bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux))\n\tid 1eNNXu-0001qP-Md; Fri, 08 Dec 2017 18:38:50 +0000","from mail-ot0-x243.google.com ([2607:f8b0:4003:c0f::243])\n\tby bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux))\n\tid 1eNNXq-0001mv-7y for linux-arm-kernel@lists.infradead.org;\n\tFri, 08 Dec 2017 18:38:48 +0000","by mail-ot0-x243.google.com with SMTP id b54so9890819otd.8\n\tfor <linux-arm-kernel@lists.infradead.org>;\n\tFri, 08 Dec 2017 10:38:23 -0800 (PST)","by 10.74.146.79 with HTTP; Fri, 8 Dec 2017 10:38:22 -0800 (PST)"],"DKIM-Signature":["v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;\n\td=lists.infradead.org; s=bombadil.20170209; h=Sender:\n\tContent-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post:\n\tList-Archive:List-Unsubscribe:List-Id:To:Subject:Message-ID:Date:From:\n\tReferences:In-Reply-To:MIME-Version:Reply-To:Content-ID:Content-Description:\n\tResent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:\n\tList-Owner; bh=g3KlER/EQm5yyW0m/SlMRS6xBSuZQaQZXVDI5fjki3M=;\n\tb=HAJvkautcTboF2\n\tG8PUgk1lyabdb3NjVsj+9T+iNh81QCyHsXS8yP3o0QdkOefnByEb7ELyJL5XyZJgdVVvXfVW7FQJL\n\tlWgihawisw9DMVSi7rM7ikp6dGTN4GtuZsrUOA0oMhGuoMa8bg4FqNIS9P+/Y85S1xLRqWWMZ/mgj\n\ttxuvzYCvfBt9cdi5ZKejVV2lMxxjPL+vX1RtW8LrawLEel9jMyWLxg/tPIeQfIEWqKsGWnrFSsOmW\n\tTBvErCj3guTZ/bD72V1T+8Rzgz/h9TR6SM+F2loCeiurTJXrP0gkpC61rhowrCx7km0q5MWm71x7R\n\taGkg30gt4xQZfoE3DgWA==;","v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=verdurent-com.20150623.gappssmtp.com; s=20150623;\n\th=mime-version:in-reply-to:references:from:date:message-id:subject:to\n\t:cc; bh=2fUSyFBpRWIpboXZbypwiFx/+biogi/ziFE2a6CXw18=;\n\tb=UJlgXevtD/o5ZCbkkyihGjrY4JcjC2aNtv83MwqxT3gkBs5mxTE+3sOcZ+wonLV9T6\n\tr4M+9hcBKyd0GTP7WM2EKZa/vbi++cwBBm59XZ4h4VSNT4ThcJys/0US5sAYYuB5sITM\n\t8DrQJc5h6AC++V6GgwkJZS/nebsvegoBw2Cg1esc9r6TRKKxyHQDExt8DQYkaVqtvISr\n\tCiG7JQEDl8AwRCtYWz1EOn2FXW7o9W6CYKuSJs1hMRS4TeeSa7VtYqX+FPDFxFr/H19/\n\tOxdahQgMy5D4kNJoGx0qJTvC8qktH1s6Cg4D1VH2/idCJV1ao4CJtQZ6QA/Dchpbil3l\n\t5UvQ=="],"X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:mime-version:in-reply-to:references:from:date\n\t:message-id:subject:to:cc;\n\tbh=2fUSyFBpRWIpboXZbypwiFx/+biogi/ziFE2a6CXw18=;\n\tb=LDOZszCgZDrEDvMzbTdYeFP6xLDB3tJtrqQSa7G3ODfvR/hoFJcUj1K5FTCE0LIx22\n\tj9Y8rQ5tRTwZMpTy4cm6cjf/gm7DxI/BBHf1O/v42XePHrPZ+c2WI89LsPucZGcXqSN4\n\tYy6+WVZC9iG7eT+RMdyNCKBaO2jBnoxbGo4Kt34hnzSrBfkgpRn+Nv7JUW2Hl4KiUn6G\n\tpx/2R/0zlFnkHVW4msYDRF0O+MvrrVq9mJfX8uoQIeLIE+IUElh2ppyamanOZzj4c0cF\n\t0CjpbMX7R8b3QhfNw+vpL0U0Mkl83Un8MNlDJfELfmESxiIEMmKep44DXzloVDEKUP1Q\n\t+6sA==","X-Gm-Message-State":"AJaThX7u6kcWr56IgQ7AqPf84bjqfF48R+8Utv7QCnZpiUW536EcitgW\n\tj8dtQKCUiHnG6308bw6v6ffuxwdE36ambKFLXGtCLQ==","X-Google-Smtp-Source":"AGs4zMaV6kK3nw61VA6vnfA5/OCNb+MuSHWZyyvQEA1sN3+tR2Zpo6zGZJNfbUIBxHoAuQwD6D/GLftLrO6H+Fug0jg=","X-Received":"by 10.157.68.157 with SMTP id v29mr27161293ote.274.1512758302909;\n\tFri, 08 Dec 2017 10:38:22 -0800 (PST)","MIME-Version":"1.0","In-Reply-To":"<20170908171830.13813-2-georgi.djakov@linaro.org>","References":"<20170908171830.13813-1-georgi.djakov@linaro.org>\n\t<20170908171830.13813-2-georgi.djakov@linaro.org>","From":"Amit Kucheria <amit.kucheria@verdurent.com>","Date":"Sat, 9 Dec 2017 00:08:22 +0530","Message-ID":"<CAHLCerOgm+T6S1pxjo5hFajyU+vqUgBFcwfuBCsphgECRMf3Yw@mail.gmail.com>","Subject":"Re: [PATCH v3 1/3] interconnect: Add generic on-chip interconnect\n\tAPI","To":"Georgi Djakov <georgi.djakov@linaro.org>","X-CRM114-Version":"20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 ","X-CRM114-CacheID":"sfid-20171208_103846_367356_9234E0FD ","X-CRM114-Status":"GOOD (  19.85  )","X-Spam-Score":"-1.9 (-)","X-Spam-Report":"SpamAssassin version 3.4.1 on bombadil.infradead.org summary:\n\tContent analysis details:   (-1.9 points)\n\tpts rule name              description\n\t---- ----------------------\n\t--------------------------------------------------\n\t-0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/,\n\tno\n\ttrust [2607:f8b0:4003:c0f:0:0:0:243 listed in] [list.dnswl.org]\n\t0.0 T_SPF_PERMERROR        SPF: test of record failed (permerror)\n\t-1.9 BAYES_00               BODY: Bayes spam probability is 0 to 1%\n\t[score: 0.0000]\n\t-0.1 DKIM_VALID Message has at least one valid DKIM or DK signature\n\t0.1 DKIM_SIGNED            Message has a DKIM or DK signature,\n\tnot necessarily valid","X-BeenThere":"linux-arm-kernel@lists.infradead.org","X-Mailman-Version":"2.1.21","Precedence":"list","List-Unsubscribe":"<http://lists.infradead.org/mailman/options/linux-arm-kernel>,\n\t<mailto:linux-arm-kernel-request@lists.infradead.org?subject=unsubscribe>","List-Archive":"<http://lists.infradead.org/pipermail/linux-arm-kernel/>","List-Post":"<mailto:linux-arm-kernel@lists.infradead.org>","List-Help":"<mailto:linux-arm-kernel-request@lists.infradead.org?subject=help>","List-Subscribe":"<http://lists.infradead.org/mailman/listinfo/linux-arm-kernel>,\n\t<mailto:linux-arm-kernel-request@lists.infradead.org?subject=subscribe>","Cc":"linux-arm-msm@vger.kernel.org, mark.rutland@arm.com,\n\tLorenzo Pieralisi <lorenzo.pieralisi@arm.com>,\n\tVincent Guittot <vincent.guittot@linaro.org>,\n\tLinux PM list <linux-pm@vger.kernel.org>, seansw@qti.qualcomm.com,\n\tgregkh@linuxfoundation.org, Michael Turquette <mturquette@baylibre.com>, \n\t\"Rafael J. Wysocki\" <rjw@rjwysocki.net>,\n\tLKML <linux-kernel@vger.kernel.org>, \n\tdavidai@quicinc.com, robh+dt@kernel.org,\n\tSaravana Kannan <skannan@codeaurora.org>, khilman@baylibre.com,\n\tAndy Gross <andy.gross@linaro.org>, Stephen Boyd <sboyd@codeaurora.org>, \n\tlakml <linux-arm-kernel@lists.infradead.org>","Content-Type":"text/plain; charset=\"us-ascii\"","Content-Transfer-Encoding":"7bit","Sender":"\"linux-arm-kernel\" <linux-arm-kernel-bounces@lists.infradead.org>","Errors-To":"linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org","List-Id":"linux-imx-kernel.lists.patchwork.ozlabs.org"}},{"id":1820803,"web_url":"http://patchwork.ozlabs.org/comment/1820803/","msgid":"<3e94a4fa-d3b6-488c-7247-f769cec2ab82@linaro.org>","list_archive_url":null,"date":"2017-12-12T15:46:53","subject":"Re: [PATCH v3 1/3] interconnect: Add generic on-chip interconnect\n\tAPI","submitter":{"id":70295,"url":"http://patchwork.ozlabs.org/api/people/70295/","name":"Georgi Djakov","email":"georgi.djakov@linaro.org"},"content":"Hi Amit,\n\nOn 12/08/2017 08:38 PM, Amit Kucheria wrote:\n> On Fri, Sep 8, 2017 at 10:48 PM, Georgi Djakov <georgi.djakov@linaro.org> wrote:\n>> This patch introduce a new API to get requirements and configure the\n>> interconnect buses across the entire chipset to fit with the current demand.\n>>\n>> The API is using a consumer/provider-based model, where the providers are\n>> the interconnect buses and the consumers could be various drivers.\n>> The consumers request interconnect resources (path) between endpoints and\n>> set the desired constraints on this data flow path. The providers receive\n>> requests from consumers and aggregate these requests for all master-slave\n>> pairs on that path. Then the providers configure each participating in the\n>> topology node according to the requested data flow path, physical links and\n>> constraints. The topology could be complicated and multi-tiered and is SoC\n>> specific.\n>>\n>> Signed-off-by: Georgi Djakov <georgi.djakov@linaro.org>\n\n[..]\n\n>> +inline int interconnect_set(struct interconnect_path *path,\n>> +                           struct interconnect_creq *creq);\n> \n> Remove the semi colon\n\nThanks! Fixed.\n\n> \n>> +{\n>> +       return -ENOTSUPP\n> \n> return ERR_PTR(-ENOTSUPP);\n\nI do not agree here. It should be left as is, because the function\nreturns int.\n\n> \n>> +}\n>> +\n> \n> This breaks the build with INTERCONNECT disabled in Kconfig.\n\nOk, i have fixed this as well.\n\nThanks,\nGeorgi","headers":{"Return-Path":"<linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org>","X-Original-To":"incoming-imx@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming-imx@bilbo.ozlabs.org","Authentication-Results":["ozlabs.org;\n\tspf=none (mailfrom) smtp.mailfrom=lists.infradead.org\n\t(client-ip=65.50.211.133; helo=bombadil.infradead.org;\n\tenvelope-from=linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org;\n\treceiver=<UNKNOWN>)","ozlabs.org; dkim=pass (2048-bit key;\n\tunprotected) header.d=lists.infradead.org\n\theader.i=@lists.infradead.org header.b=\"omPobGGD\"; \n\tdkim=fail reason=\"signature verification failed\" (1024-bit key;\n\tunprotected) header.d=linaro.org header.i=@linaro.org\n\theader.b=\"JXCA98V6\"; dkim-atps=neutral"],"Received":["from bombadil.infradead.org (bombadil.infradead.org\n\t[65.50.211.133])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256\n\tbits)) (No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3yx42z3hhwz9s7m\n\tfor <incoming-imx@patchwork.ozlabs.org>;\n\tWed, 13 Dec 2017 02:47:39 +1100 (AEDT)","from localhost ([127.0.0.1] helo=bombadil.infradead.org)\n\tby bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux))\n\tid 1eOmmL-0000pG-3X; Tue, 12 Dec 2017 15:47:33 +0000","from mail-wr0-x244.google.com ([2a00:1450:400c:c0c::244])\n\tby bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux))\n\tid 1eOmm7-0000Xl-QT for linux-arm-kernel@lists.infradead.org;\n\tTue, 12 Dec 2017 15:47:25 +0000","by mail-wr0-x244.google.com with SMTP id v105so21609666wrc.3\n\tfor <linux-arm-kernel@lists.infradead.org>;\n\tTue, 12 Dec 2017 07:46:57 -0800 (PST)","from [10.44.66.8] ([212.45.67.2])\n\tby smtp.googlemail.com with ESMTPSA id\n\tn7sm19955755wra.23.2017.12.12.07.46.54\n\t(version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);\n\tTue, 12 Dec 2017 07:46:55 -0800 (PST)"],"DKIM-Signature":["v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;\n\td=lists.infradead.org; s=bombadil.20170209; h=Sender:\n\tContent-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post:\n\tList-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:Date:\n\tMessage-ID:From:References:To:Subject:Reply-To:Content-ID:Content-Description\n\t:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:\n\tList-Owner; bh=oQiYxz5qeKcaJ7bPdijt76Hdtmh/HdT/xw3OrALUcZc=;\n\tb=omPobGGDq0ZRGT\n\t7deHaZKUBL4r0sADx9UhUIJyYj1Ftss4QX+YX9buicnVFpHulKzkqb+4XPipjRTsoEkr2Y4DzLcKV\n\tnHVbL9apEsN6LtAFDPZl3pg5OILiP/Qhj3EpAFu8O/eAtoCen0seTABULRweS0qy8aFfO7NIbQGkm\n\ty7Doefe02Hdk7RKJ+7gR5K1GzU/2JWYOjlsIOUJ9oVJrG31egmQ9ga58mn8bhiJjsmZLkRkgLuPk/\n\tuqXOvnKwlZof25a8QUQ94a7yXuLlqwTb6B38wTk3eCieUhYMUBgIG7IvlOMWMIASnELmEb5M8Gi9e\n\tm2UbdWT9ZoQfl/x4zoIA==;","v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google;\n\th=subject:to:cc:references:from:message-id:date:user-agent\n\t:mime-version:in-reply-to:content-language:content-transfer-encoding; \n\tbh=xKtOU9uIpP1HNEB+uccotnJBvT3x6yTjyAZO8XN0MVU=;\n\tb=JXCA98V6UH61EHiXzHDFX1Ut274Y6AMOPhgTSAqhXSUK3oq3i+8q9WxFgpAJf/7IoO\n\tR03HMriVlppqzUYTbkf3V318Ghb6wb4rELjHk/qbk+WRh0qqgitTOxYgpD/0WiuOC5uh\n\tDvEFcVf+GdJzZbw0+T29m3W6N5DBRqaolyoNI="],"X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:subject:to:cc:references:from:message-id:date\n\t:user-agent:mime-version:in-reply-to:content-language\n\t:content-transfer-encoding;\n\tbh=xKtOU9uIpP1HNEB+uccotnJBvT3x6yTjyAZO8XN0MVU=;\n\tb=kHZMU/q3AhVAm0oLqyQErjL0uMzF0RbxtZOh/W3rzJDdxk5kCY3UiVTRvzIL5NPmvL\n\tQ/auC1FYZsq674H5aTChnBekLoE6ikvMtS9NHkD3OxXohVGTOYI8mBa9JnHGpxjmr/Ip\n\taCd7Y4TlbVZ8UGIkoaAOR611zkfUvLN8wRzr6UQsegcw/wFE2OHBiEvQDy03Oefe2KGd\n\tWWJLDTc/rY5ORaWByABFSFYSq56HMkl1u1cWJfo36zaUDCEHj+zJa3OzMTOJVvYGugUd\n\tDynH9zfJYZNr7qHm01z4j+IZ+LaSSuZXN2IqWlGwrRCMR6WBniDSx95+u8UiaAaQD4+4\n\t4/Ag==","X-Gm-Message-State":"AKGB3mLU4uBaaNvhjumQDx/nvCuYzjTIDaXEE8MIUDNHLD00XWgE0spK\n\ttfdRGIdyKcHrAR8akGK9RQcUlw==","X-Google-Smtp-Source":"ACJfBov/DMOg9X+jw5c4t6w/zzFiALcV+tBA1IYLIP89W4AB1EKYMaLL4zlvYDI8OpaTOCmntHMn2w==","X-Received":"by 10.223.187.210 with SMTP id z18mr3890387wrg.117.1513093616343;\n\tTue, 12 Dec 2017 07:46:56 -0800 (PST)","Subject":"Re: [PATCH v3 1/3] interconnect: Add generic on-chip interconnect\n\tAPI","To":"Amit Kucheria <amit.kucheria@verdurent.com>","References":"<20170908171830.13813-1-georgi.djakov@linaro.org>\n\t<20170908171830.13813-2-georgi.djakov@linaro.org>\n\t<CAHLCerOgm+T6S1pxjo5hFajyU+vqUgBFcwfuBCsphgECRMf3Yw@mail.gmail.com>","From":"Georgi Djakov <georgi.djakov@linaro.org>","Message-ID":"<3e94a4fa-d3b6-488c-7247-f769cec2ab82@linaro.org>","Date":"Tue, 12 Dec 2017 17:46:53 +0200","User-Agent":"Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101\n\tThunderbird/52.5.0","MIME-Version":"1.0","In-Reply-To":"<CAHLCerOgm+T6S1pxjo5hFajyU+vqUgBFcwfuBCsphgECRMf3Yw@mail.gmail.com>","Content-Language":"en-US","X-CRM114-Version":"20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 ","X-CRM114-CacheID":"sfid-20171212_074720_843796_92B46AE1 ","X-CRM114-Status":"GOOD (  14.06  )","X-Spam-Score":"-2.0 (--)","X-Spam-Report":"SpamAssassin version 3.4.1 on bombadil.infradead.org summary:\n\tContent analysis details:   (-2.0 points)\n\tpts rule name              description\n\t---- ----------------------\n\t--------------------------------------------------\n\t-0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/,\n\tno\n\ttrust [2a00:1450:400c:c0c:0:0:0:244 listed in] [list.dnswl.org]\n\t-0.0 SPF_PASS               SPF: sender matches SPF record\n\t-1.9 BAYES_00               BODY: Bayes spam probability is 0 to 1%\n\t[score: 0.0000]\n\t-0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from\n\tauthor's domain\n\t0.1 DKIM_SIGNED            Message has a DKIM or DK signature,\n\tnot necessarily valid\n\t-0.1 DKIM_VALID Message has at least one valid DKIM or DK signature","X-BeenThere":"linux-arm-kernel@lists.infradead.org","X-Mailman-Version":"2.1.21","Precedence":"list","List-Unsubscribe":"<http://lists.infradead.org/mailman/options/linux-arm-kernel>,\n\t<mailto:linux-arm-kernel-request@lists.infradead.org?subject=unsubscribe>","List-Archive":"<http://lists.infradead.org/pipermail/linux-arm-kernel/>","List-Post":"<mailto:linux-arm-kernel@lists.infradead.org>","List-Help":"<mailto:linux-arm-kernel-request@lists.infradead.org?subject=help>","List-Subscribe":"<http://lists.infradead.org/mailman/listinfo/linux-arm-kernel>,\n\t<mailto:linux-arm-kernel-request@lists.infradead.org?subject=subscribe>","Cc":"linux-arm-msm@vger.kernel.org, mark.rutland@arm.com,\n\tLorenzo Pieralisi <lorenzo.pieralisi@arm.com>,\n\tVincent Guittot <vincent.guittot@linaro.org>,\n\tLinux PM list <linux-pm@vger.kernel.org>, seansw@qti.qualcomm.com,\n\tgregkh@linuxfoundation.org, Michael Turquette <mturquette@baylibre.com>, \n\t\"Rafael J. Wysocki\" <rjw@rjwysocki.net>,\n\tLKML <linux-kernel@vger.kernel.org>, \n\tdavidai@quicinc.com, robh+dt@kernel.org,\n\tSaravana Kannan <skannan@codeaurora.org>, khilman@baylibre.com,\n\tAndy Gross <andy.gross@linaro.org>, Stephen Boyd <sboyd@codeaurora.org>, \n\tlakml <linux-arm-kernel@lists.infradead.org>","Content-Type":"text/plain; charset=\"us-ascii\"","Content-Transfer-Encoding":"7bit","Sender":"\"linux-arm-kernel\" <linux-arm-kernel-bounces@lists.infradead.org>","Errors-To":"linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org","List-Id":"linux-imx-kernel.lists.patchwork.ozlabs.org"}},{"id":1825472,"web_url":"http://patchwork.ozlabs.org/comment/1825472/","msgid":"<CAF6AEGsMKMfDz=C6n5Fw0Fo92nu6qHXMV1w4rvE+6EhfTW6huA@mail.gmail.com>","list_archive_url":null,"date":"2017-12-19T15:21:01","subject":"Re: [PATCH v3 1/3] interconnect: Add generic on-chip interconnect\n\tAPI","submitter":{"id":18760,"url":"http://patchwork.ozlabs.org/api/people/18760/","name":"Rob Clark","email":"robdclark@gmail.com"},"content":"On Fri, Sep 8, 2017 at 1:18 PM, Georgi Djakov <georgi.djakov@linaro.org> wrote:\n> This patch introduce a new API to get requirements and configure the\n> interconnect buses across the entire chipset to fit with the current demand.\n>\n> The API is using a consumer/provider-based model, where the providers are\n> the interconnect buses and the consumers could be various drivers.\n> The consumers request interconnect resources (path) between endpoints and\n> set the desired constraints on this data flow path. The providers receive\n> requests from consumers and aggregate these requests for all master-slave\n> pairs on that path. Then the providers configure each participating in the\n> topology node according to the requested data flow path, physical links and\n> constraints. The topology could be complicated and multi-tiered and is SoC\n> specific.\n>\n> Signed-off-by: Georgi Djakov <georgi.djakov@linaro.org>\n> ---\n>  Documentation/interconnect/interconnect.rst |  93 +++++++\n>  drivers/Kconfig                             |   2 +\n>  drivers/Makefile                            |   1 +\n>  drivers/interconnect/Kconfig                |  10 +\n>  drivers/interconnect/Makefile               |   1 +\n>  drivers/interconnect/interconnect.c         | 382 ++++++++++++++++++++++++++++\n>  include/linux/interconnect-consumer.h       |  73 ++++++\n>  include/linux/interconnect-provider.h       | 119 +++++++++\n>  8 files changed, 681 insertions(+)\n>  create mode 100644 Documentation/interconnect/interconnect.rst\n>  create mode 100644 drivers/interconnect/Kconfig\n>  create mode 100644 drivers/interconnect/Makefile\n>  create mode 100644 drivers/interconnect/interconnect.c\n>  create mode 100644 include/linux/interconnect-consumer.h\n>  create mode 100644 include/linux/interconnect-provider.h\n>\n>\n\n[snip]\n\n> +/**\n> + * interconnect_set() - set constraints on a path between two endpoints\n> + * @path: reference to the path returned by interconnect_get()\n> + * @creq: request from the consumer, containing its requirements\n> + *\n> + * This function is used by an interconnect consumer to express its own needs\n> + * in term of bandwidth and QoS for a previously requested path between two\n> + * endpoints. The requests are aggregated and each node is updated accordingly.\n> + *\n> + * Returns 0 on success, or an approproate error code otherwise.\n> + */\n> +int interconnect_set(struct interconnect_path *path,\n> +                    struct interconnect_creq *creq)\n\ndrive-by comment... afaict creq could be 'const'\n\nBR,\n-R","headers":{"Return-Path":"<linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org>","X-Original-To":"incoming-imx@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming-imx@bilbo.ozlabs.org","Authentication-Results":["ozlabs.org;\n\tspf=none (mailfrom) smtp.mailfrom=lists.infradead.org\n\t(client-ip=65.50.211.133; helo=bombadil.infradead.org;\n\tenvelope-from=linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org;\n\treceiver=<UNKNOWN>)","ozlabs.org; dkim=pass (2048-bit key;\n\tunprotected) header.d=lists.infradead.org\n\theader.i=@lists.infradead.org header.b=\"duCMLBRg\"; \n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n\tunprotected) header.d=gmail.com header.i=@gmail.com\n\theader.b=\"c5Y7ycLz\"; dkim-atps=neutral"],"Received":["from bombadil.infradead.org (bombadil.infradead.org\n\t[65.50.211.133])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256\n\tbits)) (No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3z1M8B1Z5tz9sPm\n\tfor <incoming-imx@patchwork.ozlabs.org>;\n\tWed, 20 Dec 2017 02:22:02 +1100 (AEDT)","from localhost ([127.0.0.1] helo=bombadil.infradead.org)\n\tby bombadil.infradead.org with esmtp (Exim 4.89 #1 (Red Hat Linux))\n\tid 1eRJiN-00006d-DR; Tue, 19 Dec 2017 15:21:55 +0000","from mail-io0-x242.google.com ([2607:f8b0:4001:c06::242])\n\tby bombadil.infradead.org with esmtps (Exim 4.89 #1 (Red Hat Linux))\n\tid 1eRJhh-0008A8-Vc for linux-arm-kernel@lists.infradead.org;\n\tTue, 19 Dec 2017 15:21:16 +0000","by mail-io0-x242.google.com with SMTP id w127so13938663iow.11\n\tfor <linux-arm-kernel@lists.infradead.org>;\n\tTue, 19 Dec 2017 07:21:02 -0800 (PST)","by 10.2.160.135 with HTTP; Tue, 19 Dec 2017 07:21:01 -0800 (PST)"],"DKIM-Signature":["v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;\n\td=lists.infradead.org; s=bombadil.20170209; h=Sender:\n\tContent-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post:\n\tList-Archive:List-Unsubscribe:List-Id:To:Subject:Message-ID:Date:From:\n\tReferences:In-Reply-To:MIME-Version:Reply-To:Content-ID:Content-Description:\n\tResent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:\n\tList-Owner; bh=dMRa2aUNsTW0cNGy7zDTDDOAKYefDUus7NqPwNJuACM=;\n\tb=duCMLBRg7QQw5L\n\tDlJR+gvgDR7x6nEr0f3ayTD2J1iCmBvceC/vFhHq8XbmwdVabElezqHc9GBS4H5eUd3YdcK31sJgD\n\tIpqcv5YMraYOxsot3281Epd90q1WITGfQ5yrKIiya6NzxEtG+0Amsp7pN5HP4MUB4y8paaqDvV/Tt\n\t/JUVkddA9mYw3LdsfFxXd3jmZJWbbCdu5PomKgzhaWXpSKwjMsZOiCuqgdudwryD3CG2rUBR36LnY\n\toyVgZjIwdvpzNbrlzSJoRijzBcqi6CgHIjLAld8qtLX7WG2CZZBdpFnR7CftRplj0vnjPVTx3tpYt\n\tofJ6AhuiHHVju43FA+lQ==;","v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;\n\th=mime-version:in-reply-to:references:from:date:message-id:subject:to\n\t:cc; bh=DIJKhIv17MsqjnGfE+8h/VZm1DQ0nR0c/IaNZ9EoUxE=;\n\tb=c5Y7ycLz7pT/3NYDpsAS8wdvi5LGqCHfDE5JLu5sNIOw8IyPxBGwvpdK5YC4l7p1Fb\n\tLXPw1PXea4IDW3OJ+JO5Lg0ZnDj2QxrgYtJRwMObx73qMmMDE0+vq5qIyKW3yB3663UE\n\tZynSHbIssDsILjB8M+fH2ca/+Dg4sRl299u5WOBgN2aJQv0c3/iat4qei6TarKVqcOuR\n\tKbhAy+XtvXuFdyqGdOuuEw2c5fLsjK+++aaS4hw98muA6MStKA/6v41ia1ypPfAiJg10\n\tm3V0RKvDzEIZ1qC3M4Ry8o4CngvLhC6+q72LFORBzZuR8sMPvOnQq10ubeKjjU0zR5VY\n\tnmqQ=="],"X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:mime-version:in-reply-to:references:from:date\n\t:message-id:subject:to:cc;\n\tbh=DIJKhIv17MsqjnGfE+8h/VZm1DQ0nR0c/IaNZ9EoUxE=;\n\tb=GyalOX9s1pEGVxa469bEyHLwlo+8vKguZZZrr0liIma7P/1lftvZPzoWzoflsua6pf\n\t4Z1Bg+oDK24EnXowIT+gB+7ydqsv5hSPWKUd4QLSCdvapL3Wl9Fsq2tp/UQjxNUbTYGx\n\t2PGBpgdI9h+tnE5GGsSL93xj5z7i9s3wRHlQbC2W4lEEKonZhExjhqqTZID7ZPW8CyMG\n\tncDym+N19xeCndASIiJLls3sF9m/rL5KOzlte7KzSC07Rf2PztlHaP2MS2CMf2LP7QUD\n\t7SSfiSc5M4OToCQoDlF+ULGTmAflApFpHdDioOWpXs9hxYfT76f5Zqtfcw9dO4AJ3Og6\n\tVEIw==","X-Gm-Message-State":"AKGB3mL/LCpPUl+Eu1yCz4MR6+/MhAGRHP7q9YhnQlNSnwg9Hv6EAAas\n\tMX7ngCWF9I7qJqZZJF5vF7znY5z0jDurvwuDfEM=","X-Google-Smtp-Source":"ACJfBosYL2ET+5CUDkCbdefgA/KFOr0I91n2DNt97+RBEeMWAmr+XzT5otyvSSqTW9KLLdXbaI/dQfzdrSTXbVGW8MQ=","X-Received":"by 10.107.102.24 with SMTP id a24mr3821893ioc.144.1513696861576; \n\tTue, 19 Dec 2017 07:21:01 -0800 (PST)","MIME-Version":"1.0","In-Reply-To":"<20170908171830.13813-2-georgi.djakov@linaro.org>","References":"<20170908171830.13813-1-georgi.djakov@linaro.org>\n\t<20170908171830.13813-2-georgi.djakov@linaro.org>","From":"Rob Clark <robdclark@gmail.com>","Date":"Tue, 19 Dec 2017 10:21:01 -0500","Message-ID":"<CAF6AEGsMKMfDz=C6n5Fw0Fo92nu6qHXMV1w4rvE+6EhfTW6huA@mail.gmail.com>","Subject":"Re: [PATCH v3 1/3] interconnect: Add generic on-chip interconnect\n\tAPI","To":"Georgi Djakov <georgi.djakov@linaro.org>","X-CRM114-Version":"20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 ","X-CRM114-CacheID":"sfid-20171219_072114_132179_21A59317 ","X-CRM114-Status":"GOOD (  16.77  )","X-Spam-Score":"-2.0 (--)","X-Spam-Report":"SpamAssassin version 3.4.1 on bombadil.infradead.org summary:\n\tContent analysis details:   (-2.0 points)\n\tpts rule name              description\n\t---- ----------------------\n\t--------------------------------------------------\n\t-0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/,\n\tno\n\ttrust [2607:f8b0:4001:c06:0:0:0:242 listed in] [list.dnswl.org]\n\t0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail\n\tprovider (robdclark[at]gmail.com)\n\t-0.0 SPF_PASS               SPF: sender matches SPF record\n\t-1.9 BAYES_00               BODY: Bayes spam probability is 0 to 1%\n\t[score: 0.0000]\n\t-0.1 DKIM_VALID Message has at least one valid DKIM or DK signature\n\t0.1 DKIM_SIGNED            Message has a DKIM or DK signature,\n\tnot necessarily valid\n\t-0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from\n\tauthor's domain","X-BeenThere":"linux-arm-kernel@lists.infradead.org","X-Mailman-Version":"2.1.21","Precedence":"list","List-Unsubscribe":"<http://lists.infradead.org/mailman/options/linux-arm-kernel>,\n\t<mailto:linux-arm-kernel-request@lists.infradead.org?subject=unsubscribe>","List-Archive":"<http://lists.infradead.org/pipermail/linux-arm-kernel/>","List-Post":"<mailto:linux-arm-kernel@lists.infradead.org>","List-Help":"<mailto:linux-arm-kernel-request@lists.infradead.org?subject=help>","List-Subscribe":"<http://lists.infradead.org/mailman/listinfo/linux-arm-kernel>,\n\t<mailto:linux-arm-kernel-request@lists.infradead.org?subject=subscribe>","Cc":"linux-arm-msm <linux-arm-msm@vger.kernel.org>,\n\tMark Rutland <mark.rutland@arm.com>, lorenzo.pieralisi@arm.com,\n\tVincent Guittot <vincent.guittot@linaro.org>, linux-pm@vger.kernel.org,\n\tseansw@qti.qualcomm.com, Greg KH <gregkh@linuxfoundation.org>,\n\tMichael Turquette <mturquette@baylibre.com>,\n\tRafael Wysocki <rjw@rjwysocki.net>,\n\tLinux Kernel Mailing List <linux-kernel@vger.kernel.org>,\n\tdavidai@quicinc.com, Rob Herring <robh+dt@kernel.org>,\n\tSaravana Kannan <skannan@codeaurora.org>, \n\tKevin Hilman <khilman@baylibre.com>, Andy Gross <andy.gross@linaro.org>, \n\tStephen Boyd <sboyd@codeaurora.org>, linux-arm-kernel@lists.infradead.org","Content-Type":"text/plain; charset=\"us-ascii\"","Content-Transfer-Encoding":"7bit","Sender":"\"linux-arm-kernel\" <linux-arm-kernel-bounces@lists.infradead.org>","Errors-To":"linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org","List-Id":"linux-imx-kernel.lists.patchwork.ozlabs.org"}}]