From patchwork Thu Dec 22 13:16:41 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Manivannan Sadhasivam X-Patchwork-Id: 35753 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:e747:0:0:0:0:0 with SMTP id c7csp319907wrn; Thu, 22 Dec 2022 05:20:19 -0800 (PST) X-Google-Smtp-Source: AMrXdXuKgEf9piC8LRpzs7er5x1S3K0GDrW6WpLrhD33kXe7wgovCdEf8VymScfilP3/atciiqiY X-Received: by 2002:a17:906:c79a:b0:82d:1c3c:fe7c with SMTP id cw26-20020a170906c79a00b0082d1c3cfe7cmr4218238ejb.22.1671715219685; Thu, 22 Dec 2022 05:20:19 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1671715219; cv=none; d=google.com; s=arc-20160816; b=FNuCRZNtIigkIp1pIYMeqqPQo4+s5fp7Qr7A3E4iJw80lv67ldc7PESgRzlTYzzSvV /lsx/VjRXPXi1ufZAWIySpcsA2CQqJfnbfTbajlBielCNYwaKSL5uDTcn55GHCQIph6a fyVqBJOJHaDnFyAJFVt1A/arHVKcEYG0NTYD9GfEQCIqSlFA3jjAHKk/GjJiyHkq7DxC OcJMBNuLfZhFbMw3CiV5yMI+vinuoe/i5z2/Jh1ie1kRLYzeSmOiH0+JGivVCeU2NG87 TC3MPd8z+Z5nXRO5XOWnFEU7xOeUgzAjOxBcpltJKWcY5NyVL7DlTFg/L34+mctv9+iI jYww== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=USFa3vv6r3M6at72+GYbrAEuQqTIcmw3cLL2W4/Vhuk=; b=wkTulTm9vNPOQhWghHAKbxICZYugMaDSTR897Dxm4G37ejJyZRk7RtJCnYELmiVy9O bD45mbxPT71oXAEokTFxnq94vYsOQbHsLQ8I5MId9+DOmpCaqpIicIzO5QFCsPmYo0ap CDR19j1CV0ypncr26aXjxsdETRFR8uFDOGGEZj8Zf3+477I2X7ZVO0O9RfzusAPpcD8F 9CgtXouLK9s0RHWsAbDOEmJUUhpVoHY7IkICTGWwU48PdF3fD1IRfM+d7L5HOscxGAua /3Ej0KQA/6Rb2L9tJAjZvVpqlFqiKsEcnG+6Qs0IxOpXFN0CV9Zr2udg9NJUWWqRMTRH uIqA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="n7aSVFF/"; 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 xe2-20020a170907318200b007c14affc530si467869ejb.315.2022.12.22.05.19.28; Thu, 22 Dec 2022 05:20:19 -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="n7aSVFF/"; 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 S235544AbiLVNRu (ORCPT + 99 others); Thu, 22 Dec 2022 08:17:50 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47840 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235497AbiLVNRg (ORCPT ); Thu, 22 Dec 2022 08:17:36 -0500 Received: from mail-pl1-x62b.google.com (mail-pl1-x62b.google.com [IPv6:2607:f8b0:4864:20::62b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 527522B25C for ; Thu, 22 Dec 2022 05:17:35 -0800 (PST) Received: by mail-pl1-x62b.google.com with SMTP id jn22so1954129plb.13 for ; Thu, 22 Dec 2022 05:17:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=USFa3vv6r3M6at72+GYbrAEuQqTIcmw3cLL2W4/Vhuk=; b=n7aSVFF/XLTOv6FrKLmFAXkYEpQlwu5xvBMfaF/KeAVsnD9B8sRvW9jIGMlI4kpfRZ 29+RZt6RYVECcvyqzdWeS73J0pFr2puJUtokcq7CF/XJ69QKKTNErmZGJQzvpJTJ6mqb Or8YsDrbocMGp1YqlXneOKPUvl6U+gm52uBmOgqGsWrbf5SiQ3GQt37FYDlgdm3Rr8ti CWODXN45P21Bz27lpM4J28cV/oZwZTii4DfUqC6VWkM6ZREGXiGBYAaKuSusRxcU2o9z xzQnWFnf9mHmiMEFyQWnBxVJj8AX6axnfsKJDtpMWTlRngoszvw/uSNiLa+LghTniuiA L1Zw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=USFa3vv6r3M6at72+GYbrAEuQqTIcmw3cLL2W4/Vhuk=; b=P+fqSdN2DiC0LBwkfqB5+3kH0pAupGAHIrMhZjcxD1PLEmr8LOqIpZc0pVboKvanBb ZVi65lcc0hyNXta9ug8WQNlb3mickGegqXWg1o6k8A+SkybH+7aNMPwig3buSXfAk2Kq reGQLaOicz+tLzBaI0tMk2Y3Fiq20rUN82oqScjzl+OZkJiBqEen1JaU94wlPWAfNUr3 NpXlmCa6i9TYK60Envdb/BM7mjoSJeWmT4GYGPRrNLz+BZZlcb6OL+VD493k1hR2lyhW QhjwWgh39+oIti8PyeV1qsOqxqsqDoyUeJO97LCqKQ1AzlFqyRoIQ3a01oZPDw8Njz7o ol4w== X-Gm-Message-State: AFqh2kq6Xn9rPRqrjirQSwxKZ2HOG47SkPmqcVuLr2eYfmGxqbowx3rB Vwcpc5PqSq5KJT6ncUpsnA+5 X-Received: by 2002:a05:6a20:a6a8:b0:9d:efd3:66bf with SMTP id ba40-20020a056a20a6a800b0009defd366bfmr7065991pzb.6.1671715054802; Thu, 22 Dec 2022 05:17:34 -0800 (PST) Received: from localhost.localdomain ([117.217.177.99]) by smtp.gmail.com with ESMTPSA id g12-20020a170902fe0c00b001896040022asm491570plj.190.2022.12.22.05.17.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 22 Dec 2022 05:17:33 -0800 (PST) From: Manivannan Sadhasivam To: andersson@kernel.org, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, bp@alien8.de, tony.luck@intel.com Cc: quic_saipraka@quicinc.com, konrad.dybcio@linaro.org, linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, james.morse@arm.com, mchehab@kernel.org, rric@kernel.org, linux-edac@vger.kernel.org, quic_ppareek@quicinc.com, luca.weiss@fairphone.com, ahalaney@redhat.com, steev@kali.org, Manivannan Sadhasivam , Krzysztof Kozlowski Subject: [PATCH v4 01/16] dt-bindings: arm: msm: Update the maintainers for LLCC Date: Thu, 22 Dec 2022 18:46:41 +0530 Message-Id: <20221222131656.49584-2-manivannan.sadhasivam@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20221222131656.49584-1-manivannan.sadhasivam@linaro.org> References: <20221222131656.49584-1-manivannan.sadhasivam@linaro.org> 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?1752920458234926165?= X-GMAIL-MSGID: =?utf-8?q?1752920458234926165?= Rishabh Bhatnagar has left Qualcomm, and there is no evidence of him maintaining with a new identity. So his entry needs to be removed. Also, Sai Prakash Ranjan's email address should be updated to use quicinc domain. Cc: Sai Prakash Ranjan Acked-by: Sai Prakash Ranjan Acked-by: Krzysztof Kozlowski Signed-off-by: Manivannan Sadhasivam --- Documentation/devicetree/bindings/arm/msm/qcom,llcc.yaml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Documentation/devicetree/bindings/arm/msm/qcom,llcc.yaml b/Documentation/devicetree/bindings/arm/msm/qcom,llcc.yaml index 38efcad56dbd..d1df49ffcc1b 100644 --- a/Documentation/devicetree/bindings/arm/msm/qcom,llcc.yaml +++ b/Documentation/devicetree/bindings/arm/msm/qcom,llcc.yaml @@ -7,8 +7,7 @@ $schema: http://devicetree.org/meta-schemas/core.yaml# title: Last Level Cache Controller maintainers: - - Rishabh Bhatnagar - - Sai Prakash Ranjan + - Sai Prakash Ranjan description: | LLCC (Last Level Cache Controller) provides last level of cache memory in SoC, From patchwork Thu Dec 22 13:16:42 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Manivannan Sadhasivam X-Patchwork-Id: 35764 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:e747:0:0:0:0:0 with SMTP id c7csp320600wrn; Thu, 22 Dec 2022 05:21:36 -0800 (PST) X-Google-Smtp-Source: AMrXdXts7hJ+8rwNA90v8cnS6AGGz93tsg+GNFcyzfwRS3jSuE0rHiSPyvHnJZgjvgPRd70ezKTx X-Received: by 2002:a17:906:a047:b0:7a9:fc17:eb4c with SMTP id bg7-20020a170906a04700b007a9fc17eb4cmr4491901ejb.40.1671715296160; Thu, 22 Dec 2022 05:21:36 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1671715296; cv=none; d=google.com; s=arc-20160816; b=sKtrbo15D1xwMrAGiUllxH53bICn1sPSZCZddEpe6dDhTc24dkkpzZx6nTLGDulC+U 6PaukeGVJ4lbPAQl4OGbgG2y0jcf669p43ZmygjYq0Whrl459HNHuZ7RHV680s4Jcur3 VB9jHMDiuyNsQAP68XLipTGyPLcL601ViWuPWiFvciRMzIkiyrAZPeVY0UtFS8uxyh6J 0y2qQxhpoMiUICex4fs11CxyFNkvAXTWM8hQEDbSo1y1Kse+RUunnmoC8Xze9abvdeVN Ywl6p/uzWpm1mMdlULsbyDUk8KcB/5vLY6Wetx2GoQjdIDVqmXECrNaVVAwBG76rCkFm a6Xg== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=Bp5/r4pBB7Qfe42Kb/SOy1gZ4/1fvqqZd0eC3Bvgy/g=; b=bFAa49n3yP03gcQWwSfOZmm1AjuYFFi4qcE1yLMiQmXdnMaRYjvt6aP+ZITkIYhORY c6/gJ3BUk1WsIBfgBgVEtrdDw/Rfun8rXzHH0g0qa5AhZLrd24I5s1WUFoMLdZFVi4KV 3fY8neyVdsoGlwekRW+04k7AP01cSjB/sT5OJNW6UqycKxz5PaEEkvnyv8OzciJMm2ze VLdQ8ACUj4vVAhPA4JgYtaM9oVQOtoUqoXwfdgbg6SbeWjAAY2zS3KwOzj2yy8CtPuZS KZvroCludTdFcG/JBxTkUSvbISYM96hxCgmTlGkeQIcgTdZu5AJHdzA8BYuQtIOZmySl ITfA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=d9BHDr+P; 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 wz2-20020a170906fe4200b007adb868f102si463700ejb.476.2022.12.22.05.21.12; Thu, 22 Dec 2022 05:21:36 -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=d9BHDr+P; 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 S235220AbiLVNSQ (ORCPT + 99 others); Thu, 22 Dec 2022 08:18:16 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48250 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235558AbiLVNRv (ORCPT ); Thu, 22 Dec 2022 08:17:51 -0500 Received: from mail-pj1-x1036.google.com (mail-pj1-x1036.google.com [IPv6:2607:f8b0:4864:20::1036]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 075742B610 for ; Thu, 22 Dec 2022 05:17:43 -0800 (PST) Received: by mail-pj1-x1036.google.com with SMTP id w4-20020a17090ac98400b002186f5d7a4cso5721526pjt.0 for ; Thu, 22 Dec 2022 05:17:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=Bp5/r4pBB7Qfe42Kb/SOy1gZ4/1fvqqZd0eC3Bvgy/g=; b=d9BHDr+PPsP+TSxNM0CJCIKo120fJMIwSZS2m3BjHORr7CsHkePASymtvGUYq1l26s e2NehLvgfNB2lCBjW2Cp3xzQqtqN5EgUPxl3oz3bBZQayLBdX9W6TDBvkEy6myiFB8Xb o5b2OzN5eIGZCA6Z85W7H8uvFBNNRNfbjJiBUMyN0fTXNVx0+8TRLcvgsq0HXosY0meT gHvTlOsPZIA3Xkt4gmBlmcPyOk0HLziwmQggcZTCtYYbdroLxyULzVnZzsAoN4Si7s/K tdXvty4i4Zt8tWrce/NkQkCRxgxgXYXRJ1tlOpJ79I7q8TegUQ2fgUslis3r5MSGNuA0 nrQA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Bp5/r4pBB7Qfe42Kb/SOy1gZ4/1fvqqZd0eC3Bvgy/g=; b=SfSBsC95Ij0PziEvWhTlAdyL/gevmd0TVc239JFwSXr37/e+0lU6XInVr/eFez8MLz h0tPBSXGRvpKLh2TA5CJFEPAFHc8Uapoal+QhLXbyGrTX8lUWGfNA+Tquzyl0RS/ffoM HokALisKeNMIbuQGg0NL6R/JIrv0xEuiGx3iEnNfvRmMWm947kJihD4QAzRjgNti7HGu at8p1/6uRNpfj4TcOqiXj+mpHXuGKwVt4zqm/thmA1q0bnmyEQRyhxQzMC3VN/Befl35 8H+PbXkp1tiiGPLESIa/9wtrlQOM1FzzFmKMdjgtOeRntn+MF6dKyrZc8L79ED/OEunI Mxlw== X-Gm-Message-State: AFqh2kqw9VKPnRQSHm9/bpBc9WSYJ1H0jtU9lrg5fDtcZnaih4jEsh46 XOID687eaT4piwWpeRTg9Z8x+uJYX9ZYhhU= X-Received: by 2002:a17:903:2444:b0:190:f82f:c937 with SMTP id l4-20020a170903244400b00190f82fc937mr8523352pls.42.1671715062372; Thu, 22 Dec 2022 05:17:42 -0800 (PST) Received: from localhost.localdomain ([117.217.177.99]) by smtp.gmail.com with ESMTPSA id g12-20020a170902fe0c00b001896040022asm491570plj.190.2022.12.22.05.17.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 22 Dec 2022 05:17:41 -0800 (PST) From: Manivannan Sadhasivam To: andersson@kernel.org, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, bp@alien8.de, tony.luck@intel.com Cc: quic_saipraka@quicinc.com, konrad.dybcio@linaro.org, linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, james.morse@arm.com, mchehab@kernel.org, rric@kernel.org, linux-edac@vger.kernel.org, quic_ppareek@quicinc.com, luca.weiss@fairphone.com, ahalaney@redhat.com, steev@kali.org, Manivannan Sadhasivam Subject: [PATCH v4 02/16] dt-bindings: arm: msm: Fix register regions used for LLCC banks Date: Thu, 22 Dec 2022 18:46:42 +0530 Message-Id: <20221222131656.49584-3-manivannan.sadhasivam@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20221222131656.49584-1-manivannan.sadhasivam@linaro.org> References: <20221222131656.49584-1-manivannan.sadhasivam@linaro.org> 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?1752920538283943499?= X-GMAIL-MSGID: =?utf-8?q?1752920538283943499?= Register regions of the LLCC banks are located at different addresses. Currently, the binding just lists the LLCC0 base address and tries to cover all the banks using a single size. This is entirely wrong as there are other register regions that happen to lie inside the size covered by the binding such as the memory controller and holes. So this needs to be fixed by specifying the base address of individual LLCC banks. This approach will break the existing users of this binding as the register regions are splitted and the drivers now cannot use LLCC0 register region for accessing rest of the banks (which is wrong anyway). But considering the fact that the binding was wrong from the day one and also the device drivers going wrong by the binding, this breakage is acceptable. Reported-by: Parikshit Pareek Signed-off-by: Manivannan Sadhasivam Reviewed-by: Krzysztof Kozlowski --- .../bindings/arm/msm/qcom,llcc.yaml | 125 ++++++++++++++++-- 1 file changed, 114 insertions(+), 11 deletions(-) diff --git a/Documentation/devicetree/bindings/arm/msm/qcom,llcc.yaml b/Documentation/devicetree/bindings/arm/msm/qcom,llcc.yaml index d1df49ffcc1b..050e21d4a03e 100644 --- a/Documentation/devicetree/bindings/arm/msm/qcom,llcc.yaml +++ b/Documentation/devicetree/bindings/arm/msm/qcom,llcc.yaml @@ -33,14 +33,12 @@ properties: - qcom,sm8550-llcc reg: - items: - - description: LLCC base register region - - description: LLCC broadcast base register region + minItems: 2 + maxItems: 9 reg-names: - items: - - const: llcc_base - - const: llcc_broadcast_base + minItems: 2 + maxItems: 9 interrupts: maxItems: 1 @@ -50,15 +48,120 @@ required: - reg - reg-names +allOf: + - if: + properties: + compatible: + contains: + enum: + - qcom,sc7180-llcc + - qcom,sm6350-llcc + then: + properties: + reg: + items: + - description: LLCC0 base register region + - description: LLCC broadcast base register region + reg-names: + items: + - const: llcc0_base + - const: llcc_broadcast_base + + - if: + properties: + compatible: + contains: + enum: + - qcom,sc7280-llcc + then: + properties: + reg: + items: + - description: LLCC0 base register region + - description: LLCC1 base register region + - description: LLCC broadcast base register region + reg-names: + items: + - const: llcc0_base + - const: llcc1_base + - const: llcc_broadcast_base + + - if: + properties: + compatible: + contains: + enum: + - qcom,sc8180x-llcc + - qcom,sc8280xp-llcc + then: + properties: + reg: + items: + - description: LLCC0 base register region + - description: LLCC1 base register region + - description: LLCC2 base register region + - description: LLCC3 base register region + - description: LLCC4 base register region + - description: LLCC5 base register region + - description: LLCC6 base register region + - description: LLCC7 base register region + - description: LLCC broadcast base register region + reg-names: + items: + - const: llcc0_base + - const: llcc1_base + - const: llcc2_base + - const: llcc3_base + - const: llcc4_base + - const: llcc5_base + - const: llcc6_base + - const: llcc7_base + - const: llcc_broadcast_base + + - if: + properties: + compatible: + contains: + enum: + - qcom,sdm845-llcc + - qcom,sm8150-llcc + - qcom,sm8250-llcc + - qcom,sm8350-llcc + - qcom,sm8450-llcc + then: + properties: + reg: + items: + - description: LLCC0 base register region + - description: LLCC1 base register region + - description: LLCC2 base register region + - description: LLCC3 base register region + - description: LLCC broadcast base register region + reg-names: + items: + - const: llcc0_base + - const: llcc1_base + - const: llcc2_base + - const: llcc3_base + - const: llcc_broadcast_base + additionalProperties: false examples: - | #include - system-cache-controller@1100000 { - compatible = "qcom,sdm845-llcc"; - reg = <0x1100000 0x200000>, <0x1300000 0x50000> ; - reg-names = "llcc_base", "llcc_broadcast_base"; - interrupts = ; + soc { + #address-cells = <2>; + #size-cells = <2>; + + system-cache-controller@1100000 { + compatible = "qcom,sdm845-llcc"; + reg = <0 0x01100000 0 0x50000>, <0 0x01180000 0 0x50000>, + <0 0x01200000 0 0x50000>, <0 0x01280000 0 0x50000>, + <0 0x01300000 0 0x50000>; + reg-names = "llcc0_base", "llcc1_base", "llcc2_base", + "llcc3_base", "llcc_broadcast_base"; + interrupts = ; + }; }; From patchwork Thu Dec 22 13:16:43 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Manivannan Sadhasivam X-Patchwork-Id: 35752 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:e747:0:0:0:0:0 with SMTP id c7csp319889wrn; Thu, 22 Dec 2022 05:20:17 -0800 (PST) X-Google-Smtp-Source: AMrXdXt4J9HK3nj+X9bFrMS7KaQHOO9liMvgSfXjo+XIkAOt/u8ulV/5u33Tla26BVrNfwr62FXE X-Received: by 2002:a17:906:398f:b0:7fd:ec83:b8b9 with SMTP id h15-20020a170906398f00b007fdec83b8b9mr4309203eje.44.1671715217250; Thu, 22 Dec 2022 05:20:17 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1671715217; cv=none; d=google.com; s=arc-20160816; b=VwPyDSxVOAnk7urTMYj4jq3+36AB9/FxZS6KsUp00OyHr8eYCujRmI0NYrv46gklf1 Byqd4XUxVlp60lc17TJp2bNUgiHtTRU37sTB8ZYrTl2KHSu9Li1U6+wwbK2Afa+MS4wZ bGviZwxTbXi6DOMM3+Z21G7HOl35l/eWNeMrS/fzbcoKbl1zr/jMgpqyRbOJ1ZkJL6sb L7xWWAefAfEAlv4qLR8YDHJ2o3Qr8NmY/IkCM64TcNQR9O5SqbJNC8XrTpYVYYD17nm9 YgymGQHv8+jfdG6TCWRTnnGrlOflSd+ZXDBXv37X9xwKyat61OL5XfrIybSO6EnNoP8p 4D4g== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=ny8LRDxtkCbzVPxZcMEK/2xCa3Cj3hxgheO6Po9c4/Y=; b=wKiXyzVskPyQR5tDpykjWXadA/wn+O4dCWWEzDVxFg9ovbwGcIJV4EaKUFgRN3RAPY e8OR1GAMImuwY8ontV9+7MODLHYlXz1g8qu3/Nzz31GQrQoo9bCNXMtBFPGlQ1a+pNLW GDuEt83xzIelnY8Ox4gWdMY1Egjky1vL+8y1Ul4UrdxMe407m7By8QywpklINHLRAwON mmwJTLujzEfHZLAoXNAEBdtb5WtVtZHZGOGJelHKKjz5iLeXF4+vvBX6FgSrbaGMr49N wbdBlKmjfmD8pm/sLQyRWK8WhxhCB1DYJLMVLgU7W0JpNL2pFZdLcS21DuRCIrVhMq87 OqhQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=dhMQGBmR; 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 ga22-20020a1709070c1600b007acbac0871csi518053ejc.420.2022.12.22.05.19.48; Thu, 22 Dec 2022 05:20:17 -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=dhMQGBmR; 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 S235082AbiLVNSe (ORCPT + 99 others); Thu, 22 Dec 2022 08:18:34 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48194 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235520AbiLVNSF (ORCPT ); Thu, 22 Dec 2022 08:18:05 -0500 Received: from mail-pj1-x1033.google.com (mail-pj1-x1033.google.com [IPv6:2607:f8b0:4864:20::1033]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 84DDF2B623 for ; Thu, 22 Dec 2022 05:17:50 -0800 (PST) Received: by mail-pj1-x1033.google.com with SMTP id gv5-20020a17090b11c500b00223f01c73c3so5448818pjb.0 for ; Thu, 22 Dec 2022 05:17:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=ny8LRDxtkCbzVPxZcMEK/2xCa3Cj3hxgheO6Po9c4/Y=; b=dhMQGBmR06G9CatEmwe+v1F0+trf5UQoHfDvkucAjtc26GNdGjq0Mmqd3P8/l8e2lK j786FeOg6gLzai89na4eEqUrq5EPxCmKugelr6TGJ4doyO0njRznbdKs31Jc1oVwXTRb A1rZaEsO9STSnQ6vC6bpfPiDtyKFXi+Amq7vxoqvJNgEBx9agHOu3jd2Vt66p10rFzXL 816uQsS0YIusOOBr1wkkbgCudts0SFCyXkBtNRn0J/bRIoqRw4ocVVUOrii7XrWZF+EV ZAWISg78ZvUvnApxbF+wnyadkb8QLFGVE7v7tScsnKYkBnUVUhrE3S7t2oUpLJFbEa9+ AYJg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=ny8LRDxtkCbzVPxZcMEK/2xCa3Cj3hxgheO6Po9c4/Y=; b=3y19vem8CCd21o3T1taDYldbvGPRfMd0ZmW7Xdp80evS71dLlvfm/oPN1kH+oJ4zQO DQd02zuJBE+pFydXiNY94a2uYHBzZ93m1+wO7ZCeGuwaZVz2Tsdx+GhiZX8ZOw6B7oTX tQ1YkX8v/GdabYmY5rt5s9owUni1miaWwZlWrrobuxfV6Wu/6iP5Wq2hpTqykE9SsYpq QnkiEB4Rm9GMjzqn/XQ7jPhgnIkgXrAtJsJ4eXailH1dzZrTEC/dnJ84nke23q/FUbxL UHjObM4AgHSWOXdWaTHgP3Cc4Yak4u0sVUftU58HPYukFii0rvqrToFzgvIAHae5QtwF iFHA== X-Gm-Message-State: AFqh2kptEtrV0mW6wmXGqXqvDCnIWC8zehO7/t/GOEVQY8a42ci0X7ev YJBviIs09YjJAs+tH0rNq21m X-Received: by 2002:a17:903:10c:b0:192:5838:afaa with SMTP id y12-20020a170903010c00b001925838afaamr621172plc.25.1671715069820; Thu, 22 Dec 2022 05:17:49 -0800 (PST) Received: from localhost.localdomain ([117.217.177.99]) by smtp.gmail.com with ESMTPSA id g12-20020a170902fe0c00b001896040022asm491570plj.190.2022.12.22.05.17.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 22 Dec 2022 05:17:48 -0800 (PST) From: Manivannan Sadhasivam To: andersson@kernel.org, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, bp@alien8.de, tony.luck@intel.com Cc: quic_saipraka@quicinc.com, konrad.dybcio@linaro.org, linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, james.morse@arm.com, mchehab@kernel.org, rric@kernel.org, linux-edac@vger.kernel.org, quic_ppareek@quicinc.com, luca.weiss@fairphone.com, ahalaney@redhat.com, steev@kali.org, Manivannan Sadhasivam Subject: [PATCH v4 03/16] arm64: dts: qcom: sdm845: Fix the base addresses of LLCC banks Date: Thu, 22 Dec 2022 18:46:43 +0530 Message-Id: <20221222131656.49584-4-manivannan.sadhasivam@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20221222131656.49584-1-manivannan.sadhasivam@linaro.org> References: <20221222131656.49584-1-manivannan.sadhasivam@linaro.org> 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?1752920455804967432?= X-GMAIL-MSGID: =?utf-8?q?1752920455804967432?= The LLCC block has several banks each with a different base address and holes in between. So it is not a correct approach to cover these banks with a single offset/size. Instead, the individual bank's base address needs to be specified in devicetree with the exact size. Reported-by: Parikshit Pareek Signed-off-by: Manivannan Sadhasivam --- arch/arm64/boot/dts/qcom/sdm845.dtsi | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/arch/arm64/boot/dts/qcom/sdm845.dtsi b/arch/arm64/boot/dts/qcom/sdm845.dtsi index 65032b94b46d..e1c0d9faf46e 100644 --- a/arch/arm64/boot/dts/qcom/sdm845.dtsi +++ b/arch/arm64/boot/dts/qcom/sdm845.dtsi @@ -2132,8 +2132,11 @@ uart15: serial@a9c000 { llcc: system-cache-controller@1100000 { compatible = "qcom,sdm845-llcc"; - reg = <0 0x01100000 0 0x31000>, <0 0x01300000 0 0x50000>; - reg-names = "llcc_base", "llcc_broadcast_base"; + reg = <0 0x01100000 0 0x50000>, <0 0x01180000 0 0x50000>, + <0 0x01200000 0 0x50000>, <0 0x01280000 0 0x50000>, + <0 0x01300000 0 0x50000>; + reg-names = "llcc0_base", "llcc1_base", "llcc2_base", + "llcc3_base", "llcc_broadcast_base"; interrupts = ; }; From patchwork Thu Dec 22 13:16:44 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Manivannan Sadhasivam X-Patchwork-Id: 35755 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:e747:0:0:0:0:0 with SMTP id c7csp320230wrn; Thu, 22 Dec 2022 05:20:49 -0800 (PST) X-Google-Smtp-Source: AMrXdXsDbIsoN8rGgVwd5yUfly6CEmFDQI3Nzleqkl99JXqbx4Hh2ByoavfCBmGUZRw4awdMsBUC X-Received: by 2002:a05:6402:1609:b0:467:7775:ba8 with SMTP id f9-20020a056402160900b0046777750ba8mr4905558edv.1.1671715249310; Thu, 22 Dec 2022 05:20:49 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1671715249; cv=none; d=google.com; s=arc-20160816; b=ouxwWkK8tB3XJMjHth62PA8cB/gjqa59XdsE5onr7Cseod3UwMR2dYrt3oYwPGVygc edufmPMleJE+u9l65Mdg9GnYSRN7N99AbsgMT0v4XgPSfs8Dqp2rWWhuESG9dm1dfbh0 gjfth27GbovLO3AbFEHDgsrqkY8+RAgbYiixq8cRyzUxFKShUNzn62uBO6pBvVMlLW9a V5pVmycnuT7fc1Ku7YysD4a/bPVcUSxmnmhjQqIhYpIJewexLXhFffvRAL3t0kxumyNT Gji1+EGJvvx5bSXYQ47LT2bYR/7ldS4I06xJj3WEeQL1S8ckiGIhtma18phLGe+NKrq/ vYzg== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=4GFA6I79C1YmmOYQX1BIX7MOGuUjMMgmSjlJ7uhFCjc=; b=FNAkep1in8QpNh+jYOmaUK+vDSxLEvc3gatwyD3FvQirdzXYG9bJHIXfu4gtpAp7lI at+pO+hcYC9jaYBAIjSYPW9DzSsY65Klm5rNEmsSKE2ke1ZAG/phkKIHpQ7fYifGa5TI ycj8ZQjN1HaLxFijZVmYUyvDmf8NNW9K6X0DO0Y3t3/TEOZOXHV1pXOiKnWuk+E2AKYA tnHscW2yEnyWH49f2WUyILbBpNFct6ewWKfErBPBqBPFC/soXyIfFsI6aFuvzPOyuS7d v2e+wqUxCmFKrU6oAxTDNxpQY6DdUsxr8oSGK2AUH7mxjvAEKs0cp72DJ1QseBLXQQbk iOMQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=KyqAKH9s; 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 i10-20020a1709064fca00b007c0a7bc2854si499294ejw.410.2022.12.22.05.20.19; Thu, 22 Dec 2022 05:20:49 -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=KyqAKH9s; 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 S234991AbiLVNSy (ORCPT + 99 others); Thu, 22 Dec 2022 08:18:54 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48004 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235096AbiLVNSK (ORCPT ); Thu, 22 Dec 2022 08:18:10 -0500 Received: from mail-pl1-x62f.google.com (mail-pl1-x62f.google.com [IPv6:2607:f8b0:4864:20::62f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AA3792B637 for ; Thu, 22 Dec 2022 05:17:57 -0800 (PST) Received: by mail-pl1-x62f.google.com with SMTP id 4so2003220plj.3 for ; Thu, 22 Dec 2022 05:17:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=4GFA6I79C1YmmOYQX1BIX7MOGuUjMMgmSjlJ7uhFCjc=; b=KyqAKH9suEnSST6nGHfrF6tiq5gOyxJrohsSocczxR2yYtSwc4itB7Rwfc7SH8NQLf BOPZJAR/M5OHetigMOlkHgsIEqWFC+GZdcpTBQGve1FYMPv1J3bDllxaG/kYFe48R3kZ rkszrwUINRgXb7Td2fzluU97ArKf/8mB1NDMjLIUKHoEEbIeT8GPsj8E4Ny3qEZBPheS uYLvV3c5hS6z+vjOmzfvNLSasQIo7ZLkLBKmN+fyEWCGfW90yyMw9m4HJgs6DIfQhYWn JzXWbNAb3RUKYta7ThAlAjFkiNAyQDrz5AndikCMq+Mdx+pYaM3bf4ikeORkaz/Rfb+k eOUQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=4GFA6I79C1YmmOYQX1BIX7MOGuUjMMgmSjlJ7uhFCjc=; b=Usih1Y7yJ89m5uhlra+9/kluGC3YRLxOMAYOEJnaCXLjRJ9SoRyKCtSKA9o/EIvYob xNiwhFpsUNQ5kmzZb1lKEHq1XT/OyevwKk4+sOO0pXOYU9p7NZiXGtZSoaM+rhXhokDF 24EAF29GTCOJ7sbtagS15WgIqPbBSo0Uq6ZPmXVGicKoWtMcmpgEiINCqDS37K7JN8Co ofX9YZGcxqtBsxKRrcANZg1iQrlH7bZD6Dzxh3j3fIMD/NH3i6ohxHzN/dBVL3y6585v JVYwHNsZu/Al5lAWOHBXYv/U01dnzHm/tAdKKLG2Zb4JNqvpgPDAYl94g5cOp/0vRdCl cFKw== X-Gm-Message-State: AFqh2kozY+AqmPyRNQ27KUGw9W8CvgRjP40iV5U+IqbmPCMBuZLnj2Vc VKalkBOXWLx49heiPOlbH9/H X-Received: by 2002:a17:903:228a:b0:191:217f:b2ea with SMTP id b10-20020a170903228a00b00191217fb2eamr8592642plh.40.1671715077246; Thu, 22 Dec 2022 05:17:57 -0800 (PST) Received: from localhost.localdomain ([117.217.177.99]) by smtp.gmail.com with ESMTPSA id g12-20020a170902fe0c00b001896040022asm491570plj.190.2022.12.22.05.17.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 22 Dec 2022 05:17:56 -0800 (PST) From: Manivannan Sadhasivam To: andersson@kernel.org, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, bp@alien8.de, tony.luck@intel.com Cc: quic_saipraka@quicinc.com, konrad.dybcio@linaro.org, linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, james.morse@arm.com, mchehab@kernel.org, rric@kernel.org, linux-edac@vger.kernel.org, quic_ppareek@quicinc.com, luca.weiss@fairphone.com, ahalaney@redhat.com, steev@kali.org, Manivannan Sadhasivam Subject: [PATCH v4 04/16] arm64: dts: qcom: sc7180: Fix the base addresses of LLCC banks Date: Thu, 22 Dec 2022 18:46:44 +0530 Message-Id: <20221222131656.49584-5-manivannan.sadhasivam@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20221222131656.49584-1-manivannan.sadhasivam@linaro.org> References: <20221222131656.49584-1-manivannan.sadhasivam@linaro.org> 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?1752920489295018699?= X-GMAIL-MSGID: =?utf-8?q?1752920489295018699?= The LLCC block has several banks each with a different base address and holes in between. So it is not a correct approach to cover these banks with a single offset/size. Instead, the individual bank's base address needs to be specified in devicetree with the exact size. On SC7180, there is only one LLCC bank available. So let's just pass that as "llcc0_base". Reported-by: Parikshit Pareek Signed-off-by: Manivannan Sadhasivam --- arch/arm64/boot/dts/qcom/sc7180.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm64/boot/dts/qcom/sc7180.dtsi b/arch/arm64/boot/dts/qcom/sc7180.dtsi index f71cf21a8dd8..f861f692c9b1 100644 --- a/arch/arm64/boot/dts/qcom/sc7180.dtsi +++ b/arch/arm64/boot/dts/qcom/sc7180.dtsi @@ -2759,7 +2759,7 @@ dc_noc: interconnect@9160000 { system-cache-controller@9200000 { compatible = "qcom,sc7180-llcc"; reg = <0 0x09200000 0 0x50000>, <0 0x09600000 0 0x50000>; - reg-names = "llcc_base", "llcc_broadcast_base"; + reg-names = "llcc0_base", "llcc_broadcast_base"; interrupts = ; }; From patchwork Thu Dec 22 13:16:45 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Manivannan Sadhasivam X-Patchwork-Id: 35758 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:e747:0:0:0:0:0 with SMTP id c7csp320319wrn; Thu, 22 Dec 2022 05:21:00 -0800 (PST) X-Google-Smtp-Source: AMrXdXvvajRYYnz/qkUMKDFmE+Q7Uls3Wc9ZQQcEQ/twCgfVzJw2BOp2AHoD04Xdnoge+die3ukl X-Received: by 2002:a17:907:80ca:b0:7c1:20ff:c044 with SMTP id io10-20020a17090780ca00b007c120ffc044mr4901793ejc.27.1671715260248; Thu, 22 Dec 2022 05:21:00 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1671715260; cv=none; d=google.com; s=arc-20160816; b=Hmwey0mgSfz8cVU3Mw1fbYBWVyzFW5BLVwnicGdfuGwIl+qFrvtSqNu/c3G9N0N74K bRBQ9bHfLCo+eUjG1NO3pGS3ZUnJrCbDf70SlsimRT+ef7WfuIPgOEDh1crfw28f+hg+ /bP+LiUI4k2kcRQgw/l0XOf5076kHCLH/lFWqCC3Phpkv/3yOWjZgRjyuiQ7p1eI5Fbe Zz+SE49xE551NQXrtRb9ns6pyfsTcMZ+anHA37U30yH0iooLSx3xu0hQBULAcfXgPfpe 3ZsI9NT4yBM4lNn0Z5ERbdY1uiTRz77uiOfuhdeXo0UB0Drm7h2DDZUjpMDLIVlizj6/ xcqg== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=u3b0H9FlwI0cHeu/QvvhJdFruV0iaHa3piiWtATy1Lw=; b=quzcAB6665XWWwGqb2EnINuJ4J2EthkrVRqXh4gIU+NBoYpz+s9IgEJRzU57mHiBbF mSvQAaj2MkqgXYw5AXBlfi3ouZJZNxHI5L8mb3ZrriWomBER/JkfNtNf/Kv9ebDujCV4 Kaf9W2K6E/HS/YAI8mANYmU7Lf09ZcnAo8pXdrlB28cDaASwssrcfnX0n+7DGKyrCbu9 FoTddtty4sjwELdGqMMhHi+OYdi44PcQ6Zj67r7XooPDA+RivB6SucPBWg/Da50Z1g3j 7uPvb3TQMtLXH+WJmek1D8JNgJGdw/awP84aRd+dhMZGyz7ZMWQB7XTA7fvLJ/WXgVGo boPw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=gnByMWDr; 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 qk40-20020a1709077fa800b007f46a3735cfsi501126ejc.253.2022.12.22.05.20.28; Thu, 22 Dec 2022 05:21:00 -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=gnByMWDr; 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 S235524AbiLVNTR (ORCPT + 99 others); Thu, 22 Dec 2022 08:19:17 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48030 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235631AbiLVNSP (ORCPT ); Thu, 22 Dec 2022 08:18:15 -0500 Received: from mail-pl1-x62f.google.com (mail-pl1-x62f.google.com [IPv6:2607:f8b0:4864:20::62f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5ABFC2B26C for ; Thu, 22 Dec 2022 05:18:05 -0800 (PST) Received: by mail-pl1-x62f.google.com with SMTP id u7so1963921plq.11 for ; Thu, 22 Dec 2022 05:18:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=u3b0H9FlwI0cHeu/QvvhJdFruV0iaHa3piiWtATy1Lw=; b=gnByMWDrv/Lg6BTxLAdidhvjUtHGpWOlSVTpQZb/yNKi+IGyo2ix5/CLp/zvC2ezgX rLHDsvBolhEvXSgcaskguoAus95ifGJXB5dvp0tClVHYI1SwNTh6csg8ZGj/AgDBDfnD GV9jil3DlgWv8YzUfXAqtFLYxwRyQAuaYTOe0iyvbrxqiw1IFa5qbluv1NBOanOZpjlW JH4YTwUoUBAI/OEVyu9NAGYXEYPiDIxk2HhbOS07yrD1Jt5PdR7LnvOi1XAIychU4jTD ZHcmcfxg13p3exaHU/ek4vNSsAVLnbNc+lLw/UnxcnnXKst8AQQaSQwR6Do6ACZdgSQ7 h9cw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=u3b0H9FlwI0cHeu/QvvhJdFruV0iaHa3piiWtATy1Lw=; b=iHBtmlJKFYIeVapim/JiGXefWYnLQue5Gj0k4Oca6xm2PLko0MwulzgkBJ7COvpyAv YeYSoUHcBrvd6aq3jZ8dKFsR0cN4cpbgIqxVEZq3oPTKXxM6GEoCywvgRkB4JfHfr9wB /3MTPW1+Z+HlxXRnL+uMHi59oHdtcxIZAwJ0ogT52WjqjeEMjH67Ps7ijwIJsohqCwnx vdjOg5KVUMQvG8rX5AcAMgbXUlmpOGK4p7EFMdP4BcMy50zAfblR6aJQCRiqbWEt6RhH vY59LKbhiVZnLVWdMZNznWcflECI1Kv2z1V6uGb7dpD/JLuRWQe4QFygRhdzWUkGCA39 gmwg== X-Gm-Message-State: AFqh2krhououbLHOsz40vPUJB0OBCS1p69FVW+KydSk6fZV1i0rJ2RpA XyMFjQ0Nx/9vykgNSZUa0tSy X-Received: by 2002:a17:902:f68a:b0:192:49f4:fe67 with SMTP id l10-20020a170902f68a00b0019249f4fe67mr7323465plg.57.1671715084787; Thu, 22 Dec 2022 05:18:04 -0800 (PST) Received: from localhost.localdomain ([117.217.177.99]) by smtp.gmail.com with ESMTPSA id g12-20020a170902fe0c00b001896040022asm491570plj.190.2022.12.22.05.17.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 22 Dec 2022 05:18:03 -0800 (PST) From: Manivannan Sadhasivam To: andersson@kernel.org, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, bp@alien8.de, tony.luck@intel.com Cc: quic_saipraka@quicinc.com, konrad.dybcio@linaro.org, linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, james.morse@arm.com, mchehab@kernel.org, rric@kernel.org, linux-edac@vger.kernel.org, quic_ppareek@quicinc.com, luca.weiss@fairphone.com, ahalaney@redhat.com, steev@kali.org, Manivannan Sadhasivam Subject: [PATCH v4 05/16] arm64: dts: qcom: sc7280: Fix the base addresses of LLCC banks Date: Thu, 22 Dec 2022 18:46:45 +0530 Message-Id: <20221222131656.49584-6-manivannan.sadhasivam@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20221222131656.49584-1-manivannan.sadhasivam@linaro.org> References: <20221222131656.49584-1-manivannan.sadhasivam@linaro.org> 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?1752920500542022038?= X-GMAIL-MSGID: =?utf-8?q?1752920500542022038?= The LLCC block has several banks each with a different base address and holes in between. So it is not a correct approach to cover these banks with a single offset/size. Instead, the individual bank's base address needs to be specified in devicetree with the exact size. While at it, let's also fix the size of the llcc_broadcast_base to cover the whole region. Reported-by: Parikshit Pareek Signed-off-by: Manivannan Sadhasivam --- arch/arm64/boot/dts/qcom/sc7280.dtsi | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/arch/arm64/boot/dts/qcom/sc7280.dtsi b/arch/arm64/boot/dts/qcom/sc7280.dtsi index 0adf13399e64..6c6eb6f4f650 100644 --- a/arch/arm64/boot/dts/qcom/sc7280.dtsi +++ b/arch/arm64/boot/dts/qcom/sc7280.dtsi @@ -3579,8 +3579,9 @@ gem_noc: interconnect@9100000 { system-cache-controller@9200000 { compatible = "qcom,sc7280-llcc"; - reg = <0 0x09200000 0 0xd0000>, <0 0x09600000 0 0x50000>; - reg-names = "llcc_base", "llcc_broadcast_base"; + reg = <0 0x09200000 0 0x58000>, <0 0x09280000 0 0x58000>, + <0 0x09600000 0 0x58000>; + reg-names = "llcc0_base", "llcc1_base", "llcc_broadcast_base"; interrupts = ; }; From patchwork Thu Dec 22 13:16:46 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Manivannan Sadhasivam X-Patchwork-Id: 35754 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:e747:0:0:0:0:0 with SMTP id c7csp320199wrn; Thu, 22 Dec 2022 05:20:46 -0800 (PST) X-Google-Smtp-Source: AMrXdXs8CTVvBGzsajCAFgvFFNtIz1S5ozBmpXmIwWfC+u3IqtubGiJPFKAZt6iR9QyIjSgKwDQL X-Received: by 2002:a17:90b:1989:b0:219:f1a2:b665 with SMTP id mv9-20020a17090b198900b00219f1a2b665mr6858101pjb.5.1671715245748; Thu, 22 Dec 2022 05:20:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1671715245; cv=none; d=google.com; s=arc-20160816; b=MrOroVbYMAqav3y0TZ/1e6R2uar9zmKKq2DfyTvFfzMgXBvZm9pqR/4+NlqorCf8f+ HYHhNC+etWH5qi1Cs8MbFXQtF1aZUVdDq5aPIq1wct6LuVG3VJrZ/Z6P6RS55h8jYWVc uXYV8mpV/97NEEglog7UK1CJqByBjzYMwQ6DpbofWRZwxJZo7zG46eTqsmlqTzrF2ZED ORRdZGiWN35pO52EZgM4KXcSbKqwFwSA/zuiyitamQRp+TawYlcBI4CvAVncmxv9zueo pvQjPnldUBzjr1BqrVawljAIH1BBWrCY/f1K6qgeGVohjZQLOyZqtrws/BJvGX6aa+d4 MWPw== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=TVKI7LzAkCeTNtN2kaZFbBM4yejfzWbEhk9TFnMYwYw=; b=Mx0oukNMXL+rmL72fTXMkKK77chGq+W7zPsLHosLFcAC2FIk1TfXVmHnE39B4ZRJa/ TkwdbGy787gOVubzYDGLCjTh5bU24tFY2HsijfHm4dzDCBduEp7prsEXFsedf1GDifrx eSdptYkFkcWeYOjjJOl3jo/zAVpInYsHhB1DmVtXaA/II34wfU10I568XRFFJXaghgJy NcYMz1jgnAVrFwk6sMWMfnxnz4YkVZnGiOwle4hmhjqHRYHlqSNu+09tos71ojo91jhe pCC3gLMjC3cGAOTGwaeFaVlcr9XRHnbS9GITHacL/NEd2c6R6QNMsRc8qFwp8DJNkRyL +CJA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="P/a+54Ag"; 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 d4-20020a63a704000000b00476bba7cc00si773012pgf.85.2022.12.22.05.20.28; Thu, 22 Dec 2022 05:20:45 -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="P/a+54Ag"; 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 S235434AbiLVNS7 (ORCPT + 99 others); Thu, 22 Dec 2022 08:18:59 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47776 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235569AbiLVNSQ (ORCPT ); Thu, 22 Dec 2022 08:18:16 -0500 Received: from mail-pj1-x1029.google.com (mail-pj1-x1029.google.com [IPv6:2607:f8b0:4864:20::1029]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D58782B277 for ; Thu, 22 Dec 2022 05:18:12 -0800 (PST) Received: by mail-pj1-x1029.google.com with SMTP id p4so1890287pjk.2 for ; Thu, 22 Dec 2022 05:18:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=TVKI7LzAkCeTNtN2kaZFbBM4yejfzWbEhk9TFnMYwYw=; b=P/a+54AgWuWXtmXW0Z8O+Z4jquZ6bjEQJYCos8CoZuhMjjTvnXhIYgjxuOmTDy32+0 Kcr+bf3cXzVpz9f0cNhNz/XK2mJRqFhb1uSe9ZDqO/Z3IVIFE9RvTyqCTE0nHnin1tdz a8mBSs5XShG3YBkdgOSM7by4y/YzeqUpy5K0woYBdRb4acljtFdA9F74/EcYgA/MWG+l aJNv0vt9pbz9yv+E40Z+1sk6Asiw1AtA/rjyJEIC0IDakCNR6RHh/T1mJvjN3o4rl858 F7SBp6WCIfiB74jDKsSSwH0bAyQbK7VRJ/cv+1f7WQP2u8IkfsvgrYjIpAgkl+oGA0fo x64Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=TVKI7LzAkCeTNtN2kaZFbBM4yejfzWbEhk9TFnMYwYw=; b=n81X00eozP3roQiz234NuDySqVOcpqkW7nPk89FhoueM+JhKrv4JjxPhP2+gbFQCTV TKQOU4vJOJZNrYZBAPL4Mp0BSC1RLI7ahuguceoj2WPXUvGEjrm0+mzOu1dxS36ddKJC kca4ZWziB2By4euZXLfu/kJ959ABKpghQjt4DroJhMe77e+OPCciNyAOYYiirqBM3HmX 1+7tA9VfI12WtOQMeFDbmLdkisXpDw4eZ+HNjm/SPzuUvXCJ0fQLymn3LcEV9EO7nmqg 1FH/loWAOrJ3d4cFQqLEXP2cUBgZKnaSMjsJ+QmT2JYO+V24TYuQmiB+uJofUsgGdtLM cLUw== X-Gm-Message-State: AFqh2kqm4KNZ/0XjJAfteDZm2tYgz974HoVlVHhFu+pA06Qvwq/JTrGp b994vOH1riLsaly4ccwARwKN X-Received: by 2002:a17:903:210b:b0:18f:aca1:b0c9 with SMTP id o11-20020a170903210b00b0018faca1b0c9mr5058479ple.53.1671715092349; Thu, 22 Dec 2022 05:18:12 -0800 (PST) Received: from localhost.localdomain ([117.217.177.99]) by smtp.gmail.com with ESMTPSA id g12-20020a170902fe0c00b001896040022asm491570plj.190.2022.12.22.05.18.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 22 Dec 2022 05:18:11 -0800 (PST) From: Manivannan Sadhasivam To: andersson@kernel.org, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, bp@alien8.de, tony.luck@intel.com Cc: quic_saipraka@quicinc.com, konrad.dybcio@linaro.org, linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, james.morse@arm.com, mchehab@kernel.org, rric@kernel.org, linux-edac@vger.kernel.org, quic_ppareek@quicinc.com, luca.weiss@fairphone.com, ahalaney@redhat.com, steev@kali.org, Manivannan Sadhasivam Subject: [PATCH v4 06/16] arm64: dts: qcom: sc8280xp: Fix the base addresses of LLCC banks Date: Thu, 22 Dec 2022 18:46:46 +0530 Message-Id: <20221222131656.49584-7-manivannan.sadhasivam@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20221222131656.49584-1-manivannan.sadhasivam@linaro.org> References: <20221222131656.49584-1-manivannan.sadhasivam@linaro.org> 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?1752920485785483228?= X-GMAIL-MSGID: =?utf-8?q?1752920485785483228?= The LLCC block has several banks each with a different base address and holes in between. So it is not a correct approach to cover these banks with a single offset/size. Instead, the individual bank's base address needs to be specified in devicetree with the exact size. Reported-by: Parikshit Pareek Signed-off-by: Manivannan Sadhasivam --- arch/arm64/boot/dts/qcom/sc8280xp.dtsi | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/arch/arm64/boot/dts/qcom/sc8280xp.dtsi b/arch/arm64/boot/dts/qcom/sc8280xp.dtsi index 109c9d2b684d..0510a5d510e7 100644 --- a/arch/arm64/boot/dts/qcom/sc8280xp.dtsi +++ b/arch/arm64/boot/dts/qcom/sc8280xp.dtsi @@ -1856,8 +1856,14 @@ opp-6 { system-cache-controller@9200000 { compatible = "qcom,sc8280xp-llcc"; - reg = <0 0x09200000 0 0x58000>, <0 0x09600000 0 0x58000>; - reg-names = "llcc_base", "llcc_broadcast_base"; + reg = <0 0x09200000 0 0x58000>, <0 0x09280000 0 0x58000>, + <0 0x09300000 0 0x58000>, <0 0x09380000 0 0x58000>, + <0 0x09400000 0 0x58000>, <0 0x09480000 0 0x58000>, + <0 0x09500000 0 0x58000>, <0 0x09580000 0 0x58000>, + <0 0x09600000 0 0x58000>; + reg-names = "llcc0_base", "llcc1_base", "llcc2_base", + "llcc3_base", "llcc4_base", "llcc5_base", + "llcc6_base", "llcc7_base", "llcc_broadcast_base"; interrupts = ; }; From patchwork Thu Dec 22 13:16:47 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Manivannan Sadhasivam X-Patchwork-Id: 35757 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:e747:0:0:0:0:0 with SMTP id c7csp320263wrn; Thu, 22 Dec 2022 05:20:53 -0800 (PST) X-Google-Smtp-Source: AMrXdXu/79cSAxs1t2mGz+YTPCV6Ms2jhnpEfP89i4vfFFd+QxaTqDTBZafbyCbRrRX2fiDICxJM X-Received: by 2002:a17:906:c18d:b0:843:770e:777f with SMTP id g13-20020a170906c18d00b00843770e777fmr2389793ejz.24.1671715253622; Thu, 22 Dec 2022 05:20:53 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1671715253; cv=none; d=google.com; s=arc-20160816; b=Ky9Zz4Pex9EPwV3UpauTHKvdBaszR7xe5bAVHN12Zgrz9C+Rkntfj4+eUjPCxEFtjP NQRr66exp6jEaH4QYmos91oz56GaCCS0MsmTbZHKnSFPQ0XRtl2JTRM+AIpHYyuhGow6 7u5HzhLlSsoEe2gac0peHVUBAKlObn/ny3pRM/LJ19ZTQq2mpWqky3V9rPzg09iD0enj qmLw5Ktdh6H2zGxrObwMeYOPmUZfVzRp3Q9Z11YoHoCRCqE43IxgXHNOH8F4HWM7PlLg e6Gca1NIqatgkAkkIIQhC4y791r7ZSSqHjk+0FO+XZgzO3k3Z/Vsx3+0B6qSw1Jd9yWr hEfA== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=7WUljA05hxjrMgWInu+aANTEuP2TXhzChwqlFzG2wks=; b=DsruA+CTStSf86gcr4EQCE0PT8aSJdN3ATDyhwEMfuHwchzny3AvamLXQXhptb8gfd O3JEFRyyLdrAtfzY/Ad0+uyvjTFfmy11cO5IKbwm0FNtxcCz4TtiysJeOtc1qs7Kix3T unUQRkbHppqz/iKM2DAe2VgvYaiVHqtnuxV1QD5Jg6lp5AQSVkTml8sWmHFfwo7ydSfN 24lIu9pDWkTRjaYEfDicjksY6tSebNOA8BqV0+z6GAIpbWZhWfp+uc1aL8VucrEj6nHl nnMPJ9/2gLIpg3xcrvku3T3v/9CDl2S8dmfeiMPhiYewuZ/uRM/wJcyOvPuQLDSi8GKO g2gQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=C6UEEu2c; 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 sh33-20020a1709076ea100b0080a15fe49bcsi465026ejc.569.2022.12.22.05.20.25; Thu, 22 Dec 2022 05:20:53 -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=C6UEEu2c; 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 S235680AbiLVNTN (ORCPT + 99 others); Thu, 22 Dec 2022 08:19:13 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48512 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235572AbiLVNSU (ORCPT ); Thu, 22 Dec 2022 08:18:20 -0500 Received: from mail-pj1-x1035.google.com (mail-pj1-x1035.google.com [IPv6:2607:f8b0:4864:20::1035]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1954A2B27B for ; Thu, 22 Dec 2022 05:18:20 -0800 (PST) Received: by mail-pj1-x1035.google.com with SMTP id t11-20020a17090a024b00b0021932afece4so5659695pje.5 for ; Thu, 22 Dec 2022 05:18:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=7WUljA05hxjrMgWInu+aANTEuP2TXhzChwqlFzG2wks=; b=C6UEEu2cv9HWmh2bzqVBHeQNYzwhh1L9U41oaFA6os6JZIvt0qOms7EsWan5cEV7G8 qsqXREDB3CHZbzOCiJBLqi+fXZTtfzBsk4cLkQLICCPN5ELJM2O4eZQdxJnKWrWekIrG Cdl+6PhS6yrwZoCPgec0sAfNU/Lz4Z9OaL1GXz+MgxOIgxkIL5pIC2dRDIATEQyzfuq3 +D9Ep3r9hv4cZKTwNmtK+WPgoD6mU32mkblcraTyNqu1woMe80CkJJt95f0Gdt2fFgvO qHQHrtlUG1k8WwTDlZWoj8h16PiKr9rqRyymr04KacTDb2OIZuTjTbLumfQvjQ/wuJOU slPQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=7WUljA05hxjrMgWInu+aANTEuP2TXhzChwqlFzG2wks=; b=mrwtsAjKUox1itV/c/rtRN6DtFHQutuyT3qUub6iXajGbtJv2ZTrnaqDZeq0rhQ2qc oX/rn2AVYjf3z4ujiNWpDHxAjxp6xuVTXxTcojP9Oy1Al8B8VVOluQwAU5E89csAKpBj jI/Ef2KZlrNHOGbod9mgXaWglQ6/gcSX6UkDLgUQbgzdnLXAqbJM6CNL8PC0Cg14/yB2 cgzFgoZFfEMebLuPrJLCDIEfzPnY3eKedp5VlF5ZTkMSziAPelpc9VpjbxX+EJfSQtU9 Un1OdgvxiuHQq/SF32qYmuWb8bQLubB7OSJWjsz8u6ed0HoVxZXRAy3fBTTFK1OX/Vkf cExQ== X-Gm-Message-State: AFqh2ko8vYS9y10lMB7ZZNwHJV81Dc+b+NXREtFnT24+VfK2hE7Pan4H zbNfaXloi/qIQSXqT8a+sKtq X-Received: by 2002:a17:902:c612:b0:192:511e:b9ab with SMTP id r18-20020a170902c61200b00192511eb9abmr3162310plr.21.1671715099601; Thu, 22 Dec 2022 05:18:19 -0800 (PST) Received: from localhost.localdomain ([117.217.177.99]) by smtp.gmail.com with ESMTPSA id g12-20020a170902fe0c00b001896040022asm491570plj.190.2022.12.22.05.18.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 22 Dec 2022 05:18:18 -0800 (PST) From: Manivannan Sadhasivam To: andersson@kernel.org, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, bp@alien8.de, tony.luck@intel.com Cc: quic_saipraka@quicinc.com, konrad.dybcio@linaro.org, linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, james.morse@arm.com, mchehab@kernel.org, rric@kernel.org, linux-edac@vger.kernel.org, quic_ppareek@quicinc.com, luca.weiss@fairphone.com, ahalaney@redhat.com, steev@kali.org, Manivannan Sadhasivam Subject: [PATCH v4 07/16] arm64: dts: qcom: sm8150: Fix the base addresses of LLCC banks Date: Thu, 22 Dec 2022 18:46:47 +0530 Message-Id: <20221222131656.49584-8-manivannan.sadhasivam@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20221222131656.49584-1-manivannan.sadhasivam@linaro.org> References: <20221222131656.49584-1-manivannan.sadhasivam@linaro.org> 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?1752920493494351573?= X-GMAIL-MSGID: =?utf-8?q?1752920493494351573?= The LLCC block has several banks each with a different base address and holes in between. So it is not a correct approach to cover these banks with a single offset/size. Instead, the individual bank's base address needs to be specified in devicetree with the exact size. Reported-by: Parikshit Pareek Signed-off-by: Manivannan Sadhasivam --- arch/arm64/boot/dts/qcom/sm8150.dtsi | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/arch/arm64/boot/dts/qcom/sm8150.dtsi b/arch/arm64/boot/dts/qcom/sm8150.dtsi index a0c57fb798d3..7fd2291b2638 100644 --- a/arch/arm64/boot/dts/qcom/sm8150.dtsi +++ b/arch/arm64/boot/dts/qcom/sm8150.dtsi @@ -1762,8 +1762,11 @@ mmss_noc: interconnect@1740000 { system-cache-controller@9200000 { compatible = "qcom,sm8150-llcc"; - reg = <0 0x09200000 0 0x200000>, <0 0x09600000 0 0x50000>; - reg-names = "llcc_base", "llcc_broadcast_base"; + reg = <0 0x09200000 0 0x50000>, <0 0x09280000 0 0x50000>, + <0 0x09300000 0 0x50000>, <0 0x09380000 0 0x50000>, + <0 0x09600000 0 0x50000>; + reg-names = "llcc0_base", "llcc1_base", "llcc2_base", + "llcc3_base", "llcc_broadcast_base"; interrupts = ; }; From patchwork Thu Dec 22 13:16:48 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Manivannan Sadhasivam X-Patchwork-Id: 35766 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:e747:0:0:0:0:0 with SMTP id c7csp320800wrn; Thu, 22 Dec 2022 05:22:04 -0800 (PST) X-Google-Smtp-Source: AMrXdXsZzz30vlIDsgOlFmesPEI1KBaXbgBbGYwsTZSzFOqe7J1BqUg5+8++o617jtTXToakc/OS X-Received: by 2002:a17:902:ccce:b0:189:e577:c83e with SMTP id z14-20020a170902ccce00b00189e577c83emr6609031ple.36.1671715324349; Thu, 22 Dec 2022 05:22:04 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1671715324; cv=none; d=google.com; s=arc-20160816; b=bQyJ0WsYHf9fMVqC7MUD3HGZKZLNXkIDgdKmFyLxoTxmSO2B3z4a4ULjkkEI+n57G8 ZUtvOFWs3dTFuHwziUQ1tNjhn6UjRNzbwplqnoGxn7TkU6a8stumtu/e08t+rzslCXj3 3r8SWlPpnn+xoQGISQfFUM+MLVvzAVNlLEX/zDDCARkUlnIJfa7dvlmYjq2k1lyqmWFZ Jmgt+seifD79Ld5LZvbFU43mYAegKjrFLmI6zxUnv2m3fSfu0PlpLyB29wmX9plwDSUS ThPjZYNRTRF2+EFX5aPe8AynkPqAScGRy9hDijcWVVWqPxvNdqjBATh9vqVKxqKjgrPy YWJQ== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=WYoJy3okzdnngL6TcLmeGykcAQcBXE1fb+mKXu1bB1c=; b=OgkDWaIdW78sgRRUYh84rkzJj2hAS+Q8xdcHypJ9LhFhHGbc7l/Q4OhR8ko5Ge5Ft9 zBTvbxntGBb5wTBz8LNB14mKPkYtpjJOnT2bNAkTfMPdSRN89r3YIv3WDlkVY7fAMvYd Lc6A8XVNzVBoipDcN9SrUJp2qI+3YWbjVjeBhPqhGdID6J5wbg/mryaMpqDw0A0dfRuB kE7xmICKsvL7m33WzcP7K907WPH27ZRIzHIFAA0c70dowEnwF/zCRVtH57FuznbK2VTH LZw1iFAUvSc8W05X2ix4oxhY9I3CZm/XGD8pIUCfFyiOunfdk7Mj0QNW8jhh5+YEv/5C Xb4Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ZtQ5aYt6; 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 u17-20020a17090341d100b0017f7fffb591si509508ple.374.2022.12.22.05.21.51; Thu, 22 Dec 2022 05:22:04 -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=ZtQ5aYt6; 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 S235558AbiLVNTD (ORCPT + 99 others); Thu, 22 Dec 2022 08:19:03 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47826 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235248AbiLVNS2 (ORCPT ); Thu, 22 Dec 2022 08:18:28 -0500 Received: from mail-pj1-x1035.google.com (mail-pj1-x1035.google.com [IPv6:2607:f8b0:4864:20::1035]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 03D1B2B24C for ; Thu, 22 Dec 2022 05:18:27 -0800 (PST) Received: by mail-pj1-x1035.google.com with SMTP id t11-20020a17090a024b00b0021932afece4so5660068pje.5 for ; Thu, 22 Dec 2022 05:18:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=WYoJy3okzdnngL6TcLmeGykcAQcBXE1fb+mKXu1bB1c=; b=ZtQ5aYt6JszkNCc6c+71vylemy82zpImGkRGBLjyDIYf900tOPtXU155alWvES6I1M iN33nGCpROLkAWz2iuohHqj0WGMRtqHS9xDzku9mG2s9eEQkt4khJBVbQ3qq3b4HOA6l R3OiuzxM8jBtFr4UDlvK6L1wOV6uTgeCQlEU6XYG7D0VC2AmlsmzQuN+5VwkKXZ0CLoF K95z38wHmzOT7Vbkjk4Z6BmrLHVQnNZCMcX0kdRG0L5JmGdSFrmd2YFdwz0FVzttv0/l 4LLt67WOyGy9V4XDggSgZXyDOflfPKYJR/YGUYQ9EeVBtidNSLZOUhCuupf7w9zw3Q60 VOwg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=WYoJy3okzdnngL6TcLmeGykcAQcBXE1fb+mKXu1bB1c=; b=PSwmZpBY0OwmdQAjVEYpdhLMxSd1ryeeymj4IwmzIEjVtccwSEiroYUtmmlczpgudj 9lp6GLNg0/OvKvTP+Bzbbe9/JZW/bE80xvgYBAiG0ew/+FRiqBaOD9/WM0qCNqFeNHgz 4uyVeU9lsLOyjZarpOOsm4aTpX3mfPPSoL04ZFXo+I9g3XNTyQZNsBZuHnXvsYEqIGGe RuFnJuDlm4RzsF+czV8l66fgrRj9UW9e+3MomdLDv8Se0Eelmv9Y60l846p9VCOvao3a RsT+Hq67F3lvwjQDIvsJ4q9Zn+ow9z68VHuaMVz/5nDnjRLigT3LuD9N8M2hHopVoPPC I+CA== X-Gm-Message-State: AFqh2kqnAvrbHMWkNWmAwg9gYldjWE0HcKO/mXoL3F8HGuhU/M8EjBD9 wla/K0w5I4dlTNiLulQTstci X-Received: by 2002:a17:902:edc3:b0:189:5ef4:6ae9 with SMTP id q3-20020a170902edc300b001895ef46ae9mr5194255plk.45.1671715106651; Thu, 22 Dec 2022 05:18:26 -0800 (PST) Received: from localhost.localdomain ([117.217.177.99]) by smtp.gmail.com with ESMTPSA id g12-20020a170902fe0c00b001896040022asm491570plj.190.2022.12.22.05.18.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 22 Dec 2022 05:18:25 -0800 (PST) From: Manivannan Sadhasivam To: andersson@kernel.org, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, bp@alien8.de, tony.luck@intel.com Cc: quic_saipraka@quicinc.com, konrad.dybcio@linaro.org, linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, james.morse@arm.com, mchehab@kernel.org, rric@kernel.org, linux-edac@vger.kernel.org, quic_ppareek@quicinc.com, luca.weiss@fairphone.com, ahalaney@redhat.com, steev@kali.org, Manivannan Sadhasivam Subject: [PATCH v4 08/16] arm64: dts: qcom: sm8250: Fix the base addresses of LLCC banks Date: Thu, 22 Dec 2022 18:46:48 +0530 Message-Id: <20221222131656.49584-9-manivannan.sadhasivam@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20221222131656.49584-1-manivannan.sadhasivam@linaro.org> References: <20221222131656.49584-1-manivannan.sadhasivam@linaro.org> 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=ham 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?1752920567962855819?= X-GMAIL-MSGID: =?utf-8?q?1752920567962855819?= The LLCC block has several banks each with a different base address and holes in between. So it is not a correct approach to cover these banks with a single offset/size. Instead, the individual bank's base address needs to be specified in devicetree with the exact size. Reported-by: Parikshit Pareek Signed-off-by: Manivannan Sadhasivam --- arch/arm64/boot/dts/qcom/sm8250.dtsi | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/arch/arm64/boot/dts/qcom/sm8250.dtsi b/arch/arm64/boot/dts/qcom/sm8250.dtsi index dab5579946f3..d1b65fb3f3f3 100644 --- a/arch/arm64/boot/dts/qcom/sm8250.dtsi +++ b/arch/arm64/boot/dts/qcom/sm8250.dtsi @@ -3545,8 +3545,11 @@ usb_1_dwc3: usb@a600000 { system-cache-controller@9200000 { compatible = "qcom,sm8250-llcc"; - reg = <0 0x09200000 0 0x1d0000>, <0 0x09600000 0 0x50000>; - reg-names = "llcc_base", "llcc_broadcast_base"; + reg = <0 0x09200000 0 0x50000>, <0 0x09280000 0 0x50000>, + <0 0x09300000 0 0x50000>, <0 0x09380000 0 0x50000>, + <0 0x09600000 0 0x50000>; + reg-names = "llcc0_base", "llcc1_base", "llcc2_base", + "llcc3_base", "llcc_broadcast_base"; }; usb_2: usb@a8f8800 { From patchwork Thu Dec 22 13:16:49 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Manivannan Sadhasivam X-Patchwork-Id: 35756 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:e747:0:0:0:0:0 with SMTP id c7csp320231wrn; Thu, 22 Dec 2022 05:20:49 -0800 (PST) X-Google-Smtp-Source: AMrXdXt97NhmRPq6BQjWEk5tE7P7r9FKsgApfwohYc5l8PQHF2xD0yE42ZWitQ+G1zOCfV9TChp7 X-Received: by 2002:a05:6402:538c:b0:472:f7c1:361 with SMTP id ew12-20020a056402538c00b00472f7c10361mr4869932edb.29.1671715249398; Thu, 22 Dec 2022 05:20:49 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1671715249; cv=none; d=google.com; s=arc-20160816; b=Ads0qoJuG6HUDFPhoFemajTCvfg/WM6gpht0w7/pI4WXH/LCzcn436qSBujHVzrBV/ TiDLnJZXlj2UNIO98oEJXRGzMLkX4VkkZjqr8rK6KHet+4DoGi3Hk8VCJb0RYX8EPkb0 Th8VGvEdQm26Eq1CnqJFRvbOqpOmPs439nBKrwksE9cl11YEvBPW/hpSrlejtBoxSy/C GZ4ifbpsxoYiZBS/43M4KYQPkPnOALzRWp8Sa7a3lWX5t3jZUJKkji+WjknSnvhW97+H MNeGNFIjl7a3GQgRRa8QcYMC90mV4d/8nDaU64ROu/naqexqdGryFT9vnTijs8CFg6Cq IAWA== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=sMev9I+ZdryrTBjzJ8tiTgJp1UwzDLK7UbgCFoQvzyA=; b=BDgkuKVdXEXfgFOLt8O1aDoPyNfzHnTXcxQYbclei4Pnq3FAYVlgtedQ+jMhIvY/z+ mrvNMzzZSKH7H8KM3a06w4gEL1/xKhO4nS9VE7oyghj5c9EZl9LSSdqzY2fedObeV66D aHdEkz+2ihhnR8yLBijGi/VgEqt5gdvu7I8Ru+s/C7DvlvTUVGG/TpaNqJZ0KmrpFk4S 9aKTbyP9NKPUqEmVnKtW+Z9wfl3ovZiEp9wGWFDdirEp6NsmHjMw0oX3G/HytmV4P1/G 6IP4jzTx9Gza1NFVbe8l2A8q8NvGhyCth8dQrPKp2VU1KxWnz6TwUaIcY3sMLaNe3PI7 a0Rg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=VBdAGtoy; 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 y9-20020a056402270900b00477aabd89d2si696702edd.498.2022.12.22.05.20.21; Thu, 22 Dec 2022 05:20:49 -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=VBdAGtoy; 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 S235197AbiLVNTH (ORCPT + 99 others); Thu, 22 Dec 2022 08:19:07 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48604 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235503AbiLVNSi (ORCPT ); Thu, 22 Dec 2022 08:18:38 -0500 Received: from mail-pj1-x1035.google.com (mail-pj1-x1035.google.com [IPv6:2607:f8b0:4864:20::1035]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A82A92B24A for ; Thu, 22 Dec 2022 05:18:34 -0800 (PST) Received: by mail-pj1-x1035.google.com with SMTP id v13-20020a17090a6b0d00b00219c3be9830so1822663pjj.4 for ; Thu, 22 Dec 2022 05:18:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=sMev9I+ZdryrTBjzJ8tiTgJp1UwzDLK7UbgCFoQvzyA=; b=VBdAGtoyo4j2LV+Tuat5GuV++N4ZltEQvbVJe/poeH/NKjLl8sIWRKaOEc0HxyfGjN UccwIuH5LaAQZeB/Hg1/z7ge75Rjtqf9bB9xPhz5X2Wvg3XpryO5sLq/SyYjDGGGI1v4 xNnQrbrnvGj8aku4FvL2Rp+CTFHcygeeiEYNG+FdqxxEak8M5JLLQAHJYYwMi5OHqu1Y kXVHR5fqO4ID2ul360A76+i81odlQh/l5Wl7HSVBCW04bgaRRZhABkoQiLbnNIwAyGUT IMFojxCV4ih5FFAeWNZZ461ke5qd3NAp4l/qjaaJWJb5BXAHAx+5GYEM6wkHC6e8657J Pr5w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=sMev9I+ZdryrTBjzJ8tiTgJp1UwzDLK7UbgCFoQvzyA=; b=UGZcqohp6NWiJSSKU4iRfDhrM0X2s2zBAcPj0ej01Jp3Z8SJVS3UUd0OGXQALpsymD YxCwfukVgEwwbaZ1j13HBQUGVdRxe3xAaw2x3vcaQyymwB2EXSULCrwO3H+MnnhJsvMy v4+Gt1/vK+uQgPq1Kbmn2K75WIhx/CRjmRZEzja+e2oukU8Fq9QTmMras4CqXBM7Fdn1 F+HEC4ydD0qBtAq5xQTO3DjJ7MTtVHzmRGeEso+kQJ5VWbel+G6mOXvBfjWl5n6No7N8 CrpWp1l03O8yWDDfMbRWPC7HApV972mP42R1EQJAT8VG7aVl78PK2OHIWpMFdSonlq2q /rXw== X-Gm-Message-State: AFqh2koT3bFSW0TxJSMBq/W8d4LDzdDgedJj8Gcq7HbQAuA3WKUbaBwZ tYzSGnDJctxcT7d2rLtavpkr X-Received: by 2002:a17:902:8c90:b0:189:9fb2:255a with SMTP id t16-20020a1709028c9000b001899fb2255amr21318128plo.19.1671715114125; Thu, 22 Dec 2022 05:18:34 -0800 (PST) Received: from localhost.localdomain ([117.217.177.99]) by smtp.gmail.com with ESMTPSA id g12-20020a170902fe0c00b001896040022asm491570plj.190.2022.12.22.05.18.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 22 Dec 2022 05:18:33 -0800 (PST) From: Manivannan Sadhasivam To: andersson@kernel.org, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, bp@alien8.de, tony.luck@intel.com Cc: quic_saipraka@quicinc.com, konrad.dybcio@linaro.org, linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, james.morse@arm.com, mchehab@kernel.org, rric@kernel.org, linux-edac@vger.kernel.org, quic_ppareek@quicinc.com, luca.weiss@fairphone.com, ahalaney@redhat.com, steev@kali.org, Manivannan Sadhasivam Subject: [PATCH v4 09/16] arm64: dts: qcom: sm8350: Fix the base addresses of LLCC banks Date: Thu, 22 Dec 2022 18:46:49 +0530 Message-Id: <20221222131656.49584-10-manivannan.sadhasivam@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20221222131656.49584-1-manivannan.sadhasivam@linaro.org> References: <20221222131656.49584-1-manivannan.sadhasivam@linaro.org> 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?1752920489599130890?= X-GMAIL-MSGID: =?utf-8?q?1752920489599130890?= The LLCC block has several banks each with a different base address and holes in between. So it is not a correct approach to cover these banks with a single offset/size. Instead, the individual bank's base address needs to be specified in devicetree with the exact size. Reported-by: Parikshit Pareek Signed-off-by: Manivannan Sadhasivam --- arch/arm64/boot/dts/qcom/sm8350.dtsi | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/arch/arm64/boot/dts/qcom/sm8350.dtsi b/arch/arm64/boot/dts/qcom/sm8350.dtsi index 245dce24ec59..836732d16635 100644 --- a/arch/arm64/boot/dts/qcom/sm8350.dtsi +++ b/arch/arm64/boot/dts/qcom/sm8350.dtsi @@ -2513,8 +2513,11 @@ gem_noc: interconnect@9100000 { system-cache-controller@9200000 { compatible = "qcom,sm8350-llcc"; - reg = <0 0x09200000 0 0x1d0000>, <0 0x09600000 0 0x50000>; - reg-names = "llcc_base", "llcc_broadcast_base"; + reg = <0 0x09200000 0 0x58000>, <0 0x09280000 0 0x58000>, + <0 0x09300000 0 0x58000>, <0 0x09380000 0 0x58000>, + <0 0x09600000 0 0x58000>; + reg-names = "llcc0_base", "llcc1_base", "llcc2_base", + "llcc3_base", "llcc_broadcast_base"; }; usb_1: usb@a6f8800 { From patchwork Thu Dec 22 13:16:50 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Manivannan Sadhasivam X-Patchwork-Id: 35760 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:e747:0:0:0:0:0 with SMTP id c7csp320341wrn; Thu, 22 Dec 2022 05:21:03 -0800 (PST) X-Google-Smtp-Source: AMrXdXu4jWpx+FADX52KvApzGye9D2LXPQhG6D+hCW/lXcNv8efbe18mYtcVUMzLx+KguWG9umDx X-Received: by 2002:aa7:d04d:0:b0:46c:d905:b9e8 with SMTP id n13-20020aa7d04d000000b0046cd905b9e8mr4896450edo.23.1671715263073; Thu, 22 Dec 2022 05:21:03 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1671715263; cv=none; d=google.com; s=arc-20160816; b=NyH2Wwmi0fbkpd7EOKEEwT7qa010UjOBRjvfyqfmGVebHv38o4Av8M3jT84hP8MZc9 nECeNAzgppAStNOml/PsTKQuwClaDiwNxHHCoq4Vw9s7K6BrIxknBg2kyTLCbTJ9sByr maYGRjqMz9potItjHcw8H2jmNBgeUzrOMX5dLxrBSqk07c/dD/c8A03QanaeUSwkGAKp p0ie5SuV8708w3+JqBY/WXB5zD3YEOZmJTVyB9RMtpqV57Qk/rKSVOlxCLu65Cw/FER1 QEFo8JuuMVYvcisaSzem+Avt69XrL++WeTqAqXj0jj+QBicesIAIN8ledjS5BpAtmE+G 9ueg== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=u6zR8ugZMMSbsUYzZxGLGG2mvpL7z7iHt3BZjr/IYFc=; b=xNth2ntlP3TRrTgdIHZtgjItIx1h/JZGecdpC1wNzI3NRCG7JV/eDjDyMAZG/T//Vp pYY1tbwPju6S8RPLtVL4by+jpdF5LAh0fYDpyeTvXnKTGpxwcrCi1VrwKkxEiY9/SOG1 qrxI9kZqaodbkBzusPG686EuxPxp4gCTdclUlwvwfu0HKPkg2gb0OyXimSBL48kmUfYq 4lT5Tcn9qQA/luGubajzVaNVsraDBnE/Ev/nSoyAO+ppUsMEc+n2W4mM2H8TE8XvP9EF +oHZaah+xCfIjpWyTgkGrNq41dm8WQhmFYWNPZD+wCX2IvwgSail2H5UpCbCk9gnaZT0 J7Pw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=fHwgLHip; 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 d30-20020a50cd5e000000b004645d47d9e1si695181edj.345.2022.12.22.05.20.38; Thu, 22 Dec 2022 05:21:03 -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=fHwgLHip; 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 S229666AbiLVNTW (ORCPT + 99 others); Thu, 22 Dec 2022 08:19:22 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48444 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235442AbiLVNSn (ORCPT ); Thu, 22 Dec 2022 08:18:43 -0500 Received: from mail-pj1-x1035.google.com (mail-pj1-x1035.google.com [IPv6:2607:f8b0:4864:20::1035]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EB57A2B25B for ; Thu, 22 Dec 2022 05:18:41 -0800 (PST) Received: by mail-pj1-x1035.google.com with SMTP id t11-20020a17090a024b00b0021932afece4so5660672pje.5 for ; Thu, 22 Dec 2022 05:18:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=u6zR8ugZMMSbsUYzZxGLGG2mvpL7z7iHt3BZjr/IYFc=; b=fHwgLHipJ6VLjwey2U5iYiltJ/dLHCb4PBtuCTxZb/HtMgeam3PQsSSXurVr5NCoPr CnHT1sEm0hmoKvTrpHTb8UZM78a2rPe29dNvsfcRdX+9eugWKu0FJmO96O2AA1K/yxNz LdVLZRPcWdk3DS7UAj/PQRJbPHsdQvj8BUU9uA7gXujhKjixdRwaQV0PLOY+2c+fgndR cQSJQ16C5PuHmhhD0r5RESt7CL6pkThxaOQUlEe7IURqgl3IgFLwjSzW9EPIrrw24NjY oxzyZfqhQ+GrF3N2LChLB/N5dE4nAPsJ3BgmbHOPsqCMHXkryL1713vr0GEAK+QQdUPO 3hUQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=u6zR8ugZMMSbsUYzZxGLGG2mvpL7z7iHt3BZjr/IYFc=; b=f9wM5fLsQMgz0W3n30zz2Ki+M0W2v1Db95IYVC9r55VUr5rnCB/tdFAKDWxaTViB5p yAQlM58kPAKNoeNTHKHqF54tbkVg2+xlkYWyrqB99ZpXpuZTBafSOOieM3Rs87wJfqhn +o8KCgRHI6SIYgVVPUWAs87dg5WWXS8u3D8Jrgtrd9Dmpv8aqKshI3vZbmHEAIB6MLab e4Si0vYUHJdqmYbQJTKZ0NMgVMkztrOTVySy/PceKMI4qY+ytwQ4BOC/syRBMHG2v6dY +14aMEIqG++LDcX/LB4U/Gdz96v7c+A0hrmkYoMwx+aLWRrpVUKFSdrKUNxiyHdxLSIx kW3w== X-Gm-Message-State: AFqh2kp/UZcidD2abtqJY/baIUaXVVuHIncoNIEgZctOziXMsFXMvOvS 3InwSKuTCe4P9nWSQ4+jgKCm X-Received: by 2002:a17:902:8f86:b0:191:282:5d6c with SMTP id z6-20020a1709028f8600b0019102825d6cmr6452823plo.61.1671715121561; Thu, 22 Dec 2022 05:18:41 -0800 (PST) Received: from localhost.localdomain ([117.217.177.99]) by smtp.gmail.com with ESMTPSA id g12-20020a170902fe0c00b001896040022asm491570plj.190.2022.12.22.05.18.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 22 Dec 2022 05:18:40 -0800 (PST) From: Manivannan Sadhasivam To: andersson@kernel.org, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, bp@alien8.de, tony.luck@intel.com Cc: quic_saipraka@quicinc.com, konrad.dybcio@linaro.org, linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, james.morse@arm.com, mchehab@kernel.org, rric@kernel.org, linux-edac@vger.kernel.org, quic_ppareek@quicinc.com, luca.weiss@fairphone.com, ahalaney@redhat.com, steev@kali.org, Manivannan Sadhasivam Subject: [PATCH v4 10/16] arm64: dts: qcom: sm8450: Fix the base addresses of LLCC banks Date: Thu, 22 Dec 2022 18:46:50 +0530 Message-Id: <20221222131656.49584-11-manivannan.sadhasivam@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20221222131656.49584-1-manivannan.sadhasivam@linaro.org> References: <20221222131656.49584-1-manivannan.sadhasivam@linaro.org> 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=ham 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?1752920503984650458?= X-GMAIL-MSGID: =?utf-8?q?1752920503984650458?= The LLCC block has several banks each with a different base address and holes in between. So it is not a correct approach to cover these banks with a single offset/size. Instead, the individual bank's base address needs to be specified in devicetree with the exact size. Reported-by: Parikshit Pareek Signed-off-by: Manivannan Sadhasivam --- arch/arm64/boot/dts/qcom/sm8450.dtsi | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/arch/arm64/boot/dts/qcom/sm8450.dtsi b/arch/arm64/boot/dts/qcom/sm8450.dtsi index 570475040d95..12549a2912c6 100644 --- a/arch/arm64/boot/dts/qcom/sm8450.dtsi +++ b/arch/arm64/boot/dts/qcom/sm8450.dtsi @@ -3640,8 +3640,11 @@ gem_noc: interconnect@19100000 { system-cache-controller@19200000 { compatible = "qcom,sm8450-llcc"; - reg = <0 0x19200000 0 0x580000>, <0 0x19a00000 0 0x80000>; - reg-names = "llcc_base", "llcc_broadcast_base"; + reg = <0 0x19200000 0 0x80000>, <0 0x19600000 0 0x80000>, + <0 0x19300000 0 0x80000>, <0 0x19700000 0 0x80000>, + <0 0x19a00000 0 0x80000>; + reg-names = "llcc0_base", "llcc1_base", "llcc2_base", + "llcc3_base", "llcc_broadcast_base"; interrupts = ; }; From patchwork Thu Dec 22 13:16:51 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Manivannan Sadhasivam X-Patchwork-Id: 35759 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:e747:0:0:0:0:0 with SMTP id c7csp320342wrn; Thu, 22 Dec 2022 05:21:03 -0800 (PST) X-Google-Smtp-Source: AMrXdXvJMbGTdnwR5zp18oQiQ1t9Ay7lshoZLmqTzlC5OiUL2W7A9y2TmD5rW+qfRKA79WSsNu3G X-Received: by 2002:a17:907:77da:b0:803:3f50:a7ae with SMTP id kz26-20020a17090777da00b008033f50a7aemr4157264ejc.57.1671715263074; Thu, 22 Dec 2022 05:21:03 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1671715263; cv=none; d=google.com; s=arc-20160816; b=LVZpCkKZb9iwJQYx08nV29TSZTAj/C+uIkDHLnrDriDCesPn8HOPu+x7uqtcXe23bF nXRXd5AtUrNtX4f09Jb6CI03lX5GTi0Sw7OvrQAXN1gpx+cpRXocsKgBk4nfV1Qhu2A8 dpbWLM9YlBG80TcmA26//TUbMz1Ck18t+1BaUnmh4LtQQrOWQCRZRj4FDOXalDWL32GZ HgkIEcOlGJtfDSA1stMb/Le9JDcvgP3XBwbFkQd+PTLE16htKVgw4uiiHw3vj/lG6ftV uXhnCKlJu42c/rJJi27ppxv1/+oDS2aPa+Z+Dt5q/dq7Q8zkx6gUSR8YAvkCEcplRkyB qrJQ== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=znASgBClq0rwhBOl4/Fw1c5T/s1foKbyxf4XPqRiKDI=; b=KqPE3Wq0E3QLVhSV+QcOrIwnnvzXgVxUCl9G+CDSgLU4fmPZ2o5CPdi9WNigo7uvHK hN+yRRz/x1xw7MhfnuIhWMs8ltDM+SY0/VlHbEgpqobkMN3K6t9CL8z4aH6UVKEw1gQN YbMjJZcNgdE+J4UQYsD2/QkxN4C6s+Oha5GL6IFmCa2WESDfE+wIVk6DkgxUMC3IsUgE RjVqMofhlKB09q7oreRA++lkHe+ywgftmQ/W/fD0G5R7fqTeHh+uTJpzq38zsGwFtLgm RejJjfYVCf3oKnIImwujBtBO5LUTvRgLV2zIvanFw8s3mRN4ggj9wgFvrd6pTQemoWvL gOrg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=VXe+Xf10; 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 nc7-20020a1709071c0700b00835203f1170si503549ejc.575.2022.12.22.05.20.39; Thu, 22 Dec 2022 05:21:03 -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=VXe+Xf10; 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 S235541AbiLVNTZ (ORCPT + 99 others); Thu, 22 Dec 2022 08:19:25 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48728 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235531AbiLVNSx (ORCPT ); Thu, 22 Dec 2022 08:18:53 -0500 Received: from mail-pl1-x629.google.com (mail-pl1-x629.google.com [IPv6:2607:f8b0:4864:20::629]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6E45D2B262 for ; Thu, 22 Dec 2022 05:18:49 -0800 (PST) Received: by mail-pl1-x629.google.com with SMTP id w20so1962511ply.12 for ; Thu, 22 Dec 2022 05:18:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=znASgBClq0rwhBOl4/Fw1c5T/s1foKbyxf4XPqRiKDI=; b=VXe+Xf10elUr+UnSO49j92OhvgPpDswCeSmg+CP9iS6mREZbL8qbFc661pe6BPRjfQ S3oNVU7zYqI9S1bS7I58nmbbA8es6jmQ8pwyAbsbtAM9JJNu3C53jeDKRxU7zvt1xzSS ZFR7zig5z3K+G8wse0/DQhpC6YKUPAVB4WSwfAxXcprqqx7YKa4ShdLkmbLNPILPPFYj pS0zS4x976uQd/9EIjjzzwX5G9bm8b7a91lqP78l2dYEd86dCFaIDGRFs+0TZ00WTUC3 RgkVd4NehMkFcgHCza83ksV8+nHNj/ZIlImHcPegVB9YmotZURTeMSUfuO0CHz9Ezn0L Dz/g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=znASgBClq0rwhBOl4/Fw1c5T/s1foKbyxf4XPqRiKDI=; b=i3G+jqZbTpE+f7I9nqBqIVHE/2glHvqNZbS14r5x6FanU4ZTwQoxH2YCf/q3mCOQS5 sxnqumGLuaZ59mGDGiL01exJ0Im3SdeuG+Snb7LdscWiOOfJ/NK+qhSnHKsZ5fdzIQj8 PzartqLAxymo+st/H2/4KkWCneqtU85JhG66ea1U8BYFm4O998tVEVdmRXoKlasrFAtQ lzPuZ/1Scf2qgk4qsTdUOy0Nmeqk0Ei4O20euwELWwembi51pvTGP92BeNqYNwleVZuP 1U7Yg5kM+E5Vq+8UE2X1lFlGiF+t4tsDLo+jBRJFEQ/qRefjobb2p2TlSmCMO3OBaLsk kK/g== X-Gm-Message-State: AFqh2koMyn5DaZieg8OR4Mz6k71UWmbnBpQUjWpW/So/7sEpWo6II2N/ Gw8sUy51SaTh4jv6K7sQVwBl X-Received: by 2002:a17:902:c382:b0:189:e3d0:2682 with SMTP id g2-20020a170902c38200b00189e3d02682mr6521113plg.30.1671715129086; Thu, 22 Dec 2022 05:18:49 -0800 (PST) Received: from localhost.localdomain ([117.217.177.99]) by smtp.gmail.com with ESMTPSA id g12-20020a170902fe0c00b001896040022asm491570plj.190.2022.12.22.05.18.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 22 Dec 2022 05:18:48 -0800 (PST) From: Manivannan Sadhasivam To: andersson@kernel.org, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, bp@alien8.de, tony.luck@intel.com Cc: quic_saipraka@quicinc.com, konrad.dybcio@linaro.org, linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, james.morse@arm.com, mchehab@kernel.org, rric@kernel.org, linux-edac@vger.kernel.org, quic_ppareek@quicinc.com, luca.weiss@fairphone.com, ahalaney@redhat.com, steev@kali.org, Manivannan Sadhasivam Subject: [PATCH v4 11/16] arm64: dts: qcom: sm6350: Fix the base addresses of LLCC banks Date: Thu, 22 Dec 2022 18:46:51 +0530 Message-Id: <20221222131656.49584-12-manivannan.sadhasivam@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20221222131656.49584-1-manivannan.sadhasivam@linaro.org> References: <20221222131656.49584-1-manivannan.sadhasivam@linaro.org> 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=ham 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?1752920503743733232?= X-GMAIL-MSGID: =?utf-8?q?1752920503743733232?= The LLCC block has several banks each with a different base address and holes in between. So it is not a correct approach to cover these banks with a single offset/size. Instead, the individual bank's base address needs to be specified in devicetree with the exact size. On SM6350, there is only one LLCC bank available. So let's just pass that as "llcc0_base". Reported-by: Parikshit Pareek Tested-by: Luca Weiss Signed-off-by: Manivannan Sadhasivam --- arch/arm64/boot/dts/qcom/sm6350.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm64/boot/dts/qcom/sm6350.dtsi b/arch/arm64/boot/dts/qcom/sm6350.dtsi index 43324bf291c3..c7701f5e4af6 100644 --- a/arch/arm64/boot/dts/qcom/sm6350.dtsi +++ b/arch/arm64/boot/dts/qcom/sm6350.dtsi @@ -1174,7 +1174,7 @@ dc_noc: interconnect@9160000 { system-cache-controller@9200000 { compatible = "qcom,sm6350-llcc"; reg = <0 0x09200000 0 0x50000>, <0 0x09600000 0 0x50000>; - reg-names = "llcc_base", "llcc_broadcast_base"; + reg-names = "llcc0_base", "llcc_broadcast_base"; }; gem_noc: interconnect@9680000 { From patchwork Thu Dec 22 13:16:52 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Manivannan Sadhasivam X-Patchwork-Id: 35761 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:e747:0:0:0:0:0 with SMTP id c7csp320495wrn; Thu, 22 Dec 2022 05:21:23 -0800 (PST) X-Google-Smtp-Source: AMrXdXt3cw6FA/P+Iw+p1Ilf00rKQu1bXWAHbXMAywzDUoydApG55dCyZOLwwzRtznM9Tsgq1c1f X-Received: by 2002:a05:6a20:5490:b0:9d:efbf:48be with SMTP id i16-20020a056a20549000b0009defbf48bemr8843110pzk.2.1671715283403; Thu, 22 Dec 2022 05:21:23 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1671715283; cv=none; d=google.com; s=arc-20160816; b=jq4Uwhr9pAEgUGRtUlScWWVIhe5IOUHOFTOsGBbvFKX0/K4TjqGqeu4eMQFYLeMa4t CMw6tlwpkIP5VNeBmY+Koa7gQOrQSsijr/Z2mpmeVILLV84rs2cIj9iw1j2CA0/Tdex8 L+DBB/Y9ZeNkY3oocI7/ljUeneeB5vXOixFih8CQao8m2eb2c0fYcH/VqALm02rhvuHn AI0WCjBpwTCQPq69GnTOIrNe5fyxd7DS99C7D6hfHGiYfnjJdCvJCSOGk3pEexdLgfA8 BmJWo+/va9Ad93qQvw3ouaE0iVz57VHmAWltcF11SrOA/niXfCN9bsfSw/7aWtSKDOf2 DegA== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=d0mC3YHxzlEQlwMPao/Y7ASve0hKwhscYa/RkKUoFYA=; b=uD+MHJZYOEK1v/85c53uV5IXo89ivVMxkNEm8dqpjGzZSPwQA20m8+npGYQgj55RGd /iAY39zxOIRV5MrPGWvFU3NgM9x/+h5apHQLUyISA1C2kALXZ3DXuTr9hxOrAP6mJdEn F2VnSXY5QzvTTW6aei8cz4Oi2t/fIvHYv1BExgY9j2dZQSFwrRIn30leEZfK5ZXpqHtr CCgPsvZTDNNeIlOE012NRiF80fwF19iZ7Bl23o+Oyl49fXXbSu/LSidhrBwPd7BRECqX BTB6FQnfQwo202SaC3MpZlD/TDAq5GxQte4DpMHAq6rYO+XhnZfBdWDq6/3/zLwWcn92 CB0Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=idwOGGO1; 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 g24-20020a056a00079800b0057ab3bcb90asi611554pfu.152.2022.12.22.05.21.10; Thu, 22 Dec 2022 05:21:23 -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=idwOGGO1; 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 S235580AbiLVNTh (ORCPT + 99 others); Thu, 22 Dec 2022 08:19:37 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48608 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235576AbiLVNS6 (ORCPT ); Thu, 22 Dec 2022 08:18:58 -0500 Received: from mail-pl1-x629.google.com (mail-pl1-x629.google.com [IPv6:2607:f8b0:4864:20::629]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 519D82B24E for ; Thu, 22 Dec 2022 05:18:57 -0800 (PST) Received: by mail-pl1-x629.google.com with SMTP id t2so2009835ply.2 for ; Thu, 22 Dec 2022 05:18:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=d0mC3YHxzlEQlwMPao/Y7ASve0hKwhscYa/RkKUoFYA=; b=idwOGGO1DQQ/Drnnb+7kYYOP6u1VjrOPSkhZO0g4Ex4/Q2zJDFJWn+qCdkaQqyNcqD f+N8QoRylsLnXhjcH1klfJYfhRRRLMYjvMmoBSa9PNyonHdW2xmzt1tqT2KhqSaN0Wr0 Gurk2DAUiSrQp+k9WLGF/YVE5HrElbK5O35g227ccc7MYsmUHvPRqnuYBC2XFol912ME s/27D7otADi29Q1kJvPmNyihgYFl6ZiuRIMTUYzWJhkwWQjZ6hUvW+ASNdfqLTL45Bxk RUmSvuwgkgvG7qJupZ0Ks/dHzD4zkASjM21WP8rud+nuZdLcBujsr0lwP0PVC1b8nvvn PSJQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=d0mC3YHxzlEQlwMPao/Y7ASve0hKwhscYa/RkKUoFYA=; b=DvcdtZ3f4B7gO6l+tic+S9KRBFleTV+k5+jX3PWh/suMSsiCdjJ56kJugPxBTPebZ6 nHiRHvQq9mHMnM4ZczuHyGOQ6OjNIgKdFGEhj6qCiVLaJYnBFq5CJJxUh6wLHWfvsRWo p8V5HEkT+Tq9AiDObWly+9hYh+mf7ZR9rRNZLvYtua9pG2vpRNxBlB8m3G/gW+ZUviZX b7EFBLYe7U4yE/NRkitc9hRBdM1ze1kvzBZ6GcmgdsoLp7YI4iV5j/vjNXUEajU5v6yz P4CPFzQ1GRS67ZN/PyT0+R08dNhfGlRVIShy+pDWVhJjcgmIowXP9uAkYurcynAT0J0n n8Aw== X-Gm-Message-State: AFqh2koe0MZ0txWIsRgla+i9PUhOkgZGaZ6c5eO7jz+TzmN45QahuDfs hwhc331oqEdIBGsFfpyE3GkP X-Received: by 2002:a05:6a20:b813:b0:af:b16b:eeb5 with SMTP id fi19-20020a056a20b81300b000afb16beeb5mr6682563pzb.25.1671715136603; Thu, 22 Dec 2022 05:18:56 -0800 (PST) Received: from localhost.localdomain ([117.217.177.99]) by smtp.gmail.com with ESMTPSA id g12-20020a170902fe0c00b001896040022asm491570plj.190.2022.12.22.05.18.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 22 Dec 2022 05:18:55 -0800 (PST) From: Manivannan Sadhasivam To: andersson@kernel.org, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, bp@alien8.de, tony.luck@intel.com Cc: quic_saipraka@quicinc.com, konrad.dybcio@linaro.org, linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, james.morse@arm.com, mchehab@kernel.org, rric@kernel.org, linux-edac@vger.kernel.org, quic_ppareek@quicinc.com, luca.weiss@fairphone.com, ahalaney@redhat.com, steev@kali.org, Manivannan Sadhasivam , stable@vger.kernel.org Subject: [PATCH v4 12/16] EDAC/device: Make use of poll_msec value in edac_device_ctl_info struct Date: Thu, 22 Dec 2022 18:46:52 +0530 Message-Id: <20221222131656.49584-13-manivannan.sadhasivam@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20221222131656.49584-1-manivannan.sadhasivam@linaro.org> References: <20221222131656.49584-1-manivannan.sadhasivam@linaro.org> 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?1752920525006662550?= X-GMAIL-MSGID: =?utf-8?q?1752920525006662550?= The EDAC drivers may optionally pass the poll_msec value. Use that value if available, else fall back to 1000ms. Cc: # 4.9 Fixes: e27e3dac6517 ("drivers/edac: add edac_device class") Reported-by: Luca Weiss Signed-off-by: Manivannan Sadhasivam --- drivers/edac/edac_device.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/edac/edac_device.c b/drivers/edac/edac_device.c index 19522c568aa5..19c3ab2a434e 100644 --- a/drivers/edac/edac_device.c +++ b/drivers/edac/edac_device.c @@ -447,7 +447,7 @@ int edac_device_add_device(struct edac_device_ctl_info *edac_dev) * enable workq processing on this instance, * default = 1000 msec */ - edac_device_workq_setup(edac_dev, 1000); + edac_device_workq_setup(edac_dev, edac_dev->poll_msec ? edac_dev->poll_msec : 1000); } else { edac_dev->op_state = OP_RUNNING_INTERRUPT; } From patchwork Thu Dec 22 13:16:53 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Manivannan Sadhasivam X-Patchwork-Id: 35768 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:e747:0:0:0:0:0 with SMTP id c7csp321112wrn; Thu, 22 Dec 2022 05:22:47 -0800 (PST) X-Google-Smtp-Source: AMrXdXuFYBfsp9lSGbRC/W7mGaKRYJtekbp8wry55ZtdlS/fIdpkx+xFCgkAueuN2vVj/I5kLs39 X-Received: by 2002:a05:6a21:3288:b0:9d:efbe:e608 with SMTP id yt8-20020a056a21328800b0009defbee608mr9512714pzb.36.1671715367532; Thu, 22 Dec 2022 05:22:47 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1671715367; cv=none; d=google.com; s=arc-20160816; b=gGb6I6gBYvInh9Y/qCeffpxVRBsLRR9gQkG0NdOsYTDCwuw2jmlP455kUhpqRMQvX2 L1nBpPq+RyEfCQpOLtvCmIyn9qcuaacDNtq7uT8QPwKIvWd5LJYgeHMWaIrgUazJGAlX 0fyZEkde5KBHLCFIFZItHD9RW0r5mb+U54+CWQEg5a9gD/IY7Hb4k8+wOziatWAaE+KX qFlUmieD/PzWLbTsUIMhfNx88bxmquMwrfrgFCOrs2xKQ0ZySJiEhEYK+csv0bQkkC2d RiXxZZ5ubOllX7wVyprsvK6mwFGBLLlPsMXMy1teI482YXa4y+PghJfipwWCtz4KH3Sd uiUA== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=/mWLM+xjtkcHtTlHLK0FQlJaaC6ncfnZviWhmaPi0lM=; b=ADACp5EbCa6t7UcAotW1UT6PE7zleg9gkLRgAO6D7iH9AM5TTVUsrJ2P/3FcZMx+O+ KUjD1abdaGgXo7SZfHSbjzk8HfuvccHABc2Zk8vEhNRXIRHKfdLPGAWzwAcJh7iqiRhm N0VXaLhmIeRO2qmgvitDS4t8/eAXy9rbJaOSGKtEhaP4bUqjaO830jz5F7WNuJdBrqy9 mnBslnbgYU+MAJIwGveObyrh8DhDjj8lFzWey3jKe0gktemuht9a6MIsJ5ljoLUaE6Kp jT2Fe9/z9zNvpsNy+rDdT42p6ui7AQDjOUS+8ShLJdZNW+BTRaqNeA+Mqpe4JtEafDb8 nslA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=TOarD5uK; 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 p3-20020a634f43000000b00478fbfd5205si773846pgl.302.2022.12.22.05.22.33; Thu, 22 Dec 2022 05:22:47 -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=TOarD5uK; 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 S235335AbiLVNTo (ORCPT + 99 others); Thu, 22 Dec 2022 08:19:44 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48924 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235516AbiLVNTF (ORCPT ); Thu, 22 Dec 2022 08:19:05 -0500 Received: from mail-pj1-x1035.google.com (mail-pj1-x1035.google.com [IPv6:2607:f8b0:4864:20::1035]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7E8192B259 for ; Thu, 22 Dec 2022 05:19:04 -0800 (PST) Received: by mail-pj1-x1035.google.com with SMTP id t11-20020a17090a024b00b0021932afece4so5661570pje.5 for ; Thu, 22 Dec 2022 05:19:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=/mWLM+xjtkcHtTlHLK0FQlJaaC6ncfnZviWhmaPi0lM=; b=TOarD5uKYzdGzBgkCMjwru8cWoEMQy/+vSrMtukdY8EyEsh+D35kd+S7H09cmg6j/Z DULe/DTL/oabOivkhr0/PVxddgKe+CvaCfRUv51KVMkEO6qSZ2RIQfMckDB40BJ6vV0B Ht/puy0DpzttOPl6aeL42ts38AjAOjpblgt8ubv8vSNOc7PTw3CcfEXIkesR1nzJpnny vsPVbWDC+0gKgkSu+UkM+PTw5QswbD718pxnahHcR/Na/mw2cTS6K+WYZyhQZPz87Klt 2iAXonIw9nblXUEpjN5t0nuHlMDysNnt/BtGaZxPOXXc1jhqjuw1LjF+5WdRMt5MpDJM P0PA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=/mWLM+xjtkcHtTlHLK0FQlJaaC6ncfnZviWhmaPi0lM=; b=nw9ifqtd4c2Sz46YS/OSyzFQ27mmNdmwxBIt+K1bcdlOPPoCm7H0kRb9mX3b76AF1T VHwsseuwp4Gm9sfPzKjepAyBzm9zqIwH7J0uEYo92Jf0kpmXe/WE7QJ7xhPsibkDfal2 51TxkV0s1iSzMk3s4SLmmJe2vldPic1sWjcIhbKd+DpsS+GDUQy2BpI5QYqxUHymsIah x+xvPQQ8aj4k6edV+oRE7RfL6mOIqFnmTeLBUKvN9qSX5yBVDVaVa1qcIknALgeOAK/y sUOeW6N/T9sCSZDPSl8ZaSOTac8DIqZEl4WVIZN+qcwbAi02If4wpCkGno8dkUL5DdB3 pKNw== X-Gm-Message-State: AFqh2kpaB0h+nE78u7/rzDTgHf5Ifd7UkCgDZTFoL9ad4cXs/Bt+4s4q KgWleWbfqw6br4xDDUrm7vhWP39sYd3VBMQ= X-Received: by 2002:a17:902:8bc6:b0:187:16c2:d52c with SMTP id r6-20020a1709028bc600b0018716c2d52cmr6442361plo.50.1671715144171; Thu, 22 Dec 2022 05:19:04 -0800 (PST) Received: from localhost.localdomain ([117.217.177.99]) by smtp.gmail.com with ESMTPSA id g12-20020a170902fe0c00b001896040022asm491570plj.190.2022.12.22.05.18.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 22 Dec 2022 05:19:03 -0800 (PST) From: Manivannan Sadhasivam To: andersson@kernel.org, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, bp@alien8.de, tony.luck@intel.com Cc: quic_saipraka@quicinc.com, konrad.dybcio@linaro.org, linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, james.morse@arm.com, mchehab@kernel.org, rric@kernel.org, linux-edac@vger.kernel.org, quic_ppareek@quicinc.com, luca.weiss@fairphone.com, ahalaney@redhat.com, steev@kali.org, Manivannan Sadhasivam Subject: [PATCH v4 13/16] EDAC/qcom: Add platform_device_id table for module autoloading Date: Thu, 22 Dec 2022 18:46:53 +0530 Message-Id: <20221222131656.49584-14-manivannan.sadhasivam@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20221222131656.49584-1-manivannan.sadhasivam@linaro.org> References: <20221222131656.49584-1-manivannan.sadhasivam@linaro.org> 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=ham 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?1752920613306515869?= X-GMAIL-MSGID: =?utf-8?q?1752920613306515869?= platform_device_id table needs to be added so that the driver can be autoloaded when the associated platform device gets registered. Reported-by: Andrew Halaney Signed-off-by: Manivannan Sadhasivam --- drivers/edac/qcom_edac.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/drivers/edac/qcom_edac.c b/drivers/edac/qcom_edac.c index 97a27e42dd61..9e77fa84e84f 100644 --- a/drivers/edac/qcom_edac.c +++ b/drivers/edac/qcom_edac.c @@ -397,12 +397,19 @@ static int qcom_llcc_edac_remove(struct platform_device *pdev) return 0; } +static const struct platform_device_id qcom_llcc_edac_id_table[] = { + { .name = "qcom_llcc_edac" }, + {} +}; +MODULE_DEVICE_TABLE(platform, qcom_llcc_edac_id_table); + static struct platform_driver qcom_llcc_edac_driver = { .probe = qcom_llcc_edac_probe, .remove = qcom_llcc_edac_remove, .driver = { .name = "qcom_llcc_edac", }, + .id_table = qcom_llcc_edac_id_table, }; module_platform_driver(qcom_llcc_edac_driver); From patchwork Thu Dec 22 13:16:54 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Manivannan Sadhasivam X-Patchwork-Id: 35763 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:e747:0:0:0:0:0 with SMTP id c7csp320587wrn; Thu, 22 Dec 2022 05:21:34 -0800 (PST) X-Google-Smtp-Source: AMrXdXvFxuedScpd0TYPwGDRb2yAcNMBHVvQfGNecfoFcY2HxOV9mSr2Dh3165AWyawHLvHhqAYM X-Received: by 2002:a17:906:6441:b0:7c1:994c:f168 with SMTP id l1-20020a170906644100b007c1994cf168mr8281851ejn.54.1671715294036; Thu, 22 Dec 2022 05:21:34 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1671715294; cv=none; d=google.com; s=arc-20160816; b=j7dNMJrvPXg17JDTAlFEX7sw4vW/RzT2BkxMM0t1ZR/fohlbAqh/SuVT8/A/dVf4iM SQBjcqAgTqm13n+cULga+vZIt19Tigg6pHOFPY9aBkrcjizt7Yi2wN9g6Z6Jztwcnf7C mkOFZuB0Rc7Nkc8e9yfHOQIcuLcsocpXeSlL/DHvzuOi5IMeCu8cZgQwyB/KPWQF9XAd bZVkItIe55F21tlB5k9gLuU1B+Ns3zqGQ9pgGxDXlMiqV7FCDVdVL0XTiLS8ORtzUmcH 5QfqJyfCl8zfo4xNV6Ydw7qnJGYwq8W+FQV6LmkiLPC0XbVLvFsVteKmJ/t9x97TfMIC CtJQ== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=dXKaXgl0o6EC/Ht61vc6HyWaaFSyppq0dnbu5Bb4EnE=; b=K4ulIBTkCi9vzgBRvCQyWN8/8w1/Q/PJwe1i26YkCQ44GEhiWfIpx0ukt7vAsxUaav LYrBhyP2QS+KGjuMIvJnIOMzJVf/Ip1KhVRwOSM+4WJYUBmTUYp4EXLlmXjavC0cmesy 9RyUBAvkiCOD/MtMhjfWeNJh7UNqotU7Ssn7hllBVHGSffA4mS0jZc8qLyorZG/sjG3O lFlydM8Z0WgCGVoLhOhfFRKJ8ekJOm6aZL8ufEBpH8ZaYHmrnuvqw4IEnu/jvRqFJYCk /6gPWFbL/fR83HqDANA0R2EeSmQd/opUA36hPyVEQ7755jXNA38MHgqN+2k3bGFf9qoM vjXQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=UeU8tN3R; 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 qw15-20020a1709066a0f00b007c177fe6023si493587ejc.256.2022.12.22.05.21.09; Thu, 22 Dec 2022 05:21:34 -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=UeU8tN3R; 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 S235249AbiLVNUQ (ORCPT + 99 others); Thu, 22 Dec 2022 08:20:16 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48948 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235591AbiLVNTj (ORCPT ); Thu, 22 Dec 2022 08:19:39 -0500 Received: from mail-pl1-x62c.google.com (mail-pl1-x62c.google.com [IPv6:2607:f8b0:4864:20::62c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 91D5D2CC9E for ; Thu, 22 Dec 2022 05:19:12 -0800 (PST) Received: by mail-pl1-x62c.google.com with SMTP id b2so1987085pld.7 for ; Thu, 22 Dec 2022 05:19:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=dXKaXgl0o6EC/Ht61vc6HyWaaFSyppq0dnbu5Bb4EnE=; b=UeU8tN3RMctOSr0GBqF9tdf+Fnsp2i8GcHeh4jxA3p9jGCptgfW/UgSuOFRO5dbpse 5uiMnmCmFtKVr3t/fedUbZBr+KJmM9QOYlpBd58Yitx82E7k+xw/ih7Rj+Mdald3jxsa embKcwzVJ06cj+EFQMp/f1/34nzj5ia0daMAt8ViqqC4oK1dPLjRHijOXR1+H1RAH2zm kkGeDE/k5ZgSNKgERTojiwWTS2AwMDvK+M/EQPBm6hT3pRUVkPTzExv8OrBcs2SR5Qzw utWvQI5Tz0as/tGeSavc6Pqmtiirh20BQBrMiy1zz5Ipzb+MveSUoqsAIbfxvrHZ+Iq7 YkFw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=dXKaXgl0o6EC/Ht61vc6HyWaaFSyppq0dnbu5Bb4EnE=; b=WIZxRc6EmjQcV51pGBRMOsNNEJTI/9jNYpplgvgfSAC7rs/pBUd5lwM7OHeO6fsekV zgyM2nGFkgSKM67xNobWXVrRivkyy4kM64YK9nyMV+u3xfQ9D2QjFDdoy/vpqf7EHRg4 89ZFrr5aJNyFp96pG1OPh7bGbBVfRshB6D5YUgb9b/6jVqkeoLIGy9j1bPXKvGmUY5Cm lB6nTIWF4jtO8eTUammAcFo5Nu8IvH9oR2fKrHpWmxr5NxabjUcCq/SRa6jDCzPW/kPu 0PYizX6E7o90+i4RgM7lWWmk34fqCrAiOq+bz6ZRb/xchirsaT/vuV8JGQKt08MWHrie GrRQ== X-Gm-Message-State: AFqh2kq2YGrIXSlgSzvWtY05pU0QMgEEtOPrlhF3x0921KRt9IFv8F1l fX9iknSUxA8QROR4nCwZMDzc X-Received: by 2002:a17:902:c40f:b0:189:d4c5:f155 with SMTP id k15-20020a170902c40f00b00189d4c5f155mr7723058plk.63.1671715151974; Thu, 22 Dec 2022 05:19:11 -0800 (PST) Received: from localhost.localdomain ([117.217.177.99]) by smtp.gmail.com with ESMTPSA id g12-20020a170902fe0c00b001896040022asm491570plj.190.2022.12.22.05.19.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 22 Dec 2022 05:19:11 -0800 (PST) From: Manivannan Sadhasivam To: andersson@kernel.org, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, bp@alien8.de, tony.luck@intel.com Cc: quic_saipraka@quicinc.com, konrad.dybcio@linaro.org, linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, james.morse@arm.com, mchehab@kernel.org, rric@kernel.org, linux-edac@vger.kernel.org, quic_ppareek@quicinc.com, luca.weiss@fairphone.com, ahalaney@redhat.com, steev@kali.org, Manivannan Sadhasivam , stable@vger.kernel.org Subject: [PATCH v4 14/16] EDAC/qcom: Do not pass llcc_driv_data as edac_device_ctl_info's pvt_info Date: Thu, 22 Dec 2022 18:46:54 +0530 Message-Id: <20221222131656.49584-15-manivannan.sadhasivam@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20221222131656.49584-1-manivannan.sadhasivam@linaro.org> References: <20221222131656.49584-1-manivannan.sadhasivam@linaro.org> 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?1752920536186847609?= X-GMAIL-MSGID: =?utf-8?q?1752920536186847609?= The memory for "llcc_driv_data" is allocated by the LLCC driver. But when it is passed as "pvt_info" to the EDAC core, it will get freed during the qcom_edac driver release. So when the qcom_edac driver gets probed again, it will try to use the freed data leading to the use-after-free bug. Fix this by not passing "llcc_driv_data" as pvt_info but rather reference it using the "platform_data" in the qcom_edac driver. Cc: # 4.20 Fixes: 27450653f1db ("drivers: edac: Add EDAC driver support for QCOM SoCs") Reported-by: Steev Klimaszewski Signed-off-by: Manivannan Sadhasivam --- drivers/edac/qcom_edac.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/edac/qcom_edac.c b/drivers/edac/qcom_edac.c index 9e77fa84e84f..3256254c3722 100644 --- a/drivers/edac/qcom_edac.c +++ b/drivers/edac/qcom_edac.c @@ -252,7 +252,7 @@ dump_syn_reg_values(struct llcc_drv_data *drv, u32 bank, int err_type) static int dump_syn_reg(struct edac_device_ctl_info *edev_ctl, int err_type, u32 bank) { - struct llcc_drv_data *drv = edev_ctl->pvt_info; + struct llcc_drv_data *drv = edev_ctl->dev->platform_data; int ret; ret = dump_syn_reg_values(drv, bank, err_type); @@ -289,7 +289,7 @@ static irqreturn_t llcc_ecc_irq_handler(int irq, void *edev_ctl) { struct edac_device_ctl_info *edac_dev_ctl = edev_ctl; - struct llcc_drv_data *drv = edac_dev_ctl->pvt_info; + struct llcc_drv_data *drv = edac_dev_ctl->dev->platform_data; irqreturn_t irq_rc = IRQ_NONE; u32 drp_error, trp_error, i; int ret; @@ -358,7 +358,6 @@ static int qcom_llcc_edac_probe(struct platform_device *pdev) edev_ctl->dev_name = dev_name(dev); edev_ctl->ctl_name = "llcc"; edev_ctl->panic_on_ue = LLCC_ERP_PANIC_ON_UE; - edev_ctl->pvt_info = llcc_driv_data; rc = edac_device_add_device(edev_ctl); if (rc) From patchwork Thu Dec 22 13:16:55 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Manivannan Sadhasivam X-Patchwork-Id: 35762 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:e747:0:0:0:0:0 with SMTP id c7csp320582wrn; Thu, 22 Dec 2022 05:21:33 -0800 (PST) X-Google-Smtp-Source: AMrXdXsAHRhjOXcR/k1WdLTtXlbqofMcuR6WUrwbHg7w0EoGpQAL8YBosUjigi2DLeD6793C4NBL X-Received: by 2002:aa7:ccc2:0:b0:477:8ab8:43e0 with SMTP id y2-20020aa7ccc2000000b004778ab843e0mr4724287edt.2.1671715293738; Thu, 22 Dec 2022 05:21:33 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1671715293; cv=none; d=google.com; s=arc-20160816; b=0t2O1Sdyl4vYilDWf2p3CA8mGBLQ8/XBl2O/1HwBGJ6gbaOIo3fjQVHNNxvuZdlnXZ mp1Cg87y0tvuk0X69mpGA1V83yTZQeZoi9HixU9ww0JUhNvgZqtpQ3H1ce1SNxa0pkLC +/o69IY/4aENl0plTyY1JUDYKIoaY4H/CoEh9FSzz5KquDxvGQbr3bkDtP1j9ZJnV8Xw rkqaz1EHMN/MIdS/Fr5RA+8XhXn6wY6bFhbsv/XWCVwcXVAWlNggglW0mVIRqRFgsEp1 W/aQGkc9jGJabx8Rv6AgkVvcS922xrqZWhzPR0zz8t1QkbF/nFmcDUqU4Vu8a64rZP/q 3vhA== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=Q/CCEXzm8VBt7wKt1RLg7h2Nc3d6gd/IYaWUSllPAi8=; b=uI2d4f3KwzKYGSi+qHNU3S3TIfLq0CJXus7/jA7spH7zLpJe5Qfz/xVYk8st9YijQ/ 8PnaDa0bui3zv5Xe/t5ovWYY0pcObKb9ITARcrvxICHpFupl6N5bhubjPgflrtKt7rBt jsndb6bmvkvEOA2rejJ4r58k0r0BxH5s6TrZkDIpxTBtB6smlw/17i5Z51RDrMUc8a7p C40eS9aYDq95PR81iOc8HxMPOP1xwEKDJiGiQeQjLVfDKOgV9s6i2QgjdF9mUIll8NeO irmXYtbEDKF70dc4y8GAg+OPRJSYT6hZIKhyOe4+FcOxN5yQTesXd5fG3Sz8gQ66Pt+e v0bQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Gd+QbFR2; 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 xh9-20020a170906da8900b007be4d8bf6d5si349407ejb.714.2022.12.22.05.21.10; Thu, 22 Dec 2022 05:21:33 -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=Gd+QbFR2; 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 S235494AbiLVNUk (ORCPT + 99 others); Thu, 22 Dec 2022 08:20:40 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48786 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235573AbiLVNUG (ORCPT ); Thu, 22 Dec 2022 08:20:06 -0500 Received: from mail-pj1-x1030.google.com (mail-pj1-x1030.google.com [IPv6:2607:f8b0:4864:20::1030]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6A4862EF9C for ; Thu, 22 Dec 2022 05:19:20 -0800 (PST) Received: by mail-pj1-x1030.google.com with SMTP id x3so1877372pjv.4 for ; Thu, 22 Dec 2022 05:19:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=Q/CCEXzm8VBt7wKt1RLg7h2Nc3d6gd/IYaWUSllPAi8=; b=Gd+QbFR2qP0meFZfYmKVATjBoSPfN9K06BY91iNpkMgg/uRNzBRuaDUbXDYVM0JF1g lwTCMHsyks415drvMz90yzlm7+eUwVnj/v4JHs2PXceRGvh5Th3I6YuaMqPuH8c+gU/6 QYqjFHXsRI/1U0ujMyVEQsKUzKk7zkr+vAQhdEqrQFtSDEFeot8vebR6pDk+kOLgNmpi uXJC9ZAGh0kt7a9b12P/aUgtfQmRYDu6LtfhFcHyahwa1mLXS1pcFkapD2Ct2s7Y4czS L91d4+WPvHTsRonOYBNrq3/wnUSVova1nyrHv1gPSObSD/qjlQG9lYCAJlyaMBjz3xAg uCgw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Q/CCEXzm8VBt7wKt1RLg7h2Nc3d6gd/IYaWUSllPAi8=; b=h3XutO4F15NtugmZG5vQMWdZngkgBRoCdG8kZEOY8++hGnLq8JKkftTvg58NyIrvzZ U+L+d+ZVn+2Tem0yHr8PzKoEi5YAsJ94CnriVDOkOdtI5e5Af/IIIdvLXX/AshhMjj8O 6V1w6Zind6xjIi1fGaX8G2i1tT1LUMGFq7W/UmrwwMHNOUYv3P0CwauxN7A4NkH9c6Lu YcuOmqn2/y8PGIfSldB1w5NNeA3S0AV899pZqhJ9e6hSpMSASwyzGwmLcK426hyGbAg6 hNbDyI86GYND/7/WOx7MRHg+BS/qPMMO1ZFWycCs8ZYdyOD2Y0Ekfc8jVdnTuKYqSc6r kDLQ== X-Gm-Message-State: AFqh2koq9onQBRz7PM08+r8hboTeAM9BT/vNQQ+e+rqaSjU6D5WydBSs uVERKY3Yumy0SmXdC/pRxzpi X-Received: by 2002:a05:6a21:e389:b0:ad:c694:3fc2 with SMTP id cc9-20020a056a21e38900b000adc6943fc2mr6715971pzc.18.1671715159563; Thu, 22 Dec 2022 05:19:19 -0800 (PST) Received: from localhost.localdomain ([117.217.177.99]) by smtp.gmail.com with ESMTPSA id g12-20020a170902fe0c00b001896040022asm491570plj.190.2022.12.22.05.19.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 22 Dec 2022 05:19:18 -0800 (PST) From: Manivannan Sadhasivam To: andersson@kernel.org, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, bp@alien8.de, tony.luck@intel.com Cc: quic_saipraka@quicinc.com, konrad.dybcio@linaro.org, linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, james.morse@arm.com, mchehab@kernel.org, rric@kernel.org, linux-edac@vger.kernel.org, quic_ppareek@quicinc.com, luca.weiss@fairphone.com, ahalaney@redhat.com, steev@kali.org, Manivannan Sadhasivam Subject: [PATCH v4 15/16] qcom: llcc/edac: Fix the base address used for accessing LLCC banks Date: Thu, 22 Dec 2022 18:46:55 +0530 Message-Id: <20221222131656.49584-16-manivannan.sadhasivam@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20221222131656.49584-1-manivannan.sadhasivam@linaro.org> References: <20221222131656.49584-1-manivannan.sadhasivam@linaro.org> 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=ham 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?1752920535938705706?= X-GMAIL-MSGID: =?utf-8?q?1752920535938705706?= The Qualcomm LLCC/EDAC drivers were using a fixed register stride for accessing the (Control and Status Registers) CSRs of each LLCC bank. This stride only works for some SoCs like SDM845 for which driver support was initially added. But the later SoCs use different register stride that vary between the banks with holes in-between. So it is not possible to use a single register stride for accessing the CSRs of each bank. By doing so could result in a crash. For fixing this issue, let's obtain the base address of each LLCC bank from devicetree and get rid of the fixed stride. This also means, we no longer need to rely on reg-names property and get the base addresses using index. First index is LLCC bank 0 and last index is LLCC broadcast. If the SoC supports more than one bank, then those needs to be defined in devicetree for index from 1..N-1. Reported-by: Parikshit Pareek Tested-by: Luca Weiss Signed-off-by: Manivannan Sadhasivam --- drivers/edac/qcom_edac.c | 14 +++--- drivers/soc/qcom/llcc-qcom.c | 72 +++++++++++++++++------------- include/linux/soc/qcom/llcc-qcom.h | 6 +-- 3 files changed, 48 insertions(+), 44 deletions(-) diff --git a/drivers/edac/qcom_edac.c b/drivers/edac/qcom_edac.c index 3256254c3722..1d3cc1930a74 100644 --- a/drivers/edac/qcom_edac.c +++ b/drivers/edac/qcom_edac.c @@ -213,7 +213,7 @@ dump_syn_reg_values(struct llcc_drv_data *drv, u32 bank, int err_type) for (i = 0; i < reg_data.reg_cnt; i++) { synd_reg = reg_data.synd_reg + (i * 4); - ret = regmap_read(drv->regmap, drv->offsets[bank] + synd_reg, + ret = regmap_read(drv->regmaps[bank], synd_reg, &synd_val); if (ret) goto clear; @@ -222,8 +222,7 @@ dump_syn_reg_values(struct llcc_drv_data *drv, u32 bank, int err_type) reg_data.name, i, synd_val); } - ret = regmap_read(drv->regmap, - drv->offsets[bank] + reg_data.count_status_reg, + ret = regmap_read(drv->regmaps[bank], reg_data.count_status_reg, &err_cnt); if (ret) goto clear; @@ -233,8 +232,7 @@ dump_syn_reg_values(struct llcc_drv_data *drv, u32 bank, int err_type) edac_printk(KERN_CRIT, EDAC_LLCC, "%s: Error count: 0x%4x\n", reg_data.name, err_cnt); - ret = regmap_read(drv->regmap, - drv->offsets[bank] + reg_data.ways_status_reg, + ret = regmap_read(drv->regmaps[bank], reg_data.ways_status_reg, &err_ways); if (ret) goto clear; @@ -296,8 +294,7 @@ llcc_ecc_irq_handler(int irq, void *edev_ctl) /* Iterate over the banks and look for Tag RAM or Data RAM errors */ for (i = 0; i < drv->num_banks; i++) { - ret = regmap_read(drv->regmap, - drv->offsets[i] + DRP_INTERRUPT_STATUS, + ret = regmap_read(drv->regmaps[i], DRP_INTERRUPT_STATUS, &drp_error); if (!ret && (drp_error & SB_ECC_ERROR)) { @@ -312,8 +309,7 @@ llcc_ecc_irq_handler(int irq, void *edev_ctl) if (!ret) irq_rc = IRQ_HANDLED; - ret = regmap_read(drv->regmap, - drv->offsets[i] + TRP_INTERRUPT_0_STATUS, + ret = regmap_read(drv->regmaps[i], TRP_INTERRUPT_0_STATUS, &trp_error); if (!ret && (trp_error & SB_ECC_ERROR)) { diff --git a/drivers/soc/qcom/llcc-qcom.c b/drivers/soc/qcom/llcc-qcom.c index 23ce2f78c4ed..72f3f2a9aaa0 100644 --- a/drivers/soc/qcom/llcc-qcom.c +++ b/drivers/soc/qcom/llcc-qcom.c @@ -62,8 +62,6 @@ #define LLCC_TRP_WRSC_CACHEABLE_EN 0x21f2c #define LLCC_TRP_ALGO_CFG8 0x21f30 -#define BANK_OFFSET_STRIDE 0x80000 - #define LLCC_VERSION_2_0_0_0 0x02000000 #define LLCC_VERSION_2_1_0_0 0x02010000 #define LLCC_VERSION_4_1_0_0 0x04010000 @@ -898,8 +896,8 @@ static int qcom_llcc_remove(struct platform_device *pdev) return 0; } -static struct regmap *qcom_llcc_init_mmio(struct platform_device *pdev, - const char *name) +static struct regmap *qcom_llcc_init_mmio(struct platform_device *pdev, u8 index, + const char *name) { void __iomem *base; struct regmap_config llcc_regmap_config = { @@ -909,7 +907,7 @@ static struct regmap *qcom_llcc_init_mmio(struct platform_device *pdev, .fast_io = true, }; - base = devm_platform_ioremap_resource_byname(pdev, name); + base = devm_platform_ioremap_resource(pdev, index); if (IS_ERR(base)) return ERR_CAST(base); @@ -927,6 +925,7 @@ static int qcom_llcc_probe(struct platform_device *pdev) const struct llcc_slice_config *llcc_cfg; u32 sz; u32 version; + struct regmap *regmap; drv_data = devm_kzalloc(dev, sizeof(*drv_data), GFP_KERNEL); if (!drv_data) { @@ -934,21 +933,51 @@ static int qcom_llcc_probe(struct platform_device *pdev) goto err; } - drv_data->regmap = qcom_llcc_init_mmio(pdev, "llcc_base"); - if (IS_ERR(drv_data->regmap)) { - ret = PTR_ERR(drv_data->regmap); + /* Initialize the first LLCC bank regmap */ + regmap = qcom_llcc_init_mmio(pdev, 0, "llcc0_base"); + if (IS_ERR(regmap)) { + ret = PTR_ERR(regmap); goto err; } - drv_data->bcast_regmap = - qcom_llcc_init_mmio(pdev, "llcc_broadcast_base"); + cfg = of_device_get_match_data(&pdev->dev); + + ret = regmap_read(regmap, cfg->reg_offset[LLCC_COMMON_STATUS0], &num_banks); + if (ret) + goto err; + + num_banks &= LLCC_LB_CNT_MASK; + num_banks >>= LLCC_LB_CNT_SHIFT; + drv_data->num_banks = num_banks; + + drv_data->regmaps = devm_kcalloc(dev, num_banks, sizeof(*drv_data->regmaps), GFP_KERNEL); + if (!drv_data->regmaps) { + ret = -ENOMEM; + goto err; + } + + drv_data->regmaps[0] = regmap; + + /* Initialize rest of LLCC bank regmaps */ + for (i = 1; i < num_banks; i++) { + char *base = kasprintf(GFP_KERNEL, "llcc%d_base", i); + + drv_data->regmaps[i] = qcom_llcc_init_mmio(pdev, i, base); + if (IS_ERR(drv_data->regmaps[i])) { + ret = PTR_ERR(drv_data->regmaps[i]); + kfree(base); + goto err; + } + + kfree(base); + } + + drv_data->bcast_regmap = qcom_llcc_init_mmio(pdev, i, "llcc_broadcast_base"); if (IS_ERR(drv_data->bcast_regmap)) { ret = PTR_ERR(drv_data->bcast_regmap); goto err; } - cfg = of_device_get_match_data(&pdev->dev); - /* Extract version of the IP */ ret = regmap_read(drv_data->bcast_regmap, cfg->reg_offset[LLCC_COMMON_HW_INFO], &version); @@ -957,15 +986,6 @@ static int qcom_llcc_probe(struct platform_device *pdev) drv_data->version = version; - ret = regmap_read(drv_data->regmap, cfg->reg_offset[LLCC_COMMON_STATUS0], - &num_banks); - if (ret) - goto err; - - num_banks &= LLCC_LB_CNT_MASK; - num_banks >>= LLCC_LB_CNT_SHIFT; - drv_data->num_banks = num_banks; - llcc_cfg = cfg->sct_data; sz = cfg->size; @@ -973,16 +993,6 @@ static int qcom_llcc_probe(struct platform_device *pdev) if (llcc_cfg[i].slice_id > drv_data->max_slices) drv_data->max_slices = llcc_cfg[i].slice_id; - drv_data->offsets = devm_kcalloc(dev, num_banks, sizeof(u32), - GFP_KERNEL); - if (!drv_data->offsets) { - ret = -ENOMEM; - goto err; - } - - for (i = 0; i < num_banks; i++) - drv_data->offsets[i] = i * BANK_OFFSET_STRIDE; - drv_data->bitmap = devm_bitmap_zalloc(dev, drv_data->max_slices, GFP_KERNEL); if (!drv_data->bitmap) { diff --git a/include/linux/soc/qcom/llcc-qcom.h b/include/linux/soc/qcom/llcc-qcom.h index ad1fd718169d..423220e66026 100644 --- a/include/linux/soc/qcom/llcc-qcom.h +++ b/include/linux/soc/qcom/llcc-qcom.h @@ -120,7 +120,7 @@ struct llcc_edac_reg_offset { /** * struct llcc_drv_data - Data associated with the llcc driver - * @regmap: regmap associated with the llcc device + * @regmaps: regmaps associated with the llcc device * @bcast_regmap: regmap associated with llcc broadcast offset * @cfg: pointer to the data structure for slice configuration * @edac_reg_offset: Offset of the LLCC EDAC registers @@ -129,12 +129,11 @@ struct llcc_edac_reg_offset { * @max_slices: max slices as read from device tree * @num_banks: Number of llcc banks * @bitmap: Bit map to track the active slice ids - * @offsets: Pointer to the bank offsets array * @ecc_irq: interrupt for llcc cache error detection and reporting * @version: Indicates the LLCC version */ struct llcc_drv_data { - struct regmap *regmap; + struct regmap **regmaps; struct regmap *bcast_regmap; const struct llcc_slice_config *cfg; const struct llcc_edac_reg_offset *edac_reg_offset; @@ -143,7 +142,6 @@ struct llcc_drv_data { u32 max_slices; u32 num_banks; unsigned long *bitmap; - u32 *offsets; int ecc_irq; u32 version; }; From patchwork Thu Dec 22 13:16:56 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Manivannan Sadhasivam X-Patchwork-Id: 35765 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:e747:0:0:0:0:0 with SMTP id c7csp320673wrn; Thu, 22 Dec 2022 05:21:46 -0800 (PST) X-Google-Smtp-Source: AMrXdXuLvUV9+XMDgV73dsUy3uUUg1Xm/5b9O112CP1T1WYbJ+a8WUM7r+KbzAZQUvu3ZyDFvIxX X-Received: by 2002:a17:906:33d7:b0:842:cd68:4956 with SMTP id w23-20020a17090633d700b00842cd684956mr2784911eja.52.1671715306479; Thu, 22 Dec 2022 05:21:46 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1671715306; cv=none; d=google.com; s=arc-20160816; b=uiCQ2k5NhqeggNRvQ8yMQ653OjIoZ04aghdW9McZO2XnFHShAwgOuzLm/GEwzCqAoz 93+BdZ6ZZfQqJHMbZu5yP3vY0rDkjw8Acqtj61ElQXRtZl0b/C6TQeXZbdnMk4k/pqHA MjRnU11LnqbCsILfg/ZrSbBkj1tdrDk81pE73EoX3uIUDxFY6BieQYRV1gnfN8c7kwdG ZD3EHns9zvgqWRm0dlgk5tw1gsPsYR569KfRVjoyxgfOSRcHs9U4m+5QZBEvbSn/l+hl XxAD1Sn0dKvXs89aUl/tXEgk8zoirTSzIIOSmlSbKlVmzNs9ul6ZX/gn5MVeTu9HjJj8 WQVg== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=jbPgua9Rs+Y/jmkHHRB8iBOCSrUJRilLgsafIRoyD0w=; b=IIoxD/KsOyp++ptUyJaWdwfzGMPzE9jgpNY4twSUxFnUpIQtbjFCqLGr/nmQ9EzOoK jVkEnT9Rx2r/PUgq7MwVkIQ//1mODhJFmCjq2ynPT5V4jtapK5UlrrO8F6XQhkaPQ1jc 0VnMPALgIHAwUyq2d/6C5ch86nUXguS7VMm2QL+ux26X3WNK2jYXdXvgTqGJiZi9a04b +DcGa5T8JeRuRgQ96lCk5IjdCpzh/dW/b3yj905PRSR2On9A3Rg48KKhqcD/hKVtDo8i eMADnDag4WY394OSNfFuKBQY/n4dpTwXKb1YPj2F/bMPE5JBImpHg61B2KptOaCfF3nq TfOQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=V+1xpDzJ; 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 cw15-20020a170906478f00b0081160837b7csi474498ejc.286.2022.12.22.05.21.23; Thu, 22 Dec 2022 05:21:46 -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=V+1xpDzJ; 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 S235677AbiLVNUx (ORCPT + 99 others); Thu, 22 Dec 2022 08:20:53 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49024 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235696AbiLVNUO (ORCPT ); Thu, 22 Dec 2022 08:20:14 -0500 Received: from mail-pl1-x62c.google.com (mail-pl1-x62c.google.com [IPv6:2607:f8b0:4864:20::62c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6469E303CF for ; Thu, 22 Dec 2022 05:19:27 -0800 (PST) Received: by mail-pl1-x62c.google.com with SMTP id b2so1987633pld.7 for ; Thu, 22 Dec 2022 05:19:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=jbPgua9Rs+Y/jmkHHRB8iBOCSrUJRilLgsafIRoyD0w=; b=V+1xpDzJK5x7FCBJez4sQfR8rdWJj1vQ9lRrOrEKRqJZc57KyH4DVPtWM85LfqFP2W T5LE7COXtjTKK1fWVeDgH2TEhbHqGe6UG9r/MJgZP+bgAqE6YuK4sbL36dPuJfntCOAZ i4xobhCatBteqqm6eQ5YRinJeudnjFU/iLlwQ0eanU9ry6B6dFrD5zOIl/wqEtMUxNI9 xcpg92Z4yg7pv0YqwW8m1GwFHm8lS4WTzZ7wSK+gDrs/UNRdTgLI5x1GjVxarIErOqlc XFad4RLzK1I+8m9Zy/r8iTrm2O1HghUt1zsBtM/ILAhCNFcQIJJv93Hzr9tH082GHz8+ xW3A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=jbPgua9Rs+Y/jmkHHRB8iBOCSrUJRilLgsafIRoyD0w=; b=5Ods/wqhXG2gfppncdhnslcZrjlAww14T33H72G6ExrmNaIkDmyPWKmgJim7S84xRM 7oI/A6JiL4h3/dnMnyFmvwUZjoYSPQLO1ioC1+NavVKoxv+C8lfwI3R2eOeNi6ey/Rkn fxMGBQBjCMDhFxGXoSBPgtOTQX0NdIF1AryLAqviyE9mwIVE+rX6XRaj8EMuVaYPSOYW xkzU3ZHYxZaZ2FFj9zsfA5HJbODPUALlSC+zZGBSyoeuajOzqvX/EkSKqiPX9L2S5IA2 a4eayzX+808HigZA8gwn8k0itFqm2X+97dU1vFGwLhv0Cpyv6/YHgRVUF1nAgOruw+dl Nvxw== X-Gm-Message-State: AFqh2kqgFpZ4s1QJzhe2c5cji50ax5pnvK3DcgadGVuOdsSfpHWLohiX PwNWZ2MZdi+CA4vtj6bKJ8s/ X-Received: by 2002:a17:902:e742:b0:189:83bb:646f with SMTP id p2-20020a170902e74200b0018983bb646fmr8000265plf.17.1671715167031; Thu, 22 Dec 2022 05:19:27 -0800 (PST) Received: from localhost.localdomain ([117.217.177.99]) by smtp.gmail.com with ESMTPSA id g12-20020a170902fe0c00b001896040022asm491570plj.190.2022.12.22.05.19.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 22 Dec 2022 05:19:26 -0800 (PST) From: Manivannan Sadhasivam To: andersson@kernel.org, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, bp@alien8.de, tony.luck@intel.com Cc: quic_saipraka@quicinc.com, konrad.dybcio@linaro.org, linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, james.morse@arm.com, mchehab@kernel.org, rric@kernel.org, linux-edac@vger.kernel.org, quic_ppareek@quicinc.com, luca.weiss@fairphone.com, ahalaney@redhat.com, steev@kali.org, Manivannan Sadhasivam Subject: [PATCH v4 16/16] qcom: llcc/edac: Support polling mode for ECC handling Date: Thu, 22 Dec 2022 18:46:56 +0530 Message-Id: <20221222131656.49584-17-manivannan.sadhasivam@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20221222131656.49584-1-manivannan.sadhasivam@linaro.org> References: <20221222131656.49584-1-manivannan.sadhasivam@linaro.org> 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=ham 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?1752920548840575043?= X-GMAIL-MSGID: =?utf-8?q?1752920548840575043?= Not all Qcom platforms support IRQ mode for ECC handling. For those platforms, the current EDAC driver will not be probed due to missing ECC IRQ in devicetree. So add support for polling mode so that the EDAC driver can be used on all Qcom platforms supporting LLCC. The polling delay of 5000ms is chosen based on Qcom downstream/vendor driver. Reported-by: Luca Weiss Tested-by: Luca Weiss Signed-off-by: Manivannan Sadhasivam --- drivers/edac/qcom_edac.c | 37 +++++++++++++++++++++++++----------- drivers/soc/qcom/llcc-qcom.c | 13 ++++++------- 2 files changed, 32 insertions(+), 18 deletions(-) diff --git a/drivers/edac/qcom_edac.c b/drivers/edac/qcom_edac.c index 1d3cc1930a74..cfcdc35b0373 100644 --- a/drivers/edac/qcom_edac.c +++ b/drivers/edac/qcom_edac.c @@ -76,6 +76,8 @@ #define DRP0_INTERRUPT_ENABLE BIT(6) #define SB_DB_DRP_INTERRUPT_ENABLE 0x3 +#define ECC_POLL_MSEC 5000 + enum { LLCC_DRAM_CE = 0, LLCC_DRAM_UE, @@ -283,8 +285,7 @@ dump_syn_reg(struct edac_device_ctl_info *edev_ctl, int err_type, u32 bank) return ret; } -static irqreturn_t -llcc_ecc_irq_handler(int irq, void *edev_ctl) +static irqreturn_t llcc_ecc_irq_handler(int irq, void *edev_ctl) { struct edac_device_ctl_info *edac_dev_ctl = edev_ctl; struct llcc_drv_data *drv = edac_dev_ctl->dev->platform_data; @@ -328,6 +329,11 @@ llcc_ecc_irq_handler(int irq, void *edev_ctl) return irq_rc; } +static void llcc_ecc_check(struct edac_device_ctl_info *edev_ctl) +{ + llcc_ecc_irq_handler(0, edev_ctl); +} + static int qcom_llcc_edac_probe(struct platform_device *pdev) { struct llcc_drv_data *llcc_driv_data = pdev->dev.platform_data; @@ -355,22 +361,31 @@ static int qcom_llcc_edac_probe(struct platform_device *pdev) edev_ctl->ctl_name = "llcc"; edev_ctl->panic_on_ue = LLCC_ERP_PANIC_ON_UE; + /* Check if LLCC driver has passed ECC IRQ */ + ecc_irq = llcc_driv_data->ecc_irq; + if (ecc_irq > 0) { + /* Use interrupt mode if IRQ is available */ + edac_op_state = EDAC_OPSTATE_INT; + } else { + /* Fall back to polling mode otherwise */ + edac_op_state = EDAC_OPSTATE_POLL; + edev_ctl->poll_msec = ECC_POLL_MSEC; + edev_ctl->edac_check = llcc_ecc_check; + } + rc = edac_device_add_device(edev_ctl); if (rc) goto out_mem; platform_set_drvdata(pdev, edev_ctl); - /* Request for ecc irq */ - ecc_irq = llcc_driv_data->ecc_irq; - if (ecc_irq < 0) { - rc = -ENODEV; - goto out_dev; - } - rc = devm_request_irq(dev, ecc_irq, llcc_ecc_irq_handler, + /* Request ECC IRQ if available */ + if (ecc_irq > 0) { + rc = devm_request_irq(dev, ecc_irq, llcc_ecc_irq_handler, IRQF_TRIGGER_HIGH, "llcc_ecc", edev_ctl); - if (rc) - goto out_dev; + if (rc) + goto out_dev; + } return rc; diff --git a/drivers/soc/qcom/llcc-qcom.c b/drivers/soc/qcom/llcc-qcom.c index 72f3f2a9aaa0..7b7c5a38bac6 100644 --- a/drivers/soc/qcom/llcc-qcom.c +++ b/drivers/soc/qcom/llcc-qcom.c @@ -1011,13 +1011,12 @@ static int qcom_llcc_probe(struct platform_device *pdev) goto err; drv_data->ecc_irq = platform_get_irq_optional(pdev, 0); - if (drv_data->ecc_irq >= 0) { - llcc_edac = platform_device_register_data(&pdev->dev, - "qcom_llcc_edac", -1, drv_data, - sizeof(*drv_data)); - if (IS_ERR(llcc_edac)) - dev_err(dev, "Failed to register llcc edac driver\n"); - } + + llcc_edac = platform_device_register_data(&pdev->dev, + "qcom_llcc_edac", -1, drv_data, + sizeof(*drv_data)); + if (IS_ERR(llcc_edac)) + dev_err(dev, "Failed to register llcc edac driver\n"); return 0; err: