Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp696974rwb; Thu, 8 Dec 2022 01:34:40 -0800 (PST) X-Google-Smtp-Source: AA0mqf4HPuU7eYH1H6NwazqTT7sBYBd8oZu8CHUVzKDmEee8pvE7o0LA/KaK26w/Vr/PDxODmFOV X-Received: by 2002:aa7:d911:0:b0:46b:c156:9945 with SMTP id a17-20020aa7d911000000b0046bc1569945mr30386832edr.350.1670492079851; Thu, 08 Dec 2022 01:34:39 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1670492079; cv=none; d=google.com; s=arc-20160816; b=TwdP8JtymxsdqAFZGCdzhG09YGNvjeashau/dK4augtFIme4EQNaUpa9X4Ntex2GsR HFbaffzc9OIO4UiRpkLue0WI9o6Xaleyrtysyu7BQ80N8zGZEDATL7ed6sasXe95+Cny CeV7Fs3BHTe61xKFI4Sjg29pi5mP5FKJim8IcsMz6ohMpioz3NcsjSw9bUs5KzAlgRVr M2I5mKxaRS/EBfePNXaq3XuzVHQsLaNTFMaoq7j/thhZOAOBILNPsSDTKk5il6YAm1Uu geaK+fr4zKdD3ScbH2JtUWmIb9h0AR95IiP9S0FWVf6CGMehNzLmhizNUcAED0ASjtqo /4lQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:references:to:from:subject:cc :message-id:date:content-transfer-encoding:mime-version :dkim-signature; bh=elLETLSwT7VH5/W4TgvYIEFkfudJUq+gajumeb0E6/U=; b=pkHwyOPnVIQD35AcJAyLmnXRY+FqjrrkhHCoMvVIBv5pgqY+79d41wJfB+ZKkRXN6R YccLHWrLWppyVB16VvY5e7xXqWv83czHURsTgZj057bxDliyhXRqrJb6AL3U697prwxZ aqxM7OhI1QnPnoRYiu6pg5pN2zozBT48fI0dtJBYZj5jadAUdYwtrVtGEQ/E6fdS2WLJ dulQZLZW26tHz83ks+J5QVlMRyLFY7E60mCoLMEng8N0N+euRl71tk48APqW7xTC1eiy FRqQQeMHF3/6+4VZckvflxtZmSdgIaJYO4tSAFGGeRYIeaLMyAsFdCevG8HxUvk1oGPh ti/A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@fairphone.com header.s=fair header.b=Xl8lOWPu; 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=fairphone.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id gb27-20020a170907961b00b007c0c9bd6211si15565238ejc.357.2022.12.08.01.34.22; Thu, 08 Dec 2022 01:34:39 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@fairphone.com header.s=fair header.b=Xl8lOWPu; 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=fairphone.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230247AbiLHJSL (ORCPT + 72 others); Thu, 8 Dec 2022 04:18:11 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51440 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230211AbiLHJRs (ORCPT ); Thu, 8 Dec 2022 04:17:48 -0500 Received: from mail-ej1-x635.google.com (mail-ej1-x635.google.com [IPv6:2a00:1450:4864:20::635]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9E5586E542 for ; Thu, 8 Dec 2022 01:16:29 -0800 (PST) Received: by mail-ej1-x635.google.com with SMTP id b2so2386304eja.7 for ; Thu, 08 Dec 2022 01:16:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fairphone.com; s=fair; h=in-reply-to:references:to:from:subject:cc:message-id:date :content-transfer-encoding:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=elLETLSwT7VH5/W4TgvYIEFkfudJUq+gajumeb0E6/U=; b=Xl8lOWPuf4BgoDd/DR8s1V45KSGql1YN70Pv5eJQ/LXtaGwoWHadHCKIlwDL6S3v4e 3XUIT3PgBdyik1lIe4RPpyMZKrqUuNAgd1/adXZ5ktp1QEdq3r5akAXTRrFwSZEibo6H N4VPKByeukXcn3IRw4Qs70d9PMhIVYW3DFe0GgPzVHT1nZF4SeNunQ9IwTvKvE+uVYwx mjW57fmwrHNLjt3LkDhHANcQYSRZcfKJDq3fI0bB2p80CZJM6+DW1dun0AYyK1qMQQLq nX6ap/pjzA0gP7ZYgULa85ZZJ0n4TWr3PKg7gdWsL2EnMPLT7c/fESFvR0TLokhNzSmI IEIw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=in-reply-to:references:to:from:subject:cc:message-id:date :content-transfer-encoding:mime-version:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=elLETLSwT7VH5/W4TgvYIEFkfudJUq+gajumeb0E6/U=; b=ySCqZK2HC1yE0rWwZ0ALkv6UTY77TkCEPrLsyeaE0Ujb8DbBzfsdDSh2M+rd/HqrsJ 4+ihiCugJ9yl/AH87s+AiWcvHjqMxqzdtTTD5rxvetRxNpNP9lmOgLBCVzDyqq1asMqG +yXsmedPZA5PD7kckAR9Bp3Sua3ldtUfHBv+TpfYlbaCpRMVM0KgQg+Wwja44R72OXP9 lyfqKky3K7VT6FqylyHntAHdvuOaklENL6rVfhJAS6qt5N7U5g9L7NZAQE/jq+eW2Cha BFgvwWTAW5VTEz+hzaJIQQ8oGqtgBduEcObz0wfpHRp0+eZWhn+QGVZYEaTi5A9U/baB A2bg== X-Gm-Message-State: ANoB5pnC6HztO6c3TevrR7JzUGnKpRbz+iuZZgF6NdiobC7vwfTqB0/4 d57FoWMnva1Inj6gC/XSJc4F5w== X-Received: by 2002:a17:907:cb83:b0:7a7:3f0c:e99b with SMTP id un3-20020a170907cb8300b007a73f0ce99bmr2022155ejc.6.1670490988109; Thu, 08 Dec 2022 01:16:28 -0800 (PST) Received: from localhost (144-178-202-138.static.ef-service.nl. [144.178.202.138]) by smtp.gmail.com with ESMTPSA id kv22-20020a17090778d600b007c0be4861e8sm5018404ejc.23.2022.12.08.01.16.27 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 08 Dec 2022 01:16:27 -0800 (PST) Mime-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=UTF-8 Date: Thu, 08 Dec 2022 10:16:27 +0100 Message-Id: Cc: , , , , , , , , Subject: Re: [PATCH 00/12] Qcom: LLCC/EDAC: Fix base address used for LLCC banks From: "Luca Weiss" To: "Manivannan Sadhasivam" , , , , , X-Mailer: aerc 0.13.0 References: <20221207135922.314827-1-manivannan.sadhasivam@linaro.org> In-Reply-To: <20221207135922.314827-1-manivannan.sadhasivam@linaro.org> X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Manivannan, On Wed Dec 7, 2022 at 2:59 PM CET, Manivannan Sadhasivam wrote: > The Qualcomm LLCC/EDAC drivers were using a fixed register stride for > accessing the (Control and Status Regsiters) CSRs of each LLCC bank. > This offset only works for some SoCs like SDM845 for which driver support > was initially added. > =20 > 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 regist= er > stride for accessing the CSRs of each bank. By doing so could result in a > crash with the current drivers. So far this crash is not reported since > EDAC_QCOM driver is not enabled in ARM64 defconfig and no one tested the > driver extensively by triggering the EDAC IRQ (that's where each bank > CSRs are accessed). > =20 > For fixing this issue, let's obtain the base address of each LLCC bank fr= om > devicetree and get rid of the fixed stride. > > This series affects multiple platforms but I have only tested this on > SM8250 and SM8450. Testing on other platforms is welcomed. If you can tell me *how* I can test it, I'd be happy to test the series on sm6350, like how to trigger the EDAC IRQ. So far without any extra patches I don't even see the driver probing, with this in kconfig +CONFIG_EDAC=3Dy +CONFIG_EDAC_QCOM=3Dy I do have /sys/bus/platform/drivers/qcom_llcc_edac at runtime but nothing in there (except bind, uevent and unbind), and also nothing interesting in dmesg with "llcc", with edac there's just this message: [ 0.064800] EDAC MC: Ver: 3.0.0 From what I'm seeing now the edac driver is only registered if the interrupt is specified but it doesn't seem like sm6350 (=3Dlagoon) has this irq? Downstream dts is just this: cache-controller@9200000 { compatible =3D "lagoon-llcc-v1"; reg =3D <0x9200000 0x50000> , <0x9600000 0x50000>; reg-names =3D "llcc_base", "llcc_broadcast_base"; cap-based-alloc-and-pwr-collapse; }; From looking at the downstream code, perhaps it's using the polling mode there? /* Request for ecc irq */ ecc_irq =3D llcc_driv_data->ecc_irq; if (ecc_irq < 0) { dev_info(dev, "No ECC IRQ; defaulting to polling mode\n"); Let me know what you think. Regards Luca > > Thanks, > Mani > > Manivannan Sadhasivam (12): > dt-bindings: arm: msm: Update the maintainers for LLCC > dt-bindings: arm: msm: Fix register regions used for LLCC banks > arm64: dts: qcom: sdm845: Fix the base addresses of LLCC banks > arm64: dts: qcom: sc7180: Fix the base addresses of LLCC banks > arm64: dts: qcom: sc7280: Fix the base addresses of LLCC banks > arm64: dts: qcom: sc8280xp: Fix the base addresses of LLCC banks > arm64: dts: qcom: sm8150: Fix the base addresses of LLCC banks > arm64: dts: qcom: sm8250: Fix the base addresses of LLCC banks > arm64: dts: qcom: sm8350: Fix the base addresses of LLCC banks > arm64: dts: qcom: sm8450: Fix the base addresses of LLCC banks > arm64: dts: qcom: sm6350: Fix the base addresses of LLCC banks > qcom: llcc/edac: Fix the base address used for accessing LLCC banks > > .../bindings/arm/msm/qcom,llcc.yaml | 128 ++++++++++++++++-- > arch/arm64/boot/dts/qcom/sc7180.dtsi | 2 +- > arch/arm64/boot/dts/qcom/sc7280.dtsi | 5 +- > arch/arm64/boot/dts/qcom/sc8280xp.dtsi | 10 +- > arch/arm64/boot/dts/qcom/sdm845.dtsi | 7 +- > arch/arm64/boot/dts/qcom/sm6350.dtsi | 2 +- > arch/arm64/boot/dts/qcom/sm8150.dtsi | 7 +- > arch/arm64/boot/dts/qcom/sm8250.dtsi | 7 +- > arch/arm64/boot/dts/qcom/sm8350.dtsi | 7 +- > arch/arm64/boot/dts/qcom/sm8450.dtsi | 7 +- > drivers/edac/qcom_edac.c | 14 +- > drivers/soc/qcom/llcc-qcom.c | 64 +++++---- > include/linux/soc/qcom/llcc-qcom.h | 4 +- > 13 files changed, 197 insertions(+), 67 deletions(-) > > --=20 > 2.25.1