From patchwork Mon Mar 6 13:55:27 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Abel Vesa X-Patchwork-Id: 64671 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5915:0:0:0:0:0 with SMTP id v21csp1860696wrd; Mon, 6 Mar 2023 06:08:27 -0800 (PST) X-Google-Smtp-Source: AK7set9mC8ZOQY1HfcO3h8vxVUgsklIXuaZ7GV1yPcmIXzewx8SCCBBBQ90AjjMUM9nrw+34f+fC X-Received: by 2002:a17:906:2602:b0:839:74cf:7c4f with SMTP id h2-20020a170906260200b0083974cf7c4fmr10190732ejc.8.1678111707798; Mon, 06 Mar 2023 06:08:27 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1678111707; cv=none; d=google.com; s=arc-20160816; b=fZmITSDFNrsKk/ozg+6DHOGvh9wEk9dQpoF1LDw2X4iZXeRBsTwged+y2gAxWy0zDL xtPslchvcz0qoeMD3GnrnfU7Q+zEOnvelaph0+ho2JQ9SISFlceeMH05e8F2KhImd0dm eNfWVV7sYl3GPNynLcfqet2A8Xkgx0bYuf48BzSAA72T/Yrk5/LxOKtnpjJUJ6NZ+MEP YbR3nHrcx5oDwvxR6jY8yJF6Z0xi1vexcFACx/06O+cYj9bTYDn4rGxpY4NpmgKzctSe T6aIa+Bb6oBBxPCTCI13rJJcgJjOXVJheutwkIl+OmmTydzTH7DpQSwVTBUKFxYlaTDk 9OMQ== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=6EPk/yxhkspR8/DJQsxy544G2V8zAJbCDLKWqTOj46w=; b=YV07xDvIL9fQJ7SJ5nQV6AwQTRhKZ+uLX/SIDSWbNikoloK5cT+ekceav1953DZr5F eV6AQTH/XaFzjMdEwmXYdYFatCHewecnmFJY6JsIQ/EeaWZ5PRqtOdn0pKalt1hCfbH/ VwcsyAuODgfVnznf+LVgfWgMALYa46whA6p6QF/Vj7datDqZyoaqViCyytW7F8lnl7GG HFptl1ezvBUoWKnmYQe9vPtuzt0AibLMYv7sMgdW8a5JpvWqhr1TlZstNKDP8NgutLum 68DbPWK12gGm6rdSrbeWhg50LLlu1Me1mPZgiNGZFAJ9CoNfozCvbnN/Ph1AELoElrY2 uG3A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=kgY1Dp5E; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id qk33-20020a1709077fa100b00906314690c0si9601503ejc.752.2023.03.06.06.08.03; Mon, 06 Mar 2023 06:08:27 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=kgY1Dp5E; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 S230001AbjCFNz6 (ORCPT + 99 others); Mon, 6 Mar 2023 08:55:58 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48992 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229961AbjCFNzy (ORCPT ); Mon, 6 Mar 2023 08:55:54 -0500 Received: from mail-wm1-x334.google.com (mail-wm1-x334.google.com [IPv6:2a00:1450:4864:20::334]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A8C14303C9 for ; Mon, 6 Mar 2023 05:55:49 -0800 (PST) Received: by mail-wm1-x334.google.com with SMTP id r19-20020a05600c459300b003eb3e2a5e7bso5257966wmo.0 for ; Mon, 06 Mar 2023 05:55:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1678110948; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=6EPk/yxhkspR8/DJQsxy544G2V8zAJbCDLKWqTOj46w=; b=kgY1Dp5Ew/FXHTgZM8qaXsLS1dDMQZ2a8xrpy3FJbO1JmjfocvLJTxm0IHxtK+VSQ2 jQekCGaf0BBw3B6A/LFT2AQ62UaTfrXH40HpB/UT6DNfbc5qpC99RMpIn0TZ2dQCJzFM +LERGcIMDN58BAm1SEt35dvTbszgQp/5+TO3vI/AkGX1Jw00iHTve1rJX+jRqAOxZsEa 958vjqEL9xtXF9kgCZe38xJCjxmG1O3jO60YOSFWyt0QBCYREhikuNtLquZMdHxPDZl5 p5/yiS/rgCXBt604H+R0CR+IdFj5P8dC9l3VG1RNHK928oBKkgxS4BHyGbHNB+Uk/6TF wxiQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678110948; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=6EPk/yxhkspR8/DJQsxy544G2V8zAJbCDLKWqTOj46w=; b=uYyHXCGE9FnQGf81OhrUafI90yFgK3BQ5otXEsT7q4JkwwJQyVOfMEtjiTiJWV9D25 8aCB4DIHXDJOHlBzVWzUbAZdJU+pnjxXBwBG+hO/QAy6N5DeJGXD8pOChtwMBYo7PNdF avgtjyCjWgHbh6XqRAuPy62sdvnBhsOXahuOAE2C9+fE+Xp14KJIZ3ODEOJExcQgQdq4 2WzjmyGZD8yI0lxjZqAnAQv9zyoEZOjXuzKUS082Qeuw1hAE774J7j1UGDUwDnqDgvY5 Aa8HTUeejGpPNRqfB5OEyyOZTU9FIOa0lyrCp0nq5lNPoQcam3dnEdO4ZPj2hBKTwQmm pluA== X-Gm-Message-State: AO0yUKXQKoN5sp+/mk9K59MUKCAZb6jM7kNf2nqhZY6Y7I7IGMhFQ4f2 9vq4yYRcYecjYLSVHC5Oy0bOAJBwvsa2veCxCs4= X-Received: by 2002:a05:600c:4fd6:b0:3df:d8c5:ec18 with SMTP id o22-20020a05600c4fd600b003dfd8c5ec18mr9072578wmq.13.1678110948133; Mon, 06 Mar 2023 05:55:48 -0800 (PST) Received: from hackbox.lan ([94.52.112.99]) by smtp.gmail.com with ESMTPSA id r1-20020a056000014100b002c5534db60bsm10206752wrx.71.2023.03.06.05.55.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 06 Mar 2023 05:55:47 -0800 (PST) From: Abel Vesa To: Andy Gross , Bjorn Andersson , Konrad Dybcio , Sai Prakash Ranjan , Juerg Haefliger , Johan Hovold Cc: linux-arm-msm@vger.kernel.org, Linux Kernel Mailing List , stable@vger.kernel.org, Johan Hovold Subject: [PATCH v4] soc: qcom: llcc: Fix slice configuration values for SC8280XP Date: Mon, 6 Mar 2023 15:55:27 +0200 Message-Id: <20230306135527.509796-1-abel.vesa@linaro.org> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1758279746436982627?= X-GMAIL-MSGID: =?utf-8?q?1759627662071960803?= The slice IDs for CVPFW, CPUSS1 and CPUWHT currently overflow the 32bit LLCC config registers, which means it is writing beyond the upper limit of the ATTR0_CFGn and ATTR1_CFGn range of registers. But the most obvious impact is the fact that the mentioned slices do not get configured at all, which will result in reduced performance. Fix that by using the slice ID values taken from the latest LLCC SC table. Fixes: ec69dfbdc426 ("soc: qcom: llcc: Add sc8180x and sc8280xp configurations") Cc: stable@vger.kernel.org # 5.19+ Signed-off-by: Abel Vesa Tested-by: Juerg Haefliger Reviewed-by: Sai Prakash Ranjan Acked-by: Konrad Dybcio Reviewed-by: Johan Hovold --- The v3 is here: https://lore.kernel.org/all/20230219165701.2557446-1-abel.vesa@linaro.org/ Changes since v3: * explicitly mentioned in the commit message the fact that some random registers might get written and the fact that there is an impact on performance. * Added Johan's R-b tag Changes since v2: * specifically mentioned the 3 slice IDs that are being fixed and what is happening without this patch * added stabke Cc line * added Juerg's T-b tag * added Sai's R-b tag * added Konrad's A-b tag Changes since v1: * dropped the LLCC_GPU and LLCC_WRCACHE max_cap changes * took the new values from documentatio this time rather than downstream kernel drivers/soc/qcom/llcc-qcom.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/soc/qcom/llcc-qcom.c b/drivers/soc/qcom/llcc-qcom.c index 23ce2f78c4ed..26efe12012a0 100644 --- a/drivers/soc/qcom/llcc-qcom.c +++ b/drivers/soc/qcom/llcc-qcom.c @@ -191,9 +191,9 @@ static const struct llcc_slice_config sc8280xp_data[] = { { LLCC_CVP, 28, 512, 3, 1, 0xfff, 0x0, 0, 0, 0, 1, 0, 0 }, { LLCC_APTCM, 30, 1024, 3, 1, 0x0, 0x1, 1, 0, 0, 1, 0, 0 }, { LLCC_WRCACHE, 31, 1024, 1, 1, 0xfff, 0x0, 0, 0, 0, 0, 1, 0 }, - { LLCC_CVPFW, 32, 512, 1, 0, 0xfff, 0x0, 0, 0, 0, 1, 0, 0 }, - { LLCC_CPUSS1, 33, 2048, 1, 1, 0xfff, 0x0, 0, 0, 0, 1, 0, 0 }, - { LLCC_CPUHWT, 36, 512, 1, 1, 0xfff, 0x0, 0, 0, 0, 0, 1, 0 }, + { LLCC_CVPFW, 17, 512, 1, 0, 0xfff, 0x0, 0, 0, 0, 1, 0, 0 }, + { LLCC_CPUSS1, 3, 2048, 1, 1, 0xfff, 0x0, 0, 0, 0, 1, 0, 0 }, + { LLCC_CPUHWT, 5, 512, 1, 1, 0xfff, 0x0, 0, 0, 0, 0, 1, 0 }, }; static const struct llcc_slice_config sdm845_data[] = {