Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp666022pxb; Tue, 5 Apr 2022 17:57:39 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzG6osUM3AINBr+Ml2PQ7yrbSN6YEx0kL9LQyq59vxrJNTy5EXZTx79ZeghBhzyIK1sp71I X-Received: by 2002:a05:6402:5250:b0:419:2902:2833 with SMTP id t16-20020a056402525000b0041929022833mr6302494edd.153.1649206659089; Tue, 05 Apr 2022 17:57:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649206659; cv=none; d=google.com; s=arc-20160816; b=IAZ3tfiop3Bs5eKO/dm0Pp/uuTK3EMkftqELQhuUyLXCX2Tt4bTEB2eZOi2+stCynH mX6m5mzp75gido1SjKUOyZQpLnuQ2JI4HU9jTy9yyw3j/5JqpD/KuAOjGfeUhQ+54tbk pjGP6mlaVNx1y77ZDkiAbApQVBrqnnZNXJRIoRCNpINx4TG/J4W6gXpHb6tPdB7q92vQ YdjwsBk+6lAlr1Afo0Rr592ITGg4x6vGDUxCopRYgyzhXKdm9sAXJWR+g8nJHrO05kUI JByyKJ8/gqHJ6lF8a0z/S69sIfOgJoMtpssJL9UildH0a94ea9WLfnFtACjlB+pAYdfe Vl1g== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=EmTjG+EkhbitDGEVwaWSAY+x1kTKnGXxEzwyhl6bV4A=; b=EIBGak8+i5rHoDg19ZQWkw37hN5zD7krqJjOjrK4jrJMHKCaL2crfgjs7VcONNSbHy BwTkSTOxW6kfsXTWH1/yH6Ppf6zFDI7/et/Fg1e5A2ix6g8CSzUYcGGlIuGuz9qlDJmN +2+2dMYep04z/fG29ncXgKazamCUelA0pPhsey94bBTqNBZMUV/2Y0EZ7//RPHk0tibF T8pmo+EyJrkThFWbxGyVolPn4SF3sIaUh+6UdO2EYsVhnY+rXy6q1tMkq1dFYZN3IbZX ZGzzJnJjOmUNoV7nRzTk3MG8PpJh2c8cGL6sEC0H68xu/peenQPKENWEVBLXO/V0/EST GzPQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=Ntt1aSOJ; 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=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id jx5-20020a170907760500b006df76385d7asi7478556ejc.538.2022.04.05.17.57.11; Tue, 05 Apr 2022 17:57:39 -0700 (PDT) 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=@linuxfoundation.org header.s=korg header.b=Ntt1aSOJ; 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=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1388505AbiDENWU (ORCPT + 99 others); Tue, 5 Apr 2022 09:22:20 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60034 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1344988AbiDEJWH (ORCPT ); Tue, 5 Apr 2022 05:22:07 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 821D723BE3; Tue, 5 Apr 2022 02:08:55 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 09AFEB818F3; Tue, 5 Apr 2022 09:08:54 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 68991C385A0; Tue, 5 Apr 2022 09:08:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1649149732; bh=Qb/oTH/UWrZXJOhd5uOtZEXXGxt5HFJZw3S+Cihmmxc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Ntt1aSOJuKMWjPgD0Te0jXc3BEY4+8lI5VG+A/d9pC5UNiQ40YExpz8OmA3b/WhWJ s6aPFVLhvrtphRabAOmRaShet7NsaDznloDGHHheLLLqvsnSlUBhfOs2+qjiQODaGD PH/AgBHaxe+0WH+uZGasnIPSVZa2KslejrEVb4Vg= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Richard Schleich , Stefan Wahren , Florian Fainelli , Sasha Levin Subject: [PATCH 5.16 0821/1017] ARM: dts: bcm2837: Add the missing L1/L2 cache information Date: Tue, 5 Apr 2022 09:28:54 +0200 Message-Id: <20220405070418.617602378@linuxfoundation.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220405070354.155796697@linuxfoundation.org> References: <20220405070354.155796697@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE 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 From: Richard Schleich [ Upstream commit bdf8762da268d2a34abf517c36528413906e9cd5 ] This patch fixes the kernel warning "cacheinfo: Unable to detect cache hierarchy for CPU 0" for the bcm2837 on newer kernel versions. Signed-off-by: Richard Schleich Tested-by: Stefan Wahren [florian: Align and remove comments matching property values] Signed-off-by: Florian Fainelli Signed-off-by: Sasha Levin --- arch/arm/boot/dts/bcm2837.dtsi | 49 ++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) diff --git a/arch/arm/boot/dts/bcm2837.dtsi b/arch/arm/boot/dts/bcm2837.dtsi index 0199ec98cd61..5dbdebc46259 100644 --- a/arch/arm/boot/dts/bcm2837.dtsi +++ b/arch/arm/boot/dts/bcm2837.dtsi @@ -40,12 +40,26 @@ #size-cells = <0>; enable-method = "brcm,bcm2836-smp"; // for ARM 32-bit + /* Source for d/i-cache-line-size and d/i-cache-sets + * https://developer.arm.com/documentation/ddi0500/e/level-1-memory-system + * /about-the-l1-memory-system?lang=en + * + * Source for d/i-cache-size + * https://magpi.raspberrypi.com/articles/raspberry-pi-3-specs-benchmarks + */ cpu0: cpu@0 { device_type = "cpu"; compatible = "arm,cortex-a53"; reg = <0>; enable-method = "spin-table"; cpu-release-addr = <0x0 0x000000d8>; + d-cache-size = <0x8000>; + d-cache-line-size = <64>; + d-cache-sets = <128>; // 32KiB(size)/64(line-size)=512ways/4-way set + i-cache-size = <0x8000>; + i-cache-line-size = <64>; + i-cache-sets = <256>; // 32KiB(size)/64(line-size)=512ways/2-way set + next-level-cache = <&l2>; }; cpu1: cpu@1 { @@ -54,6 +68,13 @@ reg = <1>; enable-method = "spin-table"; cpu-release-addr = <0x0 0x000000e0>; + d-cache-size = <0x8000>; + d-cache-line-size = <64>; + d-cache-sets = <128>; // 32KiB(size)/64(line-size)=512ways/4-way set + i-cache-size = <0x8000>; + i-cache-line-size = <64>; + i-cache-sets = <256>; // 32KiB(size)/64(line-size)=512ways/2-way set + next-level-cache = <&l2>; }; cpu2: cpu@2 { @@ -62,6 +83,13 @@ reg = <2>; enable-method = "spin-table"; cpu-release-addr = <0x0 0x000000e8>; + d-cache-size = <0x8000>; + d-cache-line-size = <64>; + d-cache-sets = <128>; // 32KiB(size)/64(line-size)=512ways/4-way set + i-cache-size = <0x8000>; + i-cache-line-size = <64>; + i-cache-sets = <256>; // 32KiB(size)/64(line-size)=512ways/2-way set + next-level-cache = <&l2>; }; cpu3: cpu@3 { @@ -70,6 +98,27 @@ reg = <3>; enable-method = "spin-table"; cpu-release-addr = <0x0 0x000000f0>; + d-cache-size = <0x8000>; + d-cache-line-size = <64>; + d-cache-sets = <128>; // 32KiB(size)/64(line-size)=512ways/4-way set + i-cache-size = <0x8000>; + i-cache-line-size = <64>; + i-cache-sets = <256>; // 32KiB(size)/64(line-size)=512ways/2-way set + next-level-cache = <&l2>; + }; + + /* Source for cache-line-size + cache-sets + * https://developer.arm.com/documentation/ddi0500 + * /e/level-2-memory-system/about-the-l2-memory-system?lang=en + * Source for cache-size + * https://datasheets.raspberrypi.com/cm/cm1-and-cm3-datasheet.pdf + */ + l2: l2-cache0 { + compatible = "cache"; + cache-size = <0x80000>; + cache-line-size = <64>; + cache-sets = <512>; // 512KiB(size)/64(line-size)=8192ways/16-way set + cache-level = <2>; }; }; }; -- 2.34.1