From patchwork Tue Mar 14 08:04:30 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Manivannan Sadhasivam X-Patchwork-Id: 69354 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5915:0:0:0:0:0 with SMTP id v21csp1624875wrd; Tue, 14 Mar 2023 01:06:56 -0700 (PDT) X-Google-Smtp-Source: AK7set9+FcEkSBt1DYmxXkruaSEIPJ3xZrYhU0Np4RfhFgKeq9OeWUrN/8i90bUW8m+632AX/mYt X-Received: by 2002:a05:6a00:1819:b0:5a8:ac15:534d with SMTP id y25-20020a056a00181900b005a8ac15534dmr15552497pfa.13.1678781216566; Tue, 14 Mar 2023 01:06:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1678781216; cv=none; d=google.com; s=arc-20160816; b=CqL5DeGM7amxYMct3wr9sEpl1rA3sKuk6waQRTSdcBURV/23UTcYGcYjOV++z4wqa4 XeMW1R2MP7r5MwyZqnfX7B0rYzT5LA5rzxAerHTQBKMkQRqQXiK7zRXSB00XZ1P6one6 i/eBBR0ta9wEuKRXcIuWWx5b3/npLadQhcIWSuiIVUMmEODfvyIo4XdfpH1qGp0Cl7gP pNhHgSZw4DXtoVRoJOUk6AvYlozcN3aMAtlGvXy6nmtvSe005z9CMAPq8F0HE/LP3EiR zgQyzrX1jmpob40X33nfQCSxdJHU21GYudFdwzs2cFOcvqVM5kmtWhKOah0uUKPsE4+p CF0A== 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=e2qLWiEu+kwQHNuuyN9RiYgLYwjEZFKFrGhRPUZl538=; b=qibVWQmHv9YFklXkkFyTbUqTEFgvgL98Rk4DbJ58zSf7fFgM/J2CrCDAxVOmzp6WKX gzdlGbXNp14HKZr5UnZiLlcZrqFXC7V9r58yDXNSoUhVm/1YyNRYOeIU1Yjxt0YPCrkK n08K3wJSYOkvemNsHoa4GXAhdHXnnOoAEI5ZHorTgBacV5w2MQn6HS9XNNiktEqFX3Mg XKL6tx/xCKbWgIRsUGC16HOjNJ1aR9FmORpckk6kQwffCEUc1qgNp24uTvyKKjD4HlpK wRCK1mAkMqJEOZzBYQPbBWLg3fVJphpPJAZTkoH2tyZaTOkHovR7cJwr1RMpJkzo1JoA DXzQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=kUttmv50; 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 j2-20020a654282000000b004fb35911c7dsi1685239pgp.541.2023.03.14.01.06.37; Tue, 14 Mar 2023 01:06:56 -0700 (PDT) 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=kUttmv50; 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 S230353AbjCNIFD (ORCPT + 99 others); Tue, 14 Mar 2023 04:05:03 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37868 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230333AbjCNIFB (ORCPT ); Tue, 14 Mar 2023 04:05:01 -0400 Received: from mail-pj1-x102a.google.com (mail-pj1-x102a.google.com [IPv6:2607:f8b0:4864:20::102a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 73DD92B604 for ; Tue, 14 Mar 2023 01:04:59 -0700 (PDT) Received: by mail-pj1-x102a.google.com with SMTP id j3-20020a17090adc8300b0023d09aea4a6so5182581pjv.5 for ; Tue, 14 Mar 2023 01:04:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1678781099; 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=e2qLWiEu+kwQHNuuyN9RiYgLYwjEZFKFrGhRPUZl538=; b=kUttmv50P6JaqbAfZWMvjFT69NXu1Mn44b5z8H5CQIUokMJkaddWBjXPbDl4gno60y bzBIGnQNDD5UZSDt3gbM/Izp479BCMnLTG9AfGHJlfC2C6B+iAqZABelML15p2Dzt+b0 d2Klm4DT5X8GEJLoh9Sc6MyStWYXaOmXq/+e5p1LhRac/IkExM2EQR9XaQ+aSi1MgmTM 7ynbySiUWnTa8veOsW7b6wy+WRLB7uU0qosh61Ki3QCwzcC6W1ka89KiBkDjqtOCkHcn y1MdyIDsSP8mPcxj7zIbI2Grt7m/m9tuuhiTnEkY8LKZ7ghH1MXeo3tOEnw9DdUhwCyW 330Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678781099; 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=e2qLWiEu+kwQHNuuyN9RiYgLYwjEZFKFrGhRPUZl538=; b=tzNICqfSdeXmOBcHcBUt9RKjtRgKrH19BJWoDu+tzXBk4+LghjHNwx6B5VTVQ+kM7T 1R5Io/80brEWiO+V31TaoNY0VayUkdqOLx1NBU2IU+vU0YcnDHJGOtPEiE+WkxSJd4tM A9L8Ao5TaAfGlzYWymMZRDqrxv5EXnv91Hr2OktWXb3BKMC8qZedxOvqhLxp0e2mBAgf U6XJrHAumN14uUzc2cm8srcqpW4V8Zc1QEUgCcm8KAu1MZ3HSwh23ccE5RipVeN7dM0D 3oRZSYEfAaOFWSpHrsiSgXAnkM/SF2CaRBQSJPPaHwRicz5gs3Ah+UGpj2WMGN4GY8Ng F2wA== X-Gm-Message-State: AO0yUKUzh1Oqwhd7Obg6Xx+RfEgxpLEZcJgd0zexyqC+JkbhRFFr+Zm6 zCwZss8r5gW7jDaKT+Q2DnQe X-Received: by 2002:a17:902:c949:b0:19a:59d1:389e with SMTP id i9-20020a170902c94900b0019a59d1389emr14167228pla.23.1678781098879; Tue, 14 Mar 2023 01:04:58 -0700 (PDT) Received: from localhost.localdomain ([117.217.177.49]) by smtp.gmail.com with ESMTPSA id l8-20020a170902f68800b001994a0f3380sm1078022plg.265.2023.03.14.01.04.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 14 Mar 2023 01:04:58 -0700 (PDT) From: Manivannan Sadhasivam To: andersson@kernel.org, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, bp@alien8.de, tony.luck@intel.com Cc: 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 v8 01/14] dt-bindings: arm: msm: Update the maintainers for LLCC Date: Tue, 14 Mar 2023 13:34:30 +0530 Message-Id: <20230314080443.64635-2-manivannan.sadhasivam@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230314080443.64635-1-manivannan.sadhasivam@linaro.org> References: <20230314080443.64635-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,URIBL_BLOCKED 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?1760329692906125554?= X-GMAIL-MSGID: =?utf-8?q?1760329692906125554?= Both Rishabh and Sai have left Qualcomm, and there is no evidence of them maintaining with a new identity. So their entry needs to be removed. Listed Bjorn as the interim maintainer until someone volunteers to maintain this binding. Signed-off-by: Manivannan Sadhasivam Acked-by: Krzysztof Kozlowski --- 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..6570b808fd0d 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 + - Bjorn Andersson description: | LLCC (Last Level Cache Controller) provides last level of cache memory in SoC, From patchwork Tue Mar 14 08:04:31 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Manivannan Sadhasivam X-Patchwork-Id: 69356 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5915:0:0:0:0:0 with SMTP id v21csp1626493wrd; Tue, 14 Mar 2023 01:11:53 -0700 (PDT) X-Google-Smtp-Source: AK7set9AdhdOg8uD4951led2QKpAWNSNnDEsXRZtCdBe/sEUsft9ViQot280lV4iDzado85IFcSQ X-Received: by 2002:a17:903:41c1:b0:19c:dd49:9bf8 with SMTP id u1-20020a17090341c100b0019cdd499bf8mr13028193ple.28.1678781513455; Tue, 14 Mar 2023 01:11:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1678781513; cv=none; d=google.com; s=arc-20160816; b=RAahC6+obb7HeZQHGb52Oth9vSmkBHMX8qp73EHFBP3MshpkDdg2KMBZihBupTT12h dC7AXF+EqwYUv4s6eBJTS9KHiBbAiZfu2BJiJhvBkblxRluSxMdeHIJ+jd9JWhfjqaEq 5tJ2Z5ym1wY3JrDflkHoJfuT93l3mCyYSEZTxebHeU13UXzFSb6F9JzDJ9gRpw6HuVKt 3khtrW7UAj1PWFQ2loos1hr+MZ5UDDrZlG3kkEKAl7sNP2umZ8MDRclF2q+GMVeeaeUB RKjV+8O9a4wxMc2xZo5UaGiwd6CQl5RlSY/k3ey7SNo91ADOGW21ZtUhtVf/koynR4Gw 6bnQ== 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=E3ynFMYwQcpfXg1vBUZGiwqSjOZbWEHjnhI8PWp4GCE=; b=hkBDzo+YT1/clLrKoaKACY3JKMhBqGZ0xOjGambGr1uyx+uMS1oQzQ0lAwQdRd6JEx 9SRHc9F81XdRzdRVgpwLk6aey0Hq46ISI3mtPB632+S6QZ7VGpd8g2JkRhz7CW61QKKN VIyCHgxR8nziL9BkvpDbilpjub9sMB4DhTbIp72chvAHXLqu2+mAnTYN+oJTLhL4aOJD KU3DDuVZWSzJ0ngCgzwatCUYjiHAHpvlqUTo1/YGxqpVSuu8afuAinHrHsTCYI3homQS b6q/35bqvenSUbicd4plFLaJTUgM9zCN+HZrljcamzJPHEf3ovFM7X//67ws+5LyAXG/ L5aA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=j7xvaNy2; 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 jh10-20020a170903328a00b0019aa3505620si1930779plb.284.2023.03.14.01.11.41; Tue, 14 Mar 2023 01:11:53 -0700 (PDT) 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=j7xvaNy2; 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 S230365AbjCNIFN (ORCPT + 99 others); Tue, 14 Mar 2023 04:05:13 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38222 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230378AbjCNIFJ (ORCPT ); Tue, 14 Mar 2023 04:05:09 -0400 Received: from mail-pl1-x632.google.com (mail-pl1-x632.google.com [IPv6:2607:f8b0:4864:20::632]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BB24877CBA for ; Tue, 14 Mar 2023 01:05:05 -0700 (PDT) Received: by mail-pl1-x632.google.com with SMTP id p20so15677242plw.13 for ; Tue, 14 Mar 2023 01:05:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1678781105; 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=E3ynFMYwQcpfXg1vBUZGiwqSjOZbWEHjnhI8PWp4GCE=; b=j7xvaNy2aA+o+3gb3Dvuc5Gw42SQp4fw7wM3jyYBLIU+W2YQWfLA3pC7l/N1UA8/BE BkoZsjVK32Wfus2lsJfzYjm550ld0xIFD5JvEEcEDbuMspSarOq54iEz0WTn59NegK0J RM6T4zNBgRYgRi75maX+ZIr5qv3tGSDQcGRQs1nv8c2LMDPmOerqVbACYaP8dWQ5CpbT WPToLBnPAf+emWdkUaXPDOeVxPYlBq9I7dvStU2ZdaiMUmMbinG414mp9y/duh7F0FI0 Ac055n7DGUye+GOoEk5pNTt8tM5m0Ej88zqCpoWtaZt4Mw6Fer45C8j1XmBaocofZNgz ITBQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678781105; 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=E3ynFMYwQcpfXg1vBUZGiwqSjOZbWEHjnhI8PWp4GCE=; b=njuT3VJjlTtWaxmsWW07mey08oXAmTweVAEboTRWpsKt51XxlOIuuC0oZTjmb3UmF5 RLnNZsMs/YV0hhTguuDKMNX9wChFST45Vg6z5CDv/JNf4/SAPCMHoabg8z9qlrE3xxdo OHXoMMs/Cm5frzAvL4NRhp1BD/3wk5GT4vg6FFhJwu7nMg1eCYvstdrR+qUDY5FPHWrA GMz4gGmHjV3HnxF9yve7JVFg/dGi3ewFPiiCKAKN0RQiMnGOh5r9DbkDPb0kgtOdDG/I vsl6b2A4B5QUV20s0iRWl6m45TG9xhwnPZ5EQ2sSkx913apNgXpF5B3DQOMee7rFj7OR 59BA== X-Gm-Message-State: AO0yUKW81NvjgePC8Rb648ABLImf8boPnunb+ct6NDcTy6zrtnEsP4Cj kLyca/H3CaoXttz7cNdrzMGh X-Received: by 2002:a17:902:c949:b0:19e:416e:abf5 with SMTP id i9-20020a170902c94900b0019e416eabf5mr13643147pla.34.1678781104771; Tue, 14 Mar 2023 01:05:04 -0700 (PDT) Received: from localhost.localdomain ([117.217.177.49]) by smtp.gmail.com with ESMTPSA id l8-20020a170902f68800b001994a0f3380sm1078022plg.265.2023.03.14.01.04.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 14 Mar 2023 01:05:03 -0700 (PDT) From: Manivannan Sadhasivam To: andersson@kernel.org, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, bp@alien8.de, tony.luck@intel.com Cc: 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 v8 02/14] dt-bindings: arm: msm: Fix register regions used for LLCC banks Date: Tue, 14 Mar 2023 13:34:31 +0530 Message-Id: <20230314080443.64635-3-manivannan.sadhasivam@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230314080443.64635-1-manivannan.sadhasivam@linaro.org> References: <20230314080443.64635-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,URIBL_BLOCKED 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?1760330004275372725?= X-GMAIL-MSGID: =?utf-8?q?1760330004275372725?= 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 split 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 Reviewed-by: Krzysztof Kozlowski Signed-off-by: Manivannan Sadhasivam --- .../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 6570b808fd0d..93b977428a14 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 Tue Mar 14 08:04:32 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Manivannan Sadhasivam X-Patchwork-Id: 69366 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5915:0:0:0:0:0 with SMTP id v21csp1626667wrd; Tue, 14 Mar 2023 01:12:29 -0700 (PDT) X-Google-Smtp-Source: AK7set+yorrI/IlWEZts+CwpfTvNN3wVnTd758h6ovABHnaByCKudSO7LqY/N3WceNiF9iPaPJ+c X-Received: by 2002:a05:6a20:8c97:b0:d0:42a9:f5f9 with SMTP id k23-20020a056a208c9700b000d042a9f5f9mr21260246pzh.54.1678781549339; Tue, 14 Mar 2023 01:12:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1678781549; cv=none; d=google.com; s=arc-20160816; b=o9kVdAWLUP5+vz8Y45m6vxx6KWMNNMHkS9mLeSnG4/8NvkdrMNv/i9zG27jvbEA7bT H3WJkMv0QPmv5qbMN6uYB3YtIlKjoSoGtHnpNLBG1zB4WgA2sd0qyGqPx1vcNsoR82ap Se63Y0MCUj+ylGZKvjlG5sKvCzVVj7XIXjDw80f3ZBhaVyU6GJ16HX1mFhRzC90ECySm 7+LobGAqWOYvxWu5XD2KbswenFyRTxPk89Vc/CegK7DGT6jATTfGrwBwooKxEVCulcPi BTUpIevgCVhFoD46jUTHLI0NF4uVi9zn8oZszq8+aIYyOb65PvSfKA1b7/LD2/ZSvD95 /agA== 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=4tE4o5E5NxTGWs0FFcIpd5GaMpz3q7yKukVUL4nRPNs=; b=ealqeHsPexFRuRHpsFGro048uODScFhCZ3tQNQ/2PGhav6uGEFuaJOZ7lxSg1YnB1v nAvXoeZ7wlEwOpXaH39udh1fjLT7B27vt8UXiVz7jwE60B5FfrMg1TAC9q6NA9eLtZpd aISJN29XrXFr1g8PAs0kpM/jjcAnqv+35QTeun1mU5tklv4HCAqxW4kZpfm1RAudAgVG teUrlz91jSlWbOHEgh3MvkPFrdXzWWiwoRnTUJ8JKdlei8q5UgzZQ4VpN6pz7PEH65Km nXSqAf2Q1liI/a4XthzldaJswEelG0Ud+oc3YtUcQBDN5LfcyKoH0qEf+m1nRQOLTBvl Fo6w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=SmbC3Sr+; 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 a21-20020a63e855000000b004ff6f91fa75si1782823pgk.445.2023.03.14.01.12.17; Tue, 14 Mar 2023 01:12:29 -0700 (PDT) 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=SmbC3Sr+; 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 S230470AbjCNIFl (ORCPT + 99 others); Tue, 14 Mar 2023 04:05:41 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38686 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230408AbjCNIFU (ORCPT ); Tue, 14 Mar 2023 04:05:20 -0400 Received: from mail-pl1-x632.google.com (mail-pl1-x632.google.com [IPv6:2607:f8b0:4864:20::632]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D3FB96F4A0 for ; Tue, 14 Mar 2023 01:05:12 -0700 (PDT) Received: by mail-pl1-x632.google.com with SMTP id p20so15677535plw.13 for ; Tue, 14 Mar 2023 01:05:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1678781112; 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=4tE4o5E5NxTGWs0FFcIpd5GaMpz3q7yKukVUL4nRPNs=; b=SmbC3Sr+D60stiRGJZXsRljMJ9EGtv0OIO9wD1szac0xQEdjxAe3HoEMnXxycEv0M8 SgvcLf4e0+XZgqSILauKVvLZbJZ5njuOxNi29bPYpN8NQ4hzlDFrXobTq9xd5ipr2TmM b1GG/vzvBYmfi1RgXuvJEn4n8sxU7TbMucES+ZhVvcYFv6x7k6PpgSXCBhaiqEZfF+oo uEE1P1JHVl9h3wE6fO84Lnr5vA+tkG+K4s1GY8AXFMPA9oPvOadzpP5IYecdldDz3eg6 usnty6Hc0vl86IfjdVKi7B1igYRvEia7S3TJxla28WLeSiqpd8PCS9LyZGWw3fDtcf1k W7wA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678781112; 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=4tE4o5E5NxTGWs0FFcIpd5GaMpz3q7yKukVUL4nRPNs=; b=KKSis5qQGplOOzgrqeSkJVkVVungIyzDglysEnYhOE7N8Gc+kSIvpDJdGyDjAifiaJ MtmTapZkI/CnJusnteaJCuJ3FDXs1xmIAWGizL/6D2TfSUCAi8d6F3gD84VWcTlbecBD uanabvnzmrxf5aim6RdL6n6bt2TOqBJPMFSyUpMOAHbZqngjAsyPzlufaqRHAXy8RjHD 2Tut5Phwz3hCy+PpTjMtFFfB3wWZviesAGUXlGm+7u2ZXb4TFv0VoxWBGzvbg3KQEhHB 7rk6MH1c+KBeQ2o1ubqA0nhOAY6Rq0K+Mc99u4pNTpdwSF2VqqI3NyCn+KN9pswhssVY jhNA== X-Gm-Message-State: AO0yUKWN/j5TcBfWIfngo5zkplrnCS7IozEbJEsZ5EZ7HviXmJaXMzhK vo6Seg1o51+csC7HN5usdiAp X-Received: by 2002:a17:902:f684:b0:19e:68b0:b06a with SMTP id l4-20020a170902f68400b0019e68b0b06amr46982825plg.50.1678781112473; Tue, 14 Mar 2023 01:05:12 -0700 (PDT) Received: from localhost.localdomain ([117.217.177.49]) by smtp.gmail.com with ESMTPSA id l8-20020a170902f68800b001994a0f3380sm1078022plg.265.2023.03.14.01.05.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 14 Mar 2023 01:05:11 -0700 (PDT) From: Manivannan Sadhasivam To: andersson@kernel.org, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, bp@alien8.de, tony.luck@intel.com Cc: 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 v8 03/14] arm64: dts: qcom: sdm845: Fix the base addresses of LLCC banks Date: Tue, 14 Mar 2023 13:34:32 +0530 Message-Id: <20230314080443.64635-4-manivannan.sadhasivam@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230314080443.64635-1-manivannan.sadhasivam@linaro.org> References: <20230314080443.64635-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,URIBL_BLOCKED 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?1760330042100454395?= X-GMAIL-MSGID: =?utf-8?q?1760330042100454395?= 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 SDM845, the size of the LLCC bank 0 needs to be reduced to 0x4500 as there are LLCC BWMON registers located after this range. 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 479859bd8ab3..3bf95a12ebb9 100644 --- a/arch/arm64/boot/dts/qcom/sdm845.dtsi +++ b/arch/arm64/boot/dts/qcom/sdm845.dtsi @@ -2192,8 +2192,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 0x45000>, <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 Tue Mar 14 08:04:33 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Manivannan Sadhasivam X-Patchwork-Id: 69362 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5915:0:0:0:0:0 with SMTP id v21csp1626588wrd; Tue, 14 Mar 2023 01:12:14 -0700 (PDT) X-Google-Smtp-Source: AK7set9DEbEI/v7r90AKYdaqfCw6XIlr/oJqKylluiC4InUCBOL4zbdCSRzODtcCqoFCtB58PR7M X-Received: by 2002:a17:902:e801:b0:19e:839e:49d8 with SMTP id u1-20020a170902e80100b0019e839e49d8mr44939742plg.59.1678781533988; Tue, 14 Mar 2023 01:12:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1678781533; cv=none; d=google.com; s=arc-20160816; b=lnxmiU7d3H4Gup4/fb4KUZeurbGTHBdnuYuuaZM85aW9LW7peEdVlxEcKnlnqvbXk6 PZw4kTPV+xtZi61R7ScMMpXUbV+OEtsj0TQEv3c163I16tKwfOE54+ZdyZ/of3N9uhxi Ya94f5c9COoVM5xD7RmYv2I2CdD9iFDHu9q1dt0WafmLwLwZ8FVJ8GjiNTWE05OpMCJ+ pcGva+6CG1sdAuJQA0uhoUDBjh7UGNJShEmPEV/zlunzTOdROHn+vEJ5+pFLZb3emQED vKq9CNt4gqFmuCbZa3ULpYjjchdqshrsbtmJZSiwaq1B566s0dqTqro1PJkd9BjX+29h +zRA== 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=5/ORW+ZG5QT+TPocYHNFiE88/XBOJZ36UEuAeSGiS3k=; b=vREKCrmEvDsJLH7zSC4YbNgjXJFxiZa3yG5c8j+kuCtIh0g5DQEKR44A8eOyuhYvvO 0Jnry+7ISmVlCxpoqtEXyF0YrZhvVyOAnd/KaufWZU9T1MDDKKY5nWwIA7pC/OWlww6U vJUWl2h+NbneB8utrwb1PuUzelzxVg8so1tQ6UahvNUHLFskCDJMsGQcIu2NJOaMme6c owaj99hGqDHZnMt2y8XlLnVFpeUtF/VJ5j6pt5GowxKWJABIhvFA+xMssZgn1VD8TMLV 7KRWs09t3uYN4ZPwTXBzh8UqM6TSXvvMzKlZ5PzePwOVfRsr6vvvigXDB8PIo9EgjQNL yZow== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Ah5xLrCN; 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 y5-20020a170902700500b0019cd5d744e4si1846266plk.156.2023.03.14.01.12.01; Tue, 14 Mar 2023 01:12:13 -0700 (PDT) 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=Ah5xLrCN; 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 S230448AbjCNIFy (ORCPT + 99 others); Tue, 14 Mar 2023 04:05:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38628 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230250AbjCNIFb (ORCPT ); Tue, 14 Mar 2023 04:05:31 -0400 Received: from mail-pl1-x636.google.com (mail-pl1-x636.google.com [IPv6:2607:f8b0:4864:20::636]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DF3DA7BA06 for ; Tue, 14 Mar 2023 01:05:18 -0700 (PDT) Received: by mail-pl1-x636.google.com with SMTP id h8so15691505plf.10 for ; Tue, 14 Mar 2023 01:05:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1678781118; 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=5/ORW+ZG5QT+TPocYHNFiE88/XBOJZ36UEuAeSGiS3k=; b=Ah5xLrCNiduHUWjN3eAaifuW7SBx2eBFJQeZCeBpzAd9oCHrqH41XV5WJgUV0AsMtm 4rFmJW5lhmSwbaMxXEahhhQYnOGfaYmMMNUHCooR3qE64bce+IQ65e3+TGIqQ12kP5tM xzxXWOmF9wYI+IbWiTbGptEVE3FvQJqhOXOSTciVyyDBxfP6YACrSuszlmGCR4Vh8DRj JW5AVs8F5x3wiVXTZnaTOmWoC22marNdES2xjvcZQmUSJq8Pjrk2EaN0V7rm0UzRjRAC DeVJXmF5Dj0VKvxSL6UD9eWJkhdqQlw3zpiL/pVYrOazSIeGCh7kFRBK48KAW3vceflV G1tg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678781118; 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=5/ORW+ZG5QT+TPocYHNFiE88/XBOJZ36UEuAeSGiS3k=; b=xasroluE+4ek5kWfkHhCXK4LeXxL61bonosrZy8l6uHCnP+NKQvM9t0jBqmeGjFqGZ ab+e+y/Mopu5F3f0W5pNilu/n4a/3zCSys9UP1PkM7Rgf0xnrfhYJq/YLumTEP4DYwMG Qxgs3+CquYlyHMc4UVnHSNgXthZqVaf/nmHlB5ZC3Uxhh4MoV8RheJIC2cStEK8lbUoS tqocGffd88xYUx41fXNsNwCYd0qPxFoJEPKxPl7P/27dsgY1cTNebAD1v/sM6Ijb9qt6 KKI+m+QRS5Yacli/qHBla8PrP37W5WCmwGi6zSNdH21GDjXTN4LvHIDefyu8pU2HXzzL KPnQ== X-Gm-Message-State: AO0yUKUK1aZQOq2WDwiq3Ek7Yp3I1GU6VDAWvKMXpc8xUKsAMnvVecCH uPqUI2SroVKSErU0/u0MEOAn X-Received: by 2002:a17:902:e748:b0:19e:82d5:634c with SMTP id p8-20020a170902e74800b0019e82d5634cmr40549164plf.53.1678781118418; Tue, 14 Mar 2023 01:05:18 -0700 (PDT) Received: from localhost.localdomain ([117.217.177.49]) by smtp.gmail.com with ESMTPSA id l8-20020a170902f68800b001994a0f3380sm1078022plg.265.2023.03.14.01.05.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 14 Mar 2023 01:05:17 -0700 (PDT) From: Manivannan Sadhasivam To: andersson@kernel.org, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, bp@alien8.de, tony.luck@intel.com Cc: 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 v8 04/14] arm64: dts: qcom: sc7180: Fix the base addresses of LLCC banks Date: Tue, 14 Mar 2023 13:34:33 +0530 Message-Id: <20230314080443.64635-5-manivannan.sadhasivam@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230314080443.64635-1-manivannan.sadhasivam@linaro.org> References: <20230314080443.64635-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,URIBL_BLOCKED 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?1760330025703900253?= X-GMAIL-MSGID: =?utf-8?q?1760330025703900253?= 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 ebfa21e9ed8a..62cc9eb4882d 100644 --- a/arch/arm64/boot/dts/qcom/sc7180.dtsi +++ b/arch/arm64/boot/dts/qcom/sc7180.dtsi @@ -2760,7 +2760,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 Tue Mar 14 08:04:34 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Manivannan Sadhasivam X-Patchwork-Id: 69357 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5915:0:0:0:0:0 with SMTP id v21csp1626541wrd; Tue, 14 Mar 2023 01:12:04 -0700 (PDT) X-Google-Smtp-Source: AK7set/hMyiTuEPr3fEWiuCo5WvlTWjEUbuPKYtQfZY5AOwt5lAzs1zvtJhL75t0K5wR2SZ3uqjX X-Received: by 2002:a05:6a20:6009:b0:d4:b24b:4459 with SMTP id r9-20020a056a20600900b000d4b24b4459mr4461298pza.13.1678781524530; Tue, 14 Mar 2023 01:12:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1678781524; cv=none; d=google.com; s=arc-20160816; b=LvdFNKcJNsTOOodokg7D7k8qlWr10RdTGI/TRFiCbBMlH4rOFe4q9ZXXhCv/haYnXb XdZWXRz3QH15T4xqa6VnLejrOkTvzX+Dt32DuQAEmThPL7OE7Rd2MaTncT2BlEiSosUT dazCLQEmxfon+eTfbB4ayuGdhEnZKvuu+pfXMKEwDnacgPg0+czDYwyOugxKH4mtCS13 o65A86lOD7/rjp7Wba550UAP05sDZKEuckk7qfQLLMDZo+70Cy3iZXmQfEdkx1ZzMUbY 1nc4TkaTWaFIVfIp4Dak45DKamoCwAE9LHkOl0A4Z1OAYao27YBqg+ViQegEsQ1E8QzT aw0w== 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=H3jjAvyClxqCSaG5sOi6OveXFyY33UJ9o9fFaRGOIoU=; b=bBIAUTEFSqOBNCK/jirSnMcLy54c28dlwNmBpkrxtGOMJlRTUZdLxbItcm1l8Z1ada szGoQMAOScChmgDZuosr+biZNSJO2LNRqXBfF5wkshk1Dmy83ggtwNUvIhMgPlMX0NRH ahEHpNM4Ll5jJzTxKkisFAU1n60Zm9h5ABREITD+ODkA9I7ySDPP9b+vRNq9sOBm8iJc bCV062+9GWBYs4VAS/hR0XEnGUW3Bcb1rPNFeyg+I4R+XYNgxgmJj+CIUTWUAcIaH13p SRcvnxnp1yVqAJxBeMpwkZLe+67i5uck9SLyMsxUZvlSNKiPSLmzM12qDd2+f7dfXZV5 GlSQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=TPe49wQ5; 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 m2-20020a056a00164200b005b823de3a41si1695198pfc.197.2023.03.14.01.11.52; Tue, 14 Mar 2023 01:12:04 -0700 (PDT) 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=TPe49wQ5; 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 S230466AbjCNIGE (ORCPT + 99 others); Tue, 14 Mar 2023 04:06:04 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38258 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230464AbjCNIFk (ORCPT ); Tue, 14 Mar 2023 04:05:40 -0400 Received: from mail-pj1-x102e.google.com (mail-pj1-x102e.google.com [IPv6:2607:f8b0:4864:20::102e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 09A5D7F039 for ; Tue, 14 Mar 2023 01:05:24 -0700 (PDT) Received: by mail-pj1-x102e.google.com with SMTP id y15-20020a17090aa40f00b00237ad8ee3a0so14318962pjp.2 for ; Tue, 14 Mar 2023 01:05:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1678781124; 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=H3jjAvyClxqCSaG5sOi6OveXFyY33UJ9o9fFaRGOIoU=; b=TPe49wQ55ZzjXtL1UhusZl5uDaWHm9T2bYehPMS/MgB1zXGYXYXd+Il8eMkq3hVezK Jxl0H1dW3Z4Dh4DnVnxdD0GHDOrGhsqNw4XajjmEk5hadqij+8/HsaCK9GeAJPmn6L8k fE6nt06k4eCKMBmVEkHElAN+09cYJ54nbpSIlZ9OChY5I+SEjKp/b6pTMc/MYOSJr2CZ zCbaVqG1lIED2bPKylCCmXu3LWAUAMeJLRF8aW/v/SAuhl0RwicXXGaR1xT0ryQ9omzu bzYWCTAN81C88SbdXaG3t1p7iCLwuqq4cmJJEOv92d/SWrW42hyHuijuBC0tcAlzQFP+ 3rTQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678781124; 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=H3jjAvyClxqCSaG5sOi6OveXFyY33UJ9o9fFaRGOIoU=; b=tNo5Ypr/pbvpFSdfJ5ku9XDwWT1Q5uTeeGXkI2n89R6ap2tTUQ81y0Yc53qmZGOl0+ t09jkITOArgk3tqEH1SLWwD3BMcNRc3yuO7jrT2THx7nXOa2tSaPxt0IPEG5F9/rMZLW /CCqvKcanciTc2rPcN3AXfLkgfoDCzAQgzCbo9EVc9IrofLkTSBvPUE8RJchl4jxTJp3 RYW1h3VByq5xjQvQdzYvu5iVJ9ODXbBE+8nvXcE1vMr/WCi4P6h1yCV0bDcud3n9uBIS Dkl8WxMHLTu4oZTSeBRP3kTUz7idmj1fNOLDjiojvHdEXyRMk9jYzu4dbHZgrfbNhALO S5uQ== X-Gm-Message-State: AO0yUKXzFxOP+sFRr2E7rm1XJSUUpkCm8V/ogblnRa309UHptHUTRmrL sq3ODkbh/473OFXH08BAx9RP X-Received: by 2002:a17:903:41c9:b0:19f:380e:9cca with SMTP id u9-20020a17090341c900b0019f380e9ccamr7917000ple.20.1678781124191; Tue, 14 Mar 2023 01:05:24 -0700 (PDT) Received: from localhost.localdomain ([117.217.177.49]) by smtp.gmail.com with ESMTPSA id l8-20020a170902f68800b001994a0f3380sm1078022plg.265.2023.03.14.01.05.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 14 Mar 2023 01:05:23 -0700 (PDT) From: Manivannan Sadhasivam To: andersson@kernel.org, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, bp@alien8.de, tony.luck@intel.com Cc: 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 v8 05/14] arm64: dts: qcom: sc7280: Fix the base addresses of LLCC banks Date: Tue, 14 Mar 2023 13:34:34 +0530 Message-Id: <20230314080443.64635-6-manivannan.sadhasivam@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230314080443.64635-1-manivannan.sadhasivam@linaro.org> References: <20230314080443.64635-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,URIBL_BLOCKED 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?1760330015866423161?= X-GMAIL-MSGID: =?utf-8?q?1760330015866423161?= 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 bdcb74925313..afe74db1f5ae 100644 --- a/arch/arm64/boot/dts/qcom/sc7280.dtsi +++ b/arch/arm64/boot/dts/qcom/sc7280.dtsi @@ -3582,8 +3582,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 Tue Mar 14 08:04:35 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Manivannan Sadhasivam X-Patchwork-Id: 69368 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5915:0:0:0:0:0 with SMTP id v21csp1627057wrd; Tue, 14 Mar 2023 01:13:52 -0700 (PDT) X-Google-Smtp-Source: AK7set8494tJuoNvV9EO/RCkPnXIe7bF4OPnbotZeeHRSDZC3dMZO0jlJjllyLe04OHpaRAwR4M4 X-Received: by 2002:a17:902:708c:b0:19a:9686:ea8b with SMTP id z12-20020a170902708c00b0019a9686ea8bmr33296704plk.28.1678781632669; Tue, 14 Mar 2023 01:13:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1678781632; cv=none; d=google.com; s=arc-20160816; b=rPav0kg1OY7/i2K6krYmf+BYUqZyqhsXFerHWZ1r4w0uFiZk+O685q42n/zq966hrn F5HdGdp4IEGwiMZTYC2DVNxsRalqZfOnqP0iZ92/+Q06OJX+npltvZ/+OgUBR5Jxwz1k iufA6CEaG/ybgbhJY4lJL/kuIXqYYYixPghB38vwFxvRKpjjv7783cv1wA9TlgRJC6kV FygQ4E4HB1bQclFKBXXT4pkiJ08hc+icpk8CrHjnEmtlOP10dfZBZ3+zb8RTlaulPKde vgnQ//raAf+ACImANFjRiMWWXaVnzFOrpuf4WuU7J1OEzjWc5Mp4T/OOr623OMzGUIcD MMfw== 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=FI19SzWU19Jvwkg3ef2zRaEcka9BD7PAMWjZH4lQqmU=; b=KWgLbmymJYR5ZOvK79NR11caWwY4BFhrCbIEvsV7b00X+uvmcUK8ShIuTCwQUNZbFh o9uQS4Rffzs9aTF6u4y+cB0QyV9EQJQKWBdTavPzW2kupzPGuX9eK9rJIhVV6XFnvslv eZk7sRoKi5N6AEebl6Qloah7oPByvbnPbXC7vtD0yTq6+IeB5w923mYTQlOHwxBJEsKP jPvXbfTmO6csHTWk1XW8yXXoAdHc8Gb4Kr+keghRE5qrx/YMpD6sZ0t8yLnVdwVFDV8+ onA5G1g68LsbCLN+cTNyurUXHzzagyeExIc/ht7MCfPvyg9FJx75lVoJBql9S3dbO5sI 3/dg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=qCnt+YG+; 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 r3-20020a1709028bc300b0019ca806fbcasi1898178plo.594.2023.03.14.01.13.39; Tue, 14 Mar 2023 01:13:52 -0700 (PDT) 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=qCnt+YG+; 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 S231130AbjCNIGN (ORCPT + 99 others); Tue, 14 Mar 2023 04:06:13 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39278 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230378AbjCNIFo (ORCPT ); Tue, 14 Mar 2023 04:05:44 -0400 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 1E31382A88 for ; Tue, 14 Mar 2023 01:05:30 -0700 (PDT) Received: by mail-pj1-x1036.google.com with SMTP id gp15-20020a17090adf0f00b0023d1bbd9f9eso4086828pjb.0 for ; Tue, 14 Mar 2023 01:05:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1678781129; 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=FI19SzWU19Jvwkg3ef2zRaEcka9BD7PAMWjZH4lQqmU=; b=qCnt+YG+qSCaRi++SQygc4LCMyUIQsxhksIdbvNciJyOVAeYykxxs4ROH0hhxvE57E QuaZ+ecJcx/P7AQqaoMNSEK3RutjcmXZdn1GlRlUha9fYBb2j4GVrs2WzfgALjIRGEwG u7m7iyLjATF5PMDivCktX/K3zQlGAIrn72F78AhCjjNofQd8e4oH0k7l2Hcge0p1npPC wMUS8z5W2Ofc6NxtslNY6WWtAauHalb1SpXHXX6OHfI+cUOltmlOt3bgpq/3PUPFoOmS hr7iXvJfzjqNVT4p/v8HaK19oMNnyLpJJECozQqNyaPrbESvtrajCpP4dJ1J69Wut8D5 +cqg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678781129; 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=FI19SzWU19Jvwkg3ef2zRaEcka9BD7PAMWjZH4lQqmU=; b=ptrGgR7mqtvB11cQcbiaV7Kix4lowNeDadP1Tvt8mRN4MTLvLy+ApM07HQovrA1PE0 RcVKJB8605bN/6p+0W0ZXb3gIV/9cFRuhG4AfVBlRxkNr8YvbHdkJuZzYhPoaolrooC6 IIOJZIftsWtOXY0xufG26H4Yzn4RjDgDw5kJ5itx3pG5BnmXo2eW6yl5pWALVF6AlF3T yRjKhYfA7sjxgjkTsgNJbqez0rJovJ9oVxRKynWfRSihzD7TlGFd4OBTWWCo54w+lxwU xCx+Lr6pqdbbU4V4yOq4/1fcEN2TLvElHLAJNtQn1e3GiP6AWHwl/WiJAZSJ+7CKBASJ TRPQ== X-Gm-Message-State: AO0yUKXHFDq1K79YSDYKKrXrLJ9UYZiM54lWgmh7ymKJDNj60Ay/yw3Q BhgNOu/+8sO/C0qYqLzlSMqv X-Received: by 2002:a17:90b:1645:b0:236:a4bc:222 with SMTP id il5-20020a17090b164500b00236a4bc0222mr37579028pjb.38.1678781129601; Tue, 14 Mar 2023 01:05:29 -0700 (PDT) Received: from localhost.localdomain ([117.217.177.49]) by smtp.gmail.com with ESMTPSA id l8-20020a170902f68800b001994a0f3380sm1078022plg.265.2023.03.14.01.05.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 14 Mar 2023 01:05:29 -0700 (PDT) From: Manivannan Sadhasivam To: andersson@kernel.org, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, bp@alien8.de, tony.luck@intel.com Cc: 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 v8 06/14] arm64: dts: qcom: sc8280xp: Fix the base addresses of LLCC banks Date: Tue, 14 Mar 2023 13:34:35 +0530 Message-Id: <20230314080443.64635-7-manivannan.sadhasivam@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230314080443.64635-1-manivannan.sadhasivam@linaro.org> References: <20230314080443.64635-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,URIBL_BLOCKED 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?1760330129533363813?= X-GMAIL-MSGID: =?utf-8?q?1760330129533363813?= 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 Tested-by: Steev Klimaszewski # Thinkpad X13s Tested-by: Andrew Halaney # sa8540p-ride 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 0d02599d8867..f5262ac64a36 100644 --- a/arch/arm64/boot/dts/qcom/sc8280xp.dtsi +++ b/arch/arm64/boot/dts/qcom/sc8280xp.dtsi @@ -2983,8 +2983,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 Tue Mar 14 08:04:36 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Manivannan Sadhasivam X-Patchwork-Id: 69365 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5915:0:0:0:0:0 with SMTP id v21csp1626626wrd; Tue, 14 Mar 2023 01:12:20 -0700 (PDT) X-Google-Smtp-Source: AK7set/yfLsLnELrSBccDXxTHLBiM2LRtnYx7t3W86pi0L4ZsICqXQLotXis8uyoowpusG25zDDQ X-Received: by 2002:a05:6a20:1228:b0:d5:27d8:301b with SMTP id v40-20020a056a20122800b000d527d8301bmr2063904pzf.32.1678781539865; Tue, 14 Mar 2023 01:12:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1678781539; cv=none; d=google.com; s=arc-20160816; b=ClBRRaWoE7//onPxfSIcTfTO2eK+ihdirtxHRnQFSdt5bCkbupnSuD41zWgIFKFiX5 LrWQMjgfYjl5JqCDc6wfg1iF//InnfAIS79jBEObqL/iC1nAymatktVOywGvuHVT2xJJ I16PbstYIZ2Cg8Lid3CXHDcIM7qozEiCK7Px4VZczuYV8EdaqYhV73Y2YKrVh8sTa6Hi hHASbd9jEkm4aFzLFxe/lt+lNTZ2VKHnqF669wRZL88KCckqSaTHXDxtSAOkjudmv7E4 /rKvzX7AG2G9pOL5WRO+u1UW77Tf+6yzQ18W4bdshQyXLpXQSagNZQnS+bAy0xLQMMA+ cWFQ== 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=cI9fzySm6xkOQqRMGGXIyCN4K6R+WsFVLi5pzorIgXU=; b=d+jCNZmVzvH64+LlNWCeloKBIsAE3vZ0AP1XYDmLamGUOzydXlZ/sdV4Zxl9FIAFNf dfJHY7hHlpzdaOidZrLs13naUSBo9FQiMQjw37PAkA5maw4MtEtz0dPF7/WOcgGahDe1 y7ZX5R3UdW4iB3jVVkWLPfnnGyQFX2X0cROFfhldFJwp8V4MJWBl6/NIj+mm9u17QeYK dxF71eOabM4eSD3htUl43lPdYaZkra+g2Df288LNj7CvK5JLWhZ0qU+exrMWFt1yZ5I4 oZn5X3PIUpEd4yvOL7y44BwxokLl6107Fpxbv8oOwV/Idx2RZ391psMmJSDHJJJXCDFy pa8A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=SmrW6DYZ; 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 h29-20020a63385d000000b004fbaaa789bdsi1702973pgn.860.2023.03.14.01.12.07; Tue, 14 Mar 2023 01:12:19 -0700 (PDT) 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=SmrW6DYZ; 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 S231143AbjCNIGS (ORCPT + 99 others); Tue, 14 Mar 2023 04:06:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39368 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230496AbjCNIFr (ORCPT ); Tue, 14 Mar 2023 04:05:47 -0400 Received: from mail-pl1-x636.google.com (mail-pl1-x636.google.com [IPv6:2607:f8b0:4864:20::636]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 32FC669057 for ; Tue, 14 Mar 2023 01:05:35 -0700 (PDT) Received: by mail-pl1-x636.google.com with SMTP id h8so15692087plf.10 for ; Tue, 14 Mar 2023 01:05:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1678781135; 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=cI9fzySm6xkOQqRMGGXIyCN4K6R+WsFVLi5pzorIgXU=; b=SmrW6DYZUiRCkcs6iV1lliQ4cARMhvs11o78dH/KFKBz++3pDZF9LSJXafidza+V/X bi3oMZ3YKstKS9jq1P01frvzijVXejgUEysFIZOW2xyol2nISWCpeIBHwEX8bd0Y4TH9 rGosPDpMJlOeQmr6rvkRU20ais1xjTXycslgHrC7L4sO+yuABk0mjPdDoUaLYAdUMzgL 5OKoE2rlkBZLGm8UEm164kpl/07Yojm8pO1T/n3JvIkvCjy+EWn0hO3u0Q7Z/sZ3KQpq UpU5sczU8qXfxr3kg8J8F/Y4Vho5KAL+LYxTOgySXwfGfHzCYdNkSKi0lRdZlnAQ496V C/ww== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678781135; 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=cI9fzySm6xkOQqRMGGXIyCN4K6R+WsFVLi5pzorIgXU=; b=K5hhPNMJZQigYj5LVhSs8kz87egsYPb9e/JnhjqczyS19A4gwT+NlXm5LJXxrXNX26 sC+mrs91+BBvYMp/ZPRRrfrEF3C3QdB47AbLJ0gaok74jbXHDJ3ZTg1gGD2ddoCxbFMg 1WkvtDRVichGsxoNHRv50UUJUKQ2fS4QeGXmqGCozfyo3FDv5rvEBHIxsFSOtMWjdlaO rgwfXEkmi3wbQaMeM4N74JNPSNmGYcE1Ti9HFBHJiQa+GDnpW1HbIxoIWIwaMIFqrQY9 IA0OTRhURQ/qS0z9sloG6+tqFKBbCbbO92mQaT6ZnMBT8lMIRoMy2mRrqHxSOXHmTM7N cHVQ== X-Gm-Message-State: AO0yUKU6JFfe2jymVkJDiLif1tC/MVpqjH+YivXrndwoq/7K69O30G3b /rRPD1hudgwHpL3pr5a/iKwx X-Received: by 2002:a17:902:ab82:b0:19b:da8:1ce6 with SMTP id f2-20020a170902ab8200b0019b0da81ce6mr29920545plr.55.1678781134905; Tue, 14 Mar 2023 01:05:34 -0700 (PDT) Received: from localhost.localdomain ([117.217.177.49]) by smtp.gmail.com with ESMTPSA id l8-20020a170902f68800b001994a0f3380sm1078022plg.265.2023.03.14.01.05.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 14 Mar 2023 01:05:34 -0700 (PDT) From: Manivannan Sadhasivam To: andersson@kernel.org, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, bp@alien8.de, tony.luck@intel.com Cc: 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 v8 07/14] arm64: dts: qcom: sm8150: Fix the base addresses of LLCC banks Date: Tue, 14 Mar 2023 13:34:36 +0530 Message-Id: <20230314080443.64635-8-manivannan.sadhasivam@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230314080443.64635-1-manivannan.sadhasivam@linaro.org> References: <20230314080443.64635-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,URIBL_BLOCKED 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?1760330032272292148?= X-GMAIL-MSGID: =?utf-8?q?1760330032272292148?= 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 fd20096cfc6e..e316a4e4b5aa 100644 --- a/arch/arm64/boot/dts/qcom/sm8150.dtsi +++ b/arch/arm64/boot/dts/qcom/sm8150.dtsi @@ -1772,8 +1772,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 Tue Mar 14 08:04:37 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Manivannan Sadhasivam X-Patchwork-Id: 69360 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5915:0:0:0:0:0 with SMTP id v21csp1626552wrd; Tue, 14 Mar 2023 01:12:07 -0700 (PDT) X-Google-Smtp-Source: AK7set+44RsPpxdB75PA6bfnO0yRcCL68/3MVFywAU55mfqbJLD3p+n6GORrtMoSrvn2VwxTv5jR X-Received: by 2002:a17:90a:ba01:b0:23b:45be:a15a with SMTP id s1-20020a17090aba0100b0023b45bea15amr8775087pjr.25.1678781526837; Tue, 14 Mar 2023 01:12:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1678781526; cv=none; d=google.com; s=arc-20160816; b=ek3Jq7PbwwQGP754x6G3uUDcni8o0SdG23x/t6wkYwUwfSFI6jedHWvOhbOa3yEJvE s7PuFJ2Q9BtH4yQexNteTcgsrhvd/J0rq5/qHkkHRX/MCTQOQumyaKbLertKLUBl9BVT MmxWnV0hXuXEUOLqUoN4d8wRdErEhVCqTgV1GCzRz5JOoWEuRC8I+ADirx3zJxqtfg+S TX9t7M1yktiiX0MqYLp6SUepXFw1/Lq9XlgbB9+uksaXtbrhPbu9/NbFQaGmSYsrcOCo PLSdQggnKWRdL+IOM7Svm8w+fqcMfiN9VzocdL62yTaI2KUeMe+4qOt4fBA3qaxp4GHr DWbQ== 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=KbEuZ8x9epY4wczXQcJX335FU4iMuAmx2Igvv4w4MY4=; b=vMVt8ukvJOsAFhdpuzsZCe0e7bFM94zwMT5Rm7mq7BnNP52lD1EAwVUN1rThP5U71O QMeXNT7syu1FW4L2M64OFOwn9+iU/Jzm1eq192vjTf33wFQ8dsi4YSshI1rqtlZyLtiY dWpGfYzYTDlock2+tzd65doXPo8iVXe5H/Y3d+2yVD2cWNXnhK6z+wN383A7oxRdTs0C Lug47AvESDGRDmTjhFIo1ShD+5XX2TfiJJcTYgTp50ehZpQr0PAjcECyTPIOOOagwBC3 RgmpRRY9FRoG0Q192Ts3sbUg75YSBf5bRK7IZwkD6ZFoWgdGUp2xtdcdDbQEwAWyiBG4 UVHA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Blim+bsj; 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 nh2-20020a17090b364200b002375a3ccf51si1876473pjb.9.2023.03.14.01.11.54; Tue, 14 Mar 2023 01:12:06 -0700 (PDT) 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=Blim+bsj; 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 S230029AbjCNIGV (ORCPT + 99 others); Tue, 14 Mar 2023 04:06:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38876 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230505AbjCNIFs (ORCPT ); Tue, 14 Mar 2023 04:05:48 -0400 Received: from mail-pl1-x635.google.com (mail-pl1-x635.google.com [IPv6:2607:f8b0:4864:20::635]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E247E72B1C for ; Tue, 14 Mar 2023 01:05:40 -0700 (PDT) Received: by mail-pl1-x635.google.com with SMTP id p20so15678492plw.13 for ; Tue, 14 Mar 2023 01:05:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1678781140; 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=KbEuZ8x9epY4wczXQcJX335FU4iMuAmx2Igvv4w4MY4=; b=Blim+bsjx7tnv55ZAmyMK4xpeetRd1ob3PM+2hfLojx4GQETr1DfWSUnWWUKg6fUWB aV+mvGSKBiDPcJfzfudmySE5WvreMfMr82z5e83ZVzgXWikdTAKKJW+cb7M5UqPpNVTa Vv3zZYi3w9waz8r4TUZeklnpybTq8ynW6Hh4+KfKYnz+a26sKLrTAVRb0CIXEq7ekf9D ABuCuqgprYHWWBMfU+ru4yysX7E9KHCQFAyXKnQLl6DZaqBCcNY7XJkzOvCtUxBycs9J 2/t8NgTkaxzlCCvGG1gJ/xxL6R5UOxA/fZ3FwfRNLnATShINDVLM2B/DEXeFU6k7pU+5 +sYA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678781140; 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=KbEuZ8x9epY4wczXQcJX335FU4iMuAmx2Igvv4w4MY4=; b=YNATsElpY+OnpTRlnlvn4UTcZDlz1rjw8nC6G9ZZkJ0SspHhS8PI5Mo4SR7QR8l0sI pgC844vg2JPnACjDEfTcw+McvgUvXakQsn7KJyyal/fV0KQCFg4UOsfkZvhsWfVD+m7p V1jeh8j6Wyb0c1aXRR+oqqwUJTahH7vRWZO40cRVFvBS6AiuaDjLv6yNn3SAjZLU/iM7 wwgsLN4PdeYckt6FseYGejSisxZHCc8Oxw4EqZVYF+3Jv5tpA9NmfVv7xVjNziwJt3Le gUfexsNkitzbxi8v0vX32UUs9SK+0M270xl1iSP6aOTAvuh0fhDwPpNKUXUQ+tWMTdXx DwAw== X-Gm-Message-State: AO0yUKXN/z5YS/w5x1R1CILweNPJfButizbBB/yDKZWyn+hbAUTzoAKx dVjaXPFVnPzi0YefHflkr4No X-Received: by 2002:a17:90a:19:b0:23a:ad68:25a7 with SMTP id 25-20020a17090a001900b0023aad6825a7mr29838033pja.2.1678781140382; Tue, 14 Mar 2023 01:05:40 -0700 (PDT) Received: from localhost.localdomain ([117.217.177.49]) by smtp.gmail.com with ESMTPSA id l8-20020a170902f68800b001994a0f3380sm1078022plg.265.2023.03.14.01.05.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 14 Mar 2023 01:05:39 -0700 (PDT) From: Manivannan Sadhasivam To: andersson@kernel.org, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, bp@alien8.de, tony.luck@intel.com Cc: 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 v8 08/14] arm64: dts: qcom: sm8250: Fix the base addresses of LLCC banks Date: Tue, 14 Mar 2023 13:34:37 +0530 Message-Id: <20230314080443.64635-9-manivannan.sadhasivam@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230314080443.64635-1-manivannan.sadhasivam@linaro.org> References: <20230314080443.64635-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,URIBL_BLOCKED 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?1760330018280158400?= X-GMAIL-MSGID: =?utf-8?q?1760330018280158400?= 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 2f0e460acccd..a13cf98b1ac3 100644 --- a/arch/arm64/boot/dts/qcom/sm8250.dtsi +++ b/arch/arm64/boot/dts/qcom/sm8250.dtsi @@ -3559,8 +3559,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 Tue Mar 14 08:04:38 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Manivannan Sadhasivam X-Patchwork-Id: 69359 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5915:0:0:0:0:0 with SMTP id v21csp1626551wrd; Tue, 14 Mar 2023 01:12:07 -0700 (PDT) X-Google-Smtp-Source: AK7set+aw+NWeh3CRRql15sgzEW4c0OzJCbI2QUUQqpGYf+JlMM+urj5LLbmCWF8d2uJdoY6DPNK X-Received: by 2002:a05:6a21:78aa:b0:b8:723f:e21b with SMTP id bf42-20020a056a2178aa00b000b8723fe21bmr44019269pzc.3.1678781526861; Tue, 14 Mar 2023 01:12:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1678781526; cv=none; d=google.com; s=arc-20160816; b=Hb3+cHME5ZLzDzbNz6Ky6zxJvt2yvUGs7bbMD/cNpEeLdVcAgb+W2iSmpRCMlCYVKK TBBGIjJjovNkZF5xQgPw04tpDwY4tRv4ubO+qzRSB0lWLnJm/kYllswn/aMMA/cKQYK8 bOWHiCuoVW01Aa7mwTVTYGiqye/I747nSZ9lXhsoqh1oDYcOaxd3Z0js3XxjL+gGw3N4 APEb3XgHM6c2S9bG+MSuk+YwtYJ2uWIcRKyZ2ocPxZ9T1unJCAIogeY/AjPFTCE1mmU9 vKx9GVw/YJAMwuqaljv6ppwNTgPcYh7zJYb+Dy/0d7pJbkTdqaJp3fRIgcr6/+GVI74K SIhw== 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=WM/W3mGHWee04PiGhWaePDSEFLq+5Xz9JBoWs5RSs+4=; b=GaNxm+/GIyG7OLVLyt7CfoNepj1+E27tpMKMr8/qWi+2pFqI9igDqRiW8DqaIgyhmk cvBadp37WbX/nUCQmxf1LLFFZ87Tg5aoT4pYuHwcd4/H2h6zKlFEkzAYDeLLn9OXajVT Ll9TLAsbqa51rN4gRumTpJonrmhxUZjd+/45jJn4mu8MSITOtubi8H9oze1rq2kFsAkB HM1jlS1Q3oxKVCzq0LyHKZ+EcRxMIlEiNIwUXGCnJIy5A+j+S2K89u1jdKo4aJvW6pmn ldThz7MHgnHRdJ241V9+HakTn2UkCzlsmzUS7SucfKMBvoeHj+Nti/9OPqaorih5etl0 DrIQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=RDGwems7; 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 66-20020a630445000000b00502f4c63065si1887826pge.95.2023.03.14.01.11.54; Tue, 14 Mar 2023 01:12:06 -0700 (PDT) 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=RDGwems7; 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 S230445AbjCNIGY (ORCPT + 99 others); Tue, 14 Mar 2023 04:06:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38524 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230443AbjCNIFw (ORCPT ); Tue, 14 Mar 2023 04:05:52 -0400 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 3C70A87DB2 for ; Tue, 14 Mar 2023 01:05:46 -0700 (PDT) Received: by mail-pl1-x62b.google.com with SMTP id k2so7829942pll.8 for ; Tue, 14 Mar 2023 01:05:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1678781146; 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=WM/W3mGHWee04PiGhWaePDSEFLq+5Xz9JBoWs5RSs+4=; b=RDGwems7PyJZDZ29pYgfkme1i95dPUInFnXwzopbD6Em5qAza9fIY+En5MtKlgSpqG YEPMHWlaC2/G41YoL0usMUjvOqq6fkjWNI2RQgNUSoJ8ZfjSU3PQicRblMHRdBichWpX F3V6cYIEFrkj1FxBuPNHqp7ry3wbusvjYzSCqEJZbieoKqxWeyfuVvMAI0tNXSlv+lmJ EahXwYc/ksWZIJKinruI87wppf+TUFSw2IyyVpTBJBR1ED8VZh8ycFvca2pz01phKde0 xD8pFjaG4RgYhg3aupoOE+6jC1Dq4epW1Hyjzh1dH5/bF5+H5p4UWzBpA4HgQPTBrXiz 3+Vw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678781146; 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=WM/W3mGHWee04PiGhWaePDSEFLq+5Xz9JBoWs5RSs+4=; b=CTyPSGm+aQipB3q4I2pS0FyjdU7PgNsn4PnyQPu/tPjT8aP7/iwIFxuYRoRS9P+H3m d/mVKxBaD9nNHhxxw6FoyPC3WNjr4P8MAmjYZuHB4woXSgx9GhO6XJLpwgAcXWWv6apN l/7AuXa1iU4iMYcxeLwxK+9XlnxtGpaskGcZXapBcR8Ycz5PTk5maIAi1FHaW+CafpKN tFYz3Ig3dkIl2CJiIae1ky8zWCsT/Rz6I+kxe9ejHyOSFUIyi5lldoLBhWzrjfL8VSlA 6xTgIKQGeer6RAC/gXnP+zyXGdijrka7ST1diBdzlVi35syNZmVlS7UQzchPDX+zzgT6 QKzw== X-Gm-Message-State: AO0yUKX3cMtgaYVSzksO/zUEIrdJr6m8+uipDYHxp5f8eGfmJPdKcEo7 cQ6AjR+YTQioq184hCQCpJ3T X-Received: by 2002:a17:902:d502:b0:19d:16e4:ac0f with SMTP id b2-20020a170902d50200b0019d16e4ac0fmr46377415plg.5.1678781145728; Tue, 14 Mar 2023 01:05:45 -0700 (PDT) Received: from localhost.localdomain ([117.217.177.49]) by smtp.gmail.com with ESMTPSA id l8-20020a170902f68800b001994a0f3380sm1078022plg.265.2023.03.14.01.05.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 14 Mar 2023 01:05:44 -0700 (PDT) From: Manivannan Sadhasivam To: andersson@kernel.org, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, bp@alien8.de, tony.luck@intel.com Cc: 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 v8 09/14] arm64: dts: qcom: sm8350: Fix the base addresses of LLCC banks Date: Tue, 14 Mar 2023 13:34:38 +0530 Message-Id: <20230314080443.64635-10-manivannan.sadhasivam@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230314080443.64635-1-manivannan.sadhasivam@linaro.org> References: <20230314080443.64635-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,URIBL_BLOCKED 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?1760330018314067163?= X-GMAIL-MSGID: =?utf-8?q?1760330018314067163?= 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 1c97e28da6ad..3fefd8cbba6d 100644 --- a/arch/arm64/boot/dts/qcom/sm8350.dtsi +++ b/arch/arm64/boot/dts/qcom/sm8350.dtsi @@ -2204,8 +2204,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"; }; compute_noc: interconnect@a0c0000 { From patchwork Tue Mar 14 08:04:39 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Manivannan Sadhasivam X-Patchwork-Id: 69355 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5915:0:0:0:0:0 with SMTP id v21csp1625142wrd; Tue, 14 Mar 2023 01:07:45 -0700 (PDT) X-Google-Smtp-Source: AK7set9N0PTqFFhRqO0BGWl1L1J02Vley7XMwLfCKYDRLyCgTwMi7GPLgRs5l46axrguXrc9Hz6z X-Received: by 2002:a17:90a:660b:b0:23d:c49:3875 with SMTP id l11-20020a17090a660b00b0023d0c493875mr5703676pjj.33.1678781265399; Tue, 14 Mar 2023 01:07:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1678781265; cv=none; d=google.com; s=arc-20160816; b=kdSJkYskSc+W/wMjswdW+cVBFj7HzH1ZeHsu1C9QWlkxA51yKO4YcJpMq5PBaHzk9W k2A3gHm/Tz4fjDImsDthoHt32E9KRjBTV3swy0uqWSGrEg4xpXjcRQBHddCFZzeoDGCR 6oPemQQtsjGjIoOLtr62kyg1gWaenPLDPILAm9BL3lzK01Buu3tU7DkPQyHffLkjuCT0 oF80pDJY66rMEK5mm7jC+VT+/wcmxXqvE0hAGVmJeIcJGxo8zq2Ak3RQcamt9I1+HYuj TLY0nk7Bie+dMMiqYK53dtWla1NlctEldjEGR1YAmJsOhHUspJuZhee7ZPuOvVPxX9fK oS+w== 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=yqwK6TcGjAz04KGXLoszY4ospGxs4tGDAzQeGyANDbE=; b=iV+SNalhjY5eSwPPulwoQ5zGqlM8dZ27I981fxA7fAK+FIdA37P8UJl8ugLiqgLRCU K6W114SIgAi23OPUrmLlkhA8JmtOPcl5Lqaq0chBC3/2jZXjZxqN1OgUj77hoJJcvJ6a s216IpIW0TrtOS/2brB2c0jLdpdBRR77UzHm8KEoO2VjMEYKJJqLRBiAYVCIgzdVgQki xtXwbqc7jrDqoziDJr6GOGWCw8hKdRDLnLN9vRN3xJfC4bObmH2RrJE9qJ+7CqvNwb4T QMzLtFpZoo/mSrMM1nk+sTasEQNPS1ANazyMqZsce8h6xqUa/5cjmWKlbE2VPj6cRjFg d1dw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="nP/Tw2wi"; 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 m3-20020a632603000000b004fbacd1a872si1680701pgm.853.2023.03.14.01.07.32; Tue, 14 Mar 2023 01:07:45 -0700 (PDT) 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="nP/Tw2wi"; 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 S230430AbjCNIGe (ORCPT + 99 others); Tue, 14 Mar 2023 04:06:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39082 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230406AbjCNIGB (ORCPT ); Tue, 14 Mar 2023 04:06:01 -0400 Received: from mail-pl1-x636.google.com (mail-pl1-x636.google.com [IPv6:2607:f8b0:4864:20::636]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F1006848CC for ; Tue, 14 Mar 2023 01:05:51 -0700 (PDT) Received: by mail-pl1-x636.google.com with SMTP id ix20so9199438plb.3 for ; Tue, 14 Mar 2023 01:05:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1678781151; 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=yqwK6TcGjAz04KGXLoszY4ospGxs4tGDAzQeGyANDbE=; b=nP/Tw2wixTXRLo4uciqirv8e2e05IGj3I3RKHIWEL/gCrS0deSj14T78ipg5nURkyt hZzdCjeuDl1uU7oXq3zjmsgUa70kRudHCDliEUnEFfwtMcuH3ScQw/ptFAghBUU5ElfP LqkHr6cIfMR1H6U3tKB0rJBY7f6+k+HkEKzZ53tD+Mw2fe7QUpqG7utRX80Byf7f1Yfd 4XaQUIwcFOXj8sEQ9E1O3TwuhfktGqaz2hOrvav1zxZdAK4eLDiAQBnOrK2QHUPxUbJ7 0qLNcBhn9NbhGBIUCPyWtDzR7xaBj71gdjEzxOTBUDXtIqEO3cI+5kHJYMEmxv/+oc3/ 9RwQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678781151; 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=yqwK6TcGjAz04KGXLoszY4ospGxs4tGDAzQeGyANDbE=; b=mEDoMYYWCBJc3MzztmyeyD0U0RO3Rnunn0eVRaveKxNlfC8DUNGcAfToJo4mXQBBg7 NzQ6EFm5Z4hQ2zzWhp/onuvdMmR5mJzfKyTlMHURw2HbkynFmFpgYMYmIOSGClZq/q8x KFVmUZuHt+/5X/IH8eppfv/Q+bkmqXyRF2vJQQDEhz2G2+/yPx1/lVI8xu97ETt8CzWF ImEKm41HSdGnKpLND6M/hq6Mwn9cXSv2lk86RUenjI0uUFvA35iWMk5TF/BWnTNqK+pH dSPHYdV+X+3avqxMaX8TERzE9brWEVKc6cAvv3ZGpcViIZwRBnalsR1hAkgN2JXNRN0+ S6dg== X-Gm-Message-State: AO0yUKWDUkx0JLZnyvfkh385Df4v6b9gu0OuQmX5IIlDl+UgpLPAgBqm +qw9yJjWWgF4tr9Ydb2OAPpF X-Received: by 2002:a17:902:c412:b0:19c:be03:d18b with SMTP id k18-20020a170902c41200b0019cbe03d18bmr51755970plk.22.1678781151536; Tue, 14 Mar 2023 01:05:51 -0700 (PDT) Received: from localhost.localdomain ([117.217.177.49]) by smtp.gmail.com with ESMTPSA id l8-20020a170902f68800b001994a0f3380sm1078022plg.265.2023.03.14.01.05.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 14 Mar 2023 01:05:50 -0700 (PDT) From: Manivannan Sadhasivam To: andersson@kernel.org, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, bp@alien8.de, tony.luck@intel.com Cc: 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 v8 10/14] arm64: dts: qcom: sm8450: Fix the base addresses of LLCC banks Date: Tue, 14 Mar 2023 13:34:39 +0530 Message-Id: <20230314080443.64635-11-manivannan.sadhasivam@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230314080443.64635-1-manivannan.sadhasivam@linaro.org> References: <20230314080443.64635-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,URIBL_BLOCKED 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?1760329744084473447?= X-GMAIL-MSGID: =?utf-8?q?1760329744084473447?= 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 1a744a33bcf4..636dc6823d4c 100644 --- a/arch/arm64/boot/dts/qcom/sm8450.dtsi +++ b/arch/arm64/boot/dts/qcom/sm8450.dtsi @@ -3981,8 +3981,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 Tue Mar 14 08:04:40 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Manivannan Sadhasivam X-Patchwork-Id: 69363 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5915:0:0:0:0:0 with SMTP id v21csp1626589wrd; Tue, 14 Mar 2023 01:12:14 -0700 (PDT) X-Google-Smtp-Source: AK7set/+Cp42dF69vwlFx9BymeJRICqtuw7XFrK+lK6pMRHXdIyfAc2w/03Uf2ISA66KmsRRLTiX X-Received: by 2002:a62:1dd6:0:b0:622:e1ad:2534 with SMTP id d205-20020a621dd6000000b00622e1ad2534mr6008082pfd.6.1678781534042; Tue, 14 Mar 2023 01:12:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1678781534; cv=none; d=google.com; s=arc-20160816; b=ua3AwCY8JVQ8veIDW4+DG0w2mFCXqM/bERNprjPxrf5ly+Btv0KCrghRPycmgIDMHf hCLi8Rc/d1GA8Lcv6FOOfa6O95Vsc+GdVJIdSuUtWiZTCPe4dALkV/FTAVfIEK2ihFv2 KMmrxOMfkFJQT3X14DObPg9JdVs3BynnnvoJ/Om1VQpcO9VXCyXFxI8Qa3Qz+4iKcahT vTBbc2WBT1Fhajm7KwY5pcoFeDJpiDl129jwrVJFF4UluMQS7dONJGLZQUVLvLv1uhjQ 6jK9hAS+sy0w4+zCm9nWbHG6FOUbujuNOWon7rFOlXszSUm+c9o1MhZFVzwwPvthpT3N Topw== 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=sggevdgcbKkipnWP4TBoy7JyP1Clj0YxXKdQjrw2BUc=; b=Z5etO8xpPLdp1ZjUYMAWnmC0J6F3DU/p3Gp8jCJujInxH3kj9c7JV8R2rHSSHGGZuI fzlGtozllraFzfKMexG+2cp/NCpQaO8+ebY41XxpTax4nCTQosJV0RkKZ+R7oXh8hATj wwLy1sQw2iYBfcIuWaBWUSgrpT2gkV9LLR4RABujEJId7hoMgeT9NwxIQRupNZ3vbcmz X5dZ7GzPd71DzLaXxRANDlkz/d0J3U2ZQViPIW8LE6O/txgE8WXOB06iqycssQNj5cyJ 3SBpbVQwZq/4vGX0D4U8nKdSyvyfFwCMlO47INlkjJefdO0Rz4WWqE57zcMLcF2FaV9a 0xEg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=n5ShiHu8; 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 s9-20020aa78bc9000000b005a8d205db7bsi1684859pfd.272.2023.03.14.01.12.01; Tue, 14 Mar 2023 01:12:14 -0700 (PDT) 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=n5ShiHu8; 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 S231208AbjCNIG7 (ORCPT + 99 others); Tue, 14 Mar 2023 04:06:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38884 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230423AbjCNIGT (ORCPT ); Tue, 14 Mar 2023 04:06:19 -0400 Received: from mail-pj1-x102e.google.com (mail-pj1-x102e.google.com [IPv6:2607:f8b0:4864:20::102e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D931397FF5 for ; Tue, 14 Mar 2023 01:05:57 -0700 (PDT) Received: by mail-pj1-x102e.google.com with SMTP id l9-20020a17090a3f0900b0023d32684e7fso625884pjc.1 for ; Tue, 14 Mar 2023 01:05:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1678781157; 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=sggevdgcbKkipnWP4TBoy7JyP1Clj0YxXKdQjrw2BUc=; b=n5ShiHu8TkifJ0rpTG3JyQ6+qX/9SlTcOKdiiRJo/l6aDmDiBrYXy1HcKwqr7467jj oEXtF/BwJ27I+1JMUNMVG66bwuQQwdnQx5qfFmOW/QBIUk26+ohXYo2xo96qW/heofsd El6IBaTR2yEu+ge99Ysh36mUSo7WAKF4wLgzThC9+uKTGaCjkshefW7pC28U8qj32lr0 cf6RoTkIRqYduRW7JGM9Bkr5GTUZ7D2CMmHsylcX9uCKA9Cg5BpFjZiAtLejSDqr/2m0 u4MOGQHHdsx9uzIIeSnV82eN0d9vpvKy61lG8/2X+Jnw7ZmEYW5PI34Tc6soqaT4fZmI PnEg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678781157; 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=sggevdgcbKkipnWP4TBoy7JyP1Clj0YxXKdQjrw2BUc=; b=rd1nAhp045Bk/Wsuj2lvGKodilyrWS4Urqq9xMrbuHn4foF21a/f4tvcbIJbdfv+gs olw0AvKG+zkwuOvAO2/PqDb4zznMr5Zv+YrqDYrFf3+7FKUThJ3RvNh4DugS+eq/RzUA weGh/p3Tgjf+ZNKohWljL53UmAAHlIl90/W5G84tGhjjbX2MGagDXPglT707HyfApb3l Ypv/5zfIzlmyuFZcWw8FElIGuIalHL3dksHwVCDrNAr7I9UzhYsNObSU12h7okL/jKvp 4BxhnRotxzZyyn4zkRiH6hTnDOFRiLb8E9TOo6wmUJHoJfG7zkLJ7OFcV3bwoGNr3dmb iAMQ== X-Gm-Message-State: AO0yUKVQgaIdTPiQN4UGU6w1yN6vUNlAiM7NLqPQYpDiYCWT/GpQYsbG 3NpRTpyLZbpSOIe4I7JrLllo X-Received: by 2002:a17:903:24f:b0:19c:c8c8:b545 with SMTP id j15-20020a170903024f00b0019cc8c8b545mr40241222plh.50.1678781157396; Tue, 14 Mar 2023 01:05:57 -0700 (PDT) Received: from localhost.localdomain ([117.217.177.49]) by smtp.gmail.com with ESMTPSA id l8-20020a170902f68800b001994a0f3380sm1078022plg.265.2023.03.14.01.05.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 14 Mar 2023 01:05:56 -0700 (PDT) From: Manivannan Sadhasivam To: andersson@kernel.org, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, bp@alien8.de, tony.luck@intel.com Cc: 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 v8 11/14] arm64: dts: qcom: sm6350: Fix the base addresses of LLCC banks Date: Tue, 14 Mar 2023 13:34:40 +0530 Message-Id: <20230314080443.64635-12-manivannan.sadhasivam@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230314080443.64635-1-manivannan.sadhasivam@linaro.org> References: <20230314080443.64635-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,URIBL_BLOCKED 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?1760330025824987226?= X-GMAIL-MSGID: =?utf-8?q?1760330025824987226?= 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 1e1d366c92c1..63e55579e9c4 100644 --- a/arch/arm64/boot/dts/qcom/sm6350.dtsi +++ b/arch/arm64/boot/dts/qcom/sm6350.dtsi @@ -1348,7 +1348,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 Tue Mar 14 08:04:41 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Manivannan Sadhasivam X-Patchwork-Id: 69367 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5915:0:0:0:0:0 with SMTP id v21csp1626924wrd; Tue, 14 Mar 2023 01:13:22 -0700 (PDT) X-Google-Smtp-Source: AK7set/UpqshIVC/3klwCWLJyzkY2Oz9BtSqt876Mx17AsMNNhiwIrF+Hsnu8rqmot3rqdJmPa5e X-Received: by 2002:a17:902:d549:b0:19c:be09:20d5 with SMTP id z9-20020a170902d54900b0019cbe0920d5mr40263768plf.11.1678781602413; Tue, 14 Mar 2023 01:13:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1678781602; cv=none; d=google.com; s=arc-20160816; b=aaInKnoP0gSuTZxNWFiZgxdWm2p/PA9Z2Nv41YJl8V0HlkNrUkRwhLKhphbiwO1WLx OSHz7MaG2WxwvaB2xxoN/x+LWHB7Ql6FjNQ7twMQUOIviR/Sw7C8tmkjvSpOjyLkUt4s 6h6OH4tXREK9B9UrnZ/vVmh9bDTjgMcuNLobZa7euLk1KCAxHJbUEbzfF2ANEY75NUbK IsWfyT8lq+ueksDuWag/8RULcbA6zYd/+SeT1g/le1Oi4lKpwShXA1glOHP11I4045Oj w+VmLlvaIq8H7kR7TMpiT3Jh4MohN3Pit/pkTHavCmqAz+tRL4qNIwiddOvBriYa/pwC 2mtw== 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=nUusDRy45tnE3HpdbouewJfbkC176V5vp9gS5W4zqOI=; b=o6IFuCnqyneCgcSszDz1G/NtqpG3wktnP01fj9OEycojL1L4DNAwbdcFBKA+bZXDdq gMehSaS7J35heLqP7oDkFXGHVhYCz3yiitBPiXCu0L79tkqtmj+vrIfibK+F0rbQSmDI RlDAjEV9esnNMpSMrZ64nMD2w5wiKf26xI9thXSl57+2V2wQs58iHELLUwG2nNgnLvDz GxfJa++QXlXb284P7HXBvZ/2bRH63qnacn5Q+TLcHLJqVMbuhsrKTiMWSC6jtDcXvATK tbE3KiK/4PfjxostgohsjSEYg8ZGYVDQ/GJUm9ybN3RHNad2ZObt6/tn41X0wMrzDJAA LQlA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=G7ErtDNx; 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 kp8-20020a170903280800b001a044a83f02si1968119plb.20.2023.03.14.01.13.10; Tue, 14 Mar 2023 01:13:22 -0700 (PDT) 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=G7ErtDNx; 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 S230375AbjCNIHK (ORCPT + 99 others); Tue, 14 Mar 2023 04:07:10 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38654 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229667AbjCNIGa (ORCPT ); Tue, 14 Mar 2023 04:06:30 -0400 Received: from mail-pj1-x102e.google.com (mail-pj1-x102e.google.com [IPv6:2607:f8b0:4864:20::102e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1F11A78C8D for ; Tue, 14 Mar 2023 01:06:03 -0700 (PDT) Received: by mail-pj1-x102e.google.com with SMTP id fy10-20020a17090b020a00b0023b4bcf0727so6838644pjb.0 for ; Tue, 14 Mar 2023 01:06:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1678781162; 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=nUusDRy45tnE3HpdbouewJfbkC176V5vp9gS5W4zqOI=; b=G7ErtDNx9DqmYbhi5XSdo2JXgMqH1l30/Yo4ALoFCbLxI4NjJj0p2JlB7adkQ+xJDy Yi73c7srD8V7F5Fb4k3f/GM8e2ewU11ronsqm8ebNuIEJ6MTJgHNvV/zG6q5g44U1QsL P/UltiMdSMly3dPOBgD2Vo6pDu43nCU/+qZqLXaHASVScfP89D+JEl288i1EXs+QeYeV XfVW7Y2ImUxGBZgJjc4tV2GDh4I7eWHcOJmEoXk79zDykPCtQHrmPna6xzqT8CI+EzhM mPymaXdGV31N9tXsWjEzkXqZXzkP6X/u5QbG0SgA5xBG2GtYpCmEMW5keQTZQr5R0fOf ewlg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678781162; 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=nUusDRy45tnE3HpdbouewJfbkC176V5vp9gS5W4zqOI=; b=VHzIiphBtQUOIM1yKwhjlhHhsHe6c/fxUruV+z42hhTuPtweat7DCasR+gNsrlO++T igRofgQT8DdCrhB1SGEzhjFwxJ4ffKN3v7nJypKeYU+z8PgoS04LptyeLivLbhItPnj6 dwN6Qlmid7OVPNyk3myPtMR9qrKze8nA2ipPf3bYn+bq1P6Z9LGI31T2yE/C5Gouomtb 3gu4aFCKQKrkJVCqlqp83cQunC6+wqM4HNV9Ut+j4wTJ02xmiubelIKh7mWuDvyZo6GC +J1Y4gp1cUYXTRVvmyNcaVsV2jG5e04LIEHZEPM8eLn/ZvOGH1vxMIf3eSnG1QvwiwMs zezw== X-Gm-Message-State: AO0yUKVrBRC2dajOjkwBM4e6bdO7BDxxSFMPw6lAS/4ltye1RbuaNhWJ pSUkixlji5Fr+G/JBPCrQiov X-Received: by 2002:a17:90a:fc87:b0:23d:a2a:3ae4 with SMTP id ci7-20020a17090afc8700b0023d0a2a3ae4mr5946081pjb.44.1678781162561; Tue, 14 Mar 2023 01:06:02 -0700 (PDT) Received: from localhost.localdomain ([117.217.177.49]) by smtp.gmail.com with ESMTPSA id l8-20020a170902f68800b001994a0f3380sm1078022plg.265.2023.03.14.01.05.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 14 Mar 2023 01:06:01 -0700 (PDT) From: Manivannan Sadhasivam To: andersson@kernel.org, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, bp@alien8.de, tony.luck@intel.com Cc: 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 v8 12/14] qcom: llcc/edac: Fix the base address used for accessing LLCC banks Date: Tue, 14 Mar 2023 13:34:41 +0530 Message-Id: <20230314080443.64635-13-manivannan.sadhasivam@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230314080443.64635-1-manivannan.sadhasivam@linaro.org> References: <20230314080443.64635-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,URIBL_BLOCKED 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?1760330097673025792?= X-GMAIL-MSGID: =?utf-8?q?1760330097673025792?= 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, there is no need to rely on reg-names property and the base addresses can be obtained using the index. First index is LLCC bank 0 and last index is LLCC broadcast. If the SoC supports more than one bank, then those need to be defined in devicetree for index from 1..N-1. Reported-by: Parikshit Pareek Tested-by: Luca Weiss Tested-by: Steev Klimaszewski # Thinkpad X13s Tested-by: Andrew Halaney # sa8540p-ride Reviewed-by: Borislav Petkov (AMD) 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 Tue Mar 14 08:04:42 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Manivannan Sadhasivam X-Patchwork-Id: 69358 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5915:0:0:0:0:0 with SMTP id v21csp1626546wrd; Tue, 14 Mar 2023 01:12:06 -0700 (PDT) X-Google-Smtp-Source: AK7set9uzm+bqL8YpLnZSKdWg02O+49FUPUH49gdqWBR9t9w19EqboEsrWDNCbYCNQz8r+mlAdZB X-Received: by 2002:a17:902:bd81:b0:19d:137c:2ad2 with SMTP id q1-20020a170902bd8100b0019d137c2ad2mr30684136pls.52.1678781525761; Tue, 14 Mar 2023 01:12:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1678781525; cv=none; d=google.com; s=arc-20160816; b=ZCaeO2F7wRhKqtRyJoVgNL8/+r+C7a6gr5U89+EMZeDPMdiwDqspBHvm+q40gqFrb4 AedTmA+Qr37tGAdL1D0bThwl0ethhxPPgf3l2yo5SwSo4YUaxpVV/AwXHYnAPqTom5pl hKNPDxXIRIRe9mjNhq8J90D6BD89fyU7hxi98hE3zQtCYU5KFZOEvUl+W2BGf1IzIQU8 BBk04lb80ujpABEi+Vvr2XELnrFBbgO2U2H2550ZLOivwd/TyAdROZrRNG1PRY/3TGAA kCfgoGTzysZenBSnkMXk6mapVP/SDtiNZVrzyTCXbZccMXBgheJT1KE9jbcjIbesNjj5 td4Q== 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=hfib3mid0RNv0awlNHyD0vxmGxxP3t1h5XoLVgGQYbk=; b=oZZuE9IFdOwzppD8XwxMqKprtrRk8/idB5coKDLVFg1NlJV52K1UMpFmxYDCJNXXQ4 SvA+fK8N/k0fKR+fec1HIkIh94DTYFMp/IsQi07FlDK2clLIYSUA0R/AnksNjstTSLZe LZHrTXQ5k0IhzEMVH28y8FaTn1CRV5+wpWuiM4EYCLVxjWDuNVfnMCIGpjTRd99Qmack C+S9nE0fQiseOMEX7xfWe7bWG4WvzBP69m9hYfPzIYmXnCh05mKrcDy37BKe4PFXBB0T yi3YqhXneKdBJquCue5RoKiU4OyFiGQ/hqXgAsqNBYhmBTb2Z+67WW2yIYx7e5ltF4xG GKSQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=yf4ZTxot; 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 ka11-20020a170903334b00b0019b0c65027asi1851696plb.511.2023.03.14.01.11.53; Tue, 14 Mar 2023 01:12:05 -0700 (PDT) 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=yf4ZTxot; 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 S231197AbjCNIH3 (ORCPT + 99 others); Tue, 14 Mar 2023 04:07:29 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39316 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230435AbjCNIGt (ORCPT ); Tue, 14 Mar 2023 04:06:49 -0400 Received: from mail-pj1-x1032.google.com (mail-pj1-x1032.google.com [IPv6:2607:f8b0:4864:20::1032]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4386D984D1 for ; Tue, 14 Mar 2023 01:06:09 -0700 (PDT) Received: by mail-pj1-x1032.google.com with SMTP id gp15-20020a17090adf0f00b0023d1bbd9f9eso4088509pjb.0 for ; Tue, 14 Mar 2023 01:06:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1678781168; 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=hfib3mid0RNv0awlNHyD0vxmGxxP3t1h5XoLVgGQYbk=; b=yf4ZTxotOIU67QI6f/wXZ/zJYvgr6n43s20tJqrl65vBN3IC13gEOytr6OGzX8+fD1 0o4CO3msCjAHU1/Dg1lU1YFE9AG9yHSv33akNRqof0AInDypR0SMRDQISBnr1OEpDxRU OVCpOUMU3o212GffdTDsPOqRsJga4/nY8eWtiifY3BS4H+5zeuYI4Kgrkyk4mU4T5lEw MrfX2AglTYOkmUBFZOe6ydxVSWxjUE17qWREIlOkKr8ZspRKhjm+Ym1w7vlyMNHNr5yH WLnUvlbdsNRjOhm35uwDTbyH8eEc82sNNcRYvAr4Rejn046Imzsvcs55nhQ7BcmyMYa4 rI1A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678781168; 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=hfib3mid0RNv0awlNHyD0vxmGxxP3t1h5XoLVgGQYbk=; b=lwI1HqsTB/uW62gGqSjzWq3PVhZftXeCoCs2TEdwFQhZgMm5tqZALwyV8RHFd9yiAF O1RxWMtS5VKYKRuyEMsrYJwjTtrs4SH/LKZBv3jcrA2MTVa5NzAAq05Y03SzpNetKzut BIakQoGSXmdH8K28IDOYDf0/rghbYoxfDC/qKx8kjzuanJzwhrz7J91wRCSM7mHL1jQt gFer562ioxwJnYldO5p7EB9hXNNqYz2Xdts2VARZRY+nxrJI0BNk5MC+diCmnWCgz8dE OuyyGTArmDTy1WmSlu+4Mto9AWv1kc3Y4eqZJiOXa4+qaI8RMP972JnGlJ12BnZacyt1 ps7g== X-Gm-Message-State: AO0yUKW/pGdG02aCCdMhLijAIU5070LXo6xs+uEAUJO/25zeOEQmQpWV jegAzY+29psNJ6lnaXAXK48R X-Received: by 2002:a17:902:d50f:b0:19e:aafe:f7e9 with SMTP id b15-20020a170902d50f00b0019eaafef7e9mr40448490plg.25.1678781168473; Tue, 14 Mar 2023 01:06:08 -0700 (PDT) Received: from localhost.localdomain ([117.217.177.49]) by smtp.gmail.com with ESMTPSA id l8-20020a170902f68800b001994a0f3380sm1078022plg.265.2023.03.14.01.06.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 14 Mar 2023 01:06:07 -0700 (PDT) From: Manivannan Sadhasivam To: andersson@kernel.org, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, bp@alien8.de, tony.luck@intel.com Cc: 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 v8 13/14] qcom: llcc/edac: Support polling mode for ECC handling Date: Tue, 14 Mar 2023 13:34:42 +0530 Message-Id: <20230314080443.64635-14-manivannan.sadhasivam@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230314080443.64635-1-manivannan.sadhasivam@linaro.org> References: <20230314080443.64635-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,URIBL_BLOCKED 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?1760330017322828407?= X-GMAIL-MSGID: =?utf-8?q?1760330017322828407?= 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 Tested-by: Steev Klimaszewski # Thinkpad X13s Tested-by: Andrew Halaney # sa8540p-ride Reviewed-by: Borislav Petkov (AMD) Signed-off-by: Manivannan Sadhasivam --- drivers/edac/qcom_edac.c | 50 +++++++++++++++++++++--------------- drivers/soc/qcom/llcc-qcom.c | 13 +++++----- 2 files changed, 35 insertions(+), 28 deletions(-) diff --git a/drivers/edac/qcom_edac.c b/drivers/edac/qcom_edac.c index 1d3cc1930a74..265e0fb39bc7 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,29 +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; - rc = edac_device_add_device(edev_ctl); - if (rc) - goto out_mem; - - platform_set_drvdata(pdev, edev_ctl); - - /* Request for ecc irq */ + /* Check if LLCC driver has passed 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, + if (ecc_irq > 0) { + /* Use interrupt mode if IRQ is available */ + 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) { + edac_op_state = EDAC_OPSTATE_INT; + goto irq_done; + } + } - return rc; + /* Fall back to polling mode otherwise */ + edev_ctl->poll_msec = ECC_POLL_MSEC; + edev_ctl->edac_check = llcc_ecc_check; + edac_op_state = EDAC_OPSTATE_POLL; -out_dev: - edac_device_del_device(edev_ctl->dev); -out_mem: - edac_device_free_ctl_info(edev_ctl); +irq_done: + rc = edac_device_add_device(edev_ctl); + if (rc) { + edac_device_free_ctl_info(edev_ctl); + return rc; + } + + platform_set_drvdata(pdev, edev_ctl); 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: From patchwork Tue Mar 14 08:04:43 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Manivannan Sadhasivam X-Patchwork-Id: 69370 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5915:0:0:0:0:0 with SMTP id v21csp1628296wrd; Tue, 14 Mar 2023 01:17:07 -0700 (PDT) X-Google-Smtp-Source: AK7set/r6sMAQG/MFc1VzIaRPfAsoiCAu+ILyIXiuc7iBAnoHObHSDd2Nb7wRhOU5ULAb+oDAFFm X-Received: by 2002:a05:6a20:f09:b0:d3:c3e7:30a3 with SMTP id fl9-20020a056a200f0900b000d3c3e730a3mr7948209pzb.48.1678781827127; Tue, 14 Mar 2023 01:17:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1678781827; cv=none; d=google.com; s=arc-20160816; b=aaroJOqilkUi2zwaifkEfuZrvgan2hSSV0rVwawYyY31U97Pxbi0m3DYPTiqPLf06l KDD/FeppZ1zhwuFnjIyE+qrYYZ1ZYbylbLJaRnkEb6AAzlFIamL2xbOkNTIB8iVNoojj 97YEm9QyafBRyPFPN2WN+1Eam8RxNh3yx9FiMJfrveSiAt+qpjvhThF2TI09Fw/5Y2zm krgeiupUs9h1cUmzyTnyOHl0+b6aNxZFFvln9CPy24ghs/WfcvsDACWh9fynFV71uB95 xelaRPBgdf11HFsLVMxI4nx07mLiWWnAjeGPnrscaqPkJGNtZpKiNngKPbziJvOg1n5w TXHw== 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=9I5drFJ/rMd/JOlFD+7l7aDkUVR5wTwBOoMNeSTYK2g=; b=qXyky9ioIms8g5dg9FuJxEn2Lu3MFa6D40om61hZMF2Mox2QIJPnFiNlF9DPpC7bwd sIo7E/rH1Z5GSpk5v047UdNldIDk8rIeneyA29mlOCJWJWftSCaCDTENdBAzvoq6YuIJ dljCNSauORWk3AfMjNUjBBH5o+wFHE9tL1XkOWMCbnzRvarkzK0eAJeznDCAHDFdGl/x j0Bi000xDulh2oa/lkJR7XhTW13hVds8jtmXRVaw/kfNAX1I1ohTjvwC8osZeUQDNasA yk3IWeoWG3S9sCzF1ci4WqUphF58+myDRVeSZysyXtJSIpAfC1ZHhIwUqrwxo0E8O2pJ 6x0Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=gxpv2TEW; 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 y189-20020a6364c6000000b00502f1395a67si1725473pgb.190.2023.03.14.01.16.53; Tue, 14 Mar 2023 01:17:07 -0700 (PDT) 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=gxpv2TEW; 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 S231159AbjCNIHj (ORCPT + 99 others); Tue, 14 Mar 2023 04:07:39 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39032 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230510AbjCNIHI (ORCPT ); Tue, 14 Mar 2023 04:07:08 -0400 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 BE0CA984FB for ; Tue, 14 Mar 2023 01:06:16 -0700 (PDT) Received: by mail-pj1-x1029.google.com with SMTP id j3-20020a17090adc8300b0023d09aea4a6so5185749pjv.5 for ; Tue, 14 Mar 2023 01:06:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1678781175; 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=9I5drFJ/rMd/JOlFD+7l7aDkUVR5wTwBOoMNeSTYK2g=; b=gxpv2TEWg8Y7W3WUjM9DrjNO999BKPLuVBhRigTJvZhAEz2a89xOZ0Xqzf7o2utPf4 1s5JEzbzo2ojCl7xq2aLvcWf1UvoMnJxi/V352UMAP/zO/I+Fz0yWF3q+YRtfKXaR7jk wBps3OZK0ApuO1eysrO95nq0L2134LQtyT/Dz3+tDae8TgAeea2TXL/3xnPe8NovrrdI OIrxUHQ2zhRnMu2l6AUahm7LFjh/MmFOtolvcxlYzEiiZC44/omf3GemnZD4xTDkOGKI aEpOE+dIt4z/6/o4Z1UQNzRDP7S/vIMfkVKWGTCAst/e7iDzCMSycgPo8x8qYWB+8EjM cZIw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678781175; 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=9I5drFJ/rMd/JOlFD+7l7aDkUVR5wTwBOoMNeSTYK2g=; b=ENXKL50JMWPMK9WE43OhlpeD0/IHjIvRn4YM7V434FRfYiwKAXGBKYL8N6nxecOjuN NJJfUxZDTl6KrFCTa9VVUFX99HQ+gnrSrl1ZgyxpzGb094OJUTZXyyrtGb7D8eKCvdJW JTa5Kx3xDzcu3dWLVKjmJXoyPVuEI1185twLrx2YQIS8ae4I7p/THZD7orwQdN7vdaUW lWy7BrGjaevpLeRC6ekagK0VBD2HZ/ZS0JzpuR8/GCtv0l0aBYYxzAYsbllRsa6w3hO3 kp+XT8WNw/4n99rZM6fRgLWfdAyP/Jf2Npe59E1RrDThrCk1+6bKOC8wxMtRsyxKDUfw UTcw== X-Gm-Message-State: AO0yUKURz7+6ep0RsB0sBmcTyGMRWqSZzEMqkGUHuTyajX6gPfw5BPqS aeGwugZLr1IzQBkZiWFZ768L X-Received: by 2002:a17:902:bf4c:b0:19f:2444:409f with SMTP id u12-20020a170902bf4c00b0019f2444409fmr9364264pls.20.1678781175428; Tue, 14 Mar 2023 01:06:15 -0700 (PDT) Received: from localhost.localdomain ([117.217.177.49]) by smtp.gmail.com with ESMTPSA id l8-20020a170902f68800b001994a0f3380sm1078022plg.265.2023.03.14.01.06.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 14 Mar 2023 01:06:14 -0700 (PDT) From: Manivannan Sadhasivam To: andersson@kernel.org, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, bp@alien8.de, tony.luck@intel.com Cc: 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 v8 14/14] soc: qcom: llcc: Do not create EDAC platform device on SDM845 Date: Tue, 14 Mar 2023 13:34:43 +0530 Message-Id: <20230314080443.64635-15-manivannan.sadhasivam@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230314080443.64635-1-manivannan.sadhasivam@linaro.org> References: <20230314080443.64635-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,URIBL_BLOCKED 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?1760330333633507825?= X-GMAIL-MSGID: =?utf-8?q?1760330333633507825?= The platforms based on SDM845 SoC locks the access to EDAC registers in the bootloader. So probing the EDAC driver will result in a crash. Hence, disable the creation of EDAC platform device on all SDM845 devices. The issue has been observed on Lenovo Yoga C630 and DB845c. While at it, also sort the members of `struct qcom_llcc_config` to avoid any holes in-between. Cc: # 5.10 Reported-by: Steev Klimaszewski Signed-off-by: Manivannan Sadhasivam --- drivers/soc/qcom/llcc-qcom.c | 24 +++++++++++++++++------- 1 file changed, 17 insertions(+), 7 deletions(-) diff --git a/drivers/soc/qcom/llcc-qcom.c b/drivers/soc/qcom/llcc-qcom.c index 7b7c5a38bac6..a5140f19f200 100644 --- a/drivers/soc/qcom/llcc-qcom.c +++ b/drivers/soc/qcom/llcc-qcom.c @@ -120,10 +120,11 @@ struct llcc_slice_config { struct qcom_llcc_config { const struct llcc_slice_config *sct_data; - int size; - bool need_llcc_cfg; const u32 *reg_offset; const struct llcc_edac_reg_offset *edac_reg_offset; + int size; + bool need_llcc_cfg; + bool no_edac; }; enum llcc_reg_offset { @@ -452,6 +453,7 @@ static const struct qcom_llcc_config sdm845_cfg = { .need_llcc_cfg = false, .reg_offset = llcc_v1_reg_offset, .edac_reg_offset = &llcc_v1_edac_reg_offset, + .no_edac = true, }; static const struct qcom_llcc_config sm6350_cfg = { @@ -1012,11 +1014,19 @@ static int qcom_llcc_probe(struct platform_device *pdev) drv_data->ecc_irq = platform_get_irq_optional(pdev, 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"); + /* + * On some platforms, the access to EDAC registers will be locked by + * the bootloader. So probing the EDAC driver will result in a crash. + * Hence, disable the creation of EDAC platform device for the + * problematic platforms. + */ + if (!cfg->no_edac) { + 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: