Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp7842670rwb; Mon, 12 Dec 2022 21:31:54 -0800 (PST) X-Google-Smtp-Source: AA0mqf6LW9wW2qAvKyPEga0eZ2kimtNSbLC0lc++X9f6h4AqQVKNPTrsi5Sl/Y/PXp69uH355zca X-Received: by 2002:a17:907:8e85:b0:78d:f454:ba32 with SMTP id tx5-20020a1709078e8500b0078df454ba32mr15134595ejc.49.1670909514619; Mon, 12 Dec 2022 21:31:54 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1670909514; cv=none; d=google.com; s=arc-20160816; b=KrUkKt4yUIOl7RNK/SllVdMn/9BjX3kFHKv3xqVj5a04VysfoLd6IVHLS78/EdIvPt skS55+yQp1H60XaAz0jMPhrKmFPVV0zWzINNa9QrTQeRnqHNo/w7KM0dX/gySl/Tn3Cn sDxYmu2XPfUjYDKc7bs3fA7jbyJJoVkjNola94kXPTopYIe3JuSlWbjBsJ1CCXNFd+Jj i+/NYlhfZIj1CY36rKlW6n29KwKFLiK3Bev8IVHh+ZZrj9A3ZJ8F60knIcVy/l6zUyS4 6TbxAgf6X30AhaExnj0qFHanrfWTZ4QtkRLxUbmljMK4O9h8vJh7HreNh3sr5PY9rETq 16PQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=iYoYQhWJou1xY1HILvG4sxk2kvaHAyApw8QYJCywc2w=; b=NRVIqaDH5304t45XYjeaaNrfADa9oAPywpzW96y54ZNr2DW6Q8z8aXDPv+mUr9eAia F1LpaVD5RrwCBy55RikaVf9MOukMusWERpFjl41UtlhcITr8jB3VHqQJr0RVI8AntvMG x002iHLxKHeuo2OCWTSOdeezin3hAM128xxErfcxvaTDmA2HW77a8gaDLz8kJqwu9egx 2NrVAS9Pc33b1yJY4A1O8q24qxwzX2vYU0mQjJbjDoa+9aBD8MmKceo1gT/DXAoXk3Pm 4cpXH0dzsKCukBRrRBlfNhAr37vSKWj1Mk5XflJI97Y7vUJfckZHgt8m8+R1RqQkRSo2 Smug== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=GYoAsi06; 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 i13-20020a1709064fcd00b007acef3bec44si8265563ejw.221.2022.12.12.21.31.36; Mon, 12 Dec 2022 21:31:54 -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=GYoAsi06; 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 S234035AbiLMF2M (ORCPT + 75 others); Tue, 13 Dec 2022 00:28:12 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33864 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232271AbiLMF2L (ORCPT ); Tue, 13 Dec 2022 00:28:11 -0500 Received: from mail-pf1-x433.google.com (mail-pf1-x433.google.com [IPv6:2607:f8b0:4864:20::433]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E98EAA1B8 for ; Mon, 12 Dec 2022 21:28:09 -0800 (PST) Received: by mail-pf1-x433.google.com with SMTP id n3so1430851pfq.10 for ; Mon, 12 Dec 2022 21:28:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date:from:to :cc:subject:date:message-id:reply-to; bh=iYoYQhWJou1xY1HILvG4sxk2kvaHAyApw8QYJCywc2w=; b=GYoAsi06rrW5fX9uclJQ/U+KcRh994V7NNddvGeQgqaJsIShMY16lqpMQcmkI94N0e aXmTcJ49MbnwIobDFBLBR+Oq5Jg9ADxXk1qH2L3pl2tfMq1aQgTwHbrjfmmH/M2Hp8sz EK2B8VbkVfZlVGlXpFuJ21ssVb3qa5kF47JoFU56F+vKWXzlh3l3GvjdhLDuYVpT5Ndg kbx9gp7N78U6sffwrjRQoTCHhKYqBhmE/TDH0QpIHH3lD5H7fHrQ7x20NwGzSNPpevWC hXbXKCS3T17oWNBvzZsNoZovgOwwntIEfWwI9M5sF0/CHraxIT1Lz209ych8BLRjk9k5 Z/Jg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=iYoYQhWJou1xY1HILvG4sxk2kvaHAyApw8QYJCywc2w=; b=3du53dk5EHcMeP8+ug+YddUiUAIebep2rphw7Vf76NCU+iOEsxwusSdldXZfX9EBzG NuaHQR5xgfZF/32VFTpzlLoWML2AYBZFNqX8sJefkL3p7ZblYQfv1cRfnUr4fiSQYP8l NjrcpVmVCmcBMqb23Q1w2JPWUxKwkofWSdX/4MLPiEtFnjwZqITUrR46af/AqO1xup3E NoJiVbWUbyGL4xptnCS/6x7XyfCzpNTrMRUPk/5VG3StmseQ7Pip0l/fX2HHej//Pffa MUr774zQ39BFa4uvW6VFROgWS6ZxITGMBJlAGJ/BBBUasf1zYhUgzcoxSG49EHcz59He FKHQ== X-Gm-Message-State: ANoB5pkQeWcuZS33t5FsHGB6qciZCocIwY9vx/tpjqLtMsXeZ6cJ5kWe 914yzNqMFLs4FEa6YtuZ1TQd X-Received: by 2002:a62:cd0c:0:b0:577:2a9:96ef with SMTP id o12-20020a62cd0c000000b0057702a996efmr21025176pfg.28.1670909289300; Mon, 12 Dec 2022 21:28:09 -0800 (PST) Received: from thinkpad ([220.158.158.136]) by smtp.gmail.com with ESMTPSA id z13-20020aa79e4d000000b005779110635asm6715221pfq.51.2022.12.12.21.28.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 12 Dec 2022 21:28:08 -0800 (PST) Date: Tue, 13 Dec 2022 10:58:02 +0530 From: Manivannan Sadhasivam To: 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 Subject: Re: [PATCH v2 00/13] Qcom: LLCC/EDAC: Fix base address used for LLCC banks Message-ID: <20221213052802.GB4862@thinkpad> References: <20221212123311.146261-1-manivannan.sadhasivam@linaro.org> <20221212192340.evgtbpzmw7hcdolb@halaney-x13s> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20221212192340.evgtbpzmw7hcdolb@halaney-x13s> 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 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"); Please test and let me know. I will add this as a new patch in next version. Thanks, Mani > Thanks, > Andrew > -- மணிவண்ணன் சதாசிவம்