From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id BB419CCA485 for ; Mon, 4 Jul 2022 12:18:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234450AbiGDMSY (ORCPT ); Mon, 4 Jul 2022 08:18:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53960 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234776AbiGDMR4 (ORCPT ); Mon, 4 Jul 2022 08:17:56 -0400 Received: from mail-lj1-x234.google.com (mail-lj1-x234.google.com [IPv6:2a00:1450:4864:20::234]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0103911A1C for ; Mon, 4 Jul 2022 05:17:36 -0700 (PDT) Received: by mail-lj1-x234.google.com with SMTP id r9so10843136ljp.9 for ; Mon, 04 Jul 2022 05:17:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=bUHK7FLYbuKzqzrEAJR7c+KmgynCicbvnzdwq2sVmI8=; b=qhGqzsRhvCQs96kxKr5liLm7CKnA5+AxQKaP7OUrSyE4miumGZmhLNRAY2bNN0cdG0 tbq1CKueAVpYgR8igSgddjOXqb/SFJYJ6Iibuw61vvhHQeMSnDmvUpnb+T606fX0f7IA BJ1cOh1LCMp/yfnsjiipMNB5wf8ns7EZEGywTGDYeDrE39DlZrx5iD1AyL3QoxJ244cZ ihoaXY+mlgrU556tQjtFi64zXHLkqUXYEZaLuneoNwkVmbeRWuxfmsaMQTMIiU4zfWEH vaTCsQpX/xK9tBmMV10XgCArYaZXMJ8TCvXAhP9qZyR2cQAUHwVBV8oGnX7FjTNkAgcV Cdsg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=bUHK7FLYbuKzqzrEAJR7c+KmgynCicbvnzdwq2sVmI8=; b=i/8Vuk9RYYImwxo+eDzhKUygJIWtS0vYX/s+RzlIFSXX5fbFUHW81habEHd0oRsg2g e4QcyYy/S6+9eUP/IuqwXCUrd8gbBstT9n/7aicZ12MUZKjHCdm7WQvnNgXsK5tkS/ko azvXUlUrKI1rjPsUW2ia4ti+Lij5SFKJvTfYb4b95lTZq5TpbtQxT7iw/loxnLx8vExa fFXWsXjCyeQsx5spZMDV45zpfg68QWX4hG1C/N12BqLyr+tc8B1Atd9dupGYN9amQZZr tSjoMqfNXDKBH7nc8DHw8kXrtbgY7DazKY9uTHSenWeRCrPel53QxKJaqV90z86cajFu uvvQ== X-Gm-Message-State: AJIora9RGUTI0nvP3jloS++Z6qduq7FA1PeOvHuEoSG0dznuBFqbv9V7 0yOHeyLmcIqOYoWYnj4715zwkA== X-Google-Smtp-Source: AGRyM1t47gezqmzrWMhZ7+1YcO1f62HYaF93Yupewcz7b4aXcA0k50BaEbcGuyttIrsyH+ED5YUW+w== X-Received: by 2002:a2e:a453:0:b0:25a:96d0:b15 with SMTP id v19-20020a2ea453000000b0025a96d00b15mr16015890ljn.228.1656937054339; Mon, 04 Jul 2022 05:17:34 -0700 (PDT) Received: from krzk-bin.home ([84.20.121.239]) by smtp.gmail.com with ESMTPSA id u11-20020a05651220cb00b0047faa01edd9sm5102149lfr.229.2022.07.04.05.17.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 04 Jul 2022 05:17:33 -0700 (PDT) From: Krzysztof Kozlowski To: Krzysztof Kozlowski , Andy Gross , Bjorn Andersson , Georgi Djakov , Rob Herring , Catalin Marinas , Will Deacon , linux-arm-msm@vger.kernel.org, linux-pm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Cc: Rajendra Nayak Subject: [PATCH v8 0/4] soc/arm64: qcom: Add initial version of bwmon Date: Mon, 4 Jul 2022 14:17:26 +0200 Message-Id: <20220704121730.127925-1-krzysztof.kozlowski@linaro.org> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org Hi, Changes since v7 ================ 1. After discussions with Bjorn and Rajendra, go back to "SoC-bwmon" compatible, so without "llcc". The other bwmon instance - between LLCC and DDR - should be called LLCC. Changes since v6 ================ 1. Patch #2 (driver): use MSM8998 compatible. Changes since v5 ================ 1. Rename compatible (and files) to qcom,msm8998-llcc-bwmon as Rajendra suggested. Keep the reviews/acks as the change is not significant. 2. Update comment in DTS, update description in bindings and in Kconfig. Changes since v4 ================ 1. Patch #1 (binding): Use qcom,msm8998-cpu-bwmon fallback compatible, only one interconnect. Rename to qcom,msm8998-cpu-bwmon.yaml. This reflects discussion with Bjorn, about the proper fallback compatible. Driver was tested only on SDM845, so only that one compatible is actually implemented. Keep the reviews/acks as the change is not significant. 2. Patch #4 (DTS): Use qcom,msm8998-cpu-bwmon fallback compatible, only one interconnect, use the LLCC bandwidth in OPP. remove unused irq_enable (kbuild robot); Changes since v3 ================ 1. Patch #2 (bwmon): remove unused irq_enable (kbuild robot); split bwmon_clear() into clearing counters and interrupts, so bwmon_start() does not clear the counters twice. Changes since v2 ================ 1. Spent a lot of time on benchmarking and learning the BWMON behavior. 2. Drop PM/OPP patch - applied. 3. Patch #1: drop opp-avg-kBps. 4. Patch #2: Add several comments explaining pieces of code and BWMON, extend commit msg with measurements, extend help message, add new #defines to document some magic values, reorder bwmon clear/disable/enable operations to match downstream source and document this with comments, fix unit count from 1 MB to 65 kB. 5. Patch #4: drop opp-avg-kBps. 6. Add accumulated Rb tags. Changes since v1 ================ 1. Add defconfig change. 2. Fix missing semicolon in MODULE_AUTHOR. 3. Add original downstream (msm-4.9 tree) copyrights to the driver. Description =========== BWMON is a data bandwidth monitor providing throughput/bandwidth over certain interconnect links in a SoC. It might be used to gather current bus usage and vote for interconnect bandwidth, thus adjusting the bus speed based on actual usage. The work is built on top of Thara Gopinath's patches with several cleanups, changes and simplifications. Cc: Rajendra Nayak Best regards, Krzysztof Krzysztof Kozlowski (4): dt-bindings: interconnect: qcom,msm8998-cpu-bwmon: add BWMON device soc: qcom: icc-bwmon: Add bandwidth monitoring driver arm64: defconfig: enable Qualcomm Bandwidth Monitor arm64: dts: qcom: sdm845: Add CPU BWMON .../interconnect/qcom,msm8998-bwmon.yaml | 86 ++++ MAINTAINERS | 7 + arch/arm64/boot/dts/qcom/sdm845.dtsi | 37 ++ arch/arm64/configs/defconfig | 1 + drivers/soc/qcom/Kconfig | 15 + drivers/soc/qcom/Makefile | 1 + drivers/soc/qcom/icc-bwmon.c | 421 ++++++++++++++++++ 7 files changed, 568 insertions(+) create mode 100644 Documentation/devicetree/bindings/interconnect/qcom,msm8998-bwmon.yaml create mode 100644 drivers/soc/qcom/icc-bwmon.c -- 2.34.1 From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 58501CCA47C for ; Mon, 4 Jul 2022 12:18:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:Cc :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=YmqU+HSdICt0ImZvZ7P/HL43++Wv9aIm6KHU2SN4Xbg=; b=lHLpJSSRY2cv2J xtL/s8J4NgC+ADTv6rn1MQwFFPPn96zXIR/+QfwcKbliZfHO98bFdVh5wU5Eh/Jl9eW0GjTb/ElIb qX2Tq7wMTCMDIxM5Em1bqJFRe050jALSGPAIFMnB33dbM57H1LO7RL9q+xuc6HMPdZ16LNeo9ljFw CClWRSFhpoHduxlBrwH+2qSj8/RlOYDcKd6T1C3WuDZaFStMPgw00KCxvSimkCJVK+c3Ht5j94O4S g4netEpKMt5W0cpJDU+hSace7uWKFTXUQdQJ1qwYYVP7+0fPCjJogAKTmJXrReTFWSBivhCLswG8b yr6xo9xUSsL9mJM3DpcA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1o8L1I-008g27-LX; Mon, 04 Jul 2022 12:17:40 +0000 Received: from mail-lj1-x233.google.com ([2a00:1450:4864:20::233]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1o8L1F-008g01-KF for linux-arm-kernel@lists.infradead.org; Mon, 04 Jul 2022 12:17:39 +0000 Received: by mail-lj1-x233.google.com with SMTP id b23so10857045ljh.7 for ; Mon, 04 Jul 2022 05:17:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=bUHK7FLYbuKzqzrEAJR7c+KmgynCicbvnzdwq2sVmI8=; b=qhGqzsRhvCQs96kxKr5liLm7CKnA5+AxQKaP7OUrSyE4miumGZmhLNRAY2bNN0cdG0 tbq1CKueAVpYgR8igSgddjOXqb/SFJYJ6Iibuw61vvhHQeMSnDmvUpnb+T606fX0f7IA BJ1cOh1LCMp/yfnsjiipMNB5wf8ns7EZEGywTGDYeDrE39DlZrx5iD1AyL3QoxJ244cZ ihoaXY+mlgrU556tQjtFi64zXHLkqUXYEZaLuneoNwkVmbeRWuxfmsaMQTMIiU4zfWEH vaTCsQpX/xK9tBmMV10XgCArYaZXMJ8TCvXAhP9qZyR2cQAUHwVBV8oGnX7FjTNkAgcV Cdsg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=bUHK7FLYbuKzqzrEAJR7c+KmgynCicbvnzdwq2sVmI8=; b=RVFg70x78u+fT7wYYFiAnR8E3kc1JNDqz8cWR3SzI1vGfz1kxPF/xUscKYPzRs2M4c Q873Ryk+Ubbqf8ywbvfbTyHV6bdDSb0JzUNKvNo55004BnCl0SVMv8ET4vwUBV96BbKJ W4z1Nr5yAud+RjUrCWQpvbA617Tge3emnUHvQ/i73ZDH5YTNtOB/ywI0wP2jo/TG93fQ c77tglm/9fvGWpexsYI9yIGnks/phGFfEegyeXeVuP3FLru+4Fs2F/++Nquic6Nrnijt srdrY+NfsbZN3ycFU/pHWW18UOM64VDhq/Sn6HQAPahTSWHcUYP3NLJmO0YhHV6tepst p9Iw== X-Gm-Message-State: AJIora/uhuqqzM/3gSaJnkoLmNMIlN4iwqFk1NqUtVqxIy/iLuVvQTvf +9wuSfWggzw3swq8wfcV0yUuBw== X-Google-Smtp-Source: AGRyM1t47gezqmzrWMhZ7+1YcO1f62HYaF93Yupewcz7b4aXcA0k50BaEbcGuyttIrsyH+ED5YUW+w== X-Received: by 2002:a2e:a453:0:b0:25a:96d0:b15 with SMTP id v19-20020a2ea453000000b0025a96d00b15mr16015890ljn.228.1656937054339; Mon, 04 Jul 2022 05:17:34 -0700 (PDT) Received: from krzk-bin.home ([84.20.121.239]) by smtp.gmail.com with ESMTPSA id u11-20020a05651220cb00b0047faa01edd9sm5102149lfr.229.2022.07.04.05.17.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 04 Jul 2022 05:17:33 -0700 (PDT) From: Krzysztof Kozlowski To: Krzysztof Kozlowski , Andy Gross , Bjorn Andersson , Georgi Djakov , Rob Herring , Catalin Marinas , Will Deacon , linux-arm-msm@vger.kernel.org, linux-pm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Cc: Rajendra Nayak Subject: [PATCH v8 0/4] soc/arm64: qcom: Add initial version of bwmon Date: Mon, 4 Jul 2022 14:17:26 +0200 Message-Id: <20220704121730.127925-1-krzysztof.kozlowski@linaro.org> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220704_051737_705879_68199AA5 X-CRM114-Status: GOOD ( 15.92 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Hi, Changes since v7 ================ 1. After discussions with Bjorn and Rajendra, go back to "SoC-bwmon" compatible, so without "llcc". The other bwmon instance - between LLCC and DDR - should be called LLCC. Changes since v6 ================ 1. Patch #2 (driver): use MSM8998 compatible. Changes since v5 ================ 1. Rename compatible (and files) to qcom,msm8998-llcc-bwmon as Rajendra suggested. Keep the reviews/acks as the change is not significant. 2. Update comment in DTS, update description in bindings and in Kconfig. Changes since v4 ================ 1. Patch #1 (binding): Use qcom,msm8998-cpu-bwmon fallback compatible, only one interconnect. Rename to qcom,msm8998-cpu-bwmon.yaml. This reflects discussion with Bjorn, about the proper fallback compatible. Driver was tested only on SDM845, so only that one compatible is actually implemented. Keep the reviews/acks as the change is not significant. 2. Patch #4 (DTS): Use qcom,msm8998-cpu-bwmon fallback compatible, only one interconnect, use the LLCC bandwidth in OPP. remove unused irq_enable (kbuild robot); Changes since v3 ================ 1. Patch #2 (bwmon): remove unused irq_enable (kbuild robot); split bwmon_clear() into clearing counters and interrupts, so bwmon_start() does not clear the counters twice. Changes since v2 ================ 1. Spent a lot of time on benchmarking and learning the BWMON behavior. 2. Drop PM/OPP patch - applied. 3. Patch #1: drop opp-avg-kBps. 4. Patch #2: Add several comments explaining pieces of code and BWMON, extend commit msg with measurements, extend help message, add new #defines to document some magic values, reorder bwmon clear/disable/enable operations to match downstream source and document this with comments, fix unit count from 1 MB to 65 kB. 5. Patch #4: drop opp-avg-kBps. 6. Add accumulated Rb tags. Changes since v1 ================ 1. Add defconfig change. 2. Fix missing semicolon in MODULE_AUTHOR. 3. Add original downstream (msm-4.9 tree) copyrights to the driver. Description =========== BWMON is a data bandwidth monitor providing throughput/bandwidth over certain interconnect links in a SoC. It might be used to gather current bus usage and vote for interconnect bandwidth, thus adjusting the bus speed based on actual usage. The work is built on top of Thara Gopinath's patches with several cleanups, changes and simplifications. Cc: Rajendra Nayak Best regards, Krzysztof Krzysztof Kozlowski (4): dt-bindings: interconnect: qcom,msm8998-cpu-bwmon: add BWMON device soc: qcom: icc-bwmon: Add bandwidth monitoring driver arm64: defconfig: enable Qualcomm Bandwidth Monitor arm64: dts: qcom: sdm845: Add CPU BWMON .../interconnect/qcom,msm8998-bwmon.yaml | 86 ++++ MAINTAINERS | 7 + arch/arm64/boot/dts/qcom/sdm845.dtsi | 37 ++ arch/arm64/configs/defconfig | 1 + drivers/soc/qcom/Kconfig | 15 + drivers/soc/qcom/Makefile | 1 + drivers/soc/qcom/icc-bwmon.c | 421 ++++++++++++++++++ 7 files changed, 568 insertions(+) create mode 100644 Documentation/devicetree/bindings/interconnect/qcom,msm8998-bwmon.yaml create mode 100644 drivers/soc/qcom/icc-bwmon.c -- 2.34.1 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel