From patchwork Wed Jan 18 15:08:48 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Manivannan Sadhasivam X-Patchwork-Id: 45321 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp2390096wrn; Wed, 18 Jan 2023 07:10:54 -0800 (PST) X-Google-Smtp-Source: AMrXdXulYgeOvy/Imuyw4vpubYD1Fk6X8gnI4XR0u4BR253z0Qv0JzB+lGkhwnGXSgQfEiqGMcQM X-Received: by 2002:a17:903:48d:b0:187:1b7a:6930 with SMTP id jj13-20020a170903048d00b001871b7a6930mr7689015plb.6.1674054654211; Wed, 18 Jan 2023 07:10:54 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1674054654; cv=none; d=google.com; s=arc-20160816; b=S9tdtHe8sCY8dT6USfKddCvI9yn1rjXV3XBeLV+rEK9kDgrJCsETtkm2Bw1wOaQXtb hn2a8ZlT2YZFWBShoK3ynEdbAeVS0XCxkdBbAYVWRHo+0bP9xOxObO1FJvHiesk2w05t AgLbE0TiQY9uKC95xm2uSQRbMX2G2byPJn8oBdI+TIIeSVmPBEiplGPVeLeiI1r1c8cH kMkwuNM4BQZsxjoV1kHLGBX4R+BlIl0UWwrFOl0FeUtMHXzxQowmvUpId08oWyg0E9vC 0T0sw8UTGnffJZA0OEzL+ZXsPdkdrR4kHDviETSFGGH+jd6eAok9LfFU5YLsopV1YJTa Z1Kw== 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=5b3A1ENOut7aNsWCrE1p0bbYMaJf6g4gCfGrBW3niiU=; b=NbtUGAbujnHoBE0lu582ZD+6xbDuDBT25fL328LshzSF7pBr2siE71FArhfnyYBKIj PBN6EpopLhv94C75/HDmpUuZrAtercUBwqbN7rU24HDziT7QBp9n23BiI8QLswxwJj/h Y3KOpKNeFb6D3W7lXXfIOxDPerAtpRnZpDKIYG4X6S/KyeISCHNTbmIRN5KNh7drGx2B 7LCMFfnhmVULEvaMwBXWA9mDWM51hXLCtTYVPj3gT2oroAPunN6iNADuLd5ro6L6GtWd lujLqrEgVdfFqxixAXRnw44eDjkngNPraEQoNJEmoWpB84vaoDEJ23Aeg7cWXwq6wNJa pLCw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=V0GP2xZ9; 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 u16-20020a170902e5d000b001949b544e31si9267479plf.601.2023.01.18.07.10.41; Wed, 18 Jan 2023 07:10: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=V0GP2xZ9; 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 S229930AbjARPJq (ORCPT + 99 others); Wed, 18 Jan 2023 10:09:46 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41300 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231553AbjARPJV (ORCPT ); Wed, 18 Jan 2023 10:09:21 -0500 Received: from mail-pf1-x431.google.com (mail-pf1-x431.google.com [IPv6:2607:f8b0:4864:20::431]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 18D321F5E3 for ; Wed, 18 Jan 2023 07:09:20 -0800 (PST) Received: by mail-pf1-x431.google.com with SMTP id 207so10313719pfv.5 for ; Wed, 18 Jan 2023 07:09:20 -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=5b3A1ENOut7aNsWCrE1p0bbYMaJf6g4gCfGrBW3niiU=; b=V0GP2xZ9ALQYbIs2LpKz6ECcKJ0MwWRBh+9tbtdCd69NptGSqFuVgnCHV6YB3wnpcS Ed4f0BxPWm19o496hKKuim/EzFn0+HVy31f4wVz1JbLRVw6wAgA4t/o+fidVDwn5TJO8 S5i8dxfc8PolN013w5Vza0OsMLzqhRD/kd9NE32WHFrbj7JBlFfWJ6LEja8cHUCw5oKK kl2Rq9EWsPy8u1s5Ok5LBK01d7Txsy+Ue6ahfFK7M26noXN8L0OVCxszE9sfOJ7iB1/g Ac3KKs+4TNRxLrq7WylSVABz0FipAs6S7Z6vN070gKKBNuaGiD/A2gbwWd5k7NLmoFEr Uazg== 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=5b3A1ENOut7aNsWCrE1p0bbYMaJf6g4gCfGrBW3niiU=; b=uTcg570eT829NcU26k+/+mtD9oKmqEkEaI/VEBhW0HquVYwQJ06+0MmqFwVIS0miZ2 JHbYIo4kH1bf8EzRbwY2V3jX1iYaHbOMO3TGyLOW5uUBNOw3Q+m6w91FuNMjYm70//ed iO13Y9VKM/uG+LIHqdTGEdh7XOogHx/4cTGX+wAKwCu26N45B97l7SZpMxdmUfL+8RVX rlNv0TWtakDxXMuS5m/tjfRGqTi9LtfZZ4ZcNK9k8GTsGMWk37thiUNtHOCQBqxajoJP G2roDfk+UrjsRGmOLgKznkJQ4r+gscp0tOtSxLz5AgPd6JmvGb9DpdcD0AClWDPUeTRx b+iw== X-Gm-Message-State: AFqh2kpumFTCpV7i9T/TMKQjhi6CBkcaCcGHs+YU4HieBZimaWCtvWBj 1otgrzryhrj6wODY7fWU8vCf X-Received: by 2002:aa7:8d11:0:b0:587:f436:6ea8 with SMTP id j17-20020aa78d11000000b00587f4366ea8mr6651438pfe.16.1674054559488; Wed, 18 Jan 2023 07:09:19 -0800 (PST) Received: from localhost.localdomain ([27.111.75.61]) by smtp.gmail.com with ESMTPSA id i15-20020aa796ef000000b0058d9623e7f1sm6721544pfq.73.2023.01.18.07.09.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 18 Jan 2023 07:09:18 -0800 (PST) From: Manivannan Sadhasivam 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 , stable@vger.kernel.org Subject: [PATCH v6 01/17] EDAC/device: Respect any driver-supplied workqueue polling value Date: Wed, 18 Jan 2023 20:38:48 +0530 Message-Id: <20230118150904.26913-2-manivannan.sadhasivam@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230118150904.26913-1-manivannan.sadhasivam@linaro.org> References: <20230118150904.26913-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 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?1755373533248879961?= X-GMAIL-MSGID: =?utf-8?q?1755373533248879961?= 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 Signed-off-by: Manivannan Sadhasivam Signed-off-by: Borislav Petkov (AMD) Tested-by: Steev Klimaszewski # Thinkpad X13s Tested-by: Andrew Halaney # sa8540p-ride Cc: # 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; } From patchwork Wed Jan 18 15:08:49 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Manivannan Sadhasivam X-Patchwork-Id: 45322 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp2390281wrn; Wed, 18 Jan 2023 07:11:13 -0800 (PST) X-Google-Smtp-Source: AMrXdXuoTcqAukDovJMrD+gnIcv+pq9I4+wl39jhZO5/mgt2EU9+IrYeiNbYDIKqEYpbxToyowpX X-Received: by 2002:a17:903:2105:b0:189:e7ea:9ff9 with SMTP id o5-20020a170903210500b00189e7ea9ff9mr7168723ple.42.1674054673577; Wed, 18 Jan 2023 07:11:13 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1674054673; cv=none; d=google.com; s=arc-20160816; b=VICPG/miDs/u4MHiMDL8KjauChly0+8gQt1GA3bwOO6vat/TFTZ4YgNREdQkIsknSe oZBtoe6jgAqfX0d9SyJ9sXs6ICDBv7424gODfDrm2STuNbAdDxuT75r+NVPSF39fEkPt GKLWeRU6GvMmmNBD8p2I7TxbOS/XjKnnHX0ZDneENIDNDGxvbFg1OFetXTvhtLVOPiNv eBU/7vU4nGLT0cu57LsjaSwPYkymfPs51BYS3kZNGLgI/M+333J6QPhJje+iQXf0TI/N GIrR5ILHcc7R072yiUOi8mEp0O3FQI+9cSqzYAoPkS0CQbEbqgFoMpCttN0RdDJVeNPL R19Q== 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=eHz9zYD5zWjkD8amepkm4Ag4nZgnemTquTNMqE0/uHs=; b=YsCy0wgJqanikP/RvsVKsmUwizxAALHu7JMr3/qv1oM9fOTfFVfkRNhlyGPx2dwTAi cm3lfgo79+DVxQePb5oMs1lABBiktZHTMmijxWooYRXBHyOGkIyGhs1P/u0Kr8vFQHxz DV+QsyqI5BQFdsAUYD07h6CUGlMMYJc4WGeka6oocRiqer6M9ZQ3YPxrHg2WN19hAE96 8NqDgrHzlQ25IkFpYy08pY854ilOS+GtbV2na3rJI9WhLKYQ06rQyqExorCQliQLx/I+ gvG9kUfw8QaWcUPhcdTLra6TFi7ahjow11IBgGUR8FnjhUpWh+VrWnvgZJkwQ7DGOjCQ KuOg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=DvG3z0Pr; 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 a2-20020a63e402000000b004a2f26de947si36732738pgi.224.2023.01.18.07.10.58; Wed, 18 Jan 2023 07:11:13 -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=DvG3z0Pr; 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 S231664AbjARPJw (ORCPT + 99 others); Wed, 18 Jan 2023 10:09:52 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41320 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231569AbjARPJ0 (ORCPT ); Wed, 18 Jan 2023 10:09:26 -0500 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 58C2022787 for ; Wed, 18 Jan 2023 07:09:25 -0800 (PST) Received: by mail-pj1-x102a.google.com with SMTP id 7-20020a17090a098700b002298931e366so2444144pjo.2 for ; Wed, 18 Jan 2023 07:09:25 -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=eHz9zYD5zWjkD8amepkm4Ag4nZgnemTquTNMqE0/uHs=; b=DvG3z0PrAX2OmF7qqZN7PGoPsDNVuUNEI89aLDn1NF6d2o/5baohFax/eWhIeKqpq/ rbamm9+n0b/lpy1CBkAHAQs9Y8CbUVh34qJ6ryAiaIS+9m8FK9gzF+ypTeZ+b5JA3AlR awuLOsJhyBz/YZONOdEjdutlhnPoPKuEvE4NXH5RGlczUSYubhqTQm3O+H6Oq+r2dyKa iXEf8yQwXNnUPAtQKc7H6yYeY7Gtqlg+IPTi4SRdwGWhdotAL6SyKP7HOOYG2hCVLFWt d/qS8Jey0FQrmC53p8IIaj1bTRHkYtxjbWsmAPo2pb3j/B948f3fqVOJmRBxK860CJ6g 744A== 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=eHz9zYD5zWjkD8amepkm4Ag4nZgnemTquTNMqE0/uHs=; b=hIJ0uTqdE1FiuDMMdFfyBrszZ4VjCe0jmkHvY+ar6u0hzwxYKKORsz5NspbvqH0AdM IOnMv4tHgz0v03DQ+/5nU6KhdcPSRT4cJiPgTHZPWR1W3i6jfpu3rSUO2VBgtryycfEq H6mEo7qpcMlsEUCcVdQv0SkGuZfrp31ViAqKk9OyJPE92XDDTw3U+lse81tJLgwJVb3u mU1NLK95YVFjc3ntDZTbQzifUuoup88WzJy/VHr/rcUpu1Zykit1Za6f2kKlgSISxec9 Ot6mLZ2Siuc7Kmp5fHlZBNikq+BFo/3Z0zHrHFIljVIiaEXYZ38Yk0/pZTW+vSfWa2ZM O22w== X-Gm-Message-State: AFqh2kq1MPwDZ+e+S/LX62eSvanqluPfuS9v1CRc8KCRI0FrUBW4g1qE PxwGggHmqkHo1d9yXApdrayk X-Received: by 2002:a05:6a20:7a89:b0:a2:c45f:f0fc with SMTP id u9-20020a056a207a8900b000a2c45ff0fcmr7563618pzh.27.1674054564865; Wed, 18 Jan 2023 07:09:24 -0800 (PST) Received: from localhost.localdomain ([27.111.75.61]) by smtp.gmail.com with ESMTPSA id i15-20020aa796ef000000b0058d9623e7f1sm6721544pfq.73.2023.01.18.07.09.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 18 Jan 2023 07:09:24 -0800 (PST) From: Manivannan Sadhasivam 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 Subject: [PATCH v6 02/17] EDAC/qcom: Add platform_device_id table for module autoloading Date: Wed, 18 Jan 2023 20:38:49 +0530 Message-Id: <20230118150904.26913-3-manivannan.sadhasivam@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230118150904.26913-1-manivannan.sadhasivam@linaro.org> References: <20230118150904.26913-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 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?1755373553633640932?= X-GMAIL-MSGID: =?utf-8?q?1755373553633640932?= Add a device ID table so that the driver loads automatically when the associated platform_device gets registered. Tested-by: Steev Klimaszewski # Thinkpad X13s Tested-by: Andrew Halaney # sa8540p-ride Reported-by: Andrew Halaney Signed-off-by: Manivannan Sadhasivam --- drivers/edac/qcom_edac.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/drivers/edac/qcom_edac.c b/drivers/edac/qcom_edac.c index 97a27e42dd61..9e77fa84e84f 100644 --- a/drivers/edac/qcom_edac.c +++ b/drivers/edac/qcom_edac.c @@ -397,12 +397,19 @@ static int qcom_llcc_edac_remove(struct platform_device *pdev) return 0; } +static const struct platform_device_id qcom_llcc_edac_id_table[] = { + { .name = "qcom_llcc_edac" }, + {} +}; +MODULE_DEVICE_TABLE(platform, qcom_llcc_edac_id_table); + static struct platform_driver qcom_llcc_edac_driver = { .probe = qcom_llcc_edac_probe, .remove = qcom_llcc_edac_remove, .driver = { .name = "qcom_llcc_edac", }, + .id_table = qcom_llcc_edac_id_table, }; module_platform_driver(qcom_llcc_edac_driver); From patchwork Wed Jan 18 15:08:50 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Manivannan Sadhasivam X-Patchwork-Id: 45324 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp2390539wrn; Wed, 18 Jan 2023 07:11:40 -0800 (PST) X-Google-Smtp-Source: AMrXdXsms0THlVhnZOW6RmM3Jyst1ONdTExn5ir3wAcxbDVtaLEqV/qjDXdoDa+LtlJiovrlJnF1 X-Received: by 2002:a05:6a00:4c85:b0:58d:dfb1:8023 with SMTP id eb5-20020a056a004c8500b0058ddfb18023mr4835714pfb.15.1674054700560; Wed, 18 Jan 2023 07:11:40 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1674054700; cv=none; d=google.com; s=arc-20160816; b=CuLGT6GyCaJ2h3OdZrE7vIsdjb8FU1kZZ1mCV1ehCXSNZN7qE9bVbJAvEkBXXAfYjL you1pMSgxrGgdBtXKltCwuH8+l3Mfq4HpkkV6SY5q+/De9iyXkRgbuiXtYqStX7H+L2Y G9fRsIDIT76ei1i/6IBwt+gt4eMLCRAsJ60QwD64WTlFQWQGRPgfoXTYLiVNW8BEgxkU 1mlE1IesD+OJ3vV1WXKcBeQbUsFlB+ttOhLpWK7YWTuQirGPRaaXMrcqYw2K2PSdBVfl RmaTa+Q85N1gUY9Amwq5MNHMPWcTxtdnSzKcB7h1DmZnpB0SfCcI1n6fPYBLa0XW3wrz Jpqw== 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=9g1r2YkbrCTL06JBn8TcdxJnLCnZpZqC+qdq6jkkxOk=; b=VUYgZIDrGF1gvMHd3NzWNe4SrmmQ4e6aE9rQWT6BmhZlXdDzQ95WeZAo/hcxGGFOxt F60XZg+C3+9jPDhR3xeKxNDF+AOzqlxC84zjxAeiNkj9EJ0nHzbXXjZlHVE8yyyKSLNT tdi57ZG5jjq8NsHbUdtihb4Bwa6KaSkGBi02dnLipuJftWJr2ECROR7qy6O6v2iLHD+Q ZNe/RBf8ef3c6zwu7HFVoL0K/5HSFiW9J95YziXEL1+KXIhZvYLXNTZdSeP8CWKXNf6/ vFNJaK1ucDHIYZ+w6ZO6EqSScUsNCZShQk2IoI+6pEPMnGL9VzVVKYPnQK7JaTF//yVf x67Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=rmGHhTlj; 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 u18-20020a056a00125200b00572f3be59f6si35580731pfi.136.2023.01.18.07.11.28; Wed, 18 Jan 2023 07:11:40 -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=rmGHhTlj; 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 S231686AbjARPKb (ORCPT + 99 others); Wed, 18 Jan 2023 10:10:31 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41344 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231582AbjARPJb (ORCPT ); Wed, 18 Jan 2023 10:09:31 -0500 Received: from mail-pf1-x436.google.com (mail-pf1-x436.google.com [IPv6:2607:f8b0:4864:20::436]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F351A23333 for ; Wed, 18 Jan 2023 07:09:30 -0800 (PST) Received: by mail-pf1-x436.google.com with SMTP id s3so23880459pfd.12 for ; Wed, 18 Jan 2023 07:09:30 -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=9g1r2YkbrCTL06JBn8TcdxJnLCnZpZqC+qdq6jkkxOk=; b=rmGHhTlj8O6W1yPAhd3uk2Ho8WDQV2ls8DgNFrQvHO8xa5RrlA6ALv/tHMw3UtegjW uqKI8SSb5ozUimyYj7w3LSV61Kuk7og8suQrm1s2/uBYGWx1E8e8+UTZWwXFYUkb9eEL lo4+CJxoKxTh9NmrYfhJ8cQFpyT9/yvaUSXXInOg50ZEnzW3wCzXGWjkf/N2pSJxrcnx O2lXZ3BPh1lMOkLCDCqNEQTA5yPe7iKk5Q2QO7A1+syXPfPEX9xHDqByGpjF2QPNeACx NJKYI778puEQkLpRby0cQlida5hNSZRwwTyoxlUd4xBBmwuL+76wvu9c/ou2wdGNsAkc q7vw== 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=9g1r2YkbrCTL06JBn8TcdxJnLCnZpZqC+qdq6jkkxOk=; b=KVFdVkk+9JCi0wwdPQ8DW3Pkwn6O8D3lRndwuL0LKPF6Sk1LIzOJUoto2dhoOyYtlk BV0rBY6rgpQP9f8lId4EQvRdJEiqCooi4YkPs33efLwF+Ln797ngtOGPQjAZM/VXLkJK Gwjs0B+Vyjm7e+KqitS4/emSDwkVzDynfaY26BU3UT/H2fLDzGqtNVUFo5iDNTeVLFQm erOM3df1+H4lZV0u6g/gPmTSplrImMVJzHc6VRIt52g2Z/dvuN0vo64YfaJ43eMKloph b1J0exe76BH0jUc8chC7b8azC97UDW77R7kvXskjlUl9hqZoGlHPNpBjAEu4LFotmIMU nkuA== X-Gm-Message-State: AFqh2kpWGZ3vOniCRq8K69Ns3vjGXArOby0hyOHADATDYAxbC+LMeAZt LUv8uab04V13eC0cXZpcGwP8 X-Received: by 2002:aa7:9a50:0:b0:589:b85:1e32 with SMTP id x16-20020aa79a50000000b005890b851e32mr7763285pfj.16.1674054570482; Wed, 18 Jan 2023 07:09:30 -0800 (PST) Received: from localhost.localdomain ([27.111.75.61]) by smtp.gmail.com with ESMTPSA id i15-20020aa796ef000000b0058d9623e7f1sm6721544pfq.73.2023.01.18.07.09.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 18 Jan 2023 07:09:29 -0800 (PST) From: Manivannan Sadhasivam 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 , stable@vger.kernel.org Subject: [PATCH v6 03/17] EDAC/qcom: Do not pass llcc_driv_data as edac_device_ctl_info's pvt_info Date: Wed, 18 Jan 2023 20:38:50 +0530 Message-Id: <20230118150904.26913-4-manivannan.sadhasivam@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230118150904.26913-1-manivannan.sadhasivam@linaro.org> References: <20230118150904.26913-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 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?1755373581812338039?= X-GMAIL-MSGID: =?utf-8?q?1755373581812338039?= The memory for "llcc_driv_data" is allocated by the LLCC driver. But when it is passed as "pvt_info" to the EDAC core, it will get freed during the qcom_edac driver release. So when the qcom_edac driver gets probed again, it will try to use the freed data leading to the use-after-free bug. Hence, do not pass "llcc_driv_data" as pvt_info but rather reference it using the "platform_data" in the qcom_edac driver. Cc: # 4.20 Fixes: 27450653f1db ("drivers: edac: Add EDAC driver support for QCOM SoCs") Tested-by: Steev Klimaszewski # Thinkpad X13s Tested-by: Andrew Halaney # sa8540p-ride Reported-by: Steev Klimaszewski Reviewed-by: Borislav Petkov (AMD) Signed-off-by: Manivannan Sadhasivam --- drivers/edac/qcom_edac.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/edac/qcom_edac.c b/drivers/edac/qcom_edac.c index 9e77fa84e84f..3256254c3722 100644 --- a/drivers/edac/qcom_edac.c +++ b/drivers/edac/qcom_edac.c @@ -252,7 +252,7 @@ dump_syn_reg_values(struct llcc_drv_data *drv, u32 bank, int err_type) static int dump_syn_reg(struct edac_device_ctl_info *edev_ctl, int err_type, u32 bank) { - struct llcc_drv_data *drv = edev_ctl->pvt_info; + struct llcc_drv_data *drv = edev_ctl->dev->platform_data; int ret; ret = dump_syn_reg_values(drv, bank, err_type); @@ -289,7 +289,7 @@ 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->pvt_info; + struct llcc_drv_data *drv = edac_dev_ctl->dev->platform_data; irqreturn_t irq_rc = IRQ_NONE; u32 drp_error, trp_error, i; int ret; @@ -358,7 +358,6 @@ static int qcom_llcc_edac_probe(struct platform_device *pdev) edev_ctl->dev_name = dev_name(dev); edev_ctl->ctl_name = "llcc"; edev_ctl->panic_on_ue = LLCC_ERP_PANIC_ON_UE; - edev_ctl->pvt_info = llcc_driv_data; rc = edac_device_add_device(edev_ctl); if (rc) From patchwork Wed Jan 18 15:08:51 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Manivannan Sadhasivam X-Patchwork-Id: 45323 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp2390331wrn; Wed, 18 Jan 2023 07:11:18 -0800 (PST) X-Google-Smtp-Source: AMrXdXtg9ZYDv1+Nqc3z12taCw6qt4QFipro6Bb7qT19jNux/bER3oGp44gXF7xj6bxnz6thD11X X-Received: by 2002:a17:90a:2fca:b0:227:b49:6233 with SMTP id n10-20020a17090a2fca00b002270b496233mr7383427pjm.45.1674054678210; Wed, 18 Jan 2023 07:11:18 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1674054678; cv=none; d=google.com; s=arc-20160816; b=PUmJXwRypspYjwgOlFP0F/ZlCGd52HjRfuoZVrreKnJ/MrPzuD1xuJDoYJXGZqwIS5 DrZ1Wocd1DOcC21Mot8mk+5b1WN5s2l+8ZhCko/5IZOPl9MldmMJII+xE0Mr4EoNNWpt PveDu+Qt7SaaXXYpvcPbz2IwcY9EmCD9f0kQ7EsFAlcJD6HawFF//Yi5tiNidB+/QpUR TP0bSlHLcGwxISdG2YDwrUciNDYjDr7n+QaFYHGaK559iflpIwvJhQ6Q1F1OzuJ1OXpr 8wuTBuUmOEQyMi6/H5BkQLTJzC3kk0s95uFI9saxPvjJxAXi6sYxBjbIpLl1cSpqB7KX UFXQ== 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=USFa3vv6r3M6at72+GYbrAEuQqTIcmw3cLL2W4/Vhuk=; b=qcHWmgIBEggpU4sfPSdjUbzh1oyOWD1fmB2dZGUqJER70ir12fXxT5lzmBasG/r6PO AUnDKEMaQGio3TQIWi6oAPPfbmUdDZVk6JJ6hi/m5OhlMwsX61a3jRUdOTaoK+Ar2ZoY 9Cnkj8kGYLkug+qmuf9+CYP8vwNoEOz3UrqpQx3g//2SaGmj4xuwaVmbPGed4XVwsfSG yBJ56X1jDG7a/QcApITbiYRtxV/0zenJKEXwV7aN0bfXH3wkCzO45sVhN70rQ5Z22ZW/ NLGCjckG8JFAOehFr6ern6eDOCsdU8FGmGF+Y29g/F39y0jNqBhTfebiAhVJnQsWNHDS alAA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=cmYuIhAA; 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 41-20020a17090a09ac00b00229870c8f37si2226944pjo.161.2023.01.18.07.11.06; Wed, 18 Jan 2023 07:11:18 -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=cmYuIhAA; 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 S230031AbjARPKT (ORCPT + 99 others); Wed, 18 Jan 2023 10:10:19 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41136 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231593AbjARPJh (ORCPT ); Wed, 18 Jan 2023 10:09:37 -0500 Received: from mail-pf1-x436.google.com (mail-pf1-x436.google.com [IPv6:2607:f8b0:4864:20::436]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8697BE3A0 for ; Wed, 18 Jan 2023 07:09:36 -0800 (PST) Received: by mail-pf1-x436.google.com with SMTP id i65so22942052pfc.0 for ; Wed, 18 Jan 2023 07:09:36 -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=USFa3vv6r3M6at72+GYbrAEuQqTIcmw3cLL2W4/Vhuk=; b=cmYuIhAANGcRKBwdTJwKQYuynjulC3J5OWILnvz3+ACzJlZVyh5/WDOPws7HzqlY9j DfGoUQcwA9N1U1O8iA+nl5AEuab2iF9HIUJI6E6crHtvRRQTqAAJpIMMm7aelwAYcJMI Taj2lHHQjSyhGoGXCsASVyAUW7KrsSNOztUA3kTLLFnDMn0OOJbCxY4c7/9mh7Pr7eWB clPFv5Kpqu+KxuevvdPhh1oLiGKWjDDwDg2JRGx9z+pMjE+QPWbh7b4ewCmKxGGcfJEg +OdopkIYXpraF0P7bc6lTymbKPla27sQvZ1U4P0RJ9w/FVf9GuqhSmNOlhKV+z1wnqh2 E9wQ== 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=USFa3vv6r3M6at72+GYbrAEuQqTIcmw3cLL2W4/Vhuk=; b=IJzsxQVm9RzHxYCdil/aJsZXeQRinERj2jip7ilZn21mzUAcdY3rTxRxK+MhZLlvc9 hiHiKHZqYELcer++G+W+1igYtwQqjLJAE0EYQX8IhowNfxT3XX6feka+ROy23CCTNJv6 A4h4MEYjk1vBMv8ZgcWkXQ9mqkIcfpLQnY2lp0jZ24gDsZ1t59xZuZg//K+1gGGyTX6O H8GoW33actscEh06x+V4PE92XEAa9UF9fOu8hBwlD2EfhNYwUw9sGiPtsJvZzWKLTSXV CiHUCm7v872UV83iX4adMnZs9IqZjiJIYUURQGCBzP4mWTZr2dpabUoMfr8wbeSJjBDW K+eg== X-Gm-Message-State: AFqh2kpVxScy10TxZ18BEfxcyX/x3E7yGzcnL2xTfvX3oPTPd7Su1tI5 HyRX50ngKAPo9GPLRGGcLciv X-Received: by 2002:a05:6a00:438c:b0:58d:a0ad:6d72 with SMTP id bt12-20020a056a00438c00b0058da0ad6d72mr8866852pfb.17.1674054576064; Wed, 18 Jan 2023 07:09:36 -0800 (PST) Received: from localhost.localdomain ([27.111.75.61]) by smtp.gmail.com with ESMTPSA id i15-20020aa796ef000000b0058d9623e7f1sm6721544pfq.73.2023.01.18.07.09.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 18 Jan 2023 07:09:35 -0800 (PST) From: Manivannan Sadhasivam 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 , Krzysztof Kozlowski Subject: [PATCH v6 04/17] dt-bindings: arm: msm: Update the maintainers for LLCC Date: Wed, 18 Jan 2023 20:38:51 +0530 Message-Id: <20230118150904.26913-5-manivannan.sadhasivam@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230118150904.26913-1-manivannan.sadhasivam@linaro.org> References: <20230118150904.26913-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 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?1755373558071976084?= X-GMAIL-MSGID: =?utf-8?q?1755373558071976084?= Rishabh Bhatnagar has left Qualcomm, and there is no evidence of him maintaining with a new identity. So his entry needs to be removed. Also, Sai Prakash Ranjan's email address should be updated to use quicinc domain. Cc: Sai Prakash Ranjan Acked-by: Sai Prakash Ranjan Acked-by: Krzysztof Kozlowski Signed-off-by: Manivannan Sadhasivam --- 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..d1df49ffcc1b 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 + - Sai Prakash Ranjan description: | LLCC (Last Level Cache Controller) provides last level of cache memory in SoC, From patchwork Wed Jan 18 15:08:52 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Manivannan Sadhasivam X-Patchwork-Id: 45326 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp2390965wrn; Wed, 18 Jan 2023 07:12:23 -0800 (PST) X-Google-Smtp-Source: AMrXdXvB9+YEN2zQNUjIafVyTB3RoZwuH6vyxKBZobTAoDyhSxw+JuwulCUW9SzyuSTJZvIeZLpQ X-Received: by 2002:a05:6a21:3290:b0:af:76da:1462 with SMTP id yt16-20020a056a21329000b000af76da1462mr9986785pzb.40.1674054743569; Wed, 18 Jan 2023 07:12:23 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1674054743; cv=none; d=google.com; s=arc-20160816; b=aQjrj007o77AxnSojWafpelvaOFrZgAwJ4jQYQtj9G4MByqZBYEZ6uvao2X9VdQzBt yGNcHQrvKLJIScE47A1ZSlCmgFIGFMJ44pdhrm3pCOvhZzNsL33jevWfurZZ+f161Wqc 1DRs4f9fz4IKQuwAG03fBpE/5EHTiu9R3AtwuSL1sX4lEI/2R5lYWJ6ZjmPx9lQJT5wD KszDksWjaaJTRU9S67FVpGzaUBkHBCgbniE5sgl/R8fvtmn9KzpPvkX5WpmgISgEkgB5 /v1CEqOkZ4Y4m19Of7CRDBDR0XIKSTKZJo4xZSjd99IFCZLa7YU1hNDuH+4fFYbuqaNb dwcg== 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=jXuVNaTN8VlggSdcrqnxpaEGm5VyBVkNPNZuLm2UVUQ=; b=lKARsJhDI9kZkWLCcOWcgpUIJ6ZNqss+O6VHgDktjSMz674Wyl6ZBlPOju8dwKKIYw T4BFKqXHQCK+w3dF28bnbHBel99tBbz7AMI2C/+Rprj5dUeQYi8ztmjNftUkZkY7GCdQ p0Pid+ly6UEbxw9iv/Vnh9eJmeNuEQQ5pg+jsnEgDwUz9mW2FG/v+/OUgtzwaz12Ds0i KEUv9StBe4gpCrIXIWibgtCDFlisGr+I+2XY4mHlIT7XV4lQgx0O+ckKMxigS4EmBkOW zC8rtA+VeuJgW9i+w1quw+1OnUkWb2GVFQp0C4uzMNCglAxm51sUl66q5oL6m/Wg2VqG Vvkw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=eXeh3yGV; 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 v22-20020a636116000000b004d0f07ab4a5si1346403pgb.601.2023.01.18.07.12.10; Wed, 18 Jan 2023 07:12:23 -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=eXeh3yGV; 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 S231698AbjARPKi (ORCPT + 99 others); Wed, 18 Jan 2023 10:10:38 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41504 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231623AbjARPJo (ORCPT ); Wed, 18 Jan 2023 10:09:44 -0500 Received: from mail-pf1-x42f.google.com (mail-pf1-x42f.google.com [IPv6:2607:f8b0:4864:20::42f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2FC722B290 for ; Wed, 18 Jan 2023 07:09:42 -0800 (PST) Received: by mail-pf1-x42f.google.com with SMTP id a184so26406474pfa.9 for ; Wed, 18 Jan 2023 07:09:42 -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=jXuVNaTN8VlggSdcrqnxpaEGm5VyBVkNPNZuLm2UVUQ=; b=eXeh3yGVsH9ffM3jicbIsyf8jsrDa5kqR1E3UQGIGTQKTitp9gSaGd/JMuK3t0iLYV KkFtkPPrZx/r5KylQPaS0s9oAh/m3W3HdLeoW8VFxGfXHDRQdsmTCFO0av+fur/vi1TX RLqXV/qF4sBk0DEHhysTXbZ/LYRTl9CkwQEGhiOaZCVbohgbfATxUbeeJxB2Xnl7hban d7yprmgPtYXdFxIhx8pJQ9fhGzxuyFtIj4Rk9lB/bi1hhoZGyNvW8ijm3c2fwvLk25jF PeDCF6M0So7AyXvaNw0N9vI/Khm4ATbMS/SKqzlIzWvh/eUTxDR/zJ8VJ5EDM7Z5Opjx VjSg== 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=jXuVNaTN8VlggSdcrqnxpaEGm5VyBVkNPNZuLm2UVUQ=; b=i+SRpHHXgmtPtH3bOBA8a0FIsDzDc+fO10nPfbDWlCzBISlnnHGbU+v4sN2omRLgrA I5672J7krtZzpa5m5EnvoyeEL/OG5SqiIL9wWosyBJ+PFCuq3sHMp1EA9V27AUSq89VG Sw3I+VLfSQMXvpRkS8EqeHwxEC4j0POJyXRwqCtoZFEQErAxW55KZNGptPC7CxiJvTdu jfmau5bj+RoOAJi//T8MvlBs5mVGXIWNHWWEMMukgkB2PTNp7EGimaY6utgWfoN6yGey zsrIUY/p7aK1S3qiFWDGjufbUz2ebXryjePOg0g7EibHAiclzo6eZzLYJMSCHku2QlYu H6Pg== X-Gm-Message-State: AFqh2krUUk71VZsfmvdhK4K30gTlspgjeEdrfdUPxU+hYS1sSvp+9FCb 21Ha6FQ4/Tdb0naLcV/YK79P X-Received: by 2002:a05:6a00:3390:b0:58c:6ba1:58dd with SMTP id cm16-20020a056a00339000b0058c6ba158ddmr8010503pfb.11.1674054581652; Wed, 18 Jan 2023 07:09:41 -0800 (PST) Received: from localhost.localdomain ([27.111.75.61]) by smtp.gmail.com with ESMTPSA id i15-20020aa796ef000000b0058d9623e7f1sm6721544pfq.73.2023.01.18.07.09.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 18 Jan 2023 07:09:40 -0800 (PST) From: Manivannan Sadhasivam 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 , Krzysztof Kozlowski Subject: [PATCH v6 05/17] dt-bindings: arm: msm: Fix register regions used for LLCC banks Date: Wed, 18 Jan 2023 20:38:52 +0530 Message-Id: <20230118150904.26913-6-manivannan.sadhasivam@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230118150904.26913-1-manivannan.sadhasivam@linaro.org> References: <20230118150904.26913-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 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?1755373626840726298?= X-GMAIL-MSGID: =?utf-8?q?1755373626840726298?= 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 d1df49ffcc1b..050e21d4a03e 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 Wed Jan 18 15:08:53 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Manivannan Sadhasivam X-Patchwork-Id: 45325 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp2390771wrn; Wed, 18 Jan 2023 07:12:03 -0800 (PST) X-Google-Smtp-Source: AMrXdXv00iPwyxrBCixIzPr8jP2227gxvBOfsLDFvQufMG/Pk8ZF2uXY4SEdovrmDc4DIE5ZGXqU X-Received: by 2002:a17:902:f302:b0:193:b7e:2bf8 with SMTP id c2-20020a170902f30200b001930b7e2bf8mr6212825ple.59.1674054723315; Wed, 18 Jan 2023 07:12:03 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1674054723; cv=none; d=google.com; s=arc-20160816; b=wk7VMqgQmcQrs+jl5d2j63sVkRzdXq2vUmSJFTvsWkkNdQgJUKgj66fZslYNRYGXXn IqyO7pZ7pNBX6VImmlIxl4vEMI0Jn85FjVMmO9v/7JnoRMIEh/PQ+T/fFGAypUElL6kZ +jwro11kBBr6mdL2zTv0hqEzL5w2PAXDfjzlBvbwS/HCteeSulPTcDGx0WYKka8HZC+D 0K3fdbEaiqmcfpy4381gnhfLGQNlidf7RVsyLTdPfFY7ZXWqo/JXr6gWXOGrePLTvNPh 9kXIg1xNNse5w9lXqNfaA5iLLzYq25naA5hPUkrjeFLfXoUM/5tjTKulcGhEAncXgglZ I51w== 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=e9QXXi64w5AkU0+SlZ8zyP2UpGIuUHr0Btt1KBRAP8A=; b=kPdNobg+7kWVozjOpcz9joyr1sUlfUvYtgDDw2IrhPKdpz+L/3OmGvZpyKOLHlqC6z 2Cp3GjuC4uiJgDUM/J4SIMu+sxHXIFX69fJavYguSWqPWzetqi5Lwyqly8+++F4WrQi2 IQS8ycQIduiPyuKNlUnhNUD310dXIoGNLPnUFogAxxs4IoRrAfMBmH3rPzWzxA/vaeh7 enUUW/fBEGXnGwzBSspOOCGRLBody+niJBSOokAjeaY3zZ9hlAfUAZYvyiDdoFeU8HQl gvBqmmfxlijBznESRc8oRRvFudvH8dFE0kqa+F6iGCB4Je2h+WjbQOl0woUlwthAMiSx x6aA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=obtgJhJL; 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 d9-20020a170902cec900b0018c35376fdcsi12653707plg.78.2023.01.18.07.11.51; Wed, 18 Jan 2023 07:12:03 -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=obtgJhJL; 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 S230145AbjARPKq (ORCPT + 99 others); Wed, 18 Jan 2023 10:10:46 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41752 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231660AbjARPJv (ORCPT ); Wed, 18 Jan 2023 10:09:51 -0500 Received: from mail-pj1-x1035.google.com (mail-pj1-x1035.google.com [IPv6:2607:f8b0:4864:20::1035]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 43DF231E36 for ; Wed, 18 Jan 2023 07:09:47 -0800 (PST) Received: by mail-pj1-x1035.google.com with SMTP id gz9-20020a17090b0ec900b002290bda1b07so1964602pjb.1 for ; Wed, 18 Jan 2023 07:09:47 -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=e9QXXi64w5AkU0+SlZ8zyP2UpGIuUHr0Btt1KBRAP8A=; b=obtgJhJLbF4zWUDolIBzQPaWeCJD4k73tplZA2oseQtFWjew9LCQd9iWssEKhC60G4 QJZouobxHZsRUV+v0NgrkDrkrLtepNVemS1x+00LcFX2iwGozOuS5MWLRVWFbm6PHNge zNWmWkn/r8C4zdZGguEztP6KTdOFRZUT/jVj0vkG7PUgoBRnDGOkEB3adUea/U9aoC6S TvzZFiX/zZT4DfkhlMUFl2BOZ9f0djgiAYYVIy/QbIlH3aCgQLr2n7ZBsNctRMe9YHDb Z1Sq6rFOmmXIh/xS7PPsaCNNktEq2XJPBkcZ759uigRjj9AlCi1Bz96CYp0HiV/Cf1rb ZyFA== 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=e9QXXi64w5AkU0+SlZ8zyP2UpGIuUHr0Btt1KBRAP8A=; b=q6wh+v6R7VHiai6tJ1QvC5c3kqFgh/k0uUGCNhWmDoliesCZeGswOrR9o3mdZPY/A/ GyPKodJlAsDH7dfXzxQAw7+rnUdV8fzx4Sv+lU+ExMfV3LkMZ/FPTbLecxb7Fg501s1f pgS41Or2h/kCBa3MgXhaxVnMZ+THFRIkG74BhSRRObqNQ6eGJ0ABLNkB8xooPFhHjcdZ E1GdpHcALirUnCTMU9euMKgfTYbv3ND6ZUg/dxWrfqdh//qhPOG1Zq65jyu/AY6MYgRY 9Pf50CO3MYUksQwtQ5d/iXfCRSZZWDz7ci1e22AfxQPLiwzvd7xXJ8oWA/I30no55Rmx 4AsQ== X-Gm-Message-State: AFqh2kpc4/Ptz+voyV/I44Nr8JTGOoDhT3d6Oj+ZJv4nFlIhTYxZCDZZ Qjt+yyMZX1Ir03jvqkan+wDG X-Received: by 2002:a05:6a20:9e0e:b0:ac:7a44:db55 with SMTP id ms14-20020a056a209e0e00b000ac7a44db55mr6345038pzb.39.1674054587110; Wed, 18 Jan 2023 07:09:47 -0800 (PST) Received: from localhost.localdomain ([27.111.75.61]) by smtp.gmail.com with ESMTPSA id i15-20020aa796ef000000b0058d9623e7f1sm6721544pfq.73.2023.01.18.07.09.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 18 Jan 2023 07:09:46 -0800 (PST) From: Manivannan Sadhasivam 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 Subject: [PATCH v6 06/17] arm64: dts: qcom: sdm845: Fix the base addresses of LLCC banks Date: Wed, 18 Jan 2023 20:38:53 +0530 Message-Id: <20230118150904.26913-7-manivannan.sadhasivam@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230118150904.26913-1-manivannan.sadhasivam@linaro.org> References: <20230118150904.26913-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 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?1755373605712770667?= X-GMAIL-MSGID: =?utf-8?q?1755373605712770667?= 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 65032b94b46d..4db68d4d78df 100644 --- a/arch/arm64/boot/dts/qcom/sdm845.dtsi +++ b/arch/arm64/boot/dts/qcom/sdm845.dtsi @@ -2132,8 +2132,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 Wed Jan 18 15:08:54 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Manivannan Sadhasivam X-Patchwork-Id: 45335 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp2392067wrn; Wed, 18 Jan 2023 07:14:28 -0800 (PST) X-Google-Smtp-Source: AMrXdXvMYPZMBWcaAaXZlX3f+9Mdoa8HCUqQlEjySwjYtJ0fZWQGbEydv7QYDTYvjD0gy0pqsdqA X-Received: by 2002:a17:902:b58a:b0:193:2b86:bdc7 with SMTP id a10-20020a170902b58a00b001932b86bdc7mr7748346pls.42.1674054868565; Wed, 18 Jan 2023 07:14:28 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1674054868; cv=none; d=google.com; s=arc-20160816; b=Imqwr47qO1kiKCNCUdTOnbDmotbt8mR1Lv5w+SDzjBFtzznlXIWYozLEij6SzRuTbs /A/Cl2N+H2V0rzgBHgOyPoihCu1jfHXerXeCHrWDISpMugXyhf9u+QPx5sbTcDfSwfGA inux0CE9KKblG5nH5h4uPL9rNjIv1Up08E/muijwJXB0cA8FiZpgJ59UD6E7ewt2IpIb G1kcvkxTzAbacYcdv2PGHXgy2XmP8WbqGa2rN+d1wUmLbhaJ0i2UfYIpiTlTCLOZ9tL2 CaP9hOjDs72wfOr4B2rcdf+ET+DQ5NjQ6t1fRZicLp2I60ASwBpIss6sE07Mb+qRw9c+ h4Vg== 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=4GFA6I79C1YmmOYQX1BIX7MOGuUjMMgmSjlJ7uhFCjc=; b=iwVH060CdXbZARO/t/QmJL5P83f0tCHE3FjuwKmNrZNdz7N7myKSTfJ2pKgRSxfPKk 9FpHJzPkwMCh/uER2PLI1eJFHc1OyepPnPyYN35IkEa2q/xTcMPVK+ROgOTaWn/S8zLG 5DGgSBV2oQrg2eypek04TtCZ2rIS6wcm/Ry9AzIkHF7+5/GslJ3PLWhRqnq8o6mvBHaO EvqFMI5EA+0bvtWv4qTgaI3sneHZnuuGjjaTb3sgCHqUouNgdyxhQl8SoGTy1JF5Junp VRJ5UQ9nZgyszRsn36YBvfc2VeC3t6m00StXP24cMn5pLWCof7+R+YIT96B6jLjRtAeq Jplw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=F9kKv6bu; 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 j3-20020a170902da8300b00187480df4b3si39508626plx.277.2023.01.18.07.14.16; Wed, 18 Jan 2023 07:14:28 -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=F9kKv6bu; 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 S231730AbjARPK5 (ORCPT + 99 others); Wed, 18 Jan 2023 10:10:57 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41940 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231697AbjARPJ6 (ORCPT ); Wed, 18 Jan 2023 10:09:58 -0500 Received: from mail-pf1-x436.google.com (mail-pf1-x436.google.com [IPv6:2607:f8b0:4864:20::436]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BFB3E3344D for ; Wed, 18 Jan 2023 07:09:52 -0800 (PST) Received: by mail-pf1-x436.google.com with SMTP id s3so23881425pfd.12 for ; Wed, 18 Jan 2023 07:09:52 -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=4GFA6I79C1YmmOYQX1BIX7MOGuUjMMgmSjlJ7uhFCjc=; b=F9kKv6buxOU5Im8R6aHB0PFWZ/FXExIZ8ZaDgwt5k8VDOOIwtnBfmZxGR0TZxcjTpL /DKUIVp96tTBZyYFeFB2+XfArqK9Ugu+5xmH1COagG0gyhsE9F8Dx4NlHHujD0k0X7dY oGDLCyLiVcLdlHDIQJYjGId2jV9TBZ9o3yiJ1XIgN5xTnazav+/UJHdo6FlVAuMni/l3 8C4b4AK+H/bcqH711QjPXaLPLL0FZBz44KVSWz8Nq2tR4e1FMN46U8MWlFDAupu8R2rv PbvGbNeMfDiqcAaIRCvMAQwzCIzR8Ms3CnQ1WoRmfH5oN1yTQ4PBEsqEHsrmBE5OG6x/ 3N0g== 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=4GFA6I79C1YmmOYQX1BIX7MOGuUjMMgmSjlJ7uhFCjc=; b=MWtHYk6x477atIsHXYvVwHBEvN96XeUeu0ZGQoTvDGWvMADsmPhJdH0mQrn2q51+7M tEDaY7ezTePd1gxF3kvrLapRSZVElkeK67NXzJMLV7b0efl1ILCoyrHEQ7To0PywsEc4 uahR0NKVC/RirpKxIQgB6z2ZTpl8dvu+UpE7iERyDErB1YoN50sA/++SGh0a14oI3Mam 22ONI09ZKxU3ipwcrjkDWY85kLFcIRKZ3C0m/Phjx1etdVGAJMTZZk+ioy5ekZAwq4L3 FJGXjmRt1Fy5wekXglHFwHhrzo0CkR+PD4PXbKTwlgbrcNHvr86rO0Or+bW29Fc5KClx iqeg== X-Gm-Message-State: AFqh2krrWsrxADR43CjckheTIH1Sc9/VxeiVikJLR8pMUFqk4M/SMbBu wlyjdkNPHz2ZblR9bGxLVDv6 X-Received: by 2002:aa7:8a0e:0:b0:58d:9850:d55f with SMTP id m14-20020aa78a0e000000b0058d9850d55fmr7381028pfa.21.1674054592431; Wed, 18 Jan 2023 07:09:52 -0800 (PST) Received: from localhost.localdomain ([27.111.75.61]) by smtp.gmail.com with ESMTPSA id i15-20020aa796ef000000b0058d9623e7f1sm6721544pfq.73.2023.01.18.07.09.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 18 Jan 2023 07:09:51 -0800 (PST) From: Manivannan Sadhasivam 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 Subject: [PATCH v6 07/17] arm64: dts: qcom: sc7180: Fix the base addresses of LLCC banks Date: Wed, 18 Jan 2023 20:38:54 +0530 Message-Id: <20230118150904.26913-8-manivannan.sadhasivam@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230118150904.26913-1-manivannan.sadhasivam@linaro.org> References: <20230118150904.26913-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 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?1755373758248556369?= X-GMAIL-MSGID: =?utf-8?q?1755373758248556369?= 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 f71cf21a8dd8..f861f692c9b1 100644 --- a/arch/arm64/boot/dts/qcom/sc7180.dtsi +++ b/arch/arm64/boot/dts/qcom/sc7180.dtsi @@ -2759,7 +2759,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 Wed Jan 18 15:08:55 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Manivannan Sadhasivam X-Patchwork-Id: 45328 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp2391126wrn; Wed, 18 Jan 2023 07:12:38 -0800 (PST) X-Google-Smtp-Source: AMrXdXv2JiA6Q5SUJZsmsRo1CqUz+C8jg5kFTVCNRzCepZbxYdRt2ZS5InvKPwVss+tEPip4QcDF X-Received: by 2002:a17:90a:690e:b0:227:1f03:f22d with SMTP id r14-20020a17090a690e00b002271f03f22dmr7219017pjj.15.1674054758257; Wed, 18 Jan 2023 07:12:38 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1674054758; cv=none; d=google.com; s=arc-20160816; b=ENyC5sXLKrr/ExbZ6tXPc4kfjnhf6mO1aRWlCNXORDHvU268bnqWFNDg8/tYz/G3yl o1v9yB7cCocuzGtHtgoP6yCydQcq7gNGKtJbs4DOqwLV42NIQ1iJ6cg20P+XnNTPzVkb H/gf75EGLj4Qe4Iggy3pEr76/adiTKflp+BkqsBdk8U1Npngh/im+bNZ3D/7DOJNfAe7 nP34Foe+/mPrSyDwNEkTeF+EADZn16+43b2mzcgml31ohUvduciE8OAhMklp9r7j1+V9 avGn9kYwRUdH59at3EpdDsXTZejM9ZA6D6Qv4DSjZ5fFKel53asQ/w67+w67Bg9vKTB4 Ov1w== 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=u3b0H9FlwI0cHeu/QvvhJdFruV0iaHa3piiWtATy1Lw=; b=k3PYI9lYrx395OBxRFTrFxba/jtGmyxovZwmggwXrTscBDCOzXCDpx7rR4ZSu2vz6+ FBel5khSs42Y+rSUQj0BY8wfhBbK1LRk2RaV69mjmi96hILCzOSd78XnnE5XuH+gTBAB x4qJ9OF42RmMsfyfAB2ybhftcuIZolGoMxwVJtD+BmLpmyJPaCfps71UNIq6a/uBh7q0 di+HQJ+Y4AUGq4X9xZ5vFGs91VDeQyCIi9b6v+bBRR5+r/hKKAmX98ej8siRvErIDuX2 fOZwiknQMO2ighJ0PNU0ssCOHftJLvRXTaEZ6ZXEYEdCdm0KdvvCZTq+M+NqzBylWIWa ye/Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=fuZe+rBB; 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 d8-20020a634f08000000b004b124f7a60asi33083097pgb.610.2023.01.18.07.12.25; Wed, 18 Jan 2023 07:12:38 -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=fuZe+rBB; 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 S231569AbjARPLP (ORCPT + 99 others); Wed, 18 Jan 2023 10:11:15 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41732 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231751AbjARPKD (ORCPT ); Wed, 18 Jan 2023 10:10:03 -0500 Received: from mail-pj1-x102c.google.com (mail-pj1-x102c.google.com [IPv6:2607:f8b0:4864:20::102c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9B2AA366B9 for ; Wed, 18 Jan 2023 07:09:58 -0800 (PST) Received: by mail-pj1-x102c.google.com with SMTP id v10-20020a17090abb8a00b00229c517a6eeso2641092pjr.5 for ; Wed, 18 Jan 2023 07:09:58 -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=u3b0H9FlwI0cHeu/QvvhJdFruV0iaHa3piiWtATy1Lw=; b=fuZe+rBBF8dNZgZ166UGWALWEqUi/EqjxyiDbf3I2knIvjilvd+rFGnFFZbeNtbshq dJCEoglW9mMo3fczTSmNcEo/eVJ6qwrHZdlvzCSH/FMGYGITVltBgcQB4mWqotbS6Rnv Km18GSOD/QKLSMmGSpr1GwoyMNukZc2JlXm/5lWpyKsud00rDKYHwbCcgC0SYvvfs980 /CviqcY5RUCvSW2Bb7+pQf/oahJWOH77BTMEuRAAuQo7MQQWYSxCSeKOgGYLL++yVkHl +iqT0Zw7pB9HueGu6tr2mBEr3w68OdmwTgdcJYO2PiFzS/O4Llcs44sUq08cysL17/OD VpHw== 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=u3b0H9FlwI0cHeu/QvvhJdFruV0iaHa3piiWtATy1Lw=; b=sWxEbqNk+9FyjGTshwlA2ksA2utXcb0LeAW8zf9/IuTkifJ0zG4jAPUwem4Vmuv/wp NAh/qAOammGH+3tCupUp5gpJ90SwAhYnZsY58h8LF9aG+RunYJDLPUJuy3iTnqTBI/Y1 5MmBQJOKcoS6f6L+dDhR4ZzvLjgX4gfjPRsufCcEvw9gLfMOsomrluNL6JbgPSEnPwcA NhgXK57/q8Tt/+u+FsnRE5mg3aCQ8wrDl6wjN2BBUQzE1hVLE9JigBGPaFxFZ6evbEGX +3GAtAgmURo1vyIheDUQZKHcJmfJSoV9av1g8zr55I6CXAUG+ld2H48w6DcPEJ5PxtLj 583A== X-Gm-Message-State: AFqh2krIaGuVsKIK0Wo6t65+qOqrRzHxkzag83dlWBW9qh1t25DD1+GP q4AvAuaiEwzSiAKO2xPAZZpLLtMgFsatlEg= X-Received: by 2002:a05:6a20:6d19:b0:b8:4978:cde8 with SMTP id fv25-20020a056a206d1900b000b84978cde8mr6918596pzb.18.1674054598025; Wed, 18 Jan 2023 07:09:58 -0800 (PST) Received: from localhost.localdomain ([27.111.75.61]) by smtp.gmail.com with ESMTPSA id i15-20020aa796ef000000b0058d9623e7f1sm6721544pfq.73.2023.01.18.07.09.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 18 Jan 2023 07:09:56 -0800 (PST) From: Manivannan Sadhasivam 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 Subject: [PATCH v6 08/17] arm64: dts: qcom: sc7280: Fix the base addresses of LLCC banks Date: Wed, 18 Jan 2023 20:38:55 +0530 Message-Id: <20230118150904.26913-9-manivannan.sadhasivam@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230118150904.26913-1-manivannan.sadhasivam@linaro.org> References: <20230118150904.26913-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 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?1755373642092603613?= X-GMAIL-MSGID: =?utf-8?q?1755373642092603613?= 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 0adf13399e64..6c6eb6f4f650 100644 --- a/arch/arm64/boot/dts/qcom/sc7280.dtsi +++ b/arch/arm64/boot/dts/qcom/sc7280.dtsi @@ -3579,8 +3579,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 Wed Jan 18 15:08:56 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Manivannan Sadhasivam X-Patchwork-Id: 45329 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp2391214wrn; Wed, 18 Jan 2023 07:12:50 -0800 (PST) X-Google-Smtp-Source: AMrXdXuNtpzN0GryL69ZvsTT6diYjHgebyQM9h/2Ub9R5q8vYQrgCkW4dbE4bmXQcQAqiP0D3I17 X-Received: by 2002:a17:902:9692:b0:189:5f5c:da1d with SMTP id n18-20020a170902969200b001895f5cda1dmr8039943plp.18.1674054769953; Wed, 18 Jan 2023 07:12:49 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1674054769; cv=none; d=google.com; s=arc-20160816; b=HeAEL0KR61eZybHOBcj5XP7pECNr6bWM7OAle4npjdBftTWCdKKZEKItPEpW06AA1Z LDVTxtRE5Regmy5v+8SbUFMxa7g3KRGwpYhGvpu/jNM7+QZjN2X+WnmRGmSpDmTAKHhv wWR9r3KYs0v6MEAVlO1e91i+eSw7g/TYxARLlUr28AWKxST6AICnAiOYwPnNDbmCkCLd htNpNKKaPsSfyg58nrC9ag91AJ64XZopDN0YJplfuUsv5fPaLGKmJM9+50MzmZ0FiseN hE0mNksE7z1bnYUbmqTozqrkhwW5YaMJT6iShoyN5SF0MTKPmEYXnmk4HevROrCC/s4t Opdg== 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=cEcc2ZZg4+/rCWO8lF+EBDL5HIag6zFEZ6LhCeBUUxo=; b=mERVtMULpJKB+qAC8Kx/QgCiQvJa0zvS3lhLV3DsruxBR07WPmrkmKYTdQ/OIzgvOw +A5C2eO3XTDneMUCK73c+d/gGvsB6h4zHu067ucaxXHDup5GVLyizVpW+ed+THeD1gsF HjKCgdcvOX58jyLHf4UptunJujOXR0GBr3O9mNU8MzI0ldf2xd0qeyJ7cV1j3ZsvlR5z yOUh6WF1Eg8GtwUahDO3IQpgsfj3TP/cQCnPXs4VM0IlMXKrlyfXtxiregJh2SjiC51O SZ9M1LXEhA/U2/xyN6NuW8WWg3B/SlWZkwkYAIaZuL/LNdCDPyYAnuNr4Bz7646qRzkL w6gw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=SF0jnonD; 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 m4-20020a170902db0400b0019257c9a24esi8016605plx.67.2023.01.18.07.12.38; Wed, 18 Jan 2023 07:12:49 -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=SF0jnonD; 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 S231804AbjARPLt (ORCPT + 99 others); Wed, 18 Jan 2023 10:11:49 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41896 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231779AbjARPKH (ORCPT ); Wed, 18 Jan 2023 10:10:07 -0500 Received: from mail-pg1-x531.google.com (mail-pg1-x531.google.com [IPv6:2607:f8b0:4864:20::531]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E9F83367DE for ; Wed, 18 Jan 2023 07:10:03 -0800 (PST) Received: by mail-pg1-x531.google.com with SMTP id 78so24716787pgb.8 for ; Wed, 18 Jan 2023 07:10:03 -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=cEcc2ZZg4+/rCWO8lF+EBDL5HIag6zFEZ6LhCeBUUxo=; b=SF0jnonDRV3kMcVclflOD2iajoDlCgYs+7RCBsuEuTbAUtPpOd051QxBH225nYEe0j Wk7K28q+az5tsoheuC4aGX0bgSFN7k0Vtt0G0ChpVLhfmHZbdK8w84laJV+yrBSNmswB XI6NZgoKeBfDSIef82be5y5+3HHpwTFwN9Xoi1nUaUwR81eOGaxpFfsoMAZ5tGhYDRPN qWhPD5MUhGK7waGozSvl5VJg1U4LsL2YiMOwEFoMZFDIR1bUIN0XXezUVKTZUTH1tH5m O4OIz6PnAzQXZkm7m0GIvKtjNOOPzoLBRjfuaj2hFbmYUm8SjMfS2H5/0/t2IWkXuG6l OJXg== 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=cEcc2ZZg4+/rCWO8lF+EBDL5HIag6zFEZ6LhCeBUUxo=; b=u8GdEbBh3iaz4h1imqx8nAF85oyqyNyK6iOtJDFu3L9etXJWb0XaK7IudjHL9Ir7VF FNAgwcfcFmEzY/UWllUifzY//2DLTV/pn0sLj33cjrRhwwZY8hhuzP5wRwdzpuxL8uGY Vx/43xfxwZrW0Qt1wwoLPoYPv1wbbeFbbmryQvxgwKt8LWMtqXthy2m54hDKRnw+LY8Y aVv+v3JhsCQWKcQUmDmw0qJrKpzbldJFdl/l1X9GM8wPnXI/SOmahs6mlXbH7Y/sPxyn X7ETeDiQmRwCaqHYGIv11Fjazk5+yJkq2LdkiWYUJc2hb9fYum14LJEOO5cgY0CXd5GR QXHg== X-Gm-Message-State: AFqh2krXqZhakTudTaEEpTRZZDB7cJ0tw0x3UJpAj8GtBF3MQXhyyxFM sKjeYsVUsNcWjyYV4lKoJEQU X-Received: by 2002:a05:6a00:3691:b0:580:d409:396c with SMTP id dw17-20020a056a00369100b00580d409396cmr8995745pfb.6.1674054603390; Wed, 18 Jan 2023 07:10:03 -0800 (PST) Received: from localhost.localdomain ([27.111.75.61]) by smtp.gmail.com with ESMTPSA id i15-20020aa796ef000000b0058d9623e7f1sm6721544pfq.73.2023.01.18.07.09.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 18 Jan 2023 07:10:02 -0800 (PST) From: Manivannan Sadhasivam 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 Subject: [PATCH v6 09/17] arm64: dts: qcom: sc8280xp: Fix the base addresses of LLCC banks Date: Wed, 18 Jan 2023 20:38:56 +0530 Message-Id: <20230118150904.26913-10-manivannan.sadhasivam@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230118150904.26913-1-manivannan.sadhasivam@linaro.org> References: <20230118150904.26913-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 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?1755373654483229007?= X-GMAIL-MSGID: =?utf-8?q?1755373654483229007?= 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 109c9d2b684d..0510a5d510e7 100644 --- a/arch/arm64/boot/dts/qcom/sc8280xp.dtsi +++ b/arch/arm64/boot/dts/qcom/sc8280xp.dtsi @@ -1856,8 +1856,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 Wed Jan 18 15:08:57 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Manivannan Sadhasivam X-Patchwork-Id: 45331 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp2391381wrn; Wed, 18 Jan 2023 07:13:10 -0800 (PST) X-Google-Smtp-Source: AMrXdXuOB0h5SsR9prUX5O1Cx2ySNX8CR+IjvnTj4Iye/hGwVlQ+YWdqBOLYdfwHEq4BlcwMo+7B X-Received: by 2002:aa7:d588:0:b0:461:22bb:1ae4 with SMTP id r8-20020aa7d588000000b0046122bb1ae4mr19138363edq.17.1674054790359; Wed, 18 Jan 2023 07:13:10 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1674054790; cv=none; d=google.com; s=arc-20160816; b=s22UlH5TuZJNRnjDqdF51cb5wy5McK8XynTS8iPb0qeyMJtz1/+245Q1b43W2wpX7n IlgIS476g9q4Egun/AEfty6Fq+QAFE02SRZzAeGrAx+zc07fz2cju5xx9KFRFnnGunR1 NDK8+YQ6omssjT9LFW20+e3CrJt+CGDReIF28zmlf9EDLef2k6VUTtRZmpyHWvazuw7I mfAKh7okRjNAwrjjCXPuxMsrxhJCfclJjsPyWXWRMDVg9nqUesuA5lpveUWrtQuj5iuT zK/nsfki+bw99FRW3Pw/3VBhixWERkZXKUHOPFdOHzg8hm+e6uvjyfO66EmuWiQirBsc C5gA== 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=7WUljA05hxjrMgWInu+aANTEuP2TXhzChwqlFzG2wks=; b=SHN/Ym1v0MKTjzGCN9CGESawti3BghDVj0E1wTmQG5jueZkEJusKwfRvR5n6W+kwVB dpTHKLml+EG6KgfERqXOU7yjWE5cwGyYlRE0ZtAv968ulfT94sXsFwZ7x78q3ZqDFeaw JW0xboJdxNLdSvhxzuFWxUgZkejX2T3qmnV4Nao+CfNVCGUUn2jDOA6WTnIC/n+spFwe NADmy/mBzJRYe9j8zkfUj0ZkwpuEhYOEEmsHbBSXFowL0P4nzjjwugQJMndJTtfOyRJs 7V95Tr10f0BpsVUAboVJnRzOU/L7lQFbqXxD8wyGgWl2foU9PbtCpSX4lrayVxyj1Ydw Ad4w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=VR8yk8cQ; 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 y10-20020a056402270a00b0048e913098c1si43765164edd.398.2023.01.18.07.12.44; Wed, 18 Jan 2023 07:13:10 -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=VR8yk8cQ; 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 S231666AbjARPMN (ORCPT + 99 others); Wed, 18 Jan 2023 10:12:13 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42238 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231806AbjARPKK (ORCPT ); Wed, 18 Jan 2023 10:10:10 -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 79A8F2F7B9 for ; Wed, 18 Jan 2023 07:10:09 -0800 (PST) Received: by mail-pg1-x52d.google.com with SMTP id s67so24721031pgs.3 for ; Wed, 18 Jan 2023 07:10:09 -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=7WUljA05hxjrMgWInu+aANTEuP2TXhzChwqlFzG2wks=; b=VR8yk8cQwKE0vjKVe3VXtUhppdd5/u8wgdmx/K6x1OCLgWTvaUlef55WNSjPhLRgyI Q5dmMt2x9vbrjCfOVHn5wlQ/DYqZ7MUgiTO/sjdVRN4UuVVQ+/eFZ/22+mqFV60K7wug anW0LVvjuk1/W2/NQHSW44QI4nWILiwIlMEITXXs9wIjljOsSkqdVB/VxYrHNgVreQxK cqdSAFIv4JDAG4msauY6MlxEqQVwGk/HjTXxkn0m+dCfMtaOZk/l1PZgXqWnfmOAqtle GsYU+qa0tfknMrto2AruuC9vOCHYQ/OCAI9dr4DDI7PhKZEJiCxXsZjBNbETG2px5eKK Z4rA== 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=7WUljA05hxjrMgWInu+aANTEuP2TXhzChwqlFzG2wks=; b=ZCDUPeDeEntSFjM9K3Evn/sq881MzJxdwES3AjrkSYVEB1BMxyQDUh1rtrSWGO8WrB m2NjQxPjtE2LjQ57GIBqSd/qowHLJHPVJqk8A8UxILx8EgnCsCMVAVDlqyQ5FAKOOz3c r5vI0uY6egvip5gKn8rUC88aoa1LPgWfHhArhdHI+xFRIwvQyET2EGXASL0yMVMKEVtF pmeo4MISfc4Pp41IGIlviOHVDVNhbeE03jiA7J+srvKhiLCClMV0rVNMrERRbtl+knF7 YfQE0C3qgpO0KKQJqA2rb7Ev8xEh33nhUj9n2Z65T7RY6oWKF9ANCKoILDlFXzj5Cxls flsA== X-Gm-Message-State: AFqh2kpXSf8NSoCw7dM5GzctnyXBD/Gu1At4DIw/Imw4ERgwYRPrwLVK kC3JcsMSD2ObA/RzIQOEUvYv X-Received: by 2002:aa7:81d4:0:b0:581:b3b3:7717 with SMTP id c20-20020aa781d4000000b00581b3b37717mr7424491pfn.26.1674054608907; Wed, 18 Jan 2023 07:10:08 -0800 (PST) Received: from localhost.localdomain ([27.111.75.61]) by smtp.gmail.com with ESMTPSA id i15-20020aa796ef000000b0058d9623e7f1sm6721544pfq.73.2023.01.18.07.10.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 18 Jan 2023 07:10:08 -0800 (PST) From: Manivannan Sadhasivam 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 Subject: [PATCH v6 10/17] arm64: dts: qcom: sm8150: Fix the base addresses of LLCC banks Date: Wed, 18 Jan 2023 20:38:57 +0530 Message-Id: <20230118150904.26913-11-manivannan.sadhasivam@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230118150904.26913-1-manivannan.sadhasivam@linaro.org> References: <20230118150904.26913-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 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?1755373675867517596?= X-GMAIL-MSGID: =?utf-8?q?1755373675867517596?= 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 a0c57fb798d3..7fd2291b2638 100644 --- a/arch/arm64/boot/dts/qcom/sm8150.dtsi +++ b/arch/arm64/boot/dts/qcom/sm8150.dtsi @@ -1762,8 +1762,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 Wed Jan 18 15:08:58 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Manivannan Sadhasivam X-Patchwork-Id: 45330 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp2391362wrn; Wed, 18 Jan 2023 07:13:07 -0800 (PST) X-Google-Smtp-Source: AMrXdXtmGan28oHquWPxjJr1mPU6mGBbqATLwzsMlDNrpPi9OCPxkDn7bZ9LbFQZZ8xv0UIX+WhU X-Received: by 2002:a17:903:3093:b0:194:8de9:be6b with SMTP id u19-20020a170903309300b001948de9be6bmr7384991plc.5.1674054787568; Wed, 18 Jan 2023 07:13:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1674054787; cv=none; d=google.com; s=arc-20160816; b=n1BHT5ZWGYskmmj5tsDF40cNXrdYLdGgZSMyQMbfXDTQmVZpKQEJXKhRJjk7O6Tc1u JyPUoMs+t9KhFPXKEIzdTRr4NnLsS9Sa7aId46Za+v5jJ+qsePK3jCrqGMKZtitITAir /YRnW/DyO544Bn5r+D5sxpAYQQyhLvf0qB+LxgXWkt4enVcfE1QL1WSVwWRQ2m7DRTtJ HLCSC0Fv8vcbdrLqHONbJgDMDG38W1bxZxYSeSl/hy9PVq78qBuDauH6RuIWos8Hwb84 qwXh+2l6AHP3hWkcc/i7eiGtbEI80W71FUr0Wjb8AvXfLA5YRz6u6sUOdAt9xkGkwwlx Qndw== 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=WYoJy3okzdnngL6TcLmeGykcAQcBXE1fb+mKXu1bB1c=; b=fA6OE9AgvhPheUckp52mQdC8W+kEByiPtWMOstNkbLKEsBXeI/FoO9FO7hL/g7dLe7 EhUCr64PvHwtT4aNljFMqGxlfdfJmIWnenWMRAOhbsKP1vXQHUKiONhMfjUn23hy7dq0 iQJpXw8KBWxl5a/kbZ1e6nE1ywgsEvciqxMeM7UdgYVHSZWIka+sjo0H1/fUNwa6EcN/ DaowoNO1je8+28HS5vaLkdM/TTlkdkozH/C5QvMcH+gr1+DqF5XCv1bju5tNgjZtOc17 ryDg5SaiRMdH3rXY8LNKR07IM0/+09/VenCPTqaJDjockqTl72eVlZGD8pwtbpnDwBxY Ee3Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="IQPIE/eX"; 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 u7-20020a17090341c700b00193353fb086si30185176ple.383.2023.01.18.07.12.55; Wed, 18 Jan 2023 07:13:07 -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="IQPIE/eX"; 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 S231718AbjARPMW (ORCPT + 99 others); Wed, 18 Jan 2023 10:12:22 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42540 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231690AbjARPKU (ORCPT ); Wed, 18 Jan 2023 10:10:20 -0500 Received: from mail-pg1-x534.google.com (mail-pg1-x534.google.com [IPv6:2607:f8b0:4864:20::534]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A95CB38B59 for ; Wed, 18 Jan 2023 07:10:14 -0800 (PST) Received: by mail-pg1-x534.google.com with SMTP id e10so24712912pgc.9 for ; Wed, 18 Jan 2023 07:10:14 -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=WYoJy3okzdnngL6TcLmeGykcAQcBXE1fb+mKXu1bB1c=; b=IQPIE/eXydmZ3f4OORjsxJU3PrDJNNWBD5X3faQZsETILHHrwW+fCkgS9LGofsk6L/ kg6ThppKwQ38Dzy095MzkDh+hzytj8rp1hLOn7YhbnwP2m0bvwGPlvIWRLeiJWTF+ElK M1vkwKc9Y8KjPB5l5yb7XrOATb3dnn1SQW9GiMqfT0oyqpOAPJywOh2sHvRp5ioG2yn9 1HjXoIpsY+WlRaTlSMwyT0RZoqtJIPrNUAkwWhfZ7Xtv0DaRmC+p44YjD+u90EvxQiXJ vNRv1cI+M7q6kgKfypF16XBMAE22IG0NHKKTDJX5zGJNuuA2N/IGN7JaIbkaWobi9Z3G RbHA== 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=WYoJy3okzdnngL6TcLmeGykcAQcBXE1fb+mKXu1bB1c=; b=NurPqbdo3b/6SuK/6XZFFLdYN2kSN4a7JLqCw1JfN2TdRgqOJHfun2iw+JR+LrD9pb DRW3M2B+xErKEefwHGd6Qsg88vXMkIouw896dRfVmYlPyQjFfTPiBdepeQltS2QdzLBS sZy3BXLAdTBG10R80V3E+pr7vLNLTIFaaXAhNe29H58/zD0HUgIwVWGCdw79jLY6nWl0 Dm0lhZJbccPMJh0ac9aZD9JnsuBn++UaXOislT9pDo2z7oE8+dAi8qa6mMCPIyot4ZO1 tKSeDoRjuy8tJ3vLcTmUEHHa2lJIxC0zPdMM0fuPo+dwuppXBD4FTfemNzK/7Ql13YbO M2jg== X-Gm-Message-State: AFqh2kr7l5bqDrhCTpzgrdK9QmrFyUaEdRkpoOFstyHTe5w5tBn9cRaR pNULfg6Da5PjlELZJGcKuwQX X-Received: by 2002:a05:6a00:1887:b0:588:cb81:9274 with SMTP id x7-20020a056a00188700b00588cb819274mr11486900pfh.32.1674054614292; Wed, 18 Jan 2023 07:10:14 -0800 (PST) Received: from localhost.localdomain ([27.111.75.61]) by smtp.gmail.com with ESMTPSA id i15-20020aa796ef000000b0058d9623e7f1sm6721544pfq.73.2023.01.18.07.10.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 18 Jan 2023 07:10:13 -0800 (PST) From: Manivannan Sadhasivam 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 Subject: [PATCH v6 11/17] arm64: dts: qcom: sm8250: Fix the base addresses of LLCC banks Date: Wed, 18 Jan 2023 20:38:58 +0530 Message-Id: <20230118150904.26913-12-manivannan.sadhasivam@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230118150904.26913-1-manivannan.sadhasivam@linaro.org> References: <20230118150904.26913-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 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?1755373672897135847?= X-GMAIL-MSGID: =?utf-8?q?1755373672897135847?= 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 dab5579946f3..d1b65fb3f3f3 100644 --- a/arch/arm64/boot/dts/qcom/sm8250.dtsi +++ b/arch/arm64/boot/dts/qcom/sm8250.dtsi @@ -3545,8 +3545,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 Wed Jan 18 15:08:59 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Manivannan Sadhasivam X-Patchwork-Id: 45332 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp2391724wrn; Wed, 18 Jan 2023 07:13:47 -0800 (PST) X-Google-Smtp-Source: AMrXdXuNWdqQPDIBGv6Luw62nozO1G51qim+ZxDq3WOh6JpNoGSgem+sQ0QIc+zRk35i03TTrSRd X-Received: by 2002:a17:902:d888:b0:193:1f24:41c9 with SMTP id b8-20020a170902d88800b001931f2441c9mr7474631plz.65.1674054827614; Wed, 18 Jan 2023 07:13:47 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1674054827; cv=none; d=google.com; s=arc-20160816; b=f4ZzsYS88h+60aA80lVIAHH9Nw9m33S9JF5O6h1yPH73Gi8lkuQCrC/QG/sEDrXBW9 ENIyRDMDHj42qY83/RVLbitYtHwR6WfGhhro4yi/i33eSCxcE49P9LcBlZDHB8qA42al 4n9ETiVQ6odTMfWZr1ENv782HiZSrWMCElHvv/EuDWV0tsWNujVRXR7xM8TLcl7MyPJ/ E/wbdysEadro9sO/TFKzFGwxodzSXpiu3tGLLQxLaa9nTxLwkT9TiUmPu3y8VasiZ+oe 2s1xwtrv1kZzYFXvOEawAz1NRmljrYawFtPw6mjYfJ5jDeTnH+HV5ySy+tTbgwBpV5bF BSsQ== 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=sMev9I+ZdryrTBjzJ8tiTgJp1UwzDLK7UbgCFoQvzyA=; b=zJnQ0gneXk6459+9D89PUEBuvminG1JxC4dSrU85jjIUVbOytNX8Cfxqp5X7Ve7Tj7 xqMtRTeeq2e4HA/0fjDY/41XpfT20uC3r3f5GQfpAO0hQX/ySsBDd6Qg6xlXVRsf6CQY YWMIuAHJTZ6/xL2UryYQF58uRGO1L4QEs+qDhhZ+ogeZbnkIU1ePqK1brUqNy8Blkq23 e7Xtwp2sjfld090o6EV4guZ4tDmXNO939nmFWk/378rTjjjzOJHXj4QWkDDbWe1EnFBA r32hCT8k7HdKY+YFfVPlQxam/HOTcytHNz/W1fXm8xxkqP2LDvQGKi1s4vfUg66WxcUq OeSg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=M2Zt7Bwl; 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 v22-20020a636116000000b004d0f07ab4a5si1346403pgb.601.2023.01.18.07.13.35; Wed, 18 Jan 2023 07:13:47 -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=M2Zt7Bwl; 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 S231626AbjARPMm (ORCPT + 99 others); Wed, 18 Jan 2023 10:12:42 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41702 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231743AbjARPK7 (ORCPT ); Wed, 18 Jan 2023 10:10:59 -0500 Received: from mail-pf1-x42d.google.com (mail-pf1-x42d.google.com [IPv6:2607:f8b0:4864:20::42d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EEE503B0E5 for ; Wed, 18 Jan 2023 07:10:20 -0800 (PST) Received: by mail-pf1-x42d.google.com with SMTP id 20so20990166pfu.13 for ; Wed, 18 Jan 2023 07:10:20 -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=sMev9I+ZdryrTBjzJ8tiTgJp1UwzDLK7UbgCFoQvzyA=; b=M2Zt7BwlCbRUyzUpY0C8uW6kOyIgROzdxl18/wJqi7ZDLkX8RZyNuAyr+YNA3ksmio V45R3WJ5eJrllVq6ApMZjda0bSw3tD3wK6HWZ2YOkFwfbSwap/oi0+tjnQOpbws9b84P XxBbET5BM0uVyeJB4pbjHmmN1JN8ldeexZqyh3g1n+EpBLbf/Rtf3AvWCMwb+XJ++4X2 MTLNoIRkwKiq1ODJtjklt4MMK2b5tbZlG+L86DYsUUxS+zy+dbr62voqspwteMG95K9X qNg7bp0EGJbjZoBNwKeQ150qgHrqHEk8776bDe31wTK27B1x3Ko3iA3c5WQ/NDi2TZ/5 dhGA== 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=sMev9I+ZdryrTBjzJ8tiTgJp1UwzDLK7UbgCFoQvzyA=; b=lKaovqzGo7OOVzXWDEYaaGiX8s8s7+KkQUkvtqLqmInnaX5iahtaUtHqXppMxfD1JS +No7Ol4BRELp/UOaWDsylSqxaA/ECYgOISOgujthsZ0kjZNS/AEPs4Kui4fdY+SrJFbb eusjcE9IiL1iVZcYmnSXDipPBP77eWMIzC9WQmKUe5tkRCg8dTnC9wdCfSGGy/YGTTmS d53Uw5we38J28scy8SwRGKe0PbRD9g+AnPqcDqeA2sEetk2n3tpuE0t/USMOoQ9PCPPM UxMIbhAlnx59hBjDo9O1VUxVYCUAyzYRalZ2iOjl0eYnyUxKUTrPssc7uTYod10A3/VH q8TA== X-Gm-Message-State: AFqh2koeAtzm6KiEnhIg7DAxfTPfbSlafuGiaIi39JHgegCvQffchwHd 2xIQ0HKAGKBKJ3DgoL/teABp X-Received: by 2002:a05:6a00:a27:b0:566:900d:a1de with SMTP id p39-20020a056a000a2700b00566900da1demr9592363pfh.26.1674054620187; Wed, 18 Jan 2023 07:10:20 -0800 (PST) Received: from localhost.localdomain ([27.111.75.61]) by smtp.gmail.com with ESMTPSA id i15-20020aa796ef000000b0058d9623e7f1sm6721544pfq.73.2023.01.18.07.10.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 18 Jan 2023 07:10:18 -0800 (PST) From: Manivannan Sadhasivam 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 Subject: [PATCH v6 12/17] arm64: dts: qcom: sm8350: Fix the base addresses of LLCC banks Date: Wed, 18 Jan 2023 20:38:59 +0530 Message-Id: <20230118150904.26913-13-manivannan.sadhasivam@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230118150904.26913-1-manivannan.sadhasivam@linaro.org> References: <20230118150904.26913-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 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?1755373715201989722?= X-GMAIL-MSGID: =?utf-8?q?1755373715201989722?= 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 245dce24ec59..836732d16635 100644 --- a/arch/arm64/boot/dts/qcom/sm8350.dtsi +++ b/arch/arm64/boot/dts/qcom/sm8350.dtsi @@ -2513,8 +2513,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"; }; usb_1: usb@a6f8800 { From patchwork Wed Jan 18 15:09:00 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Manivannan Sadhasivam X-Patchwork-Id: 45333 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp2391904wrn; Wed, 18 Jan 2023 07:14:08 -0800 (PST) X-Google-Smtp-Source: AMrXdXt/lq5fjd7SFYr1v8Uq0VzOy04amLYFZkZcKY4BrDxdo5Y5nZj/2KveN96FUpZpSWBzTo6J X-Received: by 2002:a17:902:ea94:b0:194:c128:1c92 with SMTP id x20-20020a170902ea9400b00194c1281c92mr1120866plb.65.1674054848356; Wed, 18 Jan 2023 07:14:08 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1674054848; cv=none; d=google.com; s=arc-20160816; b=M0siW3lZP7skwmc5dirAmLuLLJPFXKhp9RbvKKS1pZ1iHT0WMjQk5POFqAnwOYIqYg lTN8o1aXPxM1+v4KrpaFwLR+AccPJkFuE0BjAPTl/MAkqRoeF+29FNNeWG8QY9wuIMxE Fzf3vvRyI7jzIBP32cIioZQXleLy0APR4WYaIfEEu3TGkoBe1BzFRM4YyBZuxbDJWrzB s49KE8LAwQijpznwEkPbwTiFPeo5nuk6Qe31MTvunb4rAX5XJK1dZlM5icj3tg03FgpL zovPYigBcgPjyQtHMGBkL5Zcs92XFeBJTMsajtq6uUPpEbjnc9WtaTP2jDIdeB+1pJOK 1Tzw== 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=u6zR8ugZMMSbsUYzZxGLGG2mvpL7z7iHt3BZjr/IYFc=; b=jKabS6WlWV6r/X2X8BYhUZlTrqA8nRzh2XQ+tXXdycYSkddRUgok/hoZexm4oc7SBc u3i2wLW/0p+T6p0wWe48oG3eBYMJr+Rh1ZhHObzLCI5QPXA6t5fRZR4DRP3vDQmpMwDl o2agof9w9pbIPTCLHt1EkCPjzDMtcZ8kykqjmn40ULVhhOEeLbvaNPUaMOTZNhFfEncT 2zOniVCLQs4LCYwoWrFSrA+ocgTJdUkUxCSnaNAvoV23afzkwRtKRCXpezJi68dE5VJU yGFmXp9pL9gWlDd6Mbbj8UvyNWKvB19M1uWWZ3S204AG6rVgpJkwHPaDQdqMQJsKlGTT H6eg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=KYHlJzqY; 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 k14-20020a170902c40e00b0018cfd25a8fasi42586936plk.214.2023.01.18.07.13.55; Wed, 18 Jan 2023 07:14: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=KYHlJzqY; 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 S231781AbjARPMv (ORCPT + 99 others); Wed, 18 Jan 2023 10:12:51 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42078 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231790AbjARPLh (ORCPT ); Wed, 18 Jan 2023 10:11:37 -0500 Received: from mail-pj1-x1030.google.com (mail-pj1-x1030.google.com [IPv6:2607:f8b0:4864:20::1030]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7492F3EFF3 for ; Wed, 18 Jan 2023 07:10:26 -0800 (PST) Received: by mail-pj1-x1030.google.com with SMTP id o13so32563806pjg.2 for ; Wed, 18 Jan 2023 07:10:26 -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=u6zR8ugZMMSbsUYzZxGLGG2mvpL7z7iHt3BZjr/IYFc=; b=KYHlJzqYB0S+TMh1QJwb46T/KhpPwcT8JN1cCEJBxOmCb9ejw8Zk+e+cZBbdB2WFgE wfOnPik0q9Hw2wbxUEGe7kxI/Z7WdP0wAjBxbX8rmcg36gAMEO1GfFz3ohLvzLTpH2tl ULbJQ0G4oQSJvt7sd1uLCAAgXQT9+vsQ/v0DiDni/R0YC2Xw0SNdVeLPrdGLARz8NKK5 HMhL6Ens6OC0f1B1QVLUo/cTIdixQH1788x7tCUs69jhWgJNHuN+DGoBIYIU5CdEsin+ c/UGlcL4TmwIjalSQaEJbPldm/oC/LGiTLBBubvytFov9+SWTj837d9bagC8nBp/87i2 5PNg== 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=u6zR8ugZMMSbsUYzZxGLGG2mvpL7z7iHt3BZjr/IYFc=; b=uCgpLyYEEGXYvFA4EZnt8D6HnQgJcJbge0iIaoZmKeyH8yKDWv6/I1wrrDUR2OXs95 pTY0U/AeP0t8hPCvmhgxe6mw6HUsmdavuk7jZbsosF9TQk3Tp86CG9icH87DUD+Eti0K FBY1vjeb0Dbf5ZGfp7bHSxx/ks2NeOsH2Qw44z0hpD33q9/3cLayXO6GAEgdt0MkYIad gBerG0Hafwb9oesijMYbtJOmcL2dPtErSQVDRJ6IbW8ygHSuev7pOI7J61SWMWR0jL+V IFjQIhmFhKnXyMAbsIKNjuUtc532oxiGMKlk2oFnQSfle8LrKwG/Bph7ClsAfwbhGLDt jvXA== X-Gm-Message-State: AFqh2kpcvQ+e6hSai2KcmQWsg3bPpMDlQRfytmZ6sDGUWCTzBKpEenPN tQfwY8ciIBrHQ7i2AkuRpIl1 X-Received: by 2002:a05:6a20:be1d:b0:b8:7e6d:5b52 with SMTP id ge29-20020a056a20be1d00b000b87e6d5b52mr6614642pzb.38.1674054625604; Wed, 18 Jan 2023 07:10:25 -0800 (PST) Received: from localhost.localdomain ([27.111.75.61]) by smtp.gmail.com with ESMTPSA id i15-20020aa796ef000000b0058d9623e7f1sm6721544pfq.73.2023.01.18.07.10.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 18 Jan 2023 07:10:24 -0800 (PST) From: Manivannan Sadhasivam 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 Subject: [PATCH v6 13/17] arm64: dts: qcom: sm8450: Fix the base addresses of LLCC banks Date: Wed, 18 Jan 2023 20:39:00 +0530 Message-Id: <20230118150904.26913-14-manivannan.sadhasivam@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230118150904.26913-1-manivannan.sadhasivam@linaro.org> References: <20230118150904.26913-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 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?1755373736500282167?= X-GMAIL-MSGID: =?utf-8?q?1755373736500282167?= 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 570475040d95..12549a2912c6 100644 --- a/arch/arm64/boot/dts/qcom/sm8450.dtsi +++ b/arch/arm64/boot/dts/qcom/sm8450.dtsi @@ -3640,8 +3640,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 Wed Jan 18 15:09:01 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Manivannan Sadhasivam X-Patchwork-Id: 45334 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp2392011wrn; Wed, 18 Jan 2023 07:14:19 -0800 (PST) X-Google-Smtp-Source: AMrXdXsAB4KsFjGTKPDJbpiTRVqKnDz/OhDdjoPEyyD9fbcNNRqxFWpoKckh5NQ0IVH6TyOkxHNt X-Received: by 2002:a17:90b:368f:b0:229:1607:c830 with SMTP id mj15-20020a17090b368f00b002291607c830mr7832705pjb.25.1674054859646; Wed, 18 Jan 2023 07:14:19 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1674054859; cv=none; d=google.com; s=arc-20160816; b=gQ7l2ada8x+ynW+Sy9bbuu9yrpQ62WYmupsiFo4DsHvtE5UyTRfdAV43J/AT2R2eRR Iiudw9tgG2LL7Xo0Pmiv0Yax0x2yXRKEEminEmzSoVdlFY/5APaXe/hQA6SM9+zENAAz d/4Oq6XLBNwk6VHk+uvTt6PV656suCMNqLoYR9exY9TFxvRa+FPHrEyd9NewvZ6O7oQt eZYq+GNIyOoFXcVy3pB/lTuwUH93DfafzbtZlEzreNykdPH1Kfex1MW4RtbNsLf19paR CYt4ijnS6OJUsMLo1QcEgaNuriOhYeR2gyPfLTtqKik9Eh/hgoXKdi6WWWrsOTQUEIFk GA2Q== 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=znASgBClq0rwhBOl4/Fw1c5T/s1foKbyxf4XPqRiKDI=; b=teFowHWHh1MfHe+8xXUOtKe10edjGEC2DOZmdYj3lJ2XwlvMVejaftF80KeyQLPLhk 3aFqwxIpzSQXPtGBCpnCmk6PrUzE6w0voS1IMERcbCxQBNcEBefTQseAtxaRn3Kr/8N3 5C1MOu83CnqCq3OPl5wxLXxYS549i0dQRuEdmFRvOUtGauNtFZeN8I8Nm6Y1c+ml7Ceu wahkh0+zpyXBl/Dw7vt6AM84D8z5ZCUKV8GJh8g3E15WdKnzPVvym8TO22M1sZYHmQiN PxvSpaqd32MUhRw67a0cB7I/VqNw1TjPkJfoY+wORyWwxPPK5VheX1iVctDEiLctZWeV 3wPw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=WNcEJPVH; 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 nn13-20020a17090b38cd00b002268f9a671bsi2385898pjb.92.2023.01.18.07.14.07; Wed, 18 Jan 2023 07:14:19 -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=WNcEJPVH; 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 S231704AbjARPNB (ORCPT + 99 others); Wed, 18 Jan 2023 10:13:01 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45670 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231663AbjARPMN (ORCPT ); Wed, 18 Jan 2023 10:12:13 -0500 Received: from mail-pf1-x42f.google.com (mail-pf1-x42f.google.com [IPv6:2607:f8b0:4864:20::42f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 46454458B8 for ; Wed, 18 Jan 2023 07:10:31 -0800 (PST) Received: by mail-pf1-x42f.google.com with SMTP id w2so11009348pfc.11 for ; Wed, 18 Jan 2023 07:10:31 -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=znASgBClq0rwhBOl4/Fw1c5T/s1foKbyxf4XPqRiKDI=; b=WNcEJPVHob+I5LkpCpds/u25pLXDuKLU13sQsuZ8KBFq26kQIcok8LXN7g7/Gkq5qi 9IyXPvPwKwP2zrabInA+cD2HLSM57cYWhP63aHKz8JE8tz48WX0BV0qIGEDFj7HlWiH9 uLt0DK8WfNX1EONBZAvo4vzPm8hRYhjeI+oqmOCAagCpSNXXQP27q04vQMqWeLOaxM7p C+ThtPZL5LOYKlUUjNWWiz3XLqgkSi0CLIVd4bSRcqXLjxyV1lPfZ3Z3/BR1GCjfraQX I68fd6iahaLc34gTFjd6Zl2UHiEUnJD90mqdC96jkSIQC9SIbpmrT/Z18xKQRyqhlICk jw5w== 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=znASgBClq0rwhBOl4/Fw1c5T/s1foKbyxf4XPqRiKDI=; b=B/okae0Q6ws0nCbZE4RtGfDPOXMyKjCyT6iu3KwjxLrgEfRO7693m0aspJSBsRf0qC +YnJp9yMO5lKX6eKZO00jyrBL9mw+1EHSaMz0pMC799lTAUknqXkV0Hl2FcIkUC22xzV CrFdqgfhRWKgEZJnHAzfHczo3bO84UIrPpjEbZjU787SbkdNr1+Anu24bUreqObVKGKT JtQmohZYdpFbDK87OR32Fwmt06VwUWDsxnZzDy4+OoPCxAZQnvozg7hf0fz7+tAIeido jOJOiGRNHZPMJljoZ1RvMyr+mefMSF9VRLMgn1+vtT2KuAW2q7cZlv5HCNC8nz5LufzP ekTg== X-Gm-Message-State: AFqh2krf0nGfZDLF7/SDEdkpNDwEylljSY5P7ZijpvAZvasmIcrA5CJV 4UWIE3iC5ZVv2YJBlP0Xz/yK X-Received: by 2002:aa7:9204:0:b0:588:4739:9a23 with SMTP id 4-20020aa79204000000b0058847399a23mr6962640pfo.15.1674054631338; Wed, 18 Jan 2023 07:10:31 -0800 (PST) Received: from localhost.localdomain ([27.111.75.61]) by smtp.gmail.com with ESMTPSA id i15-20020aa796ef000000b0058d9623e7f1sm6721544pfq.73.2023.01.18.07.10.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 18 Jan 2023 07:10:30 -0800 (PST) From: Manivannan Sadhasivam 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 Subject: [PATCH v6 14/17] arm64: dts: qcom: sm6350: Fix the base addresses of LLCC banks Date: Wed, 18 Jan 2023 20:39:01 +0530 Message-Id: <20230118150904.26913-15-manivannan.sadhasivam@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230118150904.26913-1-manivannan.sadhasivam@linaro.org> References: <20230118150904.26913-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 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?1755373748515797345?= X-GMAIL-MSGID: =?utf-8?q?1755373748515797345?= 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 43324bf291c3..c7701f5e4af6 100644 --- a/arch/arm64/boot/dts/qcom/sm6350.dtsi +++ b/arch/arm64/boot/dts/qcom/sm6350.dtsi @@ -1174,7 +1174,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 Wed Jan 18 15:09:02 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Manivannan Sadhasivam X-Patchwork-Id: 45336 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp2398837wrn; Wed, 18 Jan 2023 07:26:52 -0800 (PST) X-Google-Smtp-Source: AMrXdXsbT+BaGPfMV/hy0LZaGZcHs0XMzwSX6mL+D3nD7/s9VYHxwk/mvgdFKYCMS15cIsB7gDDg X-Received: by 2002:a17:902:bd95:b0:194:6d3b:3a68 with SMTP id q21-20020a170902bd9500b001946d3b3a68mr7649692pls.5.1674055612369; Wed, 18 Jan 2023 07:26:52 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1674055612; cv=none; d=google.com; s=arc-20160816; b=MbFBrYVDcLYeodDgC789x8/JNmY0jEmKYglGhUKsZwJeNPCW4y4J+IWXFrrJzZa3Fa iOZQh848MJPf6bmv4ja4P3akKaks5AVjyWJta5CJHpalVHbqSUxydy9q47COH9QEFfB8 pBxtrAnaMeYjpfIR8DRvPwoSbB4K75PtDd88iXOA9lO3xtehLs/ZmyEAHhFq8AsYrF4Z 0hiGNRz4cNuxd3KypABNsIeQv3OE5eAtGNcOM/7/U8ZGS7PA6lKEOLoEni3TLS88keZ6 mzjMXX2ey3+QEjW1Y9qMGAHArL04/LGe2styQPfik7775r/wVyYhCbTSM6mULdiQLsHw iVfA== 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=cBLjkvdD8e7aIXqICz/ZevQhckT7eENqL3D19Ni4QR6dLep7oHcuUuv3uHXtMrFa4S zZYxgsA9OVAezcV6Sub/WK7LU9Myf0o6bFN3u8ZKgkJ2TiCalYjTMOVZUyV+r3Usu41r hLh6rAiaG5Ex4Je8baYQx2u5ewx0CkM10vOVPKHRS7j8yD1aMKz5VA9mK00f4GyQA5y/ x0Rpn6rKQEgC/97p+jAeDjUa4pcSf7DYn3QxLCJeOW90DEAlZDJgEhkUmfxPc5nWNj5v ZGKhhmqUYTDY4GcQcghiYVYnUoVDEjA2Pmv0PfsnOH5yVlc1XW05jfwuCES1o0fdwPqH 9Xeg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="mC//8Sq5"; 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 i13-20020a17090332cd00b00194bda5fe63si1702504plr.616.2023.01.18.07.26.39; Wed, 18 Jan 2023 07:26:52 -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="mC//8Sq5"; 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 S231501AbjARPNz (ORCPT + 99 others); Wed, 18 Jan 2023 10:13:55 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42538 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231820AbjARPMh (ORCPT ); Wed, 18 Jan 2023 10:12:37 -0500 Received: from mail-pj1-x102b.google.com (mail-pj1-x102b.google.com [IPv6:2607:f8b0:4864:20::102b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 63A9F457F2 for ; Wed, 18 Jan 2023 07:10:37 -0800 (PST) Received: by mail-pj1-x102b.google.com with SMTP id gz9-20020a17090b0ec900b002290bda1b07so1966012pjb.1 for ; Wed, 18 Jan 2023 07:10:37 -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=nUusDRy45tnE3HpdbouewJfbkC176V5vp9gS5W4zqOI=; b=mC//8Sq5Uo1MyoAqo1zbEadfDkDmj02pIYl6mTFbVAW+dfWy7iW0ayrVs6Cx45oIGJ 5IkccyBRtHPOWU/WXdjepaXTdKHOaXijv3i+ADEKFk7cUwKbuke4DqU+YgP9hXbAX3eD JIinc2mhacVgyqbLZ6AO5v6V4+Fys4HB+ud/DE40fjgO4WulmIRRCa7GdblLWa8B1MhM yZ4KH21CZ9UkLuDJd4SXwn/J3f+y2ttpCls+xnMBErMwcoKL7A9CmX/KeiHJDzN8fu0V s7w0xJio26DnLajylGBtbo0gfWnEFFMWiE9t8p6Marm77WgUcDOa/uEHKclk7dmuzZOy m2gQ== 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=nUusDRy45tnE3HpdbouewJfbkC176V5vp9gS5W4zqOI=; b=oJaQWunW2wzNBCVO8GUR6j1lWQ6kIgT9f6/c/Qluj9cvTlfKCVFkY4t89HI4BU8qKJ n29EkTziD0zNTYf3bbiLp0ckn7kYDAww4srupArU1RMWo/1XL91mwUGRM8mXcv66Q6G6 zpnrTfKDk6XpRBvBnm0FiCoTi8nyuvMlOaxSRn6IL81SCZxeXjzG0KsdJk5SVDcsOR1y 98OAKI8hcc0p42pXJd9pcL4ER1gNk9OTSDtN5ameLqAJmMNCrn5aKSgc46uzl2uqlQ8c VdQSozsb+6jIPIuN1iFoU8fjzUuDBUHbPlcBJhFykr10Es4oAVv8Cs8jQfM2D33sscMw dtoA== X-Gm-Message-State: AFqh2kp2iu7K2BIvtLOXf4/o6AjtSe3r7MMFm7oqM0KAe6smkYdWEdnB lQmUw93ks13Qss+UEawjbRQC X-Received: by 2002:a05:6a20:8b0f:b0:af:ac38:911a with SMTP id l15-20020a056a208b0f00b000afac38911amr6831687pzh.59.1674054636913; Wed, 18 Jan 2023 07:10:36 -0800 (PST) Received: from localhost.localdomain ([27.111.75.61]) by smtp.gmail.com with ESMTPSA id i15-20020aa796ef000000b0058d9623e7f1sm6721544pfq.73.2023.01.18.07.10.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 18 Jan 2023 07:10:35 -0800 (PST) From: Manivannan Sadhasivam 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 Subject: [PATCH v6 15/17] qcom: llcc/edac: Fix the base address used for accessing LLCC banks Date: Wed, 18 Jan 2023 20:39:02 +0530 Message-Id: <20230118150904.26913-16-manivannan.sadhasivam@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230118150904.26913-1-manivannan.sadhasivam@linaro.org> References: <20230118150904.26913-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 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?1755374537687174249?= X-GMAIL-MSGID: =?utf-8?q?1755374537687174249?= 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 Wed Jan 18 15:09:03 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Manivannan Sadhasivam X-Patchwork-Id: 45338 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp2399488wrn; Wed, 18 Jan 2023 07:28:09 -0800 (PST) X-Google-Smtp-Source: AMrXdXs/ZLweWMz3enLIHlHM/0I88zDoRZdtZ/oxCu5SXQu3H5q++y7UlDHMlAaGKCjX6zyCnANl X-Received: by 2002:a05:6a20:7da2:b0:b8:5a85:632c with SMTP id v34-20020a056a207da200b000b85a85632cmr10174615pzj.60.1674055689409; Wed, 18 Jan 2023 07:28:09 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1674055689; cv=none; d=google.com; s=arc-20160816; b=p4UwtDfEnB3yxVUX9fS1lolHl18bFJJYg5JPh5U2wfXAR9aCNZK08IOtKNOtSddKfI LDYzmjuFxZCNFCxAq+xY2sXROnxJGPegr2Z4mLsS9ebxfE3zUGDrAzaTA/MzW12YR5vF jFEtSOHRY75DdViZbyBN55aLLxiUeT6tXBEyQwSUXsF329nK/Nk766IXcWdfVln7y/zS O0VLakJ7Xr5p4As4SXc1xrbbRZizye7QUvaDYMxyAoNsV93+GL0/Kdqo0IyPdUW69saJ jdxGmO5fy//4ZJA/VzSA8k36gN/IpEX+V4g1y2InRcaeF1vBXEylJ9+aLhzvCHR/dxAO CCug== 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=cBoPP7la/ua1BtGy3Yfc6n2eJd1xV8oYEaGxzVQpNAQ=; b=xnIaoU0jhG9RlSs3QrFB83ZXSHmRQIUEv4pu1hbrUtH5FuEhRZRRoot75K/yrZ+gmS MAtx/fwsFdFQkF93T8GoSeMWZLCIcf2xL/hJO9nvLNmBmepjwgi8eKFs82W7BTkDHYa2 tY321rMRSI5NyhJlRbQ32KyJH0RWAzv3ir6xatixm92lwFFE0H2IdfQ3vdOaHzwMg2lZ xyTFLsMdURhf2oywL+k/0kgLb3aeWg5JcWmjPD5OGNoaNgbRDGqm6MPYJZkuw57MOSZm BHTJAp0qXbw9csOaLFAFE4wT6miOaknANXy30i9e5O6/GvzKwVr87c4JuaqSYSQK8sYq Hz2w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ZnK7pMoF; 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 h191-20020a6383c8000000b0048e54a7f366si3060375pge.587.2023.01.18.07.27.57; Wed, 18 Jan 2023 07:28:09 -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=ZnK7pMoF; 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 S229771AbjARPOd (ORCPT + 99 others); Wed, 18 Jan 2023 10:14:33 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45828 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231684AbjARPM6 (ORCPT ); Wed, 18 Jan 2023 10:12:58 -0500 Received: from mail-pf1-x42f.google.com (mail-pf1-x42f.google.com [IPv6:2607:f8b0:4864:20::42f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B689346140 for ; Wed, 18 Jan 2023 07:10:43 -0800 (PST) Received: by mail-pf1-x42f.google.com with SMTP id 127so9139196pfe.4 for ; Wed, 18 Jan 2023 07:10:43 -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=cBoPP7la/ua1BtGy3Yfc6n2eJd1xV8oYEaGxzVQpNAQ=; b=ZnK7pMoFfj0Q4BnzQsiP1CHVWDjNgmQ8FXq58kmPVMdFll8MoE2KqeWeaIkeHTxYcW pwh9KGanvj7rvTSLAnkb5rUQqwvSNiBFDNNGyNmjMAVkdmaAYiqYhV2ka1dCnSboam4u VJvTrvdoN0pF1Ao4FXUphf3oeNOooK63ysbEBNDG6gUDyiHWUqSIsnIOP3qMU8Zlpbrh FpK/HyQnSOX6/2wRb5/xS3aV7xjx3v1weSO93quF+CxQT1CNIRX5GuAfYHB2KzjOp0Dt FhiFmW2gYVMyvGl3urrSTNsMWdAP61fWiiki98tWc66HGc7ZoxelMGV3vkopeVi4Al+c lbbA== 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=cBoPP7la/ua1BtGy3Yfc6n2eJd1xV8oYEaGxzVQpNAQ=; b=NzSNldgHvTkG0donBVhA8TmCz7IrzaS9rgojQJqvuBlsLx82r0Ohle9aveZyaK0SKT 59pcUtj79nOxajJJIqmXCCNCHiF33A1OtbgZC83AV9+sjlPS1ihe0ZBDsVxyMRh0cz9L UTAmRuDsHyBizBoEQjJ2BeHb6iwfdQuIBhG7U84MAo7XTcUiNbkWfbRFAz+WzVV+HlD+ hUfkFyCA8tEgDOnpgtw2ZFhgfE8MHs04+IbdzB/qqS2bkZ8Z8rYzg3lLC8gxdKzbcb0Y FyWWf7Hz4ZeB4aswsAZ0+j//CeqKMRWV9lYE2kI4TrEiyXF8l4XLugNRVpg+fqweRKpK YTGA== X-Gm-Message-State: AFqh2krBtAXfUOW22F9ScZXyviT/9nJq5buqZkJmU/dGHKmc6VrjT94q uh8MOYzYamRDEoctKbaT1CxH X-Received: by 2002:aa7:854f:0:b0:58b:b9ce:cda1 with SMTP id y15-20020aa7854f000000b0058bb9cecda1mr7521532pfn.28.1674054642343; Wed, 18 Jan 2023 07:10:42 -0800 (PST) Received: from localhost.localdomain ([27.111.75.61]) by smtp.gmail.com with ESMTPSA id i15-20020aa796ef000000b0058d9623e7f1sm6721544pfq.73.2023.01.18.07.10.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 18 Jan 2023 07:10:41 -0800 (PST) From: Manivannan Sadhasivam 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 Subject: [PATCH v6 16/17] qcom: llcc/edac: Support polling mode for ECC handling Date: Wed, 18 Jan 2023 20:39:03 +0530 Message-Id: <20230118150904.26913-17-manivannan.sadhasivam@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230118150904.26913-1-manivannan.sadhasivam@linaro.org> References: <20230118150904.26913-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 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?1755374618835534989?= X-GMAIL-MSGID: =?utf-8?q?1755374618835534989?= 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 Signed-off-by: Manivannan Sadhasivam Reviewed-by: Borislav Petkov (AMD) --- 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 Wed Jan 18 15:09:04 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Manivannan Sadhasivam X-Patchwork-Id: 45337 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp2399112wrn; Wed, 18 Jan 2023 07:27:32 -0800 (PST) X-Google-Smtp-Source: AMrXdXsE4hLBycvQSJ7X9YBE5hFegRGT3B4lUzNAVHEiUbCWv5sXqP3tuhCNQTm6bngT8U43gcwQ X-Received: by 2002:a05:6a20:7d8d:b0:b7:9612:709f with SMTP id v13-20020a056a207d8d00b000b79612709fmr9591714pzj.9.1674055652032; Wed, 18 Jan 2023 07:27:32 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1674055652; cv=none; d=google.com; s=arc-20160816; b=LTYPYbPc1TFZbA1dPygNZTisX7ZQrr1IrdZBBEUc66n63CiuBJe7rp6bxkIhv37y9M 1Kfsw19ITnSr86CT0fXlSRCgEaoFkW6vJjOHWYrr28uZcRSJDw4+YUcnM4n6CPaUt8kK pAmA9hWsUXz7LOb7WpB0ptylGnfKRkoVNHllFJ7jAe+gXSMRZUTvRdK5PsPa3TmzV6qA Fo3hPMVxoyKmh2REAQKfR4M7ZPqw5QW6qSB5Tv6ldl0HsDBtCAQ4gh+M+GniEw5cms8T llYE2aL25El7rXIRA32EbCNp71+UA7cLAgo3gdLfHnKrwLdzY40wDS4QrPjmmUm3E7C1 p0MA== 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=t4t3wjs91jqYDdhcaBgIoHHF665G49/NIuIJvlGrcfA=; b=0cM3IAa6CJ1WL3MumGoXGHKYbu8ujzkVgDw2pBiIaDJoO7ZM2X8+zAvjqki7lqOe79 ZHkqkeSXgG/sDu+9N/JNHKTIH75h+M6EabT+EFptit0XPDIiLLDclVMamueulXbhc8HC lTkhBj18v2PkWHQDQjHeaflQqC8On2FWXuIWfCBNRRvQs/I8fPdbih7P9CeMB/73rImn JGRhubxWKilHi+gIGc+zTRftE0ldsfU01m1hRHl9w8lRKv7YOkqM74AXT38o7lTHW/nZ 0G+w8xCjeS0plOrRN9NriMbgsu4LQ0FVZ6Hd8v9HZkQXcXJuWYBdVSDw6+AzSIowjWj6 6/sQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Do9F396S; 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 e18-20020a63ee12000000b004b6db45d035si23288843pgi.232.2023.01.18.07.27.20; Wed, 18 Jan 2023 07:27:32 -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=Do9F396S; 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 S231833AbjARPOt (ORCPT + 99 others); Wed, 18 Jan 2023 10:14:49 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48018 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231843AbjARPNV (ORCPT ); Wed, 18 Jan 2023 10:13:21 -0500 Received: from mail-pf1-x42f.google.com (mail-pf1-x42f.google.com [IPv6:2607:f8b0:4864:20::42f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 105B445BE2 for ; Wed, 18 Jan 2023 07:10:48 -0800 (PST) Received: by mail-pf1-x42f.google.com with SMTP id g205so9328332pfb.6 for ; Wed, 18 Jan 2023 07:10:48 -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=t4t3wjs91jqYDdhcaBgIoHHF665G49/NIuIJvlGrcfA=; b=Do9F396SRyFEV5JxNfbhAFqRMWeNzyfD1WsRYMmoSI5NQ0nbug+TxY3SaKiPs5a9Pw fdR8QaB4M85v9GsVqYcqCnDclRF/RVSxmYBMgKF1l3LucUAiXBAf/086AwtifvXmAe/B MZBjJxOX4wrbKnG+PlVFDYcKiKCT09DhEsY/KikbgL/WiS1cQA2NFIM4RkmK+hru+Gfi m/hpxzgMjZ8x8brdl3PgOhZaKWJszwS+5Rthb8IF4PjcH/k+wjpkYOT8XEB5cUv/G0Oy 1rcXFiGcE7RMaXs+ngfiDoWQqYvsrtt66hh3TzWLSVaDUTVKKlC/JhgxoeuhfqMu4NAS UTnA== 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=t4t3wjs91jqYDdhcaBgIoHHF665G49/NIuIJvlGrcfA=; b=uudhVfrFpCWH7mowHm4qb5JZrLbUw6aKNtHFW+RK0nDaAJCLoRJjU4H8MRxyKCC7cj D4i4z5Ras2UTj4JnW4bFR0H0ch3Z0XAGS54dnYHeEsYb2FCqsrP/YUHgW5F5wvAPI1y1 b+DTar4mTJOWNcZr8j0/djFu+11UwSaeBnfuuPA0at/fQJNX3IrfiOGkitHfNYm/Qcz7 tSwA+Vv9SGb0ykJLxb1qCllKFuILj7mM4LfnTgTa1XxamBukcHRlNdK9EbixwB59A1Wo 9TtvRNhpTXBRt1gvn25Hj5B4Z7tTD8GPdEy0WMZVDNzV6ThFPYcgNT9amd7n+URWn+Y4 dCsQ== X-Gm-Message-State: AFqh2krMyT6XFv4gFH93OJ95XKngrOhkfNIJVuH3j8fjeK5co/J32wbl rsmaD1b8+UZsW+iJ384/cZnK X-Received: by 2002:a05:6a00:2986:b0:58c:8bdd:2e3c with SMTP id cj6-20020a056a00298600b0058c8bdd2e3cmr7663075pfb.20.1674054648177; Wed, 18 Jan 2023 07:10:48 -0800 (PST) Received: from localhost.localdomain ([27.111.75.61]) by smtp.gmail.com with ESMTPSA id i15-20020aa796ef000000b0058d9623e7f1sm6721544pfq.73.2023.01.18.07.10.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 18 Jan 2023 07:10:47 -0800 (PST) From: Manivannan Sadhasivam 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 , stable@vger.kernel.org Subject: [PATCH v6 17/17] soc: qcom: llcc: Do not create EDAC platform device on SDM845 Date: Wed, 18 Jan 2023 20:39:04 +0530 Message-Id: <20230118150904.26913-18-manivannan.sadhasivam@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230118150904.26913-1-manivannan.sadhasivam@linaro.org> References: <20230118150904.26913-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 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?1755374579446295475?= X-GMAIL-MSGID: =?utf-8?q?1755374579446295475?= 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. Cc: # 5.10 Reported-by: Steev Klimaszewski Signed-off-by: Manivannan Sadhasivam --- drivers/soc/qcom/llcc-qcom.c | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/drivers/soc/qcom/llcc-qcom.c b/drivers/soc/qcom/llcc-qcom.c index 7b7c5a38bac6..8d840702df50 100644 --- a/drivers/soc/qcom/llcc-qcom.c +++ b/drivers/soc/qcom/llcc-qcom.c @@ -1012,11 +1012,18 @@ 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"); + /* + * The platforms based on SDM845 SoC locks the access to EDAC registers + * in bootloader. So probing the EDAC driver will result in a crash. + * Hence, disable the creation of EDAC platform device on SDM845. + */ + if (!of_device_is_compatible(dev->of_node, "qcom,sdm845-llcc")) { + 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: