Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp935456pxb; Wed, 6 Apr 2022 04:46:22 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz1IX1fKgs+TQ7cLoy1sTIzVjhzaycYJCD5IDaMcEmH2jLrCnufFUZJch+9AhHgVS66rG96 X-Received: by 2002:a17:903:246:b0:153:857c:a1f6 with SMTP id j6-20020a170903024600b00153857ca1f6mr7912933plh.153.1649245582542; Wed, 06 Apr 2022 04:46:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649245582; cv=none; d=google.com; s=arc-20160816; b=YLENpR39LfZm4dHq0Ooz4khhiTR682K7pFAuHDPZ5Zibuqbovcdg3IzRJsBofslc8C MzKk36Ohe9VnzElZFDAcktFsy6fDJ/RksgUzJP5++1QiLmH2k3RCC+gkMtM/VwRVv8kO 05yDy9iqf7szyC7NMMJ+is8CmOfRctkD8u3mXFs/WYNJt9J62aH8b5juXB07cFydcDfB G2lSCcQURY2+VQljQjgNTkU2hSCV+l8LITTDfdhMdHtvaG4ptlxKKnlkLGUxNXcNYaC9 gZamlWCBgAhLUcHt6EOFqICK7Kj2PGjhXnpRSsGlSUCzs76GcbLmAJDUw4/OH02SeFqY isvA== 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=UrtGknhust+uus4d592CYFd8hbMinKo6FVs/kqShK32eZQ0c8IAYjSmJsfbOAXLpxN u0OXJHhop4oM44fzZ253K/q+7XwdkxBJJ/zIWDh4VpzcpXHgfGa3zMkcTLBcaA+vUPhb qJNsEnpUEtn4UoBVBDDR0T2f9NWca/7aWueDdL2Sd1DRjrA/e5ibOwQjlS5Povs4K17Y yUzcAsqm1JfDHex1ORk0C3HXDsy5OcyIQgNbyO8a9uMsaMvNtt5yFllgyng8FRjruWAn 2lnwEAsc6DaOvFK1xq8hyzFhWHDM/kPnAbGS3h1eo6IwoGbqQVb+q8A/xnmKCFE9BbXx zwwA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=Z5ivzd9T; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 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 lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id 36-20020a630e64000000b003816043f0c1si16242692pgo.694.2022.04.06.04.46.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 06 Apr 2022 04:46:22 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=Z5ivzd9T; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id B1DB25DA22; Wed, 6 Apr 2022 03:03:14 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1452968AbiDEXrG (ORCPT + 99 others); Tue, 5 Apr 2022 19:47:06 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58510 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1352388AbiDEKEb (ORCPT ); Tue, 5 Apr 2022 06:04:31 -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 99F2FBA31B; Tue, 5 Apr 2022 02:53:11 -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 3D780B818F3; Tue, 5 Apr 2022 09:53:10 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 8A26AC385A2; Tue, 5 Apr 2022 09:53:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1649152388; bh=Qb/oTH/UWrZXJOhd5uOtZEXXGxt5HFJZw3S+Cihmmxc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Z5ivzd9TLJAwtRh9wQUCxcwiH4KnkaxH+StqwVqLzgRXcDETKdW/LeGyHv/PYHGa0 +6sUjJLAnw1yh9SntBEn/nej7V/i++Luc8rPrY3loCiaH7IbmWm2bo+kKlA3uOwSSO c4lHVD/AIGVeaaAtL6czjqI8rYjrmzL1rOrVI/fw= 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.15 742/913] ARM: dts: bcm2837: Add the missing L1/L2 cache information Date: Tue, 5 Apr 2022 09:30:04 +0200 Message-Id: <20220405070402.077174085@linuxfoundation.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220405070339.801210740@linuxfoundation.org> References: <20220405070339.801210740@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=-2.0 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no 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