Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp3288872pxk; Mon, 21 Sep 2020 09:47:07 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy90MNr2wO2xDVdyM5RVDX46v8tsV4pydcDRdBpvEQn73y/WTLLEvKtxtiXzMQzbIzmPWnD X-Received: by 2002:a50:9dc8:: with SMTP id l8mr598670edk.58.1600706827210; Mon, 21 Sep 2020 09:47:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1600706827; cv=none; d=google.com; s=arc-20160816; b=AJw1WO0650qgCtZc8Wi1HAlYnrJ3XlTdd0kMkjOdiAUVtHEc0xKsGSq2cnkSNNLxKc uXTNt5WJhnAIaLQ2H8D60wbNQ3hjj5DKzD1VCimxVVzYvayNxG7Oms/5vXHm1fAb+F0Q nnRQM9kdyJLmrO1rx8vlxHfQZz9M1iPo8gFLQfSWrRkAisJZ/DYi7lG6IBYI+UarkEl0 g4MU2nh35Orxh2mGJKh5PAbUAcg1qjsblByvh/j8xVo1xVqjpklqPgnOlVVKrfhAkyrd 7lbN/6GA2oIvkS8zaPXtDw4X3zr2uPD/ozojZrGbGwa66ws40i+CGYtV9/V4x/k/bHLi +Xkg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=tAO3UJjdteEMWVo5Nd11I74OpBHVqthyCp6tZxjV3mc=; b=Oif/yDlmYLY7+8DRqiZJzI2InKR65opZn343ptVe+GIODNlr73Vn2TBy5Uf3utFW1z sPGd1N98uUJHDFB94eq3v4M3oZpN4s6EF3N9OAc1EKOKwBTikoZsiTj8CL6wMN1vTPnn ImYlVIt6WWG+zGAaiMuSKMMBH8foaWmS5HehazAdnCk0O96bSd0T9QzBqK92UMRfPPlG qobfAGUKTH5GWvneiFxsAkV3ovhVKPLxa2fMt50JyWifwV2LeB5L7XxAJ6GVZir0UNbT THLa2HZx8KkGCPlp+9ojDY48guXMIHodbYdrnTFxPukQArAYG1t5zznOUjiVlJSEAcKJ 8/Pw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=oylHFbJd; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id i22si9054878ejy.5.2020.09.21.09.46.43; Mon, 21 Sep 2020 09:47:07 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=oylHFbJd; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729613AbgIUQnb (ORCPT + 99 others); Mon, 21 Sep 2020 12:43:31 -0400 Received: from mail.kernel.org ([198.145.29.99]:48050 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728515AbgIUQn2 (ORCPT ); Mon, 21 Sep 2020 12:43:28 -0400 Received: from localhost (83-86-74-64.cable.dynamic.v4.ziggo.nl [83.86.74.64]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 3908D235F9; Mon, 21 Sep 2020 16:43:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1600706607; bh=L1FWJ3Phjt/pxDhSTC7ZNmaKjoDptfD5Cefa6BmLavA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=oylHFbJdFIX0Q8pMqzbzhqfV3ue6sqJWZOrh5HvgG/KNb2Fc5p4qH4dAtukIF37Ti k8JEZDcKSzdXR/APWQLHUwTQi/6icjxGBFe22Uwg5o52AjECm3jwXokrsjHf0ISlEV U2OILEzhZoG8UC23hmY6Ic2WNky2s2EivTwlWF/w= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Matthias Kaehlcke , Evan Green , Georgi Djakov , Sasha Levin Subject: [PATCH 5.8 020/118] interconnect: Show bandwidth for disabled paths as zero in debugfs Date: Mon, 21 Sep 2020 18:27:12 +0200 Message-Id: <20200921162037.258229222@linuxfoundation.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200921162036.324813383@linuxfoundation.org> References: <20200921162036.324813383@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Matthias Kaehlcke [ Upstream commit b1910c6b9983817160e04d4e87b2dc1413c5361a ] For disabled paths the 'interconnect_summary' in debugfs currently shows the orginally requested bandwidths. This is confusing, since the bandwidth requests aren't active. Instead show the bandwidths for disabled paths/requests as zero. Signed-off-by: Matthias Kaehlcke Reviewed-by: Evan Green Link: https://lore.kernel.org/r/20200729104933.1.If8e80e4c0c7ddf99056f6e726e59505ed4e127f3@changeid Signed-off-by: Georgi Djakov Signed-off-by: Sasha Levin --- drivers/interconnect/core.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/drivers/interconnect/core.c b/drivers/interconnect/core.c index 9e1ab701785c7..0162a9af93237 100644 --- a/drivers/interconnect/core.c +++ b/drivers/interconnect/core.c @@ -55,12 +55,18 @@ static int icc_summary_show(struct seq_file *s, void *data) icc_summary_show_one(s, n); hlist_for_each_entry(r, &n->req_list, req_node) { + u32 avg_bw = 0, peak_bw = 0; + if (!r->dev) continue; + if (r->enabled) { + avg_bw = r->avg_bw; + peak_bw = r->peak_bw; + } + seq_printf(s, " %-27s %12u %12u %12u\n", - dev_name(r->dev), r->tag, r->avg_bw, - r->peak_bw); + dev_name(r->dev), r->tag, avg_bw, peak_bw); } } } -- 2.25.1