Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp431324ybc; Fri, 22 Nov 2019 07:29:42 -0800 (PST) X-Google-Smtp-Source: APXvYqwbJkJGfIcCkb5dIMqtlMAXbWmS0JMGC+BZscjSENRkiSDcHw19vF14dkjz5l+StnS59UMp X-Received: by 2002:a05:6402:502:: with SMTP id m2mr1774566edv.65.1574436582123; Fri, 22 Nov 2019 07:29:42 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1574436582; cv=none; d=google.com; s=arc-20160816; b=NXoKIVghGjoOP9mp9O2RfN7ptGPckymlgzV3qIN/f3OpqUAFJEumhHIEXmHVXsz8ds QJWLSRRA1Kdof4jn5arqWsCXrt/Zohmj+97i15QMkQcd90QlPvLobO2EafYsKACcz5Eg GH5Tg3Wvz6+YUS6nm/kwlNrCtBDf/y8iTT63a7QDIEVKJncuCOAgY/O1SO/FYPK2irNx wyJvwNeLiGevIzrMADx65UiOHywREbSdrU70Jad0bZHP9pC6Hjp4hSCwVMohkxHmCMOJ lL8gK0S6LCbUI4qSIUdbzsGjYmkHZmA1lix1+xtPR071ZSwSK39JZ7GiZJjdJQF2rYTy rDpA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=uArUv8vdpySZgh7Lm5Xr7vRuWHgZ37E7MwLwkpMIDCE=; b=qS8URbpkuKc3a5Mk9Wm/GM0VrbwLEK8gM9maA2grBpc+GwYgk9kQ/Fr8t1KztRTrEx 8tffKXa2BHfvB5buuj6+xw7lUTA8wmkfGZ0JZ4Z8BQxraxH2wpIUq0SUuZmTIV+C90i2 pkU157hfq1jya24mVGvr5p39buuIAEU1eToUwxknVdXwk+bSeWeLOyl9yGr9ugVVndB1 ZzvyzsPRv+9f14eyI5eWHuORzSXNJy3kN5rEju0jc/YB3v9X5i5B5mh34XCHMsRK5Qhv ROXOGOiLKiOp/AuZL5lBryi8ikUrd4Czitd27WUOi6CByBYEV5wAKpBTgXphR3Xww2uX iTEA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=NaRspV1i; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k24si2821974ejk.280.2019.11.22.07.29.18; Fri, 22 Nov 2019 07:29:42 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=NaRspV1i; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727225AbfKVP1S (ORCPT + 99 others); Fri, 22 Nov 2019 10:27:18 -0500 Received: from mail-wr1-f68.google.com ([209.85.221.68]:41676 "EHLO mail-wr1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726568AbfKVP1R (ORCPT ); Fri, 22 Nov 2019 10:27:17 -0500 Received: by mail-wr1-f68.google.com with SMTP id b18so9073029wrj.8 for ; Fri, 22 Nov 2019 07:27:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=uArUv8vdpySZgh7Lm5Xr7vRuWHgZ37E7MwLwkpMIDCE=; b=NaRspV1i9R/2DSgO46P3hMCkjk1YhaYl/30P0KnMRJ4U2uvFGg3fyz0Adr5Jvd2tOs eN0cW4S1Frgb4REXIEtg2D0LYumT1r8ky//58cBQQ3nZGGPeaxEo0lCTHngODV8isvfq W82UlSHKhkNGQOOq36treKn6APbHFSpLG+0dFlmrZZSujY7v8yE9lKTGkPRnL6nseJWm 01BumRD7UQxFXWoLol0hM1dgiNFU9P+mFr3MudOfVmKMxprhxWd5tWk789FwO7mK6Igz lOJRq6RcGGB1vWLC8Blp6UdSHvoICayQN2/Iz4s7GX/jXbDRLUPGeLRU8uCjFc2ygEvF vIGQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=uArUv8vdpySZgh7Lm5Xr7vRuWHgZ37E7MwLwkpMIDCE=; b=Lku3MCMlIGOQkIarEoW9OxzsxMCUXBeIutsgAOCy5UGgu61eQoeet6hOJqw5fAux8a zutHKsoCD9AzVnSs77qObu/Guwp+aKm56PfF3AVaVxr/FMvMkeP5cPjarbxACl180G9j E/BWYewHFoyK0rX12KV0/dWdsnxXHFni2CXFF5iWe8pCdgDq9b68NfCBmtQwbzUuOBfZ 7r2ylUj1s/p79PgR3CS+g58jzDPUjwG2SotG25Z3hAuqm8Nonz4Lfyjq1SU4Hoxmih1I mmQBYjGqIGRbrRNSRWgkWIadMT5XE4YMAxy6oWrQLQTqCE9kh9eewRSSuoyMoyuinvfh uHVA== X-Gm-Message-State: APjAAAUp+HuRcF5vgiwkUlWKVUPZBXmvCDz6whAt4IIOGbh5FxXazIji 2BKAVNE08QlGgNGe6UZreemPjQ== X-Received: by 2002:adf:fad1:: with SMTP id a17mr17735327wrs.328.1574436435728; Fri, 22 Nov 2019 07:27:15 -0800 (PST) Received: from localhost.localdomain ([212.45.67.2]) by smtp.googlemail.com with ESMTPSA id a206sm4061081wmf.15.2019.11.22.07.27.14 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 22 Nov 2019 07:27:15 -0800 (PST) From: Georgi Djakov To: linux-pm@vger.kernel.org, rostedt@goodmis.org, mingo@redhat.com Cc: bjorn.andersson@linaro.org, vincent.guittot@linaro.org, daidavid1@codeaurora.org, okukatla@codeaurora.org, evgreen@chromium.org, mka@chromium.org, linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, georgi.djakov@linaro.org Subject: [PATCH v3 1/3] interconnect: Move internal structs into a separate file Date: Fri, 22 Nov 2019 17:27:10 +0200 Message-Id: <20191122152712.19105-2-georgi.djakov@linaro.org> X-Mailer: git-send-email 2.24.0 In-Reply-To: <20191122152712.19105-1-georgi.djakov@linaro.org> References: <20191122152712.19105-1-georgi.djakov@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Move the interconnect framework internal structs into a separate file, so that it can be included and used by ftrace code. This will allow us to expose some more useful information in the traces. Signed-off-by: Georgi Djakov --- drivers/interconnect/core.c | 30 ++----------------------- drivers/interconnect/internal.h | 40 +++++++++++++++++++++++++++++++++ 2 files changed, 42 insertions(+), 28 deletions(-) create mode 100644 drivers/interconnect/internal.h diff --git a/drivers/interconnect/core.c b/drivers/interconnect/core.c index c498796adc07..b06ed180bae3 100644 --- a/drivers/interconnect/core.c +++ b/drivers/interconnect/core.c @@ -19,39 +19,13 @@ #include #include +#include "internal.h" + static DEFINE_IDR(icc_idr); static LIST_HEAD(icc_providers); static DEFINE_MUTEX(icc_lock); static struct dentry *icc_debugfs_dir; -/** - * struct icc_req - constraints that are attached to each node - * @req_node: entry in list of requests for the particular @node - * @node: the interconnect node to which this constraint applies - * @dev: reference to the device that sets the constraints - * @tag: path tag (optional) - * @avg_bw: an integer describing the average bandwidth in kBps - * @peak_bw: an integer describing the peak bandwidth in kBps - */ -struct icc_req { - struct hlist_node req_node; - struct icc_node *node; - struct device *dev; - u32 tag; - u32 avg_bw; - u32 peak_bw; -}; - -/** - * struct icc_path - interconnect path structure - * @num_nodes: number of hops (nodes) - * @reqs: array of the requests applicable to this path of nodes - */ -struct icc_path { - size_t num_nodes; - struct icc_req reqs[]; -}; - static void icc_summary_show_one(struct seq_file *s, struct icc_node *n) { if (!n) diff --git a/drivers/interconnect/internal.h b/drivers/interconnect/internal.h new file mode 100644 index 000000000000..5853e8faf223 --- /dev/null +++ b/drivers/interconnect/internal.h @@ -0,0 +1,40 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +/* + * Interconnect framework internal structs + * + * Copyright (c) 2019, Linaro Ltd. + * Author: Georgi Djakov + */ + +#ifndef __DRIVERS_INTERCONNECT_INTERNAL_H +#define __DRIVERS_INTERCONNECT_INTERNAL_H + +/** + * struct icc_req - constraints that are attached to each node + * @req_node: entry in list of requests for the particular @node + * @node: the interconnect node to which this constraint applies + * @dev: reference to the device that sets the constraints + * @tag: path tag (optional) + * @avg_bw: an integer describing the average bandwidth in kBps + * @peak_bw: an integer describing the peak bandwidth in kBps + */ +struct icc_req { + struct hlist_node req_node; + struct icc_node *node; + struct device *dev; + u32 tag; + u32 avg_bw; + u32 peak_bw; +}; + +/** + * struct icc_path - interconnect path structure + * @num_nodes: number of hops (nodes) + * @reqs: array of the requests applicable to this path of nodes + */ +struct icc_path { + size_t num_nodes; + struct icc_req reqs[]; +}; + +#endif