Message ID | 20221228084028.46528-2-manivannan.sadhasivam@linaro.org |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4e01:0:0:0:0:0 with SMTP id p1csp1783292wrt; Wed, 28 Dec 2022 00:42:08 -0800 (PST) X-Google-Smtp-Source: AMrXdXtzm8gM7ERJV6ltDneKqVO8vY7i3Rla1pvzTU1KELlTrSHD+MKhDFsXVpBb4El3FybC+gTY X-Received: by 2002:a05:6a00:450a:b0:56e:664f:a5f5 with SMTP id cw10-20020a056a00450a00b0056e664fa5f5mr29743363pfb.8.1672216928351; Wed, 28 Dec 2022 00:42:08 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1672216928; cv=none; d=google.com; s=arc-20160816; b=tGf8YFO/I+CrjFSrL04gJnF+4wR5So+ABG3qqdsj0wUIRYDymCWDiK3ke1X7EOtPTo wxb5XVZpdrvPj9eqXU/hC0JY9q/UVHgsIMPtnsWVNg6p9Ez2vmVXhKQCmR5yGTVs2nmM qSZu6r7VJ7D0Pcrei+cjOJJVluVvQZwz0Rgen6hRWb6+MIiKcuaF2UyebEuWtO+g8dtl 2TwEdiSfh+kLn4qvz3anVvpuW3ASRzSHd9Yk3DKGGf2s+t8E/mavCneEu1UvVXeD2IDF P4yu+GYmgL9yi6nR+M0WQmjbPevL4fEsH4yWcCdtE06GTgTYeuro20FIPsxw3/oHqUtM 1SVA== 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=neDlpAxOqPxKQsX09z7HIhUpqVcLiuVepxClOJ3AnCk=; b=p6YiDhJvjFWg7Bss7g2UROgJjuFSe3OmqqnIrpISG7dcPBHkLvCsgEVaAHzSDhsP6+ 1KMxmm5OTIPH8/YnjXH5egW8FjAsVSDXNY4HiUCG8S4WEochadBSNKzUG4fYk6DAPAIR vmPMvuLLGzZ/z4liXVRwImH+yC9BHqKJTgC8mGO5ExU+c0PLlQAhOc2W+F5le/m31M7s VuVR4X/aTiLMnPipR9PMu4imeEj/Zs4VSUbOesVlag+jwWpcPLgxR5hgthXR8EEnDYKz 0zn20PtUWfCNavCqSM930v9CAIja6ONEX/mVYnPpM+7o4n05SnRuG5c2QliCT77C2FZC UIBA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=TO9dKYGs; 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 u1-20020a626001000000b0057a74250665si15472012pfb.310.2022.12.28.00.41.56; Wed, 28 Dec 2022 00:42:08 -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=TO9dKYGs; 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 S232674AbiL1IlU (ORCPT <rfc822;eddaouddi.ayoub@gmail.com> + 99 others); Wed, 28 Dec 2022 03:41:20 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45516 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232659AbiL1IlA (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Wed, 28 Dec 2022 03:41:00 -0500 Received: from mail-pg1-x52d.google.com (mail-pg1-x52d.google.com [IPv6:2607:f8b0:4864:20::52d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 45DF8268 for <linux-kernel@vger.kernel.org>; Wed, 28 Dec 2022 00:40:50 -0800 (PST) Received: by mail-pg1-x52d.google.com with SMTP id 7so10203577pga.1 for <linux-kernel@vger.kernel.org>; Wed, 28 Dec 2022 00:40:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=neDlpAxOqPxKQsX09z7HIhUpqVcLiuVepxClOJ3AnCk=; b=TO9dKYGst245T1FMDa9SJ7Cxs4BbwS8yCPhWehj2oL1iNJWyO2XcJefzEiXWM6sR+z 1Fa3k6LqqS9mh5h5Iisk7cYKSGWAQsUAlL6CtNJou0B5lAhT9FP30D2aMfRfXixnha18 u3gSjZtQtaZWdpEzyasM0yOETDO8dugLpvvf9fLCZKeLO/kZnCTg8qvsuI1f/Ym7QKRj HV5VrmX/gP8FkhRCkIsLu3QZTwJoVBOpTzA5nBDPrt8tT2THbC2MVh15GpVEICGLEtWN enEq6qEW39ZV1z0Y3QUdwp02JupQ22ZktOsyg+AfteXCuQP0QaNBDjHeDBz0w5ZD9cT0 EIvQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=neDlpAxOqPxKQsX09z7HIhUpqVcLiuVepxClOJ3AnCk=; b=Fq3i6lATOurOKK9Emq1X5ks5KOXAR9Nm481O83C8Sd2+opcn4ah43zhXB5W1aC1Fa2 VRYfY+1fLD2S4ia8kVOe1HFFZ9i5HjJ5+1gYSJa6oV2bovy1IoLl3mJ2hgbiSIOQuVWG 9e8TP0qABss3QCLQAjna1yaLtKPrMX+VXlkUtAo3JTVI3P5c0SboksIXC7U+HPE8USvO 2jK4qOXCOveYjWYCieObI8/3GIpCAfq6tIILJa7Y8gvRTGPscaKWaGG5Dy9zbQy01bvt f0QvXU60STgBZTe2PgqGIx/KJceKGQL7XjmDF3Z+I14F4TNJIXUINEs1aByV7E9V0Obj /UeQ== X-Gm-Message-State: AFqh2kpNv6pIuBsMkW4l038jGIQq0NIPYxtn/hgvrUuUovo9pN5d9EwQ u7f8wUyL2zC7/DLSPrXtBS1B X-Received: by 2002:a05:6a00:1da2:b0:57d:8b30:db0a with SMTP id z34-20020a056a001da200b0057d8b30db0amr27459818pfw.9.1672216850324; Wed, 28 Dec 2022 00:40:50 -0800 (PST) Received: from localhost.localdomain ([117.217.178.73]) by smtp.gmail.com with ESMTPSA id d188-20020a6236c5000000b0057a9b146592sm9786286pfa.186.2022.12.28.00.40.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 28 Dec 2022 00:40:49 -0800 (PST) From: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org> To: andersson@kernel.org, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, bp@alien8.de, tony.luck@intel.com Cc: quic_saipraka@quicinc.com, konrad.dybcio@linaro.org, linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, james.morse@arm.com, mchehab@kernel.org, rric@kernel.org, linux-edac@vger.kernel.org, quic_ppareek@quicinc.com, luca.weiss@fairphone.com, ahalaney@redhat.com, steev@kali.org, Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>, stable@vger.kernel.org Subject: [PATCH v5 01/17] EDAC/device: Make use of poll_msec value in edac_device_ctl_info struct Date: Wed, 28 Dec 2022 14:10:12 +0530 Message-Id: <20221228084028.46528-2-manivannan.sadhasivam@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20221228084028.46528-1-manivannan.sadhasivam@linaro.org> References: <20221228084028.46528-1-manivannan.sadhasivam@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1753446537981409275?= X-GMAIL-MSGID: =?utf-8?q?1753446537981409275?= |
Series |
Qcom: LLCC/EDAC: Fix base address used for LLCC banks
|
|
Commit Message
Manivannan Sadhasivam
Dec. 28, 2022, 8:40 a.m. UTC
The EDAC drivers may optionally pass the poll_msec value. Use that value if available, else fall back to 1000ms. Cc: <stable@vger.kernel.org> # 4.9 Fixes: e27e3dac6517 ("drivers/edac: add edac_device class") Tested-by: Steev Klimaszewski <steev@kali.org> # Thinkpad X13s Tested-by: Andrew Halaney <ahalaney@redhat.com> # sa8540p-ride Reported-by: Luca Weiss <luca.weiss@fairphone.com> Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org> --- drivers/edac/edac_device.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Comments
On Wed, Dec 28, 2022 at 02:10:12PM +0530, Manivannan Sadhasivam wrote: > The EDAC drivers may optionally pass the poll_msec value. Use that value if > available, else fall back to 1000ms. Use this version for your next submission pls: --- From: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org> Date: Wed, 28 Dec 2022 14:10:12 +0530 Subject: [PATCH] EDAC/device: Respect any driver-supplied workqueue polling value The EDAC drivers may optionally pass the poll_msec value. Use that value if available, else fall back to 1000ms. [ bp: Touchups. ] Fixes: e27e3dac6517 ("drivers/edac: add edac_device class") Reported-by: Luca Weiss <luca.weiss@fairphone.com> Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org> Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de> Tested-by: Steev Klimaszewski <steev@kali.org> # Thinkpad X13s Tested-by: Andrew Halaney <ahalaney@redhat.com> # sa8540p-ride Cc: <stable@vger.kernel.org> # 4.9 Link: https://lore.kernel.org/r/COZYL8MWN97H.MROQ391BGA09@otso --- drivers/edac/edac_device.c | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/drivers/edac/edac_device.c b/drivers/edac/edac_device.c index 19522c568aa5..a50b7bcfb731 100644 --- a/drivers/edac/edac_device.c +++ b/drivers/edac/edac_device.c @@ -34,6 +34,9 @@ static DEFINE_MUTEX(device_ctls_mutex); static LIST_HEAD(edac_device_list); +/* Default workqueue processing interval on this instance, in msecs */ +#define DEFAULT_POLL_INTERVAL 1000 + #ifdef CONFIG_EDAC_DEBUG static void edac_device_dump_device(struct edac_device_ctl_info *edac_dev) { @@ -336,7 +339,7 @@ static void edac_device_workq_function(struct work_struct *work_req) * whole one second to save timers firing all over the period * between integral seconds */ - if (edac_dev->poll_msec == 1000) + if (edac_dev->poll_msec == DEFAULT_POLL_INTERVAL) edac_queue_work(&edac_dev->work, round_jiffies_relative(edac_dev->delay)); else edac_queue_work(&edac_dev->work, edac_dev->delay); @@ -366,7 +369,7 @@ static void edac_device_workq_setup(struct edac_device_ctl_info *edac_dev, * timers firing on sub-second basis, while they are happy * to fire together on the 1 second exactly */ - if (edac_dev->poll_msec == 1000) + if (edac_dev->poll_msec == DEFAULT_POLL_INTERVAL) edac_queue_work(&edac_dev->work, round_jiffies_relative(edac_dev->delay)); else edac_queue_work(&edac_dev->work, edac_dev->delay); @@ -398,7 +401,7 @@ void edac_device_reset_delay_period(struct edac_device_ctl_info *edac_dev, { unsigned long jiffs = msecs_to_jiffies(value); - if (value == 1000) + if (value == DEFAULT_POLL_INTERVAL) jiffs = round_jiffies_relative(value); edac_dev->poll_msec = value; @@ -443,11 +446,7 @@ int edac_device_add_device(struct edac_device_ctl_info *edac_dev) /* This instance is NOW RUNNING */ edac_dev->op_state = OP_RUNNING_POLL; - /* - * enable workq processing on this instance, - * default = 1000 msec - */ - edac_device_workq_setup(edac_dev, 1000); + edac_device_workq_setup(edac_dev, edac_dev->poll_msec ?: DEFAULT_POLL_INTERVAL); } else { edac_dev->op_state = OP_RUNNING_INTERRUPT; }
diff --git a/drivers/edac/edac_device.c b/drivers/edac/edac_device.c index 19522c568aa5..19c3ab2a434e 100644 --- a/drivers/edac/edac_device.c +++ b/drivers/edac/edac_device.c @@ -447,7 +447,7 @@ int edac_device_add_device(struct edac_device_ctl_info *edac_dev) * enable workq processing on this instance, * default = 1000 msec */ - edac_device_workq_setup(edac_dev, 1000); + edac_device_workq_setup(edac_dev, edac_dev->poll_msec ? edac_dev->poll_msec : 1000); } else { edac_dev->op_state = OP_RUNNING_INTERRUPT; }