Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp8662539rwb; Tue, 13 Dec 2022 08:59:45 -0800 (PST) X-Google-Smtp-Source: AA0mqf5zUATazCRrn0nHxX6XW6M+P7/X4AfpmCwN98H/B1/982QeIP+E/h7NOgqqQtCHEcvfG5hZ X-Received: by 2002:a17:902:7b97:b0:189:f84:c24 with SMTP id w23-20020a1709027b9700b001890f840c24mr20067290pll.24.1670950785401; Tue, 13 Dec 2022 08:59:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1670950785; cv=none; d=google.com; s=arc-20160816; b=rHmzqn4r+y8k1VJnr32Ped7w1MRNpgKudSJrJjMcna3386BM9hjBLfH0MC6Ilfg+5/ VTZWgLo25rqi4DqLUO1l47BIckf2EojHFc2jeXmPlrxQNLoR78MDyC4kMx4ZVAmYj+3B 0LYTxOvAtUIlO6rMcB6YFeeYc4XLdNef32JGnslznyFFeGykQ9X/uSrODG5sUqVS04qW JdCJW8Ve5ZE8uUitk184yloWqTYKklsH4vA/9t+Zd/L40F8aj8lzC4OkV98QLn9g5f7w hB/e1lwX2idYXSGDUkX/KdjqlqkvdUnDIlhjGMBtWwA1zosrGbsFzKpXyfusvqBjDfB/ nNEw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=K+q9dHIAvDf5WdQnh9GflHshtAb0HGooV+00C3PXCO0=; b=OObnsgJKIgsztEJLuJZHoZnC7puVnSEYCzEWu9CI2ysUtxCPvxjWIJNIZ/BGhxRPY3 cr6i9YdkFg2/kZsMTHVB5C9VFhSei0dY3pRgSyxH0th4byxHy/0anoNYMRWHDMRfdQ3E PYqnGYsqIYKOU6nxD2eRt20x2evsXpV5Ue/xvCxuJ85qtfc2GQuKSos6PuI1z4T+bQvr 42mIBs2d3trMo4quXmaq6fIGwD8IbhTEkOslN/+YJ7byXb7sGr6VF1Zr3yB8AikRCE98 QwERGHQLUJfsxY93+qaYlW31I4LHV/oXCkL0XEFDYng1tDeBuaYibm5SZLzwEw3O9ldZ RBsg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="DDbr/cxi"; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id l18-20020a170902d05200b0018c0bca1e24si224070pll.271.2022.12.13.08.59.35; Tue, 13 Dec 2022 08:59:45 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="DDbr/cxi"; 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 S235640AbiLMQ5Y (ORCPT + 74 others); Tue, 13 Dec 2022 11:57:24 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57118 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236318AbiLMQ4X (ORCPT ); Tue, 13 Dec 2022 11:56:23 -0500 Received: from mail-lj1-x234.google.com (mail-lj1-x234.google.com [IPv6:2a00:1450:4864:20::234]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3924023E92 for ; Tue, 13 Dec 2022 08:55:04 -0800 (PST) Received: by mail-lj1-x234.google.com with SMTP id g14so3890940ljh.10 for ; Tue, 13 Dec 2022 08:55:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=K+q9dHIAvDf5WdQnh9GflHshtAb0HGooV+00C3PXCO0=; b=DDbr/cxiZKAiaoP5Z9oe6GAJInMKVGPFMv2FHk0AjMWMYDqxxydgX/t/B9vqdyVkLH eeGztqCjsey5soHWK/I3+egsrPRKaO18Tbu1TelbxboVjuSklVo3Kd5W4CaOuvGAnFS1 Z2odjCQmKRTtGmqPkG8id7yxfjfqtNkPQPSBhnQAZstmsRYzgBQA4gNhpcNwyIkaWvNF 8AzFlf5bKX5S8zj+146jUXzJd0UD8DjOxF+lGmpr3Uuq4SoCYly6eeDbgMoBQc8ImHrX MK3uBgNLTA3o3KcFkQBMj28vY+oHzaDojD4qzTCd6LhaHvxwKxTQu7BRahDKSPYiSF5y OtBA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=K+q9dHIAvDf5WdQnh9GflHshtAb0HGooV+00C3PXCO0=; b=iDdBdr8Tt6JkODc0nr71hCzWumTQBcpSxALkl9wFKgj9RRmh4YhLu+Zf4M5RidxHYS 1GAGLQIF/kGgtEAebM/9th0J8A8XJn8ZAI7MU58esewV8w5RBLukYcp1k++tGnLjuTFv tr2ggieNhrEbKJ75Zwp/d9b+TzaShBy5u4egTxXAEt3aB4fkG6hpqsxbR/4a3DnBNjAd FGqQBcXyRC6rzHb8A6OJtsbb+IHIDuKQMWDsBRi3/QmyNvOKmIFb/mpsDMb0UCvB3rLe n/+mPXXsdw35lZQ/7je8Bmm6XZbDrJ9r+23jzrcT9+qkRGr4uX1jk1xnAZ7wK2zjS9TX BDtg== X-Gm-Message-State: ANoB5pnauudTE232U3SjAyjnGJY3LyaG3e+W4gWlmKQJXw4KfnGchrM+ 8jWkCk/h6SbaxfYN1CtohPu/HQ== X-Received: by 2002:a05:651c:247:b0:277:af4:aa34 with SMTP id x7-20020a05651c024700b002770af4aa34mr4957085ljn.36.1670950498042; Tue, 13 Dec 2022 08:54:58 -0800 (PST) Received: from [192.168.0.20] (088156142067.dynamic-2-waw-k-3-2-0.vectranet.pl. [88.156.142.67]) by smtp.gmail.com with ESMTPSA id 13-20020a05651c128d00b0026dd4be2290sm323317ljc.90.2022.12.13.08.54.57 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 13 Dec 2022 08:54:57 -0800 (PST) Message-ID: Date: Tue, 13 Dec 2022 17:54:56 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.5.1 Subject: Re: [PATCH v2 00/13] Qcom: LLCC/EDAC: Fix base address used for LLCC banks Content-Language: en-US To: Manivannan Sadhasivam , Andrew Halaney Cc: andersson@kernel.org, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, bp@alien8.de, tony.luck@intel.com, quic_saipraka@quicinc.com, konrad.dybcio@linaro.org, linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, james.morse@arm.com, mchehab@kernel.org, rric@kernel.org, linux-edac@vger.kernel.org, quic_ppareek@quicinc.com, luca.weiss@fairphone.com References: <20221212123311.146261-1-manivannan.sadhasivam@linaro.org> <20221212192340.evgtbpzmw7hcdolb@halaney-x13s> <20221213052802.GB4862@thinkpad> From: Krzysztof Kozlowski In-Reply-To: <20221213052802.GB4862@thinkpad> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 13/12/2022 06:28, Manivannan Sadhasivam wrote: > On Mon, Dec 12, 2022 at 01:23:40PM -0600, Andrew Halaney wrote: >> On Mon, Dec 12, 2022 at 06:02:58PM +0530, 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. >>> >>> 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 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). >>> >>> For fixing this issue, let's obtain the base address of each LLCC bank from >>> 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. >>> >> >> Tested-by: Andrew Halaney # sa8540p-ride >> > > Thanks! > >> I took this for a quick spin on the qdrive3 I've got access to without >> any issue: >> >> [root@localhost ~]# modprobe qcom_edac >> [root@localhost ~]# dmesg | grep -i edac >> [ 0.620723] EDAC MC: Ver: 3.0.0 >> [ 1.165417] ghes_edac: GHES probing device list is empty >> [ 594.688103] EDAC DEVICE0: Giving out device to module qcom_llcc_edac controller llcc: DEV qcom_llcc_edac (INTERRUPT) >> [root@localhost ~]# cat /proc/interrupts | grep ecc >> 174: 0 0 0 0 0 0 0 0 GICv3 614 Level llcc_ecc >> [root@localhost ~]# >> >> Potentially stupid question, but are users expected to manually load the >> driver as I did? I don't see how it would be loaded automatically in the >> current state, but thought it was funny that I needed to modprobe >> myself. >> >> Please let me know if you want me to do any more further testing! >> > > Well, I always ended up using the driver as a built-in. I do make it module for > build test but never really used it as a module, so didn't catch this issue. > > This is due to the module alias not exported by the qcom_edac driver. Below > diff allows kernel to autoload it: > > diff --git a/drivers/edac/qcom_edac.c b/drivers/edac/qcom_edac.c > index f7afb5375293..13919d01c22d 100644 > --- a/drivers/edac/qcom_edac.c > +++ b/drivers/edac/qcom_edac.c > @@ -419,3 +419,4 @@ module_platform_driver(qcom_llcc_edac_driver); > > MODULE_DESCRIPTION("QCOM EDAC driver"); > MODULE_LICENSE("GPL v2"); > +MODULE_ALIAS("platform:qcom_llcc_edac"); While this is a way to fix it, but instead of creating aliases for wrong names, either a correct name should be used or driver should receive ID table. Best regards, Krzysztof